!function(){"use strict";if("undefined"==typeof gsap||"undefined"==typeof ScrollTrigger)return;function t(){const t=document.querySelectorAll("[data-scroll-sync]");0!==t.length&&t.forEach(((t,o)=>{!function(t,o){const r=parseInt(t.getAttribute("data-scroll-sync-breakpoint"));if(r&&window.innerWidth0&&t[0].children.length>0?t.map((t=>t.children[0])):t}const i=Array.from(l.children);if(0===n.length||0===i.length)return;t.classList.add("scroll-sync-active");const a=n.length;s.querySelectorAll('[class*="wrapper"]').forEach((t=>{t.style.height="auto",t.style.minHeight="unset",t.style.marginBottom="0",t.style.position="static"})),t.style.height=100*a+"vh",t.style.position="relative",l.style.position="sticky",l.style.top="0",l.style.height="100vh",l.style.display="flex",l.style.alignItems="center",l.style.justifyContent="center",i.forEach(((t,e)=>{t.style.position="absolute",t.style.top="50%",t.style.left="0",t.style.transform="translateY(-50%)",t.style.width="100%",t.style.height="auto",t.style.margin="0",t.style.opacity=0===e?"1":"0",t.style.transition="opacity 0.5s ease";const o=t.querySelector("img");o&&(o.style.width="100%",o.style.height="auto")})),s.style.position="sticky",s.style.top="0",s.style.height="100vh",s.style.pointerEvents="none",n.forEach(((t,e)=>{t.style.position="absolute",t.style.top="50%",t.style.left="0",t.style.width="100%",t.style.boxSizing="border-box",t.style.pointerEvents="auto",t.style.margin="0",gsap.set(t,{yPercent:-50,opacity:0===e?1:0,y:0===e?0:50})}));let c=-1,y=null;ScrollTrigger.create({trigger:t,start:"top top",end:"bottom bottom",scrub:!0,onUpdate:t=>{const o=t.progress,r=Math.min(Math.floor(o*a),a-1);if(r!==c){i.forEach(((t,e)=>{t.style.opacity=e===r?"1":"0"})),y&&y.kill();const t=c,o=r>t;y=gsap.timeline(),t>=0&&n[t]&&y.to(n[t],{opacity:0,y:o?-30:30,duration:.25,ease:"power3.in",onStart:()=>e(n[t],!1)}),y.to(n[r],{opacity:1,y:0,duration:.35,ease:"power3.out",onStart:()=>e(n[r],!0)}),gsap.set(n[r],{y:o?30:-30}),n.forEach(((e,s)=>{s!==r&&s!==t&&gsap.set(e,{opacity:0,y:o?30:-30})})),c=r}}}),setTimeout((()=>{n[0]&&e(n[0],!0),c=0}),100)}(t)}))}function e(t,e){const o=t.querySelectorAll(".split-text-chars .char"),r=t.querySelectorAll(".split-text-animation .line");o.length>0&&gsap.to(o,{y:e?0:50,opacity:e?1:0,duration:e?1.5:.8,stagger:e?.01:.005,ease:e?"power4.out":"power3.in",overwrite:!0}),r.length>0&&gsap.to(r,{y:e?0:30,opacity:e?1:0,duration:e?1.2:.6,stagger:e?.15:.08,ease:e?"power4.out":"power3.in",overwrite:!0})}let o;gsap.registerPlugin(ScrollTrigger),window.addEventListener("resize",(()=>{clearTimeout(o),o=setTimeout((()=>ScrollTrigger.refresh()),250)})),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",t):t()}();