import{g as s,r as a}from"./index.d8a7997a.js";import{M as p,u,R as i}from"./49686fa5.js";function m(e){return String(e).includes("__proto__")?JSON.parse(e,f):JSON.parse(e)}function f(e,t){if(e!=="__proto__")return t}function R(e){try{const{pathname:t,search:o}=e,r=e.searchParams.get("state");return t===s?r?m(decodeURIComponent(r)):{}:{pathname:decodeURIComponent(t),search:decodeURIComponent(o)}}catch{}}function U(){var t,o;if(p){const r=new URL(u());if(r.pathname===s){const n=R(r),c=`${r.origin}${(t=n==null?void 0:n.pathname)!=null?t:""}${(o=n==null?void 0:n.search)!=null?o:""}`;return new URL(c)}return new URL(r)}const e=a.exports.useContext(i);return a.exports.useMemo(()=>new URL(window.location.href),[e])}export{U as u}; //# sourceMappingURL=c06b6065.js.map