best-unit 0.0.53 → 0.0.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/best-unit.cjs +9 -9
- package/dist/best-unit.js +491 -464
- package/dist/types/global.d.ts +2 -0
- package/package.json +1 -1
- package/src/components/business/recharge-sdk/components/OfflineTransferForm.tsx +3 -1
- package/src/components/business/recharge-sdk/components/OnlineRechargeForm.tsx +52 -2
- package/src/types/global.d.ts +2 -0
- package/src/utils/business/index.ts +1 -1
- package/src/utils/common/index.ts +0 -27
package/dist/best-unit.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function bn(){console.log("npm package test!!!")}function yn(){console.log("Current time:",new Date().toISOString())}function Ct(e,t){return function(){return e.apply(t,arguments)}}const{toString:wn}=Object.prototype,{getPrototypeOf:Je}=Object,{iterator:ye,toStringTag:At}=Symbol,we=(e=>t=>{const n=wn.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),U=e=>(e=e.toLowerCase(),t=>we(t)===e),xe=e=>t=>typeof t===e,{isArray:K}=Array,ne=xe("undefined");function xn(e){return e!==null&&!ne(e)&&e.constructor!==null&&!ne(e.constructor)&&P(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ot=U("ArrayBuffer");function En(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ot(e.buffer),t}const vn=xe("string"),P=xe("function"),Ft=xe("number"),Ee=e=>e!==null&&typeof e=="object",Sn=e=>e===!0||e===!1,ce=e=>{if(we(e)!=="object")return!1;const t=Je(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(At in e)&&!(ye in e)},Rn=U("Date"),Tn=U("File"),kn=U("Blob"),Cn=U("FileList"),An=e=>Ee(e)&&P(e.pipe),On=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||P(e.append)&&((t=we(e))==="formdata"||t==="object"&&P(e.toString)&&e.toString()==="[object FormData]"))},Fn=U("URLSearchParams"),[Pn,Bn,Nn,In]=["ReadableStream","Request","Response","Headers"].map(U),Un=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ie(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 Pt(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const q=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Bt=e=>!ne(e)&&e!==q;function Ie(){const{caseless:e}=Bt(this)&&this||{},t={},n=(r,o)=>{const i=e&&Pt(t,o)||o;ce(t[i])&&ce(r)?t[i]=Ie(t[i],r):ce(r)?t[i]=Ie({},r):K(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&ie(arguments[r],n);return t}const Dn=(e,t,n,{allOwnKeys:r}={})=>(ie(t,(o,i)=>{n&&P(o)?e[i]=Ct(o,n):e[i]=o},{allOwnKeys:r}),e),Ln=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),zn=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Hn=(e,t,n,r)=>{let o,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&&Je(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},jn=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Mn=e=>{if(!e)return null;if(K(e))return e;let t=e.length;if(!Ft(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},$n=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Je(Uint8Array)),qn=(e,t)=>{const r=(e&&e[ye]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},Wn=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Jn=U("HTMLFormElement"),Vn=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),tt=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Gn=U("RegExp"),Nt=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ie(n,(o,i)=>{let s;(s=t(o,i,e))!==!1&&(r[i]=s||o)}),Object.defineProperties(e,r)},Kn=e=>{Nt(e,(t,n)=>{if(P(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(P(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Xn=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return K(e)?r(e):r(String(e).split(t)),n},Zn=()=>{},Qn=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Yn(e){return!!(e&&P(e.append)&&e[At]==="FormData"&&e[ye])}const er=e=>{const t=new Array(10),n=(r,o)=>{if(Ee(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=K(r)?[]:{};return ie(r,(s,a)=>{const c=n(s,o+1);!ne(c)&&(i[a]=c)}),t[o]=void 0,i}}return r};return n(e,0)},tr=U("AsyncFunction"),nr=e=>e&&(Ee(e)||P(e))&&P(e.then)&&P(e.catch),It=((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)),rr=typeof queueMicrotask<"u"?queueMicrotask.bind(q):typeof process<"u"&&process.nextTick||It,or=e=>e!=null&&P(e[ye]),d={isArray:K,isArrayBuffer:Ot,isBuffer:xn,isFormData:On,isArrayBufferView:En,isString:vn,isNumber:Ft,isBoolean:Sn,isObject:Ee,isPlainObject:ce,isReadableStream:Pn,isRequest:Bn,isResponse:Nn,isHeaders:In,isUndefined:ne,isDate:Rn,isFile:Tn,isBlob:kn,isRegExp:Gn,isFunction:P,isStream:An,isURLSearchParams:Fn,isTypedArray:$n,isFileList:Cn,forEach:ie,merge:Ie,extend:Dn,trim:Un,stripBOM:Ln,inherits:zn,toFlatObject:Hn,kindOf:we,kindOfTest:U,endsWith:jn,toArray:Mn,forEachEntry:qn,matchAll:Wn,isHTMLForm:Jn,hasOwnProperty:tt,hasOwnProp:tt,reduceDescriptors:Nt,freezeMethods:Kn,toObjectSet:Xn,toCamelCase:Vn,noop:Zn,toFiniteNumber:Qn,findKey:Pt,global:q,isContextDefined:Bt,isSpecCompliantForm:Yn,toJSONObject:er,isAsyncFn:tr,isThenable:nr,setImmediate:It,asap:rr,isIterable:or};function S(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}d.inherits(S,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:d.toJSONObject(this.config),code:this.code,status:this.status}}});const Ut=S.prototype,Dt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Dt[e]={value:e}});Object.defineProperties(S,Dt);Object.defineProperty(Ut,"isAxiosError",{value:!0});S.from=(e,t,n,r,o,i)=>{const s=Object.create(Ut);return d.toFlatObject(e,s,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),S.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const ir=null;function Ue(e){return d.isPlainObject(e)||d.isArray(e)}function Lt(e){return d.endsWith(e,"[]")?e.slice(0,-2):e}function nt(e,t,n){return e?e.concat(t).map(function(o,i){return o=Lt(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function sr(e){return d.isArray(e)&&!e.some(Ue)}const ar=d.toFlatObject(d,{},null,function(t){return/^is[A-Z]/.test(t)});function ve(e,t,n){if(!d.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=d.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,p){return!d.isUndefined(p[b])});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(h){if(h===null)return"";if(d.isDate(h))return h.toISOString();if(d.isBoolean(h))return h.toString();if(!c&&d.isBlob(h))throw new S("Blob is not supported. Use a Buffer instead.");return d.isArrayBuffer(h)||d.isTypedArray(h)?c&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function f(h,b,p){let y=h;if(h&&!p&&typeof h=="object"){if(d.endsWith(b,"{}"))b=r?b:b.slice(0,-2),h=JSON.stringify(h);else if(d.isArray(h)&&sr(h)||(d.isFileList(h)||d.endsWith(b,"[]"))&&(y=d.toArray(h)))return b=Lt(b),y.forEach(function(v,x){!(d.isUndefined(v)||v===null)&&t.append(s===!0?nt([b],x,i):s===null?b:b+"[]",u(v))}),!1}return Ue(h)?!0:(t.append(nt(p,b,i),u(h)),!1)}const l=[],g=Object.assign(ar,{defaultVisitor:f,convertValue:u,isVisitable:Ue});function m(h,b){if(!d.isUndefined(h)){if(l.indexOf(h)!==-1)throw Error("Circular reference detected in "+b.join("."));l.push(h),d.forEach(h,function(y,w){(!(d.isUndefined(y)||y===null)&&o.call(t,y,d.isString(w)?w.trim():w,b,g))===!0&&m(y,b?b.concat(w):[w])}),l.pop()}}if(!d.isObject(e))throw new TypeError("data must be an object");return m(e),t}function rt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Ve(e,t){this._pairs=[],e&&ve(e,this,t)}const zt=Ve.prototype;zt.append=function(t,n){this._pairs.push([t,n])};zt.toString=function(t){const n=t?function(r){return t.call(this,r,rt)}:rt;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function lr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ht(e,t,n){if(!t)return e;const r=n&&n.encode||lr;d.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(o?i=o(t,n):i=d.isURLSearchParams(t)?t.toString():new Ve(t,n).toString(r),i){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class ot{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){d.forEach(this.handlers,function(r){r!==null&&t(r)})}}const jt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},cr=typeof URLSearchParams<"u"?URLSearchParams:Ve,ur=typeof FormData<"u"?FormData:null,fr=typeof Blob<"u"?Blob:null,dr={isBrowser:!0,classes:{URLSearchParams:cr,FormData:ur,Blob:fr},protocols:["http","https","file","blob","url","data"]},Ge=typeof window<"u"&&typeof document<"u",De=typeof navigator=="object"&&navigator||void 0,pr=Ge&&(!De||["ReactNative","NativeScript","NS"].indexOf(De.product)<0),hr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",_r=Ge&&window.location.href||"http://localhost",mr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ge,hasStandardBrowserEnv:pr,hasStandardBrowserWebWorkerEnv:hr,navigator:De,origin:_r},Symbol.toStringTag,{value:"Module"})),F={...mr,...dr};function gr(e,t){return ve(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 yr(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 Mt(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]=yr(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 wr(e,t,n){if(d.isString(e))try{return(t||JSON.parse)(e),d.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const se={transitional:jt,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(Mt(t)):t;if(d.isArrayBuffer(t)||d.isBuffer(t)||d.isStream(t)||d.isFile(t)||d.isBlob(t)||d.isReadableStream(t))return t;if(d.isArrayBufferView(t))return t.buffer;if(d.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return gr(t,this.formSerializer).toString();if((a=d.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return ve(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),wr(t)):t}],transformResponse:[function(t){const n=this.transitional||se.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"?S.from(a,S.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:F.classes.FormData,Blob:F.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};d.forEach(["delete","get","head","post","put","patch"],e=>{se.headers[e]={}});const xr=d.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Er=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
2
|
-
`).forEach(function(s){o=s.indexOf(":"),n=s.substring(0,o).trim().toLowerCase(),r=s.substring(o+1).trim(),!(!n||t[n]&&xr[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},it=Symbol("internals");function ee(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
|
|
3
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[it]=this[it]={accessors:{}}).accessors,o=this.prototype;function i(s){const a=ee(s);r[a]||(Tr(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 Pe(e,t){const n=this||se,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 $t(e){return!!(e&&e.__CANCEL__)}function X(e,t,n){S.call(this,e??"canceled",S.ERR_CANCELED,t,n),this.name="CanceledError"}d.inherits(X,S,{__CANCEL__:!0});function qt(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new S("Request failed with status code "+n.status,[S.ERR_BAD_REQUEST,S.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function kr(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Cr(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,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,g=0;for(;l!==o;)g+=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(g*1e3/m):void 0}}function Ar(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=Cr(50,250);return Ar(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)},st=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},at=e=>(...t)=>d.asap(()=>e(...t)),Or=F.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,F.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(F.origin),F.navigator&&/(msie|trident)/i.test(F.navigator.userAgent)):()=>!0,Fr=F.hasStandardBrowserEnv?{write(e,t,n,r,o,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 Pr(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Br(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Wt(e,t,n){let r=!Pr(t);return e&&(r||n==!1)?Br(e,t):t}const lt=e=>e instanceof B?{...e}:e;function J(e,t){t=t||{};const n={};function r(u,f,l,g){return d.isPlainObject(u)&&d.isPlainObject(f)?d.merge.call({caseless:g},u,f):d.isPlainObject(f)?d.merge({},f):d.isArray(f)?f.slice():f}function o(u,f,l,g){if(d.isUndefined(f)){if(!d.isUndefined(u))return r(void 0,u,l,g)}else return r(u,f,l,g)}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(lt(u),lt(f),l,!0)};return d.forEach(Object.keys(Object.assign({},e,t)),function(f){const l=c[f]||o,g=l(e[f],t[f],f);d.isUndefined(g)&&l!==a||(n[f]=g)}),n}const Jt=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=Ht(Wt(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&&Or(t.url))){const u=o&&i&&Fr.read(i);u&&s.set(o,u)}return t},Nr=typeof XMLHttpRequest<"u",Ir=Nr&&function(e){return new Promise(function(n,r){const o=Jt(e);let i=o.data;const s=B.from(o.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:u}=o,f,l,g,m,h;function b(){m&&m(),h&&h(),o.cancelToken&&o.cancelToken.unsubscribe(f),o.signal&&o.signal.removeEventListener("abort",f)}let p=new XMLHttpRequest;p.open(o.method.toUpperCase(),o.url,!0),p.timeout=o.timeout;function y(){if(!p)return;const v=B.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),R={data:!a||a==="text"||a==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:v,config:e,request:p};qt(function(I){n(I),b()},function(I){r(I),b()},R),p=null}"onloadend"in p?p.onloadend=y:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(y)},p.onabort=function(){p&&(r(new S("Request aborted",S.ECONNABORTED,e,p)),p=null)},p.onerror=function(){r(new S("Network Error",S.ERR_NETWORK,e,p)),p=null},p.ontimeout=function(){let x=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const R=o.transitional||jt;o.timeoutErrorMessage&&(x=o.timeoutErrorMessage),r(new S(x,R.clarifyTimeoutError?S.ETIMEDOUT:S.ECONNABORTED,e,p)),p=null},i===void 0&&s.setContentType(null),"setRequestHeader"in p&&d.forEach(s.toJSON(),function(x,R){p.setRequestHeader(R,x)}),d.isUndefined(o.withCredentials)||(p.withCredentials=!!o.withCredentials),a&&a!=="json"&&(p.responseType=o.responseType),u&&([g,h]=he(u,!0),p.addEventListener("progress",g)),c&&p.upload&&([l,m]=he(c),p.upload.addEventListener("progress",l),p.upload.addEventListener("loadend",m)),(o.cancelToken||o.signal)&&(f=v=>{p&&(r(!v||v.type?new X(null,e,p):v),p.abort(),p=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const w=kr(o.url);if(w&&F.protocols.indexOf(w)===-1){r(new S("Unsupported protocol "+w+":",S.ERR_BAD_REQUEST,e));return}p.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 S?f:new X(f instanceof Error?f.message:f))}};let s=t&&setTimeout(()=>{s=null,i(new S(`timeout ${t} of ms exceeded`,S.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},Lr=async function*(e,t){for await(const n of zr(e))yield*Dr(n,t)},zr=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},ct=(e,t,n,r)=>{const o=Lr(e,t);let 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 g=i+=l;n(g)}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",Vt=Se&&typeof ReadableStream=="function",Hr=Se&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Gt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},jr=Vt&&Gt(()=>{let e=!1;const t=new Request(F.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),ut=64*1024,Le=Vt&&Gt(()=>d.isReadableStream(new Response("").body)),_e={stream:Le&&(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 S(`Response type '${t}' is not supported`,S.ERR_NOT_SUPPORT,r)})})})(new Response);const Mr=async e=>{if(e==null)return 0;if(d.isBlob(e))return e.size;if(d.isSpecCompliantForm(e))return(await new Request(F.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(d.isArrayBufferView(e)||d.isArrayBuffer(e))return e.byteLength;if(d.isURLSearchParams(e)&&(e=e+""),d.isString(e))return(await Hr(e)).byteLength},$r=async(e,t)=>{const n=d.toFiniteNumber(e.getContentLength());return n??Mr(t)},qr=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:g}=Jt(e);u=u?(u+"").toLowerCase():"text";let m=Ur([o,i&&i.toAbortSignal()],s),h;const b=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let p;try{if(c&&jr&&n!=="get"&&n!=="head"&&(p=await $r(f,r))!==0){let R=new Request(t,{method:"POST",body:r,duplex:"half"}),k;if(d.isFormData(r)&&(k=R.headers.get("content-type"))&&f.setContentType(k),R.body){const[I,j]=st(p,he(at(c)));r=ct(R.body,ut,I,j)}}d.isString(l)||(l=l?"include":"omit");const y="credentials"in Request.prototype;h=new Request(t,{...g,signal:m,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",credentials:y?l:void 0});let w=await fetch(h,g);const v=Le&&(u==="stream"||u==="response");if(Le&&(a||v&&b)){const R={};["status","statusText","headers"].forEach(M=>{R[M]=w[M]});const k=d.toFiniteNumber(w.headers.get("content-length")),[I,j]=a&&st(k,he(at(a),!0))||[];w=new Response(ct(w.body,ut,I,()=>{j&&j(),b&&b()}),R)}u=u||"text";let x=await _e[d.findKey(_e,u)||"text"](w,e);return!v&&b&&b(),await new Promise((R,k)=>{qt(R,k,{data:x,headers:B.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:h})})}catch(y){throw b&&b(),y&&y.name==="TypeError"&&/Load failed|fetch/i.test(y.message)?Object.assign(new S("Network Error",S.ERR_NETWORK,e,h),{cause:y.cause||y}):S.from(y,y&&y.code,e,h)}}),ze={http:ir,xhr:Ir,fetch:qr};d.forEach(ze,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const ft=e=>`- ${e}`,Wr=e=>d.isFunction(e)||e===null||e===!1,Kt={getAdapter:e=>{e=d.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){n=e[i];let s;if(r=n,!Wr(n)&&(r=ze[(s=String(n)).toLowerCase()],r===void 0))throw new S(`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 :
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function bn(){console.log("npm package test!!!")}function yn(){console.log("Current time:",new Date().toISOString())}function Ct(e,t){return function(){return e.apply(t,arguments)}}const{toString:wn}=Object.prototype,{getPrototypeOf:Je}=Object,{iterator:ye,toStringTag:At}=Symbol,we=(e=>t=>{const n=wn.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),U=e=>(e=e.toLowerCase(),t=>we(t)===e),xe=e=>t=>typeof t===e,{isArray:K}=Array,ne=xe("undefined");function xn(e){return e!==null&&!ne(e)&&e.constructor!==null&&!ne(e.constructor)&&P(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ot=U("ArrayBuffer");function En(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ot(e.buffer),t}const Sn=xe("string"),P=xe("function"),Ft=xe("number"),Ee=e=>e!==null&&typeof e=="object",vn=e=>e===!0||e===!1,ce=e=>{if(we(e)!=="object")return!1;const t=Je(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(At in e)&&!(ye in e)},Rn=U("Date"),Tn=U("File"),kn=U("Blob"),Cn=U("FileList"),An=e=>Ee(e)&&P(e.pipe),On=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||P(e.append)&&((t=we(e))==="formdata"||t==="object"&&P(e.toString)&&e.toString()==="[object FormData]"))},Fn=U("URLSearchParams"),[Pn,Bn,Nn,In]=["ReadableStream","Request","Response","Headers"].map(U),Un=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ie(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 Pt(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const W=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Bt=e=>!ne(e)&&e!==W;function Ie(){const{caseless:e}=Bt(this)&&this||{},t={},n=(r,o)=>{const i=e&&Pt(t,o)||o;ce(t[i])&&ce(r)?t[i]=Ie(t[i],r):ce(r)?t[i]=Ie({},r):K(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&ie(arguments[r],n);return t}const Dn=(e,t,n,{allOwnKeys:r}={})=>(ie(t,(o,i)=>{n&&P(o)?e[i]=Ct(o,n):e[i]=o},{allOwnKeys:r}),e),Ln=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),zn=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Hn=(e,t,n,r)=>{let o,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&&Je(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},jn=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},$n=e=>{if(!e)return null;if(K(e))return e;let t=e.length;if(!Ft(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Mn=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Je(Uint8Array)),Wn=(e,t)=>{const r=(e&&e[ye]).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},Jn=U("HTMLFormElement"),Vn=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),tt=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Gn=U("RegExp"),Nt=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ie(n,(o,i)=>{let s;(s=t(o,i,e))!==!1&&(r[i]=s||o)}),Object.defineProperties(e,r)},Kn=e=>{Nt(e,(t,n)=>{if(P(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(P(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Xn=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return K(e)?r(e):r(String(e).split(t)),n},Zn=()=>{},Qn=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Yn(e){return!!(e&&P(e.append)&&e[At]==="FormData"&&e[ye])}const er=e=>{const t=new Array(10),n=(r,o)=>{if(Ee(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=K(r)?[]:{};return ie(r,(s,a)=>{const c=n(s,o+1);!ne(c)&&(i[a]=c)}),t[o]=void 0,i}}return r};return n(e,0)},tr=U("AsyncFunction"),nr=e=>e&&(Ee(e)||P(e))&&P(e.then)&&P(e.catch),It=((e,t)=>e?setImmediate:t?((n,r)=>(W.addEventListener("message",({source:o,data:i})=>{o===W&&i===n&&r.length&&r.shift()()},!1),o=>{r.push(o),W.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",P(W.postMessage)),rr=typeof queueMicrotask<"u"?queueMicrotask.bind(W):typeof process<"u"&&process.nextTick||It,or=e=>e!=null&&P(e[ye]),d={isArray:K,isArrayBuffer:Ot,isBuffer:xn,isFormData:On,isArrayBufferView:En,isString:Sn,isNumber:Ft,isBoolean:vn,isObject:Ee,isPlainObject:ce,isReadableStream:Pn,isRequest:Bn,isResponse:Nn,isHeaders:In,isUndefined:ne,isDate:Rn,isFile:Tn,isBlob:kn,isRegExp:Gn,isFunction:P,isStream:An,isURLSearchParams:Fn,isTypedArray:Mn,isFileList:Cn,forEach:ie,merge:Ie,extend:Dn,trim:Un,stripBOM:Ln,inherits:zn,toFlatObject:Hn,kindOf:we,kindOfTest:U,endsWith:jn,toArray:$n,forEachEntry:Wn,matchAll:qn,isHTMLForm:Jn,hasOwnProperty:tt,hasOwnProp:tt,reduceDescriptors:Nt,freezeMethods:Kn,toObjectSet:Xn,toCamelCase:Vn,noop:Zn,toFiniteNumber:Qn,findKey:Pt,global:W,isContextDefined:Bt,isSpecCompliantForm:Yn,toJSONObject:er,isAsyncFn:tr,isThenable:nr,setImmediate:It,asap:rr,isIterable:or};function v(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}d.inherits(v,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:d.toJSONObject(this.config),code:this.code,status:this.status}}});const Ut=v.prototype,Dt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Dt[e]={value:e}});Object.defineProperties(v,Dt);Object.defineProperty(Ut,"isAxiosError",{value:!0});v.from=(e,t,n,r,o,i)=>{const s=Object.create(Ut);return d.toFlatObject(e,s,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),v.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const ir=null;function Ue(e){return d.isPlainObject(e)||d.isArray(e)}function Lt(e){return d.endsWith(e,"[]")?e.slice(0,-2):e}function nt(e,t,n){return e?e.concat(t).map(function(o,i){return o=Lt(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function sr(e){return d.isArray(e)&&!e.some(Ue)}const ar=d.toFlatObject(d,{},null,function(t){return/^is[A-Z]/.test(t)});function Se(e,t,n){if(!d.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=d.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,p){return!d.isUndefined(p[y])});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(h){if(h===null)return"";if(d.isDate(h))return h.toISOString();if(d.isBoolean(h))return h.toString();if(!c&&d.isBlob(h))throw new v("Blob is not supported. Use a Buffer instead.");return d.isArrayBuffer(h)||d.isTypedArray(h)?c&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function f(h,y,p){let b=h;if(h&&!p&&typeof h=="object"){if(d.endsWith(y,"{}"))y=r?y:y.slice(0,-2),h=JSON.stringify(h);else if(d.isArray(h)&&sr(h)||(d.isFileList(h)||d.endsWith(y,"[]"))&&(b=d.toArray(h)))return y=Lt(y),b.forEach(function(E,x){!(d.isUndefined(E)||E===null)&&t.append(s===!0?nt([y],x,i):s===null?y:y+"[]",u(E))}),!1}return Ue(h)?!0:(t.append(nt(p,y,i),u(h)),!1)}const l=[],g=Object.assign(ar,{defaultVisitor:f,convertValue:u,isVisitable:Ue});function _(h,y){if(!d.isUndefined(h)){if(l.indexOf(h)!==-1)throw Error("Circular reference detected in "+y.join("."));l.push(h),d.forEach(h,function(b,w){(!(d.isUndefined(b)||b===null)&&o.call(t,b,d.isString(w)?w.trim():w,y,g))===!0&&_(b,y?y.concat(w):[w])}),l.pop()}}if(!d.isObject(e))throw new TypeError("data must be an object");return _(e),t}function rt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Ve(e,t){this._pairs=[],e&&Se(e,this,t)}const zt=Ve.prototype;zt.append=function(t,n){this._pairs.push([t,n])};zt.toString=function(t){const n=t?function(r){return t.call(this,r,rt)}:rt;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function lr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ht(e,t,n){if(!t)return e;const r=n&&n.encode||lr;d.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(o?i=o(t,n):i=d.isURLSearchParams(t)?t.toString():new Ve(t,n).toString(r),i){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class ot{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){d.forEach(this.handlers,function(r){r!==null&&t(r)})}}const jt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},cr=typeof URLSearchParams<"u"?URLSearchParams:Ve,ur=typeof FormData<"u"?FormData:null,fr=typeof Blob<"u"?Blob:null,dr={isBrowser:!0,classes:{URLSearchParams:cr,FormData:ur,Blob:fr},protocols:["http","https","file","blob","url","data"]},Ge=typeof window<"u"&&typeof document<"u",De=typeof navigator=="object"&&navigator||void 0,pr=Ge&&(!De||["ReactNative","NativeScript","NS"].indexOf(De.product)<0),hr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",mr=Ge&&window.location.href||"http://localhost",_r=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ge,hasStandardBrowserEnv:pr,hasStandardBrowserWebWorkerEnv:hr,navigator:De,origin:mr},Symbol.toStringTag,{value:"Module"})),F={..._r,...dr};function gr(e,t){return Se(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 yr(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 $t(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]=yr(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 wr(e,t,n){if(d.isString(e))try{return(t||JSON.parse)(e),d.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const se={transitional:jt,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($t(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 gr(t,this.formSerializer).toString();if((a=d.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Se(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),wr(t)):t}],transformResponse:[function(t){const n=this.transitional||se.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"?v.from(a,v.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:F.classes.FormData,Blob:F.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};d.forEach(["delete","get","head","post","put","patch"],e=>{se.headers[e]={}});const xr=d.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Er=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
2
|
+
`).forEach(function(s){o=s.indexOf(":"),n=s.substring(0,o).trim().toLowerCase(),r=s.substring(o+1).trim(),!(!n||t[n]&&xr[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},it=Symbol("internals");function ee(e){return e&&String(e).trim().toLowerCase()}function ue(e){return e===!1||e==null?e:d.isArray(e)?e.map(ue):String(e)}function Sr(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const vr=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Fe(e,t,n,r,o){if(d.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!d.isString(t)){if(d.isString(r))return t.indexOf(r)!==-1;if(d.isRegExp(r))return r.test(t)}}function Rr(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Tr(e,t){const n=d.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,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=ee(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())&&!vr(t))s(Er(t),n);else if(d.isObject(t)&&d.isIterable(t)){let a={},c,u;for(const f of t){if(!d.isArray(f))throw TypeError("Object iterator must return a key-value pair");a[u=f[0]]=(c=a[u])?d.isArray(c)?[...c,f[1]]:[c,f[1]]:f[1]}s(a,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=ee(t),t){const r=d.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Sr(o);if(d.isFunction(n))return n.call(this,o,r);if(d.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ee(t),t){const r=d.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Fe(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(s){if(s=ee(s),s){const a=d.findKey(r,s);a&&(!n||Fe(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||Fe(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?Rr(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[it]=this[it]={accessors:{}}).accessors,o=this.prototype;function i(s){const a=ee(s);r[a]||(Tr(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 Pe(e,t){const n=this||se,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 Mt(e){return!!(e&&e.__CANCEL__)}function X(e,t,n){v.call(this,e??"canceled",v.ERR_CANCELED,t,n),this.name="CanceledError"}d.inherits(X,v,{__CANCEL__:!0});function Wt(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new v("Request failed with status code "+n.status,[v.ERR_BAD_REQUEST,v.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function kr(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Cr(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,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,g=0;for(;l!==o;)g+=n[l++],l=l%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),u-s<t)return;const _=f&&u-f;return _?Math.round(g*1e3/_):void 0}}function Ar(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=Cr(50,250);return Ar(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)},st=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},at=e=>(...t)=>d.asap(()=>e(...t)),Or=F.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,F.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(F.origin),F.navigator&&/(msie|trident)/i.test(F.navigator.userAgent)):()=>!0,Fr=F.hasStandardBrowserEnv?{write(e,t,n,r,o,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 Pr(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Br(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function qt(e,t,n){let r=!Pr(t);return e&&(r||n==!1)?Br(e,t):t}const lt=e=>e instanceof B?{...e}:e;function J(e,t){t=t||{};const n={};function r(u,f,l,g){return d.isPlainObject(u)&&d.isPlainObject(f)?d.merge.call({caseless:g},u,f):d.isPlainObject(f)?d.merge({},f):d.isArray(f)?f.slice():f}function o(u,f,l,g){if(d.isUndefined(f)){if(!d.isUndefined(u))return r(void 0,u,l,g)}else return r(u,f,l,g)}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(lt(u),lt(f),l,!0)};return d.forEach(Object.keys(Object.assign({},e,t)),function(f){const l=c[f]||o,g=l(e[f],t[f],f);d.isUndefined(g)&&l!==a||(n[f]=g)}),n}const Jt=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=Ht(qt(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&&Or(t.url))){const u=o&&i&&Fr.read(i);u&&s.set(o,u)}return t},Nr=typeof XMLHttpRequest<"u",Ir=Nr&&function(e){return new Promise(function(n,r){const o=Jt(e);let i=o.data;const s=B.from(o.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:u}=o,f,l,g,_,h;function y(){_&&_(),h&&h(),o.cancelToken&&o.cancelToken.unsubscribe(f),o.signal&&o.signal.removeEventListener("abort",f)}let p=new XMLHttpRequest;p.open(o.method.toUpperCase(),o.url,!0),p.timeout=o.timeout;function b(){if(!p)return;const E=B.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),R={data:!a||a==="text"||a==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:E,config:e,request:p};Wt(function(I){n(I),y()},function(I){r(I),y()},R),p=null}"onloadend"in p?p.onloadend=b:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(b)},p.onabort=function(){p&&(r(new v("Request aborted",v.ECONNABORTED,e,p)),p=null)},p.onerror=function(){r(new v("Network Error",v.ERR_NETWORK,e,p)),p=null},p.ontimeout=function(){let x=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const R=o.transitional||jt;o.timeoutErrorMessage&&(x=o.timeoutErrorMessage),r(new v(x,R.clarifyTimeoutError?v.ETIMEDOUT:v.ECONNABORTED,e,p)),p=null},i===void 0&&s.setContentType(null),"setRequestHeader"in p&&d.forEach(s.toJSON(),function(x,R){p.setRequestHeader(R,x)}),d.isUndefined(o.withCredentials)||(p.withCredentials=!!o.withCredentials),a&&a!=="json"&&(p.responseType=o.responseType),u&&([g,h]=he(u,!0),p.addEventListener("progress",g)),c&&p.upload&&([l,_]=he(c),p.upload.addEventListener("progress",l),p.upload.addEventListener("loadend",_)),(o.cancelToken||o.signal)&&(f=E=>{p&&(r(!E||E.type?new X(null,e,p):E),p.abort(),p=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const w=kr(o.url);if(w&&F.protocols.indexOf(w)===-1){r(new v("Unsupported protocol "+w+":",v.ERR_BAD_REQUEST,e));return}p.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 v?f:new X(f instanceof Error?f.message:f))}};let s=t&&setTimeout(()=>{s=null,i(new v(`timeout ${t} of ms exceeded`,v.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},Lr=async function*(e,t){for await(const n of zr(e))yield*Dr(n,t)},zr=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},ct=(e,t,n,r)=>{const o=Lr(e,t);let 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 g=i+=l;n(g)}c.enqueue(new Uint8Array(f))}catch(u){throw a(u),u}},cancel(c){return a(c),o.return()}},{highWaterMark:2})},ve=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Vt=ve&&typeof ReadableStream=="function",Hr=ve&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Gt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},jr=Vt&&Gt(()=>{let e=!1;const t=new Request(F.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),ut=64*1024,Le=Vt&&Gt(()=>d.isReadableStream(new Response("").body)),me={stream:Le&&(e=>e.body)};ve&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!me[t]&&(me[t]=d.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new v(`Response type '${t}' is not supported`,v.ERR_NOT_SUPPORT,r)})})})(new Response);const $r=async e=>{if(e==null)return 0;if(d.isBlob(e))return e.size;if(d.isSpecCompliantForm(e))return(await new Request(F.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(d.isArrayBufferView(e)||d.isArrayBuffer(e))return e.byteLength;if(d.isURLSearchParams(e)&&(e=e+""),d.isString(e))return(await Hr(e)).byteLength},Mr=async(e,t)=>{const n=d.toFiniteNumber(e.getContentLength());return n??$r(t)},Wr=ve&&(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:g}=Jt(e);u=u?(u+"").toLowerCase():"text";let _=Ur([o,i&&i.toAbortSignal()],s),h;const y=_&&_.unsubscribe&&(()=>{_.unsubscribe()});let p;try{if(c&&jr&&n!=="get"&&n!=="head"&&(p=await Mr(f,r))!==0){let R=new Request(t,{method:"POST",body:r,duplex:"half"}),k;if(d.isFormData(r)&&(k=R.headers.get("content-type"))&&f.setContentType(k),R.body){const[I,j]=st(p,he(at(c)));r=ct(R.body,ut,I,j)}}d.isString(l)||(l=l?"include":"omit");const b="credentials"in Request.prototype;h=new Request(t,{...g,signal:_,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",credentials:b?l:void 0});let w=await fetch(h,g);const E=Le&&(u==="stream"||u==="response");if(Le&&(a||E&&y)){const R={};["status","statusText","headers"].forEach($=>{R[$]=w[$]});const k=d.toFiniteNumber(w.headers.get("content-length")),[I,j]=a&&st(k,he(at(a),!0))||[];w=new Response(ct(w.body,ut,I,()=>{j&&j(),y&&y()}),R)}u=u||"text";let x=await me[d.findKey(me,u)||"text"](w,e);return!E&&y&&y(),await new Promise((R,k)=>{Wt(R,k,{data:x,headers:B.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:h})})}catch(b){throw y&&y(),b&&b.name==="TypeError"&&/Load failed|fetch/i.test(b.message)?Object.assign(new v("Network Error",v.ERR_NETWORK,e,h),{cause:b.cause||b}):v.from(b,b&&b.code,e,h)}}),ze={http:ir,xhr:Ir,fetch:Wr};d.forEach(ze,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const ft=e=>`- ${e}`,qr=e=>d.isFunction(e)||e===null||e===!1,Kt={getAdapter:e=>{e=d.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){n=e[i];let s;if(r=n,!qr(n)&&(r=ze[(s=String(n)).toLowerCase()],r===void 0))throw new v(`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(ft).join(`
|
|
5
|
-
`):" "+ft(i[0]):"as no adapter specified";throw new
|
|
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:L.transitional(L.boolean),forcedJSONParsing:L.transitional(L.boolean),clarifyTimeoutError:L.transitional(L.boolean)},!1),o!=null&&(d.isFunction(o)?n.paramsSerializer={serialize:o}:fe.assertOptions(o,{encode:L.function,serialize:L.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),fe.assertOptions(n,{baseUrl:L.spelling("baseURL"),withXsrfToken:L.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&d.merge(i.common,i[n.method]);i&&d.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),n.headers=B.concat(s,i);const a=[];let c=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(n)===!1||(c=c&&b.synchronous,a.unshift(b.fulfilled,b.rejected))});const u=[];this.interceptors.response.forEach(function(b){u.push(b.fulfilled,b.rejected)});let f,l=0,g;if(!c){const h=[dt.bind(this),void 0];for(h.unshift.apply(h,a),h.push.apply(h,u),g=h.length,f=Promise.resolve(n);l<g;)f=f.then(h[l++],h[l++]);return f}g=a.length;let m=n;for(l=0;l<g;){const h=a[l++],b=a[l++];try{m=h(m)}catch(p){b.call(this,p);break}}try{f=dt.call(this,m)}catch(h){return Promise.reject(h)}for(l=0,g=u.length;l<g;)f=f.then(u[l++],u[l++]);return f}getUri(t){t=J(this.defaults,t);const n=Wt(t.baseURL,t.url,t.allowAbsoluteUrls);return Ht(n,t.params,t.paramsSerializer)}};d.forEach(["delete","get","head","options"],function(t){W.prototype[t]=function(n,r){return this.request(J(r||{},{method:t,url:n,data:(r||{}).data}))}});d.forEach(["post","put","patch"],function(t){function n(r){return function(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 Vr=class Zt{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 Zt(function(o){t=o}),cancel:t}}};function Gr(e){return function(n){return e.apply(null,n)}}function Kr(e){return d.isObject(e)&&e.isAxiosError===!0}const He={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(He).forEach(([e,t])=>{He[t]=e});function Qt(e){const t=new W(e),n=Ct(W.prototype.request,t);return d.extend(n,W.prototype,t,{allOwnKeys:!0}),d.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Qt(J(e,o))},n}const A=Qt(se);A.Axios=W;A.CanceledError=X;A.CancelToken=Vr;A.isCancel=$t;A.VERSION=Xt;A.toFormData=ve;A.AxiosError=S;A.Cancel=A.CanceledError;A.all=function(t){return Promise.all(t)};A.spread=Gr;A.isAxiosError=Kr;A.mergeConfig=J;A.AxiosHeaders=B;A.formToJSON=e=>Mt(d.isHTMLForm(e)?new FormData(e):e);A.getAdapter=Kt.getAdapter;A.HttpStatusCode=He;A.default=A;const{Axios:Ho,AxiosError:jo,CanceledError:Mo,isCancel:$o,CancelToken:qo,VERSION:Wo,all:Jo,Cancel:Vo,isAxiosError:Go,spread:Ko,toFormData:Xo,AxiosHeaders:Zo,HttpStatusCode:Qo,formToJSON:Yo,getAdapter:ei,mergeConfig:ti}=A;var ae,T,Yt,$,ht,en,tn,nn,Ke,je,Me,re={},rn=[],Xr=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Te=Array.isArray;function z(e,t){for(var n in t)e[n]=t[n];return e}function Xe(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?ae.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 te(e,s,r,o,null)}function te(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??++Yt,__i:-1,__u:0};return o==null&&T.vnode!=null&&T.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 on(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return on(e)}}function _t(e){(!e.__d&&(e.__d=!0)&&$.push(e)&&!me.__r++||ht!=T.debounceRendering)&&((ht=T.debounceRendering)||en)(me)}function me(){for(var e,t,n,r,o,i,s,a=1;$.length;)$.length>a&&$.sort(tn),e=$.shift(),a=$.length,e.__d&&(n=void 0,o=(r=(t=e).__v).__e,i=[],s=[],t.__P&&((n=z({},r)).__v=r.__v+1,T.vnode&&T.vnode(n),Ze(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,ln(i,n,s),n.__e!=o&&on(n)));me.__r=0}function sn(e,t,n,r,o,i,s,a,c,u,f){var l,g,m,h,b,p,y=r&&r.__k||rn,w=t.length;for(c=Zr(n,t,y,c,w),l=0;l<w;l++)(m=n.__k[l])!=null&&(g=m.__i==-1?re:y[m.__i]||re,m.__i=l,p=Ze(e,m,g,o,i,s,a,c,u,f),h=m.__e,m.ref&&g.ref!=m.ref&&(g.ref&&Qe(g.ref,null,m),f.push(m.ref,m.__c||h,m)),b==null&&h!=null&&(b=h),4&m.__u||g.__k===m.__k?c=an(m,c,e):typeof m.type=="function"&&p!==void 0?c=p:h&&(c=h.nextSibling),m.__u&=-7);return n.__e=b,c}function Zr(e,t,n,r,o){var i,s,a,c,u,f=n.length,l=f,g=0;for(e.__k=new Array(o),i=0;i<o;i++)(s=t[i])!=null&&typeof s!="boolean"&&typeof s!="function"?(c=i+g,(s=e.__k[i]=typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?te(null,s,null,null,null):Te(s)?te(Z,{children:s},null,null,null):s.constructor==null&&s.__b>0?te(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=Qr(s,n,c,l))!=-1&&(l--,(a=n[u])&&(a.__u|=2)),a==null||a.__v==null?(u==-1&&(o>f?g--:o<f&&g++),typeof s.type!="function"&&(s.__u|=4)):u!=c&&(u==c-1?g--:u==c+1?g++:(u>c?g--:g++,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)),un(a,a));return r}function an(e,t,n){var r,o;if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=an(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=G(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Qr(e,t,n,r){var o,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 mt(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Xr.test(t)?n:n+"px"}function le(e,t,n,r,o){var 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||mt(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||mt(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(nn,"$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=Ke,e.addEventListener(t,i?Me:je,i)):e.removeEventListener(t,i?Me:je,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 gt(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=Ke++;else if(t.t<n.u)return;return n(T.event?T.event(t):t)}}}function Ze(e,t,n,r,o,i,s,a,c,u){var f,l,g,m,h,b,p,y,w,v,x,R,k,I,j,M,Oe,D=t.type;if(t.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),i=[a=t.__e=n.__e]),(f=T.__b)&&f(t);e:if(typeof D=="function")try{if(y=t.props,w="prototype"in D&&D.prototype.render,v=(f=D.contextType)&&r[f.__c],x=f?v?v.props.value:f.__:r,n.__c?p=(l=t.__c=n.__c).__=l.__E:(w?t.__c=l=new D(y,x):(t.__c=l=new de(y,x),l.constructor=D,l.render=eo),v&&v.sub(l),l.props=y,l.state||(l.state={}),l.context=x,l.__n=r,g=l.__d=!0,l.__h=[],l._sb=[]),w&&l.__s==null&&(l.__s=l.state),w&&D.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=z({},l.__s)),z(l.__s,D.getDerivedStateFromProps(y,l.__s))),m=l.props,h=l.state,l.__v=t,g)w&&D.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),w&&l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(w&&D.getDerivedStateFromProps==null&&y!==m&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(y,x),!l.__e&&l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(y,l.__s,x)===!1||t.__v==n.__v){for(t.__v!=n.__v&&(l.props=y,l.state=l.__s,l.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(Y){Y&&(Y.__=t)}),R=0;R<l._sb.length;R++)l.__h.push(l._sb[R]);l._sb=[],l.__h.length&&s.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(y,l.__s,x),w&&l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(m,h,b)})}if(l.context=x,l.props=y,l.__P=e,l.__e=!1,k=T.__r,I=0,w){for(l.state=l.__s,l.__d=!1,k&&k(t),f=l.render(l.props,l.state,l.context),j=0;j<l._sb.length;j++)l.__h.push(l._sb[j]);l._sb=[]}else do l.__d=!1,k&&k(t),f=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++I<25);l.state=l.__s,l.getChildContext!=null&&(r=z(z({},r),l.getChildContext())),w&&!g&&l.getSnapshotBeforeUpdate!=null&&(b=l.getSnapshotBeforeUpdate(m,h)),M=f,f!=null&&f.type===Z&&f.key==null&&(M=cn(f.props.children)),a=sn(e,Te(M)?M:[M],t,n,r,o,i,s,a,c,u),l.base=t.__e,t.__u&=-161,l.__h.length&&s.push(l),p&&(l.__E=l.__=null)}catch(Y){if(t.__v=null,c||i!=null)if(Y.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(Oe=i.length;Oe--;)Xe(i[Oe]);else t.__e=n.__e,t.__k=n.__k;T.__e(Y,t,n)}else i==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=Yr(n.__e,t,n,r,o,i,s,c,u);return(f=T.diffed)&&f(t),128&t.__u?void 0:a}function ln(e,t,n){for(var r=0;r<n.length;r++)Qe(n[r],n[++r],n[++r]);T.__c&&T.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){T.__e(i,o.__v)}})}function cn(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:Te(e)?e.map(cn):z({},e)}function Yr(e,t,n,r,o,i,s,a,c){var u,f,l,g,m,h,b,p=n.props,y=t.props,w=t.type;if(w=="svg"?o="http://www.w3.org/2000/svg":w=="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==!!w&&(w?m.localName==w:m.nodeType==3)){e=m,i[u]=null;break}}if(e==null){if(w==null)return document.createTextNode(y);e=document.createElementNS(o,w,y.is&&y),a&&(T.__m&&T.__m(t,i),a=!1),i=null}if(w==null)p===y||a&&e.data==y||(e.data=y);else{if(i=i&&ae.call(e.childNodes),p=n.props||re,!a&&i!=null)for(p={},u=0;u<e.attributes.length;u++)p[(m=e.attributes[u]).name]=m.value;for(u in p)if(m=p[u],u!="children"){if(u=="dangerouslySetInnerHTML")l=m;else if(!(u in y)){if(u=="value"&&"defaultValue"in y||u=="checked"&&"defaultChecked"in y)continue;le(e,u,null,m,o)}}for(u in y)m=y[u],u=="children"?g=m:u=="dangerouslySetInnerHTML"?f=m:u=="value"?h=m:u=="checked"?b=m:a&&typeof m!="function"||p[u]===m||le(e,u,m,p[u],o);if(f)a||l&&(f.__html==l.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(l&&(e.innerHTML=""),sn(t.type=="template"?e.content:e,Te(g)?g:[g],t,n,r,w=="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--;)Xe(i[u]);a||(u="value",w=="progress"&&h==null?e.removeAttribute("value"):h!=null&&(h!==e[u]||w=="progress"&&!h||w=="option"&&h!=p[u])&&le(e,u,h,p[u],o),u="checked",b!=null&&b!=e[u]&&le(e,u,b,p[u],o))}return e}function Qe(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(o){T.__e(o,n)}}function un(e,t,n){var r,o;if(T.unmount&&T.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||Qe(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){T.__e(i,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&un(r[o],t,n||typeof e.type!="function");n||Xe(e.__e),e.__c=e.__=e.__e=void 0}function eo(e,t,n){return this.constructor(e,n)}function ke(e,t,n){var r,o,i,s;t==document&&(t=document.documentElement),T.__&&T.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],s=[],Ze(t,e=(!r&&n||t).__k=V(Z,null,[e]),o||re,re,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?ae.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,s),ln(i,e,s)}function fn(e,t){ke(e,t,fn)}function dn(e,t,n){var r,o,i,s,a=z({},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?ae.call(arguments,2):n),te(e.type,a,r||e.key,o||e.ref,null)}ae=rn.slice,T={__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}},Yt=0,de.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=z({},this.state),typeof e=="function"&&(e=e(z({},n),this.props)),e&&z(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),_t(this))},de.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),_t(this))},de.prototype.render=Z,$=[],en=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,tn=function(e,t){return e.__v.__b-t.__v.__b},me.__r=0,nn=/(PointerCapture)$|Capture$/i,Ke=0,je=gt(!1),Me=gt(!0);var to=0;function _(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:--to,__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 T.vnode&&T.vnode(u),u}var oe,C,Ne,bt,ge=0,pn=[],O=T,yt=O.__b,wt=O.__r,xt=O.diffed,Et=O.__c,vt=O.unmount,St=O.__;function Ye(e,t){O.__h&&O.__h(C,e,ge||t),ge=0;var n=C.__H||(C.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function N(e){return ge=1,no(_n,e)}function no(e,t,n){var r=Ye(oe++,2);if(r.t=e,!r.__c&&(r.__=[_n(void 0,t),function(a){var c=r.__N?r.__N[0]:r.__[0],u=r.t(c,a);c!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=C,!C.__f)){var o=function(a,c,u){if(!r.__c.__H)return!0;var f=r.__c.__H.__.filter(function(g){return!!g.__c});if(f.every(function(g){return!g.__N}))return!i||i.call(this,a,c,u);var l=r.__c.props!==a;return f.forEach(function(g){if(g.__N){var m=g.__[0];g.__=g.__N,g.__N=void 0,m!==g.__[0]&&(l=!0)}}),i&&i.call(this,a,c,u)||l};C.__f=!0;var i=C.shouldComponentUpdate,s=C.componentWillUpdate;C.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)},C.shouldComponentUpdate=o}return r.__N||r.__}function Ce(e,t){var n=Ye(oe++,3);!O.__s&&hn(n.__H,t)&&(n.__=e,n.u=t,C.__H.__h.push(n))}function be(e){return ge=5,ro(function(){return{current:e}},[])}function ro(e,t){var n=Ye(oe++,7);return hn(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function oo(){for(var e;e=pn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(pe),e.__H.__h.forEach($e),e.__H.__h=[]}catch(t){e.__H.__h=[],O.__e(t,e.__v)}}O.__b=function(e){C=null,yt&&yt(e)},O.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),St&&St(e,t)},O.__r=function(e){wt&&wt(e),oe=0;var t=(C=e.__c).__H;t&&(Ne===C?(t.__h=[],C.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(pe),t.__h.forEach($e),t.__h=[],oe=0)),Ne=C},O.diffed=function(e){xt&&xt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(pn.push(t)!==1&&bt===O.requestAnimationFrame||((bt=O.requestAnimationFrame)||io)(oo)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Ne=C=null},O.__c=function(e,t){t.some(function(n){try{n.__h.forEach(pe),n.__h=n.__h.filter(function(r){return!r.__||$e(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],O.__e(r,n.__v)}}),Et&&Et(e,t)},O.unmount=function(e){vt&&vt(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{pe(r)}catch(o){t=o}}),n.__H=void 0,t&&O.__e(t,n.__v))};var Rt=typeof requestAnimationFrame=="function";function io(e){var t,n=function(){clearTimeout(r),Rt&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Rt&&(t=requestAnimationFrame(n))}function pe(e){var t=C,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),C=t}function $e(e){var t=C;e.__c=e.__(),C=t}function hn(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function _n(e,t){return typeof t=="function"?t(e):t}class so{parseArg(t){return typeof t=="string"?{content:t}:t}show(t,n){const{content:r,duration:o,closable:i}=this.parseArg(n),s=document.createElement("div");if(s.style.cssText=`
|
|
5
|
+
`):" "+ft(i[0]):"as no adapter specified";throw new v("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:ze};function Be(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new X(null,e)}function dt(e){return Be(e),e.headers=B.from(e.headers),e.data=Pe.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Kt.getAdapter(e.adapter||se.adapter)(e).then(function(r){return Be(e),r.data=Pe.call(e,e.transformResponse,r),r.headers=B.from(r.headers),r},function(r){return Mt(r)||(Be(e),r&&r.response&&(r.response.data=Pe.call(e,e.transformResponse,r.response),r.response.headers=B.from(r.response.headers))),Promise.reject(r)})}const Xt="1.10.0",Re={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Re[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const pt={};Re.transitional=function(t,n,r){function o(i,s){return"[Axios v"+Xt+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,a)=>{if(t===!1)throw new v(o(s," has been removed"+(n?" in "+n:"")),v.ERR_DEPRECATED);return n&&!pt[s]&&(pt[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}};Re.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Jr(e,t,n){if(typeof e!="object")throw new v("options must be an object",v.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const 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 v("option "+i+" must be "+c,v.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new v("Unknown option "+i,v.ERR_BAD_OPTION)}}const fe={assertOptions:Jr,validators:Re},L=fe.validators;let q=class{constructor(t){this.defaults=t||{},this.interceptors={request:new ot,response:new ot}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const 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:L.transitional(L.boolean),forcedJSONParsing:L.transitional(L.boolean),clarifyTimeoutError:L.transitional(L.boolean)},!1),o!=null&&(d.isFunction(o)?n.paramsSerializer={serialize:o}:fe.assertOptions(o,{encode:L.function,serialize:L.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),fe.assertOptions(n,{baseUrl:L.spelling("baseURL"),withXsrfToken:L.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&d.merge(i.common,i[n.method]);i&&d.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),n.headers=B.concat(s,i);const a=[];let c=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(c=c&&y.synchronous,a.unshift(y.fulfilled,y.rejected))});const u=[];this.interceptors.response.forEach(function(y){u.push(y.fulfilled,y.rejected)});let f,l=0,g;if(!c){const h=[dt.bind(this),void 0];for(h.unshift.apply(h,a),h.push.apply(h,u),g=h.length,f=Promise.resolve(n);l<g;)f=f.then(h[l++],h[l++]);return f}g=a.length;let _=n;for(l=0;l<g;){const h=a[l++],y=a[l++];try{_=h(_)}catch(p){y.call(this,p);break}}try{f=dt.call(this,_)}catch(h){return Promise.reject(h)}for(l=0,g=u.length;l<g;)f=f.then(u[l++],u[l++]);return f}getUri(t){t=J(this.defaults,t);const n=qt(t.baseURL,t.url,t.allowAbsoluteUrls);return Ht(n,t.params,t.paramsSerializer)}};d.forEach(["delete","get","head","options"],function(t){q.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}))}}q.prototype[t]=n(),q.prototype[t+"Form"]=n(!0)});let Vr=class Zt{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(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 Zt(function(o){t=o}),cancel:t}}};function Gr(e){return function(n){return e.apply(null,n)}}function Kr(e){return d.isObject(e)&&e.isAxiosError===!0}const He={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(He).forEach(([e,t])=>{He[t]=e});function Qt(e){const t=new q(e),n=Ct(q.prototype.request,t);return d.extend(n,q.prototype,t,{allOwnKeys:!0}),d.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Qt(J(e,o))},n}const A=Qt(se);A.Axios=q;A.CanceledError=X;A.CancelToken=Vr;A.isCancel=Mt;A.VERSION=Xt;A.toFormData=Se;A.AxiosError=v;A.Cancel=A.CanceledError;A.all=function(t){return Promise.all(t)};A.spread=Gr;A.isAxiosError=Kr;A.mergeConfig=J;A.AxiosHeaders=B;A.formToJSON=e=>$t(d.isHTMLForm(e)?new FormData(e):e);A.getAdapter=Kt.getAdapter;A.HttpStatusCode=He;A.default=A;const{Axios:$o,AxiosError:Mo,CanceledError:Wo,isCancel:qo,CancelToken:Jo,VERSION:Vo,all:Go,Cancel:Ko,isAxiosError:Xo,spread:Zo,toFormData:Qo,AxiosHeaders:Yo,HttpStatusCode:ei,formToJSON:ti,getAdapter:ni,mergeConfig:ri}=A;var ae,T,Yt,M,ht,en,tn,nn,Ke,je,$e,re={},rn=[],Xr=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Te=Array.isArray;function z(e,t){for(var n in t)e[n]=t[n];return e}function Xe(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?ae.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 te(e,s,r,o,null)}function te(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??++Yt,__i:-1,__u:0};return o==null&&T.vnode!=null&&T.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 on(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return on(e)}}function mt(e){(!e.__d&&(e.__d=!0)&&M.push(e)&&!_e.__r++||ht!=T.debounceRendering)&&((ht=T.debounceRendering)||en)(_e)}function _e(){for(var e,t,n,r,o,i,s,a=1;M.length;)M.length>a&&M.sort(tn),e=M.shift(),a=M.length,e.__d&&(n=void 0,o=(r=(t=e).__v).__e,i=[],s=[],t.__P&&((n=z({},r)).__v=r.__v+1,T.vnode&&T.vnode(n),Ze(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,ln(i,n,s),n.__e!=o&&on(n)));_e.__r=0}function sn(e,t,n,r,o,i,s,a,c,u,f){var l,g,_,h,y,p,b=r&&r.__k||rn,w=t.length;for(c=Zr(n,t,b,c,w),l=0;l<w;l++)(_=n.__k[l])!=null&&(g=_.__i==-1?re:b[_.__i]||re,_.__i=l,p=Ze(e,_,g,o,i,s,a,c,u,f),h=_.__e,_.ref&&g.ref!=_.ref&&(g.ref&&Qe(g.ref,null,_),f.push(_.ref,_.__c||h,_)),y==null&&h!=null&&(y=h),4&_.__u||g.__k===_.__k?c=an(_,c,e):typeof _.type=="function"&&p!==void 0?c=p:h&&(c=h.nextSibling),_.__u&=-7);return n.__e=y,c}function Zr(e,t,n,r,o){var i,s,a,c,u,f=n.length,l=f,g=0;for(e.__k=new Array(o),i=0;i<o;i++)(s=t[i])!=null&&typeof s!="boolean"&&typeof s!="function"?(c=i+g,(s=e.__k[i]=typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?te(null,s,null,null,null):Te(s)?te(Z,{children:s},null,null,null):s.constructor==null&&s.__b>0?te(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=Qr(s,n,c,l))!=-1&&(l--,(a=n[u])&&(a.__u|=2)),a==null||a.__v==null?(u==-1&&(o>f?g--:o<f&&g++),typeof s.type!="function"&&(s.__u|=4)):u!=c&&(u==c-1?g--:u==c+1?g++:(u>c?g--:g++,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)),un(a,a));return r}function an(e,t,n){var r,o;if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=an(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=G(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Qr(e,t,n,r){var o,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 _t(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Xr.test(t)?n:n+"px"}function le(e,t,n,r,o){var 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||_t(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||_t(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(nn,"$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=Ke,e.addEventListener(t,i?$e:je,i)):e.removeEventListener(t,i?$e:je,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 gt(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=Ke++;else if(t.t<n.u)return;return n(T.event?T.event(t):t)}}}function Ze(e,t,n,r,o,i,s,a,c,u){var f,l,g,_,h,y,p,b,w,E,x,R,k,I,j,$,Oe,D=t.type;if(t.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),i=[a=t.__e=n.__e]),(f=T.__b)&&f(t);e:if(typeof D=="function")try{if(b=t.props,w="prototype"in D&&D.prototype.render,E=(f=D.contextType)&&r[f.__c],x=f?E?E.props.value:f.__:r,n.__c?p=(l=t.__c=n.__c).__=l.__E:(w?t.__c=l=new D(b,x):(t.__c=l=new de(b,x),l.constructor=D,l.render=eo),E&&E.sub(l),l.props=b,l.state||(l.state={}),l.context=x,l.__n=r,g=l.__d=!0,l.__h=[],l._sb=[]),w&&l.__s==null&&(l.__s=l.state),w&&D.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=z({},l.__s)),z(l.__s,D.getDerivedStateFromProps(b,l.__s))),_=l.props,h=l.state,l.__v=t,g)w&&D.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),w&&l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(w&&D.getDerivedStateFromProps==null&&b!==_&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(b,x),!l.__e&&l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(b,l.__s,x)===!1||t.__v==n.__v){for(t.__v!=n.__v&&(l.props=b,l.state=l.__s,l.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(Y){Y&&(Y.__=t)}),R=0;R<l._sb.length;R++)l.__h.push(l._sb[R]);l._sb=[],l.__h.length&&s.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(b,l.__s,x),w&&l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(_,h,y)})}if(l.context=x,l.props=b,l.__P=e,l.__e=!1,k=T.__r,I=0,w){for(l.state=l.__s,l.__d=!1,k&&k(t),f=l.render(l.props,l.state,l.context),j=0;j<l._sb.length;j++)l.__h.push(l._sb[j]);l._sb=[]}else do l.__d=!1,k&&k(t),f=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++I<25);l.state=l.__s,l.getChildContext!=null&&(r=z(z({},r),l.getChildContext())),w&&!g&&l.getSnapshotBeforeUpdate!=null&&(y=l.getSnapshotBeforeUpdate(_,h)),$=f,f!=null&&f.type===Z&&f.key==null&&($=cn(f.props.children)),a=sn(e,Te($)?$:[$],t,n,r,o,i,s,a,c,u),l.base=t.__e,t.__u&=-161,l.__h.length&&s.push(l),p&&(l.__E=l.__=null)}catch(Y){if(t.__v=null,c||i!=null)if(Y.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(Oe=i.length;Oe--;)Xe(i[Oe]);else t.__e=n.__e,t.__k=n.__k;T.__e(Y,t,n)}else i==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=Yr(n.__e,t,n,r,o,i,s,c,u);return(f=T.diffed)&&f(t),128&t.__u?void 0:a}function ln(e,t,n){for(var r=0;r<n.length;r++)Qe(n[r],n[++r],n[++r]);T.__c&&T.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){T.__e(i,o.__v)}})}function cn(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:Te(e)?e.map(cn):z({},e)}function Yr(e,t,n,r,o,i,s,a,c){var u,f,l,g,_,h,y,p=n.props,b=t.props,w=t.type;if(w=="svg"?o="http://www.w3.org/2000/svg":w=="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((_=i[u])&&"setAttribute"in _==!!w&&(w?_.localName==w:_.nodeType==3)){e=_,i[u]=null;break}}if(e==null){if(w==null)return document.createTextNode(b);e=document.createElementNS(o,w,b.is&&b),a&&(T.__m&&T.__m(t,i),a=!1),i=null}if(w==null)p===b||a&&e.data==b||(e.data=b);else{if(i=i&&ae.call(e.childNodes),p=n.props||re,!a&&i!=null)for(p={},u=0;u<e.attributes.length;u++)p[(_=e.attributes[u]).name]=_.value;for(u in p)if(_=p[u],u!="children"){if(u=="dangerouslySetInnerHTML")l=_;else if(!(u in b)){if(u=="value"&&"defaultValue"in b||u=="checked"&&"defaultChecked"in b)continue;le(e,u,null,_,o)}}for(u in b)_=b[u],u=="children"?g=_:u=="dangerouslySetInnerHTML"?f=_:u=="value"?h=_:u=="checked"?y=_:a&&typeof _!="function"||p[u]===_||le(e,u,_,p[u],o);if(f)a||l&&(f.__html==l.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(l&&(e.innerHTML=""),sn(t.type=="template"?e.content:e,Te(g)?g:[g],t,n,r,w=="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--;)Xe(i[u]);a||(u="value",w=="progress"&&h==null?e.removeAttribute("value"):h!=null&&(h!==e[u]||w=="progress"&&!h||w=="option"&&h!=p[u])&&le(e,u,h,p[u],o),u="checked",y!=null&&y!=e[u]&&le(e,u,y,p[u],o))}return e}function Qe(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(o){T.__e(o,n)}}function un(e,t,n){var r,o;if(T.unmount&&T.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||Qe(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){T.__e(i,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&un(r[o],t,n||typeof e.type!="function");n||Xe(e.__e),e.__c=e.__=e.__e=void 0}function eo(e,t,n){return this.constructor(e,n)}function ke(e,t,n){var r,o,i,s;t==document&&(t=document.documentElement),T.__&&T.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],s=[],Ze(t,e=(!r&&n||t).__k=V(Z,null,[e]),o||re,re,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?ae.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,s),ln(i,e,s)}function fn(e,t){ke(e,t,fn)}function dn(e,t,n){var r,o,i,s,a=z({},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?ae.call(arguments,2):n),te(e.type,a,r||e.key,o||e.ref,null)}ae=rn.slice,T={__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}},Yt=0,de.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=z({},this.state),typeof e=="function"&&(e=e(z({},n),this.props)),e&&z(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),mt(this))},de.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),mt(this))},de.prototype.render=Z,M=[],en=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,tn=function(e,t){return e.__v.__b-t.__v.__b},_e.__r=0,nn=/(PointerCapture)$|Capture$/i,Ke=0,je=gt(!1),$e=gt(!0);var to=0;function m(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:--to,__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 T.vnode&&T.vnode(u),u}var oe,C,Ne,bt,ge=0,pn=[],O=T,yt=O.__b,wt=O.__r,xt=O.diffed,Et=O.__c,St=O.unmount,vt=O.__;function Ye(e,t){O.__h&&O.__h(C,e,ge||t),ge=0;var n=C.__H||(C.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function N(e){return ge=1,no(mn,e)}function no(e,t,n){var r=Ye(oe++,2);if(r.t=e,!r.__c&&(r.__=[mn(void 0,t),function(a){var c=r.__N?r.__N[0]:r.__[0],u=r.t(c,a);c!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=C,!C.__f)){var o=function(a,c,u){if(!r.__c.__H)return!0;var f=r.__c.__H.__.filter(function(g){return!!g.__c});if(f.every(function(g){return!g.__N}))return!i||i.call(this,a,c,u);var l=r.__c.props!==a;return f.forEach(function(g){if(g.__N){var _=g.__[0];g.__=g.__N,g.__N=void 0,_!==g.__[0]&&(l=!0)}}),i&&i.call(this,a,c,u)||l};C.__f=!0;var i=C.shouldComponentUpdate,s=C.componentWillUpdate;C.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)},C.shouldComponentUpdate=o}return r.__N||r.__}function Ce(e,t){var n=Ye(oe++,3);!O.__s&&hn(n.__H,t)&&(n.__=e,n.u=t,C.__H.__h.push(n))}function be(e){return ge=5,ro(function(){return{current:e}},[])}function ro(e,t){var n=Ye(oe++,7);return hn(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function oo(){for(var e;e=pn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(pe),e.__H.__h.forEach(Me),e.__H.__h=[]}catch(t){e.__H.__h=[],O.__e(t,e.__v)}}O.__b=function(e){C=null,yt&&yt(e)},O.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),vt&&vt(e,t)},O.__r=function(e){wt&&wt(e),oe=0;var t=(C=e.__c).__H;t&&(Ne===C?(t.__h=[],C.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(pe),t.__h.forEach(Me),t.__h=[],oe=0)),Ne=C},O.diffed=function(e){xt&&xt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(pn.push(t)!==1&&bt===O.requestAnimationFrame||((bt=O.requestAnimationFrame)||io)(oo)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Ne=C=null},O.__c=function(e,t){t.some(function(n){try{n.__h.forEach(pe),n.__h=n.__h.filter(function(r){return!r.__||Me(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],O.__e(r,n.__v)}}),Et&&Et(e,t)},O.unmount=function(e){St&&St(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{pe(r)}catch(o){t=o}}),n.__H=void 0,t&&O.__e(t,n.__v))};var Rt=typeof requestAnimationFrame=="function";function io(e){var t,n=function(){clearTimeout(r),Rt&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Rt&&(t=requestAnimationFrame(n))}function pe(e){var t=C,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),C=t}function Me(e){var t=C;e.__c=e.__(),C=t}function hn(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function mn(e,t){return typeof t=="function"?t(e):t}class so{parseArg(t){return typeof t=="string"?{content:t}:t}show(t,n){const{content:r,duration:o,closable: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,7 +42,7 @@
|
|
|
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
|
|
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 We=new so;var Ae=(e=>(e.ZH="zh",e.EN="en",e))(Ae||{}),H=(e=>(e.WHITE="white",e.DARK="dark",e))(H||{});function ao(e={}){const{baseURL:t="/api",timeout:n=1e4,onError:r}=e,o=A.create({baseURL:t,timeout:n});return o.interceptors.request.use(i=>{const s=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}"),{token:a,locale:c}=s;return i.headers={...i.headers,Authorization:a,"x-locale":c===Ae.ZH?"zh-CN":"en-US"},i}),o.interceptors.response.use(i=>{if(i.data&&i.data.code===0)return i.data;const s=i.data?.msg||i.data?.message||"未知错误";return We.error(s),r&&r(s,i),Promise.reject(i.data||{message:"未知错误"})},i=>{const s=i.response?.data?.msg||i.response?.data?.message||i.message||"网络请求失败";return We.error(s),r&&r(s,i),Promise.reject(i)}),o}const Q=ao();function lo(){const e=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");return Q.get("/balance",{params:{merchant_id:e.merchantId,biz_type:e.bizType,fund_balance_id:e.fundBalanceId}}).then(t=>{const n=t.data;return{totalAmount:n.total_amount||0,availableAmount:n.available_amount||0,frozenAmount:n.frozen_amount||0}})}const co=async()=>Q.get("/all-dicts",{}).then(e=>(sessionStorage.setItem("all_dicts",JSON.stringify(e.data)),e.data||{})),uo=async(e,t)=>Q.post("/oss/upload",e,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:n=>{if(n.total){const r=Math.round(n.loaded*100/n.total);t&&t(r)}}}).then(n=>n.data?.url||""),fo=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}"),n={merchant_id:Number(t.merchantId),biz_type:t.bizType,fund_balance_id:t.fundBalanceId,source_operator:t.userId?String(t.userId):void 0,transfer_no:e.transferNo,transfer_channel:e.transferChannel,voucher_urls:e.voucherUrls};return Q.post("/offline/recharge/create",n,{})},po=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");console.log(t,"fundUnitParams");const n={merchant_id:Number(t.merchantId),biz_type:t.bizType,fund_balance_id:t.fundBalanceId,source_operator:t.userId?String(t.userId):void 0,amount:e.amount,currency:e.currency,recharge_channel:e.rechargeChannel,return_url:window.location.href};return Q.post("/online/recharge/create",n,{}).then(r=>r.data.redirect_url)},ho=async e=>Q.get("/calc-payment-amount",{params:e}).then(t=>t.data.payment_amount);function mo(e){const{merchant_id:t,biz_type:n,fund_balance_id:r,user_id:o,theme:i=H.WHITE,locale:s=Ae.ZH}=e,a="Bearer "+e.token;return sessionStorage.setItem("fund_unit_params",JSON.stringify({merchantId:t,bizType:n,fundBalanceId:r,userId:o,token:a,theme:i,locale:s})),co(),{token:a,merchantId:t,bizType:n,fundBalanceId:r,userId:o,theme:i,locale:s}}const _o={"/api":{target:"https://fund.bestfulfill.tech/api/sdk",changeOrigin:!0,rewrite:e=>e.replace(/^\/api/,""),secure:!1}};function go({onClick:e,color:t,children:n}){const i=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===H.WHITE?{background:t||"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:"8px 16px",cursor:"pointer",fontSize:16,fontWeight:600}:{background:t||"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:"8px 16px",cursor:"pointer",fontSize:16,fontWeight:600};return m("button",{style:i,onClick:e,type:"button",children:n})}const bo={余额详情:"余额详情",真实金额:"真实金额",冻结金额:"冻结金额",总可用:"总可用",暂无数据:"暂无数据","金额需在1到999999.99之间":"金额需在1到999999.99之间","充值 / 转账":"充值 / 转账",在线充值:"在线充值",线下转账:"线下转账",充值币种:"充值币种",充值金额:"充值金额",支付平台:"支付平台",请选择充值币种:"请选择充值币种",请输入充值金额:"请输入充值金额",请选择支付平台:"请选择支付平台","需要收取手续费,实际支付金额约为:":"需要收取手续费,实际支付金额约为:","提交失败,请重试":"提交失败,请重试","提交中...":"提交中...",去支付:"去支付",取消:"取消",关闭:"关闭",第三方支付平台:"第三方支付平台",交易ID:"交易ID",请输入转账交易ID:"请输入转账交易ID",上传文件:"上传文件",请上传转账凭证:"请上传转账凭证",离线充值创建成功:"离线充值创建成功","加载中...":"加载中...",错误:"错误",成功:"成功",必填:"必填","充值/转账":"充值/转账",切换为暗黑主题:"切换为暗黑主题",切换为白色主题:"切换为白色主题",点击或拖拽文件到此处上传:"点击或拖拽文件到此处上传","支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传":"支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传",个文件:"个文件","正在上传...":"正在上传...",已上传:"已上传",移除:"移除"};function yo(e){return bo[e]||e}const wo={余额详情:"Balance Details",真实金额:"Real Amount",冻结金额:"Frozen Amount",总可用:"Total Available",暂无数据:"No Data","金额需在1到999999.99之间":"Amount must be between 1 and 999999.99","充值 / 转账":"Recharge / Transfer",在线充值:"Online Recharge",线下转账:"Offline Transfer",充值币种:"Recharge Currency",充值金额:"Recharge Amount",支付平台:"Payment Platform",请选择充值币种:"Please select recharge currency",请输入充值金额:"Please enter recharge amount",请选择支付平台:"Please select payment platform","需要收取手续费,实际支付金额约为:":"requires a handling fee, the actual payment amount is approximately: ","提交失败,请重试":"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 xo(e){return wo[e]||e}function Eo(){return JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").locale||Ae.ZH}function S(e){return Eo()==="zh"?yo(e):xo(e)}const qe=({value:e,onChange:t,options:n,placeholder:r,style:o,error:i,disabled:s,dropdownStyle:a,className:c,dropdownClassName:u,children:f})=>{const[l,g]=N(!1),_=be(null),[h,y]=N(null),b=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===H.WHITE,w=b?{trigger:{background:s?"#f5f5f5":"#fff",color:s?"#bfbfbf":e?"#222":"#bfbfbf",border:i?"1px solid #ff4d4f":s?"1px solid #f0f0f0":"1px solid #d9d9d9"},dropdown:{background:"#fff",border:"1px solid #d9d9d9",color:"#222"},option:(x,R,k)=>({color:R?"#bfbfbf":x?"#1890ff":"#222",background:x?"#e6f7ff":k&&!R||R?"#f5f5f5":"#fff"}),placeholder:{color:"#bfbfbf"}}:{trigger:{background:"#23262F",color:s?"#666":e?"#fff":"#666",border:i?"1px solid #ff4d4f":"1px solid #23262F"},dropdown:{background:"#23262F",border:"1px solid #23262F",color:"#fff"},option:(x,R,k)=>({color:R?"#666":x?"#00E8C6":"#fff",background:x?"#23262F":k&&!R?"#333843":"#23262F"}),placeholder:{color:"#666"}};Ce(()=>{if(!l)return;const x=R=>{_.current&&!_.current.contains(R.target)&&g(!1)};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[l]);const E=n.find(x=>x.value===e);return m("div",{ref:_,className:c,style:{position:"relative",...o},children:[m("style",{children:`
|
|
46
46
|
.custom-select-dropdown {
|
|
47
47
|
scrollbar-width: thin;
|
|
48
48
|
scrollbar-color: #bfbfbf #f5f5f5;
|
|
@@ -52,9 +52,9 @@
|
|
|
52
52
|
}
|
|
53
53
|
.custom-select-dropdown::-webkit-scrollbar-thumb {
|
|
54
54
|
border-radius: 4px;
|
|
55
|
-
background: ${
|
|
55
|
+
background: ${b?"#e5e5e5":"#444C5C"};
|
|
56
56
|
}
|
|
57
57
|
.custom-select-dropdown::-webkit-scrollbar-track {
|
|
58
|
-
background: ${
|
|
58
|
+
background: ${b?"#f5f5f5":"#23262F"};
|
|
59
59
|
}
|
|
60
|
-
`}),_("div",{onClick:()=>!s&&g(x=>!x),style:{minHeight:40,borderRadius:6,display:"flex",alignItems:"center",padding:"0 12px",fontSize:15,cursor:s?"not-allowed":"pointer",boxSizing:"border-box",transition:"border 0.2s",opacity:s?.6:1,width:"100%",...w.trigger,...o},tabIndex:0,children:[_("span",{style:{flex:1},children:v?v.label:_("span",{style:w.placeholder,children:r||"请选择"})}),_("span",{style:{marginLeft:8,display:"flex",alignItems:"center"},children:_("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:_("path",{d:"M6 8L10 12L14 8",stroke:"#bfbfbf","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})})})]}),l&&!s&&_("div",{className:`custom-select-dropdown${u?" "+u:""}`,style:{position:"absolute",left:0,right:0,top:44,zIndex:10,borderRadius:6,boxShadow:y?"0 2px 8px rgba(0,0,0,0.08)":"0 2px 8px rgba(0,0,0,0.32)",maxHeight:220,overflowY:"auto",...w.dropdown,...a},children:[n.length===0&&_("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:120,width:"100%",userSelect:"none"},children:[_("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg",children:[_("title",{children:E("暂无数据")}),_("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd",children:[_("ellipse",{fill:"#f5f5f5",cx:"32",cy:"33",rx:"32",ry:"7"}),_("g",{fillRule:"nonzero",stroke:"#d9d9d9",children:[_("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),_("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:"#fafafa"})]})]})]}),_("div",{style:{marginTop:8,color:"#bfbfbf",fontSize:15},children:E("暂无数据")})]}),n.map((x,R)=>_("div",{onClick:()=>{x.disabled||(g(!1),t?.(x.value))},onMouseEnter:()=>b(R),onMouseLeave:()=>b(null),style:{padding:"10px 16px",cursor:x.disabled?"not-allowed":"pointer",fontWeight:e===x.value?600:400,opacity:x.disabled?.6:1,...w.option(e===x.value,!!x.disabled,h===R)},children:x.label},x.value))]}),f]})},vo=({formState:e,setFormState:t,onClose:n,loading:r})=>{const o=JSON.parse(sessionStorage.getItem("all_dicts")||"{}"),i=o?.currency||[],s=o?.channel?.filter(p=>p.payment_support)||[],c=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===H.WHITE,[u,f]=N(""),[l,g]=N(!1);Ce(()=>{e.currency&&e.amount&&e.rechargeChannel?ho({channel:e.rechargeChannel,amount:e.amount,currency:e.currency}).then(p=>{f(p),g(!0)}).catch(p=>{console.error("计算支付金额失败:",p),g(!1)}):g(!1)},[e.currency,e.amount,e.rechargeChannel]);const m=c?{label:{marginBottom:8,fontSize:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}}:{label:{marginBottom:8,fontSize:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #23262F",background:"#23262F",color:"#fff",fontSize:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}},h=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"},b=c?{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600}:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600};return _(Z,{children:[_("div",{style:{marginBottom:18},children:[_("div",{style:m.label,children:[_("span",{style:{color:"#F53F3F"},children:"*"})," ",E("充值币种")]}),_(We,{value:e.currency,onChange:p=>{t(y=>({...y,currency:p}))},options:i?.map(p=>({value:p.value,label:p.label})),placeholder:E("请选择充值币种")})]}),_("div",{style:{marginBottom:18},children:[_("div",{style:m.label,children:[_("span",{style:{color:"#F53F3F"},children:"*"})," ",E("充值金额")]}),_("input",{type:"text",placeholder:E("请输入充值金额"),value:e.amount,onInput:p=>{const y=p.target.value;t(w=>({...w,amount:y,amountError:y.trim()?"":w.amountError}))},style:{...m.input,...e.amountError?m.inputError:{}}}),e.amountError&&_("div",{style:m.error,children:e.amountError})]}),_("div",{style:{marginBottom:24},children:[_("div",{style:m.label,children:[_("span",{style:{color:"#F53F3F"},children:"*"})," ",E("支付平台")]}),_(We,{value:e.rechargeChannel,onChange:p=>{t(y=>({...y,rechargeChannel:p,rechargeChannelError:p?"":y.rechargeChannelError}))},options:s?.map(p=>({value:p.value,label:p.label})),placeholder:E("请选择支付平台")}),e.rechargeChannelError&&_("div",{style:m.error,children:e.rechargeChannelError})]}),l&&u&&_("div",{style:{marginBottom:24,padding:"12px 16px",background:c?"#f6ffed":"#1a1a1a",border:`1px solid ${c?"#b7eb8f":"#333"}`,borderRadius:6,fontSize:14,color:"#52c41a"},children:[s.find(p=>p.value===e.rechargeChannel)?.label||e.rechargeChannel,E("需要收取手续费,实际支付金额约为:"),"$",u]}),e.error&&_("div",{style:{color:"#ff4d4f",marginBottom:12},children:e.error}),_("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[_("button",{type:"button",onClick:n,style:h,children:E("取消")}),_("button",{type:"submit",disabled:r,style:b,children:E(r?"提交中...":"去支付")})]})]})},So={white:{container:{border:"1px dashed #E5E6EB",borderRadius:8,background:"#FCFCFD",padding:24,textAlign:"center",cursor:"pointer",minHeight:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:15},fileItem:{display:"flex",alignItems:"center",background:"#F7F8FA",borderRadius:8,padding:"12px 16px",marginBottom:8,fontSize:15,color:"#222",justifyContent:"space-between"},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:"4px 14px",fontSize:15,marginLeft:16,cursor:"pointer"}},dark:{container:{border:"1.5px dashed #444C5C",borderRadius:8,background:"#181A20",padding:24,textAlign:"center",cursor:"pointer",minHeight:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:15},fileItem:{display:"flex",alignItems:"center",background:"#23262F",borderRadius:8,padding:"12px 16px",marginBottom:8,fontSize:15,color:"#fff",justifyContent:"space-between"},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:"4px 14px",fontSize:15,marginLeft:16,cursor:"pointer"}}},Ro=({value:e=[],onChange:t,maxCount:n=10,accept:r=".jpg,.jpeg,.png,.pdf",multiple:o=!0,disabled:i=!1})=>{const s=be(null),[a,c]=N(!1),[u,f]=N(0),m=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===H.WHITE?"white":"dark",h=So[m],b=async y=>{const w=Array.from(y.target.files).slice(0,n);if(!w.length)return;c(!0);const v=[];for(let x=0;x<w.length;x++){f(0);const R=new FormData;R.append("file",w[x]);try{const k=await uo(R,I=>f(I));k&&v.push(k)}catch{}}c(!1),f(0),t?.([...e,...v]),s.current&&(s.current.value="")},p=y=>{const w=e.filter((v,x)=>x!==y);t?.(w)};return _("div",{children:[_("div",{style:{...h.container,cursor:i?"not-allowed":h.container.cursor,opacity:i?.6:1},onClick:()=>!i&&s.current?.click(),children:[_("div",{style:{fontSize:48,marginBottom:12},children:"📁"}),_("div",{style:{color:"#222",fontSize:15,marginBottom:4},children:E("点击或拖拽文件到此处上传")}),_("div",{style:{color:"#999",fontSize:13},children:[E("支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传")," ",n," ",E("个文件")]}),_("input",{ref:s,type:"file",multiple:o,accept:r,style:{display:"none"},onChange:b,disabled:i}),a&&_("div",{style:{marginTop:12,color:"#1677ff"},children:[E("正在上传...")," ",u,"%"]})]}),e&&e.length>0&&_("div",{style:{marginTop:12},children:e.map((y,w)=>_("div",{style:h.fileItem,children:[_("div",{style:{display:"flex",alignItems:"center",flex:1},children:[_("span",{style:{fontWeight:500,wordBreak:"break-all"},children:y.split("/").pop()}),_("span",{style:{color:"#8C8F93",fontSize:13,marginLeft:8},children:["[",E("已上传"),"]"]})]}),_("button",{type:"button",onClick:v=>{v.stopPropagation(),p(w)},style:h.removeBtn,disabled:i,children:E("移除")})]},y))})]})},To=({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===H.WHITE?{label:{marginBottom:8,fontSize:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},buttonCancel:{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"},buttonSubmit:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}}:{label:{marginBottom:8,fontSize:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #23262F",background:"#23262F",color:"#fff",fontSize:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},buttonCancel:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"},buttonSubmit:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}};return _("form",{onSubmit:async f=>{f.preventDefault();let l=!0;t(g=>({...g,platformError:"",transactionIdError:"",filesError:""})),e.platform||(t(g=>({...g,platformError:E("请选择支付平台")})),l=!1),e.transactionId.trim()||(t(g=>({...g,transactionIdError:E("请输入转账交易ID")})),l=!1),(!e.files||e.files.length===0)&&(t(g=>({...g,filesError:E("请上传转账凭证")})),l=!1),l&&(await fo({transferChannel:e.platform,transferNo:e.transactionId,voucherUrls:e.files}),n(),qe.success(E("离线充值创建成功")))},children:[_("div",{style:{marginBottom:18},children:[_("div",{style:c.label,children:[_("span",{style:{color:"#F53F3F"},children:"*"})," ",E("第三方支付平台")]}),_(We,{value:e.platform,onChange:f=>{t(l=>({...l,platform:f,platformError:f?"":l.platformError}))},options:[...i?.map(f=>({value:f.value,label:f.label}))],placeholder:E("请选择支付平台")}),e.platformError&&_("div",{style:c.error,children:e.platformError})]}),_("div",{style:{marginBottom:18},children:[_("div",{style:c.label,children:[_("span",{style:{color:"#F53F3F"},children:"*"})," ",E("交易ID")]}),_("input",{type:"text",placeholder:E("请输入转账交易ID"),value:e.transactionId,onInput:f=>{const l=f.target.value;t(g=>({...g,transactionId:l,transactionIdError:l?"":g.transactionIdError}))},style:{...c.input,...e.transactionIdError?c.inputError:{}}}),e.transactionIdError&&_("div",{style:c.error,children:e.transactionIdError})]}),_("div",{style:{marginBottom:24},children:[_("div",{style:c.label,children:[_("span",{style:{color:"#F53F3F"},children:"*"})," ",E("上传文件")]}),_(Ro,{value:e.files,onChange:f=>t(l=>({...l,files:f,filesError:""})),maxCount:10,accept:".jpg,.jpeg,.png,.pdf",multiple:!0}),e.filesError&&_("div",{style:c.error,children:e.filesError})]}),_("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[_("button",{type:"button",onClick:n,style:c.buttonCancel,children:E("取消")}),_("button",{type:"submit",disabled:r,style:c.buttonSubmit,children:E("去支付")})]})]})};function ko({visible:e,onClose:t,onSubmit:n}){const[r,o]=N({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),[i,s]=N("online"),[a,c]=N({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1});if(Ce(()=>{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 h=>{h.preventDefault();let b=!0;if(o(p=>({...p,amountError:"",rechargeChannelError:""})),r.amount.trim()||(o(p=>({...p,amountError:E("请输入充值金额")})),b=!1),r.rechargeChannel||(o(p=>({...p,rechargeChannelError:E("请选择支付平台")})),b=!1),!!b){o(p=>({...p,loading:!0,error:""}));try{await n({amount:r.amount,rechargeChannel:r.rechargeChannel,currency:r.currency}),t()}catch{o(p=>({...p,error:E("提交失败,请重试")}))}finally{o(p=>({...p,loading:!1}))}}},f=h=>{h.target===h.currentTarget&&t()},m=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===H.WHITE?{modalBg:"#fff",modalColor:"#222",modalBoxShadow:"0 4px 24px rgba(0,0,0,0.08)",mask:"rgba(0,0,0,0.3)",title:{fontWeight:600,fontSize:20,marginBottom:24,textAlign:"left",color:"#222"},closeBtn:{position:"absolute",right:16,top:16,background:"none",border:"none",color:"#222",fontSize:22,cursor:"pointer",lineHeight:1},tabBtn:(h,b)=>({flex:1,background:h?"#fff":"#F7F8FA",color:h?"#1890ff":"#222",border:"none",borderRadius:b?"8px 0 0 8px":"0 8px 8px 0",fontWeight:h?600:400,fontSize:16,height:48,boxShadow:h?"0 2px 8px 0 rgba(20,20,20,0.04)":"none",outline:"none",cursor:"pointer",borderRight:b?"1px solid #F0F1F3":void 0,borderLeft:b?void 0:"1px solid #F0F1F3",transition:"all 0.2s"})}:{modalBg:"#181A20",modalColor:"#fff",modalBoxShadow:"0 4px 24px rgba(0,0,0,0.5)",mask:"rgba(0,0,0,0.7)",title:{fontWeight:600,fontSize:20,marginBottom:24,textAlign:"left",color:"#fff"},closeBtn:{position:"absolute",right:16,top:16,background:"none",border:"none",color:"#fff",fontSize:22,cursor:"pointer",lineHeight:1},tabBtn:(h,b)=>({flex:1,background:h?"#23262F":"#181A20",color:h?"#00E8C6":"#fff",border:"none",borderRadius:b?"8px 0 0 8px":"0 8px 8px 0",fontWeight:h?600:400,fontSize:16,height:48,boxShadow:h?"0 2px 8px 0 rgba(20,20,20,0.10)":"none",outline:"none",cursor:"pointer",borderRight:b?"1px solid #23262F":void 0,borderLeft:b?void 0:"1px solid #23262F",transition:"all 0.2s"})};return _("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:m.mask,display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999},onClick:f,children:_("form",{onSubmit:u,style:{background:m.modalBg,padding:32,borderRadius:12,minWidth:400,maxWidth:400,color:m.modalColor,boxShadow:m.modalBoxShadow,position:"relative"},onClick:h=>h.stopPropagation(),children:[_("button",{type:"button",onClick:t,style:m.closeBtn,"aria-label":E("关闭"),children:"×"}),_("div",{style:m.title,children:E("充值 / 转账")}),_("div",{style:{display:"flex",marginBottom:28},children:[_("button",{type:"button",onClick:()=>s("online"),style:m.tabBtn(i==="online",!0),children:E("在线充值")}),_("button",{type:"button",onClick:()=>s("offline"),style:m.tabBtn(i==="offline",!1),children:E("线下转账")})]}),i==="online"?_(vo,{formState:r,setFormState:o,onClose:t,loading:r.loading}):_(To,{formState:a,setFormState:c,onClose:t,loading:a.loading})]})})}function et(){return(et=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Co=["context","children"];function Ao(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,Co);return dn(t,n)}function Oo(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=V(Ao,et({},this._props,{context:e.detail.context}),function t(n,r){if(n.nodeType===3)return n.data;if(n.nodeType!==1)return null;var o=[],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[mn(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(Tt,{name:f},u):o[s]=u}var l=r?V(Tt,null,o):o;return V(r||n.nodeName.toLowerCase(),i,l)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?fn:ke)(this._vdom,this._root)}function mn(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function Fo(e,t,n){if(this._vdom){var r={};r[e]=n=n??void 0,r[mn(e)]=n,this._vdom=dn(this._vdom,r),ke(this._vdom,this._root)}}function Po(){ke(this._vdom=null,this._root)}function Tt(e,t){var n=this;return V("slot",et({},e,{ref:function(r){r?(n.ref=r,n._listener||(n._listener=function(o){o.stopPropagation(),o.detail.context=t},r.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}function gn(e,t,n,r){function o(){var 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=Oo,o.prototype.attributeChangedCallback=Fo,o.prototype.disconnectedCallback=Po,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 Bo(){const[e,t]=N(!1),n=async r=>{const o=await po({amount:r.amount,currency:r.currency,rechargeChannel:r.rechargeChannel});window.open(o,"_blank")};return _("div",{children:[_(go,{onClick:()=>t(!0),children:E("充值/转账")}),_(ko,{visible:e,onClose:()=>t(!1),onSubmit:n})]})}gn(Bo,"best-recharge",["theme"],{shadow:!1});const No=({popover:e,children:t,popoverWidth:n=300,popoverMinWidth:r=200,offsetY:o=16,offsetX:i=16,popoverPosition:s="top"})=>{const[a,c]=N(!1),[u,f]=N(s),l=be(null),g=be(null),m=()=>{if(g.current&&(clearTimeout(g.current),g.current=null),s==="top"||s==="bottom")if(l.current){const R=l.current.getBoundingClientRect();s==="top"&&R.top<100?f("bottom"):s==="bottom"&&window.innerHeight-R.bottom<100?f("top"):f(s)}else f(s);else f(s);c(!0)},h=()=>{g.current=window.setTimeout(()=>{c(!1)},120)},b={white:{popover:{background:"#fff",color:"#222",boxShadow:"0 4px 16px rgba(0,0,0,0.12)",border:"none"},arrow:{top:"#fff",bottom:"#fff",left:"#fff",right:"#fff"}},dark:{popover:{background:"#23262F",color:"#fff",boxShadow:"0 4px 16px rgba(0,0,0,0.32)",border:"1px solid #444C5C"},arrow:{top:"#23262F",bottom:"#23262F",left:"#23262F",right:"#23262F"}}},y=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===H.WHITE,w=b[y?"white":"dark"];let v={position:"absolute",zIndex:999,borderRadius:6,fontSize:15,minWidth:r,width:n,padding:"8px 14px",pointerEvents:"auto",textAlign:"center",animation:"fadeInUp 0.3s",...w.popover},x={position:"absolute",zIndex:11,width:0,height:0};return u==="top"?(v={...v,left:"50%",top:-48,transform:"translateX(-50%)"},x={...x,left:"50%",bottom:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderTop:`8px solid ${w.arrow.top}`}):u==="bottom"?(v={...v,left:"50%",top:"100%",marginTop:o,transform:"translateX(-50%)"},x={...x,left:"50%",top:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderBottom:`8px solid ${w.arrow.bottom}`}):u==="leftTop"?(v={...v,right:"100%",top:0,marginRight:i,transform:"none"},x={...x,right:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderLeft:`8px solid ${w.arrow.left}`}):u==="rightTop"&&(v={...v,left:"100%",top:0,marginLeft:i,transform:"translateY(0)"},x={...x,left:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderRight:`8px solid ${w.arrow.right}`}),_("div",{ref:l,style:{position:"relative",display:"inline-block"},onMouseEnter:m,onMouseLeave:h,children:[t,a&&_("div",{style:v,onMouseEnter:m,onMouseLeave:h,children:[e,_("div",{style:x})]})]})};function kt(e){return e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}const Io={white:{popoverTitle:{fontSize:16,fontWeight:600,color:"#222",marginBottom:16,textAlign:"center"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"8px 0",borderBottom:"1px solid #e5e7eb",fontSize:15},detailLabel:{display:"flex",alignItems:"center",color:"#6b7280",fontWeight:500},detailDot:e=>({display:"inline-block",width:8,height:8,borderRadius:"50%",background:e,marginRight:8}),detailValue:e=>({color:e,fontWeight:600,fontSize:15}),main:{fontSize:24,fontWeight:800,color:"#111827",display:"inline-block"},currency:{fontSize:18,color:"#6b7280",marginLeft:8,fontWeight:600}},dark:{popoverTitle:{fontSize:16,fontWeight:600,color:"#fff",marginBottom:16,textAlign:"center"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"8px 0",borderBottom:"1px solid #23262F",fontSize:15},detailLabel:{display:"flex",alignItems:"center",color:"#B5B8BE",fontWeight:500},detailDot:e=>({display:"inline-block",width:8,height:8,borderRadius:"50%",background:e,marginRight:8}),detailValue:e=>({color:e,fontWeight:600,fontSize:15}),main:{fontSize:24,fontWeight:800,color:"#fff",display:"inline-block"},currency:{fontSize:18,color:"#B5B8BE",marginLeft:8,fontWeight:600}}};function Uo(e){const[t,n]=N({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"}]});Ce(()=>{(async()=>{try{const a=await lo(),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===H.WHITE,i=Io[o?"white":"dark"];return _(No,{popover:_(Z,{children:[_("div",{style:i.popoverTitle,children:E("余额详情")}),t.details.map(s=>_("div",{style:i.detailRow,children:[_("span",{style:i.detailLabel,children:[_("span",{style:i.detailDot(s.dot)}),s.label]}),_("span",{style:i.detailValue(s.color),children:[t.symbol,kt(s.value)]})]},s.label))]}),popoverPosition:e.popoverPosition||"bottom",children:_("div",{style:i.main,children:[t.symbol,kt(t.available),_("span",{style:i.currency,children:t.currency})]})})}gn(Uo,"best-statistical-balance");const Do=["best-recharge","best-statistical-balance"];exports.components=Do;exports.initFundUnit=_o;exports.npmTest=bn;exports.printCurrentTime=yn;exports.viteProxy=mo;
|
|
60
|
+
`}),m("div",{onClick:()=>!s&&g(x=>!x),style:{minHeight:40,borderRadius:6,display:"flex",alignItems:"center",padding:"0 12px",fontSize:15,cursor:s?"not-allowed":"pointer",boxSizing:"border-box",transition:"border 0.2s",opacity:s?.6:1,width:"100%",...w.trigger,...o},tabIndex:0,children:[m("span",{style:{flex:1},children:E?E.label:m("span",{style:w.placeholder,children:r||"请选择"})}),m("span",{style:{marginLeft:8,display:"flex",alignItems:"center"},children:m("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m("path",{d:"M6 8L10 12L14 8",stroke:"#bfbfbf","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})})})]}),l&&!s&&m("div",{className:`custom-select-dropdown${u?" "+u:""}`,style:{position:"absolute",left:0,right:0,top:44,zIndex:10,borderRadius:6,boxShadow:b?"0 2px 8px rgba(0,0,0,0.08)":"0 2px 8px rgba(0,0,0,0.32)",maxHeight:220,overflowY:"auto",...w.dropdown,...a},children:[n.length===0&&m("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:120,width:"100%",userSelect:"none"},children:[m("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg",children:[m("title",{children:S("暂无数据")}),m("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd",children:[m("ellipse",{fill:"#f5f5f5",cx:"32",cy:"33",rx:"32",ry:"7"}),m("g",{fillRule:"nonzero",stroke:"#d9d9d9",children:[m("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),m("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:"#fafafa"})]})]})]}),m("div",{style:{marginTop:8,color:"#bfbfbf",fontSize:15},children:S("暂无数据")})]}),n.map((x,R)=>m("div",{onClick:()=>{x.disabled||(g(!1),t?.(x.value))},onMouseEnter:()=>y(R),onMouseLeave:()=>y(null),style:{padding:"10px 16px",cursor:x.disabled?"not-allowed":"pointer",fontWeight:e===x.value?600:400,opacity:x.disabled?.6:1,...w.option(e===x.value,!!x.disabled,h===R)},children:x.label},x.value))]}),f]})};function So(e){return e=e.replace(/[^\d.]/g,""),e=e.replace(/\.(?=.*\.)/g,""),e=e.replace(/^(\d+)(\.\d{0,2})?.*$/,"$1$2"),e=e.replace(/^0+(\d)/,"$1"),e.startsWith(".")&&(e="0"+e),e}function vo(e){if(!e)return"";const t=parseFloat(e);return isNaN(t)?"":t.toFixed(2)}const Ro=({formState:e,setFormState:t,onClose:n,loading:r})=>{const o=JSON.parse(sessionStorage.getItem("all_dicts")||"{}"),i=o?.currency||[],s=o?.channel?.filter(p=>p.payment_support)||[],c=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===H.WHITE,[u,f]=N(""),[l,g]=N(!1);Ce(()=>{e.currency&&e.amount&&e.rechargeChannel?ho({channel:e.rechargeChannel,amount:e.amount,currency:e.currency}).then(p=>{f(p),g(!0)}).catch(p=>{console.error("计算支付金额失败:",p),g(!1)}):g(!1)},[e.currency,e.amount,e.rechargeChannel]);const _=c?{label:{marginBottom:8,fontSize:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}}:{label:{marginBottom:8,fontSize:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #23262F",background:"#23262F",color:"#fff",fontSize:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}},h=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"},y=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 m(Z,{children:[m("div",{style:{marginBottom:18},children:[m("div",{style:_.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",S("充值币种")]}),m(qe,{value:e.currency,onChange:p=>{t(b=>({...b,currency:p}))},options:i?.map(p=>({value:p.value,label:p.label})),placeholder:S("请选择充值币种")})]}),m("div",{style:{marginBottom:18},children:[m("div",{style:_.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",S("充值金额")]}),m("input",{type:"text",placeholder:S("请输入充值金额"),value:e.amount,onInput:p=>{let b=p.target.value;b=So(b);let w="";if(b&&!b.endsWith(".")){let E=parseFloat(b);if(!isNaN(E)&&(E<1&&(E=1),E>999999.99&&(E=999999.99),b=E.toString(),/\./.test(p.target.value))){const x=p.target.value.split(".")[1];x!==void 0&&x.length>0&&(b=E.toFixed(Math.min(x.length,2)))}}t(E=>({...E,amount:b,amountError:w}))},onBlur:p=>{let b=p.target.value;b=vo(b),t(w=>({...w,amount:b,amountError:""}))},style:{..._.input,...e.amountError?_.inputError:{}}}),e.amountError&&m("div",{style:_.error,children:e.amountError})]}),m("div",{style:{marginBottom:24},children:[m("div",{style:_.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",S("支付平台")]}),m(qe,{value:e.rechargeChannel,onChange:p=>{t(b=>({...b,rechargeChannel:p,rechargeChannelError:p?"":b.rechargeChannelError}))},options:s?.map(p=>({value:p.value,label:p.label})),placeholder:S("请选择支付平台")}),e.rechargeChannelError&&m("div",{style:_.error,children:e.rechargeChannelError})]}),l&&u&&m("div",{style:{marginBottom:24,padding:"12px 16px",background:c?"#f6ffed":"#1a1a1a",border:`1px solid ${c?"#b7eb8f":"#333"}`,borderRadius:6,fontSize:14,color:"#52c41a"},children:[s.find(p=>p.value===e.rechargeChannel)?.label||e.rechargeChannel,S("需要收取手续费,实际支付金额约为:"),"$",u]}),e.error&&m("div",{style:{color:"#ff4d4f",marginBottom:12},children:e.error}),m("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[m("button",{type:"button",onClick:n,style:h,children:S("取消")}),m("button",{type:"submit",disabled:r,style:y,children:S(r?"提交中...":"去支付")})]})]})},To={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"}}},ko=({value:e=[],onChange:t,maxCount:n=10,accept:r=".jpg,.jpeg,.png,.pdf",multiple:o=!0,disabled:i=!1})=>{const s=be(null),[a,c]=N(!1),[u,f]=N(0),_=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===H.WHITE?"white":"dark",h=To[_],y=async b=>{const w=Array.from(b.target.files).slice(0,n);if(!w.length)return;c(!0);const E=[];for(let x=0;x<w.length;x++){f(0);const R=new FormData;R.append("file",w[x]);try{const k=await uo(R,I=>f(I));k&&E.push(k)}catch{}}c(!1),f(0),t?.([...e,...E]),s.current&&(s.current.value="")},p=b=>{const w=e.filter((E,x)=>x!==b);t?.(w)};return m("div",{children:[m("div",{style:{...h.container,cursor:i?"not-allowed":h.container.cursor,opacity:i?.6:1},onClick:()=>!i&&s.current?.click(),children:[m("div",{style:{fontSize:48,marginBottom:12},children:"📁"}),m("div",{style:{color:"#222",fontSize:15,marginBottom:4},children:S("点击或拖拽文件到此处上传")}),m("div",{style:{color:"#999",fontSize:13},children:[S("支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传")," ",n," ",S("个文件")]}),m("input",{ref:s,type:"file",multiple:o,accept:r,style:{display:"none"},onChange:y,disabled:i}),a&&m("div",{style:{marginTop:12,color:"#1677ff"},children:[S("正在上传...")," ",u,"%"]})]}),e&&e.length>0&&m("div",{style:{marginTop:12},children:e.map((b,w)=>m("div",{style:h.fileItem,children:[m("div",{style:{display:"flex",alignItems:"center",flex:1},children:[m("span",{style:{fontWeight:500,wordBreak:"break-all"},children:b.split("/").pop()}),m("span",{style:{color:"#8C8F93",fontSize:13,marginLeft:8},children:["[",S("已上传"),"]"]})]}),m("button",{type:"button",onClick:E=>{E.stopPropagation(),p(w)},style:h.removeBtn,disabled:i,children:S("移除")})]},b))})]})},Co=({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===H.WHITE?{label:{marginBottom:8,fontSize:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},buttonCancel:{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"},buttonSubmit:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}}:{label:{marginBottom:8,fontSize:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #23262F",background:"#23262F",color:"#fff",fontSize:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},buttonCancel:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"},buttonSubmit:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}};return m("form",{onSubmit:async f=>{f.preventDefault();let l=!0;t(g=>({...g,platformError:"",transactionIdError:"",filesError:""})),e.platform||(t(g=>({...g,platformError:S("请选择支付平台")})),l=!1),e.transactionId.trim()||(t(g=>({...g,transactionIdError:S("请输入转账交易ID")})),l=!1),(!e.files||e.files.length===0)&&(t(g=>({...g,filesError:S("请上传转账凭证")})),l=!1),l&&(await fo({transferChannel:e.platform,transferNo:e.transactionId,voucherUrls:e.files}),n(),We.success(S("离线充值创建成功")))},children:[m("div",{style:{marginBottom:18},children:[m("div",{style:c.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",S("第三方支付平台")]}),m(qe,{value:e.platform,onChange:f=>{t(l=>({...l,platform:f,platformError:f?"":l.platformError}))},options:[...i?.map(f=>({value:f.value,label:f.label}))],placeholder:S("请选择支付平台")}),e.platformError&&m("div",{style:c.error,children:e.platformError})]}),m("div",{style:{marginBottom:18},children:[m("div",{style:c.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",S("交易ID")]}),m("input",{type:"text",placeholder:S("请输入转账交易ID"),value:e.transactionId,maxLength:200,onInput:f=>{let l=f.target.value;l.length>200&&(l=l.slice(0,200)),t(g=>({...g,transactionId:l,transactionIdError:l?"":g.transactionIdError}))},style:{...c.input,...e.transactionIdError?c.inputError:{}}}),e.transactionIdError&&m("div",{style:c.error,children:e.transactionIdError})]}),m("div",{style:{marginBottom:24},children:[m("div",{style:c.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",S("上传文件")]}),m(ko,{value:e.files,onChange:f=>t(l=>({...l,files:f,filesError:""})),maxCount:10,accept:".jpg,.jpeg,.png,.pdf",multiple:!0}),e.filesError&&m("div",{style:c.error,children:e.filesError})]}),m("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[m("button",{type:"button",onClick:n,style:c.buttonCancel,children:S("取消")}),m("button",{type:"submit",disabled:r,style:c.buttonSubmit,children:S("去支付")})]})]})};function Ao({visible:e,onClose:t,onSubmit:n}){const[r,o]=N({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),[i,s]=N("online"),[a,c]=N({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1});if(Ce(()=>{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 h=>{h.preventDefault();let y=!0;if(o(p=>({...p,amountError:"",rechargeChannelError:""})),r.amount.trim()||(o(p=>({...p,amountError:S("请输入充值金额")})),y=!1),r.rechargeChannel||(o(p=>({...p,rechargeChannelError:S("请选择支付平台")})),y=!1),!!y){o(p=>({...p,loading:!0,error:""}));try{await n({amount:r.amount,rechargeChannel:r.rechargeChannel,currency:r.currency}),t()}catch{o(p=>({...p,error:S("提交失败,请重试")}))}finally{o(p=>({...p,loading:!1}))}}},f=h=>{h.target===h.currentTarget&&t()},_=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===H.WHITE?{modalBg:"#fff",modalColor:"#222",modalBoxShadow:"0 4px 24px rgba(0,0,0,0.08)",mask:"rgba(0,0,0,0.3)",title:{fontWeight:600,fontSize:20,marginBottom:24,textAlign:"left",color:"#222"},closeBtn:{position:"absolute",right:16,top:16,background:"none",border:"none",color:"#222",fontSize:22,cursor:"pointer",lineHeight:1},tabBtn:(h,y)=>({flex:1,background:h?"#fff":"#F7F8FA",color:h?"#1890ff":"#222",border:"none",borderRadius:y?"8px 0 0 8px":"0 8px 8px 0",fontWeight:h?600:400,fontSize:16,height:48,boxShadow:h?"0 2px 8px 0 rgba(20,20,20,0.04)":"none",outline:"none",cursor:"pointer",borderRight:y?"1px solid #F0F1F3":void 0,borderLeft:y?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:(h,y)=>({flex:1,background:h?"#23262F":"#181A20",color:h?"#00E8C6":"#fff",border:"none",borderRadius:y?"8px 0 0 8px":"0 8px 8px 0",fontWeight:h?600:400,fontSize:16,height:48,boxShadow:h?"0 2px 8px 0 rgba(20,20,20,0.10)":"none",outline:"none",cursor:"pointer",borderRight:y?"1px solid #23262F":void 0,borderLeft:y?void 0:"1px solid #23262F",transition:"all 0.2s"})};return m("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:_.mask,display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999},onClick:f,children:m("form",{onSubmit:u,style:{background:_.modalBg,padding:32,borderRadius:12,minWidth:400,maxWidth:400,color:_.modalColor,boxShadow:_.modalBoxShadow,position:"relative"},onClick:h=>h.stopPropagation(),children:[m("button",{type:"button",onClick:t,style:_.closeBtn,"aria-label":S("关闭"),children:"×"}),m("div",{style:_.title,children:S("充值 / 转账")}),m("div",{style:{display:"flex",marginBottom:28},children:[m("button",{type:"button",onClick:()=>s("online"),style:_.tabBtn(i==="online",!0),children:S("在线充值")}),m("button",{type:"button",onClick:()=>s("offline"),style:_.tabBtn(i==="offline",!1),children:S("线下转账")})]}),i==="online"?m(Ro,{formState:r,setFormState:o,onClose:t,loading:r.loading}):m(Co,{formState:a,setFormState:c,onClose:t,loading:a.loading})]})})}function et(){return(et=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Oo=["context","children"];function Fo(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,Oo);return dn(t,n)}function Po(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=V(Fo,et({},this._props,{context:e.detail.context}),function t(n,r){if(n.nodeType===3)return n.data;if(n.nodeType!==1)return null;var o=[],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(Tt,{name:f},u):o[s]=u}var l=r?V(Tt,null,o):o;return V(r||n.nodeName.toLowerCase(),i,l)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?fn:ke)(this._vdom,this._root)}function _n(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function Bo(e,t,n){if(this._vdom){var r={};r[e]=n=n??void 0,r[_n(e)]=n,this._vdom=dn(this._vdom,r),ke(this._vdom,this._root)}}function No(){ke(this._vdom=null,this._root)}function Tt(e,t){var n=this;return V("slot",et({},e,{ref:function(r){r?(n.ref=r,n._listener||(n._listener=function(o){o.stopPropagation(),o.detail.context=t},r.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}function gn(e,t,n,r){function o(){var 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=Po,o.prototype.attributeChangedCallback=Bo,o.prototype.disconnectedCallback=No,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 Io(){const[e,t]=N(!1),n=async r=>{const o=await po({amount:r.amount,currency:r.currency,rechargeChannel:r.rechargeChannel});window.open(o,"_blank")};return m("div",{children:[m(go,{onClick:()=>t(!0),children:S("充值/转账")}),m(Ao,{visible:e,onClose:()=>t(!1),onSubmit:n})]})}gn(Io,"best-recharge",["theme"],{shadow:!1});const Uo=({popover:e,children:t,popoverWidth:n=300,popoverMinWidth:r=200,offsetY:o=16,offsetX:i=16,popoverPosition:s="top"})=>{const[a,c]=N(!1),[u,f]=N(s),l=be(null),g=be(null),_=()=>{if(g.current&&(clearTimeout(g.current),g.current=null),s==="top"||s==="bottom")if(l.current){const R=l.current.getBoundingClientRect();s==="top"&&R.top<100?f("bottom"):s==="bottom"&&window.innerHeight-R.bottom<100?f("top"):f(s)}else f(s);else f(s);c(!0)},h=()=>{g.current=window.setTimeout(()=>{c(!1)},120)},y={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"}}},b=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===H.WHITE,w=y[b?"white":"dark"];let E={position:"absolute",zIndex:999,borderRadius:6,fontSize:15,minWidth:r,width:n,padding:"8px 14px",pointerEvents:"auto",textAlign:"center",animation:"fadeInUp 0.3s",...w.popover},x={position:"absolute",zIndex:11,width:0,height:0};return u==="top"?(E={...E,left:"50%",top:-48,transform:"translateX(-50%)"},x={...x,left:"50%",bottom:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderTop:`8px solid ${w.arrow.top}`}):u==="bottom"?(E={...E,left:"50%",top:"100%",marginTop:o,transform:"translateX(-50%)"},x={...x,left:"50%",top:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderBottom:`8px solid ${w.arrow.bottom}`}):u==="leftTop"?(E={...E,right:"100%",top:0,marginRight:i,transform:"none"},x={...x,right:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderLeft:`8px solid ${w.arrow.left}`}):u==="rightTop"&&(E={...E,left:"100%",top:0,marginLeft:i,transform:"translateY(0)"},x={...x,left:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderRight:`8px solid ${w.arrow.right}`}),m("div",{ref:l,style:{position:"relative",display:"inline-block"},onMouseEnter:_,onMouseLeave:h,children:[t,a&&m("div",{style:E,onMouseEnter:_,onMouseLeave:h,children:[e,m("div",{style:x})]})]})};function kt(e){return e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}const Do={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 Lo(e){const[t,n]=N({available:0,currency:"USD",symbol:"$",details:[{label:S("真实金额"),value:0,color:"#15b36b",dot:"#15b36b"},{label:S("冻结金额"),value:0,color:"#f59e0b",dot:"#f59e0b"},{label:S("总可用"),value:0,color:"#1890ff",dot:"#15b36b"}]});Ce(()=>{(async()=>{try{const a=await lo(),c={available:a.availableAmount,currency:"USD",symbol:"$",details:[{label:S("真实金额"),value:a.totalAmount,color:"#15b36b",dot:"#15b36b"},{label:S("冻结金额"),value:a.frozenAmount,color:"#f59e0b",dot:"#f59e0b"},{label:S("总可用"),value:a.availableAmount,color:"#1890ff",dot:"#15b36b"}]};n(c)}catch(a){console.error("获取余额失败:",a)}})()},[]);const o=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===H.WHITE,i=Do[o?"white":"dark"];return m(Uo,{popover:m(Z,{children:[m("div",{style:i.popoverTitle,children:S("余额详情")}),t.details.map(s=>m("div",{style:i.detailRow,children:[m("span",{style:i.detailLabel,children:[m("span",{style:i.detailDot(s.dot)}),s.label]}),m("span",{style:i.detailValue(s.color),children:[t.symbol,kt(s.value)]})]},s.label))]}),popoverPosition:e.popoverPosition||"bottom",children:m("div",{style:i.main,children:[t.symbol,kt(t.available),m("span",{style:i.currency,children:t.currency})]})})}gn(Lo,"best-statistical-balance");const zo=["best-recharge","best-statistical-balance"];exports.components=zo;exports.initFundUnit=mo;exports.npmTest=bn;exports.printCurrentTime=yn;exports.viteProxy=_o;
|