best-unit 0.0.42 → 0.0.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/best-unit.cjs +6 -6
- package/dist/best-unit.js +75 -73
- package/package.json +1 -1
- package/src/components/common/Select.tsx +3 -2
- package/src/local/en.ts +1 -0
- package/src/local/zh.ts +1 -0
package/dist/best-unit.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function bn(){console.log("npm package test!!!")}function yn(){console.log("Current time:",new Date().toISOString())}function Ct(e,t){return function(){return e.apply(t,arguments)}}const{toString:wn}=Object.prototype,{getPrototypeOf:qe}=Object,{iterator:ye,toStringTag:At}=Symbol,we=(e=>t=>{const n=wn.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),I=e=>(e=e.toLowerCase(),t=>we(t)===e),xe=e=>t=>typeof t===e,{isArray:K}=Array,te=xe("undefined");function xn(e){return e!==null&&!te(e)&&e.constructor!==null&&!te(e.constructor)&&P(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ot=I("ArrayBuffer");function En(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ot(e.buffer),t}const Sn=xe("string"),P=xe("function"),Ft=xe("number"),Ee=e=>e!==null&&typeof e=="object",vn=e=>e===!0||e===!1,ce=e=>{if(we(e)!=="object")return!1;const t=qe(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(At in e)&&!(ye in e)},Rn=I("Date"),Tn=I("File"),kn=I("Blob"),Cn=I("FileList"),An=e=>Ee(e)&&P(e.pipe),On=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||P(e.append)&&((t=we(e))==="formdata"||t==="object"&&P(e.toString)&&e.toString()==="[object FormData]"))},Fn=I("URLSearchParams"),[Pn,Bn,Nn,Un]=["ReadableStream","Request","Response","Headers"].map(I),In=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function oe(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),K(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),i=s.length;let a;for(r=0;r<i;r++)a=s[r],t.call(null,e[a],a,e)}}function Pt(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const q=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Bt=e=>!te(e)&&e!==q;function Be(){const{caseless:e}=Bt(this)&&this||{},t={},n=(r,o)=>{const s=e&&Pt(t,o)||o;ce(t[s])&&ce(r)?t[s]=Be(t[s],r):ce(r)?t[s]=Be({},r):K(r)?t[s]=r.slice():t[s]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&oe(arguments[r],n);return t}const Dn=(e,t,n,{allOwnKeys:r}={})=>(oe(t,(o,s)=>{n&&P(o)?e[s]=Ct(o,n):e[s]=o},{allOwnKeys:r}),e),Ln=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),zn=(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)},Hn=(e,t,n,r)=>{let o,s,i;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)i=o[s],(!r||r(i,e,t))&&!a[i]&&(t[i]=e[i],a[i]=!0);e=n!==!1&&qe(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},jn=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Mn=e=>{if(!e)return null;if(K(e))return e;let t=e.length;if(!Ft(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},$n=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&qe(Uint8Array)),qn=(e,t)=>{const r=(e&&e[ye]).call(e);let o;for(;(o=r.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},Wn=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Jn=I("HTMLFormElement"),Vn=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),tt=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Gn=I("RegExp"),Nt=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};oe(n,(o,s)=>{let i;(i=t(o,s,e))!==!1&&(r[s]=i||o)}),Object.defineProperties(e,r)},Kn=e=>{Nt(e,(t,n)=>{if(P(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(P(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Xn=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return K(e)?r(e):r(String(e).split(t)),n},Zn=()=>{},Qn=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Yn(e){return!!(e&&P(e.append)&&e[At]==="FormData"&&e[ye])}const er=e=>{const t=new Array(10),n=(r,o)=>{if(Ee(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const s=K(r)?[]:{};return oe(r,(i,a)=>{const c=n(i,o+1);!te(c)&&(s[a]=c)}),t[o]=void 0,s}}return r};return n(e,0)},tr=I("AsyncFunction"),nr=e=>e&&(Ee(e)||P(e))&&P(e.then)&&P(e.catch),Ut=((e,t)=>e?setImmediate:t?((n,r)=>(q.addEventListener("message",({source:o,data:s})=>{o===q&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),q.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",P(q.postMessage)),rr=typeof queueMicrotask<"u"?queueMicrotask.bind(q):typeof process<"u"&&process.nextTick||Ut,or=e=>e!=null&&P(e[ye]),d={isArray:K,isArrayBuffer:Ot,isBuffer:xn,isFormData:On,isArrayBufferView:En,isString:Sn,isNumber:Ft,isBoolean:vn,isObject:Ee,isPlainObject:ce,isReadableStream:Pn,isRequest:Bn,isResponse:Nn,isHeaders:Un,isUndefined:te,isDate:Rn,isFile:Tn,isBlob:kn,isRegExp:Gn,isFunction:P,isStream:An,isURLSearchParams:Fn,isTypedArray:$n,isFileList:Cn,forEach:oe,merge:Be,extend:Dn,trim:In,stripBOM:Ln,inherits:zn,toFlatObject:Hn,kindOf:we,kindOfTest:I,endsWith:jn,toArray:Mn,forEachEntry:qn,matchAll:Wn,isHTMLForm:Jn,hasOwnProperty:tt,hasOwnProp:tt,reduceDescriptors:Nt,freezeMethods:Kn,toObjectSet:Xn,toCamelCase:Vn,noop:Zn,toFiniteNumber:Qn,findKey:Pt,global:q,isContextDefined:Bt,isSpecCompliantForm:Yn,toJSONObject:er,isAsyncFn:tr,isThenable:nr,setImmediate:Ut,asap:rr,isIterable:or};function S(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,this.status=o.status?o.status:null)}d.inherits(S,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:d.toJSONObject(this.config),code:this.code,status:this.status}}});const It=S.prototype,Dt={};["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=>{Dt[e]={value:e}});Object.defineProperties(S,Dt);Object.defineProperty(It,"isAxiosError",{value:!0});S.from=(e,t,n,r,o,s)=>{const i=Object.create(It);return d.toFlatObject(e,i,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),S.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};const ir=null;function Ne(e){return d.isPlainObject(e)||d.isArray(e)}function Lt(e){return d.endsWith(e,"[]")?e.slice(0,-2):e}function nt(e,t,n){return e?e.concat(t).map(function(o,s){return o=Lt(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function sr(e){return d.isArray(e)&&!e.some(Ne)}const ar=d.toFlatObject(d,{},null,function(t){return/^is[A-Z]/.test(t)});function Se(e,t,n){if(!d.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=d.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,g){return!d.isUndefined(g[b])});const r=n.metaTokens,o=n.visitor||f,s=n.dots,i=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&d.isSpecCompliantForm(t);if(!d.isFunction(o))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(d.isDate(p))return p.toISOString();if(d.isBoolean(p))return p.toString();if(!c&&d.isBlob(p))throw new S("Blob is not supported. Use a Buffer instead.");return d.isArrayBuffer(p)||d.isTypedArray(p)?c&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function f(p,b,g){let w=p;if(p&&!g&&typeof p=="object"){if(d.endsWith(b,"{}"))b=r?b:b.slice(0,-2),p=JSON.stringify(p);else if(d.isArray(p)&&sr(p)||(d.isFileList(p)||d.endsWith(b,"[]"))&&(w=d.toArray(p)))return b=Lt(b),w.forEach(function(E,x){!(d.isUndefined(E)||E===null)&&t.append(i===!0?nt([b],x,s):i===null?b:b+"[]",u(E))}),!1}return Ne(p)?!0:(t.append(nt(g,b,s),u(p)),!1)}const l=[],h=Object.assign(ar,{defaultVisitor:f,convertValue:u,isVisitable:Ne});function m(p,b){if(!d.isUndefined(p)){if(l.indexOf(p)!==-1)throw Error("Circular reference detected in "+b.join("."));l.push(p),d.forEach(p,function(w,y){(!(d.isUndefined(w)||w===null)&&o.call(t,w,d.isString(y)?y.trim():y,b,h))===!0&&m(w,b?b.concat(y):[y])}),l.pop()}}if(!d.isObject(e))throw new TypeError("data must be an object");return m(e),t}function rt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function We(e,t){this._pairs=[],e&&Se(e,this,t)}const zt=We.prototype;zt.append=function(t,n){this._pairs.push([t,n])};zt.toString=function(t){const n=t?function(r){return t.call(this,r,rt)}:rt;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function lr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ht(e,t,n){if(!t)return e;const r=n&&n.encode||lr;d.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let s;if(o?s=o(t,n):s=d.isURLSearchParams(t)?t.toString():new We(t,n).toString(r),s){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class ot{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){d.forEach(this.handlers,function(r){r!==null&&t(r)})}}const jt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},cr=typeof URLSearchParams<"u"?URLSearchParams:We,ur=typeof FormData<"u"?FormData:null,fr=typeof Blob<"u"?Blob:null,dr={isBrowser:!0,classes:{URLSearchParams:cr,FormData:ur,Blob:fr},protocols:["http","https","file","blob","url","data"]},Je=typeof window<"u"&&typeof document<"u",Ue=typeof navigator=="object"&&navigator||void 0,pr=Je&&(!Ue||["ReactNative","NativeScript","NS"].indexOf(Ue.product)<0),hr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",_r=Je&&window.location.href||"http://localhost",mr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Je,hasStandardBrowserEnv:pr,hasStandardBrowserWebWorkerEnv:hr,navigator:Ue,origin:_r},Symbol.toStringTag,{value:"Module"})),F={...mr,...dr};function gr(e,t){return Se(e,new F.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return F.isNode&&d.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function br(e){return d.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function yr(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 Mt(e){function t(n,r,o,s){let i=n[s++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),c=s>=n.length;return i=!i&&d.isArray(o)?o.length:i,c?(d.hasOwnProp(o,i)?o[i]=[o[i],r]:o[i]=r,!a):((!o[i]||!d.isObject(o[i]))&&(o[i]=[]),t(n,r,o[i],s)&&d.isArray(o[i])&&(o[i]=yr(o[i])),!a)}if(d.isFormData(e)&&d.isFunction(e.entries)){const n={};return d.forEachEntry(e,(r,o)=>{t(br(r),o,n,0)}),n}return null}function wr(e,t,n){if(d.isString(e))try{return(t||JSON.parse)(e),d.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ie={transitional:jt,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=d.isObject(t);if(s&&d.isHTMLForm(t)&&(t=new FormData(t)),d.isFormData(t))return o?JSON.stringify(Mt(t)):t;if(d.isArrayBuffer(t)||d.isBuffer(t)||d.isStream(t)||d.isFile(t)||d.isBlob(t)||d.isReadableStream(t))return t;if(d.isArrayBufferView(t))return t.buffer;if(d.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return gr(t,this.formSerializer).toString();if((a=d.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Se(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),wr(t)):t}],transformResponse:[function(t){const n=this.transitional||ie.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(d.isResponse(t)||d.isReadableStream(t))return t;if(t&&d.isString(t)&&(r&&!this.responseType||o)){const i=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(a){if(i)throw a.name==="SyntaxError"?S.from(a,S.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:F.classes.FormData,Blob:F.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};d.forEach(["delete","get","head","post","put","patch"],e=>{ie.headers[e]={}});const xr=d.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"]),Er=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function bn(){console.log("npm package test!!!")}function yn(){console.log("Current time:",new Date().toISOString())}function Ct(e,t){return function(){return e.apply(t,arguments)}}const{toString:wn}=Object.prototype,{getPrototypeOf:qe}=Object,{iterator:ye,toStringTag:At}=Symbol,we=(e=>t=>{const n=wn.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),I=e=>(e=e.toLowerCase(),t=>we(t)===e),xe=e=>t=>typeof t===e,{isArray:K}=Array,te=xe("undefined");function xn(e){return e!==null&&!te(e)&&e.constructor!==null&&!te(e.constructor)&&P(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ot=I("ArrayBuffer");function En(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ot(e.buffer),t}const Sn=xe("string"),P=xe("function"),Ft=xe("number"),Ee=e=>e!==null&&typeof e=="object",vn=e=>e===!0||e===!1,ce=e=>{if(we(e)!=="object")return!1;const t=qe(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(At in e)&&!(ye in e)},Rn=I("Date"),Tn=I("File"),kn=I("Blob"),Cn=I("FileList"),An=e=>Ee(e)&&P(e.pipe),On=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||P(e.append)&&((t=we(e))==="formdata"||t==="object"&&P(e.toString)&&e.toString()==="[object FormData]"))},Fn=I("URLSearchParams"),[Pn,Bn,Nn,Un]=["ReadableStream","Request","Response","Headers"].map(I),In=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function oe(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),K(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),i=s.length;let a;for(r=0;r<i;r++)a=s[r],t.call(null,e[a],a,e)}}function Pt(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const q=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Bt=e=>!te(e)&&e!==q;function Be(){const{caseless:e}=Bt(this)&&this||{},t={},n=(r,o)=>{const s=e&&Pt(t,o)||o;ce(t[s])&&ce(r)?t[s]=Be(t[s],r):ce(r)?t[s]=Be({},r):K(r)?t[s]=r.slice():t[s]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&oe(arguments[r],n);return t}const Dn=(e,t,n,{allOwnKeys:r}={})=>(oe(t,(o,s)=>{n&&P(o)?e[s]=Ct(o,n):e[s]=o},{allOwnKeys:r}),e),Ln=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),zn=(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)},Hn=(e,t,n,r)=>{let o,s,i;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)i=o[s],(!r||r(i,e,t))&&!a[i]&&(t[i]=e[i],a[i]=!0);e=n!==!1&&qe(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},jn=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Mn=e=>{if(!e)return null;if(K(e))return e;let t=e.length;if(!Ft(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},$n=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&qe(Uint8Array)),qn=(e,t)=>{const r=(e&&e[ye]).call(e);let o;for(;(o=r.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},Wn=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Jn=I("HTMLFormElement"),Vn=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),tt=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Gn=I("RegExp"),Nt=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};oe(n,(o,s)=>{let i;(i=t(o,s,e))!==!1&&(r[s]=i||o)}),Object.defineProperties(e,r)},Kn=e=>{Nt(e,(t,n)=>{if(P(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(P(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Xn=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return K(e)?r(e):r(String(e).split(t)),n},Zn=()=>{},Qn=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Yn(e){return!!(e&&P(e.append)&&e[At]==="FormData"&&e[ye])}const er=e=>{const t=new Array(10),n=(r,o)=>{if(Ee(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const s=K(r)?[]:{};return oe(r,(i,a)=>{const c=n(i,o+1);!te(c)&&(s[a]=c)}),t[o]=void 0,s}}return r};return n(e,0)},tr=I("AsyncFunction"),nr=e=>e&&(Ee(e)||P(e))&&P(e.then)&&P(e.catch),Ut=((e,t)=>e?setImmediate:t?((n,r)=>(q.addEventListener("message",({source:o,data:s})=>{o===q&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),q.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",P(q.postMessage)),rr=typeof queueMicrotask<"u"?queueMicrotask.bind(q):typeof process<"u"&&process.nextTick||Ut,or=e=>e!=null&&P(e[ye]),d={isArray:K,isArrayBuffer:Ot,isBuffer:xn,isFormData:On,isArrayBufferView:En,isString:Sn,isNumber:Ft,isBoolean:vn,isObject:Ee,isPlainObject:ce,isReadableStream:Pn,isRequest:Bn,isResponse:Nn,isHeaders:Un,isUndefined:te,isDate:Rn,isFile:Tn,isBlob:kn,isRegExp:Gn,isFunction:P,isStream:An,isURLSearchParams:Fn,isTypedArray:$n,isFileList:Cn,forEach:oe,merge:Be,extend:Dn,trim:In,stripBOM:Ln,inherits:zn,toFlatObject:Hn,kindOf:we,kindOfTest:I,endsWith:jn,toArray:Mn,forEachEntry:qn,matchAll:Wn,isHTMLForm:Jn,hasOwnProperty:tt,hasOwnProp:tt,reduceDescriptors:Nt,freezeMethods:Kn,toObjectSet:Xn,toCamelCase:Vn,noop:Zn,toFiniteNumber:Qn,findKey:Pt,global:q,isContextDefined:Bt,isSpecCompliantForm:Yn,toJSONObject:er,isAsyncFn:tr,isThenable:nr,setImmediate:Ut,asap:rr,isIterable:or};function v(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,this.status=o.status?o.status:null)}d.inherits(v,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:d.toJSONObject(this.config),code:this.code,status:this.status}}});const It=v.prototype,Dt={};["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=>{Dt[e]={value:e}});Object.defineProperties(v,Dt);Object.defineProperty(It,"isAxiosError",{value:!0});v.from=(e,t,n,r,o,s)=>{const i=Object.create(It);return d.toFlatObject(e,i,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),v.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};const ir=null;function Ne(e){return d.isPlainObject(e)||d.isArray(e)}function Lt(e){return d.endsWith(e,"[]")?e.slice(0,-2):e}function nt(e,t,n){return e?e.concat(t).map(function(o,s){return o=Lt(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function sr(e){return d.isArray(e)&&!e.some(Ne)}const ar=d.toFlatObject(d,{},null,function(t){return/^is[A-Z]/.test(t)});function Se(e,t,n){if(!d.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=d.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,g){return!d.isUndefined(g[b])});const r=n.metaTokens,o=n.visitor||f,s=n.dots,i=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&d.isSpecCompliantForm(t);if(!d.isFunction(o))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(d.isDate(p))return p.toISOString();if(d.isBoolean(p))return p.toString();if(!c&&d.isBlob(p))throw new v("Blob is not supported. Use a Buffer instead.");return d.isArrayBuffer(p)||d.isTypedArray(p)?c&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function f(p,b,g){let w=p;if(p&&!g&&typeof p=="object"){if(d.endsWith(b,"{}"))b=r?b:b.slice(0,-2),p=JSON.stringify(p);else if(d.isArray(p)&&sr(p)||(d.isFileList(p)||d.endsWith(b,"[]"))&&(w=d.toArray(p)))return b=Lt(b),w.forEach(function(E,x){!(d.isUndefined(E)||E===null)&&t.append(i===!0?nt([b],x,s):i===null?b:b+"[]",u(E))}),!1}return Ne(p)?!0:(t.append(nt(g,b,s),u(p)),!1)}const l=[],h=Object.assign(ar,{defaultVisitor:f,convertValue:u,isVisitable:Ne});function m(p,b){if(!d.isUndefined(p)){if(l.indexOf(p)!==-1)throw Error("Circular reference detected in "+b.join("."));l.push(p),d.forEach(p,function(w,y){(!(d.isUndefined(w)||w===null)&&o.call(t,w,d.isString(y)?y.trim():y,b,h))===!0&&m(w,b?b.concat(y):[y])}),l.pop()}}if(!d.isObject(e))throw new TypeError("data must be an object");return m(e),t}function rt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function We(e,t){this._pairs=[],e&&Se(e,this,t)}const zt=We.prototype;zt.append=function(t,n){this._pairs.push([t,n])};zt.toString=function(t){const n=t?function(r){return t.call(this,r,rt)}:rt;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function lr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ht(e,t,n){if(!t)return e;const r=n&&n.encode||lr;d.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let s;if(o?s=o(t,n):s=d.isURLSearchParams(t)?t.toString():new We(t,n).toString(r),s){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class ot{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){d.forEach(this.handlers,function(r){r!==null&&t(r)})}}const jt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},cr=typeof URLSearchParams<"u"?URLSearchParams:We,ur=typeof FormData<"u"?FormData:null,fr=typeof Blob<"u"?Blob:null,dr={isBrowser:!0,classes:{URLSearchParams:cr,FormData:ur,Blob:fr},protocols:["http","https","file","blob","url","data"]},Je=typeof window<"u"&&typeof document<"u",Ue=typeof navigator=="object"&&navigator||void 0,pr=Je&&(!Ue||["ReactNative","NativeScript","NS"].indexOf(Ue.product)<0),hr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",_r=Je&&window.location.href||"http://localhost",mr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Je,hasStandardBrowserEnv:pr,hasStandardBrowserWebWorkerEnv:hr,navigator:Ue,origin:_r},Symbol.toStringTag,{value:"Module"})),F={...mr,...dr};function gr(e,t){return Se(e,new F.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return F.isNode&&d.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function br(e){return d.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function yr(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 Mt(e){function t(n,r,o,s){let i=n[s++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),c=s>=n.length;return i=!i&&d.isArray(o)?o.length:i,c?(d.hasOwnProp(o,i)?o[i]=[o[i],r]:o[i]=r,!a):((!o[i]||!d.isObject(o[i]))&&(o[i]=[]),t(n,r,o[i],s)&&d.isArray(o[i])&&(o[i]=yr(o[i])),!a)}if(d.isFormData(e)&&d.isFunction(e.entries)){const n={};return d.forEachEntry(e,(r,o)=>{t(br(r),o,n,0)}),n}return null}function wr(e,t,n){if(d.isString(e))try{return(t||JSON.parse)(e),d.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ie={transitional:jt,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=d.isObject(t);if(s&&d.isHTMLForm(t)&&(t=new FormData(t)),d.isFormData(t))return o?JSON.stringify(Mt(t)):t;if(d.isArrayBuffer(t)||d.isBuffer(t)||d.isStream(t)||d.isFile(t)||d.isBlob(t)||d.isReadableStream(t))return t;if(d.isArrayBufferView(t))return t.buffer;if(d.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return gr(t,this.formSerializer).toString();if((a=d.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Se(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),wr(t)):t}],transformResponse:[function(t){const n=this.transitional||ie.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(d.isResponse(t)||d.isReadableStream(t))return t;if(t&&d.isString(t)&&(r&&!this.responseType||o)){const i=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(a){if(i)throw a.name==="SyntaxError"?v.from(a,v.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:F.classes.FormData,Blob:F.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};d.forEach(["delete","get","head","post","put","patch"],e=>{ie.headers[e]={}});const xr=d.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"]),Er=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
2
2
|
`).forEach(function(i){o=i.indexOf(":"),n=i.substring(0,o).trim().toLowerCase(),r=i.substring(o+1).trim(),!(!n||t[n]&&xr[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},it=Symbol("internals");function Y(e){return e&&String(e).trim().toLowerCase()}function ue(e){return e===!1||e==null?e:d.isArray(e)?e.map(ue):String(e)}function Sr(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const vr=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ae(e,t,n,r,o){if(d.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!d.isString(t)){if(d.isString(r))return t.indexOf(r)!==-1;if(d.isRegExp(r))return r.test(t)}}function Rr(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Tr(e,t){const n=d.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,s,i){return this[r].call(this,t,o,s,i)},configurable:!0})})}let B=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function s(a,c,u){const f=Y(c);if(!f)throw new Error("header name must be a non-empty string");const l=d.findKey(o,f);(!l||o[l]===void 0||u===!0||u===void 0&&o[l]!==!1)&&(o[l||c]=ue(a))}const i=(a,c)=>d.forEach(a,(u,f)=>s(u,f,c));if(d.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(d.isString(t)&&(t=t.trim())&&!vr(t))i(Er(t),n);else if(d.isObject(t)&&d.isIterable(t)){let a={},c,u;for(const f of t){if(!d.isArray(f))throw TypeError("Object iterator must return a key-value pair");a[u=f[0]]=(c=a[u])?d.isArray(c)?[...c,f[1]]:[c,f[1]]:f[1]}i(a,n)}else t!=null&&s(n,t,r);return this}get(t,n){if(t=Y(t),t){const r=d.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Sr(o);if(d.isFunction(n))return n.call(this,o,r);if(d.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Y(t),t){const r=d.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Ae(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function s(i){if(i=Y(i),i){const a=d.findKey(r,i);a&&(!n||Ae(r,r[a],a,n))&&(delete r[a],o=!0)}}return d.isArray(t)?t.forEach(s):s(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const s=n[r];(!t||Ae(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const n=this,r={};return d.forEach(this,(o,s)=>{const i=d.findKey(r,s);if(i){n[i]=ue(o),delete n[s];return}const a=t?Rr(s):String(s).trim();a!==s&&delete n[s],n[a]=ue(o),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return d.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&d.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
3
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[it]=this[it]={accessors:{}}).accessors,o=this.prototype;function s(i){const a=Y(i);r[a]||(Tr(o,i),r[a]=!0)}return d.isArray(t)?t.forEach(s):s(t),this}};B.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);d.reduceDescriptors(B.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});d.freezeMethods(B);function Oe(e,t){const n=this||ie,r=t||n,o=B.from(r.headers);let s=r.data;return d.forEach(e,function(a){s=a.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function $t(e){return!!(e&&e.__CANCEL__)}function X(e,t,n){S.call(this,e??"canceled",S.ERR_CANCELED,t,n),this.name="CanceledError"}d.inherits(X,S,{__CANCEL__:!0});function qt(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new S("Request failed with status code "+n.status,[S.ERR_BAD_REQUEST,S.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function kr(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Cr(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,s=0,i;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),f=r[s];i||(i=u),n[o]=c,r[o]=u;let l=s,h=0;for(;l!==o;)h+=n[l++],l=l%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),u-i<t)return;const m=f&&u-f;return m?Math.round(h*1e3/m):void 0}}function Ar(e,t){let n=0,r=1e3/t,o,s;const i=(u,f=Date.now())=>{n=f,o=null,s&&(clearTimeout(s),s=null),e.apply(null,u)};return[(...u)=>{const f=Date.now(),l=f-n;l>=r?i(u,f):(o=u,s||(s=setTimeout(()=>{s=null,i(o)},r-l)))},()=>o&&i(o)]}const he=(e,t,n=3)=>{let r=0;const o=Cr(50,250);return Ar(s=>{const i=s.loaded,a=s.lengthComputable?s.total:void 0,c=i-r,u=o(c),f=i<=a;r=i;const l={loaded:i,total:a,progress:a?i/a:void 0,bytes:c,rate:u||void 0,estimated:u&&a&&f?(a-i)/u:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(l)},n)},st=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},at=e=>(...t)=>d.asap(()=>e(...t)),Or=F.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,F.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(F.origin),F.navigator&&/(msie|trident)/i.test(F.navigator.userAgent)):()=>!0,Fr=F.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const i=[e+"="+encodeURIComponent(t)];d.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),d.isString(r)&&i.push("path="+r),d.isString(o)&&i.push("domain="+o),s===!0&&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 Pr(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Br(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Wt(e,t,n){let r=!Pr(t);return e&&(r||n==!1)?Br(e,t):t}const lt=e=>e instanceof B?{...e}:e;function J(e,t){t=t||{};const n={};function r(u,f,l,h){return d.isPlainObject(u)&&d.isPlainObject(f)?d.merge.call({caseless:h},u,f):d.isPlainObject(f)?d.merge({},f):d.isArray(f)?f.slice():f}function o(u,f,l,h){if(d.isUndefined(f)){if(!d.isUndefined(u))return r(void 0,u,l,h)}else return r(u,f,l,h)}function s(u,f){if(!d.isUndefined(f))return r(void 0,f)}function i(u,f){if(d.isUndefined(f)){if(!d.isUndefined(u))return r(void 0,u)}else return r(void 0,f)}function a(u,f,l){if(l in t)return r(u,f);if(l in e)return r(void 0,u)}const c={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:(u,f,l)=>o(lt(u),lt(f),l,!0)};return d.forEach(Object.keys(Object.assign({},e,t)),function(f){const l=c[f]||o,h=l(e[f],t[f],f);d.isUndefined(h)&&l!==a||(n[f]=h)}),n}const Jt=e=>{const t=J({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:i,auth:a}=t;t.headers=i=B.from(i),t.url=Ht(Wt(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let c;if(d.isFormData(n)){if(F.hasStandardBrowserEnv||F.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((c=i.getContentType())!==!1){const[u,...f]=c?c.split(";").map(l=>l.trim()).filter(Boolean):[];i.setContentType([u||"multipart/form-data",...f].join("; "))}}if(F.hasStandardBrowserEnv&&(r&&d.isFunction(r)&&(r=r(t)),r||r!==!1&&Or(t.url))){const u=o&&s&&Fr.read(s);u&&i.set(o,u)}return t},Nr=typeof XMLHttpRequest<"u",Ur=Nr&&function(e){return new Promise(function(n,r){const o=Jt(e);let s=o.data;const i=B.from(o.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:u}=o,f,l,h,m,p;function b(){m&&m(),p&&p(),o.cancelToken&&o.cancelToken.unsubscribe(f),o.signal&&o.signal.removeEventListener("abort",f)}let g=new XMLHttpRequest;g.open(o.method.toUpperCase(),o.url,!0),g.timeout=o.timeout;function w(){if(!g)return;const E=B.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),R={data:!a||a==="text"||a==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:E,config:e,request:g};qt(function(N){n(N),b()},function(N){r(N),b()},R),g=null}"onloadend"in g?g.onloadend=w:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(w)},g.onabort=function(){g&&(r(new S("Request aborted",S.ECONNABORTED,e,g)),g=null)},g.onerror=function(){r(new S("Network Error",S.ERR_NETWORK,e,g)),g=null},g.ontimeout=function(){let x=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const R=o.transitional||jt;o.timeoutErrorMessage&&(x=o.timeoutErrorMessage),r(new S(x,R.clarifyTimeoutError?S.ETIMEDOUT:S.ECONNABORTED,e,g)),g=null},s===void 0&&i.setContentType(null),"setRequestHeader"in g&&d.forEach(i.toJSON(),function(x,R){g.setRequestHeader(R,x)}),d.isUndefined(o.withCredentials)||(g.withCredentials=!!o.withCredentials),a&&a!=="json"&&(g.responseType=o.responseType),u&&([h,p]=he(u,!0),g.addEventListener("progress",h)),c&&g.upload&&([l,m]=he(c),g.upload.addEventListener("progress",l),g.upload.addEventListener("loadend",m)),(o.cancelToken||o.signal)&&(f=E=>{g&&(r(!E||E.type?new X(null,e,g):E),g.abort(),g=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const y=kr(o.url);if(y&&F.protocols.indexOf(y)===-1){r(new S("Unsupported protocol "+y+":",S.ERR_BAD_REQUEST,e));return}g.send(s||null)})},Ir=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const s=function(u){if(!o){o=!0,a();const f=u instanceof Error?u:this.reason;r.abort(f instanceof S?f:new X(f instanceof Error?f.message:f))}};let i=t&&setTimeout(()=>{i=null,s(new S(`timeout ${t} of ms exceeded`,S.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),e=null)};e.forEach(u=>u.addEventListener("abort",s));const{signal:c}=r;return c.unsubscribe=()=>d.asap(a),c}},Dr=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},Lr=async function*(e,t){for await(const n of zr(e))yield*Dr(n,t)},zr=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},ct=(e,t,n,r)=>{const o=Lr(e,t);let s=0,i,a=c=>{i||(i=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:u,value:f}=await o.next();if(u){a(),c.close();return}let l=f.byteLength;if(n){let h=s+=l;n(h)}c.enqueue(new Uint8Array(f))}catch(u){throw a(u),u}},cancel(c){return a(c),o.return()}},{highWaterMark:2})},ve=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Vt=ve&&typeof ReadableStream=="function",Hr=ve&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Gt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},jr=Vt&&Gt(()=>{let e=!1;const t=new Request(F.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),ut=64*1024,Ie=Vt&&Gt(()=>d.isReadableStream(new Response("").body)),_e={stream:Ie&&(e=>e.body)};ve&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!_e[t]&&(_e[t]=d.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new S(`Response type '${t}' is not supported`,S.ERR_NOT_SUPPORT,r)})})})(new Response);const Mr=async e=>{if(e==null)return 0;if(d.isBlob(e))return e.size;if(d.isSpecCompliantForm(e))return(await new Request(F.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(d.isArrayBufferView(e)||d.isArrayBuffer(e))return e.byteLength;if(d.isURLSearchParams(e)&&(e=e+""),d.isString(e))return(await Hr(e)).byteLength},$r=async(e,t)=>{const n=d.toFiniteNumber(e.getContentLength());return n??Mr(t)},qr=ve&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:i,onDownloadProgress:a,onUploadProgress:c,responseType:u,headers:f,withCredentials:l="same-origin",fetchOptions:h}=Jt(e);u=u?(u+"").toLowerCase():"text";let m=Ir([o,s&&s.toAbortSignal()],i),p;const b=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let g;try{if(c&&jr&&n!=="get"&&n!=="head"&&(g=await $r(f,r))!==0){let R=new Request(t,{method:"POST",body:r,duplex:"half"}),k;if(d.isFormData(r)&&(k=R.headers.get("content-type"))&&f.setContentType(k),R.body){const[N,j]=st(g,he(at(c)));r=ct(R.body,ut,N,j)}}d.isString(l)||(l=l?"include":"omit");const w="credentials"in Request.prototype;p=new Request(t,{...h,signal:m,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",credentials:w?l:void 0});let y=await fetch(p,h);const E=Ie&&(u==="stream"||u==="response");if(Ie&&(a||E&&b)){const R={};["status","statusText","headers"].forEach(M=>{R[M]=y[M]});const k=d.toFiniteNumber(y.headers.get("content-length")),[N,j]=a&&st(k,he(at(a),!0))||[];y=new Response(ct(y.body,ut,N,()=>{j&&j(),b&&b()}),R)}u=u||"text";let x=await _e[d.findKey(_e,u)||"text"](y,e);return!E&&b&&b(),await new Promise((R,k)=>{qt(R,k,{data:x,headers:B.from(y.headers),status:y.status,statusText:y.statusText,config:e,request:p})})}catch(w){throw b&&b(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new S("Network Error",S.ERR_NETWORK,e,p),{cause:w.cause||w}):S.from(w,w&&w.code,e,p)}}),De={http:ir,xhr:Ur,fetch:qr};d.forEach(De,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const ft=e=>`- ${e}`,Wr=e=>d.isFunction(e)||e===null||e===!1,Kt={getAdapter:e=>{e=d.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let s=0;s<t;s++){n=e[s];let i;if(r=n,!Wr(n)&&(r=De[(i=String(n)).toLowerCase()],r===void 0))throw new S(`Unknown adapter '${i}'`);if(r)break;o[i||"#"+s]=r}if(!r){const s=Object.entries(o).map(([a,c])=>`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build"));let i=t?s.length>1?`since :
|
|
3
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[it]=this[it]={accessors:{}}).accessors,o=this.prototype;function s(i){const a=Y(i);r[a]||(Tr(o,i),r[a]=!0)}return d.isArray(t)?t.forEach(s):s(t),this}};B.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);d.reduceDescriptors(B.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});d.freezeMethods(B);function Oe(e,t){const n=this||ie,r=t||n,o=B.from(r.headers);let s=r.data;return d.forEach(e,function(a){s=a.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function $t(e){return!!(e&&e.__CANCEL__)}function X(e,t,n){v.call(this,e??"canceled",v.ERR_CANCELED,t,n),this.name="CanceledError"}d.inherits(X,v,{__CANCEL__:!0});function qt(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new v("Request failed with status code "+n.status,[v.ERR_BAD_REQUEST,v.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function kr(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Cr(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,s=0,i;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),f=r[s];i||(i=u),n[o]=c,r[o]=u;let l=s,h=0;for(;l!==o;)h+=n[l++],l=l%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),u-i<t)return;const m=f&&u-f;return m?Math.round(h*1e3/m):void 0}}function Ar(e,t){let n=0,r=1e3/t,o,s;const i=(u,f=Date.now())=>{n=f,o=null,s&&(clearTimeout(s),s=null),e.apply(null,u)};return[(...u)=>{const f=Date.now(),l=f-n;l>=r?i(u,f):(o=u,s||(s=setTimeout(()=>{s=null,i(o)},r-l)))},()=>o&&i(o)]}const he=(e,t,n=3)=>{let r=0;const o=Cr(50,250);return Ar(s=>{const i=s.loaded,a=s.lengthComputable?s.total:void 0,c=i-r,u=o(c),f=i<=a;r=i;const l={loaded:i,total:a,progress:a?i/a:void 0,bytes:c,rate:u||void 0,estimated:u&&a&&f?(a-i)/u:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(l)},n)},st=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},at=e=>(...t)=>d.asap(()=>e(...t)),Or=F.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,F.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(F.origin),F.navigator&&/(msie|trident)/i.test(F.navigator.userAgent)):()=>!0,Fr=F.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const i=[e+"="+encodeURIComponent(t)];d.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),d.isString(r)&&i.push("path="+r),d.isString(o)&&i.push("domain="+o),s===!0&&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 Pr(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Br(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Wt(e,t,n){let r=!Pr(t);return e&&(r||n==!1)?Br(e,t):t}const lt=e=>e instanceof B?{...e}:e;function J(e,t){t=t||{};const n={};function r(u,f,l,h){return d.isPlainObject(u)&&d.isPlainObject(f)?d.merge.call({caseless:h},u,f):d.isPlainObject(f)?d.merge({},f):d.isArray(f)?f.slice():f}function o(u,f,l,h){if(d.isUndefined(f)){if(!d.isUndefined(u))return r(void 0,u,l,h)}else return r(u,f,l,h)}function s(u,f){if(!d.isUndefined(f))return r(void 0,f)}function i(u,f){if(d.isUndefined(f)){if(!d.isUndefined(u))return r(void 0,u)}else return r(void 0,f)}function a(u,f,l){if(l in t)return r(u,f);if(l in e)return r(void 0,u)}const c={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:(u,f,l)=>o(lt(u),lt(f),l,!0)};return d.forEach(Object.keys(Object.assign({},e,t)),function(f){const l=c[f]||o,h=l(e[f],t[f],f);d.isUndefined(h)&&l!==a||(n[f]=h)}),n}const Jt=e=>{const t=J({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:i,auth:a}=t;t.headers=i=B.from(i),t.url=Ht(Wt(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let c;if(d.isFormData(n)){if(F.hasStandardBrowserEnv||F.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((c=i.getContentType())!==!1){const[u,...f]=c?c.split(";").map(l=>l.trim()).filter(Boolean):[];i.setContentType([u||"multipart/form-data",...f].join("; "))}}if(F.hasStandardBrowserEnv&&(r&&d.isFunction(r)&&(r=r(t)),r||r!==!1&&Or(t.url))){const u=o&&s&&Fr.read(s);u&&i.set(o,u)}return t},Nr=typeof XMLHttpRequest<"u",Ur=Nr&&function(e){return new Promise(function(n,r){const o=Jt(e);let s=o.data;const i=B.from(o.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:u}=o,f,l,h,m,p;function b(){m&&m(),p&&p(),o.cancelToken&&o.cancelToken.unsubscribe(f),o.signal&&o.signal.removeEventListener("abort",f)}let g=new XMLHttpRequest;g.open(o.method.toUpperCase(),o.url,!0),g.timeout=o.timeout;function w(){if(!g)return;const E=B.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),R={data:!a||a==="text"||a==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:E,config:e,request:g};qt(function(N){n(N),b()},function(N){r(N),b()},R),g=null}"onloadend"in g?g.onloadend=w:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(w)},g.onabort=function(){g&&(r(new v("Request aborted",v.ECONNABORTED,e,g)),g=null)},g.onerror=function(){r(new v("Network Error",v.ERR_NETWORK,e,g)),g=null},g.ontimeout=function(){let x=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const R=o.transitional||jt;o.timeoutErrorMessage&&(x=o.timeoutErrorMessage),r(new v(x,R.clarifyTimeoutError?v.ETIMEDOUT:v.ECONNABORTED,e,g)),g=null},s===void 0&&i.setContentType(null),"setRequestHeader"in g&&d.forEach(i.toJSON(),function(x,R){g.setRequestHeader(R,x)}),d.isUndefined(o.withCredentials)||(g.withCredentials=!!o.withCredentials),a&&a!=="json"&&(g.responseType=o.responseType),u&&([h,p]=he(u,!0),g.addEventListener("progress",h)),c&&g.upload&&([l,m]=he(c),g.upload.addEventListener("progress",l),g.upload.addEventListener("loadend",m)),(o.cancelToken||o.signal)&&(f=E=>{g&&(r(!E||E.type?new X(null,e,g):E),g.abort(),g=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const y=kr(o.url);if(y&&F.protocols.indexOf(y)===-1){r(new v("Unsupported protocol "+y+":",v.ERR_BAD_REQUEST,e));return}g.send(s||null)})},Ir=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const s=function(u){if(!o){o=!0,a();const f=u instanceof Error?u:this.reason;r.abort(f instanceof v?f:new X(f instanceof Error?f.message:f))}};let i=t&&setTimeout(()=>{i=null,s(new v(`timeout ${t} of ms exceeded`,v.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),e=null)};e.forEach(u=>u.addEventListener("abort",s));const{signal:c}=r;return c.unsubscribe=()=>d.asap(a),c}},Dr=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},Lr=async function*(e,t){for await(const n of zr(e))yield*Dr(n,t)},zr=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},ct=(e,t,n,r)=>{const o=Lr(e,t);let s=0,i,a=c=>{i||(i=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:u,value:f}=await o.next();if(u){a(),c.close();return}let l=f.byteLength;if(n){let h=s+=l;n(h)}c.enqueue(new Uint8Array(f))}catch(u){throw a(u),u}},cancel(c){return a(c),o.return()}},{highWaterMark:2})},ve=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Vt=ve&&typeof ReadableStream=="function",Hr=ve&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Gt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},jr=Vt&&Gt(()=>{let e=!1;const t=new Request(F.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),ut=64*1024,Ie=Vt&&Gt(()=>d.isReadableStream(new Response("").body)),_e={stream:Ie&&(e=>e.body)};ve&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!_e[t]&&(_e[t]=d.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new v(`Response type '${t}' is not supported`,v.ERR_NOT_SUPPORT,r)})})})(new Response);const Mr=async e=>{if(e==null)return 0;if(d.isBlob(e))return e.size;if(d.isSpecCompliantForm(e))return(await new Request(F.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(d.isArrayBufferView(e)||d.isArrayBuffer(e))return e.byteLength;if(d.isURLSearchParams(e)&&(e=e+""),d.isString(e))return(await Hr(e)).byteLength},$r=async(e,t)=>{const n=d.toFiniteNumber(e.getContentLength());return n??Mr(t)},qr=ve&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:i,onDownloadProgress:a,onUploadProgress:c,responseType:u,headers:f,withCredentials:l="same-origin",fetchOptions:h}=Jt(e);u=u?(u+"").toLowerCase():"text";let m=Ir([o,s&&s.toAbortSignal()],i),p;const b=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let g;try{if(c&&jr&&n!=="get"&&n!=="head"&&(g=await $r(f,r))!==0){let R=new Request(t,{method:"POST",body:r,duplex:"half"}),k;if(d.isFormData(r)&&(k=R.headers.get("content-type"))&&f.setContentType(k),R.body){const[N,j]=st(g,he(at(c)));r=ct(R.body,ut,N,j)}}d.isString(l)||(l=l?"include":"omit");const w="credentials"in Request.prototype;p=new Request(t,{...h,signal:m,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",credentials:w?l:void 0});let y=await fetch(p,h);const E=Ie&&(u==="stream"||u==="response");if(Ie&&(a||E&&b)){const R={};["status","statusText","headers"].forEach(M=>{R[M]=y[M]});const k=d.toFiniteNumber(y.headers.get("content-length")),[N,j]=a&&st(k,he(at(a),!0))||[];y=new Response(ct(y.body,ut,N,()=>{j&&j(),b&&b()}),R)}u=u||"text";let x=await _e[d.findKey(_e,u)||"text"](y,e);return!E&&b&&b(),await new Promise((R,k)=>{qt(R,k,{data:x,headers:B.from(y.headers),status:y.status,statusText:y.statusText,config:e,request:p})})}catch(w){throw b&&b(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new v("Network Error",v.ERR_NETWORK,e,p),{cause:w.cause||w}):v.from(w,w&&w.code,e,p)}}),De={http:ir,xhr:Ur,fetch:qr};d.forEach(De,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const ft=e=>`- ${e}`,Wr=e=>d.isFunction(e)||e===null||e===!1,Kt={getAdapter:e=>{e=d.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let s=0;s<t;s++){n=e[s];let i;if(r=n,!Wr(n)&&(r=De[(i=String(n)).toLowerCase()],r===void 0))throw new v(`Unknown adapter '${i}'`);if(r)break;o[i||"#"+s]=r}if(!r){const s=Object.entries(o).map(([a,c])=>`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build"));let i=t?s.length>1?`since :
|
|
4
4
|
`+s.map(ft).join(`
|
|
5
|
-
`):" "+ft(s[0]):"as no adapter specified";throw new
|
|
6
|
-
`+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=J(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&fe.assertOptions(r,{silentJSONParsing:L.transitional(L.boolean),forcedJSONParsing:L.transitional(L.boolean),clarifyTimeoutError:L.transitional(L.boolean)},!1),o!=null&&(d.isFunction(o)?n.paramsSerializer={serialize:o}:fe.assertOptions(o,{encode:L.function,serialize:L.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),fe.assertOptions(n,{baseUrl:L.spelling("baseURL"),withXsrfToken:L.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&d.merge(s.common,s[n.method]);s&&d.forEach(["delete","get","head","post","put","patch","common"],p=>{delete s[p]}),n.headers=B.concat(i,s);const a=[];let c=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(n)===!1||(c=c&&b.synchronous,a.unshift(b.fulfilled,b.rejected))});const u=[];this.interceptors.response.forEach(function(b){u.push(b.fulfilled,b.rejected)});let f,l=0,h;if(!c){const p=[dt.bind(this),void 0];for(p.unshift.apply(p,a),p.push.apply(p,u),h=p.length,f=Promise.resolve(n);l<h;)f=f.then(p[l++],p[l++]);return f}h=a.length;let m=n;for(l=0;l<h;){const p=a[l++],b=a[l++];try{m=p(m)}catch(g){b.call(this,g);break}}try{f=dt.call(this,m)}catch(p){return Promise.reject(p)}for(l=0,h=u.length;l<h;)f=f.then(u[l++],u[l++]);return f}getUri(t){t=J(this.defaults,t);const n=Wt(t.baseURL,t.url,t.allowAbsoluteUrls);return Ht(n,t.params,t.paramsSerializer)}};d.forEach(["delete","get","head","options"],function(t){W.prototype[t]=function(n,r){return this.request(J(r||{},{method:t,url:n,data:(r||{}).data}))}});d.forEach(["post","put","patch"],function(t){function n(r){return function(s,i,a){return this.request(J(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}W.prototype[t]=n(),W.prototype[t+"Form"]=n(!0)});let Vr=class Zt{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(o=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](o);r._listeners=null}),this.promise.then=o=>{let s;const i=new Promise(a=>{r.subscribe(a),s=a}).then(o);return i.cancel=function(){r.unsubscribe(s)},i},t(function(s,i,a){r.reason||(r.reason=new X(s,i,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Zt(function(o){t=o}),cancel:t}}};function Gr(e){return function(n){return e.apply(null,n)}}function Kr(e){return d.isObject(e)&&e.isAxiosError===!0}const Le={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(Le).forEach(([e,t])=>{Le[t]=e});function Qt(e){const t=new W(e),n=Ct(W.prototype.request,t);return d.extend(n,W.prototype,t,{allOwnKeys:!0}),d.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Qt(J(e,o))},n}const A=Qt(ie);A.Axios=W;A.CanceledError=X;A.CancelToken=Vr;A.isCancel=$t;A.VERSION=Xt;A.toFormData=Se;A.AxiosError=S;A.Cancel=A.CanceledError;A.all=function(t){return Promise.all(t)};A.spread=Gr;A.isAxiosError=Kr;A.mergeConfig=J;A.AxiosHeaders=B;A.formToJSON=e=>Mt(d.isHTMLForm(e)?new FormData(e):e);A.getAdapter=Kt.getAdapter;A.HttpStatusCode=Le;A.default=A;const{Axios:zo,AxiosError:Ho,CanceledError:jo,isCancel:Mo,CancelToken:$o,VERSION:qo,all:Wo,Cancel:Jo,isAxiosError:Vo,spread:Go,toFormData:Ko,AxiosHeaders:Xo,HttpStatusCode:Zo,formToJSON:Qo,getAdapter:Yo,mergeConfig:ei}=A;var se,T,Yt,$,ht,en,tn,nn,Ve,ze,He,ne={},rn=[],Xr=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Te=Array.isArray;function z(e,t){for(var n in t)e[n]=t[n];return e}function Ge(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function V(e,t,n){var r,o,s,i={};for(s in t)s=="key"?r=t[s]:s=="ref"?o=t[s]:i[s]=t[s];if(arguments.length>2&&(i.children=arguments.length>3?se.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)i[s]===void 0&&(i[s]=e.defaultProps[s]);return ee(e,i,r,o,null)}function ee(e,t,n,r,o){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++Yt,__i:-1,__u:0};return o==null&&T.vnode!=null&&T.vnode(s),s}function Z(e){return e.children}function de(e,t){this.props=e,this.context=t}function G(e,t){if(t==null)return e.__?G(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?G(e):null}function on(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return on(e)}}function _t(e){(!e.__d&&(e.__d=!0)&&$.push(e)&&!me.__r++||ht!=T.debounceRendering)&&((ht=T.debounceRendering)||en)(me)}function me(){for(var e,t,n,r,o,s,i,a=1;$.length;)$.length>a&&$.sort(tn),e=$.shift(),a=$.length,e.__d&&(n=void 0,o=(r=(t=e).__v).__e,s=[],i=[],t.__P&&((n=z({},r)).__v=r.__v+1,T.vnode&&T.vnode(n),Ke(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[o]:null,s,o??G(r),!!(32&r.__u),i),n.__v=r.__v,n.__.__k[n.__i]=n,ln(s,n,i),n.__e!=o&&on(n)));me.__r=0}function sn(e,t,n,r,o,s,i,a,c,u,f){var l,h,m,p,b,g,w=r&&r.__k||rn,y=t.length;for(c=Zr(n,t,w,c,y),l=0;l<y;l++)(m=n.__k[l])!=null&&(h=m.__i==-1?ne:w[m.__i]||ne,m.__i=l,g=Ke(e,m,h,o,s,i,a,c,u,f),p=m.__e,m.ref&&h.ref!=m.ref&&(h.ref&&Xe(h.ref,null,m),f.push(m.ref,m.__c||p,m)),b==null&&p!=null&&(b=p),4&m.__u||h.__k===m.__k?c=an(m,c,e):typeof m.type=="function"&&g!==void 0?c=g:p&&(c=p.nextSibling),m.__u&=-7);return n.__e=b,c}function Zr(e,t,n,r,o){var s,i,a,c,u,f=n.length,l=f,h=0;for(e.__k=new Array(o),s=0;s<o;s++)(i=t[s])!=null&&typeof i!="boolean"&&typeof i!="function"?(c=s+h,(i=e.__k[s]=typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?ee(null,i,null,null,null):Te(i)?ee(Z,{children:i},null,null,null):i.constructor==null&&i.__b>0?ee(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=e,i.__b=e.__b+1,a=null,(u=i.__i=Qr(i,n,c,l))!=-1&&(l--,(a=n[u])&&(a.__u|=2)),a==null||a.__v==null?(u==-1&&(o>f?h--:o<f&&h++),typeof i.type!="function"&&(i.__u|=4)):u!=c&&(u==c-1?h--:u==c+1?h++:(u>c?h--:h++,i.__u|=4))):e.__k[s]=null;if(l)for(s=0;s<f;s++)(a=n[s])!=null&&(2&a.__u)==0&&(a.__e==r&&(r=G(a)),un(a,a));return r}function an(e,t,n){var r,o;if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=an(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=G(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Qr(e,t,n,r){var o,s,i=e.key,a=e.type,c=t[n];if(c===null&&e.key==null||c&&i==c.key&&a==c.type&&(2&c.__u)==0)return n;if(r>(c!=null&&(2&c.__u)==0?1:0))for(o=n-1,s=n+1;o>=0||s<t.length;){if(o>=0){if((c=t[o])&&(2&c.__u)==0&&i==c.key&&a==c.type)return o;o--}if(s<t.length){if((c=t[s])&&(2&c.__u)==0&&i==c.key&&a==c.type)return s;s++}}return-1}function mt(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Xr.test(t)?n:n+"px"}function le(e,t,n,r,o){var s,i;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||mt(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||mt(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")s=t!=(t=t.replace(nn,"$1")),i=t.toLowerCase(),t=i in e||t=="onFocusOut"||t=="onFocusIn"?i.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=n,n?r?n.u=r.u:(n.u=Ve,e.addEventListener(t,s?He:ze,s)):e.removeEventListener(t,s?He:ze,s);else{if(o=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function gt(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=Ve++;else if(t.t<n.u)return;return n(T.event?T.event(t):t)}}}function Ke(e,t,n,r,o,s,i,a,c,u){var f,l,h,m,p,b,g,w,y,E,x,R,k,N,j,M,Ce,D=t.type;if(t.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),s=[a=t.__e=n.__e]),(f=T.__b)&&f(t);e:if(typeof D=="function")try{if(w=t.props,y="prototype"in D&&D.prototype.render,E=(f=D.contextType)&&r[f.__c],x=f?E?E.props.value:f.__:r,n.__c?g=(l=t.__c=n.__c).__=l.__E:(y?t.__c=l=new D(w,x):(t.__c=l=new de(w,x),l.constructor=D,l.render=eo),E&&E.sub(l),l.props=w,l.state||(l.state={}),l.context=x,l.__n=r,h=l.__d=!0,l.__h=[],l._sb=[]),y&&l.__s==null&&(l.__s=l.state),y&&D.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=z({},l.__s)),z(l.__s,D.getDerivedStateFromProps(w,l.__s))),m=l.props,p=l.state,l.__v=t,h)y&&D.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),y&&l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(y&&D.getDerivedStateFromProps==null&&w!==m&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(w,x),!l.__e&&l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(w,l.__s,x)===!1||t.__v==n.__v){for(t.__v!=n.__v&&(l.props=w,l.state=l.__s,l.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(Q){Q&&(Q.__=t)}),R=0;R<l._sb.length;R++)l.__h.push(l._sb[R]);l._sb=[],l.__h.length&&i.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(w,l.__s,x),y&&l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(m,p,b)})}if(l.context=x,l.props=w,l.__P=e,l.__e=!1,k=T.__r,N=0,y){for(l.state=l.__s,l.__d=!1,k&&k(t),f=l.render(l.props,l.state,l.context),j=0;j<l._sb.length;j++)l.__h.push(l._sb[j]);l._sb=[]}else do l.__d=!1,k&&k(t),f=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++N<25);l.state=l.__s,l.getChildContext!=null&&(r=z(z({},r),l.getChildContext())),y&&!h&&l.getSnapshotBeforeUpdate!=null&&(b=l.getSnapshotBeforeUpdate(m,p)),M=f,f!=null&&f.type===Z&&f.key==null&&(M=cn(f.props.children)),a=sn(e,Te(M)?M:[M],t,n,r,o,s,i,a,c,u),l.base=t.__e,t.__u&=-161,l.__h.length&&i.push(l),g&&(l.__E=l.__=null)}catch(Q){if(t.__v=null,c||s!=null)if(Q.then){for(t.__u|=c?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;s[s.indexOf(a)]=null,t.__e=a}else for(Ce=s.length;Ce--;)Ge(s[Ce]);else t.__e=n.__e,t.__k=n.__k;T.__e(Q,t,n)}else s==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=Yr(n.__e,t,n,r,o,s,i,c,u);return(f=T.diffed)&&f(t),128&t.__u?void 0:a}function ln(e,t,n){for(var r=0;r<n.length;r++)Xe(n[r],n[++r],n[++r]);T.__c&&T.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(s){s.call(o)})}catch(s){T.__e(s,o.__v)}})}function cn(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:Te(e)?e.map(cn):z({},e)}function Yr(e,t,n,r,o,s,i,a,c){var u,f,l,h,m,p,b,g=n.props,w=t.props,y=t.type;if(y=="svg"?o="http://www.w3.org/2000/svg":y=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),s!=null){for(u=0;u<s.length;u++)if((m=s[u])&&"setAttribute"in m==!!y&&(y?m.localName==y:m.nodeType==3)){e=m,s[u]=null;break}}if(e==null){if(y==null)return document.createTextNode(w);e=document.createElementNS(o,y,w.is&&w),a&&(T.__m&&T.__m(t,s),a=!1),s=null}if(y==null)g===w||a&&e.data==w||(e.data=w);else{if(s=s&&se.call(e.childNodes),g=n.props||ne,!a&&s!=null)for(g={},u=0;u<e.attributes.length;u++)g[(m=e.attributes[u]).name]=m.value;for(u in g)if(m=g[u],u!="children"){if(u=="dangerouslySetInnerHTML")l=m;else if(!(u in w)){if(u=="value"&&"defaultValue"in w||u=="checked"&&"defaultChecked"in w)continue;le(e,u,null,m,o)}}for(u in w)m=w[u],u=="children"?h=m:u=="dangerouslySetInnerHTML"?f=m:u=="value"?p=m:u=="checked"?b=m:a&&typeof m!="function"||g[u]===m||le(e,u,m,g[u],o);if(f)a||l&&(f.__html==l.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(l&&(e.innerHTML=""),sn(t.type=="template"?e.content:e,Te(h)?h:[h],t,n,r,y=="foreignObject"?"http://www.w3.org/1999/xhtml":o,s,i,s?s[0]:n.__k&&G(n,0),a,c),s!=null)for(u=s.length;u--;)Ge(s[u]);a||(u="value",y=="progress"&&p==null?e.removeAttribute("value"):p!=null&&(p!==e[u]||y=="progress"&&!p||y=="option"&&p!=g[u])&&le(e,u,p,g[u],o),u="checked",b!=null&&b!=e[u]&&le(e,u,b,g[u],o))}return e}function Xe(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(o){T.__e(o,n)}}function un(e,t,n){var r,o;if(T.unmount&&T.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||Xe(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){T.__e(s,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&un(r[o],t,n||typeof e.type!="function");n||Ge(e.__e),e.__c=e.__=e.__e=void 0}function eo(e,t,n){return this.constructor(e,n)}function ke(e,t,n){var r,o,s,i;t==document&&(t=document.documentElement),T.__&&T.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,s=[],i=[],Ke(t,e=(!r&&n||t).__k=V(Z,null,[e]),o||ne,ne,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?se.call(t.childNodes):null,s,!r&&n?n:o?o.__e:t.firstChild,r,i),ln(s,e,i)}function fn(e,t){ke(e,t,fn)}function dn(e,t,n){var r,o,s,i,a=z({},e.props);for(s in e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)s=="key"?r=t[s]:s=="ref"?o=t[s]:a[s]=t[s]===void 0&&i!=null?i[s]:t[s];return arguments.length>2&&(a.children=arguments.length>3?se.call(arguments,2):n),ee(e.type,a,r||e.key,o||e.ref,null)}se=rn.slice,T={__e:function(e,t,n,r){for(var o,s,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((s=o.constructor)&&s.getDerivedStateFromError!=null&&(o.setState(s.getDerivedStateFromError(e)),i=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(a){e=a}throw e}},Yt=0,de.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=z({},this.state),typeof e=="function"&&(e=e(z({},n),this.props)),e&&z(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),_t(this))},de.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),_t(this))},de.prototype.render=Z,$=[],en=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,tn=function(e,t){return e.__v.__b-t.__v.__b},me.__r=0,nn=/(PointerCapture)$|Capture$/i,Ve=0,ze=gt(!1),He=gt(!0);var to=0;function _(e,t,n,r,o,s){t||(t={});var i,a,c=t;if("ref"in c)for(a in c={},t)a=="ref"?i=t[a]:c[a]=t[a];var u={type:e,props:c,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--to,__i:-1,__u:0,__source:o,__self:s};if(typeof e=="function"&&(i=e.defaultProps))for(a in i)c[a]===void 0&&(c[a]=i[a]);return T.vnode&&T.vnode(u),u}var re,C,Pe,bt,ge=0,pn=[],O=T,yt=O.__b,wt=O.__r,xt=O.diffed,Et=O.__c,St=O.unmount,vt=O.__;function Ze(e,t){O.__h&&O.__h(C,e,ge||t),ge=0;var n=C.__H||(C.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function U(e){return ge=1,no(_n,e)}function no(e,t,n){var r=Ze(re++,2);if(r.t=e,!r.__c&&(r.__=[_n(void 0,t),function(a){var c=r.__N?r.__N[0]:r.__[0],u=r.t(c,a);c!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=C,!C.__f)){var o=function(a,c,u){if(!r.__c.__H)return!0;var f=r.__c.__H.__.filter(function(h){return!!h.__c});if(f.every(function(h){return!h.__N}))return!s||s.call(this,a,c,u);var l=r.__c.props!==a;return f.forEach(function(h){if(h.__N){var m=h.__[0];h.__=h.__N,h.__N=void 0,m!==h.__[0]&&(l=!0)}}),s&&s.call(this,a,c,u)||l};C.__f=!0;var s=C.shouldComponentUpdate,i=C.componentWillUpdate;C.componentWillUpdate=function(a,c,u){if(this.__e){var f=s;s=void 0,o(a,c,u),s=f}i&&i.call(this,a,c,u)},C.shouldComponentUpdate=o}return r.__N||r.__}function Qe(e,t){var n=Ze(re++,3);!O.__s&&hn(n.__H,t)&&(n.__=e,n.u=t,C.__H.__h.push(n))}function be(e){return ge=5,ro(function(){return{current:e}},[])}function ro(e,t){var n=Ze(re++,7);return hn(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function oo(){for(var e;e=pn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(pe),e.__H.__h.forEach(je),e.__H.__h=[]}catch(t){e.__H.__h=[],O.__e(t,e.__v)}}O.__b=function(e){C=null,yt&&yt(e)},O.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),vt&&vt(e,t)},O.__r=function(e){wt&&wt(e),re=0;var t=(C=e.__c).__H;t&&(Pe===C?(t.__h=[],C.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(pe),t.__h.forEach(je),t.__h=[],re=0)),Pe=C},O.diffed=function(e){xt&&xt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(pn.push(t)!==1&&bt===O.requestAnimationFrame||((bt=O.requestAnimationFrame)||io)(oo)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Pe=C=null},O.__c=function(e,t){t.some(function(n){try{n.__h.forEach(pe),n.__h=n.__h.filter(function(r){return!r.__||je(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],O.__e(r,n.__v)}}),Et&&Et(e,t)},O.unmount=function(e){St&&St(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{pe(r)}catch(o){t=o}}),n.__H=void 0,t&&O.__e(t,n.__v))};var Rt=typeof requestAnimationFrame=="function";function io(e){var t,n=function(){clearTimeout(r),Rt&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Rt&&(t=requestAnimationFrame(n))}function pe(e){var t=C,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),C=t}function je(e){var t=C;e.__c=e.__(),C=t}function hn(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function _n(e,t){return typeof t=="function"?t(e):t}class so{parseArg(t){return typeof t=="string"?{content:t}:t}show(t,n){const{content:r,duration:o,closable:s}=this.parseArg(n),i=document.createElement("div");if(i.style.cssText=`
|
|
5
|
+
`):" "+ft(s[0]):"as no adapter specified";throw new v("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:De};function Fe(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new X(null,e)}function dt(e){return Fe(e),e.headers=B.from(e.headers),e.data=Oe.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Kt.getAdapter(e.adapter||ie.adapter)(e).then(function(r){return Fe(e),r.data=Oe.call(e,e.transformResponse,r),r.headers=B.from(r.headers),r},function(r){return $t(r)||(Fe(e),r&&r.response&&(r.response.data=Oe.call(e,e.transformResponse,r.response),r.response.headers=B.from(r.response.headers))),Promise.reject(r)})}const Xt="1.10.0",Re={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Re[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const pt={};Re.transitional=function(t,n,r){function o(s,i){return"[Axios v"+Xt+"] Transitional option '"+s+"'"+i+(r?". "+r:"")}return(s,i,a)=>{if(t===!1)throw new v(o(i," has been removed"+(n?" in "+n:"")),v.ERR_DEPRECATED);return n&&!pt[i]&&(pt[i]=!0,console.warn(o(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,i,a):!0}};Re.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Jr(e,t,n){if(typeof e!="object")throw new v("options must be an object",v.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],i=t[s];if(i){const a=e[s],c=a===void 0||i(a,s,e);if(c!==!0)throw new v("option "+s+" must be "+c,v.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new v("Unknown option "+s,v.ERR_BAD_OPTION)}}const fe={assertOptions:Jr,validators:Re},L=fe.validators;let W=class{constructor(t){this.defaults=t||{},this.interceptors={request:new ot,response:new ot}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const s=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
6
|
+
`+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=J(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&fe.assertOptions(r,{silentJSONParsing:L.transitional(L.boolean),forcedJSONParsing:L.transitional(L.boolean),clarifyTimeoutError:L.transitional(L.boolean)},!1),o!=null&&(d.isFunction(o)?n.paramsSerializer={serialize:o}:fe.assertOptions(o,{encode:L.function,serialize:L.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),fe.assertOptions(n,{baseUrl:L.spelling("baseURL"),withXsrfToken:L.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&d.merge(s.common,s[n.method]);s&&d.forEach(["delete","get","head","post","put","patch","common"],p=>{delete s[p]}),n.headers=B.concat(i,s);const a=[];let c=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(n)===!1||(c=c&&b.synchronous,a.unshift(b.fulfilled,b.rejected))});const u=[];this.interceptors.response.forEach(function(b){u.push(b.fulfilled,b.rejected)});let f,l=0,h;if(!c){const p=[dt.bind(this),void 0];for(p.unshift.apply(p,a),p.push.apply(p,u),h=p.length,f=Promise.resolve(n);l<h;)f=f.then(p[l++],p[l++]);return f}h=a.length;let m=n;for(l=0;l<h;){const p=a[l++],b=a[l++];try{m=p(m)}catch(g){b.call(this,g);break}}try{f=dt.call(this,m)}catch(p){return Promise.reject(p)}for(l=0,h=u.length;l<h;)f=f.then(u[l++],u[l++]);return f}getUri(t){t=J(this.defaults,t);const n=Wt(t.baseURL,t.url,t.allowAbsoluteUrls);return Ht(n,t.params,t.paramsSerializer)}};d.forEach(["delete","get","head","options"],function(t){W.prototype[t]=function(n,r){return this.request(J(r||{},{method:t,url:n,data:(r||{}).data}))}});d.forEach(["post","put","patch"],function(t){function n(r){return function(s,i,a){return this.request(J(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}W.prototype[t]=n(),W.prototype[t+"Form"]=n(!0)});let Vr=class Zt{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(o=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](o);r._listeners=null}),this.promise.then=o=>{let s;const i=new Promise(a=>{r.subscribe(a),s=a}).then(o);return i.cancel=function(){r.unsubscribe(s)},i},t(function(s,i,a){r.reason||(r.reason=new X(s,i,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Zt(function(o){t=o}),cancel:t}}};function Gr(e){return function(n){return e.apply(null,n)}}function Kr(e){return d.isObject(e)&&e.isAxiosError===!0}const Le={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(Le).forEach(([e,t])=>{Le[t]=e});function Qt(e){const t=new W(e),n=Ct(W.prototype.request,t);return d.extend(n,W.prototype,t,{allOwnKeys:!0}),d.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Qt(J(e,o))},n}const A=Qt(ie);A.Axios=W;A.CanceledError=X;A.CancelToken=Vr;A.isCancel=$t;A.VERSION=Xt;A.toFormData=Se;A.AxiosError=v;A.Cancel=A.CanceledError;A.all=function(t){return Promise.all(t)};A.spread=Gr;A.isAxiosError=Kr;A.mergeConfig=J;A.AxiosHeaders=B;A.formToJSON=e=>Mt(d.isHTMLForm(e)?new FormData(e):e);A.getAdapter=Kt.getAdapter;A.HttpStatusCode=Le;A.default=A;const{Axios:zo,AxiosError:Ho,CanceledError:jo,isCancel:Mo,CancelToken:$o,VERSION:qo,all:Wo,Cancel:Jo,isAxiosError:Vo,spread:Go,toFormData:Ko,AxiosHeaders:Xo,HttpStatusCode:Zo,formToJSON:Qo,getAdapter:Yo,mergeConfig:ei}=A;var se,T,Yt,$,ht,en,tn,nn,Ve,ze,He,ne={},rn=[],Xr=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Te=Array.isArray;function z(e,t){for(var n in t)e[n]=t[n];return e}function Ge(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function V(e,t,n){var r,o,s,i={};for(s in t)s=="key"?r=t[s]:s=="ref"?o=t[s]:i[s]=t[s];if(arguments.length>2&&(i.children=arguments.length>3?se.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)i[s]===void 0&&(i[s]=e.defaultProps[s]);return ee(e,i,r,o,null)}function ee(e,t,n,r,o){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++Yt,__i:-1,__u:0};return o==null&&T.vnode!=null&&T.vnode(s),s}function Z(e){return e.children}function de(e,t){this.props=e,this.context=t}function G(e,t){if(t==null)return e.__?G(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?G(e):null}function on(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return on(e)}}function _t(e){(!e.__d&&(e.__d=!0)&&$.push(e)&&!me.__r++||ht!=T.debounceRendering)&&((ht=T.debounceRendering)||en)(me)}function me(){for(var e,t,n,r,o,s,i,a=1;$.length;)$.length>a&&$.sort(tn),e=$.shift(),a=$.length,e.__d&&(n=void 0,o=(r=(t=e).__v).__e,s=[],i=[],t.__P&&((n=z({},r)).__v=r.__v+1,T.vnode&&T.vnode(n),Ke(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[o]:null,s,o??G(r),!!(32&r.__u),i),n.__v=r.__v,n.__.__k[n.__i]=n,ln(s,n,i),n.__e!=o&&on(n)));me.__r=0}function sn(e,t,n,r,o,s,i,a,c,u,f){var l,h,m,p,b,g,w=r&&r.__k||rn,y=t.length;for(c=Zr(n,t,w,c,y),l=0;l<y;l++)(m=n.__k[l])!=null&&(h=m.__i==-1?ne:w[m.__i]||ne,m.__i=l,g=Ke(e,m,h,o,s,i,a,c,u,f),p=m.__e,m.ref&&h.ref!=m.ref&&(h.ref&&Xe(h.ref,null,m),f.push(m.ref,m.__c||p,m)),b==null&&p!=null&&(b=p),4&m.__u||h.__k===m.__k?c=an(m,c,e):typeof m.type=="function"&&g!==void 0?c=g:p&&(c=p.nextSibling),m.__u&=-7);return n.__e=b,c}function Zr(e,t,n,r,o){var s,i,a,c,u,f=n.length,l=f,h=0;for(e.__k=new Array(o),s=0;s<o;s++)(i=t[s])!=null&&typeof i!="boolean"&&typeof i!="function"?(c=s+h,(i=e.__k[s]=typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?ee(null,i,null,null,null):Te(i)?ee(Z,{children:i},null,null,null):i.constructor==null&&i.__b>0?ee(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=e,i.__b=e.__b+1,a=null,(u=i.__i=Qr(i,n,c,l))!=-1&&(l--,(a=n[u])&&(a.__u|=2)),a==null||a.__v==null?(u==-1&&(o>f?h--:o<f&&h++),typeof i.type!="function"&&(i.__u|=4)):u!=c&&(u==c-1?h--:u==c+1?h++:(u>c?h--:h++,i.__u|=4))):e.__k[s]=null;if(l)for(s=0;s<f;s++)(a=n[s])!=null&&(2&a.__u)==0&&(a.__e==r&&(r=G(a)),un(a,a));return r}function an(e,t,n){var r,o;if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=an(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=G(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Qr(e,t,n,r){var o,s,i=e.key,a=e.type,c=t[n];if(c===null&&e.key==null||c&&i==c.key&&a==c.type&&(2&c.__u)==0)return n;if(r>(c!=null&&(2&c.__u)==0?1:0))for(o=n-1,s=n+1;o>=0||s<t.length;){if(o>=0){if((c=t[o])&&(2&c.__u)==0&&i==c.key&&a==c.type)return o;o--}if(s<t.length){if((c=t[s])&&(2&c.__u)==0&&i==c.key&&a==c.type)return s;s++}}return-1}function mt(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Xr.test(t)?n:n+"px"}function le(e,t,n,r,o){var s,i;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||mt(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||mt(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")s=t!=(t=t.replace(nn,"$1")),i=t.toLowerCase(),t=i in e||t=="onFocusOut"||t=="onFocusIn"?i.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=n,n?r?n.u=r.u:(n.u=Ve,e.addEventListener(t,s?He:ze,s)):e.removeEventListener(t,s?He:ze,s);else{if(o=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function gt(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=Ve++;else if(t.t<n.u)return;return n(T.event?T.event(t):t)}}}function Ke(e,t,n,r,o,s,i,a,c,u){var f,l,h,m,p,b,g,w,y,E,x,R,k,N,j,M,Ce,D=t.type;if(t.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),s=[a=t.__e=n.__e]),(f=T.__b)&&f(t);e:if(typeof D=="function")try{if(w=t.props,y="prototype"in D&&D.prototype.render,E=(f=D.contextType)&&r[f.__c],x=f?E?E.props.value:f.__:r,n.__c?g=(l=t.__c=n.__c).__=l.__E:(y?t.__c=l=new D(w,x):(t.__c=l=new de(w,x),l.constructor=D,l.render=eo),E&&E.sub(l),l.props=w,l.state||(l.state={}),l.context=x,l.__n=r,h=l.__d=!0,l.__h=[],l._sb=[]),y&&l.__s==null&&(l.__s=l.state),y&&D.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=z({},l.__s)),z(l.__s,D.getDerivedStateFromProps(w,l.__s))),m=l.props,p=l.state,l.__v=t,h)y&&D.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),y&&l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(y&&D.getDerivedStateFromProps==null&&w!==m&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(w,x),!l.__e&&l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(w,l.__s,x)===!1||t.__v==n.__v){for(t.__v!=n.__v&&(l.props=w,l.state=l.__s,l.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(Q){Q&&(Q.__=t)}),R=0;R<l._sb.length;R++)l.__h.push(l._sb[R]);l._sb=[],l.__h.length&&i.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(w,l.__s,x),y&&l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(m,p,b)})}if(l.context=x,l.props=w,l.__P=e,l.__e=!1,k=T.__r,N=0,y){for(l.state=l.__s,l.__d=!1,k&&k(t),f=l.render(l.props,l.state,l.context),j=0;j<l._sb.length;j++)l.__h.push(l._sb[j]);l._sb=[]}else do l.__d=!1,k&&k(t),f=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++N<25);l.state=l.__s,l.getChildContext!=null&&(r=z(z({},r),l.getChildContext())),y&&!h&&l.getSnapshotBeforeUpdate!=null&&(b=l.getSnapshotBeforeUpdate(m,p)),M=f,f!=null&&f.type===Z&&f.key==null&&(M=cn(f.props.children)),a=sn(e,Te(M)?M:[M],t,n,r,o,s,i,a,c,u),l.base=t.__e,t.__u&=-161,l.__h.length&&i.push(l),g&&(l.__E=l.__=null)}catch(Q){if(t.__v=null,c||s!=null)if(Q.then){for(t.__u|=c?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;s[s.indexOf(a)]=null,t.__e=a}else for(Ce=s.length;Ce--;)Ge(s[Ce]);else t.__e=n.__e,t.__k=n.__k;T.__e(Q,t,n)}else s==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=Yr(n.__e,t,n,r,o,s,i,c,u);return(f=T.diffed)&&f(t),128&t.__u?void 0:a}function ln(e,t,n){for(var r=0;r<n.length;r++)Xe(n[r],n[++r],n[++r]);T.__c&&T.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(s){s.call(o)})}catch(s){T.__e(s,o.__v)}})}function cn(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:Te(e)?e.map(cn):z({},e)}function Yr(e,t,n,r,o,s,i,a,c){var u,f,l,h,m,p,b,g=n.props,w=t.props,y=t.type;if(y=="svg"?o="http://www.w3.org/2000/svg":y=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),s!=null){for(u=0;u<s.length;u++)if((m=s[u])&&"setAttribute"in m==!!y&&(y?m.localName==y:m.nodeType==3)){e=m,s[u]=null;break}}if(e==null){if(y==null)return document.createTextNode(w);e=document.createElementNS(o,y,w.is&&w),a&&(T.__m&&T.__m(t,s),a=!1),s=null}if(y==null)g===w||a&&e.data==w||(e.data=w);else{if(s=s&&se.call(e.childNodes),g=n.props||ne,!a&&s!=null)for(g={},u=0;u<e.attributes.length;u++)g[(m=e.attributes[u]).name]=m.value;for(u in g)if(m=g[u],u!="children"){if(u=="dangerouslySetInnerHTML")l=m;else if(!(u in w)){if(u=="value"&&"defaultValue"in w||u=="checked"&&"defaultChecked"in w)continue;le(e,u,null,m,o)}}for(u in w)m=w[u],u=="children"?h=m:u=="dangerouslySetInnerHTML"?f=m:u=="value"?p=m:u=="checked"?b=m:a&&typeof m!="function"||g[u]===m||le(e,u,m,g[u],o);if(f)a||l&&(f.__html==l.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(l&&(e.innerHTML=""),sn(t.type=="template"?e.content:e,Te(h)?h:[h],t,n,r,y=="foreignObject"?"http://www.w3.org/1999/xhtml":o,s,i,s?s[0]:n.__k&&G(n,0),a,c),s!=null)for(u=s.length;u--;)Ge(s[u]);a||(u="value",y=="progress"&&p==null?e.removeAttribute("value"):p!=null&&(p!==e[u]||y=="progress"&&!p||y=="option"&&p!=g[u])&&le(e,u,p,g[u],o),u="checked",b!=null&&b!=e[u]&&le(e,u,b,g[u],o))}return e}function Xe(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(o){T.__e(o,n)}}function un(e,t,n){var r,o;if(T.unmount&&T.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||Xe(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){T.__e(s,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&un(r[o],t,n||typeof e.type!="function");n||Ge(e.__e),e.__c=e.__=e.__e=void 0}function eo(e,t,n){return this.constructor(e,n)}function ke(e,t,n){var r,o,s,i;t==document&&(t=document.documentElement),T.__&&T.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,s=[],i=[],Ke(t,e=(!r&&n||t).__k=V(Z,null,[e]),o||ne,ne,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?se.call(t.childNodes):null,s,!r&&n?n:o?o.__e:t.firstChild,r,i),ln(s,e,i)}function fn(e,t){ke(e,t,fn)}function dn(e,t,n){var r,o,s,i,a=z({},e.props);for(s in e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)s=="key"?r=t[s]:s=="ref"?o=t[s]:a[s]=t[s]===void 0&&i!=null?i[s]:t[s];return arguments.length>2&&(a.children=arguments.length>3?se.call(arguments,2):n),ee(e.type,a,r||e.key,o||e.ref,null)}se=rn.slice,T={__e:function(e,t,n,r){for(var o,s,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((s=o.constructor)&&s.getDerivedStateFromError!=null&&(o.setState(s.getDerivedStateFromError(e)),i=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(a){e=a}throw e}},Yt=0,de.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=z({},this.state),typeof e=="function"&&(e=e(z({},n),this.props)),e&&z(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),_t(this))},de.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),_t(this))},de.prototype.render=Z,$=[],en=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,tn=function(e,t){return e.__v.__b-t.__v.__b},me.__r=0,nn=/(PointerCapture)$|Capture$/i,Ve=0,ze=gt(!1),He=gt(!0);var to=0;function _(e,t,n,r,o,s){t||(t={});var i,a,c=t;if("ref"in c)for(a in c={},t)a=="ref"?i=t[a]:c[a]=t[a];var u={type:e,props:c,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--to,__i:-1,__u:0,__source:o,__self:s};if(typeof e=="function"&&(i=e.defaultProps))for(a in i)c[a]===void 0&&(c[a]=i[a]);return T.vnode&&T.vnode(u),u}var re,C,Pe,bt,ge=0,pn=[],O=T,yt=O.__b,wt=O.__r,xt=O.diffed,Et=O.__c,St=O.unmount,vt=O.__;function Ze(e,t){O.__h&&O.__h(C,e,ge||t),ge=0;var n=C.__H||(C.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function U(e){return ge=1,no(_n,e)}function no(e,t,n){var r=Ze(re++,2);if(r.t=e,!r.__c&&(r.__=[_n(void 0,t),function(a){var c=r.__N?r.__N[0]:r.__[0],u=r.t(c,a);c!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=C,!C.__f)){var o=function(a,c,u){if(!r.__c.__H)return!0;var f=r.__c.__H.__.filter(function(h){return!!h.__c});if(f.every(function(h){return!h.__N}))return!s||s.call(this,a,c,u);var l=r.__c.props!==a;return f.forEach(function(h){if(h.__N){var m=h.__[0];h.__=h.__N,h.__N=void 0,m!==h.__[0]&&(l=!0)}}),s&&s.call(this,a,c,u)||l};C.__f=!0;var s=C.shouldComponentUpdate,i=C.componentWillUpdate;C.componentWillUpdate=function(a,c,u){if(this.__e){var f=s;s=void 0,o(a,c,u),s=f}i&&i.call(this,a,c,u)},C.shouldComponentUpdate=o}return r.__N||r.__}function Qe(e,t){var n=Ze(re++,3);!O.__s&&hn(n.__H,t)&&(n.__=e,n.u=t,C.__H.__h.push(n))}function be(e){return ge=5,ro(function(){return{current:e}},[])}function ro(e,t){var n=Ze(re++,7);return hn(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function oo(){for(var e;e=pn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(pe),e.__H.__h.forEach(je),e.__H.__h=[]}catch(t){e.__H.__h=[],O.__e(t,e.__v)}}O.__b=function(e){C=null,yt&&yt(e)},O.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),vt&&vt(e,t)},O.__r=function(e){wt&&wt(e),re=0;var t=(C=e.__c).__H;t&&(Pe===C?(t.__h=[],C.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(pe),t.__h.forEach(je),t.__h=[],re=0)),Pe=C},O.diffed=function(e){xt&&xt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(pn.push(t)!==1&&bt===O.requestAnimationFrame||((bt=O.requestAnimationFrame)||io)(oo)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Pe=C=null},O.__c=function(e,t){t.some(function(n){try{n.__h.forEach(pe),n.__h=n.__h.filter(function(r){return!r.__||je(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],O.__e(r,n.__v)}}),Et&&Et(e,t)},O.unmount=function(e){St&&St(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{pe(r)}catch(o){t=o}}),n.__H=void 0,t&&O.__e(t,n.__v))};var Rt=typeof requestAnimationFrame=="function";function io(e){var t,n=function(){clearTimeout(r),Rt&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Rt&&(t=requestAnimationFrame(n))}function pe(e){var t=C,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),C=t}function je(e){var t=C;e.__c=e.__(),C=t}function hn(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function _n(e,t){return typeof t=="function"?t(e):t}class so{parseArg(t){return typeof t=="string"?{content:t}:t}show(t,n){const{content:r,duration:o,closable:s}=this.parseArg(n),i=document.createElement("div");if(i.style.cssText=`
|
|
7
7
|
position: fixed;
|
|
8
8
|
top: 20px;
|
|
9
9
|
left: 50%;
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
padding: 4px;
|
|
43
43
|
color: #999;
|
|
44
44
|
font-size: 12px;
|
|
45
|
-
`,c.onclick=()=>{document.body.removeChild(i)},i.appendChild(c)}document.body.appendChild(i),o!==0&&setTimeout(()=>{document.body.contains(i)&&document.body.removeChild(i)},o||3e3)}success(t){this.show("success",t)}error(t){this.show("error",t)}warning(t){this.show("warning",t)}info(t){this.show("info",t)}}const Me=new so;function ao(e={}){const{baseURL:t="/api",timeout:n=1e4,getLocale:r,onError:o}=e,s=A.create({baseURL:t,timeout:n});return s.interceptors.request.use(i=>{const a=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}"),{token:c}=a;if(i.headers={...i.headers,Authorization:c},r){const u=r();u&&(i.headers={...i.headers,"Accept-Language":u})}return i}),s.interceptors.response.use(i=>{if(i.data&&i.data.code===0)return i.data;const a=i.data?.msg||i.data?.message||"未知错误";return Me.error(a),o&&o(a,i),Promise.reject(i.data||{message:"未知错误"})},i=>{const a=i.response?.data?.msg||i.response?.data?.message||i.message||"网络请求失败";return Me.error(a),o&&o(a,i),Promise.reject(i)}),s}const ae=ao();function lo(){const e=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");return ae.get("/balance",{params:{merchant_id:e.merchantId,biz_type:e.bizType,fund_balance_id:e.fundBalanceId}}).then(t=>{const n=t.data;return{totalAmount:n.total_amount||0,availableAmount:n.available_amount||0,frozenAmount:n.frozen_amount||0}})}const co=async()=>ae.get("/all-dicts",{}).then(e=>(sessionStorage.setItem("all_dicts",JSON.stringify(e.data)),e.data||{})),uo=async(e,t)=>ae.post("/oss/upload",e,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:n=>{if(n.total){const r=Math.round(n.loaded*100/n.total);t&&t(r)}}}).then(n=>n.data?.url||""),fo=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}"),n={merchant_id:Number(t.merchantId),biz_type:t.bizType,source_operator:String(t.userId),transfer_no:e.transferNo,transfer_channel:e.transferChannel,voucher_urls:e.voucherUrls};return ae.post("/offline/recharge/create",n,{})},po=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");console.log(t,"fundUnitParams");const n={merchant_id:Number(t.merchantId),biz_type:t.bizType,source_operator:String(t.userId),amount:e.amount,currency:e.currency,recharge_channel:e.rechargeChannel,return_url:window.location.href};return ae.post("/online/recharge/create",n,{}).then(r=>r.data.redirect_url)};var Ye=(e=>(e.ZH="zh",e.EN="en",e))(Ye||{}),H=(e=>(e.WHITE="white",e.DARK="dark",e))(H||{});function ho(e){co();const{merchant_id:t,biz_type:n,fund_balance_id:r,theme:o=H.WHITE,locale:s=Ye.ZH}=e,i="Bearer "+e.token;return sessionStorage.setItem("fund_unit_params",JSON.stringify({merchantId:t,bizType:n,fundBalanceId:r,token:i,theme:o,locale:s})),{token:i,merchantId:t,bizType:n,fundBalanceId:r,theme:o,locale:s}}const _o={"/api":{target:"https://fund.bestfulfill.tech/api/sdk",changeOrigin:!0,rewrite:e=>e.replace(/^\/api/,""),secure:!1}};function mo({onClick:e,color:t,children:n}){const s=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===H.WHITE?{background:t||"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:"8px 16px",cursor:"pointer",fontSize:16,fontWeight:600}:{background:t||"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:"8px 16px",cursor:"pointer",fontSize:16,fontWeight:600};return _("button",{style:s,onClick:e,type:"button",children:n})}const go={余额详情:"余额详情",真实金额:"真实金额",冻结金额:"冻结金额",总可用:"总可用","充值 / 转账":"充值 / 转账",在线充值:"在线充值",线下转账:"线下转账",充值币种:"充值币种",充值金额:"充值金额",支付平台:"支付平台",请选择充值币种:"请选择充值币种",请输入充值金额:"请输入充值金额",请选择支付平台:"请选择支付平台","提交失败,请重试":"提交失败,请重试","提交中...":"提交中...",去支付:"去支付",取消:"取消",关闭:"关闭",第三方支付平台:"第三方支付平台",交易ID:"交易ID",请输入转账交易ID:"请输入转账交易ID",上传文件:"上传文件",请上传转账凭证:"请上传转账凭证",离线充值创建成功:"离线充值创建成功","加载中...":"加载中...",错误:"错误",成功:"成功",必填:"必填","充值/转账":"充值/转账",切换为暗黑主题:"切换为暗黑主题",切换为白色主题:"切换为白色主题",点击或拖拽文件到此处上传:"点击或拖拽文件到此处上传","支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传":"支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传",个文件:"个文件","正在上传...":"正在上传...",已上传:"已上传",移除:"移除"};function bo(e){return go[e]||e}const yo={余额详情:"Balance Details",真实金额:"Real Amount",冻结金额:"Frozen Amount",总可用:"Total Available","充值 / 转账":"Recharge / Transfer",在线充值:"Online Recharge",线下转账:"Offline Transfer",充值币种:"Recharge Currency",充值金额:"Recharge Amount",支付平台:"Payment Platform",请选择充值币种:"Please select recharge currency",请输入充值金额:"Please enter recharge amount",请选择支付平台:"Please select payment platform","提交失败,请重试":"Submit failed, please try again","提交中...":"Submitting...",去支付:"Go to Pay",取消:"Cancel",关闭:"Close",第三方支付平台:"Third-party Payment Platform",交易ID:"Transaction ID",请输入转账交易ID:"Please enter transfer transaction ID",上传文件:"Upload Files",请上传转账凭证:"Please upload transfer voucher",离线充值创建成功:"Offline recharge created successfully","加载中...":"Loading...",错误:"Error",成功:"Success",必填:"Required","充值/转账":"Recharge/Transfer",切换为暗黑主题:"Switch to Dark Theme",切换为白色主题:"Switch to Light Theme",点击或拖拽文件到此处上传:"Click or drag files here to upload","支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传":"Supports JPG, PNG, PDF formats, single file not exceeding 20MB, maximum",个文件:"files can be uploaded","正在上传...":"Uploading...",已上传:"Uploaded",移除:"Remove"};function wo(e){return yo[e]||e}function xo(){return JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").locale||Ye.ZH}function
|
|
45
|
+
`,c.onclick=()=>{document.body.removeChild(i)},i.appendChild(c)}document.body.appendChild(i),o!==0&&setTimeout(()=>{document.body.contains(i)&&document.body.removeChild(i)},o||3e3)}success(t){this.show("success",t)}error(t){this.show("error",t)}warning(t){this.show("warning",t)}info(t){this.show("info",t)}}const Me=new so;function ao(e={}){const{baseURL:t="/api",timeout:n=1e4,getLocale:r,onError:o}=e,s=A.create({baseURL:t,timeout:n});return s.interceptors.request.use(i=>{const a=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}"),{token:c}=a;if(i.headers={...i.headers,Authorization:c},r){const u=r();u&&(i.headers={...i.headers,"Accept-Language":u})}return i}),s.interceptors.response.use(i=>{if(i.data&&i.data.code===0)return i.data;const a=i.data?.msg||i.data?.message||"未知错误";return Me.error(a),o&&o(a,i),Promise.reject(i.data||{message:"未知错误"})},i=>{const a=i.response?.data?.msg||i.response?.data?.message||i.message||"网络请求失败";return Me.error(a),o&&o(a,i),Promise.reject(i)}),s}const ae=ao();function lo(){const e=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");return ae.get("/balance",{params:{merchant_id:e.merchantId,biz_type:e.bizType,fund_balance_id:e.fundBalanceId}}).then(t=>{const n=t.data;return{totalAmount:n.total_amount||0,availableAmount:n.available_amount||0,frozenAmount:n.frozen_amount||0}})}const co=async()=>ae.get("/all-dicts",{}).then(e=>(sessionStorage.setItem("all_dicts",JSON.stringify(e.data)),e.data||{})),uo=async(e,t)=>ae.post("/oss/upload",e,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:n=>{if(n.total){const r=Math.round(n.loaded*100/n.total);t&&t(r)}}}).then(n=>n.data?.url||""),fo=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}"),n={merchant_id:Number(t.merchantId),biz_type:t.bizType,source_operator:String(t.userId),transfer_no:e.transferNo,transfer_channel:e.transferChannel,voucher_urls:e.voucherUrls};return ae.post("/offline/recharge/create",n,{})},po=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");console.log(t,"fundUnitParams");const n={merchant_id:Number(t.merchantId),biz_type:t.bizType,source_operator:String(t.userId),amount:e.amount,currency:e.currency,recharge_channel:e.rechargeChannel,return_url:window.location.href};return ae.post("/online/recharge/create",n,{}).then(r=>r.data.redirect_url)};var Ye=(e=>(e.ZH="zh",e.EN="en",e))(Ye||{}),H=(e=>(e.WHITE="white",e.DARK="dark",e))(H||{});function ho(e){co();const{merchant_id:t,biz_type:n,fund_balance_id:r,theme:o=H.WHITE,locale:s=Ye.ZH}=e,i="Bearer "+e.token;return sessionStorage.setItem("fund_unit_params",JSON.stringify({merchantId:t,bizType:n,fundBalanceId:r,token:i,theme:o,locale:s})),{token:i,merchantId:t,bizType:n,fundBalanceId:r,theme:o,locale:s}}const _o={"/api":{target:"https://fund.bestfulfill.tech/api/sdk",changeOrigin:!0,rewrite:e=>e.replace(/^\/api/,""),secure:!1}};function mo({onClick:e,color:t,children:n}){const s=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===H.WHITE?{background:t||"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:"8px 16px",cursor:"pointer",fontSize:16,fontWeight:600}:{background:t||"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:"8px 16px",cursor:"pointer",fontSize:16,fontWeight:600};return _("button",{style:s,onClick:e,type:"button",children:n})}const go={余额详情:"余额详情",真实金额:"真实金额",冻结金额:"冻结金额",总可用:"总可用",暂无数据:"暂无数据","充值 / 转账":"充值 / 转账",在线充值:"在线充值",线下转账:"线下转账",充值币种:"充值币种",充值金额:"充值金额",支付平台:"支付平台",请选择充值币种:"请选择充值币种",请输入充值金额:"请输入充值金额",请选择支付平台:"请选择支付平台","提交失败,请重试":"提交失败,请重试","提交中...":"提交中...",去支付:"去支付",取消:"取消",关闭:"关闭",第三方支付平台:"第三方支付平台",交易ID:"交易ID",请输入转账交易ID:"请输入转账交易ID",上传文件:"上传文件",请上传转账凭证:"请上传转账凭证",离线充值创建成功:"离线充值创建成功","加载中...":"加载中...",错误:"错误",成功:"成功",必填:"必填","充值/转账":"充值/转账",切换为暗黑主题:"切换为暗黑主题",切换为白色主题:"切换为白色主题",点击或拖拽文件到此处上传:"点击或拖拽文件到此处上传","支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传":"支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传",个文件:"个文件","正在上传...":"正在上传...",已上传:"已上传",移除:"移除"};function bo(e){return go[e]||e}const yo={余额详情:"Balance Details",真实金额:"Real Amount",冻结金额:"Frozen Amount",总可用:"Total Available",暂无数据:"No Data","充值 / 转账":"Recharge / Transfer",在线充值:"Online Recharge",线下转账:"Offline Transfer",充值币种:"Recharge Currency",充值金额:"Recharge Amount",支付平台:"Payment Platform",请选择充值币种:"Please select recharge currency",请输入充值金额:"Please enter recharge amount",请选择支付平台:"Please select payment platform","提交失败,请重试":"Submit failed, please try again","提交中...":"Submitting...",去支付:"Go to Pay",取消:"Cancel",关闭:"Close",第三方支付平台:"Third-party Payment Platform",交易ID:"Transaction ID",请输入转账交易ID:"Please enter transfer transaction ID",上传文件:"Upload Files",请上传转账凭证:"Please upload transfer voucher",离线充值创建成功:"Offline recharge created successfully","加载中...":"Loading...",错误:"Error",成功:"Success",必填:"Required","充值/转账":"Recharge/Transfer",切换为暗黑主题:"Switch to Dark Theme",切换为白色主题:"Switch to Light Theme",点击或拖拽文件到此处上传:"Click or drag files here to upload","支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传":"Supports JPG, PNG, PDF formats, single file not exceeding 20MB, maximum",个文件:"files can be uploaded","正在上传...":"Uploading...",已上传:"Uploaded",移除:"Remove"};function wo(e){return yo[e]||e}function xo(){return JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").locale||Ye.ZH}function S(e){return xo()==="zh"?bo(e):wo(e)}const $e=({value:e,onChange:t,options:n,placeholder:r,style:o,error:s,disabled:i,dropdownStyle:a,className:c,dropdownClassName:u,children:f})=>{const[l,h]=U(!1),m=be(null),[p,b]=U(null),w=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===H.WHITE,y=w?{trigger:{background:i?"#f5f5f5":"#fff",color:i?"#bfbfbf":e?"#222":"#bfbfbf",border:s?"1px solid #ff4d4f":i?"1px solid #f0f0f0":"1px solid #d9d9d9"},dropdown:{background:"#fff",border:"1px solid #d9d9d9",color:"#222"},option:(x,R,k)=>({color:R?"#bfbfbf":x?"#1890ff":"#222",background:x?"#e6f7ff":k&&!R||R?"#f5f5f5":"#fff"}),placeholder:{color:"#bfbfbf"}}:{trigger:{background:"#23262F",color:i?"#666":e?"#fff":"#666",border:s?"1px solid #ff4d4f":"1px solid #23262F"},dropdown:{background:"#23262F",border:"1px solid #23262F",color:"#fff"},option:(x,R,k)=>({color:R?"#666":x?"#00E8C6":"#fff",background:x?"#23262F":k&&!R?"#333843":"#23262F"}),placeholder:{color:"#666"}};Qe(()=>{if(!l)return;const x=R=>{m.current&&!m.current.contains(R.target)&&h(!1)};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[l]);const E=n.find(x=>x.value===e);return _("div",{ref:m,className:c,style:{position:"relative",...o},children:[_("style",{children:`
|
|
46
46
|
.custom-select-dropdown {
|
|
47
47
|
scrollbar-width: thin;
|
|
48
48
|
scrollbar-color: #bfbfbf #f5f5f5;
|
|
@@ -57,4 +57,4 @@
|
|
|
57
57
|
.custom-select-dropdown::-webkit-scrollbar-track {
|
|
58
58
|
background: ${w?"#f5f5f5":"#23262F"};
|
|
59
59
|
}
|
|
60
|
-
`}),_("div",{onClick:()=>!i&&h(x=>!x),style:{minHeight:40,borderRadius:6,display:"flex",alignItems:"center",padding:"0 12px",fontSize:15,cursor:i?"not-allowed":"pointer",boxSizing:"border-box",transition:"border 0.2s",opacity:i?.6:1,width:"100%",...y.trigger,...o},tabIndex:0,children:[_("span",{style:{flex:1},children:E?E.label:_("span",{style:y.placeholder,children:r||"请选择"})}),_("span",{style:{marginLeft:8,display:"flex",alignItems:"center"},children:_("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:_("path",{d:"M6 8L10 12L14 8",stroke:"#bfbfbf","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})})})]}),l&&!i&&_("div",{className:`custom-select-dropdown${u?" "+u:""}`,style:{position:"absolute",left:0,right:0,top:44,zIndex:10,borderRadius:6,boxShadow:w?"0 2px 8px rgba(0,0,0,0.08)":"0 2px 8px rgba(0,0,0,0.32)",maxHeight:220,overflowY:"auto",...y.dropdown,...a},children:[n.length===0&&_("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:120,width:"100%",userSelect:"none"},children:[_("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg",children:[_("title",{children:"暂无数据"}),_("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd",children:[_("ellipse",{fill:"#f5f5f5",cx:"32",cy:"33",rx:"32",ry:"7"}),_("g",{fillRule:"nonzero",stroke:"#d9d9d9",children:[_("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),_("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:"#fafafa"})]})]})]}),_("div",{style:{marginTop:8,color:"#bfbfbf",fontSize:15},children:"暂无数据"})]}),n.map((x,R)=>_("div",{onClick:()=>{x.disabled||(h(!1),t?.(x.value))},onMouseEnter:()=>b(R),onMouseLeave:()=>b(null),style:{padding:"10px 16px",cursor:x.disabled?"not-allowed":"pointer",fontWeight:e===x.value?600:400,opacity:x.disabled?.6:1,...y.option(e===x.value,!!x.disabled,p===R)},children:x.label},x.value))]}),f]})},Eo=({formState:e,setFormState:t,onClose:n,loading:r})=>{const o=JSON.parse(sessionStorage.getItem("all_dicts")||"{}"),s=o?.currency||[],i=o?.channel?.filter(h=>h.payment_support)||[],c=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===H.WHITE,u=c?{label:{marginBottom:8,fontSize:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}}:{label:{marginBottom:8,fontSize:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #23262F",background:"#23262F",color:"#fff",fontSize:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}},f=c?{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"}:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"},l=c?{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600}:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600};return _(Z,{children:[_("div",{style:{marginBottom:18},children:[_("div",{style:u.label,children:[_("span",{style:{color:"#F53F3F"},children:"*"})," ",v("充值币种")]}),_($e,{value:e.currency,onChange:h=>{t(m=>({...m,currency:h}))},options:s?.map(h=>({value:h.value,label:h.label})),placeholder:v("请选择充值币种")})]}),_("div",{style:{marginBottom:18},children:[_("div",{style:u.label,children:[_("span",{style:{color:"#F53F3F"},children:"*"})," ",v("充值金额")]}),_("input",{type:"text",placeholder:v("请输入充值金额"),value:e.amount,onInput:h=>{const m=h.target.value;t(p=>({...p,amount:m,amountError:m.trim()?"":p.amountError}))},style:{...u.input,...e.amountError?u.inputError:{}}}),e.amountError&&_("div",{style:u.error,children:e.amountError})]}),_("div",{style:{marginBottom:24},children:[_("div",{style:u.label,children:[_("span",{style:{color:"#F53F3F"},children:"*"})," ",v("支付平台")]}),_($e,{value:e.rechargeChannel,onChange:h=>{t(m=>({...m,rechargeChannel:h,rechargeChannelError:h?"":m.rechargeChannelError}))},options:i?.map(h=>({value:h.value,label:h.label})),placeholder:v("请选择支付平台")}),e.rechargeChannelError&&_("div",{style:u.error,children:e.rechargeChannelError})]}),e.error&&_("div",{style:{color:"#ff4d4f",marginBottom:12},children:e.error}),_("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[_("button",{type:"button",onClick:n,style:f,children:v("取消")}),_("button",{type:"submit",disabled:r,style:l,children:v(r?"提交中...":"去支付")})]})]})},So={white:{container:{border:"1px dashed #E5E6EB",borderRadius:8,background:"#FCFCFD",padding:24,textAlign:"center",cursor:"pointer",minHeight:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:15},fileItem:{display:"flex",alignItems:"center",background:"#F7F8FA",borderRadius:8,padding:"12px 16px",marginBottom:8,fontSize:15,color:"#222",justifyContent:"space-between"},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:"4px 14px",fontSize:15,marginLeft:16,cursor:"pointer"}},dark:{container:{border:"1.5px dashed #444C5C",borderRadius:8,background:"#181A20",padding:24,textAlign:"center",cursor:"pointer",minHeight:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:15},fileItem:{display:"flex",alignItems:"center",background:"#23262F",borderRadius:8,padding:"12px 16px",marginBottom:8,fontSize:15,color:"#fff",justifyContent:"space-between"},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:"4px 14px",fontSize:15,marginLeft:16,cursor:"pointer"}}},vo=({value:e=[],onChange:t,maxCount:n=10,accept:r=".jpg,.jpeg,.png,.pdf",multiple:o=!0,disabled:s=!1})=>{const i=be(null),[a,c]=U(!1),[u,f]=U(0),m=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===H.WHITE?"white":"dark",p=So[m],b=async w=>{const y=Array.from(w.target.files).slice(0,n);if(!y.length)return;c(!0);const E=[];for(let x=0;x<y.length;x++){f(0);const R=new FormData;R.append("file",y[x]);try{const k=await uo(R,N=>f(N));k&&E.push(k)}catch{}}c(!1),f(0),t?.([...e,...E]),i.current&&(i.current.value="")},g=w=>{const y=e.filter((E,x)=>x!==w);t?.(y)};return _("div",{children:[_("div",{style:{...p.container,cursor:s?"not-allowed":p.container.cursor,opacity:s?.6:1},onClick:()=>!s&&i.current?.click(),children:[_("div",{style:{fontSize:48,marginBottom:12},children:"📁"}),_("div",{style:{color:"#222",fontSize:15,marginBottom:4},children:v("点击或拖拽文件到此处上传")}),_("div",{style:{color:"#999",fontSize:13},children:[v("支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传")," ",n," ",v("个文件")]}),_("input",{ref:i,type:"file",multiple:o,accept:r,style:{display:"none"},onChange:b,disabled:s}),a&&_("div",{style:{marginTop:12,color:"#1677ff"},children:[v("正在上传...")," ",u,"%"]})]}),e&&e.length>0&&_("div",{style:{marginTop:12},children:e.map((w,y)=>_("div",{style:p.fileItem,children:[_("div",{style:{display:"flex",alignItems:"center",flex:1},children:[_("span",{style:{fontWeight:500,wordBreak:"break-all"},children:w.split("/").pop()}),_("span",{style:{color:"#8C8F93",fontSize:13,marginLeft:8},children:["[",v("已上传"),"]"]})]}),_("button",{type:"button",onClick:E=>{E.stopPropagation(),g(y)},style:p.removeBtn,disabled:s,children:v("移除")})]},w))})]})},Ro=({formState:e,setFormState:t,onClose:n,loading:r})=>{const o=JSON.parse(sessionStorage.getItem("all_dicts")||"{}");console.log(o,"allDicts");const s=o?.channel||[],c=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===H.WHITE?{label:{marginBottom:8,fontSize:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},buttonCancel:{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"},buttonSubmit:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}}:{label:{marginBottom:8,fontSize:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #23262F",background:"#23262F",color:"#fff",fontSize:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},buttonCancel:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"},buttonSubmit:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}};return _("form",{onSubmit:async f=>{f.preventDefault();let l=!0;t(h=>({...h,platformError:"",transactionIdError:"",filesError:""})),e.platform||(t(h=>({...h,platformError:v("请选择支付平台")})),l=!1),e.transactionId.trim()||(t(h=>({...h,transactionIdError:v("请输入转账交易ID")})),l=!1),(!e.files||e.files.length===0)&&(t(h=>({...h,filesError:v("请上传转账凭证")})),l=!1),l&&(await fo({transferChannel:e.platform,transferNo:e.transactionId,voucherUrls:e.files}),n(),Me.success(v("离线充值创建成功")))},children:[_("div",{style:{marginBottom:18},children:[_("div",{style:c.label,children:[_("span",{style:{color:"#F53F3F"},children:"*"})," ",v("第三方支付平台")]}),_($e,{value:e.platform,onChange:f=>{t(l=>({...l,platform:f,platformError:f?"":l.platformError}))},options:[...s?.map(f=>({value:f.value,label:f.label}))],placeholder:v("请选择支付平台")}),e.platformError&&_("div",{style:c.error,children:e.platformError})]}),_("div",{style:{marginBottom:18},children:[_("div",{style:c.label,children:[_("span",{style:{color:"#F53F3F"},children:"*"})," ",v("交易ID")]}),_("input",{type:"text",placeholder:v("请输入转账交易ID"),value:e.transactionId,onInput:f=>{const l=f.target.value;t(h=>({...h,transactionId:l,transactionIdError:l?"":h.transactionIdError}))},style:{...c.input,...e.transactionIdError?c.inputError:{}}}),e.transactionIdError&&_("div",{style:c.error,children:e.transactionIdError})]}),_("div",{style:{marginBottom:24},children:[_("div",{style:c.label,children:[_("span",{style:{color:"#F53F3F"},children:"*"})," ",v("上传文件")]}),_(vo,{value:e.files,onChange:f=>t(l=>({...l,files:f,filesError:""})),maxCount:10,accept:".jpg,.jpeg,.png,.pdf",multiple:!0}),e.filesError&&_("div",{style:c.error,children:e.filesError})]}),_("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[_("button",{type:"button",onClick:n,style:c.buttonCancel,children:v("取消")}),_("button",{type:"submit",disabled:r,style:c.buttonSubmit,children:v("去支付")})]})]})};function To({visible:e,onClose:t,onSubmit:n}){const[r,o]=U({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),[s,i]=U("online"),[a,c]=U({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1});if(Qe(()=>{e||(i("online"),o({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),c({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1}))},[e]),!e)return null;const u=async p=>{p.preventDefault();let b=!0;if(o(g=>({...g,amountError:"",rechargeChannelError:""})),r.amount.trim()||(o(g=>({...g,amountError:v("请输入充值金额")})),b=!1),r.rechargeChannel||(o(g=>({...g,rechargeChannelError:v("请选择支付平台")})),b=!1),!!b){o(g=>({...g,loading:!0,error:""}));try{await n({amount:r.amount,rechargeChannel:r.rechargeChannel,currency:r.currency}),t()}catch{o(g=>({...g,error:v("提交失败,请重试")}))}finally{o(g=>({...g,loading:!1}))}}},f=p=>{p.target===p.currentTarget&&t()},m=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===H.WHITE?{modalBg:"#fff",modalColor:"#222",modalBoxShadow:"0 4px 24px rgba(0,0,0,0.08)",mask:"rgba(0,0,0,0.3)",title:{fontWeight:600,fontSize:20,marginBottom:24,textAlign:"left",color:"#222"},closeBtn:{position:"absolute",right:16,top:16,background:"none",border:"none",color:"#222",fontSize:22,cursor:"pointer",lineHeight:1},tabBtn:(p,b)=>({flex:1,background:p?"#fff":"#F7F8FA",color:p?"#1890ff":"#222",border:"none",borderRadius:b?"8px 0 0 8px":"0 8px 8px 0",fontWeight:p?600:400,fontSize:16,height:48,boxShadow:p?"0 2px 8px 0 rgba(20,20,20,0.04)":"none",outline:"none",cursor:"pointer",borderRight:b?"1px solid #F0F1F3":void 0,borderLeft:b?void 0:"1px solid #F0F1F3",transition:"all 0.2s"})}:{modalBg:"#181A20",modalColor:"#fff",modalBoxShadow:"0 4px 24px rgba(0,0,0,0.5)",mask:"rgba(0,0,0,0.7)",title:{fontWeight:600,fontSize:20,marginBottom:24,textAlign:"left",color:"#fff"},closeBtn:{position:"absolute",right:16,top:16,background:"none",border:"none",color:"#fff",fontSize:22,cursor:"pointer",lineHeight:1},tabBtn:(p,b)=>({flex:1,background:p?"#23262F":"#181A20",color:p?"#00E8C6":"#fff",border:"none",borderRadius:b?"8px 0 0 8px":"0 8px 8px 0",fontWeight:p?600:400,fontSize:16,height:48,boxShadow:p?"0 2px 8px 0 rgba(20,20,20,0.10)":"none",outline:"none",cursor:"pointer",borderRight:b?"1px solid #23262F":void 0,borderLeft:b?void 0:"1px solid #23262F",transition:"all 0.2s"})};return _("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:m.mask,display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999},onClick:f,children:_("form",{onSubmit:u,style:{background:m.modalBg,padding:32,borderRadius:12,minWidth:400,maxWidth:400,color:m.modalColor,boxShadow:m.modalBoxShadow,position:"relative"},onClick:p=>p.stopPropagation(),children:[_("button",{type:"button",onClick:t,style:m.closeBtn,"aria-label":v("关闭"),children:"×"}),_("div",{style:m.title,children:v("充值 / 转账")}),_("div",{style:{display:"flex",marginBottom:28},children:[_("button",{type:"button",onClick:()=>i("online"),style:m.tabBtn(s==="online",!0),children:v("在线充值")}),_("button",{type:"button",onClick:()=>i("offline"),style:m.tabBtn(s==="offline",!1),children:v("线下转账")})]}),s==="online"?_(Eo,{formState:r,setFormState:o,onClose:t,loading:r.loading}):_(Ro,{formState:a,setFormState:c,onClose:t,loading:a.loading})]})})}function et(){return(et=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var ko=["context","children"];function Co(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(r,o){if(r==null)return{};var s,i,a={},c=Object.keys(r);for(i=0;i<c.length;i++)o.indexOf(s=c[i])>=0||(a[s]=r[s]);return a}(e,ko);return dn(t,n)}function Ao(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=V(Co,et({},this._props,{context:e.detail.context}),function t(n,r){if(n.nodeType===3)return n.data;if(n.nodeType!==1)return null;var o=[],s={},i=0,a=n.attributes,c=n.childNodes;for(i=a.length;i--;)a[i].name!=="slot"&&(s[a[i].name]=a[i].value,s[mn(a[i].name)]=a[i].value);for(i=c.length;i--;){var u=t(c[i],null),f=c[i].slot;f?s[f]=V(Tt,{name:f},u):o[i]=u}var l=r?V(Tt,null,o):o;return V(r||n.nodeName.toLowerCase(),s,l)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?fn:ke)(this._vdom,this._root)}function mn(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function Oo(e,t,n){if(this._vdom){var r={};r[e]=n=n??void 0,r[mn(e)]=n,this._vdom=dn(this._vdom,r),ke(this._vdom,this._root)}}function Fo(){ke(this._vdom=null,this._root)}function Tt(e,t){var n=this;return V("slot",et({},e,{ref:function(r){r?(n.ref=r,n._listener||(n._listener=function(o){o.stopPropagation(),o.detail.context=t},r.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}function gn(e,t,n,r){function o(){var s=Reflect.construct(HTMLElement,[],o);return s._vdomComponent=e,s._root=r&&r.shadow?s.attachShadow({mode:r.mode||"open"}):s,s}return(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=Ao,o.prototype.attributeChangedCallback=Oo,o.prototype.disconnectedCallback=Fo,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=n,n.forEach(function(s){Object.defineProperty(o.prototype,s,{get:function(){return this._vdom.props[s]},set:function(i){this._vdom?this.attributeChangedCallback(s,null,i):(this._props||(this._props={}),this._props[s]=i,this.connectedCallback());var a=typeof i;i!=null&&a!=="string"&&a!=="boolean"&&a!=="number"||this.setAttribute(s,i)}})}),customElements.define(t||e.tagName||e.displayName||e.name,o)}function Po(){const[e,t]=U(!1),n=async r=>{const o=await po({amount:r.amount,currency:r.currency,rechargeChannel:r.rechargeChannel});window.open(o,"_blank")};return _("div",{children:[_(mo,{onClick:()=>t(!0),children:v("充值/转账")}),_(To,{visible:e,onClose:()=>t(!1),onSubmit:n})]})}gn(Po,"best-recharge",["theme"],{shadow:!1});const Bo=({popover:e,children:t,popoverWidth:n=300,popoverMinWidth:r=200,offsetY:o=16,offsetX:s=16,popoverPosition:i="top"})=>{const[a,c]=U(!1),[u,f]=U(i),l=be(null),h=be(null),m=()=>{if(h.current&&(clearTimeout(h.current),h.current=null),i==="top"||i==="bottom")if(l.current){const R=l.current.getBoundingClientRect();i==="top"&&R.top<100?f("bottom"):i==="bottom"&&window.innerHeight-R.bottom<100?f("top"):f(i)}else f(i);else f(i);c(!0)},p=()=>{h.current=window.setTimeout(()=>{c(!1)},120)},b={white:{popover:{background:"#fff",color:"#222",boxShadow:"0 4px 16px rgba(0,0,0,0.12)",border:"none"},arrow:{top:"#fff",bottom:"#fff",left:"#fff",right:"#fff"}},dark:{popover:{background:"#23262F",color:"#fff",boxShadow:"0 4px 16px rgba(0,0,0,0.32)",border:"1px solid #444C5C"},arrow:{top:"#23262F",bottom:"#23262F",left:"#23262F",right:"#23262F"}}},w=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===H.WHITE,y=b[w?"white":"dark"];let E={position:"absolute",zIndex:999,borderRadius:6,fontSize:15,minWidth:r,width:n,padding:"8px 14px",pointerEvents:"auto",textAlign:"center",animation:"fadeInUp 0.3s",...y.popover},x={position:"absolute",zIndex:11,width:0,height:0};return u==="top"?(E={...E,left:"50%",top:-48,transform:"translateX(-50%)"},x={...x,left:"50%",bottom:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderTop:`8px solid ${y.arrow.top}`}):u==="bottom"?(E={...E,left:"50%",top:"100%",marginTop:o,transform:"translateX(-50%)"},x={...x,left:"50%",top:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderBottom:`8px solid ${y.arrow.bottom}`}):u==="leftTop"?(E={...E,right:"100%",top:0,marginRight:s,transform:"none"},x={...x,right:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderLeft:`8px solid ${y.arrow.left}`}):u==="rightTop"&&(E={...E,left:"100%",top:0,marginLeft:s,transform:"translateY(0)"},x={...x,left:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderRight:`8px solid ${y.arrow.right}`}),_("div",{ref:l,style:{position:"relative",display:"inline-block"},onMouseEnter:m,onMouseLeave:p,children:[t,a&&_("div",{style:E,onMouseEnter:m,onMouseLeave:p,children:[e,_("div",{style:x})]})]})};function kt(e){return e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}const No={white:{popoverTitle:{fontSize:16,fontWeight:600,color:"#222",marginBottom:16,textAlign:"center"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"8px 0",borderBottom:"1px solid #e5e7eb",fontSize:15},detailLabel:{display:"flex",alignItems:"center",color:"#6b7280",fontWeight:500},detailDot:e=>({display:"inline-block",width:8,height:8,borderRadius:"50%",background:e,marginRight:8}),detailValue:e=>({color:e,fontWeight:600,fontSize:15}),main:{fontSize:24,fontWeight:800,color:"#111827",display:"inline-block"},currency:{fontSize:18,color:"#6b7280",marginLeft:8,fontWeight:600}},dark:{popoverTitle:{fontSize:16,fontWeight:600,color:"#fff",marginBottom:16,textAlign:"center"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"8px 0",borderBottom:"1px solid #23262F",fontSize:15},detailLabel:{display:"flex",alignItems:"center",color:"#B5B8BE",fontWeight:500},detailDot:e=>({display:"inline-block",width:8,height:8,borderRadius:"50%",background:e,marginRight:8}),detailValue:e=>({color:e,fontWeight:600,fontSize:15}),main:{fontSize:24,fontWeight:800,color:"#fff",display:"inline-block"},currency:{fontSize:18,color:"#B5B8BE",marginLeft:8,fontWeight:600}}};function Uo(e){const[t,n]=U({available:0,currency:"USD",symbol:"$",details:[{label:v("真实金额"),value:0,color:"#15b36b",dot:"#15b36b"},{label:v("冻结金额"),value:0,color:"#f59e0b",dot:"#f59e0b"},{label:v("总可用"),value:0,color:"#1890ff",dot:"#15b36b"}]});Qe(()=>{(async()=>{try{const a=await lo(),c={available:a.availableAmount,currency:"USD",symbol:"$",details:[{label:v("真实金额"),value:a.totalAmount,color:"#15b36b",dot:"#15b36b"},{label:v("冻结金额"),value:a.frozenAmount,color:"#f59e0b",dot:"#f59e0b"},{label:v("总可用"),value:a.availableAmount,color:"#1890ff",dot:"#15b36b"}]};n(c)}catch(a){console.error("获取余额失败:",a)}})()},[]);const o=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===H.WHITE,s=No[o?"white":"dark"];return _(Bo,{popover:_(Z,{children:[_("div",{style:s.popoverTitle,children:v("余额详情")}),t.details.map(i=>_("div",{style:s.detailRow,children:[_("span",{style:s.detailLabel,children:[_("span",{style:s.detailDot(i.dot)}),i.label]}),_("span",{style:s.detailValue(i.color),children:[t.symbol,kt(i.value)]})]},i.label))]}),popoverPosition:e.popoverPosition||"bottom",children:_("div",{style:s.main,children:[t.symbol,kt(t.available),_("span",{style:s.currency,children:t.currency})]})})}gn(Uo,"best-statistical-balance");const Io=["best-recharge","best-statistical-balance"];exports.components=Io;exports.initFundUnit=ho;exports.npmTest=bn;exports.printCurrentTime=yn;exports.viteProxy=_o;
|
|
60
|
+
`}),_("div",{onClick:()=>!i&&h(x=>!x),style:{minHeight:40,borderRadius:6,display:"flex",alignItems:"center",padding:"0 12px",fontSize:15,cursor:i?"not-allowed":"pointer",boxSizing:"border-box",transition:"border 0.2s",opacity:i?.6:1,width:"100%",...y.trigger,...o},tabIndex:0,children:[_("span",{style:{flex:1},children:E?E.label:_("span",{style:y.placeholder,children:r||"请选择"})}),_("span",{style:{marginLeft:8,display:"flex",alignItems:"center"},children:_("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:_("path",{d:"M6 8L10 12L14 8",stroke:"#bfbfbf","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})})})]}),l&&!i&&_("div",{className:`custom-select-dropdown${u?" "+u:""}`,style:{position:"absolute",left:0,right:0,top:44,zIndex:10,borderRadius:6,boxShadow:w?"0 2px 8px rgba(0,0,0,0.08)":"0 2px 8px rgba(0,0,0,0.32)",maxHeight:220,overflowY:"auto",...y.dropdown,...a},children:[n.length===0&&_("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:120,width:"100%",userSelect:"none"},children:[_("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg",children:[_("title",{children:S("暂无数据")}),_("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd",children:[_("ellipse",{fill:"#f5f5f5",cx:"32",cy:"33",rx:"32",ry:"7"}),_("g",{fillRule:"nonzero",stroke:"#d9d9d9",children:[_("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),_("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:"#fafafa"})]})]})]}),_("div",{style:{marginTop:8,color:"#bfbfbf",fontSize:15},children:S("暂无数据")})]}),n.map((x,R)=>_("div",{onClick:()=>{x.disabled||(h(!1),t?.(x.value))},onMouseEnter:()=>b(R),onMouseLeave:()=>b(null),style:{padding:"10px 16px",cursor:x.disabled?"not-allowed":"pointer",fontWeight:e===x.value?600:400,opacity:x.disabled?.6:1,...y.option(e===x.value,!!x.disabled,p===R)},children:x.label},x.value))]}),f]})},Eo=({formState:e,setFormState:t,onClose:n,loading:r})=>{const o=JSON.parse(sessionStorage.getItem("all_dicts")||"{}"),s=o?.currency||[],i=o?.channel?.filter(h=>h.payment_support)||[],c=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===H.WHITE,u=c?{label:{marginBottom:8,fontSize:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}}:{label:{marginBottom:8,fontSize:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #23262F",background:"#23262F",color:"#fff",fontSize:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}},f=c?{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"}:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"},l=c?{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600}:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600};return _(Z,{children:[_("div",{style:{marginBottom:18},children:[_("div",{style:u.label,children:[_("span",{style:{color:"#F53F3F"},children:"*"})," ",S("充值币种")]}),_($e,{value:e.currency,onChange:h=>{t(m=>({...m,currency:h}))},options:s?.map(h=>({value:h.value,label:h.label})),placeholder:S("请选择充值币种")})]}),_("div",{style:{marginBottom:18},children:[_("div",{style:u.label,children:[_("span",{style:{color:"#F53F3F"},children:"*"})," ",S("充值金额")]}),_("input",{type:"text",placeholder:S("请输入充值金额"),value:e.amount,onInput:h=>{const m=h.target.value;t(p=>({...p,amount:m,amountError:m.trim()?"":p.amountError}))},style:{...u.input,...e.amountError?u.inputError:{}}}),e.amountError&&_("div",{style:u.error,children:e.amountError})]}),_("div",{style:{marginBottom:24},children:[_("div",{style:u.label,children:[_("span",{style:{color:"#F53F3F"},children:"*"})," ",S("支付平台")]}),_($e,{value:e.rechargeChannel,onChange:h=>{t(m=>({...m,rechargeChannel:h,rechargeChannelError:h?"":m.rechargeChannelError}))},options:i?.map(h=>({value:h.value,label:h.label})),placeholder:S("请选择支付平台")}),e.rechargeChannelError&&_("div",{style:u.error,children:e.rechargeChannelError})]}),e.error&&_("div",{style:{color:"#ff4d4f",marginBottom:12},children:e.error}),_("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[_("button",{type:"button",onClick:n,style:f,children:S("取消")}),_("button",{type:"submit",disabled:r,style:l,children:S(r?"提交中...":"去支付")})]})]})},So={white:{container:{border:"1px dashed #E5E6EB",borderRadius:8,background:"#FCFCFD",padding:24,textAlign:"center",cursor:"pointer",minHeight:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:15},fileItem:{display:"flex",alignItems:"center",background:"#F7F8FA",borderRadius:8,padding:"12px 16px",marginBottom:8,fontSize:15,color:"#222",justifyContent:"space-between"},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:"4px 14px",fontSize:15,marginLeft:16,cursor:"pointer"}},dark:{container:{border:"1.5px dashed #444C5C",borderRadius:8,background:"#181A20",padding:24,textAlign:"center",cursor:"pointer",minHeight:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:15},fileItem:{display:"flex",alignItems:"center",background:"#23262F",borderRadius:8,padding:"12px 16px",marginBottom:8,fontSize:15,color:"#fff",justifyContent:"space-between"},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:"4px 14px",fontSize:15,marginLeft:16,cursor:"pointer"}}},vo=({value:e=[],onChange:t,maxCount:n=10,accept:r=".jpg,.jpeg,.png,.pdf",multiple:o=!0,disabled:s=!1})=>{const i=be(null),[a,c]=U(!1),[u,f]=U(0),m=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===H.WHITE?"white":"dark",p=So[m],b=async w=>{const y=Array.from(w.target.files).slice(0,n);if(!y.length)return;c(!0);const E=[];for(let x=0;x<y.length;x++){f(0);const R=new FormData;R.append("file",y[x]);try{const k=await uo(R,N=>f(N));k&&E.push(k)}catch{}}c(!1),f(0),t?.([...e,...E]),i.current&&(i.current.value="")},g=w=>{const y=e.filter((E,x)=>x!==w);t?.(y)};return _("div",{children:[_("div",{style:{...p.container,cursor:s?"not-allowed":p.container.cursor,opacity:s?.6:1},onClick:()=>!s&&i.current?.click(),children:[_("div",{style:{fontSize:48,marginBottom:12},children:"📁"}),_("div",{style:{color:"#222",fontSize:15,marginBottom:4},children:S("点击或拖拽文件到此处上传")}),_("div",{style:{color:"#999",fontSize:13},children:[S("支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传")," ",n," ",S("个文件")]}),_("input",{ref:i,type:"file",multiple:o,accept:r,style:{display:"none"},onChange:b,disabled:s}),a&&_("div",{style:{marginTop:12,color:"#1677ff"},children:[S("正在上传...")," ",u,"%"]})]}),e&&e.length>0&&_("div",{style:{marginTop:12},children:e.map((w,y)=>_("div",{style:p.fileItem,children:[_("div",{style:{display:"flex",alignItems:"center",flex:1},children:[_("span",{style:{fontWeight:500,wordBreak:"break-all"},children:w.split("/").pop()}),_("span",{style:{color:"#8C8F93",fontSize:13,marginLeft:8},children:["[",S("已上传"),"]"]})]}),_("button",{type:"button",onClick:E=>{E.stopPropagation(),g(y)},style:p.removeBtn,disabled:s,children:S("移除")})]},w))})]})},Ro=({formState:e,setFormState:t,onClose:n,loading:r})=>{const o=JSON.parse(sessionStorage.getItem("all_dicts")||"{}");console.log(o,"allDicts");const s=o?.channel||[],c=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===H.WHITE?{label:{marginBottom:8,fontSize:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},buttonCancel:{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"},buttonSubmit:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}}:{label:{marginBottom:8,fontSize:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #23262F",background:"#23262F",color:"#fff",fontSize:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},buttonCancel:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"},buttonSubmit:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}};return _("form",{onSubmit:async f=>{f.preventDefault();let l=!0;t(h=>({...h,platformError:"",transactionIdError:"",filesError:""})),e.platform||(t(h=>({...h,platformError:S("请选择支付平台")})),l=!1),e.transactionId.trim()||(t(h=>({...h,transactionIdError:S("请输入转账交易ID")})),l=!1),(!e.files||e.files.length===0)&&(t(h=>({...h,filesError:S("请上传转账凭证")})),l=!1),l&&(await fo({transferChannel:e.platform,transferNo:e.transactionId,voucherUrls:e.files}),n(),Me.success(S("离线充值创建成功")))},children:[_("div",{style:{marginBottom:18},children:[_("div",{style:c.label,children:[_("span",{style:{color:"#F53F3F"},children:"*"})," ",S("第三方支付平台")]}),_($e,{value:e.platform,onChange:f=>{t(l=>({...l,platform:f,platformError:f?"":l.platformError}))},options:[...s?.map(f=>({value:f.value,label:f.label}))],placeholder:S("请选择支付平台")}),e.platformError&&_("div",{style:c.error,children:e.platformError})]}),_("div",{style:{marginBottom:18},children:[_("div",{style:c.label,children:[_("span",{style:{color:"#F53F3F"},children:"*"})," ",S("交易ID")]}),_("input",{type:"text",placeholder:S("请输入转账交易ID"),value:e.transactionId,onInput:f=>{const l=f.target.value;t(h=>({...h,transactionId:l,transactionIdError:l?"":h.transactionIdError}))},style:{...c.input,...e.transactionIdError?c.inputError:{}}}),e.transactionIdError&&_("div",{style:c.error,children:e.transactionIdError})]}),_("div",{style:{marginBottom:24},children:[_("div",{style:c.label,children:[_("span",{style:{color:"#F53F3F"},children:"*"})," ",S("上传文件")]}),_(vo,{value:e.files,onChange:f=>t(l=>({...l,files:f,filesError:""})),maxCount:10,accept:".jpg,.jpeg,.png,.pdf",multiple:!0}),e.filesError&&_("div",{style:c.error,children:e.filesError})]}),_("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[_("button",{type:"button",onClick:n,style:c.buttonCancel,children:S("取消")}),_("button",{type:"submit",disabled:r,style:c.buttonSubmit,children:S("去支付")})]})]})};function To({visible:e,onClose:t,onSubmit:n}){const[r,o]=U({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),[s,i]=U("online"),[a,c]=U({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1});if(Qe(()=>{e||(i("online"),o({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),c({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1}))},[e]),!e)return null;const u=async p=>{p.preventDefault();let b=!0;if(o(g=>({...g,amountError:"",rechargeChannelError:""})),r.amount.trim()||(o(g=>({...g,amountError:S("请输入充值金额")})),b=!1),r.rechargeChannel||(o(g=>({...g,rechargeChannelError:S("请选择支付平台")})),b=!1),!!b){o(g=>({...g,loading:!0,error:""}));try{await n({amount:r.amount,rechargeChannel:r.rechargeChannel,currency:r.currency}),t()}catch{o(g=>({...g,error:S("提交失败,请重试")}))}finally{o(g=>({...g,loading:!1}))}}},f=p=>{p.target===p.currentTarget&&t()},m=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===H.WHITE?{modalBg:"#fff",modalColor:"#222",modalBoxShadow:"0 4px 24px rgba(0,0,0,0.08)",mask:"rgba(0,0,0,0.3)",title:{fontWeight:600,fontSize:20,marginBottom:24,textAlign:"left",color:"#222"},closeBtn:{position:"absolute",right:16,top:16,background:"none",border:"none",color:"#222",fontSize:22,cursor:"pointer",lineHeight:1},tabBtn:(p,b)=>({flex:1,background:p?"#fff":"#F7F8FA",color:p?"#1890ff":"#222",border:"none",borderRadius:b?"8px 0 0 8px":"0 8px 8px 0",fontWeight:p?600:400,fontSize:16,height:48,boxShadow:p?"0 2px 8px 0 rgba(20,20,20,0.04)":"none",outline:"none",cursor:"pointer",borderRight:b?"1px solid #F0F1F3":void 0,borderLeft:b?void 0:"1px solid #F0F1F3",transition:"all 0.2s"})}:{modalBg:"#181A20",modalColor:"#fff",modalBoxShadow:"0 4px 24px rgba(0,0,0,0.5)",mask:"rgba(0,0,0,0.7)",title:{fontWeight:600,fontSize:20,marginBottom:24,textAlign:"left",color:"#fff"},closeBtn:{position:"absolute",right:16,top:16,background:"none",border:"none",color:"#fff",fontSize:22,cursor:"pointer",lineHeight:1},tabBtn:(p,b)=>({flex:1,background:p?"#23262F":"#181A20",color:p?"#00E8C6":"#fff",border:"none",borderRadius:b?"8px 0 0 8px":"0 8px 8px 0",fontWeight:p?600:400,fontSize:16,height:48,boxShadow:p?"0 2px 8px 0 rgba(20,20,20,0.10)":"none",outline:"none",cursor:"pointer",borderRight:b?"1px solid #23262F":void 0,borderLeft:b?void 0:"1px solid #23262F",transition:"all 0.2s"})};return _("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:m.mask,display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999},onClick:f,children:_("form",{onSubmit:u,style:{background:m.modalBg,padding:32,borderRadius:12,minWidth:400,maxWidth:400,color:m.modalColor,boxShadow:m.modalBoxShadow,position:"relative"},onClick:p=>p.stopPropagation(),children:[_("button",{type:"button",onClick:t,style:m.closeBtn,"aria-label":S("关闭"),children:"×"}),_("div",{style:m.title,children:S("充值 / 转账")}),_("div",{style:{display:"flex",marginBottom:28},children:[_("button",{type:"button",onClick:()=>i("online"),style:m.tabBtn(s==="online",!0),children:S("在线充值")}),_("button",{type:"button",onClick:()=>i("offline"),style:m.tabBtn(s==="offline",!1),children:S("线下转账")})]}),s==="online"?_(Eo,{formState:r,setFormState:o,onClose:t,loading:r.loading}):_(Ro,{formState:a,setFormState:c,onClose:t,loading:a.loading})]})})}function et(){return(et=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var ko=["context","children"];function Co(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(r,o){if(r==null)return{};var s,i,a={},c=Object.keys(r);for(i=0;i<c.length;i++)o.indexOf(s=c[i])>=0||(a[s]=r[s]);return a}(e,ko);return dn(t,n)}function Ao(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=V(Co,et({},this._props,{context:e.detail.context}),function t(n,r){if(n.nodeType===3)return n.data;if(n.nodeType!==1)return null;var o=[],s={},i=0,a=n.attributes,c=n.childNodes;for(i=a.length;i--;)a[i].name!=="slot"&&(s[a[i].name]=a[i].value,s[mn(a[i].name)]=a[i].value);for(i=c.length;i--;){var u=t(c[i],null),f=c[i].slot;f?s[f]=V(Tt,{name:f},u):o[i]=u}var l=r?V(Tt,null,o):o;return V(r||n.nodeName.toLowerCase(),s,l)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?fn:ke)(this._vdom,this._root)}function mn(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function Oo(e,t,n){if(this._vdom){var r={};r[e]=n=n??void 0,r[mn(e)]=n,this._vdom=dn(this._vdom,r),ke(this._vdom,this._root)}}function Fo(){ke(this._vdom=null,this._root)}function Tt(e,t){var n=this;return V("slot",et({},e,{ref:function(r){r?(n.ref=r,n._listener||(n._listener=function(o){o.stopPropagation(),o.detail.context=t},r.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}function gn(e,t,n,r){function o(){var s=Reflect.construct(HTMLElement,[],o);return s._vdomComponent=e,s._root=r&&r.shadow?s.attachShadow({mode:r.mode||"open"}):s,s}return(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=Ao,o.prototype.attributeChangedCallback=Oo,o.prototype.disconnectedCallback=Fo,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=n,n.forEach(function(s){Object.defineProperty(o.prototype,s,{get:function(){return this._vdom.props[s]},set:function(i){this._vdom?this.attributeChangedCallback(s,null,i):(this._props||(this._props={}),this._props[s]=i,this.connectedCallback());var a=typeof i;i!=null&&a!=="string"&&a!=="boolean"&&a!=="number"||this.setAttribute(s,i)}})}),customElements.define(t||e.tagName||e.displayName||e.name,o)}function Po(){const[e,t]=U(!1),n=async r=>{const o=await po({amount:r.amount,currency:r.currency,rechargeChannel:r.rechargeChannel});window.open(o,"_blank")};return _("div",{children:[_(mo,{onClick:()=>t(!0),children:S("充值/转账")}),_(To,{visible:e,onClose:()=>t(!1),onSubmit:n})]})}gn(Po,"best-recharge",["theme"],{shadow:!1});const Bo=({popover:e,children:t,popoverWidth:n=300,popoverMinWidth:r=200,offsetY:o=16,offsetX:s=16,popoverPosition:i="top"})=>{const[a,c]=U(!1),[u,f]=U(i),l=be(null),h=be(null),m=()=>{if(h.current&&(clearTimeout(h.current),h.current=null),i==="top"||i==="bottom")if(l.current){const R=l.current.getBoundingClientRect();i==="top"&&R.top<100?f("bottom"):i==="bottom"&&window.innerHeight-R.bottom<100?f("top"):f(i)}else f(i);else f(i);c(!0)},p=()=>{h.current=window.setTimeout(()=>{c(!1)},120)},b={white:{popover:{background:"#fff",color:"#222",boxShadow:"0 4px 16px rgba(0,0,0,0.12)",border:"none"},arrow:{top:"#fff",bottom:"#fff",left:"#fff",right:"#fff"}},dark:{popover:{background:"#23262F",color:"#fff",boxShadow:"0 4px 16px rgba(0,0,0,0.32)",border:"1px solid #444C5C"},arrow:{top:"#23262F",bottom:"#23262F",left:"#23262F",right:"#23262F"}}},w=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===H.WHITE,y=b[w?"white":"dark"];let E={position:"absolute",zIndex:999,borderRadius:6,fontSize:15,minWidth:r,width:n,padding:"8px 14px",pointerEvents:"auto",textAlign:"center",animation:"fadeInUp 0.3s",...y.popover},x={position:"absolute",zIndex:11,width:0,height:0};return u==="top"?(E={...E,left:"50%",top:-48,transform:"translateX(-50%)"},x={...x,left:"50%",bottom:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderTop:`8px solid ${y.arrow.top}`}):u==="bottom"?(E={...E,left:"50%",top:"100%",marginTop:o,transform:"translateX(-50%)"},x={...x,left:"50%",top:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderBottom:`8px solid ${y.arrow.bottom}`}):u==="leftTop"?(E={...E,right:"100%",top:0,marginRight:s,transform:"none"},x={...x,right:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderLeft:`8px solid ${y.arrow.left}`}):u==="rightTop"&&(E={...E,left:"100%",top:0,marginLeft:s,transform:"translateY(0)"},x={...x,left:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderRight:`8px solid ${y.arrow.right}`}),_("div",{ref:l,style:{position:"relative",display:"inline-block"},onMouseEnter:m,onMouseLeave:p,children:[t,a&&_("div",{style:E,onMouseEnter:m,onMouseLeave:p,children:[e,_("div",{style:x})]})]})};function kt(e){return e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}const No={white:{popoverTitle:{fontSize:16,fontWeight:600,color:"#222",marginBottom:16,textAlign:"center"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"8px 0",borderBottom:"1px solid #e5e7eb",fontSize:15},detailLabel:{display:"flex",alignItems:"center",color:"#6b7280",fontWeight:500},detailDot:e=>({display:"inline-block",width:8,height:8,borderRadius:"50%",background:e,marginRight:8}),detailValue:e=>({color:e,fontWeight:600,fontSize:15}),main:{fontSize:24,fontWeight:800,color:"#111827",display:"inline-block"},currency:{fontSize:18,color:"#6b7280",marginLeft:8,fontWeight:600}},dark:{popoverTitle:{fontSize:16,fontWeight:600,color:"#fff",marginBottom:16,textAlign:"center"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"8px 0",borderBottom:"1px solid #23262F",fontSize:15},detailLabel:{display:"flex",alignItems:"center",color:"#B5B8BE",fontWeight:500},detailDot:e=>({display:"inline-block",width:8,height:8,borderRadius:"50%",background:e,marginRight:8}),detailValue:e=>({color:e,fontWeight:600,fontSize:15}),main:{fontSize:24,fontWeight:800,color:"#fff",display:"inline-block"},currency:{fontSize:18,color:"#B5B8BE",marginLeft:8,fontWeight:600}}};function Uo(e){const[t,n]=U({available:0,currency:"USD",symbol:"$",details:[{label:S("真实金额"),value:0,color:"#15b36b",dot:"#15b36b"},{label:S("冻结金额"),value:0,color:"#f59e0b",dot:"#f59e0b"},{label:S("总可用"),value:0,color:"#1890ff",dot:"#15b36b"}]});Qe(()=>{(async()=>{try{const a=await lo(),c={available:a.availableAmount,currency:"USD",symbol:"$",details:[{label:S("真实金额"),value:a.totalAmount,color:"#15b36b",dot:"#15b36b"},{label:S("冻结金额"),value:a.frozenAmount,color:"#f59e0b",dot:"#f59e0b"},{label:S("总可用"),value:a.availableAmount,color:"#1890ff",dot:"#15b36b"}]};n(c)}catch(a){console.error("获取余额失败:",a)}})()},[]);const o=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===H.WHITE,s=No[o?"white":"dark"];return _(Bo,{popover:_(Z,{children:[_("div",{style:s.popoverTitle,children:S("余额详情")}),t.details.map(i=>_("div",{style:s.detailRow,children:[_("span",{style:s.detailLabel,children:[_("span",{style:s.detailDot(i.dot)}),i.label]}),_("span",{style:s.detailValue(i.color),children:[t.symbol,kt(i.value)]})]},i.label))]}),popoverPosition:e.popoverPosition||"bottom",children:_("div",{style:s.main,children:[t.symbol,kt(t.available),_("span",{style:s.currency,children:t.currency})]})})}gn(Uo,"best-statistical-balance");const Io=["best-recharge","best-statistical-balance"];exports.components=Io;exports.initFundUnit=ho;exports.npmTest=bn;exports.printCurrentTime=yn;exports.viteProxy=_o;
|
package/dist/best-unit.js
CHANGED
|
@@ -227,10 +227,10 @@ const Qn = (e) => {
|
|
|
227
227
|
asap: tr,
|
|
228
228
|
isIterable: nr
|
|
229
229
|
};
|
|
230
|
-
function
|
|
230
|
+
function v(e, t, n, r, o) {
|
|
231
231
|
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, this.status = o.status ? o.status : null);
|
|
232
232
|
}
|
|
233
|
-
d.inherits(
|
|
233
|
+
d.inherits(v, Error, {
|
|
234
234
|
toJSON: function() {
|
|
235
235
|
return {
|
|
236
236
|
// Standard
|
|
@@ -251,7 +251,7 @@ d.inherits(S, Error, {
|
|
|
251
251
|
};
|
|
252
252
|
}
|
|
253
253
|
});
|
|
254
|
-
const Ut =
|
|
254
|
+
const Ut = v.prototype, Dt = {};
|
|
255
255
|
[
|
|
256
256
|
"ERR_BAD_OPTION_VALUE",
|
|
257
257
|
"ERR_BAD_OPTION",
|
|
@@ -269,13 +269,13 @@ const Ut = S.prototype, Dt = {};
|
|
|
269
269
|
].forEach((e) => {
|
|
270
270
|
Dt[e] = { value: e };
|
|
271
271
|
});
|
|
272
|
-
Object.defineProperties(
|
|
272
|
+
Object.defineProperties(v, Dt);
|
|
273
273
|
Object.defineProperty(Ut, "isAxiosError", { value: !0 });
|
|
274
|
-
|
|
274
|
+
v.from = (e, t, n, r, o, s) => {
|
|
275
275
|
const i = Object.create(Ut);
|
|
276
276
|
return d.toFlatObject(e, i, function(c) {
|
|
277
277
|
return c !== Error.prototype;
|
|
278
|
-
}, (a) => a !== "isAxiosError"),
|
|
278
|
+
}, (a) => a !== "isAxiosError"), v.call(i, e.message, t, n, r, o), i.cause = e, i.name = e.name, s && Object.assign(i, s), i;
|
|
279
279
|
};
|
|
280
280
|
const rr = null;
|
|
281
281
|
function Ne(e) {
|
|
@@ -315,7 +315,7 @@ function Se(e, t, n) {
|
|
|
315
315
|
if (d.isBoolean(p))
|
|
316
316
|
return p.toString();
|
|
317
317
|
if (!c && d.isBlob(p))
|
|
318
|
-
throw new
|
|
318
|
+
throw new v("Blob is not supported. Use a Buffer instead.");
|
|
319
319
|
return d.isArrayBuffer(p) || d.isTypedArray(p) ? c && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
|
|
320
320
|
}
|
|
321
321
|
function f(p, b, g) {
|
|
@@ -565,7 +565,7 @@ const ie = {
|
|
|
565
565
|
return JSON.parse(t);
|
|
566
566
|
} catch (a) {
|
|
567
567
|
if (i)
|
|
568
|
-
throw a.name === "SyntaxError" ?
|
|
568
|
+
throw a.name === "SyntaxError" ? v.from(a, v.ERR_BAD_RESPONSE, this, null, this.response) : a;
|
|
569
569
|
}
|
|
570
570
|
}
|
|
571
571
|
return t;
|
|
@@ -808,16 +808,16 @@ function $t(e) {
|
|
|
808
808
|
return !!(e && e.__CANCEL__);
|
|
809
809
|
}
|
|
810
810
|
function X(e, t, n) {
|
|
811
|
-
|
|
811
|
+
v.call(this, e ?? "canceled", v.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
812
812
|
}
|
|
813
|
-
d.inherits(X,
|
|
813
|
+
d.inherits(X, v, {
|
|
814
814
|
__CANCEL__: !0
|
|
815
815
|
});
|
|
816
816
|
function qt(e, t, n) {
|
|
817
817
|
const r = n.config.validateStatus;
|
|
818
|
-
!n.status || !r || r(n.status) ? e(n) : t(new
|
|
818
|
+
!n.status || !r || r(n.status) ? e(n) : t(new v(
|
|
819
819
|
"Request failed with status code " + n.status,
|
|
820
|
-
[
|
|
820
|
+
[v.ERR_BAD_REQUEST, v.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
821
821
|
n.config,
|
|
822
822
|
n.request,
|
|
823
823
|
n
|
|
@@ -1040,15 +1040,15 @@ const Jt = (e) => {
|
|
|
1040
1040
|
"onloadend" in g ? g.onloadend = w : g.onreadystatechange = function() {
|
|
1041
1041
|
!g || g.readyState !== 4 || g.status === 0 && !(g.responseURL && g.responseURL.indexOf("file:") === 0) || setTimeout(w);
|
|
1042
1042
|
}, g.onabort = function() {
|
|
1043
|
-
g && (r(new
|
|
1043
|
+
g && (r(new v("Request aborted", v.ECONNABORTED, e, g)), g = null);
|
|
1044
1044
|
}, g.onerror = function() {
|
|
1045
|
-
r(new
|
|
1045
|
+
r(new v("Network Error", v.ERR_NETWORK, e, g)), g = null;
|
|
1046
1046
|
}, g.ontimeout = function() {
|
|
1047
1047
|
let x = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
|
|
1048
1048
|
const R = o.transitional || jt;
|
|
1049
|
-
o.timeoutErrorMessage && (x = o.timeoutErrorMessage), r(new
|
|
1049
|
+
o.timeoutErrorMessage && (x = o.timeoutErrorMessage), r(new v(
|
|
1050
1050
|
x,
|
|
1051
|
-
R.clarifyTimeoutError ?
|
|
1051
|
+
R.clarifyTimeoutError ? v.ETIMEDOUT : v.ECONNABORTED,
|
|
1052
1052
|
e,
|
|
1053
1053
|
g
|
|
1054
1054
|
)), g = null;
|
|
@@ -1059,7 +1059,7 @@ const Jt = (e) => {
|
|
|
1059
1059
|
}, o.cancelToken && o.cancelToken.subscribe(f), o.signal && (o.signal.aborted ? f() : o.signal.addEventListener("abort", f)));
|
|
1060
1060
|
const y = Rr(o.url);
|
|
1061
1061
|
if (y && F.protocols.indexOf(y) === -1) {
|
|
1062
|
-
r(new
|
|
1062
|
+
r(new v("Unsupported protocol " + y + ":", v.ERR_BAD_REQUEST, e));
|
|
1063
1063
|
return;
|
|
1064
1064
|
}
|
|
1065
1065
|
g.send(s || null);
|
|
@@ -1072,11 +1072,11 @@ const Jt = (e) => {
|
|
|
1072
1072
|
if (!o) {
|
|
1073
1073
|
o = !0, a();
|
|
1074
1074
|
const f = u instanceof Error ? u : this.reason;
|
|
1075
|
-
r.abort(f instanceof
|
|
1075
|
+
r.abort(f instanceof v ? f : new X(f instanceof Error ? f.message : f));
|
|
1076
1076
|
}
|
|
1077
1077
|
};
|
|
1078
1078
|
let i = t && setTimeout(() => {
|
|
1079
|
-
i = null, s(new
|
|
1079
|
+
i = null, s(new v(`timeout ${t} of ms exceeded`, v.ETIMEDOUT));
|
|
1080
1080
|
}, t);
|
|
1081
1081
|
const a = () => {
|
|
1082
1082
|
e && (i && clearTimeout(i), i = null, e.forEach((u) => {
|
|
@@ -1166,7 +1166,7 @@ const Jt = (e) => {
|
|
|
1166
1166
|
ve && ((e) => {
|
|
1167
1167
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1168
1168
|
!_e[t] && (_e[t] = d.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
|
1169
|
-
throw new
|
|
1169
|
+
throw new v(`Response type '${t}' is not supported`, v.ERR_NOT_SUPPORT, r);
|
|
1170
1170
|
});
|
|
1171
1171
|
});
|
|
1172
1172
|
})(new Response());
|
|
@@ -1266,11 +1266,11 @@ const Hr = async (e) => {
|
|
|
1266
1266
|
});
|
|
1267
1267
|
} catch (w) {
|
|
1268
1268
|
throw b && b(), w && w.name === "TypeError" && /Load failed|fetch/i.test(w.message) ? Object.assign(
|
|
1269
|
-
new
|
|
1269
|
+
new v("Network Error", v.ERR_NETWORK, e, p),
|
|
1270
1270
|
{
|
|
1271
1271
|
cause: w.cause || w
|
|
1272
1272
|
}
|
|
1273
|
-
) :
|
|
1273
|
+
) : v.from(w, w && w.code, e, p);
|
|
1274
1274
|
}
|
|
1275
1275
|
}), De = {
|
|
1276
1276
|
http: rr,
|
|
@@ -1296,7 +1296,7 @@ const ft = (e) => `- ${e}`, $r = (e) => d.isFunction(e) || e === null || e === !
|
|
|
1296
1296
|
n = e[s];
|
|
1297
1297
|
let i;
|
|
1298
1298
|
if (r = n, !$r(n) && (r = De[(i = String(n)).toLowerCase()], r === void 0))
|
|
1299
|
-
throw new
|
|
1299
|
+
throw new v(`Unknown adapter '${i}'`);
|
|
1300
1300
|
if (r)
|
|
1301
1301
|
break;
|
|
1302
1302
|
o[i || "#" + s] = r;
|
|
@@ -1308,7 +1308,7 @@ const ft = (e) => `- ${e}`, $r = (e) => d.isFunction(e) || e === null || e === !
|
|
|
1308
1308
|
let i = t ? s.length > 1 ? `since :
|
|
1309
1309
|
` + s.map(ft).join(`
|
|
1310
1310
|
`) : " " + ft(s[0]) : "as no adapter specified";
|
|
1311
|
-
throw new
|
|
1311
|
+
throw new v(
|
|
1312
1312
|
"There is no suitable adapter to dispatch the request " + i,
|
|
1313
1313
|
"ERR_NOT_SUPPORT"
|
|
1314
1314
|
);
|
|
@@ -1352,9 +1352,9 @@ Re.transitional = function(t, n, r) {
|
|
|
1352
1352
|
}
|
|
1353
1353
|
return (s, i, a) => {
|
|
1354
1354
|
if (t === !1)
|
|
1355
|
-
throw new
|
|
1355
|
+
throw new v(
|
|
1356
1356
|
o(i, " has been removed" + (n ? " in " + n : "")),
|
|
1357
|
-
|
|
1357
|
+
v.ERR_DEPRECATED
|
|
1358
1358
|
);
|
|
1359
1359
|
return n && !pt[i] && (pt[i] = !0, console.warn(
|
|
1360
1360
|
o(
|
|
@@ -1369,7 +1369,7 @@ Re.spelling = function(t) {
|
|
|
1369
1369
|
};
|
|
1370
1370
|
function qr(e, t, n) {
|
|
1371
1371
|
if (typeof e != "object")
|
|
1372
|
-
throw new
|
|
1372
|
+
throw new v("options must be an object", v.ERR_BAD_OPTION_VALUE);
|
|
1373
1373
|
const r = Object.keys(e);
|
|
1374
1374
|
let o = r.length;
|
|
1375
1375
|
for (; o-- > 0; ) {
|
|
@@ -1377,11 +1377,11 @@ function qr(e, t, n) {
|
|
|
1377
1377
|
if (i) {
|
|
1378
1378
|
const a = e[s], c = a === void 0 || i(a, s, e);
|
|
1379
1379
|
if (c !== !0)
|
|
1380
|
-
throw new
|
|
1380
|
+
throw new v("option " + s + " must be " + c, v.ERR_BAD_OPTION_VALUE);
|
|
1381
1381
|
continue;
|
|
1382
1382
|
}
|
|
1383
1383
|
if (n !== !0)
|
|
1384
|
-
throw new
|
|
1384
|
+
throw new v("Unknown option " + s, v.ERR_BAD_OPTION);
|
|
1385
1385
|
}
|
|
1386
1386
|
}
|
|
1387
1387
|
const fe = {
|
|
@@ -1674,7 +1674,7 @@ A.CancelToken = Wr;
|
|
|
1674
1674
|
A.isCancel = $t;
|
|
1675
1675
|
A.VERSION = Xt;
|
|
1676
1676
|
A.toFormData = Se;
|
|
1677
|
-
A.AxiosError =
|
|
1677
|
+
A.AxiosError = v;
|
|
1678
1678
|
A.Cancel = A.CanceledError;
|
|
1679
1679
|
A.all = function(t) {
|
|
1680
1680
|
return Promise.all(t);
|
|
@@ -2339,6 +2339,7 @@ const po = {
|
|
|
2339
2339
|
真实金额: "真实金额",
|
|
2340
2340
|
冻结金额: "冻结金额",
|
|
2341
2341
|
总可用: "总可用",
|
|
2342
|
+
暂无数据: "暂无数据",
|
|
2342
2343
|
// 充值相关
|
|
2343
2344
|
"充值 / 转账": "充值 / 转账",
|
|
2344
2345
|
在线充值: "在线充值",
|
|
@@ -2387,6 +2388,7 @@ const _o = {
|
|
|
2387
2388
|
真实金额: "Real Amount",
|
|
2388
2389
|
冻结金额: "Frozen Amount",
|
|
2389
2390
|
总可用: "Total Available",
|
|
2391
|
+
暂无数据: "No Data",
|
|
2390
2392
|
// 充值相关
|
|
2391
2393
|
"充值 / 转账": "Recharge / Transfer",
|
|
2392
2394
|
在线充值: "Online Recharge",
|
|
@@ -2434,7 +2436,7 @@ function go() {
|
|
|
2434
2436
|
sessionStorage.getItem("fund_unit_params") || "{}"
|
|
2435
2437
|
).locale || Ye.ZH;
|
|
2436
2438
|
}
|
|
2437
|
-
function
|
|
2439
|
+
function S(e) {
|
|
2438
2440
|
return go() === "zh" ? ho(e) : mo(e);
|
|
2439
2441
|
}
|
|
2440
2442
|
const $e = ({
|
|
@@ -2600,7 +2602,7 @@ const $e = ({
|
|
|
2600
2602
|
viewBox: "0 0 64 41",
|
|
2601
2603
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2602
2604
|
children: [
|
|
2603
|
-
/* @__PURE__ */ _("title", { children: "暂无数据" }),
|
|
2605
|
+
/* @__PURE__ */ _("title", { children: S("暂无数据") }),
|
|
2604
2606
|
/* @__PURE__ */ _("g", { transform: "translate(0 1)", fill: "none", fillRule: "evenodd", children: [
|
|
2605
2607
|
/* @__PURE__ */ _(
|
|
2606
2608
|
"ellipse",
|
|
@@ -2626,7 +2628,7 @@ const $e = ({
|
|
|
2626
2628
|
]
|
|
2627
2629
|
}
|
|
2628
2630
|
),
|
|
2629
|
-
/* @__PURE__ */ _("div", { style: { marginTop: 8, color: "#bfbfbf", fontSize: 15 }, children: "暂无数据" })
|
|
2631
|
+
/* @__PURE__ */ _("div", { style: { marginTop: 8, color: "#bfbfbf", fontSize: 15 }, children: S("暂无数据") })
|
|
2630
2632
|
]
|
|
2631
2633
|
}
|
|
2632
2634
|
),
|
|
@@ -2761,7 +2763,7 @@ const $e = ({
|
|
|
2761
2763
|
/* @__PURE__ */ _("div", { style: u.label, children: [
|
|
2762
2764
|
/* @__PURE__ */ _("span", { style: { color: "#F53F3F" }, children: "*" }),
|
|
2763
2765
|
" ",
|
|
2764
|
-
|
|
2766
|
+
S("充值币种")
|
|
2765
2767
|
] }),
|
|
2766
2768
|
/* @__PURE__ */ _(
|
|
2767
2769
|
$e,
|
|
@@ -2777,7 +2779,7 @@ const $e = ({
|
|
|
2777
2779
|
value: h.value,
|
|
2778
2780
|
label: h.label
|
|
2779
2781
|
})),
|
|
2780
|
-
placeholder:
|
|
2782
|
+
placeholder: S("请选择充值币种")
|
|
2781
2783
|
}
|
|
2782
2784
|
)
|
|
2783
2785
|
] }),
|
|
@@ -2785,13 +2787,13 @@ const $e = ({
|
|
|
2785
2787
|
/* @__PURE__ */ _("div", { style: u.label, children: [
|
|
2786
2788
|
/* @__PURE__ */ _("span", { style: { color: "#F53F3F" }, children: "*" }),
|
|
2787
2789
|
" ",
|
|
2788
|
-
|
|
2790
|
+
S("充值金额")
|
|
2789
2791
|
] }),
|
|
2790
2792
|
/* @__PURE__ */ _(
|
|
2791
2793
|
"input",
|
|
2792
2794
|
{
|
|
2793
2795
|
type: "text",
|
|
2794
|
-
placeholder:
|
|
2796
|
+
placeholder: S("请输入充值金额"),
|
|
2795
2797
|
value: e.amount,
|
|
2796
2798
|
onInput: (h) => {
|
|
2797
2799
|
const m = h.target.value;
|
|
@@ -2813,7 +2815,7 @@ const $e = ({
|
|
|
2813
2815
|
/* @__PURE__ */ _("div", { style: u.label, children: [
|
|
2814
2816
|
/* @__PURE__ */ _("span", { style: { color: "#F53F3F" }, children: "*" }),
|
|
2815
2817
|
" ",
|
|
2816
|
-
|
|
2818
|
+
S("支付平台")
|
|
2817
2819
|
] }),
|
|
2818
2820
|
/* @__PURE__ */ _(
|
|
2819
2821
|
$e,
|
|
@@ -2830,15 +2832,15 @@ const $e = ({
|
|
|
2830
2832
|
value: h.value,
|
|
2831
2833
|
label: h.label
|
|
2832
2834
|
})),
|
|
2833
|
-
placeholder:
|
|
2835
|
+
placeholder: S("请选择支付平台")
|
|
2834
2836
|
}
|
|
2835
2837
|
),
|
|
2836
2838
|
e.rechargeChannelError && /* @__PURE__ */ _("div", { style: u.error, children: e.rechargeChannelError })
|
|
2837
2839
|
] }),
|
|
2838
2840
|
e.error && /* @__PURE__ */ _("div", { style: { color: "#ff4d4f", marginBottom: 12 }, children: e.error }),
|
|
2839
2841
|
/* @__PURE__ */ _("div", { style: { display: "flex", justifyContent: "flex-end", gap: 12 }, children: [
|
|
2840
|
-
/* @__PURE__ */ _("button", { type: "button", onClick: n, style: f, children:
|
|
2841
|
-
/* @__PURE__ */ _("button", { type: "submit", disabled: r, style: l, children:
|
|
2842
|
+
/* @__PURE__ */ _("button", { type: "button", onClick: n, style: f, children: S("取消") }),
|
|
2843
|
+
/* @__PURE__ */ _("button", { type: "submit", disabled: r, style: l, children: S(r ? "提交中..." : "去支付") })
|
|
2842
2844
|
] })
|
|
2843
2845
|
] });
|
|
2844
2846
|
}, yo = {
|
|
@@ -2966,13 +2968,13 @@ const $e = ({
|
|
|
2966
2968
|
onClick: () => !s && i.current?.click(),
|
|
2967
2969
|
children: [
|
|
2968
2970
|
/* @__PURE__ */ _("div", { style: { fontSize: 48, marginBottom: 12 }, children: "📁" }),
|
|
2969
|
-
/* @__PURE__ */ _("div", { style: { color: "#222", fontSize: 15, marginBottom: 4 }, children:
|
|
2971
|
+
/* @__PURE__ */ _("div", { style: { color: "#222", fontSize: 15, marginBottom: 4 }, children: S("点击或拖拽文件到此处上传") }),
|
|
2970
2972
|
/* @__PURE__ */ _("div", { style: { color: "#999", fontSize: 13 }, children: [
|
|
2971
|
-
|
|
2973
|
+
S("支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传"),
|
|
2972
2974
|
" ",
|
|
2973
2975
|
n,
|
|
2974
2976
|
" ",
|
|
2975
|
-
|
|
2977
|
+
S("个文件")
|
|
2976
2978
|
] }),
|
|
2977
2979
|
/* @__PURE__ */ _(
|
|
2978
2980
|
"input",
|
|
@@ -2987,7 +2989,7 @@ const $e = ({
|
|
|
2987
2989
|
}
|
|
2988
2990
|
),
|
|
2989
2991
|
a && /* @__PURE__ */ _("div", { style: { marginTop: 12, color: "#1677ff" }, children: [
|
|
2990
|
-
|
|
2992
|
+
S("正在上传..."),
|
|
2991
2993
|
" ",
|
|
2992
2994
|
u,
|
|
2993
2995
|
"%"
|
|
@@ -3000,7 +3002,7 @@ const $e = ({
|
|
|
3000
3002
|
/* @__PURE__ */ _("span", { style: { fontWeight: 500, wordBreak: "break-all" }, children: w.split("/").pop() }),
|
|
3001
3003
|
/* @__PURE__ */ _("span", { style: { color: "#8C8F93", fontSize: 13, marginLeft: 8 }, children: [
|
|
3002
3004
|
"[",
|
|
3003
|
-
|
|
3005
|
+
S("已上传"),
|
|
3004
3006
|
"]"
|
|
3005
3007
|
] })
|
|
3006
3008
|
] }),
|
|
@@ -3013,7 +3015,7 @@ const $e = ({
|
|
|
3013
3015
|
},
|
|
3014
3016
|
style: p.removeBtn,
|
|
3015
3017
|
disabled: s,
|
|
3016
|
-
children:
|
|
3018
|
+
children: S("移除")
|
|
3017
3019
|
}
|
|
3018
3020
|
)
|
|
3019
3021
|
] }, w)) })
|
|
@@ -3130,24 +3132,24 @@ const $e = ({
|
|
|
3130
3132
|
filesError: ""
|
|
3131
3133
|
})), e.platform || (t((h) => ({
|
|
3132
3134
|
...h,
|
|
3133
|
-
platformError:
|
|
3135
|
+
platformError: S("请选择支付平台")
|
|
3134
3136
|
})), l = !1), e.transactionId.trim() || (t((h) => ({
|
|
3135
3137
|
...h,
|
|
3136
|
-
transactionIdError:
|
|
3138
|
+
transactionIdError: S("请输入转账交易ID")
|
|
3137
3139
|
})), l = !1), (!e.files || e.files.length === 0) && (t((h) => ({
|
|
3138
3140
|
...h,
|
|
3139
|
-
filesError:
|
|
3141
|
+
filesError: S("请上传转账凭证")
|
|
3140
3142
|
})), l = !1), l && (await co({
|
|
3141
3143
|
transferChannel: e.platform,
|
|
3142
3144
|
transferNo: e.transactionId,
|
|
3143
3145
|
voucherUrls: e.files
|
|
3144
|
-
}), n(), Me.success(
|
|
3146
|
+
}), n(), Me.success(S("离线充值创建成功")));
|
|
3145
3147
|
}, children: [
|
|
3146
3148
|
/* @__PURE__ */ _("div", { style: { marginBottom: 18 }, children: [
|
|
3147
3149
|
/* @__PURE__ */ _("div", { style: c.label, children: [
|
|
3148
3150
|
/* @__PURE__ */ _("span", { style: { color: "#F53F3F" }, children: "*" }),
|
|
3149
3151
|
" ",
|
|
3150
|
-
|
|
3152
|
+
S("第三方支付平台")
|
|
3151
3153
|
] }),
|
|
3152
3154
|
/* @__PURE__ */ _(
|
|
3153
3155
|
$e,
|
|
@@ -3166,7 +3168,7 @@ const $e = ({
|
|
|
3166
3168
|
label: f.label
|
|
3167
3169
|
}))
|
|
3168
3170
|
],
|
|
3169
|
-
placeholder:
|
|
3171
|
+
placeholder: S("请选择支付平台")
|
|
3170
3172
|
}
|
|
3171
3173
|
),
|
|
3172
3174
|
e.platformError && /* @__PURE__ */ _("div", { style: c.error, children: e.platformError })
|
|
@@ -3175,13 +3177,13 @@ const $e = ({
|
|
|
3175
3177
|
/* @__PURE__ */ _("div", { style: c.label, children: [
|
|
3176
3178
|
/* @__PURE__ */ _("span", { style: { color: "#F53F3F" }, children: "*" }),
|
|
3177
3179
|
" ",
|
|
3178
|
-
|
|
3180
|
+
S("交易ID")
|
|
3179
3181
|
] }),
|
|
3180
3182
|
/* @__PURE__ */ _(
|
|
3181
3183
|
"input",
|
|
3182
3184
|
{
|
|
3183
3185
|
type: "text",
|
|
3184
|
-
placeholder:
|
|
3186
|
+
placeholder: S("请输入转账交易ID"),
|
|
3185
3187
|
value: e.transactionId,
|
|
3186
3188
|
onInput: (f) => {
|
|
3187
3189
|
const l = f.target.value;
|
|
@@ -3203,7 +3205,7 @@ const $e = ({
|
|
|
3203
3205
|
/* @__PURE__ */ _("div", { style: c.label, children: [
|
|
3204
3206
|
/* @__PURE__ */ _("span", { style: { color: "#F53F3F" }, children: "*" }),
|
|
3205
3207
|
" ",
|
|
3206
|
-
|
|
3208
|
+
S("上传文件")
|
|
3207
3209
|
] }),
|
|
3208
3210
|
/* @__PURE__ */ _(
|
|
3209
3211
|
wo,
|
|
@@ -3222,8 +3224,8 @@ const $e = ({
|
|
|
3222
3224
|
e.filesError && /* @__PURE__ */ _("div", { style: c.error, children: e.filesError })
|
|
3223
3225
|
] }),
|
|
3224
3226
|
/* @__PURE__ */ _("div", { style: { display: "flex", justifyContent: "flex-end", gap: 12 }, children: [
|
|
3225
|
-
/* @__PURE__ */ _("button", { type: "button", onClick: n, style: c.buttonCancel, children:
|
|
3226
|
-
/* @__PURE__ */ _("button", { type: "submit", disabled: r, style: c.buttonSubmit, children:
|
|
3227
|
+
/* @__PURE__ */ _("button", { type: "button", onClick: n, style: c.buttonCancel, children: S("取消") }),
|
|
3228
|
+
/* @__PURE__ */ _("button", { type: "submit", disabled: r, style: c.buttonSubmit, children: S("去支付") })
|
|
3227
3229
|
] })
|
|
3228
3230
|
] });
|
|
3229
3231
|
};
|
|
@@ -3273,9 +3275,9 @@ function Eo({ visible: e, onClose: t, onSubmit: n }) {
|
|
|
3273
3275
|
...g,
|
|
3274
3276
|
amountError: "",
|
|
3275
3277
|
rechargeChannelError: ""
|
|
3276
|
-
})), r.amount.trim() || (o((g) => ({ ...g, amountError:
|
|
3278
|
+
})), r.amount.trim() || (o((g) => ({ ...g, amountError: S("请输入充值金额") })), b = !1), r.rechargeChannel || (o((g) => ({
|
|
3277
3279
|
...g,
|
|
3278
|
-
rechargeChannelError:
|
|
3280
|
+
rechargeChannelError: S("请选择支付平台")
|
|
3279
3281
|
})), b = !1), !!b) {
|
|
3280
3282
|
o((g) => ({ ...g, loading: !0, error: "" }));
|
|
3281
3283
|
try {
|
|
@@ -3285,7 +3287,7 @@ function Eo({ visible: e, onClose: t, onSubmit: n }) {
|
|
|
3285
3287
|
currency: r.currency
|
|
3286
3288
|
}), t();
|
|
3287
3289
|
} catch {
|
|
3288
|
-
o((g) => ({ ...g, error:
|
|
3290
|
+
o((g) => ({ ...g, error: S("提交失败,请重试") }));
|
|
3289
3291
|
} finally {
|
|
3290
3292
|
o((g) => ({ ...g, loading: !1 }));
|
|
3291
3293
|
}
|
|
@@ -3411,11 +3413,11 @@ function Eo({ visible: e, onClose: t, onSubmit: n }) {
|
|
|
3411
3413
|
type: "button",
|
|
3412
3414
|
onClick: t,
|
|
3413
3415
|
style: m.closeBtn,
|
|
3414
|
-
"aria-label":
|
|
3416
|
+
"aria-label": S("关闭"),
|
|
3415
3417
|
children: "×"
|
|
3416
3418
|
}
|
|
3417
3419
|
),
|
|
3418
|
-
/* @__PURE__ */ _("div", { style: m.title, children:
|
|
3420
|
+
/* @__PURE__ */ _("div", { style: m.title, children: S("充值 / 转账") }),
|
|
3419
3421
|
/* @__PURE__ */ _("div", { style: { display: "flex", marginBottom: 28 }, children: [
|
|
3420
3422
|
/* @__PURE__ */ _(
|
|
3421
3423
|
"button",
|
|
@@ -3423,7 +3425,7 @@ function Eo({ visible: e, onClose: t, onSubmit: n }) {
|
|
|
3423
3425
|
type: "button",
|
|
3424
3426
|
onClick: () => i("online"),
|
|
3425
3427
|
style: m.tabBtn(s === "online", !0),
|
|
3426
|
-
children:
|
|
3428
|
+
children: S("在线充值")
|
|
3427
3429
|
}
|
|
3428
3430
|
),
|
|
3429
3431
|
/* @__PURE__ */ _(
|
|
@@ -3432,7 +3434,7 @@ function Eo({ visible: e, onClose: t, onSubmit: n }) {
|
|
|
3432
3434
|
type: "button",
|
|
3433
3435
|
onClick: () => i("offline"),
|
|
3434
3436
|
style: m.tabBtn(s === "offline", !1),
|
|
3435
|
-
children:
|
|
3437
|
+
children: S("线下转账")
|
|
3436
3438
|
}
|
|
3437
3439
|
)
|
|
3438
3440
|
] }),
|
|
@@ -3543,7 +3545,7 @@ function Co() {
|
|
|
3543
3545
|
window.open(o, "_blank");
|
|
3544
3546
|
};
|
|
3545
3547
|
return /* @__PURE__ */ _("div", { children: [
|
|
3546
|
-
/* @__PURE__ */ _(fo, { onClick: () => t(!0), children:
|
|
3548
|
+
/* @__PURE__ */ _(fo, { onClick: () => t(!0), children: S("充值/转账") }),
|
|
3547
3549
|
/* @__PURE__ */ _(
|
|
3548
3550
|
Eo,
|
|
3549
3551
|
{
|
|
@@ -3817,9 +3819,9 @@ function Fo(e) {
|
|
|
3817
3819
|
currency: "USD",
|
|
3818
3820
|
symbol: "$",
|
|
3819
3821
|
details: [
|
|
3820
|
-
{ label:
|
|
3821
|
-
{ label:
|
|
3822
|
-
{ label:
|
|
3822
|
+
{ label: S("真实金额"), value: 0, color: "#15b36b", dot: "#15b36b" },
|
|
3823
|
+
{ label: S("冻结金额"), value: 0, color: "#f59e0b", dot: "#f59e0b" },
|
|
3824
|
+
{ label: S("总可用"), value: 0, color: "#1890ff", dot: "#15b36b" }
|
|
3823
3825
|
]
|
|
3824
3826
|
});
|
|
3825
3827
|
Qe(() => {
|
|
@@ -3832,19 +3834,19 @@ function Fo(e) {
|
|
|
3832
3834
|
symbol: "$",
|
|
3833
3835
|
details: [
|
|
3834
3836
|
{
|
|
3835
|
-
label:
|
|
3837
|
+
label: S("真实金额"),
|
|
3836
3838
|
value: a.totalAmount,
|
|
3837
3839
|
color: "#15b36b",
|
|
3838
3840
|
dot: "#15b36b"
|
|
3839
3841
|
},
|
|
3840
3842
|
{
|
|
3841
|
-
label:
|
|
3843
|
+
label: S("冻结金额"),
|
|
3842
3844
|
value: a.frozenAmount,
|
|
3843
3845
|
color: "#f59e0b",
|
|
3844
3846
|
dot: "#f59e0b"
|
|
3845
3847
|
},
|
|
3846
3848
|
{
|
|
3847
|
-
label:
|
|
3849
|
+
label: S("总可用"),
|
|
3848
3850
|
value: a.availableAmount,
|
|
3849
3851
|
color: "#1890ff",
|
|
3850
3852
|
dot: "#15b36b"
|
|
@@ -3864,7 +3866,7 @@ function Fo(e) {
|
|
|
3864
3866
|
Ao,
|
|
3865
3867
|
{
|
|
3866
3868
|
popover: /* @__PURE__ */ _(Z, { children: [
|
|
3867
|
-
/* @__PURE__ */ _("div", { style: s.popoverTitle, children:
|
|
3869
|
+
/* @__PURE__ */ _("div", { style: s.popoverTitle, children: S("余额详情") }),
|
|
3868
3870
|
t.details.map((i) => /* @__PURE__ */ _("div", { style: s.detailRow, children: [
|
|
3869
3871
|
/* @__PURE__ */ _("span", { style: s.detailLabel, children: [
|
|
3870
3872
|
/* @__PURE__ */ _("span", { style: s.detailDot(i.dot) }),
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { FunctionalComponent, JSX } from "preact";
|
|
2
2
|
import { useState, useRef, useEffect } from "preact/hooks";
|
|
3
3
|
import { Theme } from "../../types";
|
|
4
|
+
import { t } from "../../local";
|
|
4
5
|
|
|
5
6
|
interface Option {
|
|
6
7
|
value: string;
|
|
@@ -221,7 +222,7 @@ export const Select: FunctionalComponent<SelectProps> = ({
|
|
|
221
222
|
viewBox="0 0 64 41"
|
|
222
223
|
xmlns="http://www.w3.org/2000/svg"
|
|
223
224
|
>
|
|
224
|
-
<title
|
|
225
|
+
<title>{t("暂无数据")}</title>
|
|
225
226
|
<g transform="translate(0 1)" fill="none" fillRule="evenodd">
|
|
226
227
|
<ellipse
|
|
227
228
|
fill="#f5f5f5"
|
|
@@ -240,7 +241,7 @@ export const Select: FunctionalComponent<SelectProps> = ({
|
|
|
240
241
|
</g>
|
|
241
242
|
</svg>
|
|
242
243
|
<div style={{ marginTop: 8, color: "#bfbfbf", fontSize: 15 }}>
|
|
243
|
-
暂无数据
|
|
244
|
+
{t("暂无数据")}
|
|
244
245
|
</div>
|
|
245
246
|
</div>
|
|
246
247
|
)}
|
package/src/local/en.ts
CHANGED