forked from MarSeventh/CloudFlare-ImgBed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
133.5a65460c.js
2 lines (2 loc) · 46.7 KB
/
133.5a65460c.js
1
2
"use strict";(self["webpackChunksanyue_imghub"]=self["webpackChunksanyue_imghub"]||[]).push([[133],{7765:function(e,t,n){n.r(t),n.d(t,{default:function(){return er}});var r={};n.r(r),n.d(r,{hasBrowserEnv:function(){return st},hasStandardBrowserEnv:function(){return it},hasStandardBrowserWebWorkerEnv:function(){return at},origin:function(){return lt}});var o=n(6768),s=n.p+"img/logo.08a1b5de.png";const i=e=>((0,o.Qi)("data-v-45439480"),e=e(),(0,o.jt)(),e),a={class:"upload-home"},l={class:"toolbar"},c=i((()=>(0,o.Lk)("div",{class:"header"},[(0,o.Lk)("a",{href:"https://sanyue.site"},[(0,o.Lk)("img",{class:"logo",alt:"Sanyue logo",src:s})]),(0,o.Lk)("h1",null,[(0,o.Lk)("a",{class:"main-title",href:"https://sanyue.site",target:"_blank"},"Sanyue"),(0,o.eW)(" ImgHub")])],-1))),u={class:"dialog-action"};function d(e,t,n,r,s,i){const d=(0,o.g2)("Refresh"),f=(0,o.g2)("el-icon"),p=(0,o.g2)("el-button"),h=(0,o.g2)("el-tooltip"),m=(0,o.g2)("Connection"),g=(0,o.g2)("Tools"),b=(0,o.g2)("UploadForm"),y=(0,o.g2)("Footer"),w=(0,o.g2)("el-radio"),E=(0,o.g2)("el-radio-group"),v=(0,o.g2)("el-dialog");return(0,o.uX)(),(0,o.CE)("div",a,[(0,o.Lk)("div",l,[(0,o.bF)(h,{content:"上传方式",placement:"left"},{default:(0,o.k6)((()=>[(0,o.bF)(p,{class:"toolbar-button",size:"large",type:"info",onClick:i.changeUploadMethod,circle:""},{default:(0,o.k6)((()=>[(0,o.bF)(f,{size:"large"},{default:(0,o.k6)((()=>[(0,o.bF)(d)])),_:1})])),_:1},8,["onClick"])])),_:1}),(0,o.bF)(h,{content:"链接格式",placement:"left"},{default:(0,o.k6)((()=>[(0,o.bF)(p,{class:"toolbar-button",size:"large",type:"success",onClick:i.openUrlDialog,circle:""},{default:(0,o.k6)((()=>[(0,o.bF)(f,{size:"large"},{default:(0,o.k6)((()=>[(0,o.bF)(m)])),_:1})])),_:1},8,["onClick"])])),_:1}),(0,o.bF)(h,{content:"管理页面",placement:"left"},{default:(0,o.k6)((()=>[(0,o.bF)(p,{class:"toolbar-button",size:"large",type:"primary",onClick:i.handleManage,circle:""},{default:(0,o.k6)((()=>[(0,o.bF)(f,{size:"large"},{default:(0,o.k6)((()=>[(0,o.bF)(g)])),_:1})])),_:1},8,["onClick"])])),_:1})]),c,(0,o.bF)(b,{selectedUrlForm:s.selectedUrlForm,uploadMethod:s.uploadMethod,class:"upload"},null,8,["selectedUrlForm","uploadMethod"]),(0,o.bF)(y),(0,o.bF)(v,{title:"选择复制链接格式",modelValue:s.showUrlDialog,"onUpdate:modelValue":t[2]||(t[2]=e=>s.showUrlDialog=e),width:"40%","show-close":!1},{default:(0,o.k6)((()=>[(0,o.bF)(E,{modelValue:s.selectedUrlForm,"onUpdate:modelValue":t[0]||(t[0]=e=>s.selectedUrlForm=e)},{default:(0,o.k6)((()=>[(0,o.bF)(w,{value:"url"},{default:(0,o.k6)((()=>[(0,o.eW)("原始链接")])),_:1}),(0,o.bF)(w,{value:"md"},{default:(0,o.k6)((()=>[(0,o.eW)("MarkDown")])),_:1}),(0,o.bF)(w,{value:"html"},{default:(0,o.k6)((()=>[(0,o.eW)("HTML")])),_:1})])),_:1},8,["modelValue"]),(0,o.Lk)("div",u,[(0,o.bF)(p,{type:"primary",onClick:t[1]||(t[1]=e=>s.showUrlDialog=!1)},{default:(0,o.k6)((()=>[(0,o.eW)("确定")])),_:1})])])),_:1},8,["modelValue"])])}var f=n(4232);const p=e=>((0,o.Qi)("data-v-727a3340"),e=e(),(0,o.jt)(),e),h={key:0,class:"el-upload__text"},m=p((()=>(0,o.Lk)("em",null,"点击上传",-1))),g={key:1,class:"el-upload__text"},b=p((()=>(0,o.Lk)("em",null,"粘贴",-1))),y=p((()=>(0,o.Lk)("div",{class:"el-upload__tip"},"支持多文件上传,支持图片和视频,文件大小不超过5MB",-1))),w={class:"upload-list-dashboard"},E={class:"upload-list-dashboard-action"},v=["src","onError"],R={class:"upload-list-item-content"},S={key:0,class:"upload-list-item-url"},O={key:1,class:"upload-list-item-progress"},F={class:"upload-list-item-action"};function k(e,t,n,r,s,i){const a=(0,o.g2)("CameraFilled"),l=(0,o.g2)("CopyDocument"),c=(0,o.g2)("el-icon"),u=(0,o.g2)("el-upload"),d=(0,o.g2)("List"),p=(0,o.g2)("Checked"),k=(0,o.g2)("Failed"),C=(0,o.g2)("el-text"),T=(0,o.g2)("Grid"),L=(0,o.g2)("el-button"),_=(0,o.g2)("el-tooltip"),A=(0,o.g2)("CircleClose"),x=(0,o.g2)("el-button-group"),U=(0,o.g2)("el-link"),j=(0,o.g2)("el-progress"),P=(0,o.g2)("Link"),N=(0,o.g2)("Delete"),D=(0,o.g2)("el-scrollbar"),B=(0,o.g2)("el-card");return(0,o.uX)(),(0,o.CE)("div",{class:"upload-form",onPaste:t[0]||(t[0]=(...e)=>i.handlePaste&&i.handlePaste(...e))},[(0,o.bF)(u,{class:(0,f.C4)(["upload-card",{"is-uploading":s.uploading,"upload-card-busy":s.fileList.length,"paste-mode":"paste"===n.uploadMethod}]),drag:"",multiple:"","http-request":i.uploadFile,onSuccess:i.handleSuccess,"on-error":i.handleError,"before-upload":i.beforeUpload,"on-progress":i.handleProgress,"file-list":s.fileList,"show-file-list":!1,accept:"image/*, video/*"},{tip:(0,o.k6)((()=>[y])),default:(0,o.k6)((()=>[(0,o.bF)(c,{class:"el-icon--upload"},{default:(0,o.k6)((()=>["drag"===n.uploadMethod?((0,o.uX)(),(0,o.Wv)(a,{key:0,color:"blanchedalmond"})):((0,o.uX)(),(0,o.Wv)(l,{key:1,color:"blanchedalmond"}))])),_:1}),"drag"===n.uploadMethod?((0,o.uX)(),(0,o.CE)("div",h,[(0,o.eW)("拖拽 或 "),m])):((0,o.uX)(),(0,o.CE)("div",g,[(0,o.eW)("复制 "),b,(0,o.eW)(" 上传")]))])),_:1},8,["class","http-request","onSuccess","on-error","before-upload","on-progress","file-list"]),(0,o.bF)(B,{class:(0,f.C4)(["upload-list-card",{"upload-list-busy":s.fileList.length}])},{default:(0,o.k6)((()=>[(0,o.Lk)("div",{class:(0,f.C4)(["upload-list-container",{"upload-list-busy":s.fileList.length}])},[(0,o.bF)(D,null,{default:(0,o.k6)((()=>[(0,o.Lk)("div",w,[(0,o.bF)(C,{class:"upload-list-dashboard-title"},{default:(0,o.k6)((()=>[(0,o.bF)(c,null,{default:(0,o.k6)((()=>[(0,o.bF)(d)])),_:1}),(0,o.eW)((0,f.v_)(i.uploadingCount+i.waitingCount)+" ",1),(0,o.bF)(c,null,{default:(0,o.k6)((()=>[(0,o.bF)(p)])),_:1}),(0,o.eW)((0,f.v_)(i.uploadSuccessCount)+" ",1),(0,o.bF)(c,null,{default:(0,o.k6)((()=>[(0,o.bF)(k)])),_:1}),(0,o.eW)((0,f.v_)(i.uploadErrorCount),1)])),_:1}),(0,o.Lk)("div",E,[(0,o.bF)(x,null,{default:(0,o.k6)((()=>[(0,o.bF)(_,{content:"整体复制",placement:"top"},{default:(0,o.k6)((()=>[(0,o.bF)(L,{type:"primary",round:"",onClick:i.copyAll,alt:"整体复制"},{default:(0,o.k6)((()=>[(0,o.bF)(c,null,{default:(0,o.k6)((()=>[(0,o.bF)(T)])),_:1})])),_:1},8,["onClick"])])),_:1}),(0,o.bF)(_,{content:"清空列表",placement:"top"},{default:(0,o.k6)((()=>[(0,o.bF)(L,{type:"primary",round:"",onClick:i.clearFileList},{default:(0,o.k6)((()=>[(0,o.bF)(c,null,{default:(0,o.k6)((()=>[(0,o.bF)(A)])),_:1})])),_:1},8,["onClick"])])),_:1})])),_:1})])]),((0,o.uX)(!0),(0,o.CE)(o.FK,null,(0,o.pI)(s.fileList,(e=>((0,o.uX)(),(0,o.CE)("div",{class:"upload-list-item",key:e.name,span:8},[(0,o.Lk)("img",{style:{width:"10vw","border-radius":"12px"},src:e.url,onError:t=>e.url="https://imgbed.sanyue.site/file/b6a4a65b4edba4377492e.png"},null,40,v),(0,o.Lk)("div",R,[(0,o.bF)(C,{class:"upload-list-item-name",truncated:""},{default:(0,o.k6)((()=>[(0,o.eW)((0,f.v_)(e.name),1)])),_:2},1024),"done"===e.status?((0,o.uX)(),(0,o.CE)("div",S,[(0,o.bF)(U,{underline:!1,href:e.url,target:"_blank"},{default:(0,o.k6)((()=>[(0,o.bF)(C,{class:"upload-list-item-url-text",truncated:""},{default:(0,o.k6)((()=>[(0,o.eW)((0,f.v_)(e.url),1)])),_:2},1024)])),_:2},1032,["href"])])):((0,o.uX)(),(0,o.CE)("div",O,[(0,o.bF)(j,{percentage:e.progreess,status:e.status,"show-text":!1},null,8,["percentage","status"])]))]),(0,o.Lk)("div",F,[(0,o.bF)(L,{type:"primary",circle:"",class:"upload-list-item-action-button",onClick:t=>i.handleCopy(e)},{default:(0,o.k6)((()=>[(0,o.bF)(c,null,{default:(0,o.k6)((()=>[(0,o.bF)(P)])),_:1})])),_:2},1032,["onClick"]),(0,o.bF)(L,{type:"danger",circle:"",class:"upload-list-item-action-button",onClick:t=>i.handleRemove(e)},{default:(0,o.k6)((()=>[(0,o.bF)(c,null,{default:(0,o.k6)((()=>[(0,o.bF)(N)])),_:1})])),_:2},1032,["onClick"])])])))),128))])),_:1})],2)])),_:1},8,["class"])],32)}n(4114),n(4603),n(7566),n(8721),n(6573),n(8100),n(7936),n(7467),n(4732),n(9577);function C(e,t){return function(){return e.apply(t,arguments)}}const{toString:T}=Object.prototype,{getPrototypeOf:L}=Object,_=(e=>t=>{const n=T.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),A=e=>(e=e.toLowerCase(),t=>_(t)===e),x=e=>t=>typeof t===e,{isArray:U}=Array,j=x("undefined");function P(e){return null!==e&&!j(e)&&null!==e.constructor&&!j(e.constructor)&&M(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const N=A("ArrayBuffer");function D(e){let t;return t="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&N(e.buffer),t}const B=x("string"),M=x("function"),q=x("number"),I=e=>null!==e&&"object"===typeof e,z=e=>!0===e||!1===e,W=e=>{if("object"!==_(e))return!1;const t=L(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},$=A("Date"),H=A("File"),V=A("Blob"),J=A("FileList"),K=e=>I(e)&&M(e.pipe),X=e=>{let t;return e&&("function"===typeof FormData&&e instanceof FormData||M(e.append)&&("formdata"===(t=_(e))||"object"===t&&M(e.toString)&&"[object FormData]"===e.toString()))},G=A("URLSearchParams"),[Q,Y,Z,ee]=["ReadableStream","Request","Response","Headers"].map(A),te=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ne(e,t,{allOwnKeys:n=!1}={}){if(null===e||"undefined"===typeof e)return;let r,o;if("object"!==typeof e&&(e=[e]),U(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let i;for(r=0;r<s;r++)i=o[r],t.call(null,e[i],i,e)}}function re(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;while(o-- >0)if(r=n[o],t===r.toLowerCase())return r;return null}const oe=(()=>"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:global)(),se=e=>!j(e)&&e!==oe;function ie(){const{caseless:e}=se(this)&&this||{},t={},n=(n,r)=>{const o=e&&re(t,r)||r;W(t[o])&&W(n)?t[o]=ie(t[o],n):W(n)?t[o]=ie({},n):U(n)?t[o]=n.slice():t[o]=n};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&ne(arguments[r],n);return t}const ae=(e,t,n,{allOwnKeys:r}={})=>(ne(t,((t,r)=>{n&&M(t)?e[r]=C(t,n):e[r]=t}),{allOwnKeys:r}),e),le=e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),ce=(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)},ue=(e,t,n,r)=>{let o,s,i;const a={};if(t=t||{},null==e)return t;do{o=Object.getOwnPropertyNames(e),s=o.length;while(s-- >0)i=o[s],r&&!r(i,e,t)||a[i]||(t[i]=e[i],a[i]=!0);e=!1!==n&&L(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},de=(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},fe=e=>{if(!e)return null;if(U(e))return e;let t=e.length;if(!q(t))return null;const n=new Array(t);while(t-- >0)n[t]=e[t];return n},pe=(e=>t=>e&&t instanceof e)("undefined"!==typeof Uint8Array&&L(Uint8Array)),he=(e,t)=>{const n=e&&e[Symbol.iterator],r=n.call(e);let o;while((o=r.next())&&!o.done){const n=o.value;t.call(e,n[0],n[1])}},me=(e,t)=>{let n;const r=[];while(null!==(n=e.exec(t)))r.push(n);return r},ge=A("HTMLFormElement"),be=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),ye=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),we=A("RegExp"),Ee=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ne(n,((n,o)=>{let s;!1!==(s=t(n,o,e))&&(r[o]=s||n)})),Object.defineProperties(e,r)},ve=e=>{Ee(e,((t,n)=>{if(M(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];M(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},Re=(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return U(e)?r(e):r(String(e).split(t)),n},Se=()=>{},Oe=(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,Fe="abcdefghijklmnopqrstuvwxyz",ke="0123456789",Ce={DIGIT:ke,ALPHA:Fe,ALPHA_DIGIT:Fe+Fe.toUpperCase()+ke},Te=(e=16,t=Ce.ALPHA_DIGIT)=>{let n="";const{length:r}=t;while(e--)n+=t[Math.random()*r|0];return n};function Le(e){return!!(e&&M(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])}const _e=e=>{const t=new Array(10),n=(e,r)=>{if(I(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=U(e)?[]:{};return ne(e,((e,t)=>{const s=n(e,r+1);!j(s)&&(o[t]=s)})),t[r]=void 0,o}}return e};return n(e,0)},Ae=A("AsyncFunction"),xe=e=>e&&(I(e)||M(e))&&M(e.then)&&M(e.catch);var Ue={isArray:U,isArrayBuffer:N,isBuffer:P,isFormData:X,isArrayBufferView:D,isString:B,isNumber:q,isBoolean:z,isObject:I,isPlainObject:W,isReadableStream:Q,isRequest:Y,isResponse:Z,isHeaders:ee,isUndefined:j,isDate:$,isFile:H,isBlob:V,isRegExp:we,isFunction:M,isStream:K,isURLSearchParams:G,isTypedArray:pe,isFileList:J,forEach:ne,merge:ie,extend:ae,trim:te,stripBOM:le,inherits:ce,toFlatObject:ue,kindOf:_,kindOfTest:A,endsWith:de,toArray:fe,forEachEntry:he,matchAll:me,isHTMLForm:ge,hasOwnProperty:ye,hasOwnProp:ye,reduceDescriptors:Ee,freezeMethods:ve,toObjectSet:Re,toCamelCase:be,noop:Se,toFiniteNumber:Oe,findKey:re,global:oe,isContextDefined:se,ALPHABET:Ce,generateString:Te,isSpecCompliantForm:Le,toJSONObject:_e,isAsyncFn:Ae,isThenable:xe};function je(e,t,n,r,o){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),o&&(this.response=o)}Ue.inherits(je,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:Ue.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Pe=je.prototype,Ne={};["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=>{Ne[e]={value:e}})),Object.defineProperties(je,Ne),Object.defineProperty(Pe,"isAxiosError",{value:!0}),je.from=(e,t,n,r,o,s)=>{const i=Object.create(Pe);return Ue.toFlatObject(e,i,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),je.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};var De=je,Be=null;function Me(e){return Ue.isPlainObject(e)||Ue.isArray(e)}function qe(e){return Ue.endsWith(e,"[]")?e.slice(0,-2):e}function Ie(e,t,n){return e?e.concat(t).map((function(e,t){return e=qe(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}function ze(e){return Ue.isArray(e)&&!e.some(Me)}const We=Ue.toFlatObject(Ue,{},null,(function(e){return/^is[A-Z]/.test(e)}));function $e(e,t,n){if(!Ue.isObject(e))throw new TypeError("target must be an object");t=t||new(Be||FormData),n=Ue.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!Ue.isUndefined(t[e])}));const r=n.metaTokens,o=n.visitor||u,s=n.dots,i=n.indexes,a=n.Blob||"undefined"!==typeof Blob&&Blob,l=a&&Ue.isSpecCompliantForm(t);if(!Ue.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(Ue.isDate(e))return e.toISOString();if(!l&&Ue.isBlob(e))throw new De("Blob is not supported. Use a Buffer instead.");return Ue.isArrayBuffer(e)||Ue.isTypedArray(e)?l&&"function"===typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,o){let a=e;if(e&&!o&&"object"===typeof e)if(Ue.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(Ue.isArray(e)&&ze(e)||(Ue.isFileList(e)||Ue.endsWith(n,"[]"))&&(a=Ue.toArray(e)))return n=qe(n),a.forEach((function(e,r){!Ue.isUndefined(e)&&null!==e&&t.append(!0===i?Ie([n],r,s):null===i?n:n+"[]",c(e))})),!1;return!!Me(e)||(t.append(Ie(o,n,s),c(e)),!1)}const d=[],f=Object.assign(We,{defaultVisitor:u,convertValue:c,isVisitable:Me});function p(e,n){if(!Ue.isUndefined(e)){if(-1!==d.indexOf(e))throw Error("Circular reference detected in "+n.join("."));d.push(e),Ue.forEach(e,(function(e,r){const s=!(Ue.isUndefined(e)||null===e)&&o.call(t,e,Ue.isString(r)?r.trim():r,n,f);!0===s&&p(e,n?n.concat(r):[r])})),d.pop()}}if(!Ue.isObject(e))throw new TypeError("data must be an object");return p(e),t}var He=$e;function Ve(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Je(e,t){this._pairs=[],e&&He(e,this,t)}const Ke=Je.prototype;Ke.append=function(e,t){this._pairs.push([e,t])},Ke.toString=function(e){const t=e?function(t){return e.call(this,t,Ve)}:Ve;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var Xe=Je;function Ge(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Qe(e,t,n){if(!t)return e;const r=n&&n.encode||Ge,o=n&&n.serialize;let s;if(s=o?o(t,n):Ue.isURLSearchParams(t)?t.toString():new Xe(t,n).toString(r),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}class Ye{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){Ue.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}var Ze=Ye,et={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},tt="undefined"!==typeof URLSearchParams?URLSearchParams:Xe,nt="undefined"!==typeof FormData?FormData:null,rt="undefined"!==typeof Blob?Blob:null,ot={isBrowser:!0,classes:{URLSearchParams:tt,FormData:nt,Blob:rt},protocols:["http","https","file","blob","url","data"]};const st="undefined"!==typeof window&&"undefined"!==typeof document,it=(e=>st&&["ReactNative","NativeScript","NS"].indexOf(e)<0)("undefined"!==typeof navigator&&navigator.product),at=(()=>"undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"===typeof self.importScripts)(),lt=st&&window.location.href||"http://localhost";var ct={...r,...ot};function ut(e,t){return He(e,new ct.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return ct.isNode&&Ue.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}function dt(e){return Ue.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}function ft(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],t[s]=e[s];return t}function pt(e){function t(e,n,r,o){let s=e[o++];if("__proto__"===s)return!0;const i=Number.isFinite(+s),a=o>=e.length;if(s=!s&&Ue.isArray(r)?r.length:s,a)return Ue.hasOwnProp(r,s)?r[s]=[r[s],n]:r[s]=n,!i;r[s]&&Ue.isObject(r[s])||(r[s]=[]);const l=t(e,n,r[s],o);return l&&Ue.isArray(r[s])&&(r[s]=ft(r[s])),!i}if(Ue.isFormData(e)&&Ue.isFunction(e.entries)){const n={};return Ue.forEachEntry(e,((e,r)=>{t(dt(e),r,n,0)})),n}return null}var ht=pt;function mt(e,t,n){if(Ue.isString(e))try{return(t||JSON.parse)(e),Ue.trim(e)}catch(r){if("SyntaxError"!==r.name)throw r}return(n||JSON.stringify)(e)}const gt={transitional:et,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=Ue.isObject(e);o&&Ue.isHTMLForm(e)&&(e=new FormData(e));const s=Ue.isFormData(e);if(s)return r?JSON.stringify(ht(e)):e;if(Ue.isArrayBuffer(e)||Ue.isBuffer(e)||Ue.isStream(e)||Ue.isFile(e)||Ue.isBlob(e)||Ue.isReadableStream(e))return e;if(Ue.isArrayBufferView(e))return e.buffer;if(Ue.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return ut(e,this.formSerializer).toString();if((i=Ue.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return He(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),mt(e)):e}],transformResponse:[function(e){const t=this.transitional||gt.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(Ue.isResponse(e)||Ue.isReadableStream(e))return e;if(e&&Ue.isString(e)&&(n&&!this.responseType||r)){const n=t&&t.silentJSONParsing,s=!n&&r;try{return JSON.parse(e)}catch(o){if(s){if("SyntaxError"===o.name)throw De.from(o,De.ERR_BAD_RESPONSE,this,null,this.response);throw o}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ct.classes.FormData,Blob:ct.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ue.forEach(["delete","get","head","post","put","patch"],(e=>{gt.headers[e]={}}));var bt=gt;const yt=Ue.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"]);var wt=e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&yt[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t};const Et=Symbol("internals");function vt(e){return e&&String(e).trim().toLowerCase()}function Rt(e){return!1===e||null==e?e:Ue.isArray(e)?e.map(Rt):String(e)}function St(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;while(r=n.exec(e))t[r[1]]=r[2];return t}const Ot=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ft(e,t,n,r,o){return Ue.isFunction(r)?r.call(this,t,n):(o&&(t=n),Ue.isString(t)?Ue.isString(r)?-1!==t.indexOf(r):Ue.isRegExp(r)?r.test(t):void 0:void 0)}function kt(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}function Ct(e,t){const n=Ue.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}class Tt{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=vt(t);if(!o)throw new Error("header name must be a non-empty string");const s=Ue.findKey(r,o);(!s||void 0===r[s]||!0===n||void 0===n&&!1!==r[s])&&(r[s||t]=Rt(e))}const s=(e,t)=>Ue.forEach(e,((e,n)=>o(e,n,t)));if(Ue.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(Ue.isString(e)&&(e=e.trim())&&!Ot(e))s(wt(e),t);else if(Ue.isHeaders(e))for(const[i,a]of e.entries())o(a,i,n);else null!=e&&o(t,e,n);return this}get(e,t){if(e=vt(e),e){const n=Ue.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return St(e);if(Ue.isFunction(t))return t.call(this,e,n);if(Ue.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=vt(e),e){const n=Ue.findKey(this,e);return!(!n||void 0===this[n]||t&&!Ft(this,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=vt(e),e){const o=Ue.findKey(n,e);!o||t&&!Ft(n,n[o],o,t)||(delete n[o],r=!0)}}return Ue.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;while(n--){const o=t[n];e&&!Ft(this,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return Ue.forEach(this,((r,o)=>{const s=Ue.findKey(n,o);if(s)return t[s]=Rt(r),void delete t[o];const i=e?kt(o):String(o).trim();i!==o&&delete t[o],t[i]=Rt(r),n[i]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Ue.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&Ue.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[Et]=this[Et]={accessors:{}},n=t.accessors,r=this.prototype;function o(e){const t=vt(e);n[t]||(Ct(r,e),n[t]=!0)}return Ue.isArray(e)?e.forEach(o):o(e),this}}Tt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ue.reduceDescriptors(Tt.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),Ue.freezeMethods(Tt);var Lt=Tt;function _t(e,t){const n=this||bt,r=t||n,o=Lt.from(r.headers);let s=r.data;return Ue.forEach(e,(function(e){s=e.call(n,s,o.normalize(),t?t.status:void 0)})),o.normalize(),s}function At(e){return!(!e||!e.__CANCEL__)}function xt(e,t,n){De.call(this,null==e?"canceled":e,De.ERR_CANCELED,t,n),this.name="CanceledError"}Ue.inherits(xt,De,{__CANCEL__:!0});var Ut=xt;function jt(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new De("Request failed with status code "+n.status,[De.ERR_BAD_REQUEST,De.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}function Pt(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Nt(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,s=0,i=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),c=r[i];o||(o=l),n[s]=a,r[s]=l;let u=i,d=0;while(u!==s)d+=n[u++],u%=e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),l-o<t)return;const f=c&&l-c;return f?Math.round(1e3*d/f):void 0}}var Dt=Nt;function Bt(e,t){let n=0;const r=1e3/t;let o=null;return function(){const t=!0===this,s=Date.now();if(t||s-n>r)return o&&(clearTimeout(o),o=null),n=s,e.apply(null,arguments);o||(o=setTimeout((()=>(o=null,n=Date.now(),e.apply(null,arguments))),r-(s-n)))}}var Mt=Bt,qt=(e,t,n=3)=>{let r=0;const o=Dt(50,250);return Mt((n=>{const s=n.loaded,i=n.lengthComputable?n.total:void 0,a=s-r,l=o(a),c=s<=i;r=s;const u={loaded:s,total:i,progress:i?s/i:void 0,bytes:a,rate:l||void 0,estimated:l&&i&&c?(i-s)/l:void 0,event:n,lengthComputable:null!=i};u[t?"download":"upload"]=!0,e(u)}),n)},It=(n(4979),ct.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=Ue.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return function(){return!0}}()),zt=ct.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const i=[e+"="+encodeURIComponent(t)];Ue.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),Ue.isString(r)&&i.push("path="+r),Ue.isString(o)&&i.push("domain="+o),!0===s&&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(){return null},remove(){}};function Wt(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function $t(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ht(e,t){return e&&!Wt(t)?$t(e,t):t}const Vt=e=>e instanceof Lt?{...e}:e;function Jt(e,t){t=t||{};const n={};function r(e,t,n){return Ue.isPlainObject(e)&&Ue.isPlainObject(t)?Ue.merge.call({caseless:n},e,t):Ue.isPlainObject(t)?Ue.merge({},t):Ue.isArray(t)?t.slice():t}function o(e,t,n){return Ue.isUndefined(t)?Ue.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function s(e,t){if(!Ue.isUndefined(t))return r(void 0,t)}function i(e,t){return Ue.isUndefined(t)?Ue.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,s){return s in t?r(n,o):s in e?r(void 0,n):void 0}const l={url:s,method:s,data:s,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)=>o(Vt(e),Vt(t),!0)};return Ue.forEach(Object.keys(Object.assign({},e,t)),(function(r){const s=l[r]||o,i=s(e[r],t[r],r);Ue.isUndefined(i)&&s!==a||(n[r]=i)})),n}var Kt=e=>{const t=Jt({},e);let n,{data:r,withXSRFToken:o,xsrfHeaderName:s,xsrfCookieName:i,headers:a,auth:l}=t;if(t.headers=a=Lt.from(a),t.url=Qe(Ht(t.baseURL,t.url),e.params,e.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),Ue.isFormData(r))if(ct.hasStandardBrowserEnv||ct.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(ct.hasStandardBrowserEnv&&(o&&Ue.isFunction(o)&&(o=o(t)),o||!1!==o&&It(t.url))){const e=s&&i&&zt.read(i);e&&a.set(s,e)}return t};const Xt="undefined"!==typeof XMLHttpRequest;var Gt=Xt&&function(e){return new Promise((function(t,n){const r=Kt(e);let o=r.data;const s=Lt.from(r.headers).normalize();let i,{responseType:a}=r;function l(){r.cancelToken&&r.cancelToken.unsubscribe(i),r.signal&&r.signal.removeEventListener("abort",i)}let c=new XMLHttpRequest;function u(){if(!c)return;const r=Lt.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),o=a&&"text"!==a&&"json"!==a?c.response:c.responseText,s={data:o,status:c.status,statusText:c.statusText,headers:r,config:e,request:c};jt((function(e){t(e),l()}),(function(e){n(e),l()}),s),c=null}c.open(r.method.toUpperCase(),r.url,!0),c.timeout=r.timeout,"onloadend"in c?c.onloadend=u:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(u)},c.onabort=function(){c&&(n(new De("Request aborted",De.ECONNABORTED,r,c)),c=null)},c.onerror=function(){n(new De("Network Error",De.ERR_NETWORK,r,c)),c=null},c.ontimeout=function(){let e=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const t=r.transitional||et;r.timeoutErrorMessage&&(e=r.timeoutErrorMessage),n(new De(e,t.clarifyTimeoutError?De.ETIMEDOUT:De.ECONNABORTED,r,c)),c=null},void 0===o&&s.setContentType(null),"setRequestHeader"in c&&Ue.forEach(s.toJSON(),(function(e,t){c.setRequestHeader(t,e)})),Ue.isUndefined(r.withCredentials)||(c.withCredentials=!!r.withCredentials),a&&"json"!==a&&(c.responseType=r.responseType),"function"===typeof r.onDownloadProgress&&c.addEventListener("progress",qt(r.onDownloadProgress,!0)),"function"===typeof r.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",qt(r.onUploadProgress)),(r.cancelToken||r.signal)&&(i=t=>{c&&(n(!t||t.type?new Ut(null,e,c):t),c.abort(),c=null)},r.cancelToken&&r.cancelToken.subscribe(i),r.signal&&(r.signal.aborted?i():r.signal.addEventListener("abort",i)));const d=Pt(r.url);d&&-1===ct.protocols.indexOf(d)?n(new De("Unsupported protocol "+d+":",De.ERR_BAD_REQUEST,e)):c.send(o||null)}))};const Qt=(e,t)=>{let n,r=new AbortController;const o=function(e){if(!n){n=!0,i();const t=e instanceof Error?e:this.reason;r.abort(t instanceof De?t:new Ut(t instanceof Error?t.message:t))}};let s=t&&setTimeout((()=>{o(new De(`timeout ${t} of ms exceeded`,De.ETIMEDOUT))}),t);const i=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach((e=>{e&&(e.removeEventListener?e.removeEventListener("abort",o):e.unsubscribe(o))})),e=null)};e.forEach((e=>e&&e.addEventListener&&e.addEventListener("abort",o)));const{signal:a}=r;return a.unsubscribe=i,[a,()=>{s&&clearTimeout(s),s=null}]};var Yt=Qt;const Zt=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let r,o=0;while(o<n)r=o+t,yield e.slice(o,r),o=r},en=async function*(e,t,n){for await(const r of e)yield*Zt(ArrayBuffer.isView(r)?r:await n(String(r)),t)},tn=(e,t,n,r,o)=>{const s=en(e,t,o);let i=0;return new ReadableStream({type:"bytes",async pull(e){const{done:t,value:o}=await s.next();if(t)return e.close(),void r();let a=o.byteLength;n&&n(i+=a),e.enqueue(new Uint8Array(o))},cancel(e){return r(e),s.return()}},{highWaterMark:2})},nn=(e,t)=>{const n=null!=e;return r=>setTimeout((()=>t({lengthComputable:n,total:e,loaded:r})))},rn="function"===typeof fetch&&"function"===typeof Request&&"function"===typeof Response,on=rn&&"function"===typeof ReadableStream,sn=rn&&("function"===typeof TextEncoder?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),an=on&&(()=>{let e=!1;const t=new Request(ct.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})(),ln=65536,cn=on&&!!(()=>{try{return Ue.isReadableStream(new Response("").body)}catch(e){}})(),un={stream:cn&&(e=>e.body)};rn&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach((t=>{!un[t]&&(un[t]=Ue.isFunction(e[t])?e=>e[t]():(e,n)=>{throw new De(`Response type '${t}' is not supported`,De.ERR_NOT_SUPPORT,n)})}))})(new Response);const dn=async e=>null==e?0:Ue.isBlob(e)?e.size:Ue.isSpecCompliantForm(e)?(await new Request(e).arrayBuffer()).byteLength:Ue.isArrayBufferView(e)?e.byteLength:(Ue.isURLSearchParams(e)&&(e+=""),Ue.isString(e)?(await sn(e)).byteLength:void 0),fn=async(e,t)=>{const n=Ue.toFiniteNumber(e.getContentLength());return null==n?dn(t):n};var pn=rn&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:i,onDownloadProgress:a,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:f}=Kt(e);c=c?(c+"").toLowerCase():"text";let p,h,[m,g]=o||s||i?Yt([o,s],i):[];const b=()=>{!p&&setTimeout((()=>{m&&m.unsubscribe()})),p=!0};let y;try{if(l&&an&&"get"!==n&&"head"!==n&&0!==(y=await fn(u,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});Ue.isFormData(r)&&(e=n.headers.get("content-type"))&&u.setContentType(e),n.body&&(r=tn(n.body,ln,nn(y,qt(l)),null,sn))}Ue.isString(d)||(d=d?"cors":"omit"),h=new Request(t,{...f,signal:m,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",withCredentials:d});let o=await fetch(h);const s=cn&&("stream"===c||"response"===c);if(cn&&(a||s)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=o[t]}));const t=Ue.toFiniteNumber(o.headers.get("content-length"));o=new Response(tn(o.body,ln,a&&nn(t,qt(a,!0)),s&&b,sn),e)}c=c||"text";let i=await un[Ue.findKey(un,c)||"text"](o,e);return!s&&b(),g&&g(),await new Promise(((t,n)=>{jt(t,n,{data:i,headers:Lt.from(o.headers),status:o.status,statusText:o.statusText,config:e,request:h})}))}catch(w){if(b(),w&&"TypeError"===w.name&&/fetch/i.test(w.message))throw Object.assign(new De("Network Error",De.ERR_NETWORK,e,h),{cause:w.cause||w});throw De.from(w,w&&w.code,e,h)}});const hn={http:Be,xhr:Gt,fetch:pn};Ue.forEach(hn,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}}));const mn=e=>`- ${e}`,gn=e=>Ue.isFunction(e)||null===e||!1===e;var bn={getAdapter:e=>{e=Ue.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let s=0;s<t;s++){let t;if(n=e[s],r=n,!gn(n)&&(r=hn[(t=String(n)).toLowerCase()],void 0===r))throw new De(`Unknown adapter '${t}'`);if(r)break;o[t||"#"+s]=r}if(!r){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(mn).join("\n"):" "+mn(e[0]):"as no adapter specified";throw new De("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r},adapters:hn};function yn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ut(null,e)}function wn(e){yn(e),e.headers=Lt.from(e.headers),e.data=_t.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);const t=bn.getAdapter(e.adapter||bt.adapter);return t(e).then((function(t){return yn(e),t.data=_t.call(e,e.transformResponse,t),t.headers=Lt.from(t.headers),t}),(function(t){return At(t)||(yn(e),t&&t.response&&(t.response.data=_t.call(e,e.transformResponse,t.response),t.response.headers=Lt.from(t.response.headers))),Promise.reject(t)}))}const En="1.7.2",vn={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{vn[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const Rn={};function Sn(e,t,n){if("object"!==typeof e)throw new De("options must be an object",De.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;while(o-- >0){const s=r[o],i=t[s];if(i){const t=e[s],n=void 0===t||i(t,s,e);if(!0!==n)throw new De("option "+s+" must be "+n,De.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new De("Unknown option "+s,De.ERR_BAD_OPTION)}}vn.transitional=function(e,t,n){function r(e,t){return"[Axios v"+En+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,s)=>{if(!1===e)throw new De(r(o," has been removed"+(t?" in "+t:"")),De.ERR_DEPRECATED);return t&&!Rn[o]&&(Rn[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,s)}};var On={assertOptions:Sn,validators:vn};const Fn=On.validators;class kn{constructor(e){this.defaults=e,this.interceptors={request:new Ze,response:new Ze}}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||{},t.url=e):t=e||{},t=Jt(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&On.assertOptions(n,{silentJSONParsing:Fn.transitional(Fn.boolean),forcedJSONParsing:Fn.transitional(Fn.boolean),clarifyTimeoutError:Fn.transitional(Fn.boolean)},!1),null!=r&&(Ue.isFunction(r)?t.paramsSerializer={serialize:r}:On.assertOptions(r,{encode:Fn.function,serialize:Fn.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&Ue.merge(o.common,o[t.method]);o&&Ue.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=Lt.concat(s,o);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=[wn.bind(this),void 0];e.unshift.apply(e,i),e.push.apply(e,l),u=e.length,c=Promise.resolve(t);while(d<u)c=c.then(e[d++],e[d++]);return c}u=i.length;let f=t;d=0;while(d<u){const e=i[d++],t=i[d++];try{f=e(f)}catch(p){t.call(this,p);break}}try{c=wn.call(this,f)}catch(p){return Promise.reject(p)}d=0,u=l.length;while(d<u)c=c.then(l[d++],l[d++]);return c}getUri(e){e=Jt(this.defaults,e);const t=Ht(e.baseURL,e.url);return Qe(t,e.params,e.paramsSerializer)}}Ue.forEach(["delete","get","head","options"],(function(e){kn.prototype[e]=function(t,n){return this.request(Jt(n||{},{method:e,url:t,data:(n||{}).data}))}})),Ue.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(Jt(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}kn.prototype[e]=t(),kn.prototype[e+"Form"]=t(!0)}));var Cn=kn;class Tn{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;while(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,o){n.reason||(n.reason=new Ut(e,r,o),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)}static source(){let e;const t=new Tn((function(t){e=t}));return{token:t,cancel:e}}}var Ln=Tn;function _n(e){return function(t){return e.apply(null,t)}}function An(e){return Ue.isObject(e)&&!0===e.isAxiosError}const xn={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(xn).forEach((([e,t])=>{xn[t]=e}));var Un=xn;function jn(e){const t=new Cn(e),n=C(Cn.prototype.request,t);return Ue.extend(n,Cn.prototype,t,{allOwnKeys:!0}),Ue.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return jn(Jt(e,t))},n}const Pn=jn(bt);Pn.Axios=Cn,Pn.CanceledError=Ut,Pn.CancelToken=Ln,Pn.isCancel=At,Pn.VERSION=En,Pn.toFormData=He,Pn.AxiosError=De,Pn.Cancel=Pn.CanceledError,Pn.all=function(e){return Promise.all(e)},Pn.spread=_n,Pn.isAxiosError=An,Pn.mergeConfig=Jt,Pn.AxiosHeaders=Lt,Pn.formToJSON=e=>ht(Ue.isHTMLForm(e)?new FormData(e):e),Pn.getAdapter=bn.getAdapter,Pn.HttpStatusCode=Un,Pn.default=Pn;var Nn=Pn,Dn=n(4570),Bn=n.n(Dn),Mn={name:"UploadForm",props:{selectedUrlForm:{type:String,default:"url",required:!1},uploadMethod:{type:String,default:"drag",required:!1}},data(){return{fileList:[],uploading:!1,maxUploading:10,waitingList:[]}},computed:{uploadSuccessCount(){return this.fileList.filter((e=>"done"===e.status||"success"===e.status)).length},uploadErrorCount(){return this.fileList.filter((e=>"exception"===e.status)).length},uploadingCount(){return this.fileList.filter((e=>"uploading"===e.status)).length},waitingCount(){return this.waitingList.length}},methods:{uploadFile(e){if(this.uploadingCount>this.maxUploading)return this.waitingList.push(e),void(this.fileList.find((t=>t.uid===e.file.uid)).status="waiting");this.fileList.find((t=>t.uid===e.file.uid)).status="uploading";const t=new FormData;t.append("file",e.file),Nn({url:"/upload?authCode="+Bn().get("authCode"),method:"post",data:t,onUploadProgress:t=>{const n=Math.round(t.loaded/t.total*100);e.onProgress({percent:n,file:e.file})}}).then((t=>{e.onSuccess(t,e.file)})).catch((t=>{t.response&&401===t.response.status?(this.waitingList=[],this.fileList=[],this.$message.error("认证状态错误!"),this.$router.push("/login")):e.onError(t,e.file)})).finally((()=>{this.uploading=!1}))},handleRemove(e){this.fileList=this.fileList.filter((t=>t.uid!==e.uid)),this.$message({type:"info",message:e.name+"已删除"})},handleSuccess(e,t){try{const n=`${window.location.protocol}//${window.location.host}`;this.fileList.find((e=>e.uid===t.uid)).url=n+e.data[0].src,this.fileList.find((e=>e.uid===t.uid)).progreess=100,this.fileList.find((e=>e.uid===t.uid)).status="success",this.$message({type:"success",message:t.name+"上传成功"}),setTimeout((()=>{this.fileList.find((e=>e.uid===t.uid)).status="done"}),3e3)}catch(n){this.$message.error(t.name+"上传失败"),this.fileList.find((e=>e.uid===t.uid)).status="exception"}finally{if(this.uploading=!1,this.waitingList.length){const e=this.waitingList.shift();this.uploadFile(e)}}},handleError(e,t){if(this.$message.error(t.name+"上传失败"),this.uploading=!1,this.fileList.find((e=>e.uid===t.uid)).status="exception",this.waitingList.length){const e=this.waitingList.shift();this.uploadFile(e)}},handleCopy(e){const t=this.fileList.find((t=>t.uid===e.uid)).status;"done"===t||"success"===t?("url"===this.selectedUrlForm?navigator.clipboard.writeText(e.url):"md"===this.selectedUrlForm?navigator.clipboard.writeText(`![${e.name}](${e.url})`):"html"===this.selectedUrlForm?navigator.clipboard.writeText(`<img src="${e.url}" alt="${e.name}">`):navigator.clipboard.writeText(e.url),this.$message({type:"success",message:"复制成功"})):this.$message({type:"warning",message:"文件未上传成功,无法复制链接"})},beforeUpload(e){const t=e.size/1024/1024<5;if(t){this.uploading=!0;const t=URL.createObjectURL(e);return this.fileList.push({uid:e.uid,name:e.name,url:t,status:"uploading",progreess:0}),!0}return this.$message.error("上传文件大小不能超过 5MB!"),!1},handleProgress(e){this.fileList.find((t=>t.uid===e.file.uid)).progreess=e.percent},copyAll(){if("url"===this.selectedUrlForm){const e=this.fileList.map((e=>{if("done"===e.status||"success"===e.status)return e.url})).join("\n");navigator.clipboard.writeText(e)}else if("md"===this.selectedUrlForm){const e=this.fileList.map((e=>{if("done"===e.status||"success"===e.status)return`![${e.name}](${e.url})`})).join("\n");navigator.clipboard.writeText(e)}else if("html"===this.selectedUrlForm){const e=this.fileList.map((e=>{if("done"===e.status||"success"===e.status)return`<img src="${e.url}" alt="${e.name}">`})).join("\n");navigator.clipboard.writeText(e)}else{const e=this.fileList.map((e=>{if("done"===e.status||"success"===e.status)return e.url})).join("\n");navigator.clipboard.writeText(e)}this.$message({type:"success",message:"整体复制成功"})},clearFileList(){this.fileList=[],this.$message({type:"info",message:"列表已清空"})},handlePaste(e){if("paste"!==this.uploadMethod)return;const t=e.clipboardData.items;for(let n=0;n<t.length;n++)if("file"===t[n].kind){const e=t[n].getAsFile();e.type.includes("image")||e.type.includes("video")?(e.uid=Date.now()+n,e.file=e,console.log(e),this.beforeUpload(e)&&this.uploadFile({file:e,onProgress:e=>this.handleProgress(e),onSuccess:(e,t)=>this.handleSuccess(e,t),onError:(e,t)=>this.handleError(e,t)})):this.$message({type:"warning",message:"粘贴板中的文件不是图片或视频"})}}}},qn=n(1241);const In=(0,qn.A)(Mn,[["render",k],["__scopeId","data-v-727a3340"]]);var zn=In;const Wn=e=>((0,o.Qi)("data-v-4e5e0802"),e=e(),(0,o.jt)(),e),$n={class:"page-footer"},Hn=Wn((()=>(0,o.Lk)("p",null,[(0,o.eW)("© 2024 Designed By "),(0,o.Lk)("a",{class:"footer-name",href:"https://sanyue.site",target:"_blank"},"SanyueQi"),(0,o.eW)(" for You!")],-1))),Vn=[Hn];function Jn(e,t){return(0,o.uX)(),(0,o.CE)("div",$n,Vn)}const Kn={},Xn=(0,qn.A)(Kn,[["render",Jn],["__scopeId","data-v-4e5e0802"]]);var Gn=Xn,Qn=n(144),Yn={name:"UploadHome",data(){return{selectedUrlForm:(0,Qn.KR)("url"),uploadMethod:(0,Qn.KR)("drag"),showUrlDialog:!1}},components:{UploadForm:zn,Footer:Gn},methods:{handleManage(){window.location.href="/admin"},openUrlDialog(){this.showUrlDialog=!0},changeUploadMethod(){this.uploadMethod="drag"===this.uploadMethod?"paste":"drag"}}};const Zn=(0,qn.A)(Yn,[["render",d],["__scopeId","data-v-45439480"]]);var er=Zn}}]);
//# sourceMappingURL=133.5a65460c.js.map