import{b,_ as c}from"./components-B9K1e90R.js";import{u as p,n as m,r as a}from"./index-DxNxE5m4.js";import{u as w}from"./index-Cjq7XsPA.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="91d6f700-b89b-4297-952f-bb0b83be9fa0",e._sentryDebugIdIdentifier="sentry-dbid-91d6f700-b89b-4297-952f-bb0b83be9fa0")}catch{}})();/**
 * @remix-run/react v2.13.1
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */let l="positions";function I({getKey:e,...r}){let{isSpaMode:s}=b(),n=p(),d=m();w({getKey:e,storageKey:l});let u=a.useMemo(()=>{if(!e)return null;let t=e(n,d);return t!==n.key?t:null},[]);if(s)return null;let f=((t,y)=>{if(!window.history.state||!window.history.state.key){let o=Math.random().toString(32).slice(2);window.history.replaceState({key:o},"")}try{let i=JSON.parse(sessionStorage.getItem(t)||"{}")[y||window.history.state.key];typeof i=="number"&&window.scrollTo(0,i)}catch(o){console.error(o),sessionStorage.removeItem(t)}}).toString();return a.createElement("script",c({},r,{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${f})(${JSON.stringify(l)}, ${JSON.stringify(u)})`}}))}export{I as S};
//# sourceMappingURL=scroll-restoration-DoSbqJ8P.js.map
