{"version":3,"file":"ScrollToTopOnLoad.C1neUBD6.mjs","names":["__esmMin","window","init_ssg_sandbox_shims","init_npm_react_18_3_1","init_jsx_runtime","c","ce","init_framer_DymZktPS","useNavigation","LenisScrollTopManager","navigation","cancelled","getLenis","ensureStarted","lenis","tick","init_ScrollToTopOnLoad"],"sources":["https:/framerusercontent.com/modules/ColmFwfdQgL70qBk4rVY/powFYWL6dubvxlCWab8R/ScrollToTopOnLoad.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{useNavigation}from\"framer\";export default function LenisScrollTopManager(){const navigation=useNavigation();React.useEffect(()=>{// Prevent multiple instances (templates/pages)\nif(window.__lenisScrollTopManagerInstalled)return;window.__lenisScrollTopManagerInstalled=true;let cancelled=false;const getLenis=()=>window.lenis??window.__lenis;const ensureStarted=()=>{const lenis=getLenis();try{// Some builds expose isStopped, but even if not, calling start() is safe.\nlenis?.start?.();}catch{}};// Watchdog: if Lenis appears later or gets stuck stopped, start it.\nconst tick=()=>{if(cancelled)return;ensureStarted();requestAnimationFrame(tick);};requestAnimationFrame(tick);return()=>{cancelled=true;ensureStarted();window.__lenisScrollTopManagerInstalled=false;};},[]);React.useEffect(()=>{const lenis=window.lenis??window.__lenis;if(!lenis)return;// Run when navigation ENDS\nif(navigation?.isNavigating)return;try{// Do NOT leave it stopped\nlenis.stop?.();lenis.scrollTo?.(0,{immediate:true,force:true});}finally{lenis.start?.();}},[navigation?.isNavigating]);return /*#__PURE__*/_jsx(\"div\",{style:{display:\"none\"}});}LenisScrollTopManager.displayName=\"Lenis Scroll Top Manager\";\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LenisScrollTopManager\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ScrollToTopOnLoad.map"],"mappings":"A,kLAAyG,SAAwBS,GAAuB,CAAC,IAAMC,EAAWF,EAAc,EAKjE,OALmEF,MAAoB,CAC9M,GAAGL,EAAO,iCAAiC,OAAO,EAAO,iCAAiC,GAAK,IAAIU,EAAU,GAAYC,MAAaX,EAAO,OAAOA,EAAO,QAAcY,MAAkB,CAAC,IAAMC,EAAMF,EAAS,EAAE,GAAG,CACtNE,GAAO,QAAQ,CAAE,MAAM,CAAC,CAAC,EACnBC,MAAS,CAAIJ,IAAiBE,EAAc,EAAE,sBAAsBE,CAAI,EAAE,EAA8B,OAA5B,sBAAsBA,CAAI,MAAY,CAAC,EAAU,GAAKF,EAAc,EAAE,EAAO,iCAAiC,EAAM,CAAE,EAAE,CAAC,CAAC,EAAEP,MAAoB,CAAC,IAAMQ,EAAMb,EAAO,OAAOA,EAAO,QAAQ,GAAIa,GAC7Q,IAAY,aAAoB,GAAG,CACtCA,EAAM,OAAO,EAAEA,EAAM,WAAW,EAAE,CAAC,UAAU,GAAK,MAAM,EAAI,CAAC,CAAE,QAAQ,CAACA,EAAM,QAAQ,CAAE,CAAC,EAAE,CAACJ,GAAY,YAAY,CAAC,EAAsB,gBAAK,MAAM,CAAC,MAAM,CAAC,QAAQ,MAAM,CAAC,CAAC,CAAE,C,8CAAC,EAAsB,YAAY,0B"}