function e(e){try{return decodeURIComponent(e)}catch{return e}}function t(t){let n=e(t.startsWith(`#`)?t.slice(1):t);if(n===``||n===`top`){window.scrollTo(0,0);return}let r=document.getElementById(n);if(r){r.scrollIntoView({behavior:`auto`});return}let i=document.getElementsByName(n)[0];if(i){i.scrollIntoView({behavior:`auto`});return}window.scrollTo(0,0)}var n=Symbol.for(`vinext.appRouterScrollIntent`);function r(){let e=globalThis;return e[n]??={nextId:0,pending:null},e[n]}function i(e){let t=r();t.nextId+=1;let n={commitId:null,hash:e,headElements:typeof document>`u`?null:new Set(document.head?.children??[]),id:t.nextId,targetHoistedInHead:!1};return t.pending=n,n}function a(){let e=r();e.nextId+=1,e.pending=null}function o(){return r().pending}function s(e,t){let n=r(),i=n.pending;e==null||i===null||i.id===e.id&&i.commitId===t&&(n.pending={...i,targetHoistedInHead:!0})}function c(e,t){if(e==null)return null;let n=r(),i=n.pending;return i===null||i.id!==e.id||t!==void 0&&i.commitId!==t?null:(n.pending=null,i)}export{s as a,o as i,a as n,e as o,c as r,t as s,i as t};