function sg(n,o){for(var i=0;is[u]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))s(u);new MutationObserver(u=>{for(const c of u)if(c.type==="childList")for(const d of c.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&s(d)}).observe(document,{childList:!0,subtree:!0});function i(u){const c={};return u.integrity&&(c.integrity=u.integrity),u.referrerPolicy&&(c.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?c.credentials="include":u.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function s(u){if(u.ep)return;u.ep=!0;const c=i(u);fetch(u.href,c)}})();function rp(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Bs={exports:{}},dl={},$s={exports:{}},je={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var ld;function ug(){if(ld)return je;ld=1;var n=Symbol.for("react.element"),o=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),d=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),S=Symbol.iterator;function y(j){return j===null||typeof j!="object"?null:(j=S&&j[S]||j["@@iterator"],typeof j=="function"?j:null)}var P={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,w={};function R(j,U,pe){this.props=j,this.context=U,this.refs=w,this.updater=pe||P}R.prototype.isReactComponent={},R.prototype.setState=function(j,U){if(typeof j!="object"&&typeof j!="function"&&j!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,j,U,"setState")},R.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function E(){}E.prototype=R.prototype;function O(j,U,pe){this.props=j,this.context=U,this.refs=w,this.updater=pe||P}var I=O.prototype=new E;I.constructor=O,N(I,R.prototype),I.isPureReactComponent=!0;var B=Array.isArray,_=Object.prototype.hasOwnProperty,Q={current:null},$={key:!0,ref:!0,__self:!0,__source:!0};function G(j,U,pe){var he,Ce={},_e=null,Ne=null;if(U!=null)for(he in U.ref!==void 0&&(Ne=U.ref),U.key!==void 0&&(_e=""+U.key),U)_.call(U,he)&&!$.hasOwnProperty(he)&&(Ce[he]=U[he]);var xe=arguments.length-2;if(xe===1)Ce.children=pe;else if(1>>1,U=Y[j];if(0>>1;ju(Ce,J))_eu(Ne,Ce)?(Y[j]=Ne,Y[_e]=J,j=_e):(Y[j]=Ce,Y[he]=J,j=he);else if(_eu(Ne,J))Y[j]=Ne,Y[_e]=J,j=_e;else break e}}return ee}function u(Y,ee){var J=Y.sortIndex-ee.sortIndex;return J!==0?J:Y.id-ee.id}if(typeof performance=="object"&&typeof performance.now=="function"){var c=performance;n.unstable_now=function(){return c.now()}}else{var d=Date,p=d.now();n.unstable_now=function(){return d.now()-p}}var h=[],g=[],x=1,S=null,y=3,P=!1,N=!1,w=!1,R=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function I(Y){for(var ee=i(g);ee!==null;){if(ee.callback===null)s(g);else if(ee.startTime<=Y)s(g),ee.sortIndex=ee.expirationTime,o(h,ee);else break;ee=i(g)}}function B(Y){if(w=!1,I(Y),!N)if(i(h)!==null)N=!0,Ie(_);else{var ee=i(g);ee!==null&&Re(B,ee.startTime-Y)}}function _(Y,ee){N=!1,w&&(w=!1,E(G),G=-1),P=!0;var J=y;try{for(I(ee),S=i(h);S!==null&&(!(S.expirationTime>ee)||Y&&!ve());){var j=S.callback;if(typeof j=="function"){S.callback=null,y=S.priorityLevel;var U=j(S.expirationTime<=ee);ee=n.unstable_now(),typeof U=="function"?S.callback=U:S===i(h)&&s(h),I(ee)}else s(h);S=i(h)}if(S!==null)var pe=!0;else{var he=i(g);he!==null&&Re(B,he.startTime-ee),pe=!1}return pe}finally{S=null,y=J,P=!1}}var Q=!1,$=null,G=-1,Z=5,ue=-1;function ve(){return!(n.unstable_now()-ueY||125j?(Y.sortIndex=J,o(g,Y),i(h)===null&&Y===i(g)&&(w?(E(G),G=-1):w=!0,Re(B,J-j))):(Y.sortIndex=U,o(h,Y),N||P||(N=!0,Ie(_))),Y},n.unstable_shouldYield=ve,n.unstable_wrapCallback=function(Y){var ee=y;return function(){var J=y;y=ee;try{return Y.apply(this,arguments)}finally{y=J}}}}(Hs)),Hs}var cd;function mg(){return cd||(cd=1,Ws.exports=hg()),Ws.exports}/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var fd;function gg(){if(fd)return It;fd=1;var n=hu(),o=mg();function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,g=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,x={},S={};function y(e){return h.call(S,e)?!0:h.call(x,e)?!1:g.test(e)?S[e]=!0:(x[e]=!0,!1)}function P(e,t,r,l){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return l?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function N(e,t,r,l){if(t===null||typeof t>"u"||P(e,t,r,l))return!0;if(l)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function w(e,t,r,l,a,f,m){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=l,this.attributeNamespace=a,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=f,this.removeEmptyString=m}var R={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){R[e]=new w(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];R[t]=new w(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){R[e]=new w(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){R[e]=new w(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){R[e]=new w(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){R[e]=new w(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){R[e]=new w(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){R[e]=new w(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){R[e]=new w(e,5,!1,e.toLowerCase(),null,!1,!1)});var E=/[\-:]([a-z])/g;function O(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(E,O);R[t]=new w(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(E,O);R[t]=new w(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(E,O);R[t]=new w(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){R[e]=new w(e,1,!1,e.toLowerCase(),null,!1,!1)}),R.xlinkHref=new w("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){R[e]=new w(e,1,!1,e.toLowerCase(),null,!0,!0)});function I(e,t,r,l){var a=R.hasOwnProperty(t)?R[t]:null;(a!==null?a.type!==0:l||!(2C||a[m]!==f[C]){var L=` `+a[m].replace(" at new "," at ");return e.displayName&&L.includes("")&&(L=L.replace("",e.displayName)),L}while(1<=m&&0<=C);break}}}finally{pe=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?U(e):""}function Ce(e){switch(e.tag){case 5:return U(e.type);case 16:return U("Lazy");case 13:return U("Suspense");case 19:return U("SuspenseList");case 0:case 2:case 15:return e=he(e.type,!1),e;case 11:return e=he(e.type.render,!1),e;case 1:return e=he(e.type,!0),e;default:return""}}function _e(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case $:return"Fragment";case Q:return"Portal";case Z:return"Profiler";case G:return"StrictMode";case be:return"Suspense";case ze:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ve:return(e.displayName||"Context")+".Consumer";case ue:return(e._context.displayName||"Context")+".Provider";case de:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ke:return t=e.displayName||null,t!==null?t:_e(e.type)||"Memo";case Ie:t=e._payload,e=e._init;try{return _e(e(t))}catch{}}return null}function Ne(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return _e(t);case 8:return t===G?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function xe(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ye(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Me(e){var t=ye(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),l=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var a=r.get,f=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(m){l=""+m,f.call(this,m)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return l},setValue:function(m){l=""+m},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Fe(e){e._valueTracker||(e._valueTracker=Me(e))}function se(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),l="";return e&&(l=ye(e)?e.checked?"true":"false":e.value),e=l,e!==r?(t.setValue(e),!0):!1}function Te(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function We(e,t){var r=t.checked;return J({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function it(e,t){var r=t.defaultValue==null?"":t.defaultValue,l=t.checked!=null?t.checked:t.defaultChecked;r=xe(t.value!=null?t.value:r),e._wrapperState={initialChecked:l,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function wt(e,t){t=t.checked,t!=null&&I(e,"checked",t,!1)}function Nt(e,t){wt(e,t);var r=xe(t.value),l=t.type;if(r!=null)l==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(l==="submit"||l==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Lt(e,t.type,r):t.hasOwnProperty("defaultValue")&&Lt(e,t.type,xe(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Qt(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var l=t.type;if(!(l!=="submit"&&l!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Lt(e,t,r){(t!=="number"||Te(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Pt=Array.isArray;function at(e,t,r,l){if(e=e.options,t){t={};for(var a=0;a"+t.valueOf().toString()+"",t=wn.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ot(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Kt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Xn=["Webkit","ms","Moz","O"];Object.keys(Kt).forEach(function(e){Xn.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Kt[t]=Kt[e]})});function Sn(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Kt.hasOwnProperty(e)&&Kt[e]?(""+t).trim():t+"px"}function Zr(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var l=r.indexOf("--")===0,a=Sn(r,t[r],l);r==="float"&&(r="cssFloat"),l?e.setProperty(r,a):e[r]=a}}var qr=J({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function En(e,t){if(t){if(qr[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(i(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(i(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(i(61))}if(t.style!=null&&typeof t.style!="object")throw Error(i(62))}}function Jn(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var On=null;function Zn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var qn=null,an=null,Yt=null;function Cn(e){if(e=Jo(e)){if(typeof qn!="function")throw Error(i(280));var t=e.stateNode;t&&(t=Yl(t),qn(e.stateNode,e.type,t))}}function zn(e){an?Yt?Yt.push(e):Yt=[e]:an=e}function Lr(){if(an){var e=an,t=Yt;if(Yt=an=null,Cn(e),t)for(e=0;e>>=0,e===0?32:31-(Nh(e)/Ph|0)|0}var jl=64,bl=4194304;function Do(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Dl(e,t){var r=e.pendingLanes;if(r===0)return 0;var l=0,a=e.suspendedLanes,f=e.pingedLanes,m=r&268435455;if(m!==0){var C=m&~a;C!==0?l=Do(C):(f&=m,f!==0&&(l=Do(f)))}else m=r&~a,m!==0?l=Do(m):f!==0&&(l=Do(f));if(l===0)return 0;if(t!==0&&t!==l&&!(t&a)&&(a=l&-l,f=t&-t,a>=f||a===16&&(f&4194240)!==0))return t;if(l&4&&(l|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=l;0r;r++)t.push(e);return t}function Mo(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-un(t),e[t]=r}function Th(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var l=e.eventTimes;for(e=e.expirationTimes;0=$o),Ju=" ",Zu=!1;function qu(e,t){switch(e){case"keyup":return om.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ec(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var lo=!1;function im(e,t){switch(e){case"compositionend":return ec(t);case"keypress":return t.which!==32?null:(Zu=!0,Ju);case"textInput":return e=t.data,e===Ju&&Zu?null:e;default:return null}}function am(e,t){if(lo)return e==="compositionend"||!Sa&&qu(e,t)?(e=Hu(),Al=ma=ir=null,lo=!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:r,offset:t-e};e=l}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ac(r)}}function uc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?uc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function cc(){for(var e=window,t=Te();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Te(e.document)}return t}function ka(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")}function gm(e){var t=cc(),r=e.focusedElem,l=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&uc(r.ownerDocument.documentElement,r)){if(l!==null&&ka(r)){if(t=l.start,e=l.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var a=r.textContent.length,f=Math.min(l.start,a);l=l.end===void 0?f:Math.min(l.end,a),!e.extend&&f>l&&(a=l,l=f,f=a),a=sc(r,f);var m=sc(r,l);a&&m&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==m.node||e.focusOffset!==m.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),f>l?(e.addRange(t),e.extend(m.node,m.offset)):(t.setEnd(m.node,m.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,io=null,Na=null,Go=null,Pa=!1;function fc(e,t,r){var l=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Pa||io==null||io!==Te(l)||(l=io,"selectionStart"in l&&ka(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Go&&Ho(Go,l)||(Go=l,l=Gl(Na,"onSelect"),0fo||(e.current=Aa[fo],Aa[fo]=null,fo--)}function Qe(e,t){fo++,Aa[fo]=e.current,e.current=t}var cr={},St=ur(cr),bt=ur(!1),Dr=cr;function po(e,t){var r=e.type.contextTypes;if(!r)return cr;var l=e.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===t)return l.__reactInternalMemoizedMaskedChildContext;var a={},f;for(f in r)a[f]=t[f];return l&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Dt(e){return e=e.childContextTypes,e!=null}function Xl(){Ye(bt),Ye(St)}function Pc(e,t,r){if(St.current!==cr)throw Error(i(168));Qe(St,t),Qe(bt,r)}function Rc(e,t,r){var l=e.stateNode;if(t=t.childContextTypes,typeof l.getChildContext!="function")return r;l=l.getChildContext();for(var a in l)if(!(a in t))throw Error(i(108,Ne(e)||"Unknown",a));return J({},r,l)}function Jl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||cr,Dr=St.current,Qe(St,e),Qe(bt,bt.current),!0}function _c(e,t,r){var l=e.stateNode;if(!l)throw Error(i(169));r?(e=Rc(e,t,Dr),l.__reactInternalMemoizedMergedChildContext=e,Ye(bt),Ye(St),Qe(St,e)):Ye(bt),Qe(bt,r)}var Un=null,Zl=!1,Fa=!1;function Lc(e){Un===null?Un=[e]:Un.push(e)}function _m(e){Zl=!0,Lc(e)}function fr(){if(!Fa&&Un!==null){Fa=!0;var e=0,t=$e;try{var r=Un;for($e=1;e>=m,a-=m,Bn=1<<32-un(t)+a|r<Ee?(gt=ge,ge=null):gt=ge.sibling;var Ae=V(M,ge,z[Ee],X);if(Ae===null){ge===null&&(ge=gt);break}e&&ge&&Ae.alternate===null&&t(M,ge),b=f(Ae,b,Ee),me===null?fe=Ae:me.sibling=Ae,me=Ae,ge=gt}if(Ee===z.length)return r(M,ge),Je&&Or(M,Ee),fe;if(ge===null){for(;EeEe?(gt=ge,ge=null):gt=ge.sibling;var wr=V(M,ge,Ae.value,X);if(wr===null){ge===null&&(ge=gt);break}e&&ge&&wr.alternate===null&&t(M,ge),b=f(wr,b,Ee),me===null?fe=wr:me.sibling=wr,me=wr,ge=gt}if(Ae.done)return r(M,ge),Je&&Or(M,Ee),fe;if(ge===null){for(;!Ae.done;Ee++,Ae=z.next())Ae=K(M,Ae.value,X),Ae!==null&&(b=f(Ae,b,Ee),me===null?fe=Ae:me.sibling=Ae,me=Ae);return Je&&Or(M,Ee),fe}for(ge=l(M,ge);!Ae.done;Ee++,Ae=z.next())Ae=ne(ge,M,Ee,Ae.value,X),Ae!==null&&(e&&Ae.alternate!==null&&ge.delete(Ae.key===null?Ee:Ae.key),b=f(Ae,b,Ee),me===null?fe=Ae:me.sibling=Ae,me=Ae);return e&&ge.forEach(function(ag){return t(M,ag)}),Je&&Or(M,Ee),fe}function lt(M,b,z,X){if(typeof z=="object"&&z!==null&&z.type===$&&z.key===null&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case _:e:{for(var fe=z.key,me=b;me!==null;){if(me.key===fe){if(fe=z.type,fe===$){if(me.tag===7){r(M,me.sibling),b=a(me,z.props.children),b.return=M,M=b;break e}}else if(me.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===Ie&&Oc(fe)===me.type){r(M,me.sibling),b=a(me,z.props),b.ref=Zo(M,me,z),b.return=M,M=b;break e}r(M,me);break}else t(M,me);me=me.sibling}z.type===$?(b=Vr(z.props.children,M.mode,X,z.key),b.return=M,M=b):(X=Pi(z.type,z.key,z.props,null,M.mode,X),X.ref=Zo(M,b,z),X.return=M,M=X)}return m(M);case Q:e:{for(me=z.key;b!==null;){if(b.key===me)if(b.tag===4&&b.stateNode.containerInfo===z.containerInfo&&b.stateNode.implementation===z.implementation){r(M,b.sibling),b=a(b,z.children||[]),b.return=M,M=b;break e}else{r(M,b);break}else t(M,b);b=b.sibling}b=zs(z,M.mode,X),b.return=M,M=b}return m(M);case Ie:return me=z._init,lt(M,b,me(z._payload),X)}if(Pt(z))return le(M,b,z,X);if(ee(z))return ae(M,b,z,X);ni(M,z)}return typeof z=="string"&&z!==""||typeof z=="number"?(z=""+z,b!==null&&b.tag===6?(r(M,b.sibling),b=a(b,z),b.return=M,M=b):(r(M,b),b=Os(z,M.mode,X),b.return=M,M=b),m(M)):r(M,b)}return lt}var vo=zc(!0),Ic=zc(!1),ri=ur(null),oi=null,yo=null,Ha=null;function Ga(){Ha=yo=oi=null}function Qa(e){var t=ri.current;Ye(ri),e._currentValue=t}function Ka(e,t,r){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===r)break;e=e.return}}function xo(e,t){oi=e,Ha=yo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Mt=!0),e.firstContext=null)}function qt(e){var t=e._currentValue;if(Ha!==e)if(e={context:e,memoizedValue:t,next:null},yo===null){if(oi===null)throw Error(i(308));yo=e,oi.dependencies={lanes:0,firstContext:e}}else yo=yo.next=e;return t}var zr=null;function Ya(e){zr===null?zr=[e]:zr.push(e)}function Ac(e,t,r,l){var a=t.interleaved;return a===null?(r.next=r,Ya(t)):(r.next=a.next,a.next=r),t.interleaved=r,Vn(e,l)}function Vn(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var dr=!1;function Xa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Fc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Wn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function pr(e,t,r){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,Oe&2){var a=l.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),l.pending=t,Vn(e,r)}return a=l.interleaved,a===null?(t.next=t,Ya(l)):(t.next=a.next,a.next=t),l.interleaved=t,Vn(e,r)}function li(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var l=t.lanes;l&=e.pendingLanes,r|=l,t.lanes=r,ca(e,r)}}function Uc(e,t){var r=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,r===l)){var a=null,f=null;if(r=r.firstBaseUpdate,r!==null){do{var m={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};f===null?a=f=m:f=f.next=m,r=r.next}while(r!==null);f===null?a=f=t:f=f.next=t}else a=f=t;r={baseState:l.baseState,firstBaseUpdate:a,lastBaseUpdate:f,shared:l.shared,effects:l.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function ii(e,t,r,l){var a=e.updateQueue;dr=!1;var f=a.firstBaseUpdate,m=a.lastBaseUpdate,C=a.shared.pending;if(C!==null){a.shared.pending=null;var L=C,A=L.next;L.next=null,m===null?f=A:m.next=A,m=L;var H=e.alternate;H!==null&&(H=H.updateQueue,C=H.lastBaseUpdate,C!==m&&(C===null?H.firstBaseUpdate=A:C.next=A,H.lastBaseUpdate=L))}if(f!==null){var K=a.baseState;m=0,H=A=L=null,C=f;do{var V=C.lane,ne=C.eventTime;if((l&V)===V){H!==null&&(H=H.next={eventTime:ne,lane:0,tag:C.tag,payload:C.payload,callback:C.callback,next:null});e:{var le=e,ae=C;switch(V=t,ne=r,ae.tag){case 1:if(le=ae.payload,typeof le=="function"){K=le.call(ne,K,V);break e}K=le;break e;case 3:le.flags=le.flags&-65537|128;case 0:if(le=ae.payload,V=typeof le=="function"?le.call(ne,K,V):le,V==null)break e;K=J({},K,V);break e;case 2:dr=!0}}C.callback!==null&&C.lane!==0&&(e.flags|=64,V=a.effects,V===null?a.effects=[C]:V.push(C))}else ne={eventTime:ne,lane:V,tag:C.tag,payload:C.payload,callback:C.callback,next:null},H===null?(A=H=ne,L=K):H=H.next=ne,m|=V;if(C=C.next,C===null){if(C=a.shared.pending,C===null)break;V=C,C=V.next,V.next=null,a.lastBaseUpdate=V,a.shared.pending=null}}while(!0);if(H===null&&(L=K),a.baseState=L,a.firstBaseUpdate=A,a.lastBaseUpdate=H,t=a.shared.interleaved,t!==null){a=t;do m|=a.lane,a=a.next;while(a!==t)}else f===null&&(a.shared.lanes=0);Fr|=m,e.lanes=m,e.memoizedState=K}}function Bc(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var l=ts.transition;ts.transition={};try{e(!1),t()}finally{$e=r,ts.transition=l}}function af(){return en().memoizedState}function bm(e,t,r){var l=vr(e);if(r={lane:l,action:r,hasEagerState:!1,eagerState:null,next:null},sf(e))uf(t,r);else if(r=Ac(e,t,r,l),r!==null){var a=_t();mn(r,e,l,a),cf(r,t,l)}}function Dm(e,t,r){var l=vr(e),a={lane:l,action:r,hasEagerState:!1,eagerState:null,next:null};if(sf(e))uf(t,a);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var m=t.lastRenderedState,C=f(m,r);if(a.hasEagerState=!0,a.eagerState=C,cn(C,m)){var L=t.interleaved;L===null?(a.next=a,Ya(t)):(a.next=L.next,L.next=a),t.interleaved=a;return}}catch{}finally{}r=Ac(e,t,a,l),r!==null&&(a=_t(),mn(r,e,l,a),cf(r,t,l))}}function sf(e){var t=e.alternate;return e===et||t!==null&&t===et}function uf(e,t){nl=ui=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function cf(e,t,r){if(r&4194240){var l=t.lanes;l&=e.pendingLanes,r|=l,t.lanes=r,ca(e,r)}}var di={readContext:qt,useCallback:Et,useContext:Et,useEffect:Et,useImperativeHandle:Et,useInsertionEffect:Et,useLayoutEffect:Et,useMemo:Et,useReducer:Et,useRef:Et,useState:Et,useDebugValue:Et,useDeferredValue:Et,useTransition:Et,useMutableSource:Et,useSyncExternalStore:Et,useId:Et,unstable_isNewReconciler:!1},Mm={readContext:qt,useCallback:function(e,t){return Pn().memoizedState=[e,t===void 0?null:t],e},useContext:qt,useEffect:Zc,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,ci(4194308,4,tf.bind(null,t,e),r)},useLayoutEffect:function(e,t){return ci(4194308,4,e,t)},useInsertionEffect:function(e,t){return ci(4,2,e,t)},useMemo:function(e,t){var r=Pn();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var l=Pn();return t=r!==void 0?r(t):t,l.memoizedState=l.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},l.queue=e,e=e.dispatch=bm.bind(null,et,e),[l.memoizedState,e]},useRef:function(e){var t=Pn();return e={current:e},t.memoizedState=e},useState:Xc,useDebugValue:ss,useDeferredValue:function(e){return Pn().memoizedState=e},useTransition:function(){var e=Xc(!1),t=e[0];return e=jm.bind(null,e[1]),Pn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var l=et,a=Pn();if(Je){if(r===void 0)throw Error(i(407));r=r()}else{if(r=t(),mt===null)throw Error(i(349));Ar&30||Hc(l,t,r)}a.memoizedState=r;var f={value:r,getSnapshot:t};return a.queue=f,Zc(Qc.bind(null,l,f,e),[e]),l.flags|=2048,ll(9,Gc.bind(null,l,f,r,t),void 0,null),r},useId:function(){var e=Pn(),t=mt.identifierPrefix;if(Je){var r=$n,l=Bn;r=(l&~(1<<32-un(l)-1)).toString(32)+r,t=":"+t+"R"+r,r=rl++,0<\/script>",e=e.removeChild(e.firstChild)):typeof l.is=="string"?e=m.createElement(r,{is:l.is}):(e=m.createElement(r),r==="select"&&(m=e,l.multiple?m.multiple=!0:l.size&&(m.size=l.size))):e=m.createElementNS(e,r),e[kn]=t,e[Xo]=l,Tf(e,t,!1,!1),t.stateNode=e;e:{switch(m=Jn(r,l),r){case"dialog":Ke("cancel",e),Ke("close",e),a=l;break;case"iframe":case"object":case"embed":Ke("load",e),a=l;break;case"video":case"audio":for(a=0;ako&&(t.flags|=128,l=!0,il(f,!1),t.lanes=4194304)}else{if(!l)if(e=ai(m),e!==null){if(t.flags|=128,l=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),il(f,!0),f.tail===null&&f.tailMode==="hidden"&&!m.alternate&&!Je)return Ct(t),null}else 2*Ge()-f.renderingStartTime>ko&&r!==1073741824&&(t.flags|=128,l=!0,il(f,!1),t.lanes=4194304);f.isBackwards?(m.sibling=t.child,t.child=m):(r=f.last,r!==null?r.sibling=m:t.child=m,f.last=m)}return f.tail!==null?(t=f.tail,f.rendering=t,f.tail=t.sibling,f.renderingStartTime=Ge(),t.sibling=null,r=qe.current,Qe(qe,l?r&1|2:r&1),t):(Ct(t),null);case 22:case 23:return bs(),l=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==l&&(t.flags|=8192),l&&t.mode&1?Ht&1073741824&&(Ct(t),t.subtreeFlags&6&&(t.flags|=8192)):Ct(t),null;case 24:return null;case 25:return null}throw Error(i(156,t.tag))}function $m(e,t){switch(Ba(t),t.tag){case 1:return Dt(t.type)&&Xl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return wo(),Ye(bt),Ye(St),es(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Za(t),null;case 13:if(Ye(qe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));go()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ye(qe),null;case 4:return wo(),null;case 10:return Qa(t.type._context),null;case 22:case 23:return bs(),null;case 24:return null;default:return null}}var gi=!1,kt=!1,Vm=typeof WeakSet=="function"?WeakSet:Set,oe=null;function Eo(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(l){rt(e,t,l)}else r.current=null}function ws(e,t,r){try{r()}catch(l){rt(e,t,l)}}var Df=!1;function Wm(e,t){if(ba=zl,e=cc(),ka(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var l=r.getSelection&&r.getSelection();if(l&&l.rangeCount!==0){r=l.anchorNode;var a=l.anchorOffset,f=l.focusNode;l=l.focusOffset;try{r.nodeType,f.nodeType}catch{r=null;break e}var m=0,C=-1,L=-1,A=0,H=0,K=e,V=null;t:for(;;){for(var ne;K!==r||a!==0&&K.nodeType!==3||(C=m+a),K!==f||l!==0&&K.nodeType!==3||(L=m+l),K.nodeType===3&&(m+=K.nodeValue.length),(ne=K.firstChild)!==null;)V=K,K=ne;for(;;){if(K===e)break t;if(V===r&&++A===a&&(C=m),V===f&&++H===l&&(L=m),(ne=K.nextSibling)!==null)break;K=V,V=K.parentNode}K=ne}r=C===-1||L===-1?null:{start:C,end:L}}else r=null}r=r||{start:0,end:0}}else r=null;for(Da={focusedElem:e,selectionRange:r},zl=!1,oe=t;oe!==null;)if(t=oe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,oe=e;else for(;oe!==null;){t=oe;try{var le=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(le!==null){var ae=le.memoizedProps,lt=le.memoizedState,M=t.stateNode,b=M.getSnapshotBeforeUpdate(t.elementType===t.type?ae:dn(t.type,ae),lt);M.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var z=t.stateNode.containerInfo;z.nodeType===1?z.textContent="":z.nodeType===9&&z.documentElement&&z.removeChild(z.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(i(163))}}catch(X){rt(t,t.return,X)}if(e=t.sibling,e!==null){e.return=t.return,oe=e;break}oe=t.return}return le=Df,Df=!1,le}function al(e,t,r){var l=t.updateQueue;if(l=l!==null?l.lastEffect:null,l!==null){var a=l=l.next;do{if((a.tag&e)===e){var f=a.destroy;a.destroy=void 0,f!==void 0&&ws(t,r,f)}a=a.next}while(a!==l)}}function vi(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var l=r.create;r.destroy=l()}r=r.next}while(r!==t)}}function Ss(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function Mf(e){var t=e.alternate;t!==null&&(e.alternate=null,Mf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[kn],delete t[Xo],delete t[Ia],delete t[Pm],delete t[Rm])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Of(e){return e.tag===5||e.tag===3||e.tag===4}function zf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Of(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.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 Es(e,t,r){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Kl));else if(l!==4&&(e=e.child,e!==null))for(Es(e,t,r),e=e.sibling;e!==null;)Es(e,t,r),e=e.sibling}function Cs(e,t,r){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(l!==4&&(e=e.child,e!==null))for(Cs(e,t,r),e=e.sibling;e!==null;)Cs(e,t,r),e=e.sibling}var vt=null,pn=!1;function hr(e,t,r){for(r=r.child;r!==null;)If(e,t,r),r=r.sibling}function If(e,t,r){if(Bt&&typeof Bt.onCommitFiberUnmount=="function")try{Bt.onCommitFiberUnmount(sn,r)}catch{}switch(r.tag){case 5:kt||Eo(r,t);case 6:var l=vt,a=pn;vt=null,hr(e,t,r),vt=l,pn=a,vt!==null&&(pn?(e=vt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):vt.removeChild(r.stateNode));break;case 18:vt!==null&&(pn?(e=vt,r=r.stateNode,e.nodeType===8?za(e.parentNode,r):e.nodeType===1&&za(e,r),Fo(e)):za(vt,r.stateNode));break;case 4:l=vt,a=pn,vt=r.stateNode.containerInfo,pn=!0,hr(e,t,r),vt=l,pn=a;break;case 0:case 11:case 14:case 15:if(!kt&&(l=r.updateQueue,l!==null&&(l=l.lastEffect,l!==null))){a=l=l.next;do{var f=a,m=f.destroy;f=f.tag,m!==void 0&&(f&2||f&4)&&ws(r,t,m),a=a.next}while(a!==l)}hr(e,t,r);break;case 1:if(!kt&&(Eo(r,t),l=r.stateNode,typeof l.componentWillUnmount=="function"))try{l.props=r.memoizedProps,l.state=r.memoizedState,l.componentWillUnmount()}catch(C){rt(r,t,C)}hr(e,t,r);break;case 21:hr(e,t,r);break;case 22:r.mode&1?(kt=(l=kt)||r.memoizedState!==null,hr(e,t,r),kt=l):hr(e,t,r);break;default:hr(e,t,r)}}function Af(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Vm),t.forEach(function(l){var a=qm.bind(null,e,l);r.has(l)||(r.add(l),l.then(a,a))})}}function hn(e,t){var r=t.deletions;if(r!==null)for(var l=0;la&&(a=m),l&=~f}if(l=a,l=Ge()-l,l=(120>l?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*Gm(l/1960))-l,10e?16:e,gr===null)var l=!1;else{if(e=gr,gr=null,Ei=0,Oe&6)throw Error(i(331));var a=Oe;for(Oe|=4,oe=e.current;oe!==null;){var f=oe,m=f.child;if(oe.flags&16){var C=f.deletions;if(C!==null){for(var L=0;LGe()-Ps?Br(e,0):Ns|=r),zt(e,t)}function Jf(e,t){t===0&&(e.mode&1?(t=bl,bl<<=1,!(bl&130023424)&&(bl=4194304)):t=1);var r=_t();e=Vn(e,t),e!==null&&(Mo(e,t,r),zt(e,r))}function Zm(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Jf(e,r)}function qm(e,t){var r=0;switch(e.tag){case 13:var l=e.stateNode,a=e.memoizedState;a!==null&&(r=a.retryLane);break;case 19:l=e.stateNode;break;default:throw Error(i(314))}l!==null&&l.delete(t),Jf(e,r)}var Zf;Zf=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||bt.current)Mt=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Mt=!1,Um(e,t,r);Mt=!!(e.flags&131072)}else Mt=!1,Je&&t.flags&1048576&&Tc(t,ei,t.index);switch(t.lanes=0,t.tag){case 2:var l=t.type;mi(e,t),e=t.pendingProps;var a=po(t,St.current);xo(t,r),a=rs(null,t,l,e,a,r);var f=os();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Dt(l)?(f=!0,Jl(t)):f=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,Xa(t),a.updater=pi,t.stateNode=a,a._reactInternals=t,cs(t,l,e,r),t=hs(null,t,l,!0,f,r)):(t.tag=0,Je&&f&&Ua(t),Rt(null,t,a,r),t=t.child),t;case 16:l=t.elementType;e:{switch(mi(e,t),e=t.pendingProps,a=l._init,l=a(l._payload),t.type=l,a=t.tag=tg(l),e=dn(l,e),a){case 0:t=ps(null,t,l,e,r);break e;case 1:t=kf(null,t,l,e,r);break e;case 11:t=xf(null,t,l,e,r);break e;case 14:t=wf(null,t,l,dn(l.type,e),r);break e}throw Error(i(306,l,""))}return t;case 0:return l=t.type,a=t.pendingProps,a=t.elementType===l?a:dn(l,a),ps(e,t,l,a,r);case 1:return l=t.type,a=t.pendingProps,a=t.elementType===l?a:dn(l,a),kf(e,t,l,a,r);case 3:e:{if(Nf(t),e===null)throw Error(i(387));l=t.pendingProps,f=t.memoizedState,a=f.element,Fc(e,t),ii(t,l,null,r);var m=t.memoizedState;if(l=m.element,f.isDehydrated)if(f={element:l,isDehydrated:!1,cache:m.cache,pendingSuspenseBoundaries:m.pendingSuspenseBoundaries,transitions:m.transitions},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){a=So(Error(i(423)),t),t=Pf(e,t,l,r,a);break e}else if(l!==a){a=So(Error(i(424)),t),t=Pf(e,t,l,r,a);break e}else for(Wt=sr(t.stateNode.containerInfo.firstChild),Vt=t,Je=!0,fn=null,r=Ic(t,null,l,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(go(),l===a){t=Hn(e,t,r);break e}Rt(e,t,l,r)}t=t.child}return t;case 5:return $c(t),e===null&&Va(t),l=t.type,a=t.pendingProps,f=e!==null?e.memoizedProps:null,m=a.children,Ma(l,a)?m=null:f!==null&&Ma(l,f)&&(t.flags|=32),Cf(e,t),Rt(e,t,m,r),t.child;case 6:return e===null&&Va(t),null;case 13:return Rf(e,t,r);case 4:return Ja(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=vo(t,null,l,r):Rt(e,t,l,r),t.child;case 11:return l=t.type,a=t.pendingProps,a=t.elementType===l?a:dn(l,a),xf(e,t,l,a,r);case 7:return Rt(e,t,t.pendingProps,r),t.child;case 8:return Rt(e,t,t.pendingProps.children,r),t.child;case 12:return Rt(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(l=t.type._context,a=t.pendingProps,f=t.memoizedProps,m=a.value,Qe(ri,l._currentValue),l._currentValue=m,f!==null)if(cn(f.value,m)){if(f.children===a.children&&!bt.current){t=Hn(e,t,r);break e}}else for(f=t.child,f!==null&&(f.return=t);f!==null;){var C=f.dependencies;if(C!==null){m=f.child;for(var L=C.firstContext;L!==null;){if(L.context===l){if(f.tag===1){L=Wn(-1,r&-r),L.tag=2;var A=f.updateQueue;if(A!==null){A=A.shared;var H=A.pending;H===null?L.next=L:(L.next=H.next,H.next=L),A.pending=L}}f.lanes|=r,L=f.alternate,L!==null&&(L.lanes|=r),Ka(f.return,r,t),C.lanes|=r;break}L=L.next}}else if(f.tag===10)m=f.type===t.type?null:f.child;else if(f.tag===18){if(m=f.return,m===null)throw Error(i(341));m.lanes|=r,C=m.alternate,C!==null&&(C.lanes|=r),Ka(m,r,t),m=f.sibling}else m=f.child;if(m!==null)m.return=f;else for(m=f;m!==null;){if(m===t){m=null;break}if(f=m.sibling,f!==null){f.return=m.return,m=f;break}m=m.return}f=m}Rt(e,t,a.children,r),t=t.child}return t;case 9:return a=t.type,l=t.pendingProps.children,xo(t,r),a=qt(a),l=l(a),t.flags|=1,Rt(e,t,l,r),t.child;case 14:return l=t.type,a=dn(l,t.pendingProps),a=dn(l.type,a),wf(e,t,l,a,r);case 15:return Sf(e,t,t.type,t.pendingProps,r);case 17:return l=t.type,a=t.pendingProps,a=t.elementType===l?a:dn(l,a),mi(e,t),t.tag=1,Dt(l)?(e=!0,Jl(t)):e=!1,xo(t,r),df(t,l,a),cs(t,l,a,r),hs(null,t,l,!0,e,r);case 19:return Lf(e,t,r);case 22:return Ef(e,t,r)}throw Error(i(156,t.tag))};function qf(e,t){return Ut(e,t)}function eg(e,t,r,l){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nn(e,t,r,l){return new eg(e,t,r,l)}function Ms(e){return e=e.prototype,!(!e||!e.isReactComponent)}function tg(e){if(typeof e=="function")return Ms(e)?1:0;if(e!=null){if(e=e.$$typeof,e===de)return 11;if(e===ke)return 14}return 2}function xr(e,t){var r=e.alternate;return r===null?(r=nn(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Pi(e,t,r,l,a,f){var m=2;if(l=e,typeof e=="function")Ms(e)&&(m=1);else if(typeof e=="string")m=5;else e:switch(e){case $:return Vr(r.children,a,f,t);case G:m=8,a|=8;break;case Z:return e=nn(12,r,t,a|2),e.elementType=Z,e.lanes=f,e;case be:return e=nn(13,r,t,a),e.elementType=be,e.lanes=f,e;case ze:return e=nn(19,r,t,a),e.elementType=ze,e.lanes=f,e;case Re:return Ri(r,a,f,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ue:m=10;break e;case ve:m=9;break e;case de:m=11;break e;case ke:m=14;break e;case Ie:m=16,l=null;break e}throw Error(i(130,e==null?e:typeof e,""))}return t=nn(m,r,t,a),t.elementType=e,t.type=l,t.lanes=f,t}function Vr(e,t,r,l){return e=nn(7,e,l,t),e.lanes=r,e}function Ri(e,t,r,l){return e=nn(22,e,l,t),e.elementType=Re,e.lanes=r,e.stateNode={isHidden:!1},e}function Os(e,t,r){return e=nn(6,e,null,t),e.lanes=r,e}function zs(e,t,r){return t=nn(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ng(e,t,r,l,a){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ua(0),this.expirationTimes=ua(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ua(0),this.identifierPrefix=l,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function Is(e,t,r,l,a,f,m,C,L){return e=new ng(e,t,r,C,L),t===1?(t=1,f===!0&&(t|=8)):t=0,f=nn(3,null,null,t),e.current=f,f.stateNode=e,f.memoizedState={element:l,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Xa(f),e}function rg(e,t,r){var l=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(o){console.error(o)}}return n(),Vs.exports=gg(),Vs.exports}var pd;function vg(){if(pd)return Mi;pd=1;var n=op();return Mi.createRoot=n.createRoot,Mi.hydrateRoot=n.hydrateRoot,Mi}var yg=vg(),pl={},hd;function xg(){if(hd)return pl;hd=1,Object.defineProperty(pl,"__esModule",{value:!0}),pl.parse=d,pl.serialize=g;const n=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,o=/^[\u0021-\u003A\u003C-\u007E]*$/,i=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,s=/^[\u0020-\u003A\u003D-\u007E]*$/,u=Object.prototype.toString,c=(()=>{const y=function(){};return y.prototype=Object.create(null),y})();function d(y,P){const N=new c,w=y.length;if(w<2)return N;const R=(P==null?void 0:P.decode)||x;let E=0;do{const O=y.indexOf("=",E);if(O===-1)break;const I=y.indexOf(";",E),B=I===-1?w:I;if(O>B){E=y.lastIndexOf(";",O-1)+1;continue}const _=p(y,E,O),Q=h(y,O,_),$=y.slice(_,Q);if(N[$]===void 0){let G=p(y,O+1,B),Z=h(y,B,G);const ue=R(y.slice(G,Z));N[$]=ue}E=B+1}while(EN;){const w=y.charCodeAt(--P);if(w!==32&&w!==9)return P+1}return N}function g(y,P,N){const w=(N==null?void 0:N.encode)||encodeURIComponent;if(!n.test(y))throw new TypeError(`argument name is invalid: ${y}`);const R=w(P);if(!o.test(R))throw new TypeError(`argument val is invalid: ${P}`);let E=y+"="+R;if(!N)return E;if(N.maxAge!==void 0){if(!Number.isInteger(N.maxAge))throw new TypeError(`option maxAge is invalid: ${N.maxAge}`);E+="; Max-Age="+N.maxAge}if(N.domain){if(!i.test(N.domain))throw new TypeError(`option domain is invalid: ${N.domain}`);E+="; Domain="+N.domain}if(N.path){if(!s.test(N.path))throw new TypeError(`option path is invalid: ${N.path}`);E+="; Path="+N.path}if(N.expires){if(!S(N.expires)||!Number.isFinite(N.expires.valueOf()))throw new TypeError(`option expires is invalid: ${N.expires}`);E+="; Expires="+N.expires.toUTCString()}if(N.httpOnly&&(E+="; HttpOnly"),N.secure&&(E+="; Secure"),N.partitioned&&(E+="; Partitioned"),N.priority)switch(typeof N.priority=="string"?N.priority.toLowerCase():void 0){case"low":E+="; Priority=Low";break;case"medium":E+="; Priority=Medium";break;case"high":E+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${N.priority}`)}if(N.sameSite)switch(typeof N.sameSite=="string"?N.sameSite.toLowerCase():N.sameSite){case!0:case"strict":E+="; SameSite=Strict";break;case"lax":E+="; SameSite=Lax";break;case"none":E+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${N.sameSite}`)}return E}function x(y){if(y.indexOf("%")===-1)return y;try{return decodeURIComponent(y)}catch{return y}}function S(y){return u.call(y)==="[object Date]"}return pl}xg();/** * react-router v7.1.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */var md="popstate";function wg(n={}){function o(s,u){let{pathname:c,search:d,hash:p}=s.location;return El("",{pathname:c,search:d,hash:p},u.state&&u.state.usr||null,u.state&&u.state.key||"default")}function i(s,u){return typeof u=="string"?u:Rr(u)}return Eg(o,i,null,n)}function De(n,o){if(n===!1||n===null||typeof n>"u")throw new Error(o)}function xt(n,o){if(!n){typeof console<"u"&&console.warn(o);try{throw new Error(o)}catch{}}}function Sg(){return Math.random().toString(36).substring(2,10)}function gd(n,o){return{usr:n.state,key:n.key,idx:o}}function El(n,o,i=null,s){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof o=="string"?_r(o):o,state:i,key:o&&o.key||s||Sg()}}function Rr({pathname:n="/",search:o="",hash:i=""}){return o&&o!=="?"&&(n+=o.charAt(0)==="?"?o:"?"+o),i&&i!=="#"&&(n+=i.charAt(0)==="#"?i:"#"+i),n}function _r(n){let o={};if(n){let i=n.indexOf("#");i>=0&&(o.hash=n.substring(i),n=n.substring(0,i));let s=n.indexOf("?");s>=0&&(o.search=n.substring(s),n=n.substring(0,s)),n&&(o.pathname=n)}return o}function Eg(n,o,i,s={}){let{window:u=document.defaultView,v5Compat:c=!1}=s,d=u.history,p="POP",h=null,g=x();g==null&&(g=0,d.replaceState({...d.state,idx:g},""));function x(){return(d.state||{idx:null}).idx}function S(){p="POP";let R=x(),E=R==null?null:R-g;g=R,h&&h({action:p,location:w.location,delta:E})}function y(R,E){p="PUSH";let O=El(w.location,R,E);g=x()+1;let I=gd(O,g),B=w.createHref(O);try{d.pushState(I,"",B)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;u.location.assign(B)}c&&h&&h({action:p,location:w.location,delta:1})}function P(R,E){p="REPLACE";let O=El(w.location,R,E);g=x();let I=gd(O,g),B=w.createHref(O);d.replaceState(I,"",B),c&&h&&h({action:p,location:w.location,delta:0})}function N(R){let E=u.location.origin!=="null"?u.location.origin:u.location.href,O=typeof R=="string"?R:Rr(R);return O=O.replace(/ $/,"%20"),De(E,`No window.location.(origin|href) available to create URL for href: ${O}`),new URL(O,E)}let w={get action(){return p},get location(){return n(u,d)},listen(R){if(h)throw new Error("A history only accepts one active listener");return u.addEventListener(md,S),h=R,()=>{u.removeEventListener(md,S),h=null}},createHref(R){return o(u,R)},createURL:N,encodeLocation(R){let E=N(R);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:y,replace:P,go(R){return d.go(R)}};return w}var Cg=new Set(["lazy","caseSensitive","path","id","index","children"]);function kg(n){return n.index===!0}function Qi(n,o,i=[],s={}){return n.map((u,c)=>{let d=[...i,String(c)],p=typeof u.id=="string"?u.id:d.join("-");if(De(u.index!==!0||!u.children,"Cannot specify children on an index route"),De(!s[p],`Found a route id collision on id "${p}". Route id's must be globally unique within Data Router usages`),kg(u)){let h={...u,...o(u),id:p};return s[p]=h,h}else{let h={...u,...o(u),id:p,children:void 0};return s[p]=h,u.children&&(h.children=Qi(u.children,o,d,s)),h}})}function Nr(n,o,i="/"){return $i(n,o,i,!1)}function $i(n,o,i,s){let u=typeof o=="string"?_r(o):o,c=yn(u.pathname||"/",i);if(c==null)return null;let d=lp(n);Pg(d);let p=null;for(let h=0;p==null&&h{let h={relativePath:p===void 0?c.path||"":p,caseSensitive:c.caseSensitive===!0,childrenIndex:d,route:c};h.relativePath.startsWith("/")&&(De(h.relativePath.startsWith(s),`Absolute route path "${h.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),h.relativePath=h.relativePath.slice(s.length));let g=Ln([s,h.relativePath]),x=i.concat(h);c.children&&c.children.length>0&&(De(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),lp(c.children,o,x,g)),!(c.path==null&&!c.index)&&o.push({path:g,score:Dg(g,c.index),routesMeta:x})};return n.forEach((c,d)=>{var p;if(c.path===""||!((p=c.path)!=null&&p.includes("?")))u(c,d);else for(let h of ip(c.path))u(c,d,h)}),o}function ip(n){let o=n.split("/");if(o.length===0)return[];let[i,...s]=o,u=i.endsWith("?"),c=i.replace(/\?$/,"");if(s.length===0)return u?[c,""]:[c];let d=ip(s.join("/")),p=[];return p.push(...d.map(h=>h===""?c:[c,h].join("/"))),u&&p.push(...d),p.map(h=>n.startsWith("/")&&h===""?"/":h)}function Pg(n){n.sort((o,i)=>o.score!==i.score?i.score-o.score:Mg(o.routesMeta.map(s=>s.childrenIndex),i.routesMeta.map(s=>s.childrenIndex)))}var Rg=/^:[\w-]+$/,_g=3,Lg=2,Tg=1,jg=10,bg=-2,vd=n=>n==="*";function Dg(n,o){let i=n.split("/"),s=i.length;return i.some(vd)&&(s+=bg),o&&(s+=Lg),i.filter(u=>!vd(u)).reduce((u,c)=>u+(Rg.test(c)?_g:c===""?Tg:jg),s)}function Mg(n,o){return n.length===o.length&&n.slice(0,-1).every((s,u)=>s===o[u])?n[n.length-1]-o[o.length-1]:0}function Og(n,o,i=!1){let{routesMeta:s}=n,u={},c="/",d=[];for(let p=0;p{if(x==="*"){let N=p[y]||"";d=c.slice(0,c.length-N.length).replace(/(.)\/+$/,"$1")}const P=p[y];return S&&!P?g[x]=void 0:g[x]=(P||"").replace(/%2F/g,"/"),g},{}),pathname:c,pathnameBase:d,pattern:n}}function zg(n,o=!1,i=!0){xt(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let s=[],u="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,p,h)=>(s.push({paramName:p,isOptional:h!=null}),h?"/?([^\\/]+)?":"/([^\\/]+)"));return n.endsWith("*")?(s.push({paramName:"*"}),u+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?u+="\\/*$":n!==""&&n!=="/"&&(u+="(?:(?=\\/|$))"),[new RegExp(u,o?void 0:"i"),s]}function Ig(n){try{return n.split("/").map(o=>decodeURIComponent(o).replace(/\//g,"%2F")).join("/")}catch(o){return xt(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${o}).`),n}}function yn(n,o){if(o==="/")return n;if(!n.toLowerCase().startsWith(o.toLowerCase()))return null;let i=o.endsWith("/")?o.length-1:o.length,s=n.charAt(i);return s&&s!=="/"?null:n.slice(i)||"/"}function Ag(n,o="/"){let{pathname:i,search:s="",hash:u=""}=typeof n=="string"?_r(n):n;return{pathname:i?i.startsWith("/")?i:Fg(i,o):o,search:Bg(s),hash:$g(u)}}function Fg(n,o){let i=o.replace(/\/+$/,"").split("/");return n.split("/").forEach(u=>{u===".."?i.length>1&&i.pop():u!=="."&&i.push(u)}),i.length>1?i.join("/"):"/"}function Gs(n,o,i,s){return`Cannot include a '${n}' character in a manually specified \`to.${o}\` field [${JSON.stringify(s)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function ap(n){return n.filter((o,i)=>i===0||o.route.path&&o.route.path.length>0)}function mu(n){let o=ap(n);return o.map((i,s)=>s===o.length-1?i.pathname:i.pathnameBase)}function gu(n,o,i,s=!1){let u;typeof n=="string"?u=_r(n):(u={...n},De(!u.pathname||!u.pathname.includes("?"),Gs("?","pathname","search",u)),De(!u.pathname||!u.pathname.includes("#"),Gs("#","pathname","hash",u)),De(!u.search||!u.search.includes("#"),Gs("#","search","hash",u)));let c=n===""||u.pathname==="",d=c?"/":u.pathname,p;if(d==null)p=i;else{let S=o.length-1;if(!s&&d.startsWith("..")){let y=d.split("/");for(;y[0]==="..";)y.shift(),S-=1;u.pathname=y.join("/")}p=S>=0?o[S]:"/"}let h=Ag(u,p),g=d&&d!=="/"&&d.endsWith("/"),x=(c||d===".")&&i.endsWith("/");return!h.pathname.endsWith("/")&&(g||x)&&(h.pathname+="/"),h}var Ln=n=>n.join("/").replace(/\/\/+/g,"/"),Ug=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),Bg=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,$g=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,Yi=class{constructor(n,o,i,s=!1){this.status=n,this.statusText=o||"",this.internal=s,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}};function qi(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}var sp=["POST","PUT","PATCH","DELETE"],Vg=new Set(sp),Wg=["GET",...sp],Hg=new Set(Wg),Gg=new Set([301,302,303,307,308]),Qg=new Set([307,308]),Qs={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Kg={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},hl={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},vu=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Yg=n=>({hasErrorBoundary:!!n.hasErrorBoundary}),up="remix-router-transitions",cp=Symbol("ResetLoaderData");function Xg(n){const o=n.window?n.window:typeof window<"u"?window:void 0,i=typeof o<"u"&&typeof o.document<"u"&&typeof o.document.createElement<"u";De(n.routes.length>0,"You must provide a non-empty routes array to createRouter");let s=n.mapRouteProperties||Yg,u={},c=Qi(n.routes,s,void 0,u),d,p=n.basename||"/",h=n.dataStrategy||tv,g=n.patchRoutesOnNavigation,x={...n.future},S=null,y=new Set,P=null,N=null,w=null,R=n.hydrationData!=null,E=Nr(c,n.history.location,p),O=null;if(E==null&&!g){let T=rn(404,{pathname:n.history.location.pathname}),{matches:D,route:F}=_d(c);E=D,O={[F.id]:T}}E&&!n.hydrationData&&Cn(E,c,n.history.location.pathname).active&&(E=null);let I;if(E)if(E.some(T=>T.route.lazy))I=!1;else if(!E.some(T=>T.route.loader))I=!0;else{let T=n.hydrationData?n.hydrationData.loaderData:null,D=n.hydrationData?n.hydrationData.errors:null;if(D){let F=E.findIndex(W=>D[W.route.id]!==void 0);I=E.slice(0,F+1).every(W=>!iu(W.route,T,D))}else I=E.every(F=>!iu(F.route,T,D))}else{I=!1,E=[];let T=Cn(null,c,n.history.location.pathname);T.active&&T.matches&&(E=T.matches)}let B,_={historyAction:n.history.action,location:n.history.location,matches:E,initialized:I,navigation:Qs,restoreScrollPosition:n.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:n.hydrationData&&n.hydrationData.loaderData||{},actionData:n.hydrationData&&n.hydrationData.actionData||null,errors:n.hydrationData&&n.hydrationData.errors||O,fetchers:new Map,blockers:new Map},Q="POP",$=!1,G,Z=!1,ue=new Map,ve=null,de=!1,be=!1,ze=new Set,ke=new Map,Ie=0,Re=-1,Y=new Map,ee=new Set,J=new Map,j=new Map,U=new Set,pe=new Map,he,Ce=null;function _e(){if(S=n.history.listen(({action:T,location:D,delta:F})=>{if(he){he(),he=void 0;return}xt(pe.size===0||F!=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 W=Jn({currentLocation:_.location,nextLocation:D,historyAction:T});if(W&&F!=null){let te=new Promise(ce=>{he=ce});n.history.go(F*-1),En(W,{state:"blocked",location:D,proceed(){En(W,{state:"proceeding",proceed:void 0,reset:void 0,location:D}),te.then(()=>n.history.go(F))},reset(){let ce=new Map(_.blockers);ce.set(W,hl),ye({blockers:ce})}});return}return Te(T,D)}),i){dv(o,ue);let T=()=>pv(o,ue);o.addEventListener("pagehide",T),ve=()=>o.removeEventListener("pagehide",T)}return _.initialized||Te("POP",_.location,{initialHydration:!0}),B}function Ne(){S&&S(),ve&&ve(),y.clear(),G&&G.abort(),_.fetchers.forEach((T,D)=>wn(D)),_.blockers.forEach((T,D)=>qr(D))}function xe(T){return y.add(T),()=>y.delete(T)}function ye(T,D={}){_={..._,...T};let F=[],W=[];_.fetchers.forEach((te,ce)=>{te.state==="idle"&&(U.has(ce)?F.push(ce):W.push(ce))}),U.forEach(te=>{!_.fetchers.has(te)&&!ke.has(te)&&F.push(te)}),[...y].forEach(te=>te(_,{deletedFetchers:F,viewTransitionOpts:D.viewTransitionOpts,flushSync:D.flushSync===!0})),F.forEach(te=>wn(te)),W.forEach(te=>_.fetchers.delete(te))}function Me(T,D,{flushSync:F}={}){var q,Se;let W=_.actionData!=null&&_.navigation.formMethod!=null&&gn(_.navigation.formMethod)&&_.navigation.state==="loading"&&((q=T.state)==null?void 0:q._isRedirect)!==!0,te;D.actionData?Object.keys(D.actionData).length>0?te=D.actionData:te=null:W?te=_.actionData:te=null;let ce=D.loaderData?Pd(_.loaderData,D.loaderData,D.matches||[],D.errors):_.loaderData,we=_.blockers;we.size>0&&(we=new Map(we),we.forEach((Le,He)=>we.set(He,hl)));let re=$===!0||_.navigation.formMethod!=null&&gn(_.navigation.formMethod)&&((Se=T.state)==null?void 0:Se._isRedirect)!==!0;d&&(c=d,d=void 0),de||Q==="POP"||(Q==="PUSH"?n.history.push(T,T.state):Q==="REPLACE"&&n.history.replace(T,T.state));let ie;if(Q==="POP"){let Le=ue.get(_.location.pathname);Le&&Le.has(T.pathname)?ie={currentLocation:_.location,nextLocation:T}:ue.has(T.pathname)&&(ie={currentLocation:T,nextLocation:_.location})}else if(Z){let Le=ue.get(_.location.pathname);Le?Le.add(T.pathname):(Le=new Set([T.pathname]),ue.set(_.location.pathname,Le)),ie={currentLocation:_.location,nextLocation:T}}ye({...D,actionData:te,loaderData:ce,historyAction:Q,location:T,initialized:!0,navigation:Qs,revalidation:"idle",restoreScrollPosition:Yt(T,D.matches||_.matches),preventScrollReset:re,blockers:we},{viewTransitionOpts:ie,flushSync:F===!0}),Q="POP",$=!1,Z=!1,de=!1,be=!1,Ce==null||Ce.resolve(),Ce=null}async function Fe(T,D){if(typeof T=="number"){n.history.go(T);return}let F=lu(_.location,_.matches,p,T,D==null?void 0:D.fromRouteId,D==null?void 0:D.relative),{path:W,submission:te,error:ce}=yd(!1,F,D),we=_.location,re=El(_.location,W,D&&D.state);re={...re,...n.history.encodeLocation(re)};let ie=D&&D.replace!=null?D.replace:void 0,q="PUSH";ie===!0?q="REPLACE":ie===!1||te!=null&&gn(te.formMethod)&&te.formAction===_.location.pathname+_.location.search&&(q="REPLACE");let Se=D&&"preventScrollReset"in D?D.preventScrollReset===!0:void 0,Le=(D&&D.flushSync)===!0,He=Jn({currentLocation:we,nextLocation:re,historyAction:q});if(He){En(He,{state:"blocked",location:re,proceed(){En(He,{state:"proceeding",proceed:void 0,reset:void 0,location:re}),Fe(T,D)},reset(){let ut=new Map(_.blockers);ut.set(He,hl),ye({blockers:ut})}});return}await Te(q,re,{submission:te,pendingError:ce,preventScrollReset:Se,replace:D&&D.replace,enableViewTransition:D&&D.viewTransition,flushSync:Le})}function se(){Ce||(Ce=hv()),Dn(),ye({revalidation:"loading"});let T=Ce.promise;return _.navigation.state==="submitting"?T:_.navigation.state==="idle"?(Te(_.historyAction,_.location,{startUninterruptedRevalidation:!0}),T):(Te(Q||_.historyAction,_.navigation.location,{overrideNavigation:_.navigation,enableViewTransition:Z===!0}),T)}async function Te(T,D,F){G&&G.abort(),G=null,Q=T,de=(F&&F.startUninterruptedRevalidation)===!0,an(_.location,_.matches),$=(F&&F.preventScrollReset)===!0,Z=(F&&F.enableViewTransition)===!0;let W=d||c,te=F&&F.overrideNavigation,ce=Nr(W,D,p),we=(F&&F.flushSync)===!0,re=Cn(ce,W,D.pathname);if(re.active&&re.matches&&(ce=re.matches),!ce){let{error:Ue,notFoundMatches:Ve,route:nt}=On(D.pathname);Me(D,{matches:Ve,loaderData:{},errors:{[nt.id]:Ue}},{flushSync:we});return}if(_.initialized&&!be&&av(_.location,D)&&!(F&&F.submission&&gn(F.submission.formMethod))){Me(D,{matches:ce},{flushSync:we});return}G=new AbortController;let ie=Po(n.history,D,G.signal,F&&F.submission),q;if(F&&F.pendingError)q=[Wr(ce).route.id,{type:"error",error:F.pendingError}];else if(F&&F.submission&&gn(F.submission.formMethod)){let Ue=await We(ie,D,F.submission,ce,re.active,{replace:F.replace,flushSync:we});if(Ue.shortCircuited)return;if(Ue.pendingActionResult){let[Ve,nt]=Ue.pendingActionResult;if(Gt(nt)&&qi(nt.error)&&nt.error.status===404){G=null,Me(D,{matches:Ue.matches,loaderData:{},errors:{[Ve]:nt.error}});return}}ce=Ue.matches||ce,q=Ue.pendingActionResult,te=Ks(D,F.submission),we=!1,re.active=!1,ie=Po(n.history,ie.url,ie.signal)}let{shortCircuited:Se,matches:Le,loaderData:He,errors:ut}=await it(ie,D,ce,re.active,te,F&&F.submission,F&&F.fetcherSubmission,F&&F.replace,F&&F.initialHydration===!0,we,q);Se||(G=null,Me(D,{matches:Le||ce,...Rd(q),loaderData:He,errors:ut}))}async function We(T,D,F,W,te,ce={}){Dn();let we=cv(D,F);if(ye({navigation:we},{flushSync:ce.flushSync===!0}),te){let q=await zn(W,D.pathname,T.signal);if(q.type==="aborted")return{shortCircuited:!0};if(q.type==="error"){let Se=Wr(q.partialMatches).route.id;return{matches:q.partialMatches,pendingActionResult:[Se,{type:"error",error:q.error}]}}else if(q.matches)W=q.matches;else{let{notFoundMatches:Se,error:Le,route:He}=On(D.pathname);return{matches:Se,pendingActionResult:[He.id,{type:"error",error:Le}]}}}let re,ie=xl(W,D);if(!ie.route.action&&!ie.route.lazy)re={type:"error",error:rn(405,{method:T.method,pathname:D.pathname,routeId:ie.route.id})};else if(re=(await Ft("action",_,T,[ie],W,null))[ie.route.id],T.signal.aborted)return{shortCircuited:!0};if(Hr(re)){let q;return ce&&ce.replace!=null?q=ce.replace:q=Cd(re.response.headers.get("Location"),new URL(T.url),p)===_.location.pathname+_.location.search,await at(T,re,!0,{submission:F,replace:q}),{shortCircuited:!0}}if(Gt(re)){let q=Wr(W,ie.route.id);return(ce&&ce.replace)!==!0&&(Q="PUSH"),{matches:W,pendingActionResult:[q.route.id,re]}}return{matches:W,pendingActionResult:[ie.route.id,re]}}async function it(T,D,F,W,te,ce,we,re,ie,q,Se){let Le=te||Ks(D,ce),He=ce||we||Td(Le),ut=!de&&!ie;if(W){if(ut){let ct=wt(Se);ye({navigation:Le,...ct!==void 0?{actionData:ct}:{}},{flushSync:q})}let Be=await zn(F,D.pathname,T.signal);if(Be.type==="aborted")return{shortCircuited:!0};if(Be.type==="error"){let ct=Wr(Be.partialMatches).route.id;return{matches:Be.partialMatches,loaderData:{},errors:{[ct]:Be.error}}}else if(Be.matches)F=Be.matches;else{let{error:ct,notFoundMatches:An,route:jr}=On(D.pathname);return{matches:An,loaderData:{},errors:{[jr.id]:ct}}}}let Ue=d||c,[Ve,nt]=wd(n.history,_,F,He,D,ie===!0,be,ze,U,J,ee,Ue,p,Se);if(Re=++Ie,Ve.length===0&&nt.length===0){let Be=Xn();return Me(D,{matches:F,loaderData:{},errors:Se&&Gt(Se[1])?{[Se[0]]:Se[1].error}:null,...Rd(Se),...Be?{fetchers:new Map(_.fetchers)}:{}},{flushSync:q}),{shortCircuited:!0}}if(ut){let Be={};if(!W){Be.navigation=Le;let ct=wt(Se);ct!==void 0&&(Be.actionData=ct)}nt.length>0&&(Be.fetchers=Nt(nt)),ye(Be,{flushSync:q})}nt.forEach(Be=>{ot(Be.key),Be.controller&&ke.set(Be.key,Be.controller)});let er=()=>nt.forEach(Be=>ot(Be.key));G&&G.signal.addEventListener("abort",er);let{loaderResults:tr,fetcherResults:Xt}=await bn(_,F,Ve,nt,T);if(T.signal.aborted)return{shortCircuited:!0};G&&G.signal.removeEventListener("abort",er),nt.forEach(Be=>ke.delete(Be.key));let Ut=Oi(tr);if(Ut)return await at(T,Ut.result,!0,{replace:re}),{shortCircuited:!0};if(Ut=Oi(Xt),Ut)return ee.add(Ut.key),await at(T,Ut.result,!0,{replace:re}),{shortCircuited:!0};let{loaderData:to,errors:Tr}=Nd(_,F,tr,Se,nt,Xt);ie&&_.errors&&(Tr={..._.errors,...Tr});let In=Xn(),Ge=Sn(Re),no=In||Ge||nt.length>0;return{matches:F,loaderData:to,errors:Tr,...no?{fetchers:new Map(_.fetchers)}:{}}}function wt(T){if(T&&!Gt(T[1]))return{[T[0]]:T[1].data};if(_.actionData)return Object.keys(_.actionData).length===0?null:_.actionData}function Nt(T){return T.forEach(D=>{let F=_.fetchers.get(D.key),W=ml(void 0,F?F.data:void 0);_.fetchers.set(D.key,W)}),new Map(_.fetchers)}async function Qt(T,D,F,W){ot(T);let te=(W&&W.flushSync)===!0,ce=d||c,we=lu(_.location,_.matches,p,F,D,W==null?void 0:W.relative),re=Nr(ce,we,p),ie=Cn(re,ce,we);if(ie.active&&ie.matches&&(re=ie.matches),!re){jt(T,D,rn(404,{pathname:we}),{flushSync:te});return}let{path:q,submission:Se,error:Le}=yd(!0,we,W);if(Le){jt(T,D,Le,{flushSync:te});return}let He=xl(re,q),ut=(W&&W.preventScrollReset)===!0;if(Se&&gn(Se.formMethod)){await Lt(T,D,q,He,re,ie.active,te,ut,Se);return}J.set(T,{routeId:D,path:q}),await Pt(T,D,q,He,re,ie.active,te,ut,Se)}async function Lt(T,D,F,W,te,ce,we,re,ie){Dn(),J.delete(T);function q(Ze){if(!Ze.route.action&&!Ze.route.lazy){let sn=rn(405,{method:ie.formMethod,pathname:F,routeId:D});return jt(T,D,sn,{flushSync:we}),!0}return!1}if(!ce&&q(W))return;let Se=_.fetchers.get(T);Tt(T,fv(ie,Se),{flushSync:we});let Le=new AbortController,He=Po(n.history,F,Le.signal,ie);if(ce){let Ze=await zn(te,F,He.signal);if(Ze.type==="aborted")return;if(Ze.type==="error"){jt(T,D,Ze.error,{flushSync:we});return}else if(Ze.matches){if(te=Ze.matches,W=xl(te,F),q(W))return}else{jt(T,D,rn(404,{pathname:F}),{flushSync:we});return}}ke.set(T,Le);let ut=Ie,Ve=(await Ft("action",_,He,[W],te,T))[W.route.id];if(He.signal.aborted){ke.get(T)===Le&&ke.delete(T);return}if(U.has(T)){if(Hr(Ve)||Gt(Ve)){Tt(T,Cr(void 0));return}}else{if(Hr(Ve))if(ke.delete(T),Re>ut){Tt(T,Cr(void 0));return}else return ee.add(T),Tt(T,ml(ie)),at(He,Ve,!1,{fetcherSubmission:ie,preventScrollReset:re});if(Gt(Ve)){jt(T,D,Ve.error);return}}let nt=_.navigation.location||_.location,er=Po(n.history,nt,Le.signal),tr=d||c,Xt=_.navigation.state!=="idle"?Nr(tr,_.navigation.location,p):_.matches;De(Xt,"Didn't find any matches after fetcher action");let Ut=++Ie;Y.set(T,Ut);let to=ml(ie,Ve.data);_.fetchers.set(T,to);let[Tr,In]=wd(n.history,_,Xt,ie,nt,!1,be,ze,U,J,ee,tr,p,[W.route.id,Ve]);In.filter(Ze=>Ze.key!==T).forEach(Ze=>{let sn=Ze.key,Bt=_.fetchers.get(sn),aa=ml(void 0,Bt?Bt.data:void 0);_.fetchers.set(sn,aa),ot(sn),Ze.controller&&ke.set(sn,Ze.controller)}),ye({fetchers:new Map(_.fetchers)});let Ge=()=>In.forEach(Ze=>ot(Ze.key));Le.signal.addEventListener("abort",Ge);let{loaderResults:no,fetcherResults:Be}=await bn(_,Xt,Tr,In,er);if(Le.signal.aborted)return;Le.signal.removeEventListener("abort",Ge),Y.delete(T),ke.delete(T),In.forEach(Ze=>ke.delete(Ze.key));let ct=Oi(no);if(ct)return at(er,ct.result,!1,{preventScrollReset:re});if(ct=Oi(Be),ct)return ee.add(ct.key),at(er,ct.result,!1,{preventScrollReset:re});let{loaderData:An,errors:jr}=Nd(_,Xt,no,void 0,In,Be);if(_.fetchers.has(T)){let Ze=Cr(Ve.data);_.fetchers.set(T,Ze)}Sn(Ut),_.navigation.state==="loading"&&Ut>Re?(De(Q,"Expected pending action"),G&&G.abort(),Me(_.navigation.location,{matches:Xt,loaderData:An,errors:jr,fetchers:new Map(_.fetchers)})):(ye({errors:jr,loaderData:Pd(_.loaderData,An,Xt,jr),fetchers:new Map(_.fetchers)}),be=!1)}async function Pt(T,D,F,W,te,ce,we,re,ie){let q=_.fetchers.get(T);Tt(T,ml(ie,q?q.data:void 0),{flushSync:we});let Se=new AbortController,Le=Po(n.history,F,Se.signal);if(ce){let Ve=await zn(te,F,Le.signal);if(Ve.type==="aborted")return;if(Ve.type==="error"){jt(T,D,Ve.error,{flushSync:we});return}else if(Ve.matches)te=Ve.matches,W=xl(te,F);else{jt(T,D,rn(404,{pathname:F}),{flushSync:we});return}}ke.set(T,Se);let He=Ie,Ue=(await Ft("loader",_,Le,[W],te,T))[W.route.id];if(ke.get(T)===Se&&ke.delete(T),!Le.signal.aborted){if(U.has(T)){Tt(T,Cr(void 0));return}if(Hr(Ue))if(Re>He){Tt(T,Cr(void 0));return}else{ee.add(T),await at(Le,Ue,!1,{preventScrollReset:re});return}if(Gt(Ue)){jt(T,D,Ue.error);return}Tt(T,Cr(Ue.data))}}async function at(T,D,F,{submission:W,fetcherSubmission:te,preventScrollReset:ce,replace:we}={}){D.response.headers.has("X-Remix-Revalidate")&&(be=!0);let re=D.response.headers.get("Location");De(re,"Expected a Location header on the redirect Response"),re=Cd(re,new URL(T.url),p);let ie=El(_.location,re,{_isRedirect:!0});if(i){let Ue=!1;if(D.response.headers.has("X-Remix-Reload-Document"))Ue=!0;else if(vu.test(re)){const Ve=n.history.createURL(re);Ue=Ve.origin!==o.location.origin||yn(Ve.pathname,p)==null}if(Ue){we?o.location.replace(re):o.location.assign(re);return}}G=null;let q=we===!0||D.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Se,formAction:Le,formEncType:He}=_.navigation;!W&&!te&&Se&&Le&&He&&(W=Td(_.navigation));let ut=W||te;if(Qg.has(D.response.status)&&ut&&gn(ut.formMethod))await Te(q,ie,{submission:{...ut,formAction:re},preventScrollReset:ce||$,enableViewTransition:F?Z:void 0});else{let Ue=Ks(ie,W);await Te(q,ie,{overrideNavigation:Ue,fetcherSubmission:te,preventScrollReset:ce||$,enableViewTransition:F?Z:void 0})}}async function Ft(T,D,F,W,te,ce){let we,re={};try{we=await nv(h,T,D,F,W,te,ce,u,s)}catch(ie){return W.forEach(q=>{re[q.route.id]={type:"error",error:ie}}),re}for(let[ie,q]of Object.entries(we))if(sv(q)){let Se=q.result;re[ie]={type:"redirect",response:lv(Se,F,ie,te,p)}}else re[ie]=await ov(q);return re}async function bn(T,D,F,W,te){let ce=Ft("loader",T,te,F,D,null),we=Promise.all(W.map(async q=>{if(q.matches&&q.match&&q.controller){let Le=(await Ft("loader",T,Po(n.history,q.path,q.controller.signal),[q.match],q.matches,q.key))[q.match.route.id];return{[q.key]:Le}}else return Promise.resolve({[q.key]:{type:"error",error:rn(404,{pathname:q.path})}})})),re=await ce,ie=(await we).reduce((q,Se)=>Object.assign(q,Se),{});return{loaderResults:re,fetcherResults:ie}}function Dn(){be=!0,J.forEach((T,D)=>{ke.has(D)&&ze.add(D),ot(D)})}function Tt(T,D,F={}){_.fetchers.set(T,D),ye({fetchers:new Map(_.fetchers)},{flushSync:(F&&F.flushSync)===!0})}function jt(T,D,F,W={}){let te=Wr(_.matches,D);wn(T),ye({errors:{[te.route.id]:F},fetchers:new Map(_.fetchers)},{flushSync:(W&&W.flushSync)===!0})}function Mn(T){return j.set(T,(j.get(T)||0)+1),U.has(T)&&U.delete(T),_.fetchers.get(T)||Kg}function wn(T){let D=_.fetchers.get(T);ke.has(T)&&!(D&&D.state==="loading"&&Y.has(T))&&ot(T),J.delete(T),Y.delete(T),ee.delete(T),U.delete(T),ze.delete(T),_.fetchers.delete(T)}function Yn(T){let D=(j.get(T)||0)-1;D<=0?(j.delete(T),U.add(T)):j.set(T,D),ye({fetchers:new Map(_.fetchers)})}function ot(T){let D=ke.get(T);D&&(D.abort(),ke.delete(T))}function Kt(T){for(let D of T){let F=Mn(D),W=Cr(F.data);_.fetchers.set(D,W)}}function Xn(){let T=[],D=!1;for(let F of ee){let W=_.fetchers.get(F);De(W,`Expected fetcher: ${F}`),W.state==="loading"&&(ee.delete(F),T.push(F),D=!0)}return Kt(T),D}function Sn(T){let D=[];for(let[F,W]of Y)if(W0}function Zr(T,D){let F=_.blockers.get(T)||hl;return pe.get(T)!==D&&pe.set(T,D),F}function qr(T){_.blockers.delete(T),pe.delete(T)}function En(T,D){let F=_.blockers.get(T)||hl;De(F.state==="unblocked"&&D.state==="blocked"||F.state==="blocked"&&D.state==="blocked"||F.state==="blocked"&&D.state==="proceeding"||F.state==="blocked"&&D.state==="unblocked"||F.state==="proceeding"&&D.state==="unblocked",`Invalid blocker state transition: ${F.state} -> ${D.state}`);let W=new Map(_.blockers);W.set(T,D),ye({blockers:W})}function Jn({currentLocation:T,nextLocation:D,historyAction:F}){if(pe.size===0)return;pe.size>1&&xt(!1,"A router only supports one blocker at a time");let W=Array.from(pe.entries()),[te,ce]=W[W.length-1],we=_.blockers.get(te);if(!(we&&we.state==="proceeding")&&ce({currentLocation:T,nextLocation:D,historyAction:F}))return te}function On(T){let D=rn(404,{pathname:T}),F=d||c,{matches:W,route:te}=_d(F);return{notFoundMatches:W,route:te,error:D}}function Zn(T,D,F){if(P=T,w=D,N=F||null,!R&&_.navigation===Qs){R=!0;let W=Yt(_.location,_.matches);W!=null&&ye({restoreScrollPosition:W})}return()=>{P=null,w=null,N=null}}function qn(T,D){return N&&N(T,D.map(W=>Ng(W,_.loaderData)))||T.key}function an(T,D){if(P&&w){let F=qn(T,D);P[F]=w()}}function Yt(T,D){if(P){let F=qn(T,D),W=P[F];if(typeof W=="number")return W}return null}function Cn(T,D,F){if(g)if(T){if(Object.keys(T[0].params).length>0)return{active:!0,matches:$i(D,F,p,!0)}}else return{active:!0,matches:$i(D,F,p,!0)||[]};return{active:!1,matches:null}}async function zn(T,D,F){if(!g)return{type:"success",matches:T};let W=T;for(;;){let te=d==null,ce=d||c,we=u;try{await g({path:D,matches:W,patch:(q,Se)=>{F.aborted||Ed(q,Se,ce,we,s)}})}catch(q){return{type:"error",error:q,partialMatches:W}}finally{te&&!F.aborted&&(c=[...c])}if(F.aborted)return{type:"aborted"};let re=Nr(ce,D,p);if(re)return{type:"success",matches:re};let ie=$i(ce,D,p,!0);if(!ie||W.length===ie.length&&W.every((q,Se)=>q.route.id===ie[Se].route.id))return{type:"success",matches:null};W=ie}}function Lr(T){u={},d=Qi(T,s,void 0,u)}function eo(T,D){let F=d==null;Ed(T,D,d||c,u,s),F&&(c=[...c],ye({}))}return B={get basename(){return p},get future(){return x},get state(){return _},get routes(){return c},get window(){return o},initialize:_e,subscribe:xe,enableScrollRestoration:Zn,navigate:Fe,fetch:Qt,revalidate:se,createHref:T=>n.history.createHref(T),encodeLocation:T=>n.history.encodeLocation(T),getFetcher:Mn,deleteFetcher:Yn,dispose:Ne,getBlocker:Zr,deleteBlocker:qr,patchRoutes:eo,_internalFetchControllers:ke,_internalSetRoutes:Lr},B}function Jg(n){return n!=null&&("formData"in n&&n.formData!=null||"body"in n&&n.body!==void 0)}function lu(n,o,i,s,u,c){let d,p;if(u){d=[];for(let g of o)if(d.push(g),g.route.id===u){p=g;break}}else d=o,p=o[o.length-1];let h=gu(s||".",mu(d),yn(n.pathname,i)||n.pathname,c==="path");if(s==null&&(h.search=n.search,h.hash=n.hash),(s==null||s===""||s===".")&&p){let g=yu(h.search);if(p.route.index&&!g)h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index";else if(!p.route.index&&g){let x=new URLSearchParams(h.search),S=x.getAll("index");x.delete("index"),S.filter(P=>P).forEach(P=>x.append("index",P));let y=x.toString();h.search=y?`?${y}`:""}}return i!=="/"&&(h.pathname=h.pathname==="/"?i:Ln([i,h.pathname])),Rr(h)}function yd(n,o,i){if(!i||!Jg(i))return{path:o};if(i.formMethod&&!uv(i.formMethod))return{path:o,error:rn(405,{method:i.formMethod})};let s=()=>({path:o,error:rn(400,{type:"invalid-body"})}),c=(i.formMethod||"get").toUpperCase(),d=dp(o);if(i.body!==void 0){if(i.formEncType==="text/plain"){if(!gn(c))return s();let S=typeof i.body=="string"?i.body:i.body instanceof FormData||i.body instanceof URLSearchParams?Array.from(i.body.entries()).reduce((y,[P,N])=>`${y}${P}=${N} `,""):String(i.body);return{path:o,submission:{formMethod:c,formAction:d,formEncType:i.formEncType,formData:void 0,json:void 0,text:S}}}else if(i.formEncType==="application/json"){if(!gn(c))return s();try{let S=typeof i.body=="string"?JSON.parse(i.body):i.body;return{path:o,submission:{formMethod:c,formAction:d,formEncType:i.formEncType,formData:void 0,json:S,text:void 0}}}catch{return s()}}}De(typeof FormData=="function","FormData is not available in this environment");let p,h;if(i.formData)p=au(i.formData),h=i.formData;else if(i.body instanceof FormData)p=au(i.body),h=i.body;else if(i.body instanceof URLSearchParams)p=i.body,h=kd(p);else if(i.body==null)p=new URLSearchParams,h=new FormData;else try{p=new URLSearchParams(i.body),h=kd(p)}catch{return s()}let g={formMethod:c,formAction:d,formEncType:i&&i.formEncType||"application/x-www-form-urlencoded",formData:h,json:void 0,text:void 0};if(gn(g.formMethod))return{path:o,submission:g};let x=_r(o);return n&&x.search&&yu(x.search)&&p.append("index",""),x.search=`?${p}`,{path:Rr(x),submission:g}}function xd(n,o,i=!1){let s=n.findIndex(u=>u.route.id===o);return s>=0?n.slice(0,i?s+1:s):n}function wd(n,o,i,s,u,c,d,p,h,g,x,S,y,P){let N=P?Gt(P[1])?P[1].error:P[1].data:void 0,w=n.createURL(o.location),R=n.createURL(u),E=i;c&&o.errors?E=xd(i,Object.keys(o.errors)[0],!0):P&&Gt(P[1])&&(E=xd(i,P[0]));let O=P?P[1].statusCode:void 0,I=O&&O>=400,B=E.filter((Q,$)=>{let{route:G}=Q;if(G.lazy)return!0;if(G.loader==null)return!1;if(c)return iu(G,o.loaderData,o.errors);if(Zg(o.loaderData,o.matches[$],Q))return!0;let Z=o.matches[$],ue=Q;return Sd(Q,{currentUrl:w,currentParams:Z.params,nextUrl:R,nextParams:ue.params,...s,actionResult:N,actionStatus:O,defaultShouldRevalidate:I?!1:d||w.pathname+w.search===R.pathname+R.search||w.search!==R.search||qg(Z,ue)})}),_=[];return g.forEach((Q,$)=>{if(c||!i.some(de=>de.route.id===Q.routeId)||h.has($))return;let G=Nr(S,Q.path,y);if(!G){_.push({key:$,routeId:Q.routeId,path:Q.path,matches:null,match:null,controller:null});return}let Z=o.fetchers.get($),ue=xl(G,Q.path),ve=!1;x.has($)?ve=!1:p.has($)?(p.delete($),ve=!0):Z&&Z.state!=="idle"&&Z.data===void 0?ve=d:ve=Sd(ue,{currentUrl:w,currentParams:o.matches[o.matches.length-1].params,nextUrl:R,nextParams:i[i.length-1].params,...s,actionResult:N,actionStatus:O,defaultShouldRevalidate:I?!1:d}),ve&&_.push({key:$,routeId:Q.routeId,path:Q.path,matches:G,match:ue,controller:new AbortController})}),[B,_]}function iu(n,o,i){if(n.lazy)return!0;if(!n.loader)return!1;let s=o!=null&&o[n.id]!==void 0,u=i!=null&&i[n.id]!==void 0;return!s&&u?!1:typeof n.loader=="function"&&n.loader.hydrate===!0?!0:!s&&!u}function Zg(n,o,i){let s=!o||i.route.id!==o.route.id,u=!n.hasOwnProperty(i.route.id);return s||u}function qg(n,o){let i=n.route.path;return n.pathname!==o.pathname||i!=null&&i.endsWith("*")&&n.params["*"]!==o.params["*"]}function Sd(n,o){if(n.route.shouldRevalidate){let i=n.route.shouldRevalidate(o);if(typeof i=="boolean")return i}return o.defaultShouldRevalidate}function Ed(n,o,i,s,u){let c;if(n){let h=s[n];De(h,`No route found to patch children into: routeId = ${n}`),h.children||(h.children=[]),c=h.children}else c=i;let d=o.filter(h=>!c.some(g=>fp(h,g))),p=Qi(d,u,[n||"_","patch",String((c==null?void 0:c.length)||"0")],s);c.push(...p)}function fp(n,o){return"id"in n&&"id"in o&&n.id===o.id?!0:n.index===o.index&&n.path===o.path&&n.caseSensitive===o.caseSensitive?(!n.children||n.children.length===0)&&(!o.children||o.children.length===0)?!0:n.children.every((i,s)=>{var u;return(u=o.children)==null?void 0:u.some(c=>fp(i,c))}):!1}async function ev(n,o,i){if(!n.lazy)return;let s=await n.lazy();if(!n.lazy)return;let u=i[n.id];De(u,"No route found in manifest");let c={};for(let d in s){let h=u[d]!==void 0&&d!=="hasErrorBoundary";xt(!h,`Route "${u.id}" has a static property "${d}" defined but its lazy function is also returning a value for this property. The lazy route property "${d}" will be ignored.`),!h&&!Cg.has(d)&&(c[d]=s[d])}Object.assign(u,c),Object.assign(u,{...o(u),lazy:void 0})}async function tv({matches:n}){let o=n.filter(s=>s.shouldLoad);return(await Promise.all(o.map(s=>s.resolve()))).reduce((s,u,c)=>Object.assign(s,{[o[c].route.id]:u}),{})}async function nv(n,o,i,s,u,c,d,p,h,g){let x=c.map(P=>P.route.lazy?ev(P.route,h,p):void 0),S=c.map((P,N)=>{let w=x[N],R=u.some(O=>O.route.id===P.route.id);return{...P,shouldLoad:R,resolve:async O=>(O&&s.method==="GET"&&(P.route.lazy||P.route.loader)&&(R=!0),R?rv(o,s,P,w,O,g):Promise.resolve({type:"data",result:void 0}))}}),y=await n({matches:S,request:s,params:c[0].params,fetcherKey:d,context:g});try{await Promise.all(x)}catch{}return y}async function rv(n,o,i,s,u,c){let d,p,h=g=>{let x,S=new Promise((N,w)=>x=w);p=()=>x(),o.signal.addEventListener("abort",p);let y=N=>typeof g!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${n}" [routeId: ${i.route.id}]`)):g({request:o,params:i.params,context:c},...N!==void 0?[N]:[]),P=(async()=>{try{return{type:"data",result:await(u?u(w=>y(w)):y())}}catch(N){return{type:"error",result:N}}})();return Promise.race([P,S])};try{let g=i.route[n];if(s)if(g){let x,[S]=await Promise.all([h(g).catch(y=>{x=y}),s]);if(x!==void 0)throw x;d=S}else if(await s,g=i.route[n],g)d=await h(g);else if(n==="action"){let x=new URL(o.url),S=x.pathname+x.search;throw rn(405,{method:o.method,pathname:S,routeId:i.route.id})}else return{type:"data",result:void 0};else if(g)d=await h(g);else{let x=new URL(o.url),S=x.pathname+x.search;throw rn(404,{pathname:S})}}catch(g){return{type:"error",result:g}}finally{p&&o.signal.removeEventListener("abort",p)}return d}async function ov(n){var s,u,c,d;let{result:o,type:i}=n;if(pp(o)){let p;try{let h=o.headers.get("Content-Type");h&&/\bapplication\/json\b/.test(h)?o.body==null?p=null:p=await o.json():p=await o.text()}catch(h){return{type:"error",error:h}}return i==="error"?{type:"error",error:new Yi(o.status,o.statusText,p),statusCode:o.status,headers:o.headers}:{type:"data",data:p,statusCode:o.status,headers:o.headers}}if(i==="error"){if(Ld(o)){if(o.data instanceof Error)return{type:"error",error:o.data,statusCode:(s=o.init)==null?void 0:s.status};o=new Yi(((u=o.init)==null?void 0:u.status)||500,void 0,o.data)}return{type:"error",error:o,statusCode:qi(o)?o.status:void 0}}return Ld(o)?{type:"data",data:o.data,statusCode:(c=o.init)==null?void 0:c.status,headers:(d=o.init)!=null&&d.headers?new Headers(o.init.headers):void 0}:{type:"data",data:o}}function lv(n,o,i,s,u){let c=n.headers.get("Location");if(De(c,"Redirects returned/thrown from loaders/actions must have a Location header"),!vu.test(c)){let d=s.slice(0,s.findIndex(p=>p.route.id===i)+1);c=lu(new URL(o.url),d,u,c),n.headers.set("Location",c)}return n}function Cd(n,o,i){if(vu.test(n)){let s=n,u=s.startsWith("//")?new URL(o.protocol+s):new URL(s),c=yn(u.pathname,i)!=null;if(u.origin===o.origin&&c)return u.pathname+u.search+u.hash}return n}function Po(n,o,i,s){let u=n.createURL(dp(o)).toString(),c={signal:i};if(s&&gn(s.formMethod)){let{formMethod:d,formEncType:p}=s;c.method=d.toUpperCase(),p==="application/json"?(c.headers=new Headers({"Content-Type":p}),c.body=JSON.stringify(s.json)):p==="text/plain"?c.body=s.text:p==="application/x-www-form-urlencoded"&&s.formData?c.body=au(s.formData):c.body=s.formData}return new Request(u,c)}function au(n){let o=new URLSearchParams;for(let[i,s]of n.entries())o.append(i,typeof s=="string"?s:s.name);return o}function kd(n){let o=new FormData;for(let[i,s]of n.entries())o.append(i,s);return o}function iv(n,o,i,s=!1,u=!1){let c={},d=null,p,h=!1,g={},x=i&&Gt(i[1])?i[1].error:void 0;return n.forEach(S=>{if(!(S.route.id in o))return;let y=S.route.id,P=o[y];if(De(!Hr(P),"Cannot handle redirect results in processLoaderData"),Gt(P)){let N=P.error;if(x!==void 0&&(N=x,x=void 0),d=d||{},u)d[y]=N;else{let w=Wr(n,y);d[w.route.id]==null&&(d[w.route.id]=N)}s||(c[y]=cp),h||(h=!0,p=qi(P.error)?P.error.status:500),P.headers&&(g[y]=P.headers)}else c[y]=P.data,P.statusCode&&P.statusCode!==200&&!h&&(p=P.statusCode),P.headers&&(g[y]=P.headers)}),x!==void 0&&i&&(d={[i[0]]:x},c[i[0]]=void 0),{loaderData:c,errors:d,statusCode:p||200,loaderHeaders:g}}function Nd(n,o,i,s,u,c){let{loaderData:d,errors:p}=iv(o,i,s);return u.forEach(h=>{let{key:g,match:x,controller:S}=h,y=c[g];if(De(y,"Did not find corresponding fetcher result"),!(S&&S.signal.aborted))if(Gt(y)){let P=Wr(n.matches,x==null?void 0:x.route.id);p&&p[P.route.id]||(p={...p,[P.route.id]:y.error}),n.fetchers.delete(g)}else if(Hr(y))De(!1,"Unhandled fetcher revalidation redirect");else{let P=Cr(y.data);n.fetchers.set(g,P)}}),{loaderData:d,errors:p}}function Pd(n,o,i,s){let u=Object.entries(o).filter(([,c])=>c!==cp).reduce((c,[d,p])=>(c[d]=p,c),{});for(let c of i){let d=c.route.id;if(!o.hasOwnProperty(d)&&n.hasOwnProperty(d)&&c.route.loader&&(u[d]=n[d]),s&&s.hasOwnProperty(d))break}return u}function Rd(n){return n?Gt(n[1])?{actionData:{}}:{actionData:{[n[0]]:n[1].data}}:{}}function Wr(n,o){return(o?n.slice(0,n.findIndex(s=>s.route.id===o)+1):[...n]).reverse().find(s=>s.route.hasErrorBoundary===!0)||n[0]}function _d(n){let o=n.length===1?n[0]:n.find(i=>i.index||!i.path||i.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:o}],route:o}}function rn(n,{pathname:o,routeId:i,method:s,type:u,message:c}={}){let d="Unknown Server Error",p="Unknown @remix-run/router error";return n===400?(d="Bad Request",s&&o&&i?p=`You made a ${s} request to "${o}" but did not provide a \`loader\` for route "${i}", so there is no way to handle the request.`:u==="invalid-body"&&(p="Unable to encode submission body")):n===403?(d="Forbidden",p=`Route "${i}" does not match URL "${o}"`):n===404?(d="Not Found",p=`No route matches URL "${o}"`):n===405&&(d="Method Not Allowed",s&&o&&i?p=`You made a ${s.toUpperCase()} request to "${o}" but did not provide an \`action\` for route "${i}", so there is no way to handle the request.`:s&&(p=`Invalid request method "${s.toUpperCase()}"`)),new Yi(n||500,d,new Error(p),!0)}function Oi(n){let o=Object.entries(n);for(let i=o.length-1;i>=0;i--){let[s,u]=o[i];if(Hr(u))return{key:s,result:u}}}function dp(n){let o=typeof n=="string"?_r(n):n;return Rr({...o,hash:""})}function av(n,o){return n.pathname!==o.pathname||n.search!==o.search?!1:n.hash===""?o.hash!=="":n.hash===o.hash?!0:o.hash!==""}function sv(n){return pp(n.result)&&Gg.has(n.result.status)}function Gt(n){return n.type==="error"}function Hr(n){return(n&&n.type)==="redirect"}function Ld(n){return typeof n=="object"&&n!=null&&"type"in n&&"data"in n&&"init"in n&&n.type==="DataWithResponseInit"}function pp(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.headers=="object"&&typeof n.body<"u"}function uv(n){return Hg.has(n.toUpperCase())}function gn(n){return Vg.has(n.toUpperCase())}function yu(n){return new URLSearchParams(n).getAll("index").some(o=>o==="")}function xl(n,o){let i=typeof o=="string"?_r(o).search:o.search;if(n[n.length-1].route.index&&yu(i||""))return n[n.length-1];let s=ap(n);return s[s.length-1]}function Td(n){let{formMethod:o,formAction:i,formEncType:s,text:u,formData:c,json:d}=n;if(!(!o||!i||!s)){if(u!=null)return{formMethod:o,formAction:i,formEncType:s,formData:void 0,json:void 0,text:u};if(c!=null)return{formMethod:o,formAction:i,formEncType:s,formData:c,json:void 0,text:void 0};if(d!==void 0)return{formMethod:o,formAction:i,formEncType:s,formData:void 0,json:d,text:void 0}}}function Ks(n,o){return o?{state:"loading",location:n,formMethod:o.formMethod,formAction:o.formAction,formEncType:o.formEncType,formData:o.formData,json:o.json,text:o.text}:{state:"loading",location:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function cv(n,o){return{state:"submitting",location:n,formMethod:o.formMethod,formAction:o.formAction,formEncType:o.formEncType,formData:o.formData,json:o.json,text:o.text}}function ml(n,o){return n?{state:"loading",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:o}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:o}}function fv(n,o){return{state:"submitting",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:o?o.data:void 0}}function Cr(n){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:n}}function dv(n,o){try{let i=n.sessionStorage.getItem(up);if(i){let s=JSON.parse(i);for(let[u,c]of Object.entries(s||{}))c&&Array.isArray(c)&&o.set(u,new Set(c||[]))}}catch{}}function pv(n,o){if(o.size>0){let i={};for(let[s,u]of o)i[s]=[...u];try{n.sessionStorage.setItem(up,JSON.stringify(i))}catch(s){xt(!1,`Failed to save applied view transitions in sessionStorage (${s}).`)}}}function hv(){let n,o,i=new Promise((s,u)=>{n=async c=>{s(c);try{await i}catch{}},o=async c=>{u(c);try{await i}catch{}}});return{promise:i,resolve:n,reject:o}}var Yr=v.createContext(null);Yr.displayName="DataRouter";var Pl=v.createContext(null);Pl.displayName="DataRouterState";var xu=v.createContext({isTransitioning:!1});xu.displayName="ViewTransition";var hp=v.createContext(new Map);hp.displayName="Fetchers";var mv=v.createContext(null);mv.displayName="Await";var Tn=v.createContext(null);Tn.displayName="Navigation";var ea=v.createContext(null);ea.displayName="Location";var jn=v.createContext({outlet:null,matches:[],isDataRoute:!1});jn.displayName="Route";var wu=v.createContext(null);wu.displayName="RouteError";function gv(n,{relative:o}={}){De(Rl(),"useHref() may be used only in the context of a component.");let{basename:i,navigator:s}=v.useContext(Tn),{hash:u,pathname:c,search:d}=_l(n,{relative:o}),p=c;return i!=="/"&&(p=c==="/"?i:Ln([i,c])),s.createHref({pathname:p,search:d,hash:u})}function Rl(){return v.useContext(ea)!=null}function Xr(){return De(Rl(),"useLocation() may be used only in the context of a component."),v.useContext(ea).location}var mp="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function gp(n){v.useContext(Tn).static||v.useLayoutEffect(n)}function vv(){let{isDataRoute:n}=v.useContext(jn);return n?bv():yv()}function yv(){De(Rl(),"useNavigate() may be used only in the context of a component.");let n=v.useContext(Yr),{basename:o,navigator:i}=v.useContext(Tn),{matches:s}=v.useContext(jn),{pathname:u}=Xr(),c=JSON.stringify(mu(s)),d=v.useRef(!1);return gp(()=>{d.current=!0}),v.useCallback((h,g={})=>{if(xt(d.current,mp),!d.current)return;if(typeof h=="number"){i.go(h);return}let x=gu(h,JSON.parse(c),u,g.relative==="path");n==null&&o!=="/"&&(x.pathname=x.pathname==="/"?o:Ln([o,x.pathname])),(g.replace?i.replace:i.push)(x,g.state,g)},[o,i,c,u,n])}var xv=v.createContext(null);function wv(n){let o=v.useContext(jn).outlet;return o&&v.createElement(xv.Provider,{value:n},o)}function _l(n,{relative:o}={}){let{matches:i}=v.useContext(jn),{pathname:s}=Xr(),u=JSON.stringify(mu(i));return v.useMemo(()=>gu(n,JSON.parse(u),s,o==="path"),[n,u,s,o])}function Sv(n,o,i,s){De(Rl(),"useRoutes() may be used only in the context of a component.");let{navigator:u}=v.useContext(Tn),{matches:c}=v.useContext(jn),d=c[c.length-1],p=d?d.params:{},h=d?d.pathname:"/",g=d?d.pathnameBase:"/",x=d&&d.route;{let E=x&&x.path||"";vp(h,!x||E.endsWith("*")||E.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${h}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. Please change the parent to .`)}let S=Xr(),y;y=S;let P=y.pathname||"/",N=P;if(g!=="/"){let E=g.replace(/^\//,"").split("/");N="/"+P.replace(/^\//,"").split("/").slice(E.length).join("/")}let w=Nr(n,{pathname:N});return xt(x||w!=null,`No routes matched location "${y.pathname}${y.search}${y.hash}" `),xt(w==null||w[w.length-1].route.element!==void 0||w[w.length-1].route.Component!==void 0||w[w.length-1].route.lazy!==void 0,`Matched leaf route at location "${y.pathname}${y.search}${y.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`),Pv(w&&w.map(E=>Object.assign({},E,{params:Object.assign({},p,E.params),pathname:Ln([g,u.encodeLocation?u.encodeLocation(E.pathname).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?g:Ln([g,u.encodeLocation?u.encodeLocation(E.pathnameBase).pathname:E.pathnameBase])})),c,i,s)}function Ev(){let n=jv(),o=qi(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),i=n instanceof Error?n.stack:null,s="rgba(200,200,200, 0.5)",u={padding:"0.5rem",backgroundColor:s},c={padding:"2px 4px",backgroundColor:s},d=null;return console.error("Error handled by React Router default ErrorBoundary:",n),d=v.createElement(v.Fragment,null,v.createElement("p",null,"💿 Hey developer 👋"),v.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",v.createElement("code",{style:c},"ErrorBoundary")," or"," ",v.createElement("code",{style:c},"errorElement")," prop on your route.")),v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},o),i?v.createElement("pre",{style:u},i):null,d)}var Cv=v.createElement(Ev,null),kv=class extends v.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,o){return o.location!==n.location||o.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:o.error,location:o.location,revalidation:n.revalidation||o.revalidation}}componentDidCatch(n,o){console.error("React Router caught the following error during render",n,o)}render(){return this.state.error!==void 0?v.createElement(jn.Provider,{value:this.props.routeContext},v.createElement(wu.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Nv({routeContext:n,match:o,children:i}){let s=v.useContext(Yr);return s&&s.static&&s.staticContext&&(o.route.errorElement||o.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=o.route.id),v.createElement(jn.Provider,{value:n},i)}function Pv(n,o=[],i=null,s=null){if(n==null){if(!i)return null;if(i.errors)n=i.matches;else if(o.length===0&&!i.initialized&&i.matches.length>0)n=i.matches;else return null}let u=n,c=i==null?void 0:i.errors;if(c!=null){let h=u.findIndex(g=>g.route.id&&(c==null?void 0:c[g.route.id])!==void 0);De(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),u=u.slice(0,Math.min(u.length,h+1))}let d=!1,p=-1;if(i)for(let h=0;h=0?u=u.slice(0,p+1):u=[u[0]];break}}}return u.reduceRight((h,g,x)=>{let S,y=!1,P=null,N=null;i&&(S=c&&g.route.id?c[g.route.id]:void 0,P=g.route.errorElement||Cv,d&&(p<0&&x===0?(vp("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),y=!0,N=null):p===x&&(y=!0,N=g.route.hydrateFallbackElement||null)));let w=o.concat(u.slice(0,x+1)),R=()=>{let E;return S?E=P:y?E=N:g.route.Component?E=v.createElement(g.route.Component,null):g.route.element?E=g.route.element:E=h,v.createElement(Nv,{match:g,routeContext:{outlet:h,matches:w,isDataRoute:i!=null},children:E})};return i&&(g.route.ErrorBoundary||g.route.errorElement||x===0)?v.createElement(kv,{location:i.location,revalidation:i.revalidation,component:P,error:S,children:R(),routeContext:{outlet:null,matches:w,isDataRoute:!0}}):R()},null)}function Su(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Rv(n){let o=v.useContext(Yr);return De(o,Su(n)),o}function _v(n){let o=v.useContext(Pl);return De(o,Su(n)),o}function Lv(n){let o=v.useContext(jn);return De(o,Su(n)),o}function Eu(n){let o=Lv(n),i=o.matches[o.matches.length-1];return De(i.route.id,`${n} can only be used on routes that contain a unique "id"`),i.route.id}function Tv(){return Eu("useRouteId")}function jv(){var s;let n=v.useContext(wu),o=_v("useRouteError"),i=Eu("useRouteError");return n!==void 0?n:(s=o.errors)==null?void 0:s[i]}function bv(){let{router:n}=Rv("useNavigate"),o=Eu("useNavigate"),i=v.useRef(!1);return gp(()=>{i.current=!0}),v.useCallback(async(u,c={})=>{xt(i.current,mp),i.current&&(typeof u=="number"?n.navigate(u):await n.navigate(u,{fromRouteId:o,...c}))},[n,o])}var jd={};function vp(n,o,i){!o&&!jd[n]&&(jd[n]=!0,xt(!1,i))}var bd={};function Dd(n,o){!n&&!bd[o]&&(bd[o]=!0,console.warn(o))}function Dv(n){let o={hasErrorBoundary:n.hasErrorBoundary||n.ErrorBoundary!=null||n.errorElement!=null};return n.Component&&(n.element&&xt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(o,{element:v.createElement(n.Component),Component:void 0})),n.HydrateFallback&&(n.hydrateFallbackElement&&xt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(o,{hydrateFallbackElement:v.createElement(n.HydrateFallback),HydrateFallback:void 0})),n.ErrorBoundary&&(n.errorElement&&xt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(o,{errorElement:v.createElement(n.ErrorBoundary),ErrorBoundary:void 0})),o}var Mv=class{constructor(){this.status="pending",this.promise=new Promise((n,o)=>{this.resolve=i=>{this.status==="pending"&&(this.status="resolved",n(i))},this.reject=i=>{this.status==="pending"&&(this.status="rejected",o(i))}})}};function Ov({router:n,flushSync:o}){let[i,s]=v.useState(n.state),[u,c]=v.useState(),[d,p]=v.useState({isTransitioning:!1}),[h,g]=v.useState(),[x,S]=v.useState(),[y,P]=v.useState(),N=v.useRef(new Map),w=v.useCallback((I,{deletedFetchers:B,flushSync:_,viewTransitionOpts:Q})=>{I.fetchers.forEach((G,Z)=>{G.data!==void 0&&N.current.set(Z,G.data)}),B.forEach(G=>N.current.delete(G)),Dd(_===!1||o!=null,'You provided the `flushSync` option to a router update, but you are not using the `` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let $=n.window!=null&&n.window.document!=null&&typeof n.window.document.startViewTransition=="function";if(Dd(Q==null||$,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!Q||!$){o&&_?o(()=>s(I)):v.startTransition(()=>s(I));return}if(o&&_){o(()=>{x&&(h&&h.resolve(),x.skipTransition()),p({isTransitioning:!0,flushSync:!0,currentLocation:Q.currentLocation,nextLocation:Q.nextLocation})});let G=n.window.document.startViewTransition(()=>{o(()=>s(I))});G.finished.finally(()=>{o(()=>{g(void 0),S(void 0),c(void 0),p({isTransitioning:!1})})}),o(()=>S(G));return}x?(h&&h.resolve(),x.skipTransition(),P({state:I,currentLocation:Q.currentLocation,nextLocation:Q.nextLocation})):(c(I),p({isTransitioning:!0,flushSync:!1,currentLocation:Q.currentLocation,nextLocation:Q.nextLocation}))},[n.window,o,x,h]);v.useLayoutEffect(()=>n.subscribe(w),[n,w]),v.useEffect(()=>{d.isTransitioning&&!d.flushSync&&g(new Mv)},[d]),v.useEffect(()=>{if(h&&u&&n.window){let I=u,B=h.promise,_=n.window.document.startViewTransition(async()=>{v.startTransition(()=>s(I)),await B});_.finished.finally(()=>{g(void 0),S(void 0),c(void 0),p({isTransitioning:!1})}),S(_)}},[u,h,n.window]),v.useEffect(()=>{h&&u&&i.location.key===u.location.key&&h.resolve()},[h,x,i.location,u]),v.useEffect(()=>{!d.isTransitioning&&y&&(c(y.state),p({isTransitioning:!0,flushSync:!1,currentLocation:y.currentLocation,nextLocation:y.nextLocation}),P(void 0))},[d.isTransitioning,y]);let R=v.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:I=>n.navigate(I),push:(I,B,_)=>n.navigate(I,{state:B,preventScrollReset:_==null?void 0:_.preventScrollReset}),replace:(I,B,_)=>n.navigate(I,{replace:!0,state:B,preventScrollReset:_==null?void 0:_.preventScrollReset})}),[n]),E=n.basename||"/",O=v.useMemo(()=>({router:n,navigator:R,static:!1,basename:E}),[n,R,E]);return v.createElement(v.Fragment,null,v.createElement(Yr.Provider,{value:O},v.createElement(Pl.Provider,{value:i},v.createElement(hp.Provider,{value:N.current},v.createElement(xu.Provider,{value:d},v.createElement(Fv,{basename:E,location:i.location,navigationType:i.historyAction,navigator:R},v.createElement(zv,{routes:n.routes,future:n.future,state:i})))))),null)}var zv=v.memo(Iv);function Iv({routes:n,future:o,state:i}){return Sv(n,void 0,i,o)}function Av(n){return wv(n.context)}function Fv({basename:n="/",children:o=null,location:i,navigationType:s="POP",navigator:u,static:c=!1}){De(!Rl(),"You cannot render a inside another . You should never have more than one in your app.");let d=n.replace(/^\/*/,"/"),p=v.useMemo(()=>({basename:d,navigator:u,static:c,future:{}}),[d,u,c]);typeof i=="string"&&(i=_r(i));let{pathname:h="/",search:g="",hash:x="",state:S=null,key:y="default"}=i,P=v.useMemo(()=>{let N=yn(h,d);return N==null?null:{location:{pathname:N,search:g,hash:x,state:S,key:y},navigationType:s}},[d,h,g,x,S,y,s]);return xt(P!=null,` is not able to match the URL "${h}${g}${x}" because it does not start with the basename, so the won't render anything.`),P==null?null:v.createElement(Tn.Provider,{value:p},v.createElement(ea.Provider,{children:o,value:P}))}var Vi="get",Wi="application/x-www-form-urlencoded";function ta(n){return n!=null&&typeof n.tagName=="string"}function Uv(n){return ta(n)&&n.tagName.toLowerCase()==="button"}function Bv(n){return ta(n)&&n.tagName.toLowerCase()==="form"}function $v(n){return ta(n)&&n.tagName.toLowerCase()==="input"}function Vv(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function Wv(n,o){return n.button===0&&(!o||o==="_self")&&!Vv(n)}var zi=null;function Hv(){if(zi===null)try{new FormData(document.createElement("form"),0),zi=!1}catch{zi=!0}return zi}var Gv=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ys(n){return n!=null&&!Gv.has(n)?(xt(!1,`"${n}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${Wi}"`),null):n}function Qv(n,o){let i,s,u,c,d;if(Bv(n)){let p=n.getAttribute("action");s=p?yn(p,o):null,i=n.getAttribute("method")||Vi,u=Ys(n.getAttribute("enctype"))||Wi,c=new FormData(n)}else if(Uv(n)||$v(n)&&(n.type==="submit"||n.type==="image")){let p=n.form;if(p==null)throw new Error('Cannot submit a