const DS2 = window.MattiuzDesignSystem_ac598e; const { Logo, WaveElement, PatternBlock, SectionHeader, Button, Card, Badge, Stat, Tooltip } = DS2; const WAVE_N = [1, 6, 10, 4, 2]; const MARK_V = "?v=4"; const LINE_SRC = ["port/woven.jpg", "port/knitted.jpg", "port/non-woven.jpg", "port/bonding.jpg", "port/specialty.jpg", "port/narrow.jpg"].map((f) => f + MARK_V); const HOME_SRC = ["home/woven.jpg", "home/knitted.jpg", "home/non-woven.jpg"].map((f) => f + MARK_V); const HERO_SRCS = [1, 2, 3, 4].map((n) => `assets/video/hero-${n}.mp4`); const HERO_FADE = 900; function HeroVideo() { const refs = HERO_SRCS.map(() => React.useRef(null)); const [cur, setCur] = React.useState(0); const busy = React.useRef(false); React.useEffect(() => { const v = refs[cur].current; if (!v) return; v.muted = true; v.playbackRate = 0.5; const start = () => { v.playbackRate = 0.5; v.play().catch(() => {}); }; start(); v.addEventListener("canplay", start); busy.current = false; return () => v.removeEventListener("canplay", start); }, [cur]); const onTime = (i) => () => { const v = refs[i].current; if (i !== cur || busy.current || !v || !v.duration) return; if ((v.duration - v.currentTime) / 0.5 > HERO_FADE / 1000) return; busy.current = true; const n = (i + 1) % HERO_SRCS.length; const nv = refs[n].current; if (nv) { nv.muted = true; nv.currentTime = 0; nv.playbackRate = 0.5; nv.play().catch(() => {}); } setCur(n); setTimeout(() => { if (refs[i].current) refs[i].current.pause(); }, HERO_FADE); }; return ( {HERO_SRCS.map((s, k) => ( ))} ); } function Home({ go, t }) { return ( {t.hero_over} Mattiuz{t.hero_h1a}{t.hero_h1b} {t.hero_p} go("portfolio")}>{t.hero_b1} go("history")}>{t.hero_b2} {t.eixos.map((e, i) => ( {e[0]} {e[1]} ))} go("history")}>{t.nav_hist} {[ ["producao-rolos.jpg", "Produção de rolos de materiais têxteis na Mattiuz"], ["acabamento-dobras.jpg", "Acabamento de materiais têxteis na Mattiuz"], ["estoque-rolos.jpg", "Estoque de rolos de materiais têxteis da Mattiuz"] ].map(([f, alt]) => ( ))} go("portfolio")}>{t.prod_all} {t.lines.slice(0, 3).map((l, i) => go("portfolio")} />)} {t.cta_t} {t.cta_p} go("contact")}>{t.cta_b} ); } function LineTeaser({ l, i, t, onAsk }) { return ( {l.lab} {l.t} {l.spec} {l.seal.map((s, k) => {s})} {t.ask} ); } Object.assign(window, { Home, LineTeaser, LINE_SRC });
{t.hero_p}
{e[1]}
{t.cta_p}