import"./app-84040815.js";import{j as S,e as m,k as w,t as g,l as p,a as O,d as P,f as A,i as d,h as $}from"./get-033a25d2.js";function v(e){return t=>Object.keys(e).reduce((r,n)=>{const s=typeof e[n]=="object"&&e[n]!=null&&!Array.isArray(e[n])?e[n]:{type:e[n]};return t&&n in t?r[n]={...s,default:t[n]}:r[n]=s,r},{})}var _=function(){try{var e=S(Object,"defineProperty");return e({},"",{}),e}catch{}}();const h=_;function x(e,t,r){t=="__proto__"&&h?h(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var H=Object.prototype,I=H.hasOwnProperty;function Q(e,t,r){var n=e[t];(!(I.call(e,t)&&m(n,r))||r===void 0&&!(t in e))&&x(e,t,r)}function N(e,t,r){t=w(t,e);for(var n=-1,i=t.length,s=!1;++n<i;){var a=g(t[n]);if(!(s=e!=null&&r(e,a)))break;e=e[a]}return s||++n!=i?s:(i=e==null?0:e.length,!!i&&p(i)&&O(a,i)&&(P(e)||A(e)))}var U=Object.prototype,C=U.hasOwnProperty;function F(e,t){return e!=null&&C.call(e,t)}function J(e,t){return e!=null&&N(e,t,F)}function K(e,t,r,n){if(!d(e))return e;t=w(t,e);for(var i=-1,s=t.length,a=s-1,o=e;o!=null&&++i<s;){var l=g(t[i]),f=r;if(l==="__proto__"||l==="constructor"||l==="prototype")return e;if(i!=a){var c=o[l];f=n?n(c,l,o):void 0,f===void 0&&(f=d(c)?c:O(t[i+1])?[]:{})}Q(o,l,f),o=o[l]}return e}function y(e,t,r,n){return n=typeof n=="function"?n:void 0,e==null?e:K(e,t,r,n)}const R=e=>{const t=e.split("&"),r={};for(const n of t){let[i,s]=n.split("=").map(decodeURIComponent);if(s&&s.length)if(s.startsWith("[")&&s.endsWith("]")&&(s=JSON.parse(s)),J(r,i)){const a=$(r,i);Array.isArray(a)?a.push(s):y(r,i,[a,s],Object)}else y(r,i,s,Object)}return r},u=(e,t="")=>{let r=Object.entries(e).filter(([n,i])=>n&&i).map(([n,i])=>{if(Array.isArray(i)){const s=[];if(Object.entries(i).forEach(([a,o])=>{if(typeof o=="object")return u(o,`${t}${n}.`);s.push(o)}),s.length)return[t+n,`[${s.join(",")}]`].map(encodeURIComponent).join("=")}else return typeof i=="object"?u(i,`${t}${n}.`):[t+n,i].map(encodeURIComponent).join("=")}).join("&");for(;r.indexOf("&&")!==-1;)r=r.replace(/&&/g,"&");return r.charAt(0)==="&"&&(r=r.slice(1)),r},B=v({enableHistoryState:{type:Boolean,default:!1},urlEncoding:{type:Boolean,default:!1}});function D(e,t,r=!1){if(!e||!window.history)return;const n=window.history.state||{},i=r?`${window.location.origin+window.location.pathname}?${u(t)}`:window.location.href;n[e]=JSON.parse(JSON.stringify(t)),history.replaceState(n,document.title,i)}function E(e){return history.state?history.state[e]:null}function b(){if(!window.location.search.length)return;const e=window.location.search.charAt(0)==="?"?window.location.search.slice(1):window.location.search;return R(e)}export{Q as a,x as b,K as c,h as d,b as e,E as g,B as m,v as p,D as s}; //# sourceMappingURL=historyState-c0bd92a1.js.map