var Lr=t=>{throw TypeError(t)};var js=(t,e,s)=>e.has(t)||Lr("Cannot "+s);var u=(t,e,s)=>(js(t,e,"read from private field"),s?s.call(t):e.get(t)),x=(t,e,s)=>e.has(t)?Lr("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),v=(t,e,s,r)=>(js(t,e,"write to private field"),r?r.call(t,s):e.set(t,s),s),C=(t,e,s)=>(js(t,e,"access private method"),s);var hs=(t,e,s,r)=>({set _(n){v(t,e,n,s)},get _(){return u(t,e,r)}});import{r as D,j as Ln}from"./vendor-ui-DZJzNhfO.js";function Qn(t,e){return function(){return t.apply(e,arguments)}}const{toString:Zi}=Object.prototype,{getPrototypeOf:Sr}=Object,{iterator:Es,toStringTag:qn}=Symbol,ks=(t=>e=>{const s=Zi.call(e);return t[s]||(t[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),ge=t=>(t=t.toLowerCase(),e=>ks(e)===t),Cs=t=>e=>typeof e===t,{isArray:qt}=Array,It=Cs("undefined");function is(t){return t!==null&&!It(t)&&t.constructor!==null&&!It(t.constructor)&&ne(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Bn=ge("ArrayBuffer");function zi(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Bn(t.buffer),e}const Hi=Cs("string"),ne=Cs("function"),$n=Cs("number"),as=t=>t!==null&&typeof t=="object",Vi=t=>t===!0||t===!1,ms=t=>{if(ks(t)!=="object")return!1;const e=Sr(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(qn in t)&&!(Es in t)},Ki=t=>{if(!as(t)||is(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},Wi=ge("Date"),Ji=ge("File"),Gi=t=>!!(t&&typeof t.uri<"u"),Xi=t=>t&&typeof t.getParts<"u",Yi=ge("Blob"),ea=ge("FileList"),ta=t=>as(t)&&ne(t.pipe);function sa(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Qr=sa(),qr=typeof Qr.FormData<"u"?Qr.FormData:void 0,ra=t=>{let e;return t&&(qr&&t instanceof qr||ne(t.append)&&((e=ks(t))==="formdata"||e==="object"&&ne(t.toString)&&t.toString()==="[object FormData]"))},na=ge("URLSearchParams"),[ia,aa,oa,ua]=["ReadableStream","Request","Response","Headers"].map(ge),ca=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function os(t,e,{allOwnKeys:s=!1}={}){if(t===null||typeof t>"u")return;let r,n;if(typeof t!="object"&&(t=[t]),qt(t))for(r=0,n=t.length;r<n;r++)e.call(null,t[r],r,t);else{if(is(t))return;const i=s?Object.getOwnPropertyNames(t):Object.keys(t),a=i.length;let o;for(r=0;r<a;r++)o=i[r],e.call(null,t[o],o,t)}}function Zn(t,e){if(is(t))return null;e=e.toLowerCase();const s=Object.keys(t);let r=s.length,n;for(;r-- >0;)if(n=s[r],e===n.toLowerCase())return n;return null}const et=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,zn=t=>!It(t)&&t!==et;function Bs(){const{caseless:t,skipUndefined:e}=zn(this)&&this||{},s={},r=(n,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const a=t&&Zn(s,i)||i;ms(s[a])&&ms(n)?s[a]=Bs(s[a],n):ms(n)?s[a]=Bs({},n):qt(n)?s[a]=n.slice():(!e||!It(n))&&(s[a]=n)};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&os(arguments[n],r);return s}const la=(t,e,s,{allOwnKeys:r}={})=>(os(e,(n,i)=>{s&&ne(n)?Object.defineProperty(t,i,{value:Qn(n,s),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,i,{value:n,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),t),da=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),ha=(t,e,s,r)=>{t.prototype=Object.create(e.prototype,r),Object.defineProperty(t.prototype,"constructor",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{value:e.prototype}),s&&Object.assign(t.prototype,s)},fa=(t,e,s,r)=>{let n,i,a;const o={};if(e=e||{},t==null)return e;do{for(n=Object.getOwnPropertyNames(t),i=n.length;i-- >0;)a=n[i],(!r||r(a,t,e))&&!o[a]&&(e[a]=t[a],o[a]=!0);t=s!==!1&&Sr(t)}while(t&&(!s||s(t,e))&&t!==Object.prototype);return e},pa=(t,e,s)=>{t=String(t),(s===void 0||s>t.length)&&(s=t.length),s-=e.length;const r=t.indexOf(e,s);return r!==-1&&r===s},ma=t=>{if(!t)return null;if(qt(t))return t;let e=t.length;if(!$n(e))return null;const s=new Array(e);for(;e-- >0;)s[e]=t[e];return s},ya=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Sr(Uint8Array)),ga=(t,e)=>{const r=(t&&t[Es]).call(t);let n;for(;(n=r.next())&&!n.done;){const i=n.value;e.call(t,i[0],i[1])}},va=(t,e)=>{let s;const r=[];for(;(s=t.exec(e))!==null;)r.push(s);return r},ba=ge("HTMLFormElement"),_a=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(s,r,n){return r.toUpperCase()+n}),Br=(({hasOwnProperty:t})=>(e,s)=>t.call(e,s))(Object.prototype),wa=ge("RegExp"),Hn=(t,e)=>{const s=Object.getOwnPropertyDescriptors(t),r={};os(s,(n,i)=>{let a;(a=e(n,i,t))!==!1&&(r[i]=a||n)}),Object.defineProperties(t,r)},xa=t=>{Hn(t,(e,s)=>{if(ne(t)&&["arguments","caller","callee"].indexOf(s)!==-1)return!1;const r=t[s];if(ne(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")})}})},Sa=(t,e)=>{const s={},r=n=>{n.forEach(i=>{s[i]=!0})};return qt(t)?r(t):r(String(t).split(e)),s},Ra=()=>{},Oa=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function Ea(t){return!!(t&&ne(t.append)&&t[qn]==="FormData"&&t[Es])}const ka=t=>{const e=new Array(10),s=(r,n)=>{if(as(r)){if(e.indexOf(r)>=0)return;if(is(r))return r;if(!("toJSON"in r)){e[n]=r;const i=qt(r)?[]:{};return os(r,(a,o)=>{const l=s(a,n+1);!It(l)&&(i[o]=l)}),e[n]=void 0,i}}return r};return s(t,0)},Ca=ge("AsyncFunction"),Ta=t=>t&&(as(t)||ne(t))&&ne(t.then)&&ne(t.catch),Vn=((t,e)=>t?setImmediate:e?((s,r)=>(et.addEventListener("message",({source:n,data:i})=>{n===et&&i===s&&r.length&&r.shift()()},!1),n=>{r.push(n),et.postMessage(s,"*")}))(`axios@${Math.random()}`,[]):s=>setTimeout(s))(typeof setImmediate=="function",ne(et.postMessage)),Aa=typeof queueMicrotask<"u"?queueMicrotask.bind(et):typeof process<"u"&&process.nextTick||Vn,Pa=t=>t!=null&&ne(t[Es]),f={isArray:qt,isArrayBuffer:Bn,isBuffer:is,isFormData:ra,isArrayBufferView:zi,isString:Hi,isNumber:$n,isBoolean:Vi,isObject:as,isPlainObject:ms,isEmptyObject:Ki,isReadableStream:ia,isRequest:aa,isResponse:oa,isHeaders:ua,isUndefined:It,isDate:Wi,isFile:Ji,isReactNativeBlob:Gi,isReactNative:Xi,isBlob:Yi,isRegExp:wa,isFunction:ne,isStream:ta,isURLSearchParams:na,isTypedArray:ya,isFileList:ea,forEach:os,merge:Bs,extend:la,trim:ca,stripBOM:da,inherits:ha,toFlatObject:fa,kindOf:ks,kindOfTest:ge,endsWith:pa,toArray:ma,forEachEntry:ga,matchAll:va,isHTMLForm:ba,hasOwnProperty:Br,hasOwnProp:Br,reduceDescriptors:Hn,freezeMethods:xa,toObjectSet:Sa,toCamelCase:_a,noop:Ra,toFiniteNumber:Oa,findKey:Zn,global:et,isContextDefined:zn,isSpecCompliantForm:Ea,toJSONObject:ka,isAsyncFn:Ca,isThenable:Ta,setImmediate:Vn,asap:Aa,isIterable:Pa};let T=class Kn extends Error{static from(e,s,r,n,i,a){const o=new Kn(e.message,s||e.code,r,n,i);return o.cause=e,o.name=e.name,e.status!=null&&o.status==null&&(o.status=e.status),a&&Object.assign(o,a),o}constructor(e,s,r,n,i){super(e),Object.defineProperty(this,"message",{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,s&&(this.code=s),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status)}toJSON(){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:f.toJSONObject(this.config),code:this.code,status:this.status}}};T.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";T.ERR_BAD_OPTION="ERR_BAD_OPTION";T.ECONNABORTED="ECONNABORTED";T.ETIMEDOUT="ETIMEDOUT";T.ERR_NETWORK="ERR_NETWORK";T.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";T.ERR_DEPRECATED="ERR_DEPRECATED";T.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";T.ERR_BAD_REQUEST="ERR_BAD_REQUEST";T.ERR_CANCELED="ERR_CANCELED";T.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";T.ERR_INVALID_URL="ERR_INVALID_URL";const Na=null;function $s(t){return f.isPlainObject(t)||f.isArray(t)}function Wn(t){return f.endsWith(t,"[]")?t.slice(0,-2):t}function Ms(t,e,s){return t?t.concat(e).map(function(n,i){return n=Wn(n),!s&&i?"["+n+"]":n}).join(s?".":""):e}function Ia(t){return f.isArray(t)&&!t.some($s)}const Fa=f.toFlatObject(f,{},null,function(e){return/^is[A-Z]/.test(e)});function Ts(t,e,s){if(!f.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,s=f.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,m){return!f.isUndefined(m[y])});const r=s.metaTokens,n=s.visitor||d,i=s.dots,a=s.indexes,l=(s.Blob||typeof Blob<"u"&&Blob)&&f.isSpecCompliantForm(e);if(!f.isFunction(n))throw new TypeError("visitor must be a function");function c(p){if(p===null)return"";if(f.isDate(p))return p.toISOString();if(f.isBoolean(p))return p.toString();if(!l&&f.isBlob(p))throw new T("Blob is not supported. Use a Buffer instead.");return f.isArrayBuffer(p)||f.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function d(p,y,m){let O=p;if(f.isReactNative(e)&&f.isReactNativeBlob(p))return e.append(Ms(m,y,i),c(p)),!1;if(p&&!m&&typeof p=="object"){if(f.endsWith(y,"{}"))y=r?y:y.slice(0,-2),p=JSON.stringify(p);else if(f.isArray(p)&&Ia(p)||(f.isFileList(p)||f.endsWith(y,"[]"))&&(O=f.toArray(p)))return y=Wn(y),O.forEach(function(k,S){!(f.isUndefined(k)||k===null)&&e.append(a===!0?Ms([y],S,i):a===null?y:y+"[]",c(k))}),!1}return $s(p)?!0:(e.append(Ms(m,y,i),c(p)),!1)}const h=[],g=Object.assign(Fa,{defaultVisitor:d,convertValue:c,isVisitable:$s});function _(p,y){if(!f.isUndefined(p)){if(h.indexOf(p)!==-1)throw Error("Circular reference detected in "+y.join("."));h.push(p),f.forEach(p,function(O,I){(!(f.isUndefined(O)||O===null)&&n.call(e,O,f.isString(I)?I.trim():I,y,g))===!0&&_(O,y?y.concat(I):[I])}),h.pop()}}if(!f.isObject(t))throw new TypeError("data must be an object");return _(t),e}function $r(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function Rr(t,e){this._pairs=[],t&&Ts(t,this,e)}const Jn=Rr.prototype;Jn.append=function(e,s){this._pairs.push([e,s])};Jn.toString=function(e){const s=e?function(r){return e.call(this,r,$r)}:$r;return this._pairs.map(function(n){return s(n[0])+"="+s(n[1])},"").join("&")};function Da(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Gn(t,e,s){if(!e)return t;const r=s&&s.encode||Da,n=f.isFunction(s)?{serialize:s}:s,i=n&&n.serialize;let a;if(i?a=i(e,n):a=f.isURLSearchParams(e)?e.toString():new Rr(e,n).toString(r),a){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+a}return t}class Zr{constructor(){this.handlers=[]}use(e,s,r){return this.handlers.push({fulfilled:e,rejected:s,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){f.forEach(this.handlers,function(r){r!==null&&e(r)})}}const Or={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},ja=typeof URLSearchParams<"u"?URLSearchParams:Rr,Ma=typeof FormData<"u"?FormData:null,Ua=typeof Blob<"u"?Blob:null,La={isBrowser:!0,classes:{URLSearchParams:ja,FormData:Ma,Blob:Ua},protocols:["http","https","file","blob","url","data"]},Er=typeof window<"u"&&typeof document<"u",Zs=typeof navigator=="object"&&navigator||void 0,Qa=Er&&(!Zs||["ReactNative","NativeScript","NS"].indexOf(Zs.product)<0),qa=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ba=Er&&window.location.href||"http://localhost",$a=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Er,hasStandardBrowserEnv:Qa,hasStandardBrowserWebWorkerEnv:qa,navigator:Zs,origin:Ba},Symbol.toStringTag,{value:"Module"})),Y={...$a,...La};function Za(t,e){return Ts(t,new Y.classes.URLSearchParams,{visitor:function(s,r,n,i){return Y.isNode&&f.isBuffer(s)?(this.append(r,s.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...e})}function za(t){return f.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Ha(t){const e={},s=Object.keys(t);let r;const n=s.length;let i;for(r=0;r<n;r++)i=s[r],e[i]=t[i];return e}function Xn(t){function e(s,r,n,i){let a=s[i++];if(a==="__proto__")return!0;const o=Number.isFinite(+a),l=i>=s.length;return a=!a&&f.isArray(n)?n.length:a,l?(f.hasOwnProp(n,a)?n[a]=[n[a],r]:n[a]=r,!o):((!n[a]||!f.isObject(n[a]))&&(n[a]=[]),e(s,r,n[a],i)&&f.isArray(n[a])&&(n[a]=Ha(n[a])),!o)}if(f.isFormData(t)&&f.isFunction(t.entries)){const s={};return f.forEachEntry(t,(r,n)=>{e(za(r),n,s,0)}),s}return null}function Va(t,e,s){if(f.isString(t))try{return(e||JSON.parse)(t),f.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(s||JSON.stringify)(t)}const us={transitional:Or,adapter:["xhr","http","fetch"],transformRequest:[function(e,s){const r=s.getContentType()||"",n=r.indexOf("application/json")>-1,i=f.isObject(e);if(i&&f.isHTMLForm(e)&&(e=new FormData(e)),f.isFormData(e))return n?JSON.stringify(Xn(e)):e;if(f.isArrayBuffer(e)||f.isBuffer(e)||f.isStream(e)||f.isFile(e)||f.isBlob(e)||f.isReadableStream(e))return e;if(f.isArrayBufferView(e))return e.buffer;if(f.isURLSearchParams(e))return s.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Za(e,this.formSerializer).toString();if((o=f.isFileList(e))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Ts(o?{"files[]":e}:e,l&&new l,this.formSerializer)}}return i||n?(s.setContentType("application/json",!1),Va(e)):e}],transformResponse:[function(e){const s=this.transitional||us.transitional,r=s&&s.forcedJSONParsing,n=this.responseType==="json";if(f.isResponse(e)||f.isReadableStream(e))return e;if(e&&f.isString(e)&&(r&&!this.responseType||n)){const a=!(s&&s.silentJSONParsing)&&n;try{return JSON.parse(e,this.parseReviver)}catch(o){if(a)throw o.name==="SyntaxError"?T.from(o,T.ERR_BAD_RESPONSE,this,null,this.response):o}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Y.classes.FormData,Blob:Y.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};f.forEach(["delete","get","head","post","put","patch"],t=>{us.headers[t]={}});const Ka=f.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"]),Wa=t=>{const e={};let s,r,n;return t&&t.split(`
`).forEach(function(a){n=a.indexOf(":"),s=a.substring(0,n).trim().toLowerCase(),r=a.substring(n+1).trim(),!(!s||e[s]&&Ka[s])&&(s==="set-cookie"?e[s]?e[s].push(r):e[s]=[r]:e[s]=e[s]?e[s]+", "+r:r)}),e},zr=Symbol("internals");function $t(t){return t&&String(t).trim().toLowerCase()}function ys(t){return t===!1||t==null?t:f.isArray(t)?t.map(ys):String(t)}function Ja(t){const e=Object.create(null),s=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=s.exec(t);)e[r[1]]=r[2];return e}const Ga=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Us(t,e,s,r,n){if(f.isFunction(r))return r.call(this,e,s);if(n&&(e=s),!!f.isString(e)){if(f.isString(r))return e.indexOf(r)!==-1;if(f.isRegExp(r))return r.test(e)}}function Xa(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,s,r)=>s.toUpperCase()+r)}function Ya(t,e){const s=f.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+s,{value:function(n,i,a){return this[r].call(this,e,n,i,a)},configurable:!0})})}let ie=class{constructor(e){e&&this.set(e)}set(e,s,r){const n=this;function i(o,l,c){const d=$t(l);if(!d)throw new Error("header name must be a non-empty string");const h=f.findKey(n,d);(!h||n[h]===void 0||c===!0||c===void 0&&n[h]!==!1)&&(n[h||l]=ys(o))}const a=(o,l)=>f.forEach(o,(c,d)=>i(c,d,l));if(f.isPlainObject(e)||e instanceof this.constructor)a(e,s);else if(f.isString(e)&&(e=e.trim())&&!Ga(e))a(Wa(e),s);else if(f.isObject(e)&&f.isIterable(e)){let o={},l,c;for(const d of e){if(!f.isArray(d))throw TypeError("Object iterator must return a key-value pair");o[c=d[0]]=(l=o[c])?f.isArray(l)?[...l,d[1]]:[l,d[1]]:d[1]}a(o,s)}else e!=null&&i(s,e,r);return this}get(e,s){if(e=$t(e),e){const r=f.findKey(this,e);if(r){const n=this[r];if(!s)return n;if(s===!0)return Ja(n);if(f.isFunction(s))return s.call(this,n,r);if(f.isRegExp(s))return s.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,s){if(e=$t(e),e){const r=f.findKey(this,e);return!!(r&&this[r]!==void 0&&(!s||Us(this,this[r],r,s)))}return!1}delete(e,s){const r=this;let n=!1;function i(a){if(a=$t(a),a){const o=f.findKey(r,a);o&&(!s||Us(r,r[o],o,s))&&(delete r[o],n=!0)}}return f.isArray(e)?e.forEach(i):i(e),n}clear(e){const s=Object.keys(this);let r=s.length,n=!1;for(;r--;){const i=s[r];(!e||Us(this,this[i],i,e,!0))&&(delete this[i],n=!0)}return n}normalize(e){const s=this,r={};return f.forEach(this,(n,i)=>{const a=f.findKey(r,i);if(a){s[a]=ys(n),delete s[i];return}const o=e?Xa(i):String(i).trim();o!==i&&delete s[i],s[o]=ys(n),r[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const s=Object.create(null);return f.forEach(this,(r,n)=>{r!=null&&r!==!1&&(s[n]=e&&f.isArray(r)?r.join(", "):r)}),s}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,s])=>e+": "+s).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...s){const r=new this(e);return s.forEach(n=>r.set(n)),r}static accessor(e){const r=(this[zr]=this[zr]={accessors:{}}).accessors,n=this.prototype;function i(a){const o=$t(a);r[o]||(Ya(n,a),r[o]=!0)}return f.isArray(e)?e.forEach(i):i(e),this}};ie.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);f.reduceDescriptors(ie.prototype,({value:t},e)=>{let s=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[s]=r}}});f.freezeMethods(ie);function Ls(t,e){const s=this||us,r=e||s,n=ie.from(r.headers);let i=r.data;return f.forEach(t,function(o){i=o.call(s,i,n.normalize(),e?e.status:void 0)}),n.normalize(),i}function Yn(t){return!!(t&&t.__CANCEL__)}let cs=class extends T{constructor(e,s,r){super(e??"canceled",T.ERR_CANCELED,s,r),this.name="CanceledError",this.__CANCEL__=!0}};function ei(t,e,s){const r=s.config.validateStatus;!s.status||!r||r(s.status)?t(s):e(new T("Request failed with status code "+s.status,[T.ERR_BAD_REQUEST,T.ERR_BAD_RESPONSE][Math.floor(s.status/100)-4],s.config,s.request,s))}function eo(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function to(t,e){t=t||10;const s=new Array(t),r=new Array(t);let n=0,i=0,a;return e=e!==void 0?e:1e3,function(l){const c=Date.now(),d=r[i];a||(a=c),s[n]=l,r[n]=c;let h=i,g=0;for(;h!==n;)g+=s[h++],h=h%t;if(n=(n+1)%t,n===i&&(i=(i+1)%t),c-a<e)return;const _=d&&c-d;return _?Math.round(g*1e3/_):void 0}}function so(t,e){let s=0,r=1e3/e,n,i;const a=(c,d=Date.now())=>{s=d,n=null,i&&(clearTimeout(i),i=null),t(...c)};return[(...c)=>{const d=Date.now(),h=d-s;h>=r?a(c,d):(n=c,i||(i=setTimeout(()=>{i=null,a(n)},r-h)))},()=>n&&a(n)]}const bs=(t,e,s=3)=>{let r=0;const n=to(50,250);return so(i=>{const a=i.loaded,o=i.lengthComputable?i.total:void 0,l=a-r,c=n(l),d=a<=o;r=a;const h={loaded:a,total:o,progress:o?a/o:void 0,bytes:l,rate:c||void 0,estimated:c&&o&&d?(o-a)/c:void 0,event:i,lengthComputable:o!=null,[e?"download":"upload"]:!0};t(h)},s)},Hr=(t,e)=>{const s=t!=null;return[r=>e[0]({lengthComputable:s,total:t,loaded:r}),e[1]]},Vr=t=>(...e)=>f.asap(()=>t(...e)),ro=Y.hasStandardBrowserEnv?((t,e)=>s=>(s=new URL(s,Y.origin),t.protocol===s.protocol&&t.host===s.host&&(e||t.port===s.port)))(new URL(Y.origin),Y.navigator&&/(msie|trident)/i.test(Y.navigator.userAgent)):()=>!0,no=Y.hasStandardBrowserEnv?{write(t,e,s,r,n,i,a){if(typeof document>"u")return;const o=[`${t}=${encodeURIComponent(e)}`];f.isNumber(s)&&o.push(`expires=${new Date(s).toUTCString()}`),f.isString(r)&&o.push(`path=${r}`),f.isString(n)&&o.push(`domain=${n}`),i===!0&&o.push("secure"),f.isString(a)&&o.push(`SameSite=${a}`),document.cookie=o.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function io(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function ao(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function ti(t,e,s){let r=!io(e);return t&&(r||s==!1)?ao(t,e):e}const Kr=t=>t instanceof ie?{...t}:t;function dt(t,e){e=e||{};const s={};function r(c,d,h,g){return f.isPlainObject(c)&&f.isPlainObject(d)?f.merge.call({caseless:g},c,d):f.isPlainObject(d)?f.merge({},d):f.isArray(d)?d.slice():d}function n(c,d,h,g){if(f.isUndefined(d)){if(!f.isUndefined(c))return r(void 0,c,h,g)}else return r(c,d,h,g)}function i(c,d){if(!f.isUndefined(d))return r(void 0,d)}function a(c,d){if(f.isUndefined(d)){if(!f.isUndefined(c))return r(void 0,c)}else return r(void 0,d)}function o(c,d,h){if(h in e)return r(c,d);if(h in t)return r(void 0,c)}const l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:o,headers:(c,d,h)=>n(Kr(c),Kr(d),h,!0)};return f.forEach(Object.keys({...t,...e}),function(d){if(d==="__proto__"||d==="constructor"||d==="prototype")return;const h=f.hasOwnProp(l,d)?l[d]:n,g=h(t[d],e[d],d);f.isUndefined(g)&&h!==o||(s[d]=g)}),s}const si=t=>{const e=dt({},t);let{data:s,withXSRFToken:r,xsrfHeaderName:n,xsrfCookieName:i,headers:a,auth:o}=e;if(e.headers=a=ie.from(a),e.url=Gn(ti(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),o&&a.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):""))),f.isFormData(s)){if(Y.hasStandardBrowserEnv||Y.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(f.isFunction(s.getHeaders)){const l=s.getHeaders(),c=["content-type","content-length"];Object.entries(l).forEach(([d,h])=>{c.includes(d.toLowerCase())&&a.set(d,h)})}}if(Y.hasStandardBrowserEnv&&(r&&f.isFunction(r)&&(r=r(e)),r||r!==!1&&ro(e.url))){const l=n&&i&&no.read(i);l&&a.set(n,l)}return e},oo=typeof XMLHttpRequest<"u",uo=oo&&function(t){return new Promise(function(s,r){const n=si(t);let i=n.data;const a=ie.from(n.headers).normalize();let{responseType:o,onUploadProgress:l,onDownloadProgress:c}=n,d,h,g,_,p;function y(){_&&_(),p&&p(),n.cancelToken&&n.cancelToken.unsubscribe(d),n.signal&&n.signal.removeEventListener("abort",d)}let m=new XMLHttpRequest;m.open(n.method.toUpperCase(),n.url,!0),m.timeout=n.timeout;function O(){if(!m)return;const k=ie.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),M={data:!o||o==="text"||o==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:k,config:t,request:m};ei(function($){s($),y()},function($){r($),y()},M),m=null}"onloadend"in m?m.onloadend=O:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(O)},m.onabort=function(){m&&(r(new T("Request aborted",T.ECONNABORTED,t,m)),m=null)},m.onerror=function(S){const M=S&&S.message?S.message:"Network Error",q=new T(M,T.ERR_NETWORK,t,m);q.event=S||null,r(q),m=null},m.ontimeout=function(){let S=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const M=n.transitional||Or;n.timeoutErrorMessage&&(S=n.timeoutErrorMessage),r(new T(S,M.clarifyTimeoutError?T.ETIMEDOUT:T.ECONNABORTED,t,m)),m=null},i===void 0&&a.setContentType(null),"setRequestHeader"in m&&f.forEach(a.toJSON(),function(S,M){m.setRequestHeader(M,S)}),f.isUndefined(n.withCredentials)||(m.withCredentials=!!n.withCredentials),o&&o!=="json"&&(m.responseType=n.responseType),c&&([g,p]=bs(c,!0),m.addEventListener("progress",g)),l&&m.upload&&([h,_]=bs(l),m.upload.addEventListener("progress",h),m.upload.addEventListener("loadend",_)),(n.cancelToken||n.signal)&&(d=k=>{m&&(r(!k||k.type?new cs(null,t,m):k),m.abort(),m=null)},n.cancelToken&&n.cancelToken.subscribe(d),n.signal&&(n.signal.aborted?d():n.signal.addEventListener("abort",d)));const I=eo(n.url);if(I&&Y.protocols.indexOf(I)===-1){r(new T("Unsupported protocol "+I+":",T.ERR_BAD_REQUEST,t));return}m.send(i||null)})},co=(t,e)=>{const{length:s}=t=t?t.filter(Boolean):[];if(e||s){let r=new AbortController,n;const i=function(c){if(!n){n=!0,o();const d=c instanceof Error?c:this.reason;r.abort(d instanceof T?d:new cs(d instanceof Error?d.message:d))}};let a=e&&setTimeout(()=>{a=null,i(new T(`timeout of ${e}ms exceeded`,T.ETIMEDOUT))},e);const o=()=>{t&&(a&&clearTimeout(a),a=null,t.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),t=null)};t.forEach(c=>c.addEventListener("abort",i));const{signal:l}=r;return l.unsubscribe=()=>f.asap(o),l}},lo=function*(t,e){let s=t.byteLength;if(s<e){yield t;return}let r=0,n;for(;r<s;)n=r+e,yield t.slice(r,n),r=n},ho=async function*(t,e){for await(const s of fo(t))yield*lo(s,e)},fo=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:s,value:r}=await e.read();if(s)break;yield r}}finally{await e.cancel()}},Wr=(t,e,s,r)=>{const n=ho(t,e);let i=0,a,o=l=>{a||(a=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:d}=await n.next();if(c){o(),l.close();return}let h=d.byteLength;if(s){let g=i+=h;s(g)}l.enqueue(new Uint8Array(d))}catch(c){throw o(c),c}},cancel(l){return o(l),n.return()}},{highWaterMark:2})},Jr=64*1024,{isFunction:fs}=f,po=(({Request:t,Response:e})=>({Request:t,Response:e}))(f.global),{ReadableStream:Gr,TextEncoder:Xr}=f.global,Yr=(t,...e)=>{try{return!!t(...e)}catch{return!1}},mo=t=>{t=f.merge.call({skipUndefined:!0},po,t);const{fetch:e,Request:s,Response:r}=t,n=e?fs(e):typeof fetch=="function",i=fs(s),a=fs(r);if(!n)return!1;const o=n&&fs(Gr),l=n&&(typeof Xr=="function"?(p=>y=>p.encode(y))(new Xr):async p=>new Uint8Array(await new s(p).arrayBuffer())),c=i&&o&&Yr(()=>{let p=!1;const y=new s(Y.origin,{body:new Gr,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!y}),d=a&&o&&Yr(()=>f.isReadableStream(new r("").body)),h={stream:d&&(p=>p.body)};n&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!h[p]&&(h[p]=(y,m)=>{let O=y&&y[p];if(O)return O.call(y);throw new T(`Response type '${p}' is not supported`,T.ERR_NOT_SUPPORT,m)})});const g=async p=>{if(p==null)return 0;if(f.isBlob(p))return p.size;if(f.isSpecCompliantForm(p))return(await new s(Y.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(f.isArrayBufferView(p)||f.isArrayBuffer(p))return p.byteLength;if(f.isURLSearchParams(p)&&(p=p+""),f.isString(p))return(await l(p)).byteLength},_=async(p,y)=>{const m=f.toFiniteNumber(p.getContentLength());return m??g(y)};return async p=>{let{url:y,method:m,data:O,signal:I,cancelToken:k,timeout:S,onDownloadProgress:M,onUploadProgress:q,responseType:$,headers:U,withCredentials:Z="same-origin",fetchOptions:V}=si(p),me=e||fetch;$=$?($+"").toLowerCase():"text";let Se=co([I,k&&k.toAbortSignal()],S),Ne=null;const ce=Se&&Se.unsubscribe&&(()=>{Se.unsubscribe()});let Ye;try{if(q&&c&&m!=="get"&&m!=="head"&&(Ye=await _(U,O))!==0){let Fe=new s(y,{method:"POST",body:O,duplex:"half"}),yt;if(f.isFormData(O)&&(yt=Fe.headers.get("content-type"))&&U.setContentType(yt),Fe.body){const[Ds,ds]=Hr(Ye,bs(Vr(q)));O=Wr(Fe.body,Jr,Ds,ds)}}f.isString(Z)||(Z=Z?"include":"omit");const te=i&&"credentials"in s.prototype,jr={...V,signal:Se,method:m.toUpperCase(),headers:U.normalize().toJSON(),body:O,duplex:"half",credentials:te?Z:void 0};Ne=i&&new s(y,jr);let Ie=await(i?me(Ne,V):me(y,jr));const Mr=d&&($==="stream"||$==="response");if(d&&(M||Mr&&ce)){const Fe={};["status","statusText","headers"].forEach(Ur=>{Fe[Ur]=Ie[Ur]});const yt=f.toFiniteNumber(Ie.headers.get("content-length")),[Ds,ds]=M&&Hr(yt,bs(Vr(M),!0))||[];Ie=new r(Wr(Ie.body,Jr,Ds,()=>{ds&&ds(),ce&&ce()}),Fe)}$=$||"text";let $i=await h[f.findKey(h,$)||"text"](Ie,p);return!Mr&&ce&&ce(),await new Promise((Fe,yt)=>{ei(Fe,yt,{data:$i,headers:ie.from(Ie.headers),status:Ie.status,statusText:Ie.statusText,config:p,request:Ne})})}catch(te){throw ce&&ce(),te&&te.name==="TypeError"&&/Load failed|fetch/i.test(te.message)?Object.assign(new T("Network Error",T.ERR_NETWORK,p,Ne,te&&te.response),{cause:te.cause||te}):T.from(te,te&&te.code,p,Ne,te&&te.response)}}},yo=new Map,ri=t=>{let e=t&&t.env||{};const{fetch:s,Request:r,Response:n}=e,i=[r,n,s];let a=i.length,o=a,l,c,d=yo;for(;o--;)l=i[o],c=d.get(l),c===void 0&&d.set(l,c=o?new Map:mo(e)),d=c;return c};ri();const kr={http:Na,xhr:uo,fetch:{get:ri}};f.forEach(kr,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const en=t=>`- ${t}`,go=t=>f.isFunction(t)||t===null||t===!1;function vo(t,e){t=f.isArray(t)?t:[t];const{length:s}=t;let r,n;const i={};for(let a=0;a<s;a++){r=t[a];let o;if(n=r,!go(r)&&(n=kr[(o=String(r)).toLowerCase()],n===void 0))throw new T(`Unknown adapter '${o}'`);if(n&&(f.isFunction(n)||(n=n.get(e))))break;i[o||"#"+a]=n}if(!n){const a=Object.entries(i).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let o=s?a.length>1?`since :
`+a.map(en).join(`
`):" "+en(a[0]):"as no adapter specified";throw new T("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return n}const ni={getAdapter:vo,adapters:kr};function Qs(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new cs(null,t)}function tn(t){return Qs(t),t.headers=ie.from(t.headers),t.data=Ls.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),ni.getAdapter(t.adapter||us.adapter,t)(t).then(function(r){return Qs(t),r.data=Ls.call(t,t.transformResponse,r),r.headers=ie.from(r.headers),r},function(r){return Yn(r)||(Qs(t),r&&r.response&&(r.response.data=Ls.call(t,t.transformResponse,r.response),r.response.headers=ie.from(r.response.headers))),Promise.reject(r)})}const ii="1.13.6",As={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{As[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const sn={};As.transitional=function(e,s,r){function n(i,a){return"[Axios v"+ii+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,o)=>{if(e===!1)throw new T(n(a," has been removed"+(s?" in "+s:"")),T.ERR_DEPRECATED);return s&&!sn[a]&&(sn[a]=!0),e?e(i,a,o):!0}};As.spelling=function(e){return(s,r)=>!0};function bo(t,e,s){if(typeof t!="object")throw new T("options must be an object",T.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let n=r.length;for(;n-- >0;){const i=r[n],a=e[i];if(a){const o=t[i],l=o===void 0||a(o,i,t);if(l!==!0)throw new T("option "+i+" must be "+l,T.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new T("Unknown option "+i,T.ERR_BAD_OPTION)}}const gs={assertOptions:bo,validators:As},le=gs.validators;let lt=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Zr,response:new Zr}}async request(e,s){try{return await this._request(e,s)}catch(r){if(r instanceof Error){let n={};Error.captureStackTrace?Error.captureStackTrace(n):n=new Error;const i=n.stack?n.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
`+i):r.stack=i}catch{}}throw r}}_request(e,s){typeof e=="string"?(s=s||{},s.url=e):s=e||{},s=dt(this.defaults,s);const{transitional:r,paramsSerializer:n,headers:i}=s;r!==void 0&&gs.assertOptions(r,{silentJSONParsing:le.transitional(le.boolean),forcedJSONParsing:le.transitional(le.boolean),clarifyTimeoutError:le.transitional(le.boolean),legacyInterceptorReqResOrdering:le.transitional(le.boolean)},!1),n!=null&&(f.isFunction(n)?s.paramsSerializer={serialize:n}:gs.assertOptions(n,{encode:le.function,serialize:le.function},!0)),s.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?s.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:s.allowAbsoluteUrls=!0),gs.assertOptions(s,{baseUrl:le.spelling("baseURL"),withXsrfToken:le.spelling("withXSRFToken")},!0),s.method=(s.method||this.defaults.method||"get").toLowerCase();let a=i&&f.merge(i.common,i[s.method]);i&&f.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),s.headers=ie.concat(a,i);const o=[];let l=!0;this.interceptors.request.forEach(function(y){if(typeof y.runWhen=="function"&&y.runWhen(s)===!1)return;l=l&&y.synchronous;const m=s.transitional||Or;m&&m.legacyInterceptorReqResOrdering?o.unshift(y.fulfilled,y.rejected):o.push(y.fulfilled,y.rejected)});const c=[];this.interceptors.response.forEach(function(y){c.push(y.fulfilled,y.rejected)});let d,h=0,g;if(!l){const p=[tn.bind(this),void 0];for(p.unshift(...o),p.push(...c),g=p.length,d=Promise.resolve(s);h<g;)d=d.then(p[h++],p[h++]);return d}g=o.length;let _=s;for(;h<g;){const p=o[h++],y=o[h++];try{_=p(_)}catch(m){y.call(this,m);break}}try{d=tn.call(this,_)}catch(p){return Promise.reject(p)}for(h=0,g=c.length;h<g;)d=d.then(c[h++],c[h++]);return d}getUri(e){e=dt(this.defaults,e);const s=ti(e.baseURL,e.url,e.allowAbsoluteUrls);return Gn(s,e.params,e.paramsSerializer)}};f.forEach(["delete","get","head","options"],function(e){lt.prototype[e]=function(s,r){return this.request(dt(r||{},{method:e,url:s,data:(r||{}).data}))}});f.forEach(["post","put","patch"],function(e){function s(r){return function(i,a,o){return this.request(dt(o||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}lt.prototype[e]=s(),lt.prototype[e+"Form"]=s(!0)});let _o=class ai{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let s;this.promise=new Promise(function(i){s=i});const r=this;this.promise.then(n=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](n);r._listeners=null}),this.promise.then=n=>{let i;const a=new Promise(o=>{r.subscribe(o),i=o}).then(n);return a.cancel=function(){r.unsubscribe(i)},a},e(function(i,a,o){r.reason||(r.reason=new cs(i,a,o),s(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const s=this._listeners.indexOf(e);s!==-1&&this._listeners.splice(s,1)}toAbortSignal(){const e=new AbortController,s=r=>{e.abort(r)};return this.subscribe(s),e.signal.unsubscribe=()=>this.unsubscribe(s),e.signal}static source(){let e;return{token:new ai(function(n){e=n}),cancel:e}}};function wo(t){return function(s){return t.apply(null,s)}}function xo(t){return f.isObject(t)&&t.isAxiosError===!0}const zs={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(zs).forEach(([t,e])=>{zs[e]=t});function oi(t){const e=new lt(t),s=Qn(lt.prototype.request,e);return f.extend(s,lt.prototype,e,{allOwnKeys:!0}),f.extend(s,e,null,{allOwnKeys:!0}),s.create=function(n){return oi(dt(t,n))},s}const W=oi(us);W.Axios=lt;W.CanceledError=cs;W.CancelToken=_o;W.isCancel=Yn;W.VERSION=ii;W.toFormData=Ts;W.AxiosError=T;W.Cancel=W.CanceledError;W.all=function(e){return Promise.all(e)};W.spread=wo;W.isAxiosError=xo;W.mergeConfig=dt;W.AxiosHeaders=ie;W.formToJSON=t=>Xn(f.isHTMLForm(t)?new FormData(t):t);W.getAdapter=ni.getAdapter;W.HttpStatusCode=zs;W.default=W;const{Axios:Hu,AxiosError:Vu,CanceledError:Ku,isCancel:Wu,CancelToken:Ju,VERSION:Gu,all:Xu,Cancel:Yu,isAxiosError:ec,spread:tc,toFormData:sc,AxiosHeaders:rc,HttpStatusCode:nc,formToJSON:ic,getAdapter:ac,mergeConfig:oc}=W;var mt=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},tt,Me,vt,kn,So=(kn=class extends mt{constructor(){super();x(this,tt);x(this,Me);x(this,vt);v(this,vt,e=>{if(typeof window<"u"&&window.addEventListener){const s=()=>e();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){u(this,Me)||this.setEventListener(u(this,vt))}onUnsubscribe(){var e;this.hasListeners()||((e=u(this,Me))==null||e.call(this),v(this,Me,void 0))}setEventListener(e){var s;v(this,vt,e),(s=u(this,Me))==null||s.call(this),v(this,Me,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){u(this,tt)!==e&&(v(this,tt,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(s=>{s(e)})}isFocused(){var e;return typeof u(this,tt)=="boolean"?u(this,tt):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},tt=new WeakMap,Me=new WeakMap,vt=new WeakMap,kn),Ps=new So,Ro={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},Ue,xr,Cn,Oo=(Cn=class{constructor(){x(this,Ue,Ro);x(this,xr,!1)}setTimeoutProvider(t){v(this,Ue,t)}setTimeout(t,e){return u(this,Ue).setTimeout(t,e)}clearTimeout(t){u(this,Ue).clearTimeout(t)}setInterval(t,e){return u(this,Ue).setInterval(t,e)}clearInterval(t){u(this,Ue).clearInterval(t)}},Ue=new WeakMap,xr=new WeakMap,Cn),Ve=new Oo;function Eo(t){setTimeout(t,0)}var ui=typeof window>"u"||"Deno"in globalThis;function H(){}function ko(t,e){return typeof t=="function"?t(e):t}function Hs(t){return typeof t=="number"&&t>=0&&t!==1/0}function ci(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Ke(t,e){return typeof t=="function"?t(e):t}function fe(t,e){return typeof t=="function"?t(e):t}function Vs(t,e){const{type:s="all",exact:r,fetchStatus:n,predicate:i,queryKey:a,stale:o}=t;if(a){if(r){if(e.queryHash!==Cr(a,e.options))return!1}else if(!Ft(e.queryKey,a))return!1}if(s!=="all"){const l=e.isActive();if(s==="active"&&!l||s==="inactive"&&l)return!1}return!(typeof o=="boolean"&&e.isStale()!==o||n&&n!==e.state.fetchStatus||i&&!i(e))}function Ks(t,e){const{exact:s,status:r,predicate:n,mutationKey:i}=t;if(i){if(!e.options.mutationKey)return!1;if(s){if(Je(e.options.mutationKey)!==Je(i))return!1}else if(!Ft(e.options.mutationKey,i))return!1}return!(r&&e.state.status!==r||n&&!n(e))}function Cr(t,e){return((e==null?void 0:e.queryKeyHashFn)||Je)(t)}function Je(t){return JSON.stringify(t,(e,s)=>Ws(s)?Object.keys(s).sort().reduce((r,n)=>(r[n]=s[n],r),{}):s)}function Ft(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(s=>Ft(t[s],e[s])):!1}var Co=Object.prototype.hasOwnProperty;function ls(t,e,s=0){if(t===e)return t;if(s>500)return e;const r=rn(t)&&rn(e);if(!r&&!(Ws(t)&&Ws(e)))return e;const i=(r?t:Object.keys(t)).length,a=r?e:Object.keys(e),o=a.length,l=r?new Array(o):{};let c=0;for(let d=0;d<o;d++){const h=r?d:a[d],g=t[h],_=e[h];if(g===_){l[h]=g,(r?d<i:Co.call(t,h))&&c++;continue}if(g===null||_===null||typeof g!="object"||typeof _!="object"){l[h]=_;continue}const p=ls(g,_,s+1);l[h]=p,p===g&&c++}return i===o&&c===i?t:l}function Ht(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const s in t)if(t[s]!==e[s])return!1;return!0}function rn(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Ws(t){if(!nn(t))return!1;const e=t.constructor;if(e===void 0)return!0;const s=e.prototype;return!(!nn(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function nn(t){return Object.prototype.toString.call(t)==="[object Object]"}function To(t){return new Promise(e=>{Ve.setTimeout(e,t)})}function Js(t,e,s){return typeof s.structuralSharing=="function"?s.structuralSharing(t,e):s.structuralSharing!==!1?ls(t,e):e}function Ao(t){return t}function li(t,e,s=0){const r=[...t,e];return s&&r.length>s?r.slice(1):r}function Po(t,e,s=0){const r=[e,...t];return s&&r.length>s?r.slice(0,-1):r}var Ns=Symbol();function di(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===Ns?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function Is(t,e){return typeof t=="function"?t(...e):!!t}function hi(t,e,s){let r=!1,n;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(n??(n=e()),r||(r=!0,n.aborted?s():n.addEventListener("abort",s,{once:!0})),n)}),t}var Dt=(()=>{let t=()=>ui;return{isServer(){return t()},setIsServer(e){t=e}}})();function Gs(){let t,e;const s=new Promise((n,i)=>{t=n,e=i});s.status="pending",s.catch(()=>{});function r(n){Object.assign(s,n),delete s.resolve,delete s.reject}return s.resolve=n=>{r({status:"fulfilled",value:n}),t(n)},s.reject=n=>{r({status:"rejected",reason:n}),e(n)},s}function No(t){var s;let e;if((s=t.then(r=>(e=r,r),H))==null||s.catch(H),e!==void 0)return{data:e}}function fi(t){return t}function Io(t){return{mutationKey:t.options.mutationKey,state:t.state,...t.options.scope&&{scope:t.options.scope},...t.meta&&{meta:t.meta}}}function Fo(t,e,s){const r=()=>{var i;const n=(i=t.promise)==null?void 0:i.then(e).catch(a=>s(a)?Promise.reject(new Error("redacted")):Promise.reject(a));return n==null||n.catch(H),n};return{dehydratedAt:Date.now(),state:{...t.state,...t.state.data!==void 0&&{data:e(t.state.data)}},queryKey:t.queryKey,queryHash:t.queryHash,...t.state.status==="pending"&&{promise:r()},...t.meta&&{meta:t.meta}}}function pi(t){return t.state.isPaused}function mi(t){return t.state.status==="success"}function Do(t){return!0}function jo(t,e={}){var l,c,d,h;const s=e.shouldDehydrateMutation??((l=t.getDefaultOptions().dehydrate)==null?void 0:l.shouldDehydrateMutation)??pi,r=t.getMutationCache().getAll().flatMap(g=>s(g)?[Io(g)]:[]),n=e.shouldDehydrateQuery??((c=t.getDefaultOptions().dehydrate)==null?void 0:c.shouldDehydrateQuery)??mi,i=e.shouldRedactErrors??((d=t.getDefaultOptions().dehydrate)==null?void 0:d.shouldRedactErrors)??Do,a=e.serializeData??((h=t.getDefaultOptions().dehydrate)==null?void 0:h.serializeData)??fi,o=t.getQueryCache().getAll().flatMap(g=>n(g)?[Fo(g,a,i)]:[]);return{mutations:r,queries:o}}function Xs(t,e,s){var l,c;if(typeof e!="object"||e===null)return;const r=t.getMutationCache(),n=t.getQueryCache(),i=((l=s==null?void 0:s.defaultOptions)==null?void 0:l.deserializeData)??((c=t.getDefaultOptions().hydrate)==null?void 0:c.deserializeData)??fi,a=e.mutations||[],o=e.queries||[];a.forEach(({state:d,...h})=>{var g,_;r.build(t,{...(g=t.getDefaultOptions().hydrate)==null?void 0:g.mutations,...(_=s==null?void 0:s.defaultOptions)==null?void 0:_.mutations,...h},d)}),o.forEach(({queryKey:d,state:h,queryHash:g,meta:_,promise:p,dehydratedAt:y})=>{var q,$;const m=p?No(p):void 0,O=h.data===void 0?m==null?void 0:m.data:h.data,I=O===void 0?O:i(O);let k=n.get(g);const S=(k==null?void 0:k.state.status)==="pending",M=(k==null?void 0:k.state.fetchStatus)==="fetching";if(k){const U=m&&y!==void 0&&y>k.state.dataUpdatedAt;if(h.dataUpdatedAt>k.state.dataUpdatedAt||U){const{fetchStatus:Z,...V}=h;k.setState({...V,data:I})}}else k=n.build(t,{...(q=t.getDefaultOptions().hydrate)==null?void 0:q.queries,...($=s==null?void 0:s.defaultOptions)==null?void 0:$.queries,queryKey:d,queryHash:g,meta:_},{...h,data:I,fetchStatus:"idle",status:I!==void 0?"success":h.status});p&&!S&&!M&&(y===void 0||y>k.state.dataUpdatedAt)&&k.fetch(void 0,{initialPromise:Promise.resolve(p).then(i)}).catch(H)})}var yi=Eo;function Mo(){let t=[],e=0,s=o=>{o()},r=o=>{o()},n=yi;const i=o=>{e?t.push(o):n(()=>{s(o)})},a=()=>{const o=t;t=[],o.length&&n(()=>{r(()=>{o.forEach(l=>{s(l)})})})};return{batch:o=>{let l;e++;try{l=o()}finally{e--,e||a()}return l},batchCalls:o=>(...l)=>{i(()=>{o(...l)})},schedule:i,setNotifyFunction:o=>{s=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{n=o}}}var B=Mo(),bt,Le,_t,Tn,Uo=(Tn=class extends mt{constructor(){super();x(this,bt,!0);x(this,Le);x(this,_t);v(this,_t,e=>{if(typeof window<"u"&&window.addEventListener){const s=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",r)}}})}onSubscribe(){u(this,Le)||this.setEventListener(u(this,_t))}onUnsubscribe(){var e;this.hasListeners()||((e=u(this,Le))==null||e.call(this),v(this,Le,void 0))}setEventListener(e){var s;v(this,_t,e),(s=u(this,Le))==null||s.call(this),v(this,Le,e(this.setOnline.bind(this)))}setOnline(e){u(this,bt)!==e&&(v(this,bt,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return u(this,bt)}},bt=new WeakMap,Le=new WeakMap,_t=new WeakMap,Tn),Vt=new Uo;function Lo(t){return Math.min(1e3*2**t,3e4)}function gi(t){return(t??"online")==="online"?Vt.isOnline():!0}var Kt=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function Qo(t){return t instanceof Kt}function vi(t){let e=!1,s=0,r;const n=Gs(),i=()=>n.status!=="pending",a=y=>{var m;if(!i()){const O=new Kt(y);g(O),(m=t.onCancel)==null||m.call(t,O)}},o=()=>{e=!0},l=()=>{e=!1},c=()=>Ps.isFocused()&&(t.networkMode==="always"||Vt.isOnline())&&t.canRun(),d=()=>gi(t.networkMode)&&t.canRun(),h=y=>{i()||(r==null||r(),n.resolve(y))},g=y=>{i()||(r==null||r(),n.reject(y))},_=()=>new Promise(y=>{var m;r=O=>{(i()||c())&&y(O)},(m=t.onPause)==null||m.call(t)}).then(()=>{var y;r=void 0,i()||(y=t.onContinue)==null||y.call(t)}),p=()=>{if(i())return;let y;const m=s===0?t.initialPromise:void 0;try{y=m??t.fn()}catch(O){y=Promise.reject(O)}Promise.resolve(y).then(h).catch(O=>{var q;if(i())return;const I=t.retry??(Dt.isServer()?0:3),k=t.retryDelay??Lo,S=typeof k=="function"?k(s,O):k,M=I===!0||typeof I=="number"&&s<I||typeof I=="function"&&I(s,O);if(e||!M){g(O);return}s++,(q=t.onFail)==null||q.call(t,s,O),To(S).then(()=>c()?void 0:_()).then(()=>{e?g(O):p()})})};return{promise:n,status:()=>n.status,cancel:a,continue:()=>(r==null||r(),n),cancelRetry:o,continueRetry:l,canStart:d,start:()=>(d()?p():_().then(p),n)}}var st,An,bi=(An=class{constructor(){x(this,st)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Hs(this.gcTime)&&v(this,st,Ve.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Dt.isServer()?1/0:300*1e3))}clearGcTimeout(){u(this,st)&&(Ve.clearTimeout(u(this,st)),v(this,st,void 0))}},st=new WeakMap,An),rt,wt,de,nt,J,Jt,it,oe,wi,Re,Pn,_i=(Pn=class extends bi{constructor(e){super();x(this,oe);x(this,rt);x(this,wt);x(this,de);x(this,nt);x(this,J);x(this,Jt);x(this,it);v(this,it,!1),v(this,Jt,e.defaultOptions),this.setOptions(e.options),this.observers=[],v(this,nt,e.client),v(this,de,u(this,nt).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,v(this,rt,on(this.options)),this.state=e.state??u(this,rt),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=u(this,J))==null?void 0:e.promise}setOptions(e){if(this.options={...u(this,Jt),...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=on(this.options);s.data!==void 0&&(this.setState(an(s.data,s.dataUpdatedAt)),v(this,rt,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&u(this,de).remove(this)}setData(e,s){const r=Js(this.state.data,e,this.options);return C(this,oe,Re).call(this,{data:r,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),r}setState(e,s){C(this,oe,Re).call(this,{type:"setState",state:e,setStateOptions:s})}cancel(e){var r,n;const s=(r=u(this,J))==null?void 0:r.promise;return(n=u(this,J))==null||n.cancel(e),s?s.then(H).catch(H):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return u(this,rt)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>fe(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ns||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Ke(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!ci(this.state.dataUpdatedAt,e)}onFocus(){var s;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(s=u(this,J))==null||s.continue()}onOnline(){var s;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(s=u(this,J))==null||s.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),u(this,de).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(s=>s!==e),this.observers.length||(u(this,J)&&(u(this,it)||C(this,oe,wi).call(this)?u(this,J).cancel({revert:!0}):u(this,J).cancelRetry()),this.scheduleGc()),u(this,de).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||C(this,oe,Re).call(this,{type:"invalidate"})}async fetch(e,s){var l,c,d,h,g,_,p,y,m,O,I,k;if(this.state.fetchStatus!=="idle"&&((l=u(this,J))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(u(this,J))return u(this,J).continueRetry(),u(this,J).promise}if(e&&this.setOptions(e),!this.options.queryFn){const S=this.observers.find(M=>M.options.queryFn);S&&this.setOptions(S.options)}const r=new AbortController,n=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(v(this,it,!0),r.signal)})},i=()=>{const S=di(this.options,s),q=(()=>{const $={client:u(this,nt),queryKey:this.queryKey,meta:this.meta};return n($),$})();return v(this,it,!1),this.options.persister?this.options.persister(S,q,this):S(q)},o=(()=>{const S={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:u(this,nt),state:this.state,fetchFn:i};return n(S),S})();(c=this.options.behavior)==null||c.onFetch(o,this),v(this,wt,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=o.fetchOptions)==null?void 0:d.meta))&&C(this,oe,Re).call(this,{type:"fetch",meta:(h=o.fetchOptions)==null?void 0:h.meta}),v(this,J,vi({initialPromise:s==null?void 0:s.initialPromise,fn:o.fetchFn,onCancel:S=>{S instanceof Kt&&S.revert&&this.setState({...u(this,wt),fetchStatus:"idle"}),r.abort()},onFail:(S,M)=>{C(this,oe,Re).call(this,{type:"failed",failureCount:S,error:M})},onPause:()=>{C(this,oe,Re).call(this,{type:"pause"})},onContinue:()=>{C(this,oe,Re).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const S=await u(this,J).start();if(S===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(S),(_=(g=u(this,de).config).onSuccess)==null||_.call(g,S,this),(y=(p=u(this,de).config).onSettled)==null||y.call(p,S,this.state.error,this),S}catch(S){if(S instanceof Kt){if(S.silent)return u(this,J).promise;if(S.revert){if(this.state.data===void 0)throw S;return this.state.data}}throw C(this,oe,Re).call(this,{type:"error",error:S}),(O=(m=u(this,de).config).onError)==null||O.call(m,S,this),(k=(I=u(this,de).config).onSettled)==null||k.call(I,this.state.data,S,this),S}finally{this.scheduleGc()}}},rt=new WeakMap,wt=new WeakMap,de=new WeakMap,nt=new WeakMap,J=new WeakMap,Jt=new WeakMap,it=new WeakMap,oe=new WeakSet,wi=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Re=function(e){const s=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...xi(r.data,this.options),fetchMeta:e.meta??null};case"success":const n={...r,...an(e.data,e.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return v(this,wt,e.manual?n:void 0),n;case"error":const i=e.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,...e.state}}};this.state=s(this.state),B.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),u(this,de).notify({query:this,type:"updated",action:e})})},Pn);function xi(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:gi(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function an(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function on(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,s=e!==void 0,r=s?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:s?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var se,F,Gt,ee,at,xt,Oe,Qe,Xt,St,Rt,ot,ut,qe,Ot,Q,Zt,Ys,er,tr,sr,rr,nr,ir,Si,Nn,Bt=(Nn=class extends mt{constructor(e,s){super();x(this,Q);x(this,se);x(this,F);x(this,Gt);x(this,ee);x(this,at);x(this,xt);x(this,Oe);x(this,Qe);x(this,Xt);x(this,St);x(this,Rt);x(this,ot);x(this,ut);x(this,qe);x(this,Ot,new Set);this.options=s,v(this,se,e),v(this,Qe,null),v(this,Oe,Gs()),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(u(this,F).addObserver(this),un(u(this,F),this.options)?C(this,Q,Zt).call(this):this.updateResult(),C(this,Q,sr).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ar(u(this,F),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ar(u(this,F),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,C(this,Q,rr).call(this),C(this,Q,nr).call(this),u(this,F).removeObserver(this)}setOptions(e){const s=this.options,r=u(this,F);if(this.options=u(this,se).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof fe(this.options.enabled,u(this,F))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");C(this,Q,ir).call(this),u(this,F).setOptions(this.options),s._defaulted&&!Ht(this.options,s)&&u(this,se).getQueryCache().notify({type:"observerOptionsUpdated",query:u(this,F),observer:this});const n=this.hasListeners();n&&cn(u(this,F),r,this.options,s)&&C(this,Q,Zt).call(this),this.updateResult(),n&&(u(this,F)!==r||fe(this.options.enabled,u(this,F))!==fe(s.enabled,u(this,F))||Ke(this.options.staleTime,u(this,F))!==Ke(s.staleTime,u(this,F)))&&C(this,Q,Ys).call(this);const i=C(this,Q,er).call(this);n&&(u(this,F)!==r||fe(this.options.enabled,u(this,F))!==fe(s.enabled,u(this,F))||i!==u(this,qe))&&C(this,Q,tr).call(this,i)}getOptimisticResult(e){const s=u(this,se).getQueryCache().build(u(this,se),e),r=this.createResult(s,e);return Bo(this,r)&&(v(this,ee,r),v(this,xt,this.options),v(this,at,u(this,F).state)),r}getCurrentResult(){return u(this,ee)}trackResult(e,s){return new Proxy(e,{get:(r,n)=>(this.trackProp(n),s==null||s(n),n==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&u(this,Oe).status==="pending"&&u(this,Oe).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,n))})}trackProp(e){u(this,Ot).add(e)}getCurrentQuery(){return u(this,F)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const s=u(this,se).defaultQueryOptions(e),r=u(this,se).getQueryCache().build(u(this,se),s);return r.fetch().then(()=>this.createResult(r,s))}fetch(e){return C(this,Q,Zt).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),u(this,ee)))}createResult(e,s){var Z;const r=u(this,F),n=this.options,i=u(this,ee),a=u(this,at),o=u(this,xt),c=e!==r?e.state:u(this,Gt),{state:d}=e;let h={...d},g=!1,_;if(s._optimisticResults){const V=this.hasListeners(),me=!V&&un(e,s),Se=V&&cn(e,r,s,n);(me||Se)&&(h={...h,...xi(d.data,e.options)}),s._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:p,errorUpdatedAt:y,status:m}=h;_=h.data;let O=!1;if(s.placeholderData!==void 0&&_===void 0&&m==="pending"){let V;i!=null&&i.isPlaceholderData&&s.placeholderData===(o==null?void 0:o.placeholderData)?(V=i.data,O=!0):V=typeof s.placeholderData=="function"?s.placeholderData((Z=u(this,Rt))==null?void 0:Z.state.data,u(this,Rt)):s.placeholderData,V!==void 0&&(m="success",_=Js(i==null?void 0:i.data,V,s),g=!0)}if(s.select&&_!==void 0&&!O)if(i&&_===(a==null?void 0:a.data)&&s.select===u(this,Xt))_=u(this,St);else try{v(this,Xt,s.select),_=s.select(_),_=Js(i==null?void 0:i.data,_,s),v(this,St,_),v(this,Qe,null)}catch(V){v(this,Qe,V)}u(this,Qe)&&(p=u(this,Qe),_=u(this,St),y=Date.now(),m="error");const I=h.fetchStatus==="fetching",k=m==="pending",S=m==="error",M=k&&I,q=_!==void 0,U={status:m,fetchStatus:h.fetchStatus,isPending:k,isSuccess:m==="success",isError:S,isInitialLoading:M,isLoading:M,data:_,dataUpdatedAt:h.dataUpdatedAt,error:p,errorUpdatedAt:y,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:h.dataUpdateCount>c.dataUpdateCount||h.errorUpdateCount>c.errorUpdateCount,isFetching:I,isRefetching:I&&!k,isLoadingError:S&&!q,isPaused:h.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:S&&q,isStale:Tr(e,s),refetch:this.refetch,promise:u(this,Oe),isEnabled:fe(s.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const V=U.data!==void 0,me=U.status==="error"&&!V,Se=Ye=>{me?Ye.reject(U.error):V&&Ye.resolve(U.data)},Ne=()=>{const Ye=v(this,Oe,U.promise=Gs());Se(Ye)},ce=u(this,Oe);switch(ce.status){case"pending":e.queryHash===r.queryHash&&Se(ce);break;case"fulfilled":(me||U.data!==ce.value)&&Ne();break;case"rejected":(!me||U.error!==ce.reason)&&Ne();break}}return U}updateResult(){const e=u(this,ee),s=this.createResult(u(this,F),this.options);if(v(this,at,u(this,F).state),v(this,xt,this.options),u(this,at).data!==void 0&&v(this,Rt,u(this,F)),Ht(s,e))return;v(this,ee,s);const r=()=>{if(!e)return!0;const{notifyOnChangeProps:n}=this.options,i=typeof n=="function"?n():n;if(i==="all"||!i&&!u(this,Ot).size)return!0;const a=new Set(i??u(this,Ot));return this.options.throwOnError&&a.add("error"),Object.keys(u(this,ee)).some(o=>{const l=o;return u(this,ee)[l]!==e[l]&&a.has(l)})};C(this,Q,Si).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&C(this,Q,sr).call(this)}},se=new WeakMap,F=new WeakMap,Gt=new WeakMap,ee=new WeakMap,at=new WeakMap,xt=new WeakMap,Oe=new WeakMap,Qe=new WeakMap,Xt=new WeakMap,St=new WeakMap,Rt=new WeakMap,ot=new WeakMap,ut=new WeakMap,qe=new WeakMap,Ot=new WeakMap,Q=new WeakSet,Zt=function(e){C(this,Q,ir).call(this);let s=u(this,F).fetch(this.options,e);return e!=null&&e.throwOnError||(s=s.catch(H)),s},Ys=function(){C(this,Q,rr).call(this);const e=Ke(this.options.staleTime,u(this,F));if(Dt.isServer()||u(this,ee).isStale||!Hs(e))return;const r=ci(u(this,ee).dataUpdatedAt,e)+1;v(this,ot,Ve.setTimeout(()=>{u(this,ee).isStale||this.updateResult()},r))},er=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(u(this,F)):this.options.refetchInterval)??!1},tr=function(e){C(this,Q,nr).call(this),v(this,qe,e),!(Dt.isServer()||fe(this.options.enabled,u(this,F))===!1||!Hs(u(this,qe))||u(this,qe)===0)&&v(this,ut,Ve.setInterval(()=>{(this.options.refetchIntervalInBackground||Ps.isFocused())&&C(this,Q,Zt).call(this)},u(this,qe)))},sr=function(){C(this,Q,Ys).call(this),C(this,Q,tr).call(this,C(this,Q,er).call(this))},rr=function(){u(this,ot)&&(Ve.clearTimeout(u(this,ot)),v(this,ot,void 0))},nr=function(){u(this,ut)&&(Ve.clearInterval(u(this,ut)),v(this,ut,void 0))},ir=function(){const e=u(this,se).getQueryCache().build(u(this,se),this.options);if(e===u(this,F))return;const s=u(this,F);v(this,F,e),v(this,Gt,e.state),this.hasListeners()&&(s==null||s.removeObserver(this),e.addObserver(this))},Si=function(e){B.batch(()=>{e.listeners&&this.listeners.forEach(s=>{s(u(this,ee))}),u(this,se).getQueryCache().notify({query:u(this,F),type:"observerResultsUpdated"})})},Nn);function qo(t,e){return fe(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function un(t,e){return qo(t,e)||t.state.data!==void 0&&ar(t,e,e.refetchOnMount)}function ar(t,e,s){if(fe(e.enabled,t)!==!1&&Ke(e.staleTime,t)!=="static"){const r=typeof s=="function"?s(t):s;return r==="always"||r!==!1&&Tr(t,e)}return!1}function cn(t,e,s,r){return(t!==e||fe(r.enabled,t)===!1)&&(!s.suspense||t.state.status!=="error")&&Tr(t,s)}function Tr(t,e){return fe(e.enabled,t)!==!1&&t.isStaleByTime(Ke(e.staleTime,t))}function Bo(t,e){return!Ht(t.getCurrentResult(),e)}function _s(t){return{onFetch:(e,s)=>{var d,h,g,_,p;const r=e.options,n=(g=(h=(d=e.fetchOptions)==null?void 0:d.meta)==null?void 0:h.fetchMore)==null?void 0:g.direction,i=((_=e.state.data)==null?void 0:_.pages)||[],a=((p=e.state.data)==null?void 0:p.pageParams)||[];let o={pages:[],pageParams:[]},l=0;const c=async()=>{let y=!1;const m=k=>{hi(k,()=>e.signal,()=>y=!0)},O=di(e.options,e.fetchOptions),I=async(k,S,M)=>{if(y)return Promise.reject();if(S==null&&k.pages.length)return Promise.resolve(k);const $=(()=>{const me={client:e.client,queryKey:e.queryKey,pageParam:S,direction:M?"backward":"forward",meta:e.options.meta};return m(me),me})(),U=await O($),{maxPages:Z}=e.options,V=M?Po:li;return{pages:V(k.pages,U,Z),pageParams:V(k.pageParams,S,Z)}};if(n&&i.length){const k=n==="backward",S=k?Ri:or,M={pages:i,pageParams:a},q=S(r,M);o=await I(M,q,k)}else{const k=t??i.length;do{const S=l===0?a[0]??r.initialPageParam:or(r,o);if(l>0&&S==null)break;o=await I(o,S),l++}while(l<k)}return o};e.options.persister?e.fetchFn=()=>{var y,m;return(m=(y=e.options).persister)==null?void 0:m.call(y,c,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},s)}:e.fetchFn=c}}}function or(t,{pages:e,pageParams:s}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,s[r],s):void 0}function Ri(t,{pages:e,pageParams:s}){var r;return e.length>0?(r=t.getPreviousPageParam)==null?void 0:r.call(t,e[0],e,s[0],s):void 0}function $o(t,e){return e?or(t,e)!=null:!1}function Zo(t,e){return!e||!t.getPreviousPageParam?!1:Ri(t,e)!=null}var Ar=class extends Bt{constructor(t,e){super(t,e)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(t){super.setOptions({...t,behavior:_s()})}getOptimisticResult(t){return t.behavior=_s(),super.getOptimisticResult(t)}fetchNextPage(t){return this.fetch({...t,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(t){return this.fetch({...t,meta:{fetchMore:{direction:"backward"}}})}createResult(t,e){var p,y;const{state:s}=t,r=super.createResult(t,e),{isFetching:n,isRefetching:i,isError:a,isRefetchError:o}=r,l=(y=(p=s.fetchMeta)==null?void 0:p.fetchMore)==null?void 0:y.direction,c=a&&l==="forward",d=n&&l==="forward",h=a&&l==="backward",g=n&&l==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:$o(e,s.data),hasPreviousPage:Zo(e,s.data),isFetchNextPageError:c,isFetchingNextPage:d,isFetchPreviousPageError:h,isFetchingPreviousPage:g,isRefetchError:o&&!c&&!h,isRefetching:i&&!d&&!g}}},Yt,ve,X,ct,be,De,In,Oi=(In=class extends bi{constructor(e){super();x(this,be);x(this,Yt);x(this,ve);x(this,X);x(this,ct);v(this,Yt,e.client),this.mutationId=e.mutationId,v(this,X,e.mutationCache),v(this,ve,[]),this.state=e.state||Ei(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){u(this,ve).includes(e)||(u(this,ve).push(e),this.clearGcTimeout(),u(this,X).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){v(this,ve,u(this,ve).filter(s=>s!==e)),this.scheduleGc(),u(this,X).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){u(this,ve).length||(this.state.status==="pending"?this.scheduleGc():u(this,X).remove(this))}continue(){var e;return((e=u(this,ct))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var a,o,l,c,d,h,g,_,p,y,m,O,I,k,S,M,q,$;const s=()=>{C(this,be,De).call(this,{type:"continue"})},r={client:u(this,Yt),meta:this.options.meta,mutationKey:this.options.mutationKey};v(this,ct,vi({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(U,Z)=>{C(this,be,De).call(this,{type:"failed",failureCount:U,error:Z})},onPause:()=>{C(this,be,De).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>u(this,X).canRun(this)}));const n=this.state.status==="pending",i=!u(this,ct).canStart();try{if(n)s();else{C(this,be,De).call(this,{type:"pending",variables:e,isPaused:i}),u(this,X).config.onMutate&&await u(this,X).config.onMutate(e,this,r);const Z=await((o=(a=this.options).onMutate)==null?void 0:o.call(a,e,r));Z!==this.state.context&&C(this,be,De).call(this,{type:"pending",context:Z,variables:e,isPaused:i})}const U=await u(this,ct).start();return await((c=(l=u(this,X).config).onSuccess)==null?void 0:c.call(l,U,e,this.state.context,this,r)),await((h=(d=this.options).onSuccess)==null?void 0:h.call(d,U,e,this.state.context,r)),await((_=(g=u(this,X).config).onSettled)==null?void 0:_.call(g,U,null,this.state.variables,this.state.context,this,r)),await((y=(p=this.options).onSettled)==null?void 0:y.call(p,U,null,e,this.state.context,r)),C(this,be,De).call(this,{type:"success",data:U}),U}catch(U){try{await((O=(m=u(this,X).config).onError)==null?void 0:O.call(m,U,e,this.state.context,this,r))}catch(Z){Promise.reject(Z)}try{await((k=(I=this.options).onError)==null?void 0:k.call(I,U,e,this.state.context,r))}catch(Z){Promise.reject(Z)}try{await((M=(S=u(this,X).config).onSettled)==null?void 0:M.call(S,void 0,U,this.state.variables,this.state.context,this,r))}catch(Z){Promise.reject(Z)}try{await(($=(q=this.options).onSettled)==null?void 0:$.call(q,void 0,U,e,this.state.context,r))}catch(Z){Promise.reject(Z)}throw C(this,be,De).call(this,{type:"error",error:U}),U}finally{u(this,X).runNext(this)}}},Yt=new WeakMap,ve=new WeakMap,X=new WeakMap,ct=new WeakMap,be=new WeakSet,De=function(e){const s=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=s(this.state),B.batch(()=>{u(this,ve).forEach(r=>{r.onMutationUpdate(e)}),u(this,X).notify({mutation:this,type:"updated",action:e})})},In);function Ei(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ee,ye,es,Fn,ki=(Fn=class extends mt{constructor(e={}){super();x(this,Ee);x(this,ye);x(this,es);this.config=e,v(this,Ee,new Set),v(this,ye,new Map),v(this,es,0)}build(e,s,r){const n=new Oi({client:e,mutationCache:this,mutationId:++hs(this,es)._,options:e.defaultMutationOptions(s),state:r});return this.add(n),n}add(e){u(this,Ee).add(e);const s=ps(e);if(typeof s=="string"){const r=u(this,ye).get(s);r?r.push(e):u(this,ye).set(s,[e])}this.notify({type:"added",mutation:e})}remove(e){if(u(this,Ee).delete(e)){const s=ps(e);if(typeof s=="string"){const r=u(this,ye).get(s);if(r)if(r.length>1){const n=r.indexOf(e);n!==-1&&r.splice(n,1)}else r[0]===e&&u(this,ye).delete(s)}}this.notify({type:"removed",mutation:e})}canRun(e){const s=ps(e);if(typeof s=="string"){const r=u(this,ye).get(s),n=r==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===e}else return!0}runNext(e){var r;const s=ps(e);if(typeof s=="string"){const n=(r=u(this,ye).get(s))==null?void 0:r.find(i=>i!==e&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}else return Promise.resolve()}clear(){B.batch(()=>{u(this,Ee).forEach(e=>{this.notify({type:"removed",mutation:e})}),u(this,Ee).clear(),u(this,ye).clear()})}getAll(){return Array.from(u(this,Ee))}find(e){const s={exact:!0,...e};return this.getAll().find(r=>Ks(s,r))}findAll(e={}){return this.getAll().filter(s=>Ks(e,s))}notify(e){B.batch(()=>{this.listeners.forEach(s=>{s(e)})})}resumePausedMutations(){const e=this.getAll().filter(s=>s.state.isPaused);return B.batch(()=>Promise.all(e.map(s=>s.continue().catch(H))))}},Ee=new WeakMap,ye=new WeakMap,es=new WeakMap,Fn);function ps(t){var e;return(e=t.options.scope)==null?void 0:e.id}var ke,Be,re,Ce,Ae,vs,ur,Dn,Ci=(Dn=class extends mt{constructor(e,s){super();x(this,Ae);x(this,ke);x(this,Be);x(this,re);x(this,Ce);v(this,ke,e),this.setOptions(s),this.bindMethods(),C(this,Ae,vs).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var r;const s=this.options;this.options=u(this,ke).defaultMutationOptions(e),Ht(this.options,s)||u(this,ke).getMutationCache().notify({type:"observerOptionsUpdated",mutation:u(this,re),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&Je(s.mutationKey)!==Je(this.options.mutationKey)?this.reset():((r=u(this,re))==null?void 0:r.state.status)==="pending"&&u(this,re).setOptions(this.options)}onUnsubscribe(){var e;this.hasListeners()||(e=u(this,re))==null||e.removeObserver(this)}onMutationUpdate(e){C(this,Ae,vs).call(this),C(this,Ae,ur).call(this,e)}getCurrentResult(){return u(this,Be)}reset(){var e;(e=u(this,re))==null||e.removeObserver(this),v(this,re,void 0),C(this,Ae,vs).call(this),C(this,Ae,ur).call(this)}mutate(e,s){var r;return v(this,Ce,s),(r=u(this,re))==null||r.removeObserver(this),v(this,re,u(this,ke).getMutationCache().build(u(this,ke),this.options)),u(this,re).addObserver(this),u(this,re).execute(e)}},ke=new WeakMap,Be=new WeakMap,re=new WeakMap,Ce=new WeakMap,Ae=new WeakSet,vs=function(){var s;const e=((s=u(this,re))==null?void 0:s.state)??Ei();v(this,Be,{...e,isPending:e.status==="pending",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset})},ur=function(e){B.batch(()=>{var s,r,n,i,a,o,l,c;if(u(this,Ce)&&this.hasListeners()){const d=u(this,Be).variables,h=u(this,Be).context,g={client:u(this,ke),meta:this.options.meta,mutationKey:this.options.mutationKey};if((e==null?void 0:e.type)==="success"){try{(r=(s=u(this,Ce)).onSuccess)==null||r.call(s,e.data,d,h,g)}catch(_){Promise.reject(_)}try{(i=(n=u(this,Ce)).onSettled)==null||i.call(n,e.data,null,d,h,g)}catch(_){Promise.reject(_)}}else if((e==null?void 0:e.type)==="error"){try{(o=(a=u(this,Ce)).onError)==null||o.call(a,e.error,d,h,g)}catch(_){Promise.reject(_)}try{(c=(l=u(this,Ce)).onSettled)==null||c.call(l,void 0,e.error,d,h,g)}catch(_){Promise.reject(_)}}}this.listeners.forEach(d=>{d(u(this,Be))})})},Dn);function ln(t,e){const s=new Set(e);return t.filter(r=>!s.has(r))}function zo(t,e,s){const r=t.slice(0);return r[e]=s,r}var Et,ae,kt,Ct,he,$e,ts,ss,rs,ns,G,cr,lr,dr,hr,fr,jn,Ti=(jn=class extends mt{constructor(e,s,r){super();x(this,G);x(this,Et);x(this,ae);x(this,kt);x(this,Ct);x(this,he);x(this,$e);x(this,ts);x(this,ss);x(this,rs);x(this,ns,[]);v(this,Et,e),v(this,Ct,r),v(this,kt,[]),v(this,he,[]),v(this,ae,[]),this.setQueries(s)}onSubscribe(){this.listeners.size===1&&u(this,he).forEach(e=>{e.subscribe(s=>{C(this,G,hr).call(this,e,s)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,u(this,he).forEach(e=>{e.destroy()})}setQueries(e,s){v(this,kt,e),v(this,Ct,s),B.batch(()=>{const r=u(this,he),n=C(this,G,dr).call(this,u(this,kt));n.forEach(h=>h.observer.setOptions(h.defaultedQueryOptions));const i=n.map(h=>h.observer),a=i.map(h=>h.getCurrentResult()),o=r.length!==i.length,l=i.some((h,g)=>h!==r[g]),c=o||l,d=c?!0:a.some((h,g)=>{const _=u(this,ae)[g];return!_||!Ht(h,_)});!c&&!d||(c&&(v(this,ns,n),v(this,he,i)),v(this,ae,a),this.hasListeners()&&(c&&(ln(r,i).forEach(h=>{h.destroy()}),ln(i,r).forEach(h=>{h.subscribe(g=>{C(this,G,hr).call(this,h,g)})})),C(this,G,fr).call(this)))})}getCurrentResult(){return u(this,ae)}getQueries(){return u(this,he).map(e=>e.getCurrentQuery())}getObservers(){return u(this,he)}getOptimisticResult(e,s){const r=C(this,G,dr).call(this,e),n=r.map(a=>a.observer.getOptimisticResult(a.defaultedQueryOptions)),i=r.map(a=>a.defaultedQueryOptions.queryHash);return[n,a=>C(this,G,lr).call(this,a??n,s,i),()=>C(this,G,cr).call(this,n,r)]}},Et=new WeakMap,ae=new WeakMap,kt=new WeakMap,Ct=new WeakMap,he=new WeakMap,$e=new WeakMap,ts=new WeakMap,ss=new WeakMap,rs=new WeakMap,ns=new WeakMap,G=new WeakSet,cr=function(e,s){return s.map((r,n)=>{const i=e[n];return r.defaultedQueryOptions.notifyOnChangeProps?i:r.observer.trackResult(i,a=>{s.forEach(o=>{o.observer.trackProp(a)})})})},lr=function(e,s,r){if(s){const n=u(this,rs),i=r!==void 0&&n!==void 0&&(n.length!==r.length||r.some((a,o)=>a!==n[o]));return(!u(this,$e)||u(this,ae)!==u(this,ss)||i||s!==u(this,ts))&&(v(this,ts,s),v(this,ss,u(this,ae)),r!==void 0&&v(this,rs,r),v(this,$e,ls(u(this,$e),s(e)))),u(this,$e)}return e},dr=function(e){const s=new Map;u(this,he).forEach(n=>{const i=n.options.queryHash;if(!i)return;const a=s.get(i);a?a.push(n):s.set(i,[n])});const r=[];return e.forEach(n=>{var l;const i=u(this,Et).defaultQueryOptions(n),o=((l=s.get(i.queryHash))==null?void 0:l.shift())??new Bt(u(this,Et),i);r.push({defaultedQueryOptions:i,observer:o})}),r},hr=function(e,s){const r=u(this,he).indexOf(e);r!==-1&&(v(this,ae,zo(u(this,ae),r,s)),C(this,G,fr).call(this))},fr=function(){var e;if(this.hasListeners()){const s=u(this,$e),r=C(this,G,cr).call(this,u(this,ae),u(this,ns)),n=C(this,G,lr).call(this,r,(e=u(this,Ct))==null?void 0:e.combine);s!==n&&B.batch(()=>{this.listeners.forEach(i=>{i(u(this,ae))})})}},jn),_e,Mn,Ai=(Mn=class extends mt{constructor(e={}){super();x(this,_e);this.config=e,v(this,_e,new Map)}build(e,s,r){const n=s.queryKey,i=s.queryHash??Cr(n,s);let a=this.get(i);return a||(a=new _i({client:e,queryKey:n,queryHash:i,options:e.defaultQueryOptions(s),state:r,defaultOptions:e.getQueryDefaults(n)}),this.add(a)),a}add(e){u(this,_e).has(e.queryHash)||(u(this,_e).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const s=u(this,_e).get(e.queryHash);s&&(e.destroy(),s===e&&u(this,_e).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){B.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return u(this,_e).get(e)}getAll(){return[...u(this,_e).values()]}find(e){const s={exact:!0,...e};return this.getAll().find(r=>Vs(s,r))}findAll(e={}){const s=this.getAll();return Object.keys(e).length>0?s.filter(r=>Vs(e,r)):s}notify(e){B.batch(()=>{this.listeners.forEach(s=>{s(e)})})}onFocus(){B.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){B.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},_e=new WeakMap,Mn),z,Ze,ze,Tt,At,He,Pt,Nt,Un,Ho=(Un=class{constructor(t={}){x(this,z);x(this,Ze);x(this,ze);x(this,Tt);x(this,At);x(this,He);x(this,Pt);x(this,Nt);v(this,z,t.queryCache||new Ai),v(this,Ze,t.mutationCache||new ki),v(this,ze,t.defaultOptions||{}),v(this,Tt,new Map),v(this,At,new Map),v(this,He,0)}mount(){hs(this,He)._++,u(this,He)===1&&(v(this,Pt,Ps.subscribe(async t=>{t&&(await this.resumePausedMutations(),u(this,z).onFocus())})),v(this,Nt,Vt.subscribe(async t=>{t&&(await this.resumePausedMutations(),u(this,z).onOnline())})))}unmount(){var t,e;hs(this,He)._--,u(this,He)===0&&((t=u(this,Pt))==null||t.call(this),v(this,Pt,void 0),(e=u(this,Nt))==null||e.call(this),v(this,Nt,void 0))}isFetching(t){return u(this,z).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return u(this,Ze).findAll({...t,status:"pending"}).length}getQueryData(t){var s;const e=this.defaultQueryOptions({queryKey:t});return(s=u(this,z).get(e.queryHash))==null?void 0:s.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),s=u(this,z).build(this,e),r=s.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&s.isStaleByTime(Ke(e.staleTime,s))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return u(this,z).findAll(t).map(({queryKey:e,state:s})=>{const r=s.data;return[e,r]})}setQueryData(t,e,s){const r=this.defaultQueryOptions({queryKey:t}),n=u(this,z).get(r.queryHash),i=n==null?void 0:n.state.data,a=ko(e,i);if(a!==void 0)return u(this,z).build(this,r).setData(a,{...s,manual:!0})}setQueriesData(t,e,s){return B.batch(()=>u(this,z).findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,s)]))}getQueryState(t){var s;const e=this.defaultQueryOptions({queryKey:t});return(s=u(this,z).get(e.queryHash))==null?void 0:s.state}removeQueries(t){const e=u(this,z);B.batch(()=>{e.findAll(t).forEach(s=>{e.remove(s)})})}resetQueries(t,e){const s=u(this,z);return B.batch(()=>(s.findAll(t).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const s={revert:!0,...e},r=B.batch(()=>u(this,z).findAll(t).map(n=>n.cancel(s)));return Promise.all(r).then(H).catch(H)}invalidateQueries(t,e={}){return B.batch(()=>(u(this,z).findAll(t).forEach(s=>{s.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const s={...e,cancelRefetch:e.cancelRefetch??!0},r=B.batch(()=>u(this,z).findAll(t).filter(n=>!n.isDisabled()&&!n.isStatic()).map(n=>{let i=n.fetch(void 0,s);return s.throwOnError||(i=i.catch(H)),n.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(H)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const s=u(this,z).build(this,e);return s.isStaleByTime(Ke(e.staleTime,s))?s.fetch(e):Promise.resolve(s.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(H).catch(H)}fetchInfiniteQuery(t){return t.behavior=_s(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(H).catch(H)}ensureInfiniteQueryData(t){return t.behavior=_s(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Vt.isOnline()?u(this,Ze).resumePausedMutations():Promise.resolve()}getQueryCache(){return u(this,z)}getMutationCache(){return u(this,Ze)}getDefaultOptions(){return u(this,ze)}setDefaultOptions(t){v(this,ze,t)}setQueryDefaults(t,e){u(this,Tt).set(Je(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...u(this,Tt).values()],s={};return e.forEach(r=>{Ft(t,r.queryKey)&&Object.assign(s,r.defaultOptions)}),s}setMutationDefaults(t,e){u(this,At).set(Je(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...u(this,At).values()],s={};return e.forEach(r=>{Ft(t,r.mutationKey)&&Object.assign(s,r.defaultOptions)}),s}defaultQueryOptions(t){if(t._defaulted)return t;const e={...u(this,ze).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=Cr(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===Ns&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...u(this,ze).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){u(this,z).clear(),u(this,Ze).clear()}},z=new WeakMap,Ze=new WeakMap,ze=new WeakMap,Tt=new WeakMap,At=new WeakMap,He=new WeakMap,Pt=new WeakMap,Nt=new WeakMap,Un);function Vo({streamFn:t,refetchMode:e="reset",reducer:s=(n,i)=>li(n,i),initialValue:r=[]}){return async n=>{const i=n.client.getQueryCache().find({queryKey:n.queryKey,exact:!0}),a=!!i&&i.isFetched();a&&e==="reset"&&i.setState({...i.resetState,fetchStatus:"fetching"});let o=r,l=!1;const c=hi({client:n.client,meta:n.meta,queryKey:n.queryKey,pageParam:n.pageParam,direction:n.direction},()=>n.signal,()=>l=!0),d=await t(c),h=a&&e==="replace";for await(const g of d){if(l)break;h?o=s(o,g):n.client.setQueryData(n.queryKey,_=>s(_===void 0?r:_,g))}return h&&!l&&n.client.setQueryData(n.queryKey,o),n.client.getQueryData(n.queryKey)??r}}var Ko=Symbol("dataTagSymbol"),Wo=Symbol("dataTagErrorSymbol"),Jo=Symbol("unsetMarker"),Pr=D.createContext(void 0),xe=t=>{const e=D.useContext(Pr);if(t)return t;if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Go=({client:t,children:e})=>(D.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),Ln.jsx(Pr.Provider,{value:t,children:e})),Pi=D.createContext(!1),Nr=()=>D.useContext(Pi),Xo=Pi.Provider;function Ni(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var Ii=D.createContext(Ni()),Ir=()=>D.useContext(Ii),Yo=({children:t})=>{const[e]=D.useState(()=>Ni());return Ln.jsx(Ii.Provider,{value:e,children:typeof t=="function"?t(e):t})},Fi=(t,e,s)=>{const r=s!=null&&s.state.error&&typeof t.throwOnError=="function"?Is(t.throwOnError,[s.state.error,s]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||r)&&(e.isReset()||(t.retryOnMount=!1))},Di=t=>{D.useEffect(()=>{t.clearReset()},[t])},ji=({result:t,errorResetBoundary:e,throwOnError:s,query:r,suspense:n})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&(n&&t.data===void 0||Is(s,[t.error,r])),Fr=(t,e)=>e.state.data===void 0,Mi=t=>{if(t.suspense){const s=n=>n==="static"?n:Math.max(n??1e3,1e3),r=t.staleTime;t.staleTime=typeof r=="function"?(...n)=>s(r(...n)):s(r),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},eu=(t,e)=>t.isLoading&&t.isFetching&&!e,pr=(t,e)=>(t==null?void 0:t.suspense)&&e.isPending,mr=(t,e,s)=>e.fetchOptimistic(t).catch(()=>{s.clearReset()});function Ui({queries:t,...e},s){const r=xe(s),n=Nr(),i=Ir(),a=D.useMemo(()=>t.map(y=>{const m=r.defaultQueryOptions(y);return m._optimisticResults=n?"isRestoring":"optimistic",m}),[t,r,n]);a.forEach(y=>{Mi(y);const m=r.getQueryCache().get(y.queryHash);Fi(y,i,m)}),Di(i);const[o]=D.useState(()=>new Ti(r,a,e)),[l,c,d]=o.getOptimisticResult(a,e.combine),h=!n&&e.subscribed!==!1;D.useSyncExternalStore(D.useCallback(y=>h?o.subscribe(B.batchCalls(y)):H,[o,h]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),D.useEffect(()=>{o.setQueries(a,e)},[a,e,o]);const _=l.some((y,m)=>pr(a[m],y))?l.flatMap((y,m)=>{const O=a[m];if(O&&pr(O,y)){const I=new Bt(r,O);return mr(O,I,i)}return[]}):[];if(_.length>0)throw Promise.all(_);const p=l.find((y,m)=>{const O=a[m];return O&&ji({result:y,errorResetBoundary:i,throwOnError:O.throwOnError,query:r.getQueryCache().get(O.queryHash),suspense:O.suspense})});if(p!=null&&p.error)throw p.error;return c(d())}function Fs(t,e,s){var g,_,p,y;const r=Nr(),n=Ir(),i=xe(s),a=i.defaultQueryOptions(t);(_=(g=i.getDefaultOptions().queries)==null?void 0:g._experimental_beforeQuery)==null||_.call(g,a);const o=i.getQueryCache().get(a.queryHash);a._optimisticResults=r?"isRestoring":"optimistic",Mi(a),Fi(a,n,o),Di(n);const l=!i.getQueryCache().get(a.queryHash),[c]=D.useState(()=>new e(i,a)),d=c.getOptimisticResult(a),h=!r&&t.subscribed!==!1;if(D.useSyncExternalStore(D.useCallback(m=>{const O=h?c.subscribe(B.batchCalls(m)):H;return c.updateResult(),O},[c,h]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),D.useEffect(()=>{c.setOptions(a)},[a,c]),pr(a,d))throw mr(a,c,n);if(ji({result:d,errorResetBoundary:n,throwOnError:a.throwOnError,query:o,suspense:a.suspense}))throw d.error;if((y=(p=i.getDefaultOptions().queries)==null?void 0:p._experimental_afterQuery)==null||y.call(p,a,d),a.experimental_prefetchInRender&&!Dt.isServer()&&eu(d,r)){const m=l?mr(a,c,n):o==null?void 0:o.promise;m==null||m.catch(H).finally(()=>{c.updateResult()})}return a.notifyOnChangeProps?d:c.trackResult(d)}function tu(t,e){return Fs(t,Bt,e)}function su(t,e){return Fs({...t,enabled:!0,suspense:!0,throwOnError:Fr,placeholderData:void 0},Bt,e)}function ru(t,e){return Fs({...t,enabled:!0,suspense:!0,throwOnError:Fr},Ar,e)}function nu(t,e){return Ui({...t,queries:t.queries.map(s=>({...s,suspense:!0,throwOnError:Fr,enabled:!0,placeholderData:void 0}))},e)}function iu(t,e){const s=xe(e);s.getQueryState(t.queryKey)||s.prefetchQuery(t)}function au(t,e){const s=xe(e);s.getQueryState(t.queryKey)||s.prefetchInfiniteQuery(t)}function ou(t){return t}function uu(t){return t}var cu=({children:t,options:e={},state:s,queryClient:r})=>{const n=xe(r),i=D.useRef(e);D.useEffect(()=>{i.current=e});const a=D.useMemo(()=>{if(s){if(typeof s!="object")return;const o=n.getQueryCache(),l=s.queries||[],c=[],d=[];for(const h of l){const g=o.get(h.queryHash);g?(h.state.dataUpdatedAt>g.state.dataUpdatedAt||h.promise&&g.state.status!=="pending"&&g.state.fetchStatus!=="fetching"&&h.dehydratedAt!==void 0&&h.dehydratedAt>g.state.dataUpdatedAt)&&d.push(h):c.push(h)}if(c.length>0&&Xs(n,{queries:c},i.current),d.length>0)return d}},[n,s]);return D.useEffect(()=>{a&&Xs(n,{queries:a},i.current)},[n,a]),t};function lu(t,e){const s=xe(e),r=s.getQueryCache();return D.useSyncExternalStore(D.useCallback(n=>r.subscribe(B.batchCalls(n)),[r]),()=>s.isFetching(t),()=>s.isFetching(t))}function du(t,e){const s=xe(e);return Li({filters:{...t,status:"pending"}},s).length}function dn(t,e){return t.findAll(e.filters).map(s=>e.select?e.select(s):s.state)}function Li(t={},e){const s=xe(e).getMutationCache(),r=D.useRef(t),n=D.useRef(null);return n.current===null&&(n.current=dn(s,t)),D.useEffect(()=>{r.current=t}),D.useSyncExternalStore(D.useCallback(i=>s.subscribe(()=>{const a=ls(n.current,dn(s,r.current));n.current!==a&&(n.current=a,B.schedule(i))}),[s]),()=>n.current,()=>n.current)}function hu(t,e){const s=xe(e),[r]=D.useState(()=>new Ci(s,t));D.useEffect(()=>{r.setOptions(t)},[r,t]);const n=D.useSyncExternalStore(D.useCallback(a=>r.subscribe(B.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=D.useCallback((a,o)=>{r.mutate(a,o).catch(H)},[r]);if(n.error&&Is(r.options.throwOnError,[n.error]))throw n.error;return{...n,mutate:i,mutateAsync:n.mutate}}function fu(t){return t}function pu(t,e){return Fs(t,Ar,e)}const uc=Object.freeze(Object.defineProperty({__proto__:null,CancelledError:Kt,HydrationBoundary:cu,InfiniteQueryObserver:Ar,IsRestoringProvider:Xo,Mutation:Oi,MutationCache:ki,MutationObserver:Ci,QueriesObserver:Ti,Query:_i,QueryCache:Ai,QueryClient:Ho,QueryClientContext:Pr,QueryClientProvider:Go,QueryErrorResetBoundary:Yo,QueryObserver:Bt,dataTagErrorSymbol:Wo,dataTagSymbol:Ko,defaultScheduler:yi,defaultShouldDehydrateMutation:pi,defaultShouldDehydrateQuery:mi,dehydrate:jo,environmentManager:Dt,experimental_streamedQuery:Vo,focusManager:Ps,hashKey:Je,hydrate:Xs,infiniteQueryOptions:uu,isCancelledError:Qo,isServer:ui,keepPreviousData:Ao,matchMutation:Ks,matchQuery:Vs,mutationOptions:fu,noop:H,notifyManager:B,onlineManager:Vt,partialMatchKey:Ft,queryOptions:ou,replaceEqualDeep:ls,shouldThrowError:Is,skipToken:Ns,timeoutManager:Ve,unsetMarker:Jo,useInfiniteQuery:pu,useIsFetching:lu,useIsMutating:du,useIsRestoring:Nr,useMutation:hu,useMutationState:Li,usePrefetchInfiniteQuery:au,usePrefetchQuery:iu,useQueries:Ui,useQuery:tu,useQueryClient:xe,useQueryErrorResetBoundary:Ir,useSuspenseInfiniteQuery:ru,useSuspenseQueries:nu,useSuspenseQuery:su},Symbol.toStringTag,{value:"Module"})),hn=t=>{let e;const s=new Set,r=(c,d)=>{const h=typeof c=="function"?c(e):c;if(!Object.is(h,e)){const g=e;e=d??(typeof h!="object"||h===null)?h:Object.assign({},e,h),s.forEach(_=>_(e,g))}},n=()=>e,o={setState:r,getState:n,getInitialState:()=>l,subscribe:c=>(s.add(c),()=>s.delete(c))},l=e=t(r,n,o);return o},cc=(t=>t?hn(t):hn);var L;(function(t){t.assertEqual=n=>{};function e(n){}t.assertIs=e;function s(n){throw new Error}t.assertNever=s,t.arrayToEnum=n=>{const i={};for(const a of n)i[a]=a;return i},t.getValidEnumValues=n=>{const i=t.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),a={};for(const o of i)a[o]=n[o];return t.objectValues(a)},t.objectValues=n=>t.objectKeys(n).map(function(i){return n[i]}),t.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const i=[];for(const a in n)Object.prototype.hasOwnProperty.call(n,a)&&i.push(a);return i},t.find=(n,i)=>{for(const a of n)if(i(a))return a},t.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function r(n,i=" | "){return n.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}t.joinValues=r,t.jsonStringifyReplacer=(n,i)=>typeof i=="bigint"?i.toString():i})(L||(L={}));var fn;(function(t){t.mergeShapes=(e,s)=>({...e,...s})})(fn||(fn={}));const R=L.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),je=t=>{switch(typeof t){case"undefined":return R.undefined;case"string":return R.string;case"number":return Number.isNaN(t)?R.nan:R.number;case"boolean":return R.boolean;case"function":return R.function;case"bigint":return R.bigint;case"symbol":return R.symbol;case"object":return Array.isArray(t)?R.array:t===null?R.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?R.promise:typeof Map<"u"&&t instanceof Map?R.map:typeof Set<"u"&&t instanceof Set?R.set:typeof Date<"u"&&t instanceof Date?R.date:R.object;default:return R.unknown}},b=L.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 Pe extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const s=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,s):this.__proto__=s,this.name="ZodError",this.issues=e}format(e){const s=e||function(i){return i.message},r={_errors:[]},n=i=>{for(const a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(n);else if(a.code==="invalid_return_type")n(a.returnTypeError);else if(a.code==="invalid_arguments")n(a.argumentsError);else if(a.path.length===0)r._errors.push(s(a));else{let o=r,l=0;for(;l<a.path.length;){const c=a.path[l];l===a.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(s(a))):o[c]=o[c]||{_errors:[]},o=o[c],l++}}};return n(this),r}static assert(e){if(!(e instanceof Pe))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,L.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=s=>s.message){const s={},r=[];for(const n of this.issues)if(n.path.length>0){const i=n.path[0];s[i]=s[i]||[],s[i].push(e(n))}else r.push(e(n));return{formErrors:r,fieldErrors:s}}get formErrors(){return this.flatten()}}Pe.create=t=>new Pe(t);const yr=(t,e)=>{let s;switch(t.code){case b.invalid_type:t.received===R.undefined?s="Required":s=`Expected ${t.expected}, received ${t.received}`;break;case b.invalid_literal:s=`Invalid literal value, expected ${JSON.stringify(t.expected,L.jsonStringifyReplacer)}`;break;case b.unrecognized_keys:s=`Unrecognized key(s) in object: ${L.joinValues(t.keys,", ")}`;break;case b.invalid_union:s="Invalid input";break;case b.invalid_union_discriminator:s=`Invalid discriminator value. Expected ${L.joinValues(t.options)}`;break;case b.invalid_enum_value:s=`Invalid enum value. Expected ${L.joinValues(t.options)}, received '${t.received}'`;break;case b.invalid_arguments:s="Invalid function arguments";break;case b.invalid_return_type:s="Invalid function return type";break;case b.invalid_date:s="Invalid date";break;case b.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(s=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(s=`${s} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?s=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?s=`Invalid input: must end with "${t.validation.endsWith}"`:L.assertNever(t.validation):t.validation!=="regex"?s=`Invalid ${t.validation}`:s="Invalid";break;case b.too_small:t.type==="array"?s=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?s=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?s=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?s=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?s=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:s="Invalid input";break;case b.too_big:t.type==="array"?s=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?s=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?s=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?s=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?s=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:s="Invalid input";break;case b.custom:s="Invalid input";break;case b.invalid_intersection_types:s="Intersection results could not be merged";break;case b.not_multiple_of:s=`Number must be a multiple of ${t.multipleOf}`;break;case b.not_finite:s="Number must be finite";break;default:s=e.defaultError,L.assertNever(t)}return{message:s}};let mu=yr;function yu(){return mu}const gu=t=>{const{data:e,path:s,errorMaps:r,issueData:n}=t,i=[...s,...n.path||[]],a={...n,path:i};if(n.message!==void 0)return{...n,path:i,message:n.message};let o="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)o=c(a,{data:e,defaultError:o}).message;return{...n,path:i,message:o}};function w(t,e){const s=yu(),r=gu({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,s,s===yr?void 0:yr].filter(n=>!!n)});t.common.issues.push(r)}class ue{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,s){const r=[];for(const n of s){if(n.status==="aborted")return A;n.status==="dirty"&&e.dirty(),r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,s){const r=[];for(const n of s){const i=await n.key,a=await n.value;r.push({key:i,value:a})}return ue.mergeObjectSync(e,r)}static mergeObjectSync(e,s){const r={};for(const n of s){const{key:i,value:a}=n;if(i.status==="aborted"||a.status==="aborted")return A;i.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||n.alwaysSet)&&(r[i.value]=a.value)}return{status:e.value,value:r}}}const A=Object.freeze({status:"aborted"}),zt=t=>({status:"dirty",value:t}),pe=t=>({status:"valid",value:t}),pn=t=>t.status==="aborted",mn=t=>t.status==="dirty",jt=t=>t.status==="valid",ws=t=>typeof Promise<"u"&&t instanceof Promise;var E;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(E||(E={}));class Ge{constructor(e,s,r,n){this._cachedPath=[],this.parent=e,this.data=s,this._path=r,this._key=n}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 yn=(t,e)=>{if(jt(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const s=new Pe(t.common.issues);return this._error=s,this._error}}};function N(t){if(!t)return{};const{errorMap:e,invalid_type_error:s,required_error:r,description:n}=t;if(e&&(s||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(a,o)=>{const{message:l}=t;return a.code==="invalid_enum_value"?{message:l??o.defaultError}:typeof o.data>"u"?{message:l??r??o.defaultError}:a.code!=="invalid_type"?{message:o.defaultError}:{message:l??s??o.defaultError}},description:n}}class j{get description(){return this._def.description}_getType(e){return je(e.data)}_getOrReturnCtx(e,s){return s||{common:e.parent.common,data:e.data,parsedType:je(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new ue,ctx:{common:e.parent.common,data:e.data,parsedType:je(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const s=this._parse(e);if(ws(s))throw new Error("Synchronous parse encountered promise.");return s}_parseAsync(e){const s=this._parse(e);return Promise.resolve(s)}parse(e,s){const r=this.safeParse(e,s);if(r.success)return r.data;throw r.error}safeParse(e,s){const r={common:{issues:[],async:(s==null?void 0:s.async)??!1,contextualErrorMap:s==null?void 0:s.errorMap},path:(s==null?void 0:s.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:je(e)},n=this._parseSync({data:e,path:r.path,parent:r});return yn(r,n)}"~validate"(e){var r,n;const s={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:je(e)};if(!this["~standard"].async)try{const i=this._parseSync({data:e,path:[],parent:s});return jt(i)?{value:i.value}:{issues:s.common.issues}}catch(i){(n=(r=i==null?void 0:i.message)==null?void 0:r.toLowerCase())!=null&&n.includes("encountered")&&(this["~standard"].async=!0),s.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:s}).then(i=>jt(i)?{value:i.value}:{issues:s.common.issues})}async parseAsync(e,s){const r=await this.safeParseAsync(e,s);if(r.success)return r.data;throw r.error}async safeParseAsync(e,s){const r={common:{issues:[],contextualErrorMap:s==null?void 0:s.errorMap,async:!0},path:(s==null?void 0:s.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:je(e)},n=this._parse({data:e,path:r.path,parent:r}),i=await(ws(n)?n:Promise.resolve(n));return yn(r,i)}refine(e,s){const r=n=>typeof s=="string"||typeof s>"u"?{message:s}:typeof s=="function"?s(n):s;return this._refinement((n,i)=>{const a=e(n),o=()=>i.addIssue({code:b.custom,...r(n)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(o(),!1)):a?!0:(o(),!1)})}refinement(e,s){return this._refinement((r,n)=>e(r)?!0:(n.addIssue(typeof s=="function"?s(r,n):s),!1))}_refinement(e){return new Lt({schema:this,typeName:P.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,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:s=>this["~validate"](s)}}optional(){return We.create(this,this._def)}nullable(){return Qt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return we.create(this)}promise(){return Os.create(this,this._def)}or(e){return Ss.create([this,e],this._def)}and(e){return Rs.create(this,e,this._def)}transform(e){return new Lt({...N(this._def),schema:this,typeName:P.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const s=typeof e=="function"?e:()=>e;return new br({...N(this._def),innerType:this,defaultValue:s,typeName:P.ZodDefault})}brand(){return new Qu({typeName:P.ZodBranded,type:this,...N(this._def)})}catch(e){const s=typeof e=="function"?e:()=>e;return new _r({...N(this._def),innerType:this,catchValue:s,typeName:P.ZodCatch})}describe(e){const s=this.constructor;return new s({...this._def,description:e})}pipe(e){return Dr.create(this,e)}readonly(){return wr.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const vu=/^c[^\s-]{8,}$/i,bu=/^[0-9a-z]+$/,_u=/^[0-9A-HJKMNP-TV-Z]{26}$/i,wu=/^[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,xu=/^[a-z0-9_-]{21}$/i,Su=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Ru=/^[-+]?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)?)??$/,Ou=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Eu="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let qs;const ku=/^(?:(?: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])$/,Cu=/^(?:(?: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])$/,Tu=/^(([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]))$/,Au=/^(([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])$/,Pu=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Nu=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Qi="((\\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])))",Iu=new RegExp(`^${Qi}$`);function qi(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const s=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${s}`}function Fu(t){return new RegExp(`^${qi(t)}$`)}function Du(t){let e=`${Qi}T${qi(t)}`;const s=[];return s.push(t.local?"Z?":"Z"),t.offset&&s.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${s.join("|")})`,new RegExp(`^${e}$`)}function ju(t,e){return!!((e==="v4"||!e)&&ku.test(t)||(e==="v6"||!e)&&Tu.test(t))}function Mu(t,e){if(!Su.test(t))return!1;try{const[s]=t.split(".");if(!s)return!1;const r=s.replace(/-/g,"+").replace(/_/g,"/").padEnd(s.length+(4-s.length%4)%4,"="),n=JSON.parse(atob(r));return!(typeof n!="object"||n===null||"typ"in n&&(n==null?void 0:n.typ)!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}function Uu(t,e){return!!((e==="v4"||!e)&&Cu.test(t)||(e==="v6"||!e)&&Au.test(t))}class Te extends j{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==R.string){const i=this._getOrReturnCtx(e);return w(i,{code:b.invalid_type,expected:R.string,received:i.parsedType}),A}const r=new ue;let n;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(n=this._getOrReturnCtx(e,n),w(n,{code:b.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")e.data.length>i.value&&(n=this._getOrReturnCtx(e,n),w(n,{code:b.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const a=e.data.length>i.value,o=e.data.length<i.value;(a||o)&&(n=this._getOrReturnCtx(e,n),a?w(n,{code:b.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):o&&w(n,{code:b.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")Ou.test(e.data)||(n=this._getOrReturnCtx(e,n),w(n,{validation:"email",code:b.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")qs||(qs=new RegExp(Eu,"u")),qs.test(e.data)||(n=this._getOrReturnCtx(e,n),w(n,{validation:"emoji",code:b.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")wu.test(e.data)||(n=this._getOrReturnCtx(e,n),w(n,{validation:"uuid",code:b.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")xu.test(e.data)||(n=this._getOrReturnCtx(e,n),w(n,{validation:"nanoid",code:b.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")vu.test(e.data)||(n=this._getOrReturnCtx(e,n),w(n,{validation:"cuid",code:b.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")bu.test(e.data)||(n=this._getOrReturnCtx(e,n),w(n,{validation:"cuid2",code:b.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")_u.test(e.data)||(n=this._getOrReturnCtx(e,n),w(n,{validation:"ulid",code:b.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),w(n,{validation:"url",code:b.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),w(n,{validation:"regex",code:b.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(n=this._getOrReturnCtx(e,n),w(n,{code:b.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(n=this._getOrReturnCtx(e,n),w(n,{code:b.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(n=this._getOrReturnCtx(e,n),w(n,{code:b.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Du(i).test(e.data)||(n=this._getOrReturnCtx(e,n),w(n,{code:b.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?Iu.test(e.data)||(n=this._getOrReturnCtx(e,n),w(n,{code:b.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?Fu(i).test(e.data)||(n=this._getOrReturnCtx(e,n),w(n,{code:b.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?Ru.test(e.data)||(n=this._getOrReturnCtx(e,n),w(n,{validation:"duration",code:b.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?ju(e.data,i.version)||(n=this._getOrReturnCtx(e,n),w(n,{validation:"ip",code:b.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?Mu(e.data,i.alg)||(n=this._getOrReturnCtx(e,n),w(n,{validation:"jwt",code:b.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?Uu(e.data,i.version)||(n=this._getOrReturnCtx(e,n),w(n,{validation:"cidr",code:b.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?Pu.test(e.data)||(n=this._getOrReturnCtx(e,n),w(n,{validation:"base64",code:b.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?Nu.test(e.data)||(n=this._getOrReturnCtx(e,n),w(n,{validation:"base64url",code:b.invalid_string,message:i.message}),r.dirty()):L.assertNever(i);return{status:r.value,value:e.data}}_regex(e,s,r){return this.refinement(n=>e.test(n),{validation:s,code:b.invalid_string,...E.errToObj(r)})}_addCheck(e){return new Te({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...E.errToObj(e)})}url(e){return this._addCheck({kind:"url",...E.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...E.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...E.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...E.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...E.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...E.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...E.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...E.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...E.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...E.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...E.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...E.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...E.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...E.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...E.errToObj(e)})}regex(e,s){return this._addCheck({kind:"regex",regex:e,...E.errToObj(s)})}includes(e,s){return this._addCheck({kind:"includes",value:e,position:s==null?void 0:s.position,...E.errToObj(s==null?void 0:s.message)})}startsWith(e,s){return this._addCheck({kind:"startsWith",value:e,...E.errToObj(s)})}endsWith(e,s){return this._addCheck({kind:"endsWith",value:e,...E.errToObj(s)})}min(e,s){return this._addCheck({kind:"min",value:e,...E.errToObj(s)})}max(e,s){return this._addCheck({kind:"max",value:e,...E.errToObj(s)})}length(e,s){return this._addCheck({kind:"length",value:e,...E.errToObj(s)})}nonempty(e){return this.min(1,E.errToObj(e))}trim(){return new Te({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Te({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Te({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const s of this._def.checks)s.kind==="min"&&(e===null||s.value>e)&&(e=s.value);return e}get maxLength(){let e=null;for(const s of this._def.checks)s.kind==="max"&&(e===null||s.value<e)&&(e=s.value);return e}}Te.create=t=>new Te({checks:[],typeName:P.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...N(t)});function Lu(t,e){const s=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,n=s>r?s:r,i=Number.parseInt(t.toFixed(n).replace(".","")),a=Number.parseInt(e.toFixed(n).replace(".",""));return i%a/10**n}class ht extends j{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==R.number){const i=this._getOrReturnCtx(e);return w(i,{code:b.invalid_type,expected:R.number,received:i.parsedType}),A}let r;const n=new ue;for(const i of this._def.checks)i.kind==="int"?L.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),w(r,{code:b.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),w(r,{code:b.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),w(r,{code:b.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="multipleOf"?Lu(e.data,i.value)!==0&&(r=this._getOrReturnCtx(e,r),w(r,{code:b.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),w(r,{code:b.not_finite,message:i.message}),n.dirty()):L.assertNever(i);return{status:n.value,value:e.data}}gte(e,s){return this.setLimit("min",e,!0,E.toString(s))}gt(e,s){return this.setLimit("min",e,!1,E.toString(s))}lte(e,s){return this.setLimit("max",e,!0,E.toString(s))}lt(e,s){return this.setLimit("max",e,!1,E.toString(s))}setLimit(e,s,r,n){return new ht({...this._def,checks:[...this._def.checks,{kind:e,value:s,inclusive:r,message:E.toString(n)}]})}_addCheck(e){return new ht({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:E.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:E.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:E.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:E.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:E.toString(e)})}multipleOf(e,s){return this._addCheck({kind:"multipleOf",value:e,message:E.toString(s)})}finite(e){return this._addCheck({kind:"finite",message:E.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:E.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:E.toString(e)})}get minValue(){let e=null;for(const s of this._def.checks)s.kind==="min"&&(e===null||s.value>e)&&(e=s.value);return e}get maxValue(){let e=null;for(const s of this._def.checks)s.kind==="max"&&(e===null||s.value<e)&&(e=s.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&L.isInteger(e.value))}get isFinite(){let e=null,s=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(s===null||r.value>s)&&(s=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(s)&&Number.isFinite(e)}}ht.create=t=>new ht({checks:[],typeName:P.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...N(t)});class ft extends j{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==R.bigint)return this._getInvalidInput(e);let r;const n=new ue;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),w(r,{code:b.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),w(r,{code:b.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),w(r,{code:b.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):L.assertNever(i);return{status:n.value,value:e.data}}_getInvalidInput(e){const s=this._getOrReturnCtx(e);return w(s,{code:b.invalid_type,expected:R.bigint,received:s.parsedType}),A}gte(e,s){return this.setLimit("min",e,!0,E.toString(s))}gt(e,s){return this.setLimit("min",e,!1,E.toString(s))}lte(e,s){return this.setLimit("max",e,!0,E.toString(s))}lt(e,s){return this.setLimit("max",e,!1,E.toString(s))}setLimit(e,s,r,n){return new ft({...this._def,checks:[...this._def.checks,{kind:e,value:s,inclusive:r,message:E.toString(n)}]})}_addCheck(e){return new ft({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:E.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:E.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:E.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:E.toString(e)})}multipleOf(e,s){return this._addCheck({kind:"multipleOf",value:e,message:E.toString(s)})}get minValue(){let e=null;for(const s of this._def.checks)s.kind==="min"&&(e===null||s.value>e)&&(e=s.value);return e}get maxValue(){let e=null;for(const s of this._def.checks)s.kind==="max"&&(e===null||s.value<e)&&(e=s.value);return e}}ft.create=t=>new ft({checks:[],typeName:P.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...N(t)});class xs extends j{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==R.boolean){const r=this._getOrReturnCtx(e);return w(r,{code:b.invalid_type,expected:R.boolean,received:r.parsedType}),A}return pe(e.data)}}xs.create=t=>new xs({typeName:P.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...N(t)});class Mt extends j{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==R.date){const i=this._getOrReturnCtx(e);return w(i,{code:b.invalid_type,expected:R.date,received:i.parsedType}),A}if(Number.isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return w(i,{code:b.invalid_date}),A}const r=new ue;let n;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(n=this._getOrReturnCtx(e,n),w(n,{code:b.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(n=this._getOrReturnCtx(e,n),w(n,{code:b.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):L.assertNever(i);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Mt({...this._def,checks:[...this._def.checks,e]})}min(e,s){return this._addCheck({kind:"min",value:e.getTime(),message:E.toString(s)})}max(e,s){return this._addCheck({kind:"max",value:e.getTime(),message:E.toString(s)})}get minDate(){let e=null;for(const s of this._def.checks)s.kind==="min"&&(e===null||s.value>e)&&(e=s.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const s of this._def.checks)s.kind==="max"&&(e===null||s.value<e)&&(e=s.value);return e!=null?new Date(e):null}}Mt.create=t=>new Mt({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:P.ZodDate,...N(t)});class gn extends j{_parse(e){if(this._getType(e)!==R.symbol){const r=this._getOrReturnCtx(e);return w(r,{code:b.invalid_type,expected:R.symbol,received:r.parsedType}),A}return pe(e.data)}}gn.create=t=>new gn({typeName:P.ZodSymbol,...N(t)});class vn extends j{_parse(e){if(this._getType(e)!==R.undefined){const r=this._getOrReturnCtx(e);return w(r,{code:b.invalid_type,expected:R.undefined,received:r.parsedType}),A}return pe(e.data)}}vn.create=t=>new vn({typeName:P.ZodUndefined,...N(t)});class bn extends j{_parse(e){if(this._getType(e)!==R.null){const r=this._getOrReturnCtx(e);return w(r,{code:b.invalid_type,expected:R.null,received:r.parsedType}),A}return pe(e.data)}}bn.create=t=>new bn({typeName:P.ZodNull,...N(t)});class _n extends j{constructor(){super(...arguments),this._any=!0}_parse(e){return pe(e.data)}}_n.create=t=>new _n({typeName:P.ZodAny,...N(t)});class wn extends j{constructor(){super(...arguments),this._unknown=!0}_parse(e){return pe(e.data)}}wn.create=t=>new wn({typeName:P.ZodUnknown,...N(t)});class Xe extends j{_parse(e){const s=this._getOrReturnCtx(e);return w(s,{code:b.invalid_type,expected:R.never,received:s.parsedType}),A}}Xe.create=t=>new Xe({typeName:P.ZodNever,...N(t)});class xn extends j{_parse(e){if(this._getType(e)!==R.undefined){const r=this._getOrReturnCtx(e);return w(r,{code:b.invalid_type,expected:R.void,received:r.parsedType}),A}return pe(e.data)}}xn.create=t=>new xn({typeName:P.ZodVoid,...N(t)});class we extends j{_parse(e){const{ctx:s,status:r}=this._processInputParams(e),n=this._def;if(s.parsedType!==R.array)return w(s,{code:b.invalid_type,expected:R.array,received:s.parsedType}),A;if(n.exactLength!==null){const a=s.data.length>n.exactLength.value,o=s.data.length<n.exactLength.value;(a||o)&&(w(s,{code:a?b.too_big:b.too_small,minimum:o?n.exactLength.value:void 0,maximum:a?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),r.dirty())}if(n.minLength!==null&&s.data.length<n.minLength.value&&(w(s,{code:b.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),r.dirty()),n.maxLength!==null&&s.data.length>n.maxLength.value&&(w(s,{code:b.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()),s.common.async)return Promise.all([...s.data].map((a,o)=>n.type._parseAsync(new Ge(s,a,s.path,o)))).then(a=>ue.mergeArray(r,a));const i=[...s.data].map((a,o)=>n.type._parseSync(new Ge(s,a,s.path,o)));return ue.mergeArray(r,i)}get element(){return this._def.type}min(e,s){return new we({...this._def,minLength:{value:e,message:E.toString(s)}})}max(e,s){return new we({...this._def,maxLength:{value:e,message:E.toString(s)}})}length(e,s){return new we({...this._def,exactLength:{value:e,message:E.toString(s)}})}nonempty(e){return this.min(1,e)}}we.create=(t,e)=>new we({type:t,minLength:null,maxLength:null,exactLength:null,typeName:P.ZodArray,...N(e)});function gt(t){if(t instanceof K){const e={};for(const s in t.shape){const r=t.shape[s];e[s]=We.create(gt(r))}return new K({...t._def,shape:()=>e})}else return t instanceof we?new we({...t._def,type:gt(t.element)}):t instanceof We?We.create(gt(t.unwrap())):t instanceof Qt?Qt.create(gt(t.unwrap())):t instanceof pt?pt.create(t.items.map(e=>gt(e))):t}class K extends j{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),s=L.objectKeys(e);return this._cached={shape:e,keys:s},this._cached}_parse(e){if(this._getType(e)!==R.object){const c=this._getOrReturnCtx(e);return w(c,{code:b.invalid_type,expected:R.object,received:c.parsedType}),A}const{status:r,ctx:n}=this._processInputParams(e),{shape:i,keys:a}=this._getCached(),o=[];if(!(this._def.catchall instanceof Xe&&this._def.unknownKeys==="strip"))for(const c in n.data)a.includes(c)||o.push(c);const l=[];for(const c of a){const d=i[c],h=n.data[c];l.push({key:{status:"valid",value:c},value:d._parse(new Ge(n,h,n.path,c)),alwaysSet:c in n.data})}if(this._def.catchall instanceof Xe){const c=this._def.unknownKeys;if(c==="passthrough")for(const d of o)l.push({key:{status:"valid",value:d},value:{status:"valid",value:n.data[d]}});else if(c==="strict")o.length>0&&(w(n,{code:b.unrecognized_keys,keys:o}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const d of o){const h=n.data[d];l.push({key:{status:"valid",value:d},value:c._parse(new Ge(n,h,n.path,d)),alwaysSet:d in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const c=[];for(const d of l){const h=await d.key,g=await d.value;c.push({key:h,value:g,alwaysSet:d.alwaysSet})}return c}).then(c=>ue.mergeObjectSync(r,c)):ue.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(e){return E.errToObj,new K({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(s,r)=>{var i,a;const n=((a=(i=this._def).errorMap)==null?void 0:a.call(i,s,r).message)??r.defaultError;return s.code==="unrecognized_keys"?{message:E.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new K({...this._def,unknownKeys:"strip"})}passthrough(){return new K({...this._def,unknownKeys:"passthrough"})}extend(e){return new K({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new K({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:P.ZodObject})}setKey(e,s){return this.augment({[e]:s})}catchall(e){return new K({...this._def,catchall:e})}pick(e){const s={};for(const r of L.objectKeys(e))e[r]&&this.shape[r]&&(s[r]=this.shape[r]);return new K({...this._def,shape:()=>s})}omit(e){const s={};for(const r of L.objectKeys(this.shape))e[r]||(s[r]=this.shape[r]);return new K({...this._def,shape:()=>s})}deepPartial(){return gt(this)}partial(e){const s={};for(const r of L.objectKeys(this.shape)){const n=this.shape[r];e&&!e[r]?s[r]=n:s[r]=n.optional()}return new K({...this._def,shape:()=>s})}required(e){const s={};for(const r of L.objectKeys(this.shape))if(e&&!e[r])s[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof We;)i=i._def.innerType;s[r]=i}return new K({...this._def,shape:()=>s})}keyof(){return Bi(L.objectKeys(this.shape))}}K.create=(t,e)=>new K({shape:()=>t,unknownKeys:"strip",catchall:Xe.create(),typeName:P.ZodObject,...N(e)});K.strictCreate=(t,e)=>new K({shape:()=>t,unknownKeys:"strict",catchall:Xe.create(),typeName:P.ZodObject,...N(e)});K.lazycreate=(t,e)=>new K({shape:t,unknownKeys:"strip",catchall:Xe.create(),typeName:P.ZodObject,...N(e)});class Ss extends j{_parse(e){const{ctx:s}=this._processInputParams(e),r=this._def.options;function n(i){for(const o of i)if(o.result.status==="valid")return o.result;for(const o of i)if(o.result.status==="dirty")return s.common.issues.push(...o.ctx.common.issues),o.result;const a=i.map(o=>new Pe(o.ctx.common.issues));return w(s,{code:b.invalid_union,unionErrors:a}),A}if(s.common.async)return Promise.all(r.map(async i=>{const a={...s,common:{...s.common,issues:[]},parent:null};return{result:await i._parseAsync({data:s.data,path:s.path,parent:a}),ctx:a}})).then(n);{let i;const a=[];for(const l of r){const c={...s,common:{...s.common,issues:[]},parent:null},d=l._parseSync({data:s.data,path:s.path,parent:c});if(d.status==="valid")return d;d.status==="dirty"&&!i&&(i={result:d,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(i)return s.common.issues.push(...i.ctx.common.issues),i.result;const o=a.map(l=>new Pe(l));return w(s,{code:b.invalid_union,unionErrors:o}),A}}get options(){return this._def.options}}Ss.create=(t,e)=>new Ss({options:t,typeName:P.ZodUnion,...N(e)});function gr(t,e){const s=je(t),r=je(e);if(t===e)return{valid:!0,data:t};if(s===R.object&&r===R.object){const n=L.objectKeys(e),i=L.objectKeys(t).filter(o=>n.indexOf(o)!==-1),a={...t,...e};for(const o of i){const l=gr(t[o],e[o]);if(!l.valid)return{valid:!1};a[o]=l.data}return{valid:!0,data:a}}else if(s===R.array&&r===R.array){if(t.length!==e.length)return{valid:!1};const n=[];for(let i=0;i<t.length;i++){const a=t[i],o=e[i],l=gr(a,o);if(!l.valid)return{valid:!1};n.push(l.data)}return{valid:!0,data:n}}else return s===R.date&&r===R.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class Rs extends j{_parse(e){const{status:s,ctx:r}=this._processInputParams(e),n=(i,a)=>{if(pn(i)||pn(a))return A;const o=gr(i.value,a.value);return o.valid?((mn(i)||mn(a))&&s.dirty(),{status:s.value,value:o.data}):(w(r,{code:b.invalid_intersection_types}),A)};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,a])=>n(i,a)):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Rs.create=(t,e,s)=>new Rs({left:t,right:e,typeName:P.ZodIntersection,...N(s)});class pt extends j{_parse(e){const{status:s,ctx:r}=this._processInputParams(e);if(r.parsedType!==R.array)return w(r,{code:b.invalid_type,expected:R.array,received:r.parsedType}),A;if(r.data.length<this._def.items.length)return w(r,{code:b.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),A;!this._def.rest&&r.data.length>this._def.items.length&&(w(r,{code:b.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),s.dirty());const i=[...r.data].map((a,o)=>{const l=this._def.items[o]||this._def.rest;return l?l._parse(new Ge(r,a,r.path,o)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>ue.mergeArray(s,a)):ue.mergeArray(s,i)}get items(){return this._def.items}rest(e){return new pt({...this._def,rest:e})}}pt.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new pt({items:t,typeName:P.ZodTuple,rest:null,...N(e)})};class Sn extends j{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:s,ctx:r}=this._processInputParams(e);if(r.parsedType!==R.map)return w(r,{code:b.invalid_type,expected:R.map,received:r.parsedType}),A;const n=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([o,l],c)=>({key:n._parse(new Ge(r,o,r.path,[c,"key"])),value:i._parse(new Ge(r,l,r.path,[c,"value"]))}));if(r.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const l of a){const c=await l.key,d=await l.value;if(c.status==="aborted"||d.status==="aborted")return A;(c.status==="dirty"||d.status==="dirty")&&s.dirty(),o.set(c.value,d.value)}return{status:s.value,value:o}})}else{const o=new Map;for(const l of a){const c=l.key,d=l.value;if(c.status==="aborted"||d.status==="aborted")return A;(c.status==="dirty"||d.status==="dirty")&&s.dirty(),o.set(c.value,d.value)}return{status:s.value,value:o}}}}Sn.create=(t,e,s)=>new Sn({valueType:e,keyType:t,typeName:P.ZodMap,...N(s)});class Wt extends j{_parse(e){const{status:s,ctx:r}=this._processInputParams(e);if(r.parsedType!==R.set)return w(r,{code:b.invalid_type,expected:R.set,received:r.parsedType}),A;const n=this._def;n.minSize!==null&&r.data.size<n.minSize.value&&(w(r,{code:b.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),s.dirty()),n.maxSize!==null&&r.data.size>n.maxSize.value&&(w(r,{code:b.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),s.dirty());const i=this._def.valueType;function a(l){const c=new Set;for(const d of l){if(d.status==="aborted")return A;d.status==="dirty"&&s.dirty(),c.add(d.value)}return{status:s.value,value:c}}const o=[...r.data.values()].map((l,c)=>i._parse(new Ge(r,l,r.path,c)));return r.common.async?Promise.all(o).then(l=>a(l)):a(o)}min(e,s){return new Wt({...this._def,minSize:{value:e,message:E.toString(s)}})}max(e,s){return new Wt({...this._def,maxSize:{value:e,message:E.toString(s)}})}size(e,s){return this.min(e,s).max(e,s)}nonempty(e){return this.min(1,e)}}Wt.create=(t,e)=>new Wt({valueType:t,minSize:null,maxSize:null,typeName:P.ZodSet,...N(e)});class Rn extends j{get schema(){return this._def.getter()}_parse(e){const{ctx:s}=this._processInputParams(e);return this._def.getter()._parse({data:s.data,path:s.path,parent:s})}}Rn.create=(t,e)=>new Rn({getter:t,typeName:P.ZodLazy,...N(e)});class vr extends j{_parse(e){if(e.data!==this._def.value){const s=this._getOrReturnCtx(e);return w(s,{received:s.data,code:b.invalid_literal,expected:this._def.value}),A}return{status:"valid",value:e.data}}get value(){return this._def.value}}vr.create=(t,e)=>new vr({value:t,typeName:P.ZodLiteral,...N(e)});function Bi(t,e){return new Ut({values:t,typeName:P.ZodEnum,...N(e)})}class Ut extends j{_parse(e){if(typeof e.data!="string"){const s=this._getOrReturnCtx(e),r=this._def.values;return w(s,{expected:L.joinValues(r),received:s.parsedType,code:b.invalid_type}),A}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const s=this._getOrReturnCtx(e),r=this._def.values;return w(s,{received:s.data,code:b.invalid_enum_value,options:r}),A}return pe(e.data)}get options(){return this._def.values}get enum(){const e={};for(const s of this._def.values)e[s]=s;return e}get Values(){const e={};for(const s of this._def.values)e[s]=s;return e}get Enum(){const e={};for(const s of this._def.values)e[s]=s;return e}extract(e,s=this._def){return Ut.create(e,{...this._def,...s})}exclude(e,s=this._def){return Ut.create(this.options.filter(r=>!e.includes(r)),{...this._def,...s})}}Ut.create=Bi;class On extends j{_parse(e){const s=L.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==R.string&&r.parsedType!==R.number){const n=L.objectValues(s);return w(r,{expected:L.joinValues(n),received:r.parsedType,code:b.invalid_type}),A}if(this._cache||(this._cache=new Set(L.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const n=L.objectValues(s);return w(r,{received:r.data,code:b.invalid_enum_value,options:n}),A}return pe(e.data)}get enum(){return this._def.values}}On.create=(t,e)=>new On({values:t,typeName:P.ZodNativeEnum,...N(e)});class Os extends j{unwrap(){return this._def.type}_parse(e){const{ctx:s}=this._processInputParams(e);if(s.parsedType!==R.promise&&s.common.async===!1)return w(s,{code:b.invalid_type,expected:R.promise,received:s.parsedType}),A;const r=s.parsedType===R.promise?s.data:Promise.resolve(s.data);return pe(r.then(n=>this._def.type.parseAsync(n,{path:s.path,errorMap:s.common.contextualErrorMap})))}}Os.create=(t,e)=>new Os({type:t,typeName:P.ZodPromise,...N(e)});class Lt extends j{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===P.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:s,ctx:r}=this._processInputParams(e),n=this._def.effect||null,i={addIssue:a=>{w(r,a),a.fatal?s.abort():s.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),n.type==="preprocess"){const a=n.transform(r.data,i);if(r.common.async)return Promise.resolve(a).then(async o=>{if(s.value==="aborted")return A;const l=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});return l.status==="aborted"?A:l.status==="dirty"||s.value==="dirty"?zt(l.value):l});{if(s.value==="aborted")return A;const o=this._def.schema._parseSync({data:a,path:r.path,parent:r});return o.status==="aborted"?A:o.status==="dirty"||s.value==="dirty"?zt(o.value):o}}if(n.type==="refinement"){const a=o=>{const l=n.refinement(o,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 o};if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?A:(o.status==="dirty"&&s.dirty(),a(o.value),{status:s.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?A:(o.status==="dirty"&&s.dirty(),a(o.value).then(()=>({status:s.value,value:o.value}))))}if(n.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!jt(a))return A;const o=n.transform(a.value,i);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:s.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>jt(a)?Promise.resolve(n.transform(a.value,i)).then(o=>({status:s.value,value:o})):A);L.assertNever(n)}}Lt.create=(t,e,s)=>new Lt({schema:t,typeName:P.ZodEffects,effect:e,...N(s)});Lt.createWithPreprocess=(t,e,s)=>new Lt({schema:e,effect:{type:"preprocess",transform:t},typeName:P.ZodEffects,...N(s)});class We extends j{_parse(e){return this._getType(e)===R.undefined?pe(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}We.create=(t,e)=>new We({innerType:t,typeName:P.ZodOptional,...N(e)});class Qt extends j{_parse(e){return this._getType(e)===R.null?pe(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Qt.create=(t,e)=>new Qt({innerType:t,typeName:P.ZodNullable,...N(e)});class br extends j{_parse(e){const{ctx:s}=this._processInputParams(e);let r=s.data;return s.parsedType===R.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:s.path,parent:s})}removeDefault(){return this._def.innerType}}br.create=(t,e)=>new br({innerType:t,typeName:P.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...N(e)});class _r extends j{_parse(e){const{ctx:s}=this._processInputParams(e),r={...s,common:{...s.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return ws(n)?n.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Pe(r.common.issues)},input:r.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new Pe(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}_r.create=(t,e)=>new _r({innerType:t,typeName:P.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...N(e)});class En extends j{_parse(e){if(this._getType(e)!==R.nan){const r=this._getOrReturnCtx(e);return w(r,{code:b.invalid_type,expected:R.nan,received:r.parsedType}),A}return{status:"valid",value:e.data}}}En.create=t=>new En({typeName:P.ZodNaN,...N(t)});class Qu extends j{_parse(e){const{ctx:s}=this._processInputParams(e),r=s.data;return this._def.type._parse({data:r,path:s.path,parent:s})}unwrap(){return this._def.type}}class Dr extends j{_parse(e){const{status:s,ctx:r}=this._processInputParams(e);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"?A:i.status==="dirty"?(s.dirty(),zt(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const n=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return n.status==="aborted"?A:n.status==="dirty"?(s.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:r.path,parent:r})}}static create(e,s){return new Dr({in:e,out:s,typeName:P.ZodPipeline})}}class wr extends j{_parse(e){const s=this._def.innerType._parse(e),r=n=>(jt(n)&&(n.value=Object.freeze(n.value)),n);return ws(s)?s.then(n=>r(n)):r(s)}unwrap(){return this._def.innerType}}wr.create=(t,e)=>new wr({innerType:t,typeName:P.ZodReadonly,...N(e)});var P;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(P||(P={}));const lc=Te.create;ht.create;ft.create;const dc=xs.create;Mt.create;Xe.create;const hc=we.create,fc=K.create,pc=Ss.create;Rs.create;pt.create;const mc=vr.create,yc=Ut.create;Os.create;We.create;Qt.create;const gc={string:(t=>Te.create({...t,coerce:!0})),number:(t=>ht.create({...t,coerce:!0})),boolean:(t=>xs.create({...t,coerce:!0})),bigint:(t=>ft.create({...t,coerce:!0})),date:(t=>Mt.create({...t,coerce:!0}))};export{Go as Q,uc as R,b as Z,Ho as a,hc as b,gc as c,pc as d,yc as e,tu as f,W as g,cc as h,xe as i,dc as j,pu as k,mc as l,fc as o,lc as s,hu as u};