6 lines
40 KiB
JavaScript
6 lines
40 KiB
JavaScript
import{Dt as e}from"./vue.runtime.esm-bundler-DS0mm12S.js";import{n as t,r as n,t as r}from"./useMutation-BUiPSyjr.js";import{M as i,t as a}from"./index-De70L21J.js";function o(e,t){return function(){return e.apply(t,arguments)}}var{toString:s}=Object.prototype,{getPrototypeOf:c}=Object,{iterator:l,toStringTag:u}=Symbol,d=(e=>t=>{let n=s.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),f=e=>(e=e.toLowerCase(),t=>d(t)===e),p=e=>t=>typeof t===e,{isArray:m}=Array,h=p(`undefined`);function g(e){return e!==null&&!h(e)&&e.constructor!==null&&!h(e.constructor)&&b(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var _=f(`ArrayBuffer`);function v(e){let t;return t=typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&_(e.buffer),t}var y=p(`string`),b=p(`function`),x=p(`number`),S=e=>typeof e==`object`&&!!e,C=e=>e===!0||e===!1,w=e=>{if(d(e)!==`object`)return!1;let t=c(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(u in e)&&!(l in e)},T=e=>{if(!S(e)||g(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},ee=f(`Date`),te=f(`File`),ne=e=>!!(e&&e.uri!==void 0),re=e=>e&&e.getParts!==void 0,ie=f(`Blob`),ae=f(`FileList`),oe=e=>S(e)&&b(e.pipe);function se(){return typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{}}var ce=se(),le=ce.FormData===void 0?void 0:ce.FormData,ue=e=>{let t;return e&&(le&&e instanceof le||b(e.append)&&((t=d(e))===`formdata`||t===`object`&&b(e.toString)&&e.toString()===`[object FormData]`))},de=f(`URLSearchParams`),[fe,pe,me,he]=[`ReadableStream`,`Request`,`Response`,`Headers`].map(f),ge=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``);function E(e,t,{allOwnKeys:n=!1}={}){if(e==null)return;let r,i;if(typeof e!=`object`&&(e=[e]),m(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(g(e))return;let i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length,o;for(r=0;r<a;r++)o=i[r],t.call(null,e[o],o,e)}}function _e(e,t){if(g(e))return null;t=t.toLowerCase();let n=Object.keys(e),r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}var D=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:global,ve=e=>!h(e)&&e!==D;function O(){let{caseless:e,skipUndefined:t}=ve(this)&&this||{},n={},r=(r,i)=>{if(i===`__proto__`||i===`constructor`||i===`prototype`)return;let a=e&&_e(n,i)||i;w(n[a])&&w(r)?n[a]=O(n[a],r):w(r)?n[a]=O({},r):m(r)?n[a]=r.slice():(!t||!h(r))&&(n[a]=r)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&E(arguments[e],r);return n}var ye=(e,t,n,{allOwnKeys:r}={})=>(E(t,(t,r)=>{n&&b(t)?Object.defineProperty(e,r,{value:o(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),be=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),xe=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,`constructor`,{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,`super`,{value:t.prototype}),n&&Object.assign(e.prototype,n)},Se=(e,t,n,r)=>{let i,a,o,s={};if(t||={},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&c(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Ce=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},we=e=>{if(!e)return null;if(m(e))return e;let t=e.length;if(!x(t))return null;let n=Array(t);for(;t-- >0;)n[t]=e[t];return n},Te=(e=>t=>e&&t instanceof e)(typeof Uint8Array<`u`&&c(Uint8Array)),Ee=(e,t)=>{let n=(e&&e[l]).call(e),r;for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},De=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Oe=f(`HTMLFormElement`),ke=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),Ae=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),je=f(`RegExp`),Me=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};E(n,(n,i)=>{let a;(a=t(n,i,e))!==!1&&(r[i]=a||n)}),Object.defineProperties(e,r)},Ne=e=>{Me(e,(t,n)=>{if(b(e)&&[`arguments`,`caller`,`callee`].indexOf(n)!==-1)return!1;let r=e[n];if(b(r)){if(t.enumerable=!1,`writable`in t){t.writable=!1;return}t.set||=()=>{throw Error(`Can not rewrite read-only method '`+n+`'`)}}})},Pe=(e,t)=>{let n={},r=e=>{e.forEach(e=>{n[e]=!0})};return m(e)?r(e):r(String(e).split(t)),n},Fe=()=>{},Ie=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Le(e){return!!(e&&b(e.append)&&e[u]===`FormData`&&e[l])}var Re=e=>{let t=Array(10),n=(e,r)=>{if(S(e)){if(t.indexOf(e)>=0)return;if(g(e))return e;if(!(`toJSON`in e)){t[r]=e;let i=m(e)?[]:{};return E(e,(e,t)=>{let a=n(e,r+1);!h(a)&&(i[t]=a)}),t[r]=void 0,i}}return e};return n(e,0)},ze=f(`AsyncFunction`),Be=e=>e&&(S(e)||b(e))&&b(e.then)&&b(e.catch),Ve=((e,t)=>e?setImmediate:t?((e,t)=>(D.addEventListener(`message`,({source:n,data:r})=>{n===D&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),D.postMessage(e,`*`)}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate==`function`,b(D.postMessage)),k={isArray:m,isArrayBuffer:_,isBuffer:g,isFormData:ue,isArrayBufferView:v,isString:y,isNumber:x,isBoolean:C,isObject:S,isPlainObject:w,isEmptyObject:T,isReadableStream:fe,isRequest:pe,isResponse:me,isHeaders:he,isUndefined:h,isDate:ee,isFile:te,isReactNativeBlob:ne,isReactNative:re,isBlob:ie,isRegExp:je,isFunction:b,isStream:oe,isURLSearchParams:de,isTypedArray:Te,isFileList:ae,forEach:E,merge:O,extend:ye,trim:ge,stripBOM:be,inherits:xe,toFlatObject:Se,kindOf:d,kindOfTest:f,endsWith:Ce,toArray:we,forEachEntry:Ee,matchAll:De,isHTMLForm:Oe,hasOwnProperty:Ae,hasOwnProp:Ae,reduceDescriptors:Me,freezeMethods:Ne,toObjectSet:Pe,toCamelCase:ke,noop:Fe,toFiniteNumber:Ie,findKey:_e,global:D,isContextDefined:ve,isSpecCompliantForm:Le,toJSONObject:Re,isAsyncFn:ze,isThenable:Be,setImmediate:Ve,asap:typeof queueMicrotask<`u`?queueMicrotask.bind(D):typeof process<`u`&&process.nextTick||Ve,isIterable:e=>e!=null&&b(e[l])},A=class e extends Error{static from(t,n,r,i,a,o){let s=new e(t.message,n||t.code,r,i,a);return s.cause=t,s.name=t.name,t.status!=null&&s.status==null&&(s.status=t.status),o&&Object.assign(s,o),s}constructor(e,t,n,r,i){super(e),Object.defineProperty(this,`message`,{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name=`AxiosError`,this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),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:k.toJSONObject(this.config),code:this.code,status:this.status}}};A.ERR_BAD_OPTION_VALUE=`ERR_BAD_OPTION_VALUE`,A.ERR_BAD_OPTION=`ERR_BAD_OPTION`,A.ECONNABORTED=`ECONNABORTED`,A.ETIMEDOUT=`ETIMEDOUT`,A.ERR_NETWORK=`ERR_NETWORK`,A.ERR_FR_TOO_MANY_REDIRECTS=`ERR_FR_TOO_MANY_REDIRECTS`,A.ERR_DEPRECATED=`ERR_DEPRECATED`,A.ERR_BAD_RESPONSE=`ERR_BAD_RESPONSE`,A.ERR_BAD_REQUEST=`ERR_BAD_REQUEST`,A.ERR_CANCELED=`ERR_CANCELED`,A.ERR_NOT_SUPPORT=`ERR_NOT_SUPPORT`,A.ERR_INVALID_URL=`ERR_INVALID_URL`;function j(e){return k.isPlainObject(e)||k.isArray(e)}function He(e){return k.endsWith(e,`[]`)?e.slice(0,-2):e}function M(e,t,n){return e?e.concat(t).map(function(e,t){return e=He(e),!n&&t?`[`+e+`]`:e}).join(n?`.`:``):t}function Ue(e){return k.isArray(e)&&!e.some(j)}var We=k.toFlatObject(k,{},null,function(e){return/^is[A-Z]/.test(e)});function N(e,t,n){if(!k.isObject(e))throw TypeError(`target must be an object`);t||=new FormData,n=k.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!k.isUndefined(t[e])});let r=n.metaTokens,i=n.visitor||l,a=n.dots,o=n.indexes,s=(n.Blob||typeof Blob<`u`&&Blob)&&k.isSpecCompliantForm(t);if(!k.isFunction(i))throw TypeError(`visitor must be a function`);function c(e){if(e===null)return``;if(k.isDate(e))return e.toISOString();if(k.isBoolean(e))return e.toString();if(!s&&k.isBlob(e))throw new A(`Blob is not supported. Use a Buffer instead.`);return k.isArrayBuffer(e)||k.isTypedArray(e)?s&&typeof Blob==`function`?new Blob([e]):Buffer.from(e):e}function l(e,n,i){let s=e;if(k.isReactNative(t)&&k.isReactNativeBlob(e))return t.append(M(i,n,a),c(e)),!1;if(e&&!i&&typeof e==`object`){if(k.endsWith(n,`{}`))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(k.isArray(e)&&Ue(e)||(k.isFileList(e)||k.endsWith(n,`[]`))&&(s=k.toArray(e)))return n=He(n),s.forEach(function(e,r){!(k.isUndefined(e)||e===null)&&t.append(o===!0?M([n],r,a):o===null?n:n+`[]`,c(e))}),!1}return j(e)?!0:(t.append(M(i,n,a),c(e)),!1)}let u=[],d=Object.assign(We,{defaultVisitor:l,convertValue:c,isVisitable:j});function f(e,n){if(!k.isUndefined(e)){if(u.indexOf(e)!==-1)throw Error(`Circular reference detected in `+n.join(`.`));u.push(e),k.forEach(e,function(e,r){(!(k.isUndefined(e)||e===null)&&i.call(t,e,k.isString(r)?r.trim():r,n,d))===!0&&f(e,n?n.concat(r):[r])}),u.pop()}}if(!k.isObject(e))throw TypeError(`data must be an object`);return f(e),t}function Ge(e){let t={"!":`%21`,"'":`%27`,"(":`%28`,")":`%29`,"~":`%7E`,"%20":`+`,"%00":`\0`};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function P(e,t){this._pairs=[],e&&N(e,this,t)}var Ke=P.prototype;Ke.append=function(e,t){this._pairs.push([e,t])},Ke.toString=function(e){let t=e?function(t){return e.call(this,t,Ge)}:Ge;return this._pairs.map(function(e){return t(e[0])+`=`+t(e[1])},``).join(`&`)};function qe(e){return encodeURIComponent(e).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`).replace(/%20/g,`+`)}function Je(e,t,n){if(!t)return e;let r=n&&n.encode||qe,i=k.isFunction(n)?{serialize:n}:n,a=i&&i.serialize,o;if(o=a?a(t,i):k.isURLSearchParams(t)?t.toString():new P(t,i).toString(r),o){let t=e.indexOf(`#`);t!==-1&&(e=e.slice(0,t)),e+=(e.indexOf(`?`)===-1?`?`:`&`)+o}return e}var Ye=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&=[]}forEach(e){k.forEach(this.handlers,function(t){t!==null&&e(t)})}},Xe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Ze={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<`u`?URLSearchParams:P,FormData:typeof FormData<`u`?FormData:null,Blob:typeof Blob<`u`?Blob:null},protocols:[`http`,`https`,`file`,`blob`,`url`,`data`]},Qe=e({hasBrowserEnv:()=>$e,hasStandardBrowserEnv:()=>tt,hasStandardBrowserWebWorkerEnv:()=>nt,navigator:()=>et,origin:()=>rt}),$e=typeof window<`u`&&typeof document<`u`,et=typeof navigator==`object`&&navigator||void 0,tt=$e&&(!et||[`ReactNative`,`NativeScript`,`NS`].indexOf(et.product)<0),nt=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope&&typeof self.importScripts==`function`,rt=$e&&window.location.href||`http://localhost`,F={...Qe,...Ze};function it(e,t){return N(e,new F.classes.URLSearchParams,{visitor:function(e,t,n,r){return F.isNode&&k.isBuffer(e)?(this.append(t,e.toString(`base64`)),!1):r.defaultVisitor.apply(this,arguments)},...t})}function at(e){return k.matchAll(/\w+|\[(\w*)]/g,e).map(e=>e[0]===`[]`?``:e[1]||e[0])}function ot(e){let t={},n=Object.keys(e),r,i=n.length,a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function st(e){function t(e,n,r,i){let a=e[i++];if(a===`__proto__`)return!0;let o=Number.isFinite(+a),s=i>=e.length;return a=!a&&k.isArray(r)?r.length:a,s?(k.hasOwnProp(r,a)?r[a]=[r[a],n]:r[a]=n,!o):((!r[a]||!k.isObject(r[a]))&&(r[a]=[]),t(e,n,r[a],i)&&k.isArray(r[a])&&(r[a]=ot(r[a])),!o)}if(k.isFormData(e)&&k.isFunction(e.entries)){let n={};return k.forEachEntry(e,(e,r)=>{t(at(e),r,n,0)}),n}return null}function ct(e,t,n){if(k.isString(e))try{return(t||JSON.parse)(e),k.trim(e)}catch(e){if(e.name!==`SyntaxError`)throw e}return(n||JSON.stringify)(e)}var I={transitional:Xe,adapter:[`xhr`,`http`,`fetch`],transformRequest:[function(e,t){let n=t.getContentType()||``,r=n.indexOf(`application/json`)>-1,i=k.isObject(e);if(i&&k.isHTMLForm(e)&&(e=new FormData(e)),k.isFormData(e))return r?JSON.stringify(st(e)):e;if(k.isArrayBuffer(e)||k.isBuffer(e)||k.isStream(e)||k.isFile(e)||k.isBlob(e)||k.isReadableStream(e))return e;if(k.isArrayBufferView(e))return e.buffer;if(k.isURLSearchParams(e))return t.setContentType(`application/x-www-form-urlencoded;charset=utf-8`,!1),e.toString();let a;if(i){if(n.indexOf(`application/x-www-form-urlencoded`)>-1)return it(e,this.formSerializer).toString();if((a=k.isFileList(e))||n.indexOf(`multipart/form-data`)>-1){let t=this.env&&this.env.FormData;return N(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||r?(t.setContentType(`application/json`,!1),ct(e)):e}],transformResponse:[function(e){let t=this.transitional||I.transitional,n=t&&t.forcedJSONParsing,r=this.responseType===`json`;if(k.isResponse(e)||k.isReadableStream(e))return e;if(e&&k.isString(e)&&(n&&!this.responseType||r)){let n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n)throw e.name===`SyntaxError`?A.from(e,A.ERR_BAD_RESPONSE,this,null,this.response):e}}return e}],timeout:0,xsrfCookieName:`XSRF-TOKEN`,xsrfHeaderName:`X-XSRF-TOKEN`,maxContentLength:-1,maxBodyLength:-1,env:{FormData:F.classes.FormData,Blob:F.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:`application/json, text/plain, */*`,"Content-Type":void 0}}};k.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`],e=>{I.headers[e]={}});var lt=k.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`]),ut=e=>{let t={},n,r,i;return e&&e.split(`
|
|
`).forEach(function(e){i=e.indexOf(`:`),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!(!n||t[n]&<[n])&&(n===`set-cookie`?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+`, `+r:r)}),t},dt=Symbol(`internals`);function L(e){return e&&String(e).trim().toLowerCase()}function R(e){return e===!1||e==null?e:k.isArray(e)?e.map(R):String(e)}function ft(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}var pt=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function z(e,t,n,r,i){if(k.isFunction(r))return r.call(this,t,n);if(i&&(t=n),k.isString(t)){if(k.isString(r))return t.indexOf(r)!==-1;if(k.isRegExp(r))return r.test(t)}}function mt(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function ht(e,t){let n=k.toCamelCase(` `+t);[`get`,`set`,`has`].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}var B=class{constructor(e){e&&this.set(e)}set(e,t,n){let r=this;function i(e,t,n){let i=L(t);if(!i)throw Error(`header name must be a non-empty string`);let a=k.findKey(r,i);(!a||r[a]===void 0||n===!0||n===void 0&&r[a]!==!1)&&(r[a||t]=R(e))}let a=(e,t)=>k.forEach(e,(e,n)=>i(e,n,t));if(k.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(k.isString(e)&&(e=e.trim())&&!pt(e))a(ut(e),t);else if(k.isObject(e)&&k.isIterable(e)){let n={},r,i;for(let t of e){if(!k.isArray(t))throw TypeError(`Object iterator must return a key-value pair`);n[i=t[0]]=(r=n[i])?k.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}a(n,t)}else e!=null&&i(t,e,n);return this}get(e,t){if(e=L(e),e){let n=k.findKey(this,e);if(n){let e=this[n];if(!t)return e;if(t===!0)return ft(e);if(k.isFunction(t))return t.call(this,e,n);if(k.isRegExp(t))return t.exec(e);throw TypeError(`parser must be boolean|regexp|function`)}}}has(e,t){if(e=L(e),e){let n=k.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||z(this,this[n],n,t)))}return!1}delete(e,t){let n=this,r=!1;function i(e){if(e=L(e),e){let i=k.findKey(n,e);i&&(!t||z(n,n[i],i,t))&&(delete n[i],r=!0)}}return k.isArray(e)?e.forEach(i):i(e),r}clear(e){let t=Object.keys(this),n=t.length,r=!1;for(;n--;){let i=t[n];(!e||z(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){let t=this,n={};return k.forEach(this,(r,i)=>{let a=k.findKey(n,i);if(a){t[a]=R(r),delete t[i];return}let o=e?mt(i):String(i).trim();o!==i&&delete t[i],t[o]=R(r),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return k.forEach(this,(n,r)=>{n!=null&&n!==!1&&(t[r]=e&&k.isArray(n)?n.join(`, `):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+`: `+t).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,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=(this[dt]=this[dt]={accessors:{}}).accessors,n=this.prototype;function r(e){let r=L(e);t[r]||(ht(n,e),t[r]=!0)}return k.isArray(e)?e.forEach(r):r(e),this}};B.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),k.reduceDescriptors(B.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),k.freezeMethods(B);function V(e,t){let n=this||I,r=t||n,i=B.from(r.headers),a=r.data;return k.forEach(e,function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function gt(e){return!!(e&&e.__CANCEL__)}var H=class extends A{constructor(e,t,n){super(e??`canceled`,A.ERR_CANCELED,t,n),this.name=`CanceledError`,this.__CANCEL__=!0}};function _t(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new A(`Request failed with status code `+n.status,[A.ERR_BAD_REQUEST,A.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function vt(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||``}function yt(e,t){e||=10;let n=Array(e),r=Array(e),i=0,a=0,o;return t=t===void 0?1e3:t,function(s){let c=Date.now(),l=r[a];o||=c,n[i]=s,r[i]=c;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;let f=l&&c-l;return f?Math.round(d*1e3/f):void 0}}function bt(e,t){let n=0,r=1e3/t,i,a,o=(t,r=Date.now())=>{n=r,i=null,a&&=(clearTimeout(a),null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-n;s>=r?o(e,t):(i=e,a||=setTimeout(()=>{a=null,o(i)},r-s))},()=>i&&o(i)]}var U=(e,t,n=3)=>{let r=0,i=yt(50,250);return bt(n=>{let a=n.loaded,o=n.lengthComputable?n.total:void 0,s=a-r,c=i(s),l=a<=o;r=a,e({loaded:a,total:o,progress:o?a/o:void 0,bytes:s,rate:c||void 0,estimated:c&&o&&l?(o-a)/c:void 0,event:n,lengthComputable:o!=null,[t?`download`:`upload`]:!0})},n)},xt=(e,t)=>{let n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},St=e=>(...t)=>k.asap(()=>e(...t)),Ct=F.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,F.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(F.origin),F.navigator&&/(msie|trident)/i.test(F.navigator.userAgent)):()=>!0,wt=F.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>`u`)return;let s=[`${e}=${encodeURIComponent(t)}`];k.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),k.isString(r)&&s.push(`path=${r}`),k.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push(`secure`),k.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join(`; `)},read(e){if(typeof document>`u`)return null;let t=document.cookie.match(RegExp(`(?:^|; )`+e+`=([^;]*)`));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,``,Date.now()-864e5,`/`)}}:{write(){},read(){return null},remove(){}};function Tt(e){return typeof e==`string`?/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e):!1}function Et(e,t){return t?e.replace(/\/?\/$/,``)+`/`+t.replace(/^\/+/,``):e}function Dt(e,t,n){let r=!Tt(t);return e&&(r||n==0)?Et(e,t):t}var Ot=e=>e instanceof B?{...e}:e;function W(e,t){t||={};let n={};function r(e,t,n,r){return k.isPlainObject(e)&&k.isPlainObject(t)?k.merge.call({caseless:r},e,t):k.isPlainObject(t)?k.merge({},t):k.isArray(t)?t.slice():t}function i(e,t,n,i){if(!k.isUndefined(t))return r(e,t,n,i);if(!k.isUndefined(e))return r(void 0,e,n,i)}function a(e,t){if(!k.isUndefined(t))return r(void 0,t)}function o(e,t){if(!k.isUndefined(t))return r(void 0,t);if(!k.isUndefined(e))return r(void 0,e)}function s(n,i,a){if(a in t)return r(n,i);if(a in e)return r(void 0,n)}let c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(e,t,n)=>i(Ot(e),Ot(t),n,!0)};return k.forEach(Object.keys({...e,...t}),function(r){if(r===`__proto__`||r===`constructor`||r===`prototype`)return;let a=k.hasOwnProp(c,r)?c[r]:i,o=a(e[r],t[r],r);k.isUndefined(o)&&a!==s||(n[r]=o)}),n}var kt=e=>{let t=W({},e),{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:s}=t;if(t.headers=o=B.from(o),t.url=Je(Dt(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&o.set(`Authorization`,`Basic `+btoa((s.username||``)+`:`+(s.password?unescape(encodeURIComponent(s.password)):``))),k.isFormData(n)){if(F.hasStandardBrowserEnv||F.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(k.isFunction(n.getHeaders)){let e=n.getHeaders(),t=[`content-type`,`content-length`];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&o.set(e,n)})}}if(F.hasStandardBrowserEnv&&(r&&k.isFunction(r)&&(r=r(t)),r||r!==!1&&Ct(t.url))){let e=i&&a&&wt.read(a);e&&o.set(i,e)}return t},At=typeof XMLHttpRequest<`u`&&function(e){return new Promise(function(t,n){let r=kt(e),i=r.data,a=B.from(r.headers).normalize(),{responseType:o,onUploadProgress:s,onDownloadProgress:c}=r,l,u,d,f,p;function m(){f&&f(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener(`abort`,l)}let h=new XMLHttpRequest;h.open(r.method.toUpperCase(),r.url,!0),h.timeout=r.timeout;function g(){if(!h)return;let r=B.from(`getAllResponseHeaders`in h&&h.getAllResponseHeaders());_t(function(e){t(e),m()},function(e){n(e),m()},{data:!o||o===`text`||o===`json`?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:r,config:e,request:h}),h=null}`onloadend`in h?h.onloadend=g:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf(`file:`)===0)||setTimeout(g)},h.onabort=function(){h&&=(n(new A(`Request aborted`,A.ECONNABORTED,e,h)),null)},h.onerror=function(t){let r=new A(t&&t.message?t.message:`Network Error`,A.ERR_NETWORK,e,h);r.event=t||null,n(r),h=null},h.ontimeout=function(){let t=r.timeout?`timeout of `+r.timeout+`ms exceeded`:`timeout exceeded`,i=r.transitional||Xe;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new A(t,i.clarifyTimeoutError?A.ETIMEDOUT:A.ECONNABORTED,e,h)),h=null},i===void 0&&a.setContentType(null),`setRequestHeader`in h&&k.forEach(a.toJSON(),function(e,t){h.setRequestHeader(t,e)}),k.isUndefined(r.withCredentials)||(h.withCredentials=!!r.withCredentials),o&&o!==`json`&&(h.responseType=r.responseType),c&&([d,p]=U(c,!0),h.addEventListener(`progress`,d)),s&&h.upload&&([u,f]=U(s),h.upload.addEventListener(`progress`,u),h.upload.addEventListener(`loadend`,f)),(r.cancelToken||r.signal)&&(l=t=>{h&&=(n(!t||t.type?new H(null,e,h):t),h.abort(),null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener(`abort`,l)));let _=vt(r.url);if(_&&F.protocols.indexOf(_)===-1){n(new A(`Unsupported protocol `+_+`:`,A.ERR_BAD_REQUEST,e));return}h.send(i||null)})},jt=(e,t)=>{let{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n=new AbortController,r,i=function(e){if(!r){r=!0,o();let t=e instanceof Error?e:this.reason;n.abort(t instanceof A?t:new H(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new A(`timeout of ${t}ms exceeded`,A.ETIMEDOUT))},t),o=()=>{e&&=(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener(`abort`,i)}),null)};e.forEach(e=>e.addEventListener(`abort`,i));let{signal:s}=n;return s.unsubscribe=()=>k.asap(o),s}},Mt=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},Nt=async function*(e,t){for await(let n of Pt(e))yield*Mt(n,t)},Pt=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},Ft=(e,t,n,r)=>{let i=Nt(e,t),a=0,o,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{let{done:t,value:r}=await i.next();if(t){s(),e.close();return}let o=r.byteLength;n&&n(a+=o),e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel(e){return s(e),i.return()}},{highWaterMark:2})},It=64*1024,{isFunction:G}=k,Lt=(({Request:e,Response:t})=>({Request:e,Response:t}))(k.global),{ReadableStream:Rt,TextEncoder:zt}=k.global,Bt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Vt=e=>{e=k.merge.call({skipUndefined:!0},Lt,e);let{fetch:t,Request:n,Response:r}=e,i=t?G(t):typeof fetch==`function`,a=G(n),o=G(r);if(!i)return!1;let s=i&&G(Rt),c=i&&(typeof zt==`function`?(e=>t=>e.encode(t))(new zt):async e=>new Uint8Array(await new n(e).arrayBuffer())),l=a&&s&&Bt(()=>{let e=!1,t=new n(F.origin,{body:new Rt,method:`POST`,get duplex(){return e=!0,`half`}}).headers.has(`Content-Type`);return e&&!t}),u=o&&s&&Bt(()=>k.isReadableStream(new r(``).body)),d={stream:u&&(e=>e.body)};i&&[`text`,`arrayBuffer`,`blob`,`formData`,`stream`].forEach(e=>{!d[e]&&(d[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new A(`Response type '${e}' is not supported`,A.ERR_NOT_SUPPORT,n)})});let f=async e=>{if(e==null)return 0;if(k.isBlob(e))return e.size;if(k.isSpecCompliantForm(e))return(await new n(F.origin,{method:`POST`,body:e}).arrayBuffer()).byteLength;if(k.isArrayBufferView(e)||k.isArrayBuffer(e))return e.byteLength;if(k.isURLSearchParams(e)&&(e+=``),k.isString(e))return(await c(e)).byteLength},p=async(e,t)=>k.toFiniteNumber(e.getContentLength())??f(t);return async e=>{let{url:i,method:o,data:s,signal:c,cancelToken:f,timeout:m,onDownloadProgress:h,onUploadProgress:g,responseType:_,headers:v,withCredentials:y=`same-origin`,fetchOptions:b}=kt(e),x=t||fetch;_=_?(_+``).toLowerCase():`text`;let S=jt([c,f&&f.toAbortSignal()],m),C=null,w=S&&S.unsubscribe&&(()=>{S.unsubscribe()}),T;try{if(g&&l&&o!==`get`&&o!==`head`&&(T=await p(v,s))!==0){let e=new n(i,{method:`POST`,body:s,duplex:`half`}),t;if(k.isFormData(s)&&(t=e.headers.get(`content-type`))&&v.setContentType(t),e.body){let[t,n]=xt(T,U(St(g)));s=Ft(e.body,It,t,n)}}k.isString(y)||(y=y?`include`:`omit`);let t=a&&`credentials`in n.prototype,c={...b,signal:S,method:o.toUpperCase(),headers:v.normalize().toJSON(),body:s,duplex:`half`,credentials:t?y:void 0};C=a&&new n(i,c);let f=await(a?x(C,b):x(i,c)),m=u&&(_===`stream`||_===`response`);if(u&&(h||m&&w)){let e={};[`status`,`statusText`,`headers`].forEach(t=>{e[t]=f[t]});let t=k.toFiniteNumber(f.headers.get(`content-length`)),[n,i]=h&&xt(t,U(St(h),!0))||[];f=new r(Ft(f.body,It,n,()=>{i&&i(),w&&w()}),e)}_||=`text`;let ee=await d[k.findKey(d,_)||`text`](f,e);return!m&&w&&w(),await new Promise((t,n)=>{_t(t,n,{data:ee,headers:B.from(f.headers),status:f.status,statusText:f.statusText,config:e,request:C})})}catch(t){throw w&&w(),t&&t.name===`TypeError`&&/Load failed|fetch/i.test(t.message)?Object.assign(new A(`Network Error`,A.ERR_NETWORK,e,C,t&&t.response),{cause:t.cause||t}):A.from(t,t&&t.code,e,C,t&&t.response)}}},Ht=new Map,Ut=e=>{let t=e&&e.env||{},{fetch:n,Request:r,Response:i}=t,a=[r,i,n],o=a.length,s,c,l=Ht;for(;o--;)s=a[o],c=l.get(s),c===void 0&&l.set(s,c=o?new Map:Vt(t)),l=c;return c};Ut();var K={http:null,xhr:At,fetch:{get:Ut}};k.forEach(K,(e,t)=>{if(e){try{Object.defineProperty(e,`name`,{value:t})}catch{}Object.defineProperty(e,`adapterName`,{value:t})}});var Wt=e=>`- ${e}`,Gt=e=>k.isFunction(e)||e===null||e===!1;function Kt(e,t){e=k.isArray(e)?e:[e];let{length:n}=e,r,i,a={};for(let o=0;o<n;o++){r=e[o];let n;if(i=r,!Gt(r)&&(i=K[(n=String(r)).toLowerCase()],i===void 0))throw new A(`Unknown adapter '${n}'`);if(i&&(k.isFunction(i)||(i=i.get(t))))break;a[n||`#`+o]=i}if(!i){let e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(t===!1?`is not supported by the environment`:`is not available in the build`));throw new A(`There is no suitable adapter to dispatch the request `+(n?e.length>1?`since :
|
|
`+e.map(Wt).join(`
|
|
`):` `+Wt(e[0]):`as no adapter specified`),`ERR_NOT_SUPPORT`)}return i}var qt={getAdapter:Kt,adapters:K};function q(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new H(null,e)}function Jt(e){return q(e),e.headers=B.from(e.headers),e.data=V.call(e,e.transformRequest),[`post`,`put`,`patch`].indexOf(e.method)!==-1&&e.headers.setContentType(`application/x-www-form-urlencoded`,!1),qt.getAdapter(e.adapter||I.adapter,e)(e).then(function(t){return q(e),t.data=V.call(e,e.transformResponse,t),t.headers=B.from(t.headers),t},function(t){return gt(t)||(q(e),t&&t.response&&(t.response.data=V.call(e,e.transformResponse,t.response),t.response.headers=B.from(t.response.headers))),Promise.reject(t)})}var Yt=`1.13.6`,J={};[`object`,`boolean`,`number`,`function`,`string`,`symbol`].forEach((e,t)=>{J[e]=function(n){return typeof n===e||`a`+(t<1?`n `:` `)+e}});var Xt={};J.transitional=function(e,t,n){function r(e,t){return`[Axios v`+Yt+`] Transitional option '`+e+`'`+t+(n?`. `+n:``)}return(n,i,a)=>{if(e===!1)throw new A(r(i,` has been removed`+(t?` in `+t:``)),A.ERR_DEPRECATED);return t&&!Xt[i]&&(Xt[i]=!0,console.warn(r(i,` has been deprecated since v`+t+` and will be removed in the near future`))),e?e(n,i,a):!0}},J.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function Zt(e,t,n){if(typeof e!=`object`)throw new A(`options must be an object`,A.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-- >0;){let a=r[i],o=t[a];if(o){let t=e[a],n=t===void 0||o(t,a,e);if(n!==!0)throw new A(`option `+a+` must be `+n,A.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new A(`Unknown option `+a,A.ERR_BAD_OPTION)}}var Y={assertOptions:Zt,validators:J},X=Y.validators,Z=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Ye,response:new Ye}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let n=t.stack?t.stack.replace(/^.+\n/,``):``;try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,``))&&(e.stack+=`
|
|
`+n):e.stack=n}catch{}}throw e}}_request(e,t){typeof e==`string`?(t||={},t.url=e):t=e||{},t=W(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&Y.assertOptions(n,{silentJSONParsing:X.transitional(X.boolean),forcedJSONParsing:X.transitional(X.boolean),clarifyTimeoutError:X.transitional(X.boolean),legacyInterceptorReqResOrdering:X.transitional(X.boolean)},!1),r!=null&&(k.isFunction(r)?t.paramsSerializer={serialize:r}:Y.assertOptions(r,{encode:X.function,serialize:X.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),Y.assertOptions(t,{baseUrl:X.spelling(`baseURL`),withXsrfToken:X.spelling(`withXSRFToken`)},!0),t.method=(t.method||this.defaults.method||`get`).toLowerCase();let a=i&&k.merge(i.common,i[t.method]);i&&k.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`common`],e=>{delete i[e]}),t.headers=B.concat(a,i);let o=[],s=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;s&&=e.synchronous;let n=t.transitional||Xe;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,u=0,d;if(!s){let e=[Jt.bind(this),void 0];for(e.unshift(...o),e.push(...c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=o.length;let f=t;for(;u<d;){let e=o[u++],t=o[u++];try{f=e(f)}catch(e){t.call(this,e);break}}try{l=Jt.call(this,f)}catch(e){return Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return e=W(this.defaults,e),Je(Dt(e.baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};k.forEach([`delete`,`get`,`head`,`options`],function(e){Z.prototype[e]=function(t,n){return this.request(W(n||{},{method:e,url:t,data:(n||{}).data}))}}),k.forEach([`post`,`put`,`patch`],function(e){function t(t){return function(n,r,i){return this.request(W(i||{},{method:e,headers:t?{"Content-Type":`multipart/form-data`}:{},url:n,data:r}))}}Z.prototype[e]=t(),Z.prototype[e+`Form`]=t(!0)});var Qt=class e{constructor(e){if(typeof e!=`function`)throw TypeError(`executor must be a function.`);let t;this.promise=new Promise(function(e){t=e});let n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new H(e,r,i),t(n.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;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};function $t(e){return function(t){return e.apply(null,t)}}function en(e){return k.isObject(e)&&e.isAxiosError===!0}var tn={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(tn).forEach(([e,t])=>{tn[t]=e});function nn(e){let t=new Z(e),n=o(Z.prototype.request,t);return k.extend(n,Z.prototype,t,{allOwnKeys:!0}),k.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return nn(W(e,t))},n}var Q=nn(I);Q.Axios=Z,Q.CanceledError=H,Q.CancelToken=Qt,Q.isCancel=gt,Q.VERSION=Yt,Q.toFormData=N,Q.AxiosError=A,Q.Cancel=Q.CanceledError,Q.all=function(e){return Promise.all(e)},Q.spread=$t,Q.isAxiosError=en,Q.mergeConfig=W,Q.AxiosHeaders=B,Q.formToJSON=e=>st(k.isHTMLForm(e)?new FormData(e):e),Q.getAdapter=qt.getAdapter,Q.HttpStatusCode=tn,Q.default=Q;function $(){let e=Q.create({baseURL:a.VITE_SERVER_API_URL+a.VITE_SERVER_API_PREFIX,timeout:a.VITE_SERVER_API_TIMEOUT});return e.interceptors.request.use(e=>{let t=i();return t.token&&(e.headers.Authorization=`Bearer ${t.token}`),e},e=>Promise.reject(e)),e.interceptors.response.use(e=>e,e=>(e.response?.status===401&&(i().logout(),window.location.href=`/auth/sign-in`),Promise.reject(e))),{axiosInstance:e}}function rn(){let{axiosInstance:e}=$();return r({mutationKey:[`useAdminLoginMutation`],mutationFn:async t=>(await e.post(`/admin/login`,t)).data})}function an(e){let{axiosInstance:n}=$();return t({queryKey:[`useGetUserListQuery`,e],queryFn:async()=>(await n.get(`/admin/user/list`,{params:e})).data})}function on(){let{axiosInstance:e}=$(),t=n();return r({mutationKey:[`useUpdateUserStatusMutation`],mutationFn:async t=>(await e.post(`/admin/user/status`,t)).data,onSuccess:()=>{t.invalidateQueries({queryKey:[`useGetUserListQuery`]})}})}function sn(){let{axiosInstance:e}=$();return t({queryKey:[`useGetCoinListQuery`],queryFn:async()=>(await e.get(`/admin/coin/list`)).data})}function cn(){let{axiosInstance:e}=$(),t=n();return r({mutationKey:[`useSaveCoinMutation`],mutationFn:async t=>(await e.post(`/admin/coin/save`,t)).data,onSuccess:()=>{t.invalidateQueries({queryKey:[`useGetCoinListQuery`]})}})}function ln(){let{axiosInstance:e}=$(),t=n();return r({mutationKey:[`useUpdateCoinPriceMutation`],mutationFn:async t=>(await e.post(`/admin/coin/price`,t)).data,onSuccess:()=>{t.invalidateQueries({queryKey:[`useGetCoinListQuery`]})}})}function un(){let{axiosInstance:e}=$(),t=n();return r({mutationKey:[`useUpdateCoinStatusMutation`],mutationFn:async t=>(await e.post(`/admin/coin/status`,t)).data,onSuccess:()=>{t.invalidateQueries({queryKey:[`useGetCoinListQuery`]})}})}function dn(e){let{axiosInstance:n}=$();return t({queryKey:[`useGetPendingOrdersQuery`,e],queryFn:async()=>(await n.get(`/admin/order/pending`,{params:e})).data})}function fn(e){let{axiosInstance:n}=$();return t({queryKey:[`useGetAllOrdersQuery`,e],queryFn:async()=>(await n.get(`/admin/order/list`,{params:e})).data})}function pn(){let{axiosInstance:e}=$(),t=n();return r({mutationKey:[`useApproveOrderMutation`],mutationFn:async t=>(await e.post(`/admin/order/approve`,t)).data,onSuccess:()=>{t.invalidateQueries({queryKey:[`useGetPendingOrdersQuery`]}),t.invalidateQueries({queryKey:[`useGetAllOrdersQuery`]})}})}function mn(){let{axiosInstance:e}=$();return t({queryKey:[`useGetFinanceOverviewQuery`],queryFn:async()=>(await e.get(`/admin/finance/overview`)).data})}function hn(){let{axiosInstance:e}=$();return t({queryKey:[`useGetWalletListQuery`],queryFn:async()=>(await e.get(`/admin/wallet/list`)).data})}function gn(){let{axiosInstance:e}=$(),t=n();return r({mutationKey:[`useCreateWalletMutation`],mutationFn:async t=>(await e.post(`/admin/wallet/create`,t)).data,onSuccess:()=>{t.invalidateQueries({queryKey:[`useGetWalletListQuery`]})}})}function _n(){let{axiosInstance:e}=$(),t=n();return r({mutationKey:[`useUpdateWalletMutation`],mutationFn:async t=>(await e.post(`/admin/wallet/update`,t)).data,onSuccess:()=>{t.invalidateQueries({queryKey:[`useGetWalletListQuery`]})}})}function vn(){let{axiosInstance:e}=$(),t=n();return r({mutationKey:[`useDeleteWalletMutation`],mutationFn:async t=>(await e.post(`/admin/wallet/delete`,t)).data,onSuccess:()=>{t.invalidateQueries({queryKey:[`useGetWalletListQuery`]})}})}function yn(){let{axiosInstance:e}=$(),t=n();return r({mutationKey:[`useSetDefaultWalletMutation`],mutationFn:async t=>(await e.post(`/admin/wallet/setDefault`,t)).data,onSuccess:()=>{t.invalidateQueries({queryKey:[`useGetWalletListQuery`]})}})}function bn(){let{axiosInstance:e}=$(),t=n();return r({mutationKey:[`useToggleWalletStatusMutation`],mutationFn:async t=>(await e.post(`/admin/wallet/toggleStatus`,t)).data,onSuccess:()=>{t.invalidateQueries({queryKey:[`useGetWalletListQuery`]})}})}function xn(e=`month`){let{axiosInstance:n}=$();return t({queryKey:[`useGetProfitAnalysisQuery`,e],queryFn:async()=>(await n.get(`/admin/analysis/profit`,{params:{range:e}})).data})}function Sn(e=6){let{axiosInstance:n}=$();return t({queryKey:[`useGetCashFlowTrendQuery`,e],queryFn:async()=>(await n.get(`/admin/analysis/cash-flow`,{params:{months:e}})).data})}function Cn(e=`week`){let{axiosInstance:n}=$();return t({queryKey:[`useGetTradeAnalysisQuery`,e],queryFn:async()=>(await n.get(`/admin/analysis/trade`,{params:{range:e}})).data})}function wn(e=`month`){let{axiosInstance:n}=$();return t({queryKey:[`useGetCoinDistributionQuery`,e],queryFn:async()=>(await n.get(`/admin/analysis/coin-distribution`,{params:{range:e}})).data})}function Tn(e=6){let{axiosInstance:n}=$();return t({queryKey:[`useGetUserGrowthQuery`,e],queryFn:async()=>(await n.get(`/admin/analysis/user-growth`,{params:{months:e}})).data})}function En(){let{axiosInstance:e}=$();return t({queryKey:[`useGetRiskMetricsQuery`],queryFn:async()=>(await e.get(`/admin/analysis/risk`)).data})}export{_n as C,on as S,cn as _,fn as a,ln as b,sn as c,xn as d,En as f,hn as g,an as h,vn as i,mn as l,Tn as m,pn as n,Sn as o,Cn as p,gn as r,wn as s,rn as t,dn as u,yn as v,un as x,bn as y};
|