diff --git "a/dist/assets/index-0mnFq_dj.js" "b/dist/assets/index-0mnFq_dj.js" deleted file mode 100644--- "a/dist/assets/index-0mnFq_dj.js" +++ /dev/null @@ -1,95 +0,0 @@ -var Tf=e=>{throw TypeError(e)};var Ms=(e,t,n)=>t.has(e)||Tf("Cannot "+n);var C=(e,t,n)=>(Ms(e,t,"read from private field"),n?n.call(e):t.get(e)),X=(e,t,n)=>t.has(e)?Tf("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),$=(e,t,n,r)=>(Ms(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),xe=(e,t,n)=>(Ms(e,t,"access private method"),n);var Dl=(e,t,n,r)=>({set _(i){$(e,t,i,n)},get _(){return C(e,t,r)}});function jv(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(i){if(i.ep)return;i.ep=!0;const l=n(i);fetch(i.href,l)}})();var Eo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Za(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var kh={exports:{}},is={},Eh={exports:{}},J={};/** - * @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 El=Symbol.for("react.element"),Bv=Symbol.for("react.portal"),Uv=Symbol.for("react.fragment"),$v=Symbol.for("react.strict_mode"),Hv=Symbol.for("react.profiler"),Vv=Symbol.for("react.provider"),qv=Symbol.for("react.context"),Wv=Symbol.for("react.forward_ref"),Qv=Symbol.for("react.suspense"),Kv=Symbol.for("react.memo"),Gv=Symbol.for("react.lazy"),Rf=Symbol.iterator;function Xv(e){return e===null||typeof e!="object"?null:(e=Rf&&e[Rf]||e["@@iterator"],typeof e=="function"?e:null)}var Ch={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ph=Object.assign,_h={};function di(e,t,n){this.props=e,this.context=t,this.refs=_h,this.updater=n||Ch}di.prototype.isReactComponent={};di.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};di.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Th(){}Th.prototype=di.prototype;function ec(e,t,n){this.props=e,this.context=t,this.refs=_h,this.updater=n||Ch}var tc=ec.prototype=new Th;tc.constructor=ec;Ph(tc,di.prototype);tc.isPureReactComponent=!0;var Of=Array.isArray,Rh=Object.prototype.hasOwnProperty,nc={current:null},Oh={key:!0,ref:!0,__self:!0,__source:!0};function Nh(e,t,n){var r,i={},l=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(l=""+t.key),t)Rh.call(t,r)&&!Oh.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,Z=b[V];if(0>>1;Vi($e,w))cei(Ft,$e)?(b[V]=Ft,b[ce]=w,V=ce):(b[V]=$e,b[ie]=w,V=ie);else if(cei(Ft,w))b[V]=Ft,b[ce]=w,V=ce;else break e}}return B}function i(b,B){var w=b.sortIndex-B.sortIndex;return w!==0?w:b.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var u=[],a=[],c=1,f=null,d=3,p=!1,g=!1,v=!1,S=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(b){for(var B=n(a);B!==null;){if(B.callback===null)r(a);else if(B.startTime<=b)r(a),B.sortIndex=B.expirationTime,t(u,B);else break;B=n(a)}}function E(b){if(v=!1,y(b),!g)if(n(u)!==null)g=!0,ae(P);else{var B=n(a);B!==null&&pe(E,B.startTime-b)}}function P(b,B){g=!1,v&&(v=!1,h(T),T=-1),p=!0;var w=d;try{for(y(B),f=n(u);f!==null&&(!(f.expirationTime>B)||b&&!D());){var V=f.callback;if(typeof V=="function"){f.callback=null,d=f.priorityLevel;var Z=V(f.expirationTime<=B);B=e.unstable_now(),typeof Z=="function"?f.callback=Z:f===n(u)&&r(u),y(B)}else r(u);f=n(u)}if(f!==null)var x=!0;else{var ie=n(a);ie!==null&&pe(E,ie.startTime-B),x=!1}return x}finally{f=null,d=w,p=!1}}var k=!1,O=null,T=-1,z=5,M=-1;function D(){return!(e.unstable_now()-Mb||125V?(b.sortIndex=w,t(a,b),n(u)===null&&b===n(a)&&(v?(h(T),T=-1):v=!0,pe(E,w-V))):(b.sortIndex=Z,t(u,b),g||p||(g=!0,ae(P))),b},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(b){var B=d;return function(){var w=d;d=B;try{return b.apply(this,arguments)}finally{d=w}}}})(zh);Dh.exports=zh;var uw=Dh.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 aw=A,ft=uw;function N(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"),Lu=Object.prototype.hasOwnProperty,cw=/^[: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]*$/,If={},Af={};function fw(e){return Lu.call(Af,e)?!0:Lu.call(If,e)?!1:cw.test(e)?Af[e]=!0:(If[e]=!0,!1)}function dw(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function pw(e,t,n,r){if(t===null||typeof t>"u"||dw(e,t,n,r))return!0;if(r)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 Qe(e,t,n,r,i,l,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=l,this.removeEmptyString=o}var Le={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Le[e]=new Qe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Le[t]=new Qe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Le[e]=new Qe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Le[e]=new Qe(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){Le[e]=new Qe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Le[e]=new Qe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Le[e]=new Qe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Le[e]=new Qe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Le[e]=new Qe(e,5,!1,e.toLowerCase(),null,!1,!1)});var ic=/[\-:]([a-z])/g;function lc(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(ic,lc);Le[t]=new Qe(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(ic,lc);Le[t]=new Qe(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(ic,lc);Le[t]=new Qe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Le[e]=new Qe(e,1,!1,e.toLowerCase(),null,!1,!1)});Le.xlinkHref=new Qe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Le[e]=new Qe(e,1,!1,e.toLowerCase(),null,!0,!0)});function oc(e,t,n,r){var i=Le.hasOwnProperty(t)?Le[t]:null;(i!==null?i.type!==0:r||!(2s||i[o]!==l[s]){var u=` -`+i[o].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=o&&0<=s);break}}}finally{Us=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Li(e):""}function hw(e){switch(e.tag){case 5:return Li(e.type);case 16:return Li("Lazy");case 13:return Li("Suspense");case 19:return Li("SuspenseList");case 0:case 2:case 15:return e=$s(e.type,!1),e;case 11:return e=$s(e.type.render,!1),e;case 1:return e=$s(e.type,!0),e;default:return""}}function Mu(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 Nr:return"Fragment";case Or:return"Portal";case Du:return"Profiler";case sc:return"StrictMode";case zu:return"Suspense";case Fu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case jh:return(e.displayName||"Context")+".Consumer";case Mh:return(e._context.displayName||"Context")+".Provider";case uc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ac:return t=e.displayName||null,t!==null?t:Mu(e.type)||"Memo";case wn:t=e._payload,e=e._init;try{return Mu(e(t))}catch{}}return null}function mw(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 Mu(t);case 8:return t===sc?"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 Un(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Uh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function yw(e){var t=Uh(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,l.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ml(e){e._valueTracker||(e._valueTracker=yw(e))}function $h(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Uh(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Co(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 ju(e,t){var n=t.checked;return ge({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Lf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Un(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Hh(e,t){t=t.checked,t!=null&&oc(e,"checked",t,!1)}function Bu(e,t){Hh(e,t);var n=Un(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Uu(e,t.type,n):t.hasOwnProperty("defaultValue")&&Uu(e,t.type,Un(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Df(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="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 Uu(e,t,n){(t!=="number"||Co(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Di=Array.isArray;function Ur(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=jl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Yi(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ji={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},gw=["Webkit","ms","Moz","O"];Object.keys(ji).forEach(function(e){gw.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ji[t]=ji[e]})});function Qh(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ji.hasOwnProperty(e)&&ji[e]?(""+t).trim():t+"px"}function Kh(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Qh(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var vw=ge({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 Vu(e,t){if(t){if(vw[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(N(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(N(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(N(61))}if(t.style!=null&&typeof t.style!="object")throw Error(N(62))}}function qu(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 Wu=null;function cc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Qu=null,$r=null,Hr=null;function Mf(e){if(e=_l(e)){if(typeof Qu!="function")throw Error(N(280));var t=e.stateNode;t&&(t=as(t),Qu(e.stateNode,e.type,t))}}function Gh(e){$r?Hr?Hr.push(e):Hr=[e]:$r=e}function Xh(){if($r){var e=$r,t=Hr;if(Hr=$r=null,Mf(e),t)for(e=0;e>>=0,e===0?32:31-(Ow(e)/Nw|0)|0}var Bl=64,Ul=4194304;function zi(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 Ro(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,l=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~i;s!==0?r=zi(s):(l&=o,l!==0&&(r=zi(l)))}else o=n&~i,o!==0?r=zi(o):l!==0&&(r=zi(l));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,l=t&-t,i>=l||i===16&&(l&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Cl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-bt(t),e[t]=n}function Lw(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 r=e.eventTimes;for(e=e.expirationTimes;0=Ui),Qf=" ",Kf=!1;function ym(e,t){switch(e){case"keyup":return u0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function gm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ir=!1;function c0(e,t){switch(e){case"compositionend":return gm(t);case"keypress":return t.which!==32?null:(Kf=!0,Qf);case"textInput":return e=t.data,e===Qf&&Kf?null:e;default:return null}}function f0(e,t){if(Ir)return e==="compositionend"||!vc&&ym(e,t)?(e=hm(),so=mc=Nn=null,Ir=!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=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Yf(n)}}function xm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?xm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function km(){for(var e=window,t=Co();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Co(e.document)}return t}function wc(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 S0(e){var t=km(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&xm(n.ownerDocument.documentElement,n)){if(r!==null&&wc(n)){if(t=r.start,e=r.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 i=n.textContent.length,l=Math.min(r.start,i);r=r.end===void 0?l:Math.min(r.end,i),!e.extend&&l>r&&(i=r,r=l,l=i),i=Zf(n,l);var o=Zf(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),l>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.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,Ar=null,Zu=null,Hi=null,ea=!1;function ed(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ea||Ar==null||Ar!==Co(r)||(r=Ar,"selectionStart"in r&&wc(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Hi&&il(Hi,r)||(Hi=r,r=Io(Zu,"onSelect"),0Dr||(e.current=oa[Dr],oa[Dr]=null,Dr--)}function oe(e,t){Dr++,oa[Dr]=e.current,e.current=t}var $n={},Be=qn($n),Ye=qn(!1),dr=$n;function li(e,t){var n=e.type.contextTypes;if(!n)return $n;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},l;for(l in n)i[l]=t[l];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ze(e){return e=e.childContextTypes,e!=null}function bo(){de(Ye),de(Be)}function sd(e,t,n){if(Be.current!==$n)throw Error(N(168));oe(Be,t),oe(Ye,n)}function Im(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(N(108,mw(e)||"Unknown",i));return ge({},n,r)}function Lo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||$n,dr=Be.current,oe(Be,e),oe(Ye,Ye.current),!0}function ud(e,t,n){var r=e.stateNode;if(!r)throw Error(N(169));n?(e=Im(e,t,dr),r.__reactInternalMemoizedMergedChildContext=e,de(Ye),de(Be),oe(Be,e)):de(Ye),oe(Ye,n)}var en=null,cs=!1,nu=!1;function Am(e){en===null?en=[e]:en.push(e)}function A0(e){cs=!0,Am(e)}function Wn(){if(!nu&&en!==null){nu=!0;var e=0,t=ne;try{var n=en;for(ne=1;e>=o,i-=o,rn=1<<32-bt(t)+i|n<T?(z=O,O=null):z=O.sibling;var M=d(h,O,y[T],E);if(M===null){O===null&&(O=z);break}e&&O&&M.alternate===null&&t(h,O),m=l(M,m,T),k===null?P=M:k.sibling=M,k=M,O=z}if(T===y.length)return n(h,O),he&&Gn(h,T),P;if(O===null){for(;TT?(z=O,O=null):z=O.sibling;var D=d(h,O,M.value,E);if(D===null){O===null&&(O=z);break}e&&O&&D.alternate===null&&t(h,O),m=l(D,m,T),k===null?P=D:k.sibling=D,k=D,O=z}if(M.done)return n(h,O),he&&Gn(h,T),P;if(O===null){for(;!M.done;T++,M=y.next())M=f(h,M.value,E),M!==null&&(m=l(M,m,T),k===null?P=M:k.sibling=M,k=M);return he&&Gn(h,T),P}for(O=r(h,O);!M.done;T++,M=y.next())M=p(O,h,T,M.value,E),M!==null&&(e&&M.alternate!==null&&O.delete(M.key===null?T:M.key),m=l(M,m,T),k===null?P=M:k.sibling=M,k=M);return e&&O.forEach(function(j){return t(h,j)}),he&&Gn(h,T),P}function S(h,m,y,E){if(typeof y=="object"&&y!==null&&y.type===Nr&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Fl:e:{for(var P=y.key,k=m;k!==null;){if(k.key===P){if(P=y.type,P===Nr){if(k.tag===7){n(h,k.sibling),m=i(k,y.props.children),m.return=h,h=m;break e}}else if(k.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===wn&&fd(P)===k.type){n(h,k.sibling),m=i(k,y.props),m.ref=Ri(h,k,y),m.return=h,h=m;break e}n(h,k);break}else t(h,k);k=k.sibling}y.type===Nr?(m=ar(y.props.children,h.mode,E,y.key),m.return=h,h=m):(E=yo(y.type,y.key,y.props,null,h.mode,E),E.ref=Ri(h,m,y),E.return=h,h=E)}return o(h);case Or:e:{for(k=y.key;m!==null;){if(m.key===k)if(m.tag===4&&m.stateNode.containerInfo===y.containerInfo&&m.stateNode.implementation===y.implementation){n(h,m.sibling),m=i(m,y.children||[]),m.return=h,h=m;break e}else{n(h,m);break}else t(h,m);m=m.sibling}m=cu(y,h.mode,E),m.return=h,h=m}return o(h);case wn:return k=y._init,S(h,m,k(y._payload),E)}if(Di(y))return g(h,m,y,E);if(Ei(y))return v(h,m,y,E);Kl(h,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,m!==null&&m.tag===6?(n(h,m.sibling),m=i(m,y),m.return=h,h=m):(n(h,m),m=au(y,h.mode,E),m.return=h,h=m),o(h)):n(h,m)}return S}var si=zm(!0),Fm=zm(!1),Fo=qn(null),Mo=null,Mr=null,Ec=null;function Cc(){Ec=Mr=Mo=null}function Pc(e){var t=Fo.current;de(Fo),e._currentValue=t}function aa(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function qr(e,t){Mo=e,Ec=Mr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Je=!0),e.firstContext=null)}function kt(e){var t=e._currentValue;if(Ec!==e)if(e={context:e,memoizedValue:t,next:null},Mr===null){if(Mo===null)throw Error(N(308));Mr=e,Mo.dependencies={lanes:0,firstContext:e}}else Mr=Mr.next=e;return t}var er=null;function _c(e){er===null?er=[e]:er.push(e)}function Mm(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,_c(t)):(n.next=i.next,i.next=n),t.interleaved=n,fn(e,r)}function fn(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 Sn=!1;function Tc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function jm(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 on(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Fn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ee&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,fn(e,n)}return i=r.interleaved,i===null?(t.next=t,_c(r)):(t.next=i.next,i.next=t),r.interleaved=t,fn(e,n)}function ao(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,dc(e,n)}}function dd(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,l=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};l===null?i=l=o:l=l.next=o,n=n.next}while(n!==null);l===null?i=l=t:l=l.next=t}else i=l=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:l,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function jo(e,t,n,r){var i=e.updateQueue;Sn=!1;var l=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var u=s,a=u.next;u.next=null,o===null?l=a:o.next=a,o=u;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==o&&(s===null?c.firstBaseUpdate=a:s.next=a,c.lastBaseUpdate=u))}if(l!==null){var f=i.baseState;o=0,c=a=u=null,s=l;do{var d=s.lane,p=s.eventTime;if((r&d)===d){c!==null&&(c=c.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var g=e,v=s;switch(d=t,p=n,v.tag){case 1:if(g=v.payload,typeof g=="function"){f=g.call(p,f,d);break e}f=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=v.payload,d=typeof g=="function"?g.call(p,f,d):g,d==null)break e;f=ge({},f,d);break e;case 2:Sn=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[s]:d.push(s))}else p={eventTime:p,lane:d,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(a=c=p,u=f):c=c.next=p,o|=d;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;d=s,s=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(c===null&&(u=f),i.baseState=u,i.firstBaseUpdate=a,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else l===null&&(i.shared.lanes=0);mr|=o,e.lanes=o,e.memoizedState=f}}function pd(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=iu.transition;iu.transition={};try{e(!1),t()}finally{ne=n,iu.transition=r}}function ny(){return Et().memoizedState}function z0(e,t,n){var r=jn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ry(e))iy(t,n);else if(n=Mm(e,t,n,r),n!==null){var i=qe();Lt(n,e,r,i),ly(n,t,r)}}function F0(e,t,n){var r=jn(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ry(e))iy(t,i);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var o=t.lastRenderedState,s=l(o,n);if(i.hasEagerState=!0,i.eagerState=s,Dt(s,o)){var u=t.interleaved;u===null?(i.next=i,_c(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=Mm(e,t,i,r),n!==null&&(i=qe(),Lt(n,e,r,i),ly(n,t,r))}}function ry(e){var t=e.alternate;return e===ye||t!==null&&t===ye}function iy(e,t){Vi=Uo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ly(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,dc(e,n)}}var $o={readContext:kt,useCallback:De,useContext:De,useEffect:De,useImperativeHandle:De,useInsertionEffect:De,useLayoutEffect:De,useMemo:De,useReducer:De,useRef:De,useState:De,useDebugValue:De,useDeferredValue:De,useTransition:De,useMutableSource:De,useSyncExternalStore:De,useId:De,unstable_isNewReconciler:!1},M0={readContext:kt,useCallback:function(e,t){return Bt().memoizedState=[e,t===void 0?null:t],e},useContext:kt,useEffect:md,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,fo(4194308,4,Jm.bind(null,t,e),n)},useLayoutEffect:function(e,t){return fo(4194308,4,e,t)},useInsertionEffect:function(e,t){return fo(4,2,e,t)},useMemo:function(e,t){var n=Bt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Bt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=z0.bind(null,ye,e),[r.memoizedState,e]},useRef:function(e){var t=Bt();return e={current:e},t.memoizedState=e},useState:hd,useDebugValue:Dc,useDeferredValue:function(e){return Bt().memoizedState=e},useTransition:function(){var e=hd(!1),t=e[0];return e=D0.bind(null,e[1]),Bt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ye,i=Bt();if(he){if(n===void 0)throw Error(N(407));n=n()}else{if(n=t(),Oe===null)throw Error(N(349));hr&30||Hm(r,t,n)}i.memoizedState=n;var l={value:n,getSnapshot:t};return i.queue=l,md(qm.bind(null,r,l,e),[e]),r.flags|=2048,dl(9,Vm.bind(null,r,l,n,t),void 0,null),n},useId:function(){var e=Bt(),t=Oe.identifierPrefix;if(he){var n=ln,r=rn;n=(r&~(1<<32-bt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=cl++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[qt]=t,e[sl]=r,my(e,t,!1,!1),t.stateNode=e;e:{switch(o=qu(n,r),n){case"dialog":fe("cancel",e),fe("close",e),i=r;break;case"iframe":case"object":case"embed":fe("load",e),i=r;break;case"video":case"audio":for(i=0;ici&&(t.flags|=128,r=!0,Oi(l,!1),t.lanes=4194304)}else{if(!r)if(e=Bo(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Oi(l,!0),l.tail===null&&l.tailMode==="hidden"&&!o.alternate&&!he)return ze(t),null}else 2*ke()-l.renderingStartTime>ci&&n!==1073741824&&(t.flags|=128,r=!0,Oi(l,!1),t.lanes=4194304);l.isBackwards?(o.sibling=t.child,t.child=o):(n=l.last,n!==null?n.sibling=o:t.child=o,l.last=o)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=ke(),t.sibling=null,n=me.current,oe(me,r?n&1|2:n&1),t):(ze(t),null);case 22:case 23:return Uc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ot&1073741824&&(ze(t),t.subtreeFlags&6&&(t.flags|=8192)):ze(t),null;case 24:return null;case 25:return null}throw Error(N(156,t.tag))}function W0(e,t){switch(xc(t),t.tag){case 1:return Ze(t.type)&&bo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ui(),de(Ye),de(Be),Nc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Oc(t),null;case 13:if(de(me),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(N(340));oi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return de(me),null;case 4:return ui(),null;case 10:return Pc(t.type._context),null;case 22:case 23:return Uc(),null;case 24:return null;default:return null}}var Xl=!1,Me=!1,Q0=typeof WeakSet=="function"?WeakSet:Set,F=null;function jr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Se(e,t,r)}else n.current=null}function va(e,t,n){try{n()}catch(r){Se(e,t,r)}}var _d=!1;function K0(e,t){if(ta=Oo,e=km(),wc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,l=r.focusNode;r=r.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var o=0,s=-1,u=-1,a=0,c=0,f=e,d=null;t:for(;;){for(var p;f!==n||i!==0&&f.nodeType!==3||(s=o+i),f!==l||r!==0&&f.nodeType!==3||(u=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(p=f.firstChild)!==null;)d=f,f=p;for(;;){if(f===e)break t;if(d===n&&++a===i&&(s=o),d===l&&++c===r&&(u=o),(p=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=p}n=s===-1||u===-1?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(na={focusedElem:e,selectionRange:n},Oo=!1,F=t;F!==null;)if(t=F,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,F=e;else for(;F!==null;){t=F;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var v=g.memoizedProps,S=g.memoizedState,h=t.stateNode,m=h.getSnapshotBeforeUpdate(t.elementType===t.type?v:_t(t.type,v),S);h.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(N(163))}}catch(E){Se(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,F=e;break}F=t.return}return g=_d,_d=!1,g}function qi(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var l=i.destroy;i.destroy=void 0,l!==void 0&&va(t,n,l)}i=i.next}while(i!==r)}}function ps(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 r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function wa(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 vy(e){var t=e.alternate;t!==null&&(e.alternate=null,vy(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[qt],delete t[sl],delete t[la],delete t[N0],delete t[I0])),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 wy(e){return e.tag===5||e.tag===3||e.tag===4}function Td(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||wy(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 Sa(e,t,n){var r=e.tag;if(r===5||r===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=Ao));else if(r!==4&&(e=e.child,e!==null))for(Sa(e,t,n),e=e.sibling;e!==null;)Sa(e,t,n),e=e.sibling}function xa(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(xa(e,t,n),e=e.sibling;e!==null;)xa(e,t,n),e=e.sibling}var Ie=null,Nt=!1;function yn(e,t,n){for(n=n.child;n!==null;)Sy(e,t,n),n=n.sibling}function Sy(e,t,n){if(Qt&&typeof Qt.onCommitFiberUnmount=="function")try{Qt.onCommitFiberUnmount(ls,n)}catch{}switch(n.tag){case 5:Me||jr(n,t);case 6:var r=Ie,i=Nt;Ie=null,yn(e,t,n),Ie=r,Nt=i,Ie!==null&&(Nt?(e=Ie,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ie.removeChild(n.stateNode));break;case 18:Ie!==null&&(Nt?(e=Ie,n=n.stateNode,e.nodeType===8?tu(e.parentNode,n):e.nodeType===1&&tu(e,n),nl(e)):tu(Ie,n.stateNode));break;case 4:r=Ie,i=Nt,Ie=n.stateNode.containerInfo,Nt=!0,yn(e,t,n),Ie=r,Nt=i;break;case 0:case 11:case 14:case 15:if(!Me&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var l=i,o=l.destroy;l=l.tag,o!==void 0&&(l&2||l&4)&&va(n,t,o),i=i.next}while(i!==r)}yn(e,t,n);break;case 1:if(!Me&&(jr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Se(n,t,s)}yn(e,t,n);break;case 21:yn(e,t,n);break;case 22:n.mode&1?(Me=(r=Me)||n.memoizedState!==null,yn(e,t,n),Me=r):yn(e,t,n);break;default:yn(e,t,n)}}function Rd(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Q0),t.forEach(function(r){var i=r1.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Pt(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=o),r&=~l}if(r=i,r=ke()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*X0(r/1960))-r,10e?16:e,In===null)var r=!1;else{if(e=In,In=null,qo=0,ee&6)throw Error(N(331));var i=ee;for(ee|=4,F=e.current;F!==null;){var l=F,o=l.child;if(F.flags&16){var s=l.deletions;if(s!==null){for(var u=0;uke()-jc?ur(e,0):Mc|=n),et(e,t)}function Ry(e,t){t===0&&(e.mode&1?(t=Ul,Ul<<=1,!(Ul&130023424)&&(Ul=4194304)):t=1);var n=qe();e=fn(e,t),e!==null&&(Cl(e,t,n),et(e,n))}function n1(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ry(e,n)}function r1(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(N(314))}r!==null&&r.delete(t),Ry(e,n)}var Oy;Oy=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ye.current)Je=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Je=!1,V0(e,t,n);Je=!!(e.flags&131072)}else Je=!1,he&&t.flags&1048576&&bm(t,zo,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;po(e,t),e=t.pendingProps;var i=li(t,Be.current);qr(t,n),i=Ac(null,t,r,e,i,n);var l=bc();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ze(r)?(l=!0,Lo(t)):l=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Tc(t),i.updater=ds,t.stateNode=i,i._reactInternals=t,fa(t,r,e,n),t=ha(null,t,r,!0,l,n)):(t.tag=0,he&&l&&Sc(t),Ve(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(po(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=l1(r),e=_t(r,e),i){case 0:t=pa(null,t,r,e,n);break e;case 1:t=Ed(null,t,r,e,n);break e;case 11:t=xd(null,t,r,e,n);break e;case 14:t=kd(null,t,r,_t(r.type,e),n);break e}throw Error(N(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:_t(r,i),pa(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:_t(r,i),Ed(e,t,r,i,n);case 3:e:{if(dy(t),e===null)throw Error(N(387));r=t.pendingProps,l=t.memoizedState,i=l.element,jm(e,t),jo(t,r,null,n);var o=t.memoizedState;if(r=o.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){i=ai(Error(N(423)),t),t=Cd(e,t,r,n,i);break e}else if(r!==i){i=ai(Error(N(424)),t),t=Cd(e,t,r,n,i);break e}else for(st=zn(t.stateNode.containerInfo.firstChild),at=t,he=!0,It=null,n=Fm(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(oi(),r===i){t=dn(e,t,n);break e}Ve(e,t,r,n)}t=t.child}return t;case 5:return Bm(t),e===null&&ua(t),r=t.type,i=t.pendingProps,l=e!==null?e.memoizedProps:null,o=i.children,ra(r,i)?o=null:l!==null&&ra(r,l)&&(t.flags|=32),fy(e,t),Ve(e,t,o,n),t.child;case 6:return e===null&&ua(t),null;case 13:return py(e,t,n);case 4:return Rc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=si(t,null,r,n):Ve(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:_t(r,i),xd(e,t,r,i,n);case 7:return Ve(e,t,t.pendingProps,n),t.child;case 8:return Ve(e,t,t.pendingProps.children,n),t.child;case 12:return Ve(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,l=t.memoizedProps,o=i.value,oe(Fo,r._currentValue),r._currentValue=o,l!==null)if(Dt(l.value,o)){if(l.children===i.children&&!Ye.current){t=dn(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var s=l.dependencies;if(s!==null){o=l.child;for(var u=s.firstContext;u!==null;){if(u.context===r){if(l.tag===1){u=on(-1,n&-n),u.tag=2;var a=l.updateQueue;if(a!==null){a=a.shared;var c=a.pending;c===null?u.next=u:(u.next=c.next,c.next=u),a.pending=u}}l.lanes|=n,u=l.alternate,u!==null&&(u.lanes|=n),aa(l.return,n,t),s.lanes|=n;break}u=u.next}}else if(l.tag===10)o=l.type===t.type?null:l.child;else if(l.tag===18){if(o=l.return,o===null)throw Error(N(341));o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),aa(o,n,t),o=l.sibling}else o=l.child;if(o!==null)o.return=l;else for(o=l;o!==null;){if(o===t){o=null;break}if(l=o.sibling,l!==null){l.return=o.return,o=l;break}o=o.return}l=o}Ve(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,qr(t,n),i=kt(i),r=r(i),t.flags|=1,Ve(e,t,r,n),t.child;case 14:return r=t.type,i=_t(r,t.pendingProps),i=_t(r.type,i),kd(e,t,r,i,n);case 15:return ay(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:_t(r,i),po(e,t),t.tag=1,Ze(r)?(e=!0,Lo(t)):e=!1,qr(t,n),oy(t,r,i),fa(t,r,i,n),ha(null,t,r,!0,e,n);case 19:return hy(e,t,n);case 22:return cy(e,t,n)}throw Error(N(156,t.tag))};function Ny(e,t){return rm(e,t)}function i1(e,t,n,r){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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function St(e,t,n,r){return new i1(e,t,n,r)}function Hc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function l1(e){if(typeof e=="function")return Hc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===uc)return 11;if(e===ac)return 14}return 2}function Bn(e,t){var n=e.alternate;return n===null?(n=St(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 yo(e,t,n,r,i,l){var o=2;if(r=e,typeof e=="function")Hc(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Nr:return ar(n.children,i,l,t);case sc:o=8,i|=8;break;case Du:return e=St(12,n,t,i|2),e.elementType=Du,e.lanes=l,e;case zu:return e=St(13,n,t,i),e.elementType=zu,e.lanes=l,e;case Fu:return e=St(19,n,t,i),e.elementType=Fu,e.lanes=l,e;case Bh:return ms(n,i,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Mh:o=10;break e;case jh:o=9;break e;case uc:o=11;break e;case ac:o=14;break e;case wn:o=16,r=null;break e}throw Error(N(130,e==null?e:typeof e,""))}return t=St(o,n,t,i),t.elementType=e,t.type=r,t.lanes=l,t}function ar(e,t,n,r){return e=St(7,e,r,t),e.lanes=n,e}function ms(e,t,n,r){return e=St(22,e,r,t),e.elementType=Bh,e.lanes=n,e.stateNode={isHidden:!1},e}function au(e,t,n){return e=St(6,e,null,t),e.lanes=n,e}function cu(e,t,n){return t=St(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function o1(e,t,n,r,i){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=Vs(0),this.expirationTimes=Vs(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vs(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Vc(e,t,n,r,i,l,o,s,u){return e=new o1(e,t,n,s,u),t===1?(t=1,l===!0&&(t|=8)):t=0,l=St(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Tc(l),e}function s1(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ly)}catch(e){console.error(e)}}Ly(),Lh.exports=ht;var d1=Lh.exports,zd=d1;bu.createRoot=zd.createRoot,bu.hydrateRoot=zd.hydrateRoot;/** - * @remix-run/router v1.23.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 - */function hl(){return hl=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Dy(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function h1(){return Math.random().toString(36).substr(2,8)}function Md(e,t){return{usr:e.state,key:e.key,idx:t}}function _a(e,t,n,r){return n===void 0&&(n=null),hl({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?mi(t):t,{state:n,key:t&&t.key||r||h1()})}function zy(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function mi(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function m1(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:l=!1}=r,o=i.history,s=An.Pop,u=null,a=c();a==null&&(a=0,o.replaceState(hl({},o.state,{idx:a}),""));function c(){return(o.state||{idx:null}).idx}function f(){s=An.Pop;let S=c(),h=S==null?null:S-a;a=S,u&&u({action:s,location:v.location,delta:h})}function d(S,h){s=An.Push;let m=_a(v.location,S,h);a=c()+1;let y=Md(m,a),E=v.createHref(m);try{o.pushState(y,"",E)}catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;i.location.assign(E)}l&&u&&u({action:s,location:v.location,delta:1})}function p(S,h){s=An.Replace;let m=_a(v.location,S,h);a=c();let y=Md(m,a),E=v.createHref(m);o.replaceState(y,"",E),l&&u&&u({action:s,location:v.location,delta:0})}function g(S){let h=i.location.origin!=="null"?i.location.origin:i.location.href,m=typeof S=="string"?S:zy(S);return m=m.replace(/ $/,"%20"),Te(h,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,h)}let v={get action(){return s},get location(){return e(i,o)},listen(S){if(u)throw new Error("A history only accepts one active listener");return i.addEventListener(Fd,f),u=S,()=>{i.removeEventListener(Fd,f),u=null}},createHref(S){return t(i,S)},createURL:g,encodeLocation(S){let h=g(S);return{pathname:h.pathname,search:h.search,hash:h.hash}},push:d,replace:p,go(S){return o.go(S)}};return v}var jd;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(jd||(jd={}));function y1(e,t,n){return n===void 0&&(n="/"),g1(e,t,n)}function g1(e,t,n,r){let i=typeof t=="string"?mi(t):t,l=jy(i.pathname||"/",n);if(l==null)return null;let o=Fy(e);v1(o);let s=null;for(let u=0;s==null&&u{let u={relativePath:s===void 0?l.path||"":s,caseSensitive:l.caseSensitive===!0,childrenIndex:o,route:l};u.relativePath.startsWith("/")&&(Te(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let a=cr([r,u.relativePath]),c=n.concat(u);l.children&&l.children.length>0&&(Te(l.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+a+'".')),Fy(l.children,t,c,a)),!(l.path==null&&!l.index)&&t.push({path:a,score:P1(a,l.index),routesMeta:c})};return e.forEach((l,o)=>{var s;if(l.path===""||!((s=l.path)!=null&&s.includes("?")))i(l,o);else for(let u of My(l.path))i(l,o,u)}),t}function My(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),l=n.replace(/\?$/,"");if(r.length===0)return i?[l,""]:[l];let o=My(r.join("/")),s=[];return s.push(...o.map(u=>u===""?l:[l,u].join("/"))),i&&s.push(...o),s.map(u=>e.startsWith("/")&&u===""?"/":u)}function v1(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:_1(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const w1=/^:[\w-]+$/,S1=3,x1=2,k1=1,E1=10,C1=-2,Bd=e=>e==="*";function P1(e,t){let n=e.split("/"),r=n.length;return n.some(Bd)&&(r+=C1),t&&(r+=x1),n.filter(i=>!Bd(i)).reduce((i,l)=>i+(w1.test(l)?S1:l===""?k1:E1),r)}function _1(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function T1(e,t,n){let{routesMeta:r}=e,i={},l="/",o=[];for(let s=0;s{let{paramName:d,isOptional:p}=c;if(d==="*"){let v=s[f]||"";o=l.slice(0,l.length-v.length).replace(/(.)\/+$/,"$1")}const g=s[f];return p&&!g?a[d]=void 0:a[d]=(g||"").replace(/%2F/g,"/"),a},{}),pathname:l,pathnameBase:o,pattern:e}}function O1(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Dy(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,u)=>(r.push({paramName:s,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function N1(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Dy(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function jy(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function I1(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?mi(e):e;return{pathname:n?n.startsWith("/")?n:A1(n,t):t,search:F1(r),hash:M1(i)}}function A1(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function fu(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function b1(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function L1(e,t){let n=b1(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function D1(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=mi(e):(i=hl({},e),Te(!i.pathname||!i.pathname.includes("?"),fu("?","pathname","search",i)),Te(!i.pathname||!i.pathname.includes("#"),fu("#","pathname","hash",i)),Te(!i.search||!i.search.includes("#"),fu("#","search","hash",i)));let l=e===""||i.pathname==="",o=l?"/":i.pathname,s;if(o==null)s=n;else{let f=t.length-1;if(!r&&o.startsWith("..")){let d=o.split("/");for(;d[0]==="..";)d.shift(),f-=1;i.pathname=d.join("/")}s=f>=0?t[f]:"/"}let u=I1(i,s),a=o&&o!=="/"&&o.endsWith("/"),c=(l||o===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(a||c)&&(u.pathname+="/"),u}const cr=e=>e.join("/").replace(/\/\/+/g,"/"),z1=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),F1=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,M1=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function j1(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const By=["post","put","patch","delete"];new Set(By);const B1=["get",...By];new Set(B1);/** - * React Router v6.30.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 - */function ml(){return ml=Object.assign?Object.assign.bind():function(e){for(var t=1;t{s.current=!0}),A.useCallback(function(a,c){if(c===void 0&&(c={}),!s.current)return;if(typeof a=="number"){r.go(a);return}let f=D1(a,JSON.parse(o),l,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:cr([t,f.pathname])),(c.replace?r.replace:r.push)(f,c.state,c)},[t,r,o,l,e])}function H1(e,t){return V1(e,t)}function V1(e,t,n,r){ks()||Te(!1);let{navigator:i,static:l}=A.useContext(Ss),{matches:o}=A.useContext(yi),s=o[o.length-1],u=s?s.params:{};s&&s.pathname;let a=s?s.pathnameBase:"/";s&&s.route;let c=$y(),f;if(t){var d;let h=typeof t=="string"?mi(t):t;a==="/"||(d=h.pathname)!=null&&d.startsWith(a)||Te(!1),f=h}else f=c;let p=f.pathname||"/",g=p;if(a!=="/"){let h=a.replace(/^\//,"").split("/");g="/"+p.replace(/^\//,"").split("/").slice(h.length).join("/")}let v=y1(e,{pathname:g}),S=G1(v&&v.map(h=>Object.assign({},h,{params:Object.assign({},u,h.params),pathname:cr([a,i.encodeLocation?i.encodeLocation(h.pathname).pathname:h.pathname]),pathnameBase:h.pathnameBase==="/"?a:cr([a,i.encodeLocation?i.encodeLocation(h.pathnameBase).pathname:h.pathnameBase])})),o,n,r);return t&&S?A.createElement(xs.Provider,{value:{location:ml({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:An.Pop}},S):S}function q1(){let e=Z1(),t=j1(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return A.createElement(A.Fragment,null,A.createElement("h2",null,"Unexpected Application Error!"),A.createElement("h3",{style:{fontStyle:"italic"}},t),n?A.createElement("pre",{style:i},n):null,null)}const W1=A.createElement(q1,null);class Q1 extends A.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?A.createElement(yi.Provider,{value:this.props.routeContext},A.createElement(Uy.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function K1(e){let{routeContext:t,match:n,children:r}=e,i=A.useContext(Kc);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),A.createElement(yi.Provider,{value:t},r)}function G1(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var l;if(!n)return null;if(n.errors)e=n.matches;else if((l=r)!=null&&l.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,s=(i=n)==null?void 0:i.errors;if(s!=null){let c=o.findIndex(f=>f.route.id&&(s==null?void 0:s[f.route.id])!==void 0);c>=0||Te(!1),o=o.slice(0,Math.min(o.length,c+1))}let u=!1,a=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c=0?o=o.slice(0,a+1):o=[o[0]];break}}}return o.reduceRight((c,f,d)=>{let p,g=!1,v=null,S=null;n&&(p=s&&f.route.id?s[f.route.id]:void 0,v=f.route.errorElement||W1,u&&(a<0&&d===0?(tS("route-fallback"),g=!0,S=null):a===d&&(g=!0,S=f.route.hydrateFallbackElement||null)));let h=t.concat(o.slice(0,d+1)),m=()=>{let y;return p?y=v:g?y=S:f.route.Component?y=A.createElement(f.route.Component,null):f.route.element?y=f.route.element:y=c,A.createElement(K1,{match:f,routeContext:{outlet:c,matches:h,isDataRoute:n!=null},children:y})};return n&&(f.route.ErrorBoundary||f.route.errorElement||d===0)?A.createElement(Q1,{location:n.location,revalidation:n.revalidation,component:v,error:p,children:m(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):m()},null)}var qy=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(qy||{}),Wy=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Wy||{});function X1(e){let t=A.useContext(Kc);return t||Te(!1),t}function J1(e){let t=A.useContext(U1);return t||Te(!1),t}function Y1(e){let t=A.useContext(yi);return t||Te(!1),t}function Qy(e){let t=Y1(),n=t.matches[t.matches.length-1];return n.route.id||Te(!1),n.route.id}function Z1(){var e;let t=A.useContext(Uy),n=J1(),r=Qy();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function eS(){let{router:e}=X1(qy.UseNavigateStable),t=Qy(Wy.UseNavigateStable),n=A.useRef(!1);return Hy(()=>{n.current=!0}),A.useCallback(function(i,l){l===void 0&&(l={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,ml({fromRouteId:t},l)))},[e,t])}const Ud={};function tS(e,t,n){Ud[e]||(Ud[e]=!0)}function nS(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Ta(e){Te(!1)}function rS(e){let{basename:t="/",children:n=null,location:r,navigationType:i=An.Pop,navigator:l,static:o=!1,future:s}=e;ks()&&Te(!1);let u=t.replace(/^\/*/,"/"),a=A.useMemo(()=>({basename:u,navigator:l,static:o,future:ml({v7_relativeSplatPath:!1},s)}),[u,s,l,o]);typeof r=="string"&&(r=mi(r));let{pathname:c="/",search:f="",hash:d="",state:p=null,key:g="default"}=r,v=A.useMemo(()=>{let S=jy(c,u);return S==null?null:{location:{pathname:S,search:f,hash:d,state:p,key:g},navigationType:i}},[u,c,f,d,p,g,i]);return v==null?null:A.createElement(Ss.Provider,{value:a},A.createElement(xs.Provider,{children:n,value:v}))}function iS(e){let{children:t,location:n}=e;return H1(Ra(t),n)}new Promise(()=>{});function Ra(e,t){t===void 0&&(t=[]);let n=[];return A.Children.forEach(e,(r,i)=>{if(!A.isValidElement(r))return;let l=[...t,i];if(r.type===A.Fragment){n.push.apply(n,Ra(r.props.children,l));return}r.type!==Ta&&Te(!1),!r.props.index||!r.props.children||Te(!1);let o={id:r.props.id||l.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Ra(r.props.children,l)),n.push(o)}),n}/** - * React Router DOM v6.30.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 - */const lS="6";try{window.__reactRouterVersion=lS}catch{}const oS="startTransition",$d=tw[oS];function sS(e){let{basename:t,children:n,future:r,window:i}=e,l=A.useRef();l.current==null&&(l.current=p1({window:i,v5Compat:!0}));let o=l.current,[s,u]=A.useState({action:o.action,location:o.location}),{v7_startTransition:a}=r||{},c=A.useCallback(f=>{a&&$d?$d(()=>u(f)):u(f)},[u,a]);return A.useLayoutEffect(()=>o.listen(c),[o,c]),A.useEffect(()=>nS(r),[r]),A.createElement(rS,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:o,future:r})}var Hd;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Hd||(Hd={}));var Vd;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Vd||(Vd={}));var Ky={exports:{}},Gy={};/** - * @license React - * use-sync-external-store-with-selector.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Rl=A;function uS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var aS=typeof Object.is=="function"?Object.is:uS,cS=Rl.useSyncExternalStore,fS=Rl.useRef,dS=Rl.useEffect,pS=Rl.useMemo,hS=Rl.useDebugValue;Gy.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var l=fS(null);if(l.current===null){var o={hasValue:!1,value:null};l.current=o}else o=l.current;l=pS(function(){function u(p){if(!a){if(a=!0,c=p,p=r(p),i!==void 0&&o.hasValue){var g=o.value;if(i(g,p))return f=g}return f=p}if(g=f,aS(c,p))return g;var v=r(p);return i!==void 0&&i(g,v)?(c=p,g):(c=p,f=v)}var a=!1,c,f,d=n===void 0?null:n;return[function(){return u(t())},d===null?void 0:function(){return u(d())}]},[t,n,r,i]);var s=cS(e,l[0],l[1]);return dS(function(){o.hasValue=!0,o.value=s},[s]),hS(s),s};Ky.exports=Gy;var mS=Ky.exports;function yS(e){e()}function gS(){let e=null,t=null;return{clear(){e=null,t=null},notify(){yS(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var qd={notify(){},get:()=>[]};function vS(e,t){let n,r=qd,i=0,l=!1;function o(v){c();const S=r.subscribe(v);let h=!1;return()=>{h||(h=!0,S(),f())}}function s(){r.notify()}function u(){g.onStateChange&&g.onStateChange()}function a(){return l}function c(){i++,n||(n=e.subscribe(u),r=gS())}function f(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=qd)}function d(){l||(l=!0,c())}function p(){l&&(l=!1,f())}const g={addNestedSub:o,notifyNestedSubs:s,handleChangeWrapper:u,isSubscribed:a,trySubscribe:d,tryUnsubscribe:p,getListeners:()=>r};return g}var wS=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",SS=wS(),xS=()=>typeof navigator<"u"&&navigator.product==="ReactNative",kS=xS(),ES=()=>SS||kS?A.useLayoutEffect:A.useEffect,CS=ES(),du=Symbol.for("react-redux-context"),pu=typeof globalThis<"u"?globalThis:{};function PS(){if(!A.createContext)return{};const e=pu[du]??(pu[du]=new Map);let t=e.get(A.createContext);return t||(t=A.createContext(null),e.set(A.createContext,t)),t}var Hn=PS();function _S(e){const{children:t,context:n,serverState:r,store:i}=e,l=A.useMemo(()=>{const u=vS(i);return{store:i,subscription:u,getServerState:r?()=>r:void 0}},[i,r]),o=A.useMemo(()=>i.getState(),[i]);CS(()=>{const{subscription:u}=l;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),o!==i.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[l,o]);const s=n||Hn;return A.createElement(s.Provider,{value:l},t)}var TS=_S;function Gc(e=Hn){return function(){return A.useContext(e)}}var Xy=Gc();function Jy(e=Hn){const t=e===Hn?Xy:Gc(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var RS=Jy();function OS(e=Hn){const t=e===Hn?RS:Jy(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var NS=OS(),IS=(e,t)=>e===t;function AS(e=Hn){const t=e===Hn?Xy:Gc(e),n=(r,i={})=>{const{equalityFn:l=IS}=typeof i=="function"?{equalityFn:i}:i,o=t(),{store:s,subscription:u,getServerState:a}=o;A.useRef(!0);const c=A.useCallback({[r.name](d){return r(d)}}[r.name],[r]),f=mS.useSyncExternalStoreWithSelector(u.addNestedSub,s.getState,a||s.getState,c,l);return A.useDebugValue(f),f};return Object.assign(n,{withTypes:()=>n}),n}var bS=AS();function LS(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const DS=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,zS=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,FS={};function Wd(e,t){return(FS.jsx?zS:DS).test(e)}const MS=/[ \t\n\f\r]/g;function jS(e){return typeof e=="object"?e.type==="text"?Qd(e.value):!1:Qd(e)}function Qd(e){return e.replace(MS,"")===""}class Ol{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Ol.prototype.normal={};Ol.prototype.property={};Ol.prototype.space=void 0;function Yy(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Ol(n,r,t)}function Oa(e){return e.toLowerCase()}class rt{constructor(t,n){this.attribute=n,this.property=t}}rt.prototype.attribute="";rt.prototype.booleanish=!1;rt.prototype.boolean=!1;rt.prototype.commaOrSpaceSeparated=!1;rt.prototype.commaSeparated=!1;rt.prototype.defined=!1;rt.prototype.mustUseProperty=!1;rt.prototype.number=!1;rt.prototype.overloadedBoolean=!1;rt.prototype.property="";rt.prototype.spaceSeparated=!1;rt.prototype.space=void 0;let BS=0;const Q=Er(),Ee=Er(),Zy=Er(),I=Er(),le=Er(),Qr=Er(),lt=Er();function Er(){return 2**++BS}const Na=Object.freeze(Object.defineProperty({__proto__:null,boolean:Q,booleanish:Ee,commaOrSpaceSeparated:lt,commaSeparated:Qr,number:I,overloadedBoolean:Zy,spaceSeparated:le},Symbol.toStringTag,{value:"Module"})),hu=Object.keys(Na);class Xc extends rt{constructor(t,n,r,i){let l=-1;if(super(t,n),Kd(this,"space",i),typeof r=="number")for(;++l4&&n.slice(0,4)==="data"&&qS.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(Gd,KS);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!Gd.test(l)){let o=l.replace(VS,QS);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=Xc}return new i(r,t)}function QS(e){return"-"+e.toLowerCase()}function KS(e){return e.charAt(1).toUpperCase()}const GS=Yy([eg,US,rg,ig,lg],"html"),Jc=Yy([eg,$S,rg,ig,lg],"svg");function XS(e){return e.join(" ").trim()}var Yc={},Xd=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,JS=/\n/g,YS=/^\s*/,ZS=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,ex=/^:\s*/,tx=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,nx=/^[;\s]*/,rx=/^\s+|\s+$/g,ix=` -`,Jd="/",Yd="*",Yn="",lx="comment",ox="declaration",sx=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(g){var v=g.match(JS);v&&(n+=v.length);var S=g.lastIndexOf(ix);r=~S?g.length-S:r+g.length}function l(){var g={line:n,column:r};return function(v){return v.position=new o(g),a(),v}}function o(g){this.start=g,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(g){var v=new Error(t.source+":"+n+":"+r+": "+g);if(v.reason=g,v.filename=t.source,v.line=n,v.column=r,v.source=e,!t.silent)throw v}function u(g){var v=g.exec(e);if(v){var S=v[0];return i(S),e=e.slice(S.length),v}}function a(){u(YS)}function c(g){var v;for(g=g||[];v=f();)v!==!1&&g.push(v);return g}function f(){var g=l();if(!(Jd!=e.charAt(0)||Yd!=e.charAt(1))){for(var v=2;Yn!=e.charAt(v)&&(Yd!=e.charAt(v)||Jd!=e.charAt(v+1));)++v;if(v+=2,Yn===e.charAt(v-1))return s("End of comment missing");var S=e.slice(2,v-2);return r+=2,i(S),e=e.slice(v),r+=2,g({type:lx,comment:S})}}function d(){var g=l(),v=u(ZS);if(v){if(f(),!u(ex))return s("property missing ':'");var S=u(tx),h=g({type:ox,property:Zd(v[0].replace(Xd,Yn)),value:S?Zd(S[0].replace(Xd,Yn)):Yn});return u(nx),h}}function p(){var g=[];c(g);for(var v;v=d();)v!==!1&&(g.push(v),c(g));return g}return a(),p()};function Zd(e){return e?e.replace(rx,Yn):Yn}var ux=Eo&&Eo.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Yc,"__esModule",{value:!0});Yc.default=cx;var ax=ux(sx);function cx(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,ax.default)(e),i=typeof t=="function";return r.forEach(function(l){if(l.type==="declaration"){var o=l.property,s=l.value;i?t(o,s,l):s&&(n=n||{},n[o]=s)}}),n}var Es={};Object.defineProperty(Es,"__esModule",{value:!0});Es.camelCase=void 0;var fx=/^--[a-zA-Z0-9_-]+$/,dx=/-([a-z])/g,px=/^[^-]+$/,hx=/^-(webkit|moz|ms|o|khtml)-/,mx=/^-(ms)-/,yx=function(e){return!e||px.test(e)||fx.test(e)},gx=function(e,t){return t.toUpperCase()},ep=function(e,t){return"".concat(t,"-")},vx=function(e,t){return t===void 0&&(t={}),yx(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(mx,ep):e=e.replace(hx,ep),e.replace(dx,gx))};Es.camelCase=vx;var wx=Eo&&Eo.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Sx=wx(Yc),xx=Es;function Ia(e,t){var n={};return!e||typeof e!="string"||(0,Sx.default)(e,function(r,i){r&&i&&(n[(0,xx.camelCase)(r,t)]=i)}),n}Ia.default=Ia;var kx=Ia;const Ex=Za(kx),og=sg("end"),Zc=sg("start");function sg(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Cx(e){const t=Zc(e),n=og(e);if(t&&n)return{start:t,end:n}}function Ki(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?tp(e.position):"start"in e||"end"in e?tp(e):"line"in e||"column"in e?Aa(e):""}function Aa(e){return np(e&&e.line)+":"+np(e&&e.column)}function tp(e){return Aa(e&&e.start)+"-"+Aa(e&&e.end)}function np(e){return e&&typeof e=="number"?e:1}class Ue extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",l={},o=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?i=t:!l.cause&&t&&(o=!0,i=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?l.ruleId=r:(l.source=r.slice(0,u),l.ruleId=r.slice(u+1))}if(!l.place&&l.ancestors&&l.ancestors){const u=l.ancestors[l.ancestors.length-1];u&&(l.place=u.position)}const s=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=s?s.line:void 0,this.name=Ki(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=o&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual,this.expected,this.note,this.url}}Ue.prototype.file="";Ue.prototype.name="";Ue.prototype.reason="";Ue.prototype.message="";Ue.prototype.stack="";Ue.prototype.column=void 0;Ue.prototype.line=void 0;Ue.prototype.ancestors=void 0;Ue.prototype.cause=void 0;Ue.prototype.fatal=void 0;Ue.prototype.place=void 0;Ue.prototype.ruleId=void 0;Ue.prototype.source=void 0;const ef={}.hasOwnProperty,Px=new Map,_x=/[A-Z]/g,Tx=new Set(["table","tbody","thead","tfoot","tr"]),Rx=new Set(["td","th"]),ug="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Ox(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Fx(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=zx(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Jc:GS,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=ag(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function ag(e,t,n){if(t.type==="element")return Nx(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Ix(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return bx(e,t,n);if(t.type==="mdxjsEsm")return Ax(e,t);if(t.type==="root")return Lx(e,t,n);if(t.type==="text")return Dx(e,t)}function Nx(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Jc,e.schema=i),e.ancestors.push(t);const l=fg(e,t.tagName,!1),o=Mx(e,t);let s=nf(e,t);return Tx.has(t.tagName)&&(s=s.filter(function(u){return typeof u=="string"?!jS(u):!0})),cg(e,o,l,t),tf(o,s),e.ancestors.pop(),e.schema=r,e.create(t,l,o,n)}function Ix(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}yl(e,t.position)}function Ax(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);yl(e,t.position)}function bx(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Jc,e.schema=i),e.ancestors.push(t);const l=t.name===null?e.Fragment:fg(e,t.name,!0),o=jx(e,t),s=nf(e,t);return cg(e,o,l,t),tf(o,s),e.ancestors.pop(),e.schema=r,e.create(t,l,o,n)}function Lx(e,t,n){const r={};return tf(r,nf(e,t)),e.create(t,e.Fragment,r,n)}function Dx(e,t){return t.value}function cg(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function tf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function zx(e,t,n){return r;function r(i,l,o,s){const a=Array.isArray(o.children)?n:t;return s?a(l,o,s):a(l,o)}}function Fx(e,t){return n;function n(r,i,l,o){const s=Array.isArray(l.children),u=Zc(r);return t(i,l,o,s,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function Mx(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&ef.call(t.properties,i)){const l=Bx(e,i,t.properties[i]);if(l){const[o,s]=l;e.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&Rx.has(t.tagName)?r=s:n[o]=s}}if(r){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function jx(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const l=r.data.estree.body[0];l.type;const o=l.expression;o.type;const s=o.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else yl(e,t.position);else{const i=r.name;let l;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,l=e.evaluater.evaluateExpression(s.expression)}else yl(e,t.position);else l=r.value===null?!0:r.value;n[i]=l}return n}function nf(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Px;for(;++ri?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);l0?(Gt(e,e.length,0,t),e):t}const lp={}.hasOwnProperty;function Kx(e){const t={};let n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Kr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Wt=Qn(/[A-Za-z]/),ut=Qn(/[\dA-Za-z]/),Jx=Qn(/[#-'*+\--9=?A-Z^-~]/);function ba(e){return e!==null&&(e<32||e===127)}const La=Qn(/\d/),Yx=Qn(/[\dA-Fa-f]/),Zx=Qn(/[!-/:-@[-`{-~]/);function H(e){return e!==null&&e<-2}function tt(e){return e!==null&&(e<0||e===32)}function te(e){return e===-2||e===-1||e===32}const ek=Qn(new RegExp("\\p{P}|\\p{S}","u")),tk=Qn(/\s/);function Qn(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function vi(e){const t=[];let n=-1,r=0,i=0;for(;++n55295&&l<57344){const s=e.charCodeAt(n+1);l<56320&&s>56319&&s<57344?(o=String.fromCharCode(l,s),i=1):o="�"}else o=String.fromCharCode(l);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function se(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let l=0;return o;function o(u){return te(u)?(e.enter(n),s(u)):t(u)}function s(u){return te(u)&&l++o))return;const O=t.events.length;let T=O,z,M;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){if(z){M=t.events[T][1].end;break}z=!0}for(h(r),k=O;ky;){const P=n[E];t.containerState=P[1],P[0].exit.call(t,e)}n.length=y}function m(){i.write([null]),l=void 0,i=void 0,t.containerState._closeFlow=void 0}}function ok(e,t,n){return se(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function sp(e){if(e===null||tt(e)||tk(e))return 1;if(ek(e))return 2}function lf(e,t,n){const r=[];let i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f={...e[r][1].end},d={...e[n][1].start};up(f,-u),up(d,u),o={type:u>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},s={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:d},l={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:u>1?"strong":"emphasis",start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},a=[],e[r][1].end.offset-e[r][1].start.offset&&(a=wt(a,[["enter",e[r][1],t],["exit",e[r][1],t]])),a=wt(a,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",l,t]]),a=wt(a,lf(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),a=wt(a,[["exit",l,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,a=wt(a,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,Gt(e,r-1,n-r+3,a),n=r+a.length-c-2;break}}for(n=-1;++n0&&te(k)?se(e,m,"linePrefix",l+1)(k):m(k)}function m(k){return k===null||H(k)?e.check(ap,v,E)(k):(e.enter("codeFlowValue"),y(k))}function y(k){return k===null||H(k)?(e.exit("codeFlowValue"),m(k)):(e.consume(k),y)}function E(k){return e.exit("codeFenced"),t(k)}function P(k,O,T){let z=0;return M;function M(G){return k.enter("lineEnding"),k.consume(G),k.exit("lineEnding"),D}function D(G){return k.enter("codeFencedFence"),te(G)?se(k,j,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(G):j(G)}function j(G){return G===s?(k.enter("codeFencedFenceSequence"),q(G)):T(G)}function q(G){return G===s?(z++,k.consume(G),q):z>=o?(k.exit("codeFencedFenceSequence"),te(G)?se(k,ue,"whitespace")(G):ue(G)):T(G)}function ue(G){return G===null||H(G)?(k.exit("codeFencedFence"),O(G)):T(G)}}}function vk(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l)}function l(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const yu={name:"codeIndented",tokenize:Sk},wk={partial:!0,tokenize:xk};function Sk(e,t,n){const r=this;return i;function i(a){return e.enter("codeIndented"),se(e,l,"linePrefix",5)(a)}function l(a){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?o(a):n(a)}function o(a){return a===null?u(a):H(a)?e.attempt(wk,o,u)(a):(e.enter("codeFlowValue"),s(a))}function s(a){return a===null||H(a)?(e.exit("codeFlowValue"),o(a)):(e.consume(a),s)}function u(a){return e.exit("codeIndented"),t(a)}}function xk(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):H(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):se(e,l,"linePrefix",5)(o)}function l(o){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):H(o)?i(o):n(o)}}const kk={name:"codeText",previous:Ck,resolve:Ek,tokenize:Pk};function Ek(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return tthis.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Ii(this.left,r),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Ii(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ii(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function vg(e,t,n,r,i,l,o,s,u){const a=u||Number.POSITIVE_INFINITY;let c=0;return f;function f(h){return h===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(h),e.exit(l),d):h===null||h===32||h===41||ba(h)?n(h):(e.enter(r),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),v(h))}function d(h){return h===62?(e.enter(l),e.consume(h),e.exit(l),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(h))}function p(h){return h===62?(e.exit("chunkString"),e.exit(s),d(h)):h===null||h===60||H(h)?n(h):(e.consume(h),h===92?g:p)}function g(h){return h===60||h===62||h===92?(e.consume(h),p):p(h)}function v(h){return!c&&(h===null||h===41||tt(h))?(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(r),t(h)):c999||p===null||p===91||p===93&&!u||p===94&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?n(p):p===93?(e.exit(l),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):H(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||H(p)||s++>999?(e.exit("chunkString"),c(p)):(e.consume(p),u||(u=!te(p)),p===92?d:f)}function d(p){return p===91||p===92||p===93?(e.consume(p),s++,f):f(p)}}function Sg(e,t,n,r,i,l){let o;return s;function s(d){return d===34||d===39||d===40?(e.enter(r),e.enter(i),e.consume(d),e.exit(i),o=d===40?41:d,u):n(d)}function u(d){return d===o?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):(e.enter(l),a(d))}function a(d){return d===o?(e.exit(l),u(o)):d===null?n(d):H(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),se(e,a,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===o||d===null||H(d)?(e.exit("chunkString"),a(d)):(e.consume(d),d===92?f:c)}function f(d){return d===o||d===92?(e.consume(d),c):c(d)}}function Gi(e,t){let n;return r;function r(i){return H(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):te(i)?se(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const bk={name:"definition",tokenize:Dk},Lk={partial:!0,tokenize:zk};function Dk(e,t,n){const r=this;let i;return l;function l(p){return e.enter("definition"),o(p)}function o(p){return wg.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return i=Kr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),u):n(p)}function u(p){return tt(p)?Gi(e,a)(p):a(p)}function a(p){return vg(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function c(p){return e.attempt(Lk,f,f)(p)}function f(p){return te(p)?se(e,d,"whitespace")(p):d(p)}function d(p){return p===null||H(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function zk(e,t,n){return r;function r(s){return tt(s)?Gi(e,i)(s):n(s)}function i(s){return Sg(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function l(s){return te(s)?se(e,o,"whitespace")(s):o(s)}function o(s){return s===null||H(s)?t(s):n(s)}}const Fk={name:"hardBreakEscape",tokenize:Mk};function Mk(e,t,n){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return H(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const jk={name:"headingAtx",resolve:Bk,tokenize:Uk};function Bk(e,t){let n=e.length-2,r=3,i,l;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},l={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Gt(e,r,n-r+1,[["enter",i,t],["enter",l,t],["exit",l,t],["exit",i,t]])),e}function Uk(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),l(c)}function l(c){return e.enter("atxHeadingSequence"),o(c)}function o(c){return c===35&&r++<6?(e.consume(c),o):c===null||tt(c)?(e.exit("atxHeadingSequence"),s(c)):n(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),u(c)):c===null||H(c)?(e.exit("atxHeading"),t(c)):te(c)?se(e,s,"whitespace")(c):(e.enter("atxHeadingText"),a(c))}function u(c){return c===35?(e.consume(c),u):(e.exit("atxHeadingSequence"),s(c))}function a(c){return c===null||c===35||tt(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),a)}}const $k=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],fp=["pre","script","style","textarea"],Hk={concrete:!0,name:"htmlFlow",resolveTo:Wk,tokenize:Qk},Vk={partial:!0,tokenize:Gk},qk={partial:!0,tokenize:Kk};function Wk(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Qk(e,t,n){const r=this;let i,l,o,s,u;return a;function a(x){return c(x)}function c(x){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(x),f}function f(x){return x===33?(e.consume(x),d):x===47?(e.consume(x),l=!0,v):x===63?(e.consume(x),i=3,r.interrupt?t:w):Wt(x)?(e.consume(x),o=String.fromCharCode(x),S):n(x)}function d(x){return x===45?(e.consume(x),i=2,p):x===91?(e.consume(x),i=5,s=0,g):Wt(x)?(e.consume(x),i=4,r.interrupt?t:w):n(x)}function p(x){return x===45?(e.consume(x),r.interrupt?t:w):n(x)}function g(x){const ie="CDATA[";return x===ie.charCodeAt(s++)?(e.consume(x),s===ie.length?r.interrupt?t:j:g):n(x)}function v(x){return Wt(x)?(e.consume(x),o=String.fromCharCode(x),S):n(x)}function S(x){if(x===null||x===47||x===62||tt(x)){const ie=x===47,$e=o.toLowerCase();return!ie&&!l&&fp.includes($e)?(i=1,r.interrupt?t(x):j(x)):$k.includes(o.toLowerCase())?(i=6,ie?(e.consume(x),h):r.interrupt?t(x):j(x)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(x):l?m(x):y(x))}return x===45||ut(x)?(e.consume(x),o+=String.fromCharCode(x),S):n(x)}function h(x){return x===62?(e.consume(x),r.interrupt?t:j):n(x)}function m(x){return te(x)?(e.consume(x),m):M(x)}function y(x){return x===47?(e.consume(x),M):x===58||x===95||Wt(x)?(e.consume(x),E):te(x)?(e.consume(x),y):M(x)}function E(x){return x===45||x===46||x===58||x===95||ut(x)?(e.consume(x),E):P(x)}function P(x){return x===61?(e.consume(x),k):te(x)?(e.consume(x),P):y(x)}function k(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),u=x,O):te(x)?(e.consume(x),k):T(x)}function O(x){return x===u?(e.consume(x),u=null,z):x===null||H(x)?n(x):(e.consume(x),O)}function T(x){return x===null||x===34||x===39||x===47||x===60||x===61||x===62||x===96||tt(x)?P(x):(e.consume(x),T)}function z(x){return x===47||x===62||te(x)?y(x):n(x)}function M(x){return x===62?(e.consume(x),D):n(x)}function D(x){return x===null||H(x)?j(x):te(x)?(e.consume(x),D):n(x)}function j(x){return x===45&&i===2?(e.consume(x),ae):x===60&&i===1?(e.consume(x),pe):x===62&&i===4?(e.consume(x),V):x===63&&i===3?(e.consume(x),w):x===93&&i===5?(e.consume(x),B):H(x)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Vk,Z,q)(x)):x===null||H(x)?(e.exit("htmlFlowData"),q(x)):(e.consume(x),j)}function q(x){return e.check(qk,ue,Z)(x)}function ue(x){return e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),G}function G(x){return x===null||H(x)?q(x):(e.enter("htmlFlowData"),j(x))}function ae(x){return x===45?(e.consume(x),w):j(x)}function pe(x){return x===47?(e.consume(x),o="",b):j(x)}function b(x){if(x===62){const ie=o.toLowerCase();return fp.includes(ie)?(e.consume(x),V):j(x)}return Wt(x)&&o.length<8?(e.consume(x),o+=String.fromCharCode(x),b):j(x)}function B(x){return x===93?(e.consume(x),w):j(x)}function w(x){return x===62?(e.consume(x),V):x===45&&i===2?(e.consume(x),w):j(x)}function V(x){return x===null||H(x)?(e.exit("htmlFlowData"),Z(x)):(e.consume(x),V)}function Z(x){return e.exit("htmlFlow"),t(x)}}function Kk(e,t,n){const r=this;return i;function i(o){return H(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l):n(o)}function l(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function Gk(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Cs,t,n)}}const Xk={name:"htmlText",tokenize:Jk};function Jk(e,t,n){const r=this;let i,l,o;return s;function s(w){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(w),u}function u(w){return w===33?(e.consume(w),a):w===47?(e.consume(w),P):w===63?(e.consume(w),y):Wt(w)?(e.consume(w),T):n(w)}function a(w){return w===45?(e.consume(w),c):w===91?(e.consume(w),l=0,g):Wt(w)?(e.consume(w),m):n(w)}function c(w){return w===45?(e.consume(w),p):n(w)}function f(w){return w===null?n(w):w===45?(e.consume(w),d):H(w)?(o=f,pe(w)):(e.consume(w),f)}function d(w){return w===45?(e.consume(w),p):f(w)}function p(w){return w===62?ae(w):w===45?d(w):f(w)}function g(w){const V="CDATA[";return w===V.charCodeAt(l++)?(e.consume(w),l===V.length?v:g):n(w)}function v(w){return w===null?n(w):w===93?(e.consume(w),S):H(w)?(o=v,pe(w)):(e.consume(w),v)}function S(w){return w===93?(e.consume(w),h):v(w)}function h(w){return w===62?ae(w):w===93?(e.consume(w),h):v(w)}function m(w){return w===null||w===62?ae(w):H(w)?(o=m,pe(w)):(e.consume(w),m)}function y(w){return w===null?n(w):w===63?(e.consume(w),E):H(w)?(o=y,pe(w)):(e.consume(w),y)}function E(w){return w===62?ae(w):y(w)}function P(w){return Wt(w)?(e.consume(w),k):n(w)}function k(w){return w===45||ut(w)?(e.consume(w),k):O(w)}function O(w){return H(w)?(o=O,pe(w)):te(w)?(e.consume(w),O):ae(w)}function T(w){return w===45||ut(w)?(e.consume(w),T):w===47||w===62||tt(w)?z(w):n(w)}function z(w){return w===47?(e.consume(w),ae):w===58||w===95||Wt(w)?(e.consume(w),M):H(w)?(o=z,pe(w)):te(w)?(e.consume(w),z):ae(w)}function M(w){return w===45||w===46||w===58||w===95||ut(w)?(e.consume(w),M):D(w)}function D(w){return w===61?(e.consume(w),j):H(w)?(o=D,pe(w)):te(w)?(e.consume(w),D):z(w)}function j(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),i=w,q):H(w)?(o=j,pe(w)):te(w)?(e.consume(w),j):(e.consume(w),ue)}function q(w){return w===i?(e.consume(w),i=void 0,G):w===null?n(w):H(w)?(o=q,pe(w)):(e.consume(w),q)}function ue(w){return w===null||w===34||w===39||w===60||w===61||w===96?n(w):w===47||w===62||tt(w)?z(w):(e.consume(w),ue)}function G(w){return w===47||w===62||tt(w)?z(w):n(w)}function ae(w){return w===62?(e.consume(w),e.exit("htmlTextData"),e.exit("htmlText"),t):n(w)}function pe(w){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),b}function b(w){return te(w)?se(e,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):B(w)}function B(w){return e.enter("htmlTextData"),o(w)}}const of={name:"labelEnd",resolveAll:tE,resolveTo:nE,tokenize:rE},Yk={tokenize:iE},Zk={tokenize:lE},eE={tokenize:oE};function tE(e){let t=-1;const n=[];for(;++t=3&&(a===null||H(a))?(e.exit("thematicBreak"),t(a)):n(a)}function u(a){return a===i?(e.consume(a),r++,u):(e.exit("thematicBreakSequence"),te(a)?se(e,s,"whitespace")(a):s(a))}}const Ke={continuation:{tokenize:yE},exit:vE,name:"list",tokenize:mE},pE={partial:!0,tokenize:wE},hE={partial:!0,tokenize:gE};function mE(e,t,n){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(p){const g=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:La(p)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(go,n,a)(p):a(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(p)}return n(p)}function u(p){return La(p)&&++o<10?(e.consume(p),u):(!r.interrupt||o<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),a(p)):n(p)}function a(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Cs,r.interrupt?n:c,e.attempt(pE,d,f))}function c(p){return r.containerState.initialBlankLine=!0,l++,d(p)}function f(p){return te(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),d):n(p)}function d(p){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function yE(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Cs,i,l);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,se(e,t,"listItemIndent",r.containerState.size+1)(s)}function l(s){return r.containerState.furtherBlankLines||!te(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(hE,t,o)(s))}function o(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,se(e,e.attempt(Ke,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function gE(e,t,n){const r=this;return se(e,i,"listItemIndent",r.containerState.size+1);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(l):n(l)}}function vE(e){e.exit(this.containerState.type)}function wE(e,t,n){const r=this;return se(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const o=r.events[r.events.length-1];return!te(l)&&o&&o[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const dp={name:"setextUnderline",resolveTo:SE,tokenize:xE};function SE(e,t){let n=e.length,r,i,l;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!l&&e[n][1].type==="definition"&&(l=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",o,t]),e.splice(l+1,0,["exit",e[r][1],t]),e[r][1].end={...e[l][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function xE(e,t,n){const r=this;let i;return l;function l(a){let c=r.events.length,f;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){f=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=a,o(a)):n(a)}function o(a){return e.enter("setextHeadingLineSequence"),s(a)}function s(a){return a===i?(e.consume(a),s):(e.exit("setextHeadingLineSequence"),te(a)?se(e,u,"lineSuffix")(a):u(a))}function u(a){return a===null||H(a)?(e.exit("setextHeadingLine"),t(a)):n(a)}}const kE={tokenize:EE};function EE(e){const t=this,n=e.attempt(Cs,r,e.attempt(this.parser.constructs.flowInitial,i,se(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Rk,i)),"linePrefix")));return n;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const CE={resolveAll:kg()},PE=xg("string"),_E=xg("text");function xg(e){return{resolveAll:kg(e==="text"?TE:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],l=n.attempt(i,o,s);return o;function o(c){return a(c)?l(c):s(c)}function s(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),u}function u(c){return a(c)?(n.exit("data"),l(c)):(n.consume(c),u)}function a(c){if(c===null)return!0;const f=i[c];let d=-1;if(f)for(;++d-1){const s=o[0];typeof s=="string"?o[0]=s.slice(r):o.shift()}l>0&&o.push(e[i].slice(0,l))}return o}function BE(e,t){let n=-1;const r=[];let i;for(;++n0){const Ct=W.tokenStack[W.tokenStack.length-1];(Ct[1]||hp).call(W,void 0,Ct[0])}for(L.position={start:gn(R.length>0?R[0][1].start:{line:1,column:1,offset:0}),end:gn(R.length>0?R[R.length-2][1].end:{line:1,column:1,offset:0})},re=-1;++re1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,u);const a={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,a),e.applyData(t,a)}function rC(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function iC(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Pg(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),l=i[0];l&&l.type==="text"?l.value="["+l.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function lC(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Pg(e,t);const i={src:vi(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,l),e.applyData(t,l)}function oC(e,t){const n={src:vi(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function sC(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function uC(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Pg(e,t);const i={href:vi(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function aC(e,t){const n={href:vi(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function cC(e,t,n){const r=e.all(t),i=n?fC(n):_g(t),l={},o=[];if(typeof t.checked=="boolean"){const c=r[0];let f;c&&c.type==="element"&&c.tagName==="p"?f=c:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let s=-1;for(;++s1}function dC(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=Zc(t.children[1]),u=og(t.children[t.children.length-1]);s&&u&&(o.position={start:s,end:u}),i.push(o)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,l),e.applyData(t,l)}function gC(e,t,n){const r=n?n.children:void 0,l=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,s=o?o.length:t.children.length;let u=-1;const a=[];for(;++u0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return l.push(gp(t.slice(i),i>0,!1)),l.join("")}function gp(e,t,n){let r=0,i=e.length;if(t){let l=e.codePointAt(r);for(;l===mp||l===yp;)r++,l=e.codePointAt(r)}if(n){let l=e.codePointAt(i-1);for(;l===mp||l===yp;)i--,l=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function SC(e,t){const n={type:"text",value:wC(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function xC(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const kC={blockquote:JE,break:YE,code:ZE,delete:eC,emphasis:tC,footnoteReference:nC,heading:rC,html:iC,imageReference:lC,image:oC,inlineCode:sC,linkReference:uC,link:aC,listItem:cC,list:dC,paragraph:pC,root:hC,strong:mC,table:yC,tableCell:vC,tableRow:gC,text:SC,thematicBreak:xC,toml:Zl,yaml:Zl,definition:Zl,footnoteDefinition:Zl};function Zl(){}const Tg=-1,Ps=0,Xi=1,Ko=2,sf=3,uf=4,af=5,cf=6,Rg=7,Og=8,vp=typeof self=="object"?self:globalThis,EC=(e,t)=>{const n=(i,l)=>(e.set(l,i),i),r=i=>{if(e.has(i))return e.get(i);const[l,o]=t[i];switch(l){case Ps:case Tg:return n(o,i);case Xi:{const s=n([],i);for(const u of o)s.push(r(u));return s}case Ko:{const s=n({},i);for(const[u,a]of o)s[r(u)]=r(a);return s}case sf:return n(new Date(o),i);case uf:{const{source:s,flags:u}=o;return n(new RegExp(s,u),i)}case af:{const s=n(new Map,i);for(const[u,a]of o)s.set(r(u),r(a));return s}case cf:{const s=n(new Set,i);for(const u of o)s.add(r(u));return s}case Rg:{const{name:s,message:u}=o;return n(new vp[s](u),i)}case Og:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:s}=new Uint8Array(o);return n(new DataView(s),o)}}return n(new vp[l](o),i)};return r},wp=e=>EC(new Map,e)(0),Rr="",{toString:CC}={},{keys:PC}=Object,Ai=e=>{const t=typeof e;if(t!=="object"||!e)return[Ps,t];const n=CC.call(e).slice(8,-1);switch(n){case"Array":return[Xi,Rr];case"Object":return[Ko,Rr];case"Date":return[sf,Rr];case"RegExp":return[uf,Rr];case"Map":return[af,Rr];case"Set":return[cf,Rr];case"DataView":return[Xi,n]}return n.includes("Array")?[Xi,n]:n.includes("Error")?[Rg,n]:[Ko,n]},eo=([e,t])=>e===Ps&&(t==="function"||t==="symbol"),_C=(e,t,n,r)=>{const i=(o,s)=>{const u=r.push(o)-1;return n.set(s,u),u},l=o=>{if(n.has(o))return n.get(o);let[s,u]=Ai(o);switch(s){case Ps:{let c=o;switch(u){case"bigint":s=Og,c=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);c=null;break;case"undefined":return i([Tg],o)}return i([s,c],o)}case Xi:{if(u){let d=o;return u==="DataView"?d=new Uint8Array(o.buffer):u==="ArrayBuffer"&&(d=new Uint8Array(o)),i([u,[...d]],o)}const c=[],f=i([s,c],o);for(const d of o)c.push(l(d));return f}case Ko:{if(u)switch(u){case"BigInt":return i([u,o.toString()],o);case"Boolean":case"Number":case"String":return i([u,o.valueOf()],o)}if(t&&"toJSON"in o)return l(o.toJSON());const c=[],f=i([s,c],o);for(const d of PC(o))(e||!eo(Ai(o[d])))&&c.push([l(d),l(o[d])]);return f}case sf:return i([s,o.toISOString()],o);case uf:{const{source:c,flags:f}=o;return i([s,{source:c,flags:f}],o)}case af:{const c=[],f=i([s,c],o);for(const[d,p]of o)(e||!(eo(Ai(d))||eo(Ai(p))))&&c.push([l(d),l(p)]);return f}case cf:{const c=[],f=i([s,c],o);for(const d of o)(e||!eo(Ai(d)))&&c.push(l(d));return f}}const{message:a}=o;return i([s,{name:u,message:a}],o)};return l},Sp=(e,{json:t,lossy:n}={})=>{const r=[];return _C(!(t||n),!!t,new Map,r)(e),r},Go=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?wp(Sp(e,t)):structuredClone(e):(e,t)=>wp(Sp(e,t));function TC(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function RC(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function OC(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||TC,r=e.options.footnoteBackLabel||RC,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let u=-1;for(;++u0&&g.push({type:"text",value:" "});let m=typeof n=="string"?n:n(u,p);typeof m=="string"&&(m={type:"text",value:m}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+d+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,p),className:["data-footnote-backref"]},children:Array.isArray(m)?m:[m]})}const S=c[c.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const m=S.children[S.children.length-1];m&&m.type==="text"?m.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...g)}else c.push(...g);const h={type:"element",tagName:"li",properties:{id:t+"fn-"+d},children:e.wrap(c,!0)};e.patch(a,h),s.push(h)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...Go(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:` -`},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:` -`}]}}const Ng=function(e){if(e==null)return bC;if(typeof e=="function")return _s(e);if(typeof e=="object")return Array.isArray(e)?NC(e):IC(e);if(typeof e=="string")return AC(e);throw new Error("Expected function, string, or object as test")};function NC(e){const t=[];let n=-1;for(;++n":""))+")"})}return d;function d(){let p=Ig,g,v,S;if((!t||l(u,a,c[c.length-1]||void 0))&&(p=MC(n(u,c)),p[0]===xp))return p;if("children"in u&&u.children){const h=u;if(h.children&&p[0]!==zC)for(v=(r?h.children.length:-1)+o,S=c.concat(h);v>-1&&v0&&n.push({type:"text",value:` -`}),n}function kp(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Ep(e,t){const n=BC(e,t),r=n.one(e,void 0),i=OC(n),l=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&l.children.push({type:"text",value:` -`},i),l}function qC(e,t){return e&&"run"in e?async function(n,r){const i=Ep(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Ep(n,{file:r,...e||t})}}function Cp(e){if(e)throw e}var vo=Object.prototype.hasOwnProperty,bg=Object.prototype.toString,Pp=Object.defineProperty,_p=Object.getOwnPropertyDescriptor,Tp=function(t){return typeof Array.isArray=="function"?Array.isArray(t):bg.call(t)==="[object Array]"},Rp=function(t){if(!t||bg.call(t)!=="[object Object]")return!1;var n=vo.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&vo.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||vo.call(t,i)},Op=function(t,n){Pp&&n.name==="__proto__"?Pp(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Np=function(t,n){if(n==="__proto__")if(vo.call(t,n)){if(_p)return _p(t,n).value}else return;return t[n]},WC=function e(){var t,n,r,i,l,o,s=arguments[0],u=1,a=arguments.length,c=!1;for(typeof s=="boolean"&&(c=s,s=arguments[1]||{},u=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});uo.length;let u;s&&o.push(i);try{u=e.apply(this,o)}catch(a){const c=a;if(s&&n)throw c;return i(c)}s||(u&&u.then&&typeof u.then=="function"?u.then(l,i):u instanceof Error?i(u):l(u))}function i(o,...s){n||(n=!0,t(o,...s))}function l(o){i(null,o)}}const Ut={basename:GC,dirname:XC,extname:JC,join:YC,sep:"/"};function GC(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Nl(e);let n=0,r=-1,i=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else r<0&&(l=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else o<0&&(l=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function XC(e){if(Nl(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function JC(e){Nl(e);let t=e.length,n=-1,r=0,i=-1,l=0,o;for(;t--;){const s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||n<0||l===0||l===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function YC(...e){let t=-1,n;for(;++t0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function eP(e,t){let n="",r=0,i=-1,l=0,o=-1,s,u;for(;++o<=e.length;){if(o2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=o,l=0;continue}}else if(n.length>0){n="",r=0,i=o,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,l=0}else s===46&&l>-1?l++:l=-1}return n}function Nl(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const tP={cwd:nP};function nP(){return"/"}function Ma(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function rP(e){if(typeof e=="string")e=new URL(e);else if(!Ma(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return iP(e)}function iP(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n0){let[p,...g]=c;const v=r[d][1];Fa(v)&&Fa(p)&&(p=vu(!0,v,p)),r[d]=[a,p,...g]}}}}const uP=new ff().freeze();function ku(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Eu(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Cu(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Ap(e){if(!Fa(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function bp(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function to(e){return aP(e)?e:new Lg(e)}function aP(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function cP(e){return typeof e=="string"||fP(e)}function fP(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const dP="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Lp=[],Dp={allowDangerousHtml:!0},pP=/^(https?|ircs?|mailto|xmpp)$/i,hP=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Dg(e){const t=mP(e),n=yP(e);return gP(t.runSync(t.parse(n),n),e)}function mP(e){const t=e.rehypePlugins||Lp,n=e.remarkPlugins||Lp,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Dp}:Dp;return uP().use(XE).use(n).use(qC,r).use(t)}function yP(e){const t=e.children||"",n=new Lg;return typeof t=="string"&&(n.value=t),n}function gP(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,l=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,u=t.urlTransform||vP;for(const c of hP)Object.hasOwn(t,c.from)&&(""+c.from+(c.to?"use `"+c.to+"` instead":"remove it")+dP+c.id,void 0);return Ag(e,a),Ox(e,{Fragment:U.Fragment,components:i,ignoreInvalidStyle:!0,jsx:U.jsx,jsxs:U.jsxs,passKeys:!0,passNode:!0});function a(c,f,d){if(c.type==="raw"&&d&&typeof f=="number")return o?d.children.splice(f,1):d.children[f]={type:"text",value:c.value},f;if(c.type==="element"){let p;for(p in mu)if(Object.hasOwn(mu,p)&&Object.hasOwn(c.properties,p)){const g=c.properties[p],v=mu[p];(v===null||v.includes(c.tagName))&&(c.properties[p]=u(String(g||""),p,c))}}if(c.type==="element"){let p=n?!n.includes(c.tagName):l?l.includes(c.tagName):!1;if(!p&&r&&typeof f=="number"&&(p=!r(c,f,d)),p&&d&&typeof f=="number")return s&&c.children?d.children.splice(f,1,...c.children):d.children.splice(f,1),f}}}function vP(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||pP.test(e.slice(0,t))?e:""}const wP=({content:e})=>{const[t,n]=A.useState(!1);return U.jsxs("div",{className:"spoiler",children:[U.jsx("button",{className:"spoiler-toggle",onClick:()=>n(!t),children:t?"Скрыть результаты поиска":"Показать результаты поиска"}),t&&U.jsx("div",{className:"spoiler-content",children:U.jsx(Dg,{children:e})})]})},zp=({role:e,content:t,searchResults:n="",isLoading:r})=>U.jsx("div",{className:`message ${e} ${r?"loading":""}`,children:r?U.jsxs("div",{className:"loading-dots",children:[U.jsx("span",{className:"loading-dot"}),U.jsx("span",{className:"loading-dot"}),U.jsx("span",{className:"loading-dot"})]}):U.jsxs("div",{className:"message-content",children:[U.jsx(Dg,{children:t}),n&&U.jsx(wP,{content:n})]})}),SP=({onSend:e,text:t,setText:n})=>{const r=i=>{i.key==="Enter"&&i.ctrlKey&&(i.preventDefault(),t.trim()&&e(t))};return U.jsx("div",{className:"input-wrapper",children:U.jsx("textarea",{value:t,onChange:i=>n(i.target.value),onKeyDown:r,placeholder:"Введите сообщение... (Ctrl+Enter для отправки)"})})};function Ne(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var xP=typeof Symbol=="function"&&Symbol.observable||"@@observable",Fp=xP,Pu=()=>Math.random().toString(36).substring(7).split("").join("."),kP={INIT:`@@redux/INIT${Pu()}`,REPLACE:`@@redux/REPLACE${Pu()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Pu()}`},Xo=kP;function df(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function zg(e,t,n){if(typeof e!="function")throw new Error(Ne(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Ne(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Ne(1));return n(zg)(e,t)}let r=e,i=t,l=new Map,o=l,s=0,u=!1;function a(){o===l&&(o=new Map,l.forEach((S,h)=>{o.set(h,S)}))}function c(){if(u)throw new Error(Ne(3));return i}function f(S){if(typeof S!="function")throw new Error(Ne(4));if(u)throw new Error(Ne(5));let h=!0;a();const m=s++;return o.set(m,S),function(){if(h){if(u)throw new Error(Ne(6));h=!1,a(),o.delete(m),l=null}}}function d(S){if(!df(S))throw new Error(Ne(7));if(typeof S.type>"u")throw new Error(Ne(8));if(typeof S.type!="string")throw new Error(Ne(17));if(u)throw new Error(Ne(9));try{u=!0,i=r(i,S)}finally{u=!1}return(l=o).forEach(m=>{m()}),S}function p(S){if(typeof S!="function")throw new Error(Ne(10));r=S,d({type:Xo.REPLACE})}function g(){const S=f;return{subscribe(h){if(typeof h!="object"||h===null)throw new Error(Ne(11));function m(){const E=h;E.next&&E.next(c())}return m(),{unsubscribe:S(m)}},[Fp](){return this}}}return d({type:Xo.INIT}),{dispatch:d,subscribe:f,getState:c,replaceReducer:p,[Fp]:g}}function EP(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Xo.INIT})>"u")throw new Error(Ne(12));if(typeof n(void 0,{type:Xo.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ne(13))})}function CP(e){const t=Object.keys(e),n={};for(let l=0;l"u")throw s&&s.type,new Error(Ne(14));a[f]=g,u=u||g!==p}return u=u||r.length!==Object.keys(o).length,u?a:o}}function Jo(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function PP(...e){return t=>(n,r)=>{const i=t(n,r);let l=()=>{throw new Error(Ne(15))};const o={getState:i.getState,dispatch:(u,...a)=>l(u,...a)},s=e.map(u=>u(o));return l=Jo(...s)(i.dispatch),{...i,dispatch:l}}}function _P(e){return df(e)&&"type"in e&&typeof e.type=="string"}var Fg=Symbol.for("immer-nothing"),Mp=Symbol.for("immer-draftable"),dt=Symbol.for("immer-state");function At(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var fi=Object.getPrototypeOf;function gr(e){return!!e&&!!e[dt]}function pn(e){var t;return e?Mg(e)||Array.isArray(e)||!!e[Mp]||!!((t=e.constructor)!=null&&t[Mp])||Rs(e)||Os(e):!1}var TP=Object.prototype.constructor.toString();function Mg(e){if(!e||typeof e!="object")return!1;const t=fi(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===TP}function Yo(e,t){Ts(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Ts(e){const t=e[dt];return t?t.type_:Array.isArray(e)?1:Rs(e)?2:Os(e)?3:0}function ja(e,t){return Ts(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function jg(e,t,n){const r=Ts(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function RP(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Rs(e){return e instanceof Map}function Os(e){return e instanceof Set}function Jn(e){return e.copy_||e.base_}function Ba(e,t){if(Rs(e))return new Map(e);if(Os(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=Mg(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[dt];let i=Reflect.ownKeys(r);for(let l=0;l1&&(e.set=e.add=e.clear=e.delete=OP),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>pf(r,!0))),e}function OP(){At(2)}function Ns(e){return Object.isFrozen(e)}var NP={};function vr(e){const t=NP[e];return t||At(0,e),t}var gl;function Bg(){return gl}function IP(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function jp(e,t){t&&(vr("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ua(e){$a(e),e.drafts_.forEach(AP),e.drafts_=null}function $a(e){e===gl&&(gl=e.parent_)}function Bp(e){return gl=IP(gl,e)}function AP(e){const t=e[dt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Up(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[dt].modified_&&(Ua(t),At(4)),pn(e)&&(e=Zo(t,e),t.parent_||es(t,e)),t.patches_&&vr("Patches").generateReplacementPatches_(n[dt].base_,e,t.patches_,t.inversePatches_)):e=Zo(t,n,[]),Ua(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Fg?e:void 0}function Zo(e,t,n){if(Ns(t))return t;const r=t[dt];if(!r)return Yo(t,(i,l)=>$p(e,r,t,i,l,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return es(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let l=i,o=!1;r.type_===3&&(l=new Set(i),i.clear(),o=!0),Yo(l,(s,u)=>$p(e,r,i,s,u,n,o)),es(e,i,!1),n&&e.patches_&&vr("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function $p(e,t,n,r,i,l,o){if(gr(i)){const s=l&&t&&t.type_!==3&&!ja(t.assigned_,r)?l.concat(r):void 0,u=Zo(e,i,s);if(jg(n,r,u),gr(u))e.canAutoFreeze_=!1;else return}else o&&n.add(i);if(pn(i)&&!Ns(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Zo(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&es(e,i)}}function es(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&pf(t,n)}function bP(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Bg(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,l=hf;n&&(i=[r],l=vl);const{revoke:o,proxy:s}=Proxy.revocable(i,l);return r.draft_=s,r.revoke_=o,s}var hf={get(e,t){if(t===dt)return e;const n=Jn(e);if(!ja(n,t))return LP(e,n,t);const r=n[t];return e.finalized_||!pn(r)?r:r===_u(e.base_,t)?(Tu(e),e.copy_[t]=Va(r,e)):r},has(e,t){return t in Jn(e)},ownKeys(e){return Reflect.ownKeys(Jn(e))},set(e,t,n){const r=Ug(Jn(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=_u(Jn(e),t),l=i==null?void 0:i[dt];if(l&&l.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(RP(n,i)&&(n!==void 0||ja(e.base_,t)))return!0;Tu(e),Ha(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return _u(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Tu(e),Ha(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Jn(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){At(11)},getPrototypeOf(e){return fi(e.base_)},setPrototypeOf(){At(12)}},vl={};Yo(hf,(e,t)=>{vl[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});vl.deleteProperty=function(e,t){return vl.set.call(this,e,t,void 0)};vl.set=function(e,t,n){return hf.set.call(this,e[0],t,n,e[0])};function _u(e,t){const n=e[dt];return(n?Jn(n):e)[t]}function LP(e,t,n){var i;const r=Ug(t,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(e.draft_):void 0}function Ug(e,t){if(!(t in e))return;let n=fi(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=fi(n)}}function Ha(e){e.modified_||(e.modified_=!0,e.parent_&&Ha(e.parent_))}function Tu(e){e.copy_||(e.copy_=Ba(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var DP=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const l=n;n=t;const o=this;return function(u=l,...a){return o.produce(u,c=>n.call(this,c,...a))}}typeof n!="function"&&At(6),r!==void 0&&typeof r!="function"&&At(7);let i;if(pn(t)){const l=Bp(this),o=Va(t,void 0);let s=!0;try{i=n(o),s=!1}finally{s?Ua(l):$a(l)}return jp(l,r),Up(i,l)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===Fg&&(i=void 0),this.autoFreeze_&&pf(i,!0),r){const l=[],o=[];vr("Patches").generateReplacementPatches_(t,i,l,o),r(l,o)}return i}else At(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(o,...s)=>this.produceWithPatches(o,u=>t(u,...s));let r,i;return[this.produce(t,n,(o,s)=>{r=o,i=s}),r,i]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){pn(e)||At(8),gr(e)&&(e=zP(e));const t=Bp(this),n=Va(e,void 0);return n[dt].isManual_=!0,$a(t),n}finishDraft(e,t){const n=e&&e[dt];(!n||!n.isManual_)&&At(9);const{scope_:r}=n;return jp(r,t),Up(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=vr("Patches").applyPatches_;return gr(e)?r(e,t):this.produce(e,i=>r(i,t))}};function Va(e,t){const n=Rs(e)?vr("MapSet").proxyMap_(e,t):Os(e)?vr("MapSet").proxySet_(e,t):bP(e,t);return(t?t.scope_:Bg()).drafts_.push(n),n}function zP(e){return gr(e)||At(10,e),$g(e)}function $g(e){if(!pn(e)||Ns(e))return e;const t=e[dt];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Ba(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Ba(e,!0);return Yo(n,(r,i)=>{jg(n,r,$g(i))}),t&&(t.finalized_=!1),n}var pt=new DP,Hg=pt.produce;pt.produceWithPatches.bind(pt);pt.setAutoFreeze.bind(pt);pt.setUseStrictShallowCopy.bind(pt);pt.applyPatches.bind(pt);pt.createDraft.bind(pt);pt.finishDraft.bind(pt);function Vg(e){return({dispatch:n,getState:r})=>i=>l=>typeof l=="function"?l(n,r,e):i(l)}var FP=Vg(),MP=Vg,jP=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Jo:Jo.apply(null,arguments)};function Hp(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(sn(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>_P(r)&&r.type===e,n}var qg=class Mi extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Mi.prototype)}static get[Symbol.species](){return Mi}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Mi(...t[0].concat(this)):new Mi(...t.concat(this))}};function Vp(e){return pn(e)?Hg(e,()=>{}):e}function qp(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function BP(e){return typeof e=="boolean"}var UP=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:l=!0}=t??{};let o=new qg;return n&&(BP(n)?o.push(FP):o.push(MP(n.extraArgument))),o},$P="RTK_autoBatch",Wp=e=>t=>{setTimeout(t,e)},HP=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,l=!1,o=!1;const s=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Wp(10):e.type==="callback"?e.queueNotification:Wp(e.timeout),a=()=>{o=!1,l&&(l=!1,s.forEach(c=>c()))};return Object.assign({},r,{subscribe(c){const f=()=>i&&c(),d=r.subscribe(f);return s.add(c),()=>{d(),s.delete(c)}},dispatch(c){var f;try{return i=!((f=c==null?void 0:c.meta)!=null&&f[$P]),l=!i,l&&(o||(o=!0,u(a))),r.dispatch(c)}finally{i=!0}}})},VP=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new qg(e);return r&&i.push(HP(typeof r=="object"?r:void 0)),i};function qP(e){const t=UP(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:l=void 0,enhancers:o=void 0}=e||{};let s;if(typeof n=="function")s=n;else if(df(n))s=CP(n);else throw new Error(sn(1));let u;typeof r=="function"?u=r(t):u=t();let a=Jo;i&&(a=jP({trace:!1,...typeof i=="object"&&i}));const c=PP(...u),f=VP(c);let d=typeof o=="function"?o(f):f();const p=a(...d);return zg(s,l,p)}function Wg(e){const t={},n=[];let r;const i={addCase(l,o){const s=typeof l=="string"?l:l.type;if(!s)throw new Error(sn(28));if(s in t)throw new Error(sn(29));return t[s]=o,i},addMatcher(l,o){return n.push({matcher:l,reducer:o}),i},addDefaultCase(l){return r=l,i}};return e(i),[t,n,r]}function WP(e){return typeof e=="function"}function QP(e,t){let[n,r,i]=Wg(t),l;if(WP(e))l=()=>Vp(e());else{const s=Vp(e);l=()=>s}function o(s=l(),u){let a=[n[u.type],...r.filter(({matcher:c})=>c(u)).map(({reducer:c})=>c)];return a.filter(c=>!!c).length===0&&(a=[i]),a.reduce((c,f)=>{if(f)if(gr(c)){const p=f(c,u);return p===void 0?c:p}else{if(pn(c))return Hg(c,d=>f(d,u));{const d=f(c,u);if(d===void 0){if(c===null)return c;throw Error("A case reducer on a non-draftable value must not return undefined")}return d}}return c},s)}return o.getInitialState=l,o}var KP=Symbol.for("rtk-slice-createasyncthunk");function GP(e,t){return`${e}/${t}`}function XP({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[KP];return function(i){const{name:l,reducerPath:o=l}=i;if(!l)throw new Error(sn(11));const s=(typeof i.reducers=="function"?i.reducers(ZP()):i.reducers)||{},u=Object.keys(s),a={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(y,E){const P=typeof y=="string"?y:y.type;if(!P)throw new Error(sn(12));if(P in a.sliceCaseReducersByType)throw new Error(sn(13));return a.sliceCaseReducersByType[P]=E,c},addMatcher(y,E){return a.sliceMatchers.push({matcher:y,reducer:E}),c},exposeAction(y,E){return a.actionCreators[y]=E,c},exposeCaseReducer(y,E){return a.sliceCaseReducersByName[y]=E,c}};u.forEach(y=>{const E=s[y],P={reducerName:y,type:GP(l,y),createNotation:typeof i.reducers=="function"};t_(E)?r_(P,E,c,t):e_(P,E,c)});function f(){const[y={},E=[],P=void 0]=typeof i.extraReducers=="function"?Wg(i.extraReducers):[i.extraReducers],k={...y,...a.sliceCaseReducersByType};return QP(i.initialState,O=>{for(let T in k)O.addCase(T,k[T]);for(let T of a.sliceMatchers)O.addMatcher(T.matcher,T.reducer);for(let T of E)O.addMatcher(T.matcher,T.reducer);P&&O.addDefaultCase(P)})}const d=y=>y,p=new Map;let g;function v(y,E){return g||(g=f()),g(y,E)}function S(){return g||(g=f()),g.getInitialState()}function h(y,E=!1){function P(O){let T=O[y];return typeof T>"u"&&E&&(T=S()),T}function k(O=d){const T=qp(p,E,()=>new WeakMap);return qp(T,O,()=>{const z={};for(const[M,D]of Object.entries(i.selectors??{}))z[M]=JP(D,O,S,E);return z})}return{reducerPath:y,getSelectors:k,get selectors(){return k(P)},selectSlice:P}}const m={name:l,reducer:v,actions:a.actionCreators,caseReducers:a.sliceCaseReducersByName,getInitialState:S,...h(o),injectInto(y,{reducerPath:E,...P}={}){const k=E??o;return y.inject({reducerPath:k,reducer:v},P),{...m,...h(k,!0)}}};return m}}function JP(e,t,n,r){function i(l,...o){let s=t(l);return typeof s>"u"&&r&&(s=n()),e(s,...o)}return i.unwrapped=e,i}var YP=XP();function ZP(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function e_({type:e,reducerName:t,createNotation:n},r,i){let l,o;if("reducer"in r){if(n&&!n_(r))throw new Error(sn(17));l=r.reducer,o=r.prepare}else l=r;i.addCase(e,l).exposeCaseReducer(t,l).exposeAction(t,o?Hp(e,o):Hp(e))}function t_(e){return e._reducerDefinitionType==="asyncThunk"}function n_(e){return e._reducerDefinitionType==="reducerWithPrepare"}function r_({type:e,reducerName:t},n,r,i){if(!i)throw new Error(sn(18));const{payloadCreator:l,fulfilled:o,pending:s,rejected:u,settled:a,options:c}=n,f=i(e,l,c);r.exposeAction(t,f),o&&r.addCase(f.fulfilled,o),s&&r.addCase(f.pending,s),u&&r.addCase(f.rejected,u),a&&r.addMatcher(f.settled,a),r.exposeCaseReducer(t,{fulfilled:o||no,pending:s||no,rejected:u||no,settled:a||no})}function no(){}function sn(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const i_=()=>{const e=localStorage.getItem("chatHistory");if(e)try{return JSON.parse(e)}catch(t){return console.error("Failed to parse chat history from localStorage:",t),[]}return[]},l_={history:i_()},Qg=YP({name:"chat",initialState:l_,reducers:{addMessage:(e,t)=>{e.history.push(t.payload),localStorage.setItem("chatHistory",JSON.stringify(e.history))},clearHistory:e=>{e.history=[],localStorage.setItem("chatHistory",JSON.stringify([]))},setHistory:(e,t)=>{e.history=t.payload,localStorage.setItem("chatHistory",JSON.stringify(e.history))}}}),{addMessage:o_,clearHistory:s_,setHistory:Ru}=Qg.actions,u_=Qg.reducer;var Il=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Is=typeof window>"u"||"Deno"in globalThis;function Tt(){}function a_(e,t){return typeof e=="function"?e(t):e}function c_(e){return typeof e=="number"&&e>=0&&e!==1/0}function f_(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Qp(e,t){return typeof e=="function"?e(t):e}function d_(e,t){return typeof e=="function"?e(t):e}function Kp(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:l,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==mf(o,t.options))return!1}else if(!wl(t.queryKey,o))return!1}if(n!=="all"){const u=t.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||i&&i!==t.state.fetchStatus||l&&!l(t))}function Gp(e,t){const{exact:n,status:r,predicate:i,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(n){if(wr(t.options.mutationKey)!==wr(l))return!1}else if(!wl(t.options.mutationKey,l))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function mf(e,t){return((t==null?void 0:t.queryKeyHashFn)||wr)(e)}function wr(e){return JSON.stringify(e,(t,n)=>qa(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function wl(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!wl(e[n],t[n])):!1}function Kg(e,t){if(e===t)return e;const n=Xp(e)&&Xp(t);if(n||qa(e)&&qa(t)){const r=n?e:Object.keys(e),i=r.length,l=n?t:Object.keys(t),o=l.length,s=n?[]:{};let u=0;for(let a=0;a{setTimeout(t,e)})}function m_(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Kg(e,t):t}function y_(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function g_(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var yf=Symbol();function Gg(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===yf?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var rr,En,Gr,ph,v_=(ph=class extends Il{constructor(){super();X(this,rr);X(this,En);X(this,Gr);$(this,Gr,t=>{if(!Is&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){C(this,En)||this.setEventListener(C(this,Gr))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,En))==null||t.call(this),$(this,En,void 0))}setEventListener(t){var n;$(this,Gr,t),(n=C(this,En))==null||n.call(this),$(this,En,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){C(this,rr)!==t&&($(this,rr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof C(this,rr)=="boolean"?C(this,rr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},rr=new WeakMap,En=new WeakMap,Gr=new WeakMap,ph),Xg=new v_,Xr,Cn,Jr,hh,w_=(hh=class extends Il{constructor(){super();X(this,Xr,!0);X(this,Cn);X(this,Jr);$(this,Jr,t=>{if(!Is&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){C(this,Cn)||this.setEventListener(C(this,Jr))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,Cn))==null||t.call(this),$(this,Cn,void 0))}setEventListener(t){var n;$(this,Jr,t),(n=C(this,Cn))==null||n.call(this),$(this,Cn,t(this.setOnline.bind(this)))}setOnline(t){C(this,Xr)!==t&&($(this,Xr,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return C(this,Xr)}},Xr=new WeakMap,Cn=new WeakMap,Jr=new WeakMap,hh),ts=new w_;function S_(){let e,t;const n=new Promise((i,l)=>{e=i,t=l});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function x_(e){return Math.min(1e3*2**e,3e4)}function Jg(e){return(e??"online")==="online"?ts.isOnline():!0}var Yg=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Ou(e){return e instanceof Yg}function Zg(e){let t=!1,n=0,r=!1,i;const l=S_(),o=v=>{var S;r||(d(new Yg(v)),(S=e.abort)==null||S.call(e))},s=()=>{t=!0},u=()=>{t=!1},a=()=>Xg.isFocused()&&(e.networkMode==="always"||ts.isOnline())&&e.canRun(),c=()=>Jg(e.networkMode)&&e.canRun(),f=v=>{var S;r||(r=!0,(S=e.onSuccess)==null||S.call(e,v),i==null||i(),l.resolve(v))},d=v=>{var S;r||(r=!0,(S=e.onError)==null||S.call(e,v),i==null||i(),l.reject(v))},p=()=>new Promise(v=>{var S;i=h=>{(r||a())&&v(h)},(S=e.onPause)==null||S.call(e)}).then(()=>{var v;i=void 0,r||(v=e.onContinue)==null||v.call(e)}),g=()=>{if(r)return;let v;const S=n===0?e.initialPromise:void 0;try{v=S??e.fn()}catch(h){v=Promise.reject(h)}Promise.resolve(v).then(f).catch(h=>{var k;if(r)return;const m=e.retry??(Is?0:3),y=e.retryDelay??x_,E=typeof y=="function"?y(n,h):y,P=m===!0||typeof m=="number"&&na()?void 0:p()).then(()=>{t?d(h):g()})})};return{promise:l,cancel:o,continue:()=>(i==null||i(),l),cancelRetry:s,continueRetry:u,canStart:c,start:()=>(c()?g():p().then(g),l)}}function k_(){let e=[],t=0,n=s=>{s()},r=s=>{s()},i=s=>setTimeout(s,0);const l=s=>{t?e.push(s):i(()=>{n(s)})},o=()=>{const s=e;e=[],s.length&&i(()=>{r(()=>{s.forEach(u=>{n(u)})})})};return{batch:s=>{let u;t++;try{u=s()}finally{t--,t||o()}return u},batchCalls:s=>(...u)=>{l(()=>{s(...u)})},schedule:l,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{r=s},setScheduler:s=>{i=s}}}var Ae=k_(),ir,mh,ev=(mh=class{constructor(){X(this,ir)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),c_(this.gcTime)&&$(this,ir,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Is?1/0:5*60*1e3))}clearGcTimeout(){C(this,ir)&&(clearTimeout(C(this,ir)),$(this,ir,void 0))}},ir=new WeakMap,mh),Yr,Zr,yt,lr,Fe,xl,or,Rt,Yt,yh,E_=(yh=class extends ev{constructor(t){super();X(this,Rt);X(this,Yr);X(this,Zr);X(this,yt);X(this,lr);X(this,Fe);X(this,xl);X(this,or);$(this,or,!1),$(this,xl,t.defaultOptions),this.setOptions(t.options),this.observers=[],$(this,lr,t.client),$(this,yt,C(this,lr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,$(this,Yr,P_(this.options)),this.state=t.state??C(this,Yr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=C(this,Fe))==null?void 0:t.promise}setOptions(t){this.options={...C(this,xl),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&C(this,yt).remove(this)}setData(t,n){const r=m_(this.state.data,t,this.options);return xe(this,Rt,Yt).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){xe(this,Rt,Yt).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=C(this,Fe))==null?void 0:r.promise;return(i=C(this,Fe))==null||i.cancel(t),n?n.then(Tt).catch(Tt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(C(this,Yr))}isActive(){return this.observers.some(t=>d_(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===yf||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!f_(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=C(this,Fe))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=C(this,Fe))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),C(this,yt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(C(this,Fe)&&(C(this,or)?C(this,Fe).cancel({revert:!0}):C(this,Fe).cancelRetry()),this.scheduleGc()),C(this,yt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||xe(this,Rt,Yt).call(this,{type:"invalidate"})}fetch(t,n){var u,a,c;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(C(this,Fe))return C(this,Fe).continueRetry(),C(this,Fe).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(d=>d.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,i=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>($(this,or,!0),r.signal)})},l=()=>{const f=Gg(this.options,n),d={client:C(this,lr),queryKey:this.queryKey,meta:this.meta};return i(d),$(this,or,!1),this.options.persister?this.options.persister(f,d,this):f(d)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:C(this,lr),state:this.state,fetchFn:l};i(o),(u=this.options.behavior)==null||u.onFetch(o,this),$(this,Zr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((a=o.fetchOptions)==null?void 0:a.meta))&&xe(this,Rt,Yt).call(this,{type:"fetch",meta:(c=o.fetchOptions)==null?void 0:c.meta});const s=f=>{var d,p,g,v;Ou(f)&&f.silent||xe(this,Rt,Yt).call(this,{type:"error",error:f}),Ou(f)||((p=(d=C(this,yt).config).onError)==null||p.call(d,f,this),(v=(g=C(this,yt).config).onSettled)==null||v.call(g,this.state.data,f,this)),this.scheduleGc()};return $(this,Fe,Zg({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var d,p,g,v;if(f===void 0){s(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(S){s(S);return}(p=(d=C(this,yt).config).onSuccess)==null||p.call(d,f,this),(v=(g=C(this,yt).config).onSettled)==null||v.call(g,f,this.state.error,this),this.scheduleGc()},onError:s,onFail:(f,d)=>{xe(this,Rt,Yt).call(this,{type:"failed",failureCount:f,error:d})},onPause:()=>{xe(this,Rt,Yt).call(this,{type:"pause"})},onContinue:()=>{xe(this,Rt,Yt).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),C(this,Fe).start()}},Yr=new WeakMap,Zr=new WeakMap,yt=new WeakMap,lr=new WeakMap,Fe=new WeakMap,xl=new WeakMap,or=new WeakMap,Rt=new WeakSet,Yt=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...C_(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return Ou(i)&&i.revert&&C(this,Zr)?{...C(this,Zr),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ae.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),C(this,yt).notify({query:this,type:"updated",action:t})})},yh);function C_(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Jg(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function P_(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var $t,gh,__=(gh=class extends Il{constructor(t={}){super();X(this,$t);this.config=t,$(this,$t,new Map)}build(t,n,r){const i=n.queryKey,l=n.queryHash??mf(i,n);let o=this.get(l);return o||(o=new E_({client:t,queryKey:i,queryHash:l,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){C(this,$t).has(t.queryHash)||(C(this,$t).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=C(this,$t).get(t.queryHash);n&&(t.destroy(),n===t&&C(this,$t).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ae.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return C(this,$t).get(t)}getAll(){return[...C(this,$t).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Kp(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Kp(t,r)):n}notify(t){Ae.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ae.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ae.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},$t=new WeakMap,gh),Ht,He,sr,Vt,vn,vh,T_=(vh=class extends ev{constructor(t){super();X(this,Vt);X(this,Ht);X(this,He);X(this,sr);this.mutationId=t.mutationId,$(this,He,t.mutationCache),$(this,Ht,[]),this.state=t.state||tv(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){C(this,Ht).includes(t)||(C(this,Ht).push(t),this.clearGcTimeout(),C(this,He).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){$(this,Ht,C(this,Ht).filter(n=>n!==t)),this.scheduleGc(),C(this,He).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){C(this,Ht).length||(this.state.status==="pending"?this.scheduleGc():C(this,He).remove(this))}continue(){var t;return((t=C(this,sr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,l,o,s,u,a,c,f,d,p,g,v,S,h,m,y,E,P,k,O;$(this,sr,Zg({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(T,z)=>{xe(this,Vt,vn).call(this,{type:"failed",failureCount:T,error:z})},onPause:()=>{xe(this,Vt,vn).call(this,{type:"pause"})},onContinue:()=>{xe(this,Vt,vn).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>C(this,He).canRun(this)}));const n=this.state.status==="pending",r=!C(this,sr).canStart();try{if(!n){xe(this,Vt,vn).call(this,{type:"pending",variables:t,isPaused:r}),await((l=(i=C(this,He).config).onMutate)==null?void 0:l.call(i,t,this));const z=await((s=(o=this.options).onMutate)==null?void 0:s.call(o,t));z!==this.state.context&&xe(this,Vt,vn).call(this,{type:"pending",context:z,variables:t,isPaused:r})}const T=await C(this,sr).start();return await((a=(u=C(this,He).config).onSuccess)==null?void 0:a.call(u,T,t,this.state.context,this)),await((f=(c=this.options).onSuccess)==null?void 0:f.call(c,T,t,this.state.context)),await((p=(d=C(this,He).config).onSettled)==null?void 0:p.call(d,T,null,this.state.variables,this.state.context,this)),await((v=(g=this.options).onSettled)==null?void 0:v.call(g,T,null,t,this.state.context)),xe(this,Vt,vn).call(this,{type:"success",data:T}),T}catch(T){try{throw await((h=(S=C(this,He).config).onError)==null?void 0:h.call(S,T,t,this.state.context,this)),await((y=(m=this.options).onError)==null?void 0:y.call(m,T,t,this.state.context)),await((P=(E=C(this,He).config).onSettled)==null?void 0:P.call(E,void 0,T,this.state.variables,this.state.context,this)),await((O=(k=this.options).onSettled)==null?void 0:O.call(k,void 0,T,t,this.state.context)),T}finally{xe(this,Vt,vn).call(this,{type:"error",error:T})}}finally{C(this,He).runNext(this)}}},Ht=new WeakMap,He=new WeakMap,sr=new WeakMap,Vt=new WeakSet,vn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ae.batch(()=>{C(this,Ht).forEach(r=>{r.onMutationUpdate(t)}),C(this,He).notify({mutation:this,type:"updated",action:t})})},vh);function tv(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var tn,Ot,kl,wh,R_=(wh=class extends Il{constructor(t={}){super();X(this,tn);X(this,Ot);X(this,kl);this.config=t,$(this,tn,new Set),$(this,Ot,new Map),$(this,kl,0)}build(t,n,r){const i=new T_({mutationCache:this,mutationId:++Dl(this,kl)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){C(this,tn).add(t);const n=ro(t);if(typeof n=="string"){const r=C(this,Ot).get(n);r?r.push(t):C(this,Ot).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(C(this,tn).delete(t)){const n=ro(t);if(typeof n=="string"){const r=C(this,Ot).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&C(this,Ot).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=ro(t);if(typeof n=="string"){const r=C(this,Ot).get(n),i=r==null?void 0:r.find(l=>l.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=ro(t);if(typeof n=="string"){const i=(r=C(this,Ot).get(n))==null?void 0:r.find(l=>l!==t&&l.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ae.batch(()=>{C(this,tn).forEach(t=>{this.notify({type:"removed",mutation:t})}),C(this,tn).clear(),C(this,Ot).clear()})}getAll(){return Array.from(C(this,tn))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Gp(n,r))}findAll(t={}){return this.getAll().filter(n=>Gp(t,n))}notify(t){Ae.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Ae.batch(()=>Promise.all(t.map(n=>n.continue().catch(Tt))))}},tn=new WeakMap,Ot=new WeakMap,kl=new WeakMap,wh);function ro(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Yp(e){return{onFetch:(t,n)=>{var c,f,d,p,g;const r=t.options,i=(d=(f=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:f.fetchMore)==null?void 0:d.direction,l=((p=t.state.data)==null?void 0:p.pages)||[],o=((g=t.state.data)==null?void 0:g.pageParams)||[];let s={pages:[],pageParams:[]},u=0;const a=async()=>{let v=!1;const S=y=>{Object.defineProperty(y,"signal",{enumerable:!0,get:()=>(t.signal.aborted?v=!0:t.signal.addEventListener("abort",()=>{v=!0}),t.signal)})},h=Gg(t.options,t.fetchOptions),m=async(y,E,P)=>{if(v)return Promise.reject();if(E==null&&y.pages.length)return Promise.resolve(y);const k={client:t.client,queryKey:t.queryKey,pageParam:E,direction:P?"backward":"forward",meta:t.options.meta};S(k);const O=await h(k),{maxPages:T}=t.options,z=P?g_:y_;return{pages:z(y.pages,O,T),pageParams:z(y.pageParams,E,T)}};if(i&&l.length){const y=i==="backward",E=y?O_:Zp,P={pages:l,pageParams:o},k=E(r,P);s=await m(P,k,y)}else{const y=e??l.length;do{const E=u===0?o[0]??r.initialPageParam:Zp(r,s);if(u>0&&E==null)break;s=await m(s,E),u++}while(u{var v,S;return(S=(v=t.options).persister)==null?void 0:S.call(v,a,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=a}}}function Zp(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function O_(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var we,Pn,_n,ei,ti,Tn,ni,ri,Sh,N_=(Sh=class{constructor(e={}){X(this,we);X(this,Pn);X(this,_n);X(this,ei);X(this,ti);X(this,Tn);X(this,ni);X(this,ri);$(this,we,e.queryCache||new __),$(this,Pn,e.mutationCache||new R_),$(this,_n,e.defaultOptions||{}),$(this,ei,new Map),$(this,ti,new Map),$(this,Tn,0)}mount(){Dl(this,Tn)._++,C(this,Tn)===1&&($(this,ni,Xg.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,we).onFocus())})),$(this,ri,ts.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,we).onOnline())})))}unmount(){var e,t;Dl(this,Tn)._--,C(this,Tn)===0&&((e=C(this,ni))==null||e.call(this),$(this,ni,void 0),(t=C(this,ri))==null||t.call(this),$(this,ri,void 0))}isFetching(e){return C(this,we).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return C(this,Pn).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=C(this,we).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=C(this,we).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Qp(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return C(this,we).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=C(this,we).get(r.queryHash),l=i==null?void 0:i.state.data,o=a_(t,l);if(o!==void 0)return C(this,we).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Ae.batch(()=>C(this,we).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=C(this,we).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=C(this,we);Ae.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=C(this,we);return Ae.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ae.batch(()=>C(this,we).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Tt).catch(Tt)}invalidateQueries(e,t={}){return Ae.batch(()=>(C(this,we).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ae.batch(()=>C(this,we).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let l=i.fetch(void 0,n);return n.throwOnError||(l=l.catch(Tt)),i.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(r).then(Tt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=C(this,we).build(this,t);return n.isStaleByTime(Qp(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Tt).catch(Tt)}fetchInfiniteQuery(e){return e.behavior=Yp(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Tt).catch(Tt)}ensureInfiniteQueryData(e){return e.behavior=Yp(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ts.isOnline()?C(this,Pn).resumePausedMutations():Promise.resolve()}getQueryCache(){return C(this,we)}getMutationCache(){return C(this,Pn)}getDefaultOptions(){return C(this,_n)}setDefaultOptions(e){$(this,_n,e)}setQueryDefaults(e,t){C(this,ei).set(wr(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...C(this,ei).values()],n={};return t.forEach(r=>{wl(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){C(this,ti).set(wr(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...C(this,ti).values()],n={};return t.forEach(r=>{wl(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...C(this,_n).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=mf(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===yf&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...C(this,_n).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){C(this,we).clear(),C(this,Pn).clear()}},we=new WeakMap,Pn=new WeakMap,_n=new WeakMap,ei=new WeakMap,ti=new WeakMap,Tn=new WeakMap,ni=new WeakMap,ri=new WeakMap,Sh),Rn,On,Ge,nn,un,wo,Wa,xh,I_=(xh=class extends Il{constructor(n,r){super();X(this,un);X(this,Rn);X(this,On);X(this,Ge);X(this,nn);$(this,Rn,n),this.setOptions(r),this.bindMethods(),xe(this,un,wo).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=C(this,Rn).defaultMutationOptions(n),p_(this.options,r)||C(this,Rn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:C(this,Ge),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&wr(r.mutationKey)!==wr(this.options.mutationKey)?this.reset():((i=C(this,Ge))==null?void 0:i.state.status)==="pending"&&C(this,Ge).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=C(this,Ge))==null||n.removeObserver(this)}onMutationUpdate(n){xe(this,un,wo).call(this),xe(this,un,Wa).call(this,n)}getCurrentResult(){return C(this,On)}reset(){var n;(n=C(this,Ge))==null||n.removeObserver(this),$(this,Ge,void 0),xe(this,un,wo).call(this),xe(this,un,Wa).call(this)}mutate(n,r){var i;return $(this,nn,r),(i=C(this,Ge))==null||i.removeObserver(this),$(this,Ge,C(this,Rn).getMutationCache().build(C(this,Rn),this.options)),C(this,Ge).addObserver(this),C(this,Ge).execute(n)}},Rn=new WeakMap,On=new WeakMap,Ge=new WeakMap,nn=new WeakMap,un=new WeakSet,wo=function(){var r;const n=((r=C(this,Ge))==null?void 0:r.state)??tv();$(this,On,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Wa=function(n){Ae.batch(()=>{var r,i,l,o,s,u,a,c;if(C(this,nn)&&this.hasListeners()){const f=C(this,On).variables,d=C(this,On).context;(n==null?void 0:n.type)==="success"?((i=(r=C(this,nn)).onSuccess)==null||i.call(r,n.data,f,d),(o=(l=C(this,nn)).onSettled)==null||o.call(l,n.data,null,f,d)):(n==null?void 0:n.type)==="error"&&((u=(s=C(this,nn)).onError)==null||u.call(s,n.error,f,d),(c=(a=C(this,nn)).onSettled)==null||c.call(a,void 0,n.error,f,d))}this.listeners.forEach(f=>{f(C(this,On))})})},xh),nv=A.createContext(void 0),A_=e=>{const t=A.useContext(nv);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},b_=({client:e,children:t})=>(A.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),U.jsx(nv.Provider,{value:e,children:t}));function L_(e,t){return typeof e=="function"?e(...t):!!e}function D_(){}function z_(e,t){const n=A_(),[r]=A.useState(()=>new I_(n,e));A.useEffect(()=>{r.setOptions(e)},[r,e]);const i=A.useSyncExternalStore(A.useCallback(o=>r.subscribe(Ae.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),l=A.useCallback((o,s)=>{r.mutate(o,s).catch(D_)},[r]);if(i.error&&L_(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:l,mutateAsync:i.mutate}}function rv(e,t){return function(){return e.apply(t,arguments)}}const{toString:F_}=Object.prototype,{getPrototypeOf:gf}=Object,As=(e=>t=>{const n=F_.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),zt=e=>(e=e.toLowerCase(),t=>As(t)===e),bs=e=>t=>typeof t===e,{isArray:wi}=Array,Sl=bs("undefined");function M_(e){return e!==null&&!Sl(e)&&e.constructor!==null&&!Sl(e.constructor)&&ct(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const iv=zt("ArrayBuffer");function j_(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&iv(e.buffer),t}const B_=bs("string"),ct=bs("function"),lv=bs("number"),Ls=e=>e!==null&&typeof e=="object",U_=e=>e===!0||e===!1,So=e=>{if(As(e)!=="object")return!1;const t=gf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},$_=zt("Date"),H_=zt("File"),V_=zt("Blob"),q_=zt("FileList"),W_=e=>Ls(e)&&ct(e.pipe),Q_=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ct(e.append)&&((t=As(e))==="formdata"||t==="object"&&ct(e.toString)&&e.toString()==="[object FormData]"))},K_=zt("URLSearchParams"),[G_,X_,J_,Y_]=["ReadableStream","Request","Response","Headers"].map(zt),Z_=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Al(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),wi(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}const nr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,sv=e=>!Sl(e)&&e!==nr;function Qa(){const{caseless:e}=sv(this)&&this||{},t={},n=(r,i)=>{const l=e&&ov(t,i)||i;So(t[l])&&So(r)?t[l]=Qa(t[l],r):So(r)?t[l]=Qa({},r):wi(r)?t[l]=r.slice():t[l]=r};for(let r=0,i=arguments.length;r(Al(t,(i,l)=>{n&&ct(i)?e[l]=rv(i,n):e[l]=i},{allOwnKeys:r}),e),tT=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),nT=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},rT=(e,t,n,r)=>{let i,l,o;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),l=i.length;l-- >0;)o=i[l],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&gf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},iT=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},lT=e=>{if(!e)return null;if(wi(e))return e;let t=e.length;if(!lv(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},oT=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&gf(Uint8Array)),sT=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const l=i.value;t.call(e,l[0],l[1])}},uT=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},aT=zt("HTMLFormElement"),cT=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),eh=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),fT=zt("RegExp"),uv=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Al(n,(i,l)=>{let o;(o=t(i,l,e))!==!1&&(r[l]=o||i)}),Object.defineProperties(e,r)},dT=e=>{uv(e,(t,n)=>{if(ct(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(ct(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},pT=(e,t)=>{const n={},r=i=>{i.forEach(l=>{n[l]=!0})};return wi(e)?r(e):r(String(e).split(t)),n},hT=()=>{},mT=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function yT(e){return!!(e&&ct(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const gT=e=>{const t=new Array(10),n=(r,i)=>{if(Ls(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const l=wi(r)?[]:{};return Al(r,(o,s)=>{const u=n(o,i+1);!Sl(u)&&(l[s]=u)}),t[i]=void 0,l}}return r};return n(e,0)},vT=zt("AsyncFunction"),wT=e=>e&&(Ls(e)||ct(e))&&ct(e.then)&&ct(e.catch),av=((e,t)=>e?setImmediate:t?((n,r)=>(nr.addEventListener("message",({source:i,data:l})=>{i===nr&&l===n&&r.length&&r.shift()()},!1),i=>{r.push(i),nr.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",ct(nr.postMessage)),ST=typeof queueMicrotask<"u"?queueMicrotask.bind(nr):typeof process<"u"&&process.nextTick||av,_={isArray:wi,isArrayBuffer:iv,isBuffer:M_,isFormData:Q_,isArrayBufferView:j_,isString:B_,isNumber:lv,isBoolean:U_,isObject:Ls,isPlainObject:So,isReadableStream:G_,isRequest:X_,isResponse:J_,isHeaders:Y_,isUndefined:Sl,isDate:$_,isFile:H_,isBlob:V_,isRegExp:fT,isFunction:ct,isStream:W_,isURLSearchParams:K_,isTypedArray:oT,isFileList:q_,forEach:Al,merge:Qa,extend:eT,trim:Z_,stripBOM:tT,inherits:nT,toFlatObject:rT,kindOf:As,kindOfTest:zt,endsWith:iT,toArray:lT,forEachEntry:sT,matchAll:uT,isHTMLForm:aT,hasOwnProperty:eh,hasOwnProp:eh,reduceDescriptors:uv,freezeMethods:dT,toObjectSet:pT,toCamelCase:cT,noop:hT,toFiniteNumber:mT,findKey:ov,global:nr,isContextDefined:sv,isSpecCompliantForm:yT,toJSONObject:gT,isAsyncFn:vT,isThenable:wT,setImmediate:av,asap:ST};function K(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}_.inherits(K,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:_.toJSONObject(this.config),code:this.code,status:this.status}}});const cv=K.prototype,fv={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{fv[e]={value:e}});Object.defineProperties(K,fv);Object.defineProperty(cv,"isAxiosError",{value:!0});K.from=(e,t,n,r,i,l)=>{const o=Object.create(cv);return _.toFlatObject(e,o,function(u){return u!==Error.prototype},s=>s!=="isAxiosError"),K.call(o,e.message,t,n,r,i),o.cause=e,o.name=e.name,l&&Object.assign(o,l),o};const xT=null;function Ka(e){return _.isPlainObject(e)||_.isArray(e)}function dv(e){return _.endsWith(e,"[]")?e.slice(0,-2):e}function th(e,t,n){return e?e.concat(t).map(function(i,l){return i=dv(i),!n&&l?"["+i+"]":i}).join(n?".":""):t}function kT(e){return _.isArray(e)&&!e.some(Ka)}const ET=_.toFlatObject(_,{},null,function(t){return/^is[A-Z]/.test(t)});function Ds(e,t,n){if(!_.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=_.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,S){return!_.isUndefined(S[v])});const r=n.metaTokens,i=n.visitor||c,l=n.dots,o=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&_.isSpecCompliantForm(t);if(!_.isFunction(i))throw new TypeError("visitor must be a function");function a(g){if(g===null)return"";if(_.isDate(g))return g.toISOString();if(!u&&_.isBlob(g))throw new K("Blob is not supported. Use a Buffer instead.");return _.isArrayBuffer(g)||_.isTypedArray(g)?u&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function c(g,v,S){let h=g;if(g&&!S&&typeof g=="object"){if(_.endsWith(v,"{}"))v=r?v:v.slice(0,-2),g=JSON.stringify(g);else if(_.isArray(g)&&kT(g)||(_.isFileList(g)||_.endsWith(v,"[]"))&&(h=_.toArray(g)))return v=dv(v),h.forEach(function(y,E){!(_.isUndefined(y)||y===null)&&t.append(o===!0?th([v],E,l):o===null?v:v+"[]",a(y))}),!1}return Ka(g)?!0:(t.append(th(S,v,l),a(g)),!1)}const f=[],d=Object.assign(ET,{defaultVisitor:c,convertValue:a,isVisitable:Ka});function p(g,v){if(!_.isUndefined(g)){if(f.indexOf(g)!==-1)throw Error("Circular reference detected in "+v.join("."));f.push(g),_.forEach(g,function(h,m){(!(_.isUndefined(h)||h===null)&&i.call(t,h,_.isString(m)?m.trim():m,v,d))===!0&&p(h,v?v.concat(m):[m])}),f.pop()}}if(!_.isObject(e))throw new TypeError("data must be an object");return p(e),t}function nh(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function vf(e,t){this._pairs=[],e&&Ds(e,this,t)}const pv=vf.prototype;pv.append=function(t,n){this._pairs.push([t,n])};pv.toString=function(t){const n=t?function(r){return t.call(this,r,nh)}:nh;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function CT(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function hv(e,t,n){if(!t)return e;const r=n&&n.encode||CT;_.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let l;if(i?l=i(t,n):l=_.isURLSearchParams(t)?t.toString():new vf(t,n).toString(r),l){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+l}return e}class rh{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){_.forEach(this.handlers,function(r){r!==null&&t(r)})}}const mv={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},PT=typeof URLSearchParams<"u"?URLSearchParams:vf,_T=typeof FormData<"u"?FormData:null,TT=typeof Blob<"u"?Blob:null,RT={isBrowser:!0,classes:{URLSearchParams:PT,FormData:_T,Blob:TT},protocols:["http","https","file","blob","url","data"]},wf=typeof window<"u"&&typeof document<"u",Ga=typeof navigator=="object"&&navigator||void 0,OT=wf&&(!Ga||["ReactNative","NativeScript","NS"].indexOf(Ga.product)<0),NT=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",IT=wf&&window.location.href||"http://localhost",AT=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:wf,hasStandardBrowserEnv:OT,hasStandardBrowserWebWorkerEnv:NT,navigator:Ga,origin:IT},Symbol.toStringTag,{value:"Module"})),je={...AT,...RT};function bT(e,t){return Ds(e,new je.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,l){return je.isNode&&_.isBuffer(n)?(this.append(r,n.toString("base64")),!1):l.defaultVisitor.apply(this,arguments)}},t))}function LT(e){return _.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function DT(e){const t={},n=Object.keys(e);let r;const i=n.length;let l;for(r=0;r=n.length;return o=!o&&_.isArray(i)?i.length:o,u?(_.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!s):((!i[o]||!_.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],l)&&_.isArray(i[o])&&(i[o]=DT(i[o])),!s)}if(_.isFormData(e)&&_.isFunction(e.entries)){const n={};return _.forEachEntry(e,(r,i)=>{t(LT(r),i,n,0)}),n}return null}function zT(e,t,n){if(_.isString(e))try{return(t||JSON.parse)(e),_.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const bl={transitional:mv,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,l=_.isObject(t);if(l&&_.isHTMLForm(t)&&(t=new FormData(t)),_.isFormData(t))return i?JSON.stringify(yv(t)):t;if(_.isArrayBuffer(t)||_.isBuffer(t)||_.isStream(t)||_.isFile(t)||_.isBlob(t)||_.isReadableStream(t))return t;if(_.isArrayBufferView(t))return t.buffer;if(_.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(l){if(r.indexOf("application/x-www-form-urlencoded")>-1)return bT(t,this.formSerializer).toString();if((s=_.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Ds(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}return l||i?(n.setContentType("application/json",!1),zT(t)):t}],transformResponse:[function(t){const n=this.transitional||bl.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(_.isResponse(t)||_.isReadableStream(t))return t;if(t&&_.isString(t)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(o)throw s.name==="SyntaxError"?K.from(s,K.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:je.classes.FormData,Blob:je.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_.forEach(["delete","get","head","post","put","patch"],e=>{bl.headers[e]={}});const FT=_.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),MT=e=>{const t={};let n,r,i;return e&&e.split(` -`).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||t[n]&&FT[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},ih=Symbol("internals");function bi(e){return e&&String(e).trim().toLowerCase()}function xo(e){return e===!1||e==null?e:_.isArray(e)?e.map(xo):String(e)}function jT(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const BT=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Nu(e,t,n,r,i){if(_.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!_.isString(t)){if(_.isString(r))return t.indexOf(r)!==-1;if(_.isRegExp(r))return r.test(t)}}function UT(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function $T(e,t){const n=_.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,l,o){return this[r].call(this,t,i,l,o)},configurable:!0})})}let nt=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function l(s,u,a){const c=bi(u);if(!c)throw new Error("header name must be a non-empty string");const f=_.findKey(i,c);(!f||i[f]===void 0||a===!0||a===void 0&&i[f]!==!1)&&(i[f||u]=xo(s))}const o=(s,u)=>_.forEach(s,(a,c)=>l(a,c,u));if(_.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(_.isString(t)&&(t=t.trim())&&!BT(t))o(MT(t),n);else if(_.isHeaders(t))for(const[s,u]of t.entries())l(u,s,r);else t!=null&&l(n,t,r);return this}get(t,n){if(t=bi(t),t){const r=_.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return jT(i);if(_.isFunction(n))return n.call(this,i,r);if(_.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=bi(t),t){const r=_.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Nu(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function l(o){if(o=bi(o),o){const s=_.findKey(r,o);s&&(!n||Nu(r,r[s],s,n))&&(delete r[s],i=!0)}}return _.isArray(t)?t.forEach(l):l(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const l=n[r];(!t||Nu(this,this[l],l,t,!0))&&(delete this[l],i=!0)}return i}normalize(t){const n=this,r={};return _.forEach(this,(i,l)=>{const o=_.findKey(r,l);if(o){n[o]=xo(i),delete n[l];return}const s=t?UT(l):String(l).trim();s!==l&&delete n[l],n[s]=xo(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return _.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&_.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[ih]=this[ih]={accessors:{}}).accessors,i=this.prototype;function l(o){const s=bi(o);r[s]||($T(i,o),r[s]=!0)}return _.isArray(t)?t.forEach(l):l(t),this}};nt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);_.reduceDescriptors(nt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});_.freezeMethods(nt);function Iu(e,t){const n=this||bl,r=t||n,i=nt.from(r.headers);let l=r.data;return _.forEach(e,function(s){l=s.call(n,l,i.normalize(),t?t.status:void 0)}),i.normalize(),l}function gv(e){return!!(e&&e.__CANCEL__)}function Si(e,t,n){K.call(this,e??"canceled",K.ERR_CANCELED,t,n),this.name="CanceledError"}_.inherits(Si,K,{__CANCEL__:!0});function vv(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new K("Request failed with status code "+n.status,[K.ERR_BAD_REQUEST,K.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function HT(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function VT(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,l=0,o;return t=t!==void 0?t:1e3,function(u){const a=Date.now(),c=r[l];o||(o=a),n[i]=u,r[i]=a;let f=l,d=0;for(;f!==i;)d+=n[f++],f=f%e;if(i=(i+1)%e,i===l&&(l=(l+1)%e),a-o{n=c,i=null,l&&(clearTimeout(l),l=null),e.apply(null,a)};return[(...a)=>{const c=Date.now(),f=c-n;f>=r?o(a,c):(i=a,l||(l=setTimeout(()=>{l=null,o(i)},r-f)))},()=>i&&o(i)]}const ns=(e,t,n=3)=>{let r=0;const i=VT(50,250);return qT(l=>{const o=l.loaded,s=l.lengthComputable?l.total:void 0,u=o-r,a=i(u),c=o<=s;r=o;const f={loaded:o,total:s,progress:s?o/s:void 0,bytes:u,rate:a||void 0,estimated:a&&s&&c?(s-o)/a:void 0,event:l,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(f)},n)},lh=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},oh=e=>(...t)=>_.asap(()=>e(...t)),WT=je.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,je.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(je.origin),je.navigator&&/(msie|trident)/i.test(je.navigator.userAgent)):()=>!0,QT=je.hasStandardBrowserEnv?{write(e,t,n,r,i,l){const o=[e+"="+encodeURIComponent(t)];_.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),_.isString(r)&&o.push("path="+r),_.isString(i)&&o.push("domain="+i),l===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function KT(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function GT(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function wv(e,t,n){let r=!KT(t);return e&&(r||n==!1)?GT(e,t):t}const sh=e=>e instanceof nt?{...e}:e;function Sr(e,t){t=t||{};const n={};function r(a,c,f,d){return _.isPlainObject(a)&&_.isPlainObject(c)?_.merge.call({caseless:d},a,c):_.isPlainObject(c)?_.merge({},c):_.isArray(c)?c.slice():c}function i(a,c,f,d){if(_.isUndefined(c)){if(!_.isUndefined(a))return r(void 0,a,f,d)}else return r(a,c,f,d)}function l(a,c){if(!_.isUndefined(c))return r(void 0,c)}function o(a,c){if(_.isUndefined(c)){if(!_.isUndefined(a))return r(void 0,a)}else return r(void 0,c)}function s(a,c,f){if(f in t)return r(a,c);if(f in e)return r(void 0,a)}const u={url:l,method:l,data:l,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(a,c,f)=>i(sh(a),sh(c),f,!0)};return _.forEach(Object.keys(Object.assign({},e,t)),function(c){const f=u[c]||i,d=f(e[c],t[c],c);_.isUndefined(d)&&f!==s||(n[c]=d)}),n}const Sv=e=>{const t=Sr({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:l,headers:o,auth:s}=t;t.headers=o=nt.from(o),t.url=hv(wv(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&o.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let u;if(_.isFormData(n)){if(je.hasStandardBrowserEnv||je.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((u=o.getContentType())!==!1){const[a,...c]=u?u.split(";").map(f=>f.trim()).filter(Boolean):[];o.setContentType([a||"multipart/form-data",...c].join("; "))}}if(je.hasStandardBrowserEnv&&(r&&_.isFunction(r)&&(r=r(t)),r||r!==!1&&WT(t.url))){const a=i&&l&&QT.read(l);a&&o.set(i,a)}return t},XT=typeof XMLHttpRequest<"u",JT=XT&&function(e){return new Promise(function(n,r){const i=Sv(e);let l=i.data;const o=nt.from(i.headers).normalize();let{responseType:s,onUploadProgress:u,onDownloadProgress:a}=i,c,f,d,p,g;function v(){p&&p(),g&&g(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let S=new XMLHttpRequest;S.open(i.method.toUpperCase(),i.url,!0),S.timeout=i.timeout;function h(){if(!S)return;const y=nt.from("getAllResponseHeaders"in S&&S.getAllResponseHeaders()),P={data:!s||s==="text"||s==="json"?S.responseText:S.response,status:S.status,statusText:S.statusText,headers:y,config:e,request:S};vv(function(O){n(O),v()},function(O){r(O),v()},P),S=null}"onloadend"in S?S.onloadend=h:S.onreadystatechange=function(){!S||S.readyState!==4||S.status===0&&!(S.responseURL&&S.responseURL.indexOf("file:")===0)||setTimeout(h)},S.onabort=function(){S&&(r(new K("Request aborted",K.ECONNABORTED,e,S)),S=null)},S.onerror=function(){r(new K("Network Error",K.ERR_NETWORK,e,S)),S=null},S.ontimeout=function(){let E=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const P=i.transitional||mv;i.timeoutErrorMessage&&(E=i.timeoutErrorMessage),r(new K(E,P.clarifyTimeoutError?K.ETIMEDOUT:K.ECONNABORTED,e,S)),S=null},l===void 0&&o.setContentType(null),"setRequestHeader"in S&&_.forEach(o.toJSON(),function(E,P){S.setRequestHeader(P,E)}),_.isUndefined(i.withCredentials)||(S.withCredentials=!!i.withCredentials),s&&s!=="json"&&(S.responseType=i.responseType),a&&([d,g]=ns(a,!0),S.addEventListener("progress",d)),u&&S.upload&&([f,p]=ns(u),S.upload.addEventListener("progress",f),S.upload.addEventListener("loadend",p)),(i.cancelToken||i.signal)&&(c=y=>{S&&(r(!y||y.type?new Si(null,e,S):y),S.abort(),S=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const m=HT(i.url);if(m&&je.protocols.indexOf(m)===-1){r(new K("Unsupported protocol "+m+":",K.ERR_BAD_REQUEST,e));return}S.send(l||null)})},YT=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const l=function(a){if(!i){i=!0,s();const c=a instanceof Error?a:this.reason;r.abort(c instanceof K?c:new Si(c instanceof Error?c.message:c))}};let o=t&&setTimeout(()=>{o=null,l(new K(`timeout ${t} of ms exceeded`,K.ETIMEDOUT))},t);const s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(a=>{a.unsubscribe?a.unsubscribe(l):a.removeEventListener("abort",l)}),e=null)};e.forEach(a=>a.addEventListener("abort",l));const{signal:u}=r;return u.unsubscribe=()=>_.asap(s),u}},ZT=function*(e,t){let n=e.byteLength;if(n{const i=eR(e,t);let l=0,o,s=u=>{o||(o=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:a,value:c}=await i.next();if(a){s(),u.close();return}let f=c.byteLength;if(n){let d=l+=f;n(d)}u.enqueue(new Uint8Array(c))}catch(a){throw s(a),a}},cancel(u){return s(u),i.return()}},{highWaterMark:2})},zs=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",xv=zs&&typeof ReadableStream=="function",nR=zs&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),kv=(e,...t)=>{try{return!!e(...t)}catch{return!1}},rR=xv&&kv(()=>{let e=!1;const t=new Request(je.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),ah=64*1024,Xa=xv&&kv(()=>_.isReadableStream(new Response("").body)),rs={stream:Xa&&(e=>e.body)};zs&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!rs[t]&&(rs[t]=_.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new K(`Response type '${t}' is not supported`,K.ERR_NOT_SUPPORT,r)})})})(new Response);const iR=async e=>{if(e==null)return 0;if(_.isBlob(e))return e.size;if(_.isSpecCompliantForm(e))return(await new Request(je.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(_.isArrayBufferView(e)||_.isArrayBuffer(e))return e.byteLength;if(_.isURLSearchParams(e)&&(e=e+""),_.isString(e))return(await nR(e)).byteLength},lR=async(e,t)=>{const n=_.toFiniteNumber(e.getContentLength());return n??iR(t)},oR=zs&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:l,timeout:o,onDownloadProgress:s,onUploadProgress:u,responseType:a,headers:c,withCredentials:f="same-origin",fetchOptions:d}=Sv(e);a=a?(a+"").toLowerCase():"text";let p=YT([i,l&&l.toAbortSignal()],o),g;const v=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let S;try{if(u&&rR&&n!=="get"&&n!=="head"&&(S=await lR(c,r))!==0){let P=new Request(t,{method:"POST",body:r,duplex:"half"}),k;if(_.isFormData(r)&&(k=P.headers.get("content-type"))&&c.setContentType(k),P.body){const[O,T]=lh(S,ns(oh(u)));r=uh(P.body,ah,O,T)}}_.isString(f)||(f=f?"include":"omit");const h="credentials"in Request.prototype;g=new Request(t,{...d,signal:p,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:h?f:void 0});let m=await fetch(g);const y=Xa&&(a==="stream"||a==="response");if(Xa&&(s||y&&v)){const P={};["status","statusText","headers"].forEach(z=>{P[z]=m[z]});const k=_.toFiniteNumber(m.headers.get("content-length")),[O,T]=s&&lh(k,ns(oh(s),!0))||[];m=new Response(uh(m.body,ah,O,()=>{T&&T(),v&&v()}),P)}a=a||"text";let E=await rs[_.findKey(rs,a)||"text"](m,e);return!y&&v&&v(),await new Promise((P,k)=>{vv(P,k,{data:E,headers:nt.from(m.headers),status:m.status,statusText:m.statusText,config:e,request:g})})}catch(h){throw v&&v(),h&&h.name==="TypeError"&&/fetch/i.test(h.message)?Object.assign(new K("Network Error",K.ERR_NETWORK,e,g),{cause:h.cause||h}):K.from(h,h&&h.code,e,g)}}),Ja={http:xT,xhr:JT,fetch:oR};_.forEach(Ja,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const ch=e=>`- ${e}`,sR=e=>_.isFunction(e)||e===null||e===!1,Ev={getAdapter:e=>{e=_.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let l=0;l`adapter ${s} `+(u===!1?"is not supported by the environment":"is not available in the build"));let o=t?l.length>1?`since : -`+l.map(ch).join(` -`):" "+ch(l[0]):"as no adapter specified";throw new K("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:Ja};function Au(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Si(null,e)}function fh(e){return Au(e),e.headers=nt.from(e.headers),e.data=Iu.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ev.getAdapter(e.adapter||bl.adapter)(e).then(function(r){return Au(e),r.data=Iu.call(e,e.transformResponse,r),r.headers=nt.from(r.headers),r},function(r){return gv(r)||(Au(e),r&&r.response&&(r.response.data=Iu.call(e,e.transformResponse,r.response),r.response.headers=nt.from(r.response.headers))),Promise.reject(r)})}const Cv="1.8.4",Fs={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Fs[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const dh={};Fs.transitional=function(t,n,r){function i(l,o){return"[Axios v"+Cv+"] Transitional option '"+l+"'"+o+(r?". "+r:"")}return(l,o,s)=>{if(t===!1)throw new K(i(o," has been removed"+(n?" in "+n:"")),K.ERR_DEPRECATED);return n&&!dh[o]&&(dh[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(l,o,s):!0}};Fs.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function uR(e,t,n){if(typeof e!="object")throw new K("options must be an object",K.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const l=r[i],o=t[l];if(o){const s=e[l],u=s===void 0||o(s,l,e);if(u!==!0)throw new K("option "+l+" must be "+u,K.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new K("Unknown option "+l,K.ERR_BAD_OPTION)}}const ko={assertOptions:uR,validators:Fs},jt=ko.validators;let fr=class{constructor(t){this.defaults=t,this.interceptors={request:new rh,response:new rh}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const l=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?l&&!String(r.stack).endsWith(l.replace(/^.+\n.+\n/,""))&&(r.stack+=` -`+l):r.stack=l}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Sr(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:l}=n;r!==void 0&&ko.assertOptions(r,{silentJSONParsing:jt.transitional(jt.boolean),forcedJSONParsing:jt.transitional(jt.boolean),clarifyTimeoutError:jt.transitional(jt.boolean)},!1),i!=null&&(_.isFunction(i)?n.paramsSerializer={serialize:i}:ko.assertOptions(i,{encode:jt.function,serialize:jt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ko.assertOptions(n,{baseUrl:jt.spelling("baseURL"),withXsrfToken:jt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=l&&_.merge(l.common,l[n.method]);l&&_.forEach(["delete","get","head","post","put","patch","common"],g=>{delete l[g]}),n.headers=nt.concat(o,l);const s=[];let u=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(u=u&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const a=[];this.interceptors.response.forEach(function(v){a.push(v.fulfilled,v.rejected)});let c,f=0,d;if(!u){const g=[fh.bind(this),void 0];for(g.unshift.apply(g,s),g.push.apply(g,a),d=g.length,c=Promise.resolve(n);f{if(!r._listeners)return;let l=r._listeners.length;for(;l-- >0;)r._listeners[l](i);r._listeners=null}),this.promise.then=i=>{let l;const o=new Promise(s=>{r.subscribe(s),l=s}).then(i);return o.cancel=function(){r.unsubscribe(l)},o},t(function(l,o,s){r.reason||(r.reason=new Si(l,o,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Pv(function(i){t=i}),cancel:t}}};function cR(e){return function(n){return e.apply(null,n)}}function fR(e){return _.isObject(e)&&e.isAxiosError===!0}const Ya={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ya).forEach(([e,t])=>{Ya[t]=e});function _v(e){const t=new fr(e),n=rv(fr.prototype.request,t);return _.extend(n,fr.prototype,t,{allOwnKeys:!0}),_.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return _v(Sr(e,i))},n}const ve=_v(bl);ve.Axios=fr;ve.CanceledError=Si;ve.CancelToken=aR;ve.isCancel=gv;ve.VERSION=Cv;ve.toFormData=Ds;ve.AxiosError=K;ve.Cancel=ve.CanceledError;ve.all=function(t){return Promise.all(t)};ve.spread=cR;ve.isAxiosError=fR;ve.mergeConfig=Sr;ve.AxiosHeaders=nt;ve.formToJSON=e=>yv(_.isHTMLForm(e)?new FormData(e):e);ve.getAdapter=Ev.getAdapter;ve.HttpStatusCode=Ya;ve.default=ve;const{Axios:_R,AxiosError:TR,CanceledError:RR,isCancel:OR,CancelToken:NR,VERSION:IR,all:AR,Cancel:bR,isAxiosError:LR,spread:DR,toFormData:zR,AxiosHeaders:FR,HttpStatusCode:MR,formToJSON:jR,getAdapter:BR,mergeConfig:UR}=ve,Tv="https://muryshev-generic-chatbot-backend.hf.space",Sf=ve.create({baseURL:`${Tv}`,timeout:6e5}),dR=e=>{const t=localStorage.getItem("authToken");return t&&(e.headers.Authorization=`Bearer ${t}`),e},pR=e=>e,hR=async e=>{var n;const t=e.message;return t.includes("409")&&(console.log("409"),Ov.invalidateQueries({queryKey:["processing"]})),((n=e.response)==null?void 0:n.status)===401?(localStorage.removeItem("authToken"),window.location.href="/login"):!ve.isCancel(e)&&!t.includes("409")&&alert(`${t} Произошла ошибка`),Promise.reject(e)};Sf.interceptors.request.use(dR);Sf.interceptors.response.use(pR,hR);const mR=async({url:e,signal:t,...n},r=Tv)=>{var o,s,u;const i=new AbortController,l=t||i.signal;try{console.log("Попытка отправки запроса");const a=await Sf({url:`${r}${e}`,signal:l,...n});return console.log("Запрос отправлен, результат:",a),{data:a.data,headers:a.headers}}catch(a){if(ve.isCancel(a))return console.log("Запрос отменен"),{error:{status:"Cancelled",data:"Request was cancelled",notCauseError:!0}};const c=a;return console.log("Ошибка при отправке запроса"),{error:{status:(o=c.response)==null?void 0:o.status,data:(s=c.response)==null?void 0:s.data,headers:(u=c.response)==null?void 0:u.headers}}}finally{t||i.abort()}},yR=async e=>{const t=await mR({url:"/auth/login",method:"post",data:e});if("error"in t)throw new Error(`Ошибка авторизации: ${t.error.status}`);return t.data},Rv=A.createContext(void 0),gR=({children:e})=>{const[t,n]=A.useState(()=>!!localStorage.getItem("authToken")),r=z_({mutationFn:o=>yR(o),onSuccess:o=>{localStorage.setItem("authToken",o.access_token),n(!0)},onError:o=>{console.error("Login Error:",o)}}),i=async o=>{await r.mutateAsync(o)},l=()=>{localStorage.removeItem("authToken"),n(!1)};return U.jsx(Rv.Provider,{value:{isAuthenticated:t,login:i,logout:l,isLoading:r.isPending,error:r.error},children:e})},xf=()=>{const e=A.useContext(Rv);if(!e)throw new Error("useAuth must be used within an AuthProvider");return e},vR=()=>{const[e,t]=A.useState(""),[n,r]=A.useState(null),[i,l]=A.useState(!1),[o,s]=A.useState(!1),u=bS(S=>S.chat.history),a=NS(),c=A.useRef(null),{logout:f,isAuthenticated:d}=xf(),p=()=>{const S=document.querySelector(".messages");if(S){const h=S.getBoundingClientRect(),m=window.innerHeight;return h.bottom<=m+10}return!0},g=()=>{c.current&&(c.current.abort(),l(!1),s(!1),console.log("Generation stopped by user"))},v=async S=>{var P;if(!S.trim()||i||!d)return;const h={role:"user",content:S,searchResults:"",searchEntities:[]};a(o_(h));const m=document.querySelector(".messages");if(m){const k=m.querySelectorAll("div"),O=k[k.length-1];O&&p()&&setTimeout(()=>{O.scrollIntoView({behavior:"smooth",block:"start"})},0)}t(""),l(!0),s(!1),console.log("Start request - isLoading:",i,"isGeneratingTokens:",o);const y="https://muryshev-generic-chatbot-backend.hf.space/llm/chat/stream",E=localStorage.getItem("authToken");try{const k=new AbortController;c.current=k;const O=setTimeout(()=>{k.abort(),r("Сервер временно недоступен")},6e4),T=await fetch(y,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${E}`},body:JSON.stringify({history:[...u,h]}),signal:k.signal});if(clearTimeout(O),!T.ok){if(T.status===401){r("Сессия истекла. Пожалуйста, войдите заново."),f();return}throw new Error(`HTTP error! status: ${T.status}`)}const z=(P=T.body)==null?void 0:P.getReader();if(!z)throw new Error("Response body is not readable");const M=new TextDecoder;let D="",j="",q=[...u,h];for(;;){const{done:ue,value:G}=await z.read();if(ue)break;D+=M.decode(G,{stream:!0});const ae=D.split(` - -`);for(let b=0;bx===q.length-1&&Z.role==="user"?{...Z,searchResults:V.data.text,searchEntities:V.data.ids}:Z),a(Ru(q)),console.log("After search_results - isLoading:",i,"isGeneratingTokens:",o);else if(V.event==="token"){o||(s(!0),console.log("Before first token - isLoading:",i,"isGeneratingTokens:",o)),j+=V.data;const Z=q.findLastIndex(ie=>ie.role==="user"),x=q.findIndex((ie,$e)=>ie.role==="assistant"&&$e>Z);x>=0?q=q.map((ie,$e)=>$e===x?{...ie,content:j}:ie):q=[...q,{role:"assistant",content:j,searchResults:"",searchEntities:[]}],a(Ru(q))}}catch(V){console.error("Failed to parse SSE data:",V),r("Ошибка обработки данных от сервера")}}}D=ae[ae.length-1];const pe=document.querySelector(".messages");if(pe){const b=pe.querySelectorAll("div"),B=b[b.length-1];B&&p()&&setTimeout(()=>{B.scrollIntoView({behavior:"smooth",block:"start"})},0)}}}catch(k){console.error("Stream error:",k),l(!1),s(!1),console.log("Catch - isLoading:",i,"isGeneratingTokens:",o),k instanceof DOMException&&k.name==="AbortError"&&!c.current?r("Сервер временно недоступен"):k instanceof DOMException&&k.name==="AbortError"||r("Произошла ошибка при запросе")}finally{c.current=null}};return A.useEffect(()=>{if(console.log("State update - isLoading:",i,"isGeneratingTokens:",o),n){const S=setTimeout(()=>r(null),5e3);return()=>clearTimeout(S)}},[i,o,n]),U.jsxs("div",{className:"chat",children:[n&&U.jsx("div",{className:"error-toast",children:n}),U.jsxs("div",{className:"messages",children:[u.map((S,h)=>U.jsx(zp,{role:S.role,content:S.content,searchResults:S.searchResults},h)),i&&!o&&U.jsx(zp,{role:"assistant",content:"",isLoading:!0,searchResults:""},"loading")]}),U.jsxs("div",{className:"input-area",children:[U.jsx(SP,{onSend:v,text:e,setText:t}),U.jsxs("div",{className:"buttons",children:[i?U.jsx("button",{className:"stop-button",onClick:g,children:"Остановить"}):U.jsx("button",{className:"send-button",onClick:()=>v(e),children:"Отправить"}),U.jsx("a",{href:"#",className:"clear-link",onClick:S=>{S.preventDefault(),a(s_())},children:"Очистить"})]})]}),U.jsx("button",{className:"logout-button",onClick:f,children:"Выйти"})]})},wR=qP({reducer:{chat:u_}}),SR=()=>{const{isAuthenticated:e}=xf(),t=Vy();return A.useEffect(()=>{e||t("/login")},[e,t]),U.jsx(TS,{store:wR,children:e?U.jsx(vR,{}):null})},xR=()=>{const[e,t]=A.useState(""),[n,r]=A.useState(""),{login:i,isLoading:l,error:o}=xf(),s=Vy(),u=async a=>{a.preventDefault();try{await i({username:e,password:n}),s("/",{replace:!0})}catch{}};return U.jsx("div",{className:"login-page",children:U.jsxs("form",{onSubmit:u,children:[U.jsxs("div",{children:[U.jsx("label",{children:"Логин:"}),U.jsx("input",{type:"text",value:e,onChange:a=>t(a.target.value)})]}),U.jsxs("div",{children:[U.jsx("label",{children:"Пароль:"}),U.jsx("input",{type:"password",value:n,onChange:a=>r(a.target.value)})]}),o&&U.jsx("p",{className:"error",children:"Неверный логин или пароль"}),U.jsx("button",{type:"submit",disabled:l,children:l?"Вход...":"Войти"})]})})},Ov=new N_;bu.createRoot(document.getElementById("root")).render(U.jsx(Ah.StrictMode,{children:U.jsx(b_,{client:Ov,children:U.jsx(gR,{children:U.jsx(sS,{children:U.jsxs(iS,{children:[U.jsx(Ta,{path:"/login",element:U.jsx(xR,{})}),U.jsx(Ta,{path:"/",element:U.jsx(SR,{})})]})})})})}));