{"version":3,"file":"ScrollToTopOnLoad.B2mlmkWH.mjs","names":["React.useEffect","_jsx","__esmMin","window","init_ssg_sandbox_shims","init_npm_react_18_3_1","init_jsx_runtime","c","ce","useNavigation","init_framer_ChujFWHC","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,SAAwBW,GAAuB,CAAC,IAAMC,EAAWH,EAAc,EAKjE,OALmET,MAAoB,CAC9M,GAAGG,EAAO,iCAAiC,OAAOA,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,CAACJ,EAAU,GAAKE,EAAc,EAAEZ,EAAO,iCAAiC,EAAM,CAAE,EAAE,CAAC,CAAC,EAAEH,MAAoB,CAAC,IAAMgB,EAAMb,EAAO,OAAOA,EAAO,QAAQ,GAAIa,GAC7QJ,IAAY,aAAoB,GAAG,CACtCI,EAAM,OAAO,EAAEA,EAAM,WAAW,EAAE,CAAC,UAAU,GAAK,MAAM,EAAI,CAAC,CAAE,QAAQ,CAACA,EAAM,QAAQ,CAAE,CAAC,EAAE,CAACJ,GAAY,YAAY,CAAC,EAAsBX,gBAAK,MAAM,CAAC,MAAM,CAAC,QAAQ,MAAM,CAAC,CAAC,CAAE,C,8CAACU,EAAsB,YAAY,0B"}