best-unit 0.0.39 → 0.0.41

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.
@@ -1,9 +1,9 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function bn(){console.log("npm package test!!!")}function gn(){console.log("Current time:",new Date().toISOString())}function Tt(e,t){return function(){return e.apply(t,arguments)}}const{toString:yn}=Object.prototype,{getPrototypeOf:$e}=Object,{iterator:ge,toStringTag:kt}=Symbol,ye=(e=>t=>{const n=yn.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),D=e=>(e=e.toLowerCase(),t=>ye(t)===e),we=e=>t=>typeof t===e,{isArray:K}=Array,te=we("undefined");function wn(e){return e!==null&&!te(e)&&e.constructor!==null&&!te(e.constructor)&&P(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ct=D("ArrayBuffer");function xn(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ct(e.buffer),t}const En=we("string"),P=we("function"),At=we("number"),xe=e=>e!==null&&typeof e=="object",Sn=e=>e===!0||e===!1,ce=e=>{if(ye(e)!=="object")return!1;const t=$e(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(kt in e)&&!(ge in e)},vn=D("Date"),Rn=D("File"),Tn=D("Blob"),kn=D("FileList"),Cn=e=>xe(e)&&P(e.pipe),An=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||P(e.append)&&((t=ye(e))==="formdata"||t==="object"&&P(e.toString)&&e.toString()==="[object FormData]"))},On=D("URLSearchParams"),[Fn,Pn,Bn,Nn]=["ReadableStream","Request","Response","Headers"].map(D),Dn=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 i=n?Object.getOwnPropertyNames(e):Object.keys(e),s=i.length;let a;for(r=0;r<s;r++)a=i[r],t.call(null,e[a],a,e)}}function Ot(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,Ft=e=>!te(e)&&e!==q;function Pe(){const{caseless:e}=Ft(this)&&this||{},t={},n=(r,o)=>{const i=e&&Ot(t,o)||o;ce(t[i])&&ce(r)?t[i]=Pe(t[i],r):ce(r)?t[i]=Pe({},r):K(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&oe(arguments[r],n);return t}const Un=(e,t,n,{allOwnKeys:r}={})=>(oe(t,(o,i)=>{n&&P(o)?e[i]=Tt(o,n):e[i]=o},{allOwnKeys:r}),e),In=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Ln=(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)},zn=(e,t,n,r)=>{let o,i,s;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],(!r||r(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=n!==!1&&$e(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Hn=(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},jn=e=>{if(!e)return null;if(K(e))return e;let t=e.length;if(!At(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Mn=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&$e(Uint8Array)),$n=(e,t)=>{const r=(e&&e[ge]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},qn=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Wn=D("HTMLFormElement"),Jn=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Ye=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Vn=D("RegExp"),Pt=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};oe(n,(o,i)=>{let s;(s=t(o,i,e))!==!1&&(r[i]=s||o)}),Object.defineProperties(e,r)},Gn=e=>{Pt(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+"'")})}})},Kn=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return K(e)?r(e):r(String(e).split(t)),n},Xn=()=>{},Zn=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Qn(e){return!!(e&&P(e.append)&&e[kt]==="FormData"&&e[ge])}const Yn=e=>{const t=new Array(10),n=(r,o)=>{if(xe(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=K(r)?[]:{};return oe(r,(s,a)=>{const c=n(s,o+1);!te(c)&&(i[a]=c)}),t[o]=void 0,i}}return r};return n(e,0)},er=D("AsyncFunction"),tr=e=>e&&(xe(e)||P(e))&&P(e.then)&&P(e.catch),Bt=((e,t)=>e?setImmediate:t?((n,r)=>(q.addEventListener("message",({source:o,data:i})=>{o===q&&i===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)),nr=typeof queueMicrotask<"u"?queueMicrotask.bind(q):typeof process<"u"&&process.nextTick||Bt,rr=e=>e!=null&&P(e[ge]),d={isArray:K,isArrayBuffer:Ct,isBuffer:wn,isFormData:An,isArrayBufferView:xn,isString:En,isNumber:At,isBoolean:Sn,isObject:xe,isPlainObject:ce,isReadableStream:Fn,isRequest:Pn,isResponse:Bn,isHeaders:Nn,isUndefined:te,isDate:vn,isFile:Rn,isBlob:Tn,isRegExp:Vn,isFunction:P,isStream:Cn,isURLSearchParams:On,isTypedArray:Mn,isFileList:kn,forEach:oe,merge:Pe,extend:Un,trim:Dn,stripBOM:In,inherits:Ln,toFlatObject:zn,kindOf:ye,kindOfTest:D,endsWith:Hn,toArray:jn,forEachEntry:$n,matchAll:qn,isHTMLForm:Wn,hasOwnProperty:Ye,hasOwnProp:Ye,reduceDescriptors:Pt,freezeMethods:Gn,toObjectSet:Kn,toCamelCase:Jn,noop:Xn,toFiniteNumber:Zn,findKey:Ot,global:q,isContextDefined:Ft,isSpecCompliantForm:Qn,toJSONObject:Yn,isAsyncFn:er,isThenable:tr,setImmediate:Bt,asap:nr,isIterable:rr};function x(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(x,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 Nt=x.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(x,Dt);Object.defineProperty(Nt,"isAxiosError",{value:!0});x.from=(e,t,n,r,o,i)=>{const s=Object.create(Nt);return d.toFlatObject(e,s,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),x.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const or=null;function Be(e){return d.isPlainObject(e)||d.isArray(e)}function Ut(e){return d.endsWith(e,"[]")?e.slice(0,-2):e}function et(e,t,n){return e?e.concat(t).map(function(o,i){return o=Ut(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function ir(e){return d.isArray(e)&&!e.some(Be)}const sr=d.toFlatObject(d,{},null,function(t){return/^is[A-Z]/.test(t)});function Ee(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(g,_){return!d.isUndefined(_[g])});const r=n.metaTokens,o=n.visitor||f,i=n.dots,s=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 x("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,g,_){let w=p;if(p&&!_&&typeof p=="object"){if(d.endsWith(g,"{}"))g=r?g:g.slice(0,-2),p=JSON.stringify(p);else if(d.isArray(p)&&ir(p)||(d.isFileList(p)||d.endsWith(g,"[]"))&&(w=d.toArray(p)))return g=Ut(g),w.forEach(function(S,v){!(d.isUndefined(S)||S===null)&&t.append(s===!0?et([g],v,i):s===null?g:g+"[]",u(S))}),!1}return Be(p)?!0:(t.append(et(_,g,i),u(p)),!1)}const l=[],h=Object.assign(sr,{defaultVisitor:f,convertValue:u,isVisitable:Be});function m(p,g){if(!d.isUndefined(p)){if(l.indexOf(p)!==-1)throw Error("Circular reference detected in "+g.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,g,h))===!0&&m(w,g?g.concat(y):[y])}),l.pop()}}if(!d.isObject(e))throw new TypeError("data must be an object");return m(e),t}function tt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function qe(e,t){this._pairs=[],e&&Ee(e,this,t)}const It=qe.prototype;It.append=function(t,n){this._pairs.push([t,n])};It.toString=function(t){const n=t?function(r){return t.call(this,r,tt)}:tt;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function ar(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Lt(e,t,n){if(!t)return e;const r=n&&n.encode||ar;d.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(o?i=o(t,n):i=d.isURLSearchParams(t)?t.toString():new qe(t,n).toString(r),i){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class nt{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 zt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},lr=typeof URLSearchParams<"u"?URLSearchParams:qe,cr=typeof FormData<"u"?FormData:null,ur=typeof Blob<"u"?Blob:null,fr={isBrowser:!0,classes:{URLSearchParams:lr,FormData:cr,Blob:ur},protocols:["http","https","file","blob","url","data"]},We=typeof window<"u"&&typeof document<"u",Ne=typeof navigator=="object"&&navigator||void 0,dr=We&&(!Ne||["ReactNative","NativeScript","NS"].indexOf(Ne.product)<0),pr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",hr=We&&window.location.href||"http://localhost",_r=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:We,hasStandardBrowserEnv:dr,hasStandardBrowserWebWorkerEnv:pr,navigator:Ne,origin:hr},Symbol.toStringTag,{value:"Module"})),F={..._r,...fr};function mr(e,t){return Ee(e,new F.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return F.isNode&&d.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function br(e){return d.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function gr(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}function Ht(e){function t(n,r,o,i){let s=n[i++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),c=i>=n.length;return s=!s&&d.isArray(o)?o.length:s,c?(d.hasOwnProp(o,s)?o[s]=[o[s],r]:o[s]=r,!a):((!o[s]||!d.isObject(o[s]))&&(o[s]=[]),t(n,r,o[s],i)&&d.isArray(o[s])&&(o[s]=gr(o[s])),!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 yr(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:zt,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=d.isObject(t);if(i&&d.isHTMLForm(t)&&(t=new FormData(t)),d.isFormData(t))return o?JSON.stringify(Ht(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(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return mr(t,this.formSerializer).toString();if((a=d.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Ee(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),yr(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 s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(a){if(s)throw a.name==="SyntaxError"?x.from(a,x.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 wr=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"]),xr=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 gn(){console.log("Current time:",new Date().toISOString())}function Tt(e,t){return function(){return e.apply(t,arguments)}}const{toString:yn}=Object.prototype,{getPrototypeOf:$e}=Object,{iterator:ge,toStringTag:kt}=Symbol,ye=(e=>t=>{const n=yn.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),U=e=>(e=e.toLowerCase(),t=>ye(t)===e),we=e=>t=>typeof t===e,{isArray:K}=Array,te=we("undefined");function wn(e){return e!==null&&!te(e)&&e.constructor!==null&&!te(e.constructor)&&P(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ct=U("ArrayBuffer");function xn(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ct(e.buffer),t}const En=we("string"),P=we("function"),At=we("number"),xe=e=>e!==null&&typeof e=="object",Sn=e=>e===!0||e===!1,ce=e=>{if(ye(e)!=="object")return!1;const t=$e(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(kt in e)&&!(ge in e)},vn=U("Date"),Rn=U("File"),Tn=U("Blob"),kn=U("FileList"),Cn=e=>xe(e)&&P(e.pipe),An=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||P(e.append)&&((t=ye(e))==="formdata"||t==="object"&&P(e.toString)&&e.toString()==="[object FormData]"))},On=U("URLSearchParams"),[Fn,Pn,Bn,Nn]=["ReadableStream","Request","Response","Headers"].map(U),Un=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 i=n?Object.getOwnPropertyNames(e):Object.keys(e),s=i.length;let a;for(r=0;r<s;r++)a=i[r],t.call(null,e[a],a,e)}}function Ot(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,Ft=e=>!te(e)&&e!==q;function Pe(){const{caseless:e}=Ft(this)&&this||{},t={},n=(r,o)=>{const i=e&&Ot(t,o)||o;ce(t[i])&&ce(r)?t[i]=Pe(t[i],r):ce(r)?t[i]=Pe({},r):K(r)?t[i]=r.slice():t[i]=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,i)=>{n&&P(o)?e[i]=Tt(o,n):e[i]=o},{allOwnKeys:r}),e),In=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Ln=(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)},zn=(e,t,n,r)=>{let o,i,s;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],(!r||r(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=n!==!1&&$e(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Hn=(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},jn=e=>{if(!e)return null;if(K(e))return e;let t=e.length;if(!At(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Mn=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&$e(Uint8Array)),$n=(e,t)=>{const r=(e&&e[ge]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},qn=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Wn=U("HTMLFormElement"),Jn=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Ye=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Vn=U("RegExp"),Pt=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};oe(n,(o,i)=>{let s;(s=t(o,i,e))!==!1&&(r[i]=s||o)}),Object.defineProperties(e,r)},Gn=e=>{Pt(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+"'")})}})},Kn=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return K(e)?r(e):r(String(e).split(t)),n},Xn=()=>{},Zn=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Qn(e){return!!(e&&P(e.append)&&e[kt]==="FormData"&&e[ge])}const Yn=e=>{const t=new Array(10),n=(r,o)=>{if(xe(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=K(r)?[]:{};return oe(r,(s,a)=>{const c=n(s,o+1);!te(c)&&(i[a]=c)}),t[o]=void 0,i}}return r};return n(e,0)},er=U("AsyncFunction"),tr=e=>e&&(xe(e)||P(e))&&P(e.then)&&P(e.catch),Bt=((e,t)=>e?setImmediate:t?((n,r)=>(q.addEventListener("message",({source:o,data:i})=>{o===q&&i===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)),nr=typeof queueMicrotask<"u"?queueMicrotask.bind(q):typeof process<"u"&&process.nextTick||Bt,rr=e=>e!=null&&P(e[ge]),d={isArray:K,isArrayBuffer:Ct,isBuffer:wn,isFormData:An,isArrayBufferView:xn,isString:En,isNumber:At,isBoolean:Sn,isObject:xe,isPlainObject:ce,isReadableStream:Fn,isRequest:Pn,isResponse:Bn,isHeaders:Nn,isUndefined:te,isDate:vn,isFile:Rn,isBlob:Tn,isRegExp:Vn,isFunction:P,isStream:Cn,isURLSearchParams:On,isTypedArray:Mn,isFileList:kn,forEach:oe,merge:Pe,extend:Dn,trim:Un,stripBOM:In,inherits:Ln,toFlatObject:zn,kindOf:ye,kindOfTest:U,endsWith:Hn,toArray:jn,forEachEntry:$n,matchAll:qn,isHTMLForm:Wn,hasOwnProperty:Ye,hasOwnProp:Ye,reduceDescriptors:Pt,freezeMethods:Gn,toObjectSet:Kn,toCamelCase:Jn,noop:Xn,toFiniteNumber:Zn,findKey:Ot,global:q,isContextDefined:Ft,isSpecCompliantForm:Qn,toJSONObject:Yn,isAsyncFn:er,isThenable:tr,setImmediate:Bt,asap:nr,isIterable:rr};function x(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(x,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 Nt=x.prototype,Ut={};["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=>{Ut[e]={value:e}});Object.defineProperties(x,Ut);Object.defineProperty(Nt,"isAxiosError",{value:!0});x.from=(e,t,n,r,o,i)=>{const s=Object.create(Nt);return d.toFlatObject(e,s,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),x.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const or=null;function Be(e){return d.isPlainObject(e)||d.isArray(e)}function Dt(e){return d.endsWith(e,"[]")?e.slice(0,-2):e}function et(e,t,n){return e?e.concat(t).map(function(o,i){return o=Dt(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function ir(e){return d.isArray(e)&&!e.some(Be)}const sr=d.toFlatObject(d,{},null,function(t){return/^is[A-Z]/.test(t)});function Ee(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(g,_){return!d.isUndefined(_[g])});const r=n.metaTokens,o=n.visitor||f,i=n.dots,s=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 x("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,g,_){let w=p;if(p&&!_&&typeof p=="object"){if(d.endsWith(g,"{}"))g=r?g:g.slice(0,-2),p=JSON.stringify(p);else if(d.isArray(p)&&ir(p)||(d.isFileList(p)||d.endsWith(g,"[]"))&&(w=d.toArray(p)))return g=Dt(g),w.forEach(function(S,v){!(d.isUndefined(S)||S===null)&&t.append(s===!0?et([g],v,i):s===null?g:g+"[]",u(S))}),!1}return Be(p)?!0:(t.append(et(_,g,i),u(p)),!1)}const l=[],h=Object.assign(sr,{defaultVisitor:f,convertValue:u,isVisitable:Be});function m(p,g){if(!d.isUndefined(p)){if(l.indexOf(p)!==-1)throw Error("Circular reference detected in "+g.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,g,h))===!0&&m(w,g?g.concat(y):[y])}),l.pop()}}if(!d.isObject(e))throw new TypeError("data must be an object");return m(e),t}function tt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function qe(e,t){this._pairs=[],e&&Ee(e,this,t)}const It=qe.prototype;It.append=function(t,n){this._pairs.push([t,n])};It.toString=function(t){const n=t?function(r){return t.call(this,r,tt)}:tt;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function ar(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Lt(e,t,n){if(!t)return e;const r=n&&n.encode||ar;d.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(o?i=o(t,n):i=d.isURLSearchParams(t)?t.toString():new qe(t,n).toString(r),i){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class nt{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 zt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},lr=typeof URLSearchParams<"u"?URLSearchParams:qe,cr=typeof FormData<"u"?FormData:null,ur=typeof Blob<"u"?Blob:null,fr={isBrowser:!0,classes:{URLSearchParams:lr,FormData:cr,Blob:ur},protocols:["http","https","file","blob","url","data"]},We=typeof window<"u"&&typeof document<"u",Ne=typeof navigator=="object"&&navigator||void 0,dr=We&&(!Ne||["ReactNative","NativeScript","NS"].indexOf(Ne.product)<0),pr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",hr=We&&window.location.href||"http://localhost",_r=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:We,hasStandardBrowserEnv:dr,hasStandardBrowserWebWorkerEnv:pr,navigator:Ne,origin:hr},Symbol.toStringTag,{value:"Module"})),F={..._r,...fr};function mr(e,t){return Ee(e,new F.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return F.isNode&&d.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function br(e){return d.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function gr(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}function Ht(e){function t(n,r,o,i){let s=n[i++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),c=i>=n.length;return s=!s&&d.isArray(o)?o.length:s,c?(d.hasOwnProp(o,s)?o[s]=[o[s],r]:o[s]=r,!a):((!o[s]||!d.isObject(o[s]))&&(o[s]=[]),t(n,r,o[s],i)&&d.isArray(o[s])&&(o[s]=gr(o[s])),!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 yr(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:zt,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=d.isObject(t);if(i&&d.isHTMLForm(t)&&(t=new FormData(t)),d.isFormData(t))return o?JSON.stringify(Ht(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(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return mr(t,this.formSerializer).toString();if((a=d.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Ee(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),yr(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 s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(a){if(s)throw a.name==="SyntaxError"?x.from(a,x.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 wr=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"]),xr=e=>{const t={};let n,r,o;return e&&e.split(`
2
2
  `).forEach(function(s){o=s.indexOf(":"),n=s.substring(0,o).trim().toLowerCase(),r=s.substring(o+1).trim(),!(!n||t[n]&&wr[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},rt=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 Er(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 Sr=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ce(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 vr(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Rr(e,t){const n=d.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,s){return this[r].call(this,t,o,i,s)},configurable:!0})})}let B=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(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 s=(a,c)=>d.forEach(a,(u,f)=>i(u,f,c));if(d.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(d.isString(t)&&(t=t.trim())&&!Sr(t))s(xr(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]}s(a,n)}else t!=null&&i(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 Er(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||Ce(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(s){if(s=Y(s),s){const a=d.findKey(r,s);a&&(!n||Ce(r,r[a],a,n))&&(delete r[a],o=!0)}}return d.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!t||Ce(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return d.forEach(this,(o,i)=>{const s=d.findKey(r,i);if(s){n[s]=ue(o),delete n[i];return}const a=t?vr(i):String(i).trim();a!==i&&delete n[i],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[rt]=this[rt]={accessors:{}}).accessors,o=this.prototype;function i(s){const a=Y(s);r[a]||(Rr(o,s),r[a]=!0)}return d.isArray(t)?t.forEach(i):i(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 Ae(e,t){const n=this||ie,r=t||n,o=B.from(r.headers);let i=r.data;return d.forEach(e,function(a){i=a.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function jt(e){return!!(e&&e.__CANCEL__)}function X(e,t,n){x.call(this,e??"canceled",x.ERR_CANCELED,t,n),this.name="CanceledError"}d.inherits(X,x,{__CANCEL__:!0});function Mt(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new x("Request failed with status code "+n.status,[x.ERR_BAD_REQUEST,x.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Tr(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function kr(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,s;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),f=r[i];s||(s=u),n[o]=c,r[o]=u;let l=i,h=0;for(;l!==o;)h+=n[l++],l=l%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),u-s<t)return;const m=f&&u-f;return m?Math.round(h*1e3/m):void 0}}function Cr(e,t){let n=0,r=1e3/t,o,i;const s=(u,f=Date.now())=>{n=f,o=null,i&&(clearTimeout(i),i=null),e.apply(null,u)};return[(...u)=>{const f=Date.now(),l=f-n;l>=r?s(u,f):(o=u,i||(i=setTimeout(()=>{i=null,s(o)},r-l)))},()=>o&&s(o)]}const he=(e,t,n=3)=>{let r=0;const o=kr(50,250);return Cr(i=>{const s=i.loaded,a=i.lengthComputable?i.total:void 0,c=s-r,u=o(c),f=s<=a;r=s;const l={loaded:s,total:a,progress:a?s/a:void 0,bytes:c,rate:u||void 0,estimated:u&&a&&f?(a-s)/u:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(l)},n)},ot=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},it=e=>(...t)=>d.asap(()=>e(...t)),Ar=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,Or=F.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const s=[e+"="+encodeURIComponent(t)];d.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),d.isString(r)&&s.push("path="+r),d.isString(o)&&s.push("domain="+o),i===!0&&s.push("secure"),document.cookie=s.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 Fr(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Pr(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function $t(e,t,n){let r=!Fr(t);return e&&(r||n==!1)?Pr(e,t):t}const st=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 i(u,f){if(!d.isUndefined(f))return r(void 0,f)}function s(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:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(u,f,l)=>o(st(u),st(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 qt=e=>{const t=J({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:a}=t;t.headers=s=B.from(s),t.url=Lt($t(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let c;if(d.isFormData(n)){if(F.hasStandardBrowserEnv||F.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((c=s.getContentType())!==!1){const[u,...f]=c?c.split(";").map(l=>l.trim()).filter(Boolean):[];s.setContentType([u||"multipart/form-data",...f].join("; "))}}if(F.hasStandardBrowserEnv&&(r&&d.isFunction(r)&&(r=r(t)),r||r!==!1&&Ar(t.url))){const u=o&&i&&Or.read(i);u&&s.set(o,u)}return t},Br=typeof XMLHttpRequest<"u",Nr=Br&&function(e){return new Promise(function(n,r){const o=qt(e);let i=o.data;const s=B.from(o.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:u}=o,f,l,h,m,p;function g(){m&&m(),p&&p(),o.cancelToken&&o.cancelToken.unsubscribe(f),o.signal&&o.signal.removeEventListener("abort",f)}let _=new XMLHttpRequest;_.open(o.method.toUpperCase(),o.url,!0),_.timeout=o.timeout;function w(){if(!_)return;const S=B.from("getAllResponseHeaders"in _&&_.getAllResponseHeaders()),T={data:!a||a==="text"||a==="json"?_.responseText:_.response,status:_.status,statusText:_.statusText,headers:S,config:e,request:_};Mt(function(N){n(N),g()},function(N){r(N),g()},T),_=null}"onloadend"in _?_.onloadend=w:_.onreadystatechange=function(){!_||_.readyState!==4||_.status===0&&!(_.responseURL&&_.responseURL.indexOf("file:")===0)||setTimeout(w)},_.onabort=function(){_&&(r(new x("Request aborted",x.ECONNABORTED,e,_)),_=null)},_.onerror=function(){r(new x("Network Error",x.ERR_NETWORK,e,_)),_=null},_.ontimeout=function(){let v=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const T=o.transitional||zt;o.timeoutErrorMessage&&(v=o.timeoutErrorMessage),r(new x(v,T.clarifyTimeoutError?x.ETIMEDOUT:x.ECONNABORTED,e,_)),_=null},i===void 0&&s.setContentType(null),"setRequestHeader"in _&&d.forEach(s.toJSON(),function(v,T){_.setRequestHeader(T,v)}),d.isUndefined(o.withCredentials)||(_.withCredentials=!!o.withCredentials),a&&a!=="json"&&(_.responseType=o.responseType),u&&([h,p]=he(u,!0),_.addEventListener("progress",h)),c&&_.upload&&([l,m]=he(c),_.upload.addEventListener("progress",l),_.upload.addEventListener("loadend",m)),(o.cancelToken||o.signal)&&(f=S=>{_&&(r(!S||S.type?new X(null,e,_):S),_.abort(),_=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const y=Tr(o.url);if(y&&F.protocols.indexOf(y)===-1){r(new x("Unsupported protocol "+y+":",x.ERR_BAD_REQUEST,e));return}_.send(i||null)})},Dr=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const i=function(u){if(!o){o=!0,a();const f=u instanceof Error?u:this.reason;r.abort(f instanceof x?f:new X(f instanceof Error?f.message:f))}};let s=t&&setTimeout(()=>{s=null,i(new x(`timeout ${t} of ms exceeded`,x.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));const{signal:c}=r;return c.unsubscribe=()=>d.asap(a),c}},Ur=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},Ir=async function*(e,t){for await(const n of Lr(e))yield*Ur(n,t)},Lr=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()}},at=(e,t,n,r)=>{const o=Ir(e,t);let i=0,s,a=c=>{s||(s=!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=i+=l;n(h)}c.enqueue(new Uint8Array(f))}catch(u){throw a(u),u}},cancel(c){return a(c),o.return()}},{highWaterMark:2})},Se=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Wt=Se&&typeof ReadableStream=="function",zr=Se&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Jt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Hr=Wt&&Jt(()=>{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}),lt=64*1024,De=Wt&&Jt(()=>d.isReadableStream(new Response("").body)),_e={stream:De&&(e=>e.body)};Se&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!_e[t]&&(_e[t]=d.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new x(`Response type '${t}' is not supported`,x.ERR_NOT_SUPPORT,r)})})})(new Response);const jr=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 zr(e)).byteLength},Mr=async(e,t)=>{const n=d.toFiniteNumber(e.getContentLength());return n??jr(t)},$r=Se&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:s,onDownloadProgress:a,onUploadProgress:c,responseType:u,headers:f,withCredentials:l="same-origin",fetchOptions:h}=qt(e);u=u?(u+"").toLowerCase():"text";let m=Dr([o,i&&i.toAbortSignal()],s),p;const g=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let _;try{if(c&&Hr&&n!=="get"&&n!=="head"&&(_=await Mr(f,r))!==0){let T=new Request(t,{method:"POST",body:r,duplex:"half"}),O;if(d.isFormData(r)&&(O=T.headers.get("content-type"))&&f.setContentType(O),T.body){const[N,z]=ot(_,he(it(c)));r=at(T.body,lt,N,z)}}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 S=De&&(u==="stream"||u==="response");if(De&&(a||S&&g)){const T={};["status","statusText","headers"].forEach(j=>{T[j]=y[j]});const O=d.toFiniteNumber(y.headers.get("content-length")),[N,z]=a&&ot(O,he(it(a),!0))||[];y=new Response(at(y.body,lt,N,()=>{z&&z(),g&&g()}),T)}u=u||"text";let v=await _e[d.findKey(_e,u)||"text"](y,e);return!S&&g&&g(),await new Promise((T,O)=>{Mt(T,O,{data:v,headers:B.from(y.headers),status:y.status,statusText:y.statusText,config:e,request:p})})}catch(w){throw g&&g(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new x("Network Error",x.ERR_NETWORK,e,p),{cause:w.cause||w}):x.from(w,w&&w.code,e,p)}}),Ue={http:or,xhr:Nr,fetch:$r};d.forEach(Ue,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const ct=e=>`- ${e}`,qr=e=>d.isFunction(e)||e===null||e===!1,Vt={getAdapter:e=>{e=d.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){n=e[i];let s;if(r=n,!qr(n)&&(r=Ue[(s=String(n)).toLowerCase()],r===void 0))throw new x(`Unknown adapter '${s}'`);if(r)break;o[s||"#"+i]=r}if(!r){const i=Object.entries(o).map(([a,c])=>`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build"));let s=t?i.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[rt]=this[rt]={accessors:{}}).accessors,o=this.prototype;function i(s){const a=Y(s);r[a]||(Rr(o,s),r[a]=!0)}return d.isArray(t)?t.forEach(i):i(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 Ae(e,t){const n=this||ie,r=t||n,o=B.from(r.headers);let i=r.data;return d.forEach(e,function(a){i=a.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function jt(e){return!!(e&&e.__CANCEL__)}function X(e,t,n){x.call(this,e??"canceled",x.ERR_CANCELED,t,n),this.name="CanceledError"}d.inherits(X,x,{__CANCEL__:!0});function Mt(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new x("Request failed with status code "+n.status,[x.ERR_BAD_REQUEST,x.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Tr(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function kr(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,s;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),f=r[i];s||(s=u),n[o]=c,r[o]=u;let l=i,h=0;for(;l!==o;)h+=n[l++],l=l%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),u-s<t)return;const m=f&&u-f;return m?Math.round(h*1e3/m):void 0}}function Cr(e,t){let n=0,r=1e3/t,o,i;const s=(u,f=Date.now())=>{n=f,o=null,i&&(clearTimeout(i),i=null),e.apply(null,u)};return[(...u)=>{const f=Date.now(),l=f-n;l>=r?s(u,f):(o=u,i||(i=setTimeout(()=>{i=null,s(o)},r-l)))},()=>o&&s(o)]}const he=(e,t,n=3)=>{let r=0;const o=kr(50,250);return Cr(i=>{const s=i.loaded,a=i.lengthComputable?i.total:void 0,c=s-r,u=o(c),f=s<=a;r=s;const l={loaded:s,total:a,progress:a?s/a:void 0,bytes:c,rate:u||void 0,estimated:u&&a&&f?(a-s)/u:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(l)},n)},ot=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},it=e=>(...t)=>d.asap(()=>e(...t)),Ar=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,Or=F.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const s=[e+"="+encodeURIComponent(t)];d.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),d.isString(r)&&s.push("path="+r),d.isString(o)&&s.push("domain="+o),i===!0&&s.push("secure"),document.cookie=s.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 Fr(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Pr(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function $t(e,t,n){let r=!Fr(t);return e&&(r||n==!1)?Pr(e,t):t}const st=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 i(u,f){if(!d.isUndefined(f))return r(void 0,f)}function s(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:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(u,f,l)=>o(st(u),st(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 qt=e=>{const t=J({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:a}=t;t.headers=s=B.from(s),t.url=Lt($t(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let c;if(d.isFormData(n)){if(F.hasStandardBrowserEnv||F.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((c=s.getContentType())!==!1){const[u,...f]=c?c.split(";").map(l=>l.trim()).filter(Boolean):[];s.setContentType([u||"multipart/form-data",...f].join("; "))}}if(F.hasStandardBrowserEnv&&(r&&d.isFunction(r)&&(r=r(t)),r||r!==!1&&Ar(t.url))){const u=o&&i&&Or.read(i);u&&s.set(o,u)}return t},Br=typeof XMLHttpRequest<"u",Nr=Br&&function(e){return new Promise(function(n,r){const o=qt(e);let i=o.data;const s=B.from(o.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:u}=o,f,l,h,m,p;function g(){m&&m(),p&&p(),o.cancelToken&&o.cancelToken.unsubscribe(f),o.signal&&o.signal.removeEventListener("abort",f)}let _=new XMLHttpRequest;_.open(o.method.toUpperCase(),o.url,!0),_.timeout=o.timeout;function w(){if(!_)return;const S=B.from("getAllResponseHeaders"in _&&_.getAllResponseHeaders()),T={data:!a||a==="text"||a==="json"?_.responseText:_.response,status:_.status,statusText:_.statusText,headers:S,config:e,request:_};Mt(function(N){n(N),g()},function(N){r(N),g()},T),_=null}"onloadend"in _?_.onloadend=w:_.onreadystatechange=function(){!_||_.readyState!==4||_.status===0&&!(_.responseURL&&_.responseURL.indexOf("file:")===0)||setTimeout(w)},_.onabort=function(){_&&(r(new x("Request aborted",x.ECONNABORTED,e,_)),_=null)},_.onerror=function(){r(new x("Network Error",x.ERR_NETWORK,e,_)),_=null},_.ontimeout=function(){let v=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const T=o.transitional||zt;o.timeoutErrorMessage&&(v=o.timeoutErrorMessage),r(new x(v,T.clarifyTimeoutError?x.ETIMEDOUT:x.ECONNABORTED,e,_)),_=null},i===void 0&&s.setContentType(null),"setRequestHeader"in _&&d.forEach(s.toJSON(),function(v,T){_.setRequestHeader(T,v)}),d.isUndefined(o.withCredentials)||(_.withCredentials=!!o.withCredentials),a&&a!=="json"&&(_.responseType=o.responseType),u&&([h,p]=he(u,!0),_.addEventListener("progress",h)),c&&_.upload&&([l,m]=he(c),_.upload.addEventListener("progress",l),_.upload.addEventListener("loadend",m)),(o.cancelToken||o.signal)&&(f=S=>{_&&(r(!S||S.type?new X(null,e,_):S),_.abort(),_=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const y=Tr(o.url);if(y&&F.protocols.indexOf(y)===-1){r(new x("Unsupported protocol "+y+":",x.ERR_BAD_REQUEST,e));return}_.send(i||null)})},Ur=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const i=function(u){if(!o){o=!0,a();const f=u instanceof Error?u:this.reason;r.abort(f instanceof x?f:new X(f instanceof Error?f.message:f))}};let s=t&&setTimeout(()=>{s=null,i(new x(`timeout ${t} of ms exceeded`,x.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));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},Ir=async function*(e,t){for await(const n of Lr(e))yield*Dr(n,t)},Lr=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()}},at=(e,t,n,r)=>{const o=Ir(e,t);let i=0,s,a=c=>{s||(s=!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=i+=l;n(h)}c.enqueue(new Uint8Array(f))}catch(u){throw a(u),u}},cancel(c){return a(c),o.return()}},{highWaterMark:2})},Se=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Wt=Se&&typeof ReadableStream=="function",zr=Se&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Jt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Hr=Wt&&Jt(()=>{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}),lt=64*1024,Ue=Wt&&Jt(()=>d.isReadableStream(new Response("").body)),_e={stream:Ue&&(e=>e.body)};Se&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!_e[t]&&(_e[t]=d.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new x(`Response type '${t}' is not supported`,x.ERR_NOT_SUPPORT,r)})})})(new Response);const jr=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 zr(e)).byteLength},Mr=async(e,t)=>{const n=d.toFiniteNumber(e.getContentLength());return n??jr(t)},$r=Se&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:s,onDownloadProgress:a,onUploadProgress:c,responseType:u,headers:f,withCredentials:l="same-origin",fetchOptions:h}=qt(e);u=u?(u+"").toLowerCase():"text";let m=Ur([o,i&&i.toAbortSignal()],s),p;const g=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let _;try{if(c&&Hr&&n!=="get"&&n!=="head"&&(_=await Mr(f,r))!==0){let T=new Request(t,{method:"POST",body:r,duplex:"half"}),O;if(d.isFormData(r)&&(O=T.headers.get("content-type"))&&f.setContentType(O),T.body){const[N,z]=ot(_,he(it(c)));r=at(T.body,lt,N,z)}}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 S=Ue&&(u==="stream"||u==="response");if(Ue&&(a||S&&g)){const T={};["status","statusText","headers"].forEach(M=>{T[M]=y[M]});const O=d.toFiniteNumber(y.headers.get("content-length")),[N,z]=a&&ot(O,he(it(a),!0))||[];y=new Response(at(y.body,lt,N,()=>{z&&z(),g&&g()}),T)}u=u||"text";let v=await _e[d.findKey(_e,u)||"text"](y,e);return!S&&g&&g(),await new Promise((T,O)=>{Mt(T,O,{data:v,headers:B.from(y.headers),status:y.status,statusText:y.statusText,config:e,request:p})})}catch(w){throw g&&g(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new x("Network Error",x.ERR_NETWORK,e,p),{cause:w.cause||w}):x.from(w,w&&w.code,e,p)}}),De={http:or,xhr:Nr,fetch:$r};d.forEach(De,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const ct=e=>`- ${e}`,qr=e=>d.isFunction(e)||e===null||e===!1,Vt={getAdapter:e=>{e=d.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){n=e[i];let s;if(r=n,!qr(n)&&(r=De[(s=String(n)).toLowerCase()],r===void 0))throw new x(`Unknown adapter '${s}'`);if(r)break;o[s||"#"+i]=r}if(!r){const i=Object.entries(o).map(([a,c])=>`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build"));let s=t?i.length>1?`since :
4
4
  `+i.map(ct).join(`
5
- `):" "+ct(i[0]):"as no adapter specified";throw new x("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:Ue};function Oe(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new X(null,e)}function ut(e){return Oe(e),e.headers=B.from(e.headers),e.data=Ae.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Vt.getAdapter(e.adapter||ie.adapter)(e).then(function(r){return Oe(e),r.data=Ae.call(e,e.transformResponse,r),r.headers=B.from(r.headers),r},function(r){return jt(r)||(Oe(e),r&&r.response&&(r.response.data=Ae.call(e,e.transformResponse,r.response),r.response.headers=B.from(r.response.headers))),Promise.reject(r)})}const Gt="1.10.0",ve={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ve[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const ft={};ve.transitional=function(t,n,r){function o(i,s){return"[Axios v"+Gt+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,a)=>{if(t===!1)throw new x(o(s," has been removed"+(n?" in "+n:"")),x.ERR_DEPRECATED);return n&&!ft[s]&&(ft[s]=!0,console.warn(o(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,s,a):!0}};ve.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Wr(e,t,n){if(typeof e!="object")throw new x("options must be an object",x.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],s=t[i];if(s){const a=e[i],c=a===void 0||s(a,i,e);if(c!==!0)throw new x("option "+i+" must be "+c,x.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new x("Unknown option "+i,x.ERR_BAD_OPTION)}}const fe={assertOptions:Wr,validators:ve},I=fe.validators;let W=class{constructor(t){this.defaults=t||{},this.interceptors={request:new nt,response:new nt}}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 i=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
6
- `+i):r.stack=i}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:i}=n;r!==void 0&&fe.assertOptions(r,{silentJSONParsing:I.transitional(I.boolean),forcedJSONParsing:I.transitional(I.boolean),clarifyTimeoutError:I.transitional(I.boolean)},!1),o!=null&&(d.isFunction(o)?n.paramsSerializer={serialize:o}:fe.assertOptions(o,{encode:I.function,serialize:I.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),fe.assertOptions(n,{baseUrl:I.spelling("baseURL"),withXsrfToken:I.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&d.merge(i.common,i[n.method]);i&&d.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),n.headers=B.concat(s,i);const a=[];let c=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(c=c&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let f,l=0,h;if(!c){const p=[ut.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++],g=a[l++];try{m=p(m)}catch(_){g.call(this,_);break}}try{f=ut.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=$t(t.baseURL,t.url,t.allowAbsoluteUrls);return Lt(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(i,s,a){return this.request(J(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}W.prototype[t]=n(),W.prototype[t+"Form"]=n(!0)});let Jr=class Kt{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(a=>{r.subscribe(a),i=a}).then(o);return s.cancel=function(){r.unsubscribe(i)},s},t(function(i,s,a){r.reason||(r.reason=new X(i,s,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 Kt(function(o){t=o}),cancel:t}}};function Vr(e){return function(n){return e.apply(null,n)}}function Gr(e){return d.isObject(e)&&e.isAxiosError===!0}const Ie={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(Ie).forEach(([e,t])=>{Ie[t]=e});function Xt(e){const t=new W(e),n=Tt(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 Xt(J(e,o))},n}const C=Xt(ie);C.Axios=W;C.CanceledError=X;C.CancelToken=Jr;C.isCancel=jt;C.VERSION=Gt;C.toFormData=Ee;C.AxiosError=x;C.Cancel=C.CanceledError;C.all=function(t){return Promise.all(t)};C.spread=Vr;C.isAxiosError=Gr;C.mergeConfig=J;C.AxiosHeaders=B;C.formToJSON=e=>Ht(d.isHTMLForm(e)?new FormData(e):e);C.getAdapter=Vt.getAdapter;C.HttpStatusCode=Ie;C.default=C;const{Axios:Lo,AxiosError:zo,CanceledError:Ho,isCancel:jo,CancelToken:Mo,VERSION:$o,all:qo,Cancel:Wo,isAxiosError:Jo,spread:Vo,toFormData:Go,AxiosHeaders:Ko,HttpStatusCode:Xo,formToJSON:Zo,getAdapter:Qo,mergeConfig:Yo}=C;var se,R,Zt,$,dt,Qt,Yt,en,Je,Le,ze,ne={},tn=[],Kr=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Re=Array.isArray;function L(e,t){for(var n in t)e[n]=t[n];return e}function Ve(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function V(e,t,n){var r,o,i,s={};for(i in t)i=="key"?r=t[i]:i=="ref"?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?se.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return ee(e,s,r,o,null)}function ee(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++Zt,__i:-1,__u:0};return o==null&&R.vnode!=null&&R.vnode(i),i}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 nn(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 nn(e)}}function pt(e){(!e.__d&&(e.__d=!0)&&$.push(e)&&!me.__r++||dt!=R.debounceRendering)&&((dt=R.debounceRendering)||Qt)(me)}function me(){for(var e,t,n,r,o,i,s,a=1;$.length;)$.length>a&&$.sort(Yt),e=$.shift(),a=$.length,e.__d&&(n=void 0,o=(r=(t=e).__v).__e,i=[],s=[],t.__P&&((n=L({},r)).__v=r.__v+1,R.vnode&&R.vnode(n),Ge(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[o]:null,i,o??G(r),!!(32&r.__u),s),n.__v=r.__v,n.__.__k[n.__i]=n,sn(i,n,s),n.__e!=o&&nn(n)));me.__r=0}function rn(e,t,n,r,o,i,s,a,c,u,f){var l,h,m,p,g,_,w=r&&r.__k||tn,y=t.length;for(c=Xr(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,_=Ge(e,m,h,o,i,s,a,c,u,f),p=m.__e,m.ref&&h.ref!=m.ref&&(h.ref&&Ke(h.ref,null,m),f.push(m.ref,m.__c||p,m)),g==null&&p!=null&&(g=p),4&m.__u||h.__k===m.__k?c=on(m,c,e):typeof m.type=="function"&&_!==void 0?c=_:p&&(c=p.nextSibling),m.__u&=-7);return n.__e=g,c}function Xr(e,t,n,r,o){var i,s,a,c,u,f=n.length,l=f,h=0;for(e.__k=new Array(o),i=0;i<o;i++)(s=t[i])!=null&&typeof s!="boolean"&&typeof s!="function"?(c=i+h,(s=e.__k[i]=typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?ee(null,s,null,null,null):Re(s)?ee(Z,{children:s},null,null,null):s.constructor==null&&s.__b>0?ee(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s).__=e,s.__b=e.__b+1,a=null,(u=s.__i=Zr(s,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 s.type!="function"&&(s.__u|=4)):u!=c&&(u==c-1?h--:u==c+1?h++:(u>c?h--:h++,s.__u|=4))):e.__k[i]=null;if(l)for(i=0;i<f;i++)(a=n[i])!=null&&(2&a.__u)==0&&(a.__e==r&&(r=G(a)),ln(a,a));return r}function on(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=on(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 Zr(e,t,n,r){var o,i,s=e.key,a=e.type,c=t[n];if(c===null&&e.key==null||c&&s==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,i=n+1;o>=0||i<t.length;){if(o>=0){if((c=t[o])&&(2&c.__u)==0&&s==c.key&&a==c.type)return o;o--}if(i<t.length){if((c=t[i])&&(2&c.__u)==0&&s==c.key&&a==c.type)return i;i++}}return-1}function ht(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Kr.test(t)?n:n+"px"}function le(e,t,n,r,o){var i,s;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||ht(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||ht(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(en,"$1")),s=t.toLowerCase(),t=s in e||t=="onFocusOut"||t=="onFocusIn"?s.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=Je,e.addEventListener(t,i?ze:Le,i)):e.removeEventListener(t,i?ze:Le,i);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 _t(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=Je++;else if(t.t<n.u)return;return n(R.event?R.event(t):t)}}}function Ge(e,t,n,r,o,i,s,a,c,u){var f,l,h,m,p,g,_,w,y,S,v,T,O,N,z,j,ke,U=t.type;if(t.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),i=[a=t.__e=n.__e]),(f=R.__b)&&f(t);e:if(typeof U=="function")try{if(w=t.props,y="prototype"in U&&U.prototype.render,S=(f=U.contextType)&&r[f.__c],v=f?S?S.props.value:f.__:r,n.__c?_=(l=t.__c=n.__c).__=l.__E:(y?t.__c=l=new U(w,v):(t.__c=l=new de(w,v),l.constructor=U,l.render=Yr),S&&S.sub(l),l.props=w,l.state||(l.state={}),l.context=v,l.__n=r,h=l.__d=!0,l.__h=[],l._sb=[]),y&&l.__s==null&&(l.__s=l.state),y&&U.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=L({},l.__s)),L(l.__s,U.getDerivedStateFromProps(w,l.__s))),m=l.props,p=l.state,l.__v=t,h)y&&U.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),y&&l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(y&&U.getDerivedStateFromProps==null&&w!==m&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(w,v),!l.__e&&l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(w,l.__s,v)===!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)}),T=0;T<l._sb.length;T++)l.__h.push(l._sb[T]);l._sb=[],l.__h.length&&s.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(w,l.__s,v),y&&l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(m,p,g)})}if(l.context=v,l.props=w,l.__P=e,l.__e=!1,O=R.__r,N=0,y){for(l.state=l.__s,l.__d=!1,O&&O(t),f=l.render(l.props,l.state,l.context),z=0;z<l._sb.length;z++)l.__h.push(l._sb[z]);l._sb=[]}else do l.__d=!1,O&&O(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=L(L({},r),l.getChildContext())),y&&!h&&l.getSnapshotBeforeUpdate!=null&&(g=l.getSnapshotBeforeUpdate(m,p)),j=f,f!=null&&f.type===Z&&f.key==null&&(j=an(f.props.children)),a=rn(e,Re(j)?j:[j],t,n,r,o,i,s,a,c,u),l.base=t.__e,t.__u&=-161,l.__h.length&&s.push(l),_&&(l.__E=l.__=null)}catch(Q){if(t.__v=null,c||i!=null)if(Q.then){for(t.__u|=c?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;i[i.indexOf(a)]=null,t.__e=a}else for(ke=i.length;ke--;)Ve(i[ke]);else t.__e=n.__e,t.__k=n.__k;R.__e(Q,t,n)}else i==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=Qr(n.__e,t,n,r,o,i,s,c,u);return(f=R.diffed)&&f(t),128&t.__u?void 0:a}function sn(e,t,n){for(var r=0;r<n.length;r++)Ke(n[r],n[++r],n[++r]);R.__c&&R.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){R.__e(i,o.__v)}})}function an(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:Re(e)?e.map(an):L({},e)}function Qr(e,t,n,r,o,i,s,a,c){var u,f,l,h,m,p,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"),i!=null){for(u=0;u<i.length;u++)if((m=i[u])&&"setAttribute"in m==!!y&&(y?m.localName==y:m.nodeType==3)){e=m,i[u]=null;break}}if(e==null){if(y==null)return document.createTextNode(w);e=document.createElementNS(o,y,w.is&&w),a&&(R.__m&&R.__m(t,i),a=!1),i=null}if(y==null)_===w||a&&e.data==w||(e.data=w);else{if(i=i&&se.call(e.childNodes),_=n.props||ne,!a&&i!=null)for(_={},u=0;u<e.attributes.length;u++)_[(m=e.attributes[u]).name]=m.value;for(u in _)if(m=_[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"?g=m:a&&typeof m!="function"||_[u]===m||le(e,u,m,_[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=""),rn(t.type=="template"?e.content:e,Re(h)?h:[h],t,n,r,y=="foreignObject"?"http://www.w3.org/1999/xhtml":o,i,s,i?i[0]:n.__k&&G(n,0),a,c),i!=null)for(u=i.length;u--;)Ve(i[u]);a||(u="value",y=="progress"&&p==null?e.removeAttribute("value"):p!=null&&(p!==e[u]||y=="progress"&&!p||y=="option"&&p!=_[u])&&le(e,u,p,_[u],o),u="checked",g!=null&&g!=e[u]&&le(e,u,g,_[u],o))}return e}function Ke(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){R.__e(o,n)}}function ln(e,t,n){var r,o;if(R.unmount&&R.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||Ke(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){R.__e(i,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&ln(r[o],t,n||typeof e.type!="function");n||Ve(e.__e),e.__c=e.__=e.__e=void 0}function Yr(e,t,n){return this.constructor(e,n)}function Te(e,t,n){var r,o,i,s;t==document&&(t=document.documentElement),R.__&&R.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],s=[],Ge(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,i,!r&&n?n:o?o.__e:t.firstChild,r,s),sn(i,e,s)}function cn(e,t){Te(e,t,cn)}function un(e,t,n){var r,o,i,s,a=L({},e.props);for(i in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)i=="key"?r=t[i]:i=="ref"?o=t[i]:a[i]=t[i]===void 0&&s!=null?s[i]:t[i];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=tn.slice,R={__e:function(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(a){e=a}throw e}},Zt=0,de.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=L({},this.state),typeof e=="function"&&(e=e(L({},n),this.props)),e&&L(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),pt(this))},de.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),pt(this))},de.prototype.render=Z,$=[],Qt=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Yt=function(e,t){return e.__v.__b-t.__v.__b},me.__r=0,en=/(PointerCapture)$|Capture$/i,Je=0,Le=_t(!1),ze=_t(!0);var eo=0;function b(e,t,n,r,o,i){t||(t={});var s,a,c=t;if("ref"in c)for(a in c={},t)a=="ref"?s=t[a]:c[a]=t[a];var u={type:e,props:c,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--eo,__i:-1,__u:0,__source:o,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(a in s)c[a]===void 0&&(c[a]=s[a]);return R.vnode&&R.vnode(u),u}var re,k,Fe,mt,be=0,fn=[],A=R,bt=A.__b,gt=A.__r,yt=A.diffed,wt=A.__c,xt=A.unmount,Et=A.__;function Xe(e,t){A.__h&&A.__h(k,e,be||t),be=0;var n=k.__H||(k.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function H(e){return be=1,to(hn,e)}function to(e,t,n){var r=Xe(re++,2);if(r.t=e,!r.__c&&(r.__=[hn(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=k,!k.__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!i||i.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)}}),i&&i.call(this,a,c,u)||l};k.__f=!0;var i=k.shouldComponentUpdate,s=k.componentWillUpdate;k.componentWillUpdate=function(a,c,u){if(this.__e){var f=i;i=void 0,o(a,c,u),i=f}s&&s.call(this,a,c,u)},k.shouldComponentUpdate=o}return r.__N||r.__}function dn(e,t){var n=Xe(re++,3);!A.__s&&pn(n.__H,t)&&(n.__=e,n.u=t,k.__H.__h.push(n))}function He(e){return be=5,no(function(){return{current:e}},[])}function no(e,t){var n=Xe(re++,7);return pn(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function ro(){for(var e;e=fn.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=[],A.__e(t,e.__v)}}A.__b=function(e){k=null,bt&&bt(e)},A.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Et&&Et(e,t)},A.__r=function(e){gt&&gt(e),re=0;var t=(k=e.__c).__H;t&&(Fe===k?(t.__h=[],k.__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)),Fe=k},A.diffed=function(e){yt&&yt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(fn.push(t)!==1&&mt===A.requestAnimationFrame||((mt=A.requestAnimationFrame)||oo)(ro)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Fe=k=null},A.__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=[],A.__e(r,n.__v)}}),wt&&wt(e,t)},A.unmount=function(e){xt&&xt(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&&A.__e(t,n.__v))};var St=typeof requestAnimationFrame=="function";function oo(e){var t,n=function(){clearTimeout(r),St&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);St&&(t=requestAnimationFrame(n))}function pe(e){var t=k,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),k=t}function je(e){var t=k;e.__c=e.__(),k=t}function pn(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function hn(e,t){return typeof t=="function"?t(e):t}class io{parseArg(t){return typeof t=="string"?{content:t}:t}show(t,n){const{content:r,duration:o,closable:i}=this.parseArg(n),s=document.createElement("div");if(s.style.cssText=`
5
+ `):" "+ct(i[0]):"as no adapter specified";throw new x("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:De};function Oe(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new X(null,e)}function ut(e){return Oe(e),e.headers=B.from(e.headers),e.data=Ae.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Vt.getAdapter(e.adapter||ie.adapter)(e).then(function(r){return Oe(e),r.data=Ae.call(e,e.transformResponse,r),r.headers=B.from(r.headers),r},function(r){return jt(r)||(Oe(e),r&&r.response&&(r.response.data=Ae.call(e,e.transformResponse,r.response),r.response.headers=B.from(r.response.headers))),Promise.reject(r)})}const Gt="1.10.0",ve={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ve[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const ft={};ve.transitional=function(t,n,r){function o(i,s){return"[Axios v"+Gt+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,a)=>{if(t===!1)throw new x(o(s," has been removed"+(n?" in "+n:"")),x.ERR_DEPRECATED);return n&&!ft[s]&&(ft[s]=!0,console.warn(o(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,s,a):!0}};ve.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Wr(e,t,n){if(typeof e!="object")throw new x("options must be an object",x.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],s=t[i];if(s){const a=e[i],c=a===void 0||s(a,i,e);if(c!==!0)throw new x("option "+i+" must be "+c,x.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new x("Unknown option "+i,x.ERR_BAD_OPTION)}}const fe={assertOptions:Wr,validators:ve},I=fe.validators;let W=class{constructor(t){this.defaults=t||{},this.interceptors={request:new nt,response:new nt}}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 i=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
6
+ `+i):r.stack=i}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:i}=n;r!==void 0&&fe.assertOptions(r,{silentJSONParsing:I.transitional(I.boolean),forcedJSONParsing:I.transitional(I.boolean),clarifyTimeoutError:I.transitional(I.boolean)},!1),o!=null&&(d.isFunction(o)?n.paramsSerializer={serialize:o}:fe.assertOptions(o,{encode:I.function,serialize:I.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),fe.assertOptions(n,{baseUrl:I.spelling("baseURL"),withXsrfToken:I.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&d.merge(i.common,i[n.method]);i&&d.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),n.headers=B.concat(s,i);const a=[];let c=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(c=c&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let f,l=0,h;if(!c){const p=[ut.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++],g=a[l++];try{m=p(m)}catch(_){g.call(this,_);break}}try{f=ut.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=$t(t.baseURL,t.url,t.allowAbsoluteUrls);return Lt(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(i,s,a){return this.request(J(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}W.prototype[t]=n(),W.prototype[t+"Form"]=n(!0)});let Jr=class Kt{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(a=>{r.subscribe(a),i=a}).then(o);return s.cancel=function(){r.unsubscribe(i)},s},t(function(i,s,a){r.reason||(r.reason=new X(i,s,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 Kt(function(o){t=o}),cancel:t}}};function Vr(e){return function(n){return e.apply(null,n)}}function Gr(e){return d.isObject(e)&&e.isAxiosError===!0}const Ie={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(Ie).forEach(([e,t])=>{Ie[t]=e});function Xt(e){const t=new W(e),n=Tt(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 Xt(J(e,o))},n}const C=Xt(ie);C.Axios=W;C.CanceledError=X;C.CancelToken=Jr;C.isCancel=jt;C.VERSION=Gt;C.toFormData=Ee;C.AxiosError=x;C.Cancel=C.CanceledError;C.all=function(t){return Promise.all(t)};C.spread=Vr;C.isAxiosError=Gr;C.mergeConfig=J;C.AxiosHeaders=B;C.formToJSON=e=>Ht(d.isHTMLForm(e)?new FormData(e):e);C.getAdapter=Vt.getAdapter;C.HttpStatusCode=Ie;C.default=C;const{Axios:Lo,AxiosError:zo,CanceledError:Ho,isCancel:jo,CancelToken:Mo,VERSION:$o,all:qo,Cancel:Wo,isAxiosError:Jo,spread:Vo,toFormData:Go,AxiosHeaders:Ko,HttpStatusCode:Xo,formToJSON:Zo,getAdapter:Qo,mergeConfig:Yo}=C;var se,R,Zt,$,dt,Qt,Yt,en,Je,Le,ze,ne={},tn=[],Kr=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Re=Array.isArray;function L(e,t){for(var n in t)e[n]=t[n];return e}function Ve(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function V(e,t,n){var r,o,i,s={};for(i in t)i=="key"?r=t[i]:i=="ref"?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?se.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return ee(e,s,r,o,null)}function ee(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++Zt,__i:-1,__u:0};return o==null&&R.vnode!=null&&R.vnode(i),i}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 nn(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 nn(e)}}function pt(e){(!e.__d&&(e.__d=!0)&&$.push(e)&&!me.__r++||dt!=R.debounceRendering)&&((dt=R.debounceRendering)||Qt)(me)}function me(){for(var e,t,n,r,o,i,s,a=1;$.length;)$.length>a&&$.sort(Yt),e=$.shift(),a=$.length,e.__d&&(n=void 0,o=(r=(t=e).__v).__e,i=[],s=[],t.__P&&((n=L({},r)).__v=r.__v+1,R.vnode&&R.vnode(n),Ge(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[o]:null,i,o??G(r),!!(32&r.__u),s),n.__v=r.__v,n.__.__k[n.__i]=n,sn(i,n,s),n.__e!=o&&nn(n)));me.__r=0}function rn(e,t,n,r,o,i,s,a,c,u,f){var l,h,m,p,g,_,w=r&&r.__k||tn,y=t.length;for(c=Xr(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,_=Ge(e,m,h,o,i,s,a,c,u,f),p=m.__e,m.ref&&h.ref!=m.ref&&(h.ref&&Ke(h.ref,null,m),f.push(m.ref,m.__c||p,m)),g==null&&p!=null&&(g=p),4&m.__u||h.__k===m.__k?c=on(m,c,e):typeof m.type=="function"&&_!==void 0?c=_:p&&(c=p.nextSibling),m.__u&=-7);return n.__e=g,c}function Xr(e,t,n,r,o){var i,s,a,c,u,f=n.length,l=f,h=0;for(e.__k=new Array(o),i=0;i<o;i++)(s=t[i])!=null&&typeof s!="boolean"&&typeof s!="function"?(c=i+h,(s=e.__k[i]=typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?ee(null,s,null,null,null):Re(s)?ee(Z,{children:s},null,null,null):s.constructor==null&&s.__b>0?ee(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s).__=e,s.__b=e.__b+1,a=null,(u=s.__i=Zr(s,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 s.type!="function"&&(s.__u|=4)):u!=c&&(u==c-1?h--:u==c+1?h++:(u>c?h--:h++,s.__u|=4))):e.__k[i]=null;if(l)for(i=0;i<f;i++)(a=n[i])!=null&&(2&a.__u)==0&&(a.__e==r&&(r=G(a)),ln(a,a));return r}function on(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=on(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 Zr(e,t,n,r){var o,i,s=e.key,a=e.type,c=t[n];if(c===null&&e.key==null||c&&s==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,i=n+1;o>=0||i<t.length;){if(o>=0){if((c=t[o])&&(2&c.__u)==0&&s==c.key&&a==c.type)return o;o--}if(i<t.length){if((c=t[i])&&(2&c.__u)==0&&s==c.key&&a==c.type)return i;i++}}return-1}function ht(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Kr.test(t)?n:n+"px"}function le(e,t,n,r,o){var i,s;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||ht(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||ht(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(en,"$1")),s=t.toLowerCase(),t=s in e||t=="onFocusOut"||t=="onFocusIn"?s.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=Je,e.addEventListener(t,i?ze:Le,i)):e.removeEventListener(t,i?ze:Le,i);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 _t(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=Je++;else if(t.t<n.u)return;return n(R.event?R.event(t):t)}}}function Ge(e,t,n,r,o,i,s,a,c,u){var f,l,h,m,p,g,_,w,y,S,v,T,O,N,z,M,ke,D=t.type;if(t.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),i=[a=t.__e=n.__e]),(f=R.__b)&&f(t);e:if(typeof D=="function")try{if(w=t.props,y="prototype"in D&&D.prototype.render,S=(f=D.contextType)&&r[f.__c],v=f?S?S.props.value:f.__:r,n.__c?_=(l=t.__c=n.__c).__=l.__E:(y?t.__c=l=new D(w,v):(t.__c=l=new de(w,v),l.constructor=D,l.render=Yr),S&&S.sub(l),l.props=w,l.state||(l.state={}),l.context=v,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=L({},l.__s)),L(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,v),!l.__e&&l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(w,l.__s,v)===!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)}),T=0;T<l._sb.length;T++)l.__h.push(l._sb[T]);l._sb=[],l.__h.length&&s.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(w,l.__s,v),y&&l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(m,p,g)})}if(l.context=v,l.props=w,l.__P=e,l.__e=!1,O=R.__r,N=0,y){for(l.state=l.__s,l.__d=!1,O&&O(t),f=l.render(l.props,l.state,l.context),z=0;z<l._sb.length;z++)l.__h.push(l._sb[z]);l._sb=[]}else do l.__d=!1,O&&O(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=L(L({},r),l.getChildContext())),y&&!h&&l.getSnapshotBeforeUpdate!=null&&(g=l.getSnapshotBeforeUpdate(m,p)),M=f,f!=null&&f.type===Z&&f.key==null&&(M=an(f.props.children)),a=rn(e,Re(M)?M:[M],t,n,r,o,i,s,a,c,u),l.base=t.__e,t.__u&=-161,l.__h.length&&s.push(l),_&&(l.__E=l.__=null)}catch(Q){if(t.__v=null,c||i!=null)if(Q.then){for(t.__u|=c?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;i[i.indexOf(a)]=null,t.__e=a}else for(ke=i.length;ke--;)Ve(i[ke]);else t.__e=n.__e,t.__k=n.__k;R.__e(Q,t,n)}else i==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=Qr(n.__e,t,n,r,o,i,s,c,u);return(f=R.diffed)&&f(t),128&t.__u?void 0:a}function sn(e,t,n){for(var r=0;r<n.length;r++)Ke(n[r],n[++r],n[++r]);R.__c&&R.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){R.__e(i,o.__v)}})}function an(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:Re(e)?e.map(an):L({},e)}function Qr(e,t,n,r,o,i,s,a,c){var u,f,l,h,m,p,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"),i!=null){for(u=0;u<i.length;u++)if((m=i[u])&&"setAttribute"in m==!!y&&(y?m.localName==y:m.nodeType==3)){e=m,i[u]=null;break}}if(e==null){if(y==null)return document.createTextNode(w);e=document.createElementNS(o,y,w.is&&w),a&&(R.__m&&R.__m(t,i),a=!1),i=null}if(y==null)_===w||a&&e.data==w||(e.data=w);else{if(i=i&&se.call(e.childNodes),_=n.props||ne,!a&&i!=null)for(_={},u=0;u<e.attributes.length;u++)_[(m=e.attributes[u]).name]=m.value;for(u in _)if(m=_[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"?g=m:a&&typeof m!="function"||_[u]===m||le(e,u,m,_[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=""),rn(t.type=="template"?e.content:e,Re(h)?h:[h],t,n,r,y=="foreignObject"?"http://www.w3.org/1999/xhtml":o,i,s,i?i[0]:n.__k&&G(n,0),a,c),i!=null)for(u=i.length;u--;)Ve(i[u]);a||(u="value",y=="progress"&&p==null?e.removeAttribute("value"):p!=null&&(p!==e[u]||y=="progress"&&!p||y=="option"&&p!=_[u])&&le(e,u,p,_[u],o),u="checked",g!=null&&g!=e[u]&&le(e,u,g,_[u],o))}return e}function Ke(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){R.__e(o,n)}}function ln(e,t,n){var r,o;if(R.unmount&&R.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||Ke(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){R.__e(i,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&ln(r[o],t,n||typeof e.type!="function");n||Ve(e.__e),e.__c=e.__=e.__e=void 0}function Yr(e,t,n){return this.constructor(e,n)}function Te(e,t,n){var r,o,i,s;t==document&&(t=document.documentElement),R.__&&R.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],s=[],Ge(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,i,!r&&n?n:o?o.__e:t.firstChild,r,s),sn(i,e,s)}function cn(e,t){Te(e,t,cn)}function un(e,t,n){var r,o,i,s,a=L({},e.props);for(i in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)i=="key"?r=t[i]:i=="ref"?o=t[i]:a[i]=t[i]===void 0&&s!=null?s[i]:t[i];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=tn.slice,R={__e:function(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(a){e=a}throw e}},Zt=0,de.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=L({},this.state),typeof e=="function"&&(e=e(L({},n),this.props)),e&&L(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),pt(this))},de.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),pt(this))},de.prototype.render=Z,$=[],Qt=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Yt=function(e,t){return e.__v.__b-t.__v.__b},me.__r=0,en=/(PointerCapture)$|Capture$/i,Je=0,Le=_t(!1),ze=_t(!0);var eo=0;function b(e,t,n,r,o,i){t||(t={});var s,a,c=t;if("ref"in c)for(a in c={},t)a=="ref"?s=t[a]:c[a]=t[a];var u={type:e,props:c,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--eo,__i:-1,__u:0,__source:o,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(a in s)c[a]===void 0&&(c[a]=s[a]);return R.vnode&&R.vnode(u),u}var re,k,Fe,mt,be=0,fn=[],A=R,bt=A.__b,gt=A.__r,yt=A.diffed,wt=A.__c,xt=A.unmount,Et=A.__;function Xe(e,t){A.__h&&A.__h(k,e,be||t),be=0;var n=k.__H||(k.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function H(e){return be=1,to(hn,e)}function to(e,t,n){var r=Xe(re++,2);if(r.t=e,!r.__c&&(r.__=[hn(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=k,!k.__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!i||i.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)}}),i&&i.call(this,a,c,u)||l};k.__f=!0;var i=k.shouldComponentUpdate,s=k.componentWillUpdate;k.componentWillUpdate=function(a,c,u){if(this.__e){var f=i;i=void 0,o(a,c,u),i=f}s&&s.call(this,a,c,u)},k.shouldComponentUpdate=o}return r.__N||r.__}function dn(e,t){var n=Xe(re++,3);!A.__s&&pn(n.__H,t)&&(n.__=e,n.u=t,k.__H.__h.push(n))}function He(e){return be=5,no(function(){return{current:e}},[])}function no(e,t){var n=Xe(re++,7);return pn(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function ro(){for(var e;e=fn.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=[],A.__e(t,e.__v)}}A.__b=function(e){k=null,bt&&bt(e)},A.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Et&&Et(e,t)},A.__r=function(e){gt&&gt(e),re=0;var t=(k=e.__c).__H;t&&(Fe===k?(t.__h=[],k.__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)),Fe=k},A.diffed=function(e){yt&&yt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(fn.push(t)!==1&&mt===A.requestAnimationFrame||((mt=A.requestAnimationFrame)||oo)(ro)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Fe=k=null},A.__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=[],A.__e(r,n.__v)}}),wt&&wt(e,t)},A.unmount=function(e){xt&&xt(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&&A.__e(t,n.__v))};var St=typeof requestAnimationFrame=="function";function oo(e){var t,n=function(){clearTimeout(r),St&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);St&&(t=requestAnimationFrame(n))}function pe(e){var t=k,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),k=t}function je(e){var t=k;e.__c=e.__(),k=t}function pn(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function hn(e,t){return typeof t=="function"?t(e):t}class io{parseArg(t){return typeof t=="string"?{content:t}:t}show(t,n){const{content:r,duration:o,closable:i}=this.parseArg(n),s=document.createElement("div");if(s.style.cssText=`
7
7
  position: fixed;
8
8
  top: 20px;
9
9
  left: 50%;
@@ -42,4 +42,4 @@
42
42
  padding: 4px;
43
43
  color: #999;
44
44
  font-size: 12px;
45
- `,c.onclick=()=>{document.body.removeChild(s)},s.appendChild(c)}document.body.appendChild(s),o!==0&&setTimeout(()=>{document.body.contains(s)&&document.body.removeChild(s)},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 io;function so(e={}){const{baseURL:t="/api",timeout:n=1e4,getLocale:r,onError:o}=e,i=C.create({baseURL:t,timeout:n});return i.interceptors.request.use(s=>{const a=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}"),{token:c}=a;if(s.headers={...s.headers,Authorization:c},r){const u=r();u&&(s.headers={...s.headers,"Accept-Language":u})}return s}),i.interceptors.response.use(s=>{if(s.data&&s.data.code===0)return s.data;const a=s.data?.msg||s.data?.message||"未知错误";return Me.error(a),o&&o(a,s),Promise.reject(s.data||{message:"未知错误"})},s=>{const a=s.response?.data?.msg||s.response?.data?.message||s.message||"网络请求失败";return Me.error(a),o&&o(a,s),Promise.reject(s)}),i}const ae=so();function ao(){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 lo=async()=>ae.get("/all-dicts",{}).then(e=>(sessionStorage.setItem("all_dicts",JSON.stringify(e.data)),e.data||{})),co=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||""),uo=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,{})},fo=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 Ze=(e=>(e.ZH="zh",e.EN="en",e))(Ze||{}),M=(e=>(e.WHITE="white",e.DARK="dark",e))(M||{});function po(e){lo();const{merchant_id:t,biz_type:n,fund_balance_id:r,theme:o=M.WHITE,locale:i=Ze.ZH}=e,s="Bearer "+e.token;return sessionStorage.setItem("fund_unit_params",JSON.stringify({merchantId:t,bizType:n,fundBalanceId:r,token:s,theme:o,locale:i})),{token:s,merchantId:t,bizType:n,fundBalanceId:r,theme:o,locale:i}}const ho={"/api":{target:"https://fund.bestfulfill.tech/api/sdk",changeOrigin:!0,rewrite:e=>e.replace(/^\/api/,""),secure:!1}};function _o({onClick:e,color:t,children:n}){return b("button",{style:{background:t||"#1890ff",color:"#fff",border:"none",borderRadius:4,padding:"8px 16px",cursor:"pointer",fontSize:16},onClick:e,children:n})}const mo={余额详情:"余额详情",真实金额:"真实金额",冻结金额:"冻结金额",总可用:"总可用","充值 / 转账":"充值 / 转账",在线充值:"在线充值",线下转账:"线下转账",充值币种:"充值币种",充值金额:"充值金额",支付平台:"支付平台",请选择充值币种:"请选择充值币种",请输入充值金额:"请输入充值金额",请选择支付平台:"请选择支付平台","提交失败,请重试":"提交失败,请重试","提交中...":"提交中...",去支付:"去支付",取消:"取消",关闭:"关闭",第三方支付平台:"第三方支付平台",交易ID:"交易ID",请输入转账交易ID:"请输入转账交易ID",上传文件:"上传文件",请上传转账凭证:"请上传转账凭证",离线充值创建成功:"离线充值创建成功","加载中...":"加载中...",错误:"错误",成功:"成功",必填:"必填","充值/转账":"充值/转账",切换为暗黑主题:"切换为暗黑主题",切换为白色主题:"切换为白色主题",点击或拖拽文件到此处上传:"点击或拖拽文件到此处上传","支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传":"支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传",个文件:"个文件","正在上传...":"正在上传...",已上传:"已上传",移除:"移除"};function bo(e){return mo[e]||e}const go={余额详情:"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 yo(e){return go[e]||e}function wo(){return JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").locale||Ze.ZH}function E(e){return wo()==="zh"?bo(e):yo(e)}const xo=({formState:e,setFormState:t,onClose:n,loading:r})=>{const o=JSON.parse(sessionStorage.getItem("all_dicts")||"{}"),i=o?.currency||[],s=o?.channel?.filter(h=>h.payment_support)||[],c=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===M.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"},select:{width:"100%",padding:"10px 12px",borderRadius:6,border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:15,outline:"none"},selectError:{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"},select:{width:"100%",padding:"10px 12px",borderRadius:6,border:"1px solid #23262F",background:"#23262F",color:"#fff",fontSize:15,outline:"none"},selectError:{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:"#155EEF",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 b(Z,{children:[b("div",{style:{marginBottom:18},children:[b("div",{style:u.label,children:[b("span",{style:{color:"#F53F3F"},children:"*"})," ",E("充值币种")]}),b("select",{style:{...u.select},value:e.currency,onInput:h=>{const m=h.target.value;t(p=>({...p,currency:m}))},children:[b("option",{value:"",disabled:!0,hidden:!0,children:E("请选择充值币种")}),i?.map(h=>b("option",{value:h.value,children:h.label}))]})]}),b("div",{style:{marginBottom:18},children:[b("div",{style:u.label,children:[b("span",{style:{color:"#F53F3F"},children:"*"})," ",E("充值金额")]}),b("input",{type:"text",placeholder:E("请输入充值金额"),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&&b("div",{style:u.error,children:e.amountError})]}),b("div",{style:{marginBottom:24},children:[b("div",{style:u.label,children:[b("span",{style:{color:"#F53F3F"},children:"*"})," ",E("支付平台")]}),b("select",{style:{...u.select,...e.rechargeChannelError?u.selectError:{}},value:e.rechargeChannel,onInput:h=>{const m=h.target.value;t(p=>({...p,rechargeChannel:m,rechargeChannelError:m?"":p.rechargeChannelError}))},children:[b("option",{value:"",disabled:!0,hidden:!0,children:E("请选择支付平台")}),s?.map(h=>b("option",{value:h.value,children:h.label}))]}),e.rechargeChannelError&&b("div",{style:u.error,children:e.rechargeChannelError})]}),e.error&&b("div",{style:{color:"#ff4d4f",marginBottom:12},children:e.error}),b("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[b("button",{type:"button",onClick:n,style:f,children:E("取消")}),b("button",{type:"submit",disabled:r,style:l,children:E(r?"提交中...":"去支付")})]})]})},Eo={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"}}},So=({value:e=[],onChange:t,maxCount:n=10,accept:r=".jpg,.jpeg,.png,.pdf",multiple:o=!0,disabled:i=!1})=>{const s=He(null),[a,c]=H(!1),[u,f]=H(0),m=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===M.WHITE?"white":"dark",p=Eo[m],g=async w=>{const y=Array.from(w.target.files).slice(0,n);if(!y.length)return;c(!0);const S=[];for(let v=0;v<y.length;v++){f(0);const T=new FormData;T.append("file",y[v]);try{const O=await co(T,N=>f(N));O&&S.push(O)}catch{}}c(!1),f(0),t?.([...e,...S]),s.current&&(s.current.value="")},_=w=>{const y=e.filter((S,v)=>v!==w);t?.(y)};return b("div",{children:[b("div",{style:{...p.container,cursor:i?"not-allowed":p.container.cursor,opacity:i?.6:1},onClick:()=>!i&&s.current?.click(),children:[b("div",{style:{fontSize:48,marginBottom:12},children:"📁"}),b("div",{style:{color:"#222",fontSize:15,marginBottom:4},children:E("点击或拖拽文件到此处上传")}),b("div",{style:{color:"#999",fontSize:13},children:[E("支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传")," ",n," ",E("个文件")]}),b("input",{ref:s,type:"file",multiple:o,accept:r,style:{display:"none"},onChange:g,disabled:i}),a&&b("div",{style:{marginTop:12,color:"#1677ff"},children:[E("正在上传...")," ",u,"%"]})]}),e&&e.length>0&&b("div",{style:{marginTop:12},children:e.map((w,y)=>b("div",{style:p.fileItem,children:[b("div",{style:{display:"flex",alignItems:"center",flex:1},children:[b("span",{style:{fontWeight:500,wordBreak:"break-all"},children:w.split("/").pop()}),b("span",{style:{color:"#8C8F93",fontSize:13,marginLeft:8},children:["[",E("已上传"),"]"]})]}),b("button",{type:"button",onClick:S=>{S.stopPropagation(),_(y)},style:p.removeBtn,disabled:i,children:E("移除")})]},w))})]})},vo=({formState:e,setFormState:t,onClose:n,loading:r})=>{const o=JSON.parse(sessionStorage.getItem("all_dicts")||"{}");console.log(o,"allDicts");const i=o?.channel||[],c=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===M.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"},select:{width:"100%",padding:"10px 12px",borderRadius:6,border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},buttonCancel:{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"},buttonSubmit:{background:"#155EEF",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"},select:{width:"100%",padding:"10px 12px",borderRadius:6,border:"1px solid #23262F",background:"#23262F",color:"#fff",fontSize:15,outline:"none"},selectError:{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 b("form",{onSubmit:async f=>{f.preventDefault();let l=!0;t(h=>({...h,platformError:"",transactionIdError:"",filesError:""})),e.platform||(t(h=>({...h,platformError:E("请选择支付平台")})),l=!1),e.transactionId.trim()||(t(h=>({...h,transactionIdError:E("请输入转账交易ID")})),l=!1),(!e.files||e.files.length===0)&&(t(h=>({...h,filesError:E("请上传转账凭证")})),l=!1),l&&(await uo({transferChannel:e.platform,transferNo:e.transactionId,voucherUrls:e.files}),n(),Me.success(E("离线充值创建成功")))},children:[b("div",{style:{marginBottom:18},children:[b("div",{style:c.label,children:[b("span",{style:{color:"#F53F3F"},children:"*"})," ",E("第三方支付平台")]}),b("select",{style:{...c.select,...e.platformError?c.selectError:{}},value:e.platform,onInput:f=>{const l=f.target.value;t(h=>({...h,platform:l,platformError:l?"":h.platformError}))},children:[b("option",{value:"",disabled:!0,hidden:!0,children:E("请选择支付平台")}),i?.map(f=>b("option",{value:f.value,children:f.label}))]}),e.platformError&&b("div",{style:c.error,children:e.platformError})]}),b("div",{style:{marginBottom:18},children:[b("div",{style:c.label,children:[b("span",{style:{color:"#F53F3F"},children:"*"})," ",E("交易ID")]}),b("input",{type:"text",placeholder:E("请输入转账交易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&&b("div",{style:c.error,children:e.transactionIdError})]}),b("div",{style:{marginBottom:24},children:[b("div",{style:c.label,children:[b("span",{style:{color:"#F53F3F"},children:"*"})," ",E("上传文件")]}),b(So,{value:e.files,onChange:f=>t(l=>({...l,files:f,filesError:""})),maxCount:10,accept:".jpg,.jpeg,.png,.pdf",multiple:!0}),e.filesError&&b("div",{style:c.error,children:e.filesError})]}),b("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[b("button",{type:"button",onClick:n,style:c.buttonCancel,children:E("取消")}),b("button",{type:"submit",disabled:r,style:c.buttonSubmit,children:E("去支付")})]})]})};function Ro({visible:e,onClose:t,onSubmit:n}){const[r,o]=H({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),[i,s]=H("online"),[a,c]=H({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1});if(dn(()=>{e||(s("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 g=!0;if(o(_=>({..._,amountError:"",rechargeChannelError:""})),r.amount.trim()||(o(_=>({..._,amountError:E("请输入充值金额")})),g=!1),r.rechargeChannel||(o(_=>({..._,rechargeChannelError:E("请选择支付平台")})),g=!1),!!g){o(_=>({..._,loading:!0,error:""}));try{await n({amount:r.amount,rechargeChannel:r.rechargeChannel,currency:r.currency}),t()}catch{o(_=>({..._,error:E("提交失败,请重试")}))}finally{o(_=>({..._,loading:!1}))}}},f=p=>{p.target===p.currentTarget&&t()},m=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===M.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,g)=>({flex:1,background:p?"#fff":"#F7F8FA",color:p?"#155EEF":"#222",border:"none",borderRadius:g?"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:g?"1px solid #F0F1F3":void 0,borderLeft:g?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,g)=>({flex:1,background:p?"#23262F":"#181A20",color:p?"#00E8C6":"#fff",border:"none",borderRadius:g?"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:g?"1px solid #23262F":void 0,borderLeft:g?void 0:"1px solid #23262F",transition:"all 0.2s"})};return b("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:b("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:[b("button",{type:"button",onClick:t,style:m.closeBtn,"aria-label":E("关闭"),children:"×"}),b("div",{style:m.title,children:E("充值 / 转账")}),b("div",{style:{display:"flex",marginBottom:28},children:[b("button",{type:"button",onClick:()=>s("online"),style:m.tabBtn(i==="online",!0),children:E("在线充值")}),b("button",{type:"button",onClick:()=>s("offline"),style:m.tabBtn(i==="offline",!1),children:E("线下转账")})]}),i==="online"?b(xo,{formState:r,setFormState:o,onClose:t,loading:r.loading}):b(vo,{formState:a,setFormState:c,onClose:t,loading:a.loading})]})})}function Qe(){return(Qe=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 To=["context","children"];function ko(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(r,o){if(r==null)return{};var i,s,a={},c=Object.keys(r);for(s=0;s<c.length;s++)o.indexOf(i=c[s])>=0||(a[i]=r[i]);return a}(e,To);return un(t,n)}function Co(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=V(ko,Qe({},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=[],i={},s=0,a=n.attributes,c=n.childNodes;for(s=a.length;s--;)a[s].name!=="slot"&&(i[a[s].name]=a[s].value,i[_n(a[s].name)]=a[s].value);for(s=c.length;s--;){var u=t(c[s],null),f=c[s].slot;f?i[f]=V(vt,{name:f},u):o[s]=u}var l=r?V(vt,null,o):o;return V(r||n.nodeName.toLowerCase(),i,l)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?cn:Te)(this._vdom,this._root)}function _n(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function Ao(e,t,n){if(this._vdom){var r={};r[e]=n=n??void 0,r[_n(e)]=n,this._vdom=un(this._vdom,r),Te(this._vdom,this._root)}}function Oo(){Te(this._vdom=null,this._root)}function vt(e,t){var n=this;return V("slot",Qe({},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 mn(e,t,n,r){function o(){var i=Reflect.construct(HTMLElement,[],o);return i._vdomComponent=e,i._root=r&&r.shadow?i.attachShadow({mode:r.mode||"open"}):i,i}return(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=Co,o.prototype.attributeChangedCallback=Ao,o.prototype.disconnectedCallback=Oo,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=n,n.forEach(function(i){Object.defineProperty(o.prototype,i,{get:function(){return this._vdom.props[i]},set:function(s){this._vdom?this.attributeChangedCallback(i,null,s):(this._props||(this._props={}),this._props[i]=s,this.connectedCallback());var a=typeof s;s!=null&&a!=="string"&&a!=="boolean"&&a!=="number"||this.setAttribute(i,s)}})}),customElements.define(t||e.tagName||e.displayName||e.name,o)}function Fo(){const[e,t]=H(!1),n=async r=>{const o=await fo({amount:r.amount,currency:r.currency,rechargeChannel:r.rechargeChannel});window.open(o,"_blank")};return b("div",{children:[b(_o,{onClick:()=>t(!0),children:E("充值/转账")}),b(Ro,{visible:e,onClose:()=>t(!1),onSubmit:n})]})}mn(Fo,"best-recharge",["theme"],{shadow:!1});const Po=({popover:e,children:t,popoverWidth:n=300,popoverMinWidth:r=200,offsetY:o=16,offsetX:i=16,popoverPosition:s="top"})=>{const[a,c]=H(!1),[u,f]=H(s),l=He(null),h=He(null),m=()=>{if(h.current&&(clearTimeout(h.current),h.current=null),s==="top"||s==="bottom")if(l.current){const T=l.current.getBoundingClientRect();s==="top"&&T.top<100?f("bottom"):s==="bottom"&&window.innerHeight-T.bottom<100?f("top"):f(s)}else f(s);else f(s);c(!0)},p=()=>{h.current=window.setTimeout(()=>{c(!1)},120)},g={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===M.WHITE,y=g[w?"white":"dark"];let S={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},v={position:"absolute",zIndex:11,width:0,height:0};return u==="top"?(S={...S,left:"50%",top:-48,transform:"translateX(-50%)"},v={...v,left:"50%",bottom:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderTop:`8px solid ${y.arrow.top}`}):u==="bottom"?(S={...S,left:"50%",top:"100%",marginTop:o,transform:"translateX(-50%)"},v={...v,left:"50%",top:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderBottom:`8px solid ${y.arrow.bottom}`}):u==="leftTop"?(S={...S,right:"100%",top:0,marginRight:i,transform:"none"},v={...v,right:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderLeft:`8px solid ${y.arrow.left}`}):u==="rightTop"&&(S={...S,left:"100%",top:0,marginLeft:i,transform:"translateY(0)"},v={...v,left:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderRight:`8px solid ${y.arrow.right}`}),b("div",{ref:l,style:{position:"relative",display:"inline-block"},onMouseEnter:m,onMouseLeave:p,children:[t,a&&b("div",{style:S,onMouseEnter:m,onMouseLeave:p,children:[e,b("div",{style:v})]})]})};function Rt(e){return e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}const Bo={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 No(e){const[t,n]=H({available:0,currency:"USD",symbol:"$",details:[{label:E("真实金额"),value:0,color:"#15b36b",dot:"#15b36b"},{label:E("冻结金额"),value:0,color:"#f59e0b",dot:"#f59e0b"},{label:E("总可用"),value:0,color:"#155EEF",dot:"#15b36b"}]});dn(()=>{(async()=>{try{const a=await ao(),c={available:a.availableAmount,currency:"USD",symbol:"$",details:[{label:E("真实金额"),value:a.totalAmount,color:"#15b36b",dot:"#15b36b"},{label:E("冻结金额"),value:a.frozenAmount,color:"#f59e0b",dot:"#f59e0b"},{label:E("总可用"),value:a.availableAmount,color:"#155EEF",dot:"#15b36b"}]};n(c)}catch(a){console.error("获取余额失败:",a)}})()},[]);const o=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===M.WHITE,i=Bo[o?"white":"dark"];return b(Po,{popover:b(Z,{children:[b("div",{style:i.popoverTitle,children:E("余额详情")}),t.details.map(s=>b("div",{style:i.detailRow,children:[b("span",{style:i.detailLabel,children:[b("span",{style:i.detailDot(s.dot)}),s.label]}),b("span",{style:i.detailValue(s.color),children:[t.symbol,Rt(s.value)]})]},s.label))]}),popoverPosition:e.popoverPosition||"bottom",children:b("div",{style:i.main,children:[t.symbol,Rt(t.available),b("span",{style:i.currency,children:t.currency})]})})}mn(No,"best-statistical-balance");const Do=["best-recharge","best-statistical-balance"];exports.components=Do;exports.initFundUnit=po;exports.npmTest=bn;exports.printCurrentTime=gn;exports.viteProxy=ho;
45
+ `,c.onclick=()=>{document.body.removeChild(s)},s.appendChild(c)}document.body.appendChild(s),o!==0&&setTimeout(()=>{document.body.contains(s)&&document.body.removeChild(s)},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 io;function so(e={}){const{baseURL:t="/api",timeout:n=1e4,getLocale:r,onError:o}=e,i=C.create({baseURL:t,timeout:n});return i.interceptors.request.use(s=>{const a=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}"),{token:c}=a;if(s.headers={...s.headers,Authorization:c},r){const u=r();u&&(s.headers={...s.headers,"Accept-Language":u})}return s}),i.interceptors.response.use(s=>{if(s.data&&s.data.code===0)return s.data;const a=s.data?.msg||s.data?.message||"未知错误";return Me.error(a),o&&o(a,s),Promise.reject(s.data||{message:"未知错误"})},s=>{const a=s.response?.data?.msg||s.response?.data?.message||s.message||"网络请求失败";return Me.error(a),o&&o(a,s),Promise.reject(s)}),i}const ae=so();function ao(){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 lo=async()=>ae.get("/all-dicts",{}).then(e=>(sessionStorage.setItem("all_dicts",JSON.stringify(e.data)),e.data||{})),co=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||""),uo=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,{})},fo=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 Ze=(e=>(e.ZH="zh",e.EN="en",e))(Ze||{}),j=(e=>(e.WHITE="white",e.DARK="dark",e))(j||{});function po(e){lo();const{merchant_id:t,biz_type:n,fund_balance_id:r,theme:o=j.WHITE,locale:i=Ze.ZH}=e,s="Bearer "+e.token;return sessionStorage.setItem("fund_unit_params",JSON.stringify({merchantId:t,bizType:n,fundBalanceId:r,token:s,theme:o,locale:i})),{token:s,merchantId:t,bizType:n,fundBalanceId:r,theme:o,locale:i}}const ho={"/api":{target:"https://fund.bestfulfill.tech/api/sdk",changeOrigin:!0,rewrite:e=>e.replace(/^\/api/,""),secure:!1}};function _o({onClick:e,color:t,children:n}){const i=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===j.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 b("button",{style:i,onClick:e,type:"button",children:n})}const mo={余额详情:"余额详情",真实金额:"真实金额",冻结金额:"冻结金额",总可用:"总可用","充值 / 转账":"充值 / 转账",在线充值:"在线充值",线下转账:"线下转账",充值币种:"充值币种",充值金额:"充值金额",支付平台:"支付平台",请选择充值币种:"请选择充值币种",请输入充值金额:"请输入充值金额",请选择支付平台:"请选择支付平台","提交失败,请重试":"提交失败,请重试","提交中...":"提交中...",去支付:"去支付",取消:"取消",关闭:"关闭",第三方支付平台:"第三方支付平台",交易ID:"交易ID",请输入转账交易ID:"请输入转账交易ID",上传文件:"上传文件",请上传转账凭证:"请上传转账凭证",离线充值创建成功:"离线充值创建成功","加载中...":"加载中...",错误:"错误",成功:"成功",必填:"必填","充值/转账":"充值/转账",切换为暗黑主题:"切换为暗黑主题",切换为白色主题:"切换为白色主题",点击或拖拽文件到此处上传:"点击或拖拽文件到此处上传","支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传":"支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传",个文件:"个文件","正在上传...":"正在上传...",已上传:"已上传",移除:"移除"};function bo(e){return mo[e]||e}const go={余额详情:"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 yo(e){return go[e]||e}function wo(){return JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").locale||Ze.ZH}function E(e){return wo()==="zh"?bo(e):yo(e)}const xo=({formState:e,setFormState:t,onClose:n,loading:r})=>{const o=JSON.parse(sessionStorage.getItem("all_dicts")||"{}"),i=o?.currency||[],s=o?.channel?.filter(h=>h.payment_support)||[],c=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===j.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"},select:{width:"100%",padding:"10px 12px",borderRadius:6,border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:15,outline:"none"},selectError:{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"},select:{width:"100%",padding:"10px 12px",borderRadius:6,border:"1px solid #23262F",background:"#23262F",color:"#fff",fontSize:15,outline:"none"},selectError:{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 b(Z,{children:[b("div",{style:{marginBottom:18},children:[b("div",{style:u.label,children:[b("span",{style:{color:"#F53F3F"},children:"*"})," ",E("充值币种")]}),b("select",{style:{...u.select},value:e.currency,onInput:h=>{const m=h.target.value;t(p=>({...p,currency:m}))},children:[b("option",{value:"",disabled:!0,hidden:!0,children:E("请选择充值币种")}),i?.map(h=>b("option",{value:h.value,children:h.label}))]})]}),b("div",{style:{marginBottom:18},children:[b("div",{style:u.label,children:[b("span",{style:{color:"#F53F3F"},children:"*"})," ",E("充值金额")]}),b("input",{type:"text",placeholder:E("请输入充值金额"),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&&b("div",{style:u.error,children:e.amountError})]}),b("div",{style:{marginBottom:24},children:[b("div",{style:u.label,children:[b("span",{style:{color:"#F53F3F"},children:"*"})," ",E("支付平台")]}),b("select",{style:{...u.select,...e.rechargeChannelError?u.selectError:{}},value:e.rechargeChannel,onInput:h=>{const m=h.target.value;t(p=>({...p,rechargeChannel:m,rechargeChannelError:m?"":p.rechargeChannelError}))},children:[b("option",{value:"",disabled:!0,hidden:!0,children:E("请选择支付平台")}),s?.map(h=>b("option",{value:h.value,children:h.label}))]}),e.rechargeChannelError&&b("div",{style:u.error,children:e.rechargeChannelError})]}),e.error&&b("div",{style:{color:"#ff4d4f",marginBottom:12},children:e.error}),b("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[b("button",{type:"button",onClick:n,style:f,children:E("取消")}),b("button",{type:"submit",disabled:r,style:l,children:E(r?"提交中...":"去支付")})]})]})},Eo={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"}}},So=({value:e=[],onChange:t,maxCount:n=10,accept:r=".jpg,.jpeg,.png,.pdf",multiple:o=!0,disabled:i=!1})=>{const s=He(null),[a,c]=H(!1),[u,f]=H(0),m=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===j.WHITE?"white":"dark",p=Eo[m],g=async w=>{const y=Array.from(w.target.files).slice(0,n);if(!y.length)return;c(!0);const S=[];for(let v=0;v<y.length;v++){f(0);const T=new FormData;T.append("file",y[v]);try{const O=await co(T,N=>f(N));O&&S.push(O)}catch{}}c(!1),f(0),t?.([...e,...S]),s.current&&(s.current.value="")},_=w=>{const y=e.filter((S,v)=>v!==w);t?.(y)};return b("div",{children:[b("div",{style:{...p.container,cursor:i?"not-allowed":p.container.cursor,opacity:i?.6:1},onClick:()=>!i&&s.current?.click(),children:[b("div",{style:{fontSize:48,marginBottom:12},children:"📁"}),b("div",{style:{color:"#222",fontSize:15,marginBottom:4},children:E("点击或拖拽文件到此处上传")}),b("div",{style:{color:"#999",fontSize:13},children:[E("支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传")," ",n," ",E("个文件")]}),b("input",{ref:s,type:"file",multiple:o,accept:r,style:{display:"none"},onChange:g,disabled:i}),a&&b("div",{style:{marginTop:12,color:"#1677ff"},children:[E("正在上传...")," ",u,"%"]})]}),e&&e.length>0&&b("div",{style:{marginTop:12},children:e.map((w,y)=>b("div",{style:p.fileItem,children:[b("div",{style:{display:"flex",alignItems:"center",flex:1},children:[b("span",{style:{fontWeight:500,wordBreak:"break-all"},children:w.split("/").pop()}),b("span",{style:{color:"#8C8F93",fontSize:13,marginLeft:8},children:["[",E("已上传"),"]"]})]}),b("button",{type:"button",onClick:S=>{S.stopPropagation(),_(y)},style:p.removeBtn,disabled:i,children:E("移除")})]},w))})]})},vo=({formState:e,setFormState:t,onClose:n,loading:r})=>{const o=JSON.parse(sessionStorage.getItem("all_dicts")||"{}");console.log(o,"allDicts");const i=o?.channel||[],c=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===j.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"},select:{width:"100%",padding:"10px 12px",borderRadius:6,border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:15,outline:"none"},selectError:{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"},select:{width:"100%",padding:"10px 12px",borderRadius:6,border:"1px solid #23262F",background:"#23262F",color:"#fff",fontSize:15,outline:"none"},selectError:{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 b("form",{onSubmit:async f=>{f.preventDefault();let l=!0;t(h=>({...h,platformError:"",transactionIdError:"",filesError:""})),e.platform||(t(h=>({...h,platformError:E("请选择支付平台")})),l=!1),e.transactionId.trim()||(t(h=>({...h,transactionIdError:E("请输入转账交易ID")})),l=!1),(!e.files||e.files.length===0)&&(t(h=>({...h,filesError:E("请上传转账凭证")})),l=!1),l&&(await uo({transferChannel:e.platform,transferNo:e.transactionId,voucherUrls:e.files}),n(),Me.success(E("离线充值创建成功")))},children:[b("div",{style:{marginBottom:18},children:[b("div",{style:c.label,children:[b("span",{style:{color:"#F53F3F"},children:"*"})," ",E("第三方支付平台")]}),b("select",{style:{...c.select,...e.platformError?c.selectError:{}},value:e.platform,onInput:f=>{const l=f.target.value;t(h=>({...h,platform:l,platformError:l?"":h.platformError}))},children:[b("option",{value:"",disabled:!0,hidden:!0,children:E("请选择支付平台")}),i?.map(f=>b("option",{value:f.value,children:f.label}))]}),e.platformError&&b("div",{style:c.error,children:e.platformError})]}),b("div",{style:{marginBottom:18},children:[b("div",{style:c.label,children:[b("span",{style:{color:"#F53F3F"},children:"*"})," ",E("交易ID")]}),b("input",{type:"text",placeholder:E("请输入转账交易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&&b("div",{style:c.error,children:e.transactionIdError})]}),b("div",{style:{marginBottom:24},children:[b("div",{style:c.label,children:[b("span",{style:{color:"#F53F3F"},children:"*"})," ",E("上传文件")]}),b(So,{value:e.files,onChange:f=>t(l=>({...l,files:f,filesError:""})),maxCount:10,accept:".jpg,.jpeg,.png,.pdf",multiple:!0}),e.filesError&&b("div",{style:c.error,children:e.filesError})]}),b("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[b("button",{type:"button",onClick:n,style:c.buttonCancel,children:E("取消")}),b("button",{type:"submit",disabled:r,style:c.buttonSubmit,children:E("去支付")})]})]})};function Ro({visible:e,onClose:t,onSubmit:n}){const[r,o]=H({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),[i,s]=H("online"),[a,c]=H({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1});if(dn(()=>{e||(s("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 g=!0;if(o(_=>({..._,amountError:"",rechargeChannelError:""})),r.amount.trim()||(o(_=>({..._,amountError:E("请输入充值金额")})),g=!1),r.rechargeChannel||(o(_=>({..._,rechargeChannelError:E("请选择支付平台")})),g=!1),!!g){o(_=>({..._,loading:!0,error:""}));try{await n({amount:r.amount,rechargeChannel:r.rechargeChannel,currency:r.currency}),t()}catch{o(_=>({..._,error:E("提交失败,请重试")}))}finally{o(_=>({..._,loading:!1}))}}},f=p=>{p.target===p.currentTarget&&t()},m=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===j.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,g)=>({flex:1,background:p?"#fff":"#F7F8FA",color:p?"#1890ff":"#222",border:"none",borderRadius:g?"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:g?"1px solid #F0F1F3":void 0,borderLeft:g?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,g)=>({flex:1,background:p?"#23262F":"#181A20",color:p?"#00E8C6":"#fff",border:"none",borderRadius:g?"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:g?"1px solid #23262F":void 0,borderLeft:g?void 0:"1px solid #23262F",transition:"all 0.2s"})};return b("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:b("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:[b("button",{type:"button",onClick:t,style:m.closeBtn,"aria-label":E("关闭"),children:"×"}),b("div",{style:m.title,children:E("充值 / 转账")}),b("div",{style:{display:"flex",marginBottom:28},children:[b("button",{type:"button",onClick:()=>s("online"),style:m.tabBtn(i==="online",!0),children:E("在线充值")}),b("button",{type:"button",onClick:()=>s("offline"),style:m.tabBtn(i==="offline",!1),children:E("线下转账")})]}),i==="online"?b(xo,{formState:r,setFormState:o,onClose:t,loading:r.loading}):b(vo,{formState:a,setFormState:c,onClose:t,loading:a.loading})]})})}function Qe(){return(Qe=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 To=["context","children"];function ko(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(r,o){if(r==null)return{};var i,s,a={},c=Object.keys(r);for(s=0;s<c.length;s++)o.indexOf(i=c[s])>=0||(a[i]=r[i]);return a}(e,To);return un(t,n)}function Co(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=V(ko,Qe({},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=[],i={},s=0,a=n.attributes,c=n.childNodes;for(s=a.length;s--;)a[s].name!=="slot"&&(i[a[s].name]=a[s].value,i[_n(a[s].name)]=a[s].value);for(s=c.length;s--;){var u=t(c[s],null),f=c[s].slot;f?i[f]=V(vt,{name:f},u):o[s]=u}var l=r?V(vt,null,o):o;return V(r||n.nodeName.toLowerCase(),i,l)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?cn:Te)(this._vdom,this._root)}function _n(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function Ao(e,t,n){if(this._vdom){var r={};r[e]=n=n??void 0,r[_n(e)]=n,this._vdom=un(this._vdom,r),Te(this._vdom,this._root)}}function Oo(){Te(this._vdom=null,this._root)}function vt(e,t){var n=this;return V("slot",Qe({},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 mn(e,t,n,r){function o(){var i=Reflect.construct(HTMLElement,[],o);return i._vdomComponent=e,i._root=r&&r.shadow?i.attachShadow({mode:r.mode||"open"}):i,i}return(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=Co,o.prototype.attributeChangedCallback=Ao,o.prototype.disconnectedCallback=Oo,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=n,n.forEach(function(i){Object.defineProperty(o.prototype,i,{get:function(){return this._vdom.props[i]},set:function(s){this._vdom?this.attributeChangedCallback(i,null,s):(this._props||(this._props={}),this._props[i]=s,this.connectedCallback());var a=typeof s;s!=null&&a!=="string"&&a!=="boolean"&&a!=="number"||this.setAttribute(i,s)}})}),customElements.define(t||e.tagName||e.displayName||e.name,o)}function Fo(){const[e,t]=H(!1),n=async r=>{const o=await fo({amount:r.amount,currency:r.currency,rechargeChannel:r.rechargeChannel});window.open(o,"_blank")};return b("div",{children:[b(_o,{onClick:()=>t(!0),children:E("充值/转账")}),b(Ro,{visible:e,onClose:()=>t(!1),onSubmit:n})]})}mn(Fo,"best-recharge",["theme"],{shadow:!1});const Po=({popover:e,children:t,popoverWidth:n=300,popoverMinWidth:r=200,offsetY:o=16,offsetX:i=16,popoverPosition:s="top"})=>{const[a,c]=H(!1),[u,f]=H(s),l=He(null),h=He(null),m=()=>{if(h.current&&(clearTimeout(h.current),h.current=null),s==="top"||s==="bottom")if(l.current){const T=l.current.getBoundingClientRect();s==="top"&&T.top<100?f("bottom"):s==="bottom"&&window.innerHeight-T.bottom<100?f("top"):f(s)}else f(s);else f(s);c(!0)},p=()=>{h.current=window.setTimeout(()=>{c(!1)},120)},g={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===j.WHITE,y=g[w?"white":"dark"];let S={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},v={position:"absolute",zIndex:11,width:0,height:0};return u==="top"?(S={...S,left:"50%",top:-48,transform:"translateX(-50%)"},v={...v,left:"50%",bottom:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderTop:`8px solid ${y.arrow.top}`}):u==="bottom"?(S={...S,left:"50%",top:"100%",marginTop:o,transform:"translateX(-50%)"},v={...v,left:"50%",top:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderBottom:`8px solid ${y.arrow.bottom}`}):u==="leftTop"?(S={...S,right:"100%",top:0,marginRight:i,transform:"none"},v={...v,right:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderLeft:`8px solid ${y.arrow.left}`}):u==="rightTop"&&(S={...S,left:"100%",top:0,marginLeft:i,transform:"translateY(0)"},v={...v,left:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderRight:`8px solid ${y.arrow.right}`}),b("div",{ref:l,style:{position:"relative",display:"inline-block"},onMouseEnter:m,onMouseLeave:p,children:[t,a&&b("div",{style:S,onMouseEnter:m,onMouseLeave:p,children:[e,b("div",{style:v})]})]})};function Rt(e){return e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}const Bo={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 No(e){const[t,n]=H({available:0,currency:"USD",symbol:"$",details:[{label:E("真实金额"),value:0,color:"#15b36b",dot:"#15b36b"},{label:E("冻结金额"),value:0,color:"#f59e0b",dot:"#f59e0b"},{label:E("总可用"),value:0,color:"#1890ff",dot:"#15b36b"}]});dn(()=>{(async()=>{try{const a=await ao(),c={available:a.availableAmount,currency:"USD",symbol:"$",details:[{label:E("真实金额"),value:a.totalAmount,color:"#15b36b",dot:"#15b36b"},{label:E("冻结金额"),value:a.frozenAmount,color:"#f59e0b",dot:"#f59e0b"},{label:E("总可用"),value:a.availableAmount,color:"#1890ff",dot:"#15b36b"}]};n(c)}catch(a){console.error("获取余额失败:",a)}})()},[]);const o=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===j.WHITE,i=Bo[o?"white":"dark"];return b(Po,{popover:b(Z,{children:[b("div",{style:i.popoverTitle,children:E("余额详情")}),t.details.map(s=>b("div",{style:i.detailRow,children:[b("span",{style:i.detailLabel,children:[b("span",{style:i.detailDot(s.dot)}),s.label]}),b("span",{style:i.detailValue(s.color),children:[t.symbol,Rt(s.value)]})]},s.label))]}),popoverPosition:e.popoverPosition||"bottom",children:b("div",{style:i.main,children:[t.symbol,Rt(t.available),b("span",{style:i.currency,children:t.currency})]})})}mn(No,"best-statistical-balance");const Uo=["best-recharge","best-statistical-balance"];exports.components=Uo;exports.initFundUnit=po;exports.npmTest=bn;exports.printCurrentTime=gn;exports.viteProxy=ho;
package/dist/best-unit.js CHANGED
@@ -12,11 +12,11 @@ function Tt(e, t) {
12
12
  const { toString: bn } = Object.prototype, { getPrototypeOf: $e } = Object, { iterator: ge, toStringTag: kt } = Symbol, ye = /* @__PURE__ */ ((e) => (t) => {
13
13
  const n = bn.call(t);
14
14
  return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
15
- })(/* @__PURE__ */ Object.create(null)), D = (e) => (e = e.toLowerCase(), (t) => ye(t) === e), we = (e) => (t) => typeof t === e, { isArray: K } = Array, te = we("undefined");
15
+ })(/* @__PURE__ */ Object.create(null)), U = (e) => (e = e.toLowerCase(), (t) => ye(t) === e), we = (e) => (t) => typeof t === e, { isArray: K } = Array, te = we("undefined");
16
16
  function gn(e) {
17
17
  return e !== null && !te(e) && e.constructor !== null && !te(e.constructor) && P(e.constructor.isBuffer) && e.constructor.isBuffer(e);
18
18
  }
19
- const Ct = D("ArrayBuffer");
19
+ const Ct = U("ArrayBuffer");
20
20
  function yn(e) {
21
21
  let t;
22
22
  return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Ct(e.buffer), t;
@@ -26,11 +26,11 @@ const wn = we("string"), P = we("function"), At = we("number"), xe = (e) => e !=
26
26
  return !1;
27
27
  const t = $e(e);
28
28
  return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(kt in e) && !(ge in e);
29
- }, En = D("Date"), Sn = D("File"), vn = D("Blob"), Rn = D("FileList"), Tn = (e) => xe(e) && P(e.pipe), kn = (e) => {
29
+ }, En = U("Date"), Sn = U("File"), vn = U("Blob"), Rn = U("FileList"), Tn = (e) => xe(e) && P(e.pipe), kn = (e) => {
30
30
  let t;
31
31
  return e && (typeof FormData == "function" && e instanceof FormData || P(e.append) && ((t = ye(e)) === "formdata" || // detect form-data instance
32
32
  t === "object" && P(e.toString) && e.toString() === "[object FormData]"));
33
- }, Cn = D("URLSearchParams"), [An, On, Fn, Pn] = ["ReadableStream", "Request", "Response", "Headers"].map(D), Bn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
33
+ }, Cn = U("URLSearchParams"), [An, On, Fn, Pn] = ["ReadableStream", "Request", "Response", "Headers"].map(U), Bn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
34
34
  function oe(e, t, { allOwnKeys: n = !1 } = {}) {
35
35
  if (e === null || typeof e > "u")
36
36
  return;
@@ -66,7 +66,7 @@ function Pe() {
66
66
  }
67
67
  const Nn = (e, t, n, { allOwnKeys: r } = {}) => (oe(t, (o, i) => {
68
68
  n && P(o) ? e[i] = Tt(o, n) : e[i] = o;
69
- }, { allOwnKeys: r }), e), Dn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Un = (e, t, n, r) => {
69
+ }, { allOwnKeys: r }), e), Un = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Dn = (e, t, n, r) => {
70
70
  e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
71
71
  value: t.prototype
72
72
  }), n && Object.assign(e.prototype, n);
@@ -106,12 +106,12 @@ const Nn = (e, t, n, { allOwnKeys: r } = {}) => (oe(t, (o, i) => {
106
106
  for (; (n = e.exec(t)) !== null; )
107
107
  r.push(n);
108
108
  return r;
109
- }, $n = D("HTMLFormElement"), qn = (e) => e.toLowerCase().replace(
109
+ }, $n = U("HTMLFormElement"), qn = (e) => e.toLowerCase().replace(
110
110
  /[-_\s]([a-z\d])(\w*)/g,
111
111
  function(n, r, o) {
112
112
  return r.toUpperCase() + o;
113
113
  }
114
- ), Ye = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Wn = D("RegExp"), Pt = (e, t) => {
114
+ ), Ye = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Wn = U("RegExp"), Pt = (e, t) => {
115
115
  const n = Object.getOwnPropertyDescriptors(e), r = {};
116
116
  oe(n, (o, i) => {
117
117
  let s;
@@ -161,7 +161,7 @@ const Zn = (e) => {
161
161
  return r;
162
162
  };
163
163
  return n(e, 0);
164
- }, Qn = D("AsyncFunction"), Yn = (e) => e && (xe(e) || P(e)) && P(e.then) && P(e.catch), Bt = ((e, t) => e ? setImmediate : t ? ((n, r) => (q.addEventListener("message", ({ source: o, data: i }) => {
164
+ }, Qn = U("AsyncFunction"), Yn = (e) => e && (xe(e) || P(e)) && P(e.then) && P(e.catch), Bt = ((e, t) => e ? setImmediate : t ? ((n, r) => (q.addEventListener("message", ({ source: o, data: i }) => {
165
165
  o === q && i === n && r.length && r.shift()();
166
166
  }, !1), (o) => {
167
167
  r.push(o), q.postMessage(n, "*");
@@ -197,11 +197,11 @@ const Zn = (e) => {
197
197
  merge: Pe,
198
198
  extend: Nn,
199
199
  trim: Bn,
200
- stripBOM: Dn,
201
- inherits: Un,
200
+ stripBOM: Un,
201
+ inherits: Dn,
202
202
  toFlatObject: In,
203
203
  kindOf: ye,
204
- kindOfTest: D,
204
+ kindOfTest: U,
205
205
  endsWith: Ln,
206
206
  toArray: zn,
207
207
  forEachEntry: jn,
@@ -251,7 +251,7 @@ d.inherits(x, Error, {
251
251
  };
252
252
  }
253
253
  });
254
- const Nt = x.prototype, Dt = {};
254
+ const Nt = x.prototype, Ut = {};
255
255
  [
256
256
  "ERR_BAD_OPTION_VALUE",
257
257
  "ERR_BAD_OPTION",
@@ -267,9 +267,9 @@ const Nt = x.prototype, Dt = {};
267
267
  "ERR_INVALID_URL"
268
268
  // eslint-disable-next-line func-names
269
269
  ].forEach((e) => {
270
- Dt[e] = { value: e };
270
+ Ut[e] = { value: e };
271
271
  });
272
- Object.defineProperties(x, Dt);
272
+ Object.defineProperties(x, Ut);
273
273
  Object.defineProperty(Nt, "isAxiosError", { value: !0 });
274
274
  x.from = (e, t, n, r, o, i) => {
275
275
  const s = Object.create(Nt);
@@ -281,12 +281,12 @@ const nr = null;
281
281
  function Be(e) {
282
282
  return d.isPlainObject(e) || d.isArray(e);
283
283
  }
284
- function Ut(e) {
284
+ function Dt(e) {
285
285
  return d.endsWith(e, "[]") ? e.slice(0, -2) : e;
286
286
  }
287
287
  function et(e, t, n) {
288
288
  return e ? e.concat(t).map(function(o, i) {
289
- return o = Ut(o), !n && i ? "[" + o + "]" : o;
289
+ return o = Dt(o), !n && i ? "[" + o + "]" : o;
290
290
  }).join(n ? "." : "") : t;
291
291
  }
292
292
  function rr(e) {
@@ -324,7 +324,7 @@ function Ee(e, t, n) {
324
324
  if (d.endsWith(g, "{}"))
325
325
  g = r ? g : g.slice(0, -2), p = JSON.stringify(p);
326
326
  else if (d.isArray(p) && rr(p) || (d.isFileList(p) || d.endsWith(g, "[]")) && (w = d.toArray(p)))
327
- return g = Ut(g), w.forEach(function(S, v) {
327
+ return g = Dt(g), w.forEach(function(S, v) {
328
328
  !(d.isUndefined(S) || S === null) && t.append(
329
329
  // eslint-disable-next-line no-nested-ternary
330
330
  s === !0 ? et([g], v, i) : s === null ? g : g + "[]",
@@ -1096,10 +1096,10 @@ const qt = (e) => {
1096
1096
  let r = 0, o;
1097
1097
  for (; r < n; )
1098
1098
  o = r + t, yield e.slice(r, o), r = o;
1099
- }, Dr = async function* (e, t) {
1100
- for await (const n of Ur(e))
1099
+ }, Ur = async function* (e, t) {
1100
+ for await (const n of Dr(e))
1101
1101
  yield* Nr(n, t);
1102
- }, Ur = async function* (e) {
1102
+ }, Dr = async function* (e) {
1103
1103
  if (e[Symbol.asyncIterator]) {
1104
1104
  yield* e;
1105
1105
  return;
@@ -1116,7 +1116,7 @@ const qt = (e) => {
1116
1116
  await t.cancel();
1117
1117
  }
1118
1118
  }, at = (e, t, n, r) => {
1119
- const o = Dr(e, t);
1119
+ const o = Ur(e, t);
1120
1120
  let i = 0, s, a = (c) => {
1121
1121
  s || (s = !0, r && r(c));
1122
1122
  };
@@ -1160,8 +1160,8 @@ const qt = (e) => {
1160
1160
  }
1161
1161
  }).headers.has("Content-Type");
1162
1162
  return e && !t;
1163
- }), lt = 64 * 1024, De = Wt && Jt(() => d.isReadableStream(new Response("").body)), _e = {
1164
- stream: De && ((e) => e.body)
1163
+ }), lt = 64 * 1024, Ue = Wt && Jt(() => d.isReadableStream(new Response("").body)), _e = {
1164
+ stream: Ue && ((e) => e.body)
1165
1165
  };
1166
1166
  Se && ((e) => {
1167
1167
  ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
@@ -1235,11 +1235,11 @@ const zr = async (e) => {
1235
1235
  credentials: w ? l : void 0
1236
1236
  });
1237
1237
  let y = await fetch(p, h);
1238
- const S = De && (u === "stream" || u === "response");
1239
- if (De && (a || S && g)) {
1238
+ const S = Ue && (u === "stream" || u === "response");
1239
+ if (Ue && (a || S && g)) {
1240
1240
  const T = {};
1241
- ["status", "statusText", "headers"].forEach((j) => {
1242
- T[j] = y[j];
1241
+ ["status", "statusText", "headers"].forEach((M) => {
1242
+ T[M] = y[M];
1243
1243
  });
1244
1244
  const O = d.toFiniteNumber(y.headers.get("content-length")), [N, z] = a && ot(
1245
1245
  O,
@@ -1272,12 +1272,12 @@ const zr = async (e) => {
1272
1272
  }
1273
1273
  ) : x.from(w, w && w.code, e, p);
1274
1274
  }
1275
- }), Ue = {
1275
+ }), De = {
1276
1276
  http: nr,
1277
1277
  xhr: Pr,
1278
1278
  fetch: jr
1279
1279
  };
1280
- d.forEach(Ue, (e, t) => {
1280
+ d.forEach(De, (e, t) => {
1281
1281
  if (e) {
1282
1282
  try {
1283
1283
  Object.defineProperty(e, "name", { value: t });
@@ -1295,7 +1295,7 @@ const ct = (e) => `- ${e}`, Mr = (e) => d.isFunction(e) || e === null || e === !
1295
1295
  for (let i = 0; i < t; i++) {
1296
1296
  n = e[i];
1297
1297
  let s;
1298
- if (r = n, !Mr(n) && (r = Ue[(s = String(n)).toLowerCase()], r === void 0))
1298
+ if (r = n, !Mr(n) && (r = De[(s = String(n)).toLowerCase()], r === void 0))
1299
1299
  throw new x(`Unknown adapter '${s}'`);
1300
1300
  if (r)
1301
1301
  break;
@@ -1315,7 +1315,7 @@ const ct = (e) => `- ${e}`, Mr = (e) => d.isFunction(e) || e === null || e === !
1315
1315
  }
1316
1316
  return r;
1317
1317
  },
1318
- adapters: Ue
1318
+ adapters: De
1319
1319
  };
1320
1320
  function Oe(e) {
1321
1321
  if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
@@ -1688,8 +1688,8 @@ C.getAdapter = Vt.getAdapter;
1688
1688
  C.HttpStatusCode = Ie;
1689
1689
  C.default = C;
1690
1690
  const {
1691
- Axios: Do,
1692
- AxiosError: Uo,
1691
+ Axios: Uo,
1692
+ AxiosError: Do,
1693
1693
  CanceledError: Io,
1694
1694
  isCancel: Lo,
1695
1695
  CancelToken: zo,
@@ -1821,13 +1821,13 @@ function _t(e) {
1821
1821
  };
1822
1822
  }
1823
1823
  function Ge(e, t, n, r, o, i, s, a, c, u) {
1824
- var f, l, h, m, p, g, _, w, y, S, v, T, O, N, z, j, ke, U = t.type;
1824
+ var f, l, h, m, p, g, _, w, y, S, v, T, O, N, z, M, ke, D = t.type;
1825
1825
  if (t.constructor != null) return null;
1826
1826
  128 & n.__u && (c = !!(32 & n.__u), i = [a = t.__e = n.__e]), (f = R.__b) && f(t);
1827
- e: if (typeof U == "function") try {
1828
- if (w = t.props, y = "prototype" in U && U.prototype.render, S = (f = U.contextType) && r[f.__c], v = f ? S ? S.props.value : f.__ : r, n.__c ? _ = (l = t.__c = n.__c).__ = l.__E : (y ? t.__c = l = new U(w, v) : (t.__c = l = new de(w, v), l.constructor = U, l.render = Zr), S && S.sub(l), l.props = w, l.state || (l.state = {}), l.context = v, l.__n = r, h = l.__d = !0, l.__h = [], l._sb = []), y && l.__s == null && (l.__s = l.state), y && U.getDerivedStateFromProps != null && (l.__s == l.state && (l.__s = L({}, l.__s)), L(l.__s, U.getDerivedStateFromProps(w, l.__s))), m = l.props, p = l.state, l.__v = t, h) y && U.getDerivedStateFromProps == null && l.componentWillMount != null && l.componentWillMount(), y && l.componentDidMount != null && l.__h.push(l.componentDidMount);
1827
+ e: if (typeof D == "function") try {
1828
+ if (w = t.props, y = "prototype" in D && D.prototype.render, S = (f = D.contextType) && r[f.__c], v = f ? S ? S.props.value : f.__ : r, n.__c ? _ = (l = t.__c = n.__c).__ = l.__E : (y ? t.__c = l = new D(w, v) : (t.__c = l = new de(w, v), l.constructor = D, l.render = Zr), S && S.sub(l), l.props = w, l.state || (l.state = {}), l.context = v, 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 = L({}, l.__s)), L(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);
1829
1829
  else {
1830
- if (y && U.getDerivedStateFromProps == null && w !== m && l.componentWillReceiveProps != null && l.componentWillReceiveProps(w, v), !l.__e && l.shouldComponentUpdate != null && l.shouldComponentUpdate(w, l.__s, v) === !1 || t.__v == n.__v) {
1830
+ if (y && D.getDerivedStateFromProps == null && w !== m && l.componentWillReceiveProps != null && l.componentWillReceiveProps(w, v), !l.__e && l.shouldComponentUpdate != null && l.shouldComponentUpdate(w, l.__s, v) === !1 || t.__v == n.__v) {
1831
1831
  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) {
1832
1832
  Q && (Q.__ = t);
1833
1833
  }), T = 0; T < l._sb.length; T++) l.__h.push(l._sb[T]);
@@ -1844,7 +1844,7 @@ function Ge(e, t, n, r, o, i, s, a, c, u) {
1844
1844
  } else do
1845
1845
  l.__d = !1, O && O(t), f = l.render(l.props, l.state, l.context), l.state = l.__s;
1846
1846
  while (l.__d && ++N < 25);
1847
- l.state = l.__s, l.getChildContext != null && (r = L(L({}, r), l.getChildContext())), y && !h && l.getSnapshotBeforeUpdate != null && (g = l.getSnapshotBeforeUpdate(m, p)), j = f, f != null && f.type === Z && f.key == null && (j = an(f.props.children)), a = rn(e, Re(j) ? j : [j], t, n, r, o, i, s, a, c, u), l.base = t.__e, t.__u &= -161, l.__h.length && s.push(l), _ && (l.__E = l.__ = null);
1847
+ l.state = l.__s, l.getChildContext != null && (r = L(L({}, r), l.getChildContext())), y && !h && l.getSnapshotBeforeUpdate != null && (g = l.getSnapshotBeforeUpdate(m, p)), M = f, f != null && f.type === Z && f.key == null && (M = an(f.props.children)), a = rn(e, Re(M) ? M : [M], t, n, r, o, i, s, a, c, u), l.base = t.__e, t.__u &= -161, l.__h.length && s.push(l), _ && (l.__E = l.__ = null);
1848
1848
  } catch (Q) {
1849
1849
  if (t.__v = null, c || i != null) if (Q.then) {
1850
1850
  for (t.__u |= c ? 160 : 128; a && a.nodeType == 8 && a.nextSibling; ) a = a.nextSibling;
@@ -2272,14 +2272,14 @@ const so = async () => ae.get("/all-dicts", {}).then((e) => (sessionStorage.setI
2272
2272
  };
2273
2273
  return ae.post("/online/recharge/create", n, {}).then((r) => r.data.redirect_url);
2274
2274
  };
2275
- var Ze = /* @__PURE__ */ ((e) => (e.ZH = "zh", e.EN = "en", e))(Ze || {}), M = /* @__PURE__ */ ((e) => (e.WHITE = "white", e.DARK = "dark", e))(M || {});
2275
+ var Ze = /* @__PURE__ */ ((e) => (e.ZH = "zh", e.EN = "en", e))(Ze || {}), j = /* @__PURE__ */ ((e) => (e.WHITE = "white", e.DARK = "dark", e))(j || {});
2276
2276
  function Zo(e) {
2277
2277
  so();
2278
2278
  const {
2279
2279
  merchant_id: t,
2280
2280
  biz_type: n,
2281
2281
  fund_balance_id: r,
2282
- theme: o = M.WHITE,
2282
+ theme: o = j.WHITE,
2283
2283
  locale: i = Ze.ZH
2284
2284
  } = e, s = "Bearer " + e.token;
2285
2285
  return sessionStorage.setItem(
@@ -2310,22 +2310,28 @@ const Qo = {
2310
2310
  }
2311
2311
  };
2312
2312
  function uo({ onClick: e, color: t, children: n }) {
2313
- return /* @__PURE__ */ b(
2314
- "button",
2315
- {
2316
- style: {
2317
- background: t || "#1890ff",
2318
- color: "#fff",
2319
- border: "none",
2320
- borderRadius: 4,
2321
- padding: "8px 16px",
2322
- cursor: "pointer",
2323
- fontSize: 16
2324
- },
2325
- onClick: e,
2326
- children: n
2327
- }
2328
- );
2313
+ const i = JSON.parse(
2314
+ sessionStorage.getItem("fund_unit_params") || "{}"
2315
+ ).theme === j.WHITE ? {
2316
+ background: t || "#1890ff",
2317
+ color: "#fff",
2318
+ border: "none",
2319
+ borderRadius: 6,
2320
+ padding: "8px 16px",
2321
+ cursor: "pointer",
2322
+ fontSize: 16,
2323
+ fontWeight: 600
2324
+ } : {
2325
+ background: t || "#00E8C6",
2326
+ color: "#fff",
2327
+ border: "none",
2328
+ borderRadius: 6,
2329
+ padding: "8px 16px",
2330
+ cursor: "pointer",
2331
+ fontSize: 16,
2332
+ fontWeight: 600
2333
+ };
2334
+ return /* @__PURE__ */ b("button", { style: i, onClick: e, type: "button", children: n });
2329
2335
  }
2330
2336
  const fo = {
2331
2337
  // 余额相关
@@ -2434,7 +2440,7 @@ function E(e) {
2434
2440
  const bo = ({ formState: e, setFormState: t, onClose: n, loading: r }) => {
2435
2441
  const o = JSON.parse(sessionStorage.getItem("all_dicts") || "{}"), i = o?.currency || [], s = o?.channel?.filter((h) => h.payment_support) || [], c = JSON.parse(
2436
2442
  sessionStorage.getItem("fund_unit_params") || "{}"
2437
- ).theme === M.WHITE, u = c ? {
2443
+ ).theme === j.WHITE, u = c ? {
2438
2444
  label: {
2439
2445
  marginBottom: 8,
2440
2446
  fontSize: 14,
@@ -2535,7 +2541,7 @@ const bo = ({ formState: e, setFormState: t, onClose: n, loading: r }) => {
2535
2541
  fontSize: 15,
2536
2542
  cursor: "pointer"
2537
2543
  }, l = c ? {
2538
- background: "#155EEF",
2544
+ background: "#1890ff",
2539
2545
  color: "#fff",
2540
2546
  border: "none",
2541
2547
  borderRadius: 6,
@@ -2733,7 +2739,7 @@ const bo = ({ formState: e, setFormState: t, onClose: n, loading: r }) => {
2733
2739
  }) => {
2734
2740
  const s = He(null), [a, c] = H(!1), [u, f] = H(0), m = JSON.parse(
2735
2741
  sessionStorage.getItem("fund_unit_params") || "{}"
2736
- ).theme === M.WHITE ? "white" : "dark", p = go[m], g = async (w) => {
2742
+ ).theme === j.WHITE ? "white" : "dark", p = go[m], g = async (w) => {
2737
2743
  const y = Array.from(w.target.files).slice(
2738
2744
  0,
2739
2745
  n
@@ -2828,7 +2834,7 @@ const bo = ({ formState: e, setFormState: t, onClose: n, loading: r }) => {
2828
2834
  console.log(o, "allDicts");
2829
2835
  const i = o?.channel || [], c = JSON.parse(
2830
2836
  sessionStorage.getItem("fund_unit_params") || "{}"
2831
- ).theme === M.WHITE ? {
2837
+ ).theme === j.WHITE ? {
2832
2838
  label: {
2833
2839
  marginBottom: 8,
2834
2840
  fontSize: 14,
@@ -2874,7 +2880,7 @@ const bo = ({ formState: e, setFormState: t, onClose: n, loading: r }) => {
2874
2880
  cursor: "pointer"
2875
2881
  },
2876
2882
  buttonSubmit: {
2877
- background: "#155EEF",
2883
+ background: "#1890ff",
2878
2884
  color: "#fff",
2879
2885
  border: "none",
2880
2886
  borderRadius: 6,
@@ -3127,7 +3133,7 @@ function xo({ visible: e, onClose: t, onSubmit: n }) {
3127
3133
  p.target === p.currentTarget && t();
3128
3134
  }, m = JSON.parse(
3129
3135
  sessionStorage.getItem("fund_unit_params") || "{}"
3130
- ).theme === M.WHITE ? {
3136
+ ).theme === j.WHITE ? {
3131
3137
  modalBg: "#fff",
3132
3138
  modalColor: "#222",
3133
3139
  modalBoxShadow: "0 4px 24px rgba(0,0,0,0.08)",
@@ -3153,7 +3159,7 @@ function xo({ visible: e, onClose: t, onSubmit: n }) {
3153
3159
  tabBtn: (p, g) => ({
3154
3160
  flex: 1,
3155
3161
  background: p ? "#fff" : "#F7F8FA",
3156
- color: p ? "#155EEF" : "#222",
3162
+ color: p ? "#1890ff" : "#222",
3157
3163
  border: "none",
3158
3164
  borderRadius: g ? "8px 0 0 8px" : "0 8px 8px 0",
3159
3165
  fontWeight: p ? 600 : 400,
@@ -3442,7 +3448,7 @@ const Co = ({
3442
3448
  }
3443
3449
  }, w = JSON.parse(
3444
3450
  sessionStorage.getItem("fund_unit_params") || "{}"
3445
- ).theme === M.WHITE, y = g[w ? "white" : "dark"];
3451
+ ).theme === j.WHITE, y = g[w ? "white" : "dark"];
3446
3452
  let S = {
3447
3453
  position: "absolute",
3448
3454
  zIndex: 999,
@@ -3652,7 +3658,7 @@ function Oo(e) {
3652
3658
  details: [
3653
3659
  { label: E("真实金额"), value: 0, color: "#15b36b", dot: "#15b36b" },
3654
3660
  { label: E("冻结金额"), value: 0, color: "#f59e0b", dot: "#f59e0b" },
3655
- { label: E("总可用"), value: 0, color: "#155EEF", dot: "#15b36b" }
3661
+ { label: E("总可用"), value: 0, color: "#1890ff", dot: "#15b36b" }
3656
3662
  ]
3657
3663
  });
3658
3664
  dn(() => {
@@ -3679,7 +3685,7 @@ function Oo(e) {
3679
3685
  {
3680
3686
  label: E("总可用"),
3681
3687
  value: a.availableAmount,
3682
- color: "#155EEF",
3688
+ color: "#1890ff",
3683
3689
  dot: "#15b36b"
3684
3690
  }
3685
3691
  ]
@@ -3692,7 +3698,7 @@ function Oo(e) {
3692
3698
  }, []);
3693
3699
  const o = JSON.parse(
3694
3700
  sessionStorage.getItem("fund_unit_params") || "{}"
3695
- ).theme === M.WHITE, i = Ao[o ? "white" : "dark"];
3701
+ ).theme === j.WHITE, i = Ao[o ? "white" : "dark"];
3696
3702
  return /* @__PURE__ */ b(
3697
3703
  Co,
3698
3704
  {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "best-unit",
3
3
  "private": false,
4
- "version": "0.0.39",
4
+ "version": "0.0.41",
5
5
  "type": "module",
6
6
  "main": "dist/best-unit.cjs",
7
7
  "module": "dist/best-unit.js",
@@ -1,4 +1,5 @@
1
1
  import type { ComponentChildren } from "preact";
2
+ import { Theme } from "../../../../types";
2
3
 
3
4
  interface ButtonProps {
4
5
  onClick?: () => void;
@@ -7,20 +8,34 @@ interface ButtonProps {
7
8
  }
8
9
 
9
10
  export function ThemedButton({ onClick, color, children }: ButtonProps) {
10
- // 组件加载时直接调用
11
- return (
12
- <button
13
- style={{
11
+ // 优先theme,其次whiteTheme,默认白色
12
+ const fundUnitParams = JSON.parse(
13
+ sessionStorage.getItem("fund_unit_params") || "{}"
14
+ );
15
+ const whiteTheme = fundUnitParams.theme === Theme.WHITE;
16
+ const style = whiteTheme
17
+ ? {
14
18
  background: color || "#1890ff",
15
19
  color: "#fff",
16
20
  border: "none",
17
- borderRadius: 4,
21
+ borderRadius: 6,
22
+ padding: "8px 16px",
23
+ cursor: "pointer",
24
+ fontSize: 16,
25
+ fontWeight: 600,
26
+ }
27
+ : {
28
+ background: color || "#00E8C6",
29
+ color: "#fff",
30
+ border: "none",
31
+ borderRadius: 6,
18
32
  padding: "8px 16px",
19
33
  cursor: "pointer",
20
34
  fontSize: 16,
21
- }}
22
- onClick={onClick}
23
- >
35
+ fontWeight: 600,
36
+ };
37
+ return (
38
+ <button style={style} onClick={onClick} type="button">
24
39
  {children}
25
40
  </button>
26
41
  );
@@ -107,7 +107,7 @@ export const OfflineTransferForm: FunctionalComponent<
107
107
  cursor: "pointer",
108
108
  },
109
109
  buttonSubmit: {
110
- background: "#155EEF",
110
+ background: "#1890ff",
111
111
  color: "#fff",
112
112
  border: "none",
113
113
  borderRadius: 6,
@@ -83,7 +83,7 @@ export const OnlineRechargeForm: FunctionalComponent<
83
83
  cursor: "pointer",
84
84
  },
85
85
  buttonSubmit: {
86
- background: "#155EEF",
86
+ background: "#1890ff",
87
87
  color: "#fff",
88
88
  border: "none",
89
89
  borderRadius: 6,
@@ -207,7 +207,7 @@ export const OnlineRechargeForm: FunctionalComponent<
207
207
  };
208
208
  const buttonSubmitStyle = whiteTheme
209
209
  ? {
210
- background: "#155EEF",
210
+ background: "#1890ff",
211
211
  color: "#fff",
212
212
  border: "none",
213
213
  borderRadius: 6,
@@ -142,7 +142,7 @@ export function Recharge({ visible, onClose, onSubmit }: ModalFormProps) {
142
142
  tabBtn: (active: boolean, left: boolean) => ({
143
143
  flex: 1,
144
144
  background: active ? "#fff" : "#F7F8FA",
145
- color: active ? "#155EEF" : "#222",
145
+ color: active ? "#1890ff" : "#222",
146
146
  border: "none",
147
147
  borderRadius: left ? "8px 0 0 8px" : "0 8px 8px 0",
148
148
  fontWeight: active ? 600 : 400,
@@ -119,7 +119,7 @@ function StatisticalBalance(props: { popoverPosition?: PopoverPosition }) {
119
119
  details: [
120
120
  { label: t("真实金额"), value: 0, color: "#15b36b", dot: "#15b36b" },
121
121
  { label: t("冻结金额"), value: 0, color: "#f59e0b", dot: "#f59e0b" },
122
- { label: t("总可用"), value: 0, color: "#155EEF", dot: "#15b36b" },
122
+ { label: t("总可用"), value: 0, color: "#1890ff", dot: "#15b36b" },
123
123
  ],
124
124
  });
125
125
 
@@ -149,7 +149,7 @@ function StatisticalBalance(props: { popoverPosition?: PopoverPosition }) {
149
149
  {
150
150
  label: t("总可用"),
151
151
  value: balance.availableAmount,
152
- color: "#155EEF",
152
+ color: "#1890ff",
153
153
  dot: "#15b36b",
154
154
  },
155
155
  ],
package/src/demo/App.tsx CHANGED
@@ -84,13 +84,13 @@ export default function DemoApp() {
84
84
  padding: "8px 16px",
85
85
  backgroundColor:
86
86
  currentLocale === "zh"
87
- ? "#155EEF"
87
+ ? "#1890ff"
88
88
  : isDark
89
89
  ? "#23262F"
90
90
  : "#fff",
91
91
  color:
92
92
  currentLocale === "zh" ? "#fff" : isDark ? "#F5F6FA" : "#333",
93
- border: "1px solid #155EEF",
93
+ border: "1px solid #1890ff",
94
94
  borderRadius: 6,
95
95
  cursor: "pointer",
96
96
  fontWeight: currentLocale === "zh" ? "bold" : "normal",
@@ -104,13 +104,13 @@ export default function DemoApp() {
104
104
  padding: "8px 16px",
105
105
  backgroundColor:
106
106
  currentLocale === "en"
107
- ? "#155EEF"
107
+ ? "#1890ff"
108
108
  : isDark
109
109
  ? "#23262F"
110
110
  : "#fff",
111
111
  color:
112
112
  currentLocale === "en" ? "#fff" : isDark ? "#F5F6FA" : "#333",
113
- border: "1px solid #155EEF",
113
+ border: "1px solid #1890ff",
114
114
  borderRadius: 6,
115
115
  cursor: "pointer",
116
116
  fontWeight: currentLocale === "en" ? "bold" : "normal",
@@ -142,7 +142,7 @@ export default function DemoApp() {
142
142
  padding: "8px 16px",
143
143
  backgroundColor:
144
144
  currentTheme === Theme.WHITE
145
- ? "#155EEF"
145
+ ? "#1890ff"
146
146
  : isDark
147
147
  ? "#23262F"
148
148
  : "#fff",
@@ -152,7 +152,7 @@ export default function DemoApp() {
152
152
  : isDark
153
153
  ? "#F5F6FA"
154
154
  : "#333",
155
- border: "1px solid #155EEF",
155
+ border: "1px solid #1890ff",
156
156
  borderRadius: 6,
157
157
  cursor: "pointer",
158
158
  fontWeight: currentTheme === Theme.WHITE ? "bold" : "normal",
@@ -167,7 +167,7 @@ export default function DemoApp() {
167
167
  padding: "8px 16px",
168
168
  backgroundColor:
169
169
  currentTheme === Theme.DARK
170
- ? "#155EEF"
170
+ ? "#1890ff"
171
171
  : isDark
172
172
  ? "#23262F"
173
173
  : "#fff",
@@ -177,7 +177,7 @@ export default function DemoApp() {
177
177
  : isDark
178
178
  ? "#F5F6FA"
179
179
  : "#333",
180
- border: "1px solid #155EEF",
180
+ border: "1px solid #1890ff",
181
181
  borderRadius: 6,
182
182
  cursor: "pointer",
183
183
  fontWeight: currentTheme === Theme.DARK ? "bold" : "normal",