var kf=r=>{throw TypeError(r)};var Oa=(r,l,s)=>l.has(r)||kf("Cannot "+s);var y=(r,l,s)=>(Oa(r,l,"read from private field"),s?s.call(r):l.get(r)),J=(r,l,s)=>l.has(r)?kf("Cannot add the same private member more than once"):l instanceof WeakSet?l.add(r):l.set(r,s),H=(r,l,s,u)=>(Oa(r,l,"write to private field"),u?u.call(r,s):l.set(r,s),s),le=(r,l,s)=>(Oa(r,l,"access private method"),s);var Es=(r,l,s,u)=>({set _(c){H(r,l,c,s)},get _(){return y(r,l,u)}});(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))u(c);new MutationObserver(c=>{for(const h of c)if(h.type==="childList")for(const p of h.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&u(p)}).observe(document,{childList:!0,subtree:!0});function s(c){const h={};return c.integrity&&(h.integrity=c.integrity),c.referrerPolicy&&(h.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?h.credentials="include":c.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function u(c){if(c.ep)return;c.ep=!0;const h=s(c);fetch(c.href,h)}})();function ph(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Ia={exports:{}},Ki={},Fa={exports:{}},oe={};/** * @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 jf;function qm(){if(jf)return oe;jf=1;var r=Symbol.for("react.element"),l=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),h=Symbol.for("react.provider"),p=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),E=Symbol.iterator;function L(j){return j===null||typeof j!="object"?null:(j=E&&j[E]||j["@@iterator"],typeof j=="function"?j:null)}var O={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},F=Object.assign,D={};function T(j,z,se){this.props=j,this.context=z,this.refs=D,this.updater=se||O}T.prototype.isReactComponent={},T.prototype.setState=function(j,z){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,z,"setState")},T.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function _(){}_.prototype=T.prototype;function V(j,z,se){this.props=j,this.context=z,this.refs=D,this.updater=se||O}var Q=V.prototype=new _;Q.constructor=V,F(Q,T.prototype),Q.isPureReactComponent=!0;var U=Array.isArray,B=Object.prototype.hasOwnProperty,ie={current:null},fe={key:!0,ref:!0,__self:!0,__source:!0};function re(j,z,se){var ae,he={},pe=null,Se=null;if(z!=null)for(ae in z.ref!==void 0&&(Se=z.ref),z.key!==void 0&&(pe=""+z.key),z)B.call(z,ae)&&!fe.hasOwnProperty(ae)&&(he[ae]=z[ae]);var ge=arguments.length-2;if(ge===1)he.children=se;else if(1>>1,z=W[j];if(0>>1;jc(he,q))pec(Se,he)?(W[j]=Se,W[pe]=q,j=pe):(W[j]=he,W[ae]=q,j=ae);else if(pec(Se,q))W[j]=Se,W[pe]=q,j=pe;else break e}}return te}function c(W,te){var q=W.sortIndex-te.sortIndex;return q!==0?q:W.id-te.id}if(typeof performance=="object"&&typeof performance.now=="function"){var h=performance;r.unstable_now=function(){return h.now()}}else{var p=Date,v=p.now();r.unstable_now=function(){return p.now()-v}}var S=[],g=[],k=1,E=null,L=3,O=!1,F=!1,D=!1,T=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Q(W){for(var te=s(g);te!==null;){if(te.callback===null)u(g);else if(te.startTime<=W)u(g),te.sortIndex=te.expirationTime,l(S,te);else break;te=s(g)}}function U(W){if(D=!1,Q(W),!F)if(s(S)!==null)F=!0,st(B);else{var te=s(g);te!==null&&Te(U,te.startTime-W)}}function B(W,te){F=!1,D&&(D=!1,_(re),re=-1),O=!0;var q=L;try{for(Q(te),E=s(S);E!==null&&(!(E.expirationTime>te)||W&&!Qe());){var j=E.callback;if(typeof j=="function"){E.callback=null,L=E.priorityLevel;var z=j(E.expirationTime<=te);te=r.unstable_now(),typeof z=="function"?E.callback=z:E===s(S)&&u(S),Q(te)}else u(S);E=s(S)}if(E!==null)var se=!0;else{var ae=s(g);ae!==null&&Te(U,ae.startTime-te),se=!1}return se}finally{E=null,L=q,O=!1}}var ie=!1,fe=null,re=-1,ce=5,ye=-1;function Qe(){return!(r.unstable_now()-yeW||125j?(W.sortIndex=q,l(g,W),s(S)===null&&W===s(g)&&(D?(_(re),re=-1):D=!0,Te(U,q-j))):(W.sortIndex=z,l(S,W),F||O||(F=!0,st(B))),W},r.unstable_shouldYield=Qe,r.unstable_wrapCallback=function(W){var te=L;return function(){var q=L;L=te;try{return W.apply(this,arguments)}finally{L=q}}}})(Aa)),Aa}var Tf;function Jm(){return Tf||(Tf=1,Ma.exports=Xm()),Ma.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 Lf;function Zm(){if(Lf)return ft;Lf=1;var r=cu(),l=Jm();function s(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),S=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]*$/,k={},E={};function L(e){return S.call(E,e)?!0:S.call(k,e)?!1:g.test(e)?E[e]=!0:(k[e]=!0,!1)}function O(e,t,n,i){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return i?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function F(e,t,n,i){if(t===null||typeof t>"u"||O(e,t,n,i))return!0;if(i)return!1;if(n!==null)switch(n.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 D(e,t,n,i,o,a,f){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=i,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=f}var T={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){T[e]=new D(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];T[t]=new D(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){T[e]=new D(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){T[e]=new D(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){T[e]=new D(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){T[e]=new D(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){T[e]=new D(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){T[e]=new D(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){T[e]=new D(e,5,!1,e.toLowerCase(),null,!1,!1)});var _=/[\-:]([a-z])/g;function V(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(_,V);T[t]=new D(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(_,V);T[t]=new D(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(_,V);T[t]=new D(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){T[e]=new D(e,1,!1,e.toLowerCase(),null,!1,!1)}),T.xlinkHref=new D("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){T[e]=new D(e,1,!1,e.toLowerCase(),null,!0,!0)});function Q(e,t,n,i){var o=T.hasOwnProperty(t)?T[t]:null;(o!==null?o.type!==0:i||!(2m||o[f]!==a[m]){var x=` `+o[f].replace(" at new "," at ");return e.displayName&&x.includes("")&&(x=x.replace("",e.displayName)),x}while(1<=f&&0<=m);break}}}finally{se=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?z(e):""}function he(e){switch(e.tag){case 5:return z(e.type);case 16:return z("Lazy");case 13:return z("Suspense");case 19:return z("SuspenseList");case 0:case 2:case 15:return e=ae(e.type,!1),e;case 11:return e=ae(e.type.render,!1),e;case 1:return e=ae(e.type,!0),e;default:return""}}function pe(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 fe:return"Fragment";case ie:return"Portal";case ce:return"Profiler";case re:return"StrictMode";case Me:return"Suspense";case Ae:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Qe:return(e.displayName||"Context")+".Consumer";case ye:return(e._context.displayName||"Context")+".Provider";case qe: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:pe(e.type)||"Memo";case st:t=e._payload,e=e._init;try{return pe(e(t))}catch{}}return null}function Se(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 pe(t);case 8:return t===re?"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 ge(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function je(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function mt(e){var t=je(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(f){i=""+f,a.call(this,f)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(f){i=""+f},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function fl(e){e._valueTracker||(e._valueTracker=mt(e))}function _u(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=je(e)?e.checked?"true":"false":e.value),e=i,e!==n?(t.setValue(e),!0):!1}function hl(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 Us(e,t){var n=t.checked;return q({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Tu(e,t){var n=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;n=ge(t.value!=null?t.value:n),e._wrapperState={initialChecked:i,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Lu(e,t){t=t.checked,t!=null&&Q(e,"checked",t,!1)}function $s(e,t){Lu(e,t);var n=ge(t.value),i=t.type;if(n!=null)i==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Bs(e,t.type,n):t.hasOwnProperty("defaultValue")&&Bs(e,t.type,ge(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Du(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!(i!=="submit"&&i!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Bs(e,t,n){(t!=="number"||hl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ai=Array.isArray;function Sr(e,t,n,i){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=pl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ui(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ci={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},Jh=["Webkit","ms","Moz","O"];Object.keys(ci).forEach(function(e){Jh.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ci[t]=ci[e]})});function Au(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ci.hasOwnProperty(e)&&ci[e]?(""+t).trim():t+"px"}function Uu(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var i=n.indexOf("--")===0,o=Au(n,t[n],i);n==="float"&&(n="cssFloat"),i?e.setProperty(n,o):e[n]=o}}var Zh=q({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 Ws(e,t){if(t){if(Zh[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(s(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(s(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(s(61))}if(t.style!=null&&typeof t.style!="object")throw Error(s(62))}}function Vs(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 bs=null;function Ks(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var qs=null,wr=null,Er=null;function $u(e){if(e=Di(e)){if(typeof qs!="function")throw Error(s(280));var t=e.stateNode;t&&(t=Ml(t),qs(e.stateNode,e.type,t))}}function Bu(e){wr?Er?Er.push(e):Er=[e]:wr=e}function Qu(){if(wr){var e=wr,t=Er;if(Er=wr=null,$u(e),t)for(e=0;e>>=0,e===0?32:31-(cp(e)/dp|0)|0}var xl=64,Sl=4194304;function pi(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 wl(e,t){var n=e.pendingLanes;if(n===0)return 0;var i=0,o=e.suspendedLanes,a=e.pingedLanes,f=n&268435455;if(f!==0){var m=f&~o;m!==0?i=pi(m):(a&=f,a!==0&&(i=pi(a)))}else f=n&~o,f!==0?i=pi(f):a!==0&&(i=pi(a));if(i===0)return 0;if(t!==0&&t!==i&&(t&o)===0&&(o=i&-i,a=t&-t,o>=a||o===16&&(a&4194240)!==0))return t;if((i&4)!==0&&(i|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=i;0n;n++)t.push(e);return t}function mi(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Dt(t),e[t]=n}function mp(e,t){var n=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 i=e.eventTimes;for(e=e.expirationTimes;0=Ci),vc=" ",yc=!1;function gc(e,t){switch(e){case"keyup":return Hp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var jr=!1;function Vp(e,t){switch(e){case"compositionend":return xc(t);case"keypress":return t.which!==32?null:(yc=!0,vc);case"textInput":return e=t.data,e===vc&&yc?null:e;default:return null}}function bp(e,t){if(jr)return e==="compositionend"||!ho&&gc(e,t)?(e=cc(),Pl=so=Sn=null,jr=!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:n,offset:t-e};e=i}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Pc(n)}}function Nc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Nc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function _c(){for(var e=window,t=hl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=hl(e.document)}return t}function vo(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 tm(e){var t=_c(),n=e.focusedElem,i=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Nc(n.ownerDocument.documentElement,n)){if(i!==null&&vo(n)){if(t=i.start,e=i.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,a=Math.min(i.start,o);i=i.end===void 0?a:Math.min(i.end,o),!e.extend&&a>i&&(o=i,i=a,a=o),o=Rc(n,a);var f=Rc(n,i);o&&f&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==f.node||e.focusOffset!==f.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),a>i?(e.addRange(t),e.extend(f.node,f.offset)):(t.setEnd(f.node,f.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Pr=null,yo=null,Ri=null,go=!1;function Tc(e,t,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;go||Pr==null||Pr!==hl(i)||(i=Pr,"selectionStart"in i&&vo(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),Ri&&Pi(Ri,i)||(Ri=i,i=Il(yo,"onSelect"),0Lr||(e.current=To[Lr],To[Lr]=null,Lr--)}function we(e,t){Lr++,To[Lr]=e.current,e.current=t}var kn={},Xe=Cn(kn),ot=Cn(!1),Jn=kn;function Dr(e,t){var n=e.type.contextTypes;if(!n)return kn;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var o={},a;for(a in n)o[a]=t[a];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function at(e){return e=e.childContextTypes,e!=null}function Al(){Ce(ot),Ce(Xe)}function Vc(e,t,n){if(Xe.current!==kn)throw Error(s(168));we(Xe,t),we(ot,n)}function bc(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!="function")return n;i=i.getChildContext();for(var o in i)if(!(o in t))throw Error(s(108,Se(e)||"Unknown",o));return q({},n,i)}function Ul(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||kn,Jn=Xe.current,we(Xe,e),we(ot,ot.current),!0}function Kc(e,t,n){var i=e.stateNode;if(!i)throw Error(s(169));n?(e=bc(e,t,Jn),i.__reactInternalMemoizedMergedChildContext=e,Ce(ot),Ce(Xe),we(Xe,e)):Ce(ot),we(ot,n)}var Zt=null,$l=!1,Lo=!1;function qc(e){Zt===null?Zt=[e]:Zt.push(e)}function hm(e){$l=!0,qc(e)}function jn(){if(!Lo&&Zt!==null){Lo=!0;var e=0,t=xe;try{var n=Zt;for(xe=1;e>=f,o-=f,en=1<<32-Dt(t)+o|n<ne?(Ve=ee,ee=null):Ve=ee.sibling;var me=I(P,ee,R[ne],$);if(me===null){ee===null&&(ee=Ve);break}e&&ee&&me.alternate===null&&t(P,ee),w=a(me,w,ne),Z===null?X=me:Z.sibling=me,Z=me,ee=Ve}if(ne===R.length)return n(P,ee),Pe&&er(P,ne),X;if(ee===null){for(;nene?(Ve=ee,ee=null):Ve=ee.sibling;var In=I(P,ee,me.value,$);if(In===null){ee===null&&(ee=Ve);break}e&&ee&&In.alternate===null&&t(P,ee),w=a(In,w,ne),Z===null?X=In:Z.sibling=In,Z=In,ee=Ve}if(me.done)return n(P,ee),Pe&&er(P,ne),X;if(ee===null){for(;!me.done;ne++,me=R.next())me=A(P,me.value,$),me!==null&&(w=a(me,w,ne),Z===null?X=me:Z.sibling=me,Z=me);return Pe&&er(P,ne),X}for(ee=i(P,ee);!me.done;ne++,me=R.next())me=b(ee,P,ne,me.value,$),me!==null&&(e&&me.alternate!==null&&ee.delete(me.key===null?ne:me.key),w=a(me,w,ne),Z===null?X=me:Z.sibling=me,Z=me);return e&&ee.forEach(function(Km){return t(P,Km)}),Pe&&er(P,ne),X}function Ie(P,w,R,$){if(typeof R=="object"&&R!==null&&R.type===fe&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case B:e:{for(var X=R.key,Z=w;Z!==null;){if(Z.key===X){if(X=R.type,X===fe){if(Z.tag===7){n(P,Z.sibling),w=o(Z,R.props.children),w.return=P,P=w;break e}}else if(Z.elementType===X||typeof X=="object"&&X!==null&&X.$$typeof===st&&ed(X)===Z.type){n(P,Z.sibling),w=o(Z,R.props),w.ref=Oi(P,Z,R),w.return=P,P=w;break e}n(P,Z);break}else t(P,Z);Z=Z.sibling}R.type===fe?(w=ar(R.props.children,P.mode,$,R.key),w.return=P,P=w):($=ps(R.type,R.key,R.props,null,P.mode,$),$.ref=Oi(P,w,R),$.return=P,P=$)}return f(P);case ie:e:{for(Z=R.key;w!==null;){if(w.key===Z)if(w.tag===4&&w.stateNode.containerInfo===R.containerInfo&&w.stateNode.implementation===R.implementation){n(P,w.sibling),w=o(w,R.children||[]),w.return=P,P=w;break e}else{n(P,w);break}else t(P,w);w=w.sibling}w=Na(R,P.mode,$),w.return=P,P=w}return f(P);case st:return Z=R._init,Ie(P,w,Z(R._payload),$)}if(ai(R))return G(P,w,R,$);if(te(R))return Y(P,w,R,$);Wl(P,R)}return typeof R=="string"&&R!==""||typeof R=="number"?(R=""+R,w!==null&&w.tag===6?(n(P,w.sibling),w=o(w,R),w.return=P,P=w):(n(P,w),w=Ra(R,P.mode,$),w.return=P,P=w),f(P)):n(P,w)}return Ie}var zr=td(!0),nd=td(!1),Vl=Cn(null),bl=null,Mr=null,Mo=null;function Ao(){Mo=Mr=bl=null}function Uo(e){var t=Vl.current;Ce(Vl),e._currentValue=t}function $o(e,t,n){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===n)break;e=e.return}}function Ar(e,t){bl=e,Mo=Mr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(ut=!0),e.firstContext=null)}function Pt(e){var t=e._currentValue;if(Mo!==e)if(e={context:e,memoizedValue:t,next:null},Mr===null){if(bl===null)throw Error(s(308));Mr=e,bl.dependencies={lanes:0,firstContext:e}}else Mr=Mr.next=e;return t}var tr=null;function Bo(e){tr===null?tr=[e]:tr.push(e)}function rd(e,t,n,i){var o=t.interleaved;return o===null?(n.next=n,Bo(t)):(n.next=o.next,o.next=n),t.interleaved=n,nn(e,i)}function nn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Pn=!1;function Qo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function id(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 rn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Rn(e,t,n){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(de&2)!==0){var o=i.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),i.pending=t,nn(e,n)}return o=i.interleaved,o===null?(t.next=t,Bo(i)):(t.next=o.next,o.next=t),i.interleaved=t,nn(e,n)}function Kl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,to(e,n)}}function ld(e,t){var n=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,n===i)){var o=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var f={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?o=a=f:a=a.next=f,n=n.next}while(n!==null);a===null?o=a=t:a=a.next=t}else o=a=t;n={baseState:i.baseState,firstBaseUpdate:o,lastBaseUpdate:a,shared:i.shared,effects:i.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ql(e,t,n,i){var o=e.updateQueue;Pn=!1;var a=o.firstBaseUpdate,f=o.lastBaseUpdate,m=o.shared.pending;if(m!==null){o.shared.pending=null;var x=m,N=x.next;x.next=null,f===null?a=N:f.next=N,f=x;var M=e.alternate;M!==null&&(M=M.updateQueue,m=M.lastBaseUpdate,m!==f&&(m===null?M.firstBaseUpdate=N:m.next=N,M.lastBaseUpdate=x))}if(a!==null){var A=o.baseState;f=0,M=N=x=null,m=a;do{var I=m.lane,b=m.eventTime;if((i&I)===I){M!==null&&(M=M.next={eventTime:b,lane:0,tag:m.tag,payload:m.payload,callback:m.callback,next:null});e:{var G=e,Y=m;switch(I=t,b=n,Y.tag){case 1:if(G=Y.payload,typeof G=="function"){A=G.call(b,A,I);break e}A=G;break e;case 3:G.flags=G.flags&-65537|128;case 0:if(G=Y.payload,I=typeof G=="function"?G.call(b,A,I):G,I==null)break e;A=q({},A,I);break e;case 2:Pn=!0}}m.callback!==null&&m.lane!==0&&(e.flags|=64,I=o.effects,I===null?o.effects=[m]:I.push(m))}else b={eventTime:b,lane:I,tag:m.tag,payload:m.payload,callback:m.callback,next:null},M===null?(N=M=b,x=A):M=M.next=b,f|=I;if(m=m.next,m===null){if(m=o.shared.pending,m===null)break;I=m,m=I.next,I.next=null,o.lastBaseUpdate=I,o.shared.pending=null}}while(!0);if(M===null&&(x=A),o.baseState=x,o.firstBaseUpdate=N,o.lastBaseUpdate=M,t=o.shared.interleaved,t!==null){o=t;do f|=o.lane,o=o.next;while(o!==t)}else a===null&&(o.shared.lanes=0);ir|=f,e.lanes=f,e.memoizedState=A}}function sd(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var i=Ko.transition;Ko.transition={};try{e(!1),t()}finally{xe=n,Ko.transition=i}}function jd(){return Rt().memoizedState}function ym(e,t,n){var i=Ln(e);if(n={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null},Pd(e))Rd(t,n);else if(n=rd(e,t,n,i),n!==null){var o=rt();At(n,e,i,o),Nd(n,t,i)}}function gm(e,t,n){var i=Ln(e),o={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(Pd(e))Rd(t,o);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var f=t.lastRenderedState,m=a(f,n);if(o.hasEagerState=!0,o.eagerState=m,Ot(m,f)){var x=t.interleaved;x===null?(o.next=o,Bo(t)):(o.next=x.next,x.next=o),t.interleaved=o;return}}catch{}finally{}n=rd(e,t,o,i),n!==null&&(o=rt(),At(n,e,i,o),Nd(n,t,i))}}function Pd(e){var t=e.alternate;return e===_e||t!==null&&t===_e}function Rd(e,t){Mi=Xl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Nd(e,t,n){if((n&4194240)!==0){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,to(e,n)}}var es={readContext:Pt,useCallback:Je,useContext:Je,useEffect:Je,useImperativeHandle:Je,useInsertionEffect:Je,useLayoutEffect:Je,useMemo:Je,useReducer:Je,useRef:Je,useState:Je,useDebugValue:Je,useDeferredValue:Je,useTransition:Je,useMutableSource:Je,useSyncExternalStore:Je,useId:Je,unstable_isNewReconciler:!1},xm={readContext:Pt,useCallback:function(e,t){return Kt().memoizedState=[e,t===void 0?null:t],e},useContext:Pt,useEffect:yd,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Jl(4194308,4,Sd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Jl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Jl(4,2,e,t)},useMemo:function(e,t){var n=Kt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var i=Kt();return t=n!==void 0?n(t):t,i.memoizedState=i.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},i.queue=e,e=e.dispatch=ym.bind(null,_e,e),[i.memoizedState,e]},useRef:function(e){var t=Kt();return e={current:e},t.memoizedState=e},useState:md,useDebugValue:ea,useDeferredValue:function(e){return Kt().memoizedState=e},useTransition:function(){var e=md(!1),t=e[0];return e=vm.bind(null,e[1]),Kt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=_e,o=Kt();if(Pe){if(n===void 0)throw Error(s(407));n=n()}else{if(n=t(),We===null)throw Error(s(349));(rr&30)!==0||cd(i,t,n)}o.memoizedState=n;var a={value:n,getSnapshot:t};return o.queue=a,yd(fd.bind(null,i,a,e),[e]),i.flags|=2048,$i(9,dd.bind(null,i,a,n,t),void 0,null),n},useId:function(){var e=Kt(),t=We.identifierPrefix;if(Pe){var n=tn,i=en;n=(i&~(1<<32-Dt(i)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ai++,0<\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=f.createElement(n,{is:i.is}):(e=f.createElement(n),n==="select"&&(f=e,i.multiple?f.multiple=!0:i.size&&(f.size=i.size))):e=f.createElementNS(e,n),e[Vt]=t,e[Li]=i,qd(e,t,!1,!1),t.stateNode=e;e:{switch(f=Vs(n,i),n){case"dialog":Ee("cancel",e),Ee("close",e),o=i;break;case"iframe":case"object":case"embed":Ee("load",e),o=i;break;case"video":case"audio":for(o=0;oHr&&(t.flags|=128,i=!0,Bi(a,!1),t.lanes=4194304)}else{if(!i)if(e=Gl(f),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Bi(a,!0),a.tail===null&&a.tailMode==="hidden"&&!f.alternate&&!Pe)return Ze(t),null}else 2*Oe()-a.renderingStartTime>Hr&&n!==1073741824&&(t.flags|=128,i=!0,Bi(a,!1),t.lanes=4194304);a.isBackwards?(f.sibling=t.child,t.child=f):(n=a.last,n!==null?n.sibling=f:t.child=f,a.last=f)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Oe(),t.sibling=null,n=Ne.current,we(Ne,i?n&1|2:n&1),t):(Ze(t),null);case 22:case 23:return ka(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&(t.mode&1)!==0?(xt&1073741824)!==0&&(Ze(t),t.subtreeFlags&6&&(t.flags|=8192)):Ze(t),null;case 24:return null;case 25:return null}throw Error(s(156,t.tag))}function Rm(e,t){switch(Oo(t),t.tag){case 1:return at(t.type)&&Al(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ur(),Ce(ot),Ce(Xe),bo(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Wo(t),null;case 13:if(Ce(Ne),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));Fr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ce(Ne),null;case 4:return Ur(),null;case 10:return Uo(t.type._context),null;case 22:case 23:return ka(),null;case 24:return null;default:return null}}var is=!1,et=!1,Nm=typeof WeakSet=="function"?WeakSet:Set,K=null;function Br(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(i){Le(e,t,i)}else n.current=null}function fa(e,t,n){try{n()}catch(i){Le(e,t,i)}}var Xd=!1;function _m(e,t){if(ko=kl,e=_c(),vo(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var o=i.anchorOffset,a=i.focusNode;i=i.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var f=0,m=-1,x=-1,N=0,M=0,A=e,I=null;t:for(;;){for(var b;A!==n||o!==0&&A.nodeType!==3||(m=f+o),A!==a||i!==0&&A.nodeType!==3||(x=f+i),A.nodeType===3&&(f+=A.nodeValue.length),(b=A.firstChild)!==null;)I=A,A=b;for(;;){if(A===e)break t;if(I===n&&++N===o&&(m=f),I===a&&++M===i&&(x=f),(b=A.nextSibling)!==null)break;A=I,I=A.parentNode}A=b}n=m===-1||x===-1?null:{start:m,end:x}}else n=null}n=n||{start:0,end:0}}else n=null;for(jo={focusedElem:e,selectionRange:n},kl=!1,K=t;K!==null;)if(t=K,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,K=e;else for(;K!==null;){t=K;try{var G=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(G!==null){var Y=G.memoizedProps,Ie=G.memoizedState,P=t.stateNode,w=P.getSnapshotBeforeUpdate(t.elementType===t.type?Y:Ft(t.type,Y),Ie);P.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var R=t.stateNode.containerInfo;R.nodeType===1?R.textContent="":R.nodeType===9&&R.documentElement&&R.removeChild(R.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch($){Le(t,t.return,$)}if(e=t.sibling,e!==null){e.return=t.return,K=e;break}K=t.return}return G=Xd,Xd=!1,G}function Qi(e,t,n){var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var o=i=i.next;do{if((o.tag&e)===e){var a=o.destroy;o.destroy=void 0,a!==void 0&&fa(t,n,a)}o=o.next}while(o!==i)}}function ls(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var i=n.create;n.destroy=i()}n=n.next}while(n!==t)}}function ha(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Jd(e){var t=e.alternate;t!==null&&(e.alternate=null,Jd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Vt],delete t[Li],delete t[_o],delete t[dm],delete t[fm])),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 Zd(e){return e.tag===5||e.tag===3||e.tag===4}function ef(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Zd(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 pa(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=zl));else if(i!==4&&(e=e.child,e!==null))for(pa(e,t,n),e=e.sibling;e!==null;)pa(e,t,n),e=e.sibling}function ma(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(ma(e,t,n),e=e.sibling;e!==null;)ma(e,t,n),e=e.sibling}var Ge=null,zt=!1;function Nn(e,t,n){for(n=n.child;n!==null;)tf(e,t,n),n=n.sibling}function tf(e,t,n){if(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(gl,n)}catch{}switch(n.tag){case 5:et||Br(n,t);case 6:var i=Ge,o=zt;Ge=null,Nn(e,t,n),Ge=i,zt=o,Ge!==null&&(zt?(e=Ge,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ge.removeChild(n.stateNode));break;case 18:Ge!==null&&(zt?(e=Ge,n=n.stateNode,e.nodeType===8?No(e.parentNode,n):e.nodeType===1&&No(e,n),Si(e)):No(Ge,n.stateNode));break;case 4:i=Ge,o=zt,Ge=n.stateNode.containerInfo,zt=!0,Nn(e,t,n),Ge=i,zt=o;break;case 0:case 11:case 14:case 15:if(!et&&(i=n.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){o=i=i.next;do{var a=o,f=a.destroy;a=a.tag,f!==void 0&&((a&2)!==0||(a&4)!==0)&&fa(n,t,f),o=o.next}while(o!==i)}Nn(e,t,n);break;case 1:if(!et&&(Br(n,t),i=n.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=n.memoizedProps,i.state=n.memoizedState,i.componentWillUnmount()}catch(m){Le(n,t,m)}Nn(e,t,n);break;case 21:Nn(e,t,n);break;case 22:n.mode&1?(et=(i=et)||n.memoizedState!==null,Nn(e,t,n),et=i):Nn(e,t,n);break;default:Nn(e,t,n)}}function nf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Nm),t.forEach(function(i){var o=Am.bind(null,e,i);n.has(i)||(n.add(i),i.then(o,o))})}}function Mt(e,t){var n=t.deletions;if(n!==null)for(var i=0;io&&(o=f),i&=~a}if(i=o,i=Oe()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Lm(i/1960))-i,10e?16:e,Tn===null)var i=!1;else{if(e=Tn,Tn=null,cs=0,(de&6)!==0)throw Error(s(331));var o=de;for(de|=4,K=e.current;K!==null;){var a=K,f=a.child;if((K.flags&16)!==0){var m=a.deletions;if(m!==null){for(var x=0;xOe()-ga?sr(e,0):ya|=n),dt(e,t)}function vf(e,t){t===0&&((e.mode&1)===0?t=1:(t=Sl,Sl<<=1,(Sl&130023424)===0&&(Sl=4194304)));var n=rt();e=nn(e,t),e!==null&&(mi(e,t,n),dt(e,n))}function Mm(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),vf(e,n)}function Am(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(s(314))}i!==null&&i.delete(t),vf(e,n)}var yf;yf=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ot.current)ut=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return ut=!1,jm(e,t,n);ut=(e.flags&131072)!==0}else ut=!1,Pe&&(t.flags&1048576)!==0&&Gc(t,Ql,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;rs(e,t),e=t.pendingProps;var o=Dr(t,Xe.current);Ar(t,n),o=Go(null,t,i,e,o,n);var a=Yo();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,at(i)?(a=!0,Ul(t)):a=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Qo(t),o.updater=ts,t.stateNode=o,o._reactInternals=t,na(t,i,e,n),t=sa(null,t,i,!0,a,n)):(t.tag=0,Pe&&a&&Do(t),nt(null,t,o,n),t=t.child),t;case 16:i=t.elementType;e:{switch(rs(e,t),e=t.pendingProps,o=i._init,i=o(i._payload),t.type=i,o=t.tag=$m(i),e=Ft(i,e),o){case 0:t=la(null,t,i,e,n);break e;case 1:t=Qd(null,t,i,e,n);break e;case 11:t=Md(null,t,i,e,n);break e;case 14:t=Ad(null,t,i,Ft(i.type,e),n);break e}throw Error(s(306,i,""))}return t;case 0:return i=t.type,o=t.pendingProps,o=t.elementType===i?o:Ft(i,o),la(e,t,i,o,n);case 1:return i=t.type,o=t.pendingProps,o=t.elementType===i?o:Ft(i,o),Qd(e,t,i,o,n);case 3:e:{if(Hd(t),e===null)throw Error(s(387));i=t.pendingProps,a=t.memoizedState,o=a.element,id(e,t),ql(t,i,null,n);var f=t.memoizedState;if(i=f.element,a.isDehydrated)if(a={element:i,isDehydrated:!1,cache:f.cache,pendingSuspenseBoundaries:f.pendingSuspenseBoundaries,transitions:f.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){o=$r(Error(s(423)),t),t=Wd(e,t,i,n,o);break e}else if(i!==o){o=$r(Error(s(424)),t),t=Wd(e,t,i,n,o);break e}else for(gt=En(t.stateNode.containerInfo.firstChild),yt=t,Pe=!0,It=null,n=nd(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Fr(),i===o){t=ln(e,t,n);break e}nt(e,t,i,n)}t=t.child}return t;case 5:return od(t),e===null&&Fo(t),i=t.type,o=t.pendingProps,a=e!==null?e.memoizedProps:null,f=o.children,Po(i,o)?f=null:a!==null&&Po(i,a)&&(t.flags|=32),Bd(e,t),nt(e,t,f,n),t.child;case 6:return e===null&&Fo(t),null;case 13:return Vd(e,t,n);case 4:return Ho(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=zr(t,null,i,n):nt(e,t,i,n),t.child;case 11:return i=t.type,o=t.pendingProps,o=t.elementType===i?o:Ft(i,o),Md(e,t,i,o,n);case 7:return nt(e,t,t.pendingProps,n),t.child;case 8:return nt(e,t,t.pendingProps.children,n),t.child;case 12:return nt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(i=t.type._context,o=t.pendingProps,a=t.memoizedProps,f=o.value,we(Vl,i._currentValue),i._currentValue=f,a!==null)if(Ot(a.value,f)){if(a.children===o.children&&!ot.current){t=ln(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var m=a.dependencies;if(m!==null){f=a.child;for(var x=m.firstContext;x!==null;){if(x.context===i){if(a.tag===1){x=rn(-1,n&-n),x.tag=2;var N=a.updateQueue;if(N!==null){N=N.shared;var M=N.pending;M===null?x.next=x:(x.next=M.next,M.next=x),N.pending=x}}a.lanes|=n,x=a.alternate,x!==null&&(x.lanes|=n),$o(a.return,n,t),m.lanes|=n;break}x=x.next}}else if(a.tag===10)f=a.type===t.type?null:a.child;else if(a.tag===18){if(f=a.return,f===null)throw Error(s(341));f.lanes|=n,m=f.alternate,m!==null&&(m.lanes|=n),$o(f,n,t),f=a.sibling}else f=a.child;if(f!==null)f.return=a;else for(f=a;f!==null;){if(f===t){f=null;break}if(a=f.sibling,a!==null){a.return=f.return,f=a;break}f=f.return}a=f}nt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,i=t.pendingProps.children,Ar(t,n),o=Pt(o),i=i(o),t.flags|=1,nt(e,t,i,n),t.child;case 14:return i=t.type,o=Ft(i,t.pendingProps),o=Ft(i.type,o),Ad(e,t,i,o,n);case 15:return Ud(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,o=t.pendingProps,o=t.elementType===i?o:Ft(i,o),rs(e,t),t.tag=1,at(i)?(e=!0,Ul(t)):e=!1,Ar(t,n),Td(t,i,o),na(t,i,o,n),sa(null,t,i,!0,e,n);case 19:return Kd(e,t,n);case 22:return $d(e,t,n)}throw Error(s(156,t.tag))};function gf(e,t){return Yu(e,t)}function Um(e,t,n,i){this.tag=e,this.key=n,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=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _t(e,t,n,i){return new Um(e,t,n,i)}function Pa(e){return e=e.prototype,!(!e||!e.isReactComponent)}function $m(e){if(typeof e=="function")return Pa(e)?1:0;if(e!=null){if(e=e.$$typeof,e===qe)return 11;if(e===ke)return 14}return 2}function On(e,t){var n=e.alternate;return n===null?(n=_t(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ps(e,t,n,i,o,a){var f=2;if(i=e,typeof e=="function")Pa(e)&&(f=1);else if(typeof e=="string")f=5;else e:switch(e){case fe:return ar(n.children,o,a,t);case re:f=8,o|=8;break;case ce:return e=_t(12,n,t,o|2),e.elementType=ce,e.lanes=a,e;case Me:return e=_t(13,n,t,o),e.elementType=Me,e.lanes=a,e;case Ae:return e=_t(19,n,t,o),e.elementType=Ae,e.lanes=a,e;case Te:return ms(n,o,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ye:f=10;break e;case Qe:f=9;break e;case qe:f=11;break e;case ke:f=14;break e;case st:f=16,i=null;break e}throw Error(s(130,e==null?e:typeof e,""))}return t=_t(f,n,t,o),t.elementType=e,t.type=i,t.lanes=a,t}function ar(e,t,n,i){return e=_t(7,e,i,t),e.lanes=n,e}function ms(e,t,n,i){return e=_t(22,e,i,t),e.elementType=Te,e.lanes=n,e.stateNode={isHidden:!1},e}function Ra(e,t,n){return e=_t(6,e,null,t),e.lanes=n,e}function Na(e,t,n){return t=_t(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Bm(e,t,n,i,o){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=eo(0),this.expirationTimes=eo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=eo(0),this.identifierPrefix=i,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function _a(e,t,n,i,o,a,f,m,x){return e=new Bm(e,t,n,m,x),t===1?(t=1,a===!0&&(t|=8)):t=0,a=_t(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:i,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Qo(a),e}function Qm(e,t,n){var i=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(l){console.error(l)}}return r(),za.exports=Zm(),za.exports}var Of;function tv(){if(Of)return Cs;Of=1;var r=ev();return Cs.createRoot=r.createRoot,Cs.hydrateRoot=r.hydrateRoot,Cs}var nv=tv();const rv=ph(nv);var ii=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(r){return this.listeners.add(r),this.onSubscribe(),()=>{this.listeners.delete(r),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},cr,zn,Vr,rh,iv=(rh=class extends ii{constructor(){super();J(this,cr);J(this,zn);J(this,Vr);H(this,Vr,l=>{if(typeof window<"u"&&window.addEventListener){const s=()=>l();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){y(this,zn)||this.setEventListener(y(this,Vr))}onUnsubscribe(){var l;this.hasListeners()||((l=y(this,zn))==null||l.call(this),H(this,zn,void 0))}setEventListener(l){var s;H(this,Vr,l),(s=y(this,zn))==null||s.call(this),H(this,zn,l(u=>{typeof u=="boolean"?this.setFocused(u):this.onFocus()}))}setFocused(l){y(this,cr)!==l&&(H(this,cr,l),this.onFocus())}onFocus(){const l=this.isFocused();this.listeners.forEach(s=>{s(l)})}isFocused(){var l;return typeof y(this,cr)=="boolean"?y(this,cr):((l=globalThis.document)==null?void 0:l.visibilityState)!=="hidden"}},cr=new WeakMap,zn=new WeakMap,Vr=new WeakMap,rh),du=new iv,lv={setTimeout:(r,l)=>setTimeout(r,l),clearTimeout:r=>clearTimeout(r),setInterval:(r,l)=>setInterval(r,l),clearInterval:r=>clearInterval(r)},Mn,uu,ih,sv=(ih=class{constructor(){J(this,Mn,lv);J(this,uu,!1)}setTimeoutProvider(r){H(this,Mn,r)}setTimeout(r,l){return y(this,Mn).setTimeout(r,l)}clearTimeout(r){y(this,Mn).clearTimeout(r)}setInterval(r,l){return y(this,Mn).setInterval(r,l)}clearInterval(r){y(this,Mn).clearInterval(r)}},Mn=new WeakMap,uu=new WeakMap,ih),ur=new sv;function ov(r){setTimeout(r,0)}var av=typeof window>"u"||"Deno"in globalThis;function lt(){}function uv(r,l){return typeof r=="function"?r(l):r}function Va(r){return typeof r=="number"&&r>=0&&r!==1/0}function mh(r,l){return Math.max(r+(l||0)-Date.now(),0)}function Kn(r,l){return typeof r=="function"?r(l):r}function wt(r,l){return typeof r=="function"?r(l):r}function If(r,l){const{type:s="all",exact:u,fetchStatus:c,predicate:h,queryKey:p,stale:v}=r;if(p){if(u){if(l.queryHash!==fu(p,l.options))return!1}else if(!Zi(l.queryKey,p))return!1}if(s!=="all"){const S=l.isActive();if(s==="active"&&!S||s==="inactive"&&S)return!1}return!(typeof v=="boolean"&&l.isStale()!==v||c&&c!==l.state.fetchStatus||h&&!h(l))}function Ff(r,l){const{exact:s,status:u,predicate:c,mutationKey:h}=r;if(h){if(!l.options.mutationKey)return!1;if(s){if(xr(l.options.mutationKey)!==xr(h))return!1}else if(!Zi(l.options.mutationKey,h))return!1}return!(u&&l.state.status!==u||c&&!c(l))}function fu(r,l){return((l==null?void 0:l.queryKeyHashFn)||xr)(r)}function xr(r){return JSON.stringify(r,(l,s)=>ba(s)?Object.keys(s).sort().reduce((u,c)=>(u[c]=s[c],u),{}):s)}function Zi(r,l){return r===l?!0:typeof r!=typeof l?!1:r&&l&&typeof r=="object"&&typeof l=="object"?Object.keys(l).every(s=>Zi(r[s],l[s])):!1}var cv=Object.prototype.hasOwnProperty;function vh(r,l,s=0){if(r===l)return r;if(s>500)return l;const u=zf(r)&&zf(l);if(!u&&!(ba(r)&&ba(l)))return l;const h=(u?r:Object.keys(r)).length,p=u?l:Object.keys(l),v=p.length,S=u?new Array(v):{};let g=0;for(let k=0;k{ur.setTimeout(l,r)})}function Ka(r,l,s){return typeof s.structuralSharing=="function"?s.structuralSharing(r,l):s.structuralSharing!==!1?vh(r,l):l}function fv(r,l,s=0){const u=[...r,l];return s&&u.length>s?u.slice(1):u}function hv(r,l,s=0){const u=[l,...r];return s&&u.length>s?u.slice(0,-1):u}var hu=Symbol();function yh(r,l){return!r.queryFn&&(l!=null&&l.initialPromise)?()=>l.initialPromise:!r.queryFn||r.queryFn===hu?()=>Promise.reject(new Error(`Missing queryFn: '${r.queryHash}'`)):r.queryFn}function pu(r,l){return typeof r=="function"?r(...l):!!r}function pv(r,l,s){let u=!1,c;return Object.defineProperty(r,"signal",{enumerable:!0,get:()=>(c??(c=l()),u||(u=!0,c.aborted?s():c.addEventListener("abort",s,{once:!0})),c)}),r}var el=(()=>{let r=()=>av;return{isServer(){return r()},setIsServer(l){r=l}}})();function qa(){let r,l;const s=new Promise((c,h)=>{r=c,l=h});s.status="pending",s.catch(()=>{});function u(c){Object.assign(s,c),delete s.resolve,delete s.reject}return s.resolve=c=>{u({status:"fulfilled",value:c}),r(c)},s.reject=c=>{u({status:"rejected",reason:c}),l(c)},s}var mv=ov;function vv(){let r=[],l=0,s=v=>{v()},u=v=>{v()},c=mv;const h=v=>{l?r.push(v):c(()=>{s(v)})},p=()=>{const v=r;r=[],v.length&&c(()=>{u(()=>{v.forEach(S=>{s(S)})})})};return{batch:v=>{let S;l++;try{S=v()}finally{l--,l||p()}return S},batchCalls:v=>(...S)=>{h(()=>{v(...S)})},schedule:h,setNotifyFunction:v=>{s=v},setBatchNotifyFunction:v=>{u=v},setScheduler:v=>{c=v}}}var Be=vv(),br,An,Kr,lh,yv=(lh=class extends ii{constructor(){super();J(this,br,!0);J(this,An);J(this,Kr);H(this,Kr,l=>{if(typeof window<"u"&&window.addEventListener){const s=()=>l(!0),u=()=>l(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",u,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",u)}}})}onSubscribe(){y(this,An)||this.setEventListener(y(this,Kr))}onUnsubscribe(){var l;this.hasListeners()||((l=y(this,An))==null||l.call(this),H(this,An,void 0))}setEventListener(l){var s;H(this,Kr,l),(s=y(this,An))==null||s.call(this),H(this,An,l(this.setOnline.bind(this)))}setOnline(l){y(this,br)!==l&&(H(this,br,l),this.listeners.forEach(u=>{u(l)}))}isOnline(){return y(this,br)}},br=new WeakMap,An=new WeakMap,Kr=new WeakMap,lh),Ls=new yv;function gv(r){return Math.min(1e3*2**r,3e4)}function gh(r){return(r??"online")==="online"?Ls.isOnline():!0}var Ga=class extends Error{constructor(r){super("CancelledError"),this.revert=r==null?void 0:r.revert,this.silent=r==null?void 0:r.silent}};function xh(r){let l=!1,s=0,u;const c=qa(),h=()=>c.status!=="pending",p=D=>{var T;if(!h()){const _=new Ga(D);L(_),(T=r.onCancel)==null||T.call(r,_)}},v=()=>{l=!0},S=()=>{l=!1},g=()=>du.isFocused()&&(r.networkMode==="always"||Ls.isOnline())&&r.canRun(),k=()=>gh(r.networkMode)&&r.canRun(),E=D=>{h()||(u==null||u(),c.resolve(D))},L=D=>{h()||(u==null||u(),c.reject(D))},O=()=>new Promise(D=>{var T;u=_=>{(h()||g())&&D(_)},(T=r.onPause)==null||T.call(r)}).then(()=>{var D;u=void 0,h()||(D=r.onContinue)==null||D.call(r)}),F=()=>{if(h())return;let D;const T=s===0?r.initialPromise:void 0;try{D=T??r.fn()}catch(_){D=Promise.reject(_)}Promise.resolve(D).then(E).catch(_=>{var ie;if(h())return;const V=r.retry??(el.isServer()?0:3),Q=r.retryDelay??gv,U=typeof Q=="function"?Q(s,_):Q,B=V===!0||typeof V=="number"&&sg()?void 0:O()).then(()=>{l?L(_):F()})})};return{promise:c,status:()=>c.status,cancel:p,continue:()=>(u==null||u(),c),cancelRetry:v,continueRetry:S,canStart:k,start:()=>(k()?F():O().then(F),c)}}var dr,sh,Sh=(sh=class{constructor(){J(this,dr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Va(this.gcTime)&&H(this,dr,ur.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(r){this.gcTime=Math.max(this.gcTime||0,r??(el.isServer()?1/0:300*1e3))}clearGcTimeout(){y(this,dr)!==void 0&&(ur.clearTimeout(y(this,dr)),H(this,dr,void 0))}},dr=new WeakMap,sh);function xv(r){return{onFetch:(l,s)=>{var k,E,L,O,F;const u=l.options,c=(L=(E=(k=l.fetchOptions)==null?void 0:k.meta)==null?void 0:E.fetchMore)==null?void 0:L.direction,h=((O=l.state.data)==null?void 0:O.pages)||[],p=((F=l.state.data)==null?void 0:F.pageParams)||[];let v={pages:[],pageParams:[]},S=0;const g=async()=>{let D=!1;const T=Q=>{pv(Q,()=>l.signal,()=>D=!0)},_=yh(l.options,l.fetchOptions),V=async(Q,U,B)=>{if(D)return Promise.reject(l.signal.reason);if(U==null&&Q.pages.length)return Promise.resolve(Q);const fe=(()=>{const Qe={client:l.client,queryKey:l.queryKey,pageParam:U,direction:B?"backward":"forward",meta:l.options.meta};return T(Qe),Qe})(),re=await _(fe),{maxPages:ce}=l.options,ye=B?hv:fv;return{pages:ye(Q.pages,re,ce),pageParams:ye(Q.pageParams,U,ce)}};if(c&&h.length){const Q=c==="backward",U=Q?Sv:Af,B={pages:h,pageParams:p},ie=U(u,B);v=await V(B,ie,Q)}else{const Q=r??h.length;do{const U=S===0?p[0]??u.initialPageParam:Af(u,v);if(S>0&&U==null)break;v=await V(v,U),S++}while(S{var D,T;return(T=(D=l.options).persister)==null?void 0:T.call(D,g,{client:l.client,queryKey:l.queryKey,meta:l.options.meta,signal:l.signal},s)}:l.fetchFn=g}}}function Af(r,{pages:l,pageParams:s}){const u=l.length-1;return l.length>0?r.getNextPageParam(l[u],l,s[u],s):void 0}function Sv(r,{pages:l,pageParams:s}){var u;return l.length>0?(u=r.getPreviousPageParam)==null?void 0:u.call(r,l[0],l,s[0],s):void 0}var qr,fr,Gr,Tt,hr,be,nl,pr,St,wh,on,oh,wv=(oh=class extends Sh{constructor(l){super();J(this,St);J(this,qr);J(this,fr);J(this,Gr);J(this,Tt);J(this,hr);J(this,be);J(this,nl);J(this,pr);H(this,pr,!1),H(this,nl,l.defaultOptions),this.setOptions(l.options),this.observers=[],H(this,hr,l.client),H(this,Tt,y(this,hr).getQueryCache()),this.queryKey=l.queryKey,this.queryHash=l.queryHash,H(this,fr,$f(this.options)),this.state=l.state??y(this,fr),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return y(this,qr)}get promise(){var l;return(l=y(this,be))==null?void 0:l.promise}setOptions(l){if(this.options={...y(this,nl),...l},l!=null&&l._type&&H(this,qr,l._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=$f(this.options);s.data!==void 0&&(this.setState(Uf(s.data,s.dataUpdatedAt)),H(this,fr,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&y(this,Tt).remove(this)}setData(l,s){const u=Ka(this.state.data,l,this.options);return le(this,St,on).call(this,{data:u,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),u}setState(l){le(this,St,on).call(this,{type:"setState",state:l})}cancel(l){var u,c;const s=(u=y(this,be))==null?void 0:u.promise;return(c=y(this,be))==null||c.cancel(l),s?s.then(lt).catch(lt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return y(this,fr)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(l=>wt(l.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===hu||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(l=>Kn(l.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(l=>l.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(l=0){return this.state.data===void 0?!0:l==="static"?!1:this.state.isInvalidated?!0:!mh(this.state.dataUpdatedAt,l)}onFocus(){var s;const l=this.observers.find(u=>u.shouldFetchOnWindowFocus());l==null||l.refetch({cancelRefetch:!1}),(s=y(this,be))==null||s.continue()}onOnline(){var s;const l=this.observers.find(u=>u.shouldFetchOnReconnect());l==null||l.refetch({cancelRefetch:!1}),(s=y(this,be))==null||s.continue()}addObserver(l){this.observers.includes(l)||(this.observers.push(l),this.clearGcTimeout(),y(this,Tt).notify({type:"observerAdded",query:this,observer:l}))}removeObserver(l){this.observers.includes(l)&&(this.observers=this.observers.filter(s=>s!==l),this.observers.length||(y(this,be)&&(y(this,pr)||le(this,St,wh).call(this)?y(this,be).cancel({revert:!0}):y(this,be).cancelRetry()),this.scheduleGc()),y(this,Tt).notify({type:"observerRemoved",query:this,observer:l}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||le(this,St,on).call(this,{type:"invalidate"})}async fetch(l,s){var g,k,E,L,O,F,D,T,_,V,Q;if(this.state.fetchStatus!=="idle"&&((g=y(this,be))==null?void 0:g.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(y(this,be))return y(this,be).continueRetry(),y(this,be).promise}if(l&&this.setOptions(l),!this.options.queryFn){const U=this.observers.find(B=>B.options.queryFn);U&&this.setOptions(U.options)}const u=new AbortController,c=U=>{Object.defineProperty(U,"signal",{enumerable:!0,get:()=>(H(this,pr,!0),u.signal)})},h=()=>{const U=yh(this.options,s),ie=(()=>{const fe={client:y(this,hr),queryKey:this.queryKey,meta:this.meta};return c(fe),fe})();return H(this,pr,!1),this.options.persister?this.options.persister(U,ie,this):U(ie)},v=(()=>{const U={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:y(this,hr),state:this.state,fetchFn:h};return c(U),U})(),S=y(this,qr)==="infinite"?xv(this.options.pages):this.options.behavior;S==null||S.onFetch(v,this),H(this,Gr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((k=v.fetchOptions)==null?void 0:k.meta))&&le(this,St,on).call(this,{type:"fetch",meta:(E=v.fetchOptions)==null?void 0:E.meta}),H(this,be,xh({initialPromise:s==null?void 0:s.initialPromise,fn:v.fetchFn,onCancel:U=>{U instanceof Ga&&U.revert&&this.setState({...y(this,Gr),fetchStatus:"idle"}),u.abort()},onFail:(U,B)=>{le(this,St,on).call(this,{type:"failed",failureCount:U,error:B})},onPause:()=>{le(this,St,on).call(this,{type:"pause"})},onContinue:()=>{le(this,St,on).call(this,{type:"continue"})},retry:v.options.retry,retryDelay:v.options.retryDelay,networkMode:v.options.networkMode,canRun:()=>!0}));try{const U=await y(this,be).start();if(U===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(U),(O=(L=y(this,Tt).config).onSuccess)==null||O.call(L,U,this),(D=(F=y(this,Tt).config).onSettled)==null||D.call(F,U,this.state.error,this),U}catch(U){if(U instanceof Ga){if(U.silent)return y(this,be).promise;if(U.revert){if(this.state.data===void 0)throw U;return this.state.data}}throw le(this,St,on).call(this,{type:"error",error:U}),(_=(T=y(this,Tt).config).onError)==null||_.call(T,U,this),(Q=(V=y(this,Tt).config).onSettled)==null||Q.call(V,this.state.data,U,this),U}finally{this.scheduleGc()}}},qr=new WeakMap,fr=new WeakMap,Gr=new WeakMap,Tt=new WeakMap,hr=new WeakMap,be=new WeakMap,nl=new WeakMap,pr=new WeakMap,St=new WeakSet,wh=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},on=function(l){const s=u=>{switch(l.type){case"failed":return{...u,fetchFailureCount:l.failureCount,fetchFailureReason:l.error};case"pause":return{...u,fetchStatus:"paused"};case"continue":return{...u,fetchStatus:"fetching"};case"fetch":return{...u,...Eh(u.data,this.options),fetchMeta:l.meta??null};case"success":const c={...u,...Uf(l.data,l.dataUpdatedAt),dataUpdateCount:u.dataUpdateCount+1,...!l.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return H(this,Gr,l.manual?c:void 0),c;case"error":const h=l.error;return{...u,error:h,errorUpdateCount:u.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:u.fetchFailureCount+1,fetchFailureReason:h,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...u,isInvalidated:!0};case"setState":return{...u,...l.state}}};this.state=s(this.state),Be.batch(()=>{this.observers.forEach(u=>{u.onQueryUpdate()}),y(this,Tt).notify({query:this,type:"updated",action:l})})},oh);function Eh(r,l){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:gh(l.networkMode)?"fetching":"paused",...r===void 0&&{error:null,status:"pending"}}}function Uf(r,l){return{data:r,dataUpdatedAt:l??Date.now(),error:null,isInvalidated:!1,status:"success"}}function $f(r){const l=typeof r.initialData=="function"?r.initialData():r.initialData,s=l!==void 0,u=s?typeof r.initialDataUpdatedAt=="function"?r.initialDataUpdatedAt():r.initialDataUpdatedAt:0;return{data:l,dataUpdateCount:0,dataUpdatedAt:s?u??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var ht,ue,rl,it,mr,Yr,un,Un,il,Xr,Jr,vr,yr,$n,Zr,ve,Xi,Ya,Xa,Ja,Za,eu,tu,nu,Ch,ah,Ev=(ah=class extends ii{constructor(l,s){super();J(this,ve);J(this,ht);J(this,ue);J(this,rl);J(this,it);J(this,mr);J(this,Yr);J(this,un);J(this,Un);J(this,il);J(this,Xr);J(this,Jr);J(this,vr);J(this,yr);J(this,$n);J(this,Zr,new Set);this.options=s,H(this,ht,l),H(this,Un,null),H(this,un,qa()),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(y(this,ue).addObserver(this),Bf(y(this,ue),this.options)?le(this,ve,Xi).call(this):this.updateResult(),le(this,ve,Za).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ru(y(this,ue),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ru(y(this,ue),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,le(this,ve,eu).call(this),le(this,ve,tu).call(this),y(this,ue).removeObserver(this)}setOptions(l){const s=this.options,u=y(this,ue);if(this.options=y(this,ht).defaultQueryOptions(l),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof wt(this.options.enabled,y(this,ue))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");le(this,ve,nu).call(this),y(this,ue).setOptions(this.options),s._defaulted&&!Ts(this.options,s)&&y(this,ht).getQueryCache().notify({type:"observerOptionsUpdated",query:y(this,ue),observer:this});const c=this.hasListeners();c&&Qf(y(this,ue),u,this.options,s)&&le(this,ve,Xi).call(this),this.updateResult(),c&&(y(this,ue)!==u||wt(this.options.enabled,y(this,ue))!==wt(s.enabled,y(this,ue))||Kn(this.options.staleTime,y(this,ue))!==Kn(s.staleTime,y(this,ue)))&&le(this,ve,Ya).call(this);const h=le(this,ve,Xa).call(this);c&&(y(this,ue)!==u||wt(this.options.enabled,y(this,ue))!==wt(s.enabled,y(this,ue))||h!==y(this,$n))&&le(this,ve,Ja).call(this,h)}getOptimisticResult(l){const s=y(this,ht).getQueryCache().build(y(this,ht),l),u=this.createResult(s,l);return kv(this,u)&&(H(this,it,u),H(this,Yr,this.options),H(this,mr,y(this,ue).state)),u}getCurrentResult(){return y(this,it)}trackResult(l,s){return new Proxy(l,{get:(u,c)=>(this.trackProp(c),s==null||s(c),c==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&y(this,un).status==="pending"&&y(this,un).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(u,c))})}trackProp(l){y(this,Zr).add(l)}getCurrentQuery(){return y(this,ue)}refetch({...l}={}){return this.fetch({...l})}fetchOptimistic(l){const s=y(this,ht).defaultQueryOptions(l),u=y(this,ht).getQueryCache().build(y(this,ht),s);return u.fetch().then(()=>this.createResult(u,s))}fetch(l){return le(this,ve,Xi).call(this,{...l,cancelRefetch:l.cancelRefetch??!0}).then(()=>(this.updateResult(),y(this,it)))}createResult(l,s){var ce;const u=y(this,ue),c=this.options,h=y(this,it),p=y(this,mr),v=y(this,Yr),g=l!==u?l.state:y(this,rl),{state:k}=l;let E={...k},L=!1,O;if(s._optimisticResults){const ye=this.hasListeners(),Qe=!ye&&Bf(l,s),qe=ye&&Qf(l,u,s,c);(Qe||qe)&&(E={...E,...Eh(k.data,l.options)}),s._optimisticResults==="isRestoring"&&(E.fetchStatus="idle")}let{error:F,errorUpdatedAt:D,status:T}=E;O=E.data;let _=!1;if(s.placeholderData!==void 0&&O===void 0&&T==="pending"){let ye;h!=null&&h.isPlaceholderData&&s.placeholderData===(v==null?void 0:v.placeholderData)?(ye=h.data,_=!0):ye=typeof s.placeholderData=="function"?s.placeholderData((ce=y(this,Jr))==null?void 0:ce.state.data,y(this,Jr)):s.placeholderData,ye!==void 0&&(T="success",O=Ka(h==null?void 0:h.data,ye,s),L=!0)}if(s.select&&O!==void 0&&!_)if(h&&O===(p==null?void 0:p.data)&&s.select===y(this,il))O=y(this,Xr);else try{H(this,il,s.select),O=s.select(O),O=Ka(h==null?void 0:h.data,O,s),H(this,Xr,O),H(this,Un,null)}catch(ye){H(this,Un,ye)}y(this,Un)&&(F=y(this,Un),O=y(this,Xr),D=Date.now(),T="error");const V=E.fetchStatus==="fetching",Q=T==="pending",U=T==="error",B=Q&&V,ie=O!==void 0,re={status:T,fetchStatus:E.fetchStatus,isPending:Q,isSuccess:T==="success",isError:U,isInitialLoading:B,isLoading:B,data:O,dataUpdatedAt:E.dataUpdatedAt,error:F,errorUpdatedAt:D,failureCount:E.fetchFailureCount,failureReason:E.fetchFailureReason,errorUpdateCount:E.errorUpdateCount,isFetched:l.isFetched(),isFetchedAfterMount:E.dataUpdateCount>g.dataUpdateCount||E.errorUpdateCount>g.errorUpdateCount,isFetching:V,isRefetching:V&&!Q,isLoadingError:U&&!ie,isPaused:E.fetchStatus==="paused",isPlaceholderData:L,isRefetchError:U&&ie,isStale:mu(l,s),refetch:this.refetch,promise:y(this,un),isEnabled:wt(s.enabled,l)!==!1};if(this.options.experimental_prefetchInRender){const ye=re.data!==void 0,Qe=re.status==="error"&&!ye,qe=ke=>{Qe?ke.reject(re.error):ye&&ke.resolve(re.data)},Me=()=>{const ke=H(this,un,re.promise=qa());qe(ke)},Ae=y(this,un);switch(Ae.status){case"pending":l.queryHash===u.queryHash&&qe(Ae);break;case"fulfilled":(Qe||re.data!==Ae.value)&&Me();break;case"rejected":(!Qe||re.error!==Ae.reason)&&Me();break}}return re}updateResult(){const l=y(this,it),s=this.createResult(y(this,ue),this.options);if(H(this,mr,y(this,ue).state),H(this,Yr,this.options),y(this,mr).data!==void 0&&H(this,Jr,y(this,ue)),Ts(s,l))return;H(this,it,s);const u=()=>{if(!l)return!0;const{notifyOnChangeProps:c}=this.options,h=typeof c=="function"?c():c;if(h==="all"||!h&&!y(this,Zr).size)return!0;const p=new Set(h??y(this,Zr));return this.options.throwOnError&&p.add("error"),Object.keys(y(this,it)).some(v=>{const S=v;return y(this,it)[S]!==l[S]&&p.has(S)})};le(this,ve,Ch).call(this,{listeners:u()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&le(this,ve,Za).call(this)}},ht=new WeakMap,ue=new WeakMap,rl=new WeakMap,it=new WeakMap,mr=new WeakMap,Yr=new WeakMap,un=new WeakMap,Un=new WeakMap,il=new WeakMap,Xr=new WeakMap,Jr=new WeakMap,vr=new WeakMap,yr=new WeakMap,$n=new WeakMap,Zr=new WeakMap,ve=new WeakSet,Xi=function(l){le(this,ve,nu).call(this);let s=y(this,ue).fetch(this.options,l);return l!=null&&l.throwOnError||(s=s.catch(lt)),s},Ya=function(){le(this,ve,eu).call(this);const l=Kn(this.options.staleTime,y(this,ue));if(el.isServer()||y(this,it).isStale||!Va(l))return;const u=mh(y(this,it).dataUpdatedAt,l)+1;H(this,vr,ur.setTimeout(()=>{y(this,it).isStale||this.updateResult()},u))},Xa=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(y(this,ue)):this.options.refetchInterval)??!1},Ja=function(l){le(this,ve,tu).call(this),H(this,$n,l),!(el.isServer()||wt(this.options.enabled,y(this,ue))===!1||!Va(y(this,$n))||y(this,$n)===0)&&H(this,yr,ur.setInterval(()=>{(this.options.refetchIntervalInBackground||du.isFocused())&&le(this,ve,Xi).call(this)},y(this,$n)))},Za=function(){le(this,ve,Ya).call(this),le(this,ve,Ja).call(this,le(this,ve,Xa).call(this))},eu=function(){y(this,vr)!==void 0&&(ur.clearTimeout(y(this,vr)),H(this,vr,void 0))},tu=function(){y(this,yr)!==void 0&&(ur.clearInterval(y(this,yr)),H(this,yr,void 0))},nu=function(){const l=y(this,ht).getQueryCache().build(y(this,ht),this.options);if(l===y(this,ue))return;const s=y(this,ue);H(this,ue,l),H(this,rl,l.state),this.hasListeners()&&(s==null||s.removeObserver(this),l.addObserver(this))},Ch=function(l){Be.batch(()=>{l.listeners&&this.listeners.forEach(s=>{s(y(this,it))}),y(this,ht).getQueryCache().notify({query:y(this,ue),type:"observerResultsUpdated"})})},ah);function Cv(r,l){return wt(l.enabled,r)!==!1&&r.state.data===void 0&&!(r.state.status==="error"&&wt(l.retryOnMount,r)===!1)}function Bf(r,l){return Cv(r,l)||r.state.data!==void 0&&ru(r,l,l.refetchOnMount)}function ru(r,l,s){if(wt(l.enabled,r)!==!1&&Kn(l.staleTime,r)!=="static"){const u=typeof s=="function"?s(r):s;return u==="always"||u!==!1&&mu(r,l)}return!1}function Qf(r,l,s,u){return(r!==l||wt(u.enabled,r)===!1)&&(!s.suspense||r.state.status!=="error")&&mu(r,s)}function mu(r,l){return wt(l.enabled,r)!==!1&&r.isStaleByTime(Kn(l.staleTime,r))}function kv(r,l){return!Ts(r.getCurrentResult(),l)}var ll,Gt,tt,gr,Yt,Fn,uh,jv=(uh=class extends Sh{constructor(l){super();J(this,Yt);J(this,ll);J(this,Gt);J(this,tt);J(this,gr);H(this,ll,l.client),this.mutationId=l.mutationId,H(this,tt,l.mutationCache),H(this,Gt,[]),this.state=l.state||kh(),this.setOptions(l.options),this.scheduleGc()}setOptions(l){this.options=l,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(l){y(this,Gt).includes(l)||(y(this,Gt).push(l),this.clearGcTimeout(),y(this,tt).notify({type:"observerAdded",mutation:this,observer:l}))}removeObserver(l){H(this,Gt,y(this,Gt).filter(s=>s!==l)),this.scheduleGc(),y(this,tt).notify({type:"observerRemoved",mutation:this,observer:l})}optionalRemove(){y(this,Gt).length||(this.state.status==="pending"?this.scheduleGc():y(this,tt).remove(this))}continue(){var l;return((l=y(this,gr))==null?void 0:l.continue())??this.execute(this.state.variables)}async execute(l){var p,v,S,g,k,E,L,O,F,D,T,_,V,Q,U,B,ie,fe;const s=()=>{le(this,Yt,Fn).call(this,{type:"continue"})},u={client:y(this,ll),meta:this.options.meta,mutationKey:this.options.mutationKey};H(this,gr,xh({fn:()=>this.options.mutationFn?this.options.mutationFn(l,u):Promise.reject(new Error("No mutationFn found")),onFail:(re,ce)=>{le(this,Yt,Fn).call(this,{type:"failed",failureCount:re,error:ce})},onPause:()=>{le(this,Yt,Fn).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>y(this,tt).canRun(this)}));const c=this.state.status==="pending",h=!y(this,gr).canStart();try{if(c)s();else{le(this,Yt,Fn).call(this,{type:"pending",variables:l,isPaused:h}),y(this,tt).config.onMutate&&await y(this,tt).config.onMutate(l,this,u);const ce=await((v=(p=this.options).onMutate)==null?void 0:v.call(p,l,u));ce!==this.state.context&&le(this,Yt,Fn).call(this,{type:"pending",context:ce,variables:l,isPaused:h})}const re=await y(this,gr).start();return await((g=(S=y(this,tt).config).onSuccess)==null?void 0:g.call(S,re,l,this.state.context,this,u)),await((E=(k=this.options).onSuccess)==null?void 0:E.call(k,re,l,this.state.context,u)),await((O=(L=y(this,tt).config).onSettled)==null?void 0:O.call(L,re,null,this.state.variables,this.state.context,this,u)),await((D=(F=this.options).onSettled)==null?void 0:D.call(F,re,null,l,this.state.context,u)),le(this,Yt,Fn).call(this,{type:"success",data:re}),re}catch(re){try{await((_=(T=y(this,tt).config).onError)==null?void 0:_.call(T,re,l,this.state.context,this,u))}catch(ce){Promise.reject(ce)}try{await((Q=(V=this.options).onError)==null?void 0:Q.call(V,re,l,this.state.context,u))}catch(ce){Promise.reject(ce)}try{await((B=(U=y(this,tt).config).onSettled)==null?void 0:B.call(U,void 0,re,this.state.variables,this.state.context,this,u))}catch(ce){Promise.reject(ce)}try{await((fe=(ie=this.options).onSettled)==null?void 0:fe.call(ie,void 0,re,l,this.state.context,u))}catch(ce){Promise.reject(ce)}throw le(this,Yt,Fn).call(this,{type:"error",error:re}),re}finally{y(this,tt).runNext(this)}}},ll=new WeakMap,Gt=new WeakMap,tt=new WeakMap,gr=new WeakMap,Yt=new WeakSet,Fn=function(l){const s=u=>{switch(l.type){case"failed":return{...u,failureCount:l.failureCount,failureReason:l.error};case"pause":return{...u,isPaused:!0};case"continue":return{...u,isPaused:!1};case"pending":return{...u,context:l.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:l.isPaused,status:"pending",variables:l.variables,submittedAt:Date.now()};case"success":return{...u,data:l.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...u,data:void 0,error:l.error,failureCount:u.failureCount+1,failureReason:l.error,isPaused:!1,status:"error"}}};this.state=s(this.state),Be.batch(()=>{y(this,Gt).forEach(u=>{u.onMutationUpdate(l)}),y(this,tt).notify({mutation:this,type:"updated",action:l})})},uh);function kh(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var cn,$t,sl,ch,Pv=(ch=class extends ii{constructor(l={}){super();J(this,cn);J(this,$t);J(this,sl);this.config=l,H(this,cn,new Set),H(this,$t,new Map),H(this,sl,0)}build(l,s,u){const c=new jv({client:l,mutationCache:this,mutationId:++Es(this,sl)._,options:l.defaultMutationOptions(s),state:u});return this.add(c),c}add(l){y(this,cn).add(l);const s=ks(l);if(typeof s=="string"){const u=y(this,$t).get(s);u?u.push(l):y(this,$t).set(s,[l])}this.notify({type:"added",mutation:l})}remove(l){if(y(this,cn).delete(l)){const s=ks(l);if(typeof s=="string"){const u=y(this,$t).get(s);if(u)if(u.length>1){const c=u.indexOf(l);c!==-1&&u.splice(c,1)}else u[0]===l&&y(this,$t).delete(s)}}this.notify({type:"removed",mutation:l})}canRun(l){const s=ks(l);if(typeof s=="string"){const u=y(this,$t).get(s),c=u==null?void 0:u.find(h=>h.state.status==="pending");return!c||c===l}else return!0}runNext(l){var u;const s=ks(l);if(typeof s=="string"){const c=(u=y(this,$t).get(s))==null?void 0:u.find(h=>h!==l&&h.state.isPaused);return(c==null?void 0:c.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Be.batch(()=>{y(this,cn).forEach(l=>{this.notify({type:"removed",mutation:l})}),y(this,cn).clear(),y(this,$t).clear()})}getAll(){return Array.from(y(this,cn))}find(l){const s={exact:!0,...l};return this.getAll().find(u=>Ff(s,u))}findAll(l={}){return this.getAll().filter(s=>Ff(l,s))}notify(l){Be.batch(()=>{this.listeners.forEach(s=>{s(l)})})}resumePausedMutations(){const l=this.getAll().filter(s=>s.state.isPaused);return Be.batch(()=>Promise.all(l.map(s=>s.continue().catch(lt))))}},cn=new WeakMap,$t=new WeakMap,sl=new WeakMap,ch);function ks(r){var l;return(l=r.options.scope)==null?void 0:l.id}var dn,Bn,pt,fn,hn,Rs,iu,dh,Rv=(dh=class extends ii{constructor(s,u){super();J(this,hn);J(this,dn);J(this,Bn);J(this,pt);J(this,fn);H(this,dn,s),this.setOptions(u),this.bindMethods(),le(this,hn,Rs).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(s){var c;const u=this.options;this.options=y(this,dn).defaultMutationOptions(s),Ts(this.options,u)||y(this,dn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:y(this,pt),observer:this}),u!=null&&u.mutationKey&&this.options.mutationKey&&xr(u.mutationKey)!==xr(this.options.mutationKey)?this.reset():((c=y(this,pt))==null?void 0:c.state.status)==="pending"&&y(this,pt).setOptions(this.options)}onUnsubscribe(){var s;this.hasListeners()||(s=y(this,pt))==null||s.removeObserver(this)}onMutationUpdate(s){le(this,hn,Rs).call(this),le(this,hn,iu).call(this,s)}getCurrentResult(){return y(this,Bn)}reset(){var s;(s=y(this,pt))==null||s.removeObserver(this),H(this,pt,void 0),le(this,hn,Rs).call(this),le(this,hn,iu).call(this)}mutate(s,u){var c;return H(this,fn,u),(c=y(this,pt))==null||c.removeObserver(this),H(this,pt,y(this,dn).getMutationCache().build(y(this,dn),this.options)),y(this,pt).addObserver(this),y(this,pt).execute(s)}},dn=new WeakMap,Bn=new WeakMap,pt=new WeakMap,fn=new WeakMap,hn=new WeakSet,Rs=function(){var u;const s=((u=y(this,pt))==null?void 0:u.state)??kh();H(this,Bn,{...s,isPending:s.status==="pending",isSuccess:s.status==="success",isError:s.status==="error",isIdle:s.status==="idle",mutate:this.mutate,reset:this.reset})},iu=function(s){Be.batch(()=>{var u,c,h,p,v,S,g,k;if(y(this,fn)&&this.hasListeners()){const E=y(this,Bn).variables,L=y(this,Bn).context,O={client:y(this,dn),meta:this.options.meta,mutationKey:this.options.mutationKey};if((s==null?void 0:s.type)==="success"){try{(c=(u=y(this,fn)).onSuccess)==null||c.call(u,s.data,E,L,O)}catch(F){Promise.reject(F)}try{(p=(h=y(this,fn)).onSettled)==null||p.call(h,s.data,null,E,L,O)}catch(F){Promise.reject(F)}}else if((s==null?void 0:s.type)==="error"){try{(S=(v=y(this,fn)).onError)==null||S.call(v,s.error,E,L,O)}catch(F){Promise.reject(F)}try{(k=(g=y(this,fn)).onSettled)==null||k.call(g,void 0,s.error,E,L,O)}catch(F){Promise.reject(F)}}}this.listeners.forEach(E=>{E(y(this,Bn))})})},dh),Xt,fh,Nv=(fh=class extends ii{constructor(l={}){super();J(this,Xt);this.config=l,H(this,Xt,new Map)}build(l,s,u){const c=s.queryKey,h=s.queryHash??fu(c,s);let p=this.get(h);return p||(p=new wv({client:l,queryKey:c,queryHash:h,options:l.defaultQueryOptions(s),state:u,defaultOptions:l.getQueryDefaults(c)}),this.add(p)),p}add(l){y(this,Xt).has(l.queryHash)||(y(this,Xt).set(l.queryHash,l),this.notify({type:"added",query:l}))}remove(l){const s=y(this,Xt).get(l.queryHash);s&&(l.destroy(),s===l&&y(this,Xt).delete(l.queryHash),this.notify({type:"removed",query:l}))}clear(){Be.batch(()=>{this.getAll().forEach(l=>{this.remove(l)})})}get(l){return y(this,Xt).get(l)}getAll(){return[...y(this,Xt).values()]}find(l){const s={exact:!0,...l};return this.getAll().find(u=>If(s,u))}findAll(l={}){const s=this.getAll();return Object.keys(l).length>0?s.filter(u=>If(l,u)):s}notify(l){Be.batch(()=>{this.listeners.forEach(s=>{s(l)})})}onFocus(){Be.batch(()=>{this.getAll().forEach(l=>{l.onFocus()})})}onOnline(){Be.batch(()=>{this.getAll().forEach(l=>{l.onOnline()})})}},Xt=new WeakMap,fh),De,Qn,Hn,ei,ti,Wn,ni,ri,hh,_v=(hh=class{constructor(r={}){J(this,De);J(this,Qn);J(this,Hn);J(this,ei);J(this,ti);J(this,Wn);J(this,ni);J(this,ri);H(this,De,r.queryCache||new Nv),H(this,Qn,r.mutationCache||new Pv),H(this,Hn,r.defaultOptions||{}),H(this,ei,new Map),H(this,ti,new Map),H(this,Wn,0)}mount(){Es(this,Wn)._++,y(this,Wn)===1&&(H(this,ni,du.subscribe(async r=>{r&&(await this.resumePausedMutations(),y(this,De).onFocus())})),H(this,ri,Ls.subscribe(async r=>{r&&(await this.resumePausedMutations(),y(this,De).onOnline())})))}unmount(){var r,l;Es(this,Wn)._--,y(this,Wn)===0&&((r=y(this,ni))==null||r.call(this),H(this,ni,void 0),(l=y(this,ri))==null||l.call(this),H(this,ri,void 0))}isFetching(r){return y(this,De).findAll({...r,fetchStatus:"fetching"}).length}isMutating(r){return y(this,Qn).findAll({...r,status:"pending"}).length}getQueryData(r){var s;const l=this.defaultQueryOptions({queryKey:r});return(s=y(this,De).get(l.queryHash))==null?void 0:s.state.data}ensureQueryData(r){const l=this.defaultQueryOptions(r),s=y(this,De).build(this,l),u=s.state.data;return u===void 0?this.fetchQuery(r):(r.revalidateIfStale&&s.isStaleByTime(Kn(l.staleTime,s))&&this.prefetchQuery(l),Promise.resolve(u))}getQueriesData(r){return y(this,De).findAll(r).map(({queryKey:l,state:s})=>{const u=s.data;return[l,u]})}setQueryData(r,l,s){const u=this.defaultQueryOptions({queryKey:r}),c=y(this,De).get(u.queryHash),h=c==null?void 0:c.state.data,p=uv(l,h);if(p!==void 0)return y(this,De).build(this,u).setData(p,{...s,manual:!0})}setQueriesData(r,l,s){return Be.batch(()=>y(this,De).findAll(r).map(({queryKey:u})=>[u,this.setQueryData(u,l,s)]))}getQueryState(r){var s;const l=this.defaultQueryOptions({queryKey:r});return(s=y(this,De).get(l.queryHash))==null?void 0:s.state}removeQueries(r){const l=y(this,De);Be.batch(()=>{l.findAll(r).forEach(s=>{l.remove(s)})})}resetQueries(r,l){const s=y(this,De);return Be.batch(()=>(s.findAll(r).forEach(u=>{u.reset()}),this.refetchQueries({type:"active",...r},l)))}cancelQueries(r,l={}){const s={revert:!0,...l},u=Be.batch(()=>y(this,De).findAll(r).map(c=>c.cancel(s)));return Promise.all(u).then(lt).catch(lt)}invalidateQueries(r,l={}){return Be.batch(()=>(y(this,De).findAll(r).forEach(s=>{s.invalidate()}),(r==null?void 0:r.refetchType)==="none"?Promise.resolve():this.refetchQueries({...r,type:(r==null?void 0:r.refetchType)??(r==null?void 0:r.type)??"active"},l)))}refetchQueries(r,l={}){const s={...l,cancelRefetch:l.cancelRefetch??!0},u=Be.batch(()=>y(this,De).findAll(r).filter(c=>!c.isDisabled()&&!c.isStatic()).map(c=>{let h=c.fetch(void 0,s);return s.throwOnError||(h=h.catch(lt)),c.state.fetchStatus==="paused"?Promise.resolve():h}));return Promise.all(u).then(lt)}fetchQuery(r){const l=this.defaultQueryOptions(r);l.retry===void 0&&(l.retry=!1);const s=y(this,De).build(this,l);return s.isStaleByTime(Kn(l.staleTime,s))?s.fetch(l):Promise.resolve(s.state.data)}prefetchQuery(r){return this.fetchQuery(r).then(lt).catch(lt)}fetchInfiniteQuery(r){return r._type="infinite",this.fetchQuery(r)}prefetchInfiniteQuery(r){return this.fetchInfiniteQuery(r).then(lt).catch(lt)}ensureInfiniteQueryData(r){return r._type="infinite",this.ensureQueryData(r)}resumePausedMutations(){return Ls.isOnline()?y(this,Qn).resumePausedMutations():Promise.resolve()}getQueryCache(){return y(this,De)}getMutationCache(){return y(this,Qn)}getDefaultOptions(){return y(this,Hn)}setDefaultOptions(r){H(this,Hn,r)}setQueryDefaults(r,l){y(this,ei).set(xr(r),{queryKey:r,defaultOptions:l})}getQueryDefaults(r){const l=[...y(this,ei).values()],s={};return l.forEach(u=>{Zi(r,u.queryKey)&&Object.assign(s,u.defaultOptions)}),s}setMutationDefaults(r,l){y(this,ti).set(xr(r),{mutationKey:r,defaultOptions:l})}getMutationDefaults(r){const l=[...y(this,ti).values()],s={};return l.forEach(u=>{Zi(r,u.mutationKey)&&Object.assign(s,u.defaultOptions)}),s}defaultQueryOptions(r){if(r._defaulted)return r;const l={...y(this,Hn).queries,...this.getQueryDefaults(r.queryKey),...r,_defaulted:!0};return l.queryHash||(l.queryHash=fu(l.queryKey,l)),l.refetchOnReconnect===void 0&&(l.refetchOnReconnect=l.networkMode!=="always"),l.throwOnError===void 0&&(l.throwOnError=!!l.suspense),!l.networkMode&&l.persister&&(l.networkMode="offlineFirst"),l.queryFn===hu&&(l.enabled=!1),l}defaultMutationOptions(r){return r!=null&&r._defaulted?r:{...y(this,Hn).mutations,...(r==null?void 0:r.mutationKey)&&this.getMutationDefaults(r.mutationKey),...r,_defaulted:!0}}clear(){y(this,De).clear(),y(this,Qn).clear()}},De=new WeakMap,Qn=new WeakMap,Hn=new WeakMap,ei=new WeakMap,ti=new WeakMap,Wn=new WeakMap,ni=new WeakMap,ri=new WeakMap,hh),jh=C.createContext(void 0),Gn=r=>{const l=C.useContext(jh);if(!l)throw new Error("No QueryClient set, use QueryClientProvider to set one");return l},Tv=({client:r,children:l})=>(C.useEffect(()=>(r.mount(),()=>{r.unmount()}),[r]),d.jsx(jh.Provider,{value:r,children:l})),Ph=C.createContext(!1),Lv=()=>C.useContext(Ph);Ph.Provider;function Dv(){let r=!1;return{clearReset:()=>{r=!1},reset:()=>{r=!0},isReset:()=>r}}var Ov=C.createContext(Dv()),Iv=()=>C.useContext(Ov),Fv=(r,l,s)=>{const u=s!=null&&s.state.error&&typeof r.throwOnError=="function"?pu(r.throwOnError,[s.state.error,s]):r.throwOnError;(r.suspense||r.experimental_prefetchInRender||u)&&(l.isReset()||(r.retryOnMount=!1))},zv=r=>{C.useEffect(()=>{r.clearReset()},[r])},Mv=({result:r,errorResetBoundary:l,throwOnError:s,query:u,suspense:c})=>r.isError&&!l.isReset()&&!r.isFetching&&u&&(c&&r.data===void 0||pu(s,[r.error,u])),Av=r=>{if(r.suspense){const s=c=>c==="static"?c:Math.max(c??1e3,1e3),u=r.staleTime;r.staleTime=typeof u=="function"?(...c)=>s(u(...c)):s(u),typeof r.gcTime=="number"&&(r.gcTime=Math.max(r.gcTime,1e3))}},Uv=(r,l)=>r.isLoading&&r.isFetching&&!l,$v=(r,l)=>(r==null?void 0:r.suspense)&&l.isPending,Hf=(r,l,s)=>l.fetchOptimistic(r).catch(()=>{s.clearReset()});function Bv(r,l,s){var L,O,F,D;const u=Lv(),c=Iv(),h=Gn(),p=h.defaultQueryOptions(r);(O=(L=h.getDefaultOptions().queries)==null?void 0:L._experimental_beforeQuery)==null||O.call(L,p);const v=h.getQueryCache().get(p.queryHash);p._optimisticResults=u?"isRestoring":"optimistic",Av(p),Fv(p,c,v),zv(c);const S=!h.getQueryCache().get(p.queryHash),[g]=C.useState(()=>new l(h,p)),k=g.getOptimisticResult(p),E=!u&&r.subscribed!==!1;if(C.useSyncExternalStore(C.useCallback(T=>{const _=E?g.subscribe(Be.batchCalls(T)):lt;return g.updateResult(),_},[g,E]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),C.useEffect(()=>{g.setOptions(p)},[p,g]),$v(p,k))throw Hf(p,g,c);if(Mv({result:k,errorResetBoundary:c,throwOnError:p.throwOnError,query:v,suspense:p.suspense}))throw k.error;if((D=(F=h.getDefaultOptions().queries)==null?void 0:F._experimental_afterQuery)==null||D.call(F,p,k),p.experimental_prefetchInRender&&!el.isServer()&&Uv(k,u)){const T=S?Hf(p,g,c):v==null?void 0:v.promise;T==null||T.catch(lt).finally(()=>{g.updateResult()})}return p.notifyOnChangeProps?k:g.trackResult(k)}function ol(r,l){return Bv(r,Ev)}function Qt(r,l){const s=Gn(),[u]=C.useState(()=>new Rv(s,r));C.useEffect(()=>{u.setOptions(r)},[u,r]);const c=C.useSyncExternalStore(C.useCallback(p=>u.subscribe(Be.batchCalls(p)),[u]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),h=C.useCallback((p,v)=>{u.mutate(p,v).catch(lt)},[u]);if(c.error&&pu(u.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:h,mutateAsync:c.mutate}}/** * react-router v7.15.0 * * 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 Wf="popstate";function Vf(r){return typeof r=="object"&&r!=null&&"pathname"in r&&"search"in r&&"hash"in r&&"state"in r&&"key"in r}function Qv(r={}){function l(u,c){var g;let h=(g=c.state)==null?void 0:g.masked,{pathname:p,search:v,hash:S}=h||u.location;return lu("",{pathname:p,search:v,hash:S},c.state&&c.state.usr||null,c.state&&c.state.key||"default",h?{pathname:u.location.pathname,search:u.location.search,hash:u.location.hash}:void 0)}function s(u,c){return typeof c=="string"?c:tl(c)}return Wv(l,s,null,r)}function Re(r,l){if(r===!1||r===null||typeof r>"u")throw new Error(l)}function Lt(r,l){if(!r){typeof console<"u"&&console.warn(l);try{throw new Error(l)}catch{}}}function Hv(){return Math.random().toString(36).substring(2,10)}function bf(r,l){return{usr:r.state,key:r.key,idx:l,masked:r.mask?{pathname:r.pathname,search:r.search,hash:r.hash}:void 0}}function lu(r,l,s=null,u,c){return{pathname:typeof r=="string"?r:r.pathname,search:"",hash:"",...typeof l=="string"?li(l):l,state:s,key:l&&l.key||u||Hv(),mask:c}}function tl({pathname:r="/",search:l="",hash:s=""}){return l&&l!=="?"&&(r+=l.charAt(0)==="?"?l:"?"+l),s&&s!=="#"&&(r+=s.charAt(0)==="#"?s:"#"+s),r}function li(r){let l={};if(r){let s=r.indexOf("#");s>=0&&(l.hash=r.substring(s),r=r.substring(0,s));let u=r.indexOf("?");u>=0&&(l.search=r.substring(u),r=r.substring(0,u)),r&&(l.pathname=r)}return l}function Wv(r,l,s,u={}){let{window:c=document.defaultView,v5Compat:h=!1}=u,p=c.history,v="POP",S=null,g=k();g==null&&(g=0,p.replaceState({...p.state,idx:g},""));function k(){return(p.state||{idx:null}).idx}function E(){v="POP";let T=k(),_=T==null?null:T-g;g=T,S&&S({action:v,location:D.location,delta:_})}function L(T,_){v="PUSH";let V=Vf(T)?T:lu(D.location,T,_);g=k()+1;let Q=bf(V,g),U=D.createHref(V.mask||V);try{p.pushState(Q,"",U)}catch(B){if(B instanceof DOMException&&B.name==="DataCloneError")throw B;c.location.assign(U)}h&&S&&S({action:v,location:D.location,delta:1})}function O(T,_){v="REPLACE";let V=Vf(T)?T:lu(D.location,T,_);g=k();let Q=bf(V,g),U=D.createHref(V.mask||V);p.replaceState(Q,"",U),h&&S&&S({action:v,location:D.location,delta:0})}function F(T){return Vv(T)}let D={get action(){return v},get location(){return r(c,p)},listen(T){if(S)throw new Error("A history only accepts one active listener");return c.addEventListener(Wf,E),S=T,()=>{c.removeEventListener(Wf,E),S=null}},createHref(T){return l(c,T)},createURL:F,encodeLocation(T){let _=F(T);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:L,replace:O,go(T){return p.go(T)}};return D}function Vv(r,l=!1){let s="http://localhost";typeof window<"u"&&(s=window.location.origin!=="null"?window.location.origin:window.location.href),Re(s,"No window.location.(origin|href) available to create URL");let u=typeof r=="string"?r:tl(r);return u=u.replace(/ $/,"%20"),!l&&u.startsWith("//")&&(u=s+u),new URL(u,s)}function Rh(r,l,s="/"){return bv(r,l,s,!1)}function bv(r,l,s,u,c){let h=typeof l=="string"?li(l):l,p=pn(h.pathname||"/",s);if(p==null)return null;let v=Kv(r),S=null,g=ly(p);for(let k=0;S==null&&k{let k={relativePath:g===void 0?p.path||"":g,caseSensitive:p.caseSensitive===!0,childrenIndex:v,route:p};if(k.relativePath.startsWith("/")){if(!k.relativePath.startsWith(u)&&S)return;Re(k.relativePath.startsWith(u),`Absolute route path "${k.relativePath}" nested under path "${u}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),k.relativePath=k.relativePath.slice(u.length)}let E=Bt([u,k.relativePath]),L=s.concat(k);p.children&&p.children.length>0&&(Re(p.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${E}".`),Nh(p.children,l,L,E,S)),!(p.path==null&&!p.index)&&l.push({path:E,score:ty(E,p.index),routesMeta:L})};return r.forEach((p,v)=>{var S;if(p.path===""||!((S=p.path)!=null&&S.includes("?")))h(p,v);else for(let g of _h(p.path))h(p,v,!0,g)}),l}function _h(r){let l=r.split("/");if(l.length===0)return[];let[s,...u]=l,c=s.endsWith("?"),h=s.replace(/\?$/,"");if(u.length===0)return c?[h,""]:[h];let p=_h(u.join("/")),v=[];return v.push(...p.map(S=>S===""?h:[h,S].join("/"))),c&&v.push(...p),v.map(S=>r.startsWith("/")&&S===""?"/":S)}function qv(r){r.sort((l,s)=>l.score!==s.score?s.score-l.score:ny(l.routesMeta.map(u=>u.childrenIndex),s.routesMeta.map(u=>u.childrenIndex)))}var Gv=/^:[\w-]+$/,Yv=3,Xv=2,Jv=1,Zv=10,ey=-2,Kf=r=>r==="*";function ty(r,l){let s=r.split("/"),u=s.length;return s.some(Kf)&&(u+=ey),l&&(u+=Xv),s.filter(c=>!Kf(c)).reduce((c,h)=>c+(Gv.test(h)?Yv:h===""?Jv:Zv),u)}function ny(r,l){return r.length===l.length&&r.slice(0,-1).every((u,c)=>u===l[c])?r[r.length-1]-l[l.length-1]:0}function ry(r,l,s=!1){let{routesMeta:u}=r,c={},h="/",p=[];for(let v=0;v{if(k==="*"){let F=v[L]||"";p=h.slice(0,h.length-F.length).replace(/(.)\/+$/,"$1")}const O=v[L];return E&&!O?g[k]=void 0:g[k]=(O||"").replace(/%2F/g,"/"),g},{}),pathname:h,pathnameBase:p,pattern:r}}function iy(r,l=!1,s=!0){Lt(r==="*"||!r.endsWith("*")||r.endsWith("/*"),`Route path "${r}" will be treated as if it were "${r.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${r.replace(/\*$/,"/*")}".`);let u=[],c="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(p,v,S,g,k)=>{if(u.push({paramName:v,isOptional:S!=null}),S){let E=k.charAt(g+p.length);return E&&E!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return r.endsWith("*")?(u.push({paramName:"*"}),c+=r==="*"||r==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?c+="\\/*$":r!==""&&r!=="/"&&(c+="(?:(?=\\/|$))"),[new RegExp(c,l?void 0:"i"),u]}function ly(r){try{return r.split("/").map(l=>decodeURIComponent(l).replace(/\//g,"%2F")).join("/")}catch(l){return Lt(!1,`The URL path "${r}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${l}).`),r}}function pn(r,l){if(l==="/")return r;if(!r.toLowerCase().startsWith(l.toLowerCase()))return null;let s=l.endsWith("/")?l.length-1:l.length,u=r.charAt(s);return u&&u!=="/"?null:r.slice(s)||"/"}var sy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function oy(r,l="/"){let{pathname:s,search:u="",hash:c=""}=typeof r=="string"?li(r):r,h;return s?(s=Th(s),s.startsWith("/")?h=qf(s.substring(1),"/"):h=qf(s,l)):h=l,{pathname:h,search:cy(u),hash:dy(c)}}function qf(r,l){let s=Os(l).split("/");return r.split("/").forEach(c=>{c===".."?s.length>1&&s.pop():c!=="."&&s.push(c)}),s.length>1?s.join("/"):"/"}function Ua(r,l,s,u){return`Cannot include a '${r}' character in a manually specified \`to.${l}\` field [${JSON.stringify(u)}]. Please separate it out to the \`to.${s}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function ay(r){return r.filter((l,s)=>s===0||l.route.path&&l.route.path.length>0)}function vu(r){let l=ay(r);return l.map((s,u)=>u===l.length-1?s.pathname:s.pathnameBase)}function Fs(r,l,s,u=!1){let c;typeof r=="string"?c=li(r):(c={...r},Re(!c.pathname||!c.pathname.includes("?"),Ua("?","pathname","search",c)),Re(!c.pathname||!c.pathname.includes("#"),Ua("#","pathname","hash",c)),Re(!c.search||!c.search.includes("#"),Ua("#","search","hash",c)));let h=r===""||c.pathname==="",p=h?"/":c.pathname,v;if(p==null)v=s;else{let E=l.length-1;if(!u&&p.startsWith("..")){let L=p.split("/");for(;L[0]==="..";)L.shift(),E-=1;c.pathname=L.join("/")}v=E>=0?l[E]:"/"}let S=oy(c,v),g=p&&p!=="/"&&p.endsWith("/"),k=(h||p===".")&&s.endsWith("/");return!S.pathname.endsWith("/")&&(g||k)&&(S.pathname+="/"),S}var Th=r=>r.replace(/\/\/+/g,"/"),Bt=r=>Th(r.join("/")),Os=r=>r.replace(/\/+$/,""),uy=r=>Os(r).replace(/^\/*/,"/"),cy=r=>!r||r==="?"?"":r.startsWith("?")?r:"?"+r,dy=r=>!r||r==="#"?"":r.startsWith("#")?r:"#"+r,fy=class{constructor(r,l,s,u=!1){this.status=r,this.statusText=l||"",this.internal=u,s instanceof Error?(this.data=s.toString(),this.error=s):this.data=s}};function hy(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.internal=="boolean"&&"data"in r}function py(r){let l=r.map(s=>s.route.path).filter(Boolean);return Bt(l)||"/"}var Lh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Dh(r,l){let s=r;if(typeof s!="string"||!sy.test(s))return{absoluteURL:void 0,isExternal:!1,to:s};let u=s,c=!1;if(Lh)try{let h=new URL(window.location.href),p=s.startsWith("//")?new URL(h.protocol+s):new URL(s),v=pn(p.pathname,l);p.origin===h.origin&&v!=null?s=v+p.search+p.hash:c=!0}catch{Lt(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:u,isExternal:c,to:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Oh=["POST","PUT","PATCH","DELETE"];new Set(Oh);var my=["GET",...Oh];new Set(my);var si=C.createContext(null);si.displayName="DataRouter";var zs=C.createContext(null);zs.displayName="DataRouterState";var Ih=C.createContext(!1);function vy(){return C.useContext(Ih)}var Fh=C.createContext({isTransitioning:!1});Fh.displayName="ViewTransition";var yy=C.createContext(new Map);yy.displayName="Fetchers";var gy=C.createContext(null);gy.displayName="Await";var Et=C.createContext(null);Et.displayName="Navigation";var al=C.createContext(null);al.displayName="Location";var Ht=C.createContext({outlet:null,matches:[],isDataRoute:!1});Ht.displayName="Route";var yu=C.createContext(null);yu.displayName="RouteError";var zh="REACT_ROUTER_ERROR",xy="REDIRECT",Sy="ROUTE_ERROR_RESPONSE";function wy(r){if(r.startsWith(`${zh}:${xy}:{`))try{let l=JSON.parse(r.slice(28));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.location=="string"&&typeof l.reloadDocument=="boolean"&&typeof l.replace=="boolean")return l}catch{}}function Ey(r){if(r.startsWith(`${zh}:${Sy}:{`))try{let l=JSON.parse(r.slice(40));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string")return new fy(l.status,l.statusText,l.data)}catch{}}function Cy(r,{relative:l}={}){Re(oi(),"useHref() may be used only in the context of a component.");let{basename:s,navigator:u}=C.useContext(Et),{hash:c,pathname:h,search:p}=cl(r,{relative:l}),v=h;return s!=="/"&&(v=h==="/"?s:Bt([s,h])),u.createHref({pathname:v,search:p,hash:c})}function oi(){return C.useContext(al)!=null}function Ct(){return Re(oi(),"useLocation() may be used only in the context of a component."),C.useContext(al).location}var Mh="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Ah(r){C.useContext(Et).static||C.useLayoutEffect(r)}function ul(){let{isDataRoute:r}=C.useContext(Ht);return r?zy():ky()}function ky(){Re(oi(),"useNavigate() may be used only in the context of a component.");let r=C.useContext(si),{basename:l,navigator:s}=C.useContext(Et),{matches:u}=C.useContext(Ht),{pathname:c}=Ct(),h=JSON.stringify(vu(u)),p=C.useRef(!1);return Ah(()=>{p.current=!0}),C.useCallback((S,g={})=>{if(Lt(p.current,Mh),!p.current)return;if(typeof S=="number"){s.go(S);return}let k=Fs(S,JSON.parse(h),c,g.relative==="path");r==null&&l!=="/"&&(k.pathname=k.pathname==="/"?l:Bt([l,k.pathname])),(g.replace?s.replace:s.push)(k,g.state,g)},[l,s,h,c,r])}C.createContext(null);function Uh(){let{matches:r}=C.useContext(Ht),l=r[r.length-1];return(l==null?void 0:l.params)??{}}function cl(r,{relative:l}={}){let{matches:s}=C.useContext(Ht),{pathname:u}=Ct(),c=JSON.stringify(vu(s));return C.useMemo(()=>Fs(r,JSON.parse(c),u,l==="path"),[r,c,u,l])}function jy(r,l){return $h(r,l)}function $h(r,l,s){var T;Re(oi(),"useRoutes() may be used only in the context of a component.");let{navigator:u}=C.useContext(Et),{matches:c}=C.useContext(Ht),h=c[c.length-1],p=h?h.params:{},v=h?h.pathname:"/",S=h?h.pathnameBase:"/",g=h&&h.route;{let _=g&&g.path||"";Qh(v,!g||_.endsWith("*")||_.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${v}" (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 k=Ct(),E;if(l){let _=typeof l=="string"?li(l):l;Re(S==="/"||((T=_.pathname)==null?void 0:T.startsWith(S)),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${S}" but pathname "${_.pathname}" was given in the \`location\` prop.`),E=_}else E=k;let L=E.pathname||"/",O=L;if(S!=="/"){let _=S.replace(/^\//,"").split("/");O="/"+L.replace(/^\//,"").split("/").slice(_.length).join("/")}let F=s&&s.state.matches.length?s.state.matches.map(_=>Object.assign(_,{route:s.manifest[_.route.id]||_.route})):Rh(r,{pathname:O});Lt(g||F!=null,`No routes matched location "${E.pathname}${E.search}${E.hash}" `),Lt(F==null||F[F.length-1].route.element!==void 0||F[F.length-1].route.Component!==void 0||F[F.length-1].route.lazy!==void 0,`Matched leaf route at location "${E.pathname}${E.search}${E.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.`);let D=Ty(F&&F.map(_=>Object.assign({},_,{params:Object.assign({},p,_.params),pathname:Bt([S,u.encodeLocation?u.encodeLocation(_.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?S:Bt([S,u.encodeLocation?u.encodeLocation(_.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathnameBase])})),c,s);return l&&D?C.createElement(al.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...E},navigationType:"POP"}},D):D}function Py(){let r=Fy(),l=hy(r)?`${r.status} ${r.statusText}`:r instanceof Error?r.message:JSON.stringify(r),s=r instanceof Error?r.stack:null,u="rgba(200,200,200, 0.5)",c={padding:"0.5rem",backgroundColor:u},h={padding:"2px 4px",backgroundColor:u},p=null;return console.error("Error handled by React Router default ErrorBoundary:",r),p=C.createElement(C.Fragment,null,C.createElement("p",null,"💿 Hey developer 👋"),C.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",C.createElement("code",{style:h},"ErrorBoundary")," or"," ",C.createElement("code",{style:h},"errorElement")," prop on your route.")),C.createElement(C.Fragment,null,C.createElement("h2",null,"Unexpected Application Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},l),s?C.createElement("pre",{style:c},s):null,p)}var Ry=C.createElement(Py,null),Bh=class extends C.Component{constructor(r){super(r),this.state={location:r.location,revalidation:r.revalidation,error:r.error}}static getDerivedStateFromError(r){return{error:r}}static getDerivedStateFromProps(r,l){return l.location!==r.location||l.revalidation!=="idle"&&r.revalidation==="idle"?{error:r.error,location:r.location,revalidation:r.revalidation}:{error:r.error!==void 0?r.error:l.error,location:l.location,revalidation:r.revalidation||l.revalidation}}componentDidCatch(r,l){this.props.onError?this.props.onError(r,l):console.error("React Router caught the following error during render",r)}render(){let r=this.state.error;if(this.context&&typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){const s=Ey(r.digest);s&&(r=s)}let l=r!==void 0?C.createElement(Ht.Provider,{value:this.props.routeContext},C.createElement(yu.Provider,{value:r,children:this.props.component})):this.props.children;return this.context?C.createElement(Ny,{error:r},l):l}};Bh.contextType=Ih;var $a=new WeakMap;function Ny({children:r,error:l}){let{basename:s}=C.useContext(Et);if(typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){let u=wy(l.digest);if(u){let c=$a.get(l);if(c)throw c;let h=Dh(u.location,s);if(Lh&&!$a.get(l))if(h.isExternal||u.reloadDocument)window.location.href=h.absoluteURL||h.to;else{const p=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(h.to,{replace:u.replace}));throw $a.set(l,p),p}return C.createElement("meta",{httpEquiv:"refresh",content:`0;url=${h.absoluteURL||h.to}`})}}return r}function _y({routeContext:r,match:l,children:s}){let u=C.useContext(si);return u&&u.static&&u.staticContext&&(l.route.errorElement||l.route.ErrorBoundary)&&(u.staticContext._deepestRenderedBoundaryId=l.route.id),C.createElement(Ht.Provider,{value:r},s)}function Ty(r,l=[],s){let u=s==null?void 0:s.state;if(r==null){if(!u)return null;if(u.errors)r=u.matches;else if(l.length===0&&!u.initialized&&u.matches.length>0)r=u.matches;else return null}let c=r,h=u==null?void 0:u.errors;if(h!=null){let k=c.findIndex(E=>E.route.id&&(h==null?void 0:h[E.route.id])!==void 0);Re(k>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(h).join(",")}`),c=c.slice(0,Math.min(c.length,k+1))}let p=!1,v=-1;if(s&&u){p=u.renderFallback;for(let k=0;k=0?c=c.slice(0,v+1):c=[c[0]];break}}}}let S=s==null?void 0:s.onError,g=u&&S?(k,E)=>{var L,O;S(k,{location:u.location,params:((O=(L=u.matches)==null?void 0:L[0])==null?void 0:O.params)??{},pattern:py(u.matches),errorInfo:E})}:void 0;return c.reduceRight((k,E,L)=>{let O,F=!1,D=null,T=null;u&&(O=h&&E.route.id?h[E.route.id]:void 0,D=E.route.errorElement||Ry,p&&(v<0&&L===0?(Qh("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),F=!0,T=null):v===L&&(F=!0,T=E.route.hydrateFallbackElement||null)));let _=l.concat(c.slice(0,L+1)),V=()=>{let Q;return O?Q=D:F?Q=T:E.route.Component?Q=C.createElement(E.route.Component,null):E.route.element?Q=E.route.element:Q=k,C.createElement(_y,{match:E,routeContext:{outlet:k,matches:_,isDataRoute:u!=null},children:Q})};return u&&(E.route.ErrorBoundary||E.route.errorElement||L===0)?C.createElement(Bh,{location:u.location,revalidation:u.revalidation,component:D,error:O,children:V(),routeContext:{outlet:null,matches:_,isDataRoute:!0},onError:g}):V()},null)}function gu(r){return`${r} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ly(r){let l=C.useContext(si);return Re(l,gu(r)),l}function Dy(r){let l=C.useContext(zs);return Re(l,gu(r)),l}function Oy(r){let l=C.useContext(Ht);return Re(l,gu(r)),l}function xu(r){let l=Oy(r),s=l.matches[l.matches.length-1];return Re(s.route.id,`${r} can only be used on routes that contain a unique "id"`),s.route.id}function Iy(){return xu("useRouteId")}function Fy(){var u;let r=C.useContext(yu),l=Dy("useRouteError"),s=xu("useRouteError");return r!==void 0?r:(u=l.errors)==null?void 0:u[s]}function zy(){let{router:r}=Ly("useNavigate"),l=xu("useNavigate"),s=C.useRef(!1);return Ah(()=>{s.current=!0}),C.useCallback(async(c,h={})=>{Lt(s.current,Mh),s.current&&(typeof c=="number"?await r.navigate(c):await r.navigate(c,{fromRouteId:l,...h}))},[r,l])}var Gf={};function Qh(r,l,s){!l&&!Gf[r]&&(Gf[r]=!0,Lt(!1,s))}C.memo(My);function My({routes:r,manifest:l,future:s,state:u,isStatic:c,onError:h}){return $h(r,void 0,{manifest:l,state:u,isStatic:c,onError:h})}function su({to:r,replace:l,state:s,relative:u}){Re(oi()," may be used only in the context of a component.");let{static:c}=C.useContext(Et);Lt(!c," must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.");let{matches:h}=C.useContext(Ht),{pathname:p}=Ct(),v=ul(),S=Fs(r,vu(h),p,u==="path"),g=JSON.stringify(S);return C.useEffect(()=>{v(JSON.parse(g),{replace:l,state:s,relative:u})},[v,g,u,l,s]),null}function Ut(r){Re(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function Ay({basename:r="/",children:l=null,location:s,navigationType:u="POP",navigator:c,static:h=!1,useTransitions:p}){Re(!oi(),"You cannot render a inside another . You should never have more than one in your app.");let v=r.replace(/^\/*/,"/"),S=C.useMemo(()=>({basename:v,navigator:c,static:h,useTransitions:p,future:{}}),[v,c,h,p]);typeof s=="string"&&(s=li(s));let{pathname:g="/",search:k="",hash:E="",state:L=null,key:O="default",mask:F}=s,D=C.useMemo(()=>{let T=pn(g,v);return T==null?null:{location:{pathname:T,search:k,hash:E,state:L,key:O,mask:F},navigationType:u}},[v,g,k,E,L,O,u,F]);return Lt(D!=null,` is not able to match the URL "${g}${k}${E}" because it does not start with the basename, so the won't render anything.`),D==null?null:C.createElement(Et.Provider,{value:S},C.createElement(al.Provider,{children:l,value:D}))}function Uy({children:r,location:l}){return jy(ou(r),l)}function ou(r,l=[]){let s=[];return C.Children.forEach(r,(u,c)=>{if(!C.isValidElement(u))return;let h=[...l,c];if(u.type===C.Fragment){s.push.apply(s,ou(u.props.children,h));return}Re(u.type===Ut,`[${typeof u.type=="string"?u.type:u.type.name}] is not a component. All component children of must be a or `),Re(!u.props.index||!u.props.children,"An index route cannot have child routes.");let p={id:u.props.id||h.join("-"),caseSensitive:u.props.caseSensitive,element:u.props.element,Component:u.props.Component,index:u.props.index,path:u.props.path,middleware:u.props.middleware,loader:u.props.loader,action:u.props.action,hydrateFallbackElement:u.props.hydrateFallbackElement,HydrateFallback:u.props.HydrateFallback,errorElement:u.props.errorElement,ErrorBoundary:u.props.ErrorBoundary,hasErrorBoundary:u.props.hasErrorBoundary===!0||u.props.ErrorBoundary!=null||u.props.errorElement!=null,shouldRevalidate:u.props.shouldRevalidate,handle:u.props.handle,lazy:u.props.lazy};u.props.children&&(p.children=ou(u.props.children,h)),s.push(p)}),s}var Ns="get",_s="application/x-www-form-urlencoded";function Ms(r){return typeof HTMLElement<"u"&&r instanceof HTMLElement}function $y(r){return Ms(r)&&r.tagName.toLowerCase()==="button"}function By(r){return Ms(r)&&r.tagName.toLowerCase()==="form"}function Qy(r){return Ms(r)&&r.tagName.toLowerCase()==="input"}function Hy(r){return!!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)}function Wy(r,l){return r.button===0&&(!l||l==="_self")&&!Hy(r)}function au(r=""){return new URLSearchParams(typeof r=="string"||Array.isArray(r)||r instanceof URLSearchParams?r:Object.keys(r).reduce((l,s)=>{let u=r[s];return l.concat(Array.isArray(u)?u.map(c=>[s,c]):[[s,u]])},[]))}function Vy(r,l){let s=au(r);return l&&l.forEach((u,c)=>{s.has(c)||l.getAll(c).forEach(h=>{s.append(c,h)})}),s}var js=null;function by(){if(js===null)try{new FormData(document.createElement("form"),0),js=!1}catch{js=!0}return js}var Ky=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ba(r){return r!=null&&!Ky.has(r)?(Lt(!1,`"${r}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${_s}"`),null):r}function qy(r,l){let s,u,c,h,p;if(By(r)){let v=r.getAttribute("action");u=v?pn(v,l):null,s=r.getAttribute("method")||Ns,c=Ba(r.getAttribute("enctype"))||_s,h=new FormData(r)}else if($y(r)||Qy(r)&&(r.type==="submit"||r.type==="image")){let v=r.form;if(v==null)throw new Error('Cannot submit a