var v0=Object.defineProperty;var y0=(i,r,f)=>r in i?v0(i,r,{enumerable:!0,configurable:!0,writable:!0,value:f}):i[r]=f;var _t=(i,r,f)=>y0(i,typeof r!="symbol"?r+"":r,f);function jm(i,r){for(var f=0;fc[s]})}}}return Object.freeze(Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}))}var Vp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Lm(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function Zp(i){if(Object.prototype.hasOwnProperty.call(i,"__esModule"))return i;var r=i.default;if(typeof r=="function"){var f=function c(){return this instanceof c?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};f.prototype=r.prototype}else f={};return Object.defineProperty(f,"__esModule",{value:!0}),Object.keys(i).forEach(function(c){var s=Object.getOwnPropertyDescriptor(i,c);Object.defineProperty(f,c,s.get?s:{enumerable:!0,get:function(){return i[c]}})}),f}var Cf={exports:{}},xu={};/** * @license React * react-jsx-runtime.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var $h;function g0(){if($h)return xu;$h=1;var i=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function f(c,s,y){var m=null;if(y!==void 0&&(m=""+y),s.key!==void 0&&(m=""+s.key),"key"in s){y={};for(var T in s)T!=="key"&&(y[T]=s[T])}else y=s;return s=y.ref,{$$typeof:i,type:c,key:m,ref:s!==void 0?s:null,props:y}}return xu.Fragment=r,xu.jsx=f,xu.jsxs=f,xu}var Wh;function p0(){return Wh||(Wh=1,Cf.exports=g0()),Cf.exports}var Kp=p0(),Nf={exports:{}},qf={},xf={exports:{}},ve={};/** * @license React * react.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var kh;function S0(){if(kh)return ve;kh=1;var i=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),m=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),C=Symbol.iterator;function L(b){return b===null||typeof b!="object"?null:(b=C&&b[C]||b["@@iterator"],typeof b=="function"?b:null)}var X={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Q=Object.assign,J={};function oe(b,H,V){this.props=b,this.context=H,this.refs=J,this.updater=V||X}oe.prototype.isReactComponent={},oe.prototype.setState=function(b,H){if(typeof b!="object"&&typeof b!="function"&&b!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,b,H,"setState")},oe.prototype.forceUpdate=function(b){this.updater.enqueueForceUpdate(this,b,"forceUpdate")};function ue(){}ue.prototype=oe.prototype;function te(b,H,V){this.props=b,this.context=H,this.refs=J,this.updater=V||X}var ge=te.prototype=new ue;ge.constructor=te,Q(ge,oe.prototype),ge.isPureReactComponent=!0;var G=Array.isArray;function Ee(){}var R={H:null,A:null,T:null,S:null},Z=Object.prototype.hasOwnProperty;function ae(b,H,V){var W=V.ref;return{$$typeof:i,type:b,key:H,ref:W!==void 0?W:null,props:V}}function re(b,H){return ae(b.type,H,b.props)}function Te(b){return typeof b=="object"&&b!==null&&b.$$typeof===i}function ye(b){var H={"=":"=0",":":"=2"};return"$"+b.replace(/[=:]/g,function(V){return H[V]})}var Fe=/\/+/g;function xe(b,H){return typeof b=="object"&&b!==null&&b.key!=null?ye(""+b.key):H.toString(36)}function Ve(b){switch(b.status){case"fulfilled":return b.value;case"rejected":throw b.reason;default:switch(typeof b.status=="string"?b.then(Ee,Ee):(b.status="pending",b.then(function(H){b.status==="pending"&&(b.status="fulfilled",b.value=H)},function(H){b.status==="pending"&&(b.status="rejected",b.reason=H)})),b.status){case"fulfilled":return b.value;case"rejected":throw b.reason}}throw b}function q(b,H,V,W,P){var de=typeof b;(de==="undefined"||de==="boolean")&&(b=null);var Se=!1;if(b===null)Se=!0;else switch(de){case"bigint":case"string":case"number":Se=!0;break;case"object":switch(b.$$typeof){case i:case r:Se=!0;break;case A:return Se=b._init,q(Se(b._payload),H,V,W,P)}}if(Se)return P=P(b),Se=W===""?"."+xe(b,0):W,G(P)?(V="",Se!=null&&(V=Se.replace(Fe,"$&/")+"/"),q(P,H,V,"",function(cl){return cl})):P!=null&&(Te(P)&&(P=re(P,V+(P.key==null||b&&b.key===P.key?"":(""+P.key).replace(Fe,"$&/")+"/")+Se)),H.push(P)),1;Se=0;var lt=W===""?".":W+":";if(G(b))for(var Le=0;Le{const c=r.shift();return f==="%O"&&c?JSON.stringify(c).replace(/"([^"]+)":/g,"$1:"):String(c)})}function _0(){if(typeof window>"u")return(A0.DEBUG||"").includes("nuqs");try{const i="nuqs-localStorage-test";if(typeof localStorage>"u")return!1;localStorage.setItem(i,i);const r=localStorage.getItem(i)===i;return localStorage.removeItem(i),r&&(localStorage.getItem("debug")||"").includes("nuqs")}catch{return!1}}const O0={303:"Multiple adapter contexts detected. This might happen in monorepos.",404:"nuqs requires an adapter to work with your framework.",409:"Multiple versions of the library are loaded. This may lead to unexpected behavior. Currently using `%s`, but `%s` (via the %s adapter) was about to load on top.",414:"Max safe URL length exceeded. Some browsers may not be able to accept this URL. Consider limiting the amount of state stored in the URL.",422:"Invalid options combination: `limitUrlUpdates: debounce` should be used in SSR scenarios, with `shallow: false`",429:"URL update rate-limited by the browser. Consider increasing `throttleMs` for key(s) `%s`. %O",500:"Empty search params cache. Search params can't be accessed in Layouts.",501:"Search params cache already populated. Have you called `parse` twice?"};function Bm(i){return`[nuqs] ${O0[i]} See https://nuqs.dev/NUQS-${i}`}function D0(i){if(i.size===0)return"";const r=[];for(const[c,s]of i.entries()){const y=c.replace(/#/g,"%23").replace(/&/g,"%26").replace(/\+/g,"%2B").replace(/=/g,"%3D").replace(/\?/g,"%3F");r.push(`${y}=${U0(s)}`)}return"?"+r.join("&")}function U0(i){return i.replace(/%/g,"%25").replace(/\+/g,"%2B").replace(/ /g,"+").replace(/#/g,"%23").replace(/&/g,"%26").replace(/"/g,"%22").replace(/'/g,"%27").replace(/`/g,"%60").replace(//g,"%3E").replace(/[\x00-\x1F]/g,r=>encodeURIComponent(r))}const Bn=j.createContext({useAdapter(){throw new Error(Bm(404))}});Bn.displayName="NuqsAdapterContext";lo&&typeof window<"u"&&(window.__NuqsAdapterContext=Bn);function C0(i){return({children:r,defaultOptions:f,processUrlSearchParams:c,...s})=>j.createElement(Bn.Provider,{...s,value:{useAdapter:i,defaultOptions:f,processUrlSearchParams:c}},r)}function N0(i){const r=j.useContext(Bn);if(!("useAdapter"in r))throw new Error(Bm(404));return r.useAdapter(i)}const q0=()=>j.useContext(Bn).defaultOptions,x0=()=>j.useContext(Bn).processUrlSearchParams;function H0(){var i;if(typeof window>"u"||!window.GestureEvent)return 50;try{const r=(i=navigator.userAgent)==null?void 0:i.match(/version\/([\d\.]+) safari/i);return parseFloat(r[1])>=17?120:320}catch{return 320}}function j0(i){return{method:"throttle",timeMs:i}}const wu=j0(H0());function L0(i){return i===null||Array.isArray(i)&&i.length===0}function B0(i,r,f){if(typeof i=="string")f.set(r,i);else{f.delete(r);for(const c of i)f.append(r,c);f.has(r)||f.set(r,"")}return f}function ao(){const i=new Map;return{on(r,f){const c=i.get(r)||[];return c.push(f),i.set(r,c),()=>this.off(r,f)},off(r,f){const c=i.get(r);c&&i.set(r,c.filter(s=>s!==f))},emit(r,f){var c;(c=i.get(r))==null||c.forEach(s=>s(f))}}}function Jf(i,r,f){function c(){i(),f.removeEventListener("abort",y)}const s=setTimeout(c,r);function y(){clearTimeout(s),f.removeEventListener("abort",y)}f.addEventListener("abort",y)}function Ff(){const i=Promise;if(Promise.hasOwnProperty("withResolvers"))return Promise.withResolvers();let r=()=>{},f=()=>{};return{promise:new i((c,s)=>{r=c,f=s}),resolve:r,reject:f}}function Y0(i,r){let f=r;for(let c=i.length-1;c>=0;c--){const s=i[c];if(!s)continue;const y=f;f=()=>s(y)}f()}function $f(){return new URLSearchParams(location.search)}var Ym=class{constructor(){_t(this,"updateMap",new Map);_t(this,"options",{history:"replace",scroll:!1,shallow:!0});_t(this,"timeMs",wu.timeMs);_t(this,"transitions",new Set);_t(this,"resolvers",null);_t(this,"controller",null);_t(this,"lastFlushedAt",0);_t(this,"resetQueueOnNextPush",!1)}push({key:i,query:r,options:f},c=wu.timeMs){this.resetQueueOnNextPush&&(this.reset(),this.resetQueueOnNextPush=!1),ke("[nuqs gtq] Enqueueing %s=%s %O",i,r,f),this.updateMap.set(i,r),f.history==="push"&&(this.options.history="push"),f.scroll&&(this.options.scroll=!0),f.shallow===!1&&(this.options.shallow=!1),f.startTransition&&this.transitions.add(f.startTransition),(!Number.isFinite(this.timeMs)||c>this.timeMs)&&(this.timeMs=c)}getQueuedQuery(i){return this.updateMap.get(i)}getPendingPromise({getSearchParamsSnapshot:i=$f}){var r;return((r=this.resolvers)==null?void 0:r.promise)??Promise.resolve(i())}flush({getSearchParamsSnapshot:i=$f,rateLimitFactor:r=1,...f},c){if(this.controller??(this.controller=new AbortController),!Number.isFinite(this.timeMs))return ke("[nuqs gtq] Skipping flush due to throttleMs=Infinity"),Promise.resolve(i());if(this.resolvers)return this.resolvers.promise;this.resolvers=Ff();const s=()=>{this.lastFlushedAt=performance.now();const[m,T]=this.applyPendingUpdates({...f,autoResetQueueOnUpdate:f.autoResetQueueOnUpdate??!0,getSearchParamsSnapshot:i},c);T===null?(this.resolvers.resolve(m),this.resetQueueOnNextPush=!0):this.resolvers.reject(m),this.resolvers=null};return Jf(()=>{const m=performance.now()-this.lastFlushedAt,T=this.timeMs,v=r*Math.max(0,T-m);ke("[nuqs gtq] Scheduling flush in %f ms. Throttled at %f ms (x%f)",v,T,r),v===0?s():Jf(s,v,this.controller.signal)},0,this.controller.signal),this.resolvers.promise}abort(){var i,r;return(i=this.controller)==null||i.abort(),this.controller=new AbortController,(r=this.resolvers)==null||r.resolve(new URLSearchParams),this.resolvers=null,this.reset()}reset(){const i=Array.from(this.updateMap.keys());return ke("[nuqs gtq] Resetting queue %s",JSON.stringify(Object.fromEntries(this.updateMap))),this.updateMap.clear(),this.transitions.clear(),this.options={history:"replace",scroll:!1,shallow:!0},this.timeMs=wu.timeMs,i}applyPendingUpdates(i,r){const{updateUrl:f,getSearchParamsSnapshot:c}=i;let s=c();if(ke("[nuqs gtq] Applying %d pending update(s) on top of %s",this.updateMap.size,s.toString()),this.updateMap.size===0)return[s,null];const y=Array.from(this.updateMap.entries()),m={...this.options},T=Array.from(this.transitions);i.autoResetQueueOnUpdate&&this.reset(),ke("[nuqs gtq] Flushing queue %O with options %O",y,m);for(const[v,h]of y)h===null?s.delete(v):s=B0(h,v,s);r&&(s=r(s));try{return Y0(T,()=>{f(s,m)}),[s,null]}catch(v){return[s,v]}}};const Qu=new Ym;function w0(i,r,f){const c=j.useCallback(()=>{const y=Object.fromEntries(i.map(m=>[m,f(m)]));return[JSON.stringify(y),y]},[i.join(","),f]),s=j.useRef(null);return s.current===null&&(s.current=c()),j.useSyncExternalStore(j.useCallback(y=>{const m=i.map(T=>r(T,y));return()=>m.forEach(T=>T())},[i.join(","),r]),()=>{const[y,m]=c();return s.current[0]===y?s.current[1]:(s.current=[y,m],m)},()=>s.current[1])}var Q0=class{constructor(i){_t(this,"callback");_t(this,"resolvers",Ff());_t(this,"controller",new AbortController);_t(this,"queuedValue");this.callback=i}abort(){this.controller.abort(),this.queuedValue=void 0}push(i,r){return this.queuedValue=i,this.controller.abort(),this.controller=new AbortController,Jf(()=>{const f=this.resolvers;try{ke("[nuqs dq] Flushing debounce queue",i);const c=this.callback(i);ke("[nuqs dq] Reset debounce queue %O",this.queuedValue),this.queuedValue=void 0,this.resolvers=Ff(),c.then(s=>f.resolve(s)).catch(s=>f.reject(s))}catch(c){this.queuedValue=void 0,f.reject(c)}},r,this.controller.signal),this.resolvers.promise}},G0=class{constructor(i=new Ym){_t(this,"throttleQueue");_t(this,"queues",new Map);_t(this,"queuedQuerySync",ao());this.throttleQueue=i}useQueuedQueries(i){return w0(i,(r,f)=>this.queuedQuerySync.on(r,f),r=>this.getQueuedQuery(r))}push(i,r,f,c){if(!Number.isFinite(r)){const m=f.getSearchParamsSnapshot??$f;return Promise.resolve(m())}const s=i.key;if(!this.queues.has(s)){ke("[nuqs dqc] Creating debounce queue for `%s`",s);const m=new Q0(T=>(this.throttleQueue.push(T),this.throttleQueue.flush(f,c).finally(()=>{var v;((v=this.queues.get(T.key))==null?void 0:v.queuedValue)===void 0&&(ke("[nuqs dqc] Cleaning up empty queue for `%s`",T.key),this.queues.delete(T.key)),this.queuedQuerySync.emit(T.key)})));this.queues.set(s,m)}ke("[nuqs dqc] Enqueueing debounce update %O",i);const y=this.queues.get(s).push(i,r);return this.queuedQuerySync.emit(s),y}abort(i){var f;const r=this.queues.get(i);return r?(ke("[nuqs dqc] Aborting debounce queue %s=%s",i,(f=r.queuedValue)==null?void 0:f.query),this.queues.delete(i),r.abort(),this.queuedQuerySync.emit(i),c=>(c.then(r.resolvers.resolve,r.resolvers.reject),c)):c=>c}abortAll(){var i;for(const[r,f]of this.queues.entries())ke("[nuqs dqc] Aborting debounce queue %s=%s",r,(i=f.queuedValue)==null?void 0:i.query),f.abort(),f.resolvers.resolve(new URLSearchParams),this.queuedQuerySync.emit(r);this.queues.clear()}getQueuedQuery(i){var f,c;const r=(c=(f=this.queues.get(i))==null?void 0:f.queuedValue)==null?void 0:c.query;return r!==void 0?r:this.throttleQueue.getQueuedQuery(i)}};const Gu=new G0(Qu);function wm(i,r){return i===r?!0:i===null||r===null||typeof i=="string"||typeof r=="string"||i.length!==r.length?!1:i.every((f,c)=>f===r[c])}function tm(i,r,f){return c=>{if(!(r.length===0||r.some(y=>!wm(c.getAll(y),i.getAll(y)))))return ke("[nuqs `%s`] no change, returning previous",r.join(","),c),c;const s=Wf(i,r,f);return ke("[nuqs `%s`] subbed search params change\n from %O\n to %O",r.join(","),c,s),s}}function Wf(i,r,f){if(r.length===0)return i;const c=f?new URLSearchParams(i):i;for(const s of i.keys())r.includes(s)||c.delete(s);return c}let rr=0;function X0(i=1){rr=i}function V0(i=Qm){rr=Math.max(0,rr-1),!(rr>0)&&i()}function Qm(){ke("[nuqs] Aborting queues"),Gu.abortAll(),Qu.abort().forEach(i=>Gu.queuedQuerySync.emit(i))}const kf="__nuqs__";function Z0(i){if(i instanceof URL)return i.searchParams;if(i.startsWith("?"))return new URLSearchParams(i);try{return new URL(i,location.origin).searchParams}catch{return new URLSearchParams(i)}}function K0(i){var r,f,c;return!(typeof history>"u"||(r=history.nuqs)!=null&&r.version&&history.nuqs.version!=="2.8.9"||(c=(f=history.nuqs)==null?void 0:f.adapters)!=null&&c.includes(i))}function J0(i){history.nuqs=history.nuqs??{version:"2.8.9",adapters:[]},history.nuqs.adapters.push(i)}function F0(i,r){if(!K0(r))return;let f=typeof location=="object"?location.search:"";i.on("update",m=>{const T=m.toString();f=T.length?"?"+T:""}),window.addEventListener("popstate",()=>{f=location.search,Qm()}),ke("[nuqs %s] Patching history (%s adapter)","2.8.9",r);function c(m){V0();try{if(new URL(m,location.origin).search===f)return}catch{}try{i.emit("update",Z0(m))}catch{}}const s=history.pushState,y=history.replaceState;history.pushState=function(T,v,h){s.call(history,T,"",h),h&&v!==kf&&c(h)},history.replaceState=function(T,v,h){y.call(history,T,"",h),h&&v!==kf&&c(h)},J0(r)}function $0({adapter:i,useNavigate:r,useSearchParams:f}){const c=ao();function s(m){const T=r();return{searchParams:y(m),updateUrl:j.useCallback((v,h)=>{var C;j.startTransition(()=>{c.emit("update",v)});const A=new URL(location.href);A.search=D0(v),ke(`[nuqs ${i}] Updating url: %s`,A);const p=h.history==="push"?history.pushState:history.replaceState;X0(h.shallow?1:2),p.call(history,history.state,kf,A),h.shallow===!1&&T({hash:A.hash,search:A.search},{replace:!0,preventScrollReset:!0,state:(C=history.state)==null?void 0:C.usr}),h.scroll&&window.scrollTo(0,0)},[T]),autoResetQueueOnUpdate:!1}}function y(m=[]){const[T]=f(typeof location>"u"?new URLSearchParams:new URLSearchParams(location.search)),[v,h]=j.useState(()=>typeof location>"u"?Wf(T,m,!0):Wf(new URLSearchParams(location.search),m,!1));return j.useEffect(()=>{function A(){j.startTransition(()=>{h(tm(new URLSearchParams(location.search),m,!1))})}function p(C){j.startTransition(()=>{h(tm(C,m,!0))})}return c.on("update",p),window.addEventListener("popstate",A),()=>{c.off("update",p),window.removeEventListener("popstate",A)}},[m.join("&")]),v}return F0(c,i),{NuqsAdapter:C0(s),useOptimisticSearchParams:y}}var Hf={exports:{}},Ot={};/** * @license React * react-dom.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var lm;function W0(){if(lm)return Ot;lm=1;var i=Ku();function r(v){var h="https://react.dev/errors/"+v;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch{}}return i(),Hf.exports=W0(),Hf.exports}var Xm=Gm();const k0=Lm(Xm),P0=jm({__proto__:null,default:k0},[Xm]);/** * @remix-run/router v1.23.3 * * 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 */function nt(){return nt=Object.assign?Object.assign.bind():function(i){for(var r=1;r"u")throw new Error(r)}function Ta(i,r){if(!i)try{throw new Error(r)}catch{}}function eg(){return Math.random().toString(36).substr(2,8)}function um(i,r){return{usr:i.state,key:i.key,idx:r}}function Xu(i,r,f,c){return f===void 0&&(f=null),nt({pathname:typeof i=="string"?i:i.pathname,search:"",hash:""},typeof r=="string"?za(r):r,{state:f,key:r&&r.key||c||eg()})}function ka(i){let{pathname:r="/",search:f="",hash:c=""}=i;return f&&f!=="?"&&(r+=f.charAt(0)==="?"?f:"?"+f),c&&c!=="#"&&(r+=c.charAt(0)==="#"?c:"#"+c),r}function za(i){let r={};if(i){let f=i.indexOf("#");f>=0&&(r.hash=i.substr(f),i=i.substr(0,f));let c=i.indexOf("?");c>=0&&(r.search=i.substr(c),i=i.substr(0,c)),i&&(r.pathname=i)}return r}function tg(i,r,f,c){c===void 0&&(c={});let{window:s=document.defaultView,v5Compat:y=!1}=c,m=s.history,T=vt.Pop,v=null,h=A();h==null&&(h=0,m.replaceState(nt({},m.state,{idx:h}),""));function A(){return(m.state||{idx:null}).idx}function p(){T=vt.Pop;let J=A(),oe=J==null?null:J-h;h=J,v&&v({action:T,location:Q.location,delta:oe})}function C(J,oe){T=vt.Push;let ue=Xu(Q.location,J,oe);h=A()+1;let te=um(ue,h),ge=Q.createHref(ue);try{m.pushState(te,"",ge)}catch(G){if(G instanceof DOMException&&G.name==="DataCloneError")throw G;s.location.assign(ge)}y&&v&&v({action:T,location:Q.location,delta:1})}function L(J,oe){T=vt.Replace;let ue=Xu(Q.location,J,oe);h=A();let te=um(ue,h),ge=Q.createHref(ue);m.replaceState(te,"",ge),y&&v&&v({action:T,location:Q.location,delta:0})}function X(J){let oe=s.location.origin!=="null"?s.location.origin:s.location.href,ue=typeof J=="string"?J:ka(J);return ue=ue.replace(/ $/,"%20"),ze(oe,"No window.location.(origin|href) available to create URL for href: "+ue),new URL(ue,oe)}let Q={get action(){return T},get location(){return i(s,m)},listen(J){if(v)throw new Error("A history only accepts one active listener");return s.addEventListener(nm,p),v=J,()=>{s.removeEventListener(nm,p),v=null}},createHref(J){return r(s,J)},createURL:X,encodeLocation(J){let oe=X(J);return{pathname:oe.pathname,search:oe.search,hash:oe.hash}},push:C,replace:L,go(J){return m.go(J)}};return Q}var Xe;(function(i){i.data="data",i.deferred="deferred",i.redirect="redirect",i.error="error"})(Xe||(Xe={}));const lg=new Set(["lazy","caseSensitive","path","id","index","children"]);function ag(i){return i.index===!0}function fr(i,r,f,c){return f===void 0&&(f=[]),c===void 0&&(c={}),i.map((s,y)=>{let m=[...f,String(y)],T=typeof s.id=="string"?s.id:m.join("-");if(ze(s.index!==!0||!s.children,"Cannot specify children on an index route"),ze(!c[T],'Found a route id collision on id "'+T+`". Route id's must be globally unique within Data Router usages`),ag(s)){let v=nt({},s,r(s),{id:T});return c[T]=v,v}else{let v=nt({},s,r(s),{id:T,children:void 0});return c[T]=v,s.children&&(v.children=fr(s.children,r,m,c)),v}})}function Fa(i,r,f){return f===void 0&&(f="/"),cr(i,r,f,!1)}function cr(i,r,f,c){let s=typeof r=="string"?za(r):r,y=Yn(s.pathname||"/",f);if(y==null)return null;let m=Vm(i);ug(m);let T=null,v=yg(y);for(let h=0;T==null&&h{let v={relativePath:T===void 0?y.path||"":T,caseSensitive:y.caseSensitive===!0,childrenIndex:m,route:y};v.relativePath.startsWith("/")&&(ze(v.relativePath.startsWith(c),'Absolute route path "'+v.relativePath+'" nested under path '+('"'+c+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),v.relativePath=v.relativePath.slice(c.length));let h=Kl([c,v.relativePath]),A=f.concat(v);y.children&&y.children.length>0&&(ze(y.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+h+'".')),Vm(y.children,r,A,h)),!(y.path==null&&!y.index)&&r.push({path:h,score:dg(h,y.index),routesMeta:A})};return i.forEach((y,m)=>{var T;if(y.path===""||!((T=y.path)!=null&&T.includes("?")))s(y,m);else for(let v of Zm(y.path))s(y,m,v)}),r}function Zm(i){let r=i.split("/");if(r.length===0)return[];let[f,...c]=r,s=f.endsWith("?"),y=f.replace(/\?$/,"");if(c.length===0)return s?[y,""]:[y];let m=Zm(c.join("/")),T=[];return T.push(...m.map(v=>v===""?y:[y,v].join("/"))),s&&T.push(...m),T.map(v=>i.startsWith("/")&&v===""?"/":v)}function ug(i){i.sort((r,f)=>r.score!==f.score?f.score-r.score:hg(r.routesMeta.map(c=>c.childrenIndex),f.routesMeta.map(c=>c.childrenIndex)))}const ig=/^:[\w-]+$/,rg=3,cg=2,fg=1,og=10,sg=-2,im=i=>i==="*";function dg(i,r){let f=i.split("/"),c=f.length;return f.some(im)&&(c+=sg),r&&(c+=cg),f.filter(s=>!im(s)).reduce((s,y)=>s+(ig.test(y)?rg:y===""?fg:og),c)}function hg(i,r){return i.length===r.length&&i.slice(0,-1).every((c,s)=>c===r[s])?i[i.length-1]-r[r.length-1]:0}function mg(i,r,f){f===void 0&&(f=!1);let{routesMeta:c}=i,s={},y="/",m=[];for(let T=0;Tm==null?"":typeof m=="string"?m:String(m),y=f.split(/\/+/).map((m,T,v)=>{if(T===v.length-1&&m==="*")return s(r["*"]);const A=m.match(/^:([\w-]+)(\??)$/);if(A){const[,p,C]=A;let L=r[p];return ze(C==="?"||L!=null,'Missing ":'+p+'" param'),s(L)}return m.replace(/\?$/g,"")}).filter(m=>!!m);return c+y.join("/")}function rm(i,r){typeof i=="string"&&(i={path:i,caseSensitive:!1,end:!0});let[f,c]=vg(i.path,i.caseSensitive,i.end),s=r.match(f);if(!s)return null;let y=s[0],m=y.replace(/(.)\/+$/,"$1"),T=s.slice(1);return{params:c.reduce((h,A,p)=>{let{paramName:C,isOptional:L}=A;if(C==="*"){let Q=T[p]||"";m=y.slice(0,y.length-Q.length).replace(/(.)\/+$/,"$1")}const X=T[p];return L&&!X?h[C]=void 0:h[C]=(X||"").replace(/%2F/g,"/"),h},{}),pathname:y,pathnameBase:m,pattern:i}}function vg(i,r,f){r===void 0&&(r=!1),f===void 0&&(f=!0),Ta(i==="*"||!i.endsWith("*")||i.endsWith("/*"),'Route path "'+i+'" will be treated as if it were '+('"'+i.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+i.replace(/\*$/,"/*")+'".'));let c=[],s="^"+i.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(m,T,v)=>(c.push({paramName:T,isOptional:v!=null}),v?"/?([^\\/]+)?":"/([^\\/]+)"));return i.endsWith("*")?(c.push({paramName:"*"}),s+=i==="*"||i==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):f?s+="\\/*$":i!==""&&i!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,r?void 0:"i"),c]}function yg(i){try{return i.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return Ta(!1,'The URL path "'+i+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+r+").")),i}}function Yn(i,r){if(r==="/")return i;if(!i.toLowerCase().startsWith(r.toLowerCase()))return null;let f=r.endsWith("/")?r.length-1:r.length,c=i.charAt(f);return c&&c!=="/"?null:i.slice(f)||"/"}const gg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,pg=i=>gg.test(i);function Sg(i,r){r===void 0&&(r="/");let{pathname:f,search:c="",hash:s=""}=typeof i=="string"?za(i):i,y;if(f)if(pg(f))y=f;else{if(f.includes("//")){let m=f;f=no(f),Ta(!1,"Pathnames cannot have embedded double slashes - normalizing "+(m+" -> "+f))}f.startsWith("/")?y=cm(f.substring(1),"/"):y=cm(f,r)}else y=r;return{pathname:y,search:Eg(c),hash:Tg(s)}}function cm(i,r){let f=r.replace(/\/+$/,"").split("/");return i.split("/").forEach(s=>{s===".."?f.length>1&&f.pop():s!=="."&&f.push(s)}),f.length>1?f.join("/"):"/"}function jf(i,r,f,c){return"Cannot include a '"+i+"' character in a manually specified "+("`to."+r+"` field ["+JSON.stringify(c)+"]. Please separate it out to the ")+("`to."+f+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Km(i){return i.filter((r,f)=>f===0||r.route.path&&r.route.path.length>0)}function dr(i,r){let f=Km(i);return r?f.map((c,s)=>s===f.length-1?c.pathname:c.pathnameBase):f.map(c=>c.pathnameBase)}function hr(i,r,f,c){c===void 0&&(c=!1);let s;typeof i=="string"?s=za(i):(s=nt({},i),ze(!s.pathname||!s.pathname.includes("?"),jf("?","pathname","search",s)),ze(!s.pathname||!s.pathname.includes("#"),jf("#","pathname","hash",s)),ze(!s.search||!s.search.includes("#"),jf("#","search","hash",s)));let y=i===""||s.pathname==="",m=y?"/":s.pathname,T;if(m==null)T=f;else{let p=r.length-1;if(!c&&m.startsWith("..")){let C=m.split("/");for(;C[0]==="..";)C.shift(),p-=1;s.pathname=C.join("/")}T=p>=0?r[p]:"/"}let v=Sg(s,T),h=m&&m!=="/"&&m.endsWith("/"),A=(y||m===".")&&f.endsWith("/");return!v.pathname.endsWith("/")&&(h||A)&&(v.pathname+="/"),v}const no=i=>i.replace(/\/\/+/g,"/"),Kl=i=>no(i.join("/")),bg=i=>i.replace(/\/+$/,"").replace(/^\/*/,"/"),Eg=i=>!i||i==="?"?"":i.startsWith("?")?i:"?"+i,Tg=i=>!i||i==="#"?"":i.startsWith("#")?i:"#"+i;class or{constructor(r,f,c,s){s===void 0&&(s=!1),this.status=r,this.statusText=f||"",this.internal=s,c instanceof Error?(this.data=c.toString(),this.error=c):this.data=c}}function Vu(i){return i!=null&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.internal=="boolean"&&"data"in i}const Jm=["post","put","patch","delete"],zg=new Set(Jm),Ag=["get",...Jm],Mg=new Set(Ag),Rg=new Set([301,302,303,307,308]),_g=new Set([307,308]),Lf={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Og={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Hu={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},uo=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Dg=i=>({hasErrorBoundary:!!i.hasErrorBoundary}),Fm="remix-router-transitions";function Ug(i){const r=i.window?i.window:typeof window<"u"?window:void 0,f=typeof r<"u"&&typeof r.document<"u"&&typeof r.document.createElement<"u",c=!f;ze(i.routes.length>0,"You must provide a non-empty routes array to createRouter");let s;if(i.mapRouteProperties)s=i.mapRouteProperties;else if(i.detectErrorBoundary){let S=i.detectErrorBoundary;s=M=>({hasErrorBoundary:S(M)})}else s=Dg;let y={},m=fr(i.routes,s,void 0,y),T,v=i.basename||"/",h=i.dataStrategy||xg,A=i.patchRoutesOnNavigation,p=nt({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},i.future),C=null,L=new Set,X=null,Q=null,J=null,oe=i.hydrationData!=null,ue=Fa(m,i.history.location,v),te=!1,ge=null;if(ue==null&&!A){let S=Yt(404,{pathname:i.history.location.pathname}),{matches:M,route:U}=Sm(m);ue=M,ge={[U.id]:S}}ue&&!i.hydrationData&&Da(ue,m,i.history.location.pathname).active&&(ue=null);let G;if(ue)if(ue.some(S=>S.route.lazy))G=!1;else if(!ue.some(S=>S.route.loader))G=!0;else if(p.v7_partialHydration){let S=i.hydrationData?i.hydrationData.loaderData:null,M=i.hydrationData?i.hydrationData.errors:null;if(M){let U=ue.findIndex(w=>M[w.route.id]!==void 0);G=ue.slice(0,U+1).every(w=>!If(w.route,S,M))}else G=ue.every(U=>!If(U.route,S,M))}else G=i.hydrationData!=null;else if(G=!1,ue=[],p.v7_partialHydration){let S=Da(null,m,i.history.location.pathname);S.active&&S.matches&&(te=!0,ue=S.matches)}let Ee,R={historyAction:i.history.action,location:i.history.location,matches:ue,initialized:G,navigation:Lf,restoreScrollPosition:i.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:i.hydrationData&&i.hydrationData.loaderData||{},actionData:i.hydrationData&&i.hydrationData.actionData||null,errors:i.hydrationData&&i.hydrationData.errors||ge,fetchers:new Map,blockers:new Map},Z=vt.Pop,ae=!1,re,Te=!1,ye=new Map,Fe=null,xe=!1,Ve=!1,q=[],K=new Set,ee=new Map,_e=0,Oe=-1,b=new Map,H=new Set,V=new Map,W=new Map,P=new Set,de=new Map,Se=new Map,lt;function Le(){if(C=i.history.listen(S=>{let{action:M,location:U,delta:w}=S;if(lt){lt(),lt=void 0;return}Ta(Se.size===0||w!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let F=Ra({currentLocation:R.location,nextLocation:U,historyAction:M});if(F&&w!=null){let ce=new Promise(he=>{lt=he});i.history.go(w*-1),ln(F,{state:"blocked",location:U,proceed(){ln(F,{state:"proceeding",proceed:void 0,reset:void 0,location:U}),ce.then(()=>i.history.go(w))},reset(){let he=new Map(R.blockers);he.set(F,Hu),yt({blockers:he})}});return}return fl(M,U)}),f){Fg(r,ye);let S=()=>$g(r,ye);r.addEventListener("pagehide",S),Fe=()=>r.removeEventListener("pagehide",S)}return R.initialized||fl(vt.Pop,R.location,{initialHydration:!0}),Ee}function cl(){C&&C(),Fe&&Fe(),L.clear(),re&&re.abort(),R.fetchers.forEach((S,M)=>tn(M)),R.blockers.forEach((S,M)=>Fu(M))}function Pa(S){return L.add(S),()=>L.delete(S)}function yt(S,M){M===void 0&&(M={}),R=nt({},R,S);let U=[],w=[];p.v7_fetcherPersist&&R.fetchers.forEach((F,ce)=>{F.state==="idle"&&(P.has(ce)?w.push(ce):U.push(ce))}),P.forEach(F=>{!R.fetchers.has(F)&&!ee.has(F)&&w.push(F)}),[...L].forEach(F=>F(R,{deletedFetchers:w,viewTransitionOpts:M.viewTransitionOpts,flushSync:M.flushSync===!0})),p.v7_fetcherPersist?(U.forEach(F=>R.fetchers.delete(F)),w.forEach(F=>tn(F))):w.forEach(F=>P.delete(F))}function Rl(S,M,U){var w,F;let{flushSync:ce}=U===void 0?{}:U,he=R.actionData!=null&&R.navigation.formMethod!=null&&gl(R.navigation.formMethod)&&R.navigation.state==="loading"&&((w=S.state)==null?void 0:w._isRedirect)!==!0,I;M.actionData?Object.keys(M.actionData).length>0?I=M.actionData:I=null:he?I=R.actionData:I=null;let k=M.loaderData?gm(R.loaderData,M.loaderData,M.matches||[],M.errors):R.loaderData,$=R.blockers;$.size>0&&($=new Map($),$.forEach((De,gt)=>$.set(gt,Hu)));let ne=ae===!0||R.navigation.formMethod!=null&&gl(R.navigation.formMethod)&&((F=S.state)==null?void 0:F._isRedirect)!==!0;T&&(m=T,T=void 0),xe||Z===vt.Pop||(Z===vt.Push?i.history.push(S,S.state):Z===vt.Replace&&i.history.replace(S,S.state));let me;if(Z===vt.Pop){let De=ye.get(R.location.pathname);De&&De.has(S.pathname)?me={currentLocation:R.location,nextLocation:S}:ye.has(S.pathname)&&(me={currentLocation:S,nextLocation:R.location})}else if(Te){let De=ye.get(R.location.pathname);De?De.add(S.pathname):(De=new Set([S.pathname]),ye.set(R.location.pathname,De)),me={currentLocation:R.location,nextLocation:S}}yt(nt({},M,{actionData:I,loaderData:k,historyAction:Z,location:S,initialized:!0,navigation:Lf,revalidation:"idle",restoreScrollPosition:$u(S,M.matches||R.matches),preventScrollReset:ne,blockers:$}),{viewTransitionOpts:me,flushSync:ce===!0}),Z=vt.Pop,ae=!1,Te=!1,xe=!1,Ve=!1,q=[]}async function pl(S,M){if(typeof S=="number"){i.history.go(S);return}let U=Pf(R.location,R.matches,v,p.v7_prependBasename,S,p.v7_relativeSplatPath,M==null?void 0:M.fromRouteId,M==null?void 0:M.relative),{path:w,submission:F,error:ce}=fm(p.v7_normalizeFormMethod,!1,U,M),he=R.location,I=Xu(R.location,w,M&&M.state);I=nt({},I,i.history.encodeLocation(I));let k=M&&M.replace!=null?M.replace:void 0,$=vt.Push;k===!0?$=vt.Replace:k===!1||F!=null&&gl(F.formMethod)&&F.formAction===R.location.pathname+R.location.search&&($=vt.Replace);let ne=M&&"preventScrollReset"in M?M.preventScrollReset===!0:void 0,me=(M&&M.flushSync)===!0,De=Ra({currentLocation:he,nextLocation:I,historyAction:$});if(De){ln(De,{state:"blocked",location:I,proceed(){ln(De,{state:"proceeding",proceed:void 0,reset:void 0,location:I}),pl(S,M)},reset(){let gt=new Map(R.blockers);gt.set(De,Hu),yt({blockers:gt})}});return}return await fl($,I,{submission:F,pendingError:ce,preventScrollReset:ne,replace:M&&M.replace,enableViewTransition:M&&M.viewTransition,flushSync:me})}function Gn(){if(en(),yt({revalidation:"loading"}),R.navigation.state!=="submitting"){if(R.navigation.state==="idle"){fl(R.historyAction,R.location,{startUninterruptedRevalidation:!0});return}fl(Z||R.historyAction,R.navigation.location,{overrideNavigation:R.navigation,enableViewTransition:Te===!0})}}async function fl(S,M,U){re&&re.abort(),re=null,Z=S,xe=(U&&U.startUninterruptedRevalidation)===!0,Oa(R.location,R.matches),ae=(U&&U.preventScrollReset)===!0,Te=(U&&U.enableViewTransition)===!0;let w=T||m,F=U&&U.overrideNavigation,ce=U!=null&&U.initialHydration&&R.matches&&R.matches.length>0&&!te?R.matches:Fa(w,M,v),he=(U&&U.flushSync)===!0;if(ce&&R.initialized&&!Ve&&wg(R.location,M)&&!(U&&U.submission&&gl(U.submission.formMethod))){Rl(M,{matches:ce},{flushSync:he});return}let I=Da(ce,w,M.pathname);if(I.active&&I.matches&&(ce=I.matches),!ce){let{error:we,notFoundMatches:Ae,route:We}=Jl(M.pathname);Rl(M,{matches:Ae,loaderData:{},errors:{[We.id]:we}},{flushSync:he});return}re=new AbortController;let k=Ln(i.history,M,re.signal,U&&U.submission),$;if(U&&U.pendingError)$=[$a(ce).route.id,{type:Xe.error,error:U.pendingError}];else if(U&&U.submission&&gl(U.submission.formMethod)){let we=await gr(k,M,U.submission,ce,I.active,{replace:U.replace,flushSync:he});if(we.shortCircuited)return;if(we.pendingActionResult){let[Ae,We]=we.pendingActionResult;if($t(We)&&Vu(We.error)&&We.error.status===404){re=null,Rl(M,{matches:we.matches,loaderData:{},errors:{[Ae]:We.error}});return}}ce=we.matches||ce,$=we.pendingActionResult,F=Bf(M,U.submission),he=!1,I.active=!1,k=Ln(i.history,k.url,k.signal)}let{shortCircuited:ne,matches:me,loaderData:De,errors:gt}=await Ju(k,M,ce,I.active,F,U&&U.submission,U&&U.fetcherSubmission,U&&U.replace,U&&U.initialHydration===!0,he,$);ne||(re=null,Rl(M,nt({matches:me||ce},pm($),{loaderData:De,errors:gt})))}async function gr(S,M,U,w,F,ce){ce===void 0&&(ce={}),en();let he=Kg(M,U);if(yt({navigation:he},{flushSync:ce.flushSync===!0}),F){let $=await $l(w,M.pathname,S.signal);if($.type==="aborted")return{shortCircuited:!0};if($.type==="error"){let ne=$a($.partialMatches).route.id;return{matches:$.partialMatches,pendingActionResult:[ne,{type:Xe.error,error:$.error}]}}else if($.matches)w=$.matches;else{let{notFoundMatches:ne,error:me,route:De}=Jl(M.pathname);return{matches:ne,pendingActionResult:[De.id,{type:Xe.error,error:me}]}}}let I,k=Yu(w,M);if(!k.route.action&&!k.route.lazy)I={type:Xe.error,error:Yt(405,{method:S.method,pathname:M.pathname,routeId:k.route.id})};else if(I=(await Ma("action",R,S,[k],w,null))[k.route.id],S.signal.aborted)return{shortCircuited:!0};if(Wa(I)){let $;return ce&&ce.replace!=null?$=ce.replace:$=mm(I.response.headers.get("Location"),new URL(S.url),v,i.history)===R.location.pathname+R.location.search,await ct(S,I,!0,{submission:U,replace:$}),{shortCircuited:!0}}if(Ea(I))throw Yt(400,{type:"defer-action"});if($t(I)){let $=$a(w,k.route.id);return(ce&&ce.replace)!==!0&&(Z=vt.Push),{matches:w,pendingActionResult:[$.route.id,I]}}return{matches:w,pendingActionResult:[k.route.id,I]}}async function Ju(S,M,U,w,F,ce,he,I,k,$,ne){let me=F||Bf(M,ce),De=ce||he||Em(me),gt=!xe&&(!p.v7_partialHydration||!k);if(w){if(gt){let Pe=Ia(ne);yt(nt({navigation:me},Pe!==void 0?{actionData:Pe}:{}),{flushSync:$})}let qe=await $l(U,M.pathname,S.signal);if(qe.type==="aborted")return{shortCircuited:!0};if(qe.type==="error"){let Pe=$a(qe.partialMatches).route.id;return{matches:qe.partialMatches,loaderData:{},errors:{[Pe]:qe.error}}}else if(qe.matches)U=qe.matches;else{let{error:Pe,notFoundMatches:Ol,route:Ca}=Jl(M.pathname);return{matches:Ol,loaderData:{},errors:{[Ca.id]:Pe}}}}let we=T||m,[Ae,We]=sm(i.history,R,U,De,M,p.v7_partialHydration&&k===!0,p.v7_skipActionErrorRevalidation,Ve,q,K,P,V,H,we,v,ne);if(Fl(qe=>!(U&&U.some(Pe=>Pe.route.id===qe))||Ae&&Ae.some(Pe=>Pe.route.id===qe)),Oe=++_e,Ae.length===0&&We.length===0){let qe=sl();return Rl(M,nt({matches:U,loaderData:{},errors:ne&&$t(ne[1])?{[ne[0]]:ne[1].error}:null},pm(ne),qe?{fetchers:new Map(R.fetchers)}:{}),{flushSync:$}),{shortCircuited:!0}}if(gt){let qe={};if(!w){qe.navigation=me;let Pe=Ia(ne);Pe!==void 0&&(qe.actionData=Pe)}We.length>0&&(qe.fetchers=Xn(We)),yt(qe,{flushSync:$})}We.forEach(qe=>{Ct(qe.key),qe.controller&&ee.set(qe.key,qe.controller)});let Qt=()=>We.forEach(qe=>Ct(qe.key));re&&re.signal.addEventListener("abort",Qt);let{loaderResults:Wt,fetcherResults:Dt}=await Zn(R,U,Ae,We,S);if(S.signal.aborted)return{shortCircuited:!0};re&&re.signal.removeEventListener("abort",Qt),We.forEach(qe=>ee.delete(qe.key));let bt=ir(Wt);if(bt)return await ct(S,bt.result,!0,{replace:I}),{shortCircuited:!0};if(bt=ir(Dt),bt)return H.add(bt.key),await ct(S,bt.result,!0,{replace:I}),{shortCircuited:!0};let{loaderData:ut,errors:Wl}=ym(R,U,Wt,ne,We,Dt,de);de.forEach((qe,Pe)=>{qe.subscribe(Ol=>{(Ol||qe.done)&&de.delete(Pe)})}),p.v7_partialHydration&&k&&R.errors&&(Wl=nt({},R.errors,Wl));let Sl=sl(),kt=Rt(Oe),dl=Sl||kt||We.length>0;return nt({matches:U,loaderData:ut,errors:Wl},dl?{fetchers:new Map(R.fetchers)}:{})}function Ia(S){if(S&&!$t(S[1]))return{[S[0]]:S[1].data};if(R.actionData)return Object.keys(R.actionData).length===0?null:R.actionData}function Xn(S){return S.forEach(M=>{let U=R.fetchers.get(M.key),w=ju(void 0,U?U.data:void 0);R.fetchers.set(M.key,w)}),new Map(R.fetchers)}function Vn(S,M,U,w){if(c)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");Ct(S);let F=(w&&w.flushSync)===!0,ce=T||m,he=Pf(R.location,R.matches,v,p.v7_prependBasename,U,p.v7_relativeSplatPath,M,w==null?void 0:w.relative),I=Fa(ce,he,v),k=Da(I,ce,he);if(k.active&&k.matches&&(I=k.matches),!I){ol(S,M,Yt(404,{pathname:he}),{flushSync:F});return}let{path:$,submission:ne,error:me}=fm(p.v7_normalizeFormMethod,!0,he,w);if(me){ol(S,M,me,{flushSync:F});return}let De=Yu(I,$),gt=(w&&w.preventScrollReset)===!0;if(ne&&gl(ne.formMethod)){pr(S,M,$,De,I,k.active,F,gt,ne);return}V.set(S,{routeId:M,path:$}),Sr(S,M,$,De,I,k.active,F,gt,ne)}async function pr(S,M,U,w,F,ce,he,I,k){en(),V.delete(S);function $(Ie){if(!Ie.route.action&&!Ie.route.lazy){let hl=Yt(405,{method:k.formMethod,pathname:U,routeId:M});return ol(S,M,hl,{flushSync:he}),!0}return!1}if(!ce&&$(w))return;let ne=R.fetchers.get(S);wt(S,Jg(k,ne),{flushSync:he});let me=new AbortController,De=Ln(i.history,U,me.signal,k);if(ce){let Ie=await $l(F,new URL(De.url).pathname,De.signal,S);if(Ie.type==="aborted")return;if(Ie.type==="error"){ol(S,M,Ie.error,{flushSync:he});return}else if(Ie.matches){if(F=Ie.matches,w=Yu(F,U),$(w))return}else{ol(S,M,Yt(404,{pathname:U}),{flushSync:he});return}}ee.set(S,me);let gt=_e,Ae=(await Ma("action",R,De,[w],F,S))[w.route.id];if(De.signal.aborted){ee.get(S)===me&&ee.delete(S);return}if(p.v7_fetcherPersist&&P.has(S)){if(Wa(Ae)||$t(Ae)){wt(S,ba(void 0));return}}else{if(Wa(Ae))if(ee.delete(S),Oe>gt){wt(S,ba(void 0));return}else return H.add(S),wt(S,ju(k)),ct(De,Ae,!1,{fetcherSubmission:k,preventScrollReset:I});if($t(Ae)){ol(S,M,Ae.error);return}}if(Ea(Ae))throw Yt(400,{type:"defer-action"});let We=R.navigation.location||R.location,Qt=Ln(i.history,We,me.signal),Wt=T||m,Dt=R.navigation.state!=="idle"?Fa(Wt,R.navigation.location,v):R.matches;ze(Dt,"Didn't find any matches after fetcher action");let bt=++_e;b.set(S,bt);let ut=ju(k,Ae.data);R.fetchers.set(S,ut);let[Wl,Sl]=sm(i.history,R,Dt,k,We,!1,p.v7_skipActionErrorRevalidation,Ve,q,K,P,V,H,Wt,v,[w.route.id,Ae]);Sl.filter(Ie=>Ie.key!==S).forEach(Ie=>{let hl=Ie.key,Pt=R.fetchers.get(hl),Nt=ju(void 0,Pt?Pt.data:void 0);R.fetchers.set(hl,Nt),Ct(hl),Ie.controller&&ee.set(hl,Ie.controller)}),yt({fetchers:new Map(R.fetchers)});let kt=()=>Sl.forEach(Ie=>Ct(Ie.key));me.signal.addEventListener("abort",kt);let{loaderResults:dl,fetcherResults:qe}=await Zn(R,Dt,Wl,Sl,Qt);if(me.signal.aborted)return;me.signal.removeEventListener("abort",kt),b.delete(S),ee.delete(S),Sl.forEach(Ie=>ee.delete(Ie.key));let Pe=ir(dl);if(Pe)return ct(Qt,Pe.result,!1,{preventScrollReset:I});if(Pe=ir(qe),Pe)return H.add(Pe.key),ct(Qt,Pe.result,!1,{preventScrollReset:I});let{loaderData:Ol,errors:Ca}=ym(R,Dt,dl,void 0,Sl,qe,de);if(R.fetchers.has(S)){let Ie=ba(Ae.data);R.fetchers.set(S,Ie)}Rt(bt),R.navigation.state==="loading"&&bt>Oe?(ze(Z,"Expected pending action"),re&&re.abort(),Rl(R.navigation.location,{matches:Dt,loaderData:Ol,errors:Ca,fetchers:new Map(R.fetchers)})):(yt({errors:Ca,loaderData:gm(R.loaderData,Ol,Dt,Ca),fetchers:new Map(R.fetchers)}),Ve=!1)}async function Sr(S,M,U,w,F,ce,he,I,k){let $=R.fetchers.get(S);wt(S,ju(k,$?$.data:void 0),{flushSync:he});let ne=new AbortController,me=Ln(i.history,U,ne.signal);if(ce){let Ae=await $l(F,new URL(me.url).pathname,me.signal,S);if(Ae.type==="aborted")return;if(Ae.type==="error"){ol(S,M,Ae.error,{flushSync:he});return}else if(Ae.matches)F=Ae.matches,w=Yu(F,U);else{ol(S,M,Yt(404,{pathname:U}),{flushSync:he});return}}ee.set(S,ne);let De=_e,we=(await Ma("loader",R,me,[w],F,S))[w.route.id];if(Ea(we)&&(we=await io(we,me.signal,!0)||we),ee.get(S)===ne&&ee.delete(S),!me.signal.aborted){if(P.has(S)){wt(S,ba(void 0));return}if(Wa(we))if(Oe>De){wt(S,ba(void 0));return}else{H.add(S),await ct(me,we,!1,{preventScrollReset:I});return}if($t(we)){ol(S,M,we.error);return}ze(!Ea(we),"Unhandled fetcher deferred data"),wt(S,ba(we.data))}}async function ct(S,M,U,w){let{submission:F,fetcherSubmission:ce,preventScrollReset:he,replace:I}=w===void 0?{}:w;M.response.headers.has("X-Remix-Revalidate")&&(Ve=!0);let k=M.response.headers.get("Location");ze(k,"Expected a Location header on the redirect Response"),k=mm(k,new URL(S.url),v,i.history);let $=Xu(R.location,k,{_isRedirect:!0});if(f){let Ae=!1;if(M.response.headers.has("X-Remix-Reload-Document"))Ae=!0;else if(uo.test(k)){const We=i.history.createURL(k);Ae=We.origin!==r.location.origin||Yn(We.pathname,v)==null}if(Ae){I?r.location.replace(k):r.location.assign(k);return}}re=null;let ne=I===!0||M.response.headers.has("X-Remix-Replace")?vt.Replace:vt.Push,{formMethod:me,formAction:De,formEncType:gt}=R.navigation;!F&&!ce&&me&&De&>&&(F=Em(R.navigation));let we=F||ce;if(_g.has(M.response.status)&&we&&gl(we.formMethod))await fl(ne,$,{submission:nt({},we,{formAction:k}),preventScrollReset:he||ae,enableViewTransition:U?Te:void 0});else{let Ae=Bf($,F);await fl(ne,$,{overrideNavigation:Ae,fetcherSubmission:ce,preventScrollReset:he||ae,enableViewTransition:U?Te:void 0})}}async function Ma(S,M,U,w,F,ce){let he,I={};try{he=await Hg(h,S,M,U,w,F,ce,y,s)}catch(k){return w.forEach($=>{I[$.route.id]={type:Xe.error,error:k}}),I}for(let[k,$]of Object.entries(he))if(Qg($)){let ne=$.result;I[k]={type:Xe.redirect,response:Bg(ne,U,k,F,v,p.v7_relativeSplatPath)}}else I[k]=await Lg($);return I}async function Zn(S,M,U,w,F){let ce=S.matches,he=Ma("loader",S,F,U,M,null),I=Promise.all(w.map(async ne=>{if(ne.matches&&ne.match&&ne.controller){let De=(await Ma("loader",S,Ln(i.history,ne.path,ne.controller.signal),[ne.match],ne.matches,ne.key))[ne.match.route.id];return{[ne.key]:De}}else return Promise.resolve({[ne.key]:{type:Xe.error,error:Yt(404,{pathname:ne.path})}})})),k=await he,$=(await I).reduce((ne,me)=>Object.assign(ne,me),{});return await Promise.all([Vg(M,k,F.signal,ce,S.loaderData),Zg(M,$,w)]),{loaderResults:k,fetcherResults:$}}function en(){Ve=!0,q.push(...Fl()),V.forEach((S,M)=>{ee.has(M)&&K.add(M),Ct(M)})}function wt(S,M,U){U===void 0&&(U={}),R.fetchers.set(S,M),yt({fetchers:new Map(R.fetchers)},{flushSync:(U&&U.flushSync)===!0})}function ol(S,M,U,w){w===void 0&&(w={});let F=$a(R.matches,M);tn(S),yt({errors:{[F.route.id]:U},fetchers:new Map(R.fetchers)},{flushSync:(w&&w.flushSync)===!0})}function Kn(S){return W.set(S,(W.get(S)||0)+1),P.has(S)&&P.delete(S),R.fetchers.get(S)||Og}function tn(S){let M=R.fetchers.get(S);ee.has(S)&&!(M&&M.state==="loading"&&b.has(S))&&Ct(S),V.delete(S),b.delete(S),H.delete(S),p.v7_fetcherPersist&&P.delete(S),K.delete(S),R.fetchers.delete(S)}function br(S){let M=(W.get(S)||0)-1;M<=0?(W.delete(S),P.add(S),p.v7_fetcherPersist||tn(S)):W.set(S,M),yt({fetchers:new Map(R.fetchers)})}function Ct(S){let M=ee.get(S);M&&(M.abort(),ee.delete(S))}function Mt(S){for(let M of S){let U=Kn(M),w=ba(U.data);R.fetchers.set(M,w)}}function sl(){let S=[],M=!1;for(let U of H){let w=R.fetchers.get(U);ze(w,"Expected fetcher: "+U),w.state==="loading"&&(H.delete(U),S.push(U),M=!0)}return Mt(S),M}function Rt(S){let M=[];for(let[U,w]of b)if(w0}function Er(S,M){let U=R.blockers.get(S)||Hu;return Se.get(S)!==M&&Se.set(S,M),U}function Fu(S){R.blockers.delete(S),Se.delete(S)}function ln(S,M){let U=R.blockers.get(S)||Hu;ze(U.state==="unblocked"&&M.state==="blocked"||U.state==="blocked"&&M.state==="blocked"||U.state==="blocked"&&M.state==="proceeding"||U.state==="blocked"&&M.state==="unblocked"||U.state==="proceeding"&&M.state==="unblocked","Invalid blocker state transition: "+U.state+" -> "+M.state);let w=new Map(R.blockers);w.set(S,M),yt({blockers:w})}function Ra(S){let{currentLocation:M,nextLocation:U,historyAction:w}=S;if(Se.size===0)return;Se.size>1&&Ta(!1,"A router only supports one blocker at a time");let F=Array.from(Se.entries()),[ce,he]=F[F.length-1],I=R.blockers.get(ce);if(!(I&&I.state==="proceeding")&&he({currentLocation:M,nextLocation:U,historyAction:w}))return ce}function Jl(S){let M=Yt(404,{pathname:S}),U=T||m,{matches:w,route:F}=Sm(U);return Fl(),{notFoundMatches:w,route:F,error:M}}function Fl(S){let M=[];return de.forEach((U,w)=>{(!S||S(w))&&(U.cancel(),M.push(w),de.delete(w))}),M}function _l(S,M,U){if(X=S,J=M,Q=U||null,!oe&&R.navigation===Lf){oe=!0;let w=$u(R.location,R.matches);w!=null&&yt({restoreScrollPosition:w})}return()=>{X=null,J=null,Q=null}}function _a(S,M){return Q&&Q(S,M.map(w=>ng(w,R.loaderData)))||S.key}function Oa(S,M){if(X&&J){let U=_a(S,M);X[U]=J()}}function $u(S,M){if(X){let U=_a(S,M),w=X[U];if(typeof w=="number")return w}return null}function Da(S,M,U){if(A)if(S){if(Object.keys(S[0].params).length>0)return{active:!0,matches:cr(M,U,v,!0)}}else return{active:!0,matches:cr(M,U,v,!0)||[]};return{active:!1,matches:null}}async function $l(S,M,U,w){if(!A)return{type:"success",matches:S};let F=S;for(;;){let ce=T==null,he=T||m,I=y;try{await A({signal:U,path:M,matches:F,fetcherKey:w,patch:(ne,me)=>{U.aborted||hm(ne,me,he,I,s)}})}catch(ne){return{type:"error",error:ne,partialMatches:F}}finally{ce&&!U.aborted&&(m=[...m])}if(U.aborted)return{type:"aborted"};let k=Fa(he,M,v);if(k)return{type:"success",matches:k};let $=cr(he,M,v,!0);if(!$||F.length===$.length&&F.every((ne,me)=>ne.route.id===$[me].route.id))return{type:"success",matches:null};F=$}}function Ua(S){y={},T=fr(S,s,void 0,y)}function Tr(S,M){let U=T==null;hm(S,M,T||m,y,s),U&&(m=[...m],yt({}))}return Ee={get basename(){return v},get future(){return p},get state(){return R},get routes(){return m},get window(){return r},initialize:Le,subscribe:Pa,enableScrollRestoration:_l,navigate:pl,fetch:Vn,revalidate:Gn,createHref:S=>i.history.createHref(S),encodeLocation:S=>i.history.encodeLocation(S),getFetcher:Kn,deleteFetcher:br,dispose:cl,getBlocker:Er,deleteBlocker:Fu,patchRoutes:Tr,_internalFetchControllers:ee,_internalActiveDeferreds:de,_internalSetRoutes:Ua},Ee}function Cg(i){return i!=null&&("formData"in i&&i.formData!=null||"body"in i&&i.body!==void 0)}function Pf(i,r,f,c,s,y,m,T){let v,h;if(m){v=[];for(let p of r)if(v.push(p),p.route.id===m){h=p;break}}else v=r,h=r[r.length-1];let A=hr(s||".",dr(v,y),Yn(i.pathname,f)||i.pathname,T==="path");if(s==null&&(A.search=i.search,A.hash=i.hash),(s==null||s===""||s===".")&&h){let p=ro(A.search);if(h.route.index&&!p)A.search=A.search?A.search.replace(/^\?/,"?index&"):"?index";else if(!h.route.index&&p){let C=new URLSearchParams(A.search),L=C.getAll("index");C.delete("index"),L.filter(Q=>Q).forEach(Q=>C.append("index",Q));let X=C.toString();A.search=X?"?"+X:""}}return c&&f!=="/"&&(A.pathname=A.pathname==="/"?f:Kl([f,A.pathname])),ka(A)}function fm(i,r,f,c){if(!c||!Cg(c))return{path:f};if(c.formMethod&&!Xg(c.formMethod))return{path:f,error:Yt(405,{method:c.formMethod})};let s=()=>({path:f,error:Yt(400,{type:"invalid-body"})}),y=c.formMethod||"get",m=i?y.toUpperCase():y.toLowerCase(),T=km(f);if(c.body!==void 0){if(c.formEncType==="text/plain"){if(!gl(m))return s();let C=typeof c.body=="string"?c.body:c.body instanceof FormData||c.body instanceof URLSearchParams?Array.from(c.body.entries()).reduce((L,X)=>{let[Q,J]=X;return""+L+Q+"="+J+` `},""):String(c.body);return{path:f,submission:{formMethod:m,formAction:T,formEncType:c.formEncType,formData:void 0,json:void 0,text:C}}}else if(c.formEncType==="application/json"){if(!gl(m))return s();try{let C=typeof c.body=="string"?JSON.parse(c.body):c.body;return{path:f,submission:{formMethod:m,formAction:T,formEncType:c.formEncType,formData:void 0,json:C,text:void 0}}}catch{return s()}}}ze(typeof FormData=="function","FormData is not available in this environment");let v,h;if(c.formData)v=eo(c.formData),h=c.formData;else if(c.body instanceof FormData)v=eo(c.body),h=c.body;else if(c.body instanceof URLSearchParams)v=c.body,h=vm(v);else if(c.body==null)v=new URLSearchParams,h=new FormData;else try{v=new URLSearchParams(c.body),h=vm(v)}catch{return s()}let A={formMethod:m,formAction:T,formEncType:c&&c.formEncType||"application/x-www-form-urlencoded",formData:h,json:void 0,text:void 0};if(gl(A.formMethod))return{path:f,submission:A};let p=za(f);return r&&p.search&&ro(p.search)&&v.append("index",""),p.search="?"+v,{path:ka(p),submission:A}}function om(i,r,f){f===void 0&&(f=!1);let c=i.findIndex(s=>s.route.id===r);return c>=0?i.slice(0,f?c+1:c):i}function sm(i,r,f,c,s,y,m,T,v,h,A,p,C,L,X,Q){let J=Q?$t(Q[1])?Q[1].error:Q[1].data:void 0,oe=i.createURL(r.location),ue=i.createURL(s),te=f;y&&r.errors?te=om(f,Object.keys(r.errors)[0],!0):Q&&$t(Q[1])&&(te=om(f,Q[0]));let ge=Q?Q[1].statusCode:void 0,G=m&&ge&&ge>=400,Ee=te.filter((Z,ae)=>{let{route:re}=Z;if(re.lazy)return!0;if(re.loader==null)return!1;if(y)return If(re,r.loaderData,r.errors);if(Ng(r.loaderData,r.matches[ae],Z)||v.some(Fe=>Fe===Z.route.id))return!0;let Te=r.matches[ae],ye=Z;return dm(Z,nt({currentUrl:oe,currentParams:Te.params,nextUrl:ue,nextParams:ye.params},c,{actionResult:J,actionStatus:ge,defaultShouldRevalidate:G?!1:T||oe.pathname+oe.search===ue.pathname+ue.search||oe.search!==ue.search||$m(Te,ye)}))}),R=[];return p.forEach((Z,ae)=>{if(y||!f.some(xe=>xe.route.id===Z.routeId)||A.has(ae))return;let re=Fa(L,Z.path,X);if(!re){R.push({key:ae,routeId:Z.routeId,path:Z.path,matches:null,match:null,controller:null});return}let Te=r.fetchers.get(ae),ye=Yu(re,Z.path),Fe=!1;C.has(ae)?Fe=!1:h.has(ae)?(h.delete(ae),Fe=!0):Te&&Te.state!=="idle"&&Te.data===void 0?Fe=T:Fe=dm(ye,nt({currentUrl:oe,currentParams:r.matches[r.matches.length-1].params,nextUrl:ue,nextParams:f[f.length-1].params},c,{actionResult:J,actionStatus:ge,defaultShouldRevalidate:G?!1:T})),Fe&&R.push({key:ae,routeId:Z.routeId,path:Z.path,matches:re,match:ye,controller:new AbortController})}),[Ee,R]}function If(i,r,f){if(i.lazy)return!0;if(!i.loader)return!1;let c=r!=null&&r[i.id]!==void 0,s=f!=null&&f[i.id]!==void 0;return!c&&s?!1:typeof i.loader=="function"&&i.loader.hydrate===!0?!0:!c&&!s}function Ng(i,r,f){let c=!r||f.route.id!==r.route.id,s=i[f.route.id]===void 0;return c||s}function $m(i,r){let f=i.route.path;return i.pathname!==r.pathname||f!=null&&f.endsWith("*")&&i.params["*"]!==r.params["*"]}function dm(i,r){if(i.route.shouldRevalidate){let f=i.route.shouldRevalidate(r);if(typeof f=="boolean")return f}return r.defaultShouldRevalidate}function hm(i,r,f,c,s){var y;let m;if(i){let h=c[i];ze(h,"No route found to patch children into: routeId = "+i),h.children||(h.children=[]),m=h.children}else m=f;let T=r.filter(h=>!m.some(A=>Wm(h,A))),v=fr(T,s,[i||"_","patch",String(((y=m)==null?void 0:y.length)||"0")],c);m.push(...v)}function Wm(i,r){return"id"in i&&"id"in r&&i.id===r.id?!0:i.index===r.index&&i.path===r.path&&i.caseSensitive===r.caseSensitive?(!i.children||i.children.length===0)&&(!r.children||r.children.length===0)?!0:i.children.every((f,c)=>{var s;return(s=r.children)==null?void 0:s.some(y=>Wm(f,y))}):!1}async function qg(i,r,f){if(!i.lazy)return;let c=await i.lazy();if(!i.lazy)return;let s=f[i.id];ze(s,"No route found in manifest");let y={};for(let m in c){let v=s[m]!==void 0&&m!=="hasErrorBoundary";Ta(!v,'Route "'+s.id+'" has a static property "'+m+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+m+'" will be ignored.')),!v&&!lg.has(m)&&(y[m]=c[m])}Object.assign(s,y),Object.assign(s,nt({},r(s),{lazy:void 0}))}async function xg(i){let{matches:r}=i,f=r.filter(s=>s.shouldLoad);return(await Promise.all(f.map(s=>s.resolve()))).reduce((s,y,m)=>Object.assign(s,{[f[m].route.id]:y}),{})}async function Hg(i,r,f,c,s,y,m,T,v,h){let A=y.map(L=>L.route.lazy?qg(L.route,v,T):void 0),p=y.map((L,X)=>{let Q=A[X],J=s.some(ue=>ue.route.id===L.route.id);return nt({},L,{shouldLoad:J,resolve:async ue=>(ue&&c.method==="GET"&&(L.route.lazy||L.route.loader)&&(J=!0),J?jg(r,c,L,Q,ue,h):Promise.resolve({type:Xe.data,result:void 0}))})}),C=await i({matches:p,request:c,params:y[0].params,fetcherKey:m,context:h});try{await Promise.all(A)}catch{}return C}async function jg(i,r,f,c,s,y){let m,T,v=h=>{let A,p=new Promise((X,Q)=>A=Q);T=()=>A(),r.signal.addEventListener("abort",T);let C=X=>typeof h!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+i+'" [routeId: '+f.route.id+"]"))):h({request:r,params:f.params,context:y},...X!==void 0?[X]:[]),L=(async()=>{try{return{type:"data",result:await(s?s(Q=>C(Q)):C())}}catch(X){return{type:"error",result:X}}})();return Promise.race([L,p])};try{let h=f.route[i];if(c)if(h){let A,[p]=await Promise.all([v(h).catch(C=>{A=C}),c]);if(A!==void 0)throw A;m=p}else if(await c,h=f.route[i],h)m=await v(h);else if(i==="action"){let A=new URL(r.url),p=A.pathname+A.search;throw Yt(405,{method:r.method,pathname:p,routeId:f.route.id})}else return{type:Xe.data,result:void 0};else if(h)m=await v(h);else{let A=new URL(r.url),p=A.pathname+A.search;throw Yt(404,{pathname:p})}ze(m.result!==void 0,"You defined "+(i==="action"?"an action":"a loader")+" for route "+('"'+f.route.id+"\" but didn't return anything from your `"+i+"` ")+"function. Please return a value or `null`.")}catch(h){return{type:Xe.error,result:h}}finally{T&&r.signal.removeEventListener("abort",T)}return m}async function Lg(i){let{result:r,type:f}=i;if(Pm(r)){let p;try{let C=r.headers.get("Content-Type");C&&/\bapplication\/json\b/.test(C)?r.body==null?p=null:p=await r.json():p=await r.text()}catch(C){return{type:Xe.error,error:C}}return f===Xe.error?{type:Xe.error,error:new or(r.status,r.statusText,p),statusCode:r.status,headers:r.headers}:{type:Xe.data,data:p,statusCode:r.status,headers:r.headers}}if(f===Xe.error){if(bm(r)){var c,s;if(r.data instanceof Error){var y,m;return{type:Xe.error,error:r.data,statusCode:(y=r.init)==null?void 0:y.status,headers:(m=r.init)!=null&&m.headers?new Headers(r.init.headers):void 0}}return{type:Xe.error,error:new or(((c=r.init)==null?void 0:c.status)||500,void 0,r.data),statusCode:Vu(r)?r.status:void 0,headers:(s=r.init)!=null&&s.headers?new Headers(r.init.headers):void 0}}return{type:Xe.error,error:r,statusCode:Vu(r)?r.status:void 0}}if(Gg(r)){var T,v;return{type:Xe.deferred,deferredData:r,statusCode:(T=r.init)==null?void 0:T.status,headers:((v=r.init)==null?void 0:v.headers)&&new Headers(r.init.headers)}}if(bm(r)){var h,A;return{type:Xe.data,data:r.data,statusCode:(h=r.init)==null?void 0:h.status,headers:(A=r.init)!=null&&A.headers?new Headers(r.init.headers):void 0}}return{type:Xe.data,data:r}}function Bg(i,r,f,c,s,y){let m=i.headers.get("Location");if(ze(m,"Redirects returned/thrown from loaders/actions must have a Location header"),!uo.test(m)){let T=c.slice(0,c.findIndex(v=>v.route.id===f)+1);m=Pf(new URL(r.url),T,s,!0,m,y),i.headers.set("Location",m)}return i}function mm(i,r,f,c){let s=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(uo.test(i)){let y=i,m=y.startsWith("//")?new URL(r.protocol+y):new URL(y);if(s.includes(m.protocol))throw new Error("Invalid redirect location");let T=Yn(m.pathname,f)!=null;if(m.origin===r.origin&&T)return no(m.pathname)+m.search+m.hash}try{let y=c.createURL(i);if(s.includes(y.protocol))throw new Error("Invalid redirect location")}catch{}return i}function Ln(i,r,f,c){let s=i.createURL(km(r)).toString(),y={signal:f};if(c&&gl(c.formMethod)){let{formMethod:m,formEncType:T}=c;y.method=m.toUpperCase(),T==="application/json"?(y.headers=new Headers({"Content-Type":T}),y.body=JSON.stringify(c.json)):T==="text/plain"?y.body=c.text:T==="application/x-www-form-urlencoded"&&c.formData?y.body=eo(c.formData):y.body=c.formData}return new Request(s,y)}function eo(i){let r=new URLSearchParams;for(let[f,c]of i.entries())r.append(f,typeof c=="string"?c:c.name);return r}function vm(i){let r=new FormData;for(let[f,c]of i.entries())r.append(f,c);return r}function Yg(i,r,f,c,s){let y={},m=null,T,v=!1,h={},A=f&&$t(f[1])?f[1].error:void 0;return i.forEach(p=>{if(!(p.route.id in r))return;let C=p.route.id,L=r[C];if(ze(!Wa(L),"Cannot handle redirect results in processLoaderData"),$t(L)){let X=L.error;A!==void 0&&(X=A,A=void 0),m=m||{};{let Q=$a(i,C);m[Q.route.id]==null&&(m[Q.route.id]=X)}y[C]=void 0,v||(v=!0,T=Vu(L.error)?L.error.status:500),L.headers&&(h[C]=L.headers)}else Ea(L)?(c.set(C,L.deferredData),y[C]=L.deferredData.data,L.statusCode!=null&&L.statusCode!==200&&!v&&(T=L.statusCode),L.headers&&(h[C]=L.headers)):(y[C]=L.data,L.statusCode&&L.statusCode!==200&&!v&&(T=L.statusCode),L.headers&&(h[C]=L.headers))}),A!==void 0&&f&&(m={[f[0]]:A},y[f[0]]=void 0),{loaderData:y,errors:m,statusCode:T||200,loaderHeaders:h}}function ym(i,r,f,c,s,y,m){let{loaderData:T,errors:v}=Yg(r,f,c,m);return s.forEach(h=>{let{key:A,match:p,controller:C}=h,L=y[A];if(ze(L,"Did not find corresponding fetcher result"),!(C&&C.signal.aborted))if($t(L)){let X=$a(i.matches,p==null?void 0:p.route.id);v&&v[X.route.id]||(v=nt({},v,{[X.route.id]:L.error})),i.fetchers.delete(A)}else if(Wa(L))ze(!1,"Unhandled fetcher revalidation redirect");else if(Ea(L))ze(!1,"Unhandled fetcher deferred data");else{let X=ba(L.data);i.fetchers.set(A,X)}}),{loaderData:T,errors:v}}function gm(i,r,f,c){let s=nt({},r);for(let y of f){let m=y.route.id;if(r.hasOwnProperty(m)?r[m]!==void 0&&(s[m]=r[m]):i[m]!==void 0&&y.route.loader&&(s[m]=i[m]),c&&c.hasOwnProperty(m))break}return s}function pm(i){return i?$t(i[1])?{actionData:{}}:{actionData:{[i[0]]:i[1].data}}:{}}function $a(i,r){return(r?i.slice(0,i.findIndex(c=>c.route.id===r)+1):[...i]).reverse().find(c=>c.route.hasErrorBoundary===!0)||i[0]}function Sm(i){let r=i.length===1?i[0]:i.find(f=>f.index||!f.path||f.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:r}],route:r}}function Yt(i,r){let{pathname:f,routeId:c,method:s,type:y,message:m}=r===void 0?{}:r,T="Unknown Server Error",v="Unknown @remix-run/router error";return i===400?(T="Bad Request",s&&f&&c?v="You made a "+s+' request to "'+f+'" but '+('did not provide a `loader` for route "'+c+'", ')+"so there is no way to handle the request.":y==="defer-action"?v="defer() is not supported in actions":y==="invalid-body"&&(v="Unable to encode submission body")):i===403?(T="Forbidden",v='Route "'+c+'" does not match URL "'+f+'"'):i===404?(T="Not Found",v='No route matches URL "'+f+'"'):i===405&&(T="Method Not Allowed",s&&f&&c?v="You made a "+s.toUpperCase()+' request to "'+f+'" but '+('did not provide an `action` for route "'+c+'", ')+"so there is no way to handle the request.":s&&(v='Invalid request method "'+s.toUpperCase()+'"')),new or(i||500,T,new Error(v),!0)}function ir(i){let r=Object.entries(i);for(let f=r.length-1;f>=0;f--){let[c,s]=r[f];if(Wa(s))return{key:c,result:s}}}function km(i){let r=typeof i=="string"?za(i):i;return ka(nt({},r,{hash:""}))}function wg(i,r){return i.pathname!==r.pathname||i.search!==r.search?!1:i.hash===""?r.hash!=="":i.hash===r.hash?!0:r.hash!==""}function Qg(i){return Pm(i.result)&&Rg.has(i.result.status)}function Ea(i){return i.type===Xe.deferred}function $t(i){return i.type===Xe.error}function Wa(i){return(i&&i.type)===Xe.redirect}function bm(i){return typeof i=="object"&&i!=null&&"type"in i&&"data"in i&&"init"in i&&i.type==="DataWithResponseInit"}function Gg(i){let r=i;return r&&typeof r=="object"&&typeof r.data=="object"&&typeof r.subscribe=="function"&&typeof r.cancel=="function"&&typeof r.resolveData=="function"}function Pm(i){return i!=null&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.headers=="object"&&typeof i.body<"u"}function Xg(i){return Mg.has(i.toLowerCase())}function gl(i){return zg.has(i.toLowerCase())}async function Vg(i,r,f,c,s){let y=Object.entries(r);for(let m=0;m(C==null?void 0:C.route.id)===T);if(!h)continue;let A=c.find(C=>C.route.id===h.route.id),p=A!=null&&!$m(A,h)&&(s&&s[h.route.id])!==void 0;Ea(v)&&p&&await io(v,f,!1).then(C=>{C&&(r[T]=C)})}}async function Zg(i,r,f){for(let c=0;c(h==null?void 0:h.route.id)===y)&&Ea(T)&&(ze(m,"Expected an AbortController for revalidating fetcher deferred result"),await io(T,m.signal,!0).then(h=>{h&&(r[s]=h)}))}}async function io(i,r,f){if(f===void 0&&(f=!1),!await i.deferredData.resolveData(r)){if(f)try{return{type:Xe.data,data:i.deferredData.unwrappedData}}catch(s){return{type:Xe.error,error:s}}return{type:Xe.data,data:i.deferredData.data}}}function ro(i){return new URLSearchParams(i).getAll("index").some(r=>r==="")}function Yu(i,r){let f=typeof r=="string"?za(r).search:r.search;if(i[i.length-1].route.index&&ro(f||""))return i[i.length-1];let c=Km(i);return c[c.length-1]}function Em(i){let{formMethod:r,formAction:f,formEncType:c,text:s,formData:y,json:m}=i;if(!(!r||!f||!c)){if(s!=null)return{formMethod:r,formAction:f,formEncType:c,formData:void 0,json:void 0,text:s};if(y!=null)return{formMethod:r,formAction:f,formEncType:c,formData:y,json:void 0,text:void 0};if(m!==void 0)return{formMethod:r,formAction:f,formEncType:c,formData:void 0,json:m,text:void 0}}}function Bf(i,r){return r?{state:"loading",location:i,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}:{state:"loading",location:i,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Kg(i,r){return{state:"submitting",location:i,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}}function ju(i,r){return i?{state:"loading",formMethod:i.formMethod,formAction:i.formAction,formEncType:i.formEncType,formData:i.formData,json:i.json,text:i.text,data:r}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:r}}function Jg(i,r){return{state:"submitting",formMethod:i.formMethod,formAction:i.formAction,formEncType:i.formEncType,formData:i.formData,json:i.json,text:i.text,data:r?r.data:void 0}}function ba(i){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:i}}function Fg(i,r){try{let f=i.sessionStorage.getItem(Fm);if(f){let c=JSON.parse(f);for(let[s,y]of Object.entries(c||{}))y&&Array.isArray(y)&&r.set(s,new Set(y||[]))}}catch{}}function $g(i,r){if(r.size>0){let f={};for(let[c,s]of r)f[c]=[...s];try{i.sessionStorage.setItem(Fm,JSON.stringify(f))}catch(c){Ta(!1,"Failed to save applied view transitions in sessionStorage ("+c+").")}}}/** * React Router v6.30.4 * * 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 */function sr(){return sr=Object.assign?Object.assign.bind():function(i){for(var r=1;r{T.current=!0}),j.useCallback(function(h,A){if(A===void 0&&(A={}),!T.current)return;if(typeof h=="number"){c.go(h);return}let p=hr(h,JSON.parse(m),y,A.relative==="path");i==null&&r!=="/"&&(p.pathname=p.pathname==="/"?r:Kl([r,p.pathname])),(A.replace?c.replace:c.push)(p,A.state,A)},[r,c,m,y,i])}const lv=j.createContext(null);function Wp(){return j.useContext(lv)}function Pg(i){let r=j.useContext(Al).outlet;return r&&j.createElement(lv.Provider,{value:i},r)}function kp(){let{matches:i}=j.useContext(Al),r=i[i.length-1];return r?r.params:{}}function av(i,r){let{relative:f}=r===void 0?{}:r,{future:c}=j.useContext(Aa),{matches:s}=j.useContext(Al),{pathname:y}=Qn(),m=JSON.stringify(dr(s,c.v7_relativeSplatPath));return j.useMemo(()=>hr(i,JSON.parse(m),y,f==="path"),[i,m,y,f])}function Ig(i,r,f,c){wn()||ze(!1);let{navigator:s}=j.useContext(Aa),{matches:y}=j.useContext(Al),m=y[y.length-1],T=m?m.params:{};m&&m.pathname;let v=m?m.pathnameBase:"/";m&&m.route;let h=Qn(),A;A=h;let p=A.pathname||"/",C=p;if(v!=="/"){let Q=v.replace(/^\//,"").split("/");C="/"+p.replace(/^\//,"").split("/").slice(Q.length).join("/")}let L=Fa(i,{pathname:C});return np(L&&L.map(Q=>Object.assign({},Q,{params:Object.assign({},T,Q.params),pathname:Kl([v,s.encodeLocation?s.encodeLocation(Q.pathname).pathname:Q.pathname]),pathnameBase:Q.pathnameBase==="/"?v:Kl([v,s.encodeLocation?s.encodeLocation(Q.pathnameBase).pathname:Q.pathnameBase])})),y,f,c)}function ep(){let i=cp(),r=Vu(i)?i.status+" "+i.statusText:i instanceof Error?i.message:JSON.stringify(i),f=i instanceof Error?i.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return j.createElement(j.Fragment,null,j.createElement("h2",null,"Unexpected Application Error!"),j.createElement("h3",{style:{fontStyle:"italic"}},r),f?j.createElement("pre",{style:s},f):null,null)}const tp=j.createElement(ep,null);class lp extends j.Component{constructor(r){super(r),this.state={location:r.location,revalidation:r.revalidation,error:r.error}}static getDerivedStateFromError(r){return{error:r}}static getDerivedStateFromProps(r,f){return f.location!==r.location||f.revalidation!=="idle"&&r.revalidation==="idle"?{error:r.error,location:r.location,revalidation:r.revalidation}:{error:r.error!==void 0?r.error:f.error,location:f.location,revalidation:r.revalidation||f.revalidation}}componentDidCatch(r,f){}render(){return this.state.error!==void 0?j.createElement(Al.Provider,{value:this.props.routeContext},j.createElement(ev.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ap(i){let{routeContext:r,match:f,children:c}=i,s=j.useContext(mr);return s&&s.static&&s.staticContext&&(f.route.errorElement||f.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=f.route.id),j.createElement(Al.Provider,{value:r},c)}function np(i,r,f,c){var s;if(r===void 0&&(r=[]),f===void 0&&(f=null),c===void 0&&(c=null),i==null){var y;if(!f)return null;if(f.errors)i=f.matches;else if((y=c)!=null&&y.v7_partialHydration&&r.length===0&&!f.initialized&&f.matches.length>0)i=f.matches;else return null}let m=i,T=(s=f)==null?void 0:s.errors;if(T!=null){let A=m.findIndex(p=>p.route.id&&(T==null?void 0:T[p.route.id])!==void 0);A>=0||ze(!1),m=m.slice(0,Math.min(m.length,A+1))}let v=!1,h=-1;if(f&&c&&c.v7_partialHydration)for(let A=0;A=0?m=m.slice(0,h+1):m=[m[0]];break}}}return m.reduceRight((A,p,C)=>{let L,X=!1,Q=null,J=null;f&&(L=T&&p.route.id?T[p.route.id]:void 0,Q=p.route.errorElement||tp,v&&(h<0&&C===0?(op("route-fallback"),X=!0,J=null):h===C&&(X=!0,J=p.route.hydrateFallbackElement||null)));let oe=r.concat(m.slice(0,C+1)),ue=()=>{let te;return L?te=Q:X?te=J:p.route.Component?te=j.createElement(p.route.Component,null):p.route.element?te=p.route.element:te=A,j.createElement(ap,{match:p,routeContext:{outlet:A,matches:oe,isDataRoute:f!=null},children:te})};return f&&(p.route.ErrorBoundary||p.route.errorElement||C===0)?j.createElement(lp,{location:f.location,revalidation:f.revalidation,component:Q,error:L,children:ue(),routeContext:{outlet:null,matches:oe,isDataRoute:!0}}):ue()},null)}var nv=(function(i){return i.UseBlocker="useBlocker",i.UseRevalidator="useRevalidator",i.UseNavigateStable="useNavigate",i})(nv||{}),uv=(function(i){return i.UseBlocker="useBlocker",i.UseLoaderData="useLoaderData",i.UseActionData="useActionData",i.UseRouteError="useRouteError",i.UseNavigation="useNavigation",i.UseRouteLoaderData="useRouteLoaderData",i.UseMatches="useMatches",i.UseRevalidator="useRevalidator",i.UseNavigateStable="useNavigate",i.UseRouteId="useRouteId",i})(uv||{});function up(i){let r=j.useContext(mr);return r||ze(!1),r}function ip(i){let r=j.useContext(Im);return r||ze(!1),r}function rp(i){let r=j.useContext(Al);return r||ze(!1),r}function iv(i){let r=rp(),f=r.matches[r.matches.length-1];return f.route.id||ze(!1),f.route.id}function cp(){var i;let r=j.useContext(ev),f=ip(),c=iv();return r!==void 0?r:(i=f.errors)==null?void 0:i[c]}function fp(){let{router:i}=up(nv.UseNavigateStable),r=iv(uv.UseNavigateStable),f=j.useRef(!1);return tv(()=>{f.current=!0}),j.useCallback(function(s,y){y===void 0&&(y={}),f.current&&(typeof s=="number"?i.navigate(s):i.navigate(s,sr({fromRouteId:r},y)))},[i,r])}const Tm={};function op(i,r,f){Tm[i]||(Tm[i]=!0)}function sp(i,r){i==null||i.v7_startTransition,(i==null?void 0:i.v7_relativeSplatPath)===void 0&&(!r||r.v7_relativeSplatPath),r&&(r.v7_fetcherPersist,r.v7_normalizeFormMethod,r.v7_partialHydration,r.v7_skipActionErrorRevalidation)}function Pp(i){let{to:r,replace:f,state:c,relative:s}=i;wn()||ze(!1);let{future:y,static:m}=j.useContext(Aa),{matches:T}=j.useContext(Al),{pathname:v}=Qn(),h=yr(),A=hr(r,dr(T,y.v7_relativeSplatPath),v,s==="path"),p=JSON.stringify(A);return j.useEffect(()=>h(JSON.parse(p),{replace:f,state:c,relative:s}),[h,p,s,f,c]),null}function Ip(i){return Pg(i.context)}function dp(i){let{basename:r="/",children:f=null,location:c,navigationType:s=vt.Pop,navigator:y,static:m=!1,future:T}=i;wn()&&ze(!1);let v=r.replace(/^\/*/,"/"),h=j.useMemo(()=>({basename:v,navigator:y,static:m,future:sr({v7_relativeSplatPath:!1},T)}),[v,T,y,m]);typeof c=="string"&&(c=za(c));let{pathname:A="/",search:p="",hash:C="",state:L=null,key:X="default"}=c,Q=j.useMemo(()=>{let J=Yn(A,v);return J==null?null:{location:{pathname:J,search:p,hash:C,state:L,key:X},navigationType:s}},[v,A,p,C,L,X,s]);return Q==null?null:j.createElement(Aa.Provider,{value:h},j.createElement(vr.Provider,{children:f,value:Q}))}new Promise(()=>{});function hp(i){let r={hasErrorBoundary:i.ErrorBoundary!=null||i.errorElement!=null};return i.Component&&Object.assign(r,{element:j.createElement(i.Component),Component:void 0}),i.HydrateFallback&&Object.assign(r,{hydrateFallbackElement:j.createElement(i.HydrateFallback),HydrateFallback:void 0}),i.ErrorBoundary&&Object.assign(r,{errorElement:j.createElement(i.ErrorBoundary),ErrorBoundary:void 0}),r}/** * React Router DOM v6.30.4 * * 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 */function Zu(){return Zu=Object.assign?Object.assign.bind():function(i){for(var r=1;r{let c=i[f];return r.concat(Array.isArray(c)?c.map(s=>[f,s]):[[f,c]])},[]))}function gp(i,r){let f=to(i);return r&&r.forEach((c,s)=>{f.has(s)||r.getAll(s).forEach(y=>{f.append(s,y)})}),f}const pp=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Sp="6";try{window.__reactRouterVersion=Sp}catch{}function eS(i,r){return Ug({basename:void 0,future:Zu({},void 0,{v7_prependBasename:!0}),history:I0({window:void 0}),hydrationData:bp(),routes:i,mapRouteProperties:hp,dataStrategy:void 0,patchRoutesOnNavigation:void 0,window:void 0}).initialize()}function bp(){var i;let r=(i=window)==null?void 0:i.__staticRouterHydrationData;return r&&r.errors&&(r=Zu({},r,{errors:Ep(r.errors)})),r}function Ep(i){if(!i)return null;let r=Object.entries(i),f={};for(let[c,s]of r)if(s&&s.__type==="RouteErrorResponse")f[c]=new or(s.status,s.statusText,s.data,s.internal===!0);else if(s&&s.__type==="Error"){if(s.__subType){let y=window[s.__subType];if(typeof y=="function")try{let m=new y(s.message);m.stack="",f[c]=m}catch{}}if(f[c]==null){let y=new Error(s.message);y.stack="",f[c]=y}}else f[c]=s;return f}const Tp=j.createContext({isTransitioning:!1}),zp=j.createContext(new Map),Ap="startTransition",zm=z0[Ap],Mp="flushSync",Am=P0[Mp];function Rp(i){zm?zm(i):i()}function Lu(i){Am?Am(i):i()}class _p{constructor(){this.status="pending",this.promise=new Promise((r,f)=>{this.resolve=c=>{this.status==="pending"&&(this.status="resolved",r(c))},this.reject=c=>{this.status==="pending"&&(this.status="rejected",f(c))}})}}function tS(i){let{fallbackElement:r,router:f,future:c}=i,[s,y]=j.useState(f.state),[m,T]=j.useState(),[v,h]=j.useState({isTransitioning:!1}),[A,p]=j.useState(),[C,L]=j.useState(),[X,Q]=j.useState(),J=j.useRef(new Map),{v7_startTransition:oe}=c||{},ue=j.useCallback(Z=>{oe?Rp(Z):Z()},[oe]),te=j.useCallback((Z,ae)=>{let{deletedFetchers:re,flushSync:Te,viewTransitionOpts:ye}=ae;Z.fetchers.forEach((xe,Ve)=>{xe.data!==void 0&&J.current.set(Ve,xe.data)}),re.forEach(xe=>J.current.delete(xe));let Fe=f.window==null||f.window.document==null||typeof f.window.document.startViewTransition!="function";if(!ye||Fe){Te?Lu(()=>y(Z)):ue(()=>y(Z));return}if(Te){Lu(()=>{C&&(A&&A.resolve(),C.skipTransition()),h({isTransitioning:!0,flushSync:!0,currentLocation:ye.currentLocation,nextLocation:ye.nextLocation})});let xe=f.window.document.startViewTransition(()=>{Lu(()=>y(Z))});xe.finished.finally(()=>{Lu(()=>{p(void 0),L(void 0),T(void 0),h({isTransitioning:!1})})}),Lu(()=>L(xe));return}C?(A&&A.resolve(),C.skipTransition(),Q({state:Z,currentLocation:ye.currentLocation,nextLocation:ye.nextLocation})):(T(Z),h({isTransitioning:!0,flushSync:!1,currentLocation:ye.currentLocation,nextLocation:ye.nextLocation}))},[f.window,C,A,J,ue]);j.useLayoutEffect(()=>f.subscribe(te),[f,te]),j.useEffect(()=>{v.isTransitioning&&!v.flushSync&&p(new _p)},[v]),j.useEffect(()=>{if(A&&m&&f.window){let Z=m,ae=A.promise,re=f.window.document.startViewTransition(async()=>{ue(()=>y(Z)),await ae});re.finished.finally(()=>{p(void 0),L(void 0),T(void 0),h({isTransitioning:!1})}),L(re)}},[ue,m,A,f.window]),j.useEffect(()=>{A&&m&&s.location.key===m.location.key&&A.resolve()},[A,C,s.location,m]),j.useEffect(()=>{!v.isTransitioning&&X&&(T(X.state),h({isTransitioning:!0,flushSync:!1,currentLocation:X.currentLocation,nextLocation:X.nextLocation}),Q(void 0))},[v.isTransitioning,X]),j.useEffect(()=>{},[]);let ge=j.useMemo(()=>({createHref:f.createHref,encodeLocation:f.encodeLocation,go:Z=>f.navigate(Z),push:(Z,ae,re)=>f.navigate(Z,{state:ae,preventScrollReset:re==null?void 0:re.preventScrollReset}),replace:(Z,ae,re)=>f.navigate(Z,{replace:!0,state:ae,preventScrollReset:re==null?void 0:re.preventScrollReset})}),[f]),G=f.basename||"/",Ee=j.useMemo(()=>({router:f,navigator:ge,static:!1,basename:G}),[f,ge,G]),R=j.useMemo(()=>({v7_relativeSplatPath:f.future.v7_relativeSplatPath}),[f.future.v7_relativeSplatPath]);return j.useEffect(()=>sp(c,f.future),[c,f.future]),j.createElement(j.Fragment,null,j.createElement(mr.Provider,{value:Ee},j.createElement(Im.Provider,{value:s},j.createElement(zp.Provider,{value:J.current},j.createElement(Tp.Provider,{value:v},j.createElement(dp,{basename:G,location:s.location,navigationType:s.historyAction,navigator:ge,future:R},s.initialized||f.future.v7_partialHydration?j.createElement(Op,{routes:f.routes,future:f.future,state:s}):r))))),null)}const Op=j.memo(Dp);function Dp(i){let{routes:r,future:f,state:c}=i;return Ig(r,void 0,c,f)}const Up=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Cp=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,lS=j.forwardRef(function(r,f){let{onClick:c,relative:s,reloadDocument:y,replace:m,state:T,target:v,to:h,preventScrollReset:A,viewTransition:p}=r,C=mp(r,pp),{basename:L}=j.useContext(Aa),X,Q=!1;if(typeof h=="string"&&Cp.test(h)&&(X=h,Up))try{let te=new URL(window.location.href),ge=h.startsWith("//")?new URL(te.protocol+h):new URL(h),G=Yn(ge.pathname,L);ge.origin===te.origin&&G!=null?h=G+ge.search+ge.hash:Q=!0}catch{}let J=Wg(h,{relative:s}),oe=Np(h,{replace:m,state:T,target:v,preventScrollReset:A,relative:s,viewTransition:p});function ue(te){c&&c(te),te.defaultPrevented||oe(te)}return j.createElement("a",Zu({},C,{href:X||J,onClick:Q||y?c:ue,ref:f,target:v}))});var Mm;(function(i){i.UseScrollRestoration="useScrollRestoration",i.UseSubmit="useSubmit",i.UseSubmitFetcher="useSubmitFetcher",i.UseFetcher="useFetcher",i.useViewTransitionState="useViewTransitionState"})(Mm||(Mm={}));var Rm;(function(i){i.UseFetcher="useFetcher",i.UseFetchers="useFetchers",i.UseScrollRestoration="useScrollRestoration"})(Rm||(Rm={}));function Np(i,r){let{target:f,replace:c,state:s,preventScrollReset:y,relative:m,viewTransition:T}=r===void 0?{}:r,v=yr(),h=Qn(),A=av(i,{relative:m});return j.useCallback(p=>{if(yp(p,f)){p.preventDefault();let C=c!==void 0?c:ka(h)===ka(A);v(i,{replace:C,state:s,preventScrollReset:y,relative:m,viewTransition:T})}},[h,v,A,c,s,f,i,y,m,T])}function qp(i){let r=j.useRef(to(i)),f=j.useRef(!1),c=Qn(),s=j.useMemo(()=>gp(c.search,f.current?null:r.current),[c.search]),y=yr(),m=j.useCallback((T,v)=>{const h=to(typeof T=="function"?T(s):T);f.current=!0,y("?"+h,v)},[y,s]);return[s,m]}const xp=$0({adapter:"react-router-v6",useNavigate:yr,useSearchParams:qp}),aS=xp.NuqsAdapter;var Yf={exports:{}},Bu={},wf={exports:{}},Qf={};/** * @license React * scheduler.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var _m;function Hp(){return _m||(_m=1,(function(i){function r(q,K){var ee=q.length;q.push(K);e:for(;0>>1,Oe=q[_e];if(0>>1;_es(V,ee))Ws(P,V)?(q[_e]=P,q[W]=ee,_e=W):(q[_e]=V,q[H]=ee,_e=H);else if(Ws(P,ee))q[_e]=P,q[W]=ee,_e=W;else break e}}return K}function s(q,K){var ee=q.sortIndex-K.sortIndex;return ee!==0?ee:q.id-K.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var y=performance;i.unstable_now=function(){return y.now()}}else{var m=Date,T=m.now();i.unstable_now=function(){return m.now()-T}}var v=[],h=[],A=1,p=null,C=3,L=!1,X=!1,Q=!1,J=!1,oe=typeof setTimeout=="function"?setTimeout:null,ue=typeof clearTimeout=="function"?clearTimeout:null,te=typeof setImmediate<"u"?setImmediate:null;function ge(q){for(var K=f(h);K!==null;){if(K.callback===null)c(h);else if(K.startTime<=q)c(h),K.sortIndex=K.expirationTime,r(v,K);else break;K=f(h)}}function G(q){if(Q=!1,ge(q),!X)if(f(v)!==null)X=!0,Ee||(Ee=!0,ye());else{var K=f(h);K!==null&&Ve(G,K.startTime-q)}}var Ee=!1,R=-1,Z=5,ae=-1;function re(){return J?!0:!(i.unstable_now()-aeq&&re());){var _e=p.callback;if(typeof _e=="function"){p.callback=null,C=p.priorityLevel;var Oe=_e(p.expirationTime<=q);if(q=i.unstable_now(),typeof Oe=="function"){p.callback=Oe,ge(q),K=!0;break t}p===f(v)&&c(v),ge(q)}else c(v);p=f(v)}if(p!==null)K=!0;else{var b=f(h);b!==null&&Ve(G,b.startTime-q),K=!1}}break e}finally{p=null,C=ee,L=!1}K=void 0}}finally{K?ye():Ee=!1}}}var ye;if(typeof te=="function")ye=function(){te(Te)};else if(typeof MessageChannel<"u"){var Fe=new MessageChannel,xe=Fe.port2;Fe.port1.onmessage=Te,ye=function(){xe.postMessage(null)}}else ye=function(){oe(Te,0)};function Ve(q,K){R=oe(function(){q(i.unstable_now())},K)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(q){q.callback=null},i.unstable_forceFrameRate=function(q){0>q||125_e?(q.sortIndex=ee,r(h,q),f(v)===null&&q===f(h)&&(Q?(ue(R),R=-1):Q=!0,Ve(G,ee-_e))):(q.sortIndex=Oe,r(v,q),X||L||(X=!0,Ee||(Ee=!0,ye()))),q},i.unstable_shouldYield=re,i.unstable_wrapCallback=function(q){var K=C;return function(){var ee=C;C=K;try{return q.apply(this,arguments)}finally{C=ee}}}})(Qf)),Qf}var Om;function jp(){return Om||(Om=1,wf.exports=Hp()),wf.exports}/** * @license React * react-dom-client.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Dm;function Lp(){if(Dm)return Bu;Dm=1;var i=jp(),r=Ku(),f=Gm();function c(e){var t="https://react.dev/errors/"+e;if(1Oe||(e.current=_e[Oe],_e[Oe]=null,Oe--)}function V(e,t){Oe++,_e[Oe]=e.current,e.current=t}var W=b(null),P=b(null),de=b(null),Se=b(null);function lt(e,t){switch(V(de,t),V(P,e),V(W,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?ph(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=ph(t),e=Sh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}H(W),V(W,e)}function Le(){H(W),H(P),H(de)}function cl(e){e.memoizedState!==null&&V(Se,e);var t=W.current,l=Sh(t,e.type);t!==l&&(V(P,e),V(W,l))}function Pa(e){P.current===e&&(H(W),H(P)),Se.current===e&&(H(Se),Uu._currentValue=ee)}var yt,Rl;function pl(e){if(yt===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);yt=t&&t[1]||"",Rl=-1)":-1n||g[a]!==O[n]){var x=` `+g[a].replace(" at new "," at ");return e.displayName&&x.includes("")&&(x=x.replace("",e.displayName)),x}while(1<=a&&0<=n);break}}}finally{Gn=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?pl(l):""}function gr(e,t){switch(e.tag){case 26:case 27:case 5:return pl(e.type);case 16:return pl("Lazy");case 13:return e.child!==t&&t!==null?pl("Suspense Fallback"):pl("Suspense");case 19:return pl("SuspenseList");case 0:case 15:return fl(e.type,!1);case 11:return fl(e.type.render,!1);case 1:return fl(e.type,!0);case 31:return pl("Activity");default:return""}}function Ju(e){try{var t="",l=null;do t+=gr(e,l),l=e,e=e.return;while(e);return t}catch(a){return` Error generating stack: `+a.message+` `+a.stack}}var Ia=Object.prototype.hasOwnProperty,Xn=i.unstable_scheduleCallback,Vn=i.unstable_cancelCallback,pr=i.unstable_shouldYield,Sr=i.unstable_requestPaint,ct=i.unstable_now,Ma=i.unstable_getCurrentPriorityLevel,Zn=i.unstable_ImmediatePriority,en=i.unstable_UserBlockingPriority,wt=i.unstable_NormalPriority,ol=i.unstable_LowPriority,Kn=i.unstable_IdlePriority,tn=i.log,br=i.unstable_setDisableYieldValue,Ct=null,Mt=null;function sl(e){if(typeof tn=="function"&&br(e),Mt&&typeof Mt.setStrictMode=="function")try{Mt.setStrictMode(Ct,e)}catch{}}var Rt=Math.clz32?Math.clz32:ln,Er=Math.log,Fu=Math.LN2;function ln(e){return e>>>=0,e===0?32:31-(Er(e)/Fu|0)|0}var Ra=256,Jl=262144,Fl=4194304;function _l(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function _a(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var n=0,u=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var d=a&134217727;return d!==0?(a=d&~u,a!==0?n=_l(a):(o&=d,o!==0?n=_l(o):l||(l=d&~e,l!==0&&(n=_l(l))))):(d=a&~u,d!==0?n=_l(d):o!==0?n=_l(o):l||(l=a&~e,l!==0&&(n=_l(l)))),n===0?0:t!==0&&t!==n&&(t&u)===0&&(u=n&-n,l=t&-t,u>=l||u===32&&(l&4194048)!==0)?t:n}function Oa(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function $u(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Da(){var e=Fl;return Fl<<=1,(Fl&62914560)===0&&(Fl=4194304),e}function $l(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Ua(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Tr(e,t,l,a,n,u){var o=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var d=e.entanglements,g=e.expirationTimes,O=e.hiddenUpdates;for(l=o&~l;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var fv=/[\n"\\]/g;function It(e){return e.replace(fv,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ar(e,t,l,a,n,u,o,d){e.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.type=o:e.removeAttribute("type"),t!=null?o==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Nt(t)):e.value!==""+Nt(t)&&(e.value=""+Nt(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?Mr(e,o,Nt(t)):l!=null?Mr(e,o,Nt(l)):a!=null&&e.removeAttribute("value"),n==null&&u!=null&&(e.defaultChecked=!!u),n!=null&&(e.checked=n&&typeof n!="function"&&typeof n!="symbol"),d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?e.name=""+Nt(d):e.removeAttribute("name")}function so(e,t,l,a,n,u,o,d){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||l!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){zr(e);return}l=l!=null?""+Nt(l):"",t=t!=null?""+Nt(t):l,d||t===e.value||(e.value=t),e.defaultValue=t}a=a??n,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=d?e.checked:!!a,e.defaultChecked=!!a,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.name=o),zr(e)}function Mr(e,t,l){t==="number"&&Wu(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function an(e,t,l,a){if(e=e.options,t){t={};for(var n=0;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ur=!1;if(Ul)try{var Fn={};Object.defineProperty(Fn,"passive",{get:function(){Ur=!0}}),window.addEventListener("test",Fn,Fn),window.removeEventListener("test",Fn,Fn)}catch{Ur=!1}var kl=null,Cr=null,Pu=null;function So(){if(Pu)return Pu;var e,t=Cr,l=t.length,a,n="value"in kl?kl.value:kl.textContent,u=n.length;for(e=0;e=kn),Mo=" ",Ro=!1;function _o(e,t){switch(e){case"keyup":return Lv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Oo(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var cn=!1;function Yv(e,t){switch(e){case"compositionend":return Oo(t);case"keypress":return t.which!==32?null:(Ro=!0,Mo);case"textInput":return e=t.data,e===Mo&&Ro?null:e;default:return null}}function wv(e,t){if(cn)return e==="compositionend"||!jr&&_o(e,t)?(e=So(),Pu=Cr=kl=null,cn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:l,offset:t-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=jo(l)}}function Bo(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Bo(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Yo(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Wu(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=Wu(e.document)}return t}function Yr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Fv=Ul&&"documentMode"in document&&11>=document.documentMode,fn=null,wr=null,tu=null,Qr=!1;function wo(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Qr||fn==null||fn!==Wu(a)||(a=fn,"selectionStart"in a&&Yr(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),tu&&eu(tu,a)||(tu=a,a=Zi(wr,"onSelect"),0>=o,n-=o,bl=1<<32-Rt(t)+n|l<be?(Ce=ie,ie=null):Ce=ie.sibling;var je=D(z,ie,_[be],B);if(je===null){ie===null&&(ie=Ce);break}e&&ie&&je.alternate===null&&t(z,ie),E=u(je,E,be),He===null?fe=je:He.sibling=je,He=je,ie=Ce}if(be===_.length)return l(z,ie),Ne&&Nl(z,be),fe;if(ie===null){for(;be<_.length;be++)ie=Y(z,_[be],B),ie!==null&&(E=u(ie,E,be),He===null?fe=ie:He.sibling=ie,He=ie);return Ne&&Nl(z,be),fe}for(ie=a(ie);be<_.length;be++)Ce=N(ie,z,be,_[be],B),Ce!==null&&(e&&Ce.alternate!==null&&ie.delete(Ce.key===null?be:Ce.key),E=u(Ce,E,be),He===null?fe=Ce:He.sibling=Ce,He=Ce);return e&&ie.forEach(function(Sa){return t(z,Sa)}),Ne&&Nl(z,be),fe}function se(z,E,_,B){if(_==null)throw Error(c(151));for(var fe=null,He=null,ie=E,be=E=0,Ce=null,je=_.next();ie!==null&&!je.done;be++,je=_.next()){ie.index>be?(Ce=ie,ie=null):Ce=ie.sibling;var Sa=D(z,ie,je.value,B);if(Sa===null){ie===null&&(ie=Ce);break}e&&ie&&Sa.alternate===null&&t(z,ie),E=u(Sa,E,be),He===null?fe=Sa:He.sibling=Sa,He=Sa,ie=Ce}if(je.done)return l(z,ie),Ne&&Nl(z,be),fe;if(ie===null){for(;!je.done;be++,je=_.next())je=Y(z,je.value,B),je!==null&&(E=u(je,E,be),He===null?fe=je:He.sibling=je,He=je);return Ne&&Nl(z,be),fe}for(ie=a(ie);!je.done;be++,je=_.next())je=N(ie,z,be,je.value,B),je!==null&&(e&&je.alternate!==null&&ie.delete(je.key===null?be:je.key),E=u(je,E,be),He===null?fe=je:He.sibling=je,He=je);return e&&ie.forEach(function(m0){return t(z,m0)}),Ne&&Nl(z,be),fe}function Je(z,E,_,B){if(typeof _=="object"&&_!==null&&_.type===Q&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case L:e:{for(var fe=_.key;E!==null;){if(E.key===fe){if(fe=_.type,fe===Q){if(E.tag===7){l(z,E.sibling),B=n(E,_.props.children),B.return=z,z=B;break e}}else if(E.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===Z&&Qa(fe)===E.type){l(z,E.sibling),B=n(E,_.props),ru(B,_),B.return=z,z=B;break e}l(z,E);break}else t(z,E);E=E.sibling}_.type===Q?(B=ja(_.props.children,z.mode,B,_.key),B.return=z,z=B):(B=ci(_.type,_.key,_.props,null,z.mode,B),ru(B,_),B.return=z,z=B)}return o(z);case X:e:{for(fe=_.key;E!==null;){if(E.key===fe)if(E.tag===4&&E.stateNode.containerInfo===_.containerInfo&&E.stateNode.implementation===_.implementation){l(z,E.sibling),B=n(E,_.children||[]),B.return=z,z=B;break e}else{l(z,E);break}else t(z,E);E=E.sibling}B=Fr(_,z.mode,B),B.return=z,z=B}return o(z);case Z:return _=Qa(_),Je(z,E,_,B)}if(Ve(_))return le(z,E,_,B);if(ye(_)){if(fe=ye(_),typeof fe!="function")throw Error(c(150));return _=fe.call(_),se(z,E,_,B)}if(typeof _.then=="function")return Je(z,E,vi(_),B);if(_.$$typeof===te)return Je(z,E,si(z,_),B);yi(z,_)}return typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint"?(_=""+_,E!==null&&E.tag===6?(l(z,E.sibling),B=n(E,_),B.return=z,z=B):(l(z,E),B=Jr(_,z.mode,B),B.return=z,z=B),o(z)):l(z,E)}return function(z,E,_,B){try{iu=0;var fe=Je(z,E,_,B);return bn=null,fe}catch(ie){if(ie===Sn||ie===hi)throw ie;var He=Xt(29,ie,null,z.mode);return He.lanes=B,He.return=z,He}finally{}}}var Xa=fs(!0),os=fs(!1),la=!1;function ic(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function rc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function aa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function na(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Be&2)!==0){var n=a.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),a.pending=t,t=ri(e),Jo(e,null,l),t}return ii(e,a,t,l),ri(e)}function cu(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,M(e,l)}}function cc(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var n=null,u=null;if(l=l.firstBaseUpdate,l!==null){do{var o={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};u===null?n=u=o:u=u.next=o,l=l.next}while(l!==null);u===null?n=u=t:u=u.next=t}else n=u=t;l={baseState:a.baseState,firstBaseUpdate:n,lastBaseUpdate:u,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var fc=!1;function fu(){if(fc){var e=pn;if(e!==null)throw e}}function ou(e,t,l,a){fc=!1;var n=e.updateQueue;la=!1;var u=n.firstBaseUpdate,o=n.lastBaseUpdate,d=n.shared.pending;if(d!==null){n.shared.pending=null;var g=d,O=g.next;g.next=null,o===null?u=O:o.next=O,o=g;var x=e.alternate;x!==null&&(x=x.updateQueue,d=x.lastBaseUpdate,d!==o&&(d===null?x.firstBaseUpdate=O:d.next=O,x.lastBaseUpdate=g))}if(u!==null){var Y=n.baseState;o=0,x=O=g=null,d=u;do{var D=d.lane&-536870913,N=D!==d.lane;if(N?(Ue&D)===D:(a&D)===D){D!==0&&D===gn&&(fc=!0),x!==null&&(x=x.next={lane:0,tag:d.tag,payload:d.payload,callback:null,next:null});e:{var le=e,se=d;D=t;var Je=l;switch(se.tag){case 1:if(le=se.payload,typeof le=="function"){Y=le.call(Je,Y,D);break e}Y=le;break e;case 3:le.flags=le.flags&-65537|128;case 0:if(le=se.payload,D=typeof le=="function"?le.call(Je,Y,D):le,D==null)break e;Y=p({},Y,D);break e;case 2:la=!0}}D=d.callback,D!==null&&(e.flags|=64,N&&(e.flags|=8192),N=n.callbacks,N===null?n.callbacks=[D]:N.push(D))}else N={lane:D,tag:d.tag,payload:d.payload,callback:d.callback,next:null},x===null?(O=x=N,g=Y):x=x.next=N,o|=D;if(d=d.next,d===null){if(d=n.shared.pending,d===null)break;N=d,d=N.next,N.next=null,n.lastBaseUpdate=N,n.shared.pending=null}}while(!0);x===null&&(g=Y),n.baseState=g,n.firstBaseUpdate=O,n.lastBaseUpdate=x,u===null&&(n.shared.lanes=0),fa|=o,e.lanes=o,e.memoizedState=Y}}function ss(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function ds(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;eu?u:8;var o=q.T,d={};q.T=d,Oc(e,!1,t,l);try{var g=n(),O=q.S;if(O!==null&&O(d,g),g!==null&&typeof g=="object"&&typeof g.then=="function"){var x=ay(g,a);hu(e,t,x,Ft(e))}else hu(e,t,a,Ft(e))}catch(Y){hu(e,t,{then:function(){},status:"rejected",reason:Y},Ft())}finally{K.p=u,o!==null&&d.types!==null&&(o.types=d.types),q.T=o}}function fy(){}function Rc(e,t,l,a){if(e.tag!==5)throw Error(c(476));var n=Vs(e).queue;Xs(e,n,t,ee,l===null?fy:function(){return Zs(e),l(a)})}function Vs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jl,lastRenderedState:ee},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jl,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Zs(e){var t=Vs(e);t.next===null&&(t=e.alternate.memoizedState),hu(e,t.next.queue,{},Ft())}function _c(){return Tt(Uu)}function Ks(){return ot().memoizedState}function Js(){return ot().memoizedState}function oy(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Ft();e=aa(l);var a=na(t,e,l);a!==null&&(Bt(a,t,l),cu(a,t,l)),t={cache:lc()},e.payload=t;return}t=t.return}}function sy(e,t,l){var a=Ft();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Ri(e)?$s(t,l):(l=Zr(e,t,l,a),l!==null&&(Bt(l,e,a),Ws(l,t,a)))}function Fs(e,t,l){var a=Ft();hu(e,t,l,a)}function hu(e,t,l,a){var n={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Ri(e))$s(t,n);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var o=t.lastRenderedState,d=u(o,l);if(n.hasEagerState=!0,n.eagerState=d,Gt(d,o))return ii(e,t,n,0),$e===null&&ui(),!1}catch{}finally{}if(l=Zr(e,t,n,a),l!==null)return Bt(l,e,a),Ws(l,t,a),!0}return!1}function Oc(e,t,l,a){if(a={lane:2,revertLane:rf(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Ri(e)){if(t)throw Error(c(479))}else t=Zr(e,l,a,2),t!==null&&Bt(t,e,2)}function Ri(e){var t=e.alternate;return e===pe||t!==null&&t===pe}function $s(e,t){Tn=Si=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Ws(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,M(e,l)}}var mu={readContext:Tt,use:Ti,useCallback:it,useContext:it,useEffect:it,useImperativeHandle:it,useLayoutEffect:it,useInsertionEffect:it,useMemo:it,useReducer:it,useRef:it,useState:it,useDebugValue:it,useDeferredValue:it,useTransition:it,useSyncExternalStore:it,useId:it,useHostTransitionStatus:it,useFormState:it,useActionState:it,useOptimistic:it,useMemoCache:it,useCacheRefresh:it};mu.useEffectEvent=it;var ks={readContext:Tt,use:Ti,useCallback:function(e,t){return Ut().memoizedState=[e,t===void 0?null:t],e},useContext:Tt,useEffect:xs,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Ai(4194308,4,Bs.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Ai(4194308,4,e,t)},useInsertionEffect:function(e,t){Ai(4,2,e,t)},useMemo:function(e,t){var l=Ut();t=t===void 0?null:t;var a=e();if(Va){sl(!0);try{e()}finally{sl(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=Ut();if(l!==void 0){var n=l(t);if(Va){sl(!0);try{l(t)}finally{sl(!1)}}}else n=t;return a.memoizedState=a.baseState=n,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},a.queue=e,e=e.dispatch=sy.bind(null,pe,e),[a.memoizedState,e]},useRef:function(e){var t=Ut();return e={current:e},t.memoizedState=e},useState:function(e){e=Ec(e);var t=e.queue,l=Fs.bind(null,pe,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:Ac,useDeferredValue:function(e,t){var l=Ut();return Mc(l,e,t)},useTransition:function(){var e=Ec(!1);return e=Xs.bind(null,pe,e.queue,!0,!1),Ut().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=pe,n=Ut();if(Ne){if(l===void 0)throw Error(c(407));l=l()}else{if(l=t(),$e===null)throw Error(c(349));(Ue&127)!==0||ps(a,t,l)}n.memoizedState=l;var u={value:l,getSnapshot:t};return n.queue=u,xs(bs.bind(null,a,u,e),[e]),a.flags|=2048,An(9,{destroy:void 0},Ss.bind(null,a,u,l,t),null),l},useId:function(){var e=Ut(),t=$e.identifierPrefix;if(Ne){var l=El,a=bl;l=(a&~(1<<32-Rt(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=bi++,0<\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof a.is=="string"?o.createElement("select",{is:a.is}):o.createElement("select"),a.multiple?u.multiple=!0:a.size&&(u.size=a.size);break;default:u=typeof a.is=="string"?o.createElement(n,{is:a.is}):o.createElement(n)}}u[k]=t,u[$]=a;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)u.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=u;e:switch(At(u,n,a),n){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Bl(t)}}return tt(t),Gc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Bl(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(c(166));if(e=de.current,vn(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,n=Et,n!==null)switch(n.tag){case 27:case 5:a=n.memoizedProps}e[k]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||yh(e.nodeValue,l)),e||ea(t,!0)}else e=Ki(e).createTextNode(a),e[k]=t,t.stateNode=e}return tt(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=vn(t),l!==null){if(e===null){if(!a)throw Error(c(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(557));e[k]=t}else La(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;tt(t),e=!1}else l=Pr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(Zt(t),t):(Zt(t),null);if((t.flags&128)!==0)throw Error(c(558))}return tt(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=vn(t),a!==null&&a.dehydrated!==null){if(e===null){if(!n)throw Error(c(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(c(317));n[k]=t}else La(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;tt(t),n=!1}else n=Pr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(Zt(t),t):(Zt(t),null)}return Zt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,n=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(n=a.alternate.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==n&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),Ci(t,t.updateQueue),tt(t),null);case 4:return Le(),e===null&&sf(t.stateNode.containerInfo),tt(t),null;case 10:return xl(t.type),tt(t),null;case 19:if(H(ft),a=t.memoizedState,a===null)return tt(t),null;if(n=(t.flags&128)!==0,u=a.rendering,u===null)if(n)yu(a,!1);else{if(rt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=pi(e),u!==null){for(t.flags|=128,yu(a,!1),e=u.updateQueue,t.updateQueue=e,Ci(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Fo(l,e),l=l.sibling;return V(ft,ft.current&1|2),Ne&&Nl(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&ct()>ji&&(t.flags|=128,n=!0,yu(a,!1),t.lanes=4194304)}else{if(!n)if(e=pi(u),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,Ci(t,e),yu(a,!0),a.tail===null&&a.tailMode==="hidden"&&!u.alternate&&!Ne)return tt(t),null}else 2*ct()-a.renderingStartTime>ji&&l!==536870912&&(t.flags|=128,n=!0,yu(a,!1),t.lanes=4194304);a.isBackwards?(u.sibling=t.child,t.child=u):(e=a.last,e!==null?e.sibling=u:t.child=u,a.last=u)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=ct(),e.sibling=null,l=ft.current,V(ft,n?l&1|2:l&1),Ne&&Nl(t,a.treeForkCount),e):(tt(t),null);case 22:case 23:return Zt(t),sc(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(l&536870912)!==0&&(t.flags&128)===0&&(tt(t),t.subtreeFlags&6&&(t.flags|=8192)):tt(t),l=t.updateQueue,l!==null&&Ci(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==l&&(t.flags|=2048),e!==null&&H(wa),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),xl(st),tt(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function yy(e,t){switch(Wr(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xl(st),Le(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Pa(t),null;case 31:if(t.memoizedState!==null){if(Zt(t),t.alternate===null)throw Error(c(340));La()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Zt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));La()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return H(ft),null;case 4:return Le(),null;case 10:return xl(t.type),null;case 22:case 23:return Zt(t),sc(),e!==null&&H(wa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return xl(st),null;case 25:return null;default:return null}}function Ed(e,t){switch(Wr(t),t.tag){case 3:xl(st),Le();break;case 26:case 27:case 5:Pa(t);break;case 4:Le();break;case 31:t.memoizedState!==null&&Zt(t);break;case 13:Zt(t);break;case 19:H(ft);break;case 10:xl(t.type);break;case 22:case 23:Zt(t),sc(),e!==null&&H(wa);break;case 24:xl(st)}}function gu(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var n=a.next;l=n;do{if((l.tag&e)===e){a=void 0;var u=l.create,o=l.inst;a=u(),o.destroy=a}l=l.next}while(l!==n)}}catch(d){Ge(t,t.return,d)}}function ra(e,t,l){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var u=n.next;a=u;do{if((a.tag&e)===e){var o=a.inst,d=o.destroy;if(d!==void 0){o.destroy=void 0,n=t;var g=l,O=d;try{O()}catch(x){Ge(n,g,x)}}}a=a.next}while(a!==u)}}catch(x){Ge(t,t.return,x)}}function Td(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{ds(t,l)}catch(a){Ge(e,e.return,a)}}}function zd(e,t,l){l.props=Za(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){Ge(e,t,a)}}function pu(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(n){Ge(e,t,n)}}function Tl(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(n){Ge(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(n){Ge(e,t,n)}else l.current=null}function Ad(e){var t=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(n){Ge(e,e.return,n)}}function Xc(e,t,l){try{var a=e.stateNode;By(a,e.type,l,t),a[$]=t}catch(n){Ge(e,e.return,n)}}function Md(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ma(e.type)||e.tag===4}function Vc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Md(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ma(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Zc(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=Dl));else if(a!==4&&(a===27&&ma(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(Zc(e,t,l),e=e.sibling;e!==null;)Zc(e,t,l),e=e.sibling}function Ni(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(a!==4&&(a===27&&ma(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Ni(e,t,l),e=e.sibling;e!==null;)Ni(e,t,l),e=e.sibling}function Rd(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,n=t.attributes;n.length;)t.removeAttributeNode(n[0]);At(t,a,l),t[k]=e,t[$]=l}catch(u){Ge(e,e.return,u)}}var Yl=!1,mt=!1,Kc=!1,_d=typeof WeakSet=="function"?WeakSet:Set,St=null;function gy(e,t){if(e=e.containerInfo,mf=Ii,e=Yo(e),Yr(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var n=a.anchorOffset,u=a.focusNode;a=a.focusOffset;try{l.nodeType,u.nodeType}catch{l=null;break e}var o=0,d=-1,g=-1,O=0,x=0,Y=e,D=null;t:for(;;){for(var N;Y!==l||n!==0&&Y.nodeType!==3||(d=o+n),Y!==u||a!==0&&Y.nodeType!==3||(g=o+a),Y.nodeType===3&&(o+=Y.nodeValue.length),(N=Y.firstChild)!==null;)D=Y,Y=N;for(;;){if(Y===e)break t;if(D===l&&++O===n&&(d=o),D===u&&++x===a&&(g=o),(N=Y.nextSibling)!==null)break;Y=D,D=Y.parentNode}Y=N}l=d===-1||g===-1?null:{start:d,end:g}}else l=null}l=l||{start:0,end:0}}else l=null;for(vf={focusedElem:e,selectionRange:l},Ii=!1,St=t;St!==null;)if(t=St,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,St=e;else for(;St!==null;){switch(t=St,u=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l title"))),At(u,a,l),u[k]=e,ut(u),a=u;break e;case"link":var o=qh("link","href",n).get(a+(l.href||""));if(o){for(var d=0;dJe&&(o=Je,Je=se,se=o);var z=Lo(d,se),E=Lo(d,Je);if(z&&E&&(N.rangeCount!==1||N.anchorNode!==z.node||N.anchorOffset!==z.offset||N.focusNode!==E.node||N.focusOffset!==E.offset)){var _=Y.createRange();_.setStart(z.node,z.offset),N.removeAllRanges(),se>Je?(N.addRange(_),N.extend(E.node,E.offset)):(_.setEnd(E.node,E.offset),N.addRange(_))}}}}for(Y=[],N=d;N=N.parentNode;)N.nodeType===1&&Y.push({element:N,left:N.scrollLeft,top:N.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;dl?32:l,q.T=null,l=Ic,Ic=null;var u=sa,o=Vl;if(pt=0,Dn=sa=null,Vl=0,(Be&6)!==0)throw Error(c(331));var d=Be;if(Be|=4,Bd(u.current),Hd(u,u.current,o,l),Be=d,Au(0,!1),Mt&&typeof Mt.onPostCommitFiberRoot=="function")try{Mt.onPostCommitFiberRoot(Ct,u)}catch{}return!0}finally{K.p=n,q.T=a,lh(e,t)}}function nh(e,t,l){t=tl(l,t),t=Nc(e.stateNode,t,2),e=na(e,t,2),e!==null&&(Ua(e,2),zl(e))}function Ge(e,t,l){if(e.tag===3)nh(e,e,l);else for(;t!==null;){if(t.tag===3){nh(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(oa===null||!oa.has(a))){e=tl(l,e),l=ud(2),a=na(t,l,2),a!==null&&(id(l,a,t,e),Ua(a,2),zl(a));break}}t=t.return}}function af(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new by;var n=new Set;a.set(t,n)}else n=a.get(t),n===void 0&&(n=new Set,a.set(t,n));n.has(l)||($c=!0,n.add(l),e=My.bind(null,e,t,l),t.then(e,e))}function My(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,$e===e&&(Ue&l)===l&&(rt===4||rt===3&&(Ue&62914560)===Ue&&300>ct()-Hi?(Be&2)===0&&Un(e,0):Wc|=l,On===Ue&&(On=0)),zl(e)}function uh(e,t){t===0&&(t=Da()),e=Ha(e,t),e!==null&&(Ua(e,t),zl(e))}function Ry(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),uh(e,l)}function _y(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,n=e.memoizedState;n!==null&&(l=n.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(c(314))}a!==null&&a.delete(t),uh(e,l)}function Oy(e,t){return Xn(e,t)}var Gi=null,Nn=null,nf=!1,Xi=!1,uf=!1,ha=0;function zl(e){e!==Nn&&e.next===null&&(Nn===null?Gi=Nn=e:Nn=Nn.next=e),Xi=!0,nf||(nf=!0,Uy())}function Au(e,t){if(!uf&&Xi){uf=!0;do for(var l=!1,a=Gi;a!==null;){if(e!==0){var n=a.pendingLanes;if(n===0)var u=0;else{var o=a.suspendedLanes,d=a.pingedLanes;u=(1<<31-Rt(42|e)+1)-1,u&=n&~(o&~d),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(l=!0,fh(a,u))}else u=Ue,u=_a(a,a===$e?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(u&3)===0||Oa(a,u)||(l=!0,fh(a,u));a=a.next}while(l);uf=!1}}function Dy(){ih()}function ih(){Xi=nf=!1;var e=0;ha!==0&&wy()&&(e=ha);for(var t=ct(),l=null,a=Gi;a!==null;){var n=a.next,u=rh(a,t);u===0?(a.next=null,l===null?Gi=n:l.next=n,n===null&&(Nn=l)):(l=a,(e!==0||(u&3)!==0)&&(Xi=!0)),a=n}pt!==0&&pt!==5||Au(e),ha!==0&&(ha=0)}function rh(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,n=e.expirationTimes,u=e.pendingLanes&-62914561;0d)break;var x=g.transferSize,Y=g.initiatorType;x&&gh(Y)&&(g=g.responseEnd,o+=x*(g"u"?null:document;function Dh(e,t,l){var a=qn;if(a&&typeof t=="string"&&t){var n=It(t);n='link[rel="'+e+'"][href="'+n+'"]',typeof l=="string"&&(n+='[crossorigin="'+l+'"]'),Oh.has(n)||(Oh.add(n),e={rel:e,crossOrigin:l,href:t},a.querySelector(n)===null&&(t=a.createElement("link"),At(t,"link",e),ut(t),a.head.appendChild(t)))}}function $y(e){Zl.D(e),Dh("dns-prefetch",e,null)}function Wy(e,t){Zl.C(e,t),Dh("preconnect",e,t)}function ky(e,t,l){Zl.L(e,t,l);var a=qn;if(a&&e&&t){var n='link[rel="preload"][as="'+It(t)+'"]';t==="image"&&l&&l.imageSrcSet?(n+='[imagesrcset="'+It(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(n+='[imagesizes="'+It(l.imageSizes)+'"]')):n+='[href="'+It(e)+'"]';var u=n;switch(t){case"style":u=xn(e);break;case"script":u=Hn(e)}rl.has(u)||(e=p({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),rl.set(u,e),a.querySelector(n)!==null||t==="style"&&a.querySelector(Ou(u))||t==="script"&&a.querySelector(Du(u))||(t=a.createElement("link"),At(t,"link",e),ut(t),a.head.appendChild(t)))}}function Py(e,t){Zl.m(e,t);var l=qn;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",n='link[rel="modulepreload"][as="'+It(a)+'"][href="'+It(e)+'"]',u=n;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Hn(e)}if(!rl.has(u)&&(e=p({rel:"modulepreload",href:e},t),rl.set(u,e),l.querySelector(n)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Du(u)))return}a=l.createElement("link"),At(a,"link",e),ut(a),l.head.appendChild(a)}}}function Iy(e,t,l){Zl.S(e,t,l);var a=qn;if(a&&e){var n=bt(a).hoistableStyles,u=xn(e);t=t||"default";var o=n.get(u);if(!o){var d={loading:0,preload:null};if(o=a.querySelector(Ou(u)))d.loading=5;else{e=p({rel:"stylesheet",href:e,"data-precedence":t},l),(l=rl.get(u))&&Tf(e,l);var g=o=a.createElement("link");ut(g),At(g,"link",e),g._p=new Promise(function(O,x){g.onload=O,g.onerror=x}),g.addEventListener("load",function(){d.loading|=1}),g.addEventListener("error",function(){d.loading|=2}),d.loading|=4,Fi(o,t,a)}o={type:"stylesheet",instance:o,count:1,state:d},n.set(u,o)}}}function e0(e,t){Zl.X(e,t);var l=qn;if(l&&e){var a=bt(l).hoistableScripts,n=Hn(e),u=a.get(n);u||(u=l.querySelector(Du(n)),u||(e=p({src:e,async:!0},t),(t=rl.get(n))&&zf(e,t),u=l.createElement("script"),ut(u),At(u,"link",e),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(n,u))}}function t0(e,t){Zl.M(e,t);var l=qn;if(l&&e){var a=bt(l).hoistableScripts,n=Hn(e),u=a.get(n);u||(u=l.querySelector(Du(n)),u||(e=p({src:e,async:!0,type:"module"},t),(t=rl.get(n))&&zf(e,t),u=l.createElement("script"),ut(u),At(u,"link",e),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(n,u))}}function Uh(e,t,l,a){var n=(n=de.current)?Ji(n):null;if(!n)throw Error(c(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=xn(l.href),l=bt(n).hoistableStyles,a=l.get(t),a||(a={type:"style",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=xn(l.href);var u=bt(n).hoistableStyles,o=u.get(e);if(o||(n=n.ownerDocument||n,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,o),(u=n.querySelector(Ou(e)))&&!u._p&&(o.instance=u,o.state.loading=5),rl.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},rl.set(e,l),u||l0(n,e,l,o.state))),t&&a===null)throw Error(c(528,""));return o}if(t&&a!==null)throw Error(c(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Hn(l),l=bt(n).hoistableScripts,a=l.get(t),a||(a={type:"script",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,e))}}function xn(e){return'href="'+It(e)+'"'}function Ou(e){return'link[rel="stylesheet"]['+e+"]"}function Ch(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function l0(e,t,l,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),At(t,"link",l),ut(t),e.head.appendChild(t))}function Hn(e){return'[src="'+It(e)+'"]'}function Du(e){return"script[async]"+e}function Nh(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+It(l.href)+'"]');if(a)return t.instance=a,ut(a),a;var n=p({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),ut(a),At(a,"style",n),Fi(a,l.precedence,e),t.instance=a;case"stylesheet":n=xn(l.href);var u=e.querySelector(Ou(n));if(u)return t.state.loading|=4,t.instance=u,ut(u),u;a=Ch(l),(n=rl.get(n))&&Tf(a,n),u=(e.ownerDocument||e).createElement("link"),ut(u);var o=u;return o._p=new Promise(function(d,g){o.onload=d,o.onerror=g}),At(u,"link",a),t.state.loading|=4,Fi(u,l.precedence,e),t.instance=u;case"script":return u=Hn(l.src),(n=e.querySelector(Du(u)))?(t.instance=n,ut(n),n):(a=l,(n=rl.get(u))&&(a=p({},l),zf(a,n)),e=e.ownerDocument||e,n=e.createElement("script"),ut(n),At(n,"link",a),e.head.appendChild(n),t.instance=n);case"void":return null;default:throw Error(c(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Fi(a,l.precedence,e));return t.instance}function Fi(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=a.length?a[a.length-1]:null,u=n,o=0;o title"):null)}function a0(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Hh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function n0(e,t,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var n=xn(a.href),u=t.querySelector(Ou(n));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Wi.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=u,ut(u);return}u=t.ownerDocument||t,a=Ch(a),(n=rl.get(n))&&Tf(a,n),u=u.createElement("link"),ut(u);var o=u;o._p=new Promise(function(d,g){o.onload=d,o.onerror=g}),At(u,"link",a),l.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=Wi.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Af=0;function u0(e,t){return e.stylesheets&&e.count===0&&Pi(e,e.stylesheets),0Af?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(n)}}:null}function Wi(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Pi(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ki=null;function Pi(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ki=new Map,t.forEach(i0,e),ki=null,Wi.call(e))}function i0(e,t){if(!(t.state.loading&4)){var l=ki.get(e);if(l)var a=l.get(null);else{l=new Map,ki.set(e,l);for(var n=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch{}}return i(),Yf.exports=Lp(),Yf.exports}var nS=Bp(),Gf={exports:{}},Xf={};/** * @license React * use-sync-external-store-shim.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Cm;function Yp(){if(Cm)return Xf;Cm=1;var i=Ku();function r(p,C){return p===C&&(p!==0||1/p===1/C)||p!==p&&C!==C}var f=typeof Object.is=="function"?Object.is:r,c=i.useState,s=i.useEffect,y=i.useLayoutEffect,m=i.useDebugValue;function T(p,C){var L=C(),X=c({inst:{value:L,getSnapshot:C}}),Q=X[0].inst,J=X[1];return y(function(){Q.value=L,Q.getSnapshot=C,v(Q)&&J({inst:Q})},[p,L,C]),s(function(){return v(Q)&&J({inst:Q}),p(function(){v(Q)&&J({inst:Q})})},[p]),m(L),L}function v(p){var C=p.getSnapshot;p=p.value;try{var L=C();return!f(p,L)}catch{return!0}}function h(p,C){return C()}var A=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:T;return Xf.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:A,Xf}var Nm;function wp(){return Nm||(Nm=1,Gf.exports=Yp()),Gf.exports}var uS=wp(),Vf={exports:{}},Ye={};/** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var qm;function Qp(){if(qm)return Ye;qm=1;var i=typeof Symbol=="function"&&Symbol.for,r=i?Symbol.for("react.element"):60103,f=i?Symbol.for("react.portal"):60106,c=i?Symbol.for("react.fragment"):60107,s=i?Symbol.for("react.strict_mode"):60108,y=i?Symbol.for("react.profiler"):60114,m=i?Symbol.for("react.provider"):60109,T=i?Symbol.for("react.context"):60110,v=i?Symbol.for("react.async_mode"):60111,h=i?Symbol.for("react.concurrent_mode"):60111,A=i?Symbol.for("react.forward_ref"):60112,p=i?Symbol.for("react.suspense"):60113,C=i?Symbol.for("react.suspense_list"):60120,L=i?Symbol.for("react.memo"):60115,X=i?Symbol.for("react.lazy"):60116,Q=i?Symbol.for("react.block"):60121,J=i?Symbol.for("react.fundamental"):60117,oe=i?Symbol.for("react.responder"):60118,ue=i?Symbol.for("react.scope"):60119;function te(G){if(typeof G=="object"&&G!==null){var Ee=G.$$typeof;switch(Ee){case r:switch(G=G.type,G){case v:case h:case c:case y:case s:case p:return G;default:switch(G=G&&G.$$typeof,G){case T:case A:case X:case L:case m:return G;default:return Ee}}case f:return Ee}}}function ge(G){return te(G)===h}return Ye.AsyncMode=v,Ye.ConcurrentMode=h,Ye.ContextConsumer=T,Ye.ContextProvider=m,Ye.Element=r,Ye.ForwardRef=A,Ye.Fragment=c,Ye.Lazy=X,Ye.Memo=L,Ye.Portal=f,Ye.Profiler=y,Ye.StrictMode=s,Ye.Suspense=p,Ye.isAsyncMode=function(G){return ge(G)||te(G)===v},Ye.isConcurrentMode=ge,Ye.isContextConsumer=function(G){return te(G)===T},Ye.isContextProvider=function(G){return te(G)===m},Ye.isElement=function(G){return typeof G=="object"&&G!==null&&G.$$typeof===r},Ye.isForwardRef=function(G){return te(G)===A},Ye.isFragment=function(G){return te(G)===c},Ye.isLazy=function(G){return te(G)===X},Ye.isMemo=function(G){return te(G)===L},Ye.isPortal=function(G){return te(G)===f},Ye.isProfiler=function(G){return te(G)===y},Ye.isStrictMode=function(G){return te(G)===s},Ye.isSuspense=function(G){return te(G)===p},Ye.isValidElementType=function(G){return typeof G=="string"||typeof G=="function"||G===c||G===h||G===y||G===s||G===p||G===C||typeof G=="object"&&G!==null&&(G.$$typeof===X||G.$$typeof===L||G.$$typeof===m||G.$$typeof===T||G.$$typeof===A||G.$$typeof===J||G.$$typeof===oe||G.$$typeof===ue||G.$$typeof===Q)},Ye.typeOf=te,Ye}var xm;function iS(){return xm||(xm=1,Vf.exports=Qp()),Vf.exports}function rv(i,r,f){try{return i(r)}catch(c){return M0("[nuqs] Error while parsing value `%s`: %O"+(f?" (for key `%s`)":""),r,c,f),null}}function Ml(i){function r(f){if(typeof f>"u")return null;let c="";if(Array.isArray(f)){if(f[0]===void 0)return null;c=f[0]}return typeof f=="string"&&(c=f),rv(i.parse,c)}return{type:"single",eq:(f,c)=>f===c,...i,parseServerSide:r,withDefault(f){return{...this,defaultValue:f,parseServerSide(c){return r(c)??f}}},withOptions(f){return{...this,...f}}}}Ml({parse:i=>i,serialize:String});const rS=Ml({parse:i=>{const r=parseInt(i);return r==r?r:null},serialize:i=>""+Math.round(i)});Ml({parse:i=>{const r=parseInt(i);return r==r?r-1:null},serialize:i=>""+Math.round(i+1)});Ml({parse:i=>{const r=parseInt(i,16);return r==r?r:null},serialize:i=>{const r=Math.round(i).toString(16);return(r.length&1?"0":"")+r}});Ml({parse:i=>{const r=parseFloat(i);return r==r?r:null},serialize:String});Ml({parse:i=>i.toLowerCase()==="true",serialize:String});function co(i,r){return i.valueOf()===r.valueOf()}Ml({parse:i=>{const r=parseInt(i);return r==r?new Date(r):null},serialize:i=>""+i.valueOf(),eq:co});Ml({parse:i=>{const r=new Date(i);return r.valueOf()==r.valueOf()?r:null},serialize:i=>i.toISOString(),eq:co});Ml({parse:i=>{const r=new Date(i.slice(0,10));return r.valueOf()==r.valueOf()?r:null},serialize:i=>i.toISOString().slice(0,10),eq:co});function cS(i){return Ml({parse:r=>{const f=r;return i.includes(f)?f:null},serialize:String})}const Zf=ao(),Gp={};function fS(i,r={}){const f=j.useId(),c=q0(),s=x0(),{history:y="replace",scroll:m=(c==null?void 0:c.scroll)??!1,shallow:T=(c==null?void 0:c.shallow)??!0,throttleMs:v=wu.timeMs,limitUrlUpdates:h=c==null?void 0:c.limitUrlUpdates,clearOnDefault:A=(c==null?void 0:c.clearOnDefault)??!0,startTransition:p,urlKeys:C=Gp}=r,L=Object.keys(i).join(","),X=j.useMemo(()=>Object.fromEntries(Object.keys(i).map(Z=>[Z,C[Z]??Z])),[L,JSON.stringify(C)]),Q=N0(Object.values(X)),J=Q.searchParams,oe=j.useRef({}),ue=j.useMemo(()=>Object.fromEntries(Object.keys(i).map(Z=>[Z,i[Z].defaultValue??null])),[Object.values(i).map(({defaultValue:Z})=>Z).join(",")]),te=Gu.useQueuedQueries(Object.values(X)),[ge,G]=j.useState(()=>Kf(i,C,J??new URLSearchParams,te).state),Ee=j.useRef(ge);if(ke("[nuq+ %s `%s`] render - state: %O, iSP: %s",f,L,ge,J),Object.keys(oe.current).join("&")!==Object.values(X).join("&")){const{state:Z,hasChanged:ae}=Kf(i,C,J,te,oe.current,Ee.current);ae&&(ke("[nuq+ %s `%s`] State changed: %O",f,L,{state:Z,initialSearchParams:J,queuedQueries:te,queryRef:oe.current,stateRef:Ee.current}),Ee.current=Z,G(Z)),oe.current=Object.fromEntries(Object.entries(X).map(([re,Te])=>{var ye;return[Te,((ye=i[re])==null?void 0:ye.type)==="multi"?J==null?void 0:J.getAll(Te):(J==null?void 0:J.get(Te))??null]}))}j.useEffect(()=>{const{state:Z,hasChanged:ae}=Kf(i,C,J,te,oe.current,Ee.current);ae&&(ke("[nuq+ %s `%s`] State changed: %O",f,L,{state:Z,initialSearchParams:J,queuedQueries:te,queryRef:oe.current,stateRef:Ee.current}),Ee.current=Z,G(Z))},[Object.values(X).map(Z=>`${Z}=${J==null?void 0:J.getAll(Z)}`).join("&"),JSON.stringify(te)]),j.useEffect(()=>{const Z=Object.keys(i).reduce((ae,re)=>(ae[re]=({state:Te,query:ye})=>{G(Fe=>{const{defaultValue:xe}=i[re],Ve=X[re],q=Te??xe??null,K=Fe[re]??xe??null;return Object.is(K,q)?(ke("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). no change, skipping, resolved: %O",f,L,Ve,Te,xe,Ee.current),Fe):(Ee.current={...Ee.current,[re]:q},oe.current[Ve]=ye,ke("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). updateInternalState, resolved: %O",f,L,Ve,Te,xe,Ee.current),Ee.current)})},ae),{});for(const ae of Object.keys(i)){const re=X[ae];ke("[nuq+ %s `%s`] Subscribing to sync for `%s`",f,re,L),Zf.on(re,Z[ae])}return()=>{for(const ae of Object.keys(i)){const re=X[ae];ke("[nuq+ %s `%s`] Unsubscribing to sync for `%s`",f,re,L),Zf.off(re,Z[ae])}}},[L,X]);const R=j.useCallback((Z,ae={})=>{var K,ee,_e,Oe,b,H;const re=Object.fromEntries(Object.keys(i).map(V=>[V,null])),Te=typeof Z=="function"?Z(Hm(Ee.current,ue))??re:Z??re;ke("[nuq+ %s `%s`] setState: %O",f,L,Te);let ye,Fe=0,xe=!1;const Ve=[];for(let[V,W]of Object.entries(Te)){const P=i[V],de=X[V];if(!P||W===void 0)continue;(ae.clearOnDefault??P.clearOnDefault??A)&&W!==null&&P.defaultValue!==void 0&&(P.eq??((Le,cl)=>Le===cl))(W,P.defaultValue)&&(W=null);const Se=W===null?null:(P.serialize??String)(W);Zf.emit(de,{state:W,query:Se});const lt={key:de,query:Se,options:{history:ae.history??P.history??y,shallow:ae.shallow??P.shallow??T,scroll:ae.scroll??P.scroll??m,startTransition:ae.startTransition??P.startTransition??p}};if(((K=ae==null?void 0:ae.limitUrlUpdates)==null?void 0:K.method)==="debounce"||(h==null?void 0:h.method)==="debounce"||((ee=P.limitUrlUpdates)==null?void 0:ee.method)==="debounce"){lt.options.shallow;const Le=((_e=ae==null?void 0:ae.limitUrlUpdates)==null?void 0:_e.timeMs)??(h==null?void 0:h.timeMs)??((Oe=P.limitUrlUpdates)==null?void 0:Oe.timeMs)??wu.timeMs,cl=Gu.push(lt,Le,Q,s);FeW(V),xe?Qu.flush(Q,s):Qu.getPendingPromise(Q));return ye??q},[L,y,T,m,v,h==null?void 0:h.method,h==null?void 0:h.timeMs,p,X,Q.updateUrl,Q.getSearchParamsSnapshot,Q.rateLimitFactor,s,ue]);return[j.useMemo(()=>Hm(ge,ue),[ge,ue]),R]}function Kf(i,r,f,c,s,y){let m=!1;const T=Object.entries(i).reduce((v,[h,A])=>{const p=(r==null?void 0:r[h])??h,C=c[p],L=A.type==="multi"?[]:null,X=C===void 0?(A.type==="multi"?f==null?void 0:f.getAll(p):f==null?void 0:f.get(p))??L:C;return s&&y&&wm(s[p]??L,X)?(v[h]=y[h]??null,v):(m=!0,v[h]=(L0(X)?null:rv(A.parse,X,p))??null,s&&(s[p]=X),v)},{});if(!m){const v=Object.keys(i),h=Object.keys(y??{});m=v.length!==h.length||v.some(A=>!h.includes(A))}return{state:T,hasChanged:m}}function Hm(i,r){return Object.fromEntries(Object.keys(i).map(f=>[f,i[f]??r[f]??null]))}export{tS as A,lS as L,Pp as N,Ip as O,T0 as R,Qn as a,qp as b,kp as c,Xm as d,to as e,$p as f,iS as g,z0 as h,Vp as i,Kp as j,Lm as k,Jp as l,rm as m,Zp as n,Fp as o,fS as p,cS as q,j as r,uS as s,rS as t,yr as u,Wp as v,Pg as w,eS as x,nS as y,aS as z};