{"version":3,"file":"ScrollRestoration.DxJs8Ong.mjs","names":[],"sources":["https:/framerusercontent.com/modules/wEEPFQ0uUutPD9ITIkd0/uou4H2VGvTmP2nbR8wRy/ScrollRestoration.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";import{Frame}from\"framer\";export function ScrollPreserver(){// Save scroll\nuseEffect(()=>{const save=()=>{sessionStorage.setItem(\"scroll-\"+window.location.pathname,window.scrollY.toString());};window.addEventListener(\"scroll\",save);window.addEventListener(\"beforeunload\",save);return()=>{window.removeEventListener(\"scroll\",save);window.removeEventListener(\"beforeunload\",save);};},[]);// Restore scroll on back\nuseEffect(()=>{const restore=()=>{const y=sessionStorage.getItem(\"scroll-\"+window.location.pathname);if(y){requestAnimationFrame(()=>{window.scrollTo(0,parseInt(y,10));});}};window.addEventListener(\"popstate\",restore);return()=>window.removeEventListener(\"popstate\",restore);},[]);// Invisible but placeable\nreturn /*#__PURE__*/_jsx(Frame,{width:0,height:0,style:{display:\"none\"}});}\nexport const __FramerMetadata__ = {\"exports\":{\"ScrollPreserver\":{\"type\":\"reactComponent\",\"name\":\"ScrollPreserver\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ScrollRestoration.map"],"mappings":"iLAAkG,SAAgB,GAAiB,CAGnI,OAFA,MAAc,CAAC,IAAM,MAAS,CAAC,eAAe,QAAQ,UAAU,EAAO,SAAS,SAAS,EAAO,QAAQ,UAAU,CAAC,EAAuF,OAApF,EAAO,iBAAiB,SAAS,EAAK,CAAC,EAAO,iBAAiB,eAAe,EAAK,KAAW,CAAC,EAAO,oBAAoB,SAAS,EAAK,CAAC,EAAO,oBAAoB,eAAe,EAAK,GAAK,EAAE,CAAC,CACtT,MAAc,CAAC,IAAM,MAAY,CAAC,IAAM,EAAE,eAAe,QAAQ,UAAU,EAAO,SAAS,SAAS,CAAI,GAAG,0BAA0B,CAAC,EAAO,SAAS,EAAE,SAAS,EAAE,GAAG,CAAC,EAAG,EAAgD,OAA5C,EAAO,iBAAiB,WAAW,EAAQ,KAAW,EAAO,oBAAoB,WAAW,EAAQ,EAAG,EAAE,CAAC,CACpQ,EAAK,EAAM,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,QAAQ,OAAO,CAAC,CAAC,sBAH9B,IAA6B,IAA0B"}