var rf=e=>{throw TypeError(e)};var Pl=(e,t,n)=>t.has(e)||rf("Cannot "+n);var g=(e,t,n)=>(Pl(e,t,"read from private field"),n?n.call(e):t.get(e)),Z=(e,t,n)=>t.has(e)?rf("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),U=(e,t,n,r)=>(Pl(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),ie=(e,t,n)=>(Pl(e,t,"access private method"),n);var Do=(e,t,n,r)=>({set _(s){U(e,t,s,n)},get _(){return g(e,t,r)}});function uv(e,t){for(var n=0;nr[s]})}}}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 s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();function cv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var jp={exports:{}},rl={},Fp={exports:{}},ue={};/** * @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 wo=Symbol.for("react.element"),dv=Symbol.for("react.portal"),fv=Symbol.for("react.fragment"),hv=Symbol.for("react.strict_mode"),pv=Symbol.for("react.profiler"),mv=Symbol.for("react.provider"),yv=Symbol.for("react.context"),gv=Symbol.for("react.forward_ref"),vv=Symbol.for("react.suspense"),wv=Symbol.for("react.memo"),xv=Symbol.for("react.lazy"),sf=Symbol.iterator;function _v(e){return e===null||typeof e!="object"?null:(e=sf&&e[sf]||e["@@iterator"],typeof e=="function"?e:null)}var Dp={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Lp=Object.assign,Ip={};function ai(e,t,n){this.props=e,this.context=t,this.refs=Ip,this.updater=n||Dp}ai.prototype.isReactComponent={};ai.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")};ai.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Mp(){}Mp.prototype=ai.prototype;function Fc(e,t,n){this.props=e,this.context=t,this.refs=Ip,this.updater=n||Dp}var Dc=Fc.prototype=new Mp;Dc.constructor=Fc;Lp(Dc,ai.prototype);Dc.isPureReactComponent=!0;var of=Array.isArray,Up=Object.prototype.hasOwnProperty,Lc={current:null},zp={key:!0,ref:!0,__self:!0,__source:!0};function Vp(e,t,n){var r,s={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)Up.call(t,r)&&!zp.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1>>1,ye=I[se];if(0>>1;ses(Un,J))aes(Ie,Un)?(I[se]=Ie,I[ae]=J,se=ae):(I[se]=Un,I[Ve]=J,se=Ve);else if(aes(Ie,J))I[se]=Ie,I[ae]=J,se=ae;else break e}}return G}function s(I,G){var J=I.sortIndex-G.sortIndex;return J!==0?J:I.id-G.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],c=1,d=null,m=3,w=!1,E=!1,x=!1,_=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,f=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function p(I){for(var G=n(u);G!==null;){if(G.callback===null)r(u);else if(G.startTime<=I)r(u),G.sortIndex=G.expirationTime,t(l,G);else break;G=n(u)}}function v(I){if(x=!1,p(I),!E)if(n(l)!==null)E=!0,xe(O);else{var G=n(u);G!==null&&Ke(v,G.startTime-I)}}function O(I,G){E=!1,x&&(x=!1,h(A),A=-1),w=!0;var J=m;try{for(p(G),d=n(l);d!==null&&(!(d.expirationTime>G)||I&&!ce());){var se=d.callback;if(typeof se=="function"){d.callback=null,m=d.priorityLevel;var ye=se(d.expirationTime<=G);G=e.unstable_now(),typeof ye=="function"?d.callback=ye:d===n(l)&&r(l),p(G)}else r(l);d=n(l)}if(d!==null)var gt=!0;else{var Ve=n(u);Ve!==null&&Ke(v,Ve.startTime-G),gt=!1}return gt}finally{d=null,m=J,w=!1}}var N=!1,L=null,A=-1,K=5,B=-1;function ce(){return!(e.unstable_now()-BI||125se?(I.sortIndex=J,t(u,I),n(l)===null&&I===n(u)&&(x?(h(A),A=-1):x=!0,Ke(v,J-se))):(I.sortIndex=ye,t(l,I),E||w||(E=!0,xe(O))),I},e.unstable_shouldYield=ce,e.unstable_wrapCallback=function(I){var G=m;return function(){var J=m;m=G;try{return I.apply(this,arguments)}finally{m=J}}}})(Wp);Qp.exports=Wp;var jv=Qp.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 Fv=P,jt=jv;function b(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"),fu=Object.prototype.hasOwnProperty,Dv=/^[: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]*$/,lf={},uf={};function Lv(e){return fu.call(uf,e)?!0:fu.call(lf,e)?!1:Dv.test(e)?uf[e]=!0:(lf[e]=!0,!1)}function Iv(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 Mv(e,t,n,r){if(t===null||typeof t>"u"||Iv(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 yt(e,t,n,r,s,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var tt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){tt[e]=new yt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];tt[t]=new yt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){tt[e]=new yt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){tt[e]=new yt(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){tt[e]=new yt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){tt[e]=new yt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){tt[e]=new yt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){tt[e]=new yt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){tt[e]=new yt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Mc=/[\-:]([a-z])/g;function Uc(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(Mc,Uc);tt[t]=new yt(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(Mc,Uc);tt[t]=new yt(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(Mc,Uc);tt[t]=new yt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){tt[e]=new yt(e,1,!1,e.toLowerCase(),null,!1,!1)});tt.xlinkHref=new yt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){tt[e]=new yt(e,1,!1,e.toLowerCase(),null,!0,!0)});function zc(e,t,n,r){var s=tt.hasOwnProperty(t)?tt[t]:null;(s!==null?s.type!==0:r||!(2a||s[o]!==i[a]){var l=` `+s[o].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{Al=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ni(e):""}function Uv(e){switch(e.tag){case 5:return Ni(e.type);case 16:return Ni("Lazy");case 13:return Ni("Suspense");case 19:return Ni("SuspenseList");case 0:case 2:case 15:return e=jl(e.type,!1),e;case 11:return e=jl(e.type.render,!1),e;case 1:return e=jl(e.type,!0),e;default:return""}}function yu(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 ys:return"Fragment";case ms:return"Portal";case hu:return"Profiler";case Vc:return"StrictMode";case pu:return"Suspense";case mu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Kp:return(e.displayName||"Context")+".Consumer";case Zp:return(e._context.displayName||"Context")+".Provider";case Bc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $c:return t=e.displayName||null,t!==null?t:yu(e.type)||"Memo";case $n:t=e._payload,e=e._init;try{return yu(e(t))}catch{}}return null}function zv(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 yu(t);case 8:return t===Vc?"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 gr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Jp(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Vv(e){var t=Jp(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 s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.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 Mo(e){e._valueTracker||(e._valueTracker=Vv(e))}function Xp(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Jp(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function wa(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 gu(e,t){var n=t.checked;return Te({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function df(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=gr(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 Yp(e,t){t=t.checked,t!=null&&zc(e,"checked",t,!1)}function vu(e,t){Yp(e,t);var n=gr(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")?wu(e,t.type,n):t.hasOwnProperty("defaultValue")&&wu(e,t.type,gr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ff(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 wu(e,t,n){(t!=="number"||wa(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Pi=Array.isArray;function Os(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s"+t.valueOf().toString()+"",t=Uo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Qi(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Fi={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},Bv=["Webkit","ms","Moz","O"];Object.keys(Fi).forEach(function(e){Bv.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Fi[t]=Fi[e]})});function rm(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Fi.hasOwnProperty(e)&&Fi[e]?(""+t).trim():t+"px"}function sm(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=rm(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var $v=Te({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 Su(e,t){if(t){if($v[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(b(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(b(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(b(61))}if(t.style!=null&&typeof t.style!="object")throw Error(b(62))}}function Eu(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 ku=null;function Hc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Cu=null,Ns=null,Ps=null;function mf(e){if(e=So(e)){if(typeof Cu!="function")throw Error(b(280));var t=e.stateNode;t&&(t=ll(t),Cu(e.stateNode,e.type,t))}}function im(e){Ns?Ps?Ps.push(e):Ps=[e]:Ns=e}function om(){if(Ns){var e=Ns,t=Ps;if(Ps=Ns=null,mf(e),t)for(e=0;e>>=0,e===0?32:31-(e0(e)/t0|0)|0}var zo=64,Vo=4194304;function Ti(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 Ea(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~s;a!==0?r=Ti(a):(i&=o,i!==0&&(r=Ti(i)))}else o=n&~s,o!==0?r=Ti(o):i!==0&&(r=Ti(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,i=t&-t,s>=i||s===16&&(i&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 xo(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-nn(t),e[t]=n}function i0(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=Li),kf=" ",Cf=!1;function Rm(e,t){switch(e){case"keyup":return j0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Om(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var gs=!1;function D0(e,t){switch(e){case"compositionend":return Om(t);case"keypress":return t.which!==32?null:(Cf=!0,kf);case"textInput":return e=t.data,e===kf&&Cf?null:e;default:return null}}function L0(e,t){if(gs)return e==="compositionend"||!Xc&&Rm(e,t)?(e=km(),ia=Kc=rr=null,gs=!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=Pf(n)}}function bm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?bm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Am(){for(var e=window,t=wa();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=wa(e.document)}return t}function Yc(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 Q0(e){var t=Am(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&bm(n.ownerDocument.documentElement,n)){if(r!==null&&Yc(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 s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=Tf(n,i);var o=Tf(n,r);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>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,vs=null,bu=null,Mi=null,Au=!1;function bf(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Au||vs==null||vs!==wa(r)||(r=vs,"selectionStart"in r&&Yc(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}),Mi&&Ji(Mi,r)||(Mi=r,r=Ra(bu,"onSelect"),0_s||(e.current=Mu[_s],Mu[_s]=null,_s--)}function we(e,t){_s++,Mu[_s]=e.current,e.current=t}var vr={},ct=Sr(vr),Et=Sr(!1),qr=vr;function Zs(e,t){var n=e.type.contextTypes;if(!n)return vr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function kt(e){return e=e.childContextTypes,e!=null}function Na(){ke(Et),ke(ct)}function Mf(e,t,n){if(ct.current!==vr)throw Error(b(168));we(ct,t),we(Et,n)}function Vm(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(b(108,zv(e)||"Unknown",s));return Te({},n,r)}function Pa(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||vr,qr=ct.current,we(ct,e),we(Et,Et.current),!0}function Uf(e,t,n){var r=e.stateNode;if(!r)throw Error(b(169));n?(e=Vm(e,t,qr),r.__reactInternalMemoizedMergedChildContext=e,ke(Et),ke(ct),we(ct,e)):ke(Et),we(Et,n)}var En=null,ul=!1,ql=!1;function Bm(e){En===null?En=[e]:En.push(e)}function rw(e){ul=!0,Bm(e)}function Er(){if(!ql&&En!==null){ql=!0;var e=0,t=ge;try{var n=En;for(ge=1;e>=o,s-=o,Nn=1<<32-nn(t)+s|n<A?(K=L,L=null):K=L.sibling;var B=m(h,L,p[A],v);if(B===null){L===null&&(L=K);break}e&&L&&B.alternate===null&&t(h,L),f=i(B,f,A),N===null?O=B:N.sibling=B,N=B,L=K}if(A===p.length)return n(h,L),Re&&Rr(h,A),O;if(L===null){for(;AA?(K=L,L=null):K=L.sibling;var ce=m(h,L,B.value,v);if(ce===null){L===null&&(L=K);break}e&&L&&ce.alternate===null&&t(h,L),f=i(ce,f,A),N===null?O=ce:N.sibling=ce,N=ce,L=K}if(B.done)return n(h,L),Re&&Rr(h,A),O;if(L===null){for(;!B.done;A++,B=p.next())B=d(h,B.value,v),B!==null&&(f=i(B,f,A),N===null?O=B:N.sibling=B,N=B);return Re&&Rr(h,A),O}for(L=r(h,L);!B.done;A++,B=p.next())B=w(L,h,A,B.value,v),B!==null&&(e&&B.alternate!==null&&L.delete(B.key===null?A:B.key),f=i(B,f,A),N===null?O=B:N.sibling=B,N=B);return e&&L.forEach(function(Y){return t(h,Y)}),Re&&Rr(h,A),O}function _(h,f,p,v){if(typeof p=="object"&&p!==null&&p.type===ys&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case Io:e:{for(var O=p.key,N=f;N!==null;){if(N.key===O){if(O=p.type,O===ys){if(N.tag===7){n(h,N.sibling),f=s(N,p.props.children),f.return=h,h=f;break e}}else if(N.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===$n&&Bf(O)===N.type){n(h,N.sibling),f=s(N,p.props),f.ref=Ei(h,N,p),f.return=h,h=f;break e}n(h,N);break}else t(h,N);N=N.sibling}p.type===ys?(f=Qr(p.props.children,h.mode,v,p.key),f.return=h,h=f):(v=ha(p.type,p.key,p.props,null,h.mode,v),v.ref=Ei(h,f,p),v.return=h,h=v)}return o(h);case ms:e:{for(N=p.key;f!==null;){if(f.key===N)if(f.tag===4&&f.stateNode.containerInfo===p.containerInfo&&f.stateNode.implementation===p.implementation){n(h,f.sibling),f=s(f,p.children||[]),f.return=h,h=f;break e}else{n(h,f);break}else t(h,f);f=f.sibling}f=tu(p,h.mode,v),f.return=h,h=f}return o(h);case $n:return N=p._init,_(h,f,N(p._payload),v)}if(Pi(p))return E(h,f,p,v);if(vi(p))return x(h,f,p,v);Zo(h,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,f!==null&&f.tag===6?(n(h,f.sibling),f=s(f,p),f.return=h,h=f):(n(h,f),f=eu(p,h.mode,v),f.return=h,h=f),o(h)):n(h,f)}return _}var Gs=Wm(!0),qm=Wm(!1),Aa=Sr(null),ja=null,ks=null,rd=null;function sd(){rd=ks=ja=null}function id(e){var t=Aa.current;ke(Aa),e._currentValue=t}function Vu(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 bs(e,t){ja=e,rd=ks=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(St=!0),e.firstContext=null)}function Ht(e){var t=e._currentValue;if(rd!==e)if(e={context:e,memoizedValue:t,next:null},ks===null){if(ja===null)throw Error(b(308));ks=e,ja.dependencies={lanes:0,firstContext:e}}else ks=ks.next=e;return t}var Tr=null;function od(e){Tr===null?Tr=[e]:Tr.push(e)}function Zm(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,od(t)):(n.next=s.next,s.next=n),t.interleaved=n,Dn(e,r)}function Dn(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 Hn=!1;function ad(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Km(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 bn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function cr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,fe&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Dn(e,n)}return s=r.interleaved,s===null?(t.next=t,od(r)):(t.next=s.next,s.next=t),r.interleaved=t,Dn(e,n)}function aa(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,Wc(e,n)}}function $f(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=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};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,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 Fa(e,t,n,r){var s=e.updateQueue;Hn=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?i=u:o.next=u,o=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==o&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(i!==null){var d=s.baseState;o=0,c=u=l=null,a=i;do{var m=a.lane,w=a.eventTime;if((r&m)===m){c!==null&&(c=c.next={eventTime:w,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var E=e,x=a;switch(m=t,w=n,x.tag){case 1:if(E=x.payload,typeof E=="function"){d=E.call(w,d,m);break e}d=E;break e;case 3:E.flags=E.flags&-65537|128;case 0:if(E=x.payload,m=typeof E=="function"?E.call(w,d,m):E,m==null)break e;d=Te({},d,m);break e;case 2:Hn=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,m=s.effects,m===null?s.effects=[a]:m.push(a))}else w={eventTime:w,lane:m,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=w,l=d):c=c.next=w,o|=m;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;m=a,a=m.next,m.next=null,s.lastBaseUpdate=m,s.shared.pending=null}}while(!0);if(c===null&&(l=d),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=c,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);Gr|=o,e.lanes=o,e.memoizedState=d}}function Hf(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Kl.transition;Kl.transition={};try{e(!1),t()}finally{ge=n,Kl.transition=r}}function fy(){return Qt().memoizedState}function aw(e,t,n){var r=fr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},hy(e))py(t,n);else if(n=Zm(e,t,n,r),n!==null){var s=pt();rn(n,e,r,s),my(n,t,r)}}function lw(e,t,n){var r=fr(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(hy(e))py(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,a=i(o,n);if(s.hasEagerState=!0,s.eagerState=a,sn(a,o)){var l=t.interleaved;l===null?(s.next=s,od(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=Zm(e,t,s,r),n!==null&&(s=pt(),rn(n,e,r,s),my(n,t,r))}}function hy(e){var t=e.alternate;return e===Pe||t!==null&&t===Pe}function py(e,t){Ui=La=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function my(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Wc(e,n)}}var Ia={readContext:Ht,useCallback:rt,useContext:rt,useEffect:rt,useImperativeHandle:rt,useInsertionEffect:rt,useLayoutEffect:rt,useMemo:rt,useReducer:rt,useRef:rt,useState:rt,useDebugValue:rt,useDeferredValue:rt,useTransition:rt,useMutableSource:rt,useSyncExternalStore:rt,useId:rt,unstable_isNewReconciler:!1},uw={readContext:Ht,useCallback:function(e,t){return ln().memoizedState=[e,t===void 0?null:t],e},useContext:Ht,useEffect:Wf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ua(4194308,4,ay.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ua(4194308,4,e,t)},useInsertionEffect:function(e,t){return ua(4,2,e,t)},useMemo:function(e,t){var n=ln();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ln();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=aw.bind(null,Pe,e),[r.memoizedState,e]},useRef:function(e){var t=ln();return e={current:e},t.memoizedState=e},useState:Qf,useDebugValue:md,useDeferredValue:function(e){return ln().memoizedState=e},useTransition:function(){var e=Qf(!1),t=e[0];return e=ow.bind(null,e[1]),ln().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Pe,s=ln();if(Re){if(n===void 0)throw Error(b(407));n=n()}else{if(n=t(),Ze===null)throw Error(b(349));Kr&30||Ym(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,Wf(ty.bind(null,r,i,e),[e]),r.flags|=2048,io(9,ey.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=ln(),t=Ze.identifierPrefix;if(Re){var n=Pn,r=Nn;n=(r&~(1<<32-nn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ro++,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[pn]=t,e[eo]=r,Cy(e,t,!1,!1),t.stateNode=e;e:{switch(o=Eu(n,r),n){case"dialog":_e("cancel",e),_e("close",e),s=r;break;case"iframe":case"object":case"embed":_e("load",e),s=r;break;case"video":case"audio":for(s=0;sYs&&(t.flags|=128,r=!0,ki(i,!1),t.lanes=4194304)}else{if(!r)if(e=Da(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ki(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!Re)return st(t),null}else 2*Fe()-i.renderingStartTime>Ys&&n!==1073741824&&(t.flags|=128,r=!0,ki(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Fe(),t.sibling=null,n=Oe.current,we(Oe,r?n&1|2:n&1),t):(st(t),null);case 22:case 23:return _d(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Nt&1073741824&&(st(t),t.subtreeFlags&6&&(t.flags|=8192)):st(t),null;case 24:return null;case 25:return null}throw Error(b(156,t.tag))}function gw(e,t){switch(td(t),t.tag){case 1:return kt(t.type)&&Na(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Js(),ke(Et),ke(ct),cd(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ud(t),null;case 13:if(ke(Oe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(b(340));Ks()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ke(Oe),null;case 4:return Js(),null;case 10:return id(t.type._context),null;case 22:case 23:return _d(),null;case 24:return null;default:return null}}var Go=!1,at=!1,vw=typeof WeakSet=="function"?WeakSet:Set,Q=null;function Cs(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ae(e,t,r)}else n.current=null}function Gu(e,t,n){try{n()}catch(r){Ae(e,t,r)}}var rh=!1;function ww(e,t){if(ju=ka,e=Am(),Yc(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 s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,u=0,c=0,d=e,m=null;t:for(;;){for(var w;d!==n||s!==0&&d.nodeType!==3||(a=o+s),d!==i||r!==0&&d.nodeType!==3||(l=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(w=d.firstChild)!==null;)m=d,d=w;for(;;){if(d===e)break t;if(m===n&&++u===s&&(a=o),m===i&&++c===r&&(l=o),(w=d.nextSibling)!==null)break;d=m,m=d.parentNode}d=w}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Fu={focusedElem:e,selectionRange:n},ka=!1,Q=t;Q!==null;)if(t=Q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Q=e;else for(;Q!==null;){t=Q;try{var E=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(E!==null){var x=E.memoizedProps,_=E.memoizedState,h=t.stateNode,f=h.getSnapshotBeforeUpdate(t.elementType===t.type?x:Jt(t.type,x),_);h.__reactInternalSnapshotBeforeUpdate=f}break;case 3:var p=t.stateNode.containerInfo;p.nodeType===1?p.textContent="":p.nodeType===9&&p.documentElement&&p.removeChild(p.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(b(163))}}catch(v){Ae(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,Q=e;break}Q=t.return}return E=rh,rh=!1,E}function zi(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&Gu(t,n,i)}s=s.next}while(s!==r)}}function fl(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 Ju(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 Ny(e){var t=e.alternate;t!==null&&(e.alternate=null,Ny(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[pn],delete t[eo],delete t[Iu],delete t[tw],delete t[nw])),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 Py(e){return e.tag===5||e.tag===3||e.tag===4}function sh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Py(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 Xu(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=Oa));else if(r!==4&&(e=e.child,e!==null))for(Xu(e,t,n),e=e.sibling;e!==null;)Xu(e,t,n),e=e.sibling}function Yu(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(Yu(e,t,n),e=e.sibling;e!==null;)Yu(e,t,n),e=e.sibling}var Je=null,Yt=!1;function Vn(e,t,n){for(n=n.child;n!==null;)Ty(e,t,n),n=n.sibling}function Ty(e,t,n){if(mn&&typeof mn.onCommitFiberUnmount=="function")try{mn.onCommitFiberUnmount(sl,n)}catch{}switch(n.tag){case 5:at||Cs(n,t);case 6:var r=Je,s=Yt;Je=null,Vn(e,t,n),Je=r,Yt=s,Je!==null&&(Yt?(e=Je,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Je.removeChild(n.stateNode));break;case 18:Je!==null&&(Yt?(e=Je,n=n.stateNode,e.nodeType===8?Wl(e.parentNode,n):e.nodeType===1&&Wl(e,n),Ki(e)):Wl(Je,n.stateNode));break;case 4:r=Je,s=Yt,Je=n.stateNode.containerInfo,Yt=!0,Vn(e,t,n),Je=r,Yt=s;break;case 0:case 11:case 14:case 15:if(!at&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&Gu(n,t,o),s=s.next}while(s!==r)}Vn(e,t,n);break;case 1:if(!at&&(Cs(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Ae(n,t,a)}Vn(e,t,n);break;case 21:Vn(e,t,n);break;case 22:n.mode&1?(at=(r=at)||n.memoizedState!==null,Vn(e,t,n),at=r):Vn(e,t,n);break;default:Vn(e,t,n)}}function ih(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new vw),t.forEach(function(r){var s=Nw.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Kt(e,t){var n=t.deletions;if(n!==null)for(var r=0;rs&&(s=o),r&=~i}if(r=s,r=Fe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*_w(r/1960))-r,10e?16:e,sr===null)var r=!1;else{if(e=sr,sr=null,za=0,fe&6)throw Error(b(331));var s=fe;for(fe|=4,Q=e.current;Q!==null;){var i=Q,o=i.child;if(Q.flags&16){var a=i.deletions;if(a!==null){for(var l=0;lFe()-wd?Hr(e,0):vd|=n),Ct(e,t)}function My(e,t){t===0&&(e.mode&1?(t=Vo,Vo<<=1,!(Vo&130023424)&&(Vo=4194304)):t=1);var n=pt();e=Dn(e,t),e!==null&&(xo(e,t,n),Ct(e,n))}function Ow(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),My(e,n)}function Nw(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(b(314))}r!==null&&r.delete(t),My(e,n)}var Uy;Uy=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Et.current)St=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return St=!1,mw(e,t,n);St=!!(e.flags&131072)}else St=!1,Re&&t.flags&1048576&&$m(t,ba,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ca(e,t),e=t.pendingProps;var s=Zs(t,ct.current);bs(t,n),s=fd(null,t,r,e,s,n);var i=hd();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,kt(r)?(i=!0,Pa(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,ad(t),s.updater=dl,t.stateNode=s,s._reactInternals=t,$u(t,r,e,n),t=Wu(null,t,r,!0,i,n)):(t.tag=0,Re&&i&&ed(t),ft(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ca(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=Tw(r),e=Jt(r,e),s){case 0:t=Qu(null,t,r,e,n);break e;case 1:t=eh(null,t,r,e,n);break e;case 11:t=Xf(null,t,r,e,n);break e;case 14:t=Yf(null,t,r,Jt(r.type,e),n);break e}throw Error(b(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Jt(r,s),Qu(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Jt(r,s),eh(e,t,r,s,n);case 3:e:{if(Sy(t),e===null)throw Error(b(387));r=t.pendingProps,i=t.memoizedState,s=i.element,Km(e,t),Fa(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=Xs(Error(b(423)),t),t=th(e,t,r,n,s);break e}else if(r!==s){s=Xs(Error(b(424)),t),t=th(e,t,r,n,s);break e}else for(bt=ur(t.stateNode.containerInfo.firstChild),At=t,Re=!0,en=null,n=qm(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ks(),r===s){t=Ln(e,t,n);break e}ft(e,t,r,n)}t=t.child}return t;case 5:return Gm(t),e===null&&zu(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,Du(r,s)?o=null:i!==null&&Du(r,i)&&(t.flags|=32),_y(e,t),ft(e,t,o,n),t.child;case 6:return e===null&&zu(t),null;case 13:return Ey(e,t,n);case 4:return ld(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Gs(t,null,r,n):ft(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Jt(r,s),Xf(e,t,r,s,n);case 7:return ft(e,t,t.pendingProps,n),t.child;case 8:return ft(e,t,t.pendingProps.children,n),t.child;case 12:return ft(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,we(Aa,r._currentValue),r._currentValue=o,i!==null)if(sn(i.value,o)){if(i.children===s.children&&!Et.current){t=Ln(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=bn(-1,n&-n),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Vu(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(b(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Vu(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}ft(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,bs(t,n),s=Ht(s),r=r(s),t.flags|=1,ft(e,t,r,n),t.child;case 14:return r=t.type,s=Jt(r,t.pendingProps),s=Jt(r.type,s),Yf(e,t,r,s,n);case 15:return wy(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Jt(r,s),ca(e,t),t.tag=1,kt(r)?(e=!0,Pa(t)):e=!1,bs(t,n),yy(t,r,s),$u(t,r,s,n),Wu(null,t,r,!0,e,n);case 19:return ky(e,t,n);case 22:return xy(e,t,n)}throw Error(b(156,t.tag))};function zy(e,t){return hm(e,t)}function Pw(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 Bt(e,t,n,r){return new Pw(e,t,n,r)}function Ed(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Tw(e){if(typeof e=="function")return Ed(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Bc)return 11;if(e===$c)return 14}return 2}function hr(e,t){var n=e.alternate;return n===null?(n=Bt(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 ha(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")Ed(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case ys:return Qr(n.children,s,i,t);case Vc:o=8,s|=8;break;case hu:return e=Bt(12,n,t,s|2),e.elementType=hu,e.lanes=i,e;case pu:return e=Bt(13,n,t,s),e.elementType=pu,e.lanes=i,e;case mu:return e=Bt(19,n,t,s),e.elementType=mu,e.lanes=i,e;case Gp:return pl(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Zp:o=10;break e;case Kp:o=9;break e;case Bc:o=11;break e;case $c:o=14;break e;case $n:o=16,r=null;break e}throw Error(b(130,e==null?e:typeof e,""))}return t=Bt(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function Qr(e,t,n,r){return e=Bt(7,e,r,t),e.lanes=n,e}function pl(e,t,n,r){return e=Bt(22,e,r,t),e.elementType=Gp,e.lanes=n,e.stateNode={isHidden:!1},e}function eu(e,t,n){return e=Bt(6,e,null,t),e.lanes=n,e}function tu(e,t,n){return t=Bt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function bw(e,t,n,r,s){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=Dl(0),this.expirationTimes=Dl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Dl(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function kd(e,t,n,r,s,i,o,a,l){return e=new bw(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Bt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ad(i),e}function Aw(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Hy)}catch(e){console.error(e)}}Hy(),Hp.exports=Dt;var Iw=Hp.exports,hh=Iw;du.createRoot=hh.createRoot,du.hydrateRoot=hh.hydrateRoot;var ci=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(){}},Dr,Zn,Fs,Sp,Mw=(Sp=class extends ci{constructor(){super();Z(this,Dr);Z(this,Zn);Z(this,Fs);U(this,Fs,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){g(this,Zn)||this.setEventListener(g(this,Fs))}onUnsubscribe(){var t;this.hasListeners()||((t=g(this,Zn))==null||t.call(this),U(this,Zn,void 0))}setEventListener(t){var n;U(this,Fs,t),(n=g(this,Zn))==null||n.call(this),U(this,Zn,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){g(this,Dr)!==t&&(U(this,Dr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof g(this,Dr)=="boolean"?g(this,Dr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Dr=new WeakMap,Zn=new WeakMap,Fs=new WeakMap,Sp),Nd=new Mw,Uw={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Kn,jc,Ep,zw=(Ep=class{constructor(){Z(this,Kn,Uw);Z(this,jc,!1)}setTimeoutProvider(e){U(this,Kn,e)}setTimeout(e,t){return g(this,Kn).setTimeout(e,t)}clearTimeout(e){g(this,Kn).clearTimeout(e)}setInterval(e,t){return g(this,Kn).setInterval(e,t)}clearInterval(e){g(this,Kn).clearInterval(e)}},Kn=new WeakMap,jc=new WeakMap,Ep),Ar=new zw;function Vw(e){setTimeout(e,0)}var Bw=typeof window>"u"||"Deno"in globalThis;function ht(){}function $w(e,t){return typeof e=="function"?e(t):e}function sc(e){return typeof e=="number"&&e>=0&&e!==1/0}function Qy(e,t){return Math.max(e+(t||0)-Date.now(),0)}function pr(e,t){return typeof e=="function"?e(t):e}function Tt(e,t){return typeof e=="function"?e(t):e}function ph(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==Pd(o,t.options))return!1}else if(!ao(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||s&&s!==t.state.fetchStatus||i&&!i(t))}function mh(e,t){const{exact:n,status:r,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Xr(t.options.mutationKey)!==Xr(i))return!1}else if(!ao(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function Pd(e,t){return((t==null?void 0:t.queryKeyHashFn)||Xr)(e)}function Xr(e){return JSON.stringify(e,(t,n)=>ic(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function ao(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>ao(e[n],t[n])):!1}var Hw=Object.prototype.hasOwnProperty;function Wy(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=yh(e)&&yh(t);if(!r&&!(ic(e)&&ic(t)))return t;const i=(r?e:Object.keys(e)).length,o=r?t:Object.keys(t),a=o.length,l=r?new Array(a):{};let u=0;for(let c=0;c{Ar.setTimeout(t,e)})}function oc(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Wy(e,t):t}function Ww(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function qw(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Td=Symbol();function qy(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Td?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function bd(e,t){return typeof e=="function"?e(...t):!!e}function Zw(e,t,n){let r=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??(s=t()),r||(r=!0,s.aborted?n():s.addEventListener("abort",n,{once:!0})),s)}),e}var lo=(()=>{let e=()=>Bw;return{isServer(){return e()},setIsServer(t){e=t}}})();function ac(){let e,t;const n=new Promise((s,i)=>{e=s,t=i});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}var Kw=Vw;function Gw(){let e=[],t=0,n=a=>{a()},r=a=>{a()},s=Kw;const i=a=>{t?e.push(a):s(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&s(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{s=a}}}var $e=Gw(),Ds,Gn,Ls,kp,Jw=(kp=class extends ci{constructor(){super();Z(this,Ds,!0);Z(this,Gn);Z(this,Ls);U(this,Ls,t=>{if(typeof window<"u"&&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(){g(this,Gn)||this.setEventListener(g(this,Ls))}onUnsubscribe(){var t;this.hasListeners()||((t=g(this,Gn))==null||t.call(this),U(this,Gn,void 0))}setEventListener(t){var n;U(this,Ls,t),(n=g(this,Gn))==null||n.call(this),U(this,Gn,t(this.setOnline.bind(this)))}setOnline(t){g(this,Ds)!==t&&(U(this,Ds,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return g(this,Ds)}},Ds=new WeakMap,Gn=new WeakMap,Ls=new WeakMap,kp),Ha=new Jw;function Xw(e){return Math.min(1e3*2**e,3e4)}function Zy(e){return(e??"online")==="online"?Ha.isOnline():!0}var lc=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Ky(e){let t=!1,n=0,r;const s=ac(),i=()=>s.status!=="pending",o=x=>{var _;if(!i()){const h=new lc(x);m(h),(_=e.onCancel)==null||_.call(e,h)}},a=()=>{t=!0},l=()=>{t=!1},u=()=>Nd.isFocused()&&(e.networkMode==="always"||Ha.isOnline())&&e.canRun(),c=()=>Zy(e.networkMode)&&e.canRun(),d=x=>{i()||(r==null||r(),s.resolve(x))},m=x=>{i()||(r==null||r(),s.reject(x))},w=()=>new Promise(x=>{var _;r=h=>{(i()||u())&&x(h)},(_=e.onPause)==null||_.call(e)}).then(()=>{var x;r=void 0,i()||(x=e.onContinue)==null||x.call(e)}),E=()=>{if(i())return;let x;const _=n===0?e.initialPromise:void 0;try{x=_??e.fn()}catch(h){x=Promise.reject(h)}Promise.resolve(x).then(d).catch(h=>{var N;if(i())return;const f=e.retry??(lo.isServer()?0:3),p=e.retryDelay??Xw,v=typeof p=="function"?p(n,h):p,O=f===!0||typeof f=="number"&&nu()?void 0:w()).then(()=>{t?m(h):E()})})};return{promise:s,status:()=>s.status,cancel:o,continue:()=>(r==null||r(),s),cancelRetry:a,continueRetry:l,canStart:c,start:()=>(c()?E():w().then(E),s)}}var Lr,Cp,Gy=(Cp=class{constructor(){Z(this,Lr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),sc(this.gcTime)&&U(this,Lr,Ar.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(lo.isServer()?1/0:5*60*1e3))}clearGcTimeout(){g(this,Lr)!==void 0&&(Ar.clearTimeout(g(this,Lr)),U(this,Lr,void 0))}},Lr=new WeakMap,Cp);function Yw(e){return{onFetch:(t,n)=>{var c,d,m,w,E;const r=t.options,s=(m=(d=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:m.direction,i=((w=t.state.data)==null?void 0:w.pages)||[],o=((E=t.state.data)==null?void 0:E.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let x=!1;const _=p=>{Zw(p,()=>t.signal,()=>x=!0)},h=qy(t.options,t.fetchOptions),f=async(p,v,O)=>{if(x)return Promise.reject(t.signal.reason);if(v==null&&p.pages.length)return Promise.resolve(p);const L=(()=>{const ce={client:t.client,queryKey:t.queryKey,pageParam:v,direction:O?"backward":"forward",meta:t.options.meta};return _(ce),ce})(),A=await h(L),{maxPages:K}=t.options,B=O?qw:Ww;return{pages:B(p.pages,A,K),pageParams:B(p.pageParams,v,K)}};if(s&&i.length){const p=s==="backward",v=p?ex:vh,O={pages:i,pageParams:o},N=v(r,O);a=await f(O,N,p)}else{const p=e??i.length;do{const v=l===0?o[0]??r.initialPageParam:vh(r,a);if(l>0&&v==null)break;a=await f(a,v),l++}while(l{var x,_;return(_=(x=t.options).persister)==null?void 0:_.call(x,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function vh(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 ex(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 Is,Ir,Ms,Mt,Mr,Qe,po,Ur,Pt,Jy,xn,Rp,tx=(Rp=class extends Gy{constructor(t){super();Z(this,Pt);Z(this,Is);Z(this,Ir);Z(this,Ms);Z(this,Mt);Z(this,Mr);Z(this,Qe);Z(this,po);Z(this,Ur);U(this,Ur,!1),U(this,po,t.defaultOptions),this.setOptions(t.options),this.observers=[],U(this,Mr,t.client),U(this,Mt,g(this,Mr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,U(this,Ir,xh(this.options)),this.state=t.state??g(this,Ir),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return g(this,Is)}get promise(){var t;return(t=g(this,Qe))==null?void 0:t.promise}setOptions(t){if(this.options={...g(this,po),...t},t!=null&&t._type&&U(this,Is,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=xh(this.options);n.data!==void 0&&(this.setState(wh(n.data,n.dataUpdatedAt)),U(this,Ir,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&g(this,Mt).remove(this)}setData(t,n){const r=oc(this.state.data,t,this.options);return ie(this,Pt,xn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t){ie(this,Pt,xn).call(this,{type:"setState",state:t})}cancel(t){var r,s;const n=(r=g(this,Qe))==null?void 0:r.promise;return(s=g(this,Qe))==null||s.cancel(t),n?n.then(ht).catch(ht):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return g(this,Ir)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Tt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Td||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>pr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Qy(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=g(this,Qe))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=g(this,Qe))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),g(this,Mt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(g(this,Qe)&&(g(this,Ur)||ie(this,Pt,Jy).call(this)?g(this,Qe).cancel({revert:!0}):g(this,Qe).cancelRetry()),this.scheduleGc()),g(this,Mt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ie(this,Pt,xn).call(this,{type:"invalidate"})}async fetch(t,n){var u,c,d,m,w,E,x,_,h,f,p;if(this.state.fetchStatus!=="idle"&&((u=g(this,Qe))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(g(this,Qe))return g(this,Qe).continueRetry(),g(this,Qe).promise}if(t&&this.setOptions(t),!this.options.queryFn){const v=this.observers.find(O=>O.options.queryFn);v&&this.setOptions(v.options)}const r=new AbortController,s=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(U(this,Ur,!0),r.signal)})},i=()=>{const v=qy(this.options,n),N=(()=>{const L={client:g(this,Mr),queryKey:this.queryKey,meta:this.meta};return s(L),L})();return U(this,Ur,!1),this.options.persister?this.options.persister(v,N,this):v(N)},a=(()=>{const v={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:g(this,Mr),state:this.state,fetchFn:i};return s(v),v})(),l=g(this,Is)==="infinite"?Yw(this.options.pages):this.options.behavior;l==null||l.onFetch(a,this),U(this,Ms,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=a.fetchOptions)==null?void 0:c.meta))&&ie(this,Pt,xn).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta}),U(this,Qe,Ky({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,onCancel:v=>{v instanceof lc&&v.revert&&this.setState({...g(this,Ms),fetchStatus:"idle"}),r.abort()},onFail:(v,O)=>{ie(this,Pt,xn).call(this,{type:"failed",failureCount:v,error:O})},onPause:()=>{ie(this,Pt,xn).call(this,{type:"pause"})},onContinue:()=>{ie(this,Pt,xn).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}));try{const v=await g(this,Qe).start();if(v===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(v),(w=(m=g(this,Mt).config).onSuccess)==null||w.call(m,v,this),(x=(E=g(this,Mt).config).onSettled)==null||x.call(E,v,this.state.error,this),v}catch(v){if(v instanceof lc){if(v.silent)return g(this,Qe).promise;if(v.revert){if(this.state.data===void 0)throw v;return this.state.data}}throw ie(this,Pt,xn).call(this,{type:"error",error:v}),(h=(_=g(this,Mt).config).onError)==null||h.call(_,v,this),(p=(f=g(this,Mt).config).onSettled)==null||p.call(f,this.state.data,v,this),v}finally{this.scheduleGc()}}},Is=new WeakMap,Ir=new WeakMap,Ms=new WeakMap,Mt=new WeakMap,Mr=new WeakMap,Qe=new WeakMap,po=new WeakMap,Ur=new WeakMap,Pt=new WeakSet,Jy=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},xn=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,...Xy(r.data,this.options),fetchMeta:t.meta??null};case"success":const s={...r,...wh(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return U(this,Ms,t.manual?s:void 0),s;case"error":const i=t.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),$e.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),g(this,Mt).notify({query:this,type:"updated",action:t})})},Rp);function Xy(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Zy(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function wh(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function xh(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 wt,de,mo,dt,zr,Us,kn,Jn,yo,zs,Vs,Vr,Br,Xn,Bs,me,Ai,uc,cc,dc,fc,hc,pc,mc,Yy,Op,nx=(Op=class extends ci{constructor(t,n){super();Z(this,me);Z(this,wt);Z(this,de);Z(this,mo);Z(this,dt);Z(this,zr);Z(this,Us);Z(this,kn);Z(this,Jn);Z(this,yo);Z(this,zs);Z(this,Vs);Z(this,Vr);Z(this,Br);Z(this,Xn);Z(this,Bs,new Set);this.options=n,U(this,wt,t),U(this,Jn,null),U(this,kn,ac()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(g(this,de).addObserver(this),_h(g(this,de),this.options)?ie(this,me,Ai).call(this):this.updateResult(),ie(this,me,fc).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return yc(g(this,de),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return yc(g(this,de),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ie(this,me,hc).call(this),ie(this,me,pc).call(this),g(this,de).removeObserver(this)}setOptions(t){const n=this.options,r=g(this,de);if(this.options=g(this,wt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Tt(this.options.enabled,g(this,de))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ie(this,me,mc).call(this),g(this,de).setOptions(this.options),n._defaulted&&!$a(this.options,n)&&g(this,wt).getQueryCache().notify({type:"observerOptionsUpdated",query:g(this,de),observer:this});const s=this.hasListeners();s&&Sh(g(this,de),r,this.options,n)&&ie(this,me,Ai).call(this),this.updateResult(),s&&(g(this,de)!==r||Tt(this.options.enabled,g(this,de))!==Tt(n.enabled,g(this,de))||pr(this.options.staleTime,g(this,de))!==pr(n.staleTime,g(this,de)))&&ie(this,me,uc).call(this);const i=ie(this,me,cc).call(this);s&&(g(this,de)!==r||Tt(this.options.enabled,g(this,de))!==Tt(n.enabled,g(this,de))||i!==g(this,Xn))&&ie(this,me,dc).call(this,i)}getOptimisticResult(t){const n=g(this,wt).getQueryCache().build(g(this,wt),t),r=this.createResult(n,t);return sx(this,r)&&(U(this,dt,r),U(this,Us,this.options),U(this,zr,g(this,de).state)),r}getCurrentResult(){return g(this,dt)}trackResult(t,n){return new Proxy(t,{get:(r,s)=>(this.trackProp(s),n==null||n(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&g(this,kn).status==="pending"&&g(this,kn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,s))})}trackProp(t){g(this,Bs).add(t)}getCurrentQuery(){return g(this,de)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=g(this,wt).defaultQueryOptions(t),r=g(this,wt).getQueryCache().build(g(this,wt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return ie(this,me,Ai).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),g(this,dt)))}createResult(t,n){var K;const r=g(this,de),s=this.options,i=g(this,dt),o=g(this,zr),a=g(this,Us),u=t!==r?t.state:g(this,mo),{state:c}=t;let d={...c},m=!1,w;if(n._optimisticResults){const B=this.hasListeners(),ce=!B&&_h(t,n),Y=B&&Sh(t,r,n,s);(ce||Y)&&(d={...d,...Xy(c.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:E,errorUpdatedAt:x,status:_}=d;w=d.data;let h=!1;if(n.placeholderData!==void 0&&w===void 0&&_==="pending"){let B;i!=null&&i.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(B=i.data,h=!0):B=typeof n.placeholderData=="function"?n.placeholderData((K=g(this,Vs))==null?void 0:K.state.data,g(this,Vs)):n.placeholderData,B!==void 0&&(_="success",w=oc(i==null?void 0:i.data,B,n),m=!0)}if(n.select&&w!==void 0&&!h)if(i&&w===(o==null?void 0:o.data)&&n.select===g(this,yo))w=g(this,zs);else try{U(this,yo,n.select),w=n.select(w),w=oc(i==null?void 0:i.data,w,n),U(this,zs,w),U(this,Jn,null)}catch(B){U(this,Jn,B)}g(this,Jn)&&(E=g(this,Jn),w=g(this,zs),x=Date.now(),_="error");const f=d.fetchStatus==="fetching",p=_==="pending",v=_==="error",O=p&&f,N=w!==void 0,A={status:_,fetchStatus:d.fetchStatus,isPending:p,isSuccess:_==="success",isError:v,isInitialLoading:O,isLoading:O,data:w,dataUpdatedAt:d.dataUpdatedAt,error:E,errorUpdatedAt:x,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>u.dataUpdateCount||d.errorUpdateCount>u.errorUpdateCount,isFetching:f,isRefetching:f&&!p,isLoadingError:v&&!N,isPaused:d.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:v&&N,isStale:Ad(t,n),refetch:this.refetch,promise:g(this,kn),isEnabled:Tt(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const B=A.data!==void 0,ce=A.status==="error"&&!B,Y=ve=>{ce?ve.reject(A.error):B&&ve.resolve(A.data)},X=()=>{const ve=U(this,kn,A.promise=ac());Y(ve)},oe=g(this,kn);switch(oe.status){case"pending":t.queryHash===r.queryHash&&Y(oe);break;case"fulfilled":(ce||A.data!==oe.value)&&X();break;case"rejected":(!ce||A.error!==oe.reason)&&X();break}}return A}updateResult(){const t=g(this,dt),n=this.createResult(g(this,de),this.options);if(U(this,zr,g(this,de).state),U(this,Us,this.options),g(this,zr).data!==void 0&&U(this,Vs,g(this,de)),$a(n,t))return;U(this,dt,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,i=typeof s=="function"?s():s;if(i==="all"||!i&&!g(this,Bs).size)return!0;const o=new Set(i??g(this,Bs));return this.options.throwOnError&&o.add("error"),Object.keys(g(this,dt)).some(a=>{const l=a;return g(this,dt)[l]!==t[l]&&o.has(l)})};ie(this,me,Yy).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ie(this,me,fc).call(this)}},wt=new WeakMap,de=new WeakMap,mo=new WeakMap,dt=new WeakMap,zr=new WeakMap,Us=new WeakMap,kn=new WeakMap,Jn=new WeakMap,yo=new WeakMap,zs=new WeakMap,Vs=new WeakMap,Vr=new WeakMap,Br=new WeakMap,Xn=new WeakMap,Bs=new WeakMap,me=new WeakSet,Ai=function(t){ie(this,me,mc).call(this);let n=g(this,de).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(ht)),n},uc=function(){ie(this,me,hc).call(this);const t=pr(this.options.staleTime,g(this,de));if(lo.isServer()||g(this,dt).isStale||!sc(t))return;const r=Qy(g(this,dt).dataUpdatedAt,t)+1;U(this,Vr,Ar.setTimeout(()=>{g(this,dt).isStale||this.updateResult()},r))},cc=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(g(this,de)):this.options.refetchInterval)??!1},dc=function(t){ie(this,me,pc).call(this),U(this,Xn,t),!(lo.isServer()||Tt(this.options.enabled,g(this,de))===!1||!sc(g(this,Xn))||g(this,Xn)===0)&&U(this,Br,Ar.setInterval(()=>{(this.options.refetchIntervalInBackground||Nd.isFocused())&&ie(this,me,Ai).call(this)},g(this,Xn)))},fc=function(){ie(this,me,uc).call(this),ie(this,me,dc).call(this,ie(this,me,cc).call(this))},hc=function(){g(this,Vr)!==void 0&&(Ar.clearTimeout(g(this,Vr)),U(this,Vr,void 0))},pc=function(){g(this,Br)!==void 0&&(Ar.clearInterval(g(this,Br)),U(this,Br,void 0))},mc=function(){const t=g(this,wt).getQueryCache().build(g(this,wt),this.options);if(t===g(this,de))return;const n=g(this,de);U(this,de,t),U(this,mo,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Yy=function(t){$e.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(g(this,dt))}),g(this,wt).getQueryCache().notify({query:g(this,de),type:"observerResultsUpdated"})})},Op);function rx(e,t){return Tt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Tt(t.retryOnMount,e)===!1)}function _h(e,t){return rx(e,t)||e.state.data!==void 0&&yc(e,t,t.refetchOnMount)}function yc(e,t,n){if(Tt(t.enabled,e)!==!1&&pr(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Ad(e,t)}return!1}function Sh(e,t,n,r){return(e!==t||Tt(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Ad(e,n)}function Ad(e,t){return Tt(t.enabled,e)!==!1&&e.isStaleByTime(pr(t.staleTime,e))}function sx(e,t){return!$a(e.getCurrentResult(),t)}var go,dn,ot,$r,fn,Bn,Np,ix=(Np=class extends Gy{constructor(t){super();Z(this,fn);Z(this,go);Z(this,dn);Z(this,ot);Z(this,$r);U(this,go,t.client),this.mutationId=t.mutationId,U(this,ot,t.mutationCache),U(this,dn,[]),this.state=t.state||eg(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){g(this,dn).includes(t)||(g(this,dn).push(t),this.clearGcTimeout(),g(this,ot).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){U(this,dn,g(this,dn).filter(n=>n!==t)),this.scheduleGc(),g(this,ot).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){g(this,dn).length||(this.state.status==="pending"?this.scheduleGc():g(this,ot).remove(this))}continue(){var t;return((t=g(this,$r))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,a,l,u,c,d,m,w,E,x,_,h,f,p,v,O,N,L;const n=()=>{ie(this,fn,Bn).call(this,{type:"continue"})},r={client:g(this,go),meta:this.options.meta,mutationKey:this.options.mutationKey};U(this,$r,Ky({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(A,K)=>{ie(this,fn,Bn).call(this,{type:"failed",failureCount:A,error:K})},onPause:()=>{ie(this,fn,Bn).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>g(this,ot).canRun(this)}));const s=this.state.status==="pending",i=!g(this,$r).canStart();try{if(s)n();else{ie(this,fn,Bn).call(this,{type:"pending",variables:t,isPaused:i}),g(this,ot).config.onMutate&&await g(this,ot).config.onMutate(t,this,r);const K=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t,r));K!==this.state.context&&ie(this,fn,Bn).call(this,{type:"pending",context:K,variables:t,isPaused:i})}const A=await g(this,$r).start();return await((u=(l=g(this,ot).config).onSuccess)==null?void 0:u.call(l,A,t,this.state.context,this,r)),await((d=(c=this.options).onSuccess)==null?void 0:d.call(c,A,t,this.state.context,r)),await((w=(m=g(this,ot).config).onSettled)==null?void 0:w.call(m,A,null,this.state.variables,this.state.context,this,r)),await((x=(E=this.options).onSettled)==null?void 0:x.call(E,A,null,t,this.state.context,r)),ie(this,fn,Bn).call(this,{type:"success",data:A}),A}catch(A){try{await((h=(_=g(this,ot).config).onError)==null?void 0:h.call(_,A,t,this.state.context,this,r))}catch(K){Promise.reject(K)}try{await((p=(f=this.options).onError)==null?void 0:p.call(f,A,t,this.state.context,r))}catch(K){Promise.reject(K)}try{await((O=(v=g(this,ot).config).onSettled)==null?void 0:O.call(v,void 0,A,this.state.variables,this.state.context,this,r))}catch(K){Promise.reject(K)}try{await((L=(N=this.options).onSettled)==null?void 0:L.call(N,void 0,A,t,this.state.context,r))}catch(K){Promise.reject(K)}throw ie(this,fn,Bn).call(this,{type:"error",error:A}),A}finally{g(this,ot).runNext(this)}}},go=new WeakMap,dn=new WeakMap,ot=new WeakMap,$r=new WeakMap,fn=new WeakSet,Bn=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),$e.batch(()=>{g(this,dn).forEach(r=>{r.onMutationUpdate(t)}),g(this,ot).notify({mutation:this,type:"updated",action:t})})},Np);function eg(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Cn,Xt,vo,Pp,ox=(Pp=class extends ci{constructor(t={}){super();Z(this,Cn);Z(this,Xt);Z(this,vo);this.config=t,U(this,Cn,new Set),U(this,Xt,new Map),U(this,vo,0)}build(t,n,r){const s=new ix({client:t,mutationCache:this,mutationId:++Do(this,vo)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){g(this,Cn).add(t);const n=Yo(t);if(typeof n=="string"){const r=g(this,Xt).get(n);r?r.push(t):g(this,Xt).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(g(this,Cn).delete(t)){const n=Yo(t);if(typeof n=="string"){const r=g(this,Xt).get(n);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&g(this,Xt).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Yo(t);if(typeof n=="string"){const r=g(this,Xt).get(n),s=r==null?void 0:r.find(i=>i.state.status==="pending");return!s||s===t}else return!0}runNext(t){var r;const n=Yo(t);if(typeof n=="string"){const s=(r=g(this,Xt).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){$e.batch(()=>{g(this,Cn).forEach(t=>{this.notify({type:"removed",mutation:t})}),g(this,Cn).clear(),g(this,Xt).clear()})}getAll(){return Array.from(g(this,Cn))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>mh(n,r))}findAll(t={}){return this.getAll().filter(n=>mh(t,n))}notify(t){$e.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return $e.batch(()=>Promise.all(t.map(n=>n.continue().catch(ht))))}},Cn=new WeakMap,Xt=new WeakMap,vo=new WeakMap,Pp);function Yo(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Rn,Yn,xt,On,An,pa,gc,Tp,ax=(Tp=class extends ci{constructor(n,r){super();Z(this,An);Z(this,Rn);Z(this,Yn);Z(this,xt);Z(this,On);U(this,Rn,n),this.setOptions(r),this.bindMethods(),ie(this,An,pa).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const r=this.options;this.options=g(this,Rn).defaultMutationOptions(n),$a(this.options,r)||g(this,Rn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:g(this,xt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Xr(r.mutationKey)!==Xr(this.options.mutationKey)?this.reset():((s=g(this,xt))==null?void 0:s.state.status)==="pending"&&g(this,xt).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=g(this,xt))==null||n.removeObserver(this)}onMutationUpdate(n){ie(this,An,pa).call(this),ie(this,An,gc).call(this,n)}getCurrentResult(){return g(this,Yn)}reset(){var n;(n=g(this,xt))==null||n.removeObserver(this),U(this,xt,void 0),ie(this,An,pa).call(this),ie(this,An,gc).call(this)}mutate(n,r){var s;return U(this,On,r),(s=g(this,xt))==null||s.removeObserver(this),U(this,xt,g(this,Rn).getMutationCache().build(g(this,Rn),this.options)),g(this,xt).addObserver(this),g(this,xt).execute(n)}},Rn=new WeakMap,Yn=new WeakMap,xt=new WeakMap,On=new WeakMap,An=new WeakSet,pa=function(){var r;const n=((r=g(this,xt))==null?void 0:r.state)??eg();U(this,Yn,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},gc=function(n){$e.batch(()=>{var r,s,i,o,a,l,u,c;if(g(this,On)&&this.hasListeners()){const d=g(this,Yn).variables,m=g(this,Yn).context,w={client:g(this,Rn),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(s=(r=g(this,On)).onSuccess)==null||s.call(r,n.data,d,m,w)}catch(E){Promise.reject(E)}try{(o=(i=g(this,On)).onSettled)==null||o.call(i,n.data,null,d,m,w)}catch(E){Promise.reject(E)}}else if((n==null?void 0:n.type)==="error"){try{(l=(a=g(this,On)).onError)==null||l.call(a,n.error,d,m,w)}catch(E){Promise.reject(E)}try{(c=(u=g(this,On)).onSettled)==null||c.call(u,void 0,n.error,d,m,w)}catch(E){Promise.reject(E)}}}this.listeners.forEach(d=>{d(g(this,Yn))})})},Tp),hn,bp,lx=(bp=class extends ci{constructor(t={}){super();Z(this,hn);this.config=t,U(this,hn,new Map)}build(t,n,r){const s=n.queryKey,i=n.queryHash??Pd(s,n);let o=this.get(i);return o||(o=new tx({client:t,queryKey:s,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){g(this,hn).has(t.queryHash)||(g(this,hn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=g(this,hn).get(t.queryHash);n&&(t.destroy(),n===t&&g(this,hn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){$e.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return g(this,hn).get(t)}getAll(){return[...g(this,hn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>ph(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>ph(t,r)):n}notify(t){$e.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){$e.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){$e.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},hn=new WeakMap,bp),be,er,tr,$s,Hs,nr,Qs,Ws,Ap,ux=(Ap=class{constructor(e={}){Z(this,be);Z(this,er);Z(this,tr);Z(this,$s);Z(this,Hs);Z(this,nr);Z(this,Qs);Z(this,Ws);U(this,be,e.queryCache||new lx),U(this,er,e.mutationCache||new ox),U(this,tr,e.defaultOptions||{}),U(this,$s,new Map),U(this,Hs,new Map),U(this,nr,0)}mount(){Do(this,nr)._++,g(this,nr)===1&&(U(this,Qs,Nd.subscribe(async e=>{e&&(await this.resumePausedMutations(),g(this,be).onFocus())})),U(this,Ws,Ha.subscribe(async e=>{e&&(await this.resumePausedMutations(),g(this,be).onOnline())})))}unmount(){var e,t;Do(this,nr)._--,g(this,nr)===0&&((e=g(this,Qs))==null||e.call(this),U(this,Qs,void 0),(t=g(this,Ws))==null||t.call(this),U(this,Ws,void 0))}isFetching(e){return g(this,be).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return g(this,er).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=g(this,be).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=g(this,be).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(pr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return g(this,be).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=g(this,be).get(r.queryHash),i=s==null?void 0:s.state.data,o=$w(t,i);if(o!==void 0)return g(this,be).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return $e.batch(()=>g(this,be).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=g(this,be).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=g(this,be);$e.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=g(this,be);return $e.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=$e.batch(()=>g(this,be).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(ht).catch(ht)}invalidateQueries(e,t={}){return $e.batch(()=>(g(this,be).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=$e.batch(()=>g(this,be).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(ht)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(ht)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=g(this,be).build(this,t);return n.isStaleByTime(pr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ht).catch(ht)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ht).catch(ht)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Ha.isOnline()?g(this,er).resumePausedMutations():Promise.resolve()}getQueryCache(){return g(this,be)}getMutationCache(){return g(this,er)}getDefaultOptions(){return g(this,tr)}setDefaultOptions(e){U(this,tr,e)}setQueryDefaults(e,t){g(this,$s).set(Xr(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...g(this,$s).values()],n={};return t.forEach(r=>{ao(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){g(this,Hs).set(Xr(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...g(this,Hs).values()],n={};return t.forEach(r=>{ao(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...g(this,tr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Pd(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===Td&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...g(this,tr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){g(this,be).clear(),g(this,er).clear()}},be=new WeakMap,er=new WeakMap,tr=new WeakMap,$s=new WeakMap,Hs=new WeakMap,nr=new WeakMap,Qs=new WeakMap,Ws=new WeakMap,Ap),tg=P.createContext(void 0),wl=e=>{const t=P.useContext(tg);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},cx=({client:e,children:t})=>(P.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),k.jsx(tg.Provider,{value:e,children:t})),ng=P.createContext(!1),dx=()=>P.useContext(ng);ng.Provider;function fx(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var hx=P.createContext(fx()),px=()=>P.useContext(hx),mx=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?bd(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},yx=e=>{P.useEffect(()=>{e.clearReset()},[e])},gx=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||bd(n,[e.error,r])),vx=e=>{if(e.suspense){const n=s=>s==="static"?s:Math.max(s??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...s)=>n(r(...s)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},wx=(e,t)=>e.isLoading&&e.isFetching&&!t,xx=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Eh=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function _x(e,t,n){var w,E,x,_;const r=dx(),s=px(),i=wl(),o=i.defaultQueryOptions(e);(E=(w=i.getDefaultOptions().queries)==null?void 0:w._experimental_beforeQuery)==null||E.call(w,o);const a=i.getQueryCache().get(o.queryHash),l=e.subscribed!==!1;o._optimisticResults=r?"isRestoring":l?"optimistic":void 0,vx(o),mx(o,s,a),yx(s);const u=!i.getQueryCache().get(o.queryHash),[c]=P.useState(()=>new t(i,o)),d=c.getOptimisticResult(o),m=!r&&l;if(P.useSyncExternalStore(P.useCallback(h=>{const f=m?c.subscribe($e.batchCalls(h)):ht;return c.updateResult(),f},[c,m]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),P.useEffect(()=>{c.setOptions(o)},[o,c]),xx(o,d))throw Eh(o,c,s);if(gx({result:d,errorResetBoundary:s,throwOnError:o.throwOnError,query:a,suspense:o.suspense}))throw d.error;if((_=(x=i.getDefaultOptions().queries)==null?void 0:x._experimental_afterQuery)==null||_.call(x,o,d),o.experimental_prefetchInRender&&!lo.isServer()&&wx(d,r)){const h=u?Eh(o,c,s):a==null?void 0:a.promise;h==null||h.catch(ht).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?d:c.trackResult(d)}function xl(e,t){return _x(e,nx)}function rg(e,t){const n=wl(),[r]=P.useState(()=>new ax(n,e));P.useEffect(()=>{r.setOptions(e)},[r,e]);const s=P.useSyncExternalStore(P.useCallback(o=>r.subscribe($e.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=P.useCallback((o,a)=>{r.mutate(o,a).catch(ht)},[r]);if(s.error&&bd(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:i,mutateAsync:s.mutate}}/** * @remix-run/router v1.23.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function uo(){return uo=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function jd(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Ex(){return Math.random().toString(36).substr(2,8)}function Ch(e,t){return{usr:e.state,key:e.key,idx:t}}function vc(e,t,n,r){return n===void 0&&(n=null),uo({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?di(t):t,{state:n,key:t&&t.key||r||Ex()})}function Qa(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 di(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 kx(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a=ir.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(uo({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function d(){a=ir.Pop;let _=c(),h=_==null?null:_-u;u=_,l&&l({action:a,location:x.location,delta:h})}function m(_,h){a=ir.Push;let f=vc(x.location,_,h);u=c()+1;let p=Ch(f,u),v=x.createHref(f);try{o.pushState(p,"",v)}catch(O){if(O instanceof DOMException&&O.name==="DataCloneError")throw O;s.location.assign(v)}i&&l&&l({action:a,location:x.location,delta:1})}function w(_,h){a=ir.Replace;let f=vc(x.location,_,h);u=c();let p=Ch(f,u),v=x.createHref(f);o.replaceState(p,"",v),i&&l&&l({action:a,location:x.location,delta:0})}function E(_){let h=s.location.origin!=="null"?s.location.origin:s.location.href,f=typeof _=="string"?_:Qa(_);return f=f.replace(/ $/,"%20"),De(h,"No window.location.(origin|href) available to create URL for href: "+f),new URL(f,h)}let x={get action(){return a},get location(){return e(s,o)},listen(_){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(kh,d),l=_,()=>{s.removeEventListener(kh,d),l=null}},createHref(_){return t(s,_)},createURL:E,encodeLocation(_){let h=E(_);return{pathname:h.pathname,search:h.search,hash:h.hash}},push:m,replace:w,go(_){return o.go(_)}};return x}var Rh;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Rh||(Rh={}));function Cx(e,t,n){return n===void 0&&(n="/"),Rx(e,t,n)}function Rx(e,t,n,r){let s=typeof t=="string"?di(t):t,i=Fd(s.pathname||"/",n);if(i==null)return null;let o=sg(e);Ox(o);let a=null,l=Ux(i);for(let u=0;a==null&&u{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(De(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=mr([r,l.relativePath]),c=n.concat(l);i.children&&i.children.length>0&&(De(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),sg(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:Fx(u,i.index),routesMeta:c})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of ig(i.path))s(i,o,l)}),t}function ig(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=ig(r.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function Ox(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Dx(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Nx=/^:[\w-]+$/,Px=3,Tx=2,bx=1,Ax=10,jx=-2,Oh=e=>e==="*";function Fx(e,t){let n=e.split("/"),r=n.length;return n.some(Oh)&&(r+=jx),t&&(r+=Tx),n.filter(s=>!Oh(s)).reduce((s,i)=>s+(Nx.test(i)?Px:i===""?bx:Ax),r)}function Dx(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function Lx(e,t,n){let{routesMeta:r}=e,s={},i="/",o=[];for(let a=0;a{let{paramName:m,isOptional:w}=c;if(m==="*"){let x=a[d]||"";o=i.slice(0,i.length-x.length).replace(/(.)\/+$/,"$1")}const E=a[d];return w&&!E?u[m]=void 0:u[m]=(E||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:e}}function Mx(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),jd(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=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function Ux(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return jd(!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 Fd(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)||"/"}const zx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Vx=e=>zx.test(e);function Bx(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?di(e):e,i;if(n)if(Vx(n))i=n;else{if(n.includes("//")){let o=n;n=og(n),jd(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+n))}n.startsWith("/")?i=Nh(n.substring(1),"/"):i=Nh(n,t)}else i=t;return{pathname:i,search:Qx(r),hash:Wx(s)}}function Nh(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function nu(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 $x(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Dd(e,t){let n=$x(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Ld(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=di(e):(s=uo({},e),De(!s.pathname||!s.pathname.includes("?"),nu("?","pathname","search",s)),De(!s.pathname||!s.pathname.includes("#"),nu("#","pathname","hash",s)),De(!s.search||!s.search.includes("#"),nu("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=n;else{let d=t.length-1;if(!r&&o.startsWith("..")){let m=o.split("/");for(;m[0]==="..";)m.shift(),d-=1;s.pathname=m.join("/")}a=d>=0?t[d]:"/"}let l=Bx(s,a),u=o&&o!=="/"&&o.endsWith("/"),c=(i||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const og=e=>e.replace(/\/\/+/g,"/"),mr=e=>og(e.join("/")),Hx=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Qx=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Wx=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function qx(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const ag=["post","put","patch","delete"];new Set(ag);const Zx=["get",...ag];new Set(Zx);/** * React Router v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function co(){return co=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),P.useCallback(function(u,c){if(c===void 0&&(c={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let d=Ld(u,JSON.parse(o),i,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:mr([t,d.pathname])),(c.replace?r.replace:r.push)(d,c.state,c)},[t,r,o,i,e])}const Xx=P.createContext(null);function Yx(e){let t=P.useContext(vn).outlet;return t&&P.createElement(Xx.Provider,{value:e},t)}function cg(){let{matches:e}=P.useContext(vn),t=e[e.length-1];return t?t.params:{}}function dg(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=P.useContext(kr),{matches:s}=P.useContext(vn),{pathname:i}=hi(),o=JSON.stringify(Dd(s,r.v7_relativeSplatPath));return P.useMemo(()=>Ld(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function e_(e,t){return t_(e,t)}function t_(e,t,n,r){fi()||De(!1);let{navigator:s}=P.useContext(kr),{matches:i}=P.useContext(vn),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=hi(),c;if(t){var d;let _=typeof t=="string"?di(t):t;l==="/"||(d=_.pathname)!=null&&d.startsWith(l)||De(!1),c=_}else c=u;let m=c.pathname||"/",w=m;if(l!=="/"){let _=l.replace(/^\//,"").split("/");w="/"+m.replace(/^\//,"").split("/").slice(_.length).join("/")}let E=Cx(e,{pathname:w}),x=o_(E&&E.map(_=>Object.assign({},_,{params:Object.assign({},a,_.params),pathname:mr([l,s.encodeLocation?s.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?l:mr([l,s.encodeLocation?s.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),i,n,r);return t&&x?P.createElement(_l.Provider,{value:{location:co({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:ir.Pop}},x):x}function n_(){let e=c_(),t=qx(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return P.createElement(P.Fragment,null,P.createElement("h2",null,"Unexpected Application Error!"),P.createElement("h3",{style:{fontStyle:"italic"}},t),n?P.createElement("pre",{style:s},n):null,null)}const r_=P.createElement(n_,null);class s_ extends P.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,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?P.createElement(vn.Provider,{value:this.props.routeContext},P.createElement(lg.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function i_(e){let{routeContext:t,match:n,children:r}=e,s=P.useContext(Id);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),P.createElement(vn.Provider,{value:t},r)}function o_(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,a=(s=n)==null?void 0:s.errors;if(a!=null){let c=o.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);c>=0||De(!1),o=o.slice(0,Math.min(o.length,c+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,d,m)=>{let w,E=!1,x=null,_=null;n&&(w=a&&d.route.id?a[d.route.id]:void 0,x=d.route.errorElement||r_,l&&(u<0&&m===0?(f_("route-fallback"),E=!0,_=null):u===m&&(E=!0,_=d.route.hydrateFallbackElement||null)));let h=t.concat(o.slice(0,m+1)),f=()=>{let p;return w?p=x:E?p=_:d.route.Component?p=P.createElement(d.route.Component,null):d.route.element?p=d.route.element:p=c,P.createElement(i_,{match:d,routeContext:{outlet:c,matches:h,isDataRoute:n!=null},children:p})};return n&&(d.route.ErrorBoundary||d.route.errorElement||m===0)?P.createElement(s_,{location:n.location,revalidation:n.revalidation,component:x,error:w,children:f(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):f()},null)}var fg=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(fg||{}),hg=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}(hg||{});function a_(e){let t=P.useContext(Id);return t||De(!1),t}function l_(e){let t=P.useContext(Kx);return t||De(!1),t}function u_(e){let t=P.useContext(vn);return t||De(!1),t}function pg(e){let t=u_(),n=t.matches[t.matches.length-1];return n.route.id||De(!1),n.route.id}function c_(){var e;let t=P.useContext(lg),n=l_(),r=pg();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function d_(){let{router:e}=a_(fg.UseNavigateStable),t=pg(hg.UseNavigateStable),n=P.useRef(!1);return ug(()=>{n.current=!0}),P.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,co({fromRouteId:t},i)))},[e,t])}const Ph={};function f_(e,t,n){Ph[e]||(Ph[e]=!0)}function h_(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Md(e){let{to:t,replace:n,state:r,relative:s}=e;fi()||De(!1);let{future:i,static:o}=P.useContext(kr),{matches:a}=P.useContext(vn),{pathname:l}=hi(),u=Sl(),c=Ld(t,Dd(a,i.v7_relativeSplatPath),l,s==="path"),d=JSON.stringify(c);return P.useEffect(()=>u(JSON.parse(d),{replace:n,state:r,relative:s}),[u,d,s,n,r]),null}function mg(e){return Yx(e.context)}function _n(e){De(!1)}function p_(e){let{basename:t="/",children:n=null,location:r,navigationType:s=ir.Pop,navigator:i,static:o=!1,future:a}=e;fi()&&De(!1);let l=t.replace(/^\/*/,"/"),u=P.useMemo(()=>({basename:l,navigator:i,static:o,future:co({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof r=="string"&&(r=di(r));let{pathname:c="/",search:d="",hash:m="",state:w=null,key:E="default"}=r,x=P.useMemo(()=>{let _=Fd(c,l);return _==null?null:{location:{pathname:_,search:d,hash:m,state:w,key:E},navigationType:s}},[l,c,d,m,w,E,s]);return x==null?null:P.createElement(kr.Provider,{value:u},P.createElement(_l.Provider,{children:n,value:x}))}function m_(e){let{children:t,location:n}=e;return e_(wc(t),n)}new Promise(()=>{});function wc(e,t){t===void 0&&(t=[]);let n=[];return P.Children.forEach(e,(r,s)=>{if(!P.isValidElement(r))return;let i=[...t,s];if(r.type===P.Fragment){n.push.apply(n,wc(r.props.children,i));return}r.type!==_n&&De(!1),!r.props.index||!r.props.children||De(!1);let o={id:r.props.id||i.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=wc(r.props.children,i)),n.push(o)}),n}/** * React Router DOM v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function xc(){return xc=Object.assign?Object.assign.bind():function(e){for(var t=1;t{u&&Th?Th(()=>l(d)):l(d)},[l,u]);return P.useLayoutEffect(()=>o.listen(c),[o,c]),P.useEffect(()=>h_(r),[r]),P.createElement(p_,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const E_=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",k_=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,El=P.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:u,preventScrollReset:c,viewTransition:d}=t,m=y_(t,w_),{basename:w}=P.useContext(kr),E,x=!1;if(typeof u=="string"&&k_.test(u)&&(E=u,E_))try{let p=new URL(window.location.href),v=u.startsWith("//")?new URL(p.protocol+u):new URL(u),O=Fd(v.pathname,w);v.origin===p.origin&&O!=null?u=O+v.search+v.hash:x=!0}catch{}let _=Gx(u,{relative:s}),h=C_(u,{replace:o,state:a,target:l,preventScrollReset:c,relative:s,viewTransition:d});function f(p){r&&r(p),p.defaultPrevented||h(p)}return P.createElement("a",xc({},m,{href:E||_,onClick:x||i?r:f,ref:n,target:l}))});var bh;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(bh||(bh={}));var Ah;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Ah||(Ah={}));function C_(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,viewTransition:a}=t===void 0?{}:t,l=Sl(),u=hi(),c=dg(e,{relative:o});return P.useCallback(d=>{if(v_(d,n)){d.preventDefault();let m=r!==void 0?r:Qa(u)===Qa(c);l(e,{replace:m,state:s,preventScrollReset:i,relative:o,viewTransition:a})}},[u,l,c,r,s,n,e,i,o,a])}function Yr({className:e="",variant:t="primary",...n}){const r="inline-flex items-center justify-center rounded-lg px-4 py-2 text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-60",s={primary:"bg-blue-600 text-white hover:bg-blue-700",secondary:"border border-gray-300 text-gray-700 hover:bg-gray-50"};return k.jsx("button",{className:`${r} ${s[t]} ${e}`,...n})}function yg(e,t){return function(){return e.apply(t,arguments)}}const{toString:R_}=Object.prototype,{getPrototypeOf:ei}=Object,{iterator:ko,toStringTag:gg}=Symbol,Wa=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),fo=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),Wa(n,t))return!0;n=ei(n)}return!1},O_=(e,t)=>e!=null&&fo(e,t)?e[t]:void 0,Ud=(e=>t=>{const n=R_.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),on=e=>(e=e.toLowerCase(),t=>Ud(t)===e),kl=e=>t=>typeof t===e,{isArray:es}=Array,ti=kl("undefined");function pi(e){return e!==null&&!ti(e)&&e.constructor!==null&&!ti(e.constructor)&&Rt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const vg=on("ArrayBuffer");function N_(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&vg(e.buffer),t}const P_=kl("string"),Rt=kl("function"),wg=kl("number"),mi=e=>e!==null&&typeof e=="object",T_=e=>e===!0||e===!1,ma=e=>{if(!mi(e))return!1;const t=ei(e);return(t===null||t===Object.prototype||ei(t)===null)&&!fo(e,gg)&&!fo(e,ko)},b_=e=>{if(!mi(e)||pi(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},A_=on("Date"),j_=on("File"),F_=e=>!!(e&&typeof e.uri<"u"),D_=e=>e&&typeof e.getParts<"u",L_=on("Blob"),I_=on("FileList"),M_=e=>mi(e)&&Rt(e.pipe);function U_(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const jh=U_(),Fh=typeof jh.FormData<"u"?jh.FormData:void 0,z_=e=>{if(!e)return!1;if(Fh&&e instanceof Fh)return!0;const t=ei(e);if(!t||t===Object.prototype||!Rt(e.append))return!1;const n=Ud(e);return n==="formdata"||n==="object"&&Rt(e.toString)&&e.toString()==="[object FormData]"},V_=on("URLSearchParams"),[B_,$_,H_,Q_]=["ReadableStream","Request","Response","Headers"].map(on),W_=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Co(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),es(e))for(r=0,s=e.length;r0;)if(s=n[r],t===s.toLowerCase())return s;return null}const jr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,_g=e=>!ti(e)&&e!==jr;function _c(...e){const{caseless:t,skipUndefined:n}=_g(this)&&this||{},r={},s=(i,o)=>{if(o==="__proto__"||o==="constructor"||o==="prototype")return;const a=t&&typeof o=="string"&&xg(r,o)||o,l=Wa(r,a)?r[a]:void 0;ma(l)&&ma(i)?r[a]=_c(l,i):ma(i)?r[a]=_c({},i):es(i)?r[a]=i.slice():(!n||!ti(i))&&(r[a]=i)};for(let i=0,o=e.length;i(Co(t,(s,i)=>{n&&Rt(s)?Object.defineProperty(e,i,{__proto__:null,value:yg(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),Z_=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),K_=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},G_=(e,t,n,r)=>{let s,i,o;const a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],(!r||r(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=n!==!1&&ei(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},J_=(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},X_=e=>{if(!e)return null;if(es(e))return e;let t=e.length;if(!wg(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Y_=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ei(Uint8Array)),eS=(e,t)=>{const r=(e&&e[ko]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},tS=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},nS=on("HTMLFormElement"),rS=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),{propertyIsEnumerable:sS}=Object.prototype,iS=on("RegExp"),Sg=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Co(n,(s,i)=>{let o;(o=t(s,i,e))!==!1&&(r[i]=o||s)}),Object.defineProperties(e,r)},oS=e=>{Sg(e,(t,n)=>{if(Rt(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(Rt(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+"'")})}})},aS=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return es(e)?r(e):r(String(e).split(t)),n},lS=()=>{},uS=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function cS(e){return!!(e&&Rt(e.append)&&e[gg]==="FormData"&&e[ko])}const dS=e=>{const t=new WeakSet,n=r=>{if(mi(r)){if(t.has(r))return;if(pi(r))return r;if(!("toJSON"in r)){t.add(r);const s=es(r)?[]:{};return Co(r,(i,o)=>{const a=n(i);!ti(a)&&(s[o]=a)}),t.delete(r),s}}return r};return n(e)},fS=on("AsyncFunction"),hS=e=>e&&(mi(e)||Rt(e))&&Rt(e.then)&&Rt(e.catch),Eg=((e,t)=>e?setImmediate:t?((n,r)=>(jr.addEventListener("message",({source:s,data:i})=>{s===jr&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),jr.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Rt(jr.postMessage)),pS=typeof queueMicrotask<"u"?queueMicrotask.bind(jr):typeof process<"u"&&process.nextTick||Eg,kg=e=>e!=null&&Rt(e[ko]),mS=e=>e!=null&&fo(e,ko)&&kg(e),S={isArray:es,isArrayBuffer:vg,isBuffer:pi,isFormData:z_,isArrayBufferView:N_,isString:P_,isNumber:wg,isBoolean:T_,isObject:mi,isPlainObject:ma,isEmptyObject:b_,isReadableStream:B_,isRequest:$_,isResponse:H_,isHeaders:Q_,isUndefined:ti,isDate:A_,isFile:j_,isReactNativeBlob:F_,isReactNative:D_,isBlob:L_,isRegExp:iS,isFunction:Rt,isStream:M_,isURLSearchParams:V_,isTypedArray:Y_,isFileList:I_,forEach:Co,merge:_c,extend:q_,trim:W_,stripBOM:Z_,inherits:K_,toFlatObject:G_,kindOf:Ud,kindOfTest:on,endsWith:J_,toArray:X_,forEachEntry:eS,matchAll:tS,isHTMLForm:nS,hasOwnProperty:Wa,hasOwnProp:Wa,hasOwnInPrototypeChain:fo,getSafeProp:O_,reduceDescriptors:Sg,freezeMethods:oS,toObjectSet:aS,toCamelCase:rS,noop:lS,toFiniteNumber:uS,findKey:xg,global:jr,isContextDefined:_g,isSpecCompliantForm:cS,toJSONObject:dS,isAsyncFn:fS,isThenable:hS,setImmediate:Eg,asap:pS,isIterable:kg,isSafeIterable:mS},yS=S.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"]),gS=e=>{const t={};let n,r,s;return e&&e.split(` `).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||t[n]&&yS[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function vS(e){let t=0,n=e.length;for(;tt;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const wS=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),xS=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function zd(e,t){return S.isArray(e)?e.map(n=>zd(n,t)):vS(String(e).replace(t,""))}const _S=e=>zd(e,wS),SS=e=>zd(e,xS);function Cg(e){const t=Object.create(null);return S.forEach(e.toJSON(),(n,r)=>{t[r]=SS(n)}),t}const Dh=Symbol("internals");function Ri(e){return e&&String(e).trim().toLowerCase()}function ya(e){return e===!1||e==null?e:S.isArray(e)?e.map(ya):_S(String(e))}function ES(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 kS=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ru(e,t,n,r,s){if(S.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!S.isString(t)){if(S.isString(r))return t.indexOf(r)!==-1;if(S.isRegExp(r))return r.test(t)}}function CS(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function RS(e,t){const n=S.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(s,i,o){return this[r].call(this,t,s,i,o)},configurable:!0})})}let ut=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function i(a,l,u){const c=Ri(l);if(!c)return;const d=S.findKey(s,c);(!d||s[d]===void 0||u===!0||u===void 0&&s[d]!==!1)&&(s[d||l]=ya(a))}const o=(a,l)=>S.forEach(a,(u,c)=>i(u,c,l));if(S.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(S.isString(t)&&(t=t.trim())&&!kS(t))o(gS(t),n);else if(S.isObject(t)&&S.isSafeIterable(t)){let a=Object.create(null),l,u;for(const c of t){if(!S.isArray(c))throw new TypeError("Object iterator must return a key-value pair");u=c[0],S.hasOwnProp(a,u)?(l=a[u],a[u]=S.isArray(l)?[...l,c[1]]:[l,c[1]]):a[u]=c[1]}o(a,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=Ri(t),t){const r=S.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return ES(s);if(S.isFunction(n))return n.call(this,s,r);if(S.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Ri(t),t){const r=S.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ru(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function i(o){if(o=Ri(o),o){const a=S.findKey(r,o);a&&(!n||ru(r,r[a],a,n))&&(delete r[a],s=!0)}}return S.isArray(t)?t.forEach(i):i(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!t||ru(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const n=this,r={};return S.forEach(this,(s,i)=>{const o=S.findKey(r,i);if(o){n[o]=ya(s),delete n[i];return}const a=t?CS(i):String(i).trim();a!==i&&delete n[i],n[a]=ya(s),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return S.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&S.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(` `)}getSetCookie(){return this.get("set-cookie")||[]}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(s=>r.set(s)),r}static accessor(t){const r=(this[Dh]=this[Dh]={accessors:{}}).accessors,s=this.prototype;function i(o){const a=Ri(o);r[a]||(RS(s,o),r[a]=!0)}return S.isArray(t)?t.forEach(i):i(t),this}};ut.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);S.reduceDescriptors(ut.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});S.freezeMethods(ut);const OS="[REDACTED ****]";function NS(e){if(S.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(S.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function PS(e,t){const n=new Set(t.map(i=>String(i).toLowerCase())),r=[],s=i=>{if(i===null||typeof i!="object"||S.isBuffer(i))return i;if(r.indexOf(i)!==-1)return;i instanceof ut&&(i=i.toJSON()),r.push(i);let o;if(S.isArray(i))o=[],i.forEach((a,l)=>{const u=s(a);S.isUndefined(u)||(o[l]=u)});else{if(!S.isPlainObject(i)&&NS(i))return r.pop(),i;o=Object.create(null);for(const[a,l]of Object.entries(i)){const u=n.has(a.toLowerCase())?OS:s(l);S.isUndefined(u)||(o[a]=u)}}return r.pop(),o};return s(e)}let M=class Rg extends Error{static from(t,n,r,s,i,o){const a=new Rg(t.message,n||t.code,r,s,i);return Object.defineProperty(a,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),a.name=t.name,t.status!=null&&a.status==null&&(a.status=t.status),o&&Object.assign(a,o),a}constructor(t,n,r,s,i){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),s&&(this.request=s),i&&(this.response=i,this.status=i.status)}toJSON(){const t=this.config,n=t&&S.hasOwnProp(t,"redact")?t.redact:void 0,r=S.isArray(n)&&n.length>0?PS(t,n):S.toJSONObject(t);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:r,code:this.code,status:this.status}}};M.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";M.ERR_BAD_OPTION="ERR_BAD_OPTION";M.ECONNABORTED="ECONNABORTED";M.ETIMEDOUT="ETIMEDOUT";M.ECONNREFUSED="ECONNREFUSED";M.ERR_NETWORK="ERR_NETWORK";M.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";M.ERR_DEPRECATED="ERR_DEPRECATED";M.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";M.ERR_BAD_REQUEST="ERR_BAD_REQUEST";M.ERR_CANCELED="ERR_CANCELED";M.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";M.ERR_INVALID_URL="ERR_INVALID_URL";M.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const TS=null,Og=100;function Sc(e){return S.isPlainObject(e)||S.isArray(e)}function Ng(e){return S.endsWith(e,"[]")?e.slice(0,-2):e}function su(e,t,n){return e?e.concat(t).map(function(s,i){return s=Ng(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function bS(e){return S.isArray(e)&&!e.some(Sc)}const AS=S.toFlatObject(S,{},null,function(t){return/^is[A-Z]/.test(t)});function Cl(e,t,n){if(!S.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=S.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,p){return!S.isUndefined(p[f])});const r=n.metaTokens,s=n.visitor||E,i=n.dots,o=n.indexes,a=n.Blob||typeof Blob<"u"&&Blob,l=n.maxDepth===void 0?Og:n.maxDepth,u=a&&S.isSpecCompliantForm(t),c=[];if(!S.isFunction(s))throw new TypeError("visitor must be a function");function d(h){if(h===null)return"";if(S.isDate(h))return h.toISOString();if(S.isBoolean(h))return h.toString();if(!u&&S.isBlob(h))throw new M("Blob is not supported. Use a Buffer instead.");if(S.isArrayBuffer(h)||S.isTypedArray(h)){if(u&&typeof a=="function")return new a([h]);if(typeof Buffer<"u")return Buffer.from(h);throw new M("Blob is not supported. Use a Buffer instead.",M.ERR_NOT_SUPPORT)}return h}function m(h){if(h>l)throw new M("Object is too deeply nested ("+h+" levels). Max depth: "+l,M.ERR_FORM_DATA_DEPTH_EXCEEDED)}function w(h,f){if(l===1/0)return JSON.stringify(h);const p=[];return JSON.stringify(h,function(O,N){if(!S.isObject(N))return N;for(;p.length&&p[p.length-1]!==this;)p.pop();return p.push(N),m(f+p.length-1),N})}function E(h,f,p){let v=h;if(S.isReactNative(t)&&S.isReactNativeBlob(h))return t.append(su(p,f,i),d(h)),!1;if(h&&!p&&typeof h=="object"){if(S.endsWith(f,"{}"))f=r?f:f.slice(0,-2),h=w(h,1);else if(S.isArray(h)&&bS(h)||(S.isFileList(h)||S.endsWith(f,"[]"))&&(v=S.toArray(h)))return f=Ng(f),v.forEach(function(N,L){!(S.isUndefined(N)||N===null)&&t.append(o===!0?su([f],L,i):o===null?f:f+"[]",d(N))}),!1}return Sc(h)?!0:(t.append(su(p,f,i),d(h)),!1)}const x=Object.assign(AS,{defaultVisitor:E,convertValue:d,isVisitable:Sc});function _(h,f,p=0){if(!S.isUndefined(h)){if(m(p),c.indexOf(h)!==-1)throw new Error("Circular reference detected in "+f.join("."));c.push(h),S.forEach(h,function(O,N){(!(S.isUndefined(O)||O===null)&&s.call(t,O,S.isString(N)?N.trim():N,f,x))===!0&&_(O,f?f.concat(N):[N],p+1)}),c.pop()}}if(!S.isObject(e))throw new TypeError("data must be an object");return _(e),t}function Lh(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Vd(e,t){this._pairs=[],e&&Cl(e,this,t)}const Pg=Vd.prototype;Pg.append=function(t,n){this._pairs.push([t,n])};Pg.toString=function(t){const n=t?r=>t.call(this,r,Lh):Lh;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function jS(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Tg(e,t,n){if(!t)return e;e=e||"";const r=S.isFunction(n)?{serialize:n}:n,s=S.getSafeProp(r,"encode")||jS,i=S.getSafeProp(r,"serialize");let o;if(i?o=i(t,r):o=S.isURLSearchParams(t)?t.toString():new Vd(t,r).toString(s),o){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class Ih{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){S.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Bd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},FS=typeof URLSearchParams<"u"?URLSearchParams:Vd,DS=typeof FormData<"u"?FormData:null,LS=typeof Blob<"u"?Blob:null,IS={isBrowser:!0,classes:{URLSearchParams:FS,FormData:DS,Blob:LS},protocols:["http","https","file","blob","url","data"]},$d=typeof window<"u"&&typeof document<"u",Ec=typeof navigator=="object"&&navigator||void 0,MS=$d&&(!Ec||["ReactNative","NativeScript","NS"].indexOf(Ec.product)<0),US=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",zS=$d&&window.location.href||"http://localhost",VS=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:$d,hasStandardBrowserEnv:MS,hasStandardBrowserWebWorkerEnv:US,navigator:Ec,origin:zS},Symbol.toStringTag,{value:"Module"})),Ye={...VS,...IS};function BS(e,t){return Cl(e,new Ye.classes.URLSearchParams,{visitor:function(n,r,s,i){return Ye.isNode&&S.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}const Mh=Og;function bg(e){if(e>Mh)throw new M("FormData field is too deeply nested ("+e+" levels). Max depth: "+Mh,M.ERR_FORM_DATA_DEPTH_EXCEEDED)}function $S(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;(r=n.exec(e))!==null;)bg(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function HS(e){const t={},n=Object.keys(e);let r;const s=n.length;let i;for(r=0;r=n.length;return o=!o&&S.isArray(s)?s.length:o,l?(S.hasOwnProp(s,o)?s[o]=S.isArray(s[o])?s[o].concat(r):[s[o],r]:s[o]=r,!a):((!S.hasOwnProp(s,o)||!S.isObject(s[o]))&&(s[o]=[]),t(n,r,s[o],i)&&S.isArray(s[o])&&(s[o]=HS(s[o])),!a)}if(S.isFormData(e)&&S.isFunction(e.entries)){const n={};return S.forEachEntry(e,(r,s)=>{t($S(r),s,n,0)}),n}return null}const ds=(e,t)=>e!=null&&S.hasOwnProp(e,t)?e[t]:void 0;function QS(e,t,n){if(S.isString(e))try{return(t||JSON.parse)(e),S.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Ro={transitional:Bd,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=S.isObject(t);if(i&&S.isHTMLForm(t)&&(t=new FormData(t)),S.isFormData(t))return s?JSON.stringify(Ag(t)):t;if(S.isArrayBuffer(t)||S.isBuffer(t)||S.isStream(t)||S.isFile(t)||S.isBlob(t)||S.isReadableStream(t))return t;if(S.isArrayBufferView(t))return t.buffer;if(S.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){const l=ds(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return BS(t,l).toString();if((a=S.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=ds(this,"env"),c=u&&u.FormData;return Cl(a?{"files[]":t}:t,c&&new c,l)}}return i||s?(n.setContentType("application/json",!1),QS(t)):t}],transformResponse:[function(t){const n=ds(this,"transitional")||Ro.transitional,r=n&&n.forcedJSONParsing,s=ds(this,"responseType"),i=s==="json";if(S.isResponse(t)||S.isReadableStream(t))return t;if(t&&S.isString(t)&&(r&&!s||i)){const a=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,ds(this,"parseReviver"))}catch(l){if(a)throw l.name==="SyntaxError"?M.from(l,M.ERR_BAD_RESPONSE,this,null,ds(this,"response")):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ye.classes.FormData,Blob:Ye.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};S.forEach(["delete","get","head","post","put","patch","query"],e=>{Ro.headers[e]={}});function iu(e,t){const n=this||Ro,r=t||n,s=ut.from(r.headers);let i=r.data;return S.forEach(e,function(a){i=a.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function jg(e){return!!(e&&e.__CANCEL__)}let Oo=class extends M{constructor(t,n,r){super(t??"canceled",M.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Fg(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new M("Request failed with status code "+n.status,n.status>=400&&n.status<500?M.ERR_BAD_REQUEST:M.ERR_BAD_RESPONSE,n.config,n.request,n))}function WS(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function qS(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,i=0,o;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=r[i];o||(o=u),n[s]=l,r[s]=u;let d=i,m=0;for(;d!==s;)m+=n[d++],d=d%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),u-o{n=c,s=null,i&&(clearTimeout(i),i=null),e(...u)};return[(...u)=>{const c=Date.now(),d=c-n;d>=r?o(u,c):(s=u,i||(i=setTimeout(()=>{i=null,o(s)},r-d)))},()=>s&&o(s)]}const qa=(e,t,n=3)=>{let r=0;const s=qS(50,250);return ZS(i=>{if(!i||typeof i.loaded!="number")return;const o=i.loaded,a=i.lengthComputable?i.total:void 0,l=a!=null?Math.min(o,a):o,u=Math.max(0,l-r),c=s(u);r=Math.max(r,l);const d={loaded:l,total:a,progress:a?l/a:void 0,bytes:u,rate:c||void 0,estimated:c&&a?(a-l)/c:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},Uh=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},zh=e=>(...t)=>S.asap(()=>e(...t)),KS=Ye.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Ye.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Ye.origin),Ye.navigator&&/(msie|trident)/i.test(Ye.navigator.userAgent)):()=>!0,GS=Ye.hasStandardBrowserEnv?{write(e,t,n,r,s,i,o){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];S.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),S.isString(r)&&a.push(`path=${r}`),S.isString(s)&&a.push(`domain=${s}`),i===!0&&a.push("secure"),S.isString(o)&&a.push(`SameSite=${o}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;ne instanceof ut?{...e}:e;function ts(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(c,d,m,w){return S.isPlainObject(c)&&S.isPlainObject(d)?S.merge.call({caseless:w},c,d):S.isPlainObject(d)?S.merge({},d):S.isArray(d)?d.slice():d}function s(c,d,m,w){if(S.isUndefined(d)){if(!S.isUndefined(c))return r(void 0,c,m,w)}else return r(c,d,m,w)}function i(c,d){if(!S.isUndefined(d))return r(void 0,d)}function o(c,d){if(S.isUndefined(d)){if(!S.isUndefined(c))return r(void 0,c)}else return r(void 0,d)}function a(c){const d=S.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!S.isUndefined(d))if(S.isPlainObject(d)){if(S.hasOwnProp(d,c))return d[c]}else return;const m=S.hasOwnProp(e,"transitional")?e.transitional:void 0;if(S.isPlainObject(m)&&S.hasOwnProp(m,c))return m[c]}function l(c,d,m){if(S.hasOwnProp(t,m))return r(c,d);if(S.hasOwnProp(e,m))return r(void 0,c)}const u={url:i,method:i,data:i,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,allowedSocketPaths:o,responseEncoding:o,validateStatus:l,headers:(c,d,m)=>s(Bh(c),Bh(d),m,!0)};return S.forEach(Object.keys({...e,...t}),function(d){if(d==="__proto__"||d==="constructor"||d==="prototype")return;const m=S.hasOwnProp(u,d)?u[d]:s,w=S.hasOwnProp(e,d)?e[d]:void 0,E=S.hasOwnProp(t,d)?t[d]:void 0,x=m(w,E,d);S.isUndefined(x)&&m!==l||(n[d]=x)}),S.hasOwnProp(t,"validateStatus")&&S.isUndefined(t.validateStatus)&&a("validateStatusUndefinedResolves")===!1&&(S.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const r1=["content-type","content-length"];function s1(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,s])=>{r1.includes(r.toLowerCase())&&e.set(r,s)})}const i1=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function Lg(e){const t=ts({},e),n=m=>S.hasOwnProp(t,m)?t[m]:void 0,r=n("data");let s=n("withXSRFToken");const i=n("xsrfHeaderName"),o=n("xsrfCookieName");let a=n("headers");const l=n("auth"),u=n("baseURL"),c=n("allowAbsoluteUrls"),d=n("url");if(t.headers=a=ut.from(a),t.url=Tg(Dg(u,d,c,t),n("params"),n("paramsSerializer")),l){const m=S.getSafeProp(l,"username")||"",w=S.getSafeProp(l,"password")||"";try{a.set("Authorization","Basic "+btoa(m+":"+(w?i1(w):"")))}catch(E){throw M.from(E,M.ERR_BAD_OPTION_VALUE,e)}}if(S.isFormData(r)&&(Ye.hasStandardBrowserEnv||Ye.hasStandardBrowserWebWorkerEnv||S.isReactNative(r)?a.setContentType(void 0):S.isFunction(r.getHeaders)&&s1(a,r.getHeaders(),n("formDataHeaderPolicy"))),Ye.hasStandardBrowserEnv&&(S.isFunction(s)&&(s=s(t)),s===!0||s==null&&KS(t.url))){const w=i&&o&&GS.read(o);w&&a.set(i,w)}return t}const o1=typeof XMLHttpRequest<"u",a1=o1&&function(e){return new Promise(function(n,r){const s=Lg(e);let i=s.data;const o=ut.from(s.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=s,c,d,m,w,E;function x(){w&&w(),E&&E(),s.cancelToken&&s.cancelToken.unsubscribe(c),s.signal&&s.signal.removeEventListener("abort",c)}let _=new XMLHttpRequest;_.open(s.method.toUpperCase(),s.url,!0),_.timeout=s.timeout;function h(){if(!_)return;const p=ut.from("getAllResponseHeaders"in _&&_.getAllResponseHeaders()),O={data:!a||a==="text"||a==="json"?_.responseText:_.response,status:_.status,statusText:_.statusText,headers:p,config:e,request:_};Fg(function(L){n(L),x()},function(L){r(L),x()},O),_=null}"onloadend"in _?_.onloadend=h:_.onreadystatechange=function(){!_||_.readyState!==4||_.status===0&&!(_.responseURL&&_.responseURL.startsWith("file:"))||setTimeout(h)},_.onabort=function(){_&&(r(new M("Request aborted",M.ECONNABORTED,e,_)),x(),_=null)},_.onerror=function(v){const O=v&&v.message?v.message:"Network Error",N=new M(O,M.ERR_NETWORK,e,_);N.event=v||null,r(N),x(),_=null},_.ontimeout=function(){let v=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const O=s.transitional||Bd;s.timeoutErrorMessage&&(v=s.timeoutErrorMessage),r(new M(v,O.clarifyTimeoutError?M.ETIMEDOUT:M.ECONNABORTED,e,_)),x(),_=null},i===void 0&&o.setContentType(null),"setRequestHeader"in _&&S.forEach(Cg(o),function(v,O){_.setRequestHeader(O,v)}),S.isUndefined(s.withCredentials)||(_.withCredentials=!!s.withCredentials),a&&a!=="json"&&(_.responseType=s.responseType),u&&([m,E]=qa(u,!0),_.addEventListener("progress",m)),l&&_.upload&&([d,w]=qa(l),_.upload.addEventListener("progress",d),_.upload.addEventListener("loadend",w)),(s.cancelToken||s.signal)&&(c=p=>{_&&(r(!p||p.type?new Oo(null,e,_):p),_.abort(),x(),_=null)},s.cancelToken&&s.cancelToken.subscribe(c),s.signal&&(s.signal.aborted?c():s.signal.addEventListener("abort",c)));const f=WS(s.url);if(f&&!Ye.protocols.includes(f)){r(new M("Unsupported protocol "+f+":",M.ERR_BAD_REQUEST,e)),x();return}_.send(i||null)})},l1=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const s=function(l){if(!r){r=!0,o();const u=l instanceof Error?l:this.reason;n.abort(u instanceof M?u:new Oo(u instanceof Error?u.message:u))}};let i=t&&setTimeout(()=>{i=null,s(new M(`timeout of ${t}ms exceeded`,M.ETIMEDOUT))},t);const o=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),e=null)};e.forEach(l=>l.addEventListener("abort",s,{once:!0}));const{signal:a}=n;return a.unsubscribe=()=>S.asap(o),a},u1=function*(e,t){let n=e.byteLength;if(n{const s=c1(e,t);let i=0,o,a=l=>{o||(o=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await s.next();if(u){a(),l.close();return}let d=c.byteLength;if(n){let m=i+=d;n(m)}l.enqueue(new Uint8Array(c))}catch(u){throw a(u),u}},cancel(l){return a(l),s.return()}},{highWaterMark:2})},Za=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,f1=(e,t,n)=>t+2w>=2&&r.charCodeAt(w-2)===37&&r.charCodeAt(w-1)===51&&(r.charCodeAt(w)===68||r.charCodeAt(w)===100);u>=0&&(r.charCodeAt(u)===61?(l++,u--):c(u)&&(l++,u-=3)),l===1&&u>=0&&(r.charCodeAt(u)===61||c(u))&&l++;const m=Math.floor(o/4)*3-(l||0);return m>0?m:0}let i=0;for(let o=0,a=r.length;o=55296&&l<=56319&&o+1=56320&&u<=57343?(i+=4,o++):i+=3}else i+=3}return i}const Hd="1.18.1",Hh=64*1024,{isFunction:ea}=S,p1=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),Qh=e=>{if(!S.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},Wh=(e,...t)=>{try{return!!e(...t)}catch{return!1}},m1=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},y1=e=>{const t=S.global!==void 0&&S.global!==null?S.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=S.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:s,Request:i,Response:o}=e,a=s?ea(s):typeof fetch=="function",l=ea(i),u=ea(o);if(!a)return!1;const c=a&&ea(n),d=a&&(typeof r=="function"?(h=>f=>h.encode(f))(new r):async h=>new Uint8Array(await new i(h).arrayBuffer())),m=l&&c&&Wh(()=>{let h=!1;const f=new i(Ye.origin,{body:new n,method:"POST",get duplex(){return h=!0,"half"}}),p=f.headers.has("Content-Type");return f.body!=null&&f.body.cancel(),h&&!p}),w=u&&c&&Wh(()=>S.isReadableStream(new o("").body)),E={stream:w&&(h=>h.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(h=>{!E[h]&&(E[h]=(f,p)=>{let v=f&&f[h];if(v)return v.call(f);throw new M(`Response type '${h}' is not supported`,M.ERR_NOT_SUPPORT,p)})});const x=async h=>{if(h==null)return 0;if(S.isBlob(h))return h.size;if(S.isSpecCompliantForm(h))return(await new i(Ye.origin,{method:"POST",body:h}).arrayBuffer()).byteLength;if(S.isArrayBufferView(h)||S.isArrayBuffer(h))return h.byteLength;if(S.isURLSearchParams(h)&&(h=h+""),S.isString(h))return(await d(h)).byteLength},_=async(h,f)=>{const p=S.toFiniteNumber(h.getContentLength());return p??x(f)};return async h=>{let{url:f,method:p,data:v,signal:O,cancelToken:N,timeout:L,onDownloadProgress:A,onUploadProgress:K,responseType:B,headers:ce,withCredentials:Y="same-origin",fetchOptions:X,maxContentLength:oe,maxBodyLength:ve}=Lg(h);const xe=S.isNumber(oe)&&oe>-1,Ke=S.isNumber(ve)&&ve>-1,I=ae=>S.hasOwnProp(h,ae)?h[ae]:void 0;let G=s||fetch;B=B?(B+"").toLowerCase():"text";let J=l1([O,N&&N.toAbortSignal()],L),se=null;const ye=J&&J.unsubscribe&&(()=>{J.unsubscribe()});let gt,Ve=null;const Un=()=>new M("Request body larger than maxBodyLength limit",M.ERR_BAD_REQUEST,h,se);try{let ae;const Ie=I("auth");if(Ie){const ee=S.getSafeProp(Ie,"username")||"",nt=S.getSafeProp(Ie,"password")||"";ae={username:ee,password:nt}}if(m1(f)){const ee=new URL(f,Ye.origin);if(!ae&&(ee.username||ee.password)){const nt=Qh(ee.username),It=Qh(ee.password);ae={username:nt,password:It}}(ee.username||ee.password)&&(ee.username="",ee.password="",f=ee.href)}if(ae&&(ce.delete("authorization"),ce.set("Authorization","Basic "+btoa(p1((ae.username||"")+":"+(ae.password||""))))),xe&&typeof f=="string"&&f.startsWith("data:")&&h1(f)>oe)throw new M("maxContentLength size of "+oe+" exceeded",M.ERR_BAD_RESPONSE,h,se);if(Ke&&p!=="get"&&p!=="head"){const ee=await x(v);if(typeof ee=="number"&&isFinite(ee)&&(gt=ee,ee>ve))throw Un()}const zn=Ke&&(S.isReadableStream(v)||S.isStream(v)),To=(ee,nt,It)=>$h(ee,Hh,Zt=>{if(Ke&&Zt>ve)throw Ve=Un();nt&&nt(Zt)},It);if(m&&p!=="get"&&p!=="head"&&(K||zn)){if(gt=gt??await _(ce,v),gt!==0||zn){let ee=new i(f,{method:"POST",body:v,duplex:"half"}),nt;if(S.isFormData(v)&&(nt=ee.headers.get("content-type"))&&ce.setContentType(nt),ee.body){const[It,Zt]=K&&Uh(gt,qa(zh(K)))||[];v=To(ee.body,It,Zt)}}}else if(zn&&!l&&c&&p!=="get"&&p!=="head")v=To(v);else if(zn&&l&&!m&&p!=="get"&&p!=="head")throw new M("Stream request bodies are not supported by the current fetch implementation",M.ERR_NOT_SUPPORT,h,se);S.isString(Y)||(Y=Y?"include":"omit");const bo=l&&"credentials"in i.prototype;if(S.isFormData(v)){const ee=ce.getContentType();ee&&/^multipart\/form-data/i.test(ee)&&!/boundary=/i.test(ee)&&ce.delete("content-type")}ce.set("User-Agent","axios/"+Hd,!1);const yi={...X,signal:J,method:p.toUpperCase(),headers:Cg(ce.normalize()),body:v,duplex:"half",credentials:bo?Y:void 0};se=l&&new i(f,yi);let vt=await(l?G(se,X):G(f,yi));const Ao=ut.from(vt.headers);if(xe){const ee=S.toFiniteNumber(Ao.getContentLength());if(ee!=null&&ee>oe)throw new M("maxContentLength size of "+oe+" exceeded",M.ERR_BAD_RESPONSE,h,se)}const ls=w&&(B==="stream"||B==="response");if(w&&vt.body&&(A||xe||ls&&ye)){const ee={};["status","statusText","headers"].forEach(Cr=>{ee[Cr]=vt[Cr]});const nt=S.toFiniteNumber(Ao.getContentLength()),[It,Zt]=A&&Uh(nt,qa(zh(A),!0))||[];let jo=0;const Fo=Cr=>{if(xe&&(jo=Cr,jo>oe))throw new M("maxContentLength size of "+oe+" exceeded",M.ERR_BAD_RESPONSE,h,se);It&&It(Cr)};vt=new o($h(vt.body,Hh,Fo,()=>{Zt&&Zt(),ye&&ye()}),ee)}B=B||"text";let qt=await E[S.findKey(E,B)||"text"](vt,h);if(xe&&!w&&!ls){let ee;if(qt!=null&&(typeof qt.byteLength=="number"?ee=qt.byteLength:typeof qt.size=="number"?ee=qt.size:typeof qt=="string"&&(ee=typeof r=="function"?new r().encode(qt).byteLength:qt.length)),typeof ee=="number"&&ee>oe)throw new M("maxContentLength size of "+oe+" exceeded",M.ERR_BAD_RESPONSE,h,se)}return!ls&&ye&&ye(),await new Promise((ee,nt)=>{Fg(ee,nt,{data:qt,headers:ut.from(vt.headers),status:vt.status,statusText:vt.statusText,config:h,request:se})})}catch(ae){if(ye&&ye(),J&&J.aborted&&J.reason instanceof M){const Ie=J.reason;throw Ie.config=h,se&&(Ie.request=se),ae!==Ie&&Object.defineProperty(Ie,"cause",{__proto__:null,value:ae,writable:!0,enumerable:!1,configurable:!0}),Ie}if(Ve)throw se&&!Ve.request&&(Ve.request=se),Ve;if(ae instanceof M)throw se&&!ae.request&&(ae.request=se),ae;if(ae&&ae.name==="TypeError"&&/Load failed|fetch/i.test(ae.message)){const Ie=new M("Network Error",M.ERR_NETWORK,h,se,ae&&ae.response);throw Object.defineProperty(Ie,"cause",{__proto__:null,value:ae.cause||ae,writable:!0,enumerable:!1,configurable:!0}),Ie}throw M.from(ae,ae&&ae.code,h,se,ae&&ae.response)}}},g1=new Map,Ig=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,i=[r,s,n];let o=i.length,a=o,l,u,c=g1;for(;a--;)l=i[a],u=c.get(l),u===void 0&&c.set(l,u=a?new Map:y1(t)),c=u;return u};Ig();const Qd={http:TS,xhr:a1,fetch:{get:Ig}};S.forEach(Qd,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const qh=e=>`- ${e}`,v1=e=>S.isFunction(e)||e===null||e===!1;function w1(e,t){e=S.isArray(e)?e:[e];const{length:n}=e;let r,s;const i={};for(let o=0;o`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=n?o.length>1?`since : `+o.map(qh).join(` `):" "+qh(o[0]):"as no adapter specified";throw new M("There is no suitable adapter to dispatch the request "+a,M.ERR_NOT_SUPPORT)}return s}const Mg={getAdapter:w1,adapters:Qd};function ou(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Oo(null,e)}function Zh(e){return ou(e),e.headers=ut.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),Mg.getAdapter(e.adapter||Ro.adapter,e)(e).then(function(r){ou(e),e.response=r;try{r.data=iu.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=ut.from(r.headers),r},function(r){if(!jg(r)&&(ou(e),r&&r.response)){e.response=r.response;try{r.response.data=iu.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=ut.from(r.response.headers)}return Promise.reject(r)})}const Rl={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Rl[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Kh={};Rl.transitional=function(t,n,r){function s(i,o){return"[Axios v"+Hd+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,a)=>{if(t===!1)throw new M(s(o," has been removed"+(n?" in "+n:"")),M.ERR_DEPRECATED);return n&&!Kh[o]&&(Kh[o]=!0,console.warn(s(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,a):!0}};Rl.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function x1(e,t,n){if(typeof e!="object"||e===null)throw new M("options must be an object",M.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const i=r[s],o=Object.prototype.hasOwnProperty.call(t,i)?t[i]:void 0;if(o){const a=e[i],l=a===void 0||o(a,i,e);if(l!==!0)throw new M("option "+i+" must be "+l,M.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new M("Unknown option "+i,M.ERR_BAD_OPTION)}}const ga={assertOptions:x1,validators:Rl},it=ga.validators;let Wr=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Ih,response:new Ih}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const i=(()=>{if(!s.stack)return"";const o=s.stack.indexOf(` `);return o===-1?"":s.stack.slice(o+1)})();try{if(!r.stack)r.stack=i;else if(i){const o=i.indexOf(` `),a=o===-1?-1:i.indexOf(` `,o+1),l=a===-1?"":i.slice(a+1);String(r.stack).endsWith(l)||(r.stack+=` `+i)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ts(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&ga.assertOptions(r,{silentJSONParsing:it.transitional(it.boolean),forcedJSONParsing:it.transitional(it.boolean),clarifyTimeoutError:it.transitional(it.boolean),legacyInterceptorReqResOrdering:it.transitional(it.boolean),advertiseZstdAcceptEncoding:it.transitional(it.boolean),validateStatusUndefinedResolves:it.transitional(it.boolean)},!1),s!=null&&(S.isFunction(s)?n.paramsSerializer={serialize:s}:ga.assertOptions(s,{encode:it.function,serialize:it.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ga.assertOptions(n,{baseUrl:it.spelling("baseURL"),withXsrfToken:it.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&S.merge(i.common,i[n.method]);i&&S.forEach(["delete","get","head","post","put","patch","query","common"],E=>{delete i[E]}),n.headers=ut.concat(o,i);const a=[];let l=!0;this.interceptors.request.forEach(function(x){if(typeof x.runWhen=="function"&&x.runWhen(n)===!1)return;l=l&&x.synchronous;const _=n.transitional||Bd;_&&_.legacyInterceptorReqResOrdering?a.unshift(x.fulfilled,x.rejected):a.push(x.fulfilled,x.rejected)});const u=[];this.interceptors.response.forEach(function(x){u.push(x.fulfilled,x.rejected)});let c,d=0,m;if(!l){const E=[Zh.bind(this),void 0];for(E.unshift(...a),E.push(...u),m=E.length,c=Promise.resolve(n);d{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(a=>{r.subscribe(a),i=a}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},t(function(i,o,a){r.reason||(r.reason=new Oo(i,o,a),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 Ug(function(s){t=s}),cancel:t}}};function S1(e){return function(n){return e.apply(null,n)}}function E1(e){return S.isObject(e)&&e.isAxiosError===!0}const kc={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(kc).forEach(([e,t])=>{kc[t]=e});function zg(e){const t=new Wr(e),n=yg(Wr.prototype.request,t);return S.extend(n,Wr.prototype,t,{allOwnKeys:!0}),S.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return zg(ts(e,s))},n}const Le=zg(Ro);Le.Axios=Wr;Le.CanceledError=Oo;Le.CancelToken=_1;Le.isCancel=jg;Le.VERSION=Hd;Le.toFormData=Cl;Le.AxiosError=M;Le.Cancel=Le.CanceledError;Le.all=function(t){return Promise.all(t)};Le.spread=S1;Le.isAxiosError=E1;Le.mergeConfig=ts;Le.AxiosHeaders=ut;Le.formToJSON=e=>Ag(S.isHTMLForm(e)?new FormData(e):e);Le.getAdapter=Mg.getAdapter;Le.HttpStatusCode=kc;Le.default=Le;const{Axios:rk,AxiosError:sk,CanceledError:ik,isCancel:ok,CancelToken:ak,VERSION:lk,all:uk,Cancel:ck,isAxiosError:dk,spread:fk,toFormData:hk,AxiosHeaders:pk,HttpStatusCode:mk,formToJSON:yk,getAdapter:gk,mergeConfig:vk,create:wk}=Le,k1=`${window.location.protocol}//${window.location.hostname==="127.0.0.1"?"127.0.0.1":"localhost"}:3000/api/v1`,as=Le.create({baseURL:k1,withCredentials:!0});async function C1(e,t){return(await as.post("/auth/login",{username:e,password:t})).data.data}async function R1(){return(await as.get("/users")).data.data}async function O1(e){return(await as.get("/objectives",{params:{quarter:e}})).data.data}async function N1(e){return(await as.get(`/objectives/${e}`)).data.data}async function P1(e){return(await as.post("/objectives",e)).data.data}async function T1(e){return(await as.get(`/key-results/${e}`)).data.data}async function b1(e,t){return(await as.patch(`/key-results/${e}/progress`,t)).data.data}const Vg=P.createContext(void 0),A1=()=>{const e=window.localStorage.getItem("okr_user");return e===null?null:JSON.parse(e)};function j1({children:e}){const[t,n]=P.useState(A1),r=P.useMemo(()=>({user:t,login:async(s,i)=>{const o=await C1(s,i);window.localStorage.setItem("okr_user",JSON.stringify(o.user)),n(o.user)},logout:()=>{window.localStorage.removeItem("okr_user"),n(null)}}),[t]);return k.jsx(Vg.Provider,{value:r,children:e})}function Wd(){const e=P.useContext(Vg);if(e===void 0)throw new Error("useAuth must be used within AuthProvider");return e}function F1(){const{user:e,logout:t}=Wd();return k.jsx("header",{className:"fixed left-64 right-0 top-0 z-10 border-b border-gray-200 bg-white px-6 py-4",children:k.jsxs("div",{className:"flex items-center justify-between gap-4",children:[k.jsxs("div",{className:"flex flex-1 items-center gap-4",children:[k.jsx("select",{className:"rounded-lg border border-gray-300 bg-white px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",children:k.jsx("option",{children:"All FPT"})}),k.jsx("input",{className:"w-full max-w-xl rounded-lg border border-gray-300 px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Search"})]}),k.jsx(El,{to:"/objectives/new",children:k.jsx(Yr,{children:"NEW OKR"})}),k.jsx("div",{className:"text-sm text-gray-500",children:e==null?void 0:e.name}),k.jsx(Yr,{variant:"secondary",onClick:t,children:"Sign out"})]})})}const D1=[{label:"My OKRs",href:"/"},{label:"I created",href:"/"},{label:"I manage",href:"/"},{label:"Members",href:"/"},{label:"OKR - all",href:"/"}];function L1(){const e=hi();return k.jsxs("aside",{className:"fixed left-0 top-0 h-screen w-64 border-r border-gray-200 bg-white p-5",children:[k.jsx("div",{className:"mb-8 text-xl font-semibold text-blue-600",children:"FOKR"}),k.jsx("div",{className:"mb-4 text-sm font-medium text-gray-500",children:"2026"}),k.jsx("nav",{className:"space-y-1",children:D1.map(t=>{const n=e.pathname===t.href&&t.label==="My OKRs";return k.jsx(El,{to:t.href,className:`block rounded-lg px-3 py-2 text-sm transition-colors ${n?"bg-blue-50 font-medium text-blue-600":"text-gray-600 hover:bg-gray-50 hover:text-gray-800"}`,children:t.label},t.label)})})]})}function I1(){return k.jsxs("div",{className:"min-h-screen bg-gray-50",children:[k.jsx(L1,{}),k.jsx(F1,{}),k.jsx("main",{className:"ml-64 pt-20",children:k.jsx("div",{className:"mx-auto max-w-6xl px-6 py-6",children:k.jsx(mg,{})})})]})}var No=e=>e.type==="checkbox",Fr=e=>e instanceof Date,Xe=e=>e==null;const Bg=e=>typeof e=="object";var Ne=e=>!Xe(e)&&!Array.isArray(e)&&Bg(e)&&!Fr(e),M1=e=>Ne(e)&&e.target?No(e.target)?e.target.checked:e.target.value:e,U1=(e,t)=>t.split(".").some((n,r,s)=>!isNaN(Number(n))&&e.has(s.slice(0,r).join("."))),$g=e=>{const t=e.constructor&&e.constructor.prototype;return Ne(t)&&t.hasOwnProperty("isPrototypeOf")},Ol=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function je(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(Ol&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&!(Ne(e)&&$g(e)))return e;const r=n?[]:Object.create(Object.getPrototypeOf(e));for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=je(e[s]));return r}const fs={BLUR:"blur",FOCUS_OUT:"focusout",SUBMIT:"submit",TRIGGER:"trigger",VALID:"valid"},tn={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Gt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Hg="root",Qg=["__proto__","constructor","prototype"],z1=/^\w*$/;var Po=e=>z1.test(e),Ee=e=>e===void 0;const V1=/[.[\]'"]/;var Nl=e=>e.split(V1).filter(Boolean),H=(e,t,n)=>{if(!t||!Ne(e))return n;const r=Po(t)?[t]:Nl(t);if(r.some(i=>Qg.includes(i)))return n;const s=r.reduce((i,o)=>Xe(i)?void 0:i[o],e);return Ee(s)||s===e?Ee(e[t])?n:e[t]:s},un=e=>typeof e=="boolean",Vt=e=>typeof e=="function",Se=(e,t,n)=>{let r=-1;const s=Po(t)?[t]:Nl(t),i=s.length,o=i-1;for(;++r{const s={};for(const i in e)Object.defineProperty(s,i,{get:()=>{const o=i;return t._proxyFormState[o]!==tn.all&&(t._proxyFormState[o]=!r||tn.all),e[o]}});return s};const H1=Ol?We.useLayoutEffect:We.useEffect;var lt=e=>typeof e=="string",Q1=(e,t,n,r,s)=>lt(e)?(r&&t.watch.add(e),H(n,e,s)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),H(n,i))):(r&&(t.watchAll=!0),n),Cc=e=>Xe(e)||!Bg(e);const Gh=(e,t)=>t.length===0&&!Array.isArray(e)&&!$g(e);function cn(e,t,n=new WeakMap){if(e===t)return!0;if(Cc(e)||Cc(t))return Object.is(e,t);if(Fr(e)&&Fr(t))return Object.is(e.getTime(),t.getTime());const r=Object.keys(e),s=Object.keys(t);if(r.length!==s.length)return!1;if(Gh(e,r)||Gh(t,s))return Object.is(e,t);if(!r.length&&Array.isArray(e)!==Array.isArray(t))return!1;const i=n.get(e);if(i&&i.has(t))return!0;if(i)i.add(t);else{const o=new WeakSet;o.add(t),n.set(e,o)}for(const o of r){const a=e[o];if(!(o in t))return!1;if(o!=="ref"){const l=t[o];if(Fr(a)&&Fr(l)||(Ne(a)||Array.isArray(a))&&(Ne(l)||Array.isArray(l))?!cn(a,l,n):!Object.is(a,l))return!1}}return!0}const W1=We.createContext(null);W1.displayName="HookFormContext";var q1=(e,t,n,r,s)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:s||!0}}:{},Wg=e=>Array.isArray(e)?e.filter(Boolean):[],va=e=>Array.isArray(e)?e:[e],Jh=()=>{let e=[];return{get observers(){return e},next:s=>{for(const i of e)i.next&&i.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(i=>i!==s)}}),unsubscribe:()=>{e=[]}}};function qg(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const s=e[r],i=t[r];if(s&&Ne(s)&&i){const o=qg(s,i);Ne(o)&&(n[r]=o)}else e[r]&&(n[r]=i)}return n}var Ge=e=>Ne(e)&&!Object.keys(e).length,qd=e=>e.type==="file",Ka=e=>{if(!Ol)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Zg=e=>e.type==="select-multiple",Zd=e=>e.type==="radio",Z1=e=>Zd(e)||No(e),au=e=>Ka(e)&&e.isConnected;function K1(e,t){const n=t.slice(0,-1).length;let r=0;for(;r{for(const t in e)if(Vt(e[t]))return!0;return!1};function Kg(e){return Array.isArray(e)||Ne(e)&&!J1(e)}function Rc(e,t={}){for(const n in e){const r=e[n];Kg(r)?(t[n]=Array.isArray(r)?[]:{},Rc(r,t[n])):Ee(r)||(t[n]=!0)}return t}function Oc(e){if(e!==!1){if(e===!0)return!0;if(Array.isArray(e)){const t=e.map(n=>Oc(n));return t.some(n=>n!==void 0)?t:void 0}if(Ne(e)){const t={};for(const n in e){const r=Oc(e[n]);Ee(r)||(t[n]=r)}return Object.keys(t).length?t:void 0}}}function Nr(e,t,n){n||(n=Rc(t));for(const r in e){const s=e[r];if(Kg(s))Ee(t)||Cc(n[r])?n[r]=Rc(s,Array.isArray(s)?[]:{}):Nr(s,Xe(t)?{}:t[r],n[r]);else{const i=t[r];n[r]=!cn(s,i)}}return Oc(n)||{}}const Xh={value:!1,isValid:!1},Yh={value:!0,isValid:!0};var Gg=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Ee(e[0].attributes.value)?Ee(e[0].value)||e[0].value===""?Yh:{value:e[0].value,isValid:!0}:Yh:Xh}return Xh},Jg=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Ee(e)?e:t?e===""?NaN:e&&+e:n&<(e)?new Date(e):r?r(e):e;const ep={isValid:!1,value:null};var Xg=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,ep):ep;function tp(e){const t=e.ref;return qd(t)?t.files:Zd(t)?Xg(e.refs).value:Zg(t)?[...t.selectedOptions].map(({value:n})=>n):No(t)?Gg(e.refs).value:Jg(Ee(t.value)?e.ref.value:t.value,e)}var X1=(e,t,n,r)=>{const s={};for(const i of e){const o=H(t,i);o&&Se(s,i,o._f)}return{criteriaMode:n,names:[...e],fields:s,shouldUseNativeValidation:r}},Ga=e=>e instanceof RegExp,Oi=e=>Ee(e)?e:Ga(e)?e.source:Ne(e)?Ga(e.value)?e.value.source:e.value:e,ta=e=>({isOnSubmit:!e||e===tn.onSubmit,isOnBlur:e===tn.onBlur,isOnChange:e===tn.onChange,isOnAll:e===tn.all,isOnTouch:e===tn.onTouched});const np="AsyncFunction";var Y1=e=>{if(!e||!e.validate)return!1;if(Vt(e.validate))return e.validate.constructor.name===np;if(Ne(e.validate)){for(const t in e.validate)if(e.validate[t].constructor.name===np)return!0}return!1},eE=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),lu=(e,t,n)=>{if(n)return!1;if(t.watchAll||t.watch.has(e))return!0;for(const r of t.watch)if(e.startsWith(r)&&e.charAt(r.length)===".")return!0;return!1};const $i=(e,t,n,r)=>{for(const s of n||Object.keys(e)){const i=H(e,s);if(i){const{_f:o,...a}=i;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],s)&&!r)return!0;if(o.ref&&t(o.ref,o.name)&&!r)return!0;if($i(a,t))break}else if(Ne(a)&&$i(a,t))break}}};function rp(e,t,n){const r=H(e,n);if(r||Po(n))return{error:r,name:n};const s=n.split(".");for(;s.length;){const i=s.join("."),o=H(t,i),a=H(e,i);if(o&&!Array.isArray(o)&&n!==i)return{name:n};if(a&&a.type)return{name:i,error:a};if(a&&a.root&&a.root.type)return{name:`${i}.root`,error:a.root};s.pop()}return{name:n}}var tE=(e,t,n,r)=>{n(e);const{name:s,...i}=e,o=Object.keys(i);return!o.length||r&&o.length>=Object.keys(t).length||o.find(a=>t[a]===(!r||tn.all))},nE=(e,t,n)=>!e||!t||e===t||va(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),rE=(e,t,n,r,s)=>s.isOnAll?!1:!n&&s.isOnTouch?!(t||e):(n?r.isOnBlur:s.isOnBlur)?!e:(n?r.isOnChange:s.isOnChange)?e:!0,sE=(e,t)=>!Wg(H(e,t)).length&&Me(e,t),sp=(e,t,n)=>{const r=H(e,n),s=Array.isArray(r)?r:[];return Se(s,Hg,t[n]),Se(e,n,s),e};function ip(e,t,n="validate"){if(lt(e)||Array.isArray(e)&&e.every(lt)||un(e)&&!e)return{type:n,message:lt(e)?e:"",ref:t}}var hs=e=>Ne(e)&&!Ga(e)?e:{value:e,message:""},op=async(e,t,n,r,s,i)=>{const{ref:o,refs:a,required:l,maxLength:u,minLength:c,min:d,max:m,pattern:w,validate:E,name:x,valueAsNumber:_,mount:h}=e._f,f=H(n,x);if(!h||t.has(x))return{};const p=a?a[0]:o,v=Y=>{if(s&&p.reportValidity){const X=un(Y)?"":Y||"";a?a.forEach(oe=>oe.setCustomValidity(X)):p.setCustomValidity(X),p.reportValidity()}},O={},N=Zd(o),L=No(o),A=N||L,K=(_||qd(o))&&Ee(o.value)&&Ee(f)||Ka(o)&&o.value===""||f===""||Array.isArray(f)&&!f.length,B=q1.bind(null,x,r,O),ce=(Y,X,oe,ve=Gt.maxLength,xe=Gt.minLength)=>{const Ke=Y?X:oe;O[x]={type:Y?ve:xe,message:Ke,ref:o,...B(Y?ve:xe,Ke)}};if(i?!Array.isArray(f)||!f.length:l&&(!A&&(K||Xe(f))||un(f)&&!f||L&&!Gg(a).isValid||N&&!Xg(a).isValid)){const{value:Y,message:X}=lt(l)?{value:!!l,message:l}:hs(l);if(Y&&(O[x]={type:Gt.required,message:X,ref:p,...B(Gt.required,X)},!r))return v(X),O}if(!K&&(!Xe(d)||!Xe(m))){let Y,X;const oe=hs(m),ve=hs(d);if(!Xe(f)&&!isNaN(f)){const xe=o.valueAsNumber||f&&+f;Xe(oe.value)||(Y=xe>oe.value),Xe(ve.value)||(X=xenew Date(new Date().toDateString()+" "+J),I=o.type=="time",G=o.type=="week";lt(oe.value)&&f&&(Y=I?Ke(f)>Ke(oe.value):G?f>oe.value:xe>new Date(oe.value)),lt(ve.value)&&f&&(X=I?Ke(f)+Y.value,ve=!Xe(X.value)&&f.length<+X.value;if((oe||ve)&&(ce(oe,Y.message,X.message),!r))return v(O[x].message),O}if(w&&!K&<(f)){const{value:Y,message:X}=hs(w);if(Ga(Y)&&!f.match(Y)&&(O[x]={type:Gt.pattern,message:X,ref:o,...B(Gt.pattern,X)},!r))return v(X),O}if(E){if(Vt(E)){const Y=await E(f,n),X=ip(Y,p);if(X&&(O[x]={...X,...B(Gt.validate,X.message)},!r))return v(X.message),O}else if(Ne(E)){let Y={};for(const X in E){if(!Ge(Y)&&!r)break;const oe=ip(await E[X](f,n),p,X);oe&&(Y={...oe,...B(X,oe.message)},v(oe.message),r&&(O[x]=Y))}if(!Ge(Y)&&(O[x]={ref:p,...Y},!r))return O}}return v(!0),O};const iE={mode:tn.onSubmit,reValidateMode:tn.onChange,shouldFocusError:!0},uu="form",Yg={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};function oE(e={}){let t={...iE,...e},n={...je(Yg),isLoading:Vt(t.defaultValues),errors:t.errors||{},disabled:t.disabled||!1},r={},s=Ne(t.defaultValues)||Ne(t.values)?je(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:je(s),o={action:!1,mount:!1,watch:!1,keepIsValid:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set},l,u=0,c=0,d=ta(t.mode),m=ta(t.reValidateMode);const w={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},E={...w};let x={...E};const _={array:Jh(),state:Jh()},h=t.criteriaMode===tn.all,f=y=>C=>{clearTimeout(u),u=setTimeout(y,C)},p=async y=>{if(!o.keepIsValid&&!t.disabled&&(E.isValid||x.isValid||y)){let C;t.resolver?(C=Ge((await X()).errors),v()):C=await xe({fields:r,onlyCheckValid:!0,eventType:fs.VALID}),C!==n.isValid&&_.state.next({isValid:C})}},v=(y,C)=>{!t.disabled&&(E.isValidating||E.validatingFields||x.isValidating||x.validatingFields)&&((y||Array.from(a.mount)).forEach(R=>{R&&(C?Se(n.validatingFields,R,C):Me(n.validatingFields,R))}),_.state.next({validatingFields:n.validatingFields,isValidating:!Ge(n.validatingFields)}))},O=()=>{n.dirtyFields=Nr(s,i)},N=(y,C=[],R,T,F=!0,z=!0)=>{if(T&&R&&!t.disabled){if(o.action=!0,z&&Array.isArray(H(r,y))){const D=R(H(r,y),T.argA,T.argB);F&&Se(r,y,D)}if(z&&Array.isArray(H(n.errors,y))){const D=R(H(n.errors,y),T.argA,T.argB);F&&Se(n.errors,y,D),sE(n.errors,y)}if((E.touchedFields||x.touchedFields)&&z&&Array.isArray(H(n.touchedFields,y))){const D=R(H(n.touchedFields,y),T.argA,T.argB);F&&Se(n.touchedFields,y,D)}(E.dirtyFields||x.dirtyFields)&&O(),_.state.next({name:y,isDirty:I(y,C),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Se(i,y,C)},L=(y,C)=>{Se(n.errors,y,C),n.errors={...n.errors},_.state.next({errors:n.errors})},A=y=>{n.errors=y,_.state.next({errors:n.errors,isValid:!1})},K=y=>{const C=Po(y)?[y]:Nl(y);let R=i,T=s;for(let F=0;F{const F=H(r,y);if(F){if(K(y))return;const z=Ee(H(i,y)),D=H(i,y,Ee(R)?H(s,y):R);Ee(D)||T&&T.defaultChecked||C?Se(i,y,C?D:tp(F._f)):se(y,D),o.mount&&!o.action&&(p(),z&&n.isDirty&&(E.isDirty||x.isDirty)&&(I()||(n.isDirty=!1,_.state.next({...n}))),e.shouldUnregister&&z&&!Ee(H(i,y))&&lu(y,a)&&(o.watch=!0))}},ce=(y,C,R,T,F)=>{let z=!1,D=!1;const $={name:y};if(!t.disabled){if(!R||T){const te=cn(H(s,y),C);(E.isDirty||x.isDirty)&&(D=n.isDirty,n.isDirty=$.isDirty=!te||I(),z=D!==$.isDirty),D=!!H(n.dirtyFields,y),te!==n.isDirty?n.dirtyFields=Nr(s,i):te?Me(n.dirtyFields,y):Se(n.dirtyFields,y,!0),$.dirtyFields=n.dirtyFields,z=z||(E.dirtyFields||x.dirtyFields)&&D!==!te}if(R){const te=H(n.touchedFields,y);te||(Se(n.touchedFields,y,R),$.touchedFields=n.touchedFields,z=z||(E.touchedFields||x.touchedFields)&&te!==R)}z&&F&&_.state.next($)}return z?$:{}},Y=(y,C,R,T)=>{const F=H(n.errors,y),z=(E.isValid||x.isValid)&&un(C)&&n.isValid!==C;if(t.delayError&&R?(l=f(()=>L(y,R)),l(t.delayError)):(clearTimeout(u),l=null,R?Se(n.errors,y,R):Me(n.errors,y),n.errors={...n.errors}),(R?!cn(F,R):F)||!Ge(T)||z){const D={...T,...z&&un(C)?{isValid:C}:{},errors:n.errors,name:y};n={...n,...D},_.state.next(D)}},X=async y=>(v(y,!0),await t.resolver(i,t.context,X1(y||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),oe=async y=>{const{errors:C}=await X(y);if(v(y),y){for(const R of y){const T=H(C,R);T?a.array.has(R)&&Ne(T)&&!Object.keys(T).some(F=>!Number.isNaN(Number(F)))?sp(n.errors,{[R]:T},R):Se(n.errors,R,T):Me(n.errors,R)}n.errors={...n.errors}}else n.errors=C;return C},ve=async({name:y,eventType:C})=>{if(e.validate){const R=await e.validate({formValues:i,formState:n,name:y,eventType:C});if(Ne(R))for(const T in R){const F=R[T];F&&vt(`${uu}.${T}`,{message:lt(F.message)?F.message:"",type:F.type||Gt.validate})}else lt(R)||!R?vt(uu,{message:R||"",type:Gt.validate}):yi(uu);return R}return!0},xe=async({fields:y,onlyCheckValid:C,name:R,eventType:T,context:F={valid:!0,runRootValidation:!1}})=>{if(e.validate&&(F.runRootValidation=!0,!await ve({name:R,eventType:T})&&(F.valid=!1,C)))return F.valid;for(const z in y){const D=y[z];if(D){const{_f:$,...te}=D;if($){const Ce=a.array.has($.name),Ot=D._f&&Y1(D._f),us=E.validatingFields||E.isValidating||x.validatingFields||x.isValidating;Ot&&us&&v([$.name],!0);const wn=await op(D,a.disabled,i,h,t.shouldUseNativeValidation&&!C,Ce);if(Ot&&us&&v([$.name]),wn[$.name]&&(F.valid=!1,C)||(!C&&(H(wn,$.name)?Ce?sp(n.errors,wn,$.name):Se(n.errors,$.name,wn[$.name]):Me(n.errors,$.name)),e.shouldUseNativeValidation&&wn[$.name]))break}!Ge(te)&&await xe({context:F,onlyCheckValid:C,fields:te,name:z,eventType:T})}}return F.valid},Ke=()=>{for(const y of a.unMount){const C=H(r,y);C&&(C._f.refs?C._f.refs.every(R=>!au(R)):!au(C._f.ref))&&ee(y)}a.unMount=new Set},I=(y,C)=>!t.disabled&&(y&&C&&Se(i,y,C),!cn(o.mount?i:s,s)),G=(y,C,R)=>Q1(y,a,{...o.mount?i:Ee(C)?s:lt(y)?{[y]:C}:C},R,C),J=y=>Wg(H(o.mount?i:s,y,t.shouldUnregister?H(s,y,[]):[])),se=(y,C,R={},T=!1,F=!1)=>{const z=H(r,y);let D=C;if(z){const $=z._f;$&&(!$.disabled&&Se(i,y,Jg(C,$)),D=Ka($.ref)&&Xe(C)?"":C,Zg($.ref)?[...$.ref.options].forEach(te=>te.selected=D.includes(te.value)):$.refs?No($.ref)?$.refs.forEach(te=>{(!te.defaultChecked||!te.disabled)&&(Array.isArray(D)?te.checked=!!D.find(Ce=>Ce===te.value):te.checked=D===te.value||!!D)}):$.refs.forEach(te=>te.checked=te.value===D):qd($.ref)?$.ref.value="":($.ref.value=D,!$.ref.type&&!F&&_.state.next({name:y,values:T?i:je(i)})))}(R.shouldDirty||R.shouldTouch)&&ce(y,D,R.shouldTouch,R.shouldDirty,!F),R.shouldValidate&&zn(y)},ye=(y,C,R,T=!1,F=!1)=>{for(const z in C){if(!C.hasOwnProperty(z))return;const D=C[z],$=y+"."+z,te=H(r,$);(a.array.has(y)||Ne(D)||te&&!te._f)&&!Fr(D)?ye($,D,R,T,F):se($,D,R,T,F)}},gt=(y,C,R,T,F=!1)=>{const z=H(r,y),D=a.array.has(y),$=T?C:je(C),te=H(i,y),Ce=cn(te,$);if(Ce||Se(i,y,$),D)_.array.next({name:y,values:T?i:je(i)}),(E.isDirty||E.dirtyFields||x.isDirty||x.dirtyFields)&&R.shouldDirty&&(O(),F||_.state.next({name:y,dirtyFields:n.dirtyFields,isDirty:I(y,$)}));else{const Ot=Array.isArray($)&&!$.length||Ge($);!z||z._f||Xe($)||Ot?se(y,$,R,T,F):ye(y,$,R,T,F)}if(!Ce&&!F){const Ot=lu(y,a),us=T?i:je(i);_.state.next({...Ot&&n,name:o.mount||Ot?y:void 0,values:us})}},Ve=(y,C,R={})=>gt(y,C,R,!1),Un=(y,C={})=>{const R=Vt(y)?y(i):y;if(!cn(i,R)){i={...i,...R};for(const T of a.mount)gt(T,H(R,T),C,!0,!0);_.state.next({...n,name:void 0,type:void 0,...c?{values:i}:{}}),C.shouldValidate&&p()}},ae=async y=>{o.mount=!0;const C=y.target;let R=C.name,T=!0;const F=H(r,R),z=D=>{T=Number.isNaN(D)||Fr(D)&&isNaN(D.getTime())||cn(D,H(i,R,D))};if(F){let D,$;const te=C.type?tp(F._f):M1(y),Ce=y.type===fs.BLUR||y.type===fs.FOCUS_OUT,Ot=!eE(F._f)&&!e.validate&&!t.resolver&&!H(n.errors,R)&&!F._f.deps,us=Ot||rE(Ce,H(n.touchedFields,R),n.isSubmitted,m,d),wn=lu(R,a,Ce);Se(i,R,te),Ce?(!C||!C.readOnly)&&(F._f.onBlur&&F._f.onBlur(y),l&&l(0)):F._f.onChange&&F._f.onChange(y);const gi=ce(R,te,Ce),av=!Ge(gi)||wn;if(!Ce&&_.state.next({name:R,type:y.type,...c?{values:je(i)}:{}}),us)return(!Ot||!n.isValid)&&(E.isValid||x.isValid)&&(t.mode==="onBlur"?Ce&&p():Ce||p()),av&&_.state.next({name:R,...wn?{}:gi});if(!t.resolver&&e.validate&&await ve({name:R,eventType:y.type}),!Ce&&wn&&_.state.next({...n}),t.resolver){const{errors:tf}=await X([R]);if(v([R]),z(te),!T){!Ge(gi)&&_.state.next(gi);return}const lv=rp(n.errors,r,R),nf=rp(tf,r,lv.name||R);D=nf.error,R=nf.name,$=Ge(tf)}else v([R],!0),D=(await op(F,a.disabled,i,h,t.shouldUseNativeValidation))[R],v([R]),z(te),T&&(D?$=!1:(E.isValid||x.isValid)&&($=await xe({fields:r,onlyCheckValid:!0,name:R,eventType:y.type})));T&&(F._f.deps&&(!Array.isArray(F._f.deps)||F._f.deps.length>0)&&zn(F._f.deps),Y(R,$,D,gi))}},Ie=(y,C)=>{if(H(n.errors,C)&&y.focus)return y.focus(),1},zn=async(y,C={})=>{let R,T;const F=va(y);if(t.resolver){const z=await oe(Ee(y)?y:F);R=Ge(z),T=y?!F.some(D=>H(z,D)):R}else y?(T=(await Promise.all(F.map(async z=>{const D=H(r,z);return await xe({fields:D&&D._f?{[z]:D}:D,eventType:fs.TRIGGER})}))).every(Boolean),!(!T&&!n.isValid)&&p()):T=R=await xe({fields:r,name:y,eventType:fs.TRIGGER});return _.state.next({...!lt(y)||(E.isValid||x.isValid)&&R!==n.isValid?{}:{name:y},...t.resolver||!y?{isValid:R}:{},errors:n.errors}),C.shouldFocus&&!T&&$i(r,Ie,y?F:a.mount),T},To=(y,C)=>{let R={...o.mount?i:s};return C&&(R=qg(C.dirtyFields?n.dirtyFields:n.touchedFields,R)),Ee(y)?R:lt(y)?H(R,y):y.map(T=>H(R,T))},bo=(y,C)=>({invalid:!!H((C||n).errors,y),isDirty:!!H((C||n).dirtyFields,y),error:H((C||n).errors,y),isValidating:!!H(n.validatingFields,y),isTouched:!!H((C||n).touchedFields,y)}),yi=y=>{const C=y?va(y):void 0;C==null||C.forEach(R=>Me(n.errors,R)),C?C.forEach(R=>{_.state.next({name:R,errors:n.errors})}):_.state.next({errors:{}})},vt=(y,C,R)=>{const T=(H(r,y,{_f:{}})._f||{}).ref,F=H(n.errors,y)||{},{ref:z,message:D,type:$,...te}=F;Se(n.errors,y,{...te,...C,ref:T}),_.state.next({name:y,errors:n.errors,isValid:!1}),R&&R.shouldFocus&&T&&T.focus&&T.focus()},Ao=(y,C)=>{if(Vt(y)){c++;const{unsubscribe:R}=_.state.subscribe({next:F=>"values"in F&&y(F.values||G(void 0,C),F)});let T=!1;return{unsubscribe:()=>{T||(T=!0,c--,R())}}}return G(y,C,!0)},ls=y=>{var C;const R=!!(!((C=y.formState)===null||C===void 0)&&C.values);R&&c++;const{unsubscribe:T}=_.state.subscribe({next:z=>{if(nE(y.name,z.name,y.exact)&&tE(z,y.formState||E,ov,y.reRenderRoot)){const D={...i};y.callback({values:D,...n,...z,defaultValues:s})}}});if(!R)return T;let F=!1;return()=>{F||(F=!0,c--,T())}},qt=y=>(o.mount=!0,x={...x,...y.formState},ls({...y,formState:{...w,...y.formState}})),ee=(y,C={})=>{for(const R of y?va(y):a.mount)a.mount.delete(R),a.array.delete(R),C.keepValue||(Me(r,R),Me(i,R)),!C.keepError&&Me(n.errors,R),!C.keepDirty&&Me(n.dirtyFields,R),!C.keepTouched&&Me(n.touchedFields,R),!C.keepIsValidating&&Me(n.validatingFields,R),!t.shouldUnregister&&!C.keepDefaultValue&&Me(s,R);_.state.next({values:je(i)}),_.state.next({...n,...C.keepDirty?{isDirty:I()}:{}}),!C.keepIsValid&&p()},nt=({disabled:y,name:C})=>{if(un(y)&&o.mount||y||a.disabled.has(C)){const F=a.disabled.has(C)!==!!y;y?a.disabled.add(C):a.disabled.delete(C),F&&o.mount&&!o.action&&p()}},It=(y,C={})=>{let R=H(r,y);const T=un(C.disabled)||un(t.disabled),F=!a.registerName.has(y)&&R&&R._f&&!R._f.mount;return Se(r,y,{...R||{},_f:{...R&&R._f?R._f:{ref:{name:y}},name:y,mount:!0,...C}}),a.mount.add(y),R&&!F?nt({disabled:un(C.disabled)?C.disabled:t.disabled,name:y}):B(y,!0,C.value),{...T?{disabled:C.disabled||t.disabled}:{},...t.progressive?{required:!!C.required,min:Oi(C.min),max:Oi(C.max),minLength:Oi(C.minLength),maxLength:Oi(C.maxLength),pattern:Oi(C.pattern)}:{},name:y,onChange:ae,onBlur:ae,ref:z=>{if(z){a.registerName.add(y),It(y,C),a.registerName.delete(y),R=H(r,y);const D=Ee(z.value)&&z.querySelectorAll&&z.querySelectorAll("input,select,textarea")[0]||z,$=Z1(D),te=R._f.refs||[];if($?te.find(Ce=>Ce===D):D===R._f.ref)return;Se(r,y,{_f:{...R._f,...$?{refs:[...te.filter(au),D,...Array.isArray(H(s,y))?[{}]:[]],ref:{type:D.type,name:y}}:{ref:D}}}),B(y,!1,void 0,D)}else R=H(r,y,{}),R._f&&(R._f.mount=!1),(t.shouldUnregister||C.shouldUnregister)&&!(U1(a.array,y)&&o.action)&&a.unMount.add(y)}}},Zt=()=>t.shouldFocusError&&!t.shouldUseNativeValidation&&$i(r,Ie,a.mount),jo=y=>{un(y)&&(_.state.next({disabled:y}),$i(r,(C,R)=>{const T=H(r,R);T&&(C.disabled=T._f.disabled||y,Array.isArray(T._f.refs)&&T._f.refs.forEach(F=>{F.disabled=T._f.disabled||y}))},0,!1))},Fo=(y,C)=>async R=>{let T;R&&(R.preventDefault&&R.preventDefault(),R.persist&&R.persist());let F=je(i);if(_.state.next({isSubmitting:!0}),t.resolver){const{errors:z,values:D}=await X();v(),n.errors=z,F=je(D)}else await xe({fields:r,eventType:fs.SUBMIT});if(a.disabled.size)for(const z of a.disabled)Me(F,z);if(Me(n.errors,Hg),Ge(n.errors)){_.state.next({errors:{}});try{await y(F,R)}catch(z){T=z}}else C&&await C({...n.errors},R),Zt(),setTimeout(Zt);if(_.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Ge(n.errors)&&!T,submitCount:n.submitCount+1,errors:n.errors}),T)throw T},Cr=(y,C={})=>{H(r,y)&&(Ee(C.defaultValue)?Ve(y,je(H(s,y))):(Ve(y,C.defaultValue),Se(s,y,je(C.defaultValue))),C.keepTouched||Me(n.touchedFields,y),C.keepDirty||(Me(n.dirtyFields,y),n.isDirty=C.defaultValue?I(y,je(H(s,y))):I()),C.keepError||(Me(n.errors,y),E.isValid&&p()),_.state.next({...n}))},Xd=(y,C={})=>{const R=y?je(y):s,T=je(R),F=Ge(y),z=T;if(C.keepDefaultValues||(s=R),!C.keepValues){if(C.keepDirtyValues){const D=new Set([...a.mount,...Object.keys(Nr(s,i))]);for(const $ of Array.from(D)){const te=H(n.dirtyFields,$),Ce=H(i,$),Ot=H(z,$);te&&!Ee(Ce)?Se(z,$,Ce):!te&&!Ee(Ot)&&Ve($,Ot)}}else{if(Ol&&Ee(y))for(const D of a.mount){const $=H(r,D);if($&&$._f){const te=Array.isArray($._f.refs)?$._f.refs[0]:$._f.ref;if(Ka(te)){const Ce=te.closest("form");if(Ce){Ce.reset();break}}}}if(C.keepFieldsRef)for(const D of a.mount)Ve(D,H(z,D));else r={}}if(t.shouldUnregister){if(i=C.keepDefaultValues?je(s):{},C.keepFieldsRef)for(const D of a.mount)Se(i,D,H(z,D))}else i=je(z);_.array.next({values:{...z}}),_.state.next({values:{...z}})}a={mount:C.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!E.isValid||!!C.keepIsValid||!!C.keepDirtyValues||!t.shouldUnregister&&!Ge(z),o.watch=!!t.shouldUnregister,o.keepIsValid=!!C.keepIsValid,o.action=!1,C.keepErrors||(n.errors={}),_.state.next({submitCount:C.keepSubmitCount?n.submitCount:0,isDirty:F?!1:C.keepDirty?n.isDirty:C.keepValues?I():!!(C.keepDefaultValues&&!cn(y,s)),isSubmitted:C.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:F?{}:C.keepDirtyValues?C.keepDefaultValues&&i?Nr(s,i):n.dirtyFields:C.keepDefaultValues&&y?Nr(s,y):C.keepDirty?n.dirtyFields:{},touchedFields:C.keepTouched?n.touchedFields:{},errors:C.keepErrors?n.errors:{},isSubmitSuccessful:C.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:s})},Yd=(y,C)=>Xd(Vt(y)?y(i):y,{...t.resetOptions,...C}),iv=(y,C={})=>{const R=H(r,y),T=R&&R._f;if(T){const F=T.refs?T.refs[0]:T.ref;F.focus&&setTimeout(()=>{F.focus(),C.shouldSelect&&Vt(F.select)&&F.select()})}},ov=y=>{n={...n,...y}},ef={control:{register:It,unregister:ee,getFieldState:bo,handleSubmit:Fo,setError:vt,_subscribe:ls,_runSchema:X,_updateIsValidating:v,_focusError:Zt,_getWatch:G,_getDirty:I,_setValid:p,_setFieldArray:N,_setDisabledField:nt,_setErrors:A,_getFieldArray:J,_reset:Xd,_resetDefaultValues:()=>Vt(t.defaultValues)&&t.defaultValues().then(y=>{Yd(y,t.resetOptions),_.state.next({isLoading:!1})}),_removeUnmounted:Ke,_disableForm:jo,_subjects:_,_proxyFormState:E,get _fields(){return r},get _formValues(){return i},get _state(){return o},set _state(y){o=y},get _defaultValues(){return s},get _names(){return a},set _names(y){a=y},get _formState(){return n},get _options(){return t},set _options(y){t={...t,...y},d=ta(t.mode),m=ta(t.reValidateMode)}},subscribe:qt,trigger:zn,register:It,handleSubmit:Fo,watch:Ao,setValue:Ve,setValues:Un,getValues:To,reset:Yd,resetField:Cr,resetDefaultValues:(y,C={})=>{if(s=je(y),!C.keepDirty){const R=Nr(s,i);n.dirtyFields=R,n.isDirty=!Ge(R)}C.keepIsValid||p(),_.state.next({...n,defaultValues:s})},clearErrors:yi,unregister:ee,setError:vt,setFocus:iv,getFieldState:bo};return{...ef,formControl:ef}}function Kd(e={}){const t=We.useRef(void 0),n=We.useRef(void 0),r=We.useRef(e.formControl),[s,i]=We.useState(()=>({...je(Yg),isLoading:Vt(e.defaultValues),errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Vt(e.defaultValues)?void 0:e.defaultValues}));if(!t.current||e.formControl&&r.current!==e.formControl)if(r.current=e.formControl,e.formControl)t.current={...e.formControl,formState:s},e.defaultValues&&!Vt(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:a,...l}=oE(e);t.current={...l,formState:s}}const o=t.current.control;return o._options=e,H1(()=>{const a=o._subscribe({formState:o._proxyFormState,callback:()=>i({...o._formState,defaultValues:o._defaultValues}),reRenderRoot:!0});return i(l=>({...l,isReady:!0})),o._formState.isReady=!0,a},[o]),We.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),We.useEffect(()=>{e.mode&&(o._options.mode=e.mode),e.reValidateMode&&(o._options.reValidateMode=e.reValidateMode)},[o,e.mode,e.reValidateMode]),We.useEffect(()=>{e.errors&&(o._setErrors(e.errors),o._focusError())},[o,e.errors]),We.useEffect(()=>{e.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})},[o,e.shouldUnregister]),We.useEffect(()=>{if(o._proxyFormState.isDirty){const a=o._getDirty();a!==s.isDirty&&o._subjects.state.next({isDirty:a})}},[o,s.isDirty]),We.useEffect(()=>{var a;e.values&&!cn(e.values,n.current)?(o._reset(e.values,{keepFieldsRef:!0,...o._options.resetOptions}),!((a=o._options.resetOptions)===null||a===void 0)&&a.keepIsValid||o._setValid(),n.current=e.values,i(l=>({...l}))):o._resetDefaultValues()},[o,e.values]),We.useEffect(()=>{o._state.mount||(o._setValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),t.current.formState=We.useMemo(()=>$1(s,o),[o,s]),t.current}var pe;(function(e){e.assertEqual=s=>{};function t(s){}e.assertIs=t;function n(s){throw new Error}e.assertNever=n,e.arrayToEnum=s=>{const i={};for(const o of s)i[o]=o;return i},e.getValidEnumValues=s=>{const i=e.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),o={};for(const a of i)o[a]=s[a];return e.objectValues(o)},e.objectValues=s=>e.objectKeys(s).map(function(i){return s[i]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const i=[];for(const o in s)Object.prototype.hasOwnProperty.call(s,o)&&i.push(o);return i},e.find=(s,i)=>{for(const o of s)if(i(o))return o},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,i=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(pe||(pe={}));var ap;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(ap||(ap={}));const W=pe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Qn=e=>{switch(typeof e){case"undefined":return W.undefined;case"string":return W.string;case"number":return Number.isNaN(e)?W.nan:W.number;case"boolean":return W.boolean;case"function":return W.function;case"bigint":return W.bigint;case"symbol":return W.symbol;case"object":return Array.isArray(e)?W.array:e===null?W.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?W.promise:typeof Map<"u"&&e instanceof Map?W.map:typeof Set<"u"&&e instanceof Set?W.set:typeof Date<"u"&&e instanceof Date?W.date:W.object;default:return W.unknown}},j=pe.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class In extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(i){return i.message},r={_errors:[]},s=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let a=r,l=0;for(;ln.message){const n={},r=[];for(const s of this.issues)if(s.path.length>0){const i=s.path[0];n[i]=n[i]||[],n[i].push(t(s))}else r.push(t(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}In.create=e=>new In(e);const Nc=(e,t)=>{let n;switch(e.code){case j.invalid_type:e.received===W.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case j.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,pe.jsonStringifyReplacer)}`;break;case j.unrecognized_keys:n=`Unrecognized key(s) in object: ${pe.joinValues(e.keys,", ")}`;break;case j.invalid_union:n="Invalid input";break;case j.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${pe.joinValues(e.options)}`;break;case j.invalid_enum_value:n=`Invalid enum value. Expected ${pe.joinValues(e.options)}, received '${e.received}'`;break;case j.invalid_arguments:n="Invalid function arguments";break;case j.invalid_return_type:n="Invalid function return type";break;case j.invalid_date:n="Invalid date";break;case j.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:pe.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case j.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case j.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case j.custom:n="Invalid input";break;case j.invalid_intersection_types:n="Intersection results could not be merged";break;case j.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case j.not_finite:n="Number must be finite";break;default:n=t.defaultError,pe.assertNever(e)}return{message:n}};let aE=Nc;function lE(){return aE}const uE=e=>{const{data:t,path:n,errorMaps:r,issueData:s}=e,i=[...n,...s.path||[]],o={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let a="";const l=r.filter(u=>!!u).slice().reverse();for(const u of l)a=u(o,{data:t,defaultError:a}).message;return{...s,path:i,message:a}};function V(e,t){const n=lE(),r=uE({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Nc?void 0:Nc].filter(s=>!!s)});e.common.issues.push(r)}class Ft{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const s of n){if(s.status==="aborted")return ne;s.status==="dirty"&&t.dirty(),r.push(s.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const s of n){const i=await s.key,o=await s.value;r.push({key:i,value:o})}return Ft.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const s of n){const{key:i,value:o}=s;if(i.status==="aborted"||o.status==="aborted")return ne;i.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(r[i.value]=o.value)}return{status:t.value,value:r}}}const ne=Object.freeze({status:"aborted"}),ji=e=>({status:"dirty",value:e}),Wt=e=>({status:"valid",value:e}),lp=e=>e.status==="aborted",up=e=>e.status==="dirty",ni=e=>e.status==="valid",Ja=e=>typeof Promise<"u"&&e instanceof Promise;var q;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(q||(q={}));class wr{constructor(t,n,r,s){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const cp=(e,t)=>{if(ni(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new In(e.common.issues);return this._error=n,this._error}}};function le(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:s}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(o,a)=>{const{message:l}=e;return o.code==="invalid_enum_value"?{message:l??a.defaultError}:typeof a.data>"u"?{message:l??r??a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:l??n??a.defaultError}},description:s}}class he{get description(){return this._def.description}_getType(t){return Qn(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Qn(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Ft,ctx:{common:t.parent.common,data:t.data,parsedType:Qn(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Ja(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Qn(t)},s=this._parseSync({data:t,path:r.path,parent:r});return cp(r,s)}"~validate"(t){var r,s;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Qn(t)};if(!this["~standard"].async)try{const i=this._parseSync({data:t,path:[],parent:n});return ni(i)?{value:i.value}:{issues:n.common.issues}}catch(i){(s=(r=i==null?void 0:i.message)==null?void 0:r.toLowerCase())!=null&&s.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(i=>ni(i)?{value:i.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Qn(t)},s=this._parse({data:t,path:r.path,parent:r}),i=await(Ja(s)?s:Promise.resolve(s));return cp(r,i)}refine(t,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,i)=>{const o=t(s),a=()=>i.addIssue({code:j.custom,...r(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,s)=>t(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(t){return new ii({schema:this,typeName:re.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return yr.create(this,this._def)}nullable(){return oi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return gn.create(this)}promise(){return tl.create(this,this._def)}or(t){return Ya.create([this,t],this._def)}and(t){return el.create(this,t,this._def)}transform(t){return new ii({...le(this._def),schema:this,typeName:re.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Tc({...le(this._def),innerType:this,defaultValue:n,typeName:re.ZodDefault})}brand(){return new AE({typeName:re.ZodBranded,type:this,...le(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new bc({...le(this._def),innerType:this,catchValue:n,typeName:re.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Gd.create(this,t)}readonly(){return Ac.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const cE=/^c[^\s-]{8,}$/i,dE=/^[0-9a-z]+$/,fE=/^[0-9A-HJKMNP-TV-Z]{26}$/i,hE=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,pE=/^[a-z0-9_-]{21}$/i,mE=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,yE=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,gE=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,vE="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let cu;const wE=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,xE=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,_E=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,SE=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,EE=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,kE=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ev="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",CE=new RegExp(`^${ev}$`);function tv(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function RE(e){return new RegExp(`^${tv(e)}$`)}function OE(e){let t=`${ev}T${tv(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function NE(e,t){return!!((t==="v4"||!t)&&wE.test(e)||(t==="v6"||!t)&&_E.test(e))}function PE(e,t){if(!mE.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),s=JSON.parse(atob(r));return!(typeof s!="object"||s===null||"typ"in s&&(s==null?void 0:s.typ)!=="JWT"||!s.alg||t&&s.alg!==t)}catch{return!1}}function TE(e,t){return!!((t==="v4"||!t)&&xE.test(e)||(t==="v6"||!t)&&SE.test(e))}class Tn extends he{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==W.string){const i=this._getOrReturnCtx(t);return V(i,{code:j.invalid_type,expected:W.string,received:i.parsedType}),ne}const r=new Ft;let s;for(const i of this._def.checks)if(i.kind==="min")t.data.lengthi.value&&(s=this._getOrReturnCtx(t,s),V(s,{code:j.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const o=t.data.length>i.value,a=t.data.lengtht.test(s),{validation:n,code:j.invalid_string,...q.errToObj(r)})}_addCheck(t){return new Tn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...q.errToObj(t)})}url(t){return this._addCheck({kind:"url",...q.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...q.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...q.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...q.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...q.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...q.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...q.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...q.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...q.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...q.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...q.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...q.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...q.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...q.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...q.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...q.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...q.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...q.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...q.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...q.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...q.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...q.errToObj(n)})}nonempty(t){return this.min(1,q.errToObj(t))}trim(){return new Tn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Tn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Tn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuenew Tn({checks:[],typeName:re.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...le(e)});function bE(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,s=n>r?n:r,i=Number.parseInt(e.toFixed(s).replace(".","")),o=Number.parseInt(t.toFixed(s).replace(".",""));return i%o/10**s}class ns extends he{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==W.number){const i=this._getOrReturnCtx(t);return V(i,{code:j.invalid_type,expected:W.number,received:i.parsedType}),ne}let r;const s=new Ft;for(const i of this._def.checks)i.kind==="int"?pe.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),V(r,{code:j.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?t.datai.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),V(r,{code:j.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?bE(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),V(r,{code:j.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),V(r,{code:j.not_finite,message:i.message}),s.dirty()):pe.assertNever(i);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,q.toString(n))}gt(t,n){return this.setLimit("min",t,!1,q.toString(n))}lte(t,n){return this.setLimit("max",t,!0,q.toString(n))}lt(t,n){return this.setLimit("max",t,!1,q.toString(n))}setLimit(t,n,r,s){return new ns({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:q.toString(s)}]})}_addCheck(t){return new ns({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:q.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:q.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:q.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:q.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:q.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:q.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:q.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:q.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:q.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuet.kind==="int"||t.kind==="multipleOf"&&pe.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.valuenew ns({checks:[],typeName:re.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...le(e)});class rs extends he{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==W.bigint)return this._getInvalidInput(t);let r;const s=new Ft;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.datai.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),V(r,{code:j.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),V(r,{code:j.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):pe.assertNever(i);return{status:s.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return V(n,{code:j.invalid_type,expected:W.bigint,received:n.parsedType}),ne}gte(t,n){return this.setLimit("min",t,!0,q.toString(n))}gt(t,n){return this.setLimit("min",t,!1,q.toString(n))}lte(t,n){return this.setLimit("max",t,!0,q.toString(n))}lt(t,n){return this.setLimit("max",t,!1,q.toString(n))}setLimit(t,n,r,s){return new rs({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:q.toString(s)}]})}_addCheck(t){return new rs({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:q.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:q.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:q.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:q.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:q.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuenew rs({checks:[],typeName:re.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...le(e)});class Xa extends he{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==W.boolean){const r=this._getOrReturnCtx(t);return V(r,{code:j.invalid_type,expected:W.boolean,received:r.parsedType}),ne}return Wt(t.data)}}Xa.create=e=>new Xa({typeName:re.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...le(e)});class ri extends he{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==W.date){const i=this._getOrReturnCtx(t);return V(i,{code:j.invalid_type,expected:W.date,received:i.parsedType}),ne}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return V(i,{code:j.invalid_date}),ne}const r=new Ft;let s;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()i.value&&(s=this._getOrReturnCtx(t,s),V(s,{code:j.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):pe.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new ri({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:q.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:q.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuenew ri({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:re.ZodDate,...le(e)});class dp extends he{_parse(t){if(this._getType(t)!==W.symbol){const r=this._getOrReturnCtx(t);return V(r,{code:j.invalid_type,expected:W.symbol,received:r.parsedType}),ne}return Wt(t.data)}}dp.create=e=>new dp({typeName:re.ZodSymbol,...le(e)});class fp extends he{_parse(t){if(this._getType(t)!==W.undefined){const r=this._getOrReturnCtx(t);return V(r,{code:j.invalid_type,expected:W.undefined,received:r.parsedType}),ne}return Wt(t.data)}}fp.create=e=>new fp({typeName:re.ZodUndefined,...le(e)});class hp extends he{_parse(t){if(this._getType(t)!==W.null){const r=this._getOrReturnCtx(t);return V(r,{code:j.invalid_type,expected:W.null,received:r.parsedType}),ne}return Wt(t.data)}}hp.create=e=>new hp({typeName:re.ZodNull,...le(e)});class pp extends he{constructor(){super(...arguments),this._any=!0}_parse(t){return Wt(t.data)}}pp.create=e=>new pp({typeName:re.ZodAny,...le(e)});class mp extends he{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Wt(t.data)}}mp.create=e=>new mp({typeName:re.ZodUnknown,...le(e)});class xr extends he{_parse(t){const n=this._getOrReturnCtx(t);return V(n,{code:j.invalid_type,expected:W.never,received:n.parsedType}),ne}}xr.create=e=>new xr({typeName:re.ZodNever,...le(e)});class yp extends he{_parse(t){if(this._getType(t)!==W.undefined){const r=this._getOrReturnCtx(t);return V(r,{code:j.invalid_type,expected:W.void,received:r.parsedType}),ne}return Wt(t.data)}}yp.create=e=>new yp({typeName:re.ZodVoid,...le(e)});class gn extends he{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),s=this._def;if(n.parsedType!==W.array)return V(n,{code:j.invalid_type,expected:W.array,received:n.parsedType}),ne;if(s.exactLength!==null){const o=n.data.length>s.exactLength.value,a=n.data.lengths.maxLength.value&&(V(n,{code:j.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,a)=>s.type._parseAsync(new wr(n,o,n.path,a)))).then(o=>Ft.mergeArray(r,o));const i=[...n.data].map((o,a)=>s.type._parseSync(new wr(n,o,n.path,a)));return Ft.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new gn({...this._def,minLength:{value:t,message:q.toString(n)}})}max(t,n){return new gn({...this._def,maxLength:{value:t,message:q.toString(n)}})}length(t,n){return new gn({...this._def,exactLength:{value:t,message:q.toString(n)}})}nonempty(t){return this.min(1,t)}}gn.create=(e,t)=>new gn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:re.ZodArray,...le(t)});function ps(e){if(e instanceof Ue){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=yr.create(ps(r))}return new Ue({...e._def,shape:()=>t})}else return e instanceof gn?new gn({...e._def,type:ps(e.element)}):e instanceof yr?yr.create(ps(e.unwrap())):e instanceof oi?oi.create(ps(e.unwrap())):e instanceof ss?ss.create(e.items.map(t=>ps(t))):e}class Ue extends he{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=pe.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==W.object){const u=this._getOrReturnCtx(t);return V(u,{code:j.invalid_type,expected:W.object,received:u.parsedType}),ne}const{status:r,ctx:s}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof xr&&this._def.unknownKeys==="strip"))for(const u in s.data)o.includes(u)||a.push(u);const l=[];for(const u of o){const c=i[u],d=s.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new wr(s,d,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof xr){const u=this._def.unknownKeys;if(u==="passthrough")for(const c of a)l.push({key:{status:"valid",value:c},value:{status:"valid",value:s.data[c]}});else if(u==="strict")a.length>0&&(V(s,{code:j.unrecognized_keys,keys:a}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const c of a){const d=s.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new wr(s,d,s.path,c)),alwaysSet:c in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const u=[];for(const c of l){const d=await c.key,m=await c.value;u.push({key:d,value:m,alwaysSet:c.alwaysSet})}return u}).then(u=>Ft.mergeObjectSync(r,u)):Ft.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return q.errToObj,new Ue({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,o;const s=((o=(i=this._def).errorMap)==null?void 0:o.call(i,n,r).message)??r.defaultError;return n.code==="unrecognized_keys"?{message:q.errToObj(t).message??s}:{message:s}}}:{}})}strip(){return new Ue({...this._def,unknownKeys:"strip"})}passthrough(){return new Ue({...this._def,unknownKeys:"passthrough"})}extend(t){return new Ue({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Ue({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:re.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Ue({...this._def,catchall:t})}pick(t){const n={};for(const r of pe.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Ue({...this._def,shape:()=>n})}omit(t){const n={};for(const r of pe.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new Ue({...this._def,shape:()=>n})}deepPartial(){return ps(this)}partial(t){const n={};for(const r of pe.objectKeys(this.shape)){const s=this.shape[r];t&&!t[r]?n[r]=s:n[r]=s.optional()}return new Ue({...this._def,shape:()=>n})}required(t){const n={};for(const r of pe.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof yr;)i=i._def.innerType;n[r]=i}return new Ue({...this._def,shape:()=>n})}keyof(){return nv(pe.objectKeys(this.shape))}}Ue.create=(e,t)=>new Ue({shape:()=>e,unknownKeys:"strip",catchall:xr.create(),typeName:re.ZodObject,...le(t)});Ue.strictCreate=(e,t)=>new Ue({shape:()=>e,unknownKeys:"strict",catchall:xr.create(),typeName:re.ZodObject,...le(t)});Ue.lazycreate=(e,t)=>new Ue({shape:e,unknownKeys:"strip",catchall:xr.create(),typeName:re.ZodObject,...le(t)});class Ya extends he{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function s(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(a=>new In(a.ctx.common.issues));return V(n,{code:j.invalid_union,unionErrors:o}),ne}if(n.common.async)return Promise.all(r.map(async i=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(s);{let i;const o=[];for(const l of r){const u={...n,common:{...n.common,issues:[]},parent:null},c=l._parseSync({data:n.data,path:n.path,parent:u});if(c.status==="valid")return c;c.status==="dirty"&&!i&&(i={result:c,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const a=o.map(l=>new In(l));return V(n,{code:j.invalid_union,unionErrors:a}),ne}}get options(){return this._def.options}}Ya.create=(e,t)=>new Ya({options:e,typeName:re.ZodUnion,...le(t)});function Pc(e,t){const n=Qn(e),r=Qn(t);if(e===t)return{valid:!0,data:e};if(n===W.object&&r===W.object){const s=pe.objectKeys(t),i=pe.objectKeys(e).filter(a=>s.indexOf(a)!==-1),o={...e,...t};for(const a of i){const l=Pc(e[a],t[a]);if(!l.valid)return{valid:!1};o[a]=l.data}return{valid:!0,data:o}}else if(n===W.array&&r===W.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let i=0;i{if(lp(i)||lp(o))return ne;const a=Pc(i.value,o.value);return a.valid?((up(i)||up(o))&&n.dirty(),{status:n.value,value:a.data}):(V(r,{code:j.invalid_intersection_types}),ne)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,o])=>s(i,o)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}el.create=(e,t,n)=>new el({left:e,right:t,typeName:re.ZodIntersection,...le(n)});class ss extends he{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==W.array)return V(r,{code:j.invalid_type,expected:W.array,received:r.parsedType}),ne;if(r.data.lengththis._def.items.length&&(V(r,{code:j.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((o,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new wr(r,o,r.path,a)):null}).filter(o=>!!o);return r.common.async?Promise.all(i).then(o=>Ft.mergeArray(n,o)):Ft.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new ss({...this._def,rest:t})}}ss.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ss({items:e,typeName:re.ZodTuple,rest:null,...le(t)})};class gp extends he{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==W.map)return V(r,{code:j.invalid_type,expected:W.map,received:r.parsedType}),ne;const s=this._def.keyType,i=this._def.valueType,o=[...r.data.entries()].map(([a,l],u)=>({key:s._parse(new wr(r,a,r.path,[u,"key"])),value:i._parse(new wr(r,l,r.path,[u,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of o){const u=await l.key,c=await l.value;if(u.status==="aborted"||c.status==="aborted")return ne;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),a.set(u.value,c.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of o){const u=l.key,c=l.value;if(u.status==="aborted"||c.status==="aborted")return ne;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),a.set(u.value,c.value)}return{status:n.value,value:a}}}}gp.create=(e,t,n)=>new gp({valueType:t,keyType:e,typeName:re.ZodMap,...le(n)});class ho extends he{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==W.set)return V(r,{code:j.invalid_type,expected:W.set,received:r.parsedType}),ne;const s=this._def;s.minSize!==null&&r.data.sizes.maxSize.value&&(V(r,{code:j.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const i=this._def.valueType;function o(l){const u=new Set;for(const c of l){if(c.status==="aborted")return ne;c.status==="dirty"&&n.dirty(),u.add(c.value)}return{status:n.value,value:u}}const a=[...r.data.values()].map((l,u)=>i._parse(new wr(r,l,r.path,u)));return r.common.async?Promise.all(a).then(l=>o(l)):o(a)}min(t,n){return new ho({...this._def,minSize:{value:t,message:q.toString(n)}})}max(t,n){return new ho({...this._def,maxSize:{value:t,message:q.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}ho.create=(e,t)=>new ho({valueType:e,minSize:null,maxSize:null,typeName:re.ZodSet,...le(t)});class vp extends he{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}vp.create=(e,t)=>new vp({getter:e,typeName:re.ZodLazy,...le(t)});class wp extends he{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return V(n,{received:n.data,code:j.invalid_literal,expected:this._def.value}),ne}return{status:"valid",value:t.data}}get value(){return this._def.value}}wp.create=(e,t)=>new wp({value:e,typeName:re.ZodLiteral,...le(t)});function nv(e,t){return new si({values:e,typeName:re.ZodEnum,...le(t)})}class si extends he{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return V(n,{expected:pe.joinValues(r),received:n.parsedType,code:j.invalid_type}),ne}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return V(n,{received:n.data,code:j.invalid_enum_value,options:r}),ne}return Wt(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return si.create(t,{...this._def,...n})}exclude(t,n=this._def){return si.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}si.create=nv;class xp extends he{_parse(t){const n=pe.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==W.string&&r.parsedType!==W.number){const s=pe.objectValues(n);return V(r,{expected:pe.joinValues(s),received:r.parsedType,code:j.invalid_type}),ne}if(this._cache||(this._cache=new Set(pe.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const s=pe.objectValues(n);return V(r,{received:r.data,code:j.invalid_enum_value,options:s}),ne}return Wt(t.data)}get enum(){return this._def.values}}xp.create=(e,t)=>new xp({values:e,typeName:re.ZodNativeEnum,...le(t)});class tl extends he{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==W.promise&&n.common.async===!1)return V(n,{code:j.invalid_type,expected:W.promise,received:n.parsedType}),ne;const r=n.parsedType===W.promise?n.data:Promise.resolve(n.data);return Wt(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}tl.create=(e,t)=>new tl({type:e,typeName:re.ZodPromise,...le(t)});class ii extends he{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===re.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=this._def.effect||null,i={addIssue:o=>{V(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){const o=s.transform(r.data,i);if(r.common.async)return Promise.resolve(o).then(async a=>{if(n.value==="aborted")return ne;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?ne:l.status==="dirty"||n.value==="dirty"?ji(l.value):l});{if(n.value==="aborted")return ne;const a=this._def.schema._parseSync({data:o,path:r.path,parent:r});return a.status==="aborted"?ne:a.status==="dirty"||n.value==="dirty"?ji(a.value):a}}if(s.type==="refinement"){const o=a=>{const l=s.refinement(a,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?ne:(a.status==="dirty"&&n.dirty(),o(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?ne:(a.status==="dirty"&&n.dirty(),o(a.value).then(()=>({status:n.value,value:a.value}))))}if(s.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!ni(o))return ne;const a=s.transform(o.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>ni(o)?Promise.resolve(s.transform(o.value,i)).then(a=>({status:n.value,value:a})):ne);pe.assertNever(s)}}ii.create=(e,t,n)=>new ii({schema:e,typeName:re.ZodEffects,effect:t,...le(n)});ii.createWithPreprocess=(e,t,n)=>new ii({schema:t,effect:{type:"preprocess",transform:e},typeName:re.ZodEffects,...le(n)});class yr extends he{_parse(t){return this._getType(t)===W.undefined?Wt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}yr.create=(e,t)=>new yr({innerType:e,typeName:re.ZodOptional,...le(t)});class oi extends he{_parse(t){return this._getType(t)===W.null?Wt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}oi.create=(e,t)=>new oi({innerType:e,typeName:re.ZodNullable,...le(t)});class Tc extends he{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===W.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Tc.create=(e,t)=>new Tc({innerType:e,typeName:re.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...le(t)});class bc extends he{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Ja(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new In(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new In(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}bc.create=(e,t)=>new bc({innerType:e,typeName:re.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...le(t)});class _p extends he{_parse(t){if(this._getType(t)!==W.nan){const r=this._getOrReturnCtx(t);return V(r,{code:j.invalid_type,expected:W.nan,received:r.parsedType}),ne}return{status:"valid",value:t.data}}}_p.create=e=>new _p({typeName:re.ZodNaN,...le(e)});class AE extends he{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Gd extends he{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?ne:i.status==="dirty"?(n.dirty(),ji(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?ne:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(t,n){return new Gd({in:t,out:n,typeName:re.ZodPipeline})}}class Ac extends he{_parse(t){const n=this._def.innerType._parse(t),r=s=>(ni(s)&&(s.value=Object.freeze(s.value)),s);return Ja(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}Ac.create=(e,t)=>new Ac({innerType:e,typeName:re.ZodReadonly,...le(t)});var re;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(re||(re={}));const js=Tn.create;ns.create;rs.create;Xa.create;ri.create;xr.create;gn.create;const Jd=Ue.create;Ya.create;el.create;ss.create;si.create;tl.create;yr.create;oi.create;const rv={string:e=>Tn.create({...e,coerce:!0}),number:e=>ns.create({...e,coerce:!0}),boolean:e=>Xa.create({...e,coerce:!0}),bigint:e=>rs.create({...e,coerce:!0}),date:e=>ri.create({...e,coerce:!0})},jE=Jd({title:js().min(1,"Title is required"),description:js().optional(),ownerId:rv.number().int().positive("Owner is required"),quarter:js().regex(/^Q[1-4]\/\d{4}$/,"Format must be Q2/2026")});function FE(){const e=Sl(),t=wl(),[n,r]=P.useState({}),{register:s,handleSubmit:i}=Kd({defaultValues:{title:"",description:"",quarter:"Q2/2026"}}),{data:o=[]}=xl({queryKey:["users"],queryFn:R1}),a=rg({mutationFn:P1,onSuccess:async u=>{await t.invalidateQueries({queryKey:["objectives"]}),e(`/objectives/${u.id}`)}}),l=i(u=>{const c=jE.safeParse(u);if(!c.success){r(Object.fromEntries(c.error.issues.map(d=>[d.path[0],d.message])));return}r({}),a.mutate(c.data)});return k.jsxs("section",{className:"rounded-xl border border-gray-200 bg-white p-6 shadow-sm",children:[k.jsx("h1",{className:"mb-6 text-xl font-semibold text-gray-800",children:"Create Objective"}),k.jsxs("form",{className:"max-w-2xl space-y-4",onSubmit:l,children:[k.jsxs("label",{className:"block",children:[k.jsx("span",{className:"mb-1 block text-sm font-medium text-gray-700",children:"Title"}),k.jsx("input",{className:"w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",...s("title")}),n.title!==void 0&&k.jsx("span",{className:"mt-1 block text-sm text-orange-600",children:n.title})]}),k.jsxs("label",{className:"block",children:[k.jsx("span",{className:"mb-1 block text-sm font-medium text-gray-700",children:"Description"}),k.jsx("textarea",{rows:4,className:"w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",...s("description")})]}),k.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[k.jsxs("label",{className:"block",children:[k.jsx("span",{className:"mb-1 block text-sm font-medium text-gray-700",children:"Owner"}),k.jsxs("select",{className:"w-full rounded-lg border border-gray-300 bg-white px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",...s("ownerId"),children:[k.jsx("option",{value:"",children:"Select owner"}),o.map(u=>k.jsx("option",{value:u.id,children:u.name},u.id))]}),n.ownerId!==void 0&&k.jsx("span",{className:"mt-1 block text-sm text-orange-600",children:n.ownerId})]}),k.jsxs("label",{className:"block",children:[k.jsx("span",{className:"mb-1 block text-sm font-medium text-gray-700",children:"Quarter"}),k.jsx("input",{className:"w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",...s("quarter")}),n.quarter!==void 0&&k.jsx("span",{className:"mt-1 block text-sm text-orange-600",children:n.quarter})]})]}),a.isError&&k.jsx("div",{className:"rounded-lg bg-orange-100 px-3 py-2 text-sm text-orange-700",children:"Unable to create objective."}),k.jsx(Yr,{type:"submit",disabled:a.isPending,children:"Save"})]})]})}const DE={NOT_STARTED:"Not Started",IN_PROGRESS:"In Progress",COMPLETED:"Completed"},LE={NOT_STARTED:"bg-gray-100 text-gray-600",IN_PROGRESS:"bg-orange-100 text-orange-700",COMPLETED:"bg-green-100 text-green-700"};function sv({status:e}){return k.jsx("span",{className:`rounded-full px-2 py-1 text-xs font-medium ${LE[e]}`,children:DE[e]})}function nl({value:e}){const t=`${Math.min(Math.max(e,0),100)}%`;return k.jsx("div",{className:"w-full rounded-full bg-gray-200 h-2",children:k.jsx("div",{className:"h-2 rounded-full bg-blue-600 transition-all",style:{width:t}})})}function IE(e){return xl({queryKey:["objectives",{quarter:e}],queryFn:()=>O1(e)})}function ME(e){return e.length===0?0:Math.round(e.reduce((t,n)=>t+n.progress,0)/e.length)}function UE(){const{data:e=[],isLoading:t,error:n}=IE("Q2/2026");return k.jsxs("section",{children:[k.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[k.jsxs("div",{children:[k.jsx("h1",{className:"text-xl font-semibold text-gray-800",children:"OKR List"}),k.jsx("p",{className:"text-sm text-gray-500",children:"Q2/2026"})]}),k.jsxs("div",{className:"flex items-center gap-3",children:[k.jsx("select",{className:"rounded-lg border border-gray-300 bg-white px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",children:k.jsx("option",{children:"Q2/2026"})}),k.jsx("button",{className:"rounded-lg border border-gray-300 px-3 py-2 text-sm text-gray-700 transition-colors hover:bg-gray-50",children:"Filters"})]})]}),t&&k.jsx("div",{className:"rounded-xl border border-gray-200 bg-white p-6 text-gray-500",children:"Loading OKRs..."}),n!==null&&k.jsx("div",{className:"rounded-xl border border-orange-200 bg-orange-100 p-6 text-orange-700",children:"Unable to load OKRs."}),k.jsx("div",{className:"space-y-4",children:e.map(r=>{const s=ME(r.keyResults);return k.jsxs(El,{to:`/objectives/${r.id}`,className:"block rounded-xl border border-gray-200 bg-white p-6 shadow-sm transition hover:-translate-y-px hover:shadow-md",children:[k.jsxs("div",{className:"mb-4 flex items-start justify-between gap-4",children:[k.jsxs("div",{children:[k.jsx("h2",{className:"text-lg font-semibold text-gray-800",children:r.title}),k.jsxs("p",{className:"mt-1 text-sm text-gray-500",children:["Owner: ",r.owner.name]})]}),k.jsx(sv,{status:r.status})]}),k.jsxs("div",{className:"flex items-center gap-4",children:[k.jsx("div",{className:"flex-1",children:k.jsx(nl,{value:s})}),k.jsxs("span",{className:"w-12 text-right text-sm font-medium text-gray-700",children:[s,"%"]})]})]},r.id)})})]})}const zE=Jd({progress:rv.number().int().min(0,"Progress cannot be negative").max(100,"Progress cannot exceed 100"),comment:js().optional()});function VE(e){const t=Number(e);return Number.isFinite(t)?t:0}function BE(){const e=VE(cg().id),t=wl(),[n,r]=P.useState(null),{register:s,handleSubmit:i,reset:o}=Kd(),{data:a,isLoading:l}=xl({queryKey:["key-result",e],queryFn:()=>T1(e),enabled:e>0}),u=rg({mutationFn:d=>b1(e,d),onSuccess:async d=>{o({progress:d.progress,comment:""}),await t.invalidateQueries({queryKey:["key-result",e]}),await t.invalidateQueries({queryKey:["objective",a==null?void 0:a.objectiveId]}),await t.invalidateQueries({queryKey:["objectives"]})}});if(l||a===void 0)return k.jsx("div",{className:"rounded-xl border border-gray-200 bg-white p-6 text-gray-500",children:"Loading key result..."});const c=i(d=>{var w;const m=zE.safeParse(d);if(!m.success){r(((w=m.error.issues[0])==null?void 0:w.message)??"Invalid progress");return}r(null),u.mutate(m.data)});return k.jsxs("section",{className:"rounded-xl border border-gray-200 bg-white p-6 shadow-sm",children:[k.jsx("h1",{className:"mb-2 text-xl font-semibold text-gray-800",children:"Key Result Detail"}),k.jsx("h2",{className:"text-lg font-medium text-gray-800",children:a.title}),k.jsxs("div",{className:"mt-2 text-sm text-gray-500",children:["Owner: ",a.objective.owner.name]}),k.jsxs("div",{className:"mt-1 text-sm text-gray-500",children:["Deadline: ",new Date(a.deadline).toLocaleDateString()]}),k.jsxs("div",{className:"my-6 max-w-md",children:[k.jsxs("div",{className:"mb-2 flex justify-between text-sm font-medium text-gray-700",children:[k.jsx("span",{children:"Current Progress"}),k.jsxs("span",{children:[a.progress,"%"]})]}),k.jsx(nl,{value:a.progress})]}),k.jsxs("form",{className:"max-w-md space-y-4",onSubmit:c,children:[k.jsxs("label",{className:"block",children:[k.jsx("span",{className:"mb-1 block text-sm font-medium text-gray-700",children:"Update Progress"}),k.jsxs("div",{className:"flex items-center gap-2",children:[k.jsx("input",{type:"number",min:"0",max:"100",defaultValue:a.progress,className:"w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",...s("progress")}),k.jsx("span",{className:"text-gray-500",children:"%"})]})]}),k.jsxs("label",{className:"block",children:[k.jsx("span",{className:"mb-1 block text-sm font-medium text-gray-700",children:"Comment"}),k.jsx("textarea",{rows:4,className:"w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",...s("comment")})]}),n!==null&&k.jsx("div",{className:"rounded-lg bg-orange-100 px-3 py-2 text-sm text-orange-700",children:n}),u.isError&&k.jsx("div",{className:"rounded-lg bg-orange-100 px-3 py-2 text-sm text-orange-700",children:"Unable to update progress."}),k.jsx(Yr,{type:"submit",disabled:u.isPending,children:"Save"})]})]})}const $E=Jd({username:js().min(1,"Username or email is required"),password:js().min(8,"Password must be at least 8 characters")});function HE(){const{user:e,login:t}=Wd(),n=Sl(),[r,s]=P.useState(null),[i,o]=P.useState({}),{register:a,handleSubmit:l}=Kd({defaultValues:{username:"employee",password:"Password@123"}});if(e!==null)return k.jsx(Md,{to:"/",replace:!0});const u=l(async c=>{const d=$E.safeParse(c);if(!d.success){o(Object.fromEntries(d.error.issues.map(m=>[m.path[0],m.message])));return}o({}),s(null);try{await t(d.data.username,d.data.password),n("/")}catch{s("Invalid username or password")}});return k.jsx("main",{className:"flex min-h-screen items-center justify-center bg-gray-50 px-4",children:k.jsxs("section",{className:"w-full max-w-md rounded-xl border border-gray-200 bg-white p-8 shadow-sm",children:[k.jsxs("div",{className:"mb-8 text-center",children:[k.jsx("div",{className:"mx-auto mb-3 flex h-12 w-12 items-center justify-center rounded-lg bg-blue-600 text-lg font-semibold text-white",children:"OKR"}),k.jsx("h1",{className:"text-2xl font-semibold text-gray-800",children:"Sign in to OKR"})]}),k.jsxs("form",{className:"space-y-4",onSubmit:u,children:[k.jsxs("label",{className:"block",children:[k.jsx("span",{className:"mb-1 block text-sm font-medium text-gray-700",children:"Username or email address"}),k.jsx("input",{className:"w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",...a("username")}),i.username!==void 0&&k.jsx("span",{className:"mt-1 block text-sm text-orange-600",children:i.username})]}),k.jsxs("label",{className:"block",children:[k.jsxs("span",{className:"mb-1 flex justify-between text-sm font-medium text-gray-700",children:["Password ",k.jsx("span",{className:"text-blue-600",children:"Forgot password?"})]}),k.jsx("input",{type:"password",className:"w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",...a("password")}),i.password!==void 0&&k.jsx("span",{className:"mt-1 block text-sm text-orange-600",children:i.password})]}),r!==null&&k.jsx("div",{className:"rounded-lg bg-orange-100 px-3 py-2 text-sm text-orange-700",children:r}),k.jsx(Yr,{className:"w-full",type:"submit",children:"Sign in"})]})]})})}function QE(e){const t=Number(e);return Number.isFinite(t)?t:0}function WE(){const e=QE(cg().id),{data:t,isLoading:n}=xl({queryKey:["objective",e],queryFn:()=>N1(e),enabled:e>0});if(n||t===void 0)return k.jsx("div",{className:"rounded-xl border border-gray-200 bg-white p-6 text-gray-500",children:"Loading objective..."});const r=t.computedProgress??0;return k.jsxs("section",{className:"space-y-6",children:[k.jsxs("div",{className:"rounded-xl border border-gray-200 bg-white p-6 shadow-sm",children:[k.jsxs("div",{className:"mb-4 flex items-start justify-between gap-4",children:[k.jsxs("div",{children:[k.jsx("h1",{className:"text-2xl font-semibold text-gray-800",children:t.title}),k.jsx("p",{className:"mt-2 text-sm text-gray-500",children:t.description})]}),k.jsx(sv,{status:t.status})]}),k.jsxs("div",{className:"mb-4 flex gap-3",children:[k.jsx(Yr,{variant:"secondary",children:"REPORT"}),k.jsx(Yr,{variant:"secondary",children:"OPTIONS"})]}),k.jsx("div",{className:"border-b border-gray-200",children:k.jsxs("div",{className:"flex gap-6 text-sm font-medium text-gray-600",children:[k.jsx("span",{className:"border-b-2 border-blue-600 pb-3 text-blue-600",children:"General Info"}),k.jsx("span",{className:"pb-3",children:"Conversation"}),k.jsx("span",{className:"pb-3",children:"Grade & Feedback"})]})}),k.jsxs("div",{className:"mt-6 grid gap-4 md:grid-cols-3",children:[k.jsxs("div",{children:[k.jsx("div",{className:"text-sm text-gray-500",children:"Owner"}),k.jsx("div",{className:"font-medium text-gray-800",children:t.owner.name})]}),k.jsxs("div",{children:[k.jsx("div",{className:"text-sm text-gray-500",children:"Quarter"}),k.jsx("div",{className:"font-medium text-gray-800",children:t.quarter})]}),k.jsxs("div",{children:[k.jsx("div",{className:"text-sm text-gray-500",children:"Progress"}),k.jsxs("div",{className:"mt-2 flex items-center gap-3",children:[k.jsx(nl,{value:r}),k.jsxs("span",{className:"text-sm font-medium",children:[r,"%"]})]})]})]})]}),k.jsxs("section",{className:"rounded-xl border border-gray-200 bg-white p-6 shadow-sm",children:[k.jsx("h2",{className:"mb-4 text-lg font-semibold text-gray-800",children:"Key Results"}),k.jsx("div",{className:"divide-y divide-gray-200",children:t.keyResults.map(s=>k.jsx(El,{to:`/key-results/${s.id}`,className:"block py-4 transition-colors hover:bg-gray-50",children:k.jsxs("div",{className:"flex items-center justify-between gap-4",children:[k.jsxs("div",{children:[k.jsx("div",{className:"font-medium text-gray-800",children:s.title}),k.jsxs("div",{className:"text-sm text-gray-500",children:["Start: ",s.startValue," · Target: ",s.targetValue," · Deadline:"," ",new Date(s.deadline).toLocaleDateString()]})]}),k.jsxs("div",{className:"w-44",children:[k.jsx(nl,{value:s.progress}),k.jsxs("div",{className:"mt-1 text-right text-sm text-gray-500",children:[s.progress,"%"]})]})]})},s.id))})]})]})}function qE(){const{user:e}=Wd();return e===null?k.jsx(Md,{to:"/login",replace:!0}):k.jsx(mg,{})}function ZE(){return k.jsxs(m_,{children:[k.jsx(_n,{path:"/login",element:k.jsx(HE,{})}),k.jsx(_n,{element:k.jsx(qE,{}),children:k.jsxs(_n,{path:"/",element:k.jsx(I1,{}),children:[k.jsx(_n,{index:!0,element:k.jsx(UE,{})}),k.jsx(_n,{path:"objectives/new",element:k.jsx(FE,{})}),k.jsx(_n,{path:"objectives/:id",element:k.jsx(WE,{})}),k.jsx(_n,{path:"key-results/:id",element:k.jsx(BE,{})})]})}),k.jsx(_n,{path:"*",element:k.jsx(Md,{to:"/",replace:!0})})]})}const KE=new ux({defaultOptions:{queries:{staleTime:3e4,retry:1}}});du.createRoot(document.getElementById("root")).render(k.jsx(We.StrictMode,{children:k.jsx(cx,{client:KE,children:k.jsx(S_,{children:k.jsx(j1,{children:k.jsx(ZE,{})})})})}));