Files
zn-ai/dist/assets/request-D0YE0rr6.js
duanshuwen 6615d11dd6 chore: restructure project and add i18n support
- Reorganize project structure with new electron and shared directories
- Add comprehensive i18n support with Chinese, English, and Japanese locales
- Update build configurations and TypeScript paths for new structure
- Add various UI components including chat interface and task management
- Include Windows release binaries and localization files
- Update dependencies and fix import paths throughout the codebase
2026-04-06 14:39:06 +08:00

14 lines
40 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{S as Et,a6 as gt,Z as de,a7 as St}from"./index-Vy2R4VLt.js";function Qe(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ot}=Object.prototype,{getPrototypeOf:Se}=Object,{iterator:se,toStringTag:Ze}=Symbol,oe=(e=>t=>{const n=Ot.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),U=e=>(e=e.toLowerCase(),t=>oe(t)===e),ie=e=>t=>typeof t===e,{isArray:M}=Array,H=ie("undefined");function z(e){return e!==null&&!H(e)&&e.constructor!==null&&!H(e.constructor)&&A(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ye=U("ArrayBuffer");function Tt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ye(e.buffer),t}const At=ie("string"),A=ie("function"),et=ie("number"),V=e=>e!==null&&typeof e=="object",Ct=e=>e===!0||e===!1,ee=e=>{if(oe(e)!=="object")return!1;const t=Se(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Ze in e)&&!(se in e)},Nt=e=>{if(!V(e)||z(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},_t=U("Date"),xt=U("File"),Pt=e=>!!(e&&typeof e.uri<"u"),Ut=e=>e&&typeof e.getParts<"u",Ft=U("Blob"),Lt=U("FileList"),Dt=e=>V(e)&&A(e.pipe);function Bt(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Le=Bt(),De=typeof Le.FormData<"u"?Le.FormData:void 0,jt=e=>{let t;return e&&(De&&e instanceof De||A(e.append)&&((t=oe(e))==="formdata"||t==="object"&&A(e.toString)&&e.toString()==="[object FormData]"))},kt=U("URLSearchParams"),[qt,It,Ht,Mt]=["ReadableStream","Request","Response","Headers"].map(U),$t=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function v(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),M(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(z(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let c;for(r=0;r<i;r++)c=o[r],t.call(null,e[c],c,e)}}function tt(e,t){if(z(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const j=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,nt=e=>!H(e)&&e!==j;function we(){const{caseless:e,skipUndefined:t}=nt(this)&&this||{},n={},r=(s,o)=>{if(o==="__proto__"||o==="constructor"||o==="prototype")return;const i=e&&tt(n,o)||o;ee(n[i])&&ee(s)?n[i]=we(n[i],s):ee(s)?n[i]=we({},s):M(s)?n[i]=s.slice():(!t||!H(s))&&(n[i]=s)};for(let s=0,o=arguments.length;s<o;s++)arguments[s]&&v(arguments[s],r);return n}const Jt=(e,t,n,{allOwnKeys:r}={})=>(v(t,(s,o)=>{n&&A(s)?Object.defineProperty(e,o,{value:Qe(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),zt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Vt=(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)},vt=(e,t,n,r)=>{let s,o,i;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!r||r(i,e,t))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=n!==!1&&Se(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Wt=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Kt=e=>{if(!e)return null;if(M(e))return e;let t=e.length;if(!et(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Xt=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Se(Uint8Array)),Gt=(e,t)=>{const r=(e&&e[se]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},Qt=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Zt=U("HTMLFormElement"),Yt=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Be=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),en=U("RegExp"),rt=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};v(n,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(r[o]=i||s)}),Object.defineProperties(e,r)},tn=e=>{rt(e,(t,n)=>{if(A(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(A(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},nn=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return M(e)?r(e):r(String(e).split(t)),n},rn=()=>{},sn=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function on(e){return!!(e&&A(e.append)&&e[Ze]==="FormData"&&e[se])}const an=e=>{const t=new Array(10),n=(r,s)=>{if(V(r)){if(t.indexOf(r)>=0)return;if(z(r))return r;if(!("toJSON"in r)){t[s]=r;const o=M(r)?[]:{};return v(r,(i,c)=>{const d=n(i,s+1);!H(d)&&(o[c]=d)}),t[s]=void 0,o}}return r};return n(e,0)},cn=U("AsyncFunction"),ln=e=>e&&(V(e)||A(e))&&A(e.then)&&A(e.catch),st=((e,t)=>e?setImmediate:t?((n,r)=>(j.addEventListener("message",({source:s,data:o})=>{s===j&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),j.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",A(j.postMessage)),un=typeof queueMicrotask<"u"?queueMicrotask.bind(j):typeof process<"u"&&process.nextTick||st,fn=e=>e!=null&&A(e[se]),a={isArray:M,isArrayBuffer:Ye,isBuffer:z,isFormData:jt,isArrayBufferView:Tt,isString:At,isNumber:et,isBoolean:Ct,isObject:V,isPlainObject:ee,isEmptyObject:Nt,isReadableStream:qt,isRequest:It,isResponse:Ht,isHeaders:Mt,isUndefined:H,isDate:_t,isFile:xt,isReactNativeBlob:Pt,isReactNative:Ut,isBlob:Ft,isRegExp:en,isFunction:A,isStream:Dt,isURLSearchParams:kt,isTypedArray:Xt,isFileList:Lt,forEach:v,merge:we,extend:Jt,trim:$t,stripBOM:zt,inherits:Vt,toFlatObject:vt,kindOf:oe,kindOfTest:U,endsWith:Wt,toArray:Kt,forEachEntry:Gt,matchAll:Qt,isHTMLForm:Zt,hasOwnProperty:Be,hasOwnProp:Be,reduceDescriptors:rt,freezeMethods:tn,toObjectSet:nn,toCamelCase:Yt,noop:rn,toFiniteNumber:sn,findKey:tt,global:j,isContextDefined:nt,isSpecCompliantForm:on,toJSONObject:an,isAsyncFn:cn,isThenable:ln,setImmediate:st,asap:un,isIterable:fn};let y=class ot extends Error{static from(t,n,r,s,o,i){const c=new ot(t.message,n||t.code,r,s,o);return c.cause=t,c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),i&&Object.assign(c,i),c}constructor(t,n,r,s,o){super(t),Object.defineProperty(this,"message",{value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),s&&(this.request=s),o&&(this.response=o,this.status=o.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:a.toJSONObject(this.config),code:this.code,status:this.status}}};y.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";y.ERR_BAD_OPTION="ERR_BAD_OPTION";y.ECONNABORTED="ECONNABORTED";y.ETIMEDOUT="ETIMEDOUT";y.ERR_NETWORK="ERR_NETWORK";y.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";y.ERR_DEPRECATED="ERR_DEPRECATED";y.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";y.ERR_BAD_REQUEST="ERR_BAD_REQUEST";y.ERR_CANCELED="ERR_CANCELED";y.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";y.ERR_INVALID_URL="ERR_INVALID_URL";const dn=null;function Re(e){return a.isPlainObject(e)||a.isArray(e)}function it(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function pe(e,t,n){return e?e.concat(t).map(function(s,o){return s=it(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function pn(e){return a.isArray(e)&&!e.some(Re)}const hn=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function ae(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,p){return!a.isUndefined(p[m])});const r=n.metaTokens,s=n.visitor||l,o=n.dots,i=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function f(u){if(u===null)return"";if(a.isDate(u))return u.toISOString();if(a.isBoolean(u))return u.toString();if(!d&&a.isBlob(u))throw new y("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(u)||a.isTypedArray(u)?d&&typeof Blob=="function"?new Blob([u]):Buffer.from(u):u}function l(u,m,p){let R=u;if(a.isReactNative(t)&&a.isReactNativeBlob(u))return t.append(pe(p,m,o),f(u)),!1;if(u&&!p&&typeof u=="object"){if(a.endsWith(m,"{}"))m=r?m:m.slice(0,-2),u=JSON.stringify(u);else if(a.isArray(u)&&pn(u)||(a.isFileList(u)||a.endsWith(m,"[]"))&&(R=a.toArray(u)))return m=it(m),R.forEach(function(E,O){!(a.isUndefined(E)||E===null)&&t.append(i===!0?pe([m],O,o):i===null?m:m+"[]",f(E))}),!1}return Re(u)?!0:(t.append(pe(p,m,o),f(u)),!1)}const h=[],b=Object.assign(hn,{defaultVisitor:l,convertValue:f,isVisitable:Re});function g(u,m){if(!a.isUndefined(u)){if(h.indexOf(u)!==-1)throw Error("Circular reference detected in "+m.join("."));h.push(u),a.forEach(u,function(R,N){(!(a.isUndefined(R)||R===null)&&s.call(t,R,a.isString(N)?N.trim():N,m,b))===!0&&g(R,m?m.concat(N):[N])}),h.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return g(e),t}function je(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Oe(e,t){this._pairs=[],e&&ae(e,this,t)}const at=Oe.prototype;at.append=function(t,n){this._pairs.push([t,n])};at.toString=function(t){const n=t?function(r){return t.call(this,r,je)}:je;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function mn(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ct(e,t,n){if(!t)return e;const r=n&&n.encode||mn,s=a.isFunction(n)?{serialize:n}:n,o=s&&s.serialize;let i;if(o?i=o(t,s):i=a.isURLSearchParams(t)?t.toString():new Oe(t,s).toString(r),i){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class ke{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Te={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},yn=typeof URLSearchParams<"u"?URLSearchParams:Oe,bn=typeof FormData<"u"?FormData:null,wn=typeof Blob<"u"?Blob:null,Rn={isBrowser:!0,classes:{URLSearchParams:yn,FormData:bn,Blob:wn},protocols:["http","https","file","blob","url","data"]},Ae=typeof window<"u"&&typeof document<"u",Ee=typeof navigator=="object"&&navigator||void 0,En=Ae&&(!Ee||["ReactNative","NativeScript","NS"].indexOf(Ee.product)<0),gn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Sn=Ae&&window.location.href||"http://localhost",On=Object.defineProperty({__proto__:null,hasBrowserEnv:Ae,hasStandardBrowserEnv:En,hasStandardBrowserWebWorkerEnv:gn,navigator:Ee,origin:Sn},Symbol.toStringTag,{value:"Module"}),S={...On,...Rn};function Tn(e,t){return ae(e,new S.classes.URLSearchParams,{visitor:function(n,r,s,o){return S.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function An(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Cn(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r<s;r++)o=n[r],t[o]=e[o];return t}function lt(e){function t(n,r,s,o){let i=n[o++];if(i==="__proto__")return!0;const c=Number.isFinite(+i),d=o>=n.length;return i=!i&&a.isArray(s)?s.length:i,d?(a.hasOwnProp(s,i)?s[i]=[s[i],r]:s[i]=r,!c):((!s[i]||!a.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],o)&&a.isArray(s[i])&&(s[i]=Cn(s[i])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,s)=>{t(An(r),s,n,0)}),n}return null}function Nn(e,t,n){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const W={transitional:Te,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=a.isObject(t);if(o&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s?JSON.stringify(lt(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t)||a.isReadableStream(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Tn(t,this.formSerializer).toString();if((c=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return ae(c?{"files[]":t}:t,d&&new d,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),Nn(t)):t}],transformResponse:[function(t){const n=this.transitional||W.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(a.isResponse(t)||a.isReadableStream(t))return t;if(t&&a.isString(t)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(c){if(i)throw c.name==="SyntaxError"?y.from(c,y.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:S.classes.FormData,Blob:S.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],e=>{W.headers[e]={}});const _n=a.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"]),xn=e=>{const t={};let n,r,s;return e&&e.split(`
`).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||t[n]&&_n[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},qe=Symbol("internals");function J(e){return e&&String(e).trim().toLowerCase()}function te(e){return e===!1||e==null?e:a.isArray(e)?e.map(te):String(e)}function Pn(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Un=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function he(e,t,n,r,s){if(a.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!a.isString(t)){if(a.isString(r))return t.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(t)}}function Fn(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Ln(e,t){const n=a.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,o,i){return this[r].call(this,t,s,o,i)},configurable:!0})})}let C=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function o(c,d,f){const l=J(d);if(!l)throw new Error("header name must be a non-empty string");const h=a.findKey(s,l);(!h||s[h]===void 0||f===!0||f===void 0&&s[h]!==!1)&&(s[h||d]=te(c))}const i=(c,d)=>a.forEach(c,(f,l)=>o(f,l,d));if(a.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(a.isString(t)&&(t=t.trim())&&!Un(t))i(xn(t),n);else if(a.isObject(t)&&a.isIterable(t)){let c={},d,f;for(const l of t){if(!a.isArray(l))throw TypeError("Object iterator must return a key-value pair");c[f=l[0]]=(d=c[f])?a.isArray(d)?[...d,l[1]]:[d,l[1]]:l[1]}i(c,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=J(t),t){const r=a.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return Pn(s);if(a.isFunction(n))return n.call(this,s,r);if(a.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=J(t),t){const r=a.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||he(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(i){if(i=J(i),i){const c=a.findKey(r,i);c&&(!n||he(r,r[c],c,n))&&(delete r[c],s=!0)}}return a.isArray(t)?t.forEach(o):o(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!t||he(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const n=this,r={};return a.forEach(this,(s,o)=>{const i=a.findKey(r,o);if(i){n[i]=te(s),delete n[o];return}const c=t?Fn(o):String(o).trim();c!==o&&delete n[o],n[c]=te(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&a.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[qe]=this[qe]={accessors:{}}).accessors,s=this.prototype;function o(i){const c=J(i);r[c]||(Ln(s,i),r[c]=!0)}return a.isArray(t)?t.forEach(o):o(t),this}};C.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(C.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});a.freezeMethods(C);function me(e,t){const n=this||W,r=t||n,s=C.from(r.headers);let o=r.data;return a.forEach(e,function(c){o=c.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function ut(e){return!!(e&&e.__CANCEL__)}let K=class extends y{constructor(t,n,r){super(t??"canceled",y.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function ft(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new y("Request failed with status code "+n.status,[y.ERR_BAD_REQUEST,y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Dn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Bn(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(d){const f=Date.now(),l=r[o];i||(i=f),n[s]=d,r[s]=f;let h=o,b=0;for(;h!==s;)b+=n[h++],h=h%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),f-i<t)return;const g=l&&f-l;return g?Math.round(b*1e3/g):void 0}}function jn(e,t){let n=0,r=1e3/t,s,o;const i=(f,l=Date.now())=>{n=l,s=null,o&&(clearTimeout(o),o=null),e(...f)};return[(...f)=>{const l=Date.now(),h=l-n;h>=r?i(f,l):(s=f,o||(o=setTimeout(()=>{o=null,i(s)},r-h)))},()=>s&&i(s)]}const re=(e,t,n=3)=>{let r=0;const s=Bn(50,250);return jn(o=>{const i=o.loaded,c=o.lengthComputable?o.total:void 0,d=i-r,f=s(d),l=i<=c;r=i;const h={loaded:i,total:c,progress:c?i/c:void 0,bytes:d,rate:f||void 0,estimated:f&&c&&l?(c-i)/f:void 0,event:o,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(h)},n)},Ie=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},He=e=>(...t)=>a.asap(()=>e(...t)),kn=S.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,S.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(S.origin),S.navigator&&/(msie|trident)/i.test(S.navigator.userAgent)):()=>!0,qn=S.hasStandardBrowserEnv?{write(e,t,n,r,s,o,i){if(typeof document>"u")return;const c=[`${e}=${encodeURIComponent(t)}`];a.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),a.isString(r)&&c.push(`path=${r}`),a.isString(s)&&c.push(`domain=${s}`),o===!0&&c.push("secure"),a.isString(i)&&c.push(`SameSite=${i}`),document.cookie=c.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function In(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Hn(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function dt(e,t,n){let r=!In(t);return e&&(r||n==!1)?Hn(e,t):t}const Me=e=>e instanceof C?{...e}:e;function q(e,t){t=t||{};const n={};function r(f,l,h,b){return a.isPlainObject(f)&&a.isPlainObject(l)?a.merge.call({caseless:b},f,l):a.isPlainObject(l)?a.merge({},l):a.isArray(l)?l.slice():l}function s(f,l,h,b){if(a.isUndefined(l)){if(!a.isUndefined(f))return r(void 0,f,h,b)}else return r(f,l,h,b)}function o(f,l){if(!a.isUndefined(l))return r(void 0,l)}function i(f,l){if(a.isUndefined(l)){if(!a.isUndefined(f))return r(void 0,f)}else return r(void 0,l)}function c(f,l,h){if(h in t)return r(f,l);if(h in e)return r(void 0,f)}const d={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c,headers:(f,l,h)=>s(Me(f),Me(l),h,!0)};return a.forEach(Object.keys({...e,...t}),function(l){if(l==="__proto__"||l==="constructor"||l==="prototype")return;const h=a.hasOwnProp(d,l)?d[l]:s,b=h(e[l],t[l],l);a.isUndefined(b)&&h!==c||(n[l]=b)}),n}const pt=e=>{const t=q({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:c}=t;if(t.headers=i=C.from(i),t.url=ct(dt(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),a.isFormData(n)){if(S.hasStandardBrowserEnv||S.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(a.isFunction(n.getHeaders)){const d=n.getHeaders(),f=["content-type","content-length"];Object.entries(d).forEach(([l,h])=>{f.includes(l.toLowerCase())&&i.set(l,h)})}}if(S.hasStandardBrowserEnv&&(r&&a.isFunction(r)&&(r=r(t)),r||r!==!1&&kn(t.url))){const d=s&&o&&qn.read(o);d&&i.set(s,d)}return t},Mn=typeof XMLHttpRequest<"u",$n=Mn&&function(e){return new Promise(function(n,r){const s=pt(e);let o=s.data;const i=C.from(s.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:f}=s,l,h,b,g,u;function m(){g&&g(),u&&u(),s.cancelToken&&s.cancelToken.unsubscribe(l),s.signal&&s.signal.removeEventListener("abort",l)}let p=new XMLHttpRequest;p.open(s.method.toUpperCase(),s.url,!0),p.timeout=s.timeout;function R(){if(!p)return;const E=C.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),P={data:!c||c==="text"||c==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:E,config:e,request:p};ft(function(_){n(_),m()},function(_){r(_),m()},P),p=null}"onloadend"in p?p.onloadend=R:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(R)},p.onabort=function(){p&&(r(new y("Request aborted",y.ECONNABORTED,e,p)),p=null)},p.onerror=function(O){const P=O&&O.message?O.message:"Network Error",D=new y(P,y.ERR_NETWORK,e,p);D.event=O||null,r(D),p=null},p.ontimeout=function(){let O=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const P=s.transitional||Te;s.timeoutErrorMessage&&(O=s.timeoutErrorMessage),r(new y(O,P.clarifyTimeoutError?y.ETIMEDOUT:y.ECONNABORTED,e,p)),p=null},o===void 0&&i.setContentType(null),"setRequestHeader"in p&&a.forEach(i.toJSON(),function(O,P){p.setRequestHeader(P,O)}),a.isUndefined(s.withCredentials)||(p.withCredentials=!!s.withCredentials),c&&c!=="json"&&(p.responseType=s.responseType),f&&([b,u]=re(f,!0),p.addEventListener("progress",b)),d&&p.upload&&([h,g]=re(d),p.upload.addEventListener("progress",h),p.upload.addEventListener("loadend",g)),(s.cancelToken||s.signal)&&(l=E=>{p&&(r(!E||E.type?new K(null,e,p):E),p.abort(),p=null)},s.cancelToken&&s.cancelToken.subscribe(l),s.signal&&(s.signal.aborted?l():s.signal.addEventListener("abort",l)));const N=Dn(s.url);if(N&&S.protocols.indexOf(N)===-1){r(new y("Unsupported protocol "+N+":",y.ERR_BAD_REQUEST,e));return}p.send(o||null)})},Jn=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const o=function(f){if(!s){s=!0,c();const l=f instanceof Error?f:this.reason;r.abort(l instanceof y?l:new K(l instanceof Error?l.message:l))}};let i=t&&setTimeout(()=>{i=null,o(new y(`timeout of ${t}ms exceeded`,y.ETIMEDOUT))},t);const c=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(o):f.removeEventListener("abort",o)}),e=null)};e.forEach(f=>f.addEventListener("abort",o));const{signal:d}=r;return d.unsubscribe=()=>a.asap(c),d}},zn=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},Vn=async function*(e,t){for await(const n of vn(e))yield*zn(n,t)},vn=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},$e=(e,t,n,r)=>{const s=Vn(e,t);let o=0,i,c=d=>{i||(i=!0,r&&r(d))};return new ReadableStream({async pull(d){try{const{done:f,value:l}=await s.next();if(f){c(),d.close();return}let h=l.byteLength;if(n){let b=o+=h;n(b)}d.enqueue(new Uint8Array(l))}catch(f){throw c(f),f}},cancel(d){return c(d),s.return()}},{highWaterMark:2})},Je=64*1024,{isFunction:Z}=a,Wn=(({Request:e,Response:t})=>({Request:e,Response:t}))(a.global),{ReadableStream:ze,TextEncoder:Ve}=a.global,ve=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Kn=e=>{e=a.merge.call({skipUndefined:!0},Wn,e);const{fetch:t,Request:n,Response:r}=e,s=t?Z(t):typeof fetch=="function",o=Z(n),i=Z(r);if(!s)return!1;const c=s&&Z(ze),d=s&&(typeof Ve=="function"?(u=>m=>u.encode(m))(new Ve):async u=>new Uint8Array(await new n(u).arrayBuffer())),f=o&&c&&ve(()=>{let u=!1;const m=new n(S.origin,{body:new ze,method:"POST",get duplex(){return u=!0,"half"}}).headers.has("Content-Type");return u&&!m}),l=i&&c&&ve(()=>a.isReadableStream(new r("").body)),h={stream:l&&(u=>u.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(u=>{!h[u]&&(h[u]=(m,p)=>{let R=m&&m[u];if(R)return R.call(m);throw new y(`Response type '${u}' is not supported`,y.ERR_NOT_SUPPORT,p)})});const b=async u=>{if(u==null)return 0;if(a.isBlob(u))return u.size;if(a.isSpecCompliantForm(u))return(await new n(S.origin,{method:"POST",body:u}).arrayBuffer()).byteLength;if(a.isArrayBufferView(u)||a.isArrayBuffer(u))return u.byteLength;if(a.isURLSearchParams(u)&&(u=u+""),a.isString(u))return(await d(u)).byteLength},g=async(u,m)=>{const p=a.toFiniteNumber(u.getContentLength());return p??b(m)};return async u=>{let{url:m,method:p,data:R,signal:N,cancelToken:E,timeout:O,onDownloadProgress:P,onUploadProgress:D,responseType:_,headers:ue,withCredentials:X="same-origin",fetchOptions:Ne}=pt(u),_e=t||fetch;_=_?(_+"").toLowerCase():"text";let G=Jn([N,E&&E.toAbortSignal()],O),$=null;const B=G&&G.unsubscribe&&(()=>{G.unsubscribe()});let xe;try{if(D&&f&&p!=="get"&&p!=="head"&&(xe=await g(ue,R))!==0){let L=new n(m,{method:"POST",body:R,duplex:"half"}),I;if(a.isFormData(R)&&(I=L.headers.get("content-type"))&&ue.setContentType(I),L.body){const[fe,Q]=Ie(xe,re(He(D)));R=$e(L.body,Je,fe,Q)}}a.isString(X)||(X=X?"include":"omit");const T=o&&"credentials"in n.prototype,Pe={...Ne,signal:G,method:p.toUpperCase(),headers:ue.normalize().toJSON(),body:R,duplex:"half",credentials:T?X:void 0};$=o&&new n(m,Pe);let F=await(o?_e($,Ne):_e(m,Pe));const Ue=l&&(_==="stream"||_==="response");if(l&&(P||Ue&&B)){const L={};["status","statusText","headers"].forEach(Fe=>{L[Fe]=F[Fe]});const I=a.toFiniteNumber(F.headers.get("content-length")),[fe,Q]=P&&Ie(I,re(He(P),!0))||[];F=new r($e(F.body,Je,fe,()=>{Q&&Q(),B&&B()}),L)}_=_||"text";let Rt=await h[a.findKey(h,_)||"text"](F,u);return!Ue&&B&&B(),await new Promise((L,I)=>{ft(L,I,{data:Rt,headers:C.from(F.headers),status:F.status,statusText:F.statusText,config:u,request:$})})}catch(T){throw B&&B(),T&&T.name==="TypeError"&&/Load failed|fetch/i.test(T.message)?Object.assign(new y("Network Error",y.ERR_NETWORK,u,$,T&&T.response),{cause:T.cause||T}):y.from(T,T&&T.code,u,$,T&&T.response)}}},Xn=new Map,ht=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,o=[r,s,n];let i=o.length,c=i,d,f,l=Xn;for(;c--;)d=o[c],f=l.get(d),f===void 0&&l.set(d,f=c?new Map:Kn(t)),l=f;return f};ht();const Ce={http:dn,xhr:$n,fetch:{get:ht}};a.forEach(Ce,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const We=e=>`- ${e}`,Gn=e=>a.isFunction(e)||e===null||e===!1;function Qn(e,t){e=a.isArray(e)?e:[e];const{length:n}=e;let r,s;const o={};for(let i=0;i<n;i++){r=e[i];let c;if(s=r,!Gn(r)&&(s=Ce[(c=String(r)).toLowerCase()],s===void 0))throw new y(`Unknown adapter '${c}'`);if(s&&(a.isFunction(s)||(s=s.get(t))))break;o[c||"#"+i]=s}if(!s){const i=Object.entries(o).map(([d,f])=>`adapter ${d} `+(f===!1?"is not supported by the environment":"is not available in the build"));let c=n?i.length>1?`since :
`+i.map(We).join(`
`):" "+We(i[0]):"as no adapter specified";throw new y("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return s}const mt={getAdapter:Qn,adapters:Ce};function ye(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new K(null,e)}function Ke(e){return ye(e),e.headers=C.from(e.headers),e.data=me.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),mt.getAdapter(e.adapter||W.adapter,e)(e).then(function(r){return ye(e),r.data=me.call(e,e.transformResponse,r),r.headers=C.from(r.headers),r},function(r){return ut(r)||(ye(e),r&&r.response&&(r.response.data=me.call(e,e.transformResponse,r.response),r.response.headers=C.from(r.response.headers))),Promise.reject(r)})}const yt="1.13.6",ce={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ce[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Xe={};ce.transitional=function(t,n,r){function s(o,i){return"[Axios v"+yt+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,c)=>{if(t===!1)throw new y(s(i," has been removed"+(n?" in "+n:"")),y.ERR_DEPRECATED);return n&&!Xe[i]&&(Xe[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,c):!0}};ce.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Zn(e,t,n){if(typeof e!="object")throw new y("options must be an object",y.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=t[o];if(i){const c=e[o],d=c===void 0||i(c,o,e);if(d!==!0)throw new y("option "+o+" must be "+d,y.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new y("Unknown option "+o,y.ERR_BAD_OPTION)}}const ne={assertOptions:Zn,validators:ce},x=ne.validators;let k=class{constructor(t){this.defaults=t||{},this.interceptors={request:new ke,response:new ke}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=q(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&ne.assertOptions(r,{silentJSONParsing:x.transitional(x.boolean),forcedJSONParsing:x.transitional(x.boolean),clarifyTimeoutError:x.transitional(x.boolean),legacyInterceptorReqResOrdering:x.transitional(x.boolean)},!1),s!=null&&(a.isFunction(s)?n.paramsSerializer={serialize:s}:ne.assertOptions(s,{encode:x.function,serialize:x.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ne.assertOptions(n,{baseUrl:x.spelling("baseURL"),withXsrfToken:x.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&a.merge(o.common,o[n.method]);o&&a.forEach(["delete","get","head","post","put","patch","common"],u=>{delete o[u]}),n.headers=C.concat(i,o);const c=[];let d=!0;this.interceptors.request.forEach(function(m){if(typeof m.runWhen=="function"&&m.runWhen(n)===!1)return;d=d&&m.synchronous;const p=n.transitional||Te;p&&p.legacyInterceptorReqResOrdering?c.unshift(m.fulfilled,m.rejected):c.push(m.fulfilled,m.rejected)});const f=[];this.interceptors.response.forEach(function(m){f.push(m.fulfilled,m.rejected)});let l,h=0,b;if(!d){const u=[Ke.bind(this),void 0];for(u.unshift(...c),u.push(...f),b=u.length,l=Promise.resolve(n);h<b;)l=l.then(u[h++],u[h++]);return l}b=c.length;let g=n;for(;h<b;){const u=c[h++],m=c[h++];try{g=u(g)}catch(p){m.call(this,p);break}}try{l=Ke.call(this,g)}catch(u){return Promise.reject(u)}for(h=0,b=f.length;h<b;)l=l.then(f[h++],f[h++]);return l}getUri(t){t=q(this.defaults,t);const n=dt(t.baseURL,t.url,t.allowAbsoluteUrls);return ct(n,t.params,t.paramsSerializer)}};a.forEach(["delete","get","head","options"],function(t){k.prototype[t]=function(n,r){return this.request(q(r||{},{method:t,url:n,data:(r||{}).data}))}});a.forEach(["post","put","patch"],function(t){function n(r){return function(o,i,c){return this.request(q(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}k.prototype[t]=n(),k.prototype[t+"Form"]=n(!0)});let Yn=class bt{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(s=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(c=>{r.subscribe(c),o=c}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,c){r.reason||(r.reason=new K(o,i,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new bt(function(s){t=s}),cancel:t}}};function er(e){return function(n){return e.apply(null,n)}}function tr(e){return a.isObject(e)&&e.isAxiosError===!0}const ge={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(ge).forEach(([e,t])=>{ge[t]=e});function wt(e){const t=new k(e),n=Qe(k.prototype.request,t);return a.extend(n,k.prototype,t,{allOwnKeys:!0}),a.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return wt(q(e,s))},n}const w=wt(W);w.Axios=k;w.CanceledError=K;w.CancelToken=Yn;w.isCancel=ut;w.VERSION=yt;w.toFormData=ae;w.AxiosError=y;w.Cancel=w.CanceledError;w.all=function(t){return Promise.all(t)};w.spread=er;w.isAxiosError=tr;w.mergeConfig=q;w.AxiosHeaders=C;w.formToJSON=e=>lt(a.isHTMLForm(e)?new FormData(e):e);w.getAdapter=mt.getAdapter;w.HttpStatusCode=ge;w.default=w;const{Axios:fr,AxiosError:dr,CanceledError:pr,isCancel:hr,CancelToken:mr,VERSION:yr,all:br,Cancel:wr,isAxiosError:Rr,spread:Er,toFormData:gr,AxiosHeaders:Sr,HttpStatusCode:Or,formToJSON:Tr,getAdapter:Ar,mergeConfig:Cr}=w,nr={set(e,t){sessionStorage&&e!=null&&t!=null&&sessionStorage.setItem(e,t)},get(e){return!sessionStorage||e==null?null:sessionStorage.getItem(e)},setJSON(e,t){t!=null&&this.set(e,JSON.stringify(t))},getJSON(e){const t=this.get(e);return t!=null?JSON.parse(t):null},remove(e){sessionStorage.removeItem(e)}},be={session:nr},Ge={401:"认证失败,无法访问系统资源",403:"当前操作没有权限",404:"访问资源不存在",default:"系统未知错误,请反馈给管理员"};function rr(e){let t="";for(const s of Object.keys(e)){const o=e[s];var n=encodeURIComponent(s)+"=";if(o!==null&&o!==""&&typeof o<"u")if(typeof o=="object"){for(const i of Object.keys(o))if(o[i]!==null&&o[i]!==""&&typeof o[i]<"u"){let c=s+"["+i+"]";var r=encodeURIComponent(c)+"=";t+=r+encodeURIComponent(o[i])+"&"}}else t+=n+encodeURIComponent(o)+"&"}return t}const sr={DEV:!1,VITE_SERVICE_URL:"http://8.138.234.141/ingress"},{VITE_SERVICE_URL:or,DEV:ir}=sr;console.log("🚀 ~ DEV:",ir);let Y={show:!1};w.defaults.headers["Content-Type"]="application/json;charset=utf-8";const le=w.create({baseURL:or,timeout:1e4});le.interceptors.request.use(e=>{const t=(e.headers||{}).isToken===!1,n=(e.headers||{}).repeatSubmit===!1,r=Et.getToken();if(r&&!t&&(e.headers.Authorization=`Bearer ${r}`),e.method==="get"&&e.params){let s=e.url+"?"+rr(e.params);s=s.slice(0,-1),e.params={},e.url=s}if(!n&&(e.method==="post"||e.method==="put")){const s={url:e.url,data:typeof e.data=="object"?JSON.stringify(e.data):e.data,time:new Date().getTime()},o=Object.keys(JSON.stringify(s)).length,i=5*1024*1024;if(o>=i)return console.warn(`[${e.url}]: 请求数据大小超出允许的5M限制无法进行防重复提交验证`),e;const c=be.session.getJSON("sessionObj");if(c==null||c==="")be.session.setJSON("sessionObj",s);else{const d=c.url,f=c.data,l=c.time;if(f===s.data&&s.time-l<1e3&&d===s.url){const b="数据正在处理,请勿重复提交";return console.warn(`[${d}]: `+b),Promise.reject(new Error(b))}else be.session.setJSON("sessionObj",s)}}return console.log(`🚀 ~ request:
url:${e.url}
params:${JSON.stringify(e.data)}
`),e},e=>Promise.reject(e));le.interceptors.response.use(e=>{console.log(`🚀 ~ response:
url:${e.config.url}
params:${JSON.stringify(e.config.data)}
data:
${JSON.stringify(e.data)}`);const t=e.data.code||200,n=Ge[t]||e.data.msg||Ge.default;return e.request.responseType==="blob"||e.request.responseType==="arraybuffer"?e.data:t===401?(Y.show||(Y.show=!0,gt.confirm("登录状态已过期,您可以继续留在该页面,或者重新登录","系统提示",{confirmButtonText:"重新登录",cancelButtonText:"取消",type:"warning"}).then(()=>{Y.show=!1}).catch(()=>{Y.show=!1})),Promise.reject("无效的会话,或者会话已过期,请重新登录。")):t===500?(de({message:n,type:"error"}),Promise.reject(new Error(n))):t===601?(de({message:n,type:"warning"}),Promise.reject(new Error(n))):t!==200?(St.error({title:n}),Promise.reject("error")):Promise.resolve(e.data)},e=>{let{message:t}=e;return t=="Network Error"?t="后端接口连接异常":t.includes("timeout")?t="系统接口请求超时":t.includes("Request failed with status code")&&(t="系统接口"+t.substr(t.length-3)+"异常"),de({message:t,type:"error",duration:5*1e3}),Promise.reject(e)});const Nr=(e,t,n)=>le.request({url:e,method:"post",headers:{"Content-Type":"application/json"},data:t}),_r=(e,t,n)=>le.request({url:e,method:"get",params:t});export{_r as g,le as i,Nr as p};