import{c as Sy,d as py,r as H,p as by,e as Ey}from"./mantine-PZICIGS6.js";var Sr={exports:{}},Nu={},pr={exports:{}},br={};var zh;function zy(){return zh||(zh=1,(function(i){function c(N,Y){var ee=N.length;N.push(Y);e:for(;0>>1,Ee=N[Me];if(0>>1;Med(ve,ee))_ed(ot,ve)?(N[Me]=ot,N[_e]=ee,Me=_e):(N[Me]=ve,N[Ue]=ee,Me=Ue);else if(_ed(ot,ee))N[Me]=ot,N[_e]=ee,Me=_e;else break e}}return Y}function d(N,Y){var ee=N.sortIndex-Y.sortIndex;return ee!==0?ee:N.id-Y.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var g=performance;i.unstable_now=function(){return g.now()}}else{var m=Date,z=m.now();i.unstable_now=function(){return m.now()-z}}var S=[],A=[],R=1,E=null,L=3,q=!1,Q=!1,X=!1,$=!1,oe=typeof setTimeout=="function"?setTimeout:null,F=typeof clearTimeout=="function"?clearTimeout:null,le=typeof setImmediate<"u"?setImmediate:null;function ae(N){for(var Y=o(A);Y!==null;){if(Y.callback===null)r(A);else if(Y.startTime<=N)r(A),Y.sortIndex=Y.expirationTime,c(S,Y);else break;Y=o(A)}}function qe(N){if(X=!1,ae(N),!Q)if(o(S)!==null)Q=!0,C||(C=!0,Ae());else{var Y=o(A);Y!==null&&yt(qe,Y.startTime-N)}}var C=!1,Oe=-1,P=5,ue=-1;function pe(){return $?!0:!(i.unstable_now()-ueN&&pe());){var Me=E.callback;if(typeof Me=="function"){E.callback=null,L=E.priorityLevel;var Ee=Me(E.expirationTime<=N);if(N=i.unstable_now(),typeof Ee=="function"){E.callback=Ee,ae(N),Y=!0;break t}E===o(S)&&r(S),ae(N)}else r(S);E=o(S)}if(E!==null)Y=!0;else{var Xe=o(A);Xe!==null&&yt(qe,Xe.startTime-N),Y=!1}}break e}finally{E=null,L=ee,q=!1}Y=void 0}}finally{Y?Ae():C=!1}}}var Ae;if(typeof le=="function")Ae=function(){le(Ge)};else if(typeof MessageChannel<"u"){var it=new MessageChannel,Fe=it.port2;it.port1.onmessage=Ge,Ae=function(){Fe.postMessage(null)}}else Ae=function(){oe(Ge,0)};function yt(N,Y){Oe=oe(function(){N(i.unstable_now())},Y)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(N){N.callback=null},i.unstable_forceFrameRate=function(N){0>N||125Me?(N.sortIndex=ee,c(A,N),o(S)===null&&N===o(A)&&(X?(F(Oe),Oe=-1):X=!0,yt(qe,ee-Me))):(N.sortIndex=Ee,c(S,N),Q||q||(Q=!0,C||(C=!0,Ae()))),N},i.unstable_shouldYield=pe,i.unstable_wrapCallback=function(N){var Y=L;return function(){var ee=L;L=Y;try{return N.apply(this,arguments)}finally{L=ee}}}})(br)),br}var Th;function Ty(){return Th||(Th=1,pr.exports=zy()),pr.exports}var Mh;function My(){if(Mh)return Nu;Mh=1;var i=Ty(),c=Sy(),o=py();function r(e){var t="https://react.dev/errors/"+e;if(1Ee||(e.current=Me[Ee],Me[Ee]=null,Ee--)}function ve(e,t){Ee++,Me[Ee]=e.current,e.current=t}var _e=Xe(null),ot=Xe(null),gt=Xe(null),Sl=Xe(null);function wa(e,t){switch(ve(gt,t),ve(ot,e),ve(_e,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Kd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Kd(t),e=wd(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Ue(_e),ve(_e,e)}function Xl(){Ue(_e),Ue(ot),Ue(gt)}function jn(e){e.memoizedState!==null&&ve(Sl,e);var t=_e.current,l=wd(t,e.type);t!==l&&(ve(ot,e),ve(_e,l))}function et(e){ot.current===e&&(Ue(_e),Ue(ot)),Sl.current===e&&(Ue(Sl),Ou._currentValue=ee)}var fl,qn;function pl(e){if(fl===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);fl=t&&t[1]||"",qn=-1)":-1n||h[a]!==M[n]){var _=` `+h[a].replace(" at new "," at ");return e.displayName&&_.includes("")&&(_=_.replace("",e.displayName)),_}while(1<=a&&0<=n);break}}}finally{kt=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?pl(l):""}function cf(e,t){switch(e.tag){case 26:case 27:case 5:return pl(e.type);case 16:return pl("Lazy");case 13:return e.child!==t&&t!==null?pl("Suspense Fallback"):pl("Suspense");case 19:return pl("SuspenseList");case 0:case 15:return Yn(e.type,!1);case 11:return Yn(e.type.render,!1);case 1:return Yn(e.type,!0);case 31:return pl("Activity");default:return""}}function Gn(e){try{var t="",l=null;do t+=cf(e,l),l=e,e=e.return;while(e);return t}catch(a){return` Error generating stack: `+a.message+` `+a.stack}}var Xn=Object.prototype.hasOwnProperty,Qn=i.unstable_scheduleCallback,Zn=i.unstable_cancelCallback,rf=i.unstable_shouldYield,bl=i.unstable_requestPaint,ft=i.unstable_now,qu=i.unstable_getCurrentPriorityLevel,Ja=i.unstable_ImmediatePriority,It=i.unstable_UserBlockingPriority,Tt=i.unstable_NormalPriority,Yu=i.unstable_LowPriority,pa=i.unstable_IdlePriority,of=i.log,cl=i.unstable_setDisableYieldValue,Ql=null,St=null;function Pt(e){if(typeof of=="function"&&cl(e),St&&typeof St.setStrictMode=="function")try{St.setStrictMode(Ql,e)}catch{}}var Et=Math.clz32?Math.clz32:Xu,Gu=Math.log,Fa=Math.LN2;function Xu(e){return e>>>=0,e===0?32:31-(Gu(e)/Fa|0)|0}var Zl=256,Vl=262144,Wa=4194304;function rl(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function $a(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var n=0,u=e.suspendedLanes,f=e.pingedLanes;e=e.warmLanes;var s=a&134217727;return s!==0?(a=s&~u,a!==0?n=rl(a):(f&=s,f!==0?n=rl(f):l||(l=s&~e,l!==0&&(n=rl(l))))):(s=a&~u,s!==0?n=rl(s):f!==0?n=rl(f):l||(l=a&~e,l!==0&&(n=rl(l)))),n===0?0:t!==0&&t!==n&&(t&u)===0&&(u=n&-n,l=t&-t,u>=l||u===32&&(l&4194048)!==0)?t:n}function Kl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ka(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ba(){var e=Wa;return Wa<<=1,(Wa&62914560)===0&&(Wa=4194304),e}function Vn(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Ea(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function v(e,t,l,a,n,u){var f=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var s=e.entanglements,h=e.expirationTimes,M=e.hiddenUpdates;for(l=f&~l;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var dm=/[\n"\\]/g;function Qt(e){return e.replace(dm,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function df(e,t,l,a,n,u,f,s){e.name="",f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?e.type=f:e.removeAttribute("type"),t!=null?f==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Xt(t)):e.value!==""+Xt(t)&&(e.value=""+Xt(t)):f!=="submit"&&f!=="reset"||e.removeAttribute("value"),t!=null?hf(e,f,Xt(t)):l!=null?hf(e,f,Xt(l)):a!=null&&e.removeAttribute("value"),n==null&&u!=null&&(e.defaultChecked=!!u),n!=null&&(e.checked=n&&typeof n!="function"&&typeof n!="symbol"),s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.name=""+Xt(s):e.removeAttribute("name")}function qr(e,t,l,a,n,u,f,s){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||l!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){sf(e);return}l=l!=null?""+Xt(l):"",t=t!=null?""+Xt(t):l,s||t===e.value||(e.value=t),e.defaultValue=t}a=a??n,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=s?e.checked:!!a,e.defaultChecked=!!a,f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.name=f),sf(e)}function hf(e,t,l){t==="number"&&Qu(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function Ia(e,t,l,a){if(e=e.options,t){t={};for(var n=0;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Sf=!1;if(Tl)try{var wn={};Object.defineProperty(wn,"passive",{get:function(){Sf=!0}}),window.addEventListener("test",wn,wn),window.removeEventListener("test",wn,wn)}catch{Sf=!1}var Jl=null,pf=null,Vu=null;function Kr(){if(Vu)return Vu;var e,t=pf,l=t.length,a,n="value"in Jl?Jl.value:Jl.textContent,u=n.length;for(e=0;e=Wn),kr=" ",Ir=!1;function Pr(e,t){switch(e){case"keyup":return Gm.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function eo(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ln=!1;function Qm(e,t){switch(e){case"compositionend":return eo(t);case"keypress":return t.which!==32?null:(Ir=!0,kr);case"textInput":return e=t.data,e===kr&&Ir?null:e;default:return null}}function Zm(e,t){if(ln)return e==="compositionend"||!Mf&&Pr(e,t)?(e=Kr(),Vu=pf=Jl=null,ln=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:l,offset:t-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=co(l)}}function oo(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?oo(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function so(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Qu(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=Qu(e.document)}return t}function Uf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var km=Tl&&"documentMode"in document&&11>=document.documentMode,an=null,Of=null,Pn=null,Rf=!1;function ho(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Rf||an==null||an!==Qu(a)||(a=an,"selectionStart"in a&&Uf(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Pn&&In(Pn,a)||(Pn=a,a=ji(Of,"onSelect"),0>=f,n-=f,hl=1<<32-Et(t)+n|l<re?(ge=W,W=null):ge=W.sibling;var Te=D(p,W,T[re],x);if(Te===null){W===null&&(W=ge);break}e&&W&&Te.alternate===null&&t(p,W),y=u(Te,y,re),ze===null?I=Te:ze.sibling=Te,ze=Te,W=ge}if(re===T.length)return l(p,W),Se&&Dl(p,re),I;if(W===null){for(;rere?(ge=W,W=null):ge=W.sibling;var va=D(p,W,Te.value,x);if(va===null){W===null&&(W=ge);break}e&&W&&va.alternate===null&&t(p,W),y=u(va,y,re),ze===null?I=va:ze.sibling=va,ze=va,W=ge}if(Te.done)return l(p,W),Se&&Dl(p,re),I;if(W===null){for(;!Te.done;re++,Te=T.next())Te=B(p,Te.value,x),Te!==null&&(y=u(Te,y,re),ze===null?I=Te:ze.sibling=Te,ze=Te);return Se&&Dl(p,re),I}for(W=a(W);!Te.done;re++,Te=T.next())Te=O(W,p,re,Te.value,x),Te!==null&&(e&&Te.alternate!==null&&W.delete(Te.key===null?re:Te.key),y=u(Te,y,re),ze===null?I=Te:ze.sibling=Te,ze=Te);return e&&W.forEach(function(gy){return t(p,gy)}),Se&&Dl(p,re),I}function Le(p,y,T,x){if(typeof T=="object"&&T!==null&&T.type===X&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case q:e:{for(var I=T.key;y!==null;){if(y.key===I){if(I=T.type,I===X){if(y.tag===7){l(p,y.sibling),x=n(y,T.props.children),x.return=p,p=x;break e}}else if(y.elementType===I||typeof I=="object"&&I!==null&&I.$$typeof===P&&xa(I)===y.type){l(p,y.sibling),x=n(y,T.props),uu(x,T),x.return=p,p=x;break e}l(p,y);break}else t(p,y);y=y.sibling}T.type===X?(x=Oa(T.props.children,p.mode,x,T.key),x.return=p,p=x):(x=ei(T.type,T.key,T.props,null,p.mode,x),uu(x,T),x.return=p,p=x)}return f(p);case Q:e:{for(I=T.key;y!==null;){if(y.key===I)if(y.tag===4&&y.stateNode.containerInfo===T.containerInfo&&y.stateNode.implementation===T.implementation){l(p,y.sibling),x=n(y,T.children||[]),x.return=p,p=x;break e}else{l(p,y);break}else t(p,y);y=y.sibling}x=Lf(T,p.mode,x),x.return=p,p=x}return f(p);case P:return T=xa(T),Le(p,y,T,x)}if(yt(T))return J(p,y,T,x);if(Ae(T)){if(I=Ae(T),typeof I!="function")throw Error(r(150));return T=I.call(T),te(p,y,T,x)}if(typeof T.then=="function")return Le(p,y,fi(T),x);if(T.$$typeof===le)return Le(p,y,ai(p,T),x);ci(p,T)}return typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint"?(T=""+T,y!==null&&y.tag===6?(l(p,y.sibling),x=n(y,T),x.return=p,p=x):(l(p,y),x=Hf(T,p.mode,x),x.return=p,p=x),f(p)):l(p,y)}return function(p,y,T,x){try{nu=0;var I=Le(p,y,T,x);return vn=null,I}catch(W){if(W===mn||W===ui)throw W;var ze=Nt(29,W,null,p.mode);return ze.lanes=x,ze.return=p,ze}}}var Ha=Lo(!0),jo=Lo(!1),Il=!1;function Ff(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Wf(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Pl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ea(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(De&2)!==0){var n=a.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),a.pending=t,t=Pu(e),bo(e,null,l),t}return Iu(e,a,t,l),Pu(e)}function iu(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,U(e,l)}}function $f(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var n=null,u=null;if(l=l.firstBaseUpdate,l!==null){do{var f={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};u===null?n=u=f:u=u.next=f,l=l.next}while(l!==null);u===null?n=u=t:u=u.next=t}else n=u=t;l={baseState:a.baseState,firstBaseUpdate:n,lastBaseUpdate:u,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var kf=!1;function fu(){if(kf){var e=hn;if(e!==null)throw e}}function cu(e,t,l,a){kf=!1;var n=e.updateQueue;Il=!1;var u=n.firstBaseUpdate,f=n.lastBaseUpdate,s=n.shared.pending;if(s!==null){n.shared.pending=null;var h=s,M=h.next;h.next=null,f===null?u=M:f.next=M,f=h;var _=e.alternate;_!==null&&(_=_.updateQueue,s=_.lastBaseUpdate,s!==f&&(s===null?_.firstBaseUpdate=M:s.next=M,_.lastBaseUpdate=h))}if(u!==null){var B=n.baseState;f=0,_=M=h=null,s=u;do{var D=s.lane&-536870913,O=D!==s.lane;if(O?(ye&D)===D:(a&D)===D){D!==0&&D===dn&&(kf=!0),_!==null&&(_=_.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});e:{var J=e,te=s;D=t;var Le=l;switch(te.tag){case 1:if(J=te.payload,typeof J=="function"){B=J.call(Le,B,D);break e}B=J;break e;case 3:J.flags=J.flags&-65537|128;case 0:if(J=te.payload,D=typeof J=="function"?J.call(Le,B,D):J,D==null)break e;B=E({},B,D);break e;case 2:Il=!0}}D=s.callback,D!==null&&(e.flags|=64,O&&(e.flags|=8192),O=n.callbacks,O===null?n.callbacks=[D]:O.push(D))}else O={lane:D,tag:s.tag,payload:s.payload,callback:s.callback,next:null},_===null?(M=_=O,h=B):_=_.next=O,f|=D;if(s=s.next,s===null){if(s=n.shared.pending,s===null)break;O=s,s=O.next,O.next=null,n.lastBaseUpdate=O,n.shared.pending=null}}while(!0);_===null&&(h=B),n.baseState=h,n.firstBaseUpdate=M,n.lastBaseUpdate=_,u===null&&(n.shared.lanes=0),ua|=f,e.lanes=f,e.memoizedState=B}}function qo(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Yo(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;eu?u:8;var f=N.T,s={};N.T=s,yc(e,!1,t,l);try{var h=n(),M=N.S;if(M!==null&&M(s,h),h!==null&&typeof h=="object"&&typeof h.then=="function"){var _=iv(h,a);su(e,t,_,jt(e))}else su(e,t,a,jt(e))}catch(B){su(e,t,{then:function(){},status:"rejected",reason:B},jt())}finally{Y.p=u,f!==null&&s.types!==null&&(f.types=s.types),N.T=f}}function dv(){}function mc(e,t,l,a){if(e.tag!==5)throw Error(r(476));var n=gs(e).queue;ys(e,n,t,ee,l===null?dv:function(){return Ss(e),l(a)})}function gs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Rl,lastRenderedState:ee},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Rl,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ss(e){var t=gs(e);t.next===null&&(t=e.alternate.memoizedState),su(e,t.next.queue,{},jt())}function vc(){return ht(Ou)}function ps(){return Pe().memoizedState}function bs(){return Pe().memoizedState}function hv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=jt();e=Pl(l);var a=ea(t,e,l);a!==null&&(Rt(a,t,l),iu(a,t,l)),t={cache:Vf()},e.payload=t;return}t=t.return}}function mv(e,t,l){var a=jt();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Si(e)?zs(t,l):(l=xf(e,t,l,a),l!==null&&(Rt(l,e,a),Ts(l,t,a)))}function Es(e,t,l){var a=jt();su(e,t,l,a)}function su(e,t,l,a){var n={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Si(e))zs(t,n);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var f=t.lastRenderedState,s=u(f,l);if(n.hasEagerState=!0,n.eagerState=s,_t(s,f))return Iu(e,t,n,0),Ye===null&&ku(),!1}catch{}if(l=xf(e,t,n,a),l!==null)return Rt(l,e,a),Ts(l,t,a),!0}return!1}function yc(e,t,l,a){if(a={lane:2,revertLane:Fc(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Si(e)){if(t)throw Error(r(479))}else t=xf(e,l,a,2),t!==null&&Rt(t,e,2)}function Si(e){var t=e.alternate;return e===ce||t!==null&&t===ce}function zs(e,t){gn=si=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Ts(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,U(e,l)}}var du={readContext:ht,use:mi,useCallback:$e,useContext:$e,useEffect:$e,useImperativeHandle:$e,useLayoutEffect:$e,useInsertionEffect:$e,useMemo:$e,useReducer:$e,useRef:$e,useState:$e,useDebugValue:$e,useDeferredValue:$e,useTransition:$e,useSyncExternalStore:$e,useId:$e,useHostTransitionStatus:$e,useFormState:$e,useActionState:$e,useOptimistic:$e,useMemoCache:$e,useCacheRefresh:$e};du.useEffectEvent=$e;var Ms={readContext:ht,use:mi,useCallback:function(e,t){return zt().memoizedState=[e,t===void 0?null:t],e},useContext:ht,useEffect:fs,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,yi(4194308,4,ss.bind(null,t,e),l)},useLayoutEffect:function(e,t){return yi(4194308,4,e,t)},useInsertionEffect:function(e,t){yi(4,2,e,t)},useMemo:function(e,t){var l=zt();t=t===void 0?null:t;var a=e();if(La){Pt(!0);try{e()}finally{Pt(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=zt();if(l!==void 0){var n=l(t);if(La){Pt(!0);try{l(t)}finally{Pt(!1)}}}else n=t;return a.memoizedState=a.baseState=n,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},a.queue=e,e=e.dispatch=mv.bind(null,ce,e),[a.memoizedState,e]},useRef:function(e){var t=zt();return e={current:e},t.memoizedState=e},useState:function(e){e=rc(e);var t=e.queue,l=Es.bind(null,ce,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:dc,useDeferredValue:function(e,t){var l=zt();return hc(l,e,t)},useTransition:function(){var e=rc(!1);return e=ys.bind(null,ce,e.queue,!0,!1),zt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=ce,n=zt();if(Se){if(l===void 0)throw Error(r(407));l=l()}else{if(l=t(),Ye===null)throw Error(r(349));(ye&127)!==0||Ko(a,t,l)}n.memoizedState=l;var u={value:l,getSnapshot:t};return n.queue=u,fs(Jo.bind(null,a,u,e),[e]),a.flags|=2048,pn(9,{destroy:void 0},wo.bind(null,a,u,l,t),null),l},useId:function(){var e=zt(),t=Ye.identifierPrefix;if(Se){var l=ml,a=hl;l=(a&~(1<<32-Et(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=di++,0<\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof a.is=="string"?f.createElement("select",{is:a.is}):f.createElement("select"),a.multiple?u.multiple=!0:a.size&&(u.size=a.size);break;default:u=typeof a.is=="string"?f.createElement(n,{is:a.is}):f.createElement(n)}}u[G]=t,u[V]=a;e:for(f=t.child;f!==null;){if(f.tag===5||f.tag===6)u.appendChild(f.stateNode);else if(f.tag!==4&&f.tag!==27&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}t.stateNode=u;e:switch(vt(u,n,a),n){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&_l(t)}}return Ze(t),Cc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&_l(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(r(166));if(e=gt.current,on(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,n=dt,n!==null)switch(n.tag){case 27:case 5:a=n.memoizedProps}e[G]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||Zd(e.nodeValue,l)),e||$l(t,!0)}else e=qi(e).createTextNode(a),e[G]=t,t.stateNode=e}return Ze(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=on(t),l!==null){if(e===null){if(!a)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[G]=t}else Ra(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ze(t),e=!1}else l=Gf(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(Bt(t),t):(Bt(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Ze(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=on(t),a!==null&&a.dehydrated!==null){if(e===null){if(!n)throw Error(r(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(317));n[G]=t}else Ra(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ze(t),n=!1}else n=Gf(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(Bt(t),t):(Bt(t),null)}return Bt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,n=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(n=a.alternate.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==n&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),Ti(t,t.updateQueue),Ze(t),null);case 4:return Xl(),e===null&&Ic(t.stateNode.containerInfo),Ze(t),null;case 10:return Ul(t.type),Ze(t),null;case 19:if(Ue(Ie),a=t.memoizedState,a===null)return Ze(t),null;if(n=(t.flags&128)!==0,u=a.rendering,u===null)if(n)mu(a,!1);else{if(ke!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=oi(e),u!==null){for(t.flags|=128,mu(a,!1),e=u.updateQueue,t.updateQueue=e,Ti(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Eo(l,e),l=l.sibling;return ve(Ie,Ie.current&1|2),Se&&Dl(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&ft()>Oi&&(t.flags|=128,n=!0,mu(a,!1),t.lanes=4194304)}else{if(!n)if(e=oi(u),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,Ti(t,e),mu(a,!0),a.tail===null&&a.tailMode==="hidden"&&!u.alternate&&!Se)return Ze(t),null}else 2*ft()-a.renderingStartTime>Oi&&l!==536870912&&(t.flags|=128,n=!0,mu(a,!1),t.lanes=4194304);a.isBackwards?(u.sibling=t.child,t.child=u):(e=a.last,e!==null?e.sibling=u:t.child=u,a.last=u)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=ft(),e.sibling=null,l=Ie.current,ve(Ie,n?l&1|2:l&1),Se&&Dl(t,a.treeForkCount),e):(Ze(t),null);case 22:case 23:return Bt(t),Pf(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(l&536870912)!==0&&(t.flags&128)===0&&(Ze(t),t.subtreeFlags&6&&(t.flags|=8192)):Ze(t),l=t.updateQueue,l!==null&&Ti(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==l&&(t.flags|=2048),e!==null&&Ue(Na),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Ul(tt),Ze(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function pv(e,t){switch(qf(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ul(tt),Xl(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return et(t),null;case 31:if(t.memoizedState!==null){if(Bt(t),t.alternate===null)throw Error(r(340));Ra()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Bt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Ra()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ue(Ie),null;case 4:return Xl(),null;case 10:return Ul(t.type),null;case 22:case 23:return Bt(t),Pf(),e!==null&&Ue(Na),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ul(tt),null;case 25:return null;default:return null}}function Fs(e,t){switch(qf(t),t.tag){case 3:Ul(tt),Xl();break;case 26:case 27:case 5:et(t);break;case 4:Xl();break;case 31:t.memoizedState!==null&&Bt(t);break;case 13:Bt(t);break;case 19:Ue(Ie);break;case 10:Ul(t.type);break;case 22:case 23:Bt(t),Pf(),e!==null&&Ue(Na);break;case 24:Ul(tt)}}function vu(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var n=a.next;l=n;do{if((l.tag&e)===e){a=void 0;var u=l.create,f=l.inst;a=u(),f.destroy=a}l=l.next}while(l!==n)}}catch(s){Ce(t,t.return,s)}}function aa(e,t,l){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var u=n.next;a=u;do{if((a.tag&e)===e){var f=a.inst,s=f.destroy;if(s!==void 0){f.destroy=void 0,n=t;var h=l,M=s;try{M()}catch(_){Ce(n,h,_)}}}a=a.next}while(a!==u)}}catch(_){Ce(t,t.return,_)}}function Ws(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Yo(t,l)}catch(a){Ce(e,e.return,a)}}}function $s(e,t,l){l.props=ja(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){Ce(e,t,a)}}function yu(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(n){Ce(e,t,n)}}function vl(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(n){Ce(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(n){Ce(e,t,n)}else l.current=null}function ks(e){var t=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(n){Ce(e,e.return,n)}}function _c(e,t,l){try{var a=e.stateNode;Xv(a,e.type,l,t),a[V]=t}catch(n){Ce(e,e.return,n)}}function Is(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&oa(e.type)||e.tag===4}function Nc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Is(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&oa(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function xc(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=zl));else if(a!==4&&(a===27&&oa(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(xc(e,t,l),e=e.sibling;e!==null;)xc(e,t,l),e=e.sibling}function Mi(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(a!==4&&(a===27&&oa(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Mi(e,t,l),e=e.sibling;e!==null;)Mi(e,t,l),e=e.sibling}function Ps(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,n=t.attributes;n.length;)t.removeAttributeNode(n[0]);vt(t,a,l),t[G]=e,t[V]=l}catch(u){Ce(e,e.return,u)}}var Nl=!1,nt=!1,Bc=!1,ed=typeof WeakSet=="function"?WeakSet:Set,st=null;function bv(e,t){if(e=e.containerInfo,tr=Ki,e=so(e),Uf(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var n=a.anchorOffset,u=a.focusNode;a=a.focusOffset;try{l.nodeType,u.nodeType}catch{l=null;break e}var f=0,s=-1,h=-1,M=0,_=0,B=e,D=null;t:for(;;){for(var O;B!==l||n!==0&&B.nodeType!==3||(s=f+n),B!==u||a!==0&&B.nodeType!==3||(h=f+a),B.nodeType===3&&(f+=B.nodeValue.length),(O=B.firstChild)!==null;)D=B,B=O;for(;;){if(B===e)break t;if(D===l&&++M===n&&(s=f),D===u&&++_===a&&(h=f),(O=B.nextSibling)!==null)break;B=D,D=B.parentNode}B=O}l=s===-1||h===-1?null:{start:s,end:h}}else l=null}l=l||{start:0,end:0}}else l=null;for(lr={focusedElem:e,selectionRange:l},Ki=!1,st=t;st!==null;)if(t=st,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,st=e;else for(;st!==null;){switch(t=st,u=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l title"))),vt(u,a,l),u[G]=e,Ve(u),a=u;break e;case"link":var f=ih("link","href",n).get(a+(l.href||""));if(f){for(var s=0;sLe&&(f=Le,Le=te,te=f);var p=ro(s,te),y=ro(s,Le);if(p&&y&&(O.rangeCount!==1||O.anchorNode!==p.node||O.anchorOffset!==p.offset||O.focusNode!==y.node||O.focusOffset!==y.offset)){var T=B.createRange();T.setStart(p.node,p.offset),O.removeAllRanges(),te>Le?(O.addRange(T),O.extend(y.node,y.offset)):(T.setEnd(y.node,y.offset),O.addRange(T))}}}}for(B=[],O=s;O=O.parentNode;)O.nodeType===1&&B.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;sl?32:l,N.T=null,l=Xc,Xc=null;var u=fa,f=jl;if(rt=0,Mn=fa=null,jl=0,(De&6)!==0)throw Error(r(331));var s=De;if(De|=4,sd(u.current),cd(u,u.current,f,l),De=s,zu(0,!1),St&&typeof St.onPostCommitFiberRoot=="function")try{St.onPostCommitFiberRoot(Ql,u)}catch{}return!0}finally{Y.p=n,N.T=a,Rd(e,t)}}function _d(e,t,l){t=Vt(l,t),t=bc(e.stateNode,t,2),e=ea(e,t,2),e!==null&&(Ea(e,2),yl(e))}function Ce(e,t,l){if(e.tag===3)_d(e,e,l);else for(;t!==null;){if(t.tag===3){_d(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(ia===null||!ia.has(a))){e=Vt(l,e),l=Ns(2),a=ea(t,l,2),a!==null&&(xs(l,a,t,e),Ea(a,2),yl(a));break}}t=t.return}}function Kc(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new Tv;var n=new Set;a.set(t,n)}else n=a.get(t),n===void 0&&(n=new Set,a.set(t,n));n.has(l)||(jc=!0,n.add(l),e=Ov.bind(null,e,t,l),t.then(e,e))}function Ov(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Ye===e&&(ye&l)===l&&(ke===4||ke===3&&(ye&62914560)===ye&&300>ft()-Ui?(De&2)===0&&Dn(e,0):qc|=l,Tn===ye&&(Tn=0)),yl(e)}function Nd(e,t){t===0&&(t=ba()),e=Ua(e,t),e!==null&&(Ea(e,t),yl(e))}function Rv(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),Nd(e,l)}function Cv(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,n=e.memoizedState;n!==null&&(l=n.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(r(314))}a!==null&&a.delete(t),Nd(e,l)}function _v(e,t){return Qn(e,t)}var Bi=null,Un=null,wc=!1,Hi=!1,Jc=!1,ra=0;function yl(e){e!==Un&&e.next===null&&(Un===null?Bi=Un=e:Un=Un.next=e),Hi=!0,wc||(wc=!0,xv())}function zu(e,t){if(!Jc&&Hi){Jc=!0;do for(var l=!1,a=Bi;a!==null;){if(e!==0){var n=a.pendingLanes;if(n===0)var u=0;else{var f=a.suspendedLanes,s=a.pingedLanes;u=(1<<31-Et(42|e)+1)-1,u&=n&~(f&~s),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(l=!0,Ld(a,u))}else u=ye,u=$a(a,a===Ye?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(u&3)===0||Kl(a,u)||(l=!0,Ld(a,u));a=a.next}while(l);Jc=!1}}function Nv(){xd()}function xd(){Hi=wc=!1;var e=0;ra!==0&&Zv()&&(e=ra);for(var t=ft(),l=null,a=Bi;a!==null;){var n=a.next,u=Bd(a,t);u===0?(a.next=null,l===null?Bi=n:l.next=n,n===null&&(Un=l)):(l=a,(e!==0||(u&3)!==0)&&(Hi=!0)),a=n}rt!==0&&rt!==5||zu(e),ra!==0&&(ra=0)}function Bd(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,n=e.expirationTimes,u=e.pendingLanes&-62914561;0s)break;var _=h.transferSize,B=h.initiatorType;_&&Vd(B)&&(h=h.responseEnd,f+=_*(h"u"?null:document;function lh(e,t,l){var a=On;if(a&&typeof t=="string"&&t){var n=Qt(t);n='link[rel="'+e+'"][href="'+n+'"]',typeof l=="string"&&(n+='[crossorigin="'+l+'"]'),th.has(n)||(th.add(n),e={rel:e,crossOrigin:l,href:t},a.querySelector(n)===null&&(t=a.createElement("link"),vt(t,"link",e),Ve(t),a.head.appendChild(t)))}}function Iv(e){ql.D(e),lh("dns-prefetch",e,null)}function Pv(e,t){ql.C(e,t),lh("preconnect",e,t)}function ey(e,t,l){ql.L(e,t,l);var a=On;if(a&&e&&t){var n='link[rel="preload"][as="'+Qt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(n+='[imagesrcset="'+Qt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(n+='[imagesizes="'+Qt(l.imageSizes)+'"]')):n+='[href="'+Qt(e)+'"]';var u=n;switch(t){case"style":u=Rn(e);break;case"script":u=Cn(e)}$t.has(u)||(e=E({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),$t.set(u,e),a.querySelector(n)!==null||t==="style"&&a.querySelector(Au(u))||t==="script"&&a.querySelector(Uu(u))||(t=a.createElement("link"),vt(t,"link",e),Ve(t),a.head.appendChild(t)))}}function ty(e,t){ql.m(e,t);var l=On;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",n='link[rel="modulepreload"][as="'+Qt(a)+'"][href="'+Qt(e)+'"]',u=n;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Cn(e)}if(!$t.has(u)&&(e=E({rel:"modulepreload",href:e},t),$t.set(u,e),l.querySelector(n)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Uu(u)))return}a=l.createElement("link"),vt(a,"link",e),Ve(a),l.head.appendChild(a)}}}function ly(e,t,l){ql.S(e,t,l);var a=On;if(a&&e){var n=sl(a).hoistableStyles,u=Rn(e);t=t||"default";var f=n.get(u);if(!f){var s={loading:0,preload:null};if(f=a.querySelector(Au(u)))s.loading=5;else{e=E({rel:"stylesheet",href:e,"data-precedence":t},l),(l=$t.get(u))&&rr(e,l);var h=f=a.createElement("link");Ve(h),vt(h,"link",e),h._p=new Promise(function(M,_){h.onload=M,h.onerror=_}),h.addEventListener("load",function(){s.loading|=1}),h.addEventListener("error",function(){s.loading|=2}),s.loading|=4,Gi(f,t,a)}f={type:"stylesheet",instance:f,count:1,state:s},n.set(u,f)}}}function ay(e,t){ql.X(e,t);var l=On;if(l&&e){var a=sl(l).hoistableScripts,n=Cn(e),u=a.get(n);u||(u=l.querySelector(Uu(n)),u||(e=E({src:e,async:!0},t),(t=$t.get(n))&&or(e,t),u=l.createElement("script"),Ve(u),vt(u,"link",e),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(n,u))}}function ny(e,t){ql.M(e,t);var l=On;if(l&&e){var a=sl(l).hoistableScripts,n=Cn(e),u=a.get(n);u||(u=l.querySelector(Uu(n)),u||(e=E({src:e,async:!0,type:"module"},t),(t=$t.get(n))&&or(e,t),u=l.createElement("script"),Ve(u),vt(u,"link",e),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(n,u))}}function ah(e,t,l,a){var n=(n=gt.current)?Yi(n):null;if(!n)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=Rn(l.href),l=sl(n).hoistableStyles,a=l.get(t),a||(a={type:"style",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=Rn(l.href);var u=sl(n).hoistableStyles,f=u.get(e);if(f||(n=n.ownerDocument||n,f={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,f),(u=n.querySelector(Au(e)))&&!u._p&&(f.instance=u,f.state.loading=5),$t.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},$t.set(e,l),u||uy(n,e,l,f.state))),t&&a===null)throw Error(r(528,""));return f}if(t&&a!==null)throw Error(r(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Cn(l),l=sl(n).hoistableScripts,a=l.get(t),a||(a={type:"script",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Rn(e){return'href="'+Qt(e)+'"'}function Au(e){return'link[rel="stylesheet"]['+e+"]"}function nh(e){return E({},e,{"data-precedence":e.precedence,precedence:null})}function uy(e,t,l,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),vt(t,"link",l),Ve(t),e.head.appendChild(t))}function Cn(e){return'[src="'+Qt(e)+'"]'}function Uu(e){return"script[async]"+e}function uh(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Qt(l.href)+'"]');if(a)return t.instance=a,Ve(a),a;var n=E({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Ve(a),vt(a,"style",n),Gi(a,l.precedence,e),t.instance=a;case"stylesheet":n=Rn(l.href);var u=e.querySelector(Au(n));if(u)return t.state.loading|=4,t.instance=u,Ve(u),u;a=nh(l),(n=$t.get(n))&&rr(a,n),u=(e.ownerDocument||e).createElement("link"),Ve(u);var f=u;return f._p=new Promise(function(s,h){f.onload=s,f.onerror=h}),vt(u,"link",a),t.state.loading|=4,Gi(u,l.precedence,e),t.instance=u;case"script":return u=Cn(l.src),(n=e.querySelector(Uu(u)))?(t.instance=n,Ve(n),n):(a=l,(n=$t.get(u))&&(a=E({},l),or(a,n)),e=e.ownerDocument||e,n=e.createElement("script"),Ve(n),vt(n,"link",a),e.head.appendChild(n),t.instance=n);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Gi(a,l.precedence,e));return t.instance}function Gi(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=a.length?a[a.length-1]:null,u=n,f=0;f title"):null)}function iy(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function ch(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function fy(e,t,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var n=Rn(a.href),u=t.querySelector(Au(n));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Qi.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=u,Ve(u);return}u=t.ownerDocument||t,a=nh(a),(n=$t.get(n))&&rr(a,n),u=u.createElement("link"),Ve(u);var f=u;f._p=new Promise(function(s,h){f.onload=s,f.onerror=h}),vt(u,"link",a),l.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=Qi.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var sr=0;function cy(e,t){return e.stylesheets&&e.count===0&&Vi(e,e.stylesheets),0sr?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(n)}}:null}function Qi(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Vi(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Zi=null;function Vi(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Zi=new Map,t.forEach(ry,e),Zi=null,Qi.call(e))}function ry(e,t){if(!(t.state.loading&4)){var l=Zi.get(e);if(l)var a=l.get(null);else{l=new Map,Zi.set(e,l);for(var n=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(c){console.error(c)}}return i(),Sr.exports=My(),Sr.exports}function Je(){return Je=Object.assign?Object.assign.bind():function(i){for(var c=1;c"u")throw new Error(c)}function Za(i,c){if(!i){typeof console<"u"&&console.warn(c);try{throw new Error(c)}catch{}}}function Ay(){return Math.random().toString(36).substr(2,8)}function Uh(i,c){return{usr:i.state,key:i.key,idx:c}}function Lu(i,c,o,r){return o===void 0&&(o=null),Je({pathname:typeof i=="string"?i:i.pathname,search:"",hash:""},typeof c=="string"?Sa(c):c,{state:o,key:c&&c.key||r||Ay()})}function Va(i){let{pathname:c="/",search:o="",hash:r=""}=i;return o&&o!=="?"&&(c+=o.charAt(0)==="?"?o:"?"+o),r&&r!=="#"&&(c+=r.charAt(0)==="#"?r:"#"+r),c}function Sa(i){let c={};if(i){let o=i.indexOf("#");o>=0&&(c.hash=i.substr(o),i=i.substr(0,o));let r=i.indexOf("?");r>=0&&(c.search=i.substr(r),i=i.substr(0,r)),i&&(c.pathname=i)}return c}function Uy(i,c,o,r){r===void 0&&(r={});let{window:d=document.defaultView,v5Compat:g=!1}=r,m=d.history,z=ut.Pop,S=null,A=R();A==null&&(A=0,m.replaceState(Je({},m.state,{idx:A}),""));function R(){return(m.state||{idx:null}).idx}function E(){z=ut.Pop;let $=R(),oe=$==null?null:$-A;A=$,S&&S({action:z,location:X.location,delta:oe})}function L($,oe){z=ut.Push;let F=Lu(X.location,$,oe);A=R()+1;let le=Uh(F,A),ae=X.createHref(F);try{m.pushState(le,"",ae)}catch(qe){if(qe instanceof DOMException&&qe.name==="DataCloneError")throw qe;d.location.assign(ae)}g&&S&&S({action:z,location:X.location,delta:1})}function q($,oe){z=ut.Replace;let F=Lu(X.location,$,oe);A=R();let le=Uh(F,A),ae=X.createHref(F);m.replaceState(le,"",ae),g&&S&&S({action:z,location:X.location,delta:0})}function Q($){let oe=d.location.origin!=="null"?d.location.origin:d.location.href,F=typeof $=="string"?$:Va($);return F=F.replace(/ $/,"%20"),fe(oe,"No window.location.(origin|href) available to create URL for href: "+F),new URL(F,oe)}let X={get action(){return z},get location(){return i(d,m)},listen($){if(S)throw new Error("A history only accepts one active listener");return d.addEventListener(Ah,E),S=$,()=>{d.removeEventListener(Ah,E),S=null}},createHref($){return c(d,$)},createURL:Q,encodeLocation($){let oe=Q($);return{pathname:oe.pathname,search:oe.search,hash:oe.hash}},push:L,replace:q,go($){return m.go($)}};return X}var je;(function(i){i.data="data",i.deferred="deferred",i.redirect="redirect",i.error="error"})(je||(je={}));const Oy=new Set(["lazy","caseSensitive","path","id","index","children"]);function Ry(i){return i.index===!0}function ef(i,c,o,r){return o===void 0&&(o=[]),r===void 0&&(r={}),i.map((d,g)=>{let m=[...o,String(g)],z=typeof d.id=="string"?d.id:m.join("-");if(fe(d.index!==!0||!d.children,"Cannot specify children on an index route"),fe(!r[z],'Found a route id collision on id "'+z+`". Route id's must be globally unique within Data Router usages`),Ry(d)){let S=Je({},d,c(d),{id:z});return r[z]=S,S}else{let S=Je({},d,c(d),{id:z,children:void 0});return r[z]=S,d.children&&(S.children=ef(d.children,c,m,r)),S}})}function Ga(i,c,o){return o===void 0&&(o="/"),Pi(i,c,o,!1)}function Pi(i,c,o,r){let d=typeof c=="string"?Sa(c):c,g=il(d.pathname||"/",o);if(g==null)return null;let m=Jh(i);_y(m);let z=null;for(let S=0;z==null&&S{let S={relativePath:z===void 0?g.path||"":z,caseSensitive:g.caseSensitive===!0,childrenIndex:m,route:g};S.relativePath.startsWith("/")&&(fe(S.relativePath.startsWith(r),'Absolute route path "'+S.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),S.relativePath=S.relativePath.slice(r.length));let A=Yl([r,S.relativePath]),R=o.concat(S);g.children&&g.children.length>0&&(fe(g.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+A+'".')),Jh(g.children,c,R,A)),!(g.path==null&&!g.index)&&c.push({path:A,score:qy(A,g.index),routesMeta:R})};return i.forEach((g,m)=>{var z;if(g.path===""||!((z=g.path)!=null&&z.includes("?")))d(g,m);else for(let S of Fh(g.path))d(g,m,S)}),c}function Fh(i){let c=i.split("/");if(c.length===0)return[];let[o,...r]=c,d=o.endsWith("?"),g=o.replace(/\?$/,"");if(r.length===0)return d?[g,""]:[g];let m=Fh(r.join("/")),z=[];return z.push(...m.map(S=>S===""?g:[g,S].join("/"))),d&&z.push(...m),z.map(S=>i.startsWith("/")&&S===""?"/":S)}function _y(i){i.sort((c,o)=>c.score!==o.score?o.score-c.score:Yy(c.routesMeta.map(r=>r.childrenIndex),o.routesMeta.map(r=>r.childrenIndex)))}const Ny=/^:[\w-]+$/,xy=3,By=2,Hy=1,Ly=10,jy=-2,Oh=i=>i==="*";function qy(i,c){let o=i.split("/"),r=o.length;return o.some(Oh)&&(r+=jy),c&&(r+=By),o.filter(d=>!Oh(d)).reduce((d,g)=>d+(Ny.test(g)?xy:g===""?Hy:Ly),r)}function Yy(i,c){return i.length===c.length&&i.slice(0,-1).every((r,d)=>r===c[d])?i[i.length-1]-c[c.length-1]:0}function Gy(i,c,o){o===void 0&&(o=!1);let{routesMeta:r}=i,d={},g="/",m=[];for(let z=0;zm==null?"":typeof m=="string"?m:String(m),g=o.split(/\/+/).map((m,z,S)=>{if(z===S.length-1&&m==="*")return d(c["*"]);const R=m.match(/^:([\w-]+)(\??)$/);if(R){const[,E,L]=R;let q=c[E];return fe(L==="?"||q!=null,'Missing ":'+E+'" param'),d(q)}return m.replace(/\?$/g,"")}).filter(m=>!!m);return r+g.join("/")}function tf(i,c){typeof i=="string"&&(i={path:i,caseSensitive:!1,end:!0});let[o,r]=Xy(i.path,i.caseSensitive,i.end),d=c.match(o);if(!d)return null;let g=d[0],m=g.replace(/(.)\/+$/,"$1"),z=d.slice(1);return{params:r.reduce((A,R,E)=>{let{paramName:L,isOptional:q}=R;if(L==="*"){let X=z[E]||"";m=g.slice(0,g.length-X.length).replace(/(.)\/+$/,"$1")}const Q=z[E];return q&&!Q?A[L]=void 0:A[L]=(Q||"").replace(/%2F/g,"/"),A},{}),pathname:g,pathnameBase:m,pattern:i}}function Xy(i,c,o){c===void 0&&(c=!1),o===void 0&&(o=!0),Za(i==="*"||!i.endsWith("*")||i.endsWith("/*"),'Route path "'+i+'" will be treated as if it were '+('"'+i.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+i.replace(/\*$/,"/*")+'".'));let r=[],d="^"+i.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(m,z,S)=>(r.push({paramName:z,isOptional:S!=null}),S?"/?([^\\/]+)?":"/([^\\/]+)"));return i.endsWith("*")?(r.push({paramName:"*"}),d+=i==="*"||i==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):o?d+="\\/*$":i!==""&&i!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,c?void 0:"i"),r]}function Qy(i){try{return i.split("/").map(c=>decodeURIComponent(c).replace(/\//g,"%2F")).join("/")}catch(c){return Za(!1,'The URL path "'+i+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+c+").")),i}}function il(i,c){if(c==="/")return i;if(!i.toLowerCase().startsWith(c.toLowerCase()))return null;let o=c.endsWith("/")?c.length-1:c.length,r=i.charAt(o);return r&&r!=="/"?null:i.slice(o)||"/"}function Zy(i,c){c===void 0&&(c="/");let{pathname:o,search:r="",hash:d=""}=typeof i=="string"?Sa(i):i;return{pathname:o?o.startsWith("/")?o:Vy(o,c):c,search:wy(r),hash:Jy(d)}}function Vy(i,c){let o=c.replace(/\/+$/,"").split("/");return i.split("/").forEach(d=>{d===".."?o.length>1&&o.pop():d!=="."&&o.push(d)}),o.length>1?o.join("/"):"/"}function Er(i,c,o,r){return"Cannot include a '"+i+"' character in a manually specified "+("`to."+c+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+o+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Wh(i){return i.filter((c,o)=>o===0||c.route.path&&c.route.path.length>0)}function af(i,c){let o=Wh(i);return c?o.map((r,d)=>d===o.length-1?r.pathname:r.pathnameBase):o.map(r=>r.pathnameBase)}function nf(i,c,o,r){r===void 0&&(r=!1);let d;typeof i=="string"?d=Sa(i):(d=Je({},i),fe(!d.pathname||!d.pathname.includes("?"),Er("?","pathname","search",d)),fe(!d.pathname||!d.pathname.includes("#"),Er("#","pathname","hash",d)),fe(!d.search||!d.search.includes("#"),Er("#","search","hash",d)));let g=i===""||d.pathname==="",m=g?"/":d.pathname,z;if(m==null)z=o;else{let E=c.length-1;if(!r&&m.startsWith("..")){let L=m.split("/");for(;L[0]==="..";)L.shift(),E-=1;d.pathname=L.join("/")}z=E>=0?c[E]:"/"}let S=Zy(d,z),A=m&&m!=="/"&&m.endsWith("/"),R=(g||m===".")&&o.endsWith("/");return!S.pathname.endsWith("/")&&(A||R)&&(S.pathname+="/"),S}const Yl=i=>i.join("/").replace(/\/\/+/g,"/"),Ky=i=>i.replace(/\/+$/,"").replace(/^\/*/,"/"),wy=i=>!i||i==="?"?"":i.startsWith("?")?i:"?"+i,Jy=i=>!i||i==="#"?"":i.startsWith("#")?i:"#"+i;class lf{constructor(c,o,r,d){d===void 0&&(d=!1),this.status=c,this.statusText=o||"",this.internal=d,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function uf(i){return i!=null&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.internal=="boolean"&&"data"in i}const $h=["post","put","patch","delete"],Fy=new Set($h),Wy=["get",...$h],$y=new Set(Wy),ky=new Set([301,302,303,307,308]),Iy=new Set([307,308]),zr={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Py={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},xn={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Cr=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,e0=i=>({hasErrorBoundary:!!i.hasErrorBoundary}),kh="remix-router-transitions";function t0(i){const c=i.window?i.window:typeof window<"u"?window:void 0,o=typeof c<"u"&&typeof c.document<"u"&&typeof c.document.createElement<"u",r=!o;fe(i.routes.length>0,"You must provide a non-empty routes array to createRouter");let d;if(i.mapRouteProperties)d=i.mapRouteProperties;else if(i.detectErrorBoundary){let v=i.detectErrorBoundary;d=b=>({hasErrorBoundary:v(b)})}else d=e0;let g={},m=ef(i.routes,d,void 0,g),z,S=i.basename||"/",A=i.dataStrategy||u0,R=i.patchRoutesOnNavigation,E=Je({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},i.future),L=null,q=new Set,Q=null,X=null,$=null,oe=i.hydrationData!=null,F=Ga(m,i.history.location,S),le=null;if(F==null&&!R){let v=Ct(404,{pathname:i.history.location.pathname}),{matches:b,route:U}=Yh(m);F=b,le={[U.id]:v}}F&&!i.hydrationData&&ka(F,m,i.history.location.pathname).active&&(F=null);let ae;if(F)if(F.some(v=>v.route.lazy))ae=!1;else if(!F.some(v=>v.route.loader))ae=!0;else if(E.v7_partialHydration){let v=i.hydrationData?i.hydrationData.loaderData:null,b=i.hydrationData?i.hydrationData.errors:null;if(b){let U=F.findIndex(j=>b[j.route.id]!==void 0);ae=F.slice(0,U+1).every(j=>!Ar(j.route,v,b))}else ae=F.every(U=>!Ar(U.route,v,b))}else ae=i.hydrationData!=null;else if(ae=!1,F=[],E.v7_partialHydration){let v=ka(null,m,i.history.location.pathname);v.active&&v.matches&&(F=v.matches)}let qe,C={historyAction:i.history.action,location:i.history.location,matches:F,initialized:ae,navigation:zr,restoreScrollPosition:i.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:i.hydrationData&&i.hydrationData.loaderData||{},actionData:i.hydrationData&&i.hydrationData.actionData||null,errors:i.hydrationData&&i.hydrationData.errors||le,fetchers:new Map,blockers:new Map},Oe=ut.Pop,P=!1,ue,pe=!1,Ge=new Map,Ae=null,it=!1,Fe=!1,yt=[],N=new Set,Y=new Map,ee=0,Me=-1,Ee=new Map,Xe=new Set,Ue=new Map,ve=new Map,_e=new Set,ot=new Map,gt=new Map,Sl;function wa(){if(L=i.history.listen(v=>{let{action:b,location:U,delta:j}=v;if(Sl){Sl(),Sl=void 0;return}Za(gt.size===0||j!=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 K=Xu({currentLocation:C.location,nextLocation:U,historyAction:b});if(K&&j!=null){let k=new Promise(ne=>{Sl=ne});i.history.go(j*-1),Fa(K,{state:"blocked",location:U,proceed(){Fa(K,{state:"proceeding",proceed:void 0,reset:void 0,location:U}),k.then(()=>i.history.go(j))},reset(){let ne=new Map(C.blockers);ne.set(K,xn),et({blockers:ne})}});return}return kt(b,U)}),o){p0(c,Ge);let v=()=>b0(c,Ge);c.addEventListener("pagehide",v),Ae=()=>c.removeEventListener("pagehide",v)}return C.initialized||kt(ut.Pop,C.location,{initialHydration:!0}),qe}function Xl(){L&&L(),Ae&&Ae(),q.clear(),ue&&ue.abort(),C.fetchers.forEach((v,b)=>pa(b)),C.blockers.forEach((v,b)=>Gu(b))}function jn(v){return q.add(v),()=>q.delete(v)}function et(v,b){b===void 0&&(b={}),C=Je({},C,v);let U=[],j=[];E.v7_fetcherPersist&&C.fetchers.forEach((K,k)=>{K.state==="idle"&&(_e.has(k)?j.push(k):U.push(k))}),[...q].forEach(K=>K(C,{deletedFetchers:j,viewTransitionOpts:b.viewTransitionOpts,flushSync:b.flushSync===!0})),E.v7_fetcherPersist&&(U.forEach(K=>C.fetchers.delete(K)),j.forEach(K=>pa(K)))}function fl(v,b,U){var j,K;let{flushSync:k}=U===void 0?{}:U,ne=C.actionData!=null&&C.navigation.formMethod!=null&&ul(C.navigation.formMethod)&&C.navigation.state==="loading"&&((j=v.state)==null?void 0:j._isRedirect)!==!0,w;b.actionData?Object.keys(b.actionData).length>0?w=b.actionData:w=null:ne?w=C.actionData:w=null;let Z=b.loaderData?jh(C.loaderData,b.loaderData,b.matches||[],b.errors):C.loaderData,G=C.blockers;G.size>0&&(G=new Map(G),G.forEach((de,ct)=>G.set(ct,xn)));let V=P===!0||C.navigation.formMethod!=null&&ul(C.navigation.formMethod)&&((K=v.state)==null?void 0:K._isRedirect)!==!0;z&&(m=z,z=void 0),it||Oe===ut.Pop||(Oe===ut.Push?i.history.push(v,v.state):Oe===ut.Replace&&i.history.replace(v,v.state));let ie;if(Oe===ut.Pop){let de=Ge.get(C.location.pathname);de&&de.has(v.pathname)?ie={currentLocation:C.location,nextLocation:v}:Ge.has(v.pathname)&&(ie={currentLocation:v,nextLocation:C.location})}else if(pe){let de=Ge.get(C.location.pathname);de?de.add(v.pathname):(de=new Set([v.pathname]),Ge.set(C.location.pathname,de)),ie={currentLocation:C.location,nextLocation:v}}et(Je({},b,{actionData:w,loaderData:Z,historyAction:Oe,location:v,initialized:!0,navigation:zr,revalidation:"idle",restoreScrollPosition:Kl(v,b.matches||C.matches),preventScrollReset:V,blockers:G}),{viewTransitionOpts:ie,flushSync:k===!0}),Oe=ut.Pop,P=!1,pe=!1,it=!1,Fe=!1,yt=[]}async function qn(v,b){if(typeof v=="number"){i.history.go(v);return}let U=Dr(C.location,C.matches,S,E.v7_prependBasename,v,E.v7_relativeSplatPath,b?.fromRouteId,b?.relative),{path:j,submission:K,error:k}=Rh(E.v7_normalizeFormMethod,!1,U,b),ne=C.location,w=Lu(C.location,j,b&&b.state);w=Je({},w,i.history.encodeLocation(w));let Z=b&&b.replace!=null?b.replace:void 0,G=ut.Push;Z===!0?G=ut.Replace:Z===!1||K!=null&&ul(K.formMethod)&&K.formAction===C.location.pathname+C.location.search&&(G=ut.Replace);let V=b&&"preventScrollReset"in b?b.preventScrollReset===!0:void 0,ie=(b&&b.flushSync)===!0,de=Xu({currentLocation:ne,nextLocation:w,historyAction:G});if(de){Fa(de,{state:"blocked",location:w,proceed(){Fa(de,{state:"proceeding",proceed:void 0,reset:void 0,location:w}),qn(v,b)},reset(){let ct=new Map(C.blockers);ct.set(de,xn),et({blockers:ct})}});return}return await kt(G,w,{submission:K,pendingError:k,preventScrollReset:V,replace:b&&b.replace,enableViewTransition:b&&b.viewTransition,flushSync:ie})}function pl(){if(Ja(),et({revalidation:"loading"}),C.navigation.state!=="submitting"){if(C.navigation.state==="idle"){kt(C.historyAction,C.location,{startUninterruptedRevalidation:!0});return}kt(Oe||C.historyAction,C.navigation.location,{overrideNavigation:C.navigation,enableViewTransition:pe===!0})}}async function kt(v,b,U){ue&&ue.abort(),ue=null,Oe=v,it=(U&&U.startUninterruptedRevalidation)===!0,$a(C.location,C.matches),P=(U&&U.preventScrollReset)===!0,pe=(U&&U.enableViewTransition)===!0;let j=z||m,K=U&&U.overrideNavigation,k=Ga(j,b,S),ne=(U&&U.flushSync)===!0,w=ka(k,j,b.pathname);if(w.active&&w.matches&&(k=w.matches),!k){let{error:Ne,notFoundMatches:be,route:xe}=Zl(b.pathname);fl(b,{matches:be,loaderData:{},errors:{[xe.id]:Ne}},{flushSync:ne});return}if(C.initialized&&!Fe&&s0(C.location,b)&&!(U&&U.submission&&ul(U.submission.formMethod))){fl(b,{matches:k},{flushSync:ne});return}ue=new AbortController;let Z=Nn(i.history,b,ue.signal,U&&U.submission),G;if(U&&U.pendingError)G=[Xa(k).route.id,{type:je.error,error:U.pendingError}];else if(U&&U.submission&&ul(U.submission.formMethod)){let Ne=await Yn(Z,b,U.submission,k,w.active,{replace:U.replace,flushSync:ne});if(Ne.shortCircuited)return;if(Ne.pendingActionResult){let[be,xe]=Ne.pendingActionResult;if(qt(xe)&&uf(xe.error)&&xe.error.status===404){ue=null,fl(b,{matches:Ne.matches,loaderData:{},errors:{[be]:xe.error}});return}}k=Ne.matches||k,G=Ne.pendingActionResult,K=Tr(b,U.submission),ne=!1,w.active=!1,Z=Nn(i.history,Z.url,Z.signal)}let{shortCircuited:V,matches:ie,loaderData:de,errors:ct}=await cf(Z,b,k,w.active,K,U&&U.submission,U&&U.fetcherSubmission,U&&U.replace,U&&U.initialHydration===!0,ne,G);V||(ue=null,fl(b,Je({matches:ie||k},qh(G),{loaderData:de,errors:ct})))}async function Yn(v,b,U,j,K,k){k===void 0&&(k={}),Ja();let ne=g0(b,U);if(et({navigation:ne},{flushSync:k.flushSync===!0}),K){let G=await ba(j,b.pathname,v.signal);if(G.type==="aborted")return{shortCircuited:!0};if(G.type==="error"){let V=Xa(G.partialMatches).route.id;return{matches:G.partialMatches,pendingActionResult:[V,{type:je.error,error:G.error}]}}else if(G.matches)j=G.matches;else{let{notFoundMatches:V,error:ie,route:de}=Zl(b.pathname);return{matches:V,pendingActionResult:[de.id,{type:je.error,error:ie}]}}}let w,Z=Hu(j,b);if(!Z.route.action&&!Z.route.lazy)w={type:je.error,error:Ct(405,{method:v.method,pathname:b.pathname,routeId:Z.route.id})};else if(w=(await ft("action",C,v,[Z],j,null))[Z.route.id],v.signal.aborted)return{shortCircuited:!0};if(Qa(w)){let G;return k&&k.replace!=null?G=k.replace:G=Bh(w.response.headers.get("Location"),new URL(v.url),S)===C.location.pathname+C.location.search,await bl(v,w,!0,{submission:U,replace:G}),{shortCircuited:!0}}if(ga(w))throw Ct(400,{type:"defer-action"});if(qt(w)){let G=Xa(j,Z.route.id);return(k&&k.replace)!==!0&&(Oe=ut.Push),{matches:j,pendingActionResult:[G.route.id,w]}}return{matches:j,pendingActionResult:[Z.route.id,w]}}async function cf(v,b,U,j,K,k,ne,w,Z,G,V){let ie=K||Tr(b,k),de=k||ne||Xh(ie),ct=!it&&(!E.v7_partialHydration||!Z);if(j){if(ct){let Ke=Gn(V);et(Je({navigation:ie},Ke!==void 0?{actionData:Ke}:{}),{flushSync:G})}let se=await ba(U,b.pathname,v.signal);if(se.type==="aborted")return{shortCircuited:!0};if(se.type==="error"){let Ke=Xa(se.partialMatches).route.id;return{matches:se.partialMatches,loaderData:{},errors:{[Ke]:se.error}}}else if(se.matches)U=se.matches;else{let{error:Ke,notFoundMatches:El,route:wl}=Zl(b.pathname);return{matches:El,loaderData:{},errors:{[wl.id]:Ke}}}}let Ne=z||m,[be,xe]=_h(i.history,C,U,de,b,E.v7_partialHydration&&Z===!0,E.v7_skipActionErrorRevalidation,Fe,yt,N,_e,Ue,Xe,Ne,S,V);if(Vl(se=>!(U&&U.some(Ke=>Ke.route.id===se))||be&&be.some(Ke=>Ke.route.id===se)),Me=++ee,be.length===0&&xe.length===0){let se=St();return fl(b,Je({matches:U,loaderData:{},errors:V&&qt(V[1])?{[V[0]]:V[1].error}:null},qh(V),se?{fetchers:new Map(C.fetchers)}:{}),{flushSync:G}),{shortCircuited:!0}}if(ct){let se={};if(!j){se.navigation=ie;let Ke=Gn(V);Ke!==void 0&&(se.actionData=Ke)}xe.length>0&&(se.fetchers=Xn(xe)),et(se,{flushSync:G})}xe.forEach(se=>{cl(se.key),se.controller&&Y.set(se.key,se.controller)});let ol=()=>xe.forEach(se=>cl(se.key));ue&&ue.signal.addEventListener("abort",ol);let{loaderResults:Yt,fetcherResults:pt}=await qu(C,U,be,xe,v);if(v.signal.aborted)return{shortCircuited:!0};ue&&ue.signal.removeEventListener("abort",ol),xe.forEach(se=>Y.delete(se.key));let bt=Ii(Yt);if(bt)return await bl(v,bt.result,!0,{replace:w}),{shortCircuited:!0};if(bt=Ii(pt),bt)return Xe.add(bt.key),await bl(v,bt.result,!0,{replace:w}),{shortCircuited:!0};let{loaderData:sl,errors:Ve}=Lh(C,U,Yt,V,xe,pt,ot);ot.forEach((se,Ke)=>{se.subscribe(El=>{(El||se.done)&&ot.delete(Ke)})}),E.v7_partialHydration&&Z&&C.errors&&(Ve=Je({},C.errors,Ve));let dl=St(),za=Pt(Me),Gt=dl||za||xe.length>0;return Je({matches:U,loaderData:sl,errors:Ve},Gt?{fetchers:new Map(C.fetchers)}:{})}function Gn(v){if(v&&!qt(v[1]))return{[v[0]]:v[1].data};if(C.actionData)return Object.keys(C.actionData).length===0?null:C.actionData}function Xn(v){return v.forEach(b=>{let U=C.fetchers.get(b.key),j=xu(void 0,U?U.data:void 0);C.fetchers.set(b.key,j)}),new Map(C.fetchers)}function Qn(v,b,U,j){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");cl(v);let K=(j&&j.flushSync)===!0,k=z||m,ne=Dr(C.location,C.matches,S,E.v7_prependBasename,U,E.v7_relativeSplatPath,b,j?.relative),w=Ga(k,ne,S),Z=ka(w,k,ne);if(Z.active&&Z.matches&&(w=Z.matches),!w){Tt(v,b,Ct(404,{pathname:ne}),{flushSync:K});return}let{path:G,submission:V,error:ie}=Rh(E.v7_normalizeFormMethod,!0,ne,j);if(ie){Tt(v,b,ie,{flushSync:K});return}let de=Hu(w,G),ct=(j&&j.preventScrollReset)===!0;if(V&&ul(V.formMethod)){Zn(v,b,G,de,w,Z.active,K,ct,V);return}Ue.set(v,{routeId:b,path:G}),rf(v,b,G,de,w,Z.active,K,ct,V)}async function Zn(v,b,U,j,K,k,ne,w,Z){Ja(),Ue.delete(v);function G(We){if(!We.route.action&&!We.route.lazy){let el=Ct(405,{method:Z.formMethod,pathname:U,routeId:b});return Tt(v,b,el,{flushSync:ne}),!0}return!1}if(!k&&G(j))return;let V=C.fetchers.get(v);It(v,S0(Z,V),{flushSync:ne});let ie=new AbortController,de=Nn(i.history,U,ie.signal,Z);if(k){let We=await ba(K,U,de.signal);if(We.type==="aborted")return;if(We.type==="error"){Tt(v,b,We.error,{flushSync:ne});return}else if(We.matches){if(K=We.matches,j=Hu(K,U),G(j))return}else{Tt(v,b,Ct(404,{pathname:U}),{flushSync:ne});return}}Y.set(v,ie);let ct=ee,be=(await ft("action",C,de,[j],K,v))[j.route.id];if(de.signal.aborted){Y.get(v)===ie&&Y.delete(v);return}if(E.v7_fetcherPersist&&_e.has(v)){if(Qa(be)||qt(be)){It(v,ya(void 0));return}}else{if(Qa(be))if(Y.delete(v),Me>ct){It(v,ya(void 0));return}else return Xe.add(v),It(v,xu(Z)),bl(de,be,!1,{fetcherSubmission:Z,preventScrollReset:w});if(qt(be)){Tt(v,b,be.error);return}}if(ga(be))throw Ct(400,{type:"defer-action"});let xe=C.navigation.location||C.location,ol=Nn(i.history,xe,ie.signal),Yt=z||m,pt=C.navigation.state!=="idle"?Ga(Yt,C.navigation.location,S):C.matches;fe(pt,"Didn't find any matches after fetcher action");let bt=++ee;Ee.set(v,bt);let sl=xu(Z,be.data);C.fetchers.set(v,sl);let[Ve,dl]=_h(i.history,C,pt,Z,xe,!1,E.v7_skipActionErrorRevalidation,Fe,yt,N,_e,Ue,Xe,Yt,S,[j.route.id,be]);dl.filter(We=>We.key!==v).forEach(We=>{let el=We.key,Ta=C.fetchers.get(el),tl=xu(void 0,Ta?Ta.data:void 0);C.fetchers.set(el,tl),cl(el),We.controller&&Y.set(el,We.controller)}),et({fetchers:new Map(C.fetchers)});let za=()=>dl.forEach(We=>cl(We.key));ie.signal.addEventListener("abort",za);let{loaderResults:Gt,fetcherResults:se}=await qu(C,pt,Ve,dl,ol);if(ie.signal.aborted)return;ie.signal.removeEventListener("abort",za),Ee.delete(v),Y.delete(v),dl.forEach(We=>Y.delete(We.key));let Ke=Ii(Gt);if(Ke)return bl(ol,Ke.result,!1,{preventScrollReset:w});if(Ke=Ii(se),Ke)return Xe.add(Ke.key),bl(ol,Ke.result,!1,{preventScrollReset:w});let{loaderData:El,errors:wl}=Lh(C,pt,Gt,void 0,dl,se,ot);if(C.fetchers.has(v)){let We=ya(be.data);C.fetchers.set(v,We)}Pt(bt),C.navigation.state==="loading"&&bt>Me?(fe(Oe,"Expected pending action"),ue&&ue.abort(),fl(C.navigation.location,{matches:pt,loaderData:El,errors:wl,fetchers:new Map(C.fetchers)})):(et({errors:wl,loaderData:jh(C.loaderData,El,pt,wl),fetchers:new Map(C.fetchers)}),Fe=!1)}async function rf(v,b,U,j,K,k,ne,w,Z){let G=C.fetchers.get(v);It(v,xu(Z,G?G.data:void 0),{flushSync:ne});let V=new AbortController,ie=Nn(i.history,U,V.signal);if(k){let be=await ba(K,U,ie.signal);if(be.type==="aborted")return;if(be.type==="error"){Tt(v,b,be.error,{flushSync:ne});return}else if(be.matches)K=be.matches,j=Hu(K,U);else{Tt(v,b,Ct(404,{pathname:U}),{flushSync:ne});return}}Y.set(v,V);let de=ee,Ne=(await ft("loader",C,ie,[j],K,v))[j.route.id];if(ga(Ne)&&(Ne=await _r(Ne,ie.signal,!0)||Ne),Y.get(v)===V&&Y.delete(v),!ie.signal.aborted){if(_e.has(v)){It(v,ya(void 0));return}if(Qa(Ne))if(Me>de){It(v,ya(void 0));return}else{Xe.add(v),await bl(ie,Ne,!1,{preventScrollReset:w});return}if(qt(Ne)){Tt(v,b,Ne.error);return}fe(!ga(Ne),"Unhandled fetcher deferred data"),It(v,ya(Ne.data))}}async function bl(v,b,U,j){let{submission:K,fetcherSubmission:k,preventScrollReset:ne,replace:w}=j===void 0?{}:j;b.response.headers.has("X-Remix-Revalidate")&&(Fe=!0);let Z=b.response.headers.get("Location");fe(Z,"Expected a Location header on the redirect Response"),Z=Bh(Z,new URL(v.url),S);let G=Lu(C.location,Z,{_isRedirect:!0});if(o){let be=!1;if(b.response.headers.has("X-Remix-Reload-Document"))be=!0;else if(Cr.test(Z)){const xe=i.history.createURL(Z);be=xe.origin!==c.location.origin||il(xe.pathname,S)==null}if(be){w?c.location.replace(Z):c.location.assign(Z);return}}ue=null;let V=w===!0||b.response.headers.has("X-Remix-Replace")?ut.Replace:ut.Push,{formMethod:ie,formAction:de,formEncType:ct}=C.navigation;!K&&!k&&ie&&de&&ct&&(K=Xh(C.navigation));let Ne=K||k;if(Iy.has(b.response.status)&&Ne&&ul(Ne.formMethod))await kt(V,G,{submission:Je({},Ne,{formAction:Z}),preventScrollReset:ne||P,enableViewTransition:U?pe:void 0});else{let be=Tr(G,K);await kt(V,G,{overrideNavigation:be,fetcherSubmission:k,preventScrollReset:ne||P,enableViewTransition:U?pe:void 0})}}async function ft(v,b,U,j,K,k){let ne,w={};try{ne=await i0(A,v,b,U,j,K,k,g,d)}catch(Z){return j.forEach(G=>{w[G.route.id]={type:je.error,error:Z}}),w}for(let[Z,G]of Object.entries(ne))if(d0(G)){let V=G.result;w[Z]={type:je.redirect,response:r0(V,U,Z,K,S,E.v7_relativeSplatPath)}}else w[Z]=await c0(G);return w}async function qu(v,b,U,j,K){let k=v.matches,ne=ft("loader",v,K,U,b,null),w=Promise.all(j.map(async V=>{if(V.matches&&V.match&&V.controller){let de=(await ft("loader",v,Nn(i.history,V.path,V.controller.signal),[V.match],V.matches,V.key))[V.match.route.id];return{[V.key]:de}}else return Promise.resolve({[V.key]:{type:je.error,error:Ct(404,{pathname:V.path})}})})),Z=await ne,G=(await w).reduce((V,ie)=>Object.assign(V,ie),{});return await Promise.all([v0(b,Z,K.signal,k,v.loaderData),y0(b,G,j)]),{loaderResults:Z,fetcherResults:G}}function Ja(){Fe=!0,yt.push(...Vl()),Ue.forEach((v,b)=>{Y.has(b)&&N.add(b),cl(b)})}function It(v,b,U){U===void 0&&(U={}),C.fetchers.set(v,b),et({fetchers:new Map(C.fetchers)},{flushSync:(U&&U.flushSync)===!0})}function Tt(v,b,U,j){j===void 0&&(j={});let K=Xa(C.matches,b);pa(v),et({errors:{[K.route.id]:U},fetchers:new Map(C.fetchers)},{flushSync:(j&&j.flushSync)===!0})}function Yu(v){return E.v7_fetcherPersist&&(ve.set(v,(ve.get(v)||0)+1),_e.has(v)&&_e.delete(v)),C.fetchers.get(v)||Py}function pa(v){let b=C.fetchers.get(v);Y.has(v)&&!(b&&b.state==="loading"&&Ee.has(v))&&cl(v),Ue.delete(v),Ee.delete(v),Xe.delete(v),_e.delete(v),N.delete(v),C.fetchers.delete(v)}function of(v){if(E.v7_fetcherPersist){let b=(ve.get(v)||0)-1;b<=0?(ve.delete(v),_e.add(v)):ve.set(v,b)}else pa(v);et({fetchers:new Map(C.fetchers)})}function cl(v){let b=Y.get(v);b&&(b.abort(),Y.delete(v))}function Ql(v){for(let b of v){let U=Yu(b),j=ya(U.data);C.fetchers.set(b,j)}}function St(){let v=[],b=!1;for(let U of Xe){let j=C.fetchers.get(U);fe(j,"Expected fetcher: "+U),j.state==="loading"&&(Xe.delete(U),v.push(U),b=!0)}return Ql(v),b}function Pt(v){let b=[];for(let[U,j]of Ee)if(j0}function Et(v,b){let U=C.blockers.get(v)||xn;return gt.get(v)!==b&>.set(v,b),U}function Gu(v){C.blockers.delete(v),gt.delete(v)}function Fa(v,b){let U=C.blockers.get(v)||xn;fe(U.state==="unblocked"&&b.state==="blocked"||U.state==="blocked"&&b.state==="blocked"||U.state==="blocked"&&b.state==="proceeding"||U.state==="blocked"&&b.state==="unblocked"||U.state==="proceeding"&&b.state==="unblocked","Invalid blocker state transition: "+U.state+" -> "+b.state);let j=new Map(C.blockers);j.set(v,b),et({blockers:j})}function Xu(v){let{currentLocation:b,nextLocation:U,historyAction:j}=v;if(gt.size===0)return;gt.size>1&&Za(!1,"A router only supports one blocker at a time");let K=Array.from(gt.entries()),[k,ne]=K[K.length-1],w=C.blockers.get(k);if(!(w&&w.state==="proceeding")&&ne({currentLocation:b,nextLocation:U,historyAction:j}))return k}function Zl(v){let b=Ct(404,{pathname:v}),U=z||m,{matches:j,route:K}=Yh(U);return Vl(),{notFoundMatches:j,route:K,error:b}}function Vl(v){let b=[];return ot.forEach((U,j)=>{(!v||v(j))&&(U.cancel(),b.push(j),ot.delete(j))}),b}function Wa(v,b,U){if(Q=v,$=b,X=U||null,!oe&&C.navigation===zr){oe=!0;let j=Kl(C.location,C.matches);j!=null&&et({restoreScrollPosition:j})}return()=>{Q=null,$=null,X=null}}function rl(v,b){return X&&X(v,b.map(j=>Cy(j,C.loaderData)))||v.key}function $a(v,b){if(Q&&$){let U=rl(v,b);Q[U]=$()}}function Kl(v,b){if(Q){let U=rl(v,b),j=Q[U];if(typeof j=="number")return j}return null}function ka(v,b,U){if(R)if(v){if(Object.keys(v[0].params).length>0)return{active:!0,matches:Pi(b,U,S,!0)}}else return{active:!0,matches:Pi(b,U,S,!0)||[]};return{active:!1,matches:null}}async function ba(v,b,U){if(!R)return{type:"success",matches:v};let j=v;for(;;){let K=z==null,k=z||m,ne=g;try{await R({path:b,matches:j,patch:(G,V)=>{U.aborted||xh(G,V,k,ne,d)}})}catch(G){return{type:"error",error:G,partialMatches:j}}finally{K&&!U.aborted&&(m=[...m])}if(U.aborted)return{type:"aborted"};let w=Ga(k,b,S);if(w)return{type:"success",matches:w};let Z=Pi(k,b,S,!0);if(!Z||j.length===Z.length&&j.every((G,V)=>G.route.id===Z[V].route.id))return{type:"success",matches:null};j=Z}}function Vn(v){g={},z=ef(v,d,void 0,g)}function Ea(v,b){let U=z==null;xh(v,b,z||m,g,d),U&&(m=[...m],et({}))}return qe={get basename(){return S},get future(){return E},get state(){return C},get routes(){return m},get window(){return c},initialize:wa,subscribe:jn,enableScrollRestoration:Wa,navigate:qn,fetch:Qn,revalidate:pl,createHref:v=>i.history.createHref(v),encodeLocation:v=>i.history.encodeLocation(v),getFetcher:Yu,deleteFetcher:of,dispose:Xl,getBlocker:Et,deleteBlocker:Gu,patchRoutes:Ea,_internalFetchControllers:Y,_internalActiveDeferreds:ot,_internalSetRoutes:Vn},qe}function l0(i){return i!=null&&("formData"in i&&i.formData!=null||"body"in i&&i.body!==void 0)}function Dr(i,c,o,r,d,g,m,z){let S,A;if(m){S=[];for(let E of c)if(S.push(E),E.route.id===m){A=E;break}}else S=c,A=c[c.length-1];let R=nf(d||".",af(S,g),il(i.pathname,o)||i.pathname,z==="path");if(d==null&&(R.search=i.search,R.hash=i.hash),(d==null||d===""||d===".")&&A){let E=Nr(R.search);if(A.route.index&&!E)R.search=R.search?R.search.replace(/^\?/,"?index&"):"?index";else if(!A.route.index&&E){let L=new URLSearchParams(R.search),q=L.getAll("index");L.delete("index"),q.filter(X=>X).forEach(X=>L.append("index",X));let Q=L.toString();R.search=Q?"?"+Q:""}}return r&&o!=="/"&&(R.pathname=R.pathname==="/"?o:Yl([o,R.pathname])),Va(R)}function Rh(i,c,o,r){if(!r||!l0(r))return{path:o};if(r.formMethod&&!m0(r.formMethod))return{path:o,error:Ct(405,{method:r.formMethod})};let d=()=>({path:o,error:Ct(400,{type:"invalid-body"})}),g=r.formMethod||"get",m=i?g.toUpperCase():g.toLowerCase(),z=em(o);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!ul(m))return d();let L=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((q,Q)=>{let[X,$]=Q;return""+q+X+"="+$+` `},""):String(r.body);return{path:o,submission:{formMethod:m,formAction:z,formEncType:r.formEncType,formData:void 0,json:void 0,text:L}}}else if(r.formEncType==="application/json"){if(!ul(m))return d();try{let L=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:o,submission:{formMethod:m,formAction:z,formEncType:r.formEncType,formData:void 0,json:L,text:void 0}}}catch{return d()}}}fe(typeof FormData=="function","FormData is not available in this environment");let S,A;if(r.formData)S=Ur(r.formData),A=r.formData;else if(r.body instanceof FormData)S=Ur(r.body),A=r.body;else if(r.body instanceof URLSearchParams)S=r.body,A=Hh(S);else if(r.body==null)S=new URLSearchParams,A=new FormData;else try{S=new URLSearchParams(r.body),A=Hh(S)}catch{return d()}let R={formMethod:m,formAction:z,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:A,json:void 0,text:void 0};if(ul(R.formMethod))return{path:o,submission:R};let E=Sa(o);return c&&E.search&&Nr(E.search)&&S.append("index",""),E.search="?"+S,{path:Va(E),submission:R}}function Ch(i,c,o){o===void 0&&(o=!1);let r=i.findIndex(d=>d.route.id===c);return r>=0?i.slice(0,o?r+1:r):i}function _h(i,c,o,r,d,g,m,z,S,A,R,E,L,q,Q,X){let $=X?qt(X[1])?X[1].error:X[1].data:void 0,oe=i.createURL(c.location),F=i.createURL(d),le=o;g&&c.errors?le=Ch(o,Object.keys(c.errors)[0],!0):X&&qt(X[1])&&(le=Ch(o,X[0]));let ae=X?X[1].statusCode:void 0,qe=m&&ae&&ae>=400,C=le.filter((P,ue)=>{let{route:pe}=P;if(pe.lazy)return!0;if(pe.loader==null)return!1;if(g)return Ar(pe,c.loaderData,c.errors);if(a0(c.loaderData,c.matches[ue],P)||S.some(it=>it===P.route.id))return!0;let Ge=c.matches[ue],Ae=P;return Nh(P,Je({currentUrl:oe,currentParams:Ge.params,nextUrl:F,nextParams:Ae.params},r,{actionResult:$,actionStatus:ae,defaultShouldRevalidate:qe?!1:z||oe.pathname+oe.search===F.pathname+F.search||oe.search!==F.search||Ih(Ge,Ae)}))}),Oe=[];return E.forEach((P,ue)=>{if(g||!o.some(Fe=>Fe.route.id===P.routeId)||R.has(ue))return;let pe=Ga(q,P.path,Q);if(!pe){Oe.push({key:ue,routeId:P.routeId,path:P.path,matches:null,match:null,controller:null});return}let Ge=c.fetchers.get(ue),Ae=Hu(pe,P.path),it=!1;L.has(ue)?it=!1:A.has(ue)?(A.delete(ue),it=!0):Ge&&Ge.state!=="idle"&&Ge.data===void 0?it=z:it=Nh(Ae,Je({currentUrl:oe,currentParams:c.matches[c.matches.length-1].params,nextUrl:F,nextParams:o[o.length-1].params},r,{actionResult:$,actionStatus:ae,defaultShouldRevalidate:qe?!1:z})),it&&Oe.push({key:ue,routeId:P.routeId,path:P.path,matches:pe,match:Ae,controller:new AbortController})}),[C,Oe]}function Ar(i,c,o){if(i.lazy)return!0;if(!i.loader)return!1;let r=c!=null&&c[i.id]!==void 0,d=o!=null&&o[i.id]!==void 0;return!r&&d?!1:typeof i.loader=="function"&&i.loader.hydrate===!0?!0:!r&&!d}function a0(i,c,o){let r=!c||o.route.id!==c.route.id,d=i[o.route.id]===void 0;return r||d}function Ih(i,c){let o=i.route.path;return i.pathname!==c.pathname||o!=null&&o.endsWith("*")&&i.params["*"]!==c.params["*"]}function Nh(i,c){if(i.route.shouldRevalidate){let o=i.route.shouldRevalidate(c);if(typeof o=="boolean")return o}return c.defaultShouldRevalidate}function xh(i,c,o,r,d){var g;let m;if(i){let A=r[i];fe(A,"No route found to patch children into: routeId = "+i),A.children||(A.children=[]),m=A.children}else m=o;let z=c.filter(A=>!m.some(R=>Ph(A,R))),S=ef(z,d,[i||"_","patch",String(((g=m)==null?void 0:g.length)||"0")],r);m.push(...S)}function Ph(i,c){return"id"in i&&"id"in c&&i.id===c.id?!0:i.index===c.index&&i.path===c.path&&i.caseSensitive===c.caseSensitive?(!i.children||i.children.length===0)&&(!c.children||c.children.length===0)?!0:i.children.every((o,r)=>{var d;return(d=c.children)==null?void 0:d.some(g=>Ph(o,g))}):!1}async function n0(i,c,o){if(!i.lazy)return;let r=await i.lazy();if(!i.lazy)return;let d=o[i.id];fe(d,"No route found in manifest");let g={};for(let m in r){let S=d[m]!==void 0&&m!=="hasErrorBoundary";Za(!S,'Route "'+d.id+'" has a static property "'+m+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+m+'" will be ignored.')),!S&&!Oy.has(m)&&(g[m]=r[m])}Object.assign(d,g),Object.assign(d,Je({},c(d),{lazy:void 0}))}async function u0(i){let{matches:c}=i,o=c.filter(d=>d.shouldLoad);return(await Promise.all(o.map(d=>d.resolve()))).reduce((d,g,m)=>Object.assign(d,{[o[m].route.id]:g}),{})}async function i0(i,c,o,r,d,g,m,z,S,A){let R=g.map(q=>q.route.lazy?n0(q.route,S,z):void 0),E=g.map((q,Q)=>{let X=R[Q],$=d.some(F=>F.route.id===q.route.id);return Je({},q,{shouldLoad:$,resolve:async F=>(F&&r.method==="GET"&&(q.route.lazy||q.route.loader)&&($=!0),$?f0(c,r,q,X,F,A):Promise.resolve({type:je.data,result:void 0}))})}),L=await i({matches:E,request:r,params:g[0].params,fetcherKey:m,context:A});try{await Promise.all(R)}catch{}return L}async function f0(i,c,o,r,d,g){let m,z,S=A=>{let R,E=new Promise((Q,X)=>R=X);z=()=>R(),c.signal.addEventListener("abort",z);let L=Q=>typeof A!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+i+'" [routeId: '+o.route.id+"]"))):A({request:c,params:o.params,context:g},...Q!==void 0?[Q]:[]),q=(async()=>{try{return{type:"data",result:await(d?d(X=>L(X)):L())}}catch(Q){return{type:"error",result:Q}}})();return Promise.race([q,E])};try{let A=o.route[i];if(r)if(A){let R,[E]=await Promise.all([S(A).catch(L=>{R=L}),r]);if(R!==void 0)throw R;m=E}else if(await r,A=o.route[i],A)m=await S(A);else if(i==="action"){let R=new URL(c.url),E=R.pathname+R.search;throw Ct(405,{method:c.method,pathname:E,routeId:o.route.id})}else return{type:je.data,result:void 0};else if(A)m=await S(A);else{let R=new URL(c.url),E=R.pathname+R.search;throw Ct(404,{pathname:E})}fe(m.result!==void 0,"You defined "+(i==="action"?"an action":"a loader")+" for route "+('"'+o.route.id+"\" but didn't return anything from your `"+i+"` ")+"function. Please return a value or `null`.")}catch(A){return{type:je.error,result:A}}finally{z&&c.signal.removeEventListener("abort",z)}return m}async function c0(i){let{result:c,type:o}=i;if(tm(c)){let A;try{let R=c.headers.get("Content-Type");R&&/\bapplication\/json\b/.test(R)?c.body==null?A=null:A=await c.json():A=await c.text()}catch(R){return{type:je.error,error:R}}return o===je.error?{type:je.error,error:new lf(c.status,c.statusText,A),statusCode:c.status,headers:c.headers}:{type:je.data,data:A,statusCode:c.status,headers:c.headers}}if(o===je.error){if(Gh(c)){var r;if(c.data instanceof Error){var d;return{type:je.error,error:c.data,statusCode:(d=c.init)==null?void 0:d.status}}c=new lf(((r=c.init)==null?void 0:r.status)||500,void 0,c.data)}return{type:je.error,error:c,statusCode:uf(c)?c.status:void 0}}if(h0(c)){var g,m;return{type:je.deferred,deferredData:c,statusCode:(g=c.init)==null?void 0:g.status,headers:((m=c.init)==null?void 0:m.headers)&&new Headers(c.init.headers)}}if(Gh(c)){var z,S;return{type:je.data,data:c.data,statusCode:(z=c.init)==null?void 0:z.status,headers:(S=c.init)!=null&&S.headers?new Headers(c.init.headers):void 0}}return{type:je.data,data:c}}function r0(i,c,o,r,d,g){let m=i.headers.get("Location");if(fe(m,"Redirects returned/thrown from loaders/actions must have a Location header"),!Cr.test(m)){let z=r.slice(0,r.findIndex(S=>S.route.id===o)+1);m=Dr(new URL(c.url),z,d,!0,m,g),i.headers.set("Location",m)}return i}function Bh(i,c,o){if(Cr.test(i)){let r=i,d=r.startsWith("//")?new URL(c.protocol+r):new URL(r),g=il(d.pathname,o)!=null;if(d.origin===c.origin&&g)return d.pathname+d.search+d.hash}return i}function Nn(i,c,o,r){let d=i.createURL(em(c)).toString(),g={signal:o};if(r&&ul(r.formMethod)){let{formMethod:m,formEncType:z}=r;g.method=m.toUpperCase(),z==="application/json"?(g.headers=new Headers({"Content-Type":z}),g.body=JSON.stringify(r.json)):z==="text/plain"?g.body=r.text:z==="application/x-www-form-urlencoded"&&r.formData?g.body=Ur(r.formData):g.body=r.formData}return new Request(d,g)}function Ur(i){let c=new URLSearchParams;for(let[o,r]of i.entries())c.append(o,typeof r=="string"?r:r.name);return c}function Hh(i){let c=new FormData;for(let[o,r]of i.entries())c.append(o,r);return c}function o0(i,c,o,r,d){let g={},m=null,z,S=!1,A={},R=o&&qt(o[1])?o[1].error:void 0;return i.forEach(E=>{if(!(E.route.id in c))return;let L=E.route.id,q=c[L];if(fe(!Qa(q),"Cannot handle redirect results in processLoaderData"),qt(q)){let Q=q.error;R!==void 0&&(Q=R,R=void 0),m=m||{};{let X=Xa(i,L);m[X.route.id]==null&&(m[X.route.id]=Q)}g[L]=void 0,S||(S=!0,z=uf(q.error)?q.error.status:500),q.headers&&(A[L]=q.headers)}else ga(q)?(r.set(L,q.deferredData),g[L]=q.deferredData.data,q.statusCode!=null&&q.statusCode!==200&&!S&&(z=q.statusCode),q.headers&&(A[L]=q.headers)):(g[L]=q.data,q.statusCode&&q.statusCode!==200&&!S&&(z=q.statusCode),q.headers&&(A[L]=q.headers))}),R!==void 0&&o&&(m={[o[0]]:R},g[o[0]]=void 0),{loaderData:g,errors:m,statusCode:z||200,loaderHeaders:A}}function Lh(i,c,o,r,d,g,m){let{loaderData:z,errors:S}=o0(c,o,r,m);return d.forEach(A=>{let{key:R,match:E,controller:L}=A,q=g[R];if(fe(q,"Did not find corresponding fetcher result"),!(L&&L.signal.aborted))if(qt(q)){let Q=Xa(i.matches,E?.route.id);S&&S[Q.route.id]||(S=Je({},S,{[Q.route.id]:q.error})),i.fetchers.delete(R)}else if(Qa(q))fe(!1,"Unhandled fetcher revalidation redirect");else if(ga(q))fe(!1,"Unhandled fetcher deferred data");else{let Q=ya(q.data);i.fetchers.set(R,Q)}}),{loaderData:z,errors:S}}function jh(i,c,o,r){let d=Je({},c);for(let g of o){let m=g.route.id;if(c.hasOwnProperty(m)?c[m]!==void 0&&(d[m]=c[m]):i[m]!==void 0&&g.route.loader&&(d[m]=i[m]),r&&r.hasOwnProperty(m))break}return d}function qh(i){return i?qt(i[1])?{actionData:{}}:{actionData:{[i[0]]:i[1].data}}:{}}function Xa(i,c){return(c?i.slice(0,i.findIndex(r=>r.route.id===c)+1):[...i]).reverse().find(r=>r.route.hasErrorBoundary===!0)||i[0]}function Yh(i){let c=i.length===1?i[0]:i.find(o=>o.index||!o.path||o.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:c}],route:c}}function Ct(i,c){let{pathname:o,routeId:r,method:d,type:g,message:m}=c===void 0?{}:c,z="Unknown Server Error",S="Unknown @remix-run/router error";return i===400?(z="Bad Request",d&&o&&r?S="You made a "+d+' request to "'+o+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":g==="defer-action"?S="defer() is not supported in actions":g==="invalid-body"&&(S="Unable to encode submission body")):i===403?(z="Forbidden",S='Route "'+r+'" does not match URL "'+o+'"'):i===404?(z="Not Found",S='No route matches URL "'+o+'"'):i===405&&(z="Method Not Allowed",d&&o&&r?S="You made a "+d.toUpperCase()+' request to "'+o+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":d&&(S='Invalid request method "'+d.toUpperCase()+'"')),new lf(i||500,z,new Error(S),!0)}function Ii(i){let c=Object.entries(i);for(let o=c.length-1;o>=0;o--){let[r,d]=c[o];if(Qa(d))return{key:r,result:d}}}function em(i){let c=typeof i=="string"?Sa(i):i;return Va(Je({},c,{hash:""}))}function s0(i,c){return i.pathname!==c.pathname||i.search!==c.search?!1:i.hash===""?c.hash!=="":i.hash===c.hash?!0:c.hash!==""}function d0(i){return tm(i.result)&&ky.has(i.result.status)}function ga(i){return i.type===je.deferred}function qt(i){return i.type===je.error}function Qa(i){return(i&&i.type)===je.redirect}function Gh(i){return typeof i=="object"&&i!=null&&"type"in i&&"data"in i&&"init"in i&&i.type==="DataWithResponseInit"}function h0(i){let c=i;return c&&typeof c=="object"&&typeof c.data=="object"&&typeof c.subscribe=="function"&&typeof c.cancel=="function"&&typeof c.resolveData=="function"}function tm(i){return i!=null&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.headers=="object"&&typeof i.body<"u"}function m0(i){return $y.has(i.toLowerCase())}function ul(i){return Fy.has(i.toLowerCase())}async function v0(i,c,o,r,d){let g=Object.entries(c);for(let m=0;mL?.route.id===z);if(!A)continue;let R=r.find(L=>L.route.id===A.route.id),E=R!=null&&!Ih(R,A)&&(d&&d[A.route.id])!==void 0;ga(S)&&E&&await _r(S,o,!1).then(L=>{L&&(c[z]=L)})}}async function y0(i,c,o){for(let r=0;rA?.route.id===g)&&ga(z)&&(fe(m,"Expected an AbortController for revalidating fetcher deferred result"),await _r(z,m.signal,!0).then(A=>{A&&(c[d]=A)}))}}async function _r(i,c,o){if(o===void 0&&(o=!1),!await i.deferredData.resolveData(c)){if(o)try{return{type:je.data,data:i.deferredData.unwrappedData}}catch(d){return{type:je.error,error:d}}return{type:je.data,data:i.deferredData.data}}}function Nr(i){return new URLSearchParams(i).getAll("index").some(c=>c==="")}function Hu(i,c){let o=typeof c=="string"?Sa(c).search:c.search;if(i[i.length-1].route.index&&Nr(o||""))return i[i.length-1];let r=Wh(i);return r[r.length-1]}function Xh(i){let{formMethod:c,formAction:o,formEncType:r,text:d,formData:g,json:m}=i;if(!(!c||!o||!r)){if(d!=null)return{formMethod:c,formAction:o,formEncType:r,formData:void 0,json:void 0,text:d};if(g!=null)return{formMethod:c,formAction:o,formEncType:r,formData:g,json:void 0,text:void 0};if(m!==void 0)return{formMethod:c,formAction:o,formEncType:r,formData:void 0,json:m,text:void 0}}}function Tr(i,c){return c?{state:"loading",location:i,formMethod:c.formMethod,formAction:c.formAction,formEncType:c.formEncType,formData:c.formData,json:c.json,text:c.text}:{state:"loading",location:i,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function g0(i,c){return{state:"submitting",location:i,formMethod:c.formMethod,formAction:c.formAction,formEncType:c.formEncType,formData:c.formData,json:c.json,text:c.text}}function xu(i,c){return i?{state:"loading",formMethod:i.formMethod,formAction:i.formAction,formEncType:i.formEncType,formData:i.formData,json:i.json,text:i.text,data:c}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:c}}function S0(i,c){return{state:"submitting",formMethod:i.formMethod,formAction:i.formAction,formEncType:i.formEncType,formData:i.formData,json:i.json,text:i.text,data:c?c.data:void 0}}function ya(i){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:i}}function p0(i,c){try{let o=i.sessionStorage.getItem(kh);if(o){let r=JSON.parse(o);for(let[d,g]of Object.entries(r||{}))g&&Array.isArray(g)&&c.set(d,new Set(g||[]))}}catch{}}function b0(i,c){if(c.size>0){let o={};for(let[r,d]of c)o[r]=[...d];try{i.sessionStorage.setItem(kh,JSON.stringify(o))}catch(r){Za(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}function Bn(){return Bn=Object.assign?Object.assign.bind():function(i){for(var c=1;c{z.current=!0}),H.useCallback(function(A,R){if(R===void 0&&(R={}),!z.current)return;if(typeof A=="number"){r.go(A);return}let E=nf(A,JSON.parse(m),g,R.relative==="path");i==null&&c!=="/"&&(E.pathname=E.pathname==="/"?c:Yl([c,E.pathname])),(R.replace?r.replace:r.push)(E,R.state,R)},[c,r,m,g,i])}const T0=H.createContext(null);function M0(i){let c=H.useContext(gl).outlet;return c&&H.createElement(T0.Provider,{value:i},c)}function sg(){let{matches:i}=H.useContext(gl),c=i[i.length-1];return c?c.params:{}}function ff(i,c){let{relative:o}=c===void 0?{}:c,{future:r}=H.useContext(Gl),{matches:d}=H.useContext(gl),{pathname:g}=Ka(),m=JSON.stringify(af(d,r.v7_relativeSplatPath));return H.useMemo(()=>nf(i,JSON.parse(m),g,o==="path"),[i,m,g,o])}function D0(i,c,o,r){Ln()||fe(!1);let{navigator:d}=H.useContext(Gl),{matches:g}=H.useContext(gl),m=g[g.length-1],z=m?m.params:{};m&&m.pathname;let S=m?m.pathnameBase:"/";m&&m.route;let A=Ka(),R;R=A;let E=R.pathname||"/",L=E;if(S!=="/"){let X=S.replace(/^\//,"").split("/");L="/"+E.replace(/^\//,"").split("/").slice(X.length).join("/")}let q=Ga(i,{pathname:L});return C0(q&&q.map(X=>Object.assign({},X,{params:Object.assign({},z,X.params),pathname:Yl([S,d.encodeLocation?d.encodeLocation(X.pathname).pathname:X.pathname]),pathnameBase:X.pathnameBase==="/"?S:Yl([S,d.encodeLocation?d.encodeLocation(X.pathnameBase).pathname:X.pathnameBase])})),g,o,r)}function A0(){let i=N0(),c=uf(i)?i.status+" "+i.statusText:i instanceof Error?i.message:JSON.stringify(i),o=i instanceof Error?i.stack:null,d={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return H.createElement(H.Fragment,null,H.createElement("h2",null,"Unexpected Application Error!"),H.createElement("h3",{style:{fontStyle:"italic"}},c),o?H.createElement("pre",{style:d},o):null,null)}const U0=H.createElement(A0,null);class O0 extends H.Component{constructor(c){super(c),this.state={location:c.location,revalidation:c.revalidation,error:c.error}}static getDerivedStateFromError(c){return{error:c}}static getDerivedStateFromProps(c,o){return o.location!==c.location||o.revalidation!=="idle"&&c.revalidation==="idle"?{error:c.error,location:c.location,revalidation:c.revalidation}:{error:c.error!==void 0?c.error:o.error,location:o.location,revalidation:c.revalidation||o.revalidation}}componentDidCatch(c,o){console.error("React Router caught the following error during render",c,o)}render(){return this.state.error!==void 0?H.createElement(gl.Provider,{value:this.props.routeContext},H.createElement(lm.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function R0(i){let{routeContext:c,match:o,children:r}=i,d=H.useContext(ju);return d&&d.static&&d.staticContext&&(o.route.errorElement||o.route.ErrorBoundary)&&(d.staticContext._deepestRenderedBoundaryId=o.route.id),H.createElement(gl.Provider,{value:c},r)}function C0(i,c,o,r){var d;if(c===void 0&&(c=[]),o===void 0&&(o=null),r===void 0&&(r=null),i==null){var g;if(!o)return null;if(o.errors)i=o.matches;else if((g=r)!=null&&g.v7_partialHydration&&c.length===0&&!o.initialized&&o.matches.length>0)i=o.matches;else return null}let m=i,z=(d=o)==null?void 0:d.errors;if(z!=null){let R=m.findIndex(E=>E.route.id&&z?.[E.route.id]!==void 0);R>=0||fe(!1),m=m.slice(0,Math.min(m.length,R+1))}let S=!1,A=-1;if(o&&r&&r.v7_partialHydration)for(let R=0;R=0?m=m.slice(0,A+1):m=[m[0]];break}}}return m.reduceRight((R,E,L)=>{let q,Q=!1,X=null,$=null;o&&(q=z&&E.route.id?z[E.route.id]:void 0,X=E.route.errorElement||U0,S&&(A<0&&L===0?(H0("route-fallback"),Q=!0,$=null):A===L&&(Q=!0,$=E.route.hydrateFallbackElement||null)));let oe=c.concat(m.slice(0,L+1)),F=()=>{let le;return q?le=X:Q?le=$:E.route.Component?le=H.createElement(E.route.Component,null):E.route.element?le=E.route.element:le=R,H.createElement(R0,{match:E,routeContext:{outlet:R,matches:oe,isDataRoute:o!=null},children:le})};return o&&(E.route.ErrorBoundary||E.route.errorElement||L===0)?H.createElement(O0,{location:o.location,revalidation:o.revalidation,component:X,error:q,children:F(),routeContext:{outlet:null,matches:oe,isDataRoute:!0}}):F()},null)}var nm=(function(i){return i.UseBlocker="useBlocker",i.UseRevalidator="useRevalidator",i.UseNavigateStable="useNavigate",i})(nm||{}),um=(function(i){return i.UseBlocker="useBlocker",i.UseLoaderData="useLoaderData",i.UseActionData="useActionData",i.UseRouteError="useRouteError",i.UseNavigation="useNavigation",i.UseRouteLoaderData="useRouteLoaderData",i.UseMatches="useMatches",i.UseRevalidator="useRevalidator",i.UseNavigateStable="useNavigate",i.UseRouteId="useRouteId",i})(um||{});function im(i){let c=H.useContext(ju);return c||fe(!1),c}function fm(i){let c=H.useContext(xr);return c||fe(!1),c}function _0(i){let c=H.useContext(gl);return c||fe(!1),c}function cm(i){let c=_0(),o=c.matches[c.matches.length-1];return o.route.id||fe(!1),o.route.id}function N0(){var i;let c=H.useContext(lm),o=fm(),r=cm();return c!==void 0?c:(i=o.errors)==null?void 0:i[r]}let x0=0;function dg(i){let{router:c,basename:o}=im(),r=fm(),[d,g]=H.useState(""),m=H.useCallback(z=>{if(typeof i!="function")return!!i;if(o==="/")return i(z);let{currentLocation:S,nextLocation:A,historyAction:R}=z;return i({currentLocation:Bn({},S,{pathname:il(S.pathname,o)||S.pathname}),nextLocation:Bn({},A,{pathname:il(A.pathname,o)||A.pathname}),historyAction:R})},[o,i]);return H.useEffect(()=>{let z=String(++x0);return g(z),()=>c.deleteBlocker(z)},[c]),H.useEffect(()=>{d!==""&&c.getBlocker(d,m)},[c,d,m]),d&&r.blockers.has(d)?r.blockers.get(d):xn}function B0(){let{router:i}=im(nm.UseNavigateStable),c=cm(um.UseNavigateStable),o=H.useRef(!1);return am(()=>{o.current=!0}),H.useCallback(function(d,g){g===void 0&&(g={}),o.current&&(typeof d=="number"?i.navigate(d):i.navigate(d,Bn({fromRouteId:c},g)))},[i,c])}const Qh={};function H0(i,c,o){Qh[i]||(Qh[i]=!0)}function hg(i){let{to:c,replace:o,state:r,relative:d}=i;Ln()||fe(!1);let{future:g,static:m}=H.useContext(Gl),{matches:z}=H.useContext(gl),{pathname:S}=Ka(),A=Hr(),R=nf(c,af(z,g.v7_relativeSplatPath),S,d==="path"),E=JSON.stringify(R);return H.useEffect(()=>A(JSON.parse(E),{replace:o,state:r,relative:d}),[A,E,d,o,r]),null}function mg(i){return M0(i.context)}function L0(i){fe(!1)}function j0(i){let{basename:c="/",children:o=null,location:r,navigationType:d=ut.Pop,navigator:g,static:m=!1,future:z}=i;Ln()&&fe(!1);let S=c.replace(/^\/*/,"/"),A=H.useMemo(()=>({basename:S,navigator:g,static:m,future:Bn({v7_relativeSplatPath:!1},z)}),[S,z,g,m]);typeof r=="string"&&(r=Sa(r));let{pathname:R="/",search:E="",hash:L="",state:q=null,key:Q="default"}=r,X=H.useMemo(()=>{let $=il(R,S);return $==null?null:{location:{pathname:$,search:E,hash:L,state:q,key:Q},navigationType:d}},[S,R,E,L,q,Q,d]);return X==null?null:H.createElement(Gl.Provider,{value:A},H.createElement(Br.Provider,{children:o,value:X}))}new Promise(()=>{});function Zh(i,c){c===void 0&&(c=[]);let o=[];return H.Children.forEach(i,(r,d)=>{if(!H.isValidElement(r))return;let g=[...c,d];if(r.type===H.Fragment){o.push.apply(o,Zh(r.props.children,g));return}r.type!==L0&&fe(!1),!r.props.index||!r.props.children||fe(!1);let m={id:r.props.id||g.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(m.children=Zh(r.props.children,g)),o.push(m)}),o}function q0(i){let c={hasErrorBoundary:i.ErrorBoundary!=null||i.errorElement!=null};return i.Component&&Object.assign(c,{element:H.createElement(i.Component),Component:void 0}),i.HydrateFallback&&Object.assign(c,{hydrateFallbackElement:H.createElement(i.HydrateFallback),HydrateFallback:void 0}),i.ErrorBoundary&&Object.assign(c,{errorElement:H.createElement(i.ErrorBoundary),ErrorBoundary:void 0}),c}function Hn(){return Hn=Object.assign?Object.assign.bind():function(i){for(var c=1;c=0)&&(o[d]=i[d]);return o}function Y0(i){return!!(i.metaKey||i.altKey||i.ctrlKey||i.shiftKey)}function G0(i,c){return i.button===0&&(!c||c==="_self")&&!Y0(i)}function Or(i){return i===void 0&&(i=""),new URLSearchParams(typeof i=="string"||Array.isArray(i)||i instanceof URLSearchParams?i:Object.keys(i).reduce((c,o)=>{let r=i[o];return c.concat(Array.isArray(r)?r.map(d=>[o,d]):[[o,r]])},[]))}function X0(i,c){let o=Or(i);return c&&c.forEach((r,d)=>{o.has(d)||c.getAll(d).forEach(g=>{o.append(d,g)})}),o}const Q0=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Z0=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],V0="6";try{window.__reactRouterVersion=V0}catch{}function vg(i,c){return t0({basename:void 0,future:Hn({},void 0,{v7_prependBasename:!0}),history:Dy({window:void 0}),hydrationData:K0(),routes:i,mapRouteProperties:q0,dataStrategy:void 0,patchRoutesOnNavigation:void 0,window:void 0}).initialize()}function K0(){var i;let c=(i=window)==null?void 0:i.__staticRouterHydrationData;return c&&c.errors&&(c=Hn({},c,{errors:w0(c.errors)})),c}function w0(i){if(!i)return null;let c=Object.entries(i),o={};for(let[r,d]of c)if(d&&d.__type==="RouteErrorResponse")o[r]=new lf(d.status,d.statusText,d.data,d.internal===!0);else if(d&&d.__type==="Error"){if(d.__subType){let g=window[d.__subType];if(typeof g=="function")try{let m=new g(d.message);m.stack="",o[r]=m}catch{}}if(o[r]==null){let g=new Error(d.message);g.stack="",o[r]=g}}else o[r]=d;return o}const om=H.createContext({isTransitioning:!1}),J0=H.createContext(new Map),F0="startTransition",Vh=by[F0],W0="flushSync",Kh=Ey[W0];function $0(i){Vh?Vh(i):i()}function Bu(i){Kh?Kh(i):i()}class k0{constructor(){this.status="pending",this.promise=new Promise((c,o)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",c(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",o(r))}})}}function yg(i){let{fallbackElement:c,router:o,future:r}=i,[d,g]=H.useState(o.state),[m,z]=H.useState(),[S,A]=H.useState({isTransitioning:!1}),[R,E]=H.useState(),[L,q]=H.useState(),[Q,X]=H.useState(),$=H.useRef(new Map),{v7_startTransition:oe}=r||{},F=H.useCallback(P=>{oe?$0(P):P()},[oe]),le=H.useCallback((P,ue)=>{let{deletedFetchers:pe,flushSync:Ge,viewTransitionOpts:Ae}=ue;pe.forEach(Fe=>$.current.delete(Fe)),P.fetchers.forEach((Fe,yt)=>{Fe.data!==void 0&&$.current.set(yt,Fe.data)});let it=o.window==null||o.window.document==null||typeof o.window.document.startViewTransition!="function";if(!Ae||it){Ge?Bu(()=>g(P)):F(()=>g(P));return}if(Ge){Bu(()=>{L&&(R&&R.resolve(),L.skipTransition()),A({isTransitioning:!0,flushSync:!0,currentLocation:Ae.currentLocation,nextLocation:Ae.nextLocation})});let Fe=o.window.document.startViewTransition(()=>{Bu(()=>g(P))});Fe.finished.finally(()=>{Bu(()=>{E(void 0),q(void 0),z(void 0),A({isTransitioning:!1})})}),Bu(()=>q(Fe));return}L?(R&&R.resolve(),L.skipTransition(),X({state:P,currentLocation:Ae.currentLocation,nextLocation:Ae.nextLocation})):(z(P),A({isTransitioning:!0,flushSync:!1,currentLocation:Ae.currentLocation,nextLocation:Ae.nextLocation}))},[o.window,L,R,$,F]);H.useLayoutEffect(()=>o.subscribe(le),[o,le]),H.useEffect(()=>{S.isTransitioning&&!S.flushSync&&E(new k0)},[S]),H.useEffect(()=>{if(R&&m&&o.window){let P=m,ue=R.promise,pe=o.window.document.startViewTransition(async()=>{F(()=>g(P)),await ue});pe.finished.finally(()=>{E(void 0),q(void 0),z(void 0),A({isTransitioning:!1})}),q(pe)}},[F,m,R,o.window]),H.useEffect(()=>{R&&m&&d.location.key===m.location.key&&R.resolve()},[R,L,d.location,m]),H.useEffect(()=>{!S.isTransitioning&&Q&&(z(Q.state),A({isTransitioning:!0,flushSync:!1,currentLocation:Q.currentLocation,nextLocation:Q.nextLocation}),X(void 0))},[S.isTransitioning,Q]),H.useEffect(()=>{},[]);let ae=H.useMemo(()=>({createHref:o.createHref,encodeLocation:o.encodeLocation,go:P=>o.navigate(P),push:(P,ue,pe)=>o.navigate(P,{state:ue,preventScrollReset:pe?.preventScrollReset}),replace:(P,ue,pe)=>o.navigate(P,{replace:!0,state:ue,preventScrollReset:pe?.preventScrollReset})}),[o]),qe=o.basename||"/",C=H.useMemo(()=>({router:o,navigator:ae,static:!1,basename:qe}),[o,ae,qe]),Oe=H.useMemo(()=>({v7_relativeSplatPath:o.future.v7_relativeSplatPath}),[o.future.v7_relativeSplatPath]);return H.createElement(H.Fragment,null,H.createElement(ju.Provider,{value:C},H.createElement(xr.Provider,{value:d},H.createElement(J0.Provider,{value:$.current},H.createElement(om.Provider,{value:S},H.createElement(j0,{basename:qe,location:d.location,navigationType:d.historyAction,navigator:ae,future:Oe},d.initialized||o.future.v7_partialHydration?H.createElement(I0,{routes:o.routes,future:o.future,state:d}):c))))),null)}const I0=H.memo(P0);function P0(i){let{routes:c,future:o,state:r}=i;return D0(c,void 0,r,o)}const eg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",tg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,lg=H.forwardRef(function(c,o){let{onClick:r,relative:d,reloadDocument:g,replace:m,state:z,target:S,to:A,preventScrollReset:R,viewTransition:E}=c,L=rm(c,Q0),{basename:q}=H.useContext(Gl),Q,X=!1;if(typeof A=="string"&&tg.test(A)&&(Q=A,eg))try{let le=new URL(window.location.href),ae=A.startsWith("//")?new URL(le.protocol+A):new URL(A),qe=il(ae.pathname,q);ae.origin===le.origin&&qe!=null?A=qe+ae.search+ae.hash:X=!0}catch{}let $=E0(A,{relative:d}),oe=ng(A,{replace:m,state:z,target:S,preventScrollReset:R,relative:d,viewTransition:E});function F(le){r&&r(le),le.defaultPrevented||oe(le)}return H.createElement("a",Hn({},L,{href:Q||$,onClick:X||g?r:F,ref:o,target:S}))}),gg=H.forwardRef(function(c,o){let{"aria-current":r="page",caseSensitive:d=!1,className:g="",end:m=!1,style:z,to:S,viewTransition:A,children:R}=c,E=rm(c,Z0),L=ff(S,{relative:E.relative}),q=Ka(),Q=H.useContext(xr),{navigator:X,basename:$}=H.useContext(Gl),oe=Q!=null&&ug(L)&&A===!0,F=X.encodeLocation?X.encodeLocation(L).pathname:L.pathname,le=q.pathname,ae=Q&&Q.navigation&&Q.navigation.location?Q.navigation.location.pathname:null;d||(le=le.toLowerCase(),ae=ae?ae.toLowerCase():null,F=F.toLowerCase()),ae&&$&&(ae=il(ae,$)||ae);const qe=F!=="/"&&F.endsWith("/")?F.length-1:F.length;let C=le===F||!m&&le.startsWith(F)&&le.charAt(qe)==="/",Oe=ae!=null&&(ae===F||!m&&ae.startsWith(F)&&ae.charAt(F.length)==="/"),P={isActive:C,isPending:Oe,isTransitioning:oe},ue=C?r:void 0,pe;typeof g=="function"?pe=g(P):pe=[g,C?"active":null,Oe?"pending":null,oe?"transitioning":null].filter(Boolean).join(" ");let Ge=typeof z=="function"?z(P):z;return H.createElement(lg,Hn({},E,{"aria-current":ue,className:pe,ref:o,style:Ge,to:S,viewTransition:A}),typeof R=="function"?R(P):R)});var Rr;(function(i){i.UseScrollRestoration="useScrollRestoration",i.UseSubmit="useSubmit",i.UseSubmitFetcher="useSubmitFetcher",i.UseFetcher="useFetcher",i.useViewTransitionState="useViewTransitionState"})(Rr||(Rr={}));var wh;(function(i){i.UseFetcher="useFetcher",i.UseFetchers="useFetchers",i.UseScrollRestoration="useScrollRestoration"})(wh||(wh={}));function ag(i){let c=H.useContext(ju);return c||fe(!1),c}function ng(i,c){let{target:o,replace:r,state:d,preventScrollReset:g,relative:m,viewTransition:z}=c===void 0?{}:c,S=Hr(),A=Ka(),R=ff(i,{relative:m});return H.useCallback(E=>{if(G0(E,o)){E.preventDefault();let L=r!==void 0?r:Va(A)===Va(R);S(i,{replace:L,state:d,preventScrollReset:g,relative:m,viewTransition:z})}},[A,S,R,r,d,o,i,g,m,z])}function Sg(i){let c=H.useRef(Or(i)),o=H.useRef(!1),r=Ka(),d=H.useMemo(()=>X0(r.search,o.current?null:c.current),[r.search]),g=Hr(),m=H.useCallback((z,S)=>{const A=Or(typeof z=="function"?z(d):z);o.current=!0,g("?"+A,S)},[g,d]);return[d,m]}function ug(i,c){c===void 0&&(c={});let o=H.useContext(om);o==null&&fe(!1);let{basename:r}=ag(Rr.useViewTransitionState),d=ff(i,{relative:c.relative});if(!o.isTransitioning)return!1;let g=il(o.currentLocation.pathname,r)||o.currentLocation.pathname,m=il(o.nextLocation.pathname,r)||o.nextLocation.pathname;return tf(d.pathname,m)!=null||tf(d.pathname,g)!=null}const ig=H.createContext(null),Mr={didCatch:!1,error:null};class pg extends H.Component{constructor(c){super(c),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Mr}static getDerivedStateFromError(c){return{didCatch:!0,error:c}}resetErrorBoundary(...c){const{error:o}=this.state;o!==null&&(this.props.onReset?.({args:c,reason:"imperative-api"}),this.setState(Mr))}componentDidCatch(c,o){this.props.onError?.(c,o)}componentDidUpdate(c,o){const{didCatch:r}=this.state,{resetKeys:d}=this.props;r&&o.error!==null&&fg(c.resetKeys,d)&&(this.props.onReset?.({next:d,prev:c.resetKeys,reason:"keys"}),this.setState(Mr))}render(){const{children:c,fallbackRender:o,FallbackComponent:r,fallback:d}=this.props,{didCatch:g,error:m}=this.state;let z=c;if(g){const S={error:m,resetErrorBoundary:this.resetErrorBoundary};if(typeof o=="function")z=o(S);else if(r)z=H.createElement(r,S);else if(d!==void 0)z=d;else throw m}return H.createElement(ig.Provider,{value:{didCatch:g,error:m,resetErrorBoundary:this.resetErrorBoundary}},z)}}function fg(i=[],c=[]){return i.length!==c.length||i.some((o,r)=>!Object.is(o,c[r]))}export{lg as L,hg as N,mg as O,yg as R,sg as a,dg as b,Or as c,Sg as d,Ka as e,gg as f,og as g,vg as h,Zh as i,L0 as j,pg as m,rg as r,Hr as u};