mirror of https://github.com/allinssl/allinssl
2 lines
49 KiB
JavaScript
2 lines
49 KiB
JavaScript
var e=Object.defineProperty,t=(t,n,r)=>((t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r)(t,"symbol"!=typeof n?n+"":n,r);import{a5 as n,Y as r,bC as s,Z as o,d as i,J as a,bD as l,av as c,_ as u,K as d,bE as f,w as p,bF as h,aI as m,a2 as y,ap as g,r as b,ao as w,c as v,o as E,a as S,bu as R,bG as O,bH as x,bI as C,bJ as T,e as A,f as k,bK as j,be as N,bk as P,bL as U,bp as B,n as F,aK as _,E as L,aL as D,bs as z,Q as q}from"./main-DOVIGS6h.js";const M=n([n("@keyframes spin-rotate","\n from {\n transform: rotate(0);\n }\n to {\n transform: rotate(360deg);\n }\n "),r("spin-container","\n position: relative;\n ",[r("spin-body","\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translateX(-50%) translateY(-50%);\n ",[s()])]),r("spin-body","\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n "),r("spin","\n display: inline-flex;\n height: var(--n-size);\n width: var(--n-size);\n font-size: var(--n-size);\n color: var(--n-color);\n ",[o("rotate","\n animation: spin-rotate 2s linear infinite;\n ")]),r("spin-description","\n display: inline-block;\n font-size: var(--n-font-size);\n color: var(--n-text-color);\n transition: color .3s var(--n-bezier);\n margin-top: 8px;\n "),r("spin-content","\n opacity: 1;\n transition: opacity .3s var(--n-bezier);\n pointer-events: all;\n ",[o("spinning","\n user-select: none;\n -webkit-user-select: none;\n pointer-events: none;\n opacity: var(--n-opacity-spinning);\n ")])]),I={small:20,medium:18,large:16},$=i({name:"Spin",props:Object.assign(Object.assign({},d.props),{contentClass:String,contentStyle:[Object,String],description:String,stroke:String,size:{type:[String,Number],default:"medium"},show:{type:Boolean,default:!0},strokeWidth:Number,rotate:{type:Boolean,default:!0},spinning:{type:Boolean,validator:()=>!0,default:void 0},delay:Number}),slots:Object,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n}=u(e),r=d("Spin","-spin",M,f,e,t),s=p((()=>{const{size:t}=e,{common:{cubicBezierEaseInOut:n},self:s}=r.value,{opacitySpinning:o,color:i,textColor:a}=s;return{"--n-bezier":n,"--n-opacity-spinning":o,"--n-size":"number"==typeof t?h(t):s[m("size",t)],"--n-color":i,"--n-text-color":a}})),o=n?y("spin",p((()=>{const{size:t}=e;return"number"==typeof t?String(t):t[0]})),s,e):void 0,i=g(e,["spinning","show"]),a=b(!1);return w((t=>{let n;if(i.value){const{delay:r}=e;if(r)return n=window.setTimeout((()=>{a.value=!0}),r),void t((()=>{clearTimeout(n)}))}a.value=i.value})),{mergedClsPrefix:t,active:a,mergedStrokeWidth:p((()=>{const{strokeWidth:t}=e;if(void 0!==t)return t;const{size:n}=e;return I["number"==typeof n?"medium":n]})),cssVars:n?void 0:s,themeClass:null==o?void 0:o.themeClass,onRender:null==o?void 0:o.onRender}},render(){var e,t;const{$slots:n,mergedClsPrefix:r,description:s}=this,o=n.icon&&this.rotate,i=(s||n.description)&&a("div",{class:`${r}-spin-description`},s||(null===(e=n.description)||void 0===e?void 0:e.call(n))),u=n.icon?a("div",{class:[`${r}-spin-body`,this.themeClass]},a("div",{class:[`${r}-spin`,o&&`${r}-spin--rotate`],style:n.default?"":this.cssVars},n.icon()),i):a("div",{class:[`${r}-spin-body`,this.themeClass]},a(l,{clsPrefix:r,style:n.default?"":this.cssVars,stroke:this.stroke,"stroke-width":this.mergedStrokeWidth,class:`${r}-spin`}),i);return null===(t=this.onRender)||void 0===t||t.call(this),n.default?a("div",{class:[`${r}-spin-container`,this.themeClass],style:this.cssVars},a("div",{class:[`${r}-spin-content`,this.active&&`${r}-spin-content--spinning`,this.contentClass],style:this.contentStyle},n),a(c,{name:"fade-in-transition"},{default:()=>this.active?u:null})):u}}),H={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},J=i({name:"CheckmarkCircle24Filled",render:function(e,t){return E(),v("svg",H,t[0]||(t[0]=[S("g",{fill:"none"},[S("path",{d:"M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2zm3.22 6.97l-4.47 4.47l-1.97-1.97a.75.75 0 0 0-1.06 1.06l2.5 2.5a.75.75 0 0 0 1.06 0l5-5a.75.75 0 1 0-1.06-1.06z",fill:"currentColor"})],-1)]))}}),W={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},V=i({name:"ErrorCircle24Filled",render:function(e,t){return E(),v("svg",W,t[0]||(t[0]=[S("g",{fill:"none"},[S("path",{d:"M12 2c5.523 0 10 4.478 10 10s-4.477 10-10 10S2 17.522 2 12S6.477 2 12 2zm.002 13.004a.999.999 0 1 0 0 1.997a.999.999 0 0 0 0-1.997zM12 7a1 1 0 0 0-.993.884L11 8l.002 5.001l.007.117a1 1 0 0 0 1.986 0l.007-.117L13 8l-.007-.117A1 1 0 0 0 12 7z",fill:"currentColor"})],-1)]))}}),K={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},X=i({name:"Info24Filled",render:function(e,t){return E(),v("svg",K,t[0]||(t[0]=[S("g",{fill:"none"},[S("path",{d:"M12 1.999c5.524 0 10.002 4.478 10.002 10.002c0 5.523-4.478 10.001-10.002 10.001C6.476 22.002 2 17.524 2 12.001C1.999 6.477 6.476 1.999 12 1.999zm-.004 8.25a1 1 0 0 0-.992.885l-.007.116l.004 5.502l.006.117a1 1 0 0 0 1.987-.002L13 16.75l-.004-5.501l-.007-.117a1 1 0 0 0-.994-.882zm.005-3.749a1.251 1.251 0 1 0 0 2.503A1.251 1.251 0 0 0 12 6.5z",fill:"currentColor"})],-1)]))}});function G(e){const t=T(),n=b(e||{}),r=R(),s=e=>{const{type:n="warning",title:s,area:o,content:i,draggable:l=!0,confirmText:c="确定",cancelText:u="取消",confirmButtonProps:d={type:"primary"},cancelButtonProps:f={type:"default"},maskClosable:p=!1,closeOnEsc:h=!1,autoFocus:m=!1,onConfirm:y,onCancel:g,onClose:b,onMaskClick:w,...v}=e,E={title:s,content:()=>(()=>{if(!i)return"";const e=a("div",{class:"flex pt-[0.4rem]"},[(e=>{const t={info:[A(X,{class:"text-primary"},null)],success:[A(J,{class:"text-success"},null)],warning:[A(X,{class:"text-warning"},null)],error:[A(V,{class:"text-error"},null)]};return a(k,{size:30,class:"n-dialog__icon"},(()=>t[e][0]))})(n),a("div",{class:"w-full pt-1 flex items-center"},"string"==typeof i?i:i())]);return t?e:a(C,{type:n},(()=>e))})(),style:o?"string"==typeof o?{width:o,height:"auto"}:{width:o[0],height:o[1]}:{width:"35rem",height:"auto"},draggable:l,maskClosable:p,showIcon:!1,closeOnEsc:h,autoFocus:m,positiveText:c,negativeText:u,positiveButtonProps:d,negativeButtonProps:f,onPositiveClick:y,onNegativeClick:g,onClose:b,onMaskClick:w,...v};if(t){const e=O();return r.value=e.create(E),r.value}const{dialog:S}=x(["dialog"]);return r.value=S.create(E),r.value},o={create:s,options:n,update:e=>(n.value=e,s(e)),success:(e,t={})=>s({...t,type:"success",content:e,showIcon:!0}),warning:(e,t={})=>s({...t,type:"warning",content:e}),error:(e,t={})=>s({...t,type:"error",content:e}),info:(e,t={})=>s({...t,type:"info",content:e}),request:(e,t={})=>s({...t,type:e.status?"success":"error",content:e.message}),destroyAll:()=>{var e;null==(e=r.value)||e.destroyAll()}};return e?Object.assign(s(e),o):o}const Q={text:"正在加载中,请稍后 ...",description:"",color:"",size:"small",stroke:"",show:!0,fullscreen:!0,background:"rgba(0, 0, 0, 0.5)",zIndex:2e3},Y=(e={})=>{const t=b({...Q,...e}),n=b(!1);let r=null,s=null;const o=()=>{const{target:e}=t.value;if(!e)return document.body;if("string"==typeof e){return document.querySelector(e)||document.body}return e},i=()=>{if(!n.value)return;const e=(()=>{s&&(document.body.removeChild(s),s=null),s=document.createElement("div");const e=o(),n={position:t.value.fullscreen?"fixed":"absolute",top:0,left:0,width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:t.value.background,zIndex:t.value.zIndex,...t.value.customStyle||{}};if(!t.value.fullscreen&&e&&e!==document.body){const t=e.getBoundingClientRect();Object.assign(n,{top:`${t.top}px`,left:`${t.left}px`,width:`${t.width}px`,height:`${t.height}px`,position:"fixed"})}return Object.keys(n).forEach((e=>{s.style[e]=n[e]})),t.value.customClass&&(s.className=t.value.customClass),document.body.appendChild(s),s})(),i=A("div",{style:{display:"flex",alignItems:"center",padding:"16px 24px",backgroundColor:"#fff",borderRadius:"8px",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)"}},[A($,{description:t.value.description,size:t.value.size,stroke:t.value.stroke,style:{marginRight:"12px"},...t.value.spinProps||{}}),A("span",{style:{fontSize:"14px",color:"#333"}},t.value.text)]);r=i,j(r,e)},a=()=>{var e,r;n.value=!1,s&&(j(null,s),document.body.removeChild(s),s=null),null==(r=(e=t.value).onClose)||r.call(e)};return{open:e=>{e&&(t.value={...t.value,...e}),n.value=!0,i()},close:a,update:e=>{t.value={...t.value,...e},n.value&&i()},destroy:()=>{a(),r=null}}};function Z(e){return function t(n,r,s){switch(arguments.length){case 0:return t;case 1:return U(n)?t:N((function(t,r){return e(n,t,r)}));case 2:return U(n)&&U(r)?t:U(n)?N((function(t,n){return e(t,r,n)})):U(r)?N((function(t,r){return e(n,t,r)})):P((function(t){return e(n,r,t)}));default:return U(n)&&U(r)&&U(s)?t:U(n)&&U(r)?N((function(t,n){return e(t,n,s)})):U(n)&&U(s)?N((function(t,n){return e(t,r,n)})):U(r)&&U(s)?N((function(t,r){return e(n,t,r)})):U(n)?P((function(t){return e(t,r,s)})):U(r)?P((function(t){return e(n,t,s)})):U(s)?P((function(t){return e(n,r,t)})):e(n,r,s)}}}var ee=P((function(e){return function(){return e}}));function te(e){return e}var ne=P(te),re=Z((function(e,t,n){return B(Math.max(e.length,t.length,n.length),(function(){return e.apply(this,arguments)?t.apply(this,arguments):n.apply(this,arguments)}))}));const se=b([]),oe={showMessage:!0,reportError:!0,autoAnalyze:!0,showDialog:!1},ie=e=>"AxiosError"===e.name?{type:"network",level:"error",summary:e.message,details:{message:e.message}}:e instanceof TypeError&&e.message.includes("network")?{type:"network",level:"error",summary:"网络请求错误",details:{message:e.message}}:e instanceof Error?{type:"runtime",level:"error",summary:e.message,details:{stack:e.stack,name:e.name}}:"object"==typeof e&&null!==e&&"code"in e?{type:"business",level:"warning",summary:"业务处理错误,请联系管理员",details:e}:"object"==typeof e&&null!==e&&Array.isArray(e)?{type:"validation",level:"warning",summary:"数据验证错误",details:{message:"数据验证错误,请检查输入内容"}}:"string"==typeof e?{type:"runtime",level:"error",summary:e,details:{message:e}}:{type:"runtime",level:"error",summary:"未知错误",details:{message:(null==e?void 0:e.message)||"未知错误"}},ae=(e={})=>{const t={...oe,...e},n=(e,t)=>"boolean"!=typeof e&&(e=>"object"==typeof e&&null!==e&&"message"in e)(e)?e.message:t,r={collect:e=>{se.value.push({...e,timestamp:Date.now()})},report:(e=se.value)=>{t.reportError&&t.reportHandler&&t.reportHandler(e)},clear:()=>{se.value=[]},analyze:e=>{const t=ie(e);return{message:t.summary,type:t.type,metadata:t.details,timestamp:Date.now()}}};return{handleError:(e,s)=>{const o=F();let i;if("boolean"==typeof e)return{defalut:t=>n(e,t)};if(i=t.autoAnalyze&&"object"==typeof e&&null!==e&&"message"in e?r.analyze(e):e,i.timestamp=Date.now(),se.value.push(i),t.showMessage){const t=ie(e);switch(t.level){case"error":o.error(t.details.message||t.summary);break;case"warning":o.warning(t.details.message||t.summary);break;case"info":o.info(i.message||t.summary)}}return t.showDialog,t.customHandler&&t.customHandler(i),{errorInfo:i,...o,defalut:t=>n(e,t)}},collector:r,errorQueue:se}};function le(e,t){return function(){return e.apply(t,arguments)}}const{toString:ce}=Object.prototype,{getPrototypeOf:ue}=Object,de=(e=>t=>{const n=ce.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),fe=e=>(e=e.toLowerCase(),t=>de(t)===e),pe=e=>t=>typeof t===e,{isArray:he}=Array,me=pe("undefined");const ye=fe("ArrayBuffer");const ge=pe("string"),be=pe("function"),we=pe("number"),ve=e=>null!==e&&"object"==typeof e,Ee=e=>{if("object"!==de(e))return!1;const t=ue(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},Se=fe("Date"),Re=fe("File"),Oe=fe("Blob"),xe=fe("FileList"),Ce=fe("URLSearchParams"),[Te,Ae,ke,je]=["ReadableStream","Request","Response","Headers"].map(fe);function Ne(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,s;if("object"!=typeof e&&(e=[e]),he(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),o=s.length;let i;for(r=0;r<o;r++)i=s[r],t.call(null,e[i],i,e)}}function Pe(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,s=n.length;for(;s-- >0;)if(r=n[s],t===r.toLowerCase())return r;return null}const Ue="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Be=e=>!me(e)&&e!==Ue;const Fe=(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&ue(Uint8Array)),_e=fe("HTMLFormElement"),Le=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),De=fe("RegExp"),ze=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ne(n,((n,s)=>{let o;!1!==(o=t(n,s,e))&&(r[s]=o||n)})),Object.defineProperties(e,r)};const qe=fe("AsyncFunction"),Me=(Ie="function"==typeof setImmediate,$e=be(Ue.postMessage),Ie?setImmediate:$e?(He=`axios@${Math.random()}`,Je=[],Ue.addEventListener("message",(({source:e,data:t})=>{e===Ue&&t===He&&Je.length&&Je.shift()()}),!1),e=>{Je.push(e),Ue.postMessage(He,"*")}):e=>setTimeout(e));var Ie,$e,He,Je;const We="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Ue):"undefined"!=typeof process&&process.nextTick||Me,Ve={isArray:he,isArrayBuffer:ye,isBuffer:function(e){return null!==e&&!me(e)&&null!==e.constructor&&!me(e.constructor)&&be(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||be(e.append)&&("formdata"===(t=de(e))||"object"===t&&be(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&ye(e.buffer),t},isString:ge,isNumber:we,isBoolean:e=>!0===e||!1===e,isObject:ve,isPlainObject:Ee,isReadableStream:Te,isRequest:Ae,isResponse:ke,isHeaders:je,isUndefined:me,isDate:Se,isFile:Re,isBlob:Oe,isRegExp:De,isFunction:be,isStream:e=>ve(e)&&be(e.pipe),isURLSearchParams:Ce,isTypedArray:Fe,isFileList:xe,forEach:Ne,merge:function e(){const{caseless:t}=Be(this)&&this||{},n={},r=(r,s)=>{const o=t&&Pe(n,s)||s;Ee(n[o])&&Ee(r)?n[o]=e(n[o],r):Ee(r)?n[o]=e({},r):he(r)?n[o]=r.slice():n[o]=r};for(let s=0,o=arguments.length;s<o;s++)arguments[s]&&Ne(arguments[s],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(Ne(t,((t,r)=>{n&&be(t)?e[r]=le(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let s,o,i;const a={};if(t=t||{},null==e)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],r&&!r(i,e,t)||a[i]||(t[i]=e[i],a[i]=!0);e=!1!==n&&ue(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:de,kindOfTest:fe,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(he(e))return e;let t=e.length;if(!we(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:_e,hasOwnProperty:Le,hasOwnProp:Le,reduceDescriptors:ze,freezeMethods:e=>{ze(e,((t,n)=>{if(be(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];be(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return he(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:Pe,global:Ue,isContextDefined:Be,isSpecCompliantForm:function(e){return!!(e&&be(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(ve(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const s=he(e)?[]:{};return Ne(e,((e,t)=>{const o=n(e,r+1);!me(o)&&(s[t]=o)})),t[r]=void 0,s}}return e};return n(e,0)},isAsyncFn:qe,isThenable:e=>e&&(ve(e)||be(e))&&be(e.then)&&be(e.catch),setImmediate:Me,asap:We};function Ke(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}Ve.inherits(Ke,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ve.toJSONObject(this.config),code:this.code,status:this.status}}});const Xe=Ke.prototype,Ge={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{Ge[e]={value:e}})),Object.defineProperties(Ke,Ge),Object.defineProperty(Xe,"isAxiosError",{value:!0}),Ke.from=(e,t,n,r,s,o)=>{const i=Object.create(Xe);return Ve.toFlatObject(e,i,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),Ke.call(i,e.message,t,n,r,s),i.cause=e,i.name=e.name,o&&Object.assign(i,o),i};function Qe(e){return Ve.isPlainObject(e)||Ve.isArray(e)}function Ye(e){return Ve.endsWith(e,"[]")?e.slice(0,-2):e}function Ze(e,t,n){return e?e.concat(t).map((function(e,t){return e=Ye(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const et=Ve.toFlatObject(Ve,{},null,(function(e){return/^is[A-Z]/.test(e)}));function tt(e,t,n){if(!Ve.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=Ve.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!Ve.isUndefined(t[e])}))).metaTokens,s=n.visitor||c,o=n.dots,i=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&Ve.isSpecCompliantForm(t);if(!Ve.isFunction(s))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(Ve.isDate(e))return e.toISOString();if(!a&&Ve.isBlob(e))throw new Ke("Blob is not supported. Use a Buffer instead.");return Ve.isArrayBuffer(e)||Ve.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,s){let a=e;if(e&&!s&&"object"==typeof e)if(Ve.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(Ve.isArray(e)&&function(e){return Ve.isArray(e)&&!e.some(Qe)}(e)||(Ve.isFileList(e)||Ve.endsWith(n,"[]"))&&(a=Ve.toArray(e)))return n=Ye(n),a.forEach((function(e,r){!Ve.isUndefined(e)&&null!==e&&t.append(!0===i?Ze([n],r,o):null===i?n:n+"[]",l(e))})),!1;return!!Qe(e)||(t.append(Ze(s,n,o),l(e)),!1)}const u=[],d=Object.assign(et,{defaultVisitor:c,convertValue:l,isVisitable:Qe});if(!Ve.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!Ve.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),Ve.forEach(n,(function(n,o){!0===(!(Ve.isUndefined(n)||null===n)&&s.call(t,n,Ve.isString(o)?o.trim():o,r,d))&&e(n,r?r.concat(o):[o])})),u.pop()}}(e),t}function nt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function rt(e,t){this._pairs=[],e&&tt(e,this,t)}const st=rt.prototype;function ot(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function it(e,t,n){if(!t)return e;const r=n&&n.encode||ot;Ve.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let o;if(o=s?s(t,n):Ve.isURLSearchParams(t)?t.toString():new rt(t,n).toString(r),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}st.append=function(e,t){this._pairs.push([e,t])},st.toString=function(e){const t=e?function(t){return e.call(this,t,nt)}:nt;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};class at{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Ve.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}const lt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ct={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:rt,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},ut="undefined"!=typeof window&&"undefined"!=typeof document,dt="object"==typeof navigator&&navigator||void 0,ft=ut&&(!dt||["ReactNative","NativeScript","NS"].indexOf(dt.product)<0),pt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,ht=ut&&window.location.href||"http://localhost",mt={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ut,hasStandardBrowserEnv:ft,hasStandardBrowserWebWorkerEnv:pt,navigator:dt,origin:ht},Symbol.toStringTag,{value:"Module"})),...ct};function yt(e){function t(e,n,r,s){let o=e[s++];if("__proto__"===o)return!0;const i=Number.isFinite(+o),a=s>=e.length;if(o=!o&&Ve.isArray(r)?r.length:o,a)return Ve.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!i;r[o]&&Ve.isObject(r[o])||(r[o]=[]);return t(e,n,r[o],s)&&Ve.isArray(r[o])&&(r[o]=function(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}(r[o])),!i}if(Ve.isFormData(e)&&Ve.isFunction(e.entries)){const n={};return Ve.forEachEntry(e,((e,r)=>{t(function(e){return Ve.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null}const gt={transitional:lt,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,s=Ve.isObject(e);s&&Ve.isHTMLForm(e)&&(e=new FormData(e));if(Ve.isFormData(e))return r?JSON.stringify(yt(e)):e;if(Ve.isArrayBuffer(e)||Ve.isBuffer(e)||Ve.isStream(e)||Ve.isFile(e)||Ve.isBlob(e)||Ve.isReadableStream(e))return e;if(Ve.isArrayBufferView(e))return e.buffer;if(Ve.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return tt(e,new mt.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return mt.isNode&&Ve.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((o=Ve.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return tt(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return s||r?(t.setContentType("application/json",!1),function(e,t,n){if(Ve.isString(e))try{return(t||JSON.parse)(e),Ve.trim(e)}catch(r){if("SyntaxError"!==r.name)throw r}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||gt.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(Ve.isResponse(e)||Ve.isReadableStream(e))return e;if(e&&Ve.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(s){if(n){if("SyntaxError"===s.name)throw Ke.from(s,Ke.ERR_BAD_RESPONSE,this,null,this.response);throw s}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:mt.classes.FormData,Blob:mt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ve.forEach(["delete","get","head","post","put","patch"],(e=>{gt.headers[e]={}}));const bt=Ve.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"]),wt=Symbol("internals");function vt(e){return e&&String(e).trim().toLowerCase()}function Et(e){return!1===e||null==e?e:Ve.isArray(e)?e.map(Et):String(e)}function St(e,t,n,r,s){return Ve.isFunction(r)?r.call(this,t,n):(s&&(t=n),Ve.isString(t)?Ve.isString(r)?-1!==t.indexOf(r):Ve.isRegExp(r)?r.test(t):void 0:void 0)}let Rt=class{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function s(e,t,n){const s=vt(t);if(!s)throw new Error("header name must be a non-empty string");const o=Ve.findKey(r,s);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||t]=Et(e))}const o=(e,t)=>Ve.forEach(e,((e,n)=>s(e,n,t)));if(Ve.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(Ve.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o((e=>{const t={};let n,r,s;return e&&e.split("\n").forEach((function(e){s=e.indexOf(":"),n=e.substring(0,s).trim().toLowerCase(),r=e.substring(s+1).trim(),!n||t[n]&&bt[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(Ve.isHeaders(e))for(const[i,a]of e.entries())s(a,i,n);else null!=e&&s(t,e,n);return this}get(e,t){if(e=vt(e)){const n=Ve.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(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}(e);if(Ve.isFunction(t))return t.call(this,e,n);if(Ve.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=vt(e)){const n=Ve.findKey(this,e);return!(!n||void 0===this[n]||t&&!St(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function s(e){if(e=vt(e)){const s=Ve.findKey(n,e);!s||t&&!St(0,n[s],s,t)||(delete n[s],r=!0)}}return Ve.isArray(e)?e.forEach(s):s(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const s=t[n];e&&!St(0,this[s],s,e,!0)||(delete this[s],r=!0)}return r}normalize(e){const t=this,n={};return Ve.forEach(this,((r,s)=>{const o=Ve.findKey(n,s);if(o)return t[o]=Et(r),void delete t[s];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(s):String(s).trim();i!==s&&delete t[s],t[i]=Et(r),n[i]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Ve.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&Ve.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("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[wt]=this[wt]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=vt(e);t[r]||(!function(e,t){const n=Ve.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,s){return this[r].call(this,t,e,n,s)},configurable:!0})}))}(n,e),t[r]=!0)}return Ve.isArray(e)?e.forEach(r):r(e),this}};function Ot(e,t){const n=this||gt,r=t||n,s=Rt.from(r.headers);let o=r.data;return Ve.forEach(e,(function(e){o=e.call(n,o,s.normalize(),t?t.status:void 0)})),s.normalize(),o}function xt(e){return!(!e||!e.__CANCEL__)}function Ct(e,t,n){Ke.call(this,null==e?"canceled":e,Ke.ERR_CANCELED,t,n),this.name="CanceledError"}function Tt(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Ke("Request failed with status code "+n.status,[Ke.ERR_BAD_REQUEST,Ke.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}Rt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ve.reduceDescriptors(Rt.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),Ve.freezeMethods(Rt),Ve.inherits(Ct,Ke,{__CANCEL__:!0});const At=(e,t,n=3)=>{let r=0;const s=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s,o=0,i=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),c=r[i];s||(s=l),n[o]=a,r[o]=l;let u=i,d=0;for(;u!==o;)d+=n[u++],u%=e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),l-s<t)return;const f=c&&l-c;return f?Math.round(1e3*d/f):void 0}}(50,250);return function(e,t){let n,r,s=0,o=1e3/t;const i=(t,o=Date.now())=>{s=o,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),a=t-s;a>=o?i(e,t):(n=e,r||(r=setTimeout((()=>{r=null,i(n)}),o-a)))},()=>n&&i(n)]}((n=>{const o=n.loaded,i=n.lengthComputable?n.total:void 0,a=o-r,l=s(a);r=o;e({loaded:o,total:i,progress:i?o/i:void 0,bytes:a,rate:l||void 0,estimated:l&&i&&o<=i?(i-o)/l:void 0,event:n,lengthComputable:null!=i,[t?"download":"upload"]:!0})}),n)},kt=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},jt=e=>(...t)=>Ve.asap((()=>e(...t))),Nt=mt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,mt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(mt.origin),mt.navigator&&/(msie|trident)/i.test(mt.navigator.userAgent)):()=>!0,Pt=mt.hasStandardBrowserEnv?{write(e,t,n,r,s,o){const i=[e+"="+encodeURIComponent(t)];Ve.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),Ve.isString(r)&&i.push("path="+r),Ve.isString(s)&&i.push("domain="+s),!0===o&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Ut(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Bt=e=>e instanceof Rt?{...e}:e;function Ft(e,t){t=t||{};const n={};function r(e,t,n,r){return Ve.isPlainObject(e)&&Ve.isPlainObject(t)?Ve.merge.call({caseless:r},e,t):Ve.isPlainObject(t)?Ve.merge({},t):Ve.isArray(t)?t.slice():t}function s(e,t,n,s){return Ve.isUndefined(t)?Ve.isUndefined(e)?void 0:r(void 0,e,0,s):r(e,t,0,s)}function o(e,t){if(!Ve.isUndefined(t))return r(void 0,t)}function i(e,t){return Ve.isUndefined(t)?Ve.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,s,o){return o in t?r(n,s):o in e?r(void 0,n):void 0}const l={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:a,headers:(e,t,n)=>s(Bt(e),Bt(t),0,!0)};return Ve.forEach(Object.keys(Object.assign({},e,t)),(function(r){const o=l[r]||s,i=o(e[r],t[r],r);Ve.isUndefined(i)&&o!==a||(n[r]=i)})),n}const _t=e=>{const t=Ft({},e);let n,{data:r,withXSRFToken:s,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:l}=t;if(t.headers=a=Rt.from(a),t.url=it(Ut(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),Ve.isFormData(r))if(mt.hasStandardBrowserEnv||mt.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(n=a.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}if(mt.hasStandardBrowserEnv&&(s&&Ve.isFunction(s)&&(s=s(t)),s||!1!==s&&Nt(t.url))){const e=o&&i&&Pt.read(i);e&&a.set(o,e)}return t},Lt="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=_t(e);let s=r.data;const o=Rt.from(r.headers).normalize();let i,a,l,c,u,{responseType:d,onUploadProgress:f,onDownloadProgress:p}=r;function h(){c&&c(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(i),r.signal&&r.signal.removeEventListener("abort",i)}let m=new XMLHttpRequest;function y(){if(!m)return;const r=Rt.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());Tt((function(e){t(e),h()}),(function(e){n(e),h()}),{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=y:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(y)},m.onabort=function(){m&&(n(new Ke("Request aborted",Ke.ECONNABORTED,e,m)),m=null)},m.onerror=function(){n(new Ke("Network Error",Ke.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const s=r.transitional||lt;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new Ke(t,s.clarifyTimeoutError?Ke.ETIMEDOUT:Ke.ECONNABORTED,e,m)),m=null},void 0===s&&o.setContentType(null),"setRequestHeader"in m&&Ve.forEach(o.toJSON(),(function(e,t){m.setRequestHeader(t,e)})),Ve.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),d&&"json"!==d&&(m.responseType=r.responseType),p&&([l,u]=At(p,!0),m.addEventListener("progress",l)),f&&m.upload&&([a,c]=At(f),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(i=t=>{m&&(n(!t||t.type?new Ct(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(i),r.signal&&(r.signal.aborted?i():r.signal.addEventListener("abort",i)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);g&&-1===mt.protocols.indexOf(g)?n(new Ke("Unsupported protocol "+g+":",Ke.ERR_BAD_REQUEST,e)):m.send(s||null)}))},Dt=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const s=function(e){if(!n){n=!0,i();const t=e instanceof Error?e:this.reason;r.abort(t instanceof Ke?t:new Ct(t instanceof Error?t.message:t))}};let o=t&&setTimeout((()=>{o=null,s(new Ke(`timeout ${t} of ms exceeded`,Ke.ETIMEDOUT))}),t);const i=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(s):e.removeEventListener("abort",s)})),e=null)};e.forEach((e=>e.addEventListener("abort",s)));const{signal:a}=r;return a.unsubscribe=()=>Ve.asap(i),a}},zt=function*(e,t){let n=e.byteLength;if(n<t)return void(yield e);let r,s=0;for(;s<n;)r=s+t,yield e.slice(s,r),s=r},qt=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},Mt=(e,t,n,r)=>{const s=async function*(e,t){for await(const n of qt(e))yield*zt(n,t)}(e,t);let o,i=0,a=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await s.next();if(t)return a(),void e.close();let o=r.byteLength;if(n){let e=i+=o;n(e)}e.enqueue(new Uint8Array(r))}catch(t){throw a(t),t}},cancel:e=>(a(e),s.return())},{highWaterMark:2})},It="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,$t=It&&"function"==typeof ReadableStream,Ht=It&&("function"==typeof TextEncoder?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Jt=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},Wt=$t&&Jt((()=>{let e=!1;const t=new Request(mt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),Vt=$t&&Jt((()=>Ve.isReadableStream(new Response("").body))),Kt={stream:Vt&&(e=>e.body)};var Xt;It&&(Xt=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!Kt[e]&&(Kt[e]=Ve.isFunction(Xt[e])?t=>t[e]():(t,n)=>{throw new Ke(`Response type '${e}' is not supported`,Ke.ERR_NOT_SUPPORT,n)})})));const Gt=async(e,t)=>{const n=Ve.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(Ve.isBlob(e))return e.size;if(Ve.isSpecCompliantForm(e)){const t=new Request(mt.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Ve.isArrayBufferView(e)||Ve.isArrayBuffer(e)?e.byteLength:(Ve.isURLSearchParams(e)&&(e+=""),Ve.isString(e)?(await Ht(e)).byteLength:void 0)})(t):n},Qt={http:null,xhr:Lt,fetch:It&&(async e=>{let{url:t,method:n,data:r,signal:s,cancelToken:o,timeout:i,onDownloadProgress:a,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:f}=_t(e);c=c?(c+"").toLowerCase():"text";let p,h=Dt([s,o&&o.toAbortSignal()],i);const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let y;try{if(l&&Wt&&"get"!==n&&"head"!==n&&0!==(y=await Gt(u,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(Ve.isFormData(r)&&(e=n.headers.get("content-type"))&&u.setContentType(e),n.body){const[e,t]=kt(y,At(jt(l)));r=Mt(n.body,65536,e,t)}}Ve.isString(d)||(d=d?"include":"omit");const s="credentials"in Request.prototype;p=new Request(t,{...f,signal:h,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:s?d:void 0});let o=await fetch(p);const i=Vt&&("stream"===c||"response"===c);if(Vt&&(a||i&&m)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=o[t]}));const t=Ve.toFiniteNumber(o.headers.get("content-length")),[n,r]=a&&kt(t,At(jt(a),!0))||[];o=new Response(Mt(o.body,65536,n,(()=>{r&&r(),m&&m()})),e)}c=c||"text";let g=await Kt[Ve.findKey(Kt,c)||"text"](o,e);return!i&&m&&m(),await new Promise(((t,n)=>{Tt(t,n,{data:g,headers:Rt.from(o.headers),status:o.status,statusText:o.statusText,config:e,request:p})}))}catch(g){if(m&&m(),g&&"TypeError"===g.name&&/fetch/i.test(g.message))throw Object.assign(new Ke("Network Error",Ke.ERR_NETWORK,e,p),{cause:g.cause||g});throw Ke.from(g,g&&g.code,e,p)}})};Ve.forEach(Qt,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}}));const Yt=e=>`- ${e}`,Zt=e=>Ve.isFunction(e)||null===e||!1===e,en=e=>{e=Ve.isArray(e)?e:[e];const{length:t}=e;let n,r;const s={};for(let o=0;o<t;o++){let t;if(n=e[o],r=n,!Zt(n)&&(r=Qt[(t=String(n)).toLowerCase()],void 0===r))throw new Ke(`Unknown adapter '${t}'`);if(r)break;s[t||"#"+o]=r}if(!r){const e=Object.entries(s).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new Ke("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Yt).join("\n"):" "+Yt(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function tn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ct(null,e)}function nn(e){tn(e),e.headers=Rt.from(e.headers),e.data=Ot.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return en(e.adapter||gt.adapter)(e).then((function(t){return tn(e),t.data=Ot.call(e,e.transformResponse,t),t.headers=Rt.from(t.headers),t}),(function(t){return xt(t)||(tn(e),t&&t.response&&(t.response.data=Ot.call(e,e.transformResponse,t.response),t.response.headers=Rt.from(t.response.headers))),Promise.reject(t)}))}const rn="1.8.4",sn={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{sn[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const on={};sn.transitional=function(e,t,n){return(r,s,o)=>{if(!1===e)throw new Ke(function(e,t){return"[Axios v1.8.4] Transitional option '"+e+"'"+t+(n?". "+n:"")}(s," has been removed"+(t?" in "+t:"")),Ke.ERR_DEPRECATED);return t&&!on[s]&&(on[s]=!0),!e||e(r,s,o)}},sn.spelling=function(e){return(e,t)=>!0};const an={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Ke("options must be an object",Ke.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 t=e[o],n=void 0===t||i(t,o,e);if(!0!==n)throw new Ke("option "+o+" must be "+n,Ke.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Ke("Unknown option "+o,Ke.ERR_BAD_OPTION)}},validators:sn},ln=an.validators;let cn=class{constructor(e){this.defaults=e,this.interceptors={request:new at,response:new at}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const t=e.stack?e.stack.replace(/^.+\n/,""):"";try{n.stack?t&&!String(n.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(n.stack+="\n"+t):n.stack=t}catch(r){}}throw n}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ft(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:s}=t;void 0!==n&&an.assertOptions(n,{silentJSONParsing:ln.transitional(ln.boolean),forcedJSONParsing:ln.transitional(ln.boolean),clarifyTimeoutError:ln.transitional(ln.boolean)},!1),null!=r&&(Ve.isFunction(r)?t.paramsSerializer={serialize:r}:an.assertOptions(r,{encode:ln.function,serialize:ln.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),an.assertOptions(t,{baseUrl:ln.spelling("baseURL"),withXsrfToken:ln.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=s&&Ve.merge(s.common,s[t.method]);s&&Ve.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete s[e]})),t.headers=Rt.concat(o,s);const i=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,i.unshift(e.fulfilled,e.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let u,d=0;if(!a){const e=[nn.bind(this),void 0];for(e.unshift.apply(e,i),e.push.apply(e,l),u=e.length,c=Promise.resolve(t);d<u;)c=c.then(e[d++],e[d++]);return c}u=i.length;let f=t;for(d=0;d<u;){const e=i[d++],t=i[d++];try{f=e(f)}catch(p){t.call(this,p);break}}try{c=nn.call(this,f)}catch(p){return Promise.reject(p)}for(d=0,u=l.length;d<u;)c=c.then(l[d++],l[d++]);return c}getUri(e){return it(Ut((e=Ft(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};Ve.forEach(["delete","get","head","options"],(function(e){cn.prototype[e]=function(t,n){return this.request(Ft(n||{},{method:e,url:t,data:(n||{}).data}))}})),Ve.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,s){return this.request(Ft(s||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}cn.prototype[e]=t(),cn.prototype[e+"Form"]=t(!0)}));const un={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(un).forEach((([e,t])=>{un[t]=e}));const dn=function e(t){const n=new cn(t),r=le(cn.prototype.request,n);return Ve.extend(r,cn.prototype,n,{allOwnKeys:!0}),Ve.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Ft(t,n))},r}(gt);dn.Axios=cn,dn.CanceledError=Ct,dn.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const 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;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,s){n.reason||(n.reason=new Ct(e,r,s),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const 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}}},dn.isCancel=xt,dn.VERSION=rn,dn.toFormData=tt,dn.AxiosError=Ke,dn.Cancel=dn.CanceledError,dn.all=function(e){return Promise.all(e)},dn.spread=function(e){return function(t){return e.apply(null,t)}},dn.isAxiosError=function(e){return Ve.isObject(e)&&!0===e.isAxiosError},dn.mergeConfig=Ft,dn.AxiosHeaders=Rt,dn.formToJSON=e=>yt(Ve.isHTMLForm(e)?new FormData(e):e),dn.getAdapter=en,dn.HttpStatusCode=un,dn.default=dn;const{Axios:fn,AxiosError:pn,CanceledError:hn,isCancel:mn,CancelToken:yn,VERSION:gn,all:bn,Cancel:wn,isAxiosError:vn,spread:En,toFormData:Sn,AxiosHeaders:Rn,HttpStatusCode:On,formToJSON:xn,getAdapter:Cn,mergeConfig:Tn}=dn;const An=new Map,kn=e=>{const{open:t,close:n,update:r}=Y(),s=b({status:!1,text:"正在处理,请稍后..."}),o=b({status:!1}),i=b(!1),a=b(!1),l=R(null),c=R(null),u=R(null),d=p((()=>{var e;return(null==(e=u.value)?void 0:e.status)||null})),f=b({}),h=b({}),m=b(""),y=b({}),g=b(!1),w=()=>{s.value.status&&!l.value&&(r({...s.value}),t())},v=()=>{l.value&&(n(),l.value=null)},E=async(t,n)=>{if(t.trim())try{if(c.value=null,g.value=!1,i.value=!0,m.value=t,y.value=n||{},o.value.status){const{create:e}=G();await e({type:"info",...o.value})}s.value.status&&w();const r=await e.post(t,n);return u.value=r,r.data&&(f.value={...h.value,...r.data}),a.value&&(()=>{if(a.value&&f.value&&f.value&&"object"==typeof f.value&&"status"in f.value&&"message"in f.value){const{request:e}=F(),{status:t,message:n}=f.value;n&&e({status:t,message:n})}})(),r.data}catch(r){(e=>{var t;const{handleError:n}=ae();if("boolean"!=typeof e){if(g.value="AbortError"===(null==e?void 0:e.name)||!1,200!=e.status&&404!=e.status&&(null==e?void 0:e.response)){const{message:r}=null==(t=e.response)?void 0:t.data;return n(new Error(r))}n(e)}})(r)}finally{i.value=!1,s.value.text&&v()}},S=_();S.run((()=>{L(s,(e=>{e&&i.value?w():e||v()})),D((()=>{S.stop()}))}));return{...{loadingMask:s,dialog:o,message:a,loading:i,error:c,response:u,data:f,defaultData:h,statusCode:d,aborted:g,urlRef:m,paramsRef:y},...{execute:E,setParams:e=>(y.value=e,E(m.value,e)),setUrl:(e,t)=>(m.value=e,y.value=t||{},E(e,y.value)),cancel:e=>(g.value=!0,(e=>{var t;null==(t=An.get(e))||t.abort()})(e)),cancelAll:()=>{g.value=!0,An.clear()},fetch:e=>{if(m.value)return E(m.value,e||y.value)}}}};z((e=>new URLSearchParams(window.location.search).get(e)));const jn=e=>re(ee("https:"===window.location.protocol),(e=>`https_${e}`),ne)(e);z(((e,t,n)=>{const r=jn(e),s=(e=>{if(!e)return"";const t=new Date;return t.setTime(t.getTime()+24*e*60*60*1e3),`; expires=${t.toUTCString()}`})(n);document.cookie=`${r}=${encodeURIComponent(t)}${s}; path=/`}));const Nn=(e,t=!0)=>{const n=`${t?jn(e):e}=`,r=document.cookie.split(";").map((e=>e.trim())).find((e=>e.startsWith(n)));return r?decodeURIComponent(r.substring(n.length)):null};z(Nn);z(((e,t,n)=>{const r=JSON.stringify(t);n.setItem(e,r)}));z(((e,t)=>{const n=t.getItem(e);return n?JSON.parse(n):null}));const Pn={error:e=>(401===e.status&&q.push("/login"),404===e.status&&q.go(0),e)};const Un=new class{constructor(e={}){t(this,"instance"),t(this,"middlewares",[]);const{middlewares:n=[],...r}=e;this.instance=dn.create(r),this.middlewares=[...n],this.setupInterceptors()}async executeMiddlewareChain(e,t){let n={...t};for(const r of this.middlewares){const t=r[e];t&&(n=await t(n))}return n}setupInterceptors(){this.instance.interceptors.request.use((async e=>{let t={...e};return t=await this.executeMiddlewareChain("request",t),t}),(e=>Promise.reject(e))),this.instance.interceptors.response.use((async e=>{let t={...e};return t=await this.executeMiddlewareChain("response",t),t}))}use(e){return this.middlewares.push(e),this}getAxiosInstance(){return this.instance}async request(e){try{const t=await this.executeMiddlewareChain("request",e),n=await this.instance.request(t);return this.executeMiddlewareChain("response",n)}catch(t){const e=await this.executeMiddlewareChain("error",t);return Promise.reject(e)}}async get(e,t={}){return this.request({...t,url:e,method:"get"})}async post(e,t,n={}){return this.request({...n,url:e,data:t,method:"post"})}async put(e,t,n={}){return this.request({...n,url:e,data:t,method:"put"})}async delete(e,t={}){return this.request({...t,url:e,method:"delete"})}}({baseURL:"/",timeout:5e3,headers:{"Content-Type":"application/x-www-form-urlencoded"},middlewares:[Pn]}),Bn=(e,t)=>{const{urlRef:n,paramsRef:r,...s}=kn(Un);return n.value=e,r.value=t||{},{urlRef:n,paramsRef:r,...s}};export{Nn as I,$ as N,Z as _,G as a,Y as b,Bn as c,dn as d,ne as i,ae as u};
|