1import{a as no,j as e,R as we,r as o,u as ro,p as io}from"./index-L9AYrVUw.js";import{C as xa,R as co,T as ga,p as lo,s as Ga,a as Wa,b as uo,g as Ka,c as fo,l as mo,o as po}from"./PlanAccessModal-P_W2GThH.js";import{F as ya}from"./FirstTimeExploreShowcase-CUxewfVe.js";import{m as ho}from"./CursorClick.es-C3tPERmx.js";import{l as Qa}from"./Trash.es-D2Zs5Rpt.js";import{s as xo}from"./Hand.es-CLd2KHSz.js";import{I as go}from"./Image.es-BLTC_PgL.js";import{m as yo}from"./Minus.es-Dn8w88Wl.js";import{n as bo}from"./Package.es-CyLjTX4J.js";import{a as Ja}from"./PencilSimple.es-DDA0fpvv.js";import{n as wo}from"./Plus.es-BeVefyFz.js";import{c as eo}from"./Resize.es-BwoWh9ki.js";import{l as vo}from"./UploadSimple.es-BDJIa312.js";import{s as jo}from"./VideoCamera.es-CCLoNiT_.js";import{S as to,c as Ie}from"./locale-Cctu0V3Y.js";import{S as Ro}from"./SnewLogo-Cg53XTnQ.js";import{T as Yt,a as Ce,b as ba}from"./ToolbarPrimitives-DpoRgruO.js";import{m as Ao}from"./boardMetabar-1Nzocm5E.js";import{c as No}from"./dissolve-CQo8GAUH.js";import{C as Co,T as Eo,c as Fo}from"./heroScene-DvqR1vE_.js";import{L as Mo,F as So}from"./LandingSeo-CtCW8E98.js";import{f as _o,h as zo}from"./howBoardScene-B4aogWYK.js";import{L as To,a as ua}from"./LandingHeading-Du94IKOt.js";import{N as Ht,a as wa,b as $o,c as Do}from"./nodeConnectionVisual-Diz8lAIC.js";import{S as va,H as ja,P as Oo,F as Io}from"./ProductFeaturesGrid-DwNtTN1j.js";import{Link as Ra}from"./index-p7aFGi8o.js";import{F as ko}from"./FaqSection-CEmyOyYS.js";import{P as Ho}from"./PublicTopBar-CX1cIMPi.js";import{P as Lo}from"./PublicFooter-DQEW6BgS.js";import{s as Aa,l as Po}from"./copy-D4zGkB4a.js";import{S as Bo,s as Vo}from"./segmentCopy-Cf1nsK83.js";import{u as Yo}from"./useLandingLang-C0r2Rbk0.js";import{c as Ut,v as qo}from"./showcase-qHVT8Yso.js";import{c as Zt,t as Uo}from"./catalog-CkHlpXUG.js";import{t as mt,a as jt,i as Xt,b as ma}
1from"./overrides-DxGb-X-q.js";import{S as Zo}from"./types-YVLQw7aQ.js";import"./productFunnel-DiJFcMU2.js";import"./TriptychCard-CooUfvoh.js";import"./ImageSquare.es-Ckk4CjAE.js";import"./entries-DM0IuApj.js";import"./sceneCovers-B-dE7_Ce.js";import"./store-CVXWfzEM.js";import"./ShowcaseCard-BFEMhBRb.js";import"./overImage-BfLII5AZ.js";import"./StyleEditStarterOverlay-BFzAjjM3.js";import"./ProductPickerModal-DZV-fDl_.js";import"./firstAsset-DWUwvZpm.js";import"./modal-close-button-BhLoO4jQ.js";import"./tabs-CmDZA0dx.js";import"./index-BKpKuXmL.js";import"./index-Eo00qZvG.js";import"./SearchInput-h5gAN-Be.js";import"./promptBox-D9Xxfn9U.js";import"./StarterModalShell-BqsuvlPe.js";import"./PillSelect-DrQvPMFB.js";import"./pill-dropdown-menu-CmrSXir-.js";import"./aspectRatios-DDqw6bsx.js";import"./use-exclusive-open-LN4OUcjO.js";import"./ChatSubmitButton-Bm0hHp2J.js";import"./resolveCasting-1-rDPxyF.js";import"./eligibility-B5UjMwH6.js";import"./scoring-Oj4SgCwH.js";import"./visualDirection-6RyRmTlC.js";import"./productHeight-D88Bzh8q.js";import"./qaSignal-BzonQWWb.js";import"./shadow-1gm38VU4.js";import"./CastingTagPill-Dxy3OzJ5.js";import"./User.es-DVlkNLFL.js";import"./castingThumbnail-BTwl0DD5.js";import"./useFileDrop-Bndg9qCI.js";import"./useGenerationCreditCost-DQbGS72G.js";import"./stagingLeanLibrary-OoJ8Uo_5.js";import"./useFullInventory-COSthsrP.js";import"./OnboardingPrimaryButton-DXhfBHeb.js";import"./floatingSnapshot-BDIOQ2DO.js";import"./MegaphoneSimple.es-Cci_hVqJ.js";import"./Palette.es-Dd5ZEM4v.js";import"./TemplateConnections-DLyAy8gh.js";import"./generation-shimmer-CRk6nK9x.js";const pa="cubic-bezier(.22, 1, .36, 1)",Na=["/assets/style-library/1bf2a121dc8e9e22ef9700febdbc4f2ae83cd0fc5b1e19d4f719cb11cf0e9749.jpg","/assets/style-library/8399858f2b74cda290e33702708dba1004fa8a8c969d74ddea825f30a8ec2b19.jpg","/assets/style-library/0c009f03c118cece695c75f82d22fb528738350569ae856e82117ff9a0bd9450.png","/assets/style-library/88a16d46ce7e9f3b2382ab8a7d1338dfa790bf9e71ae68f57c687b04d28c6dfe.jpg","/assets/style-library/0abef2879b7819baf0bf0dd35c79ad54131bcf6c252440dc60f40dc7e241757b.jpg"],oa=["/demo-stores/demo-perfumaria/rito-eau-de-parfum.jpg","/demo-stores/demo-fashion-fem/alva-bolsa-estruturada.jpg","/demo-stores/demo-joias/ciano-relogio-minimalista.jpg"],Ca=["/assets/style-library/90718afae9af9c81ca2a22bce3d48c699f9381e5c53f59fbda286daa5f18db78.jpg","/assets/style-library/ca89723d06f993389f783d0cab9d2759514d107fb494e98ff41b84bb7c51def4.jpg","/assets/style-library/29b48ccdf485d5c234a6605f0f7792dc14cf6e423bd5f27521ebf15e249ed7d5.png","/assets/style-library/ce08b159835e335653f209540bb6e17b3a500c6401dcdc311813fd6600a86680.png","/assets/style-library/35e86eec90670a2f18039d10c59291e484b31ccd9cef68ac75e614efcd8d818a.png"],Ea=["/assets/style-library/8ac1f5391dea1137ee6ed1acc95db2f52029f84ed27534c8c795738244bf36c9.jpg","/assets/style-library/e8b32e540b05b5bbf1130b83d7ef2344a765ad900193ebbd8de4560e6d58335c.jpg","/assets/style-library/bd9cf58f566f6918ccef927a353ec1ffaca38ed65394b7a15085df839c589b86.jpg","/assets/style-library/4338e63755a9a6432e8a442937c1209af805fadf5603d8c1202bb2ed6a5fef8a.jpg","/assets/style-library/90718afae9af9c81ca2a22bce3d48c699f9381e5c53f59fbda286daa5f18db78.jpg"],Xo={en:[{title:"Create a carousel",description:"Create a sequence of images for Instagram."},{title:"Edit your product",description:"Choose a product and place it in a new scene."},{title:"Explore styles",description:"Ready-made scenes and treatments for what you sell."},{title:"Create video stories",description:"Turn your product into vertical stories ready to share."}],"pt-BR":[{title:"Crie um carrossel",description:"Crie uma sequência de imagens para o Instagram."},{title:"Edite seu produto",description:"Escolha um produto e veja ele em uma nova cena."},{title:"Conheça os presets",description:"Cenas e tratamentos prontos para aplicar no que você vende."},{title:"Crie stories em vÃdeo",description:"Transforme seu produto em stories verticais prontos para compartilhar."}]};function Go(){const[a,t]=we.useState(!1);return we.useEffect(()=>{const s=window.matchMedia("(prefers-reduced-motion: reduce)"),m=()=>t(s.matches);return m(),s.addEventListener("change",m),()=>s.removeEventListener("change",m)},[]),a}function Qt(a,t=780){const s=we.useRef(null),[m,d]=we.useState(!1),[l,x]=we.useState(!0),[n,y]=we.useState(()=>!document.hidden),[S,p]=we.useState(!1),[f,Z]=we.useState(!1),[T,Q]=we.useState(0),[E,z]=we.useState(160),_=Go();we.useEffect(()=>{let c=!0;return Promise.all(a.map(j=>new Promise(F=>{const $=new Image;$.onload=()=>{var P;(P=$.decode)==null||P.call($).catch(()=>{}).finally(F)},$.onerror=()=>F(),$.src=j}))).then(()=>{c&&p(!0)}),()=>{c=!1}},[a]),we.useEffect(()=>{const c=s.current;if(!c||typeof IntersectionObserver>"u")return;const j=new IntersectionObserver(([F])=>x(F.isIntersecting),{threshold:.08});return j.observe(c),()=>j.disconnect()},[]),we.useEffect(()=>{const c=()=>y(!document.hidden);return document.addEventListener("visibilitychange",c),()=>document.removeEventListener("visibilitychange",c)},[]);const h=m&&l&&n&&S&&!_;we.useEffect(()=>{if(!h||f)return;const c=window.setTimeout(()=>Z(!0),E);return()=>window.clearTimeout(c)},[h,E,f,T]),we.useEffect(()=>{if(!f)return;const c=window.setTimeout(()=>{Q(j=>(j+1)%a.length),Z(!1),z(850)},t);return()=>window.clearTimeout(c)},[a.length,f,t]);const M=we.useCallback(()=>{z(160),d(!0)},[]),L=we.useCallback(()=>d(!1),[]);return{rootRef:s,moving:f,offset:T,reduced:_,start:M,stop:L}}function kt(a,t){return a[(t+a.length)%a.length]}function Wo(){const a=Qt(Na);return{motion:a,visual:e.jsx("span",{className:"ft-action-stage ft-carousel","aria-hidden":"true",children:[0,1,2,3].map(t=>e.jsx("span",{className:"ft-carousel-tile","data-moving":a.moving||void 0,"data-slot":t,style:{backgroundImage:`url(${kt(Na,a.offset+t)})`,transitionTimingFunction:pa}},`${a.offset}-${t}`))})}}function Ko(){const a=Qt(oa,720),t=kt(oa,a.offset),s=kt(oa,a.offset+1);return{motion:a,visual:e.jsxs("span",{className:"ft-action-stage ft-product-scene","aria-hidden":"true",children:[e.jsx("span",{className:"ft-scene-layer ft-scene-current","data-moving":a.moving||void 0,children:e.jsx("img",{src:t,alt:""})},`scene-${t}`),e.jsx("span",{className:"ft-scene-layer ft-scene-next","data-moving":a.moving||void 0,children:e.jsx("img",{src:s,alt:""})},`scene-${s}`),e.jsx("span",{className:"ft-product-layer ft-product-current","data-moving":a.moving||void 0,children:e.jsx("img",{src:t,alt:""})},`product-${t}`),e.jsx("span",{className:"ft-product-layer ft-product-next","data-moving":a.moving||void 0,children:e.jsx("img",{src:s,alt:""})},`product-${s}`)]})}}function Qo(){const a=Qt(Ca);return{motion:a,visual:e.jsx("span",{className:"ft-action-stage ft-stack","aria-hidden":"true",children:[0,1,2,3].map(t=>e.jsx("span",{className:"ft-stack-tile","data-moving":a.moving||void 0,"data-slot":t,style:{backgroundImage:`url(${kt(Ca,a.offset+t)})`,transitionTimingFunction:pa}},`${a.offset}-${t}`))})}}function Jo(){const a=Qt(Ea);return{motion:a,visual:e.jsx("span",{className:"ft-action-stage ft-video-story","aria-hidden":"true",children:[0,1,2,3].map(t=>e.jsx("span",{className:"ft-story-tile","data-moving":a.moving||void 0,"data-slot":t,style:{backgroundImage:`url(${kt(Ea,a.offset+t)})`,transitionTimingFunction:pa},children:t===0&&e.jsx("span",{className:"ft-story-play"})},`${a.offset}-${t}`))})}}function Lt({title:a,description:t,onClick:s,visual:m,motion:d}){const[l,x]=we.useState(!1);return e.jsxs("button",{ref:d.rootRef,type:"button",className:"ft-action-card",onClick:s,onPointerEnter:n=>{n.pointerType!=="touch"&&(x(!0),d.start())},onPointerLeave:()=>{x(!1),d.stop()},onFocus:d.start,onBlur:d.stop,style:{borderRadius:co.homeCard,background:`hsl(${l?xa.bg.secondary:xa.bg.tertiary})`},children:[m,e.jsx("span",{style:ga.cardTitle,children:a}),e.jsx("span",{style:ga.cardSupport,children:t})]})}function es({onCreateCarousel:a,onEditProduct:t,onExploreStyles:s,onCreateVideoStory:m,language:d}){const{lang:l}=no(),x=d??l,n=Wo(),y=Ko(),S=Qo(),p=Jo(),f=Xo[x];return e.jsxs("div",{className:"ft-action-grid","data-testid":"first-time-action-cards",children:[e.jsx(Lt,{...f[0],onClick:a,...n}),e.jsx(Lt,{...f[1],onClick:t,...y}),e.jsx(Lt,{...f[2],onClick:s,...S}),e.jsx(Lt,{...f[3],onClick:m,...p})]})}const ts=new Map([["bold",o.createElement(o.Fragment,null,o.createElement("path",{d:"M220,48V88a12,12,0,0,1-24,0V60H168a12,12,0,0,1,0-24h40A12,12,0,0,1,220,48ZM88,196H60V168a12,12,0,0,0-24,0v40a12,12,0,0,0,12,12H88a12,12,0,0,0,0-24Zm120-40a12,12,0,0,0-12,12v28H168a12,12,0,0,0,0,24h40a12,12,0,0,0,12-12V168A12,12,0,0,0,208,156ZM88,36H48A12,12,0,0,0,36,48V88a12,12,0,0,0,24,0V60H88a12,12,0,0,0,0-24Z"}))],["duotone",o.createElement(o.Fragment,null,o.createElement("path",{d:"M208,48V208H48V48Z",opacity:"0.2"}),o.createElement("path",{d:"M216,48V88a8,8,0,0,1-16,0V56H168a8,8,0,0,1,0-16h40A8,8,0,0,1,216,48ZM88,200H56V168a8,8,0,0,0-16,0v40a8,8,0,0,0,8,8H88a8,8,0,0,0,0-16Zm120-40a8,8,0,0,0-8,8v32H168a8,8,0,0,0,0,16h40a8,8,0,0,0,8-8V168A8,8,0,0,0,208,160ZM88,40H48a8,8,0,0,0-8,8V88a8,8,0,0,0,16,0V56H88a8,8,0,0,0,0-16Z"}))],["fill",o.createElement(o.Fragment,null,o.createElement("path",{d:"M93.66,202.34A8,8,0,0,1,88,216H48a8,8,0,0,1-8-8V168a8,8,0,0,1,13.66-5.66ZM88,40H48a8,8,0,0,0-8,8V88a8,8,0,0,0,13.66,5.66l40-40A8,8,0,0,0,88,40ZM211.06,160.61a8,8,0,0,0-8.72,1.73l-40,40A8,8,0,0,0,168,216h40a8,8,0,0,0,8-8V168A8,8,0,0,0,211.06,160.61ZM208,40H168a8,8,0,0,0-5.66,13.66l40,40A8,8,0,0,0,216,88V48A8,8,0,0,0,208,40Z"}))],["light",o.createElement(o.Fragment,null,o.createElement("path",{d:"M214,48V88a6,6,0,0,1-12,0V54H168a6,6,0,0,1,0-12h40A6,6,0,0,1,214,48ZM88,202H54V168a6,6,0,0,0-12,0v40a6,6,0,0,0,6,6H88a6,6,0,0,0,0-12Zm120-40a6,6,0,0,0-6,6v34H168a6,6,0,0,0,0,12h40a6,6,0,0,0,6-6V168A6,6,0,0,0,208,162ZM88,42H48a6,6,0,0,0-6,6V88a6,6,0,0,0,12,0V54H88a6,6,0,0,0,0-12Z"}))],["regular",o.createElement(o.Fragment,null,o.createElement("path",{d:"M216,48V88a8,8,0,0,1-16,0V56H168a8,8,0,0,1,0-16h40A8,8,0,0,1,216,48ZM88,200H56V168a8,8,0,0,0-16,0v40a8,8,0,0,0,8,8H88a8,8,0,0,0,0-16Zm120-40a8,8,0,0,0-8,8v32H168a8,8,0,0,0,0,16h40a8,8,0,0,0,8-8V168A8,8,0,0,0,208,160ZM88,40H48a8,8,0,0,0-8,8V88a8,8,0,0,0,16,0V56H88a8,8,0,0,0,0-16Z"}))],["thin",o.createElement(o.Fragment,null,o.createElement("path",{d:"M212,48V88a4,4,0,0,1-8,0V52H168a4,4,0,0,1,0-8h40A4,4,0,0,1,212,48ZM88,204H52V168a4,4,0,0,0-8,0v40a4,4,0,0,0,4,4H88a4,4,0,0,0,0-8Zm120-40a4,4,0,0,0-4,4v36H168a4,4,0,0,0,0,8h40a4,4,0,0,0,4-4V168A4,4,0,0,0,208,164ZM88,44H48a4,4,0,0,0-4,4V88a4,4,0,0,0,8,0V52H88a4,4,0,0,0,0-8Z"}))]]),ao=o.forwardRef((a,t)=>o.createElement(lo,{ref:t,...a,weights:ts}));ao.displayName="CornersOutIcon";const as=ao,os=120,ss=2e-4;function Jt(a,t,s=os){let m=a(),d=0,l=0;const x=typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,n=S=>{d=0;const p=l?Math.min(S-l,64):0;l=S;const f=a();m+=(f-m)*(1-Math.exp(-p/s)),Math.abs(f-m)<ss&&(m=f),t(m),m!==f?d=requestAnimationFrame(n):l=0},y=()=>{m=a(),t(m)};return{acordar(){if(x){y();return}
1d||(d=requestAnimationFrame(n))},repintar(){t(m)},saltar:y,parar(){d&&cancelAnimationFrame(d),d=0,l=0}}}const Me=[{x0:.05,y0:.16,x1:.055,y1:.16,w:.145,ar:4/3,w1:.125,atraso:0},{x0:.23,y0:-.12,x1:.235,y1:.2,w:.128,ar:1,w1:.118,atraso:.016},{x0:.43,y0:.02,x1:.408,y1:.14,w:.152,ar:4/3,w1:.128,atraso:.008},{x0:.67,y0:-.08,x1:.596,y1:.21,w:.136,ar:1,w1:.116,atraso:.03},{x0:.86,y0:.18,x1:.765,y1:.15,w:.158,ar:1,w1:.13,atraso:.012},{x0:-.07,y0:.64,x1:.07,y1:.57,w:.15,ar:4/3,w1:.121,atraso:.036},{x0:.17,y0:.83,x1:.25,y1:.6,w:.134,ar:1,w1:.114,atraso:.006},{x0:.42,y0:.94,x1:.42,y1:.54,w:.156,ar:4/3,w1:.126,atraso:.026},{x0:.66,y0:.8,x1:.605,y1:.61,w:.13,ar:1,w1:.112,atraso:.042},{x0:.88,y0:.7,x1:.775,y1:.55,w:.148,ar:1,w1:.124,atraso:.02}],Fa=16/9,ns=.96,Ma=30,rs=40,is=.78,Sa=.6,Tt=Co,vt="32px",$t=1,_a=.35,za=[[1,1,1,1,1,1,1,1,1,1],[1.12,1.22,1.08,1.18,1.25,1.1,1.2,1.14,1.24,1.09],[1.23,1.11,1.26,1.16,1.21,1.25,1.13,1.24,1.18,1.27]];function Ta(a,t){const s=za[a]??za[0];return s[t%s.length]??1}const cs=[{x:-.09,y:.3,atraso:-.2,duracao:.42,z0:-920},{x:.1,y:-.17,atraso:.08,duracao:.37,z0:-1160},{x:.44,y:-.2,atraso:-.14,duracao:.44,z0:-1010},{x:.68,y:-.14,atraso:.16,duracao:.36,z0:-1280},{x:.9,y:.08,atraso:-.08,duracao:.41,z0:-1080},{x:1.08,y:.39,atraso:.04,duracao:.38,z0:-1360},{x:.78,y:.72,atraso:-.12,duracao:.43,z0:-970},{x:.69,y:.91,atraso:.12,duracao:.35,z0:-1210},{x:.24,y:.88,atraso:-.06,duracao:.4,z0:-1120},{x:-.1,y:.66,atraso:0,duracao:.37,z0:-1320}],ls=[{x:-.28,y:.18,atraso:0,duracao:.43,z0:-1940},{x:.08,y:-.34,atraso:.025,duracao:.36,z0:-2160},{x:.38,y:-.4,atraso:.05,duracao:.45,z0:-1870},{x:.72,y:-.32,atraso:.075,duracao:.34,z0:-2240},{x:1.06,y:.03,atraso:.1,duracao:.41,z0:-2020},{x:1.12,y:.45,atraso:.125,duracao:.35,z0:-2320},{x:.94,y:.78,atraso:.15,duracao:.44,z0:-1980},{x:.66,y:1.08,atraso:.175,duracao:.36,z0:-2180},{x:.2,y:1.15,atraso:.2,duracao:.42,z0:-2070},{x:-.18,y:.72,atraso:.225,duracao:.35,z0:-2280}],ds=[{x:-.3,y:.3,atraso:0,duracao:.39,z0:-1900},{x:.03,y:-.3,atraso:.02,duracao:.32,z0:-2160},{x:.34,y:-.43,atraso:.04,duracao:.4,z0:-2020},{x:.7,y:-.36,atraso:.06,duracao:.3,z0:-2280},{x:1.04,y:.01,atraso:.08,duracao:.37,z0:-1960},{x:1.15,y:.42,atraso:.1,duracao:.29,z0:-2340},{x:.98,y:.76,atraso:.12,duracao:.38,z0:-2060},{x:.68,y:1.08,atraso:.14,duracao:.31,z0:-2220},{x:.22,y:1.16,atraso:.16,duracao:.35,z0:-1990},{x:-.2,y:.76,atraso:.18,duracao:.3,z0:-2300}],sa=[0,.16,.4],us=[0,.026,.008,.04,.016,.05,.004,.034,.012,.044],fs=[.118,.148,.106,.136,.124,.154,.112,.142,.12,.15],na=4,ra=[{inicio:.1,duracao:.42,camadaDeImagem:1},{inicio:.34,duracao:.4,camadaDeImagem:2},{inicio:.57,duracao:.36,camadaDeImagem:3}],$a=[{indice:1,x:-.38,y:.35,atraso:0,duracao:.78,dx:-.22,dy:-.22},{indice:4,x:1.38,y:-.02,atraso:.09,duracao:.91,dx:.24,dy:-.2},{indice:6,x:-.02,y:1.25,atraso:.04,duracao:1,dx:-.18,dy:.26},{indice:8,x:1.04,y:1.2,atraso:.15,duracao:.84,dx:.2,dy:.24}],ia=1400,ms=.82;function ce(a,t,s){return a<t?t:a>s?s:a}function Ze(a,t,s){return a+(t-a)*s}const ps=2600,hs=2,Da=1600,xs=400,Oa=1200;function gs({imagens:a,camadas:t,hero:s,className:m}){const d=o.useRef(null),l=o.useRef(null),x=o.useRef(null),n=o.useRef(null),y=o.useRef(null),S=o.useRef(null),p=o.useRef([]),f=o.useRef([]),Z=o.useRef([]),T=o.useRef([]),Q=o.useRef([]),E=o.useRef([]),z=o.useRef([]),_=o.useRef([]),h=o.useMemo(()=>{var i;return((i=t==null?void 0:t[3])==null?void 0:i.length)===Tt?t[3].map(r=>[r]):a},[t,a]),[M,L]=o.useState(null),c=o.useRef(new Float64Array(Me.length*2)),j=o.useRef(()=>{}),F=o.useRef(null),$=o.useRef(null),[P,ve]=o.useState(()=>new Array(Me.length).fill(0)),B=o.useRef(new Int32Array(Me.length)),[W,J]=o.useState(!1),X=o.useRef(new Float64Array(Me.length).fill(1)),K=o.useRef(0),$e=o.useRef([]);o.useEffect(()=>{const i=d.current,r=l.current;if(!i||!r)return;let b=0,w=1,A=0,q=0;const g={x:0,y:0,w:0,h:0},I=new Float64Array(Me.length),k=new Float64Array(2),de=()=>{var ht;A=r.clientWidth,q=r.clientHeight;const ee=i.getBoundingClientRect().top+window.scrollY;b=Math.max(0,ee-document.documentElement.clientHeight),w=Math.max(1,ee+i.offsetHeight-r.offsetHeight-b);const nt=A*ns,Je=Math.max(1,q-rs-Ma);
1g.w=Math.min(nt,Je*Fa),g.h=g.w/Fa,g.x=(A-g.w)/2,g.y=q-g.h-Ma;const He=x.current;He&&(He.style.left=`${g.x}px`,He.style.top=`${g.y}px`,He.style.width=`${g.w}px`,He.style.height=`${g.h}px`);for(let Ee=0;Ee<Me.length;Ee++){if(Ee>=Tt)continue;const qe=Me[Ee];I[Ee]=qe.w1*g.w/(qe.w*A)}for(let Ee=0;Ee<k.length;Ee++)k[Ee]=((ht=p.current[Ee])==null?void 0:ht.getBoundingClientRect().width)??0},je=new Float64Array(Me.length*4).fill(Number.NaN);let We=-1,ke=-1,Y=-1,H=-1;const D=ee=>{const nt=ce((ee-Sa)/(is-Sa),0,1),Je=.6,He=.7,Ee=ce((ee-He)/(.75-He),0,1);for(let N=0;N<Me.length;N++){const ne=Me[N],Le=T.current[N];if(!Le)continue;const et=te=>{const ae=ce((te+400)/680,0,1);return Ze(1.04,1.12,ae)},Se=(te,ae,Fe,Ue,C=ne,Oe=N,xe=1)=>{const ge=Ue;let U=Fe.x-.5,v=Fe.y-.5;const O=Math.hypot(U,v);O<.08?(U=Oe%2===0?-1:1,v=Oe%3===0?-.45:.45):(U/=O,v/=O);const re=C.w*A*.78*xe,ie=C.w*A*$t*.78*xe,ye=[];U<-.001&&ye.push((te+re*1.15)/-U),U>.001&&ye.push((A-te+re*.15)/U),v<-.001&&ye.push((ae+ie*1.15)/-v),v>.001&&ye.push((q-ae+ie*.15)/v);const fe=Math.min(...ye.filter(Number.isFinite));return{x:te+U*fe*ge,y:ae+v*fe*ge}},Pe=(te,ae,Fe,Ue)=>{if(!te)return;const C=ce((ee-Fe-ae.atraso)/ae.duracao,0,1),Oe=ce(C/.68,0,1),xe=ce((C-.58)/.42,0,1),ge=ae;let U=ge.x*A,v=ge.y*q;const O=Ze(ae.z0,320,Oe),re=Ta(Ue,N);({x:U,y:v}=Se(U,v,ge,xe,ne,N,re));const ie=et(O)*re;if(Ue===0&&(N===0||N===4)){const ye=ia/(ia-O),fe=ne.w*A*ie*ye,Ve=N===0?-_a*fe:A-(1-_a)*fe,u=A/2,me=u+(Ve-u)/ye,pe=1-ce(ee/.08,0,1);U=Ze(U,me,pe)}te.style.opacity=ce(C/.12,0,1).toFixed(3),te.style.transform=`translate3d(${U.toFixed(1)}px, ${v.toFixed(1)}px, ${O.toFixed(1)}px) scale(${ie.toFixed(3)})`};if(Pe(Q.current[N],cs[N],sa[0],0),Pe(E.current[N],ls[N],sa[1],1),Pe(z.current[N],ds[N],sa[2],2),N<na){const te=$a[N];for(let ae=0;ae<ra.length;ae++){const Fe=ra[ae],Ue=_.current[ae*na+N];if(!Ue)continue;const C=Fe.inicio+te.atraso*Fe.duracao,Oe=Fe.duracao*te.duracao,xe=ce((ee-C)/Oe,0,1),ge=ae===1?.035:ae===2?-.025:0,U={x:te.x+ge,y:te.y+(ae===1?-.035:ae===2?.025:0)};let v=(U.x+te.dx*xe)*A,O=(U.y+te.dy*xe)*q;const re=Me[te.indice],ie=ce((xe-.58)/.42,0,1);({x:v,y:O}=Se(v,O,U,ie,re,te.indice+ae));const ye=Ze(-1720-ae*110-N*75,360,xe),fe=Ta(Fe.camadaDeImagem,te.indice);Ue.style.opacity=ce(xe/.16,0,1).toFixed(3),Ue.style.transform=`translate3d(${v.toFixed(1)}px, ${O.toFixed(1)}px, ${ye.toFixed(1)}px) scale(${(Ze(.58,.82,xe)*fe).toFixed(3)})`}}const ze=-1900-N%3*140,tt=Je+us[N],at=ce((ee-tt)/fs[N],0,1),lt=Ze(ze,0,at);let ue=g.x+ne.x1*g.w+c.current[N*2]*nt,_e=g.y+ne.y1*g.h+c.current[N*2+1]*nt;const Re=I[N],Be=lt;X.current[N]=Re;const ot=ce((ee-.64)/.16,0,1);if(ot>0){const te=ne.w*A*Re,ae=ne.w*A*ne.ar*Re;ue=Ze(ue,ce(ue,g.x+10,g.x+g.w-te-10),ot),_e=Ze(_e,ce(_e,g.y+10,g.y+g.h-ae-10),ot)}const xt=ce(at/.34,0,1);Le.style.opacity=xt.toFixed(3),Le.style.pointerEvents=at>=.999?"auto":"none",N===$.current&&F.current&&(F.current.style.transform=`translate3d(${(ue+ne.w*A*Re/2).toFixed(1)}px, ${_e.toFixed(1)}px, ${Be.toFixed(1)}px) scale(${Re.toFixed(3)})`,F.current.style.opacity=xt.toFixed(3));const De=N*4;Math.abs(ue-je[De])<.1&&Math.abs(_e-je[De+1])<.1&&Math.abs(Re-je[De+2])<.001&&Math.abs(Be-je[De+3])<.1||(je[De]=ue,je[De+1]=_e,je[De+2]=Re,je[De+3]=Be,Le.style.transform=`translate3d(${ue.toFixed(1)}px, ${_e.toFixed(1)}px, ${Be.toFixed(1)}px) scale(${Re.toFixed(3)})`)}nt===0&&c.current.fill(0);const qe=ce((ee-.94)/.06,0,1);if(Math.abs(qe-We)>=.001&&x.current){We=qe;const N=Ze(.72,1,qe);x.current.style.opacity=qe.toFixed(3),x.current.style.transform=`scale(${N.toFixed(3)})`}if(n.current){const N=ce((ee-.22)/.12,0,1),ne=N;if(Math.abs(ne-Y)>=.005){Y=ne;const Se=-25,Pe=125,ze=-8,tt=(ue,_e,Re)=>Ze(ue,_e,Re).toFixed(2),at=(ue,_e,Re=!1)=>{const Be=ce((N-_e)/.76,0,1),ot=f.current[ue],xt=Z.current[ue];ot&&(ot.style.clipPath=Re?`inset(${tt(Se,Pe,Be)}% ${ze}% ${Se}% ${ze}%)`:`inset(${Se}% ${ze}% ${tt(Se,Pe,Be)}% ${ze}%)`),xt&&(xt.style.clipPath=Re?`inset(${Se}% ${ze}% ${tt(Pe,Se,Be)}% ${ze}%)`:`inset(${tt(Pe,Se,Be)}% ${ze}% ${Se}% ${ze}%)`)};at(0,0),at(1,.12,!0);const lt=N;if(S.current&&(S.current.style.transform=`translate3d(0, ${(-32*lt).toFixed(2)}
1px, 0)`),y.current){const ue=Ze(k[0],k[1],lt);ue>0&&(y.current.style.width=`${ue.toFixed(2)}px`)}}const et=1-Ee;Math.abs(et-ke)>=.01&&(ke=et,n.current.style.opacity=et.toFixed(3),n.current.style.transform="none",n.current.style.pointerEvents=et>.5?"auto":"none")}for(const N of $e.current){if(!N.busy())continue;const ne=N.target(),Le=ne?T.current.indexOf(ne):-1;ne&&Le>=0&&N.follow(ne,X.current[Le])}Math.abs(ee-H)>=5e-4&&(H=ee,K.current=performance.now())},oe=window.matchMedia("(prefers-reduced-motion: reduce)").matches;if(de(),oe){D(1),j.current=()=>D(1);const ee=new ResizeObserver(()=>{de(),D(1)});return ee.observe(i),()=>ee.disconnect()}const Qe=Jt(()=>ce((window.scrollY-b)/(w*ms),0,1),D);Qe.saltar(),j.current=Qe.repintar,window.addEventListener("scroll",Qe.acordar,{passive:!0});const pt=new ResizeObserver(()=>{de(),je.fill(Number.NaN),We=-1,Qe.saltar()});return pt.observe(i),()=>{Qe.parar(),window.removeEventListener("scroll",Qe.acordar),pt.disconnect()}},[h.length]),o.useEffect(()=>{const i=l.current;if(!i||window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;const r=Y=>h.length?h[Y%h.length]??[]:[];if(!Me.some((Y,H)=>r(H).length>1))return;const b=window.setTimeout(()=>J(!0),Oa),w=[];for(let Y=0;Y<hs;Y++){const H=No({host:i,zIndex:20+Y,duration:Da});H&&w.push(H)}if(!w.length)return()=>window.clearTimeout(b);$e.current=w;const A=getComputedStyle(document.documentElement).getPropertyValue("--board-card-radius").trim()||"14px",q=new Set,g=w.map((Y,H)=>Me.map((D,oe)=>oe).filter(D=>D%w.length===H)),I=new Array(w.length).fill(0),k=Y=>{const H=g[Y];for(let D=0;D<H.length;D++){const oe=H[(I[Y]+D)%H.length];if(!q.has(oe)&&T.current[oe]&&!(r(oe).length<2))return I[Y]=(I[Y]+D+1)%H.length,oe}return-1},de=(Y,H)=>{const D=r(H),oe=T.current[H];if(!oe)return;const Ke=B.current[H],Qe=Ke%D.length,pt=(Ke+1)%D.length;let ee=!1;Y.run({el:oe,from:D[Qe].url,to:D[pt].url,radius:A,scale:X.current[H],onDone:()=>{ee=!0,q.delete(H),B.current[H]=Ke+1,ve(nt=>{const Je=[...nt];return Je[H]=Ke+1,Je})}}),Y.warm(D[(pt+1)%D.length].url),window.setTimeout(()=>{ee||q.add(H)},Da+1200)},je=()=>{if(document.hidden||performance.now()-K.current<xs||!T.current.slice(0,Tt).every(D=>D&&Number(D.style.opacity)>=.999))return;const H=i.getBoundingClientRect();if(!(H.bottom<=0||H.top>=window.innerHeight))for(let D=0;D<w.length;D++){if(w[D].busy())continue;const oe=k(D);oe>=0&&de(w[D],oe)}},We=window.setTimeout(()=>{var Y,H;for(let D=0;D<w.length;D++)for(const oe of g[D]){const Ke=r(oe);w[D].warm((Y=Ke[0])==null?void 0:Y.url),w[D].warm((H=Ke[1])==null?void 0:H.url)}},Oa),ke=window.setInterval(je,ps);return()=>{window.clearTimeout(b),window.clearTimeout(We),window.clearInterval(ke),$e.current=[];for(const Y of w)Y.destroy()}},[h]);const Ge=i=>{$.current=i,L(i),j.current()},se=i=>r=>{const b=r.currentTarget;try{b.setPointerCapture(r.pointerId)}catch{}Ge(i);const w=r.clientX,A=r.clientY,q=c.current[i*2],g=c.current[i*2+1],I=de=>{de.pointerId===r.pointerId&&(c.current[i*2]=q+(de.clientX-w),c.current[i*2+1]=g+(de.clientY-A),j.current())},k=de=>{if(de.pointerId===r.pointerId){try{b.releasePointerCapture(r.pointerId)}catch{}b.removeEventListener("pointermove",I),b.removeEventListener("pointerup",k),b.removeEventListener("pointercancel",k)}};b.addEventListener("pointermove",I),b.addEventListener("pointerup",k),b.addEventListener("pointercancel",k)},V=h.length===0,le=i=>`${i*100}%`,he=a.flat(),R=i=>{const r=h.length?h[i%h.length]??[]:[],b=Math.max(1,r.length),w=P[i]??0;return{grupo:r,total:b,atual:w%b,proximo:(w+1)%b,emA:w%2===0}};return e.jsx("div",{ref:d,"data-landing-hero":"board","data-hero-source":t?"admin":"automatic",className:Ie("relative h-[650vh] w-full",m),children:e.jsxs("div",{ref:l,className:"sticky top-16 h-[calc(100dvh-4rem)] min-h-[520px] w-full overflow-x-clip px-5 sm:px-8",style:{clipPath:"inset(-120px 0 0 0)",perspective:`${ia}px`,perspectiveOrigin:"50% 48%",transformStyle:"preserve-3d"},onPointerDown:()=>Ge(null),children:[e.jsxs("div",{ref:x,"aria-hidden":!0,className:"absolute overflow-hidden rounded-[22px]",style:{opacity:0,transform:"scale(0.72)",transformOrigin:"50% 50%",willChange:"transform, opacity",background:"hsl(var(--landing-board))",backgroundImage:"radial-gradient(circle at 1px 1px, hsl(var(--landing-board-dot)) 1px, transparent 0)",backgroundSize:"20px 20px"},children:[e.jsxs("div",{className:"pointer-events-none absolute inset-x-0 top-0 flex items-center justify-between px-5 py-4",children:[e.jsxs("div",{className:"flex items-center gap-2 rounded-full border border-border bg-background px-3 py-2 shadow-sm",children:[e.jsx(Ro,{size:14,className:"dark:invert"}),e.jsx("span",{className:"h-1.5 w-16 rounded-full bg-foreground
1/15"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"h-8 w-20 rounded-full border border-border bg-background shadow-sm"}),e.jsx("span",{className:"h-8 w-8 rounded-full border border-border bg-background shadow-sm"})]})]}),e.jsx("div",{className:"pointer-events-none absolute bottom-6 left-1/2 -translate-x-1/2",children:e.jsxs(Yt,{size:"lg",children:[e.jsx(Ce,{icon:e.jsx(ho,{size:18,weight:"fill"}),label:"Selecionar",active:!0}),e.jsx(Ce,{icon:e.jsx(xo,{size:18,weight:"light"}),label:"Mover canvas"}),e.jsx(ba,{}),e.jsx(Ce,{icon:e.jsx(go,{size:18,weight:"light"}),label:"Gerar imagem"}),e.jsx(Ce,{icon:e.jsx(jo,{size:18,weight:"light"}),label:"Gerar vÃdeo"}),e.jsx(Ce,{icon:e.jsx(bo,{size:18,weight:"light"}),label:"Adicionar produto"}),e.jsx(ba,{}),e.jsx(Ce,{icon:e.jsx(vo,{size:18,weight:"light"}),label:"Upload"})]})}),e.jsx("div",{className:"pointer-events-none absolute bottom-6 left-6",children:e.jsxs(Yt,{size:"hud",children:[e.jsx(Ce,{icon:e.jsx(yo,{size:14}),label:"Diminuir zoom",size:"sm"}),e.jsx("span",{className:"px-1 text-[12px] tabular-nums text-muted-foreground",children:"100%"}),e.jsx(Ce,{icon:e.jsx(wo,{size:14}),label:"Aumentar zoom",size:"sm"}),e.jsx(Ce,{icon:e.jsx(as,{size:14}),label:"Ajustar à tela",size:"sm"})]})})]}),s&&e.jsx("div",{ref:n,className:"absolute inset-0 z-10 flex items-center justify-center px-5 text-center sm:px-8",style:{willChange:"opacity"},children:e.jsxs("div",{className:"mx-auto max-w-[1240px]",children:[e.jsx("div",{ref:y,"data-hero-hat":!0,className:"mx-auto mb-6 h-8 w-max overflow-hidden rounded-full bg-secondary",style:{willChange:"width"},children:e.jsx("div",{ref:S,"data-hero-hat-stack":!0,className:"flex w-full flex-col items-center",style:{willChange:"transform"},children:[s.hat,s.segundoHat].map((i,r)=>e.jsx("span",{ref:b=>{p.current[r]=b},className:"flex h-8 w-max items-center whitespace-nowrap px-4 text-[14px] font-semibold leading-none text-foreground",children:i},i))})}),e.jsxs("div",{className:"grid",children:[e.jsx("div",{"data-hero-copy":"initial",className:"col-start-1 row-start-1",children:e.jsx("h1",{className:"relative z-[1] font-heading text-[48px] font-semibold leading-[0.9] tracking-[-0.055em] sm:text-[72px] lg:text-[96px] xl:text-[104px]",children:s.titulo.split(` 2`).map((i,r)=>e.jsx("span",{ref:b=>{f.current[r]=b},className:"-mx-[0.14em] -my-[0.12em] block px-[0.14em] py-[0.12em] will-change-[clip-path]",children:i},r))})}),e.jsx("div",{"data-hero-copy":"second",className:"col-start-1 row-start-1",children:e.jsx("h2",{className:"relative z-[1] font-heading text-[48px] font-semibold leading-[0.9] tracking-[-0.055em] sm:text-[72px] lg:text-[96px] xl:text-[104px]",children:s.segundoTitulo.split(` 3`).map((i,r)=>e.jsx("span",{ref:b=>{Z.current[r]=b},className:"-mx-[0.14em] -my-[0.12em] block px-[0.14em] py-[0.12em] will-change-[clip-path]",style:{clipPath:"inset(100% 0 0 0)"},children:i},r))})})]}),e.jsx("div",{className:"relative z-[2] mt-12 flex justify-center",children:e.jsx(to,{size:"lg",onClick:s.onCta,className:"group transition-all duration-300 ease-out hover:-translate-y-1 hover:scale-[1.02] hover:shadow-[0_14px_32px_rgba(0,0,0,0.18)] active:translate-y-0 active:scale-[0.99]",style:{minHeight:64,paddingInline:36,fontSize:18},iconRight:e.jsx(Ga,{size:19,className:"transition-transform duration-300 group-hover:translate-x-1.5"}),children:s.cta})})]})}),Me.slice(0,Tt).map((i,r)=>{var q,g,I;const b=((q=t==null?void 0:t[0])==null?void 0:q[r])??he[(r+2)%he.length],w=((g=t==null?void 0:t[1])==null?void 0:g[r])??he[(r+9)%he.length],A=((I=t==null?void 0:t[2])==null?void 0:I[r])??he[(r+16)%he.length];return!b||!w||!A?null:e.jsxs(o.Fragment,{children:[e.jsx("div",{"data-tunnel-layer":"1","data-card-index":r,ref:k=>{Q.current[r]=k},"aria-hidden":!0,className:"pointer-events-none absolute left-0 top-0 z-[7] overflow-hidden rounded-card bg-muted",style:{width:le(i.w),aspectRatio:`1 / ${$t}`,borderRadius:vt,transformOrigin:"0 0",willChange:"transform, opacity"},children:e.jsx("img",{src:b.url,alt:"",className:"h-full w-full object-cover",draggable:!1})}),e.jsx("div",{"data-tunnel-layer":"2","data-card-index":r,ref:k=>{E.current[r]=k}
3,"aria-hidden":!0,className:"pointer-events-none absolute left-0 top-0 z-[8] overflow-hidden rounded-card bg-muted",style:{width:le(i.w),aspectRatio:`1 / ${$t}`,opacity:0,borderRadius:vt,transformOrigin:"0 0",willChange:"transform, opacity"},children:e.jsx("img",{src:w.url,alt:"",className:"h-full w-full object-cover",draggable:!1})}),e.jsx("div",{"data-tunnel-layer":"3","data-card-index":r,ref:k=>{z.current[r]=k},"aria-hidden":!0,className:"pointer-events-none absolute left-0 top-0 z-[9] overflow-hidden rounded-card bg-muted",style:{width:le(i.w),aspectRatio:`1 / ${$t}`,opacity:0,borderRadius:vt,transformOrigin:"0 0",willChange:"transform, opacity"},children:e.jsx("img",{src:A.url,alt:"",className:"h-full w-full object-cover",draggable:!1})})]},`tunel-${r}`)}),ra.flatMap((i,r)=>$a.map((b,w)=>{var I;const A=Me[b.indice],q=((I=t==null?void 0:t[i.camadaDeImagem])==null?void 0:I[b.indice])??(he.length?he[(r*7+b.indice+3)%he.length]:void 0);if(!q)return null;const g=r*na+w;return e.jsx("div",{"data-tunnel-sublayer":r+1,"data-card-index":b.indice,ref:k=>{_.current[g]=k},"aria-hidden":!0,className:"pointer-events-none absolute left-0 top-0 z-[8]",style:{width:le(A.w*.82),aspectRatio:`1 / ${$t}`,opacity:0,transformOrigin:"0 0",willChange:"transform, opacity"},children:e.jsx("div",{className:"h-full w-full overflow-hidden bg-muted",style:{borderRadius:vt,animation:`landingHeroBridgeDrift ${(4.8+w*.73+r*.41).toFixed(2)}s ease-in-out ${(-w*.67-r*.31).toFixed(2)}s infinite alternate`},children:e.jsx("img",{src:q.url,alt:"",className:"h-full w-full object-cover",draggable:!1})})},`subcamada-${r}-${w}`)})),Me.slice(0,Tt).map((i,r)=>{const{grupo:b,atual:w,proximo:A,emA:q}=R(r);return e.jsx("div",{"data-tunnel-layer":"4","data-card-index":r,ref:g=>{T.current[r]=g},className:Ie("absolute left-0 top-0 touch-none",M===r?"z-20":"z-10"),onPointerDown:g=>{g.stopPropagation(),se(r)(g)},style:{width:le(i.w),aspectRatio:`1 / ${i.ar}`,borderRadius:vt,opacity:0,pointerEvents:"none",transformOrigin:"0 0",willChange:"transform, opacity"},children:e.jsx("div",{className:Ie("relative h-full w-full overflow-hidden rounded-card bg-muted","cursor-grab active:cursor-grabbing"),style:M===r?{borderRadius:vt,outline:"2px solid hsl(var(--board-selection))",outlineOffset:2}:{borderRadius:vt},children:V?e.jsx("div",{"aria-hidden":!0,className:"absolute inset-0",style:{background:"linear-gradient(135deg, hsl(var(--muted)) 0%, hsl(var(--border)) 50%, hsl(var(--muted)) 100%)",backgroundSize:"200% 200%",animation:"boardPlaceholderBreathing 2.4s ease-in-out infinite"}}):[!0,!1].map(g=>{var de;const I=g===q,k=(de=b[I?w:A])==null?void 0:de.url;return e.jsx("img",{src:I||W?k:void 0,alt:"",loading:I?r<4?"eager":"lazy":void 0,draggable:!1,className:"absolute inset-0 h-full w-full object-cover",style:{opacity:I?1:0}},g?"a":"b")})})},r)}),e.jsx("div",{ref:F,className:"pointer-events-none absolute left-0 top-0 z-30",style:{opacity:0,willChange:"transform, opacity",transformOrigin:"0 0"},children:e.jsxs("div",{className:Ie("flex -translate-x-1/2 -translate-y-full flex-col items-center gap-1.5 pb-3","transition-opacity duration-150",M===null?"opacity-0":"opacity-100"),children:[e.jsxs(Yt,{size:"md",children:[e.jsx(Ce,{icon:e.jsx(Wa,{size:16}),label:"Gerar variação",size:"sm"}),e.jsx(Ce,{icon:e.jsx(Ja,{size:16}),label:"Editar",size:"sm"}),e.jsx(Ce,{icon:e.jsx(eo,{size:16}),label:"Redimensionar",size:"sm"}),e.jsx(Ce,{icon:e.jsx(Qa,{size:16}),label:"Baixar",size:"sm"})]}),e.jsx("span",{className:"inline-flex items-center rounded-[6px] px-1.5",style:{height:18,background:"hsl(var(--color-background-secondary) / 0.6)",color:"hsl(var(--color-text-tertiary))",fontSize:9,lineHeight:1,whiteSpace:"nowrap"},children:Ao(M===null?"":(()=>{var b;const{grupo:i,atual:r}=R(M);return((b=i[r])==null?void 0:b.nome)??""})())})]})})]})})}const Ia=Eo,ys=900,bs=.92;function Ot(a,t=0,s=1){return a<t?t:a>s?s:a}function Ct(a,t,s){return a+(t-a)*s}function Pt(a){const t=Ot(a);return t*t*(3-2*t)}function ws({imagens:a,camadas:t,hero:s,className:m}){const d=o.useRef(null),l=o.useRef(null),x=o.useRef(null),n=o.useRef(null),y=o.useRef(null),S=o.useRef(null),p=o.useRef(null),f=o.useRef(null),Z=o.useRef([]),T=o.useMemo(()=>(t!=null&&t.flat().length?t.flat():a.flat()).slice(0,Ia),[t,a]),Q=o.useMemo(()=>{const E=T.length?T.length:Ia;return Array.from({length:E},(z,_)=>({asset:T[_]??null,progress:_/Math.max(1,E-1)}))},[T]);return o.useEffect(()=>{const E=d.current,z=l.current;if(!E||!z)return;let _=0,h=1,M=0,L=0;const c=()=>{M=z.clientWidth,L=z.clientHeight;const B=E.getBoundingClientRect().top+window.scrollY;_=Math.max(0,B-64),h=Math.max(1,E.offsetHeight-z.offsetHeight)},j=B=>{const W=Ot(B),X=Math.pow(W,1.04)*3400,K=Ct(-8,-84,Pt(W)),$e=Math.min(M,L),Ge=Math.min(M*.5,L*.78);x.current&&(x.current.style.transform=`translate3d(0, 0, ${X.toFixed(1)}px) rotateZ(${K.toFixed(2)}deg)`);for(let le=0;le<Q.length;le++){const he=Z.current[le];if(!he)continue;const R=Q[le].progress,i=Math.pow(R,1.06),r=1.95+R*5.35,b=1+Math.sin(le*1.91)*.035,w=Ct($e*.035,Ge,Math.pow(R,.88))*b,A=Ct(-4300,160,i),q=A+X,g=Math.cos(r)*w,I=Math.sin(r)*w*.82,k=Ct(.12,1,Ot((q+4300)/760)),de=1-Pt((q-560)/280
3),je=Ot(k*de),We=Math.sin(le*1.73)*8;he.style.opacity=je.toFixed(3),he.style.transform=`translate3d(${g.toFixed(1)}px, ${I.toFixed(1)}px, ${A.toFixed(1)}px) translate(-50%, -50%) rotateZ(${We.toFixed(2)}deg)`,he.style.visibility=je<.015?"hidden":"visible"}const se=Pt((B-.1)/.1),V=Pt((B-.34)/.045);if(y.current&&(y.current.style.opacity=(1-se).toFixed(3)),S.current&&(S.current.style.opacity=(se*(1-V)).toFixed(3)),p.current&&(p.current.style.opacity=(1-se).toFixed(3)),f.current&&(f.current.style.opacity=(se*(1-V)).toFixed(3)),n.current){const le=1-V;n.current.style.opacity=le.toFixed(3),n.current.style.transform="none",n.current.style.pointerEvents=le>.5?"auto":"none"}},F=window.matchMedia("(prefers-reduced-motion: reduce)").matches;if(c(),F){j(.18);const B=new ResizeObserver(()=>{c(),j(.18)});return B.observe(E),()=>B.disconnect()}const P=Jt(()=>Ot((window.scrollY-_)/(h*bs)),j,105);P.saltar(),window.addEventListener("scroll",P.acordar,{passive:!0});const ve=new ResizeObserver(()=>{c(),P.saltar()});return ve.observe(E),()=>{P.parar(),ve.disconnect(),window.removeEventListener("scroll",P.acordar)}},[Q]),e.jsx("div",{ref:d,"data-landing-hero":"spiral","data-hero-source":t?"admin":"automatic",className:Ie("relative h-[430vh] w-full motion-reduce:h-[calc(100dvh-4rem)]",m),children:e.jsxs("div",{ref:l,className:"sticky top-16 h-[calc(100dvh-4rem)] min-h-[560px] w-full overflow-hidden bg-background",style:{perspective:`${ys}px`,perspectiveOrigin:"50% 50%",transformStyle:"preserve-3d"},children:[e.jsx("div",{ref:x,"aria-hidden":!0,className:"pointer-events-none absolute inset-0 will-change-transform",style:{transformStyle:"preserve-3d",transformOrigin:"50% 50%"},children:Q.map(({asset:E,progress:z},_)=>{const h=Ct(4.5,29.5,Math.pow(z,1.24));return e.jsx("div",{"data-spiral-card":!0,"data-sequence":_+1,ref:M=>{Z.current[_]=M},className:"absolute left-1/2 top-1/2 aspect-square overflow-hidden bg-secondary shadow-[0_18px_50px_rgba(17,17,17,0.10)] will-change-[transform,opacity]",style:{width:`${h.toFixed(2)}vmin`,borderRadius:`${Ct(6,26,z).toFixed(1)}px`,transformOrigin:"50% 50%",backfaceVisibility:"hidden"},children:E?e.jsx("img",{src:E.url,alt:"",draggable:!1,loading:_>=Q.length-12?"eager":"lazy",className:"h-full w-full object-cover"}):e.jsx("div",{className:"skeleton-shimmer h-full w-full bg-secondary"})},`${(E==null?void 0:E.url)??"skeleton"}-${_}`)})}),e.jsx("div",{ref:n,className:"absolute inset-0 z-30 flex items-center justify-center px-5 text-center sm:px-8",style:{willChange:"opacity"},children:e.jsxs("div",{className:"mx-auto max-w-[1240px]",children:[e.jsxs("div",{className:"relative mx-auto mb-6 h-8 w-max min-w-[170px] overflow-hidden rounded-full bg-secondary px-4",children:[e.jsx("span",{ref:p,className:"absolute inset-0 flex items-center justify-center whitespace-nowrap text-[14px] font-semibold",children:s.hat}),e.jsx("span",{ref:f,className:"absolute inset-0 flex items-center justify-center whitespace-nowrap text-[14px] font-semibold opacity-0",children:s.segundoHat})]}),e.jsxs("div",{className:"grid",children:[e.jsx("div",{ref:y,className:"col-start-1 row-start-1 will-change-[opacity]",children:e.jsx("h1",{className:"font-heading text-[48px] font-semibold leading-[0.9] tracking-[-0.055em] sm:text-[72px] lg:text-[96px] xl:text-[104px]",children:s.titulo.split(` 4`).map(E=>e.jsx("span",{className:"block",children:E},E))})}),e.jsx("div",{ref:S,className:"col-start-1 row-start-1 opacity-0 will-change-[opacity]",children:e.jsx("h2",{className:"font-heading text-[48px] font-semibold leading-[0.9] tracking-[-0.055em] sm:text-[72px] lg:text-[96px] xl:text-[104px]",children:s.segundoTitulo.split(` 5`).map(E=>e.jsx("span",{className:"block",children:E},E))})})]}),e.jsx("div",{className:"relative z-10 mt-12 flex justify-center",children:e.jsx(to,{size:"lg",onClick:s.onCta,className:"group transition-all duration-300 ease-out hover:-translate-y-1 hover:scale-[1.02] hover:shadow-[0_14px_32px_rgba(0,0,0,0.18)] active:translate-y-0 active:scale-[0.99]",style:{minHeight:64,paddingInline:36,fontSize:18},iconRight:e.jsx(Ga,{size:19,className:"transition-transform duration-300 group-hover:translate-x-1.5"}),children:s.cta})})]})})]})})}const vs={background:"hsl(var(--landing-board))",backgroundImage:"radial-gradient(circle at 1px 1px, hsl(var(--landing-board-dot)) 1px, transparent 0)",backgroundSize:"40px 40px"},ft=[{x:.075,y:.09,w:.16,h:.32,ar:1.16,atraso:0},{x:.765,y:.09,w:.16,h:.32,ar:1.16,atraso:.07},{x:.055,y:.61,w:.17,h:.33,ar:1.18,atraso:.14},{x:.775,y:.61,w:.17,h:.33,ar:1.18,atraso:.21}],ka=[{x:.02,y:.385,w:.46,h:.29,ar:1.2,atraso:0},{x:.51,y:.385,w:.46,h:.29,ar:1.2,atraso:.06},{x:.02,y:.685,w:.46,h:.29,ar:1.2,atraso:.12},{x:.51,y:.685,w:.46,h:.29,ar:1.2,atraso:.18}],Ha="(max-width: 639px)",La=[.09,.07,.05,.035,.02],js=.13,Rs=2.6,As=[.48,.92],Ns=[.02,.07],Cs=[.05,.1],Es=[.28,.34],Pa=.4,ca=.09,Fs=.035,Ba=.09,Va=.07,Ms=[.05,.1],Ss=[.86,.91],_s=[.91,.962],Dt=[{x:-18,y:-10,rotate:-5},{x:14,y:-14,rotate:3.5},{x:-12,y:12,rotate:4.5},{x:18,y:10,rotate:-3.5},{x:-6,y:-22,rotate:6},{x:8,y:22,rotate:-6.5}],qt=[{from:.91,to:.962,zFrom:180,zTo:-1500},{from:.935,to:.985,zFrom:220,zTo:-1600},{from:.96,to:1,zFrom:260,zTo:-1750}],It=6;function Ae(a,t){const s=Math.sin((a+1)*12.9898+t*78.233)*43758.5453;return s-Math.floor(s)}const Bt=Array.from({length:ft.length+qt.length*It},(a,t)=>({atraso:G(0,.011,Ae(t,1)),duracao:G(.82,1.18,Ae(t,2)),bordaDeEntrada:Math.floor(Ae(t,15)*4),posicaoNaBorda:G(-.08,1.08,Ae(t,16)),exposicaoNaBorda:G(.1,.88,Ae(t,17)),dispersaoX:G(-.16,.16,Ae(t,18)),dispersaoY:G(-.14,.14,Ae(t,19)),centroX:G(-58,58,Ae(t,5)),centroY:G(-46,46,Ae(t,6)),rotacao:G(-13,13,Ae(t,7)),zInicial:G(-40,240,Ae(t,8)),zFinal:G(-260,220,Ae(t,9)),escalaInicial:G(1.45,2.05,Ae(t,10)),escalaFinal:G(.12,.23,Ae(t,11)),curva:G(.78,1.28,Ae(t,12)),fadeIn:G(.12,.28,Ae(t,13)),fadeOut:G(.58,.82,Ae(t,14))}));function Ya(a,t){const s=a[0]+t.atraso,m=Math.min(1,s+(a[1]-a[0])*t.duracao);return[s,m]}function zs(a,t,s,m,d){const l=a.posicaoNaBorda*t-m/2+a.dispersaoX*t,x=a.posicaoNaBorda*s-d/2+a.dispersaoY*s,n=1-a.exposicaoNaBorda;switch(a.bordaDeEntrada){case 0:return[l,-d*n];case 1:return[t-m*a.exposicaoNaBorda,x];case 2:return[l,s-d*a.exposicaoNaBorda];default:return[-m*n,x]}}const la=.895;function st(a,t,s){return a<t?t:a>s?s:a}function G(a,t,s){return a+(t-a)*s}function Xe(a){return 1-Math.pow(1-a,1.8)}function Et(a){const t=st(a,0,1);return t*t*(3-2*t)}function Ne(a,t){return st((a-t[0])/(t[1]-t[0]),0,1)}function Ts({packshot:a,cards:t,copy:s,className:m}){const d=o.useRef(null),l=o.useRef(null),x=o.useRef(null),n=o.useRef(null),y=o.useRef(null),S=o.useRef(null),p=o.useRef(null),f=o.useRef(null),Z=o.useRef(null),T=o.useRef(null),Q=o.useRef([]),E=o.useRef([]),z=o.useRef([]),_=o.useRef(null),h=o.useRef(null),M=o.useRef([]),L=o.useRef([]),c=o.useRef([]),j=o.useRef([]),F=o.useRef(null),[$,P]=o.useState(()=>typeof window<"u"&&window.matchMedia(Ha).matches);o.useEffect(()=>{const R=window.matchMedia(Ha),i=()=>P(R.matches);
5return R.addEventListener("change",i),()=>R.removeEventListener("change",i)},[]);const[ve,B]=o.useState(null),W=o.useRef(null),J=o.useRef(new Float64Array(ft.length*2)),X=o.useRef(new Uint8Array(ft.length)),K=o.useRef(()=>{}),$e=o.useRef(null),Ge=t.slice(0,ft.length),se=Array.from({length:qt.length*It},(R,i)=>t[(i+ft.length)%Math.max(t.length,1)]).filter(R=>!!R),V=($?ka:ft).slice(0,Ge.length);o.useEffect(()=>{const R=d.current,i=l.current;if(!R||!i||t.length===0)return;let r=0,b=1,w=0,A=0,q=1,g=0,I=0,k=1,de=1;const je=new Float64Array(V.length),We=new Float64Array(V.length),ke=new Float64Array(V.length),Y=new Float64Array(V.length),H=new Float64Array(se.length),D=new Float64Array(se.length),oe=Pa+Math.max(...V.map(C=>C.atraso))+ca+Ba+Va,Ke=[oe,oe+.05],Qe=$?[.42,.48]:[oe+.02,oe+.08],pt=[oe+.015,oe+.06],ee=()=>{var xe,ge,U;w=i.clientWidth,A=i.clientHeight,q=Math.max(1,window.innerHeight||800),r=R.getBoundingClientRect().top+window.scrollY,b=Math.max(1,R.offsetHeight-i.offsetHeight);for(let v=0;v<V.length;v++){const O=V[v],re=Math.min(O.w*w,O.h*A/O.ar);ke[v]=re,Y[v]=re*O.ar,je[v]=O.x*w,We[v]=O.y*A;const ie=Q.current[v];ie&&(ie.style.width=`${re.toFixed(1)}px`,ie.style.height=`${(re*O.ar).toFixed(1)}px`)}for(let v=0;v<se.length;v++){const O=(ke[0]||Math.min(w*.16,A*.28))*1.08,re=O*(((xe=V[0])==null?void 0:xe.ar)??1.16);H[v]=O,D[v]=re;const ie=z.current[v];ie&&(ie.style.width=`${O.toFixed(1)}px`,ie.style.height=`${re.toFixed(1)}px`)}const C=F.current;if(C){const v=C.getBoundingClientRect(),O=i.getBoundingClientRect();g=v.left-O.left+v.width/2,I=v.top-O.top+v.height/2,k=v.width/2,de=v.height/2}const Oe=`0 0 ${w} ${A}`;(ge=_.current)==null||ge.setAttribute("viewBox",Oe),(U=h.current)==null||U.setAttribute("viewBox",Oe)},nt=(C,Oe,xe)=>{var Te,be,Ye,rt,it;const ge=Oe+ke[C]/2,U=xe+Y[C]/2,v=ge-g,O=U-I,re=Math.max(1,Math.hypot(v,O)),ie=Math.sign(v)||1,ye=$o+Do,fe=$?g:g+ie*(k+ye),Ve=$?I+de+ye:I,u=1/Math.max(Math.abs(v)/(ke[C]/2),Math.abs(O)/(Y[C]/2),1e-6),me=ge-v*u-v/re*ye,pe=U-O*u-O/re*ye,dt=$?`M ${fe.toFixed(1)} ${Ve.toFixed(1)} C ${fe.toFixed(1)} ${((Ve+pe)/2).toFixed(1)}, ${me.toFixed(1)} ${((Ve+pe)/2).toFixed(1)}, ${me.toFixed(1)} ${pe.toFixed(1)}`:`M ${fe.toFixed(1)} ${Ve.toFixed(1)} C ${((fe+me)/2).toFixed(1)} ${Ve.toFixed(1)}, ${((fe+me)/2).toFixed(1)} ${pe.toFixed(1)}, ${me.toFixed(1)} ${pe.toFixed(1)}`;(Te=M.current[C])==null||Te.setAttribute("d",dt);for(const ut of L.current[C]??[])ut==null||ut.setAttribute("d",dt);(be=c.current[C])==null||be.setAttribute("cx",fe.toFixed(1)),(Ye=c.current[C])==null||Ye.setAttribute("cy",Ve.toFixed(1)),(rt=j.current[C])==null||rt.setAttribute("cx",me.toFixed(1)),(it=j.current[C])==null||it.setAttribute("cy",pe.toFixed(1))},Je=new Float64Array(V.length).fill(-1),He=new Float64Array(V.length).fill(-1),ht=new Float64Array(V.length).fill(-1e9),Ee=new Float64Array(V.length).fill(-1e9),qe=new Float64Array(V.length).fill(-1e9),N=new Float64Array(V.length).fill(-1e9),ne=new Float64Array(V.length).fill(-1),Le=new Float64Array(V.length).fill(-1),et=new Float64Array(se.length).fill(-1e9),Se=new Float64Array(se.length).fill(-1e9),Pe=new Float64Array(se.length).fill(-1e9),ze=new Float64Array(se.length).fill(-1e9),tt=new Float64Array(se.length).fill(-1e9),at=new Float64Array(se.length).fill(-1);let lt=-1,ue=-1,_e=-1,Re=-1,Be=-1,ot=-1;const xt=window.matchMedia("(prefers-reduced-motion: reduce)").matches,De=C=>{C=st(C,0,1);const Oe=st((window.scrollY-(r-q))/q,0,1),xe=Ne(Oe,As),ge=Xe(xe);Math.abs(ge-Be)>=.005&&x.current&&(Be=ge,x.current.style.opacity=ge.toFixed(3));const U=1-Et(Ne(C,Ss));if(Math.abs(U-ot)>=.005){ot=U;const u=U.toFixed(3);n.current&&(n.current.style.opacity=u),_.current&&(_.current.style.opacity=u),h.current&&(h.current.style.opacity=u)}const v=1-Xe(Ne(C,Ns));Math.abs(v-Re)>=.005&&T.current&&(Re=v,T.current.style.opacity=v.toFixed(3));const O=Xe(Ne(C,Cs)),re=Xe(Ne(C,Qe)),ie=O*(1-re);Math.abs(ie-lt)>=.005&&y.current&&(lt=ie,y.current.style.opacity=ie.toFixed(3),y.current.style.transform=`translateY(${(G(16,0,O)-10*re).toFixed(1)}px)`);const ye=Xe(Ne(C,pt));S.current&&(S.current.style.opacity=ye.toFixed(3),S.current.style.transform=`translateY(${G(10,0,ye).toFixed(1)}px)`);const fe=Xe(Ne(C,Es));Math.abs(fe-ue)>=.005&&(ue=fe,p.current&&(p.current.style.opacity=(1-fe).toFixed(3)),f.current&&(f.current.style.opacity=fe.toFixed(3)));const Ve=Xe(Ne(C,Ms))*(1-Xe(Ne(C,Ke)));Math.abs(Ve-_e)>=.005&&Z.current&&(_e=Ve,Z.current.style.opacity=Ve.toFixed(3));for(let u=0;u<V.length;u++){const me=Q.current[u];if(!me)continue;const pe=Bt[u]??Bt[0],dt=Ne(C,Ya(_s,pe)),Te=Math.pow(Et(dt),pe.curva),be=1-Et(Ne(dt,[pe.fadeOut,1])),Ye=Pa+V[u].atraso+ca,it=Xe(Ne(C,[Ye,Ye+Fs]))*be;Math.abs(it-Je[u])>=.005&&(Je[u]=it,me.style.opacity=it.toFixed(3));const ut=st(je[u]+J.current[u*2],10,Math.max(10,w-ke[u]-10)),ea=st(We[u]+J.current[u*2+1],10,Math.max(10,A-Y[u]-10)),Ft=Dt[u]??Dt[0],Mt=g-ke[u]/2+Ft.x+pe.centroX,ta=I-Y[u]/2+Ft.y+pe.centroY,gt=G(ut,Mt,Te),ct=G(ea,ta,Te),St=G(0,-1450+pe.zFinal,Te),yt=G(0,Ft.rotate+pe.rotacao*.45,Te),bt=G(1,pe.escalaFinal,Te),Rt=E.current[u],At=Ye+Ba,_t=Xe(Ne(C,[At,At+Va]));if(Rt&&Math.abs(_t-He[u])>=.005){He[u]=_t,Rt.style.opacity=_t.toFixed(3);const wt=_t>=.99;X.current[u]=wt?1:0,me.style.pointerEvents=wt?"auto":"none"}me.style.pointerEvents=X.current[u]&&dt<=.001?"auto":"none";const ha=M.current[u],Nt=Xe(Ne(C,[Ye-ca,Ye]));if(ha&&Math.abs(Nt-ne[u])>=.005){ne[u]=Nt,ha.style.strokeDashoffset=(1-Nt).toFixed(3);const wt=c.current[u];wt&&(wt.style.opacity=st(Nt*6,0,1).toFixed(3));
5const zt=j.current[u];zt&&(zt.style.opacity=st((Nt-.85)*8,0,1).toFixed(3))}const aa=st((Nt-.92)*12,0,1);if(Math.abs(aa-Le[u])>=.005){Le[u]=aa;const wt=aa.toFixed(3);for(const zt of L.current[u]??[])zt&&(zt.style.opacity=wt)}u===W.current&&$e.current&&($e.current.style.transform=`translate3d(${(gt+ke[u]/2).toFixed(1)}px, ${ct.toFixed(1)}px, 0)`,$e.current.style.opacity=(_t*U).toFixed(3)),!(Math.abs(gt-ht[u])<.1&&Math.abs(ct-Ee[u])<.1&&Math.abs(yt-qe[u])<.02&&Math.abs(bt-N[u])<.002)&&(ht[u]=gt,Ee[u]=ct,qe[u]=yt,N[u]=bt,me.style.zIndex=Te>.001?`${10+u}`:"",me.style.transform=`translate3d(${gt.toFixed(1)}px, ${ct.toFixed(1)}px, ${St.toFixed(1)}px) rotate(${yt.toFixed(2)}deg) scale(${bt.toFixed(3)})`,nt(u,gt,ct))}for(let u=0;u<se.length;u++){const me=z.current[u];if(!me)continue;const pe=Math.floor(u/It),dt=u%It,Te=qt[pe]??qt[0],be=Bt[ft.length+u]??Bt[0],Ye=Ne(C,Ya([Te.from,Te.to],be)),rt=Math.pow(Et(Ye),be.curva),it=H[u],ut=D[u],[ea,Ft]=zs(be,w,A,it,ut),Mt=Dt[dt%Dt.length]??Dt[0],ta=w/2-it/2+Mt.x*.72+be.centroX,gt=A/2-ut/2+Mt.y*.72+be.centroY,ct=G(ea,ta,rt),St=G(Ft,gt,rt),yt=G(Te.zFrom+be.zInicial,Te.zTo+be.zFinal,rt),bt=G(be.rotacao*1.8,Mt.rotate*.45+be.rotacao*.2,rt),Rt=G(be.escalaInicial,be.escalaFinal,rt),At=Et(Ne(Ye,[.02,be.fadeIn]))*(1-Et(Ne(Ye,[be.fadeOut,1])));Math.abs(At-at[u])>=.005&&(at[u]=At,me.style.opacity=At.toFixed(3)),!(Math.abs(ct-et[u])<.1&&Math.abs(St-Se[u])<.1&&Math.abs(yt-Pe[u])<.5&&Math.abs(bt-ze[u])<.02&&Math.abs(Rt-tt[u])<.002)&&(et[u]=ct,Se[u]=St,Pe[u]=yt,ze[u]=bt,tt[u]=Rt,me.style.transform=`translate3d(${ct.toFixed(1)}px, ${St.toFixed(1)}px, ${yt.toFixed(1)}px) rotate(${bt.toFixed(2)}deg) scale(${Rt.toFixed(3)})`)}},te=()=>{Je.fill(-1),He.fill(-1),ht.fill(-1e9),Ee.fill(-1e9),qe.fill(-1e9),N.fill(-1e9),ne.fill(-1),Le.fill(-1),et.fill(-1e9),Se.fill(-1e9),Pe.fill(-1e9),ze.fill(-1e9),tt.fill(-1e9),at.fill(-1),lt=-1,ue=-1,_e=-1,Re=-1,ot=-1};if(ee(),xt){De(la),K.current=()=>De(la);const C=new ResizeObserver(()=>{ee(),te(),De(la)});return C.observe(R),()=>C.disconnect()}const Fe=Jt(()=>st((window.scrollY-r)/b,0,1),De);Fe.saltar(),K.current=Fe.repintar,window.addEventListener("scroll",Fe.acordar,{passive:!0});const Ue=new ResizeObserver(()=>{ee(),te(),Fe.saltar()});return Ue.observe(R),()=>{Fe.parar(),window.removeEventListener("scroll",Fe.acordar),Ue.disconnect()}},[t.length,se.length,V.length,$]);const le=R=>{W.current=R,B(R),K.current()},he=R=>i=>{if(!X.current[R])return;const r=i.currentTarget;try{r.setPointerCapture(i.pointerId)}catch{}le(R);const b=i.clientX,w=i.clientY,A=J.current[R*2],q=J.current[R*2+1],g=k=>{k.pointerId===i.pointerId&&(J.current[R*2]=A+(k.clientX-b),J.current[R*2+1]=q+(k.clientY-w),K.current())},I=k=>{if(k.pointerId===i.pointerId){try{r.releasePointerCapture(i.pointerId)}catch{}r.removeEventListener("pointermove",g),r.removeEventListener("pointerup",I),r.removeEventListener("pointercancel",I)}};r.addEventListener("pointermove",g),r.addEventListener("pointerup",I),r.addEventListener("pointercancel",I)};return t.length===0||!a?e.jsxs("div",{className:Ie("relative h-[560vh] w-full",m),"aria-hidden":!0,children:[e.jsx("div",{"aria-hidden":!0,className:"pointer-events-none sticky top-0 z-0 -mb-[100dvh] h-[100dvh] w-full",style:vs}),e.jsxs("div",{className:"sticky top-16 h-[calc(100dvh-4rem)] min-h-[520px] w-full overflow-hidden",children:[($?ka:ft).map((R,i)=>e.jsx("div",{className:"absolute overflow-hidden rounded-card",style:{left:`${R.x*100}%`,top:`${R.y*100}%`,width:`${R.w*100}%`,aspectRatio:`1 / ${R.ar}`,background:"linear-gradient(135deg, hsl(var(--muted)) 0%, hsl(var(--border)) 50%, hsl(var(--muted)) 100%)",backgroundSize:"200% 200%",animation:"boardPlaceholderBreathing 2.4s ease-in-out infinite"}},i)),e.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-start gap-4 px-5 pt-[5vh] sm:justify-center sm:px-8 sm:pt-0",children:[e.jsx("div",{className:"w-[min(62vw,34dvh)] rounded-[28px] border border-border bg-[#1b1b1b] sm:w-[min(88vw,420px,48dvh)]",style:{aspectRatio:"1 / 1"}}),e.jsx("div",{className:"h-[187px] w-[min(88vw,380px)] rounded-2xl border border-border bg-secondary"})]})]})]}):e.jsx("section",{"data-header-tone":"dark",className:"relative w-full overflow-clip bg-[#111]",style:{"--background":"0 0% 7%","--foreground":"0 0% 96%","--secondary":"0 0% 13%","--muted":"0 0% 16%","--muted-foreground":"0 0% 66%","--border":"0 0% 22%"},children:e.jsxs("div",{ref:d,"data-agent-showcase-track":!0,className:Ie("relative h-[560vh] w-full",m),children:[e.jsx("div",{ref:x,"aria-hidden":!0,
5className:"pointer-events-none sticky top-0 z-0 -mb-[100dvh] h-[100dvh] w-full",style:{background:"#111",backgroundImage:"radial-gradient(circle, rgba(255,255,255,.12) 1px, transparent 1px)",backgroundSize:"40px 40px",opacity:0,willChange:"opacity"}}),e.jsxs("div",{ref:l,className:"sticky top-16 h-[calc(100dvh-4rem)] min-h-[520px] w-full overflow-hidden",onPointerDown:()=>le(null),children:[e.jsxs("div",{className:"absolute inset-0",style:{perspective:1200,transformStyle:"preserve-3d"},children:[e.jsx("svg",{ref:_,"aria-hidden":!0,className:"pointer-events-none absolute inset-0 z-0 h-full w-full",fill:"none",children:V.map((R,i)=>e.jsxs("g",{children:[e.jsx("path",{ref:r=>{M.current[i]=r},pathLength:1,stroke:"#C4A8F8",strokeWidth:Ht,strokeLinecap:"round",strokeDasharray:1,strokeDashoffset:1}),La.map((r,b)=>e.jsx("path",{ref:w=>{var A;((A=L.current)[i]??(A[i]=[]))[b]=w},className:"snew-linha-faisca",pathLength:1,stroke:`rgba(196, 168, 248, ${js})`,strokeWidth:Ht,strokeLinecap:"round",strokeDasharray:`${r} ${1-r}`,style:{opacity:0,filter:"drop-shadow(0 0 5px rgba(168, 85, 247, 0.72))",animationDelay:`${(i*.31-(La[0]-r)/2*Rs).toFixed(3)}s`}},b))]},i))}),V.map((R,i)=>e.jsxs("div",{ref:r=>{Q.current[i]=r},className:Ie("absolute left-0 top-0 touch-none overflow-hidden rounded-card","cursor-grab active:cursor-grabbing",ve===i?"z-20":"z-0"),onPointerDown:r=>{r.stopPropagation(),he(i)(r)},style:{opacity:0,pointerEvents:"none",willChange:"transform, opacity",...ve===i?{outline:"2px solid hsl(var(--board-selection))",outlineOffset:2}:null},children:[e.jsx("div",{"aria-hidden":!0,style:{position:"absolute",inset:0,background:"linear-gradient(135deg, hsl(var(--muted)) 0%, hsl(var(--border)) 50%, hsl(var(--muted)) 100%)",backgroundSize:"200% 200%",animation:"boardPlaceholderBreathing 2.4s ease-in-out infinite"},children:e.jsx("span",{className:"status-shimmer-text absolute left-3 top-3 text-[11px] font-medium",children:s.generating})}),e.jsx("img",{ref:r=>{E.current[i]=r},src:Ge[i].url,alt:"",loading:"lazy",draggable:!1,className:"relative h-full w-full object-cover",style:{opacity:0,willChange:"opacity"}})]},i)),se.map((R,i)=>e.jsx("div",{ref:r=>{z.current[i]=r},"data-agent-tunnel-card":i,"aria-hidden":!0,className:"pointer-events-none absolute left-0 top-0 overflow-hidden rounded-card bg-[#1b1b1b] shadow-sm",style:{zIndex:30+Math.floor(i/It),opacity:0,transformOrigin:"center",transformStyle:"preserve-3d",backfaceVisibility:"hidden",willChange:"transform, opacity"},children:e.jsx("img",{src:R.url,alt:"",loading:"lazy",draggable:!1,className:"h-full w-full object-cover"})},`tunnel-${R.url}-${i}`)),e.jsxs("div",{ref:n,"data-agent-fade-layer":!0,className:"pointer-events-none absolute inset-0 z-10 flex flex-col items-center justify-start gap-4 px-5 pt-[5vh] sm:justify-center sm:px-8 sm:pt-0",style:{willChange:"opacity"},children:[e.jsxs("div",{ref:F,"data-agent-product-card":!0,className:"relative w-[min(62vw,34dvh)] sm:w-[min(88vw,420px,48dvh)]",children:[e.jsxs("div",{ref:Z,"aria-hidden":!0,className:"pointer-events-none absolute -inset-1",style:{opacity:0,willChange:"opacity"},children:[e.jsx("div",{style:{position:"absolute",inset:0,borderRadius:32,background:"conic-gradient(from var(--shimmer-angle, 0deg), rgba(99,102,241,0) 0%, rgba(168,85,247,0.3) 18%, rgba(99,102,241,0.5) 26%, rgba(255,255,255,0) 45%, rgba(255,255,255,0) 100%)",filter:"blur(7px)",opacity:.45,animation:"shimmerOutlineRotate 2.4s linear infinite, shimmerGlowPulse 2.4s ease-in-out infinite"}}),e.jsx("div",{style:{position:"absolute",inset:4,borderRadius:28,padding:2,background:"conic-gradient(from var(--shimmer-angle, 0deg), rgba(255,255,255,0) 0%, rgba(255,255,255,0.55) 12%, rgba(168,85,247,0.6) 20%, rgba(99,102,241,0.7) 26%, rgba(255,255,255,0) 42%, rgba(255,255,255,0) 100%)",WebkitMask:"linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0)",WebkitMaskComposite:"xor",maskComposite:"exclude",animation:"shimmerOutlineRotate 2.4s linear infinite",filter:"drop-shadow(0 0 3px rgba(99,102,241,0.35))"}})]}),e.jsx("div",{className:"relative overflow-hidden rounded-[28px] border border-border bg-[#1b1b1b] shadow-sm",style:{outline:"2px s
5olid rgba(124, 58, 237, 0.35)",outlineOffset:2},children:e.jsx("img",{src:a.url,alt:a.nome,draggable:!1,className:"aspect-square w-full object-cover"})})]}),e.jsx("div",{className:"relative w-[min(88vw,380px)]",children:e.jsx("div",{ref:y,className:"relative z-10 w-full rounded-snew-2xl p-[42px] text-left",style:{opacity:0,willChange:"transform, opacity",background:"linear-gradient(135deg, hsl(var(--muted)) 0%, hsl(var(--border)) 50%, hsl(var(--muted)) 100%)",backgroundSize:"200% 200%",animation:"boardPlaceholderBreathing 2.4s ease-in-out infinite"},children:e.jsxs("div",{className:"relative",children:[e.jsxs("div",{ref:f,style:{opacity:0,willChange:"opacity"},children:[e.jsx("p",{className:"pt-3 text-[16px] font-medium text-foreground",children:s.title}),e.jsx("p",{className:"pt-3 text-[20px] font-medium leading-[1.25] tracking-[-0.025em] text-foreground",children:s.suggestion}),s.plan&&e.jsx("p",{className:"pt-2 text-[15px] leading-relaxed text-muted-foreground",children:s.plan}),e.jsx("p",{className:"pt-4 text-[14px] tabular-nums text-muted-foreground/80",children:s.deliverables})]}),e.jsxs("div",{ref:p,className:"absolute inset-x-0 top-0 flex items-center gap-1.5 pt-3 text-[13px] text-muted-foreground",style:{willChange:"opacity"},children:[e.jsx("span",{children:s.thinking}),[0,1,2].map(R=>e.jsx("span",{className:"h-1 w-1 rounded-full bg-muted-foreground animate-pulse",style:{animationDelay:`${R*220}ms`}},R))]})]})})})]})]}),e.jsxs("div",{ref:S,"data-agent-final-heading":!0,className:"pointer-events-none absolute inset-x-5 bottom-[clamp(104px,13vh,156px)] z-50 text-center sm:inset-x-10",style:{opacity:0,willChange:"transform, opacity"},children:[e.jsx("span",{className:"mx-auto mb-6 flex h-8 w-max items-center rounded-full bg-secondary px-4 text-[14px] font-semibold leading-none text-foreground",children:s.completeHat}),e.jsx("h3",{className:Ie(To,"max-w-[760px] !text-[#f7f7f7] sm:text-[clamp(48px,4.6vw,72px)]"),style:{textShadow:"0 2px 22px rgba(0,0,0,.95), 0 0 3px rgba(0,0,0,.9)"},children:s.complete})]}),e.jsx("div",{ref:T,"aria-hidden":!0,className:"pointer-events-none absolute bottom-6 left-1/2 z-20 -translate-x-1/2",style:{willChange:"opacity"},children:e.jsx("div",{className:"flex h-9 w-9 animate-bounce items-center justify-center rounded-full border border-border bg-background text-muted-foreground",children:e.jsx(uo,{size:16})})}),e.jsx("svg",{ref:h,"aria-hidden":!0,className:"pointer-events-none absolute inset-0 z-20 h-full w-full",fill:"none",children:V.map((R,i)=>e.jsxs("g",{children:[e.jsx("circle",{ref:r=>{c.current[i]=r},r:wa,fill:"#111111",stroke:"#C4A8F8",strokeWidth:Ht,style:{opacity:0}}),e.jsx("circle",{ref:r=>{j.current[i]=r},r:wa,fill:"#111111",stroke:"#C4A8F8",strokeWidth:Ht,style:{opacity:0}})]},i))}),e.jsx("div",{ref:$e,className:"pointer-events-none absolute left-0 top-0 z-30",style:{willChange:"transform"},children:e.jsx("div",{className:Ie("flex -translate-x-1/2 -translate-y-full flex-col items-center gap-1.5 pb-3","transition-opacity duration-150",ve===null?"opacity-0":"opacity-100"),children:e.jsxs(Yt,{size:"md",children:[e.jsx(Ce,{icon:e.jsx(Wa,{size:16}),label:"Gerar variação",size:"sm"}),e.jsx(Ce,{icon:e.jsx(Ja,{size:16}),label:"Editar",size:"sm"}),e.jsx(Ce,{icon:e.jsx(eo,{size:16}),label:"Redimensionar",size:"sm"}),e.jsx(Ce,{icon:e.jsx(Qa,{size:16}),label:"Baixar",size:"sm"})]})})})]})]})})}function $s({cards:a,cardTitle:t,descriptions:s}){const m=o.useRef(null),d=o.useRef([]),l=o.useRef([]);return o.useLayoutEffect(()=>{const x=m.current;if(!x)return;if(!document.querySelector("[data-agent-source-card]")){for(const h of l.current)h&&(h.style.opacity="1",h.style.transform="none",h.style.width="100%",h.style.height="100%");return}if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;let y=!1;const S=.24,p=[{delay:0,duration:.68,power:2.35,arcX:18,arcY:-22,startRotate:-5,rotate:-3.2},{delay:.045,duration:.62,power:2.8,arcX:-22,arcY:-14,startRotate:3.5,rotate:2.8},{delay:.02,duration:.72,power:2.15,arcX:24,arcY:18,startRotate:4.5,rotate:3.4},{delay:.075,duration:.64,power:2.6,arcX:-18,arcY:22,startRotate:-3.5,rotate:-2.7}],f=Array(4).fill(null),Z=h=>Math.min(1,Math.max(0,h)),T=h=>{const M=h.getBoundingClientRect(),L=Math.max(1,h.offsetWidth),c=Math.max(1,h.offsetHeight),j=document.querySelector("[data-agent-product-card]"),F=j==null?void 0:j.getBoundingClientRect(),$=Number(h.dataset.agentStackX??0),P=Number(h.dataset.agentStackY??0);return F?{left:F.left+F.width/2-L/2+$,top:F.top+F.height/2-c/2+P,width:L,height:c}:{left:M.left+M.width/2-L/2,top:M.top+M.height/2-c/2,width:L,height:c}},z=Jt(()=>{const h=Math.max(1,window.innerHeight),M=x.getBoundingClientRect();return Z((h-M.top)/(h*1.15))},h=>{const M=Math.max(1,window.innerHeight),L=Math.max(1,window.innerWidth);y?h<=5e-4&&(y=!1):h>=.004&&(y=!0);for(let c=0;c<4;c+=1){const j=d.current[c],F=l.current[c],$=document.querySelector(`[data-agent-source-card="${c}"]`);if(!j||!F)continue;if(!$){F.style.opacity="1",F.style.transform="none",F.style.width="100%",F.style.height="100%";continue}if(!y){$.style.visibility="visible",f[c]=null,F.style.opacity="0";continue}$.style.visibility="hidden",F.style.opacity="1",f[c]??(f[c]=T($));const P=p[c]??p[0],ve=Z((h-S-P.delay)/P.duration),B=ve*ve*(3-2*ve),W=1-Math.pow(1-B,P.power),J=Math.sin(Math.PI*B),X=f[c],K=j.getBoundingClientRect(),$e=X.width+(K.width-X.width)*W,Ge=X.height+(K.height-X.height)*W,se=X.left+(K.left-X.left)*W+P.arcX*J,V=X.top+(K.top-X.top)*W+P.arcY*J,he=Number($.dataset.agentStackRotate??P.startRotate)*(1-W)+P.rotate*J,R=Math.min(Math.max(16,se),Math.max(16,L-$e-16)),i=Math.min(V,Math.max(72,M-Ge-16));F.style.width=`${$e.toFixed(1)}px`,F.style.height=`${Ge.toFixed(1)}px`,F.style.transform=`translate3d(${(R-K.left).toFixed(1)}px, ${(i-K.top).toFixed(1)}px, 0) rotate(${he.toFixed(2)}deg)`}},110),_=()=>{f.fill(null),y=!1,z.saltar()};return z.saltar(),window.addEventListener("scroll",z.acordar,{passive:!0}),window.addEventListener("resize",_),()=>{var h;z.parar(),window.removeEventListener("scroll",z.acordar),window.removeEventListener("resize",_);for(let M=0;M<4;M+=1)(h=document.querySelector(`[data-agent-source-card="${M}"]`))==null||h.style.removeProperty("visibility")}},[a]),e.jsx("section",{ref:m,"data-agent-quadrant-section":!0,"data-header-tone":"dark",className:"w-full bg-[#111] px-[clamp(20px,4vw,72px)] py-[clamp(72px,8vw,128px)] text-[#f7f7f7]",children:e.jsx("div",{className:"mx-auto w-full max-w-[1080px]",children:e.jsx("div",{className:"grid grid-cols-2 gap-2 sm:gap-4",children:Array.from({length:4},(x,n)=>{const y=a[n],S=s[n]??s[0]??"";return e.jsxs("article",{className:"flex min-h-[310px] flex-col items-center rounded-[20px] border border-white/[0.08] bg-[#1a1a1a] px-3 py-5 text-center shadow-[0_24px_80px_rgba(0,0,0,0.24)] sm:min-h-[460px] sm:rou
5nded-[28px] sm:px-8 sm:py-8",children:[e.jsx("p",{className:"text-[12px] font-medium text-[#f7f7f7] sm:text-[15px]",children:t}),e.jsx("div",{ref:p=>{d.current[n]=p},className:"my-5 aspect-square w-full max-w-[180px] sm:my-8 sm:max-w-[250px]",children:e.jsx("div",{ref:p=>{l.current[n]=p},className:"h-full w-full overflow-hidden rounded-card bg-[#262626]",style:{transformOrigin:"center",willChange:"transform"},children:y?e.jsx("img",{src:y.url,alt:y.nome,loading:"lazy",className:"h-full w-full object-cover"}):null})}),e.jsx("p",{className:"mt-auto max-w-[330px] text-[11px] leading-[1.35] text-[#a6a6a6] sm:text-[15px] sm:leading-[1.5]",children:S})]},(y==null?void 0:y.url)??n)})})})})}function Ds({items:a,ariaLabel:t,hat:s,title:m}){const[d,l]=o.useState(0),[x,n]=o.useState(()=>typeof window>"u"||typeof window.matchMedia!="function"?!0:window.matchMedia("(min-width: 901px)").matches),y=o.useRef([]);if(o.useEffect(()=>{if(typeof window.matchMedia!="function")return;const p=window.matchMedia("(min-width: 901px)"),f=()=>n(p.matches);return f(),p.addEventListener("change",f),()=>p.removeEventListener("change",f)},[]),o.useEffect(()=>{if(!x||a.length===0)return;let p=0;const f=()=>{window.cancelAnimationFrame(p),p=window.requestAnimationFrame(()=>{const Z=window.innerHeight/2;let T=0,Q=Number.POSITIVE_INFINITY;y.current.forEach((E,z)=>{if(!E)return;const _=E.getBoundingClientRect(),h=_.top+_.height/2,M=Math.abs(h-Z);M<Q&&(Q=M,T=z)}),l(E=>{var _;let z=T;if(E===0&&T===1){const h=(_=y.current[1])==null?void 0:_.getBoundingClientRect();(h?h.top+h.height/2:0)>Z&&(z=0)}return E===z?E:z})})};return f(),window.addEventListener("scroll",f,{passive:!0}),window.addEventListener("resize",f),()=>{window.cancelAnimationFrame(p),window.removeEventListener("scroll",f),window.removeEventListener("resize",f)}},[x,a.length]),a.length===0)return null;const S=p=>{var f;l(p),(f=y.current[p])==null||f.scrollIntoView({behavior:window.matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth",block:"center"})};return e.jsxs("section",{className:"scroll-feature-story","aria-label":t,children:[e.jsx(ua,{hat:s,title:m,revealWords:!0,className:"scroll-feature-story__heading"}),e.jsx("ol",{className:"scroll-feature-story__mobile-list",children:a.map((p,f)=>e.jsxs("li",{className:"scroll-feature-story__mobile-item",children:[e.jsxs("figure",{className:"scroll-feature-story__mobile-card",style:{"--story-accent":p.accent},children:[e.jsx("img",{src:p.image,alt:p.label,loading:f===0?"eager":"lazy"}),e.jsxs("figcaption",{children:[e.jsx("span",{children:p.caption}),e.jsx(Ra,{to:p.href,className:"scroll-feature-story__cta",children:p.cta})]})]}),e.jsxs("div",{className:"scroll-feature-story__mobile-title",children:[e.jsx("span",{className:"scroll-feature-story__mobile-thumb","aria-hidden":"true",children:p.productImage?e.jsx("img",{src:p.productImage,alt:"",loading:"lazy",draggable:!1}):null}),e.jsx("h3",{children:p.label})]})]},`mobile-${p.label}-${f}`))}),e.jsxs("div",{className:"scroll-feature-story__layout scroll-feature-story__desktop",children:[e.jsx("ol",{className:"scroll-feature-story__list",children:a.map((p,f)=>e.jsx("li",{ref:Z=>{y.current[f]=Z},className:"scroll-feature-story__item","data-active":f===d?"true":"false",children:e.jsxs("button",{type:"button",className:"font-heading font-semibold leading-[0.98] tracking-[-0.04em]",onClick:()=>S(f),"aria-current":f===d?"step":void 0,children:[e.jsx("span",{className:"scroll-feature-story__thumb","aria-hidden":"true",children:p.productImage?e.jsx("img",{src:p.productImage,alt:"",loading:"lazy",draggable:!1}):null}),e.jsx("span",{className:"scroll-feature-story__item-label",children:p.label})]})},`${p.label}-${f}`))}),e.jsx("div",{className:"scroll-feature-story__media","aria-live":"polite",children:e.jsx("div",{className:"scroll-feature-story__frame",children:a.map((p,f)=>e.jsxs("figure",{className:"scroll-feature-story__figure","data-active":f===d?"true":"false","aria-hidden":f!==d,style:{"--story-accent":p.accent},children:[e.jsx("img",{src:p.image,alt:f===d?p.label:"",loading:f===0?"eager":"lazy"}),e.jsxs("figcaption",{children:[e.jsx("span",{children:p.caption}),e.jsx(Ra,{to:p.href,className:"scroll-feature-story__cta",tabIndex:f===d?0:-1,children:p.cta})]})]},`${p.image}-${f}`))})})]})]})}function Vt(a,t,s){return a+(t-a)*s}function qa({item:a}){return e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-[12px] uppercase tracking-[0.12em]",style:{color:"rgba(255,255,255,0.55)"},children:a.eyebrow}),e.jsx("h3",{className:"mt-4 whitespace-pre-line font-heading text-[24px] font-semibold leading-[1.08] xl:text-[28px]",style:{color:"#f7f7f7"},children:a.title})]})}function Os({hat:a,title:t,itens:s}){const m=o.useRef(null),d=o.useRef(null),l=o.useRef(null);return o.useEffect(()=>{let x=0;const n=()=>{x=0;const S=m.current,p=d.current,f=l.current;if(!S||!p||!f)return;if(window.innerWidth<1024){p.style.visibility="hidden",S.dataset.headerToneActive&&(delete S.dataset.headerToneActive,window.dispatchEvent(new Event("snew-header-tone-change")));return}const Z=window.innerWidth,T=window.innerHeight,Q=S.getBoundingClientRect().top+window.scrollY,E=Q+S.offsetHeight,z=Math.min(1,Math.max(0,(window.scrollY-(Q-T*.85))/(T*.85))),_=z*z*(3-2*z),h=z>0&&window.scrollY<E,M=Z*.6,L=M*(9/16),c=Vt((Z-M)/2,0,_),j=Vt(T,0,_),F=Vt(M,Z,_),$=Vt(L,T,_),P=Z-c-F,ve=T-j-$,B=36*(1-_);p.style.visibility=h?"visible":"hidden",p.style.clipPath=`inset(${j.toFixed(2)}px ${P.toFixed(2)}px ${ve.toFixed(2)}px ${c.toFixed(2)}px round ${B.toFixed(1)}px)`;const W=Math.min(1,Math.max(0,(window.scrollY-Q)/(T*.8)));f.style.transform=`translateY(${(-100*W).toFixed(2)}vh)`;const J=h&&c<=52&&j<=32&&c+F>=52&&j+$>=32,X=S.dataset.headerToneActive,K=J?"dark":void 0;X!==K&&(K?S.dataset.headerToneActive=K:delete S.dataset.headerToneActive,window.dispatchEvent(new Event("snew-header-tone-change")))},y=()=>{x||(x=window.requestAnimationFrame(n))};return n(),window.addEventListener("scroll",y,{passive:!0}),window.addEventListener("resize",y),()=>{var S;(S=m.current)!=null&&S.dataset.headerToneActive&&(delete m.current.dataset.headerToneActive,window.dispatchEvent(new Event("snew-header-tone-change"))),window.removeEventListener("scroll",y),window.removeEventListener("resize",y),x&&window.cancelAnimationFrame(x)}},[]),s.length===0?null:e.jsxs("section",{ref:m,className:"w-full",style:{flexDirection:"column","--foreground":"0 0% 96%","--muted-foreground":"0 0% 66%","--secondary":"0 0% 13%","--background":"0 0% 7%"},children:[e.jsx("div",{ref:d,"data-header-tone":"dark",className:"pointer-events-none fixed inset-0 z-40 hidden items-center justify-center overflow-hidden bg-[#111] lg:flex",
5style:{visibility:"hidden",clipPath:"inset(100% 20% -33.75vw 20% round 36px)",willChange:"clip-path"},children:e.jsxs("div",{ref:l,className:"mx-auto max-w-[1080px] text-center",style:{willChange:"transform"},children:[e.jsx("span",{className:"mb-6 inline-flex h-8 items-center rounded-full bg-white/[0.10] px-4 text-[14px] font-semibold leading-none text-[#e4e4e4]",children:a}),e.jsx("h2",{className:"whitespace-pre-line font-heading text-[46px] font-semibold leading-[1.02] tracking-[-0.04em] sm:text-[78px] lg:text-[96px]",style:{color:"#f7f7f7"},children:t})]})}),e.jsx("div",{"aria-hidden":!0,className:"hidden h-[80vh] lg:block"}),e.jsx("div",{"data-header-tone":"dark",className:"relative w-full bg-[#111] px-5 py-28 sm:px-8 lg:hidden",children:e.jsxs("div",{className:"mx-auto w-full max-w-[1240px]",children:[e.jsx("span",{className:"mx-auto mb-6 flex h-8 w-max items-center rounded-full bg-white/[0.10] px-4 text-[14px] font-semibold leading-none text-[#e4e4e4]",children:a}),e.jsx("h2",{className:"mx-auto max-w-[980px] whitespace-pre-line text-center font-heading text-[42px] font-semibold leading-[1.02] tracking-[-0.04em] sm:text-[64px]",style:{color:"#f7f7f7"},children:t}),e.jsx("div",{className:"mt-16 grid grid-cols-1 items-stretch gap-4 md:grid-cols-2",children:s.map(x=>e.jsx("article",{className:"flex min-h-[300px] flex-col rounded-[32px] bg-[#1c1c1c] p-7 sm:p-8 xl:p-10",children:e.jsx(qa,{item:x})},x.title))})]})}),e.jsx("div",{"data-header-tone":"dark",className:"relative z-[41] hidden w-full bg-[#111] lg:block",style:{height:"180vh"},children:e.jsx("div",{className:"sticky top-0 flex h-screen w-full items-center bg-[#111] px-5 sm:px-8",children:e.jsx("div",{className:"mx-auto grid w-full max-w-[1240px] grid-cols-3 items-stretch gap-4",children:s.map(x=>e.jsx("article",{className:"flex min-h-[250px] flex-col rounded-[32px] bg-[#1c1c1c] p-7 sm:p-8 xl:min-h-[300px] xl:p-10",children:e.jsx(qa,{item:x})},x.title))})})})]})}const Gt=["eye",...Zo.filter(a=>a!=="eye")],oo="__landing_agent_scene__",so="style";function Wt(a,t){var d;const m=(((d=a.split("/").pop())==null?void 0:d.split("?")[0])??"").replace(/\.[a-z0-9]+$/i,"");return/^[a-z0-9]+(-[a-z0-9]+)+$/.test(m)?m.split("-").map(l=>l.charAt(0).toUpperCase()+l.slice(1)).join(" "):t}function Is(){const a=new Map;for(const t of Gt)for(const s of Zt(t)){if(!Xt(s.id))continue;const m=mt(s.id,t),d=ma(s.id,t);if(!Ut(m)||!d)continue;const l=a.get(d);l?l.estilos.some(x=>x.id===s.id)||l.estilos.push(s):a.set(d,{productUrl:d,seg:t,nome:Wt(d,jt(s)),estilos:[s]})}return[...a.values()].sort((t,s)=>s.estilos.length-t.estilos.length)}const Kt=8,fa=3;function Ua(){var s;const a=Ka(so,oo),t=(s=a==null?void 0:a.data)==null?void 0:s.productUrl;return typeof t=="string"&&t?t:null}function ks(){var s;const a=Ka(so,oo),t=(s=a==null?void 0:a.data)==null?void 0:s.cards;return Array.isArray(t)?t.filter(m=>typeof m=="string"&&/^https?:\/\//.test(m)):[]}function Za(a,t){const s=[...a],m=new Set(s.map(l=>l.url)),d=t?[t,...Gt.filter(l=>l!==t)]:Gt;for(const l of d)for(const x of Zt(l)){if(!Xt(x.id))continue;const n=mt(x.id,l);if(!(!Ut(n)||!n||m.has(n))&&(m.add(n),s.push({url:n,nome:jt(x)}),s.length>=Kt))return s}return s}function Hs(){const a=ks();if(a.length>=fa){const d=Ua()??a[0];return{packshot:{url:d,nome:Wt(d,"")},cards:Za(a.slice(0,Kt).map(l=>({url:l,nome:Wt(l,"")})))}}const t=Is(),s=Ua(),m=s&&t.find(d=>d.productUrl===s)||t[0];if(m&&m.estilos.length>=fa){const d=[];for(const l of m.estilos){const x=mt(l.id,m.seg);if(x&&d.push({url:x,nome:jt(l)}),d.length>=Kt)break}return{packshot:{url:m.productUrl,nome:m.nome},cards:Za(d,m.seg)}}return Ls()}function Ls(){for(const a of Gt)for(const t of Zt(a)){if(!Xt(t.id))continue;const s=ma(t.id,a);if(!s||!Ut(mt(t.id,a)))continue;const m=[];for(const d of Zt(a)){if(!Xt(d.id))continue;const l=mt(d.id,a);if(Ut(l)&&(m.push({url:l,nome:jt(d)}),m.length>=Kt))break}if(m.length>=fa)return{packshot:{url:s,nome:Wt(s,jt(t))},cards:m}}return null}const da=10,Xa=3,Ps={fas:"#dbeafe",bea:"#fce7f3",fra:"#ede9fe",fnb:"#fde68a",jwl:"#f5d0fe",spt:"#d9f99d",sup:"#dcfce7",eye:"#cffafe",hom:"#f5e6d3",pha:"#ccfbf1",pet:"#ffedd5",ele:"#dbeafe",kid:"#fef9c3",acc:"#e9d5ff"};function pr({heroVariant:a="floating",experienceVersion:t="main",productDropEnabled:s=!1}={}){const m=ro(),d=t==="backup"||a!=="floating";o.useLayoutEffect(()=>{const c=document.documentElement,j=c.classList.contains("dark"),F=c.style.colorScheme,$=()=>{c.classList.contains("dark")&&c.classList.remove("dark"),c.style.colorScheme!=="light"&&(c.style.colorScheme="light")};$();const P=new MutationObserver($);return P.observe(c,{attributes:!0,attributeFilter:["class","style"]}),()=>{P.disconnect(),j?c.classList.add("dark"):c.classList.remove("dark"),c.style.colorScheme=F}},[]);const[l,x]=Yo(),n=Po(l),[y,S]=o.useState(0);o.useEffect(()=>{const c=fo(()=>S(j=>j+1));return mo(po()).catch(j=>{console.warn("[landing] hero overrides failed to load:",j instanceof Error?j.message:j)}),c},[]);const p=o.useMemo(()=>qo(),[y]),f=o.useMemo(()=>_o(),[y]),Z=o.useRef(f);f.length>0&&(Z.current=f);const T=f.length>0?f:Z.current,Q=o.useMemo(()=>zo(T),[T,y]),E=o.useMemo(()=>[...p.entries()].flatMap(([c,j])=>{const F=j[0],$=F?mt(F.id,c):void 0;return $?[{label:Aa(c,l),caption:Vo(c,l).lead,image:$,productImage:ma(F.id,c),href:`/categories/${Bo[c]}`,cta:`${l==="pt-BR"?"Explorar":"Explore"} ${Aa(c,l)}`,accent:Ps[c]}]:[]}),[l,p]),z=o.useMemo(()=>{const c=[],j=new Set,F=[{id:"env-light-fashion-pose"},{id:"pa-ingredient-immersion",seg:"fnb"},{id:"beverage-face-scale-block"},{id:"water-props-mineral"},{id:"pi-bag-reveal",seg:"fnb"}];for(const B of F){const W=mt(B.id,B.seg),J=Uo(B.id);W&&J&&!j.has(W)&&(j.add(W),c.push({url:W,nome:jt(J)}))}const $=[...p.values()],P=da*Xa;for(let B=0;c.length<P&&B<40;B++){let W=!1;for(const J of $){const X=J[B];if(!X)continue;const K=mt(X.id);if(K&&!j.has(K)&&(j.add(K),c.push({url:K,nome:jt(X)}),W=!0),c.length>=P)break}if(!W)break}const ve=[];for(let B=0;B<Math.min(da,c.length);B++){const W=[];for(let J=0;J<Xa;J++){const X=c[J*da+B];X&&W.push(X)}ve.push(W)}return ve},[p]),_=o.useMemo(()=>Fo(),[y]),h=o.useMemo(()=>Hs(),[y]),M=o.useCallback(c=>m(io(l,c)),[l,m]),L=o.useCallback(()=>M(),[M]);return e.jsxs("div",{"data-no-translate":!0,className:Ie("landing-deep min-h-screen bg-background text-foreground antialiased",a==="floating"&&"landing-floating-page"),children:[e.jsx(Mo,{idioma:l,faq:n.faq}),e.jsx("header",{className:Ie("sticky top-0 z-50",a==="floating"&&"floating-topbar"),children:e.jsx(Ho,{idioma:l,authVariant:a==="floating"?"soft-blue":"default"})}),a==="floating"?e.jsx(So,{products:T,title:n.floatingHeroTitle,cta:n.finalCtaButton,onCta:L,portuguese:l==="pt-BR",pinUntilId:"floating-products-morph-track",gridTargetId:"floating-products-grid"}):a==="spiral"?e.jsx(ws,{imagens:z,camadas:_??void 0,hero:{hat:n.heroHat,segundoHat:n.heroSecondHat,titulo:n.heroTitle,segundoTitulo:n.heroSecondTitle,cta:n.finalCtaButton,onCta:L}}):e.jsx(gs,{imagens:z,camadas:_??void 0,hero:{hat:n.heroHat,segundoHat:n.heroSecondHat,titulo:n.heroTitle,segundoTitulo:n.heroSecondTitle,cta:n.finalCtaButton,onCta:L}}),a==="floating"&&e.jsxs("div",{id:"floating-intro-proof",className:"relative z-[2]",children:[e.jsx(va,{hat:n.manifestoHat,texto:n.floatingManifesto,gridCalloutHat:n.floatingGridCalloutHat,gridCalloutTitle:n.floatingGridCalloutTitle,gridExplanation:n.floatingGridExplanation,floatingProducts:T,portuguese:l==="pt-BR",dropProductsIntoSteps:s}),e.jsx(ja,{eyebrow:n.howHat,title:n.howTitle,passos:n.howSteps,products:T,boardScene:Q,portuguese:l==="pt-BR",reserveProductLanding:s,featuresFollow:t==="main"&&!s})]}),a==="floating"&&t==="main"&&e.jsx(Oo,{items:n.productFeatures,ariaLabel:l==="pt-BR"?"Principais recursos da Snew":"Snew product features"}),a==="floating"&&t==="backup"&&e.jsx(Ds,{items:E,ariaLabel:l==="pt-BR"?"Categorias de presets":"Preset categories",hat:n.styleStoryHat,title:n.styleStoryTitle}),a==="floating"&&t==="main"&&e.jsx("section",{id:"landing-presets","aria-label":l==="pt-BR"?"Presets para começar":"Presets to get started",className:"relative z-[4] w-full bg-background px-5 pb-12 pt-24 sm:px-8 sm:pb-16 sm:pt-32",children:e.jsxs("div",{className:"mx-auto w-full max-w-[1440px]",children:[e.jsx(ua,{hat:n.styleStoryHat,title:n.styleStoryTitle,variant:"display"}),e.jsx("div",{className:"mt-24 sm:mt-[120px]",children:e.jsx(ya,{language:l,publicPreview:!0,embedded:!0,publicPresetLimit:18,onRequireAccount:L})})]})}),a!=="floating"&&e.jsxs("div",{className:"mx-auto w-full max-w-[1600px] px-5 py-16 sm:px-8 sm:py-24",children:[e.jsxs("section",{"aria-labelledby":"landing-start-now",className:"mb-16 sm:mb-24",children:[e.jsx("h2",{id:"landing-start-now",className:"mb-6 text-[26px] font-medium tracking-tight",children:l==="pt-BR"?"Boas-vindas à Snew. Comece agora":"Welcome to Snew. Start now"}),e.jsx(es,{language:l,onCreateCarousel:L,onEditProduct:L,onExploreStyles:()=>{var c;return(c=document.getElementById("biblioteca"))==null?void 0:c.scrollIntoView({behavior:window.matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth"})},onCreateVideoStory:L})]}),e.jsx("div",{id:"biblioteca",className:"scroll-mt-24",children:e.jsx(ya,{language:l,publicPreview:!0,onRequireAccount:L})})]}),a!=="floating"&&e.jsxs(e.Fragment,{children:[e.jsx(va,{hat:n.manifestoHat,texto:n.manifesto}),e.jsx(ja,{eyebrow:n.howHat,title:n.howTitle,passos:n.howSteps})]}),a!=="floating"&&e.jsx(Os,{hat:n.capabilitiesHat,title:n.capabilitiesTitle,itens:n.capabilities}),d&&e.jsx("section",{"data-header-tone":"dark",className:Ie("relative z-[42] w-full bg-[#111] px-5 pt-28 text-center text-[#f7f7f7] sm:px-8 sm:pt-40",h?"pb-6 sm:pb-10":"pb-28 sm:pb-40"),style:{"--foreground":"0 0% 96%","--muted-foreground":"0 0% 66%"},children:e.jsx(ua,{title:n.agentTitle,lead:n.agentLead,className:"[&_h2]:!text-[#f7f7f7]"})}),d&&e.jsx(Ts,{packshot:(h==null?void 0:h.packshot)??null,cards:(h==null?void 0:h.cards)??[],copy:{thinking:n.agentMockThinking,generating:n.agentMockGenerating,title:n.agentMockTitle,suggestion:n.agentMockSuggestion,plan:n.agentMockPlan,deliverables:n.agentMockDeliverables,completeHat:n.agentMockCompleteHat,complete:n.agentMockComplete}}),d&&e.jsx($s,{cards:(h==null?void 0:h.cards)??[],cardTitle:n.agentNextCardTitle,de
5scriptions:n.agentNextCardDescriptions}),e.jsx(Io,{title:n.finalCtaTitle,lead:n.finalCtaLead,cta:n.finalCtaButton,onCta:L}),e.jsx(ko,{titulo:n.faqTitle,perguntas:n.faq}),e.jsx(Lo,{idioma:l,onIdioma:x})]})}export{pr as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.