const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-DvSYKMeA.js","./features-animation-dlBJ5TCC.js","./src-UW24ZMRV-D5IQgZfI.js","./index-CoCPE5d4.js"])))=>i.map(i=>d[i]); (function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))i(a);new MutationObserver(a=>{for(const s of a)if(s.type==="childList")for(const r of s.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&i(r)}).observe(document,{childList:!0,subtree:!0});function n(a){const s={};return a.integrity&&(s.integrity=a.integrity),a.referrerPolicy&&(s.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?s.credentials="include":a.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(a){if(a.ep)return;a.ep=!0;const s=n(a);fetch(a.href,s)}})();var jy=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Zg(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var j4={exports:{}},Fy={};/** * @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 OR;function UW(){if(OR)return Fy;OR=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(i,a,s){var r=null;if(s!==void 0&&(r=""+s),a.key!==void 0&&(r=""+a.key),"key"in a){s={};for(var o in a)o!=="key"&&(s[o]=a[o])}else s=a;return a=s.ref,{$$typeof:t,type:i,key:r,ref:a!==void 0?a:null,props:s}}return Fy.Fragment=e,Fy.jsx=n,Fy.jsxs=n,Fy}var IR;function jW(){return IR||(IR=1,j4.exports=UW()),j4.exports}var _=jW(),F4={exports:{}},On={};/** * @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 zR;function FW(){if(zR)return On;zR=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),r=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),d=Symbol.for("react.activity"),p=Symbol.iterator;function g(K){return K===null||typeof K!="object"?null:(K=p&&K[p]||K["@@iterator"],typeof K=="function"?K:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,x={};function S(K,ee,ie){this.props=K,this.context=ee,this.refs=x,this.updater=ie||b}S.prototype.isReactComponent={},S.prototype.setState=function(K,ee){if(typeof K!="object"&&typeof K!="function"&&K!=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,K,ee,"setState")},S.prototype.forceUpdate=function(K){this.updater.enqueueForceUpdate(this,K,"forceUpdate")};function M(){}M.prototype=S.prototype;function C(K,ee,ie){this.props=K,this.context=ee,this.refs=x,this.updater=ie||b}var A=C.prototype=new M;A.constructor=C,w(A,S.prototype),A.isPureReactComponent=!0;var N=Array.isArray;function R(){}var D={H:null,A:null,T:null,S:null},B=Object.prototype.hasOwnProperty;function z(K,ee,ie){var Z=ie.ref;return{$$typeof:t,type:K,key:ee,ref:Z!==void 0?Z:null,props:ie}}function I(K,ee){return z(K.type,ee,K.props)}function U(K){return typeof K=="object"&&K!==null&&K.$$typeof===t}function $(K){var ee={"=":"=0",":":"=2"};return"$"+K.replace(/[=:]/g,function(ie){return ee[ie]})}var G=/\/+/g;function k(K,ee){return typeof K=="object"&&K!==null&&K.key!=null?$(""+K.key):ee.toString(36)}function X(K){switch(K.status){case"fulfilled":return K.value;case"rejected":throw K.reason;default:switch(typeof K.status=="string"?K.then(R,R):(K.status="pending",K.then(function(ee){K.status==="pending"&&(K.status="fulfilled",K.value=ee)},function(ee){K.status==="pending"&&(K.status="rejected",K.reason=ee)})),K.status){case"fulfilled":return K.value;case"rejected":throw K.reason}}throw K}function V(K,ee,ie,Z,ue){var se=typeof K;(se==="undefined"||se==="boolean")&&(K=null);var ae=!1;if(K===null)ae=!0;else switch(se){case"bigint":case"string":case"number":ae=!0;break;case"object":switch(K.$$typeof){case t:case e:ae=!0;break;case h:return ae=K._init,V(ae(K._payload),ee,ie,Z,ue)}}if(ae)return ue=ue(K),ae=Z===""?"."+k(K,0):Z,N(ue)?(ie="",ae!=null&&(ie=ae.replace(G,"$&/")+"/"),V(ue,ee,ie,"",function(ye){return ye})):ue!=null&&(U(ue)&&(ue=I(ue,ie+(ue.key==null||K&&K.key===ue.key?"":(""+ue.key).replace(G,"$&/")+"/")+ae)),ee.push(ue)),1;ae=0;var ce=Z===""?".":Z+":";if(N(K))for(var pe=0;pe>>1,Y=V[J];if(0>>1;Ja(ie,W))Za(ue,ie)?(V[J]=ue,V[Z]=W,J=Z):(V[J]=ie,V[ee]=W,J=ee);else if(Za(ue,W))V[J]=ue,V[Z]=W,J=Z;else break e}}return H}function a(V,H){var W=V.sortIndex-H.sortIndex;return W!==0?W:V.id-H.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var r=Date,o=r.now();t.unstable_now=function(){return r.now()-o}}var c=[],u=[],h=1,d=null,p=3,g=!1,b=!1,w=!1,x=!1,S=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function A(V){for(var H=n(u);H!==null;){if(H.callback===null)i(u);else if(H.startTime<=V)i(u),H.sortIndex=H.expirationTime,e(c,H);else break;H=n(u)}}function N(V){if(w=!1,A(V),!b)if(n(c)!==null)b=!0,R||(R=!0,$());else{var H=n(u);H!==null&&X(N,H.startTime-V)}}var R=!1,D=-1,B=5,z=-1;function I(){return x?!0:!(t.unstable_now()-zV&&I());){var J=d.callback;if(typeof J=="function"){d.callback=null,p=d.priorityLevel;var Y=J(d.expirationTime<=V);if(V=t.unstable_now(),typeof Y=="function"){d.callback=Y,A(V),H=!0;break t}d===n(c)&&i(c),A(V)}else i(c);d=n(c)}if(d!==null)H=!0;else{var K=n(u);K!==null&&X(N,K.startTime-V),H=!1}}break e}finally{d=null,p=W,g=!1}H=void 0}}finally{H?$():R=!1}}}var $;if(typeof C=="function")$=function(){C(U)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,k=G.port2;G.port1.onmessage=U,$=function(){k.postMessage(null)}}else $=function(){S(U,0)};function X(V,H){D=S(function(){V(t.unstable_now())},H)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(V){V.callback=null},t.unstable_forceFrameRate=function(V){0>V||125J?(V.sortIndex=W,e(u,V),n(c)===null&&V===n(u)&&(w?(M(D),D=-1):w=!0,X(N,W-J))):(V.sortIndex=Y,e(c,V),b||g||(b=!0,R||(R=!0,$()))),V},t.unstable_shouldYield=I,t.unstable_wrapCallback=function(V){var H=p;return function(){var W=p;p=H;try{return V.apply(this,arguments)}finally{p=W}}}})(H4)),H4}var jR;function kW(){return jR||(jR=1,k4.exports=VW()),k4.exports}var $4={exports:{}},tr={};/** * @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 FR;function HW(){if(FR)return tr;FR=1;var t=om();function e(c){var u="https://react.dev/errors/"+c;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),$4.exports=HW(),$4.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 kR;function $W(){if(kR)return Vy;kR=1;var t=kW(),e=om(),n=L9();function i(l){var f="https://react.dev/errors/"+l;if(1Y||(l.current=J[Y],J[Y]=null,Y--)}function ie(l,f){Y++,J[Y]=l.current,l.current=f}var Z=K(null),ue=K(null),se=K(null),ae=K(null);function ce(l,f){switch(ie(se,f),ie(ue,l),ie(Z,null),f.nodeType){case 9:case 11:l=(l=f.documentElement)&&(l=l.namespaceURI)?iR(l):0;break;default:if(l=f.tagName,f=f.namespaceURI)f=iR(f),l=aR(f,l);else switch(l){case"svg":l=1;break;case"math":l=2;break;default:l=0}}ee(Z),ie(Z,l)}function pe(){ee(Z),ee(ue),ee(se)}function ye(l){l.memoizedState!==null&&ie(ae,l);var f=Z.current,y=aR(f,l.type);f!==y&&(ie(ue,l),ie(Z,y))}function _e(l){ue.current===l&&(ee(Z),ee(ue)),ae.current===l&&(ee(ae),Iy._currentValue=W)}var me,ne;function be(l){if(me===void 0)try{throw Error()}catch(y){var f=y.stack.trim().match(/\n( *(at )?)/);me=f&&f[1]||"",ne=-1)":-1L||Me[E]!==Ge[L]){var ht=` `+Me[E].replace(" at new "," at ");return l.displayName&&ht.includes("")&&(ht=ht.replace("",l.displayName)),ht}while(1<=E&&0<=L);break}}}finally{xe=!1,Error.prepareStackTrace=y}return(y=l?l.displayName||l.name:"")?be(y):""}function ve(l,f){switch(l.tag){case 26:case 27:case 5:return be(l.type);case 16:return be("Lazy");case 13:return l.child!==f&&f!==null?be("Suspense Fallback"):be("Suspense");case 19:return be("SuspenseList");case 0:case 15:return he(l.type,!1);case 11:return he(l.type.render,!1);case 1:return he(l.type,!0);case 31:return be("Activity");default:return""}}function Oe(l){try{var f="",y=null;do f+=ve(l,y),y=l,l=l.return;while(l);return f}catch(E){return` Error generating stack: `+E.message+` `+E.stack}}var Le=Object.prototype.hasOwnProperty,Ae=t.unstable_scheduleCallback,et=t.unstable_cancelCallback,tt=t.unstable_shouldYield,re=t.unstable_requestPaint,te=t.unstable_now,we=t.unstable_getCurrentPriorityLevel,Ce=t.unstable_ImmediatePriority,Ie=t.unstable_UserBlockingPriority,Pe=t.unstable_NormalPriority,Ze=t.unstable_LowPriority,We=t.unstable_IdlePriority,mt=t.log,nt=t.unstable_setDisableYieldValue,Ye=null,Je=null;function jt(l){if(typeof mt=="function"&&nt(l),Je&&typeof Je.setStrictMode=="function")try{Je.setStrictMode(Ye,l)}catch{}}var wt=Math.clz32?Math.clz32:Te,Et=Math.log,zt=Math.LN2;function Te(l){return l>>>=0,l===0?32:31-(Et(l)/zt|0)|0}var pt=256,at=262144,St=4194304;function ct(l){var f=l&42;if(f!==0)return f;switch(l&-l){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 l&261888;case 262144:case 524288:case 1048576:case 2097152:return l&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return l&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return l}}function it(l,f,y){var E=l.pendingLanes;if(E===0)return 0;var L=0,j=l.suspendedLanes,Q=l.pingedLanes;l=l.warmLanes;var oe=E&134217727;return oe!==0?(E=oe&~j,E!==0?L=ct(E):(Q&=oe,Q!==0?L=ct(Q):y||(y=oe&~l,y!==0&&(L=ct(y))))):(oe=E&~j,oe!==0?L=ct(oe):Q!==0?L=ct(Q):y||(y=E&~l,y!==0&&(L=ct(y)))),L===0?0:f!==0&&f!==L&&(f&j)===0&&(j=L&-L,y=f&-f,j>=y||j===32&&(y&4194048)!==0)?f:L}function Nt(l,f){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&f)===0}function kt(l,f){switch(l){case 1:case 2:case 4:case 8:case 64:return f+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 f+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 Xt(){var l=St;return St<<=1,(St&62914560)===0&&(St=4194304),l}function rn(l){for(var f=[],y=0;31>y;y++)f.push(l);return f}function ge(l,f){l.pendingLanes|=f,f!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function Se(l,f,y,E,L,j){var Q=l.pendingLanes;l.pendingLanes=y,l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0,l.expiredLanes&=y,l.entangledLanes&=y,l.errorRecoveryDisabledLanes&=y,l.shellSuspendCounter=0;var oe=l.entanglements,Me=l.expirationTimes,Ge=l.hiddenUpdates;for(y=Q&~y;0"u")return null;try{return l.activeElement||l.body}catch{return l.body}}var vc=/[\n"\\]/g;function Kn(l){return l.replace(vc,function(f){return"\\"+f.charCodeAt(0).toString(16)+" "})}function Ja(l,f,y,E,L,j,Q,oe){l.name="",Q!=null&&typeof Q!="function"&&typeof Q!="symbol"&&typeof Q!="boolean"?l.type=Q:l.removeAttribute("type"),f!=null?Q==="number"?(f===0&&l.value===""||l.value!=f)&&(l.value=""+tn(f)):l.value!==""+tn(f)&&(l.value=""+tn(f)):Q!=="submit"&&Q!=="reset"||l.removeAttribute("value"),f!=null?Ea(l,Q,tn(f)):y!=null?Ea(l,Q,tn(y)):E!=null&&l.removeAttribute("value"),L==null&&j!=null&&(l.defaultChecked=!!j),L!=null&&(l.checked=L&&typeof L!="function"&&typeof L!="symbol"),oe!=null&&typeof oe!="function"&&typeof oe!="symbol"&&typeof oe!="boolean"?l.name=""+tn(oe):l.removeAttribute("name")}function hs(l,f,y,E,L,j,Q,oe){if(j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"&&(l.type=j),f!=null||y!=null){if(!(j!=="submit"&&j!=="reset"||f!=null)){Fa(l);return}y=y!=null?""+tn(y):"",f=f!=null?""+tn(f):y,oe||f===l.value||(l.value=f),l.defaultValue=f}E=E??L,E=typeof E!="function"&&typeof E!="symbol"&&!!E,l.checked=oe?l.checked:!!E,l.defaultChecked=!!E,Q!=null&&typeof Q!="function"&&typeof Q!="symbol"&&typeof Q!="boolean"&&(l.name=Q),Fa(l)}function Ea(l,f,y){f==="number"&&wa(l.ownerDocument)===l||l.defaultValue===""+y||(l.defaultValue=""+y)}function ha(l,f,y,E){if(l=l.options,f){f={};for(var L=0;L"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Mm=!1;if(Xo)try{var xh={};Object.defineProperty(xh,"passive",{get:function(){Mm=!0}}),window.addEventListener("test",xh,xh),window.removeEventListener("test",xh,xh)}catch{Mm=!1}var bc=null,Tm=null,xc=null;function Cm(){if(xc)return xc;var l,f=Tm,y=f.length,E,L="value"in bc?bc.value:bc.textContent,j=L.length;for(l=0;l=wc),Ch=" ",Av=!1;function Dm(l,f){switch(l){case"keyup":return Cv.indexOf(f.keyCode)!==-1;case"keydown":return f.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ld(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var Ec=!1;function Lm(l,f){switch(l){case"compositionend":return Ld(f);case"keypress":return f.which!==32?null:(Av=!0,Ch);case"textInput":return l=f.data,l===Ch&&Av?null:l;default:return null}}function Rx(l,f){if(Ec)return l==="compositionend"||!Pu&&Dm(l,f)?(l=Cm(),xc=Tm=bc=null,Ec=!1,l):null;switch(l){case"paste":return null;case"keypress":if(!(f.ctrlKey||f.altKey||f.metaKey)||f.ctrlKey&&f.altKey){if(f.char&&1=f)return{node:y,offset:f-l};l=E}e:{for(;y;){if(y.nextSibling){y=y.nextSibling;break e}y=y.parentNode}y=void 0}y=Lv(y)}}function Im(l,f){return l&&f?l===f?!0:l&&l.nodeType===3?!1:f&&f.nodeType===3?Im(l,f.parentNode):"contains"in l?l.contains(f):l.compareDocumentPosition?!!(l.compareDocumentPosition(f)&16):!1:!1}function zm(l){l=l!=null&&l.ownerDocument!=null&&l.ownerDocument.defaultView!=null?l.ownerDocument.defaultView:window;for(var f=wa(l.document);f instanceof l.HTMLIFrameElement;){try{var y=typeof f.contentWindow.location.href=="string"}catch{y=!1}if(y)l=f.contentWindow;else break;f=wa(l.document)}return f}function Ud(l){var f=l&&l.nodeName&&l.nodeName.toLowerCase();return f&&(f==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||f==="textarea"||l.contentEditable==="true")}var Ox=Xo&&"documentMode"in document&&11>=document.documentMode,jd=null,Bm=null,Fd=null,Sr=!1;function Um(l,f,y){var E=y.window===y?y.document:y.nodeType===9?y:y.ownerDocument;Sr||jd==null||jd!==wa(E)||(E=jd,"selectionStart"in E&&Ud(E)?E={start:E.selectionStart,end:E.selectionEnd}:(E=(E.ownerDocument&&E.ownerDocument.defaultView||window).getSelection(),E={anchorNode:E.anchorNode,anchorOffset:E.anchorOffset,focusNode:E.focusNode,focusOffset:E.focusOffset}),Fd&&Bd(Fd,E)||(Fd=E,E=x2(Bm,"onSelect"),0>=Q,L-=Q,Qo=1<<32-wt(f)+L|y<Hn?(li=un,un=null):li=un.sibling;var Ai=qe(je,un,$e[Hn],bt);if(Ai===null){un===null&&(un=li);break}l&&un&&Ai.alternate===null&&f(je,un),Ne=j(Ai,Ne,Hn),Ci===null?gn=Ai:Ci.sibling=Ai,Ci=Ai,un=li}if(Hn===$e.length)return y(je,un),ni&&Ul(je,Hn),gn;if(un===null){for(;Hn<$e.length;Hn++)un=xt(je,$e[Hn],bt),un!==null&&(Ne=j(un,Ne,Hn),Ci===null?gn=un:Ci.sibling=un,Ci=un);return ni&&Ul(je,Hn),gn}for(un=E(un);Hn<$e.length;Hn++)li=st(un,je,Hn,$e[Hn],bt),li!==null&&(l&&li.alternate!==null&&un.delete(li.key===null?Hn:li.key),Ne=j(li,Ne,Hn),Ci===null?gn=li:Ci.sibling=li,Ci=li);return l&&un.forEach(function(gf){return f(je,gf)}),ni&&Ul(je,Hn),gn}function bn(je,Ne,$e,bt){if($e==null)throw Error(i(151));for(var gn=null,Ci=null,un=Ne,Hn=Ne=0,li=null,Ai=$e.next();un!==null&&!Ai.done;Hn++,Ai=$e.next()){un.index>Hn?(li=un,un=null):li=un.sibling;var gf=qe(je,un,Ai.value,bt);if(gf===null){un===null&&(un=li);break}l&&un&&gf.alternate===null&&f(je,un),Ne=j(gf,Ne,Hn),Ci===null?gn=gf:Ci.sibling=gf,Ci=gf,un=li}if(Ai.done)return y(je,un),ni&&Ul(je,Hn),gn;if(un===null){for(;!Ai.done;Hn++,Ai=$e.next())Ai=xt(je,Ai.value,bt),Ai!==null&&(Ne=j(Ai,Ne,Hn),Ci===null?gn=Ai:Ci.sibling=Ai,Ci=Ai);return ni&&Ul(je,Hn),gn}for(un=E(un);!Ai.done;Hn++,Ai=$e.next())Ai=st(un,je,Hn,Ai.value,bt),Ai!==null&&(l&&Ai.alternate!==null&&un.delete(Ai.key===null?Hn:Ai.key),Ne=j(Ai,Ne,Hn),Ci===null?gn=Ai:Ci.sibling=Ai,Ci=Ai);return l&&un.forEach(function(BW){return f(je,BW)}),ni&&Ul(je,Hn),gn}function ki(je,Ne,$e,bt){if(typeof $e=="object"&&$e!==null&&$e.type===w&&$e.key===null&&($e=$e.props.children),typeof $e=="object"&&$e!==null){switch($e.$$typeof){case g:e:{for(var gn=$e.key;Ne!==null;){if(Ne.key===gn){if(gn=$e.type,gn===w){if(Ne.tag===7){y(je,Ne.sibling),bt=L(Ne,$e.props.children),bt.return=je,je=bt;break e}}else if(Ne.elementType===gn||typeof gn=="object"&&gn!==null&&gn.$$typeof===B&&Vu(gn)===Ne.type){y(je,Ne.sibling),bt=L(Ne,$e.props),jh(bt,$e),bt.return=je,je=bt;break e}y(je,Ne);break}else f(je,Ne);Ne=Ne.sibling}$e.type===w?(bt=Bl($e.props.children,je.mode,bt,$e.key),bt.return=je,je=bt):(bt=Dh($e.type,$e.key,$e.props,null,je.mode,bt),jh(bt,$e),bt.return=je,je=bt)}return Q(je);case b:e:{for(gn=$e.key;Ne!==null;){if(Ne.key===gn)if(Ne.tag===4&&Ne.stateNode.containerInfo===$e.containerInfo&&Ne.stateNode.implementation===$e.implementation){y(je,Ne.sibling),bt=L(Ne,$e.children||[]),bt.return=je,je=bt;break e}else{y(je,Ne);break}else f(je,Ne);Ne=Ne.sibling}bt=wo($e,je.mode,bt),bt.return=je,je=bt}return Q(je);case B:return $e=Vu($e),ki(je,Ne,$e,bt)}if(X($e))return on(je,Ne,$e,bt);if($($e)){if(gn=$($e),typeof gn!="function")throw Error(i(150));return $e=gn.call($e),bn(je,Ne,$e,bt)}if(typeof $e.then=="function")return ki(je,Ne,Ym($e),bt);if($e.$$typeof===C)return ki(je,Ne,zh(je,$e),bt);Fh(je,$e)}return typeof $e=="string"&&$e!==""||typeof $e=="number"||typeof $e=="bigint"?($e=""+$e,Ne!==null&&Ne.tag===6?(y(je,Ne.sibling),bt=L(Ne,$e),bt.return=je,je=bt):(y(je,Ne),bt=Hm($e,je.mode,bt),bt.return=je,je=bt),Q(je)):y(je,Ne)}return function(je,Ne,$e,bt){try{Uc=0;var gn=ki(je,Ne,$e,bt);return Bc=null,gn}catch(un){if(un===zc||un===To)throw un;var Ci=Rs(29,un,null,je.mode);return Ci.lanes=bt,Ci.return=je,Ci}finally{}}}var ku=qd(!0),kx=qd(!1),jc=!1;function qv(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Yv(l,f){l=l.updateQueue,f.updateQueue===l&&(f.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,callbacks:null})}function tl(l){return{lane:l,tag:0,payload:null,callback:null,next:null}}function $l(l,f,y){var E=l.updateQueue;if(E===null)return null;if(E=E.shared,(ri&2)!==0){var L=E.pending;return L===null?f.next=f:(f.next=L.next,L.next=f),E.pending=f,f=$d(l),km(l,null,y),f}return Ph(l,E,f,y),$d(l)}function Fc(l,f,y){if(f=f.updateQueue,f!==null&&(f=f.shared,(y&4194048)!==0)){var E=f.lanes;E&=l.pendingLanes,y|=E,f.lanes=y,lt(l,y)}}function Zm(l,f){var y=l.updateQueue,E=l.alternate;if(E!==null&&(E=E.updateQueue,y===E)){var L=null,j=null;if(y=y.firstBaseUpdate,y!==null){do{var Q={lane:y.lane,tag:y.tag,payload:y.payload,callback:null,next:null};j===null?L=j=Q:j=j.next=Q,y=y.next}while(y!==null);j===null?L=j=f:j=j.next=f}else L=j=f;y={baseState:E.baseState,firstBaseUpdate:L,lastBaseUpdate:j,shared:E.shared,callbacks:E.callbacks},l.updateQueue=y;return}l=y.lastBaseUpdate,l===null?y.firstBaseUpdate=f:l.next=f,y.lastBaseUpdate=f}var Zv=!1;function Vh(){if(Zv){var l=Mo;if(l!==null)throw l}}function Hu(l,f,y,E){Zv=!1;var L=l.updateQueue;jc=!1;var j=L.firstBaseUpdate,Q=L.lastBaseUpdate,oe=L.shared.pending;if(oe!==null){L.shared.pending=null;var Me=oe,Ge=Me.next;Me.next=null,Q===null?j=Ge:Q.next=Ge,Q=Me;var ht=l.alternate;ht!==null&&(ht=ht.updateQueue,oe=ht.lastBaseUpdate,oe!==Q&&(oe===null?ht.firstBaseUpdate=Ge:oe.next=Ge,ht.lastBaseUpdate=Me))}if(j!==null){var xt=L.baseState;Q=0,ht=Ge=Me=null,oe=j;do{var qe=oe.lane&-536870913,st=qe!==oe.lane;if(st?(Qn&qe)===qe:(E&qe)===qe){qe!==0&&qe===Hl&&(Zv=!0),ht!==null&&(ht=ht.next={lane:0,tag:oe.tag,payload:oe.payload,callback:null,next:null});e:{var on=l,bn=oe;qe=f;var ki=y;switch(bn.tag){case 1:if(on=bn.payload,typeof on=="function"){xt=on.call(ki,xt,qe);break e}xt=on;break e;case 3:on.flags=on.flags&-65537|128;case 0:if(on=bn.payload,qe=typeof on=="function"?on.call(ki,xt,qe):on,qe==null)break e;xt=d({},xt,qe);break e;case 2:jc=!0}}qe=oe.callback,qe!==null&&(l.flags|=64,st&&(l.flags|=8192),st=L.callbacks,st===null?L.callbacks=[qe]:st.push(qe))}else st={lane:qe,tag:oe.tag,payload:oe.payload,callback:oe.callback,next:null},ht===null?(Ge=ht=st,Me=xt):ht=ht.next=st,Q|=qe;if(oe=oe.next,oe===null){if(oe=L.shared.pending,oe===null)break;st=oe,oe=st.next,st.next=null,L.lastBaseUpdate=st,L.shared.pending=null}}while(!0);ht===null&&(Me=xt),L.baseState=Me,L.firstBaseUpdate=Ge,L.lastBaseUpdate=ht,j===null&&(L.shared.lanes=0),Or|=Q,l.lanes=Q,l.memoizedState=xt}}function nl(l,f){if(typeof l!="function")throw Error(i(191,l));l.call(f)}function is(l,f){var y=l.callbacks;if(y!==null)for(l.callbacks=null,l=0;lj?j:8;var Q=V.T,oe={};V.T=oe,Wh(l,!1,f,y);try{var Me=L(),Ge=V.S;if(Ge!==null&&Ge(oe,Me),Me!==null&&typeof Me=="object"&&typeof Me.then=="function"){var ht=Wv(Me,E);Zd(l,f,ht,Os(l))}else Zd(l,f,E,Os(l))}catch(xt){Zd(l,f,{then:function(){},status:"rejected",reason:xt},Os())}finally{H.p=j,Q!==null&&oe.types!==null&&(Q.types=oe.types),V.T=Q}}function c4(){}function xy(l,f,y,E){if(l.tag!==5)throw Error(i(476));var L=o2(l).queue;by(l,L,f,W,y===null?c4:function(){return _y(l),y(E)})}function o2(l){var f=l.memoizedState;if(f!==null)return f;f={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wl,lastRenderedState:W},next:null};var y={};return f.next={memoizedState:y,baseState:y,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wl,lastRenderedState:y},next:null},l.memoizedState=f,l=l.alternate,l!==null&&(l.memoizedState=f),f}function _y(l){var f=o2(l);f.next===null&&(f=l.alternate.memoizedState),Zd(l,f.next.queue,{},Os())}function Sy(){return $a(Iy)}function as(){return pa().memoizedState}function wy(){return pa().memoizedState}function u4(l){for(var f=l.return;f!==null;){switch(f.tag){case 24:case 3:var y=Os();l=tl(y);var E=$l(f,l,y);E!==null&&(v(E,f,y),Fc(E,f,y)),f={cache:Hv()},l.payload=f;return}f=f.return}}function d4(l,f,y){var E=Os();y={lane:E,revertLane:0,gesture:null,action:y,hasEagerState:!1,eagerState:null,next:null},Kl(l)?Gu(f,y):(y=Hd(l,f,y,E),y!==null&&(v(y,l,E),Xs(y,f,E)))}function l2(l,f,y){var E=Os();Zd(l,f,y,E)}function Zd(l,f,y,E){var L={lane:E,revertLane:0,gesture:null,action:y,hasEagerState:!1,eagerState:null,next:null};if(Kl(l))Gu(f,L);else{var j=l.alternate;if(l.lanes===0&&(j===null||j.lanes===0)&&(j=f.lastRenderedReducer,j!==null))try{var Q=f.lastRenderedState,oe=j(Q,y);if(L.hasEagerState=!0,L.eagerState=oe,Wi(oe,Q))return Ph(l,f,L,0),Mi===null&&Nc(),!1}catch{}finally{}if(y=Hd(l,f,L,E),y!==null)return v(y,l,E),Xs(y,f,E),!0}return!1}function Wh(l,f,y,E){if(E={lane:2,revertLane:m4(),gesture:null,action:E,hasEagerState:!1,eagerState:null,next:null},Kl(l)){if(f)throw Error(i(479))}else f=Hd(l,y,E,2),f!==null&&v(f,l,2)}function Kl(l){var f=l.alternate;return l===_n||f!==null&&f===_n}function Gu(l,f){il=Jm=!0;var y=l.pending;y===null?f.next=f:(f.next=y.next,y.next=f),l.pending=f}function Xs(l,f,y){if((y&4194048)!==0){var E=f.lanes;E&=l.pendingLanes,y|=E,f.lanes=y,lt(l,y)}}var Kh={readContext:$a,use:t0,useCallback:ra,useContext:ra,useEffect:ra,useImperativeHandle:ra,useLayoutEffect:ra,useInsertionEffect:ra,useMemo:ra,useReducer:ra,useRef:ra,useState:ra,useDebugValue:ra,useDeferredValue:ra,useTransition:ra,useSyncExternalStore:ra,useId:ra,useHostTransitionStatus:ra,useFormState:ra,useActionState:ra,useOptimistic:ra,useMemoCache:ra,useCacheRefresh:ra};Kh.useEffectEvent=ra;var c2={readContext:$a,use:t0,useCallback:function(l,f){return Ds().memoizedState=[l,f===void 0?null:f],l},useContext:$a,useEffect:i2,useImperativeHandle:function(l,f,y){y=y!=null?y.concat([l]):null,r0(4194308,4,py.bind(null,f,l),y)},useLayoutEffect:function(l,f){return r0(4194308,4,l,f)},useInsertionEffect:function(l,f){r0(4,2,l,f)},useMemo:function(l,f){var y=Ds();f=f===void 0?null:f;var E=l();if($u){jt(!0);try{l()}finally{jt(!1)}}return y.memoizedState=[E,f],E},useReducer:function(l,f,y){var E=Ds();if(y!==void 0){var L=y(f);if($u){jt(!0);try{y(f)}finally{jt(!1)}}}else L=f;return E.memoizedState=E.baseState=L,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:L},E.queue=l,l=l.dispatch=d4.bind(null,_n,l),[E.memoizedState,l]},useRef:function(l){var f=Ds();return l={current:l},f.memoizedState=l},useState:function(l){l=Gh(l);var f=l.queue,y=l2.bind(null,_n,f);return f.dispatch=y,[l.memoizedState,y]},useDebugValue:c0,useDeferredValue:function(l,f){var y=Ds();return vy(y,l,f)},useTransition:function(){var l=Gh(!1);return l=by.bind(null,_n,l.queue,!0,!1),Ds().memoizedState=l,[!1,l]},useSyncExternalStore:function(l,f,y){var E=_n,L=Ds();if(ni){if(y===void 0)throw Error(i(407));y=y()}else{if(y=f(),Mi===null)throw Error(i(349));(Qn&127)!==0||Wx(E,f,y)}L.memoizedState=y;var j={value:y,getSnapshot:f};return L.queue=j,i2(uy.bind(null,E,j,l),[l]),E.flags|=2048,Yd(9,{destroy:void 0},cy.bind(null,E,j,y,f),null),y},useId:function(){var l=Ds(),f=Mi.identifierPrefix;if(ni){var y=Jo,E=Qo;y=(E&~(1<<32-wt(E)-1)).toString(32)+y,f="_"+f+"R_"+y,y=e0++,0<\/script>",j=j.removeChild(j.firstChild);break;case"select":j=typeof E.is=="string"?Q.createElement("select",{is:E.is}):Q.createElement("select"),E.multiple?j.multiple=!0:E.size&&(j.size=E.size);break;default:j=typeof E.is=="string"?Q.createElement(L,{is:E.is}):Q.createElement(L)}}j[vt]=f,j[Ot]=E;e:for(Q=f.child;Q!==null;){if(Q.tag===5||Q.tag===6)j.appendChild(Q.stateNode);else if(Q.tag!==4&&Q.tag!==27&&Q.child!==null){Q.child.return=Q,Q=Q.child;continue}if(Q===f)break e;for(;Q.sibling===null;){if(Q.return===null||Q.return===f)break e;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}f.stateNode=j;e:switch(Is(j,L,E),L){case"button":case"input":case"select":case"textarea":E=!!E.autoFocus;break e;case"img":E=!0;break e;default:E=!1}E&&Ys(f)}}return Ni(f),$c(f,f.type,l===null?null:l.memoizedProps,f.pendingProps,y),null;case 6:if(l&&f.stateNode!=null)l.memoizedProps!==E&&Ys(f);else{if(typeof E!="string"&&f.stateNode===null)throw Error(i(166));if(l=se.current,Bu(f)){if(l=f.stateNode,y=f.memoizedProps,E=null,L=ka,L!==null)switch(L.tag){case 27:case 5:E=L.memoizedProps}l[vt]=f,l=!!(l.nodeValue===y||E!==null&&E.suppressHydrationWarning===!0||tR(l.nodeValue,y)),l||Zn(f,!0)}else l=_2(l).createTextNode(E),l[vt]=f,f.stateNode=l}return Ni(f),null;case 31:if(y=f.memoizedState,l===null||l.memoizedState!==null){if(E=Bu(f),y!==null){if(l===null){if(!E)throw Error(i(318));if(l=f.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(i(557));l[vt]=f}else Uu(),(f.flags&128)===0&&(f.memoizedState=null),f.flags|=4;Ni(f),l=!1}else y=jv(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=y),l=!0;if(!l)return f.flags&256?(Mr(f),f):(Mr(f),null);if((f.flags&128)!==0)throw Error(i(558))}return Ni(f),null;case 13:if(E=f.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(L=Bu(f),E!==null&&E.dehydrated!==null){if(l===null){if(!L)throw Error(i(318));if(L=f.memoizedState,L=L!==null?L.dehydrated:null,!L)throw Error(i(317));L[vt]=f}else Uu(),(f.flags&128)===0&&(f.memoizedState=null),f.flags|=4;Ni(f),L=!1}else L=jv(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=L),L=!0;if(!L)return f.flags&256?(Mr(f),f):(Mr(f),null)}return Mr(f),(f.flags&128)!==0?(f.lanes=y,f):(y=E!==null,l=l!==null&&l.memoizedState!==null,y&&(E=f.child,L=null,E.alternate!==null&&E.alternate.memoizedState!==null&&E.alternate.memoizedState.cachePool!==null&&(L=E.alternate.memoizedState.cachePool.pool),j=null,E.memoizedState!==null&&E.memoizedState.cachePool!==null&&(j=E.memoizedState.cachePool.pool),j!==L&&(E.flags|=2048)),y!==l&&y&&(f.child.flags|=8192),sf(f,f.updateQueue),Ni(f),null);case 4:return pe(),l===null&&b4(f.stateNode.containerInfo),Ni(f),null;case 10:return qr(f.type),Ni(f),null;case 19:if(ee(sa),E=f.memoizedState,E===null)return Ni(f),null;if(L=(f.flags&128)!==0,j=E.rendering,j===null)if(L)ip(E,!1);else{if(Ti!==0||l!==null&&(l.flags&128)!==0)for(l=f.child;l!==null;){if(j=Qm(l),j!==null){for(f.flags|=128,ip(E,!1),l=j.updateQueue,f.updateQueue=l,sf(f,l),f.subtreeFlags=0,l=y,y=f.child;y!==null;)gs(y,l),y=y.sibling;return ie(sa,sa.current&1|2),ni&&Ul(f,E.treeForkCount),f.child}l=l.sibling}E.tail!==null&&te()>zr&&(f.flags|=128,L=!0,ip(E,!1),f.lanes=4194304)}else{if(!L)if(l=Qm(j),l!==null){if(f.flags|=128,L=!0,l=l.updateQueue,f.updateQueue=l,sf(f,l),ip(E,!0),E.tail===null&&E.tailMode==="hidden"&&!j.alternate&&!ni)return Ni(f),null}else 2*te()-E.renderingStartTime>zr&&y!==536870912&&(f.flags|=128,L=!0,ip(E,!1),f.lanes=4194304);E.isBackwards?(j.sibling=f.child,f.child=j):(l=E.last,l!==null?l.sibling=j:f.child=j,E.last=j)}return E.tail!==null?(l=E.tail,E.rendering=l,E.tail=l.sibling,E.renderingStartTime=te(),l.sibling=null,y=sa.current,ie(sa,L?y&1|2:y&1),ni&&Ul(f,E.treeForkCount),l):(Ni(f),null);case 22:case 23:return Mr(f),ys(),E=f.memoizedState!==null,l!==null?l.memoizedState!==null!==E&&(f.flags|=8192):E&&(f.flags|=8192),E?(y&536870912)!==0&&(f.flags&128)===0&&(Ni(f),f.subtreeFlags&6&&(f.flags|=8192)):Ni(f),y=f.updateQueue,y!==null&&sf(f,y.retryQueue),y=null,l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(y=l.memoizedState.cachePool.pool),E=null,f.memoizedState!==null&&f.memoizedState.cachePool!==null&&(E=f.memoizedState.cachePool.pool),E!==y&&(f.flags|=2048),l!==null&&ee(Ic),null;case 24:return y=null,l!==null&&(y=l.memoizedState.cache),f.memoizedState.cache!==y&&(f.flags|=2048),qr(hn),Ni(f),null;case 25:return null;case 30:return null}throw Error(i(156,f.tag))}function p0(l,f){switch(Lc(f),f.tag){case 1:return l=f.flags,l&65536?(f.flags=l&-65537|128,f):null;case 3:return qr(hn),pe(),l=f.flags,(l&65536)!==0&&(l&128)===0?(f.flags=l&-65537|128,f):null;case 26:case 27:case 5:return _e(f),null;case 31:if(f.memoizedState!==null){if(Mr(f),f.alternate===null)throw Error(i(340));Uu()}return l=f.flags,l&65536?(f.flags=l&-65537|128,f):null;case 13:if(Mr(f),l=f.memoizedState,l!==null&&l.dehydrated!==null){if(f.alternate===null)throw Error(i(340));Uu()}return l=f.flags,l&65536?(f.flags=l&-65537|128,f):null;case 19:return ee(sa),null;case 4:return pe(),null;case 10:return qr(f.type),null;case 22:case 23:return Mr(f),ys(),l!==null&&ee(Ic),l=f.flags,l&65536?(f.flags=l&-65537|128,f):null;case 24:return qr(hn),null;case 25:return null;default:return null}}function Ku(l,f){switch(Lc(f),f.tag){case 3:qr(hn),pe();break;case 26:case 27:case 5:_e(f);break;case 4:pe();break;case 31:f.memoizedState!==null&&Mr(f);break;case 13:Mr(f);break;case 19:ee(sa);break;case 10:qr(f.type);break;case 22:case 23:Mr(f),ys(),l!==null&&ee(Ic);break;case 24:qr(hn)}}function rl(l,f){try{var y=f.updateQueue,E=y!==null?y.lastEffect:null;if(E!==null){var L=E.next;y=L;do{if((y.tag&l)===l){E=void 0;var j=y.create,Q=y.inst;E=j(),Q.destroy=E}y=y.next}while(y!==L)}}catch(oe){zi(f,f.return,oe)}}function Jr(l,f,y){try{var E=f.updateQueue,L=E!==null?E.lastEffect:null;if(L!==null){var j=L.next;E=j;do{if((E.tag&l)===l){var Q=E.inst,oe=Q.destroy;if(oe!==void 0){Q.destroy=void 0,L=f;var Me=y,Ge=oe;try{Ge()}catch(ht){zi(L,Me,ht)}}}E=E.next}while(E!==j)}}catch(ht){zi(f,f.return,ht)}}function Gc(l){var f=l.updateQueue;if(f!==null){var y=l.stateNode;try{is(f,y)}catch(E){zi(l,l.return,E)}}}function Cy(l,f,y){y.props=ss(l.type,l.memoizedProps),y.state=l.memoizedState;try{y.componentWillUnmount()}catch(E){zi(l,f,E)}}function ol(l,f){try{var y=l.ref;if(y!==null){switch(l.tag){case 26:case 27:case 5:var E=l.stateNode;break;case 30:E=l.stateNode;break;default:E=l.stateNode}typeof y=="function"?l.refCleanup=y(E):y.current=E}}catch(L){zi(l,f,L)}}function Dr(l,f){var y=l.ref,E=l.refCleanup;if(y!==null)if(typeof E=="function")try{E()}catch(L){zi(l,f,L)}finally{l.refCleanup=null,l=l.alternate,l!=null&&(l.refCleanup=null)}else if(typeof y=="function")try{y(null)}catch(L){zi(l,f,L)}else y.current=null}function Lr(l){var f=l.type,y=l.memoizedProps,E=l.stateNode;try{e:switch(f){case"button":case"input":case"select":case"textarea":y.autoFocus&&E.focus();break e;case"img":y.src?E.src=y.src:y.srcSet&&(E.srcset=y.srcSet)}}catch(L){zi(l,l.return,L)}}function eo(l,f,y){try{var E=l.stateNode;oW(E,l.type,y,f),E[Ot]=f}catch(L){zi(l,l.return,L)}}function Ta(l){return l.tag===5||l.tag===3||l.tag===26||l.tag===27&&df(l.type)||l.tag===4}function ll(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||Ta(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(l.tag===27&&df(l.type)||l.flags&2||l.child===null||l.tag===4)continue e;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function Bn(l,f,y){var E=l.tag;if(E===5||E===6)l=l.stateNode,f?(y.nodeType===9?y.body:y.nodeName==="HTML"?y.ownerDocument.body:y).insertBefore(l,f):(f=y.nodeType===9?y.body:y.nodeName==="HTML"?y.ownerDocument.body:y,f.appendChild(l),y=y._reactRootContainer,y!=null||f.onclick!==null||(f.onclick=Ko));else if(E!==4&&(E===27&&df(l.type)&&(y=l.stateNode,f=null),l=l.child,l!==null))for(Bn(l,f,y),l=l.sibling;l!==null;)Bn(l,f,y),l=l.sibling}function yi(l,f,y){var E=l.tag;if(E===5||E===6)l=l.stateNode,f?y.insertBefore(l,f):y.appendChild(l);else if(E!==4&&(E===27&&df(l.type)&&(y=l.stateNode),l=l.child,l!==null))for(yi(l,f,y),l=l.sibling;l!==null;)yi(l,f,y),l=l.sibling}function ma(l){var f=l.stateNode,y=l.memoizedProps;try{for(var E=l.type,L=f.attributes;L.length;)f.removeAttributeNode(L[0]);Is(f,E,y),f[vt]=l,f[Ot]=y}catch(j){zi(l,l.return,j)}}var to=!1,Xi=!1,ql=!1,ap=typeof WeakSet=="function"?WeakSet:Set,la=null;function rf(l,f){if(l=l.containerInfo,S4=A2,l=zm(l),Ud(l)){if("selectionStart"in l)var y={start:l.selectionStart,end:l.selectionEnd};else e:{y=(y=l.ownerDocument)&&y.defaultView||window;var E=y.getSelection&&y.getSelection();if(E&&E.rangeCount!==0){y=E.anchorNode;var L=E.anchorOffset,j=E.focusNode;E=E.focusOffset;try{y.nodeType,j.nodeType}catch{y=null;break e}var Q=0,oe=-1,Me=-1,Ge=0,ht=0,xt=l,qe=null;t:for(;;){for(var st;xt!==y||L!==0&&xt.nodeType!==3||(oe=Q+L),xt!==j||E!==0&&xt.nodeType!==3||(Me=Q+E),xt.nodeType===3&&(Q+=xt.nodeValue.length),(st=xt.firstChild)!==null;)qe=xt,xt=st;for(;;){if(xt===l)break t;if(qe===y&&++Ge===L&&(oe=Q),qe===j&&++ht===E&&(Me=Q),(st=xt.nextSibling)!==null)break;xt=qe,qe=xt.parentNode}xt=st}y=oe===-1||Me===-1?null:{start:oe,end:Me}}else y=null}y=y||{start:0,end:0}}else y=null;for(w4={focusedElem:l,selectionRange:y},A2=!1,la=f;la!==null;)if(f=la,l=f.child,(f.subtreeFlags&1028)!==0&&l!==null)l.return=f,la=l;else for(;la!==null;){switch(f=la,j=f.alternate,l=f.flags,f.tag){case 0:if((l&4)!==0&&(l=f.updateQueue,l=l!==null?l.events:null,l!==null))for(y=0;y title"))),Is(j,E,y),j[vt]=l,yt(j),E=j;break e;case"link":var Q=yR("link","href",L).get(E+(y.href||""));if(Q){for(var oe=0;oeki&&(Q=ki,ki=bn,bn=Q);var je=Ov(oe,bn),Ne=Ov(oe,ki);if(je&&Ne&&(st.rangeCount!==1||st.anchorNode!==je.node||st.anchorOffset!==je.offset||st.focusNode!==Ne.node||st.focusOffset!==Ne.offset)){var $e=xt.createRange();$e.setStart(je.node,je.offset),st.removeAllRanges(),bn>ki?(st.addRange($e),st.extend(Ne.node,Ne.offset)):($e.setEnd(Ne.node,Ne.offset),st.addRange($e))}}}}for(xt=[],st=oe;st=st.parentNode;)st.nodeType===1&&xt.push({element:st,left:st.scrollLeft,top:st.scrollTop});for(typeof oe.focus=="function"&&oe.focus(),oe=0;oey?32:y,V.T=null,y=Zu,Zu=null;var j=Do,Q=no;if(Ji=0,Br=Do=null,no=0,(ri&6)!==0)throw Error(i(331));var oe=ri;if(ri|=4,Yu(j.current),Qi(j,j.current,Q,y),ri=oe,Ry(0,!1),Je&&typeof Je.onPostCommitFiberRoot=="function")try{Je.onPostCommitFiberRoot(Ye,j)}catch{}return!0}finally{H.p=L,V.T=E,tc(l,f)}}function H6(l,f,y){f=Gs(y,f),f=My(l.stateNode,f,2),l=$l(l,f,2),l!==null&&(ge(l,2),qc(l))}function zi(l,f,y){if(l.tag===3)H6(l,l,y);else for(;f!==null;){if(f.tag===3){H6(f,l,y);break}else if(f.tag===1){var E=f.stateNode;if(typeof f.type.getDerivedStateFromError=="function"||typeof E.componentDidCatch=="function"&&(cl===null||!cl.has(E))){l=Gs(y,l),y=ef(2),E=$l(f,y,2),E!==null&&(qs(y,E,f,l),ge(E,2),qc(E));break}}f=f.return}}function f4(l,f,y){var E=l.pingCache;if(E===null){E=l.pingCache=new x0;var L=new Set;E.set(f,L)}else L=E.get(f),L===void 0&&(L=new Set,E.set(f,L));L.has(y)||(Di=!0,L.add(y),l=XG.bind(null,l,f,y),f.then(l,l))}function XG(l,f,y){var E=l.pingCache;E!==null&&E.delete(f),l.pingedLanes|=l.suspendedLanes&y,l.warmLanes&=~y,Mi===l&&(Qn&y)===y&&(Ti===4||Ti===3&&(Qn&62914560)===Qn&&300>te()-Jl?(ri&2)===0&&Fe(l,0):No|=y,Ir===Qn&&(Ir=0)),qc(l)}function $6(l,f){f===0&&(f=Xt()),l=Pc(l,f),l!==null&&(ge(l,f),qc(l))}function qG(l){var f=l.memoizedState,y=0;f!==null&&(y=f.retryLane),$6(l,y)}function YG(l,f){var y=0;switch(l.tag){case 31:case 13:var E=l.stateNode,L=l.memoizedState;L!==null&&(y=L.retryLane);break;case 19:E=l.stateNode;break;case 22:E=l.stateNode._retryCache;break;default:throw Error(i(314))}E!==null&&E.delete(f),$6(l,y)}function ZG(l,f){return Ae(l,f)}var v2=null,w0=null,h4=!1,y2=!1,p4=!1,uf=0;function qc(l){l!==w0&&l.next===null&&(w0===null?v2=w0=l:w0=w0.next=l),y2=!0,h4||(h4=!0,JG())}function Ry(l,f){if(!p4&&y2){p4=!0;do for(var y=!1,E=v2;E!==null;){if(l!==0){var L=E.pendingLanes;if(L===0)var j=0;else{var Q=E.suspendedLanes,oe=E.pingedLanes;j=(1<<31-wt(42|l)+1)-1,j&=L&~(Q&~oe),j=j&201326741?j&201326741|1:j?j|2:0}j!==0&&(y=!0,X6(E,j))}else j=Qn,j=it(E,E===Mi?j:0,E.cancelPendingCommit!==null||E.timeoutHandle!==-1),(j&3)===0||Nt(E,j)||(y=!0,X6(E,j));E=E.next}while(y);p4=!1}}function QG(){G6()}function G6(){y2=h4=!1;var l=0;uf!==0&&cW()&&(l=uf);for(var f=te(),y=null,E=v2;E!==null;){var L=E.next,j=W6(E,f);j===0?(E.next=null,y===null?v2=L:y.next=L,L===null&&(w0=y)):(y=E,(l!==0||(j&3)!==0)&&(y2=!0)),E=L}Ji!==0&&Ji!==5||Ry(l),uf!==0&&(uf=0)}function W6(l,f){for(var y=l.suspendedLanes,E=l.pingedLanes,L=l.expirationTimes,j=l.pendingLanes&-62914561;0oe)break;var ht=Me.transferSize,xt=Me.initiatorType;ht&&nR(xt)&&(Me=Me.responseEnd,Q+=ht*(Me"u"?null:document;function pR(l,f,y){var E=E0;if(E&&typeof f=="string"&&f){var L=Kn(f);L='link[rel="'+l+'"][href="'+L+'"]',typeof y=="string"&&(L+='[crossorigin="'+y+'"]'),hR.has(L)||(hR.add(L),l={rel:l,crossOrigin:y,href:f},E.querySelector(L)===null&&(f=E.createElement("link"),Is(f,"link",l),yt(f),E.head.appendChild(f)))}}function yW(l){td.D(l),pR("dns-prefetch",l,null)}function bW(l,f){td.C(l,f),pR("preconnect",l,f)}function xW(l,f,y){td.L(l,f,y);var E=E0;if(E&&l&&f){var L='link[rel="preload"][as="'+Kn(f)+'"]';f==="image"&&y&&y.imageSrcSet?(L+='[imagesrcset="'+Kn(y.imageSrcSet)+'"]',typeof y.imageSizes=="string"&&(L+='[imagesizes="'+Kn(y.imageSizes)+'"]')):L+='[href="'+Kn(l)+'"]';var j=L;switch(f){case"style":j=M0(l);break;case"script":j=T0(l)}dl.has(j)||(l=d({rel:"preload",href:f==="image"&&y&&y.imageSrcSet?void 0:l,as:f},y),dl.set(j,l),E.querySelector(L)!==null||f==="style"&&E.querySelector(Ly(j))||f==="script"&&E.querySelector(Oy(j))||(f=E.createElement("link"),Is(f,"link",l),yt(f),E.head.appendChild(f)))}}function _W(l,f){td.m(l,f);var y=E0;if(y&&l){var E=f&&typeof f.as=="string"?f.as:"script",L='link[rel="modulepreload"][as="'+Kn(E)+'"][href="'+Kn(l)+'"]',j=L;switch(E){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":j=T0(l)}if(!dl.has(j)&&(l=d({rel:"modulepreload",href:l},f),dl.set(j,l),y.querySelector(L)===null)){switch(E){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(y.querySelector(Oy(j)))return}E=y.createElement("link"),Is(E,"link",l),yt(E),y.head.appendChild(E)}}}function SW(l,f,y){td.S(l,f,y);var E=E0;if(E&&l){var L=ze(E).hoistableStyles,j=M0(l);f=f||"default";var Q=L.get(j);if(!Q){var oe={loading:0,preload:null};if(Q=E.querySelector(Ly(j)))oe.loading=5;else{l=d({rel:"stylesheet",href:l,"data-precedence":f},y),(y=dl.get(j))&&N4(l,y);var Me=Q=E.createElement("link");yt(Me),Is(Me,"link",l),Me._p=new Promise(function(Ge,ht){Me.onload=Ge,Me.onerror=ht}),Me.addEventListener("load",function(){oe.loading|=1}),Me.addEventListener("error",function(){oe.loading|=2}),oe.loading|=4,w2(Q,f,E)}Q={type:"stylesheet",instance:Q,count:1,state:oe},L.set(j,Q)}}}function wW(l,f){td.X(l,f);var y=E0;if(y&&l){var E=ze(y).hoistableScripts,L=T0(l),j=E.get(L);j||(j=y.querySelector(Oy(L)),j||(l=d({src:l,async:!0},f),(f=dl.get(L))&&P4(l,f),j=y.createElement("script"),yt(j),Is(j,"link",l),y.head.appendChild(j)),j={type:"script",instance:j,count:1,state:null},E.set(L,j))}}function EW(l,f){td.M(l,f);var y=E0;if(y&&l){var E=ze(y).hoistableScripts,L=T0(l),j=E.get(L);j||(j=y.querySelector(Oy(L)),j||(l=d({src:l,async:!0,type:"module"},f),(f=dl.get(L))&&P4(l,f),j=y.createElement("script"),yt(j),Is(j,"link",l),y.head.appendChild(j)),j={type:"script",instance:j,count:1,state:null},E.set(L,j))}}function mR(l,f,y,E){var L=(L=se.current)?S2(L):null;if(!L)throw Error(i(446));switch(l){case"meta":case"title":return null;case"style":return typeof y.precedence=="string"&&typeof y.href=="string"?(f=M0(y.href),y=ze(L).hoistableStyles,E=y.get(f),E||(E={type:"style",instance:null,count:0,state:null},y.set(f,E)),E):{type:"void",instance:null,count:0,state:null};case"link":if(y.rel==="stylesheet"&&typeof y.href=="string"&&typeof y.precedence=="string"){l=M0(y.href);var j=ze(L).hoistableStyles,Q=j.get(l);if(Q||(L=L.ownerDocument||L,Q={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},j.set(l,Q),(j=L.querySelector(Ly(l)))&&!j._p&&(Q.instance=j,Q.state.loading=5),dl.has(l)||(y={rel:"preload",as:"style",href:y.href,crossOrigin:y.crossOrigin,integrity:y.integrity,media:y.media,hrefLang:y.hrefLang,referrerPolicy:y.referrerPolicy},dl.set(l,y),j||MW(L,l,y,Q.state))),f&&E===null)throw Error(i(528,""));return Q}if(f&&E!==null)throw Error(i(529,""));return null;case"script":return f=y.async,y=y.src,typeof y=="string"&&f&&typeof f!="function"&&typeof f!="symbol"?(f=T0(y),y=ze(L).hoistableScripts,E=y.get(f),E||(E={type:"script",instance:null,count:0,state:null},y.set(f,E)),E):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,l))}}function M0(l){return'href="'+Kn(l)+'"'}function Ly(l){return'link[rel="stylesheet"]['+l+"]"}function gR(l){return d({},l,{"data-precedence":l.precedence,precedence:null})}function MW(l,f,y,E){l.querySelector('link[rel="preload"][as="style"]['+f+"]")?E.loading=1:(f=l.createElement("link"),E.preload=f,f.addEventListener("load",function(){return E.loading|=1}),f.addEventListener("error",function(){return E.loading|=2}),Is(f,"link",y),yt(f),l.head.appendChild(f))}function T0(l){return'[src="'+Kn(l)+'"]'}function Oy(l){return"script[async]"+l}function vR(l,f,y){if(f.count++,f.instance===null)switch(f.type){case"style":var E=l.querySelector('style[data-href~="'+Kn(y.href)+'"]');if(E)return f.instance=E,yt(E),E;var L=d({},y,{"data-href":y.href,"data-precedence":y.precedence,href:null,precedence:null});return E=(l.ownerDocument||l).createElement("style"),yt(E),Is(E,"style",L),w2(E,y.precedence,l),f.instance=E;case"stylesheet":L=M0(y.href);var j=l.querySelector(Ly(L));if(j)return f.state.loading|=4,f.instance=j,yt(j),j;E=gR(y),(L=dl.get(L))&&N4(E,L),j=(l.ownerDocument||l).createElement("link"),yt(j);var Q=j;return Q._p=new Promise(function(oe,Me){Q.onload=oe,Q.onerror=Me}),Is(j,"link",E),f.state.loading|=4,w2(j,y.precedence,l),f.instance=j;case"script":return j=T0(y.src),(L=l.querySelector(Oy(j)))?(f.instance=L,yt(L),L):(E=y,(L=dl.get(j))&&(E=d({},y),P4(E,L)),l=l.ownerDocument||l,L=l.createElement("script"),yt(L),Is(L,"link",E),l.head.appendChild(L),f.instance=L);case"void":return null;default:throw Error(i(443,f.type))}else f.type==="stylesheet"&&(f.state.loading&4)===0&&(E=f.instance,f.state.loading|=4,w2(E,y.precedence,l));return f.instance}function w2(l,f,y){for(var E=y.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),L=E.length?E[E.length-1]:null,j=L,Q=0;Q title"):null)}function TW(l,f,y){if(y===1||f.itemProp!=null)return!1;switch(l){case"meta":case"title":return!0;case"style":if(typeof f.precedence!="string"||typeof f.href!="string"||f.href==="")break;return!0;case"link":if(typeof f.rel!="string"||typeof f.href!="string"||f.href===""||f.onLoad||f.onError)break;switch(f.rel){case"stylesheet":return l=f.disabled,typeof f.precedence=="string"&&l==null;default:return!0}case"script":if(f.async&&typeof f.async!="function"&&typeof f.async!="symbol"&&!f.onLoad&&!f.onError&&f.src&&typeof f.src=="string")return!0}return!1}function xR(l){return!(l.type==="stylesheet"&&(l.state.loading&3)===0)}function CW(l,f,y,E){if(y.type==="stylesheet"&&(typeof E.media!="string"||matchMedia(E.media).matches!==!1)&&(y.state.loading&4)===0){if(y.instance===null){var L=M0(E.href),j=f.querySelector(Ly(L));if(j){f=j._p,f!==null&&typeof f=="object"&&typeof f.then=="function"&&(l.count++,l=M2.bind(l),f.then(l,l)),y.state.loading|=4,y.instance=j,yt(j);return}j=f.ownerDocument||f,E=gR(E),(L=dl.get(L))&&N4(E,L),j=j.createElement("link"),yt(j);var Q=j;Q._p=new Promise(function(oe,Me){Q.onload=oe,Q.onerror=Me}),Is(j,"link",E),y.instance=j}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(y,f),(f=y.state.preload)&&(y.state.loading&3)===0&&(l.count++,y=M2.bind(l),f.addEventListener("load",y),f.addEventListener("error",y))}}var D4=0;function AW(l,f){return l.stylesheets&&l.count===0&&C2(l,l.stylesheets),0D4?50:800)+f);return l.unsuspend=y,function(){l.unsuspend=null,clearTimeout(E),clearTimeout(L)}}:null}function M2(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)C2(this,this.stylesheets);else if(this.unsuspend){var l=this.unsuspend;this.unsuspend=null,l()}}}var T2=null;function C2(l,f){l.stylesheets=null,l.unsuspend!==null&&(l.count++,T2=new Map,f.forEach(RW,l),T2=null,M2.call(l))}function RW(l,f){if(!(f.state.loading&4)){var y=T2.get(l);if(y)var E=y.get(null);else{y=new Map,T2.set(l,y);for(var L=l.querySelectorAll("link[data-precedence],style[data-precedence]"),j=0;j"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),V4.exports=$W(),V4.exports}var WW=GW();const KW="modulepreload",XW=function(t,e){return new URL(t,e).href},$R={},bu=function(e,n,i){let a=Promise.resolve();if(n&&n.length>0){let u=function(h){return Promise.all(h.map(d=>Promise.resolve(d).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};const r=document.getElementsByTagName("link"),o=document.querySelector("meta[property=csp-nonce]"),c=o?.nonce||o?.getAttribute("nonce");a=u(n.map(h=>{if(h=XW(h,i),h in $R)return;$R[h]=!0;const d=h.endsWith(".css"),p=d?'[rel="stylesheet"]':"";if(i)for(let b=r.length-1;b>=0;b--){const w=r[b];if(w.href===h&&(!d||w.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${h}"]${p}`))return;const g=document.createElement("link");if(g.rel=d?"stylesheet":KW,d||(g.as="script"),g.crossOrigin="",g.href=h,c&&g.setAttribute("nonce",c),document.head.appendChild(g),d)return new Promise((b,w)=>{g.addEventListener("load",b),g.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${h}`)))})}))}function s(r){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=r,window.dispatchEvent(o),!o.defaultPrevented)throw r}return a.then(r=>{for(const o of r||[])o.status==="rejected"&&s(o.reason);return e().catch(s)})};/** * react-router v7.9.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 */var O9=t=>{throw TypeError(t)},qW=(t,e,n)=>e.has(t)||O9("Cannot "+n),G4=(t,e,n)=>(qW(t,e,"read from private field"),n?n.call(t):e.get(t)),YW=(t,e,n)=>e.has(t)?O9("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),GR="popstate";function ZW(t={}){function e(i,a){let{pathname:s,search:r,hash:o}=i.location;return Wb("",{pathname:s,search:r,hash:o},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function n(i,a){return typeof a=="string"?a:Hf(a)}return JW(e,n,null,t)}function ai(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function Za(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function QW(){return Math.random().toString(36).substring(2,10)}function WR(t,e){return{usr:t.state,key:t.key,idx:e}}function Wb(t,e,n=null,i){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof e=="string"?th(e):e,state:n,key:e&&e.key||i||QW()}}function Hf({pathname:t="/",search:e="",hash:n=""}){return e&&e!=="?"&&(t+=e.charAt(0)==="?"?e:"?"+e),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function th(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substring(n),t=t.substring(0,n));let i=t.indexOf("?");i>=0&&(e.search=t.substring(i),t=t.substring(0,i)),t&&(e.pathname=t)}return e}function JW(t,e,n,i={}){let{window:a=document.defaultView,v5Compat:s=!1}=i,r=a.history,o="POP",c=null,u=h();u==null&&(u=0,r.replaceState({...r.state,idx:u},""));function h(){return(r.state||{idx:null}).idx}function d(){o="POP";let x=h(),S=x==null?null:x-u;u=x,c&&c({action:o,location:w.location,delta:S})}function p(x,S){o="PUSH";let M=Wb(w.location,x,S);u=h()+1;let C=WR(M,u),A=w.createHref(M);try{r.pushState(C,"",A)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;a.location.assign(A)}s&&c&&c({action:o,location:w.location,delta:1})}function g(x,S){o="REPLACE";let M=Wb(w.location,x,S);u=h();let C=WR(M,u),A=w.createHref(M);r.replaceState(C,"",A),s&&c&&c({action:o,location:w.location,delta:0})}function b(x){return I9(x)}let w={get action(){return o},get location(){return t(a,r)},listen(x){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(GR,d),c=x,()=>{a.removeEventListener(GR,d),c=null}},createHref(x){return e(a,x)},createURL:b,encodeLocation(x){let S=b(x);return{pathname:S.pathname,search:S.search,hash:S.hash}},push:p,replace:g,go(x){return r.go(x)}};return w}function I9(t,e=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),ai(n,"No window.location.(origin|href) available to create URL");let i=typeof t=="string"?t:Hf(t);return i=i.replace(/ $/,"%20"),!e&&i.startsWith("//")&&(i=n+i),new URL(i,n)}var db,KR=class{constructor(t){if(YW(this,db,new Map),t)for(let[e,n]of t)this.set(e,n)}get(t){if(G4(this,db).has(t))return G4(this,db).get(t);if(t.defaultValue!==void 0)return t.defaultValue;throw new Error("No value found for context")}set(t,e){G4(this,db).set(t,e)}};db=new WeakMap;var eK=new Set(["lazy","caseSensitive","path","id","index","children"]);function tK(t){return eK.has(t)}var nK=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function iK(t){return nK.has(t)}function aK(t){return t.index===!0}function Kb(t,e,n=[],i={},a=!1){return t.map((s,r)=>{let o=[...n,String(r)],c=typeof s.id=="string"?s.id:o.join("-");if(ai(s.index!==!0||!s.children,"Cannot specify children on an index route"),ai(a||!i[c],`Found a route id collision on id "${c}". Route id's must be globally unique within Data Router usages`),aK(s)){let u={...s,...e(s),id:c};return i[c]=u,u}else{let u={...s,...e(s),id:c,children:void 0};return i[c]=u,s.children&&(u.children=Kb(s.children,e,o,i,a)),u}})}function Nf(t,e,n="/"){return iS(t,e,n,!1)}function iS(t,e,n,i){let a=typeof e=="string"?th(e):e,s=Cl(a.pathname||"/",n);if(s==null)return null;let r=z9(t);rK(r);let o=null;for(let c=0;o==null&&c{let h={relativePath:u===void 0?r.path||"":u,caseSensitive:r.caseSensitive===!0,childrenIndex:o,route:r};if(h.relativePath.startsWith("/")){if(!h.relativePath.startsWith(i)&&c)return;ai(h.relativePath.startsWith(i),`Absolute route path "${h.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),h.relativePath=h.relativePath.slice(i.length)}let d=du([i,h.relativePath]),p=n.concat(h);r.children&&r.children.length>0&&(ai(r.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),z9(r.children,e,p,d,c)),!(r.path==null&&!r.index)&&e.push({path:d,score:hK(d,r.index),routesMeta:p})};return t.forEach((r,o)=>{if(r.path===""||!r.path?.includes("?"))s(r,o);else for(let c of B9(r.path))s(r,o,!0,c)}),e}function B9(t){let e=t.split("/");if(e.length===0)return[];let[n,...i]=e,a=n.endsWith("?"),s=n.replace(/\?$/,"");if(i.length===0)return a?[s,""]:[s];let r=B9(i.join("/")),o=[];return o.push(...r.map(c=>c===""?s:[s,c].join("/"))),a&&o.push(...r),o.map(c=>t.startsWith("/")&&c===""?"/":c)}function rK(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:pK(e.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}var oK=/^:[\w-]+$/,lK=3,cK=2,uK=1,dK=10,fK=-2,XR=t=>t==="*";function hK(t,e){let n=t.split("/"),i=n.length;return n.some(XR)&&(i+=fK),e&&(i+=cK),n.filter(a=>!XR(a)).reduce((a,s)=>a+(oK.test(s)?lK:s===""?uK:dK),i)}function pK(t,e){return t.length===e.length&&t.slice(0,-1).every((i,a)=>i===e[a])?t[t.length-1]-e[e.length-1]:0}function mK(t,e,n=!1){let{routesMeta:i}=t,a={},s="/",r=[];for(let o=0;o{if(h==="*"){let b=o[p]||"";r=s.slice(0,s.length-b.length).replace(/(.)\/+$/,"$1")}const g=o[p];return d&&!g?u[h]=void 0:u[h]=(g||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:r,pattern:t}}function gK(t,e=!1,n=!0){Za(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let i=[],a="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(r,o,c)=>(i.push({paramName:o,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(i.push({paramName:"*"}),a+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":t!==""&&t!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,e?void 0:"i"),i]}function vK(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Za(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),t}}function Cl(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,i=t.charAt(n);return i&&i!=="/"?null:t.slice(n)||"/"}function yK({basename:t,pathname:e}){return e==="/"?t:du([t,e])}function bK(t,e="/"){let{pathname:n,search:i="",hash:a=""}=typeof t=="string"?th(t):t;return{pathname:n?n.startsWith("/")?n:xK(n,e):e,search:SK(i),hash:wK(a)}}function xK(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function W4(t,e,n,i){return`Cannot include a '${t}' character in a manually specified \`to.${e}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function U9(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function Z5(t){let e=U9(t);return e.map((n,i)=>i===e.length-1?n.pathname:n.pathnameBase)}function Q5(t,e,n,i=!1){let a;typeof t=="string"?a=th(t):(a={...t},ai(!a.pathname||!a.pathname.includes("?"),W4("?","pathname","search",a)),ai(!a.pathname||!a.pathname.includes("#"),W4("#","pathname","hash",a)),ai(!a.search||!a.search.includes("#"),W4("#","search","hash",a)));let s=t===""||a.pathname==="",r=s?"/":a.pathname,o;if(r==null)o=n;else{let d=e.length-1;if(!i&&r.startsWith("..")){let p=r.split("/");for(;p[0]==="..";)p.shift(),d-=1;a.pathname=p.join("/")}o=d>=0?e[d]:"/"}let c=bK(a,o),u=r&&r!=="/"&&r.endsWith("/"),h=(s||r===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||h)&&(c.pathname+="/"),c}var du=t=>t.join("/").replace(/\/\/+/g,"/"),_K=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),SK=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,wK=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,ES=class{constructor(t,e,n,i=!1){this.status=t,this.statusText=e||"",this.internal=i,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Rg(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}var j9=["POST","PUT","PATCH","DELETE"],EK=new Set(j9),MK=["GET",...j9],TK=new Set(MK),CK=new Set([301,302,303,307,308]),AK=new Set([307,308]),K4={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},RK={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ky={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},NK=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,J5=t=>NK.test(t),PK=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),F9="remix-router-transitions",V9=Symbol("ResetLoaderData");function DK(t){const e=t.window?t.window:typeof window<"u"?window:void 0,n=typeof e<"u"&&typeof e.document<"u"&&typeof e.document.createElement<"u";ai(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let i=t.hydrationRouteProperties||[],a=t.mapRouteProperties||PK,s={},r=Kb(t.routes,a,void 0,s),o,c=t.basename||"/";c.startsWith("/")||(c=`/${c}`);let u=t.dataStrategy||BK,h={...t.future},d=null,p=new Set,g=null,b=null,w=null,x=t.hydrationData!=null,S=Nf(r,t.history.location,c),M=!1,C=null,A;if(S==null&&!t.patchRoutesOnNavigation){let ge=vl(404,{pathname:t.history.location.pathname}),{matches:Se,route:De}=I2(r);A=!0,S=Se,C={[De.id]:ge}}else if(S&&!t.hydrationData&&Nt(S,r,t.history.location.pathname).active&&(S=null),S)if(S.some(ge=>ge.route.lazy))A=!1;else if(!S.some(ge=>eC(ge.route)))A=!0;else{let ge=t.hydrationData?t.hydrationData.loaderData:null,Se=t.hydrationData?t.hydrationData.errors:null;if(Se){let De=S.findIndex(lt=>Se[lt.route.id]!==void 0);A=S.slice(0,De+1).every(lt=>!cT(lt.route,ge,Se))}else A=S.every(De=>!cT(De.route,ge,Se))}else{A=!1,S=[];let ge=Nt(null,r,t.history.location.pathname);ge.active&&ge.matches&&(M=!0,S=ge.matches)}let N,R={historyAction:t.history.action,location:t.history.location,matches:S,initialized:A,navigation:K4,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||C,fetchers:new Map,blockers:new Map},D="POP",B=!1,z,I=!1,U=new Map,$=null,G=!1,k=!1,X=new Set,V=new Map,H=0,W=-1,J=new Map,Y=new Set,K=new Map,ee=new Map,ie=new Set,Z=new Map,ue,se=null;function ae(){if(d=t.history.listen(({action:ge,location:Se,delta:De})=>{if(ue){ue(),ue=void 0;return}Za(Z.size===0||De!=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 lt=Te({currentLocation:R.location,nextLocation:Se,historyAction:ge});if(lt&&De!=null){let rt=new Promise(Bt=>{ue=Bt});t.history.go(De*-1),zt(lt,{state:"blocked",location:Se,proceed(){zt(lt,{state:"proceeding",proceed:void 0,reset:void 0,location:Se}),rt.then(()=>t.history.go(De))},reset(){let Bt=new Map(R.blockers);Bt.set(lt,ky),ye({blockers:Bt})}});return}return be(ge,Se)}),n){QK(e,U);let ge=()=>JK(e,U);e.addEventListener("pagehide",ge),$=()=>e.removeEventListener("pagehide",ge)}return R.initialized||be("POP",R.location,{initialHydration:!0}),N}function ce(){d&&d(),$&&$(),p.clear(),z&&z.abort(),R.fetchers.forEach((ge,Se)=>We(Se)),R.blockers.forEach((ge,Se)=>Et(Se))}function pe(ge){return p.add(ge),()=>p.delete(ge)}function ye(ge,Se={}){ge.matches&&(ge.matches=ge.matches.map(rt=>{let Bt=s[rt.route.id],Ut=rt.route;return Ut.element!==Bt.element||Ut.errorElement!==Bt.errorElement||Ut.hydrateFallbackElement!==Bt.hydrateFallbackElement?{...rt,route:Bt}:rt})),R={...R,...ge};let De=[],lt=[];R.fetchers.forEach((rt,Bt)=>{rt.state==="idle"&&(ie.has(Bt)?De.push(Bt):lt.push(Bt))}),ie.forEach(rt=>{!R.fetchers.has(rt)&&!V.has(rt)&&De.push(rt)}),[...p].forEach(rt=>rt(R,{deletedFetchers:De,viewTransitionOpts:Se.viewTransitionOpts,flushSync:Se.flushSync===!0})),De.forEach(rt=>We(rt)),lt.forEach(rt=>R.fetchers.delete(rt))}function _e(ge,Se,{flushSync:De}={}){let lt=R.actionData!=null&&R.navigation.formMethod!=null&&uo(R.navigation.formMethod)&&R.navigation.state==="loading"&&ge.state?._isRedirect!==!0,rt;Se.actionData?Object.keys(Se.actionData).length>0?rt=Se.actionData:rt=null:lt?rt=R.actionData:rt=null;let Bt=Se.loaderData?a8(R.loaderData,Se.loaderData,Se.matches||[],Se.errors):R.loaderData,Ut=R.blockers;Ut.size>0&&(Ut=new Map(Ut),Ut.forEach((vt,Ot)=>Ut.set(Ot,ky)));let Dt=G?!1:it(ge,Se.matches||R.matches),ot=B===!0||R.navigation.formMethod!=null&&uo(R.navigation.formMethod)&&ge.state?._isRedirect!==!0;o&&(r=o,o=void 0),G||D==="POP"||(D==="PUSH"?t.history.push(ge,ge.state):D==="REPLACE"&&t.history.replace(ge,ge.state));let Lt;if(D==="POP"){let vt=U.get(R.location.pathname);vt&&vt.has(ge.pathname)?Lt={currentLocation:R.location,nextLocation:ge}:U.has(ge.pathname)&&(Lt={currentLocation:ge,nextLocation:R.location})}else if(I){let vt=U.get(R.location.pathname);vt?vt.add(ge.pathname):(vt=new Set([ge.pathname]),U.set(R.location.pathname,vt)),Lt={currentLocation:R.location,nextLocation:ge}}ye({...Se,actionData:rt,loaderData:Bt,historyAction:D,location:ge,initialized:!0,navigation:K4,revalidation:"idle",restoreScrollPosition:Dt,preventScrollReset:ot,blockers:Ut},{viewTransitionOpts:Lt,flushSync:De===!0}),D="POP",B=!1,I=!1,G=!1,k=!1,se?.resolve(),se=null}async function me(ge,Se){if(typeof ge=="number"){t.history.go(ge);return}let De=lT(R.location,R.matches,c,ge,Se?.fromRouteId,Se?.relative),{path:lt,submission:rt,error:Bt}=qR(!1,De,Se),Ut=R.location,Dt=Wb(R.location,lt,Se&&Se.state);Dt={...Dt,...t.history.encodeLocation(Dt)};let ot=Se&&Se.replace!=null?Se.replace:void 0,Lt="PUSH";ot===!0?Lt="REPLACE":ot===!1||rt!=null&&uo(rt.formMethod)&&rt.formAction===R.location.pathname+R.location.search&&(Lt="REPLACE");let vt=Se&&"preventScrollReset"in Se?Se.preventScrollReset===!0:void 0,Ot=(Se&&Se.flushSync)===!0,Mt=Te({currentLocation:Ut,nextLocation:Dt,historyAction:Lt});if(Mt){zt(Mt,{state:"blocked",location:Dt,proceed(){zt(Mt,{state:"proceeding",proceed:void 0,reset:void 0,location:Dt}),me(ge,Se)},reset(){let Ln=new Map(R.blockers);Ln.set(Mt,ky),ye({blockers:Ln})}});return}await be(Lt,Dt,{submission:rt,pendingError:Bt,preventScrollReset:vt,replace:Se&&Se.replace,enableViewTransition:Se&&Se.viewTransition,flushSync:Ot})}function ne(){se||(se=eX()),we(),ye({revalidation:"loading"});let ge=se.promise;return R.navigation.state==="submitting"?ge:R.navigation.state==="idle"?(be(R.historyAction,R.location,{startUninterruptedRevalidation:!0}),ge):(be(D||R.historyAction,R.navigation.location,{overrideNavigation:R.navigation,enableViewTransition:I===!0}),ge)}async function be(ge,Se,De){z&&z.abort(),z=null,D=ge,G=(De&&De.startUninterruptedRevalidation)===!0,ct(R.location,R.matches),B=(De&&De.preventScrollReset)===!0,I=(De&&De.enableViewTransition)===!0;let lt=o||r,rt=De&&De.overrideNavigation,Bt=De?.initialHydration&&R.matches&&R.matches.length>0&&!M?R.matches:Nf(lt,Se,c),Ut=(De&&De.flushSync)===!0;if(Bt&&R.initialized&&!k&&GK(R.location,Se)&&!(De&&De.submission&&uo(De.submission.formMethod))){_e(Se,{matches:Bt},{flushSync:Ut});return}let Dt=Nt(Bt,lt,Se.pathname);if(Dt.active&&Dt.matches&&(Bt=Dt.matches),!Bt){let{error:aa,notFoundMatches:ei,route:Fn}=pt(Se.pathname);_e(Se,{matches:ei,loaderData:{},errors:{[Fn.id]:aa}},{flushSync:Ut});return}z=new AbortController;let ot=ag(t.history,Se,z.signal,De&&De.submission),Lt=t.getContext?await t.getContext():new KR,vt;if(De&&De.pendingError)vt=[Pf(Bt).route.id,{type:"error",error:De.pendingError}];else if(De&&De.submission&&uo(De.submission.formMethod)){let aa=await xe(ot,Se,De.submission,Bt,Lt,Dt.active,De&&De.initialHydration===!0,{replace:De.replace,flushSync:Ut});if(aa.shortCircuited)return;if(aa.pendingActionResult){let[ei,Fn]=aa.pendingActionResult;if(Io(Fn)&&Rg(Fn.error)&&Fn.error.status===404){z=null,_e(Se,{matches:aa.matches,loaderData:{},errors:{[ei]:Fn.error}});return}}Bt=aa.matches||Bt,vt=aa.pendingActionResult,rt=X4(Se,De.submission),Ut=!1,Dt.active=!1,ot=ag(t.history,ot.url,ot.signal)}let{shortCircuited:Ot,matches:Mt,loaderData:Ln,errors:wi}=await he(ot,Se,Bt,Lt,Dt.active,rt,De&&De.submission,De&&De.fetcherSubmission,De&&De.replace,De&&De.initialHydration===!0,Ut,vt);Ot||(z=null,_e(Se,{matches:Mt||Bt,...s8(vt),loaderData:Ln,errors:wi}))}async function xe(ge,Se,De,lt,rt,Bt,Ut,Dt={}){we();let ot=YK(Se,De);if(ye({navigation:ot},{flushSync:Dt.flushSync===!0}),Bt){let Ot=await kt(lt,Se.pathname,ge.signal);if(Ot.type==="aborted")return{shortCircuited:!0};if(Ot.type==="error"){if(Ot.partialMatches.length===0){let{matches:Ln,route:wi}=I2(r);return{matches:Ln,pendingActionResult:[wi.id,{type:"error",error:Ot.error}]}}let Mt=Pf(Ot.partialMatches).route.id;return{matches:Ot.partialMatches,pendingActionResult:[Mt,{type:"error",error:Ot.error}]}}else if(Ot.matches)lt=Ot.matches;else{let{notFoundMatches:Mt,error:Ln,route:wi}=pt(Se.pathname);return{matches:Mt,pendingActionResult:[wi.id,{type:"error",error:Ln}]}}}let Lt,vt=aS(lt,Se);if(!vt.route.action&&!vt.route.lazy)Lt={type:"error",error:vl(405,{method:ge.method,pathname:Se.pathname,routeId:vt.route.id})};else{let Ot=_g(a,s,ge,lt,vt,Ut?[]:i,rt),Mt=await re(ge,Ot,rt,null);if(Lt=Mt[vt.route.id],!Lt){for(let Ln of lt)if(Mt[Ln.route.id]){Lt=Mt[Ln.route.id];break}}if(ge.signal.aborted)return{shortCircuited:!0}}if(Pp(Lt)){let Ot;return Dt&&Dt.replace!=null?Ot=Dt.replace:Ot=t8(Lt.response.headers.get("Location"),new URL(ge.url),c)===R.location.pathname+R.location.search,await tt(ge,Lt,!0,{submission:De,replace:Ot}),{shortCircuited:!0}}if(Io(Lt)){let Ot=Pf(lt,vt.route.id);return(Dt&&Dt.replace)!==!0&&(D="PUSH"),{matches:lt,pendingActionResult:[Ot.route.id,Lt,vt.route.id]}}return{matches:lt,pendingActionResult:[vt.route.id,Lt]}}async function he(ge,Se,De,lt,rt,Bt,Ut,Dt,ot,Lt,vt,Ot){let Mt=Bt||X4(Se,Ut),Ln=Ut||Dt||o8(Mt),wi=!G&&!Lt;if(rt){if(wi){let qt=ve(Ot);ye({navigation:Mt,...qt!==void 0?{actionData:qt}:{}},{flushSync:vt})}let Tt=await kt(De,Se.pathname,ge.signal);if(Tt.type==="aborted")return{shortCircuited:!0};if(Tt.type==="error"){if(Tt.partialMatches.length===0){let{matches:Jt,route:xn}=I2(r);return{matches:Jt,loaderData:{},errors:{[xn.id]:Tt.error}}}let qt=Pf(Tt.partialMatches).route.id;return{matches:Tt.partialMatches,loaderData:{},errors:{[qt]:Tt.error}}}else if(Tt.matches)De=Tt.matches;else{let{error:qt,notFoundMatches:Jt,route:xn}=pt(Se.pathname);return{matches:Jt,loaderData:{},errors:{[xn.id]:qt}}}}let aa=o||r,{dsMatches:ei,revalidatingFetchers:Fn}=YR(ge,lt,a,s,t.history,R,De,Ln,Se,Lt?[]:i,Lt===!0,k,X,ie,K,Y,aa,c,t.patchRoutesOnNavigation!=null,Ot);if(W=++H,!t.dataStrategy&&!ei.some(Tt=>Tt.shouldLoad)&&!ei.some(Tt=>Tt.route.middleware&&Tt.route.middleware.length>0)&&Fn.length===0){let Tt=Je();return _e(Se,{matches:De,loaderData:{},errors:Ot&&Io(Ot[1])?{[Ot[0]]:Ot[1].error}:null,...s8(Ot),...Tt?{fetchers:new Map(R.fetchers)}:{}},{flushSync:vt}),{shortCircuited:!0}}if(wi){let Tt={};if(!rt){Tt.navigation=Mt;let qt=ve(Ot);qt!==void 0&&(Tt.actionData=qt)}Fn.length>0&&(Tt.fetchers=Oe(Fn)),ye(Tt,{flushSync:vt})}Fn.forEach(Tt=>{nt(Tt.key),Tt.controller&&V.set(Tt.key,Tt.controller)});let le=()=>Fn.forEach(Tt=>nt(Tt.key));z&&z.signal.addEventListener("abort",le);let{loaderResults:Re,fetcherResults:Be}=await te(ei,Fn,ge,lt);if(ge.signal.aborted)return{shortCircuited:!0};z&&z.signal.removeEventListener("abort",le),Fn.forEach(Tt=>V.delete(Tt.key));let ke=z2(Re);if(ke)return await tt(ge,ke.result,!0,{replace:ot}),{shortCircuited:!0};if(ke=z2(Be),ke)return Y.add(ke.key),await tt(ge,ke.result,!0,{replace:ot}),{shortCircuited:!0};let{loaderData:ze,errors:yt}=i8(R,De,Re,Ot,Fn,Be);Lt&&R.errors&&(yt={...R.errors,...yt});let Pt=Je(),Ht=jt(W),Ke=Pt||Ht||Fn.length>0;return{matches:De,loaderData:ze,errors:yt,...Ke?{fetchers:new Map(R.fetchers)}:{}}}function ve(ge){if(ge&&!Io(ge[1]))return{[ge[0]]:ge[1].data};if(R.actionData)return Object.keys(R.actionData).length===0?null:R.actionData}function Oe(ge){return ge.forEach(Se=>{let De=R.fetchers.get(Se.key),lt=Hy(void 0,De?De.data:void 0);R.fetchers.set(Se.key,lt)}),new Map(R.fetchers)}async function Le(ge,Se,De,lt){nt(ge);let rt=(lt&<.flushSync)===!0,Bt=o||r,Ut=lT(R.location,R.matches,c,De,Se,lt?.relative),Dt=Nf(Bt,Ut,c),ot=Nt(Dt,Bt,Ut);if(ot.active&&ot.matches&&(Dt=ot.matches),!Dt){Ie(ge,Se,vl(404,{pathname:Ut}),{flushSync:rt});return}let{path:Lt,submission:vt,error:Ot}=qR(!0,Ut,lt);if(Ot){Ie(ge,Se,Ot,{flushSync:rt});return}let Mt=t.getContext?await t.getContext():new KR,Ln=(lt&<.preventScrollReset)===!0;if(vt&&uo(vt.formMethod)){await Ae(ge,Se,Lt,Dt,Mt,ot.active,rt,Ln,vt);return}K.set(ge,{routeId:Se,path:Lt}),await et(ge,Se,Lt,Dt,Mt,ot.active,rt,Ln,vt)}async function Ae(ge,Se,De,lt,rt,Bt,Ut,Dt,ot){we(),K.delete(ge);let Lt=R.fetchers.get(ge);Ce(ge,ZK(ot,Lt),{flushSync:Ut});let vt=new AbortController,Ot=ag(t.history,De,vt.signal,ot);if(Bt){let vn=await kt(lt,new URL(Ot.url).pathname,Ot.signal,ge);if(vn.type==="aborted")return;if(vn.type==="error"){Ie(ge,Se,vn.error,{flushSync:Ut});return}else if(vn.matches)lt=vn.matches;else{Ie(ge,Se,vl(404,{pathname:De}),{flushSync:Ut});return}}let Mt=aS(lt,De);if(!Mt.route.action&&!Mt.route.lazy){let vn=vl(405,{method:ot.formMethod,pathname:De,routeId:Se});Ie(ge,Se,vn,{flushSync:Ut});return}V.set(ge,vt);let Ln=H,wi=_g(a,s,Ot,lt,Mt,i,rt),ei=(await re(Ot,wi,rt,ge))[Mt.route.id];if(Ot.signal.aborted){V.get(ge)===vt&&V.delete(ge);return}if(ie.has(ge)){if(Pp(ei)||Io(ei)){Ce(ge,fd(void 0));return}}else{if(Pp(ei))if(V.delete(ge),W>Ln){Ce(ge,fd(void 0));return}else return Y.add(ge),Ce(ge,Hy(ot)),tt(Ot,ei,!1,{fetcherSubmission:ot,preventScrollReset:Dt});if(Io(ei)){Ie(ge,Se,ei.error);return}}let Fn=R.navigation.location||R.location,le=ag(t.history,Fn,vt.signal),Re=o||r,Be=R.navigation.state!=="idle"?Nf(Re,R.navigation.location,c):R.matches;ai(Be,"Didn't find any matches after fetcher action");let ke=++H;J.set(ge,ke);let ze=Hy(ot,ei.data);R.fetchers.set(ge,ze);let{dsMatches:yt,revalidatingFetchers:Pt}=YR(le,rt,a,s,t.history,R,Be,ot,Fn,i,!1,k,X,ie,K,Y,Re,c,t.patchRoutesOnNavigation!=null,[Mt.route.id,ei]);Pt.filter(vn=>vn.key!==ge).forEach(vn=>{let ui=vn.key,si=R.fetchers.get(ui),zn=Hy(void 0,si?si.data:void 0);R.fetchers.set(ui,zn),nt(ui),vn.controller&&V.set(ui,vn.controller)}),ye({fetchers:new Map(R.fetchers)});let Ht=()=>Pt.forEach(vn=>nt(vn.key));vt.signal.addEventListener("abort",Ht);let{loaderResults:Ke,fetcherResults:Tt}=await te(yt,Pt,le,rt);if(vt.signal.aborted)return;if(vt.signal.removeEventListener("abort",Ht),J.delete(ge),V.delete(ge),Pt.forEach(vn=>V.delete(vn.key)),R.fetchers.has(ge)){let vn=fd(ei.data);R.fetchers.set(ge,vn)}let qt=z2(Ke);if(qt)return tt(le,qt.result,!1,{preventScrollReset:Dt});if(qt=z2(Tt),qt)return Y.add(qt.key),tt(le,qt.result,!1,{preventScrollReset:Dt});let{loaderData:Jt,errors:xn}=i8(R,Be,Ke,void 0,Pt,Tt);jt(ke),R.navigation.state==="loading"&&ke>W?(ai(D,"Expected pending action"),z&&z.abort(),_e(R.navigation.location,{matches:Be,loaderData:Jt,errors:xn,fetchers:new Map(R.fetchers)})):(ye({errors:xn,loaderData:a8(R.loaderData,Jt,Be,xn),fetchers:new Map(R.fetchers)}),k=!1)}async function et(ge,Se,De,lt,rt,Bt,Ut,Dt,ot){let Lt=R.fetchers.get(ge);Ce(ge,Hy(ot,Lt?Lt.data:void 0),{flushSync:Ut});let vt=new AbortController,Ot=ag(t.history,De,vt.signal);if(Bt){let Fn=await kt(lt,new URL(Ot.url).pathname,Ot.signal,ge);if(Fn.type==="aborted")return;if(Fn.type==="error"){Ie(ge,Se,Fn.error,{flushSync:Ut});return}else if(Fn.matches)lt=Fn.matches;else{Ie(ge,Se,vl(404,{pathname:De}),{flushSync:Ut});return}}let Mt=aS(lt,De);V.set(ge,vt);let Ln=H,wi=_g(a,s,Ot,lt,Mt,i,rt),ei=(await re(Ot,wi,rt,ge))[Mt.route.id];if(V.get(ge)===vt&&V.delete(ge),!Ot.signal.aborted){if(ie.has(ge)){Ce(ge,fd(void 0));return}if(Pp(ei))if(W>Ln){Ce(ge,fd(void 0));return}else{Y.add(ge),await tt(Ot,ei,!1,{preventScrollReset:Dt});return}if(Io(ei)){Ie(ge,Se,ei.error);return}Ce(ge,fd(ei.data))}}async function tt(ge,Se,De,{submission:lt,fetcherSubmission:rt,preventScrollReset:Bt,replace:Ut}={}){Se.response.headers.has("X-Remix-Revalidate")&&(k=!0);let Dt=Se.response.headers.get("Location");ai(Dt,"Expected a Location header on the redirect Response"),Dt=t8(Dt,new URL(ge.url),c);let ot=Wb(R.location,Dt,{_isRedirect:!0});if(n){let wi=!1;if(Se.response.headers.has("X-Remix-Reload-Document"))wi=!0;else if(J5(Dt)){const aa=I9(Dt,!0);wi=aa.origin!==e.location.origin||Cl(aa.pathname,c)==null}if(wi){Ut?e.location.replace(Dt):e.location.assign(Dt);return}}z=null;let Lt=Ut===!0||Se.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:vt,formAction:Ot,formEncType:Mt}=R.navigation;!lt&&!rt&&vt&&Ot&&Mt&&(lt=o8(R.navigation));let Ln=lt||rt;if(AK.has(Se.response.status)&&Ln&&uo(Ln.formMethod))await be(Lt,ot,{submission:{...Ln,formAction:Dt},preventScrollReset:Bt||B,enableViewTransition:De?I:void 0});else{let wi=X4(ot,lt);await be(Lt,ot,{overrideNavigation:wi,fetcherSubmission:rt,preventScrollReset:Bt||B,enableViewTransition:De?I:void 0})}}async function re(ge,Se,De,lt){let rt,Bt={};try{rt=await jK(u,ge,Se,lt,De,!1)}catch(Ut){return Se.filter(Dt=>Dt.shouldLoad).forEach(Dt=>{Bt[Dt.route.id]={type:"error",error:Ut}}),Bt}if(ge.signal.aborted)return Bt;for(let[Ut,Dt]of Object.entries(rt))if(XK(Dt)){let ot=Dt.result;Bt[Ut]={type:"redirect",response:HK(ot,ge,Ut,Se,c)}}else Bt[Ut]=await kK(Dt);return Bt}async function te(ge,Se,De,lt){let rt=re(De,ge,lt,null),Bt=Promise.all(Se.map(async ot=>{if(ot.matches&&ot.match&&ot.request&&ot.controller){let vt=(await re(ot.request,ot.matches,lt,ot.key))[ot.match.route.id];return{[ot.key]:vt}}else return Promise.resolve({[ot.key]:{type:"error",error:vl(404,{pathname:ot.path})}})})),Ut=await rt,Dt=(await Bt).reduce((ot,Lt)=>Object.assign(ot,Lt),{});return{loaderResults:Ut,fetcherResults:Dt}}function we(){k=!0,K.forEach((ge,Se)=>{V.has(Se)&&X.add(Se),nt(Se)})}function Ce(ge,Se,De={}){R.fetchers.set(ge,Se),ye({fetchers:new Map(R.fetchers)},{flushSync:(De&&De.flushSync)===!0})}function Ie(ge,Se,De,lt={}){let rt=Pf(R.matches,Se);We(ge),ye({errors:{[rt.route.id]:De},fetchers:new Map(R.fetchers)},{flushSync:(lt&<.flushSync)===!0})}function Pe(ge){return ee.set(ge,(ee.get(ge)||0)+1),ie.has(ge)&&ie.delete(ge),R.fetchers.get(ge)||RK}function Ze(ge,Se){nt(ge,Se?.reason),Ce(ge,fd(null))}function We(ge){let Se=R.fetchers.get(ge);V.has(ge)&&!(Se&&Se.state==="loading"&&J.has(ge))&&nt(ge),K.delete(ge),J.delete(ge),Y.delete(ge),ie.delete(ge),X.delete(ge),R.fetchers.delete(ge)}function mt(ge){let Se=(ee.get(ge)||0)-1;Se<=0?(ee.delete(ge),ie.add(ge)):ee.set(ge,Se),ye({fetchers:new Map(R.fetchers)})}function nt(ge,Se){let De=V.get(ge);De&&(De.abort(Se),V.delete(ge))}function Ye(ge){for(let Se of ge){let De=Pe(Se),lt=fd(De.data);R.fetchers.set(Se,lt)}}function Je(){let ge=[],Se=!1;for(let De of Y){let lt=R.fetchers.get(De);ai(lt,`Expected fetcher: ${De}`),lt.state==="loading"&&(Y.delete(De),ge.push(De),Se=!0)}return Ye(ge),Se}function jt(ge){let Se=[];for(let[De,lt]of J)if(lt0}function wt(ge,Se){let De=R.blockers.get(ge)||ky;return Z.get(ge)!==Se&&Z.set(ge,Se),De}function Et(ge){R.blockers.delete(ge),Z.delete(ge)}function zt(ge,Se){let De=R.blockers.get(ge)||ky;ai(De.state==="unblocked"&&Se.state==="blocked"||De.state==="blocked"&&Se.state==="blocked"||De.state==="blocked"&&Se.state==="proceeding"||De.state==="blocked"&&Se.state==="unblocked"||De.state==="proceeding"&&Se.state==="unblocked",`Invalid blocker state transition: ${De.state} -> ${Se.state}`);let lt=new Map(R.blockers);lt.set(ge,Se),ye({blockers:lt})}function Te({currentLocation:ge,nextLocation:Se,historyAction:De}){if(Z.size===0)return;Z.size>1&&Za(!1,"A router only supports one blocker at a time");let lt=Array.from(Z.entries()),[rt,Bt]=lt[lt.length-1],Ut=R.blockers.get(rt);if(!(Ut&&Ut.state==="proceeding")&&Bt({currentLocation:ge,nextLocation:Se,historyAction:De}))return rt}function pt(ge){let Se=vl(404,{pathname:ge}),De=o||r,{matches:lt,route:rt}=I2(De);return{notFoundMatches:lt,route:rt,error:Se}}function at(ge,Se,De){if(g=ge,w=Se,b=De||null,!x&&R.navigation===K4){x=!0;let lt=it(R.location,R.matches);lt!=null&&ye({restoreScrollPosition:lt})}return()=>{g=null,w=null,b=null}}function St(ge,Se){return b&&b(ge,Se.map(lt=>sK(lt,R.loaderData)))||ge.key}function ct(ge,Se){if(g&&w){let De=St(ge,Se);g[De]=w()}}function it(ge,Se){if(g){let De=St(ge,Se),lt=g[De];if(typeof lt=="number")return lt}return null}function Nt(ge,Se,De){if(t.patchRoutesOnNavigation)if(ge){if(Object.keys(ge[0].params).length>0)return{active:!0,matches:iS(Se,De,c,!0)}}else return{active:!0,matches:iS(Se,De,c,!0)||[]};return{active:!1,matches:null}}async function kt(ge,Se,De,lt){if(!t.patchRoutesOnNavigation)return{type:"success",matches:ge};let rt=ge;for(;;){let Bt=o==null,Ut=o||r,Dt=s;try{await t.patchRoutesOnNavigation({signal:De,path:Se,matches:rt,fetcherKey:lt,patch:(vt,Ot)=>{De.aborted||ZR(vt,Ot,Ut,Dt,a,!1)}})}catch(vt){return{type:"error",error:vt,partialMatches:rt}}finally{Bt&&!De.aborted&&(r=[...r])}if(De.aborted)return{type:"aborted"};let ot=Nf(Ut,Se,c);if(ot)return{type:"success",matches:ot};let Lt=iS(Ut,Se,c,!0);if(!Lt||rt.length===Lt.length&&rt.every((vt,Ot)=>vt.route.id===Lt[Ot].route.id))return{type:"success",matches:null};rt=Lt}}function Xt(ge){s={},o=Kb(ge,a,void 0,s)}function rn(ge,Se,De=!1){let lt=o==null;ZR(ge,Se,o||r,s,a,De),lt&&(r=[...r],ye({}))}return N={get basename(){return c},get future(){return h},get state(){return R},get routes(){return r},get window(){return e},initialize:ae,subscribe:pe,enableScrollRestoration:at,navigate:me,fetch:Le,revalidate:ne,createHref:ge=>t.history.createHref(ge),encodeLocation:ge=>t.history.encodeLocation(ge),getFetcher:Pe,resetFetcher:Ze,deleteFetcher:mt,dispose:ce,getBlocker:wt,deleteBlocker:Et,patchRoutes:rn,_internalFetchControllers:V,_internalSetRoutes:Xt,_internalSetStateDoNotUseOrYouWillBreakYourApp(ge){ye(ge)}},N}function LK(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function lT(t,e,n,i,a,s){let r,o;if(a){r=[];for(let u of e)if(r.push(u),u.route.id===a){o=u;break}}else r=e,o=e[e.length-1];let c=Q5(i||".",Z5(r),Cl(t.pathname,n)||t.pathname,s==="path");if(i==null&&(c.search=t.search,c.hash=t.hash),(i==null||i===""||i===".")&&o){let u=tC(c.search);if(o.route.index&&!u)c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index";else if(!o.route.index&&u){let h=new URLSearchParams(c.search),d=h.getAll("index");h.delete("index"),d.filter(g=>g).forEach(g=>h.append("index",g));let p=h.toString();c.search=p?`?${p}`:""}}return n!=="/"&&(c.pathname=yK({basename:n,pathname:c.pathname})),Hf(c)}function qR(t,e,n){if(!n||!LK(n))return{path:e};if(n.formMethod&&!qK(n.formMethod))return{path:e,error:vl(405,{method:n.formMethod})};let i=()=>({path:e,error:vl(400,{type:"invalid-body"})}),s=(n.formMethod||"get").toUpperCase(),r=K9(e);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!uo(s))return i();let d=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((p,[g,b])=>`${p}${g}=${b} `,""):String(n.body);return{path:e,submission:{formMethod:s,formAction:r,formEncType:n.formEncType,formData:void 0,json:void 0,text:d}}}else if(n.formEncType==="application/json"){if(!uo(s))return i();try{let d=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:e,submission:{formMethod:s,formAction:r,formEncType:n.formEncType,formData:void 0,json:d,text:void 0}}}catch{return i()}}}ai(typeof FormData=="function","FormData is not available in this environment");let o,c;if(n.formData)o=dT(n.formData),c=n.formData;else if(n.body instanceof FormData)o=dT(n.body),c=n.body;else if(n.body instanceof URLSearchParams)o=n.body,c=n8(o);else if(n.body==null)o=new URLSearchParams,c=new FormData;else try{o=new URLSearchParams(n.body),c=n8(o)}catch{return i()}let u={formMethod:s,formAction:r,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(uo(u.formMethod))return{path:e,submission:u};let h=th(e);return t&&h.search&&tC(h.search)&&o.append("index",""),h.search=`?${o}`,{path:Hf(h),submission:u}}function YR(t,e,n,i,a,s,r,o,c,u,h,d,p,g,b,w,x,S,M,C){let A=C?Io(C[1])?C[1].error:C[1].data:void 0,N=a.createURL(s.location),R=a.createURL(c),D;if(h&&s.errors){let G=Object.keys(s.errors)[0];D=r.findIndex(k=>k.route.id===G)}else if(C&&Io(C[1])){let G=C[0];D=r.findIndex(k=>k.route.id===G)-1}let B=C?C[1].statusCode:void 0,z=B&&B>=400,I={currentUrl:N,currentParams:s.matches[0]?.params||{},nextUrl:R,nextParams:r[0].params,...o,actionResult:A,actionStatus:B},U=r.map((G,k)=>{let{route:X}=G,V=null;if(D!=null&&k>D?V=!1:X.lazy?V=!0:eC(X)?h?V=cT(X,s.loaderData,s.errors):OK(s.loaderData,s.matches[k],G)&&(V=!0):V=!1,V!==null)return uT(n,i,t,G,u,e,V);let H=z?!1:d||N.pathname+N.search===R.pathname+R.search||N.search!==R.search||IK(s.matches[k],G),W={...I,defaultShouldRevalidate:H},J=MS(G,W);return uT(n,i,t,G,u,e,J,W)}),$=[];return b.forEach((G,k)=>{if(h||!r.some(ee=>ee.route.id===G.routeId)||g.has(k))return;let X=s.fetchers.get(k),V=X&&X.state!=="idle"&&X.data===void 0,H=Nf(x,G.path,S);if(!H){if(M&&V)return;$.push({key:k,routeId:G.routeId,path:G.path,matches:null,match:null,request:null,controller:null});return}if(w.has(k))return;let W=aS(H,G.path),J=new AbortController,Y=ag(a,G.path,J.signal),K=null;if(p.has(k))p.delete(k),K=_g(n,i,Y,H,W,u,e);else if(V)d&&(K=_g(n,i,Y,H,W,u,e));else{let ee={...I,defaultShouldRevalidate:z?!1:d};MS(W,ee)&&(K=_g(n,i,Y,H,W,u,e,ee))}K&&$.push({key:k,routeId:G.routeId,path:G.path,matches:K,match:W,request:Y,controller:J})}),{dsMatches:U,revalidatingFetchers:$}}function eC(t){return t.loader!=null||t.middleware!=null&&t.middleware.length>0}function cT(t,e,n){if(t.lazy)return!0;if(!eC(t))return!1;let i=e!=null&&t.id in e,a=n!=null&&n[t.id]!==void 0;return!i&&a?!1:typeof t.loader=="function"&&t.loader.hydrate===!0?!0:!i&&!a}function OK(t,e,n){let i=!e||n.route.id!==e.route.id,a=!t.hasOwnProperty(n.route.id);return i||a}function IK(t,e){let n=t.route.path;return t.pathname!==e.pathname||n!=null&&n.endsWith("*")&&t.params["*"]!==e.params["*"]}function MS(t,e){if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate(e);if(typeof n=="boolean")return n}return e.defaultShouldRevalidate}function ZR(t,e,n,i,a,s){let r;if(t){let u=i[t];ai(u,`No route found to patch children into: routeId = ${t}`),u.children||(u.children=[]),r=u.children}else r=n;let o=[],c=[];if(e.forEach(u=>{let h=r.find(d=>k9(u,d));h?c.push({existingRoute:h,newRoute:u}):o.push(u)}),o.length>0){let u=Kb(o,a,[t||"_","patch",String(r?.length||"0")],i);r.push(...u)}if(s&&c.length>0)for(let u=0;ue.children?.some(a=>k9(n,a))):!1}var QR=new WeakMap,H9=({key:t,route:e,manifest:n,mapRouteProperties:i})=>{let a=n[e.id];if(ai(a,"No route found in manifest"),!a.lazy||typeof a.lazy!="object")return;let s=a.lazy[t];if(!s)return;let r=QR.get(a);r||(r={},QR.set(a,r));let o=r[t];if(o)return o;let c=(async()=>{let u=tK(t),d=a[t]!==void 0&&t!=="hasErrorBoundary";if(u)Za(!u,"Route property "+t+" is not a supported lazy route property. This property will be ignored."),r[t]=Promise.resolve();else if(d)Za(!1,`Route "${a.id}" has a static property "${t}" defined. The lazy property will be ignored.`);else{let p=await s();p!=null&&(Object.assign(a,{[t]:p}),Object.assign(a,i(a)))}typeof a.lazy=="object"&&(a.lazy[t]=void 0,Object.values(a.lazy).every(p=>p===void 0)&&(a.lazy=void 0))})();return r[t]=c,c},JR=new WeakMap;function zK(t,e,n,i,a){let s=n[t.id];if(ai(s,"No route found in manifest"),!t.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof t.lazy=="function"){let h=JR.get(s);if(h)return{lazyRoutePromise:h,lazyHandlerPromise:h};let d=(async()=>{ai(typeof t.lazy=="function","No lazy route function found");let p=await t.lazy(),g={};for(let b in p){let w=p[b];if(w===void 0)continue;let x=iK(b),M=s[b]!==void 0&&b!=="hasErrorBoundary";x?Za(!x,"Route property "+b+" is not a supported property to be returned from a lazy route function. This property will be ignored."):M?Za(!M,`Route "${s.id}" has a static property "${b}" defined but its lazy function is also returning a value for this property. The lazy route property "${b}" will be ignored.`):g[b]=w}Object.assign(s,g),Object.assign(s,{...i(s),lazy:void 0})})();return JR.set(s,d),d.catch(()=>{}),{lazyRoutePromise:d,lazyHandlerPromise:d}}let r=Object.keys(t.lazy),o=[],c;for(let h of r){if(a&&a.includes(h))continue;let d=H9({key:h,route:t,manifest:n,mapRouteProperties:i});d&&(o.push(d),h===e&&(c=d))}let u=o.length>0?Promise.all(o).then(()=>{}):void 0;return u?.catch(()=>{}),c?.catch(()=>{}),{lazyRoutePromise:u,lazyHandlerPromise:c}}async function e8(t){let e=t.matches.filter(a=>a.shouldLoad),n={};return(await Promise.all(e.map(a=>a.resolve()))).forEach((a,s)=>{n[e[s].route.id]=a}),n}async function BK(t){return t.matches.some(e=>e.route.middleware)?$9(t,()=>e8(t)):e8(t)}function $9(t,e){return UK(t,e,i=>i,WK,n);function n(i,a,s){if(s)return Promise.resolve(Object.assign(s.value,{[a]:{type:"error",result:i}}));{let{matches:r}=t,o=Math.min(Math.max(r.findIndex(u=>u.route.id===a),0),Math.max(r.findIndex(u=>u.unstable_shouldCallHandler()),0)),c=Pf(r,r[o].route.id).route.id;return Promise.resolve({[c]:{type:"error",result:i}})}}}async function UK(t,e,n,i,a){let{matches:s,request:r,params:o,context:c}=t,u=s.flatMap(d=>d.route.middleware?d.route.middleware.map(p=>[d.route.id,p]):[]);return await G9({request:r,params:o,context:c},u,e,n,i,a)}async function G9(t,e,n,i,a,s,r=0){let{request:o}=t;if(o.signal.aborted)throw o.signal.reason??new Error(`Request aborted: ${o.method} ${o.url}`);let c=e[r];if(!c)return await n();let[u,h]=c,d,p=async()=>{if(d)throw new Error("You may only call `next()` once per middleware");try{return d={value:await G9(t,e,n,i,a,s,r+1)},d.value}catch(g){return d={value:await s(g,u,d)},d.value}};try{let g=await h(t,p),b=g!=null?i(g):void 0;return a(b)?b:d?b??d.value:(d={value:await p()},d.value)}catch(g){return await s(g,u,d)}}function W9(t,e,n,i,a){let s=H9({key:"middleware",route:i.route,manifest:e,mapRouteProperties:t}),r=zK(i.route,uo(n.method)?"action":"loader",e,t,a);return{middleware:s,route:r.lazyRoutePromise,handler:r.lazyHandlerPromise}}function uT(t,e,n,i,a,s,r,o=null){let c=!1,u=W9(t,e,n,i,a);return{...i,_lazyPromises:u,shouldLoad:r,unstable_shouldRevalidateArgs:o,unstable_shouldCallHandler(h){return c=!0,o?typeof h=="boolean"?MS(i,{...o,defaultShouldRevalidate:h}):MS(i,o):r},resolve(h){let{lazy:d,loader:p,middleware:g}=i.route,b=c||r||h&&!uo(n.method)&&(d||p),w=g&&g.length>0&&!p&&!d;return b&&!w?FK({request:n,match:i,lazyHandlerPromise:u?.handler,lazyRoutePromise:u?.route,handlerOverride:h,scopedContext:s}):Promise.resolve({type:"data",result:void 0})}}}function _g(t,e,n,i,a,s,r,o=null){return i.map(c=>c.route.id!==a.route.id?{...c,shouldLoad:!1,unstable_shouldRevalidateArgs:o,unstable_shouldCallHandler:()=>!1,_lazyPromises:W9(t,e,n,c,s),resolve:()=>Promise.resolve({type:"data",result:void 0})}:uT(t,e,n,c,s,r,!0,o))}async function jK(t,e,n,i,a,s){n.some(u=>u._lazyPromises?.middleware)&&await Promise.all(n.map(u=>u._lazyPromises?.middleware));let r={request:e,params:n[0].params,context:a,matches:n},c=await t({...r,fetcherKey:i,runClientMiddleware:u=>{let h=r;return $9(h,()=>u({...h,fetcherKey:i,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(n.flatMap(u=>[u._lazyPromises?.handler,u._lazyPromises?.route]))}catch{}return c}async function FK({request:t,match:e,lazyHandlerPromise:n,lazyRoutePromise:i,handlerOverride:a,scopedContext:s}){let r,o,c=uo(t.method),u=c?"action":"loader",h=d=>{let p,g=new Promise((x,S)=>p=S);o=()=>p(),t.signal.addEventListener("abort",o);let b=x=>typeof d!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${u}" [routeId: ${e.route.id}]`)):d({request:t,params:e.params,context:s},...x!==void 0?[x]:[]),w=(async()=>{try{return{type:"data",result:await(a?a(S=>b(S)):b())}}catch(x){return{type:"error",result:x}}})();return Promise.race([w,g])};try{let d=c?e.route.action:e.route.loader;if(n||i)if(d){let p,[g]=await Promise.all([h(d).catch(b=>{p=b}),n,i]);if(p!==void 0)throw p;r=g}else{await n;let p=c?e.route.action:e.route.loader;if(p)[r]=await Promise.all([h(p),i]);else if(u==="action"){let g=new URL(t.url),b=g.pathname+g.search;throw vl(405,{method:t.method,pathname:b,routeId:e.route.id})}else return{type:"data",result:void 0}}else if(d)r=await h(d);else{let p=new URL(t.url),g=p.pathname+p.search;throw vl(404,{pathname:g})}}catch(d){return{type:"error",result:d}}finally{o&&t.signal.removeEventListener("abort",o)}return r}async function VK(t){let e=t.headers.get("Content-Type");return e&&/\bapplication\/json\b/.test(e)?t.body==null?null:t.json():t.text()}async function kK(t){let{result:e,type:n}=t;if(X9(e)){let i;try{i=await VK(e)}catch(a){return{type:"error",error:a}}return n==="error"?{type:"error",error:new ES(e.status,e.statusText,i),statusCode:e.status,headers:e.headers}:{type:"data",data:i,statusCode:e.status,headers:e.headers}}return n==="error"?r8(e)?e.data instanceof Error?{type:"error",error:e.data,statusCode:e.init?.status,headers:e.init?.headers?new Headers(e.init.headers):void 0}:{type:"error",error:new ES(e.init?.status||500,void 0,e.data),statusCode:Rg(e)?e.status:void 0,headers:e.init?.headers?new Headers(e.init.headers):void 0}:{type:"error",error:e,statusCode:Rg(e)?e.status:void 0}:r8(e)?{type:"data",data:e.data,statusCode:e.init?.status,headers:e.init?.headers?new Headers(e.init.headers):void 0}:{type:"data",data:e}}function HK(t,e,n,i,a){let s=t.headers.get("Location");if(ai(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!J5(s)){let r=i.slice(0,i.findIndex(o=>o.route.id===n)+1);s=lT(new URL(e.url),r,a,s),t.headers.set("Location",s)}return t}function t8(t,e,n){if(J5(t)){let i=t,a=i.startsWith("//")?new URL(e.protocol+i):new URL(i),s=Cl(a.pathname,n)!=null;if(a.origin===e.origin&&s)return a.pathname+a.search+a.hash}return t}function ag(t,e,n,i){let a=t.createURL(K9(e)).toString(),s={signal:n};if(i&&uo(i.formMethod)){let{formMethod:r,formEncType:o}=i;s.method=r.toUpperCase(),o==="application/json"?(s.headers=new Headers({"Content-Type":o}),s.body=JSON.stringify(i.json)):o==="text/plain"?s.body=i.text:o==="application/x-www-form-urlencoded"&&i.formData?s.body=dT(i.formData):s.body=i.formData}return new Request(a,s)}function dT(t){let e=new URLSearchParams;for(let[n,i]of t.entries())e.append(n,typeof i=="string"?i:i.name);return e}function n8(t){let e=new FormData;for(let[n,i]of t.entries())e.append(n,i);return e}function $K(t,e,n,i=!1,a=!1){let s={},r=null,o,c=!1,u={},h=n&&Io(n[1])?n[1].error:void 0;return t.forEach(d=>{if(!(d.route.id in e))return;let p=d.route.id,g=e[p];if(ai(!Pp(g),"Cannot handle redirect results in processLoaderData"),Io(g)){let b=g.error;if(h!==void 0&&(b=h,h=void 0),r=r||{},a)r[p]=b;else{let w=Pf(t,p);r[w.route.id]==null&&(r[w.route.id]=b)}i||(s[p]=V9),c||(c=!0,o=Rg(g.error)?g.error.status:500),g.headers&&(u[p]=g.headers)}else s[p]=g.data,g.statusCode&&g.statusCode!==200&&!c&&(o=g.statusCode),g.headers&&(u[p]=g.headers)}),h!==void 0&&n&&(r={[n[0]]:h},n[2]&&(s[n[2]]=void 0)),{loaderData:s,errors:r,statusCode:o||200,loaderHeaders:u}}function i8(t,e,n,i,a,s){let{loaderData:r,errors:o}=$K(e,n,i);return a.filter(c=>!c.matches||c.matches.some(u=>u.shouldLoad)).forEach(c=>{let{key:u,match:h,controller:d}=c;if(d&&d.signal.aborted)return;let p=s[u];if(ai(p,"Did not find corresponding fetcher result"),Io(p)){let g=Pf(t.matches,h?.route.id);o&&o[g.route.id]||(o={...o,[g.route.id]:p.error}),t.fetchers.delete(u)}else if(Pp(p))ai(!1,"Unhandled fetcher revalidation redirect");else{let g=fd(p.data);t.fetchers.set(u,g)}}),{loaderData:r,errors:o}}function a8(t,e,n,i){let a=Object.entries(e).filter(([,s])=>s!==V9).reduce((s,[r,o])=>(s[r]=o,s),{});for(let s of n){let r=s.route.id;if(!e.hasOwnProperty(r)&&t.hasOwnProperty(r)&&s.route.loader&&(a[r]=t[r]),i&&i.hasOwnProperty(r))break}return a}function s8(t){return t?Io(t[1])?{actionData:{}}:{actionData:{[t[0]]:t[1].data}}:{}}function Pf(t,e){return(e?t.slice(0,t.findIndex(i=>i.route.id===e)+1):[...t]).reverse().find(i=>i.route.hasErrorBoundary===!0)||t[0]}function I2(t){let e=t.length===1?t[0]:t.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function vl(t,{pathname:e,routeId:n,method:i,type:a,message:s}={}){let r="Unknown Server Error",o="Unknown @remix-run/router error";return t===400?(r="Bad Request",i&&e&&n?o=`You made a ${i} request to "${e}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:a==="invalid-body"&&(o="Unable to encode submission body")):t===403?(r="Forbidden",o=`Route "${n}" does not match URL "${e}"`):t===404?(r="Not Found",o=`No route matches URL "${e}"`):t===405&&(r="Method Not Allowed",i&&e&&n?o=`You made a ${i.toUpperCase()} request to "${e}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:i&&(o=`Invalid request method "${i.toUpperCase()}"`)),new ES(t||500,r,new Error(o),!0)}function z2(t){let e=Object.entries(t);for(let n=e.length-1;n>=0;n--){let[i,a]=e[n];if(Pp(a))return{key:i,result:a}}}function K9(t){let e=typeof t=="string"?th(t):t;return Hf({...e,hash:""})}function GK(t,e){return t.pathname!==e.pathname||t.search!==e.search?!1:t.hash===""?e.hash!=="":t.hash===e.hash?!0:e.hash!==""}function WK(t){return t!=null&&typeof t=="object"&&Object.entries(t).every(([e,n])=>typeof e=="string"&&KK(n))}function KK(t){return t!=null&&typeof t=="object"&&"type"in t&&"result"in t&&(t.type==="data"||t.type==="error")}function XK(t){return X9(t.result)&&CK.has(t.result.status)}function Io(t){return t.type==="error"}function Pp(t){return(t&&t.type)==="redirect"}function r8(t){return typeof t=="object"&&t!=null&&"type"in t&&"data"in t&&"init"in t&&t.type==="DataWithResponseInit"}function X9(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function qK(t){return TK.has(t.toUpperCase())}function uo(t){return EK.has(t.toUpperCase())}function tC(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function aS(t,e){let n=typeof e=="string"?th(e).search:e.search;if(t[t.length-1].route.index&&tC(n||""))return t[t.length-1];let i=U9(t);return i[i.length-1]}function o8(t){let{formMethod:e,formAction:n,formEncType:i,text:a,formData:s,json:r}=t;if(!(!e||!n||!i)){if(a!=null)return{formMethod:e,formAction:n,formEncType:i,formData:void 0,json:void 0,text:a};if(s!=null)return{formMethod:e,formAction:n,formEncType:i,formData:s,json:void 0,text:void 0};if(r!==void 0)return{formMethod:e,formAction:n,formEncType:i,formData:void 0,json:r,text:void 0}}}function X4(t,e){return e?{state:"loading",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function YK(t,e){return{state:"submitting",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function Hy(t,e){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function ZK(t,e){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e?e.data:void 0}}function fd(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function QK(t,e){try{let n=t.sessionStorage.getItem(F9);if(n){let i=JSON.parse(n);for(let[a,s]of Object.entries(i||{}))s&&Array.isArray(s)&&e.set(a,new Set(s||[]))}}catch{}}function JK(t,e){if(e.size>0){let n={};for(let[i,a]of e)n[i]=[...a];try{t.sessionStorage.setItem(F9,JSON.stringify(n))}catch(i){Za(!1,`Failed to save applied view transitions in sessionStorage (${i}).`)}}}function eX(){let t,e,n=new Promise((i,a)=>{t=async s=>{i(s);try{await n}catch{}},e=async s=>{a(s);try{await n}catch{}}});return{promise:n,resolve:t,reject:e}}var lm=P.createContext(null);lm.displayName="DataRouter";var k1=P.createContext(null);k1.displayName="DataRouterState";P.createContext(!1);var nC=P.createContext({isTransitioning:!1});nC.displayName="ViewTransition";var q9=P.createContext(new Map);q9.displayName="Fetchers";var tX=P.createContext(null);tX.displayName="Await";var xu=P.createContext(null);xu.displayName="Navigation";var Y3=P.createContext(null);Y3.displayName="Location";var mc=P.createContext({outlet:null,matches:[],isDataRoute:!1});mc.displayName="Route";var iC=P.createContext(null);iC.displayName="RouteError";function nX(t,{relative:e}={}){ai(H1(),"useHref() may be used only in the context of a component.");let{basename:n,navigator:i}=P.useContext(xu),{hash:a,pathname:s,search:r}=$1(t,{relative:e}),o=s;return n!=="/"&&(o=s==="/"?n:du([n,s])),i.createHref({pathname:o,search:r,hash:a})}function H1(){return P.useContext(Y3)!=null}function _u(){return ai(H1(),"useLocation() may be used only in the context of a component."),P.useContext(Y3).location}var Y9="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Z9(t){P.useContext(xu).static||P.useLayoutEffect(t)}function nh(){let{isDataRoute:t}=P.useContext(mc);return t?vX():iX()}function iX(){ai(H1(),"useNavigate() may be used only in the context of a component.");let t=P.useContext(lm),{basename:e,navigator:n}=P.useContext(xu),{matches:i}=P.useContext(mc),{pathname:a}=_u(),s=JSON.stringify(Z5(i)),r=P.useRef(!1);return Z9(()=>{r.current=!0}),P.useCallback((c,u={})=>{if(Za(r.current,Y9),!r.current)return;if(typeof c=="number"){n.go(c);return}let h=Q5(c,JSON.parse(s),a,u.relative==="path");t==null&&e!=="/"&&(h.pathname=h.pathname==="/"?e:du([e,h.pathname])),(u.replace?n.replace:n.push)(h,u.state,u)},[e,n,s,a,t])}var aX=P.createContext(null);function sX(t){let e=P.useContext(mc).outlet;return P.useMemo(()=>e&&P.createElement(aX.Provider,{value:t},e),[e,t])}function cm(){let{matches:t}=P.useContext(mc),e=t[t.length-1];return e?e.params:{}}function $1(t,{relative:e}={}){let{matches:n}=P.useContext(mc),{pathname:i}=_u(),a=JSON.stringify(Z5(n));return P.useMemo(()=>Q5(t,JSON.parse(a),i,e==="path"),[t,a,i,e])}function rX(t,e,n,i,a){ai(H1(),"useRoutes() may be used only in the context of a component.");let{navigator:s}=P.useContext(xu),{matches:r}=P.useContext(mc),o=r[r.length-1],c=o?o.params:{},u=o?o.pathname:"/",h=o?o.pathnameBase:"/",d=o&&o.route;{let M=d&&d.path||"";Q9(u,!d||M.endsWith("*")||M.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${u}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. Please change the parent to .`)}let p=_u(),g;g=p;let b=g.pathname||"/",w=b;if(h!=="/"){let M=h.replace(/^\//,"").split("/");w="/"+b.replace(/^\//,"").split("/").slice(M.length).join("/")}let x=Nf(t,{pathname:w});return Za(d||x!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),Za(x==null||x[x.length-1].route.element!==void 0||x[x.length-1].route.Component!==void 0||x[x.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`),dX(x&&x.map(M=>Object.assign({},M,{params:Object.assign({},c,M.params),pathname:du([h,s.encodeLocation?s.encodeLocation(M.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathname]),pathnameBase:M.pathnameBase==="/"?h:du([h,s.encodeLocation?s.encodeLocation(M.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathnameBase])})),r,n,i,a)}function oX(){let t=gX(),e=Rg(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:i},s={padding:"2px 4px",backgroundColor:i},r=null;return console.error("Error handled by React Router default ErrorBoundary:",t),r=P.createElement(P.Fragment,null,P.createElement("p",null,"💿 Hey developer 👋"),P.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",P.createElement("code",{style:s},"ErrorBoundary")," or"," ",P.createElement("code",{style:s},"errorElement")," prop on your route.")),P.createElement(P.Fragment,null,P.createElement("h2",null,"Unexpected Application Error!"),P.createElement("h3",{style:{fontStyle:"italic"}},e),n?P.createElement("pre",{style:a},n):null,r)}var lX=P.createElement(oX,null),cX=class extends P.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||e.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){this.props.unstable_onError?this.props.unstable_onError(t,e):console.error("React Router caught the following error during render",t)}render(){return this.state.error!==void 0?P.createElement(mc.Provider,{value:this.props.routeContext},P.createElement(iC.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function uX({routeContext:t,match:e,children:n}){let i=P.useContext(lm);return i&&i.static&&i.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=e.route.id),P.createElement(mc.Provider,{value:t},n)}function dX(t,e=[],n=null,i=null,a=null){if(t==null){if(!n)return null;if(n.errors)t=n.matches;else if(e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let s=t,r=n?.errors;if(r!=null){let u=s.findIndex(h=>h.route.id&&r?.[h.route.id]!==void 0);ai(u>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(r).join(",")}`),s=s.slice(0,Math.min(s.length,u+1))}let o=!1,c=-1;if(n)for(let u=0;u=0?s=s.slice(0,c+1):s=[s[0]];break}}}return s.reduceRight((u,h,d)=>{let p,g=!1,b=null,w=null;n&&(p=r&&h.route.id?r[h.route.id]:void 0,b=h.route.errorElement||lX,o&&(c<0&&d===0?(Q9("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),g=!0,w=null):c===d&&(g=!0,w=h.route.hydrateFallbackElement||null)));let x=e.concat(s.slice(0,d+1)),S=()=>{let M;return p?M=b:g?M=w:h.route.Component?M=P.createElement(h.route.Component,null):h.route.element?M=h.route.element:M=u,P.createElement(uX,{match:h,routeContext:{outlet:u,matches:x,isDataRoute:n!=null},children:M})};return n&&(h.route.ErrorBoundary||h.route.errorElement||d===0)?P.createElement(cX,{location:n.location,revalidation:n.revalidation,component:b,error:p,children:S(),routeContext:{outlet:null,matches:x,isDataRoute:!0},unstable_onError:i}):S()},null)}function aC(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function fX(t){let e=P.useContext(lm);return ai(e,aC(t)),e}function hX(t){let e=P.useContext(k1);return ai(e,aC(t)),e}function pX(t){let e=P.useContext(mc);return ai(e,aC(t)),e}function sC(t){let e=pX(t),n=e.matches[e.matches.length-1];return ai(n.route.id,`${t} can only be used on routes that contain a unique "id"`),n.route.id}function mX(){return sC("useRouteId")}function gX(){let t=P.useContext(iC),e=hX("useRouteError"),n=sC("useRouteError");return t!==void 0?t:e.errors?.[n]}function vX(){let{router:t}=fX("useNavigate"),e=sC("useNavigate"),n=P.useRef(!1);return Z9(()=>{n.current=!0}),P.useCallback(async(a,s={})=>{Za(n.current,Y9),n.current&&(typeof a=="number"?t.navigate(a):await t.navigate(a,{fromRouteId:e,...s}))},[t,e])}var l8={};function Q9(t,e,n){!e&&!l8[t]&&(l8[t]=!0,Za(!1,n))}var c8={};function u8(t,e){!t&&!c8[e]&&(c8[e]=!0,console.warn(e))}function yX(t){let e={hasErrorBoundary:t.hasErrorBoundary||t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&(t.element&&Za(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(e,{element:P.createElement(t.Component),Component:void 0})),t.HydrateFallback&&(t.hydrateFallbackElement&&Za(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(e,{hydrateFallbackElement:P.createElement(t.HydrateFallback),HydrateFallback:void 0})),t.ErrorBoundary&&(t.errorElement&&Za(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(e,{errorElement:P.createElement(t.ErrorBoundary),ErrorBoundary:void 0})),e}var bX=["HydrateFallback","hydrateFallbackElement"],xX=class{constructor(){this.status="pending",this.promise=new Promise((t,e)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",t(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",e(n))}})}};function _X({router:t,flushSync:e,unstable_onError:n}){let[i,a]=P.useState(t.state),[s,r]=P.useState(),[o,c]=P.useState({isTransitioning:!1}),[u,h]=P.useState(),[d,p]=P.useState(),[g,b]=P.useState(),w=P.useRef(new Map),x=P.useCallback(N=>{a(R=>(N.errors&&n&&Object.entries(N.errors).forEach(([D,B])=>{R.errors?.[D]!==B&&n(B)}),N))},[n]),S=P.useCallback((N,{deletedFetchers:R,flushSync:D,viewTransitionOpts:B})=>{N.fetchers.forEach((I,U)=>{I.data!==void 0&&w.current.set(U,I.data)}),R.forEach(I=>w.current.delete(I)),u8(D===!1||e!=null,'You provided the `flushSync` option to a router update, but you are not using the `` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let z=t.window!=null&&t.window.document!=null&&typeof t.window.document.startViewTransition=="function";if(u8(B==null||z,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!B||!z){e&&D?e(()=>x(N)):P.startTransition(()=>x(N));return}if(e&&D){e(()=>{d&&(u&&u.resolve(),d.skipTransition()),c({isTransitioning:!0,flushSync:!0,currentLocation:B.currentLocation,nextLocation:B.nextLocation})});let I=t.window.document.startViewTransition(()=>{e(()=>x(N))});I.finished.finally(()=>{e(()=>{h(void 0),p(void 0),r(void 0),c({isTransitioning:!1})})}),e(()=>p(I));return}d?(u&&u.resolve(),d.skipTransition(),b({state:N,currentLocation:B.currentLocation,nextLocation:B.nextLocation})):(r(N),c({isTransitioning:!0,flushSync:!1,currentLocation:B.currentLocation,nextLocation:B.nextLocation}))},[t.window,e,d,u,x]);P.useLayoutEffect(()=>t.subscribe(S),[t,S]),P.useEffect(()=>{o.isTransitioning&&!o.flushSync&&h(new xX)},[o]),P.useEffect(()=>{if(u&&s&&t.window){let N=s,R=u.promise,D=t.window.document.startViewTransition(async()=>{P.startTransition(()=>x(N)),await R});D.finished.finally(()=>{h(void 0),p(void 0),r(void 0),c({isTransitioning:!1})}),p(D)}},[s,u,t.window,x]),P.useEffect(()=>{u&&s&&i.location.key===s.location.key&&u.resolve()},[u,d,i.location,s]),P.useEffect(()=>{!o.isTransitioning&&g&&(r(g.state),c({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}),b(void 0))},[o.isTransitioning,g]);let M=P.useMemo(()=>({createHref:t.createHref,encodeLocation:t.encodeLocation,go:N=>t.navigate(N),push:(N,R,D)=>t.navigate(N,{state:R,preventScrollReset:D?.preventScrollReset}),replace:(N,R,D)=>t.navigate(N,{replace:!0,state:R,preventScrollReset:D?.preventScrollReset})}),[t]),C=t.basename||"/",A=P.useMemo(()=>({router:t,navigator:M,static:!1,basename:C,unstable_onError:n}),[t,M,C,n]);return P.createElement(P.Fragment,null,P.createElement(lm.Provider,{value:A},P.createElement(k1.Provider,{value:i},P.createElement(q9.Provider,{value:w.current},P.createElement(nC.Provider,{value:o},P.createElement(EX,{basename:C,location:i.location,navigationType:i.historyAction,navigator:M},P.createElement(SX,{routes:t.routes,future:t.future,state:i,unstable_onError:n})))))),null)}var SX=P.memo(wX);function wX({routes:t,future:e,state:n,unstable_onError:i}){return rX(t,void 0,n,i,e)}function J9(t){return sX(t.context)}function EX({basename:t="/",children:e=null,location:n,navigationType:i="POP",navigator:a,static:s=!1}){ai(!H1(),"You cannot render a inside another . You should never have more than one in your app.");let r=t.replace(/^\/*/,"/"),o=P.useMemo(()=>({basename:r,navigator:a,static:s,future:{}}),[r,a,s]);typeof n=="string"&&(n=th(n));let{pathname:c="/",search:u="",hash:h="",state:d=null,key:p="default"}=n,g=P.useMemo(()=>{let b=Cl(c,r);return b==null?null:{location:{pathname:b,search:u,hash:h,state:d,key:p},navigationType:i}},[r,c,u,h,d,p,i]);return Za(g!=null,` is not able to match the URL "${c}${u}${h}" because it does not start with the basename, so the won't render anything.`),g==null?null:P.createElement(xu.Provider,{value:o},P.createElement(Y3.Provider,{children:e,value:g}))}var sS="get",rS="application/x-www-form-urlencoded";function Z3(t){return t!=null&&typeof t.tagName=="string"}function MX(t){return Z3(t)&&t.tagName.toLowerCase()==="button"}function TX(t){return Z3(t)&&t.tagName.toLowerCase()==="form"}function CX(t){return Z3(t)&&t.tagName.toLowerCase()==="input"}function AX(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function RX(t,e){return t.button===0&&(!e||e==="_self")&&!AX(t)}var B2=null;function NX(){if(B2===null)try{new FormData(document.createElement("form"),0),B2=!1}catch{B2=!0}return B2}var PX=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function q4(t){return t!=null&&!PX.has(t)?(Za(!1,`"${t}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${rS}"`),null):t}function DX(t,e){let n,i,a,s,r;if(TX(t)){let o=t.getAttribute("action");i=o?Cl(o,e):null,n=t.getAttribute("method")||sS,a=q4(t.getAttribute("enctype"))||rS,s=new FormData(t)}else if(MX(t)||CX(t)&&(t.type==="submit"||t.type==="image")){let o=t.form;if(o==null)throw new Error('Cannot submit a