best-unit 2.0.9 → 2.0.10
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
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var ye,I,Zt,Z,Lt,Qt,en,tn,at,Ke,Xe,me={},nn=[],er=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,De=Array.isArray;function K(e,t){for(var n in t)e[n]=t[n];return e}function st(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function ie(e,t,n){var r,o,a,i={};for(a in t)a=="key"?r=t[a]:a=="ref"?o=t[a]:i[a]=t[a];if(arguments.length>2&&(i.children=arguments.length>3?ye.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)i[a]===void 0&&(i[a]=e.defaultProps[a]);return he(e,i,r,o,null)}function he(e,t,n,r,o){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++Zt,__i:-1,__u:0};return o==null&&I.vnode!=null&&I.vnode(a),a}function ne(e){return e.children}function Ae(e,t){this.props=e,this.context=t}function ae(e,t){if(t==null)return e.__?ae(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"?ae(e):null}function rn(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 rn(e)}}function wt(e){(!e.__d&&(e.__d=!0)&&Z.push(e)&&!Te.__r++||Lt!=I.debounceRendering)&&((Lt=I.debounceRendering)||Qt)(Te)}function Te(){for(var e,t,n,r,o,a,i,s=1;Z.length;)Z.length>s&&Z.sort(en),e=Z.shift(),s=Z.length,e.__d&&(n=void 0,o=(r=(t=e).__v).__e,a=[],i=[],t.__P&&((n=K({},r)).__v=r.__v+1,I.vnode&&I.vnode(n),lt(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[o]:null,a,o??ae(r),!!(32&r.__u),i),n.__v=r.__v,n.__.__k[n.__i]=n,sn(a,n,i),n.__e!=o&&rn(n)));Te.__r=0}function on(e,t,n,r,o,a,i,s,p,c,f){var u,y,m,h,x,b,S=r&&r.__k||nn,L=t.length;for(p=tr(n,t,S,p,L),u=0;u<L;u++)(m=n.__k[u])!=null&&(y=m.__i==-1?me:S[m.__i]||me,m.__i=u,b=lt(e,m,y,o,a,i,s,p,c,f),h=m.__e,m.ref&&y.ref!=m.ref&&(y.ref&&ct(y.ref,null,m),f.push(m.ref,m.__c||h,m)),x==null&&h!=null&&(x=h),4&m.__u||y.__k===m.__k?p=an(m,p,e):typeof m.type=="function"&&b!==void 0?p=b:h&&(p=h.nextSibling),m.__u&=-7);return n.__e=x,p}function tr(e,t,n,r,o){var a,i,s,p,c,f=n.length,u=f,y=0;for(e.__k=new Array(o),a=0;a<o;a++)(i=t[a])!=null&&typeof i!="boolean"&&typeof i!="function"?(p=a+y,(i=e.__k[a]=typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?he(null,i,null,null,null):De(i)?he(ne,{children:i},null,null,null):i.constructor==null&&i.__b>0?he(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=e,i.__b=e.__b+1,s=null,(c=i.__i=nr(i,n,p,u))!=-1&&(u--,(s=n[c])&&(s.__u|=2)),s==null||s.__v==null?(c==-1&&(o>f?y--:o<f&&y++),typeof i.type!="function"&&(i.__u|=4)):c!=p&&(c==p-1?y--:c==p+1?y++:(c>p?y--:y++,i.__u|=4))):e.__k[a]=null;if(u)for(a=0;a<f;a++)(s=n[a])!=null&&(2&s.__u)==0&&(s.__e==r&&(r=ae(s)),cn(s,s));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=ae(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function nr(e,t,n,r){var o,a,i=e.key,s=e.type,p=t[n];if(p===null&&e.key==null||p&&i==p.key&&s==p.type&&(2&p.__u)==0)return n;if(r>(p!=null&&(2&p.__u)==0?1:0))for(o=n-1,a=n+1;o>=0||a<t.length;){if(o>=0){if((p=t[o])&&(2&p.__u)==0&&i==p.key&&s==p.type)return o;o--}if(a<t.length){if((p=t[a])&&(2&p.__u)==0&&i==p.key&&s==p.type)return a;a++}}return-1}function At(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||er.test(t)?n:n+"px"}function Le(e,t,n,r,o){var a,i;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||At(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||At(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")a=t!=(t=t.replace(tn,"$1")),i=t.toLowerCase(),t=i in e||t=="onFocusOut"||t=="onFocusIn"?i.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=n,n?r?n.u=r.u:(n.u=at,e.addEventListener(t,a?Xe:Ke,a)):e.removeEventListener(t,a?Xe:Ke,a);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 kt(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=at++;else if(t.t<n.u)return;return n(I.event?I.event(t):t)}}}function lt(e,t,n,r,o,a,i,s,p,c){var f,u,y,m,h,x,b,S,L,T,A,M,R,P,w,F,U,$=t.type;if(t.constructor!=null)return null;128&n.__u&&(p=!!(32&n.__u),a=[s=t.__e=n.__e]),(f=I.__b)&&f(t);e:if(typeof $=="function")try{if(S=t.props,L="prototype"in $&&$.prototype.render,T=(f=$.contextType)&&r[f.__c],A=f?T?T.props.value:f.__:r,n.__c?b=(u=t.__c=n.__c).__=u.__E:(L?t.__c=u=new $(S,A):(t.__c=u=new Ae(S,A),u.constructor=$,u.render=or),T&&T.sub(u),u.props=S,u.state||(u.state={}),u.context=A,u.__n=r,y=u.__d=!0,u.__h=[],u._sb=[]),L&&u.__s==null&&(u.__s=u.state),L&&$.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=K({},u.__s)),K(u.__s,$.getDerivedStateFromProps(S,u.__s))),m=u.props,h=u.state,u.__v=t,y)L&&$.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),L&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(L&&$.getDerivedStateFromProps==null&&S!==m&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(S,A),!u.__e&&u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(S,u.__s,A)===!1||t.__v==n.__v){for(t.__v!=n.__v&&(u.props=S,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(V){V&&(V.__=t)}),M=0;M<u._sb.length;M++)u.__h.push(u._sb[M]);u._sb=[],u.__h.length&&i.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(S,u.__s,A),L&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(m,h,x)})}if(u.context=A,u.props=S,u.__P=e,u.__e=!1,R=I.__r,P=0,L){for(u.state=u.__s,u.__d=!1,R&&R(t),f=u.render(u.props,u.state,u.context),w=0;w<u._sb.length;w++)u.__h.push(u._sb[w]);u._sb=[]}else do u.__d=!1,R&&R(t),f=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++P<25);u.state=u.__s,u.getChildContext!=null&&(r=K(K({},r),u.getChildContext())),L&&!y&&u.getSnapshotBeforeUpdate!=null&&(x=u.getSnapshotBeforeUpdate(m,h)),F=f,f!=null&&f.type===ne&&f.key==null&&(F=ln(f.props.children)),s=on(e,De(F)?F:[F],t,n,r,o,a,i,s,p,c),u.base=t.__e,t.__u&=-161,u.__h.length&&i.push(u),b&&(u.__E=u.__=null)}catch(V){if(t.__v=null,p||a!=null)if(V.then){for(t.__u|=p?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a[a.indexOf(s)]=null,t.__e=s}else for(U=a.length;U--;)st(a[U]);else t.__e=n.__e,t.__k=n.__k;I.__e(V,t,n)}else a==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=rr(n.__e,t,n,r,o,a,i,p,c);return(f=I.diffed)&&f(t),128&t.__u?void 0:s}function sn(e,t,n){for(var r=0;r<n.length;r++)ct(n[r],n[++r],n[++r]);I.__c&&I.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(a){a.call(o)})}catch(a){I.__e(a,o.__v)}})}function ln(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:De(e)?e.map(ln):K({},e)}function rr(e,t,n,r,o,a,i,s,p){var c,f,u,y,m,h,x,b=n.props,S=t.props,L=t.type;if(L=="svg"?o="http://www.w3.org/2000/svg":L=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),a!=null){for(c=0;c<a.length;c++)if((m=a[c])&&"setAttribute"in m==!!L&&(L?m.localName==L:m.nodeType==3)){e=m,a[c]=null;break}}if(e==null){if(L==null)return document.createTextNode(S);e=document.createElementNS(o,L,S.is&&S),s&&(I.__m&&I.__m(t,a),s=!1),a=null}if(L==null)b===S||s&&e.data==S||(e.data=S);else{if(a=a&&ye.call(e.childNodes),b=n.props||me,!s&&a!=null)for(b={},c=0;c<e.attributes.length;c++)b[(m=e.attributes[c]).name]=m.value;for(c in b)if(m=b[c],c!="children"){if(c=="dangerouslySetInnerHTML")u=m;else if(!(c in S)){if(c=="value"&&"defaultValue"in S||c=="checked"&&"defaultChecked"in S)continue;Le(e,c,null,m,o)}}for(c in S)m=S[c],c=="children"?y=m:c=="dangerouslySetInnerHTML"?f=m:c=="value"?h=m:c=="checked"?x=m:s&&typeof m!="function"||b[c]===m||Le(e,c,m,b[c],o);if(f)s||u&&(f.__html==u.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(u&&(e.innerHTML=""),on(t.type=="template"?e.content:e,De(y)?y:[y],t,n,r,L=="foreignObject"?"http://www.w3.org/1999/xhtml":o,a,i,a?a[0]:n.__k&&ae(n,0),s,p),a!=null)for(c=a.length;c--;)st(a[c]);s||(c="value",L=="progress"&&h==null?e.removeAttribute("value"):h!=null&&(h!==e[c]||L=="progress"&&!h||L=="option"&&h!=b[c])&&Le(e,c,h,b[c],o),c="checked",x!=null&&x!=e[c]&&Le(e,c,x,b[c],o))}return e}function ct(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){I.__e(o,n)}}function cn(e,t,n){var r,o;if(I.unmount&&I.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||ct(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(a){I.__e(a,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&cn(r[o],t,n||typeof e.type!="function");n||st(e.__e),e.__c=e.__=e.__e=void 0}function or(e,t,n){return this.constructor(e,n)}function ze(e,t,n){var r,o,a,i;t==document&&(t=document.documentElement),I.__&&I.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,a=[],i=[],lt(t,e=(!r&&n||t).__k=ie(ne,null,[e]),o||me,me,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?ye.call(t.childNodes):null,a,!r&&n?n:o?o.__e:t.firstChild,r,i),sn(a,e,i)}function dn(e,t){ze(e,t,dn)}function un(e,t,n){var r,o,a,i,s=K({},e.props);for(a in e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)a=="key"?r=t[a]:a=="ref"?o=t[a]:s[a]=t[a]===void 0&&i!=null?i[a]:t[a];return arguments.length>2&&(s.children=arguments.length>3?ye.call(arguments,2):n),he(e.type,s,r||e.key,o||e.ref,null)}ye=nn.slice,I={__e:function(e,t,n,r){for(var o,a,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((a=o.constructor)&&a.getDerivedStateFromError!=null&&(o.setState(a.getDerivedStateFromError(e)),i=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(s){e=s}throw e}},Zt=0,Ae.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=K({},this.state),typeof e=="function"&&(e=e(K({},n),this.props)),e&&K(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),wt(this))},Ae.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),wt(this))},Ae.prototype.render=ne,Z=[],Qt=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,en=function(e,t){return e.__v.__b-t.__v.__b},Te.__r=0,tn=/(PointerCapture)$|Capture$/i,at=0,Ke=kt(!1),Xe=kt(!0);var ir=0;function d(e,t,n,r,o,a){t||(t={});var i,s,p=t;if("ref"in p)for(s in p={},t)s=="ref"?i=t[s]:p[s]=t[s];var c={type:e,props:p,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--ir,__i:-1,__u:0,__source:o,__self:a};if(typeof e=="function"&&(i=e.defaultProps))for(s in i)p[s]===void 0&&(p[s]=i[s]);return I.vnode&&I.vnode(c),c}var ge,D,Je,Et,Be=0,fn=[],O=I,Ct=O.__b,vt=O.__r,Mt=O.diffed,Tt=O.__c,Bt=O.unmount,Rt=O.__;function dt(e,t){O.__h&&O.__h(D,e,Be||t),Be=0;var n=D.__H||(D.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function B(e){return Be=1,ar(hn,e)}function ar(e,t,n){var r=dt(ge++,2);if(r.t=e,!r.__c&&(r.__=[hn(void 0,t),function(s){var p=r.__N?r.__N[0]:r.__[0],c=r.t(p,s);p!==c&&(r.__N=[c,r.__[1]],r.__c.setState({}))}],r.__c=D,!D.__f)){var o=function(s,p,c){if(!r.__c.__H)return!0;var f=r.__c.__H.__.filter(function(y){return!!y.__c});if(f.every(function(y){return!y.__N}))return!a||a.call(this,s,p,c);var u=r.__c.props!==s;return f.forEach(function(y){if(y.__N){var m=y.__[0];y.__=y.__N,y.__N=void 0,m!==y.__[0]&&(u=!0)}}),a&&a.call(this,s,p,c)||u};D.__f=!0;var a=D.shouldComponentUpdate,i=D.componentWillUpdate;D.componentWillUpdate=function(s,p,c){if(this.__e){var f=a;a=void 0,o(s,p,c),a=f}i&&i.call(this,s,p,c)},D.shouldComponentUpdate=o}return r.__N||r.__}function J(e,t){var n=dt(ge++,3);!O.__s&&pn(n.__H,t)&&(n.__=e,n.u=t,D.__H.__h.push(n))}function se(e){return Be=5,sr(function(){return{current:e}},[])}function sr(e,t){var n=dt(ge++,7);return pn(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function lr(){for(var e;e=fn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ke),e.__H.__h.forEach(Ze),e.__H.__h=[]}catch(t){e.__H.__h=[],O.__e(t,e.__v)}}O.__b=function(e){D=null,Ct&&Ct(e)},O.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Rt&&Rt(e,t)},O.__r=function(e){vt&&vt(e),ge=0;var t=(D=e.__c).__H;t&&(Je===D?(t.__h=[],D.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(ke),t.__h.forEach(Ze),t.__h=[],ge=0)),Je=D},O.diffed=function(e){Mt&&Mt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(fn.push(t)!==1&&Et===O.requestAnimationFrame||((Et=O.requestAnimationFrame)||cr)(lr)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Je=D=null},O.__c=function(e,t){t.some(function(n){try{n.__h.forEach(ke),n.__h=n.__h.filter(function(r){return!r.__||Ze(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],O.__e(r,n.__v)}}),Tt&&Tt(e,t)},O.unmount=function(e){Bt&&Bt(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{ke(r)}catch(o){t=o}}),n.__H=void 0,t&&O.__e(t,n.__v))};var Ft=typeof requestAnimationFrame=="function";function cr(e){var t,n=function(){clearTimeout(r),Ft&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Ft&&(t=requestAnimationFrame(n))}function ke(e){var t=D,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),D=t}function Ze(e){var t=D;e.__c=e.__(),D=t}function pn(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function hn(e,t){return typeof t=="function"?t(e):t}var Oe=(e=>(e.ZH="zh",e.EN="en",e))(Oe||{}),N=(e=>(e.WHITE="white",e.DARK="dark",e))(N||{}),oe=(e=>(e.DEV="dev",e.DEVELOPMENT="development",e.TEST="test",e.PROD="prod",e.PRODUCTION="production",e))(oe||{}),l=(e=>(e.SMALL="small",e.MEDIUM="medium",e))(l||{});function mn(e,t){return function(){return e.apply(t,arguments)}}const{toString:dr}=Object.prototype,{getPrototypeOf:ut}=Object,{iterator:Pe,toStringTag:gn}=Symbol,Ne=(e=>t=>{const n=dr.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Y=e=>(e=e.toLowerCase(),t=>Ne(t)===e),Ue=e=>t=>typeof t===e,{isArray:le}=Array,be=Ue("undefined");function ur(e){return e!==null&&!be(e)&&e.constructor!==null&&!be(e.constructor)&&j(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const bn=Y("ArrayBuffer");function fr(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&bn(e.buffer),t}const pr=Ue("string"),j=Ue("function"),yn=Ue("number"),$e=e=>e!==null&&typeof e=="object",hr=e=>e===!0||e===!1,Ee=e=>{if(Ne(e)!=="object")return!1;const t=ut(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(gn in e)&&!(Pe in e)},mr=Y("Date"),gr=Y("File"),br=Y("Blob"),yr=Y("FileList"),xr=e=>$e(e)&&j(e.pipe),_r=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||j(e.append)&&((t=Ne(e))==="formdata"||t==="object"&&j(e.toString)&&e.toString()==="[object FormData]"))},Sr=Y("URLSearchParams"),[Lr,wr,Ar,kr]=["ReadableStream","Request","Response","Headers"].map(Y),Er=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function xe(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),le(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const a=n?Object.getOwnPropertyNames(e):Object.keys(e),i=a.length;let s;for(r=0;r<i;r++)s=a[r],t.call(null,e[s],s,e)}}function xn(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,_n=e=>!be(e)&&e!==Q;function Qe(){const{caseless:e}=_n(this)&&this||{},t={},n=(r,o)=>{const a=e&&xn(t,o)||o;Ee(t[a])&&Ee(r)?t[a]=Qe(t[a],r):Ee(r)?t[a]=Qe({},r):le(r)?t[a]=r.slice():t[a]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&xe(arguments[r],n);return t}const Cr=(e,t,n,{allOwnKeys:r}={})=>(xe(t,(o,a)=>{n&&j(o)?e[a]=mn(o,n):e[a]=o},{allOwnKeys:r}),e),vr=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Mr=(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)},Tr=(e,t,n,r)=>{let o,a,i;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)i=o[a],(!r||r(i,e,t))&&!s[i]&&(t[i]=e[i],s[i]=!0);e=n!==!1&&ut(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Br=(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},Rr=e=>{if(!e)return null;if(le(e))return e;let t=e.length;if(!yn(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Fr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ut(Uint8Array)),Ir=(e,t)=>{const r=(e&&e[Pe]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},Dr=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},zr=Y("HTMLFormElement"),Or=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),It=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Pr=Y("RegExp"),Sn=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};xe(n,(o,a)=>{let i;(i=t(o,a,e))!==!1&&(r[a]=i||o)}),Object.defineProperties(e,r)},Nr=e=>{Sn(e,(t,n)=>{if(j(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(j(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+"'")})}})},Ur=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return le(e)?r(e):r(String(e).split(t)),n},$r=()=>{},Wr=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Hr(e){return!!(e&&j(e.append)&&e[gn]==="FormData"&&e[Pe])}const jr=e=>{const t=new Array(10),n=(r,o)=>{if($e(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const a=le(r)?[]:{};return xe(r,(i,s)=>{const p=n(i,o+1);!be(p)&&(a[s]=p)}),t[o]=void 0,a}}return r};return n(e,0)},qr=Y("AsyncFunction"),Jr=e=>e&&($e(e)||j(e))&&j(e.then)&&j(e.catch),Ln=((e,t)=>e?setImmediate:t?((n,r)=>(Q.addEventListener("message",({source:o,data:a})=>{o===Q&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Q.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",j(Q.postMessage)),Vr=typeof queueMicrotask<"u"?queueMicrotask.bind(Q):typeof process<"u"&&process.nextTick||Ln,Yr=e=>e!=null&&j(e[Pe]),g={isArray:le,isArrayBuffer:bn,isBuffer:ur,isFormData:_r,isArrayBufferView:fr,isString:pr,isNumber:yn,isBoolean:hr,isObject:$e,isPlainObject:Ee,isReadableStream:Lr,isRequest:wr,isResponse:Ar,isHeaders:kr,isUndefined:be,isDate:mr,isFile:gr,isBlob:br,isRegExp:Pr,isFunction:j,isStream:xr,isURLSearchParams:Sr,isTypedArray:Fr,isFileList:yr,forEach:xe,merge:Qe,extend:Cr,trim:Er,stripBOM:vr,inherits:Mr,toFlatObject:Tr,kindOf:Ne,kindOfTest:Y,endsWith:Br,toArray:Rr,forEachEntry:Ir,matchAll:Dr,isHTMLForm:zr,hasOwnProperty:It,hasOwnProp:It,reduceDescriptors:Sn,freezeMethods:Nr,toObjectSet:Ur,toCamelCase:Or,noop:$r,toFiniteNumber:Wr,findKey:xn,global:Q,isContextDefined:_n,isSpecCompliantForm:Hr,toJSONObject:jr,isAsyncFn:qr,isThenable:Jr,setImmediate:Ln,asap:Vr,isIterable:Yr};function C(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)}g.inherits(C,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:g.toJSONObject(this.config),code:this.code,status:this.status}}});const wn=C.prototype,An={};["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=>{An[e]={value:e}});Object.defineProperties(C,An);Object.defineProperty(wn,"isAxiosError",{value:!0});C.from=(e,t,n,r,o,a)=>{const i=Object.create(wn);return g.toFlatObject(e,i,function(p){return p!==Error.prototype},s=>s!=="isAxiosError"),C.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,a&&Object.assign(i,a),i};const Gr=null;function et(e){return g.isPlainObject(e)||g.isArray(e)}function kn(e){return g.endsWith(e,"[]")?e.slice(0,-2):e}function Dt(e,t,n){return e?e.concat(t).map(function(o,a){return o=kn(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function Kr(e){return g.isArray(e)&&!e.some(et)}const Xr=g.toFlatObject(g,{},null,function(t){return/^is[A-Z]/.test(t)});function We(e,t,n){if(!g.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=g.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,b){return!g.isUndefined(b[x])});const r=n.metaTokens,o=n.visitor||f,a=n.dots,i=n.indexes,p=(n.Blob||typeof Blob<"u"&&Blob)&&g.isSpecCompliantForm(t);if(!g.isFunction(o))throw new TypeError("visitor must be a function");function c(h){if(h===null)return"";if(g.isDate(h))return h.toISOString();if(g.isBoolean(h))return h.toString();if(!p&&g.isBlob(h))throw new C("Blob is not supported. Use a Buffer instead.");return g.isArrayBuffer(h)||g.isTypedArray(h)?p&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function f(h,x,b){let S=h;if(h&&!b&&typeof h=="object"){if(g.endsWith(x,"{}"))x=r?x:x.slice(0,-2),h=JSON.stringify(h);else if(g.isArray(h)&&Kr(h)||(g.isFileList(h)||g.endsWith(x,"[]"))&&(S=g.toArray(h)))return x=kn(x),S.forEach(function(T,A){!(g.isUndefined(T)||T===null)&&t.append(i===!0?Dt([x],A,a):i===null?x:x+"[]",c(T))}),!1}return et(h)?!0:(t.append(Dt(b,x,a),c(h)),!1)}const u=[],y=Object.assign(Xr,{defaultVisitor:f,convertValue:c,isVisitable:et});function m(h,x){if(!g.isUndefined(h)){if(u.indexOf(h)!==-1)throw Error("Circular reference detected in "+x.join("."));u.push(h),g.forEach(h,function(S,L){(!(g.isUndefined(S)||S===null)&&o.call(t,S,g.isString(L)?L.trim():L,x,y))===!0&&m(S,x?x.concat(L):[L])}),u.pop()}}if(!g.isObject(e))throw new TypeError("data must be an object");return m(e),t}function zt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function ft(e,t){this._pairs=[],e&&We(e,this,t)}const En=ft.prototype;En.append=function(t,n){this._pairs.push([t,n])};En.toString=function(t){const n=t?function(r){return t.call(this,r,zt)}:zt;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Zr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Cn(e,t,n){if(!t)return e;const r=n&&n.encode||Zr;g.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let a;if(o?a=o(t,n):a=g.isURLSearchParams(t)?t.toString():new ft(t,n).toString(r),a){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+a}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){g.forEach(this.handlers,function(r){r!==null&&t(r)})}}const vn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Qr=typeof URLSearchParams<"u"?URLSearchParams:ft,eo=typeof FormData<"u"?FormData:null,to=typeof Blob<"u"?Blob:null,no={isBrowser:!0,classes:{URLSearchParams:Qr,FormData:eo,Blob:to},protocols:["http","https","file","blob","url","data"]},pt=typeof window<"u"&&typeof document<"u",tt=typeof navigator=="object"&&navigator||void 0,ro=pt&&(!tt||["ReactNative","NativeScript","NS"].indexOf(tt.product)<0),oo=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",io=pt&&window.location.href||"http://localhost",ao=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:pt,hasStandardBrowserEnv:ro,hasStandardBrowserWebWorkerEnv:oo,navigator:tt,origin:io},Symbol.toStringTag,{value:"Module"})),W={...ao,...no};function so(e,t){return We(e,new W.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,a){return W.isNode&&g.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function lo(e){return g.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function co(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}function Mn(e){function t(n,r,o,a){let i=n[a++];if(i==="__proto__")return!0;const s=Number.isFinite(+i),p=a>=n.length;return i=!i&&g.isArray(o)?o.length:i,p?(g.hasOwnProp(o,i)?o[i]=[o[i],r]:o[i]=r,!s):((!o[i]||!g.isObject(o[i]))&&(o[i]=[]),t(n,r,o[i],a)&&g.isArray(o[i])&&(o[i]=co(o[i])),!s)}if(g.isFormData(e)&&g.isFunction(e.entries)){const n={};return g.forEachEntry(e,(r,o)=>{t(lo(r),o,n,0)}),n}return null}function uo(e,t,n){if(g.isString(e))try{return(t||JSON.parse)(e),g.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const _e={transitional:vn,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=g.isObject(t);if(a&&g.isHTMLForm(t)&&(t=new FormData(t)),g.isFormData(t))return o?JSON.stringify(Mn(t)):t;if(g.isArrayBuffer(t)||g.isBuffer(t)||g.isStream(t)||g.isFile(t)||g.isBlob(t)||g.isReadableStream(t))return t;if(g.isArrayBufferView(t))return t.buffer;if(g.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return so(t,this.formSerializer).toString();if((s=g.isFileList(t))||r.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return We(s?{"files[]":t}:t,p&&new p,this.formSerializer)}}return a||o?(n.setContentType("application/json",!1),uo(t)):t}],transformResponse:[function(t){const n=this.transitional||_e.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(g.isResponse(t)||g.isReadableStream(t))return t;if(t&&g.isString(t)&&(r&&!this.responseType||o)){const i=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(s){if(i)throw s.name==="SyntaxError"?C.from(s,C.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:W.classes.FormData,Blob:W.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};g.forEach(["delete","get","head","post","put","patch"],e=>{_e.headers[e]={}});const fo=g.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"]),po=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var ye,I,Zt,Z,Lt,Qt,en,tn,at,Ke,Xe,me={},nn=[],er=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,De=Array.isArray;function K(e,t){for(var n in t)e[n]=t[n];return e}function st(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function ie(e,t,n){var r,o,a,i={};for(a in t)a=="key"?r=t[a]:a=="ref"?o=t[a]:i[a]=t[a];if(arguments.length>2&&(i.children=arguments.length>3?ye.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)i[a]===void 0&&(i[a]=e.defaultProps[a]);return he(e,i,r,o,null)}function he(e,t,n,r,o){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++Zt,__i:-1,__u:0};return o==null&&I.vnode!=null&&I.vnode(a),a}function ne(e){return e.children}function Ae(e,t){this.props=e,this.context=t}function ae(e,t){if(t==null)return e.__?ae(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"?ae(e):null}function rn(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 rn(e)}}function wt(e){(!e.__d&&(e.__d=!0)&&Z.push(e)&&!Me.__r++||Lt!=I.debounceRendering)&&((Lt=I.debounceRendering)||Qt)(Me)}function Me(){for(var e,t,n,r,o,a,i,s=1;Z.length;)Z.length>s&&Z.sort(en),e=Z.shift(),s=Z.length,e.__d&&(n=void 0,o=(r=(t=e).__v).__e,a=[],i=[],t.__P&&((n=K({},r)).__v=r.__v+1,I.vnode&&I.vnode(n),lt(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[o]:null,a,o??ae(r),!!(32&r.__u),i),n.__v=r.__v,n.__.__k[n.__i]=n,sn(a,n,i),n.__e!=o&&rn(n)));Me.__r=0}function on(e,t,n,r,o,a,i,s,p,c,f){var u,y,m,h,x,b,S=r&&r.__k||nn,L=t.length;for(p=tr(n,t,S,p,L),u=0;u<L;u++)(m=n.__k[u])!=null&&(y=m.__i==-1?me:S[m.__i]||me,m.__i=u,b=lt(e,m,y,o,a,i,s,p,c,f),h=m.__e,m.ref&&y.ref!=m.ref&&(y.ref&&ct(y.ref,null,m),f.push(m.ref,m.__c||h,m)),x==null&&h!=null&&(x=h),4&m.__u||y.__k===m.__k?p=an(m,p,e):typeof m.type=="function"&&b!==void 0?p=b:h&&(p=h.nextSibling),m.__u&=-7);return n.__e=x,p}function tr(e,t,n,r,o){var a,i,s,p,c,f=n.length,u=f,y=0;for(e.__k=new Array(o),a=0;a<o;a++)(i=t[a])!=null&&typeof i!="boolean"&&typeof i!="function"?(p=a+y,(i=e.__k[a]=typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?he(null,i,null,null,null):De(i)?he(ne,{children:i},null,null,null):i.constructor==null&&i.__b>0?he(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=e,i.__b=e.__b+1,s=null,(c=i.__i=nr(i,n,p,u))!=-1&&(u--,(s=n[c])&&(s.__u|=2)),s==null||s.__v==null?(c==-1&&(o>f?y--:o<f&&y++),typeof i.type!="function"&&(i.__u|=4)):c!=p&&(c==p-1?y--:c==p+1?y++:(c>p?y--:y++,i.__u|=4))):e.__k[a]=null;if(u)for(a=0;a<f;a++)(s=n[a])!=null&&(2&s.__u)==0&&(s.__e==r&&(r=ae(s)),cn(s,s));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=ae(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function nr(e,t,n,r){var o,a,i=e.key,s=e.type,p=t[n];if(p===null&&e.key==null||p&&i==p.key&&s==p.type&&(2&p.__u)==0)return n;if(r>(p!=null&&(2&p.__u)==0?1:0))for(o=n-1,a=n+1;o>=0||a<t.length;){if(o>=0){if((p=t[o])&&(2&p.__u)==0&&i==p.key&&s==p.type)return o;o--}if(a<t.length){if((p=t[a])&&(2&p.__u)==0&&i==p.key&&s==p.type)return a;a++}}return-1}function At(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||er.test(t)?n:n+"px"}function Le(e,t,n,r,o){var a,i;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||At(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||At(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")a=t!=(t=t.replace(tn,"$1")),i=t.toLowerCase(),t=i in e||t=="onFocusOut"||t=="onFocusIn"?i.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=n,n?r?n.u=r.u:(n.u=at,e.addEventListener(t,a?Xe:Ke,a)):e.removeEventListener(t,a?Xe:Ke,a);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 kt(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=at++;else if(t.t<n.u)return;return n(I.event?I.event(t):t)}}}function lt(e,t,n,r,o,a,i,s,p,c){var f,u,y,m,h,x,b,S,L,M,A,T,R,P,w,F,U,$=t.type;if(t.constructor!=null)return null;128&n.__u&&(p=!!(32&n.__u),a=[s=t.__e=n.__e]),(f=I.__b)&&f(t);e:if(typeof $=="function")try{if(S=t.props,L="prototype"in $&&$.prototype.render,M=(f=$.contextType)&&r[f.__c],A=f?M?M.props.value:f.__:r,n.__c?b=(u=t.__c=n.__c).__=u.__E:(L?t.__c=u=new $(S,A):(t.__c=u=new Ae(S,A),u.constructor=$,u.render=or),M&&M.sub(u),u.props=S,u.state||(u.state={}),u.context=A,u.__n=r,y=u.__d=!0,u.__h=[],u._sb=[]),L&&u.__s==null&&(u.__s=u.state),L&&$.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=K({},u.__s)),K(u.__s,$.getDerivedStateFromProps(S,u.__s))),m=u.props,h=u.state,u.__v=t,y)L&&$.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),L&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(L&&$.getDerivedStateFromProps==null&&S!==m&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(S,A),!u.__e&&u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(S,u.__s,A)===!1||t.__v==n.__v){for(t.__v!=n.__v&&(u.props=S,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(V){V&&(V.__=t)}),T=0;T<u._sb.length;T++)u.__h.push(u._sb[T]);u._sb=[],u.__h.length&&i.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(S,u.__s,A),L&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(m,h,x)})}if(u.context=A,u.props=S,u.__P=e,u.__e=!1,R=I.__r,P=0,L){for(u.state=u.__s,u.__d=!1,R&&R(t),f=u.render(u.props,u.state,u.context),w=0;w<u._sb.length;w++)u.__h.push(u._sb[w]);u._sb=[]}else do u.__d=!1,R&&R(t),f=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++P<25);u.state=u.__s,u.getChildContext!=null&&(r=K(K({},r),u.getChildContext())),L&&!y&&u.getSnapshotBeforeUpdate!=null&&(x=u.getSnapshotBeforeUpdate(m,h)),F=f,f!=null&&f.type===ne&&f.key==null&&(F=ln(f.props.children)),s=on(e,De(F)?F:[F],t,n,r,o,a,i,s,p,c),u.base=t.__e,t.__u&=-161,u.__h.length&&i.push(u),b&&(u.__E=u.__=null)}catch(V){if(t.__v=null,p||a!=null)if(V.then){for(t.__u|=p?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a[a.indexOf(s)]=null,t.__e=s}else for(U=a.length;U--;)st(a[U]);else t.__e=n.__e,t.__k=n.__k;I.__e(V,t,n)}else a==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=rr(n.__e,t,n,r,o,a,i,p,c);return(f=I.diffed)&&f(t),128&t.__u?void 0:s}function sn(e,t,n){for(var r=0;r<n.length;r++)ct(n[r],n[++r],n[++r]);I.__c&&I.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(a){a.call(o)})}catch(a){I.__e(a,o.__v)}})}function ln(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:De(e)?e.map(ln):K({},e)}function rr(e,t,n,r,o,a,i,s,p){var c,f,u,y,m,h,x,b=n.props,S=t.props,L=t.type;if(L=="svg"?o="http://www.w3.org/2000/svg":L=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),a!=null){for(c=0;c<a.length;c++)if((m=a[c])&&"setAttribute"in m==!!L&&(L?m.localName==L:m.nodeType==3)){e=m,a[c]=null;break}}if(e==null){if(L==null)return document.createTextNode(S);e=document.createElementNS(o,L,S.is&&S),s&&(I.__m&&I.__m(t,a),s=!1),a=null}if(L==null)b===S||s&&e.data==S||(e.data=S);else{if(a=a&&ye.call(e.childNodes),b=n.props||me,!s&&a!=null)for(b={},c=0;c<e.attributes.length;c++)b[(m=e.attributes[c]).name]=m.value;for(c in b)if(m=b[c],c!="children"){if(c=="dangerouslySetInnerHTML")u=m;else if(!(c in S)){if(c=="value"&&"defaultValue"in S||c=="checked"&&"defaultChecked"in S)continue;Le(e,c,null,m,o)}}for(c in S)m=S[c],c=="children"?y=m:c=="dangerouslySetInnerHTML"?f=m:c=="value"?h=m:c=="checked"?x=m:s&&typeof m!="function"||b[c]===m||Le(e,c,m,b[c],o);if(f)s||u&&(f.__html==u.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(u&&(e.innerHTML=""),on(t.type=="template"?e.content:e,De(y)?y:[y],t,n,r,L=="foreignObject"?"http://www.w3.org/1999/xhtml":o,a,i,a?a[0]:n.__k&&ae(n,0),s,p),a!=null)for(c=a.length;c--;)st(a[c]);s||(c="value",L=="progress"&&h==null?e.removeAttribute("value"):h!=null&&(h!==e[c]||L=="progress"&&!h||L=="option"&&h!=b[c])&&Le(e,c,h,b[c],o),c="checked",x!=null&&x!=e[c]&&Le(e,c,x,b[c],o))}return e}function ct(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){I.__e(o,n)}}function cn(e,t,n){var r,o;if(I.unmount&&I.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||ct(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(a){I.__e(a,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&cn(r[o],t,n||typeof e.type!="function");n||st(e.__e),e.__c=e.__=e.__e=void 0}function or(e,t,n){return this.constructor(e,n)}function ze(e,t,n){var r,o,a,i;t==document&&(t=document.documentElement),I.__&&I.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,a=[],i=[],lt(t,e=(!r&&n||t).__k=ie(ne,null,[e]),o||me,me,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?ye.call(t.childNodes):null,a,!r&&n?n:o?o.__e:t.firstChild,r,i),sn(a,e,i)}function dn(e,t){ze(e,t,dn)}function un(e,t,n){var r,o,a,i,s=K({},e.props);for(a in e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)a=="key"?r=t[a]:a=="ref"?o=t[a]:s[a]=t[a]===void 0&&i!=null?i[a]:t[a];return arguments.length>2&&(s.children=arguments.length>3?ye.call(arguments,2):n),he(e.type,s,r||e.key,o||e.ref,null)}ye=nn.slice,I={__e:function(e,t,n,r){for(var o,a,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((a=o.constructor)&&a.getDerivedStateFromError!=null&&(o.setState(a.getDerivedStateFromError(e)),i=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(s){e=s}throw e}},Zt=0,Ae.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=K({},this.state),typeof e=="function"&&(e=e(K({},n),this.props)),e&&K(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),wt(this))},Ae.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),wt(this))},Ae.prototype.render=ne,Z=[],Qt=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,en=function(e,t){return e.__v.__b-t.__v.__b},Me.__r=0,tn=/(PointerCapture)$|Capture$/i,at=0,Ke=kt(!1),Xe=kt(!0);var ir=0;function d(e,t,n,r,o,a){t||(t={});var i,s,p=t;if("ref"in p)for(s in p={},t)s=="ref"?i=t[s]:p[s]=t[s];var c={type:e,props:p,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--ir,__i:-1,__u:0,__source:o,__self:a};if(typeof e=="function"&&(i=e.defaultProps))for(s in i)p[s]===void 0&&(p[s]=i[s]);return I.vnode&&I.vnode(c),c}var ge,D,Je,Et,Be=0,fn=[],O=I,Ct=O.__b,vt=O.__r,Tt=O.diffed,Mt=O.__c,Bt=O.unmount,Rt=O.__;function dt(e,t){O.__h&&O.__h(D,e,Be||t),Be=0;var n=D.__H||(D.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function B(e){return Be=1,ar(hn,e)}function ar(e,t,n){var r=dt(ge++,2);if(r.t=e,!r.__c&&(r.__=[hn(void 0,t),function(s){var p=r.__N?r.__N[0]:r.__[0],c=r.t(p,s);p!==c&&(r.__N=[c,r.__[1]],r.__c.setState({}))}],r.__c=D,!D.__f)){var o=function(s,p,c){if(!r.__c.__H)return!0;var f=r.__c.__H.__.filter(function(y){return!!y.__c});if(f.every(function(y){return!y.__N}))return!a||a.call(this,s,p,c);var u=r.__c.props!==s;return f.forEach(function(y){if(y.__N){var m=y.__[0];y.__=y.__N,y.__N=void 0,m!==y.__[0]&&(u=!0)}}),a&&a.call(this,s,p,c)||u};D.__f=!0;var a=D.shouldComponentUpdate,i=D.componentWillUpdate;D.componentWillUpdate=function(s,p,c){if(this.__e){var f=a;a=void 0,o(s,p,c),a=f}i&&i.call(this,s,p,c)},D.shouldComponentUpdate=o}return r.__N||r.__}function J(e,t){var n=dt(ge++,3);!O.__s&&pn(n.__H,t)&&(n.__=e,n.u=t,D.__H.__h.push(n))}function se(e){return Be=5,sr(function(){return{current:e}},[])}function sr(e,t){var n=dt(ge++,7);return pn(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function lr(){for(var e;e=fn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ke),e.__H.__h.forEach(Ze),e.__H.__h=[]}catch(t){e.__H.__h=[],O.__e(t,e.__v)}}O.__b=function(e){D=null,Ct&&Ct(e)},O.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Rt&&Rt(e,t)},O.__r=function(e){vt&&vt(e),ge=0;var t=(D=e.__c).__H;t&&(Je===D?(t.__h=[],D.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(ke),t.__h.forEach(Ze),t.__h=[],ge=0)),Je=D},O.diffed=function(e){Tt&&Tt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(fn.push(t)!==1&&Et===O.requestAnimationFrame||((Et=O.requestAnimationFrame)||cr)(lr)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Je=D=null},O.__c=function(e,t){t.some(function(n){try{n.__h.forEach(ke),n.__h=n.__h.filter(function(r){return!r.__||Ze(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],O.__e(r,n.__v)}}),Mt&&Mt(e,t)},O.unmount=function(e){Bt&&Bt(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{ke(r)}catch(o){t=o}}),n.__H=void 0,t&&O.__e(t,n.__v))};var Ft=typeof requestAnimationFrame=="function";function cr(e){var t,n=function(){clearTimeout(r),Ft&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Ft&&(t=requestAnimationFrame(n))}function ke(e){var t=D,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),D=t}function Ze(e){var t=D;e.__c=e.__(),D=t}function pn(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function hn(e,t){return typeof t=="function"?t(e):t}var Oe=(e=>(e.ZH="zh",e.EN="en",e))(Oe||{}),N=(e=>(e.WHITE="white",e.DARK="dark",e))(N||{}),oe=(e=>(e.DEV="dev",e.DEVELOPMENT="development",e.TEST="test",e.PROD="prod",e.PRODUCTION="production",e))(oe||{}),l=(e=>(e.SMALL="small",e.MEDIUM="medium",e))(l||{});function mn(e,t){return function(){return e.apply(t,arguments)}}const{toString:dr}=Object.prototype,{getPrototypeOf:ut}=Object,{iterator:Pe,toStringTag:gn}=Symbol,Ne=(e=>t=>{const n=dr.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Y=e=>(e=e.toLowerCase(),t=>Ne(t)===e),Ue=e=>t=>typeof t===e,{isArray:le}=Array,be=Ue("undefined");function ur(e){return e!==null&&!be(e)&&e.constructor!==null&&!be(e.constructor)&&j(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const bn=Y("ArrayBuffer");function fr(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&bn(e.buffer),t}const pr=Ue("string"),j=Ue("function"),yn=Ue("number"),$e=e=>e!==null&&typeof e=="object",hr=e=>e===!0||e===!1,Ee=e=>{if(Ne(e)!=="object")return!1;const t=ut(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(gn in e)&&!(Pe in e)},mr=Y("Date"),gr=Y("File"),br=Y("Blob"),yr=Y("FileList"),xr=e=>$e(e)&&j(e.pipe),_r=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||j(e.append)&&((t=Ne(e))==="formdata"||t==="object"&&j(e.toString)&&e.toString()==="[object FormData]"))},Sr=Y("URLSearchParams"),[Lr,wr,Ar,kr]=["ReadableStream","Request","Response","Headers"].map(Y),Er=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function xe(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),le(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const a=n?Object.getOwnPropertyNames(e):Object.keys(e),i=a.length;let s;for(r=0;r<i;r++)s=a[r],t.call(null,e[s],s,e)}}function xn(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,_n=e=>!be(e)&&e!==Q;function Qe(){const{caseless:e}=_n(this)&&this||{},t={},n=(r,o)=>{const a=e&&xn(t,o)||o;Ee(t[a])&&Ee(r)?t[a]=Qe(t[a],r):Ee(r)?t[a]=Qe({},r):le(r)?t[a]=r.slice():t[a]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&xe(arguments[r],n);return t}const Cr=(e,t,n,{allOwnKeys:r}={})=>(xe(t,(o,a)=>{n&&j(o)?e[a]=mn(o,n):e[a]=o},{allOwnKeys:r}),e),vr=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Tr=(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)},Mr=(e,t,n,r)=>{let o,a,i;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)i=o[a],(!r||r(i,e,t))&&!s[i]&&(t[i]=e[i],s[i]=!0);e=n!==!1&&ut(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Br=(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},Rr=e=>{if(!e)return null;if(le(e))return e;let t=e.length;if(!yn(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Fr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ut(Uint8Array)),Ir=(e,t)=>{const r=(e&&e[Pe]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},Dr=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},zr=Y("HTMLFormElement"),Or=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),It=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Pr=Y("RegExp"),Sn=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};xe(n,(o,a)=>{let i;(i=t(o,a,e))!==!1&&(r[a]=i||o)}),Object.defineProperties(e,r)},Nr=e=>{Sn(e,(t,n)=>{if(j(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(j(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+"'")})}})},Ur=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return le(e)?r(e):r(String(e).split(t)),n},$r=()=>{},Wr=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Hr(e){return!!(e&&j(e.append)&&e[gn]==="FormData"&&e[Pe])}const jr=e=>{const t=new Array(10),n=(r,o)=>{if($e(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const a=le(r)?[]:{};return xe(r,(i,s)=>{const p=n(i,o+1);!be(p)&&(a[s]=p)}),t[o]=void 0,a}}return r};return n(e,0)},qr=Y("AsyncFunction"),Jr=e=>e&&($e(e)||j(e))&&j(e.then)&&j(e.catch),Ln=((e,t)=>e?setImmediate:t?((n,r)=>(Q.addEventListener("message",({source:o,data:a})=>{o===Q&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Q.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",j(Q.postMessage)),Vr=typeof queueMicrotask<"u"?queueMicrotask.bind(Q):typeof process<"u"&&process.nextTick||Ln,Yr=e=>e!=null&&j(e[Pe]),g={isArray:le,isArrayBuffer:bn,isBuffer:ur,isFormData:_r,isArrayBufferView:fr,isString:pr,isNumber:yn,isBoolean:hr,isObject:$e,isPlainObject:Ee,isReadableStream:Lr,isRequest:wr,isResponse:Ar,isHeaders:kr,isUndefined:be,isDate:mr,isFile:gr,isBlob:br,isRegExp:Pr,isFunction:j,isStream:xr,isURLSearchParams:Sr,isTypedArray:Fr,isFileList:yr,forEach:xe,merge:Qe,extend:Cr,trim:Er,stripBOM:vr,inherits:Tr,toFlatObject:Mr,kindOf:Ne,kindOfTest:Y,endsWith:Br,toArray:Rr,forEachEntry:Ir,matchAll:Dr,isHTMLForm:zr,hasOwnProperty:It,hasOwnProp:It,reduceDescriptors:Sn,freezeMethods:Nr,toObjectSet:Ur,toCamelCase:Or,noop:$r,toFiniteNumber:Wr,findKey:xn,global:Q,isContextDefined:_n,isSpecCompliantForm:Hr,toJSONObject:jr,isAsyncFn:qr,isThenable:Jr,setImmediate:Ln,asap:Vr,isIterable:Yr};function C(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)}g.inherits(C,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:g.toJSONObject(this.config),code:this.code,status:this.status}}});const wn=C.prototype,An={};["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=>{An[e]={value:e}});Object.defineProperties(C,An);Object.defineProperty(wn,"isAxiosError",{value:!0});C.from=(e,t,n,r,o,a)=>{const i=Object.create(wn);return g.toFlatObject(e,i,function(p){return p!==Error.prototype},s=>s!=="isAxiosError"),C.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,a&&Object.assign(i,a),i};const Gr=null;function et(e){return g.isPlainObject(e)||g.isArray(e)}function kn(e){return g.endsWith(e,"[]")?e.slice(0,-2):e}function Dt(e,t,n){return e?e.concat(t).map(function(o,a){return o=kn(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function Kr(e){return g.isArray(e)&&!e.some(et)}const Xr=g.toFlatObject(g,{},null,function(t){return/^is[A-Z]/.test(t)});function We(e,t,n){if(!g.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=g.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,b){return!g.isUndefined(b[x])});const r=n.metaTokens,o=n.visitor||f,a=n.dots,i=n.indexes,p=(n.Blob||typeof Blob<"u"&&Blob)&&g.isSpecCompliantForm(t);if(!g.isFunction(o))throw new TypeError("visitor must be a function");function c(h){if(h===null)return"";if(g.isDate(h))return h.toISOString();if(g.isBoolean(h))return h.toString();if(!p&&g.isBlob(h))throw new C("Blob is not supported. Use a Buffer instead.");return g.isArrayBuffer(h)||g.isTypedArray(h)?p&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function f(h,x,b){let S=h;if(h&&!b&&typeof h=="object"){if(g.endsWith(x,"{}"))x=r?x:x.slice(0,-2),h=JSON.stringify(h);else if(g.isArray(h)&&Kr(h)||(g.isFileList(h)||g.endsWith(x,"[]"))&&(S=g.toArray(h)))return x=kn(x),S.forEach(function(M,A){!(g.isUndefined(M)||M===null)&&t.append(i===!0?Dt([x],A,a):i===null?x:x+"[]",c(M))}),!1}return et(h)?!0:(t.append(Dt(b,x,a),c(h)),!1)}const u=[],y=Object.assign(Xr,{defaultVisitor:f,convertValue:c,isVisitable:et});function m(h,x){if(!g.isUndefined(h)){if(u.indexOf(h)!==-1)throw Error("Circular reference detected in "+x.join("."));u.push(h),g.forEach(h,function(S,L){(!(g.isUndefined(S)||S===null)&&o.call(t,S,g.isString(L)?L.trim():L,x,y))===!0&&m(S,x?x.concat(L):[L])}),u.pop()}}if(!g.isObject(e))throw new TypeError("data must be an object");return m(e),t}function zt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function ft(e,t){this._pairs=[],e&&We(e,this,t)}const En=ft.prototype;En.append=function(t,n){this._pairs.push([t,n])};En.toString=function(t){const n=t?function(r){return t.call(this,r,zt)}:zt;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Zr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Cn(e,t,n){if(!t)return e;const r=n&&n.encode||Zr;g.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let a;if(o?a=o(t,n):a=g.isURLSearchParams(t)?t.toString():new ft(t,n).toString(r),a){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+a}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){g.forEach(this.handlers,function(r){r!==null&&t(r)})}}const vn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Qr=typeof URLSearchParams<"u"?URLSearchParams:ft,eo=typeof FormData<"u"?FormData:null,to=typeof Blob<"u"?Blob:null,no={isBrowser:!0,classes:{URLSearchParams:Qr,FormData:eo,Blob:to},protocols:["http","https","file","blob","url","data"]},pt=typeof window<"u"&&typeof document<"u",tt=typeof navigator=="object"&&navigator||void 0,ro=pt&&(!tt||["ReactNative","NativeScript","NS"].indexOf(tt.product)<0),oo=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",io=pt&&window.location.href||"http://localhost",ao=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:pt,hasStandardBrowserEnv:ro,hasStandardBrowserWebWorkerEnv:oo,navigator:tt,origin:io},Symbol.toStringTag,{value:"Module"})),W={...ao,...no};function so(e,t){return We(e,new W.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,a){return W.isNode&&g.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function lo(e){return g.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function co(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}function Tn(e){function t(n,r,o,a){let i=n[a++];if(i==="__proto__")return!0;const s=Number.isFinite(+i),p=a>=n.length;return i=!i&&g.isArray(o)?o.length:i,p?(g.hasOwnProp(o,i)?o[i]=[o[i],r]:o[i]=r,!s):((!o[i]||!g.isObject(o[i]))&&(o[i]=[]),t(n,r,o[i],a)&&g.isArray(o[i])&&(o[i]=co(o[i])),!s)}if(g.isFormData(e)&&g.isFunction(e.entries)){const n={};return g.forEachEntry(e,(r,o)=>{t(lo(r),o,n,0)}),n}return null}function uo(e,t,n){if(g.isString(e))try{return(t||JSON.parse)(e),g.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const _e={transitional:vn,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=g.isObject(t);if(a&&g.isHTMLForm(t)&&(t=new FormData(t)),g.isFormData(t))return o?JSON.stringify(Tn(t)):t;if(g.isArrayBuffer(t)||g.isBuffer(t)||g.isStream(t)||g.isFile(t)||g.isBlob(t)||g.isReadableStream(t))return t;if(g.isArrayBufferView(t))return t.buffer;if(g.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return so(t,this.formSerializer).toString();if((s=g.isFileList(t))||r.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return We(s?{"files[]":t}:t,p&&new p,this.formSerializer)}}return a||o?(n.setContentType("application/json",!1),uo(t)):t}],transformResponse:[function(t){const n=this.transitional||_e.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(g.isResponse(t)||g.isReadableStream(t))return t;if(t&&g.isString(t)&&(r&&!this.responseType||o)){const i=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(s){if(i)throw s.name==="SyntaxError"?C.from(s,C.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:W.classes.FormData,Blob:W.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};g.forEach(["delete","get","head","post","put","patch"],e=>{_e.headers[e]={}});const fo=g.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"]),po=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
2
2
|
`).forEach(function(i){o=i.indexOf(":"),n=i.substring(0,o).trim().toLowerCase(),r=i.substring(o+1).trim(),!(!n||t[n]&&fo[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Pt=Symbol("internals");function pe(e){return e&&String(e).trim().toLowerCase()}function Ce(e){return e===!1||e==null?e:g.isArray(e)?e.map(Ce):String(e)}function ho(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 mo=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ve(e,t,n,r,o){if(g.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!g.isString(t)){if(g.isString(r))return t.indexOf(r)!==-1;if(g.isRegExp(r))return r.test(t)}}function go(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function bo(e,t){const n=g.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,a,i){return this[r].call(this,t,o,a,i)},configurable:!0})})}let q=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function a(s,p,c){const f=pe(p);if(!f)throw new Error("header name must be a non-empty string");const u=g.findKey(o,f);(!u||o[u]===void 0||c===!0||c===void 0&&o[u]!==!1)&&(o[u||p]=Ce(s))}const i=(s,p)=>g.forEach(s,(c,f)=>a(c,f,p));if(g.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(g.isString(t)&&(t=t.trim())&&!mo(t))i(po(t),n);else if(g.isObject(t)&&g.isIterable(t)){let s={},p,c;for(const f of t){if(!g.isArray(f))throw TypeError("Object iterator must return a key-value pair");s[c=f[0]]=(p=s[c])?g.isArray(p)?[...p,f[1]]:[p,f[1]]:f[1]}i(s,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=pe(t),t){const r=g.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return ho(o);if(g.isFunction(n))return n.call(this,o,r);if(g.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=pe(t),t){const r=g.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Ve(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(i){if(i=pe(i),i){const s=g.findKey(r,i);s&&(!n||Ve(r,r[s],s,n))&&(delete r[s],o=!0)}}return g.isArray(t)?t.forEach(a):a(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const a=n[r];(!t||Ve(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const n=this,r={};return g.forEach(this,(o,a)=>{const i=g.findKey(r,a);if(i){n[i]=Ce(o),delete n[a];return}const s=t?go(a):String(a).trim();s!==a&&delete n[a],n[s]=Ce(o),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return g.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&g.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[Pt]=this[Pt]={accessors:{}}).accessors,o=this.prototype;function a(i){const s=pe(i);r[s]||(bo(o,i),r[s]=!0)}return g.isArray(t)?t.forEach(a):a(t),this}};q.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);g.reduceDescriptors(q.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});g.freezeMethods(q);function Ye(e,t){const n=this||_e,r=t||n,o=q.from(r.headers);let a=r.data;return g.forEach(e,function(s){a=s.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function Tn(e){return!!(e&&e.__CANCEL__)}function ce(e,t,n){C.call(this,e??"canceled",C.ERR_CANCELED,t,n),this.name="CanceledError"}g.inherits(ce,C,{__CANCEL__:!0});function Bn(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new C("Request failed with status code "+n.status,[C.ERR_BAD_REQUEST,C.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function yo(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function xo(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,a=0,i;return t=t!==void 0?t:1e3,function(p){const c=Date.now(),f=r[a];i||(i=c),n[o]=p,r[o]=c;let u=a,y=0;for(;u!==o;)y+=n[u++],u=u%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),c-i<t)return;const m=f&&c-f;return m?Math.round(y*1e3/m):void 0}}function _o(e,t){let n=0,r=1e3/t,o,a;const i=(c,f=Date.now())=>{n=f,o=null,a&&(clearTimeout(a),a=null),e.apply(null,c)};return[(...c)=>{const f=Date.now(),u=f-n;u>=r?i(c,f):(o=c,a||(a=setTimeout(()=>{a=null,i(o)},r-u)))},()=>o&&i(o)]}const Re=(e,t,n=3)=>{let r=0;const o=xo(50,250);return _o(a=>{const i=a.loaded,s=a.lengthComputable?a.total:void 0,p=i-r,c=o(p),f=i<=s;r=i;const u={loaded:i,total:s,progress:s?i/s:void 0,bytes:p,rate:c||void 0,estimated:c&&s&&f?(s-i)/c:void 0,event:a,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(u)},n)},Nt=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ut=e=>(...t)=>g.asap(()=>e(...t)),So=W.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,W.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(W.origin),W.navigator&&/(msie|trident)/i.test(W.navigator.userAgent)):()=>!0,Lo=W.hasStandardBrowserEnv?{write(e,t,n,r,o,a){const i=[e+"="+encodeURIComponent(t)];g.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),g.isString(r)&&i.push("path="+r),g.isString(o)&&i.push("domain="+o),a===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function wo(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Ao(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Rn(e,t,n){let r=!wo(t);return e&&(r||n==!1)?Ao(e,t):t}const $t=e=>e instanceof q?{...e}:e;function te(e,t){t=t||{};const n={};function r(c,f,u,y){return g.isPlainObject(c)&&g.isPlainObject(f)?g.merge.call({caseless:y},c,f):g.isPlainObject(f)?g.merge({},f):g.isArray(f)?f.slice():f}function o(c,f,u,y){if(g.isUndefined(f)){if(!g.isUndefined(c))return r(void 0,c,u,y)}else return r(c,f,u,y)}function a(c,f){if(!g.isUndefined(f))return r(void 0,f)}function i(c,f){if(g.isUndefined(f)){if(!g.isUndefined(c))return r(void 0,c)}else return r(void 0,f)}function s(c,f,u){if(u in t)return r(c,f);if(u in e)return r(void 0,c)}const p={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:s,headers:(c,f,u)=>o($t(c),$t(f),u,!0)};return g.forEach(Object.keys(Object.assign({},e,t)),function(f){const u=p[f]||o,y=u(e[f],t[f],f);g.isUndefined(y)&&u!==s||(n[f]=y)}),n}const Fn=e=>{const t=te({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:i,auth:s}=t;t.headers=i=q.from(i),t.url=Cn(Rn(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&i.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let p;if(g.isFormData(n)){if(W.hasStandardBrowserEnv||W.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((p=i.getContentType())!==!1){const[c,...f]=p?p.split(";").map(u=>u.trim()).filter(Boolean):[];i.setContentType([c||"multipart/form-data",...f].join("; "))}}if(W.hasStandardBrowserEnv&&(r&&g.isFunction(r)&&(r=r(t)),r||r!==!1&&So(t.url))){const c=o&&a&&Lo.read(a);c&&i.set(o,c)}return t},ko=typeof XMLHttpRequest<"u",Eo=ko&&function(e){return new Promise(function(n,r){const o=Fn(e);let a=o.data;const i=q.from(o.headers).normalize();let{responseType:s,onUploadProgress:p,onDownloadProgress:c}=o,f,u,y,m,h;function x(){m&&m(),h&&h(),o.cancelToken&&o.cancelToken.unsubscribe(f),o.signal&&o.signal.removeEventListener("abort",f)}let b=new XMLHttpRequest;b.open(o.method.toUpperCase(),o.url,!0),b.timeout=o.timeout;function S(){if(!b)return;const T=q.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),M={data:!s||s==="text"||s==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:T,config:e,request:b};Bn(function(P){n(P),x()},function(P){r(P),x()},M),b=null}"onloadend"in b?b.onloadend=S:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(S)},b.onabort=function(){b&&(r(new C("Request aborted",C.ECONNABORTED,e,b)),b=null)},b.onerror=function(){r(new C("Network Error",C.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let A=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const M=o.transitional||vn;o.timeoutErrorMessage&&(A=o.timeoutErrorMessage),r(new C(A,M.clarifyTimeoutError?C.ETIMEDOUT:C.ECONNABORTED,e,b)),b=null},a===void 0&&i.setContentType(null),"setRequestHeader"in b&&g.forEach(i.toJSON(),function(A,M){b.setRequestHeader(M,A)}),g.isUndefined(o.withCredentials)||(b.withCredentials=!!o.withCredentials),s&&s!=="json"&&(b.responseType=o.responseType),c&&([y,h]=Re(c,!0),b.addEventListener("progress",y)),p&&b.upload&&([u,m]=Re(p),b.upload.addEventListener("progress",u),b.upload.addEventListener("loadend",m)),(o.cancelToken||o.signal)&&(f=T=>{b&&(r(!T||T.type?new ce(null,e,b):T),b.abort(),b=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const L=yo(o.url);if(L&&W.protocols.indexOf(L)===-1){r(new C("Unsupported protocol "+L+":",C.ERR_BAD_REQUEST,e));return}b.send(a||null)})},Co=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const a=function(c){if(!o){o=!0,s();const f=c instanceof Error?c:this.reason;r.abort(f instanceof C?f:new ce(f instanceof Error?f.message:f))}};let i=t&&setTimeout(()=>{i=null,a(new C(`timeout ${t} of ms exceeded`,C.ETIMEDOUT))},t);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(a):c.removeEventListener("abort",a)}),e=null)};e.forEach(c=>c.addEventListener("abort",a));const{signal:p}=r;return p.unsubscribe=()=>g.asap(s),p}},vo=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},Mo=async function*(e,t){for await(const n of To(e))yield*vo(n,t)},To=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()}},Wt=(e,t,n,r)=>{const o=Mo(e,t);let a=0,i,s=p=>{i||(i=!0,r&&r(p))};return new ReadableStream({async pull(p){try{const{done:c,value:f}=await o.next();if(c){s(),p.close();return}let u=f.byteLength;if(n){let y=a+=u;n(y)}p.enqueue(new Uint8Array(f))}catch(c){throw s(c),c}},cancel(p){return s(p),o.return()}},{highWaterMark:2})},He=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",In=He&&typeof ReadableStream=="function",Bo=He&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Dn=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Ro=In&&Dn(()=>{let e=!1;const t=new Request(W.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Ht=64*1024,nt=In&&Dn(()=>g.isReadableStream(new Response("").body)),Fe={stream:nt&&(e=>e.body)};He&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Fe[t]&&(Fe[t]=g.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new C(`Response type '${t}' is not supported`,C.ERR_NOT_SUPPORT,r)})})})(new Response);const Fo=async e=>{if(e==null)return 0;if(g.isBlob(e))return e.size;if(g.isSpecCompliantForm(e))return(await new Request(W.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(g.isArrayBufferView(e)||g.isArrayBuffer(e))return e.byteLength;if(g.isURLSearchParams(e)&&(e=e+""),g.isString(e))return(await Bo(e)).byteLength},Io=async(e,t)=>{const n=g.toFiniteNumber(e.getContentLength());return n??Fo(t)},Do=He&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:a,timeout:i,onDownloadProgress:s,onUploadProgress:p,responseType:c,headers:f,withCredentials:u="same-origin",fetchOptions:y}=Fn(e);c=c?(c+"").toLowerCase():"text";let m=Co([o,a&&a.toAbortSignal()],i),h;const x=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let b;try{if(p&&Ro&&n!=="get"&&n!=="head"&&(b=await Io(f,r))!==0){let M=new Request(t,{method:"POST",body:r,duplex:"half"}),R;if(g.isFormData(r)&&(R=M.headers.get("content-type"))&&f.setContentType(R),M.body){const[P,w]=Nt(b,Re(Ut(p)));r=Wt(M.body,Ht,P,w)}}g.isString(u)||(u=u?"include":"omit");const S="credentials"in Request.prototype;h=new Request(t,{...y,signal:m,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",credentials:S?u:void 0});let L=await fetch(h,y);const T=nt&&(c==="stream"||c==="response");if(nt&&(s||T&&x)){const M={};["status","statusText","headers"].forEach(F=>{M[F]=L[F]});const R=g.toFiniteNumber(L.headers.get("content-length")),[P,w]=s&&Nt(R,Re(Ut(s),!0))||[];L=new Response(Wt(L.body,Ht,P,()=>{w&&w(),x&&x()}),M)}c=c||"text";let A=await Fe[g.findKey(Fe,c)||"text"](L,e);return!T&&x&&x(),await new Promise((M,R)=>{Bn(M,R,{data:A,headers:q.from(L.headers),status:L.status,statusText:L.statusText,config:e,request:h})})}catch(S){throw x&&x(),S&&S.name==="TypeError"&&/Load failed|fetch/i.test(S.message)?Object.assign(new C("Network Error",C.ERR_NETWORK,e,h),{cause:S.cause||S}):C.from(S,S&&S.code,e,h)}}),rt={http:Gr,xhr:Eo,fetch:Do};g.forEach(rt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const jt=e=>`- ${e}`,zo=e=>g.isFunction(e)||e===null||e===!1,zn={getAdapter:e=>{e=g.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let a=0;a<t;a++){n=e[a];let i;if(r=n,!zo(n)&&(r=rt[(i=String(n)).toLowerCase()],r===void 0))throw new C(`Unknown adapter '${i}'`);if(r)break;o[i||"#"+a]=r}if(!r){const a=Object.entries(o).map(([s,p])=>`adapter ${s} `+(p===!1?"is not supported by the environment":"is not available in the build"));let i=t?a.length>1?`since :
|
|
3
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[Pt]=this[Pt]={accessors:{}}).accessors,o=this.prototype;function a(i){const s=pe(i);r[s]||(bo(o,i),r[s]=!0)}return g.isArray(t)?t.forEach(a):a(t),this}};q.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);g.reduceDescriptors(q.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});g.freezeMethods(q);function Ye(e,t){const n=this||_e,r=t||n,o=q.from(r.headers);let a=r.data;return g.forEach(e,function(s){a=s.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function Mn(e){return!!(e&&e.__CANCEL__)}function ce(e,t,n){C.call(this,e??"canceled",C.ERR_CANCELED,t,n),this.name="CanceledError"}g.inherits(ce,C,{__CANCEL__:!0});function Bn(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new C("Request failed with status code "+n.status,[C.ERR_BAD_REQUEST,C.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function yo(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function xo(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,a=0,i;return t=t!==void 0?t:1e3,function(p){const c=Date.now(),f=r[a];i||(i=c),n[o]=p,r[o]=c;let u=a,y=0;for(;u!==o;)y+=n[u++],u=u%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),c-i<t)return;const m=f&&c-f;return m?Math.round(y*1e3/m):void 0}}function _o(e,t){let n=0,r=1e3/t,o,a;const i=(c,f=Date.now())=>{n=f,o=null,a&&(clearTimeout(a),a=null),e.apply(null,c)};return[(...c)=>{const f=Date.now(),u=f-n;u>=r?i(c,f):(o=c,a||(a=setTimeout(()=>{a=null,i(o)},r-u)))},()=>o&&i(o)]}const Re=(e,t,n=3)=>{let r=0;const o=xo(50,250);return _o(a=>{const i=a.loaded,s=a.lengthComputable?a.total:void 0,p=i-r,c=o(p),f=i<=s;r=i;const u={loaded:i,total:s,progress:s?i/s:void 0,bytes:p,rate:c||void 0,estimated:c&&s&&f?(s-i)/c:void 0,event:a,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(u)},n)},Nt=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ut=e=>(...t)=>g.asap(()=>e(...t)),So=W.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,W.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(W.origin),W.navigator&&/(msie|trident)/i.test(W.navigator.userAgent)):()=>!0,Lo=W.hasStandardBrowserEnv?{write(e,t,n,r,o,a){const i=[e+"="+encodeURIComponent(t)];g.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),g.isString(r)&&i.push("path="+r),g.isString(o)&&i.push("domain="+o),a===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function wo(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Ao(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Rn(e,t,n){let r=!wo(t);return e&&(r||n==!1)?Ao(e,t):t}const $t=e=>e instanceof q?{...e}:e;function te(e,t){t=t||{};const n={};function r(c,f,u,y){return g.isPlainObject(c)&&g.isPlainObject(f)?g.merge.call({caseless:y},c,f):g.isPlainObject(f)?g.merge({},f):g.isArray(f)?f.slice():f}function o(c,f,u,y){if(g.isUndefined(f)){if(!g.isUndefined(c))return r(void 0,c,u,y)}else return r(c,f,u,y)}function a(c,f){if(!g.isUndefined(f))return r(void 0,f)}function i(c,f){if(g.isUndefined(f)){if(!g.isUndefined(c))return r(void 0,c)}else return r(void 0,f)}function s(c,f,u){if(u in t)return r(c,f);if(u in e)return r(void 0,c)}const p={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:s,headers:(c,f,u)=>o($t(c),$t(f),u,!0)};return g.forEach(Object.keys(Object.assign({},e,t)),function(f){const u=p[f]||o,y=u(e[f],t[f],f);g.isUndefined(y)&&u!==s||(n[f]=y)}),n}const Fn=e=>{const t=te({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:i,auth:s}=t;t.headers=i=q.from(i),t.url=Cn(Rn(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&i.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let p;if(g.isFormData(n)){if(W.hasStandardBrowserEnv||W.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((p=i.getContentType())!==!1){const[c,...f]=p?p.split(";").map(u=>u.trim()).filter(Boolean):[];i.setContentType([c||"multipart/form-data",...f].join("; "))}}if(W.hasStandardBrowserEnv&&(r&&g.isFunction(r)&&(r=r(t)),r||r!==!1&&So(t.url))){const c=o&&a&&Lo.read(a);c&&i.set(o,c)}return t},ko=typeof XMLHttpRequest<"u",Eo=ko&&function(e){return new Promise(function(n,r){const o=Fn(e);let a=o.data;const i=q.from(o.headers).normalize();let{responseType:s,onUploadProgress:p,onDownloadProgress:c}=o,f,u,y,m,h;function x(){m&&m(),h&&h(),o.cancelToken&&o.cancelToken.unsubscribe(f),o.signal&&o.signal.removeEventListener("abort",f)}let b=new XMLHttpRequest;b.open(o.method.toUpperCase(),o.url,!0),b.timeout=o.timeout;function S(){if(!b)return;const M=q.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),T={data:!s||s==="text"||s==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:M,config:e,request:b};Bn(function(P){n(P),x()},function(P){r(P),x()},T),b=null}"onloadend"in b?b.onloadend=S:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(S)},b.onabort=function(){b&&(r(new C("Request aborted",C.ECONNABORTED,e,b)),b=null)},b.onerror=function(){r(new C("Network Error",C.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let A=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const T=o.transitional||vn;o.timeoutErrorMessage&&(A=o.timeoutErrorMessage),r(new C(A,T.clarifyTimeoutError?C.ETIMEDOUT:C.ECONNABORTED,e,b)),b=null},a===void 0&&i.setContentType(null),"setRequestHeader"in b&&g.forEach(i.toJSON(),function(A,T){b.setRequestHeader(T,A)}),g.isUndefined(o.withCredentials)||(b.withCredentials=!!o.withCredentials),s&&s!=="json"&&(b.responseType=o.responseType),c&&([y,h]=Re(c,!0),b.addEventListener("progress",y)),p&&b.upload&&([u,m]=Re(p),b.upload.addEventListener("progress",u),b.upload.addEventListener("loadend",m)),(o.cancelToken||o.signal)&&(f=M=>{b&&(r(!M||M.type?new ce(null,e,b):M),b.abort(),b=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const L=yo(o.url);if(L&&W.protocols.indexOf(L)===-1){r(new C("Unsupported protocol "+L+":",C.ERR_BAD_REQUEST,e));return}b.send(a||null)})},Co=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const a=function(c){if(!o){o=!0,s();const f=c instanceof Error?c:this.reason;r.abort(f instanceof C?f:new ce(f instanceof Error?f.message:f))}};let i=t&&setTimeout(()=>{i=null,a(new C(`timeout ${t} of ms exceeded`,C.ETIMEDOUT))},t);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(a):c.removeEventListener("abort",a)}),e=null)};e.forEach(c=>c.addEventListener("abort",a));const{signal:p}=r;return p.unsubscribe=()=>g.asap(s),p}},vo=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},To=async function*(e,t){for await(const n of Mo(e))yield*vo(n,t)},Mo=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()}},Wt=(e,t,n,r)=>{const o=To(e,t);let a=0,i,s=p=>{i||(i=!0,r&&r(p))};return new ReadableStream({async pull(p){try{const{done:c,value:f}=await o.next();if(c){s(),p.close();return}let u=f.byteLength;if(n){let y=a+=u;n(y)}p.enqueue(new Uint8Array(f))}catch(c){throw s(c),c}},cancel(p){return s(p),o.return()}},{highWaterMark:2})},He=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",In=He&&typeof ReadableStream=="function",Bo=He&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Dn=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Ro=In&&Dn(()=>{let e=!1;const t=new Request(W.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Ht=64*1024,nt=In&&Dn(()=>g.isReadableStream(new Response("").body)),Fe={stream:nt&&(e=>e.body)};He&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Fe[t]&&(Fe[t]=g.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new C(`Response type '${t}' is not supported`,C.ERR_NOT_SUPPORT,r)})})})(new Response);const Fo=async e=>{if(e==null)return 0;if(g.isBlob(e))return e.size;if(g.isSpecCompliantForm(e))return(await new Request(W.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(g.isArrayBufferView(e)||g.isArrayBuffer(e))return e.byteLength;if(g.isURLSearchParams(e)&&(e=e+""),g.isString(e))return(await Bo(e)).byteLength},Io=async(e,t)=>{const n=g.toFiniteNumber(e.getContentLength());return n??Fo(t)},Do=He&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:a,timeout:i,onDownloadProgress:s,onUploadProgress:p,responseType:c,headers:f,withCredentials:u="same-origin",fetchOptions:y}=Fn(e);c=c?(c+"").toLowerCase():"text";let m=Co([o,a&&a.toAbortSignal()],i),h;const x=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let b;try{if(p&&Ro&&n!=="get"&&n!=="head"&&(b=await Io(f,r))!==0){let T=new Request(t,{method:"POST",body:r,duplex:"half"}),R;if(g.isFormData(r)&&(R=T.headers.get("content-type"))&&f.setContentType(R),T.body){const[P,w]=Nt(b,Re(Ut(p)));r=Wt(T.body,Ht,P,w)}}g.isString(u)||(u=u?"include":"omit");const S="credentials"in Request.prototype;h=new Request(t,{...y,signal:m,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",credentials:S?u:void 0});let L=await fetch(h,y);const M=nt&&(c==="stream"||c==="response");if(nt&&(s||M&&x)){const T={};["status","statusText","headers"].forEach(F=>{T[F]=L[F]});const R=g.toFiniteNumber(L.headers.get("content-length")),[P,w]=s&&Nt(R,Re(Ut(s),!0))||[];L=new Response(Wt(L.body,Ht,P,()=>{w&&w(),x&&x()}),T)}c=c||"text";let A=await Fe[g.findKey(Fe,c)||"text"](L,e);return!M&&x&&x(),await new Promise((T,R)=>{Bn(T,R,{data:A,headers:q.from(L.headers),status:L.status,statusText:L.statusText,config:e,request:h})})}catch(S){throw x&&x(),S&&S.name==="TypeError"&&/Load failed|fetch/i.test(S.message)?Object.assign(new C("Network Error",C.ERR_NETWORK,e,h),{cause:S.cause||S}):C.from(S,S&&S.code,e,h)}}),rt={http:Gr,xhr:Eo,fetch:Do};g.forEach(rt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const jt=e=>`- ${e}`,zo=e=>g.isFunction(e)||e===null||e===!1,zn={getAdapter:e=>{e=g.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let a=0;a<t;a++){n=e[a];let i;if(r=n,!zo(n)&&(r=rt[(i=String(n)).toLowerCase()],r===void 0))throw new C(`Unknown adapter '${i}'`);if(r)break;o[i||"#"+a]=r}if(!r){const a=Object.entries(o).map(([s,p])=>`adapter ${s} `+(p===!1?"is not supported by the environment":"is not available in the build"));let i=t?a.length>1?`since :
|
|
4
4
|
`+a.map(jt).join(`
|
|
5
|
-
`):" "+jt(a[0]):"as no adapter specified";throw new C("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:rt};function Ge(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ce(null,e)}function qt(e){return Ge(e),e.headers=q.from(e.headers),e.data=Ye.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),zn.getAdapter(e.adapter||_e.adapter)(e).then(function(r){return Ge(e),r.data=Ye.call(e,e.transformResponse,r),r.headers=q.from(r.headers),r},function(r){return
|
|
6
|
-
`+a):r.stack=a}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=te(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&ve.assertOptions(r,{silentJSONParsing:G.transitional(G.boolean),forcedJSONParsing:G.transitional(G.boolean),clarifyTimeoutError:G.transitional(G.boolean)},!1),o!=null&&(g.isFunction(o)?n.paramsSerializer={serialize:o}:ve.assertOptions(o,{encode:G.function,serialize:G.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ve.assertOptions(n,{baseUrl:G.spelling("baseURL"),withXsrfToken:G.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=a&&g.merge(a.common,a[n.method]);a&&g.forEach(["delete","get","head","post","put","patch","common"],h=>{delete a[h]}),n.headers=q.concat(i,a);const s=[];let p=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(n)===!1||(p=p&&x.synchronous,s.unshift(x.fulfilled,x.rejected))});const c=[];this.interceptors.response.forEach(function(x){c.push(x.fulfilled,x.rejected)});let f,u=0,y;if(!p){const h=[qt.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,c),y=h.length,f=Promise.resolve(n);u<y;)f=f.then(h[u++],h[u++]);return f}y=s.length;let m=n;for(u=0;u<y;){const h=s[u++],x=s[u++];try{m=h(m)}catch(b){x.call(this,b);break}}try{f=qt.call(this,m)}catch(h){return Promise.reject(h)}for(u=0,y=c.length;u<y;)f=f.then(c[u++],c[u++]);return f}getUri(t){t=te(this.defaults,t);const n=Rn(t.baseURL,t.url,t.allowAbsoluteUrls);return Cn(n,t.params,t.paramsSerializer)}};g.forEach(["delete","get","head","options"],function(t){ee.prototype[t]=function(n,r){return this.request(te(r||{},{method:t,url:n,data:(r||{}).data}))}});g.forEach(["post","put","patch"],function(t){function n(r){return function(a,i,s){return this.request(te(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:i}))}}ee.prototype[t]=n(),ee.prototype[t+"Form"]=n(!0)});let Po=class Pn{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const i=new Promise(s=>{r.subscribe(s),a=s}).then(o);return i.cancel=function(){r.unsubscribe(a)},i},t(function(a,i,s){r.reason||(r.reason=new ce(a,i,s),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 Pn(function(o){t=o}),cancel:t}}};function No(e){return function(n){return e.apply(null,n)}}function Uo(e){return g.isObject(e)&&e.isAxiosError===!0}const ot={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(ot).forEach(([e,t])=>{ot[t]=e});function Nn(e){const t=new ee(e),n=mn(ee.prototype.request,t);return g.extend(n,ee.prototype,t,{allOwnKeys:!0}),g.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Nn(te(e,o))},n}const z=Nn(_e);z.Axios=ee;z.CanceledError=ce;z.CancelToken=Po;z.isCancel=Tn;z.VERSION=On;z.toFormData=We;z.AxiosError=C;z.Cancel=z.CanceledError;z.all=function(t){return Promise.all(t)};z.spread=No;z.isAxiosError=Uo;z.mergeConfig=te;z.AxiosHeaders=q;z.formToJSON=e=>Mn(g.isHTMLForm(e)?new FormData(e):e);z.getAdapter=zn.getAdapter;z.HttpStatusCode=ot;z.default=z;const{Axios:la,AxiosError:ca,CanceledError:da,isCancel:ua,CancelToken:fa,VERSION:pa,all:ha,Cancel:ma,isAxiosError:ga,spread:ba,toFormData:ya,AxiosHeaders:xa,HttpStatusCode:_a,formToJSON:Sa,getAdapter:La,mergeConfig:wa}=z;function $o(e={}){const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");console.log("fundUnitParams",t);const{env:n}=t;let r;switch(n){case oe.DEV:case oe.DEVELOPMENT:r="/api";break;case oe.TEST:r="https://fund.bestfulfill.tech/api/sdk";break;case oe.PROD:case oe.PRODUCTION:default:r="https://fund.bestfulfill.com/api/sdk";break}const{baseURL:o=r,timeout:a=1e4,onError:i}=e,s=z.create({baseURL:o,timeout:a});return s.interceptors.request.use(p=>{const{token:c,locale:f}=t;return p.headers={...p.headers,Authorization:c,"x-locale":f===Oe.ZH?"zh-CN":"en-US"},p}),s.interceptors.response.use(p=>{if(p.data&&p.data.code===0)return p.data;const c=p.data?.msg||p.data?.message||"未知错误";return Ie.error(c),i&&i(c,p),Promise.reject(p.data||{message:"未知错误"})},p=>{const c=p.response?.data?.msg||p.response?.data?.message||p.message||"网络请求失败";return Ie.error(c),i&&i(c,p),Promise.reject(p)}),s}let Me=null;function X(){return Me||(Me=$o()),Me}function Wo(){Me=null}function Un(){const e=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");return X().get("/balance",{params:{merchant_id:e.merchantId,biz_type:e.bizType,fund_balance_id:e.fundBalanceId}}).then(t=>{const n=t.data,r={fundBalanceId:n.fund_balance_id,merchantId:n.merchant_id,bizType:n.biz_type,currency:n.currency,totalAmount:n.total_amount,frozenAmount:n.frozen_amount,creditLimit:n.credit_config?.credit_limit,creditUsed:n.credit_used,isCredit:!!n.credit_config,availableAmount:n.available_amount,currBalance:n.curr_balance,pendingAmount:n.pending_amount,status:n.status,createdAt:n.created_at};return sessionStorage.setItem("balanceData",JSON.stringify(r)),r})}const Ho=async()=>X().get("/all-dicts",{}).then(e=>(sessionStorage.setItem("all_dicts",JSON.stringify(e.data)),e.data||{})),jo=async(e,t)=>X().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||""),$n=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_date:e.transferDate,transfer_channel:e.transferChannel,payer_name:e.payerName,submit_amount:e.submitAmount,submit_currency:e.submitCurrency,voucher_urls:e.voucherUrls};return X().post("/offline/recharge/create",n,{})},Wn=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,amount:e.amount,currency:e.currency,recharge_channel:e.rechargeChannel,return_url:window.location.href};return X().post("/online/recharge/create",n,{}).then(r=>r.data.redirect_url)},Hn=async e=>X().get("/calc-payment-amount",{params:e}).then(t=>{const n=t.data;return{paymentAmount:n.payment_amount,fee:n.fee,currency:n.currency}}),jn=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");return X().get("/channel/info",{params:{code:e.code,biz_type:t.bizType}}).then(n=>n.data?.detail||[])},qo=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");return X().get("/offline/channel/map",{params:{currency:e.currency,biz_type:t.bizType}}).then(n=>({onlineChannel:n.data?.online_channels.map(r=>({value:r.value,label:r.label,icon:r.icon}))||[],offlineChannel:n.data?.offline_channels.map(r=>({value:r.value,label:r.label,icon:r.icon}))||[]}))},Jo=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");return X().post("/business_exchange_rate/calculate",{fund_balance_id:t.fundBalanceId,merchant_id:t.merchantId,biz_type:t.bizType,amount:e.amount,payment_currency:e.currency}).then(n=>({amount:n.data.amount,exchangeRate:n.data.exchange_rate,currency:n.data.currency,consistent:n.data.consistent}))};async function Vo(){return await Un()}function Yo(e){const{merchant_id:t,biz_type:n,fund_balance_id:r,user_id:o,theme:a=N.WHITE,locale:i=Oe.ZH,env:s,size:p,themeConfig:c}=e;console.log(e,"InitParams1111");const f="Bearer "+e.token;return sessionStorage.setItem("fund_unit_params",JSON.stringify({merchantId:t,bizType:n,fundBalanceId:r,userId:o,token:f,theme:a,locale:i,env:s,size:p,themeConfig:c})),Wo(),Ho(),{token:f,merchantId:t,bizType:n,fundBalanceId:r,userId:o,theme:a,locale:i,env:s,size:p}}function E(e){const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");if(!e)return t;if(Array.isArray(e)){const n={};return e.forEach(r=>{n[r]=t[r]}),n}return t[e]}function qn(){const e=new CustomEvent("refresh-balance",{detail:{},bubbles:!0,composed:!0});window.dispatchEvent(e)}const Vt={white:{background:"#fff",border:"#d9d9d9",color:"#222",boxShadow:"0 6px 16px rgba(0, 0, 0, 0.12)",closeColor:"#999"},dark:{background:"#23262F",border:"#444C5C",color:"#F5F6FA",boxShadow:"0 6px 16px rgba(0,0,0,0.32)",closeColor:"#B5B8BE"}};function Go(){return E("theme")===N.WHITE?Vt.white:Vt.dark}class Ko{parseArg(t){return typeof t=="string"?{content:t}:t}show(t,n){const{content:r,duration:o,closable:a}=this.parseArg(n),i=Go(),s=document.createElement("div");if(s.style.cssText=`
|
|
5
|
+
`):" "+jt(a[0]):"as no adapter specified";throw new C("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:rt};function Ge(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ce(null,e)}function qt(e){return Ge(e),e.headers=q.from(e.headers),e.data=Ye.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),zn.getAdapter(e.adapter||_e.adapter)(e).then(function(r){return Ge(e),r.data=Ye.call(e,e.transformResponse,r),r.headers=q.from(r.headers),r},function(r){return Mn(r)||(Ge(e),r&&r.response&&(r.response.data=Ye.call(e,e.transformResponse,r.response),r.response.headers=q.from(r.response.headers))),Promise.reject(r)})}const On="1.10.0",je={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{je[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Jt={};je.transitional=function(t,n,r){function o(a,i){return"[Axios v"+On+"] Transitional option '"+a+"'"+i+(r?". "+r:"")}return(a,i,s)=>{if(t===!1)throw new C(o(i," has been removed"+(n?" in "+n:"")),C.ERR_DEPRECATED);return n&&!Jt[i]&&(Jt[i]=!0,console.warn(o(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,i,s):!0}};je.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Oo(e,t,n){if(typeof e!="object")throw new C("options must be an object",C.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],i=t[a];if(i){const s=e[a],p=s===void 0||i(s,a,e);if(p!==!0)throw new C("option "+a+" must be "+p,C.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new C("Unknown option "+a,C.ERR_BAD_OPTION)}}const ve={assertOptions:Oo,validators:je},G=ve.validators;let ee=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 a=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
6
|
+
`+a):r.stack=a}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=te(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&ve.assertOptions(r,{silentJSONParsing:G.transitional(G.boolean),forcedJSONParsing:G.transitional(G.boolean),clarifyTimeoutError:G.transitional(G.boolean)},!1),o!=null&&(g.isFunction(o)?n.paramsSerializer={serialize:o}:ve.assertOptions(o,{encode:G.function,serialize:G.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ve.assertOptions(n,{baseUrl:G.spelling("baseURL"),withXsrfToken:G.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=a&&g.merge(a.common,a[n.method]);a&&g.forEach(["delete","get","head","post","put","patch","common"],h=>{delete a[h]}),n.headers=q.concat(i,a);const s=[];let p=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(n)===!1||(p=p&&x.synchronous,s.unshift(x.fulfilled,x.rejected))});const c=[];this.interceptors.response.forEach(function(x){c.push(x.fulfilled,x.rejected)});let f,u=0,y;if(!p){const h=[qt.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,c),y=h.length,f=Promise.resolve(n);u<y;)f=f.then(h[u++],h[u++]);return f}y=s.length;let m=n;for(u=0;u<y;){const h=s[u++],x=s[u++];try{m=h(m)}catch(b){x.call(this,b);break}}try{f=qt.call(this,m)}catch(h){return Promise.reject(h)}for(u=0,y=c.length;u<y;)f=f.then(c[u++],c[u++]);return f}getUri(t){t=te(this.defaults,t);const n=Rn(t.baseURL,t.url,t.allowAbsoluteUrls);return Cn(n,t.params,t.paramsSerializer)}};g.forEach(["delete","get","head","options"],function(t){ee.prototype[t]=function(n,r){return this.request(te(r||{},{method:t,url:n,data:(r||{}).data}))}});g.forEach(["post","put","patch"],function(t){function n(r){return function(a,i,s){return this.request(te(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:i}))}}ee.prototype[t]=n(),ee.prototype[t+"Form"]=n(!0)});let Po=class Pn{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const i=new Promise(s=>{r.subscribe(s),a=s}).then(o);return i.cancel=function(){r.unsubscribe(a)},i},t(function(a,i,s){r.reason||(r.reason=new ce(a,i,s),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 Pn(function(o){t=o}),cancel:t}}};function No(e){return function(n){return e.apply(null,n)}}function Uo(e){return g.isObject(e)&&e.isAxiosError===!0}const ot={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(ot).forEach(([e,t])=>{ot[t]=e});function Nn(e){const t=new ee(e),n=mn(ee.prototype.request,t);return g.extend(n,ee.prototype,t,{allOwnKeys:!0}),g.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Nn(te(e,o))},n}const z=Nn(_e);z.Axios=ee;z.CanceledError=ce;z.CancelToken=Po;z.isCancel=Mn;z.VERSION=On;z.toFormData=We;z.AxiosError=C;z.Cancel=z.CanceledError;z.all=function(t){return Promise.all(t)};z.spread=No;z.isAxiosError=Uo;z.mergeConfig=te;z.AxiosHeaders=q;z.formToJSON=e=>Tn(g.isHTMLForm(e)?new FormData(e):e);z.getAdapter=zn.getAdapter;z.HttpStatusCode=ot;z.default=z;const{Axios:ca,AxiosError:da,CanceledError:ua,isCancel:fa,CancelToken:pa,VERSION:ha,all:ma,Cancel:ga,isAxiosError:ba,spread:ya,toFormData:xa,AxiosHeaders:_a,HttpStatusCode:Sa,formToJSON:La,getAdapter:wa,mergeConfig:Aa}=z;function $o(e={}){const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");console.log("fundUnitParams",t);const{env:n}=t;let r;switch(n){case oe.DEV:case oe.DEVELOPMENT:r="/api";break;case oe.TEST:r="https://fund.bestfulfill.tech/api/sdk";break;case oe.PROD:case oe.PRODUCTION:default:r="https://fund.bestfulfill.com/api/sdk";break}const{baseURL:o=r,timeout:a=1e4,onError:i}=e,s=z.create({baseURL:o,timeout:a});return s.interceptors.request.use(p=>{const{token:c,locale:f}=t;return p.headers={...p.headers,Authorization:c,"x-locale":f===Oe.ZH?"zh-CN":"en-US"},p}),s.interceptors.response.use(p=>{if(p.data&&p.data.code===0)return p.data;const c=p.data?.msg||p.data?.message||"未知错误";return Ie.error(c),i&&i(c,p),Promise.reject(p.data||{message:"未知错误"})},p=>{const c=p.response?.data?.msg||p.response?.data?.message||p.message||"网络请求失败";return Ie.error(c),i&&i(c,p),Promise.reject(p)}),s}let Te=null;function X(){return Te||(Te=$o()),Te}function Wo(){Te=null}function Un(){const e=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");return X().get("/balance",{params:{merchant_id:e.merchantId,biz_type:e.bizType,fund_balance_id:e.fundBalanceId}}).then(t=>{const n=t.data,r={fundBalanceId:n.fund_balance_id,merchantId:n.merchant_id,bizType:n.biz_type,currency:n.currency,totalAmount:n.total_amount,frozenAmount:n.frozen_amount,creditLimit:n.credit_config?.credit_limit,creditUsed:n.credit_used,isCredit:!!n.credit_config,availableAmount:n.available_amount,currBalance:n.curr_balance,pendingAmount:n.pending_amount,status:n.status,createdAt:n.created_at};return sessionStorage.setItem("balanceData",JSON.stringify(r)),r})}const Ho=async()=>X().get("/all-dicts",{}).then(e=>(sessionStorage.setItem("all_dicts",JSON.stringify(e.data)),e.data||{})),jo=async(e,t)=>X().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||""),$n=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_date:e.transferDate,transfer_channel:e.transferChannel,payer_name:e.payerName,submit_amount:e.submitAmount,submit_currency:e.submitCurrency,voucher_urls:e.voucherUrls};return X().post("/offline/recharge/create",n,{})},Wn=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,amount:e.amount,currency:e.currency,recharge_channel:e.rechargeChannel,return_url:window.location.href};return X().post("/online/recharge/create",n,{}).then(r=>r.data.redirect_url)},Hn=async e=>X().get("/calc-payment-amount",{params:e}).then(t=>{const n=t.data;return{paymentAmount:n.payment_amount,fee:n.fee,currency:n.currency}}),jn=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");return X().get("/channel/info",{params:{code:e.code,biz_type:t.bizType}}).then(n=>n.data?.detail||[])},qo=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");return X().get("/offline/channel/map",{params:{currency:e.currency,biz_type:t.bizType}}).then(n=>({onlineChannel:n.data?.online_channels.map(r=>({value:r.value,label:r.label,icon:r.icon}))||[],offlineChannel:n.data?.offline_channels.map(r=>({value:r.value,label:r.label,icon:r.icon}))||[]}))},Jo=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");return X().post("/business_exchange_rate/calculate",{fund_balance_id:t.fundBalanceId,merchant_id:t.merchantId,biz_type:t.bizType,amount:e.amount,payment_currency:e.currency}).then(n=>({amount:n.data.amount,exchangeRate:n.data.exchange_rate,currency:n.data.currency,consistent:n.data.consistent}))};async function Vo(){return await Un()}function Yo(e){const{merchant_id:t,biz_type:n,fund_balance_id:r,user_id:o,theme:a=N.WHITE,locale:i=Oe.ZH,env:s,size:p,themeConfig:c}=e;console.log(e,"InitParams1111");const f="Bearer "+e.token;return sessionStorage.setItem("fund_unit_params",JSON.stringify({merchantId:t,bizType:n,fundBalanceId:r,userId:o,token:f,theme:a,locale:i,env:s,size:p,themeConfig:c})),Wo(),Ho(),{token:f,merchantId:t,bizType:n,fundBalanceId:r,userId:o,theme:a,locale:i,env:s,size:p}}function E(e){const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");if(!e)return t;if(Array.isArray(e)){const n={};return e.forEach(r=>{n[r]=t[r]}),n}return t[e]}function qn(){const e=new CustomEvent("refresh-balance",{detail:{},bubbles:!0,composed:!0});window.dispatchEvent(e)}const Vt={white:{background:"#fff",border:"#d9d9d9",color:"#222",boxShadow:"0 6px 16px rgba(0, 0, 0, 0.12)",closeColor:"#999"},dark:{background:"#23262F",border:"#444C5C",color:"#F5F6FA",boxShadow:"0 6px 16px rgba(0,0,0,0.32)",closeColor:"#B5B8BE"}};function Go(){return E("theme")===N.WHITE?Vt.white:Vt.dark}class Ko{parseArg(t){return typeof t=="string"?{content:t}:t}show(t,n){const{content:r,duration:o,closable:a}=this.parseArg(n),i=Go(),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: ${i.closeColor};
|
|
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 Ie=new Ko;function Xo(){console.log("npm package test!!!")}function Zo(){console.log("Current time:",new Date().toISOString())}const Qo={"/api":{target:"https://fund.bestfulfill.tech/api/sdk",changeOrigin:!0,rewrite:e=>e.replace(/^\/api/,""),secure:!1}};function ei(){const e=E("size");return{white:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 10px":"8px 16px",cursor:"pointer",fontSize:e===l.SMALL?12:16,fontWeight:600},dark:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 10px":"8px 16px",cursor:"pointer",fontSize:e===l.SMALL?12:16,fontWeight:600}}}function ti(e){const t=E("theme"),n=E("themeConfig"),r=t===N.WHITE,o=ei();let a=e;return!a&&n&&(a=(r?n.white:n.dark)?.color),r?{...o.white,background:a||o.white.background}:{...o.dark,background:a||o.dark.background}}function ht({onClick:e,color:t,children:n}){const r=ti(t);return d("button",{style:r,onClick:e,type:"button",children:n})}const ni={"额外费用说明:您的地区、币种、支付卡类型等因素可能会导致手续费的变动,最终手续费以官方为准。":"额外费用说明:您的地区、币种、支付卡类型等因素可能会导致手续费的变动,最终手续费以官方为准。","手续费约为:":"手续费约为:","预计支付金额约为:":"预计支付金额约为:","注:地区/币种/卡类型可能影响手续费,最终以平台为准。":"注:地区/币种/卡类型可能影响手续费,最终以平台为准。",确定:"确定",提交成功:"提交成功",余额详情:"余额详情",真实金额:"真实金额",冻结金额:"冻结金额",信用额度:"信用额度",已用额度:"已用额度",可用余额:"可用余额",暂无数据:"暂无数据","金额需在1到999999.99之间":"金额需在1到999999.99之间","充值 / 转账":"充值 / 转账",在线充值:"在线充值",线下转账:"线下转账",充值币种:"充值币种",充值金额:"充值金额",支付平台:"支付平台",请选择充值币种:"请选择充值币种",请输入充值金额:"请输入充值金额",请选择支付平台:"请选择支付平台","需要收取手续费,实际支付金额约为:":"需要收取手续费,实际支付金额约为:","提交失败,请重试":"提交失败,请重试","提交中...":"提交中...",去支付:"去支付","您的支付币种与默认币种不一致,将转换为默认币种入账:":"您的支付币种与默认币种不一致,将转换为默认币种入账","目前汇率为:":"目前汇率为:",钱包预计增加:"钱包预计增加",请输入付款人名称:"请输入付款人名称",取消:"取消",关闭:"关闭",在线支付:"在线支付",选择支付方式:"选择支付方式",支付方式:"支付方式",付款人名称:"付款人名称",支付币种:"支付币种",支付金额:"支付金额",线上支付:"线上支付",立即支付:"立即支付","请在转账后提交银行回单,否则可能无法及时核验":"请在转账后提交银行回单,否则可能无法及时核验","支付金额须与申请金额一致,请勿多付、少付或分批提交。":"支付金额须与申请金额一致,请勿多付、少付或分批提交。","请妥善保存回单并提供准确的支付时间,否则可能无法核验。":"请妥善保存回单并提供准确的支付时间,否则可能无法核验。","工作时间提交4小时内审核,非工作时间将顺延至下一个工作日。":"工作时间提交4小时内审核,非工作时间将顺延至下一个工作日。","如有问题,请联系平台客服。":"如有问题,请联系平台客服。","预付充值将收取平台服务费,具体以官方为准。":"预付充值将收取平台服务费,具体以官方为准。",银行转账:"银行转账",银行名称:"银行名称",账户持有人:"账户持有人",账户号码:"账户号码","SWIFT/BIC代码":"SWIFT/BIC代码",银行代码:"银行代码",银行地址:"银行地址",复制:"复制",复制成功:"复制成功",确认转账详情:"确认转账详情",转账后提交银行回单提示:"请在转账后提交银行回单,否则可能无法及时核验",温馨提示:"温馨提示",支付金额匹配提醒:"支付金额须与申请金额一致,请勿多付、少付或分批提交。银行回单显示的实际金额为准。请勿重复提交同一笔转账申请。",保存交易回单提醒:"请打印或拍照保存交易回单并提供准确的支付时间,否则无法核验转账。",查看余额提醒:"建议提交成功后4小时查看可用余额。工作时间提交的转账当日处理,非工作时间提交的转账将在下一个工作日处理。",联系客服提醒:"如有问题,请联系客服。",P卡转账延迟提醒:"P卡转账可能会有最多10分钟的延迟,请耐心等待。",平台服务费说明:"预付充值将收取1%的平台服务费,详情请参考",费用政策:"费用政策",详情:"。",返回账户信息:"返回账户信息",请上传银行转账回单:"请上传银行转账回单",点击或拖拽文件到此区域上传:"点击或拖拽文件到此区域上传",转账时间:"转账时间",转账金额:"转账金额",请输入实际转账金额:"请输入实际转账金额",提交审核:"提交审核",请选择转账时间:"请选择转账时间",请输入转账金额:"请输入转账金额",请选择日期:"请选择日期",一月:"一月",二月:"二月",三月:"三月",四月:"四月",五月:"五月",六月:"六月",七月:"七月",八月:"八月",九月:"九月",十月:"十月",十一月:"十一月",十二月:"十二月",日:"日",一:"一",二:"二",三:"三",四:"四",五:"五",六:"六",第三方支付平台:"第三方支付平台",交易ID:"交易ID",请输入转账交易ID:"请输入转账交易ID",上传文件:"上传文件",请上传转账凭证:"请上传转账凭证","加载中...":"加载中...",错误:"错误",成功:"成功",必填:"必填","充值/转账":"充值/转账",切换为暗黑主题:"切换为暗黑主题",切换为白色主题:"切换为白色主题",点击或拖拽文件到此处上传:"点击或拖拽文件到此处上传","支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传":"支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传",个文件:"个文件","正在上传...":"正在上传...",已上传:"已上传",移除:"移除"};function ri(e){return ni[e]||e}const oi={"额外费用说明:您的地区、币种、支付卡类型等因素可能会导致手续费的变动,最终手续费以官方为准。":"Additional note: Your region, currency, and card type may affect the processing fee; the final fee is determined by the provider.","手续费约为:":"Fee approximately: ","预计支付金额约为:":"Estimated payment amount is approximately: ","注:地区/币种/卡类型可能影响手续费,最终以平台为准。":"Note: Region/currency/card type may affect handling fees, subject to the platform.",确定:"Confirm",提交成功:"Submit Success",余额详情:"Balance Details",真实金额:"Real Balance",冻结金额:"Frozen Amount",信用额度:"Credit Limit",已用额度:"Credit Used",可用余额:"Available Balance",暂无数据:"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","您的支付币种与默认币种不一致,将转换为默认币种入账:":"Your payment currency is different from the default currency and will be converted to the default currency for deposit","目前汇率为:":"Current exchange rate:",钱包预计增加:"Wallet is expected to increase",请输入付款人名称:"Please enter the payer name",取消:"Cancel",关闭:"Close",在线支付:"Online Payment",选择支付方式:"Select Payment Method",支付方式:"Payment Method",付款人名称:"Payer Name",支付币种:"Payment Currency",支付金额:"Payment Amount",线上支付:"Online Payment",立即支付:"Pay Now","请在转账后提交银行回单,否则可能无法及时核验":"Please submit the bank receipt after the transfer, otherwise verification may be delayed","支付金额须与申请金额一致,请勿多付、少付或分批提交。":"The payment amount must match the requested amount exactly. Do not overpay, underpay, or split.","请妥善保存回单并提供准确的支付时间,否则可能无法核验。":"Please keep the receipt and provide the exact payment time; otherwise, verification may fail.","工作时间提交4小时内审核,非工作时间将顺延至下一个工作日。":"Submissions during business hours are reviewed within 4 hours; off-hours will be processed next business day.","如有问题,请联系平台客服。":"If you have any questions, please contact customer service.","预付充值将收取平台服务费,具体以官方为准。":"Prepaid top-ups are subject to a platform service fee; please refer to the official policy.",第三方支付平台:"Third-party Payment Platform",交易ID:"Transaction ID",请输入转账交易ID:"Please enter transfer transaction ID",上传文件:"Upload Files",请上传转账凭证:"Please upload transfer voucher","加载中...":"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",银行转账:"Transfer to Account",银行名称:"Bank Name",账户持有人:"Account Holder Name",账户号码:"Account Number","SWIFT/BIC代码":"SWIFT/BIC Code",银行代码:"Bank Code",银行地址:"Bank Address",复制:"Copy",复制成功:"Copied successfully",确认转账详情:"Confirm Transfer Details",转账后提交银行回单提示:"Please make sure to submit the bank transaction slip after the transfer, otherwise the payment may not be verified in time",温馨提示:"Friendly Reminder",支付金额匹配提醒:"The payment amount must match the transaction amount exactly. Overpayment, underpayment, or installment payments will not be approved. The actual amount shown on the bank receipt shall prevail. Do not submit duplicate applications for the same transfer.",保存交易回单提醒:"Please print or take a photo of the transaction receipt and provide the exact payment time; otherwise, the transfer cannot be verified.",查看余额提醒:"It is recommended to check your available balance 4 hours after successful submission. Transfers submitted during business hours will be processed the same day; those submitted outside business hours will be processed on the next working day.",联系客服提醒:"If you have any questions, please contact customer service.",P卡转账延迟提醒:"P-card transfers may experience a delay of up to 10 minutes. Please wait patiently.",平台服务费说明:"Prepaid top-ups are subject to a 1% platform service fee. Please refer to the",费用政策:"Fee Policy",详情:"for details.",返回账户信息:"Return to Account Information",请上传银行转账回单:"Please upload the bank transfer receipt",点击或拖拽文件到此区域上传:"Click or drag file to this area to upload",转账时间:"Transfer Time",转账金额:"Transfer Amount",请输入实际转账金额:"Please enter the actual transfer amount",提交审核:"Submit for Review",请选择转账时间:"Please select transfer time",请输入转账金额:"Please enter transfer amount",请选择日期:"Please select date",一月:"January",二月:"February",三月:"March",四月:"April",五月:"May",六月:"June",七月:"July",八月:"August",九月:"September",十月:"October",十一月:"November",十二月:"December",日:"Sun",一:"Mon",二:"Tue",三:"Wed",四:"Thu",五:"Fri",六:"Sat"};function ii(e){return oi[e]||e}function ai(){return JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").locale||Oe.ZH}function _(e){return ai()==="zh"?ri(e):ii(e)}const Yt={white:{trigger:{background:"#fff",color:"#222",border:"1px solid #d9d9d9"},triggerDisabled:{background:"#f5f5f5",color:"#bfbfbf",border:"1px solid #f0f0f0"},triggerError:{background:"#fff",color:"#222",border:"1px solid #ff4d4f"},dropdown:{background:"#fff",border:"1px solid #d9d9d9",color:"#222"},option:(e,t,n)=>({color:t?"#bfbfbf":e?"#1890ff":"#222",background:e?"#e6f7ff":n&&!t||t?"#f5f5f5":"#fff"}),placeholder:{color:"#bfbfbf"},scrollbarThumb:"#e5e5e5",scrollbarTrack:"#f5f5f5",boxShadow:"0 2px 8px rgba(0,0,0,0.08)"},dark:{trigger:{background:"#23262F",color:"#fff",border:"1px solid #374151"},triggerDisabled:{background:"#23262F",color:"#666",border:"1px solid #374151"},triggerError:{background:"#23262F",color:"#fff",border:"1px solid #ff4d4f"},dropdown:{background:"#23262F",border:"1px solid #374151",color:"#fff"},option:(e,t,n)=>({color:t?"#666":e?"#00E8C6":"#fff",background:e?"#23262F":n&&!t?"#333843":"#23262F"}),placeholder:{color:"#666"},scrollbarThumb:"#444C5C",scrollbarTrack:"#23262F",boxShadow:"0 2px 8px rgba(0,0,0,0.32)"}};function si(){const e=E("theme"),t=E("themeConfig"),n=e===N.WHITE,r=n?Yt.white:Yt.dark;if(t){const o=n?t.white:t.dark;if(o?.color)return{...r,option:(a,i,s)=>({...r.option(a,i,s),color:i?r.option(a,i,s).color:a?o.color:r.option(a,i,s).color})}}return r}const it=({value:e,onChange:t,options:n,placeholder:r,style:o,error:a,disabled:i,dropdownStyle:s,className:p,dropdownClassName:c,children:f})=>{const[u,y]=B(!1),m=se(null),[h,x]=B(null),b=si(),S=E("size");J(()=>{if(!u)return;const A=M=>{m.current&&!m.current.contains(M.target)&&y(!1)};return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[u]);const L=n.find(A=>A.value===e),T=()=>a?b.triggerError:i?b.triggerDisabled:b.trigger;return d("div",{ref:m,className:p,style:{position:"relative",...o},children:[d("style",{children:`
|
|
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 Ie=new Ko;function Xo(){console.log("npm package test!!!")}function Zo(){console.log("Current time:",new Date().toISOString())}const Qo={"/api":{target:"https://fund.bestfulfill.tech/api/sdk",changeOrigin:!0,rewrite:e=>e.replace(/^\/api/,""),secure:!1}};function ei(){const e=E("size");return{white:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 10px":"8px 16px",cursor:"pointer",fontSize:e===l.SMALL?12:16,fontWeight:600},dark:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 10px":"8px 16px",cursor:"pointer",fontSize:e===l.SMALL?12:16,fontWeight:600}}}function ti(e){const t=E("theme"),n=E("themeConfig"),r=t===N.WHITE,o=ei();let a=e;return!a&&n&&(a=(r?n.white:n.dark)?.color),r?{...o.white,background:a||o.white.background}:{...o.dark,background:a||o.dark.background}}function ht({onClick:e,color:t,children:n}){const r=ti(t);return d("button",{style:r,onClick:e,type:"button",children:n})}const ni={"额外费用说明:您的地区、币种、支付卡类型等因素可能会导致手续费的变动,最终手续费以官方为准。":"额外费用说明:您的地区、币种、支付卡类型等因素可能会导致手续费的变动,最终手续费以官方为准。","手续费约为:":"手续费约为:","预计支付金额约为:":"预计支付金额约为:","注:地区/币种/卡类型可能影响手续费,最终以平台为准。":"注:地区/币种/卡类型可能影响手续费,最终以平台为准。",确定:"确定",提交成功:"提交成功",余额详情:"余额详情",真实金额:"真实金额",冻结金额:"冻结金额",信用额度:"信用额度",已用额度:"已用额度",可用余额:"可用余额",暂无数据:"暂无数据","金额需在1到999999.99之间":"金额需在1到999999.99之间","充值 / 转账":"充值 / 转账",在线充值:"在线充值",线下转账:"线下转账",充值币种:"充值币种",充值金额:"充值金额",支付平台:"支付平台",请选择充值币种:"请选择充值币种",请输入充值金额:"请输入充值金额",请选择支付平台:"请选择支付平台","需要收取手续费,实际支付金额约为:":"需要收取手续费,实际支付金额约为:","提交失败,请重试":"提交失败,请重试","提交中...":"提交中...",去支付:"去支付","您的支付币种与默认币种不一致,将转换为默认币种入账:":"您的支付币种与默认币种不一致,将转换为默认币种入账","目前汇率为:":"目前汇率为:",钱包预计增加:"钱包预计增加",请输入付款人名称:"请输入付款人名称",取消:"取消",关闭:"关闭",在线支付:"在线支付",选择支付方式:"选择支付方式",支付方式:"支付方式",付款人名称:"付款人名称",支付币种:"支付币种",支付金额:"支付金额",线上支付:"线上支付",立即支付:"立即支付","请在转账后提交银行回单,否则可能无法及时核验":"请在转账后提交银行回单,否则可能无法及时核验","支付金额须与申请金额一致,请勿多付、少付或分批提交。":"支付金额须与申请金额一致,请勿多付、少付或分批提交。","请妥善保存回单并提供准确的支付时间,否则可能无法核验。":"请妥善保存回单并提供准确的支付时间,否则可能无法核验。","工作时间提交4小时内审核,非工作时间将顺延至下一个工作日。":"工作时间提交4小时内审核,非工作时间将顺延至下一个工作日。","如有问题,请联系平台客服。":"如有问题,请联系平台客服。","预付充值将收取平台服务费,具体以官方为准。":"预付充值将收取平台服务费,具体以官方为准。",银行转账:"银行转账",银行名称:"银行名称",账户持有人:"账户持有人",账户号码:"账户号码","SWIFT/BIC代码":"SWIFT/BIC代码",银行代码:"银行代码",银行地址:"银行地址",复制:"复制",复制成功:"复制成功",确认转账详情:"确认转账详情",转账后提交银行回单提示:"请在转账后提交银行回单,否则可能无法及时核验",温馨提示:"温馨提示",支付金额匹配提醒:"支付金额须与申请金额一致,请勿多付、少付或分批提交。银行回单显示的实际金额为准。请勿重复提交同一笔转账申请。",保存交易回单提醒:"请打印或拍照保存交易回单并提供准确的支付时间,否则无法核验转账。",查看余额提醒:"建议提交成功后4小时查看可用余额。工作时间提交的转账当日处理,非工作时间提交的转账将在下一个工作日处理。",联系客服提醒:"如有问题,请联系客服。",P卡转账延迟提醒:"P卡转账可能会有最多10分钟的延迟,请耐心等待。",平台服务费说明:"预付充值将收取1%的平台服务费,详情请参考",费用政策:"费用政策",详情:"。",返回账户信息:"返回账户信息",请上传银行转账回单:"请上传银行转账回单",点击或拖拽文件到此区域上传:"点击或拖拽文件到此区域上传",转账时间:"转账时间",转账金额:"转账金额",请输入实际转账金额:"请输入实际转账金额",提交审核:"提交审核",请选择转账时间:"请选择转账时间",请输入转账金额:"请输入转账金额",请选择日期:"请选择日期",一月:"一月",二月:"二月",三月:"三月",四月:"四月",五月:"五月",六月:"六月",七月:"七月",八月:"八月",九月:"九月",十月:"十月",十一月:"十一月",十二月:"十二月",日:"日",一:"一",二:"二",三:"三",四:"四",五:"五",六:"六",第三方支付平台:"第三方支付平台",交易ID:"交易ID",请输入转账交易ID:"请输入转账交易ID",上传文件:"上传文件",请上传转账凭证:"请上传转账凭证","加载中...":"加载中...",错误:"错误",成功:"成功",必填:"必填","充值/转账":"充值/转账",切换为暗黑主题:"切换为暗黑主题",切换为白色主题:"切换为白色主题",点击或拖拽文件到此处上传:"点击或拖拽文件到此处上传","支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传":"支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传",个文件:"个文件","正在上传...":"正在上传...",已上传:"已上传",移除:"移除"};function ri(e){return ni[e]||e}const oi={"额外费用说明:您的地区、币种、支付卡类型等因素可能会导致手续费的变动,最终手续费以官方为准。":"Additional note: Your region, currency, and card type may affect the processing fee; the final fee is determined by the provider.","手续费约为:":"Fee approximately: ","预计支付金额约为:":"Estimated payment amount is approximately: ","注:地区/币种/卡类型可能影响手续费,最终以平台为准。":"Note: Region/currency/card type may affect handling fees, subject to the platform.",确定:"Confirm",提交成功:"Submit Success",余额详情:"Balance Details",真实金额:"Real Balance",冻结金额:"Frozen Amount",信用额度:"Credit Limit",已用额度:"Credit Used",可用余额:"Available Balance",暂无数据:"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","您的支付币种与默认币种不一致,将转换为默认币种入账:":"Your payment currency is different from the default currency and will be converted to the default currency for deposit","目前汇率为:":"Current exchange rate:",钱包预计增加:"Wallet is expected to increase",请输入付款人名称:"Please enter the payer name",取消:"Cancel",关闭:"Close",在线支付:"Online Payment",选择支付方式:"Select Payment Method",支付方式:"Payment Method",付款人名称:"Payer Name",支付币种:"Payment Currency",支付金额:"Payment Amount",线上支付:"Online Payment",立即支付:"Pay Now","请在转账后提交银行回单,否则可能无法及时核验":"Please submit the bank receipt after the transfer, otherwise verification may be delayed","支付金额须与申请金额一致,请勿多付、少付或分批提交。":"The payment amount must match the requested amount exactly. Do not overpay, underpay, or split.","请妥善保存回单并提供准确的支付时间,否则可能无法核验。":"Please keep the receipt and provide the exact payment time; otherwise, verification may fail.","工作时间提交4小时内审核,非工作时间将顺延至下一个工作日。":"Submissions during business hours are reviewed within 4 hours; off-hours will be processed next business day.","如有问题,请联系平台客服。":"If you have any questions, please contact customer service.","预付充值将收取平台服务费,具体以官方为准。":"Prepaid top-ups are subject to a platform service fee; please refer to the official policy.",第三方支付平台:"Third-party Payment Platform",交易ID:"Transaction ID",请输入转账交易ID:"Please enter transfer transaction ID",上传文件:"Upload Files",请上传转账凭证:"Please upload transfer voucher","加载中...":"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",银行转账:"Transfer to Account",银行名称:"Bank Name",账户持有人:"Account Holder Name",账户号码:"Account Number","SWIFT/BIC代码":"SWIFT/BIC Code",银行代码:"Bank Code",银行地址:"Bank Address",复制:"Copy",复制成功:"Copied successfully",确认转账详情:"Confirm Transfer Details",转账后提交银行回单提示:"Please make sure to submit the bank transaction slip after the transfer, otherwise the payment may not be verified in time",温馨提示:"Friendly Reminder",支付金额匹配提醒:"The payment amount must match the transaction amount exactly. Overpayment, underpayment, or installment payments will not be approved. The actual amount shown on the bank receipt shall prevail. Do not submit duplicate applications for the same transfer.",保存交易回单提醒:"Please print or take a photo of the transaction receipt and provide the exact payment time; otherwise, the transfer cannot be verified.",查看余额提醒:"It is recommended to check your available balance 4 hours after successful submission. Transfers submitted during business hours will be processed the same day; those submitted outside business hours will be processed on the next working day.",联系客服提醒:"If you have any questions, please contact customer service.",P卡转账延迟提醒:"P-card transfers may experience a delay of up to 10 minutes. Please wait patiently.",平台服务费说明:"Prepaid top-ups are subject to a 1% platform service fee. Please refer to the",费用政策:"Fee Policy",详情:"for details.",返回账户信息:"Return to Account Information",请上传银行转账回单:"Please upload the bank transfer receipt",点击或拖拽文件到此区域上传:"Click or drag file to this area to upload",转账时间:"Transfer Time",转账金额:"Transfer Amount",请输入实际转账金额:"Please enter the actual transfer amount",提交审核:"Submit for Review",请选择转账时间:"Please select transfer time",请输入转账金额:"Please enter transfer amount",请选择日期:"Please select date",一月:"January",二月:"February",三月:"March",四月:"April",五月:"May",六月:"June",七月:"July",八月:"August",九月:"September",十月:"October",十一月:"November",十二月:"December",日:"Sun",一:"Mon",二:"Tue",三:"Wed",四:"Thu",五:"Fri",六:"Sat"};function ii(e){return oi[e]||e}function ai(){return JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").locale||Oe.ZH}function _(e){return ai()==="zh"?ri(e):ii(e)}const Yt={white:{trigger:{background:"#fff",color:"#222",border:"1px solid #d9d9d9"},triggerDisabled:{background:"#f5f5f5",color:"#bfbfbf",border:"1px solid #f0f0f0"},triggerError:{background:"#fff",color:"#222",border:"1px solid #ff4d4f"},dropdown:{background:"#fff",border:"1px solid #d9d9d9",color:"#222"},option:(e,t,n)=>({color:t?"#bfbfbf":e?"#1890ff":"#222",background:e?"#e6f7ff":n&&!t||t?"#f5f5f5":"#fff"}),placeholder:{color:"#bfbfbf"},scrollbarThumb:"#e5e5e5",scrollbarTrack:"#f5f5f5",boxShadow:"0 2px 8px rgba(0,0,0,0.08)"},dark:{trigger:{background:"#23262F",color:"#fff",border:"1px solid #374151"},triggerDisabled:{background:"#23262F",color:"#666",border:"1px solid #374151"},triggerError:{background:"#23262F",color:"#fff",border:"1px solid #ff4d4f"},dropdown:{background:"#23262F",border:"1px solid #374151",color:"#fff"},option:(e,t,n)=>({color:t?"#666":e?"#00E8C6":"#fff",background:e?"#23262F":n&&!t?"#333843":"#23262F"}),placeholder:{color:"#666"},scrollbarThumb:"#444C5C",scrollbarTrack:"#23262F",boxShadow:"0 2px 8px rgba(0,0,0,0.32)"}};function si(){const e=E("theme"),t=E("themeConfig"),n=e===N.WHITE,r=n?Yt.white:Yt.dark;if(t){const o=n?t.white:t.dark;if(o?.color)return{...r,option:(a,i,s)=>({...r.option(a,i,s),color:i?r.option(a,i,s).color:a?o.color:r.option(a,i,s).color})}}return r}const it=({value:e,onChange:t,options:n,placeholder:r,style:o,error:a,disabled:i,dropdownStyle:s,className:p,dropdownClassName:c,children:f})=>{const[u,y]=B(!1),m=se(null),[h,x]=B(null),b=si(),S=E("size");J(()=>{if(!u)return;const A=T=>{m.current&&!m.current.contains(T.target)&&y(!1)};return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[u]);const L=n.find(A=>A.value===e),M=()=>a?b.triggerError:i?b.triggerDisabled:b.trigger;return d("div",{ref:m,className:p,style:{position:"relative",...o},children:[d("style",{children:`
|
|
46
46
|
.custom-select-dropdown {
|
|
47
47
|
scrollbar-width: thin;
|
|
48
48
|
scrollbar-color: ${b.scrollbarThumb} ${b.scrollbarTrack};
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
.custom-select-dropdown::-webkit-scrollbar-track {
|
|
58
58
|
background: ${b.scrollbarTrack};
|
|
59
59
|
}
|
|
60
|
-
`}),d("div",{onClick:()=>!i&&y(A=>!A),style:{minHeight:S===l.SMALL?32:40,borderRadius:6,display:"flex",alignItems:"center",padding:S===l.SMALL?"0 10px":"0 12px",fontSize:S===l.SMALL?12:15,cursor:i?"not-allowed":"pointer",boxSizing:"border-box",transition:"border 0.2s",opacity:i?.6:1,width:"100%",...T(),...o},tabIndex:0,children:[d("span",{style:{flex:1},children:L?L.label:d("span",{style:b.placeholder,children:r||"请选择"})}),d("span",{style:{marginLeft:8,display:"flex",alignItems:"center"},children:d("svg",{width:S===l.SMALL?16:20,height:S===l.SMALL?16:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M6 8L10 12L14 8",stroke:"#bfbfbf","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})})})]}),u&&!i&&d("div",{className:`custom-select-dropdown${c?" "+c:""}`,style:{position:"absolute",left:0,right:0,top:S===l.SMALL?32:44,zIndex:10,borderRadius:6,boxShadow:b.boxShadow,maxHeight:S===l.SMALL?160:220,overflowY:"auto",...b.dropdown,...s},children:[n.length===0&&d("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:S===l.SMALL?80:120,width:"100%",userSelect:"none"},children:[d("svg",{width:S===l.SMALL?48:64,height:S===l.SMALL?32:41,viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg",children:[d("title",{children:_("暂无数据")}),d("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd",children:[d("ellipse",{fill:"#f5f5f5",cx:"32",cy:"33",rx:"32",ry:"7"}),d("g",{fillRule:"nonzero",stroke:"#d9d9d9",children:[d("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"}),d("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"})]})]})]}),d("div",{style:{marginTop:8,color:"#bfbfbf",fontSize:S===l.SMALL?12:15},children:_("暂无数据")})]}),n.map((A,M)=>d("div",{onClick:()=>{A.disabled||(y(!1),t?.(A.value))},onMouseEnter:()=>x(M),onMouseLeave:()=>x(null),style:{padding:S===l.SMALL?"6px 10px":"10px 16px",fontSize:S===l.SMALL?12:15,cursor:A.disabled?"not-allowed":"pointer",fontWeight:e===A.value?600:400,opacity:A.disabled?.6:1,...b.option(e===A.value,!!A.disabled,h===M)},children:A.label},A.value))]}),f]})};function li(){const e=E("size");return{white:{label:{marginBottom:e===l.SMALL?6:8,fontSize:e===l.SMALL?12:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:e===l.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},selectError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:e===l.SMALL?12:13,marginTop:e===l.SMALL?2:4,textAlign:"left"},buttonCancel:{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:e===l.SMALL?"6px 16px":"8px 24px",fontSize:e===l.SMALL?12:15,cursor:"pointer"},buttonSubmit:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 16px":"8px 24px",fontSize:e===l.SMALL?12:15,cursor:"pointer",fontWeight:600},feeTip:{marginBottom:24,padding:e===l.SMALL?"8px 10px":"12px 16px",background:"#f6ffed",border:"1px solid #b7eb8f",borderRadius:6,fontSize:e===l.SMALL?12:14,color:"#52c41a"},feeDetailBox:{marginTop:e===l.SMALL?8:10,marginBottom:e===l.SMALL?16:20,padding:e===l.SMALL?"8px 10px":"12px 16px",background:"#fff",border:"1px solid #E5E6EB",borderRadius:6},feeDetailTitle:{fontSize:e===l.SMALL?12:14,color:"#222",fontWeight:600,marginBottom:e===l.SMALL?6:8},feeAmount:{color:"#F53F3F",marginLeft:4},feeDetailDesc:{fontSize:e===l.SMALL?12:13,color:"#6b7280",lineHeight:1.5}},dark:{label:{marginBottom:e===l.SMALL?6:8,fontSize:e===l.SMALL?12:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #374151",background:"#23262F",color:"#fff",fontSize:e===l.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},selectError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:e===l.SMALL?12:13,marginTop:e===l.SMALL?2:4,textAlign:"left"},buttonCancel:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 16px":"8px 24px",fontSize:e===l.SMALL?12:15,cursor:"pointer"},buttonSubmit:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 16px":"8px 24px",fontSize:e===l.SMALL?12:15,cursor:"pointer",fontWeight:600},feeTip:{marginBottom:e===l.SMALL?16:24,padding:e===l.SMALL?"8px 10px":"12px 16px",background:"#1a1a1a",border:"1px solid #333",borderRadius:6,fontSize:e===l.SMALL?12:14,color:"#52c41a"},feeDetailBox:{marginTop:e===l.SMALL?8:10,marginBottom:e===l.SMALL?16:20,padding:e===l.SMALL?"8px 10px":"12px 16px",background:"#23262F",border:"1px solid #374151",borderRadius:6},feeDetailTitle:{fontSize:e===l.SMALL?12:14,color:"#fff",fontWeight:600,marginBottom:e===l.SMALL?6:8},feeAmount:{color:"#FF6B6B",marginLeft:4},feeDetailDesc:{fontSize:e===l.SMALL?12:13,color:"#B5B8BE",lineHeight:1.5}}}}function ci(){const e=E("theme"),t=E("themeConfig"),n=e===N.WHITE,r=li(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,buttonSubmit:{...o.buttonSubmit,background:a.color}}}return o}function di(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 ui(e){if(!e)return"";const t=parseFloat(e);return isNaN(t)?"":t.toFixed(2)}const fi=({formState:e,setFormState:t,onClose:n,loading:r})=>{const o=JSON.parse(sessionStorage.getItem("all_dicts")||"{}"),a=o?.currency||[],i=o?.channel?.filter(h=>h.payment_support)||[],[s,p]=B(""),[c,f]=B(""),[u,y]=B(!1),m=ci();return J(()=>{e.currency&&e.amount&&e.rechargeChannel?Hn({channel:e.rechargeChannel,amount:e.amount,currency:e.currency}).then(h=>{p(h.paymentAmount),f(h.fee),y(!0)}).catch(h=>{console.error("计算支付金额失败:",h),y(!1)}):y(!1)},[e.currency,e.amount,e.rechargeChannel]),d(ne,{children:[d("div",{style:{marginBottom:18},children:[d("div",{style:m.label,children:[d("span",{style:{color:"#F53F3F"},children:"*"})," ",_("充值币种")]}),d(it,{value:e.currency,onChange:h=>{t(x=>({...x,currency:h}))},options:a?.map(h=>({value:h.value,label:h.label})),placeholder:_("请选择充值币种")})]}),d("div",{style:{marginBottom:18},children:[d("div",{style:m.label,children:[d("span",{style:{color:"#F53F3F"},children:"*"})," ",_("充值金额")]}),d("input",{type:"text",placeholder:_("请输入充值金额"),value:e.amount,onInput:h=>{let x=h.target.value;x=di(x);let b="";if(x&&!x.endsWith(".")){let S=parseFloat(x);if(!isNaN(S)&&(S<1&&(S=1),S>999999.99&&(S=999999.99),x=S.toString(),/\./.test(h.target.value))){const L=h.target.value.split(".")[1];L!==void 0&&L.length>0&&(x=S.toFixed(Math.min(L.length,2)))}}t(S=>({...S,amount:x,amountError:b}))},onBlur:h=>{let x=h.target.value;x=ui(x),t(b=>({...b,amount:x,amountError:""}))},style:{...m.input,...e.amountError?m.inputError:{}}}),e.amountError&&d("div",{style:m.error,children:e.amountError})]}),d("div",{style:{marginBottom:24},children:[d("div",{style:m.label,children:[d("span",{style:{color:"#F53F3F"},children:"*"})," ",_("支付平台")]}),d(it,{value:e.rechargeChannel,onChange:h=>{t(x=>({...x,rechargeChannel:h,rechargeChannelError:h?"":x.rechargeChannelError}))},options:i?.map(h=>({value:h.value,label:h.label})),placeholder:_("请选择支付平台")}),e.rechargeChannelError&&d("div",{style:m.error,children:e.rechargeChannelError})]}),u&&s&&d("div",{style:m.feeTip,children:[i.find(h=>h.value===e.rechargeChannel)?.label||e.rechargeChannel,_("需要收取手续费,实际支付金额约为:"),"$",s]}),u&&s&&d("div",{style:m.feeDetailBox,children:[d("div",{style:m.feeDetailTitle,children:[_("手续费约为:"),d("span",{style:m.feeAmount,children:["$",c]})]}),d("div",{style:m.feeDetailDesc,children:_("额外费用说明:您的地区、币种、支付卡类型等因素可能会导致手续费的变动,最终手续费以官方为准。")})]}),e.error&&d("div",{style:{color:"#ff4d4f",marginBottom:12},children:e.error}),d("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[d("button",{type:"button",onClick:n,style:m.buttonCancel,children:_("取消")}),d("button",{type:"submit",disabled:r,style:m.buttonSubmit,children:_(r?"提交中...":"去支付")})]})]})};function pi(){const e=E("size");return{white:{container:{border:"1px dashed #E5E6EB",borderRadius:8,background:"#FCFCFD",padding:e===l.SMALL?16:24,textAlign:"center",cursor:"pointer",minHeight:e===l.SMALL?80:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===l.SMALL?12:15},fileItem:{display:"flex",alignItems:"center",background:"#F7F8FA",borderRadius:8,padding:e===l.SMALL?"8px 10px":"12px 16px",marginBottom:8,fontSize:e===l.SMALL?12:15,color:"#222",justifyContent:"space-between"},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 10px":"4px 14px",fontSize:e===l.SMALL?12:15,marginLeft:e===l.SMALL?8:16,cursor:"pointer"}},dark:{container:{border:"1.5px dashed #444C5C",borderRadius:8,background:"#181A20",padding:e===l.SMALL?16:24,textAlign:"center",cursor:"pointer",minHeight:e===l.SMALL?80:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===l.SMALL?12:15},fileItem:{display:"flex",alignItems:"center",background:"#23262F",borderRadius:8,padding:e===l.SMALL?"8px 10px":"12px 16px",marginBottom:8,fontSize:e===l.SMALL?12:15,color:"#fff",justifyContent:"space-between"},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 10px":"4px 14px",fontSize:e===l.SMALL?12:15,marginLeft:e===l.SMALL?8:16,cursor:"pointer"}}}}function hi(){const t=E("theme")===N.WHITE,n=pi();return t?n.white:n.dark}const mi="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1760084964886'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='7145'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M519.224889%20451.498667a9.102222%209.102222%200%200%200-14.421333%200l-128%20161.962666a9.102222%209.102222%200%200%200%207.224888%2014.734223h84.451556v277.048888c0%205.006222%204.096%209.102222%209.130667%209.102223h68.551111a9.159111%209.159111%200%200%200%209.159111-9.102223v-276.935111H640a9.102222%209.102222%200%200%200%207.224889-14.734222l-128-162.076444z'%20p-id='7146'%20fill='%231677ff'%3e%3c/path%3e%3cpath%20d='M854.186667%20345.742222C801.848889%20207.644444%20668.444444%20109.511111%20512.227556%20109.511111S222.634667%20207.559111%20170.296889%20345.6A228.693333%20228.693333%200%200%200%200%20566.670222a228.494222%20228.494222%200%200%200%20228.465778%20228.579556h45.795555a9.159111%209.159111%200%200%200%209.159111-9.159111v-68.551111a9.159111%209.159111%200%200%200-9.130666-9.159112H228.465778a140.885333%20140.885333%200%200%201-101.717334-43.064888%20141.653333%20141.653333%200%200%201-39.879111-103.537778%20140.600889%20140.600889%200%200%201%2029.923556-82.403556%20143.217778%20143.217778%200%200%201%2075.548444-49.948444l43.320889-11.320889%2015.872-41.813333a280.632889%20280.632889%200%200%201%20100.693334-129.479112%20276.707556%20276.707556%200%200%201%20160-50.545777c57.742222%200%20113.038222%2017.493333%20160%2050.517333a280.832%20280.832%200%200%201%20100.693333%20129.479111l15.758222%2041.728%2043.207111%2011.434667a142.364444%20142.364444%200%200%201%20105.244445%20137.244444c0%2037.831111-14.734222%2073.500444-41.472%20100.238222a140.572444%20140.572444%200%200%201-100.124445%2041.472h-45.795555a9.159111%209.159111%200%200%200-9.159111%209.159112v68.551111c0%205.034667%204.096%209.159111%209.130666%209.159111h45.824A228.494222%20228.494222%200%200%200%201024%20566.641778a228.608%20228.608%200%200%200-169.813333-220.899556z'%20p-id='7147'%20fill='%231677ff'%3e%3c/path%3e%3c/svg%3e",Jn=({value:e=[],onChange:t,maxCount:n=10,accept:r=".jpg,.jpeg,.png,.pdf",multiple:o=!0,disabled:a=!1})=>{const i=E("size"),s=se(null),[p,c]=B(!1),[f,u]=B(0),y=hi(),m=async x=>{const b=Array.from(x.target.files).slice(0,n);if(!b.length)return;c(!0);const S=[];for(let L=0;L<b.length;L++){u(0);const T=new FormData;T.append("file",b[L]);try{const A=await jo(T,M=>u(M));A&&S.push(A)}catch{}}c(!1),u(0),t?.([...e,...S]),s.current&&(s.current.value="")},h=x=>{const b=e.filter((S,L)=>L!==x);t?.(b)};return d("div",{children:[d("div",{style:{...y.container,cursor:a?"not-allowed":y.container.cursor,opacity:a?.6:1},onClick:()=>!a&&s.current?.click(),children:[d("img",{src:mi,alt:"upload",style:{width:i===l.SMALL?40:48,height:i===l.SMALL?40:48,marginBottom:i===l.SMALL?8:12}}),d("div",{style:{color:"#222",fontSize:i===l.SMALL?13:16,marginBottom:i===l.SMALL?4:8},children:_("Please upload the bank transfer receipt")}),d("div",{style:{color:"#999",fontSize:i===l.SMALL?12:13},children:_("Click or drag file to this area to upload")}),d("input",{ref:s,type:"file",multiple:o,accept:r,style:{display:"none"},onChange:m,disabled:a}),p&&d("div",{style:{marginTop:i===l.SMALL?8:12,color:"#1677ff"},children:[_("正在上传...")," ",f,"%"]})]}),e&&e.length>0&&d("div",{style:{marginTop:i===l.SMALL?8:12},children:e.map((x,b)=>d("div",{style:y.fileItem,children:[d("div",{style:{display:"flex",alignItems:"center",flex:1},children:d("span",{style:{fontWeight:500,wordBreak:"break-all"},children:x.split("/").pop()})}),d("button",{type:"button",onClick:S=>{S.stopPropagation(),h(b)},style:y.removeBtn,disabled:a,children:_("移除")})]},x))})]})};function gi(){const e=E("size");return{white:{label:{marginBottom:e===l.SMALL?6:8,fontSize:e===l.SMALL?12:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:e===l.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},select:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:e===l.SMALL?12:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},upload:{border:"1px dashed #E5E6EB",borderRadius:8,background:"#FCFCFD",padding:e===l.SMALL?12:24,textAlign:"center",cursor:"pointer",minHeight:e===l.SMALL?100:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===l.SMALL?12:15},uploadError:{border:"1px dashed #ff4d4f"},fileItem:{display:"flex",alignItems:"center",background:"#F7F8FA",borderRadius:8,padding:e===l.SMALL?"8px 10px":"12px 16px",marginBottom:e===l.SMALL?6:8,fontSize:e===l.SMALL?12:15,color:"#222",justifyContent:"space-between"},buttonCancel:{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:e===l.SMALL?"6px 18px":"8px 24px",cursor:"pointer"},buttonSubmit:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 18px":"8px 24px",cursor:"pointer",fontWeight:600},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 18px":"4px 14px",fontSize:e===l.SMALL?12:15,marginLeft:e===l.SMALL?8:16,cursor:"pointer"},error:{color:"#ff4d4f",fontSize:e===l.SMALL?12:13,marginTop:e===l.SMALL?2:4,textAlign:"left"},channelInfoBox:{marginTop:e===l.SMALL?8:10,padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,background:"#F7F8FA",border:"1px solid #E5E6EB"},channelInfoItem:{color:"#222",fontSize:e===l.SMALL?12:13,lineHeight:1.6,wordBreak:"break-all"}},dark:{label:{marginBottom:e===l.SMALL?4:8,fontSize:e===l.SMALL?12:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #374151",background:"#23262F",color:"#fff",fontSize:e===l.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},select:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,border:"1px solid #374151",background:"#23262F",color:"#fff",fontSize:e===l.SMALL?12:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},upload:{border:"1px dashed #374151",borderRadius:8,background:"#181A20",padding:e===l.SMALL?12:24,textAlign:"center",cursor:"pointer",minHeight:e===l.SMALL?100:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===l.SMALL?12:14},uploadError:{border:"1px dashed #ff4d4f"},fileItem:{display:"flex",alignItems:"center",background:"#23262F",borderRadius:8,padding:e===l.SMALL?"8px 10px":"12px 16px",marginBottom:e===l.SMALL?6:8,fontSize:e===l.SMALL?12:15,color:"#fff",justifyContent:"space-between"},buttonCancel:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 18px":"8px 24px",fontSize:e===l.SMALL?12:15,cursor:"pointer"},buttonSubmit:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 18px":"8px 24px",fontSize:e===l.SMALL?12:14,cursor:"pointer",fontWeight:600},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 18px":"4px 14px",fontSize:e===l.SMALL?12:15,marginLeft:e===l.SMALL?8:16,cursor:"pointer"},error:{color:"#ff4d4f",fontSize:e===l.SMALL?12:13,marginTop:e===l.SMALL?2:4,textAlign:"left"},channelInfoBox:{marginTop:e===l.SMALL?8:10,padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,background:"#23262F",border:"1px solid #374151"},channelInfoItem:{color:"#fff",fontSize:e===l.SMALL?12:13,lineHeight:1.6,wordBreak:"break-all"}}}}function bi(){const e=E("theme"),t=E("themeConfig"),n=e===N.WHITE,r=gi(),o=n?r.white:r.dark;if(console.log(t,"themeConfig"),t){const a=n?t.white:t.dark;if(a?.color)return{...o,buttonSubmit:{...o.buttonSubmit,background:a.color}}}return o}const yi=({formState:e,setFormState:t,onClose:n,loading:r})=>{const o=JSON.parse(sessionStorage.getItem("all_dicts")||"{}");console.log(o,"allDicts");const a=o?.channel||[],i=bi(),[s,p]=B([]),c=async u=>{u.preventDefault();let y=!0;t(m=>({...m,platformError:"",transactionIdError:"",filesError:""})),e.platform||(t(m=>({...m,platformError:_("请选择支付平台")})),y=!1),e.transactionId.trim()||(t(m=>({...m,transactionIdError:_("请输入转账交易ID")})),y=!1),(!e.files||e.files.length===0)&&(t(m=>({...m,filesError:_("请上传转账凭证")})),y=!1),y&&(await $n({transferChannel:e.platform,transferNo:e.transactionId,voucherUrls:e.files}),n(),Ie.success(_("提交成功")))};function f(u){t(y=>({...y,platform:u,platformError:u?"":y.platformError})),jn({code:u}).then(y=>{p(Array.isArray(y)?y:y?[String(y)]:[])})}return d("form",{onSubmit:c,children:[d("div",{style:{marginBottom:18},children:[d("div",{style:i.label,children:[d("span",{style:{color:"#F53F3F"},children:"*"})," ",_("第三方支付平台")]}),d(it,{value:e.platform,onChange:u=>{f(u)},options:[...a?.map(u=>({value:u.value,label:u.label}))],placeholder:_("请选择支付平台")}),e.platformError&&d("div",{style:i.error,children:e.platformError}),s.length>0&&d("div",{style:i.channelInfoBox,children:s.map((u,y)=>d("div",{style:i.channelInfoItem,children:u},y))})]}),d("div",{style:{marginBottom:18},children:[d("div",{style:i.label,children:[d("span",{style:{color:"#F53F3F"},children:"*"})," ",_("交易ID")]}),d("input",{type:"text",placeholder:_("请输入转账交易ID"),value:e.transactionId,maxLength:200,onInput:u=>{let y=u.target.value;y.length>200&&(y=y.slice(0,200)),t(m=>({...m,transactionId:y,transactionIdError:y?"":m.transactionIdError}))},style:{...i.input,...e.transactionIdError?i.inputError:{}}}),e.transactionIdError&&d("div",{style:i.error,children:e.transactionIdError})]}),d("div",{style:{marginBottom:24},children:[d("div",{style:i.label,children:[d("span",{style:{color:"#F53F3F"},children:"*"})," ",_("上传文件")]}),d(Jn,{value:e.files,onChange:u=>t(y=>({...y,files:u,filesError:""})),maxCount:10,accept:".jpg,.jpeg,.png,.pdf",multiple:!0}),e.filesError&&d("div",{style:i.error,children:e.filesError})]}),d("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[d("button",{type:"button",onClick:n,style:i.buttonCancel,children:_("取消")}),d("button",{type:"submit",disabled:r,style:i.buttonSubmit,children:_("确定")})]})]})};function xi(){const e=E("size");return{white:{mask:"rgba(0, 0, 0, 0.45)",modalBg:"#fff",modalColor:"#222",modalBoxShadow:"0 6px 16px rgba(0, 0, 0, 0.12)",closeBtn:{position:"absolute",top:"16px",right:"16px",background:"none",border:"none",fontSize:e===l.SMALL?16:24,cursor:"pointer",color:"#999",padding:"0",width:e===l.SMALL?16:24,height:e===l.SMALL?16:24,display:"flex",alignItems:"center",justifyContent:"center"},title:{fontSize:e===l.SMALL?16:18,fontWeight:"600",marginBottom:e===l.SMALL?16:24,color:"#222"},headerBorder:"#f0f0f0",scrollbarClass:"light-scrollbar",scrollbarThumbColor:"#d1d5db",scrollbarThumbHoverColor:"#9ca3af",tabBtn:(t,n)=>({flex:1,padding:e===l.SMALL?"8px 10px":"12px 16px",background:t?"#1890ff":"transparent",color:t?"#fff":"#666",border:"1px solid #d9d9d9",borderRight:n?"none":"1px solid #d9d9d9",cursor:"pointer",fontSize:e===l.SMALL?12:14,fontWeight:t?"600":"400",borderRadius:n?"6px 0 0 6px":"0 6px 6px 0"})},dark:{mask:"rgba(0, 0, 0, 0.65)",modalBg:"#23262F",modalColor:"#F5F6FA",modalBoxShadow:"0 6px 16px rgba(0,0,0,0.32)",closeBtn:{position:"absolute",top:e===l.SMALL?"12px":"16px",right:e===l.SMALL?"12px":"16px",background:"none",border:"none",fontSize:e===l.SMALL?16:24,cursor:"pointer",color:"#B5B8BE",padding:"0",width:e===l.SMALL?16:24,height:e===l.SMALL?16:24,display:"flex",alignItems:"center",justifyContent:"center"},title:{fontSize:e===l.SMALL?16:18,fontWeight:"600",marginBottom:e===l.SMALL?16:24,color:"#F5F6FA"},headerBorder:"#374151",scrollbarClass:"dark-scrollbar",scrollbarThumbColor:"#4B5563",scrollbarThumbHoverColor:"#6B7280",tabBtn:(t,n)=>({flex:1,padding:e===l.SMALL?"8px 10px":"12px 16px",background:t?"#00E8C6":"transparent",color:t?"#fff":"#B5B8BE",border:"1px solid #444C5C",borderRight:n?"none":"1px solid #444C5C",cursor:"pointer",fontSize:e===l.SMALL?12:14,fontWeight:t?"600":"400",borderRadius:n?"6px 0 0 6px":"0 6px 6px 0"})}}}function _i(){const t=E("theme")===N.WHITE,n=xi();return t?n.white:n.dark}const re=E("size");function Si(e){const t=`modal-scrollbar-${e.scrollbarClass}`;if(document.getElementById(t))return t;const n=document.createElement("style");return n.id=t,n.textContent=`
|
|
60
|
+
`}),d("div",{onClick:()=>!i&&y(A=>!A),style:{minHeight:S===l.SMALL?32:40,borderRadius:6,display:"flex",alignItems:"center",padding:S===l.SMALL?"0 10px":"0 12px",fontSize:S===l.SMALL?12:15,cursor:i?"not-allowed":"pointer",boxSizing:"border-box",transition:"border 0.2s",opacity:i?.6:1,width:"100%",...M(),...o},tabIndex:0,children:[d("span",{style:{flex:1},children:L?L.label:d("span",{style:b.placeholder,children:r||"请选择"})}),d("span",{style:{marginLeft:8,display:"flex",alignItems:"center"},children:d("svg",{width:S===l.SMALL?16:20,height:S===l.SMALL?16:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M6 8L10 12L14 8",stroke:"#bfbfbf","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})})})]}),u&&!i&&d("div",{className:`custom-select-dropdown${c?" "+c:""}`,style:{position:"absolute",left:0,right:0,top:S===l.SMALL?32:44,zIndex:10,borderRadius:6,boxShadow:b.boxShadow,maxHeight:S===l.SMALL?160:220,overflowY:"auto",...b.dropdown,...s},children:[n.length===0&&d("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:S===l.SMALL?80:120,width:"100%",userSelect:"none"},children:[d("svg",{width:S===l.SMALL?48:64,height:S===l.SMALL?32:41,viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg",children:[d("title",{children:_("暂无数据")}),d("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd",children:[d("ellipse",{fill:"#f5f5f5",cx:"32",cy:"33",rx:"32",ry:"7"}),d("g",{fillRule:"nonzero",stroke:"#d9d9d9",children:[d("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"}),d("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"})]})]})]}),d("div",{style:{marginTop:8,color:"#bfbfbf",fontSize:S===l.SMALL?12:15},children:_("暂无数据")})]}),n.map((A,T)=>d("div",{onClick:()=>{A.disabled||(y(!1),t?.(A.value))},onMouseEnter:()=>x(T),onMouseLeave:()=>x(null),style:{padding:S===l.SMALL?"6px 10px":"10px 16px",fontSize:S===l.SMALL?12:15,cursor:A.disabled?"not-allowed":"pointer",fontWeight:e===A.value?600:400,opacity:A.disabled?.6:1,...b.option(e===A.value,!!A.disabled,h===T)},children:A.label},A.value))]}),f]})};function li(){const e=E("size");return{white:{label:{marginBottom:e===l.SMALL?6:8,fontSize:e===l.SMALL?12:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:e===l.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},selectError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:e===l.SMALL?12:13,marginTop:e===l.SMALL?2:4,textAlign:"left"},buttonCancel:{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:e===l.SMALL?"6px 16px":"8px 24px",fontSize:e===l.SMALL?12:15,cursor:"pointer"},buttonSubmit:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 16px":"8px 24px",fontSize:e===l.SMALL?12:15,cursor:"pointer",fontWeight:600},feeTip:{marginBottom:24,padding:e===l.SMALL?"8px 10px":"12px 16px",background:"#f6ffed",border:"1px solid #b7eb8f",borderRadius:6,fontSize:e===l.SMALL?12:14,color:"#52c41a"},feeDetailBox:{marginTop:e===l.SMALL?8:10,marginBottom:e===l.SMALL?16:20,padding:e===l.SMALL?"8px 10px":"12px 16px",background:"#fff",border:"1px solid #E5E6EB",borderRadius:6},feeDetailTitle:{fontSize:e===l.SMALL?12:14,color:"#222",fontWeight:600,marginBottom:e===l.SMALL?6:8},feeAmount:{color:"#F53F3F",marginLeft:4},feeDetailDesc:{fontSize:e===l.SMALL?12:13,color:"#6b7280",lineHeight:1.5}},dark:{label:{marginBottom:e===l.SMALL?6:8,fontSize:e===l.SMALL?12:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #374151",background:"#23262F",color:"#fff",fontSize:e===l.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},selectError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:e===l.SMALL?12:13,marginTop:e===l.SMALL?2:4,textAlign:"left"},buttonCancel:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 16px":"8px 24px",fontSize:e===l.SMALL?12:15,cursor:"pointer"},buttonSubmit:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 16px":"8px 24px",fontSize:e===l.SMALL?12:15,cursor:"pointer",fontWeight:600},feeTip:{marginBottom:e===l.SMALL?16:24,padding:e===l.SMALL?"8px 10px":"12px 16px",background:"#1a1a1a",border:"1px solid #333",borderRadius:6,fontSize:e===l.SMALL?12:14,color:"#52c41a"},feeDetailBox:{marginTop:e===l.SMALL?8:10,marginBottom:e===l.SMALL?16:20,padding:e===l.SMALL?"8px 10px":"12px 16px",background:"#23262F",border:"1px solid #374151",borderRadius:6},feeDetailTitle:{fontSize:e===l.SMALL?12:14,color:"#fff",fontWeight:600,marginBottom:e===l.SMALL?6:8},feeAmount:{color:"#FF6B6B",marginLeft:4},feeDetailDesc:{fontSize:e===l.SMALL?12:13,color:"#B5B8BE",lineHeight:1.5}}}}function ci(){const e=E("theme"),t=E("themeConfig"),n=e===N.WHITE,r=li(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,buttonSubmit:{...o.buttonSubmit,background:a.color}}}return o}function di(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 ui(e){if(!e)return"";const t=parseFloat(e);return isNaN(t)?"":t.toFixed(2)}const fi=({formState:e,setFormState:t,onClose:n,loading:r})=>{const o=JSON.parse(sessionStorage.getItem("all_dicts")||"{}"),a=o?.currency||[],i=o?.channel?.filter(h=>h.payment_support)||[],[s,p]=B(""),[c,f]=B(""),[u,y]=B(!1),m=ci();return J(()=>{e.currency&&e.amount&&e.rechargeChannel?Hn({channel:e.rechargeChannel,amount:e.amount,currency:e.currency}).then(h=>{p(h.paymentAmount),f(h.fee),y(!0)}).catch(h=>{console.error("计算支付金额失败:",h),y(!1)}):y(!1)},[e.currency,e.amount,e.rechargeChannel]),d(ne,{children:[d("div",{style:{marginBottom:18},children:[d("div",{style:m.label,children:[d("span",{style:{color:"#F53F3F"},children:"*"})," ",_("充值币种")]}),d(it,{value:e.currency,onChange:h=>{t(x=>({...x,currency:h}))},options:a?.map(h=>({value:h.value,label:h.label})),placeholder:_("请选择充值币种")})]}),d("div",{style:{marginBottom:18},children:[d("div",{style:m.label,children:[d("span",{style:{color:"#F53F3F"},children:"*"})," ",_("充值金额")]}),d("input",{type:"text",placeholder:_("请输入充值金额"),value:e.amount,onInput:h=>{let x=h.target.value;x=di(x);let b="";if(x&&!x.endsWith(".")){let S=parseFloat(x);if(!isNaN(S)&&(S<1&&(S=1),S>999999.99&&(S=999999.99),x=S.toString(),/\./.test(h.target.value))){const L=h.target.value.split(".")[1];L!==void 0&&L.length>0&&(x=S.toFixed(Math.min(L.length,2)))}}t(S=>({...S,amount:x,amountError:b}))},onBlur:h=>{let x=h.target.value;x=ui(x),t(b=>({...b,amount:x,amountError:""}))},style:{...m.input,...e.amountError?m.inputError:{}}}),e.amountError&&d("div",{style:m.error,children:e.amountError})]}),d("div",{style:{marginBottom:24},children:[d("div",{style:m.label,children:[d("span",{style:{color:"#F53F3F"},children:"*"})," ",_("支付平台")]}),d(it,{value:e.rechargeChannel,onChange:h=>{t(x=>({...x,rechargeChannel:h,rechargeChannelError:h?"":x.rechargeChannelError}))},options:i?.map(h=>({value:h.value,label:h.label})),placeholder:_("请选择支付平台")}),e.rechargeChannelError&&d("div",{style:m.error,children:e.rechargeChannelError})]}),u&&s&&d("div",{style:m.feeTip,children:[i.find(h=>h.value===e.rechargeChannel)?.label||e.rechargeChannel,_("需要收取手续费,实际支付金额约为:"),"$",s]}),u&&s&&d("div",{style:m.feeDetailBox,children:[d("div",{style:m.feeDetailTitle,children:[_("手续费约为:"),d("span",{style:m.feeAmount,children:["$",c]})]}),d("div",{style:m.feeDetailDesc,children:_("额外费用说明:您的地区、币种、支付卡类型等因素可能会导致手续费的变动,最终手续费以官方为准。")})]}),e.error&&d("div",{style:{color:"#ff4d4f",marginBottom:12},children:e.error}),d("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[d("button",{type:"button",onClick:n,style:m.buttonCancel,children:_("取消")}),d("button",{type:"submit",disabled:r,style:m.buttonSubmit,children:_(r?"提交中...":"去支付")})]})]})};function pi(){const e=E("size");return{white:{container:{border:"1px dashed #E5E6EB",borderRadius:8,background:"#FCFCFD",padding:e===l.SMALL?16:24,textAlign:"center",cursor:"pointer",minHeight:e===l.SMALL?80:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===l.SMALL?12:15},fileItem:{display:"flex",alignItems:"center",background:"#F7F8FA",borderRadius:8,padding:e===l.SMALL?"8px 10px":"12px 16px",marginBottom:8,fontSize:e===l.SMALL?12:15,color:"#222",justifyContent:"space-between"},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 10px":"4px 14px",fontSize:e===l.SMALL?12:15,marginLeft:e===l.SMALL?8:16,cursor:"pointer"}},dark:{container:{border:"1.5px dashed #444C5C",borderRadius:8,background:"#181A20",padding:e===l.SMALL?16:24,textAlign:"center",cursor:"pointer",minHeight:e===l.SMALL?80:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===l.SMALL?12:15},fileItem:{display:"flex",alignItems:"center",background:"#23262F",borderRadius:8,padding:e===l.SMALL?"8px 10px":"12px 16px",marginBottom:8,fontSize:e===l.SMALL?12:15,color:"#fff",justifyContent:"space-between"},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 10px":"4px 14px",fontSize:e===l.SMALL?12:15,marginLeft:e===l.SMALL?8:16,cursor:"pointer"}}}}function hi(){const t=E("theme")===N.WHITE,n=pi();return t?n.white:n.dark}const mi="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1760084964886'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='7145'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M519.224889%20451.498667a9.102222%209.102222%200%200%200-14.421333%200l-128%20161.962666a9.102222%209.102222%200%200%200%207.224888%2014.734223h84.451556v277.048888c0%205.006222%204.096%209.102222%209.130667%209.102223h68.551111a9.159111%209.159111%200%200%200%209.159111-9.102223v-276.935111H640a9.102222%209.102222%200%200%200%207.224889-14.734222l-128-162.076444z'%20p-id='7146'%20fill='%231677ff'%3e%3c/path%3e%3cpath%20d='M854.186667%20345.742222C801.848889%20207.644444%20668.444444%20109.511111%20512.227556%20109.511111S222.634667%20207.559111%20170.296889%20345.6A228.693333%20228.693333%200%200%200%200%20566.670222a228.494222%20228.494222%200%200%200%20228.465778%20228.579556h45.795555a9.159111%209.159111%200%200%200%209.159111-9.159111v-68.551111a9.159111%209.159111%200%200%200-9.130666-9.159112H228.465778a140.885333%20140.885333%200%200%201-101.717334-43.064888%20141.653333%20141.653333%200%200%201-39.879111-103.537778%20140.600889%20140.600889%200%200%201%2029.923556-82.403556%20143.217778%20143.217778%200%200%201%2075.548444-49.948444l43.320889-11.320889%2015.872-41.813333a280.632889%20280.632889%200%200%201%20100.693334-129.479112%20276.707556%20276.707556%200%200%201%20160-50.545777c57.742222%200%20113.038222%2017.493333%20160%2050.517333a280.832%20280.832%200%200%201%20100.693333%20129.479111l15.758222%2041.728%2043.207111%2011.434667a142.364444%20142.364444%200%200%201%20105.244445%20137.244444c0%2037.831111-14.734222%2073.500444-41.472%20100.238222a140.572444%20140.572444%200%200%201-100.124445%2041.472h-45.795555a9.159111%209.159111%200%200%200-9.159111%209.159112v68.551111c0%205.034667%204.096%209.159111%209.130666%209.159111h45.824A228.494222%20228.494222%200%200%200%201024%20566.641778a228.608%20228.608%200%200%200-169.813333-220.899556z'%20p-id='7147'%20fill='%231677ff'%3e%3c/path%3e%3c/svg%3e",Jn=({value:e=[],onChange:t,maxCount:n=10,accept:r=".jpg,.jpeg,.png,.pdf",multiple:o=!0,disabled:a=!1})=>{const i=E("size"),s=se(null),[p,c]=B(!1),[f,u]=B(0),y=hi(),m=async x=>{const b=Array.from(x.target.files).slice(0,n);if(!b.length)return;c(!0);const S=[];for(let L=0;L<b.length;L++){u(0);const M=new FormData;M.append("file",b[L]);try{const A=await jo(M,T=>u(T));A&&S.push(A)}catch{}}c(!1),u(0),t?.([...e,...S]),s.current&&(s.current.value="")},h=x=>{const b=e.filter((S,L)=>L!==x);t?.(b)};return d("div",{children:[d("div",{style:{...y.container,cursor:a?"not-allowed":y.container.cursor,opacity:a?.6:1},onClick:()=>!a&&s.current?.click(),children:[d("img",{src:mi,alt:"upload",style:{width:i===l.SMALL?40:48,height:i===l.SMALL?40:48,marginBottom:i===l.SMALL?8:12}}),d("div",{style:{color:"#222",fontSize:i===l.SMALL?13:16,marginBottom:i===l.SMALL?4:8},children:_("Please upload the bank transfer receipt")}),d("div",{style:{color:"#999",fontSize:i===l.SMALL?12:13},children:_("Click or drag file to this area to upload")}),d("input",{ref:s,type:"file",multiple:o,accept:r,style:{display:"none"},onChange:m,disabled:a}),p&&d("div",{style:{marginTop:i===l.SMALL?8:12,color:"#1677ff"},children:[_("正在上传...")," ",f,"%"]})]}),e&&e.length>0&&d("div",{style:{marginTop:i===l.SMALL?8:12},children:e.map((x,b)=>d("div",{style:y.fileItem,children:[d("div",{style:{display:"flex",alignItems:"center",flex:1},children:d("span",{style:{fontWeight:500,wordBreak:"break-all"},children:x.split("/").pop()})}),d("button",{type:"button",onClick:S=>{S.stopPropagation(),h(b)},style:y.removeBtn,disabled:a,children:_("移除")})]},x))})]})};function gi(){const e=E("size");return{white:{label:{marginBottom:e===l.SMALL?6:8,fontSize:e===l.SMALL?12:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:e===l.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},select:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:e===l.SMALL?12:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},upload:{border:"1px dashed #E5E6EB",borderRadius:8,background:"#FCFCFD",padding:e===l.SMALL?12:24,textAlign:"center",cursor:"pointer",minHeight:e===l.SMALL?100:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===l.SMALL?12:15},uploadError:{border:"1px dashed #ff4d4f"},fileItem:{display:"flex",alignItems:"center",background:"#F7F8FA",borderRadius:8,padding:e===l.SMALL?"8px 10px":"12px 16px",marginBottom:e===l.SMALL?6:8,fontSize:e===l.SMALL?12:15,color:"#222",justifyContent:"space-between"},buttonCancel:{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:e===l.SMALL?"6px 18px":"8px 24px",cursor:"pointer"},buttonSubmit:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 18px":"8px 24px",cursor:"pointer",fontWeight:600},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 18px":"4px 14px",fontSize:e===l.SMALL?12:15,marginLeft:e===l.SMALL?8:16,cursor:"pointer"},error:{color:"#ff4d4f",fontSize:e===l.SMALL?12:13,marginTop:e===l.SMALL?2:4,textAlign:"left"},channelInfoBox:{marginTop:e===l.SMALL?8:10,padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,background:"#F7F8FA",border:"1px solid #E5E6EB"},channelInfoItem:{color:"#222",fontSize:e===l.SMALL?12:13,lineHeight:1.6,wordBreak:"break-all"}},dark:{label:{marginBottom:e===l.SMALL?4:8,fontSize:e===l.SMALL?12:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #374151",background:"#23262F",color:"#fff",fontSize:e===l.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},select:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,border:"1px solid #374151",background:"#23262F",color:"#fff",fontSize:e===l.SMALL?12:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},upload:{border:"1px dashed #374151",borderRadius:8,background:"#181A20",padding:e===l.SMALL?12:24,textAlign:"center",cursor:"pointer",minHeight:e===l.SMALL?100:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===l.SMALL?12:14},uploadError:{border:"1px dashed #ff4d4f"},fileItem:{display:"flex",alignItems:"center",background:"#23262F",borderRadius:8,padding:e===l.SMALL?"8px 10px":"12px 16px",marginBottom:e===l.SMALL?6:8,fontSize:e===l.SMALL?12:15,color:"#fff",justifyContent:"space-between"},buttonCancel:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 18px":"8px 24px",fontSize:e===l.SMALL?12:15,cursor:"pointer"},buttonSubmit:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 18px":"8px 24px",fontSize:e===l.SMALL?12:14,cursor:"pointer",fontWeight:600},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 18px":"4px 14px",fontSize:e===l.SMALL?12:15,marginLeft:e===l.SMALL?8:16,cursor:"pointer"},error:{color:"#ff4d4f",fontSize:e===l.SMALL?12:13,marginTop:e===l.SMALL?2:4,textAlign:"left"},channelInfoBox:{marginTop:e===l.SMALL?8:10,padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,background:"#23262F",border:"1px solid #374151"},channelInfoItem:{color:"#fff",fontSize:e===l.SMALL?12:13,lineHeight:1.6,wordBreak:"break-all"}}}}function bi(){const e=E("theme"),t=E("themeConfig"),n=e===N.WHITE,r=gi(),o=n?r.white:r.dark;if(console.log(t,"themeConfig"),t){const a=n?t.white:t.dark;if(a?.color)return{...o,buttonSubmit:{...o.buttonSubmit,background:a.color}}}return o}const yi=({formState:e,setFormState:t,onClose:n,loading:r})=>{const o=JSON.parse(sessionStorage.getItem("all_dicts")||"{}");console.log(o,"allDicts");const a=o?.channel||[],i=bi(),[s,p]=B([]),c=async u=>{u.preventDefault();let y=!0;t(m=>({...m,platformError:"",transactionIdError:"",filesError:""})),e.platform||(t(m=>({...m,platformError:_("请选择支付平台")})),y=!1),e.transactionId.trim()||(t(m=>({...m,transactionIdError:_("请输入转账交易ID")})),y=!1),(!e.files||e.files.length===0)&&(t(m=>({...m,filesError:_("请上传转账凭证")})),y=!1),y&&(await $n({transferChannel:e.platform,transferNo:e.transactionId,voucherUrls:e.files}),n(),Ie.success(_("提交成功")))};function f(u){t(y=>({...y,platform:u,platformError:u?"":y.platformError})),jn({code:u}).then(y=>{p(Array.isArray(y)?y:y?[String(y)]:[])})}return d("form",{onSubmit:c,children:[d("div",{style:{marginBottom:18},children:[d("div",{style:i.label,children:[d("span",{style:{color:"#F53F3F"},children:"*"})," ",_("第三方支付平台")]}),d(it,{value:e.platform,onChange:u=>{f(u)},options:[...a?.map(u=>({value:u.value,label:u.label}))],placeholder:_("请选择支付平台")}),e.platformError&&d("div",{style:i.error,children:e.platformError}),s.length>0&&d("div",{style:i.channelInfoBox,children:s.map((u,y)=>d("div",{style:i.channelInfoItem,children:u},y))})]}),d("div",{style:{marginBottom:18},children:[d("div",{style:i.label,children:[d("span",{style:{color:"#F53F3F"},children:"*"})," ",_("交易ID")]}),d("input",{type:"text",placeholder:_("请输入转账交易ID"),value:e.transactionId,maxLength:200,onInput:u=>{let y=u.target.value;y.length>200&&(y=y.slice(0,200)),t(m=>({...m,transactionId:y,transactionIdError:y?"":m.transactionIdError}))},style:{...i.input,...e.transactionIdError?i.inputError:{}}}),e.transactionIdError&&d("div",{style:i.error,children:e.transactionIdError})]}),d("div",{style:{marginBottom:24},children:[d("div",{style:i.label,children:[d("span",{style:{color:"#F53F3F"},children:"*"})," ",_("上传文件")]}),d(Jn,{value:e.files,onChange:u=>t(y=>({...y,files:u,filesError:""})),maxCount:10,accept:".jpg,.jpeg,.png,.pdf",multiple:!0}),e.filesError&&d("div",{style:i.error,children:e.filesError})]}),d("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[d("button",{type:"button",onClick:n,style:i.buttonCancel,children:_("取消")}),d("button",{type:"submit",disabled:r,style:i.buttonSubmit,children:_("确定")})]})]})};function xi(){const e=E("size");return{white:{mask:"rgba(0, 0, 0, 0.45)",modalBg:"#fff",modalColor:"#222",modalBoxShadow:"0 6px 16px rgba(0, 0, 0, 0.12)",closeBtn:{position:"absolute",top:"16px",right:"16px",background:"none",border:"none",fontSize:e===l.SMALL?16:24,cursor:"pointer",color:"#999",padding:"0",width:e===l.SMALL?16:24,height:e===l.SMALL?16:24,display:"flex",alignItems:"center",justifyContent:"center"},title:{fontSize:e===l.SMALL?16:18,fontWeight:"600",marginBottom:e===l.SMALL?16:24,color:"#222"},headerBorder:"#f0f0f0",scrollbarClass:"light-scrollbar",scrollbarThumbColor:"#d1d5db",scrollbarThumbHoverColor:"#9ca3af",tabBtn:(t,n)=>({flex:1,padding:e===l.SMALL?"8px 10px":"12px 16px",background:t?"#1890ff":"transparent",color:t?"#fff":"#666",border:"1px solid #d9d9d9",borderRight:n?"none":"1px solid #d9d9d9",cursor:"pointer",fontSize:e===l.SMALL?12:14,fontWeight:t?"600":"400",borderRadius:n?"6px 0 0 6px":"0 6px 6px 0"})},dark:{mask:"rgba(0, 0, 0, 0.65)",modalBg:"#23262F",modalColor:"#F5F6FA",modalBoxShadow:"0 6px 16px rgba(0,0,0,0.32)",closeBtn:{position:"absolute",top:e===l.SMALL?"12px":"16px",right:e===l.SMALL?"12px":"16px",background:"none",border:"none",fontSize:e===l.SMALL?16:24,cursor:"pointer",color:"#B5B8BE",padding:"0",width:e===l.SMALL?16:24,height:e===l.SMALL?16:24,display:"flex",alignItems:"center",justifyContent:"center"},title:{fontSize:e===l.SMALL?16:18,fontWeight:"600",marginBottom:e===l.SMALL?16:24,color:"#F5F6FA"},headerBorder:"#374151",scrollbarClass:"dark-scrollbar",scrollbarThumbColor:"#4B5563",scrollbarThumbHoverColor:"#6B7280",tabBtn:(t,n)=>({flex:1,padding:e===l.SMALL?"8px 10px":"12px 16px",background:t?"#00E8C6":"transparent",color:t?"#fff":"#B5B8BE",border:"1px solid #444C5C",borderRight:n?"none":"1px solid #444C5C",cursor:"pointer",fontSize:e===l.SMALL?12:14,fontWeight:t?"600":"400",borderRadius:n?"6px 0 0 6px":"0 6px 6px 0"})}}}function _i(){const t=E("theme")===N.WHITE,n=xi();return t?n.white:n.dark}const re=E("size");function Si(e){const t=`modal-scrollbar-${e.scrollbarClass}`;if(document.getElementById(t))return t;const n=document.createElement("style");return n.id=t,n.textContent=`
|
|
61
61
|
.${e.scrollbarClass} {
|
|
62
62
|
scrollbar-width: thin;
|
|
63
63
|
scrollbar-color: ${e.scrollbarThumbColor} transparent;
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
.${e.scrollbarClass}::-webkit-scrollbar-thumb:hover {
|
|
76
76
|
background: ${e.scrollbarThumbHoverColor};
|
|
77
77
|
}
|
|
78
|
-
`,document.head.appendChild(n),t}function Vn({visible:e,onClose:t,title:n,children:r,width:o=re===l.SMALL?300:400,maxWidth:a=re===l.SMALL?300:400,showClose:i=!0,maskClosable:s=!0}){const[p,c]=B(!1),f=_i();J(()=>{Si(f)},[f]);const u=m=>{m.target===m.currentTarget?c(!0):c(!1)},y=m=>{m.target===m.currentTarget&&p&&s&&t(),c(!1)};return e?d("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:f.mask,display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999},onMouseDown:u,onMouseUp:y,children:d("div",{style:{background:f.modalBg,borderRadius:re===l.SMALL?8:12,minWidth:o,maxWidth:a,color:f.modalColor,boxShadow:f.modalBoxShadow,position:"relative",width:typeof o=="string"?o:`${o}px`,maxHeight:"90vh",display:"flex",flexDirection:"column"},onClick:m=>m.stopPropagation(),children:[d("div",{style:{position:"sticky",top:0,background:f.modalBg,borderRadius:re===l.SMALL?"8px 8px 0 0":"12px 12px 0 0",padding:re===l.SMALL?"24px 24px 0 24px":"32px 32px 0 32px",zIndex:1,borderBottom:`1px solid ${f.headerBorder}`},children:[i&&d("button",{type:"button",onClick:t,style:f.closeBtn,"aria-label":"关闭",children:"×"}),n&&d("div",{style:f.title,children:n})]}),d("div",{className:`modal-content ${f.scrollbarClass}`,style:{flex:1,overflowY:"auto",padding:re===l.SMALL?"16px 24px 24px 24px":"20px 32px 32px 32px"},children:r})]})}):null}function Li(){const e=E("size");return{white:{tabBtn:(t,n)=>({flex:1,background:t?"#fff":"#F7F8FA",color:t?"#1890ff":"#222",border:"1px solid #F0F1F3",borderRadius:n?"8px 0 0 8px":"0 8px 8px 0",fontWeight:500,fontSize:e===l.SMALL?12:16,height:e===l.SMALL?32:48,boxShadow:t?"0 2px 8px 0 rgba(20,20,20,0.04)":"none",outline:"none",cursor:"pointer"})},dark:{tabBtn:(t,n)=>({flex:1,background:t?"#23262F":"#181A20",color:t?"#00E8C6":"#fff",border:"1px solid #444C5C",borderRadius:n?"8px 0 0 8px":"0 8px 8px 0",fontWeight:500,fontSize:e===l.SMALL?12:16,height:e===l.SMALL?32:48,boxShadow:t?"0 2px 8px 0 rgba(20,20,20,0.10)":"none",outline:"none",cursor:"pointer"})}}}function wi(){const e=E("theme"),t=E("themeConfig"),n=e===N.WHITE,r=Li(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,tabBtn:(i,s)=>({...o.tabBtn(i,s),color:i?a.color:o.tabBtn(i,s).color})}}return o}const Ai=E("size");function ki({visible:e,onClose:t,onSubmit:n}){const[r,o]=B({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),[a,i]=B({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1}),[s,p]=B("online"),c=wi();J(()=>{e||(p("online"),o({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),i({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1}))},[e]);const f=async u=>{u.preventDefault();let y=!0;if(o(m=>({...m,amountError:"",rechargeChannelError:""})),r.amount.trim()||(o(m=>({...m,amountError:_("请输入充值金额")})),y=!1),r.rechargeChannel||(o(m=>({...m,rechargeChannelError:_("请选择支付平台")})),y=!1),!!y){o(m=>({...m,loading:!0,error:""}));try{await n({amount:r.amount,rechargeChannel:r.rechargeChannel,currency:r.currency}),t()}catch{o(m=>({...m,error:_("提交失败,请重试")}))}finally{o(m=>({...m,loading:!1}))}}};return d(Vn,{visible:e,onClose:t,title:_("充值 / 转账"),children:[d("div",{style:{display:"flex",marginBottom:Ai===l.SMALL?16:28},children:[d("button",{type:"button",onClick:()=>p("online"),style:c.tabBtn(s==="online",!0),children:_("在线充值")}),d("button",{type:"button",onClick:()=>p("offline"),style:c.tabBtn(s==="offline",!1),children:_("线下转账")})]}),d("div",{style:{display:s==="online"?"block":"none"},children:d("form",{onSubmit:f,children:d(fi,{formState:r,setFormState:o,onClose:t,loading:r.loading})})}),d("div",{style:{display:s==="offline"?"block":"none"},children:d(yi,{formState:a,setFormState:i,onClose:t,loading:a.loading})})]})}function mt(){return(mt=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 Ei=["context","children"];function Ci(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(r,o){if(r==null)return{};var a,i,s={},p=Object.keys(r);for(i=0;i<p.length;i++)o.indexOf(a=p[i])>=0||(s[a]=r[a]);return s}(e,Ei);return un(t,n)}function vi(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=ie(Ci,mt({},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=[],a={},i=0,s=n.attributes,p=n.childNodes;for(i=s.length;i--;)s[i].name!=="slot"&&(a[s[i].name]=s[i].value,a[Yn(s[i].name)]=s[i].value);for(i=p.length;i--;){var c=t(p[i],null),f=p[i].slot;f?a[f]=ie(Gt,{name:f},c):o[i]=c}var u=r?ie(Gt,null,o):o;return ie(r||n.nodeName.toLowerCase(),a,u)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?dn:ze)(this._vdom,this._root)}function Yn(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function Mi(e,t,n){if(this._vdom){var r={};r[e]=n=n??void 0,r[Yn(e)]=n,this._vdom=un(this._vdom,r),ze(this._vdom,this._root)}}function Ti(){ze(this._vdom=null,this._root)}function Gt(e,t){var n=this;return ie("slot",mt({},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 qe(e,t,n,r){function o(){var a=Reflect.construct(HTMLElement,[],o);return a._vdomComponent=e,a._root=r&&r.shadow?a.attachShadow({mode:r.mode||"open"}):a,a}return(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=vi,o.prototype.attributeChangedCallback=Mi,o.prototype.disconnectedCallback=Ti,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=n,n.forEach(function(a){Object.defineProperty(o.prototype,a,{get:function(){return this._vdom.props[a]},set:function(i){this._vdom?this.attributeChangedCallback(a,null,i):(this._props||(this._props={}),this._props[a]=i,this.connectedCallback());var s=typeof i;i!=null&&s!=="string"&&s!=="boolean"&&s!=="number"||this.setAttribute(a,i)}})}),customElements.define(t||e.tagName||e.displayName||e.name,o)}function Bi(){const[e,t]=B(!1),n=async r=>{const o=await Wn({amount:r.amount,currency:r.currency,rechargeChannel:r.rechargeChannel});window.open(o,"_blank")};return d("div",{children:[d(ht,{onClick:()=>t(!0),children:_("充值/转账")}),d(ki,{visible:e,onClose:()=>t(!1),onSubmit:n})]})}qe(Bi,"best-recharge",["theme"],{shadow:!1});function Ri(){const e=E("size"),t={wrapper:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:e===l.SMALL?12:20,alignItems:"start",minWidth:880,"@media (max-width: 1020px)":{gridTemplateColumns:"1fr",gap:16,minWidth:"auto",width:"100%"}},fieldLabel:{fontSize:e===l.SMALL?12:13,marginBottom:6,fontWeight:500,textAlign:"left"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,outline:"none",border:"1px solid",boxSizing:"border-box",paddingRight:e===l.SMALL?48:64},inputError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",marginTop:6,fontSize:e===l.SMALL?12:13},inputWrapper:{position:"relative"},inputSuffix:{padding:"0 8px",fontSize:e===l.SMALL?12:13,opacity:.8},inputSuffixAbs:{position:"absolute",top:0,right:e===l.SMALL?10:12,height:"100%",display:"flex",alignItems:"center",color:"#999",pointerEvents:"none",fontSize:e===l.SMALL?12:13},blockTitle:{fontSize:e===l.SMALL?16:18,fontWeight:700,marginBottom:e===l.SMALL?12:16,textAlign:"left",display:"flex",alignItems:"center",gap:8},subTitle:{marginTop:e===l.SMALL?10:14,marginBottom:e===l.SMALL?8:10,fontWeight:600,textAlign:"left"},titleBar:{width:3,height:e===l.SMALL?16:20,background:"#1890ff",borderRadius:2},methodList:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:10,"@media (max-width: 600px)":{gridTemplateColumns:"1fr",gap:8}},bankList:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:10,"@media (max-width: 600px)":{gridTemplateColumns:"1fr",gap:8}}};return{white:{...t,left:{background:"#fff",borderRadius:8,padding:16,border:"1px solid #E5E6EB"},right:{background:"#fff",borderRadius:8,padding:16},currencyRow:{display:"flex",gap:10,flexWrap:"wrap","@media (max-width: 480px)":{gap:8}},currencyItem:n=>({padding:"6px 12px",borderRadius:6,border:`1px solid ${n?"#1890ff":"#E5E6EB"}`,color:n?"#1890ff":"#222",background:n?"#EEF7FF":"#fff",cursor:"pointer"}),input:{...t.input,border:"1px solid #E5E6EB",background:"#fff",color:"#222"},payButton:{width:"100%",marginTop:e===l.SMALL?10:14,marginBottom:e===l.SMALL?12:16,background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"8px 12px":"12px 16px",fontWeight:600,cursor:"pointer"},methodItem:n=>({padding:"10px 12px",textAlign:"left",borderRadius:8,border:`1px solid ${n?"#1890ff":"#F0F1F3"}`,background:n?"#EEF7FF":"#F7F8FA",cursor:"pointer"}),bankItem:{padding:"10px 12px",borderRadius:8,border:"1px solid #F0F1F3",background:"#F7F8FA",textAlign:"left"},noticeBox:{marginTop:e===l.SMALL?8:12,marginBottom:e===l.SMALL?12:16,padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,background:"#FFF7E6",border:"1px solid #FFE7BA",color:"#AD6800",fontSize:e===l.SMALL?12:13},reminderTitle:{fontWeight:600,margin:"6px 0",textAlign:"left"},reminderList:{margin:0,paddingLeft:18,color:"#6b7280",lineHeight:1.6,textAlign:"left"}},dark:{...t,left:{background:"#181A20",borderRadius:8,padding:16,border:"1px solid #2B2E38"},right:{background:"#181A20",borderRadius:8,padding:16,border:"1px solid #2B2E38"},currencyRow:{display:"flex",gap:10,flexWrap:"wrap","@media (max-width: 480px)":{gap:8}},currencyItem:n=>({padding:"6px 12px",borderRadius:6,border:`1px solid ${n?"#00E8C6":"#374151"}`,color:n?"#00E8C6":"#fff",background:n?"#0F2824":"#23262F",cursor:"pointer"}),input:{...t.input,border:"1px solid #374151",background:"#23262F",color:"#fff"},payButton:{width:"100%",marginTop:e===l.SMALL?10:14,marginBottom:e===l.SMALL?12:16,background:"#00E8C6",color:"#111",border:"none",borderRadius:6,padding:e===l.SMALL?"8px 12px":"12px 16px",fontWeight:700,cursor:"pointer"},methodItem:n=>({padding:"10px 12px",textAlign:"left",borderRadius:8,border:`1px solid ${n?"#00E8C6":"#374151"}`,background:n?"#0F2824":"#23262F",color:"#fff",cursor:"pointer"}),bankItem:{padding:"10px 12px",borderRadius:8,border:"1px solid #374151",background:"#23262F",textAlign:"left",color:"#fff"},noticeBox:{marginTop:e===l.SMALL?8:12,marginBottom:e===l.SMALL?12:16,padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,background:"#2A1F0F",border:"1px solid #5C3E12",color:"#F4E3C1",fontSize:e===l.SMALL?12:13},reminderTitle:{fontWeight:600,margin:"6px 0",textAlign:"left",color:"#fff"},reminderList:{margin:0,paddingLeft:18,color:"#B5B8BE",lineHeight:1.6,textAlign:"left"}}}}function Fi(){const e=E("theme"),t=E("themeConfig"),n=e===N.WHITE,r=Ri(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,payButton:{...o.payButton,background:a.color},currencyItem:i=>({...o.currencyItem(i),border:`1px solid ${i?a.color:n?"#E5E6EB":"#374151"}`,color:i?a.color:n?"#222":"#fff"}),methodItem:i=>({...o.methodItem(i),border:`1px solid ${i?a.color:n?"#F0F1F3":"#374151"}`})}}return o}function Ii(){const e=E("size"),t={left:{background:"#fff",borderRadius:8,padding:16,border:"1px solid #E5E6EB"},blockTitle:{fontSize:e===l.SMALL?16:18,fontWeight:700,marginBottom:e===l.SMALL?12:16,textAlign:"left",display:"flex",alignItems:"center",gap:8},titleBar:{width:3,height:e===l.SMALL?16:20,background:"#1890ff",borderRadius:2},fieldLabel:{fontSize:e===l.SMALL?14:16,marginBottom:6,fontWeight:500,textAlign:"left"},required:{color:"#ff4d4f",marginRight:4},currencyRow:{display:"flex",gap:10,flexWrap:"wrap","@media (max-width: 600px)":{gap:8}},currencyItem:n=>({padding:"6px 12px",borderRadius:6,border:`1px solid ${n?"#1890ff":"#E5E6EB"}`,color:n?"#1890ff":"#222",background:n?"#EEF7FF":"#fff",cursor:"pointer"}),inputWrapper:{position:"relative"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,outline:"none",border:"1px solid",boxSizing:"border-box",paddingRight:e===l.SMALL?48:64},inputError:{border:"1px solid #ff4d4f"},inputSuffixAbs:{position:"absolute",top:0,right:e===l.SMALL?10:12,height:"100%",display:"flex",alignItems:"center",color:"#999",pointerEvents:"none",fontSize:e===l.SMALL?12:13},bizRateBox:{marginTop:6,color:"#666",fontSize:e===l.SMALL?12:13,textAlign:"left",lineHeight:1.6},bizRateStrong:{color:"#111",fontWeight:600},subTitle:{fontSize:e===l.SMALL?12:14,marginTop:e===l.SMALL?10:14,marginBottom:e===l.SMALL?8:10,textAlign:"left"},methodList:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:10,"@media (max-width: 600px)":{gridTemplateColumns:"1fr",gap:8}},methodItem:n=>({padding:"12px 16px",textAlign:"left",borderRadius:10,border:`1px solid ${n?"#1890ff":"#F0F1F3"}`,background:n?"#EEF7FF":"#F7F8FA",cursor:"pointer",display:"flex",alignItems:"center",gap:8,minHeight:44}),channelIcon:{width:22,height:22,objectFit:"contain",marginRight:8,display:"inline-block"},bankList:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:10,"@media (max-width: 600px)":{gridTemplateColumns:"1fr",gap:8}},bankItem:n=>({padding:"12px 16px",borderRadius:10,border:`1px solid ${n?"#1890ff":"#F0F1F3"}`,background:n?"#EEF7FF":"#F7F8FA",textAlign:"left",cursor:"pointer",display:"flex",alignItems:"center",gap:8,minHeight:44}),error:{color:"#ff4d4f",marginTop:6,fontSize:e===l.SMALL?12:13}};return{white:{...t,input:{...t.input,border:"1px solid #E5E6EB",background:"#fff",color:"#222"}},dark:{...t,left:{background:"#181A20",borderRadius:8,padding:16,border:"1px solid #2B2E38"},titleBar:{...t.titleBar,background:"#00E8C6"},currencyItem:n=>({padding:"6px 12px",borderRadius:6,border:`1px solid ${n?"#00E8C6":"#374151"}`,color:n?"#00E8C6":"#fff",background:n?"#0F2824":"#23262F",cursor:"pointer"}),input:{...t.input,border:"1px solid #374151",background:"#23262F",color:"#fff"},methodItem:n=>({padding:"12px 16px",textAlign:"left",borderRadius:10,border:`1px solid ${n?"#00E8C6":"#374151"}`,background:n?"#0F2824":"#23262F",color:"#fff",cursor:"pointer",display:"flex",alignItems:"center",gap:8,minHeight:44}),bankItem:n=>({padding:"12px 16px",borderRadius:10,border:`1px solid ${n?"#00E8C6":"#374151"}`,background:n?"#0F2824":"#23262F",textAlign:"left",color:"#fff",cursor:"pointer",display:"flex",alignItems:"center",gap:8,minHeight:44})}}}function Di(){const e=E("theme"),t=E("themeConfig"),n=e===N.WHITE,r=Ii(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,titleBar:{...o.titleBar,background:a.color},currencyItem:i=>({...o.currencyItem(i),border:`1px solid ${i?a.color:n?"#E5E6EB":"#374151"}`,color:i?a.color:n?"#222":"#fff"}),methodItem:i=>({...o.methodItem(i),border:`1px solid ${i?a.color:n?"#F0F1F3":"#374151"}`}),bankItem:i=>({...o.bankItem(i),border:`1px solid ${i?a.color:n?"#F0F1F3":"#374151"}`})}}return o}function zi({onChannelChange:e,onAmountChange:t,onCurrencyChange:n,initialAmount:r="",initialCurrency:o="USD",initialPaymentType:a="online",amountError:i=""}){const s=Di(),c=JSON.parse(sessionStorage.getItem("all_dicts")||"{}")?.currency||[],[f,u]=B([]),[y,m]=B([]),[h,x]=B({currency:o,amount:r,onlineChannel:"",bankChannel:"",paymentType:a,amountError:""}),[b,S]=B(null),L=se(null),T=(w,F)=>{const U=w!==void 0?w:h.amount,$=F!==void 0?F:h.currency;if(!U||Number(U)<=0){S(null);return}L.current&&clearTimeout(L.current),L.current=window.setTimeout(()=>{Jo({currency:$,amount:U}).then(V=>S(V)).catch(()=>S(null))},300)};J(()=>{qo({currency:h.currency}).then(w=>{const F=w.onlineChannel||[],U=w.offlineChannel||[];u(F),m(U);const $=F.length>0,V=U?.[0]?.value||"",Se=F?.[0]?.value||"",de=$?a:"bank",k=de==="online"?Se:V;x(v=>({...v,onlineChannel:Se,bankChannel:V,paymentType:de})),k&&e(k,de)})},[h.currency]);function A(w){return w=w.replace(/[^\d.]/g,""),w=w.replace(/\.(?=.*\.)/g,""),w=w.replace(/^(\d+)(\.\d{0,2})?.*$/,"$1$2"),w=w.replace(/^0+(\d)/,"$1"),w.startsWith(".")&&(w="0"+w),w}const M=w=>{x(F=>({...F,currency:w})),n(w),T(void 0,w)},R=w=>{const F=A(w);x(U=>({...U,amount:F,amountError:""})),t(F),T(F)},P=(w,F)=>{x(U=>({...U,[F==="online"?"onlineChannel":"bankChannel"]:w,paymentType:F})),e(w,F),T()};return d("div",{style:s.left,children:[d("div",{style:s.blockTitle,children:[d("span",{style:s.titleBar}),_("选择支付方式")]}),d("div",{style:s.fieldLabel,children:_("支付币种")}),d("div",{style:s.currencyRow,children:(c||[]).slice(0,4).map(w=>d("button",{type:"button",onClick:()=>M(w.value),style:s.currencyItem(h.currency===w.value),children:w.label}))}),d("div",{style:{height:12}}),d("div",{style:s.fieldLabel,children:[d("span",{style:s.required,children:"*"}),_("支付金额")]}),d("div",{style:s.inputWrapper,children:[d("input",{type:"text",placeholder:_("请输入充值金额"),value:h.amount,onInput:w=>{R(w.target.value)},style:{...s.input,...i?s.inputError:{}}}),d("div",{style:s.inputSuffixAbs,children:h.currency})]}),i&&d("div",{style:s.error,children:i}),b&&b.consistent===!1&&d("div",{style:s.bizRateBox,children:[d("div",{children:_("您的支付币种与默认币种不一致,将转换为默认币种入账")}),d("div",{children:[_("目前汇率为:")," ",h.currency,_(`→${b.currency} = `),d("span",{style:s.bizRateStrong,children:b.exchangeRate})]}),d("div",{children:[_("钱包预计增加"),d("span",{style:s.bizRateStrong,children:[b.currency," ",b.amount]})]})]}),d("div",{style:{height:20}}),d("div",{style:s.fieldLabel,children:_("支付方式")}),f.length>0&&d("div",{children:[d("div",{style:s.subTitle,children:_("线上支付")}),d("div",{style:s.methodList,children:f.map(w=>d("button",{type:"button",onClick:()=>P(w.value,"online"),style:s.methodItem(h.onlineChannel===w.value&&h.paymentType==="online"),children:[w.icon&&d("img",{src:w.icon,alt:w.label,style:s.channelIcon}),w.label]}))})]}),d("div",{style:s.subTitle,children:_("银行转账")}),d("div",{style:s.bankList,children:y.map(w=>d("button",{type:"button",onClick:()=>P(w.value,"bank"),style:s.bankItem(h.bankChannel===w.value&&h.paymentType==="bank"),children:[w.icon&&d("img",{src:w.icon,alt:w.label,style:s.channelIcon}),w.label]}))})]})}function Oi(){const e=E("size"),t={right:{background:"#fff",borderRadius:8,padding:16},blockTitle:{fontSize:e===l.SMALL?16:18,fontWeight:700,marginBottom:e===l.SMALL?12:16,textAlign:"left",display:"flex",alignItems:"center",gap:8},titleBar:{width:3,height:e===l.SMALL?16:20,background:"#1890ff",borderRadius:2},inputWrapper:{position:"relative"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,outline:"none",border:"1px solid",boxSizing:"border-box",paddingRight:e===l.SMALL?48:64},inputError:{border:"1px solid #ff4d4f"},disabled:{backgroundColor:"#f5f5f5",color:"#999",cursor:"not-allowed"},disabledDark:{backgroundColor:"#1A1D23",color:"#6B7280",cursor:"not-allowed",border:"1px solid #374151"},inputSuffixAbs:{position:"absolute",top:0,right:e===l.SMALL?10:12,height:"100%",display:"flex",alignItems:"center",color:"#999",pointerEvents:"none",fontSize:e===l.SMALL?12:13},payButton:{width:"100%",marginTop:e===l.SMALL?10:14,marginBottom:e===l.SMALL?12:16,background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"8px 12px":"12px 16px",fontWeight:600,cursor:"pointer"},noticeBox:{marginTop:e===l.SMALL?8:12,marginBottom:e===l.SMALL?12:16,padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,background:"#FFF7E6",border:"1px solid #FFE7BA",color:"#AD6800",fontSize:e===l.SMALL?12:13},calcBox:{marginTop:e===l.SMALL?8:12,marginBottom:e===l.SMALL?8:12,color:"#666",textAlign:"left",lineHeight:1.6,fontSize:e===l.SMALL?12:13},calcLine:{marginBottom:4},calcAmount:{color:"#ff4d4f",fontWeight:700,margin:"0 4px"},reminderTitle:{fontWeight:600,margin:"6px 0",textAlign:"left"},reminderList:{margin:0,paddingLeft:18,color:"#6b7280",lineHeight:1.6,textAlign:"left",listStyleType:"disc",listStylePosition:"outside"},listItem:{listStyleType:"disc",listStylePosition:"outside"},error:{color:"#ff4d4f",marginTop:6,fontSize:e===l.SMALL?12:13}};return{white:{...t,input:{...t.input,border:"1px solid #E5E6EB",background:"#fff",color:"#222"}},dark:{...t,right:{background:"#181A20",borderRadius:8,padding:16,border:"1px solid #2B2E38"},titleBar:{...t.titleBar,background:"#00E8C6"},input:{...t.input,border:"1px solid #374151",background:"#23262F",color:"#fff"},payButton:{...t.payButton,background:"#00E8C6",color:"#111",fontWeight:700},noticeBox:{...t.noticeBox,background:"#2A1F0F",border:"1px solid #5C3E12",color:"#F4E3C1"},reminderTitle:{...t.reminderTitle,color:"#fff"},reminderList:{...t.reminderList,color:"#B5B8BE"}}}}function Pi(){const e=E("theme"),t=E("themeConfig"),n=e===N.WHITE,r=Oi(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,payButton:{...o.payButton,background:a.color},titleBar:{...o.titleBar,background:a.color}}}return o}function Ni({onSubmit:e,amount:t,currency:n,channel:r,loading:o=!1,error:a="",onAmountError:i}){const s=Pi(),p=s.right.background==="#181A20",[c,f]=B({amount:t,currency:n,channel:r,loading:o,error:a,amountError:""}),[u,y]=B(null);J(()=>{f(x=>({...x,amount:t,currency:n,channel:r,loading:o,error:a}));const h=setTimeout(()=>{t&&r&&n?Hn({channel:r,amount:t,currency:n}).then(x=>y(x)).catch(()=>y(null)):y(null)},300);return()=>clearTimeout(h)},[t,n,r,o,a]);const m=async h=>{h&&h.preventDefault();let x=!0;if(t.trim()||(x=!1,i?.(_("请输入充值金额"))),r||(x=!1,f(b=>({...b,error:_("请选择支付平台")}))),!!x){f(b=>({...b,loading:!0,error:""}));try{await e({amount:t,currency:n,rechargeChannel:r})}finally{f(b=>({...b,loading:!1}))}}};return d("div",{style:s.right,children:[d("div",{style:s.blockTitle,children:[d("span",{style:s.titleBar}),_("在线支付")]}),d("form",{onSubmit:m,children:[d("div",{style:s.inputWrapper,children:[d("input",{type:"text",placeholder:_("支付金额"),value:c.amount,readOnly:!0,disabled:!0,style:{...s.input,...p?s.disabledDark:s.disabled,width:"100%"}}),d("div",{style:s.inputSuffixAbs,children:c.currency})]}),d("button",{type:"submit",disabled:c.loading,style:s.payButton,children:c.loading?_("提交中..."):_("立即支付")})]}),u&&d("div",{style:s.calcBox,children:[d("div",{style:s.calcLine,children:[_("预计支付金额约为:"),d("span",{style:s.calcAmount,children:`$${u.paymentAmount}`}),u.currency]}),d("div",{style:s.calcLine,children:[_("手续费约为:"),d("span",{style:s.calcAmount,children:`$${u.fee}`}),u.currency]}),d("div",{children:_("注:地区/币种/卡类型可能影响手续费,最终以平台为准。")})]}),d("div",{style:s.noticeBox,children:_("请在转账后提交银行回单,否则可能无法及时核验")}),d("div",{style:s.reminderTitle,children:_("温馨提示")}),d("ul",{style:s.reminderList,children:[d("li",{style:s.listItem,children:_("支付金额须与申请金额一致,请勿多付、少付或分批提交。")}),d("li",{style:s.listItem,children:_("请妥善保存回单并提供准确的支付时间,否则可能无法核验。")}),d("li",{style:s.listItem,children:_("工作时间提交4小时内审核,非工作时间将顺延至下一个工作日。")}),d("li",{style:s.listItem,children:_("如有问题,请联系平台客服。")}),d("li",{style:s.listItem,children:_("预付充值将收取平台服务费,具体以官方为准。")})]}),c.error&&d("div",{style:s.error,children:c.error})]})}function Ui(){const e=E("size"),t={container:{background:"#fff",borderRadius:8,padding:e===l.SMALL?14:16,width:"100%",maxWidth:"100%",boxSizing:"border-box","@media (max-width: 1020px)":{padding:e===l.SMALL?12:16}},header:{marginBottom:e===l.SMALL?16:20},backButton:{display:"flex",alignItems:"center",gap:8,background:"none",border:"none",color:"#1890ff",cursor:"pointer",fontSize:e===l.SMALL?13:14,fontWeight:500},backIcon:{fontSize:e===l.SMALL?16:18},uploadSection:{marginBottom:e===l.SMALL?18:24},uploadArea:{border:"2px dashed #D9D9D9",borderRadius:8,padding:e===l.SMALL?"30px 16px":"40px 20px",textAlign:"center",cursor:"pointer",background:"#FAFAFA",transition:"all 0.3s ease",width:"100%",boxSizing:"border-box","@media (max-width: 600px)":{padding:e===l.SMALL?"30px 15px":"40px 20px"}},uploadIcon:{fontSize:e===l.SMALL?40:52,marginBottom:e===l.SMALL?10:12},uploadTitle:{fontSize:e===l.SMALL?14:16,fontWeight:600,color:"#222",marginBottom:e===l.SMALL?6:10},uploadHint:{fontSize:e===l.SMALL?12:13,color:"#999"},hiddenInput:{display:"none"},fileList:{marginTop:e===l.SMALL?10:12},fileItem:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:e===l.SMALL?"6px 10px":"8px 12px",background:"#F5F5F5",borderRadius:6,marginBottom:6},fileName:{fontSize:e===l.SMALL?12:13,color:"#222"},removeButton:{background:"#ff4d4f",color:"#fff",border:"none",borderRadius:"50%",width:20,height:20,cursor:"pointer",fontSize:12,display:"flex",alignItems:"center",justifyContent:"center"},fieldSection:{marginBottom:e===l.SMALL?12:16},fieldLabel:{display:"block",fontSize:e===l.SMALL?13:14,fontWeight:500,color:"#222",marginBottom:e===l.SMALL?6:10},required:{color:"#ff4d4f",marginRight:4},inputWrapper:{position:"relative"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,border:"1px solid #D9D9D9",outline:"none",fontSize:14,boxSizing:"border-box"},inputError:{border:"1px solid #ff4d4f"},disabled:{backgroundColor:"#f5f5f5",color:"#999",cursor:"not-allowed"},disabledDark:{backgroundColor:"#1A1D23",color:"#6B7280",cursor:"not-allowed",border:"1px solid #374151"},calendarIcon:{position:"absolute",right:e===l.SMALL?8:10,top:"50%",transform:"translateY(-50%)",fontSize:e===l.SMALL?12:14,pointerEvents:"none"},currencySuffix:{position:"absolute",right:e===l.SMALL?10:12,top:"50%",transform:"translateY(-50%)",fontSize:e===l.SMALL?12:14,color:"#999",pointerEvents:"none"},buttonSection:{display:"flex",gap:e===l.SMALL?10:12,marginTop:e===l.SMALL?24:32,width:"100%",boxSizing:"border-box","@media (max-width: 600px)":{flexDirection:"column",gap:e===l.SMALL?8:12}},cancelButton:{flex:1,padding:e===l.SMALL?"8px 12px":"10px 16px",borderRadius:6,border:"1px solid #D9D9D9",background:"#fff",color:"#222",fontSize:e===l.SMALL?12:14,fontWeight:500,cursor:"pointer",minWidth:0,boxSizing:"border-box"},submitButton:{flex:1,padding:e===l.SMALL?"8px 12px":"10px 16px",borderRadius:6,border:"none",background:"#1890ff",color:"#fff",fontSize:e===l.SMALL?12:14,fontWeight:600,cursor:"pointer",minWidth:0,boxSizing:"border-box"},error:{color:"#ff4d4f",fontSize:e===l.SMALL?12:13,marginTop:6}};return{white:{...t},dark:{...t,container:{...t.container,background:"#181A20",border:"1px solid #2B2E38"},backButton:{...t.backButton,color:"#00E8C6"},uploadArea:{...t.uploadArea,border:"2px dashed #374151",background:"#23262F"},uploadTitle:{...t.uploadTitle,color:"#fff"},uploadHint:{...t.uploadHint,color:"#B5B8BE"},fileItem:{...t.fileItem,background:"#2B2E38"},fileName:{...t.fileName,color:"#fff"},fieldLabel:{...t.fieldLabel,color:"#fff"},input:{...t.input,border:"1px solid #374151",background:"#23262F",color:"#fff"},calendarIcon:{...t.calendarIcon,color:"#B5B8BE"},currencySuffix:{...t.currencySuffix,color:"#B5B8BE"},cancelButton:{...t.cancelButton,border:"1px solid #374151",background:"#23262F",color:"#fff"},submitButton:{...t.submitButton,background:"#00E8C6",color:"#111"}}}}function $i(){const e=E("theme"),t=E("themeConfig"),n=e===N.WHITE,r=Ui(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,backButton:{...o.backButton,color:a.color},submitButton:{...o.submitButton,background:a.color}}}return o}function Wi(){const e=E("theme"),t=E("themeConfig"),n={container:{position:"relative",display:"inline-block"},input:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 12px",border:"1px solid #d9d9d9",borderRadius:"6px",backgroundColor:"#fff",cursor:"pointer",transition:"all 0.3s",outline:"none",fontSize:"14px",lineHeight:"1.5715",color:"rgba(0, 0, 0, 0.85)"},inputText:{flex:1,textAlign:"left",color:"rgba(0, 0, 0, 0.85)"},calendarIcon:{fontSize:"16px",color:"rgba(0, 0, 0, 0.45)",marginLeft:"8px"},disabled:{backgroundColor:"#f5f5f5",color:"rgba(0, 0, 0, 0.25)",cursor:"not-allowed"},panel:{position:"absolute",top:"100%",left:0,zIndex:1050,backgroundColor:"#fff",border:"1px solid #d9d9d9",borderRadius:"6px",boxShadow:"0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05)",padding:"8px",minWidth:"280px",marginTop:"4px"},header:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 0",marginBottom:"8px"},navButton:{display:"flex",alignItems:"center",justifyContent:"center",width:"24px",height:"24px",border:"none",backgroundColor:"transparent",cursor:"pointer",borderRadius:"4px",fontSize:"16px",color:"rgba(0, 0, 0, 0.45)",transition:"all 0.3s"},monthYear:{fontSize:"16px",fontWeight:500,color:"rgba(0, 0, 0, 0.85)"},weekHeader:{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:"4px",marginBottom:"8px"},weekDay:{display:"flex",alignItems:"center",justifyContent:"center",height:"32px",fontSize:"14px",fontWeight:500,color:"rgba(0, 0, 0, 0.85)"},calendarGrid:{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:"4px"},dayButton:{display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",border:"none",backgroundColor:"transparent",cursor:"pointer",borderRadius:"4px",fontSize:"14px",transition:"all 0.3s",color:"rgba(0, 0, 0, 0.85)"},dayCurrentMonth:{color:"rgba(0, 0, 0, 0.85)"},dayOtherMonth:{color:"rgba(0, 0, 0, 0.25)"},dayToday:{fontWeight:600,color:"#1890ff"},daySelected:{backgroundColor:"#1890ff",color:"#fff"},yearPicker:{maxHeight:"200px",overflowY:"auto",marginBottom:"8px",border:"1px solid #f0f0f0",borderRadius:"4px",padding:"8px"},yearGrid:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:"4px"},yearButton:{display:"flex",alignItems:"center",justifyContent:"center",padding:"6px 8px",border:"none",backgroundColor:"transparent",cursor:"pointer",borderRadius:"4px",fontSize:"14px",transition:"all 0.3s",color:"rgba(0, 0, 0, 0.85)"},yearSelected:{backgroundColor:"#1890ff",color:"#fff"},small:{padding:"4px 8px",fontSize:"12px"},middle:{padding:"8px 12px",fontSize:"14px"},large:{padding:"12px 16px",fontSize:"16px"}},r={white:{...n,input:{...n.input,border:"1px solid #d9d9d9",backgroundColor:"#fff",color:"rgba(0, 0, 0, 0.85)"},inputText:{...n.inputText,color:"rgba(0, 0, 0, 0.85)"},calendarIcon:{...n.calendarIcon,color:"rgba(0, 0, 0, 0.45)"},disabled:{...n.disabled,backgroundColor:"#f5f5f5",color:"rgba(0, 0, 0, 0.25)"},panel:{...n.panel,backgroundColor:"#fff",border:"1px solid #d9d9d9"},navButton:{...n.navButton,color:"rgba(0, 0, 0, 0.45)"},monthYear:{...n.monthYear,color:"rgba(0, 0, 0, 0.85)"},weekDay:{...n.weekDay,color:"rgba(0, 0, 0, 0.85)"},dayButton:{...n.dayButton,color:"rgba(0, 0, 0, 0.85)"},dayCurrentMonth:{...n.dayCurrentMonth,color:"rgba(0, 0, 0, 0.85)"},dayOtherMonth:{...n.dayOtherMonth,color:"rgba(0, 0, 0, 0.25)"},dayToday:{...n.dayToday,color:"#1890ff"},daySelected:{...n.daySelected,backgroundColor:"#1890ff",color:"#fff"},yearPicker:{...n.yearPicker,border:"1px solid #f0f0f0"},yearButton:{...n.yearButton,color:"rgba(0, 0, 0, 0.85)"},yearSelected:{...n.yearSelected,backgroundColor:"#1890ff",color:"#fff"}},dark:{...n,input:{...n.input,border:"1px solid #434343",backgroundColor:"#141414",color:"rgba(255, 255, 255, 0.85)"},inputText:{...n.inputText,color:"rgba(255, 255, 255, 0.85)"},calendarIcon:{...n.calendarIcon,color:"rgba(255, 255, 255, 0.45)"},disabled:{...n.disabled,backgroundColor:"#262626",color:"rgba(255, 255, 255, 0.25)"},panel:{...n.panel,backgroundColor:"#141414",border:"1px solid #434343"},navButton:{...n.navButton,color:"rgba(255, 255, 255, 0.45)"},monthYear:{...n.monthYear,color:"rgba(255, 255, 255, 0.85)"},weekDay:{...n.weekDay,color:"rgba(255, 255, 255, 0.85)"},dayButton:{...n.dayButton,color:"rgba(255, 255, 255, 0.85)"},dayCurrentMonth:{...n.dayCurrentMonth,color:"rgba(255, 255, 255, 0.85)"},dayOtherMonth:{...n.dayOtherMonth,color:"rgba(255, 255, 255, 0.25)"},dayToday:{...n.dayToday,color:"#00E8C6"},daySelected:{...n.daySelected,backgroundColor:"#00E8C6",color:"#111"},yearPicker:{...n.yearPicker,border:"1px solid #434343"},yearButton:{...n.yearButton,color:"rgba(255, 255, 255, 0.85)"},yearSelected:{...n.yearSelected,backgroundColor:"#00E8C6",color:"#111"}}},o=r[e]||r.white,a=t?.[e]?.color;return a&&(o.dayToday.color=a,o.daySelected.backgroundColor=a,o.yearSelected.backgroundColor=a,e==="dark"&&(o.daySelected.color="#111",o.yearSelected.color="#111")),o}function Hi(){return Wi()}function ji({value:e="",placeholder:t=_("请选择日期"),disabled:n=!1,size:r="middle",onChange:o,onFocus:a,onBlur:i,className:s="",style:p={}}){const c=Hi(),[f,u]=B(!1),[y,m]=B(e),[h,x]=B(new Date),[b,S]=B(!1),L=se(null),T=k=>{if(!k)return"";const v=new Date(k);return`${v.getFullYear()}-${String(v.getMonth()+1).padStart(2,"0")}-${String(v.getDate()).padStart(2,"0")}`},A=(k,v)=>new Date(k,v+1,0).getDate(),M=(k,v)=>new Date(k,v,1).getDay(),R=()=>{const k=h.getFullYear(),v=h.getMonth(),ue=A(k,v),Gn=M(k,v),fe=[],gt=v===0?11:v-1,bt=v===0?k-1:k,yt=A(bt,gt);for(let H=Gn-1;H>=0;H--)fe.push({date:yt-H,isCurrentMonth:!1,isToday:!1,isSelected:!1,fullDate:`${bt}-${String(gt+1).padStart(2,"0")}-${String(yt-H).padStart(2,"0")}`});const Kn=new Date,xt=y?new Date(y):null;for(let H=1;H<=ue;H++){const _t=`${k}-${String(v+1).padStart(2,"0")}-${String(H).padStart(2,"0")}`,St=new Date(_t);fe.push({date:H,isCurrentMonth:!0,isToday:St.toDateString()===Kn.toDateString(),isSelected:xt&&St.toDateString()===xt.toDateString(),fullDate:_t})}const Xn=v===11?0:v+1,Zn=v===11?k+1:k,Qn=42-fe.length;for(let H=1;H<=Qn;H++)fe.push({date:H,isCurrentMonth:!1,isToday:!1,isSelected:!1,fullDate:`${Zn}-${String(Xn+1).padStart(2,"0")}-${String(H).padStart(2,"0")}`});return fe},P=k=>{m(k),u(!1),o?.(k)},w=k=>{const v=new Date(h);k==="prev"?v.setMonth(v.getMonth()-1):v.setMonth(v.getMonth()+1),x(v)},F=k=>{const v=new Date(h);k==="prev"?v.setFullYear(v.getFullYear()-1):v.setFullYear(v.getFullYear()+1),x(v)},U=k=>{const v=new Date(h);v.setFullYear(k),x(v),S(!1)},$=()=>{const k=new Date().getFullYear(),v=[];for(let ue=k-50;ue<=k+50;ue++)v.push(ue);return v};J(()=>{const k=v=>{L.current&&!L.current.contains(v.target)&&u(!1)};if(f)return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[f]);const V=R(),Se=[_("一月"),_("二月"),_("三月"),_("四月"),_("五月"),_("六月"),_("七月"),_("八月"),_("九月"),_("十月"),_("十一月"),_("十二月")],de=[_("日"),_("一"),_("二"),_("三"),_("四"),_("五"),_("六")];return d("div",{ref:L,className:`date-picker-container ${s}`,style:{...c.container,...p},children:[d("div",{style:{...c.input,...c[r],...n?c.disabled:{}},onClick:()=>!n&&u(!f),onFocus:a,onBlur:i,children:[d("span",{style:c.inputText,children:y?T(y):t}),d("span",{style:c.calendarIcon,children:"📅"})]}),f&&d("div",{style:c.panel,children:[d("div",{style:c.header,children:[d("button",{type:"button",style:c.navButton,onClick:()=>F("prev"),children:"‹‹"}),d("button",{type:"button",style:c.navButton,onClick:()=>w("prev"),children:"‹"}),d("span",{style:c.monthYear,onClick:()=>S(!b),children:[h.getFullYear(),"年",Se[h.getMonth()]]}),d("button",{type:"button",style:c.navButton,onClick:()=>w("next"),children:"›"}),d("button",{type:"button",style:c.navButton,onClick:()=>F("next"),children:"››"})]}),b&&d("div",{style:c.yearPicker,children:d("div",{style:c.yearGrid,children:$().map(k=>d("button",{type:"button",style:{...c.yearButton,...k===h.getFullYear()?c.yearSelected:{}},onClick:()=>U(k),children:k},k))})}),d("div",{style:c.weekHeader,children:de.map(k=>d("div",{style:c.weekDay,children:k},k))}),d("div",{style:c.calendarGrid,children:V.map((k,v)=>d("button",{type:"button",style:{...c.dayButton,...k.isCurrentMonth?c.dayCurrentMonth:c.dayOtherMonth,...k.isToday?c.dayToday:{},...k.isSelected?c.daySelected:{}},onClick:()=>P(k.fullDate),disabled:n,children:k.date},v))})]})]})}function qi({onBack:e,onCancel:t,currency:n="USD",amount:r="",channel:o="",onAmountError:a}){const i=$i(),s=i.container.background==="#181A20",p=new Date,c=`${p.getFullYear()}-${String(p.getMonth()+1).padStart(2,"0")}-${String(p.getDate()).padStart(2,"0")}`,[f,u]=B({urls:[],transferTime:c,transferAmount:r,transactionId:"",payerName:"",filesError:"",timeError:"",amountError:"",transactionIdError:"",payerNameError:""});J(()=>{u(m=>({...m,transferAmount:r}))},[r]);const y=async()=>{let m=!0;if(f.urls.length===0&&(m=!1,u(h=>({...h,filesError:_("请上传银行转账回单")}))),f.transferTime||(m=!1,u(h=>({...h,timeError:_("请选择转账时间")}))),r.trim()||(m=!1,a?.(_("请输入充值金额"))),f.transactionId.trim()||(m=!1,u(h=>({...h,transactionIdError:_("请输入转账交易ID")}))),f.payerName.trim()||(m=!1,u(h=>({...h,payerNameError:_("请输入付款人名称")}))),!!m)try{await $n({transferDate:f.transferTime,transferNo:f.transactionId,transferChannel:o,voucherUrls:f.urls,payerName:f.payerName,submitAmount:r,submitCurrency:n}),Ie.success(_("提交成功")),t()}finally{u(h=>({...h,loading:!1}))}};return d("div",{style:i.container,children:[d("div",{style:i.header,children:d("button",{type:"button",onClick:e,style:i.backButton,children:[d("span",{style:i.backIcon,children:"←"}),_("返回账户信息")]})}),d("div",{style:i.uploadSection,children:[d(Jn,{value:f.urls,onChange:m=>{u(h=>({...h,urls:m,filesError:""}))},maxCount:10,accept:"image/*,.pdf",multiple:!0}),f.filesError&&d("div",{style:i.error,children:f.filesError})]}),d("div",{style:i.fieldSection,children:[d("label",{style:i.fieldLabel,children:[d("span",{style:i.required,children:"*"}),_("转账时间")]}),d(ji,{value:f.transferTime,placeholder:_("请选择转账时间"),onChange:m=>{u(h=>({...h,transferTime:m,timeError:""}))},style:{width:"100%"}}),f.timeError&&d("div",{style:i.error,children:f.timeError})]}),d("div",{style:i.fieldSection,children:[d("label",{style:i.fieldLabel,children:_("转账金额")}),d("div",{style:i.inputWrapper,children:[d("input",{type:"text",placeholder:_("请输入实际转账金额"),value:f.transferAmount,readOnly:!0,disabled:!0,style:{...i.input,...s?i.disabledDark:i.disabled}}),d("span",{style:i.currencySuffix,children:n})]})]}),d("div",{style:i.fieldSection,children:[d("label",{style:i.fieldLabel,children:[d("span",{style:i.required,children:"*"}),_("交易ID")]}),d("input",{type:"text",placeholder:_("请输入转账交易ID"),value:f.transactionId,onChange:m=>{u(h=>({...h,transactionId:m.target.value,transactionIdError:""}))},style:{...i.input,...f.transactionIdError?i.inputError:{}}}),f.transactionIdError&&d("div",{style:i.error,children:f.transactionIdError})]}),d("div",{style:i.fieldSection,children:[d("label",{style:i.fieldLabel,children:[d("span",{style:i.required,children:"*"}),_("付款人名称")]}),d("input",{type:"text",placeholder:_("请输入付款人名称"),value:f.payerName,onChange:m=>{u(h=>({...h,payerName:m.target.value,payerNameError:""}))},style:{...i.input,...f.payerNameError?i.inputError:{}}}),f.payerNameError&&d("div",{style:i.error,children:f.payerNameError})]}),d("div",{style:i.buttonSection,children:[d("button",{type:"button",onClick:t,style:i.cancelButton,children:_("取消")}),d("button",{type:"button",onClick:y,style:i.submitButton,children:_("提交审核")})]})]})}function Ji(){const e=E("size"),t={container:{background:"#fff",borderRadius:8,padding:e===l.SMALL?16:20,width:"100%",maxWidth:"100%",boxSizing:"border-box","@media (max-width: 1020px)":{maxWidth:"100%",margin:0,padding:e===l.SMALL?12:16},"@media (min-width: 1021px)":{maxWidth:600,margin:"0 auto"}},header:{fontSize:e===l.SMALL?16:18,fontWeight:700,marginBottom:e===l.SMALL?16:20,textAlign:"left",display:"flex",alignItems:"center",gap:8},titleBar:{width:3,height:e===l.SMALL?16:20,background:"#1890ff",borderRadius:2},bankDetails:{marginBottom:e===l.SMALL?20:24},detailCard:{marginTop:12,marginBottom:12,border:"1px solid #f0f0f0",borderRadius:8,background:"#fafafa",overflow:"hidden"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:e===l.SMALL?"8px 0":"10px 0",borderBottom:"1px solid #f0f0f0",width:"100%",boxSizing:"border-box","@media (max-width: 600px)":{flexDirection:"column",alignItems:"flex-start",gap:4}},label:{fontSize:e===l.SMALL?13:14,color:"#666",fontWeight:500,minWidth:120,"@media (max-width: 600px)":{minWidth:"auto",marginBottom:2}},value:{fontSize:e===l.SMALL?13:14,color:"#222",fontWeight:500,textAlign:"right",flex:1,"@media (max-width: 600px)":{textAlign:"left",flex:"none",width:"100%"}},valueWithCopy:{display:"flex",alignItems:"center",gap:8,flex:1,justifyContent:"flex-end",minWidth:0,"@media (max-width: 600px)":{flex:"none",width:"100%",justifyContent:"flex-start"}},row:{display:"flex",alignItems:"center",padding:"10px 12px",borderBottom:"1px solid #ededed"},rowLast:{borderBottom:"none"},rowAlt:{background:"#fafafa"},labelMuted:{fontSize:e===l.SMALL?13:14,color:"#8c8c8c",fontWeight:500,flex:.4},valueStrong:{fontSize:e===l.SMALL?13:14,color:"#111",textAlign:"right",flex:.6,wordBreak:"break-all"},copyButton:{padding:e===l.SMALL?"4px 8px":"6px 12px",fontSize:e===l.SMALL?11:12,background:"#1890ff",color:"#fff",border:"none",borderRadius:4,cursor:"pointer",fontWeight:500,flexShrink:0,whiteSpace:"nowrap"},confirmButton:{width:"100%",marginBottom:e===l.SMALL?16:20,background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"10px 12px":"12px 16px",fontWeight:600,cursor:"pointer",fontSize:e===l.SMALL?13:14},noticeBox:{marginBottom:e===l.SMALL?16:20,padding:e===l.SMALL?"10px 12px":"12px 16px",borderRadius:6,background:"#FFF7E6",border:"1px solid #FFE7BA",color:"#AD6800",fontSize:e===l.SMALL?12:13,lineHeight:1.5},reminderTitle:{fontWeight:600,marginBottom:e===l.SMALL?8:12,textAlign:"left",fontSize:e===l.SMALL?14:16},reminderList:{margin:0,paddingLeft:18,color:"#666",lineHeight:1.6,textAlign:"left",fontSize:e===l.SMALL?12:13},link:{color:"#1890ff",textDecoration:"none",fontWeight:500}};return{white:{...t},dark:{...t,container:{...t.container,background:"#181A20",border:"1px solid #2B2E38"},titleBar:{...t.titleBar,background:"#00E8C6"},detailCard:{...t.detailCard,border:"1px solid #374151",background:"#23262F"},row:{...t.row,borderBottom:"1px solid #374151",background:"#23262F"},rowAlt:{...t.rowAlt,borderBottom:"1px solid #374151",background:"#23262F"},rowLast:{...t.rowLast,background:"#23262F"},labelMuted:{...t.labelMuted,color:"#B5B8BE"},valueStrong:{...t.valueStrong,color:"#fff"},label:{...t.label,color:"#B5B8BE"},value:{...t.value,color:"#fff"},copyButton:{...t.copyButton,background:"#00E8C6",color:"#111"},confirmButton:{...t.confirmButton,background:"#00E8C6",color:"#111"},noticeBox:{...t.noticeBox,background:"#2A1F0F",border:"1px solid #5C3E12",color:"#F4E3C1"},reminderTitle:{...t.reminderTitle,color:"#fff"},reminderList:{...t.reminderList,color:"#B5B8BE"},link:{...t.link,color:"#00E8C6"}}}}function Vi(){const e=E("theme"),t=E("themeConfig"),n=e===N.WHITE,r=Ji(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,titleBar:{...o.titleBar,background:a.color},copyButton:{...o.copyButton,background:a.color},confirmButton:{...o.confirmButton,background:a.color},link:{...o.link,color:a.color}}}return o}function Yi({onConfirm:e,channelCode:t}){const n=Vi(),[r,o]=B([]);return J(()=>{if(!t)return;let a=!0;return jn({code:t}).then(i=>{if(a){if(Array.isArray(i)){o(i.map(s=>String(s)));return}if(i&&typeof i=="object"){const s=[];Object.keys(i).forEach(p=>{const c=i[p];s.push(`${p}: ${c}`)}),o(s);return}o(i?[String(i)]:[])}}).catch(()=>o([])),()=>{a=!1}},[t]),d("div",{style:n.container,children:[d("div",{style:n.header,children:[d("span",{style:n.titleBar}),_("银行转账")]}),r.length>0&&d("div",{style:n.detailCard,children:r.map((a,i)=>{const s=String(a).split(":"),p=s.shift()?.trim()||"",c=s.join(":").trim();return d("div",{style:{...n.row,...i===r.length-1?n.rowLast:{},...i%2===1?n.rowAlt:{}},children:[d("div",{style:n.labelMuted,children:p}),d("div",{style:n.valueStrong,children:c||"-"})]},i)})}),d("button",{type:"button",onClick:e,style:n.confirmButton,children:_("确认转账详情")}),d("div",{style:n.noticeBox,children:_("转账后提交银行回单提示")}),d("div",{style:n.reminderTitle,children:_("温馨提示")}),d("ul",{style:n.reminderList,children:[d("li",{children:_("支付金额匹配提醒")}),d("li",{children:_("保存交易回单提醒")}),d("li",{children:_("查看余额提醒")}),d("li",{children:_("联系客服提醒")}),d("li",{children:_("P卡转账延迟提醒")}),d("li",{children:[_("平台服务费说明")," ",d("a",{href:"#",style:n.link,children:_("费用政策")})," ",_("详情")]})]})]})}function Gi({visible:e,onClose:t,onSubmit:n}){const r=Fi(),[o,a]=B(!1),[i,s]=B({currency:"USD",amount:"",channel:"",paymentType:"online",loading:!1,error:"",amountError:"",channelError:"",showOfflineUpload:!1});J(()=>{const x=()=>{a(window.innerWidth<=1020)};return x(),window.addEventListener("resize",x),()=>window.removeEventListener("resize",x)},[]),J(()=>{e||s({currency:"USD",amount:"",channel:"",paymentType:"online",loading:!1,error:"",amountError:"",channelError:"",showOfflineUpload:!1})},[e]);const p=(x,b)=>{s(S=>({...S,channel:x,paymentType:b,channelError:""}))},c=x=>{s(b=>({...b,amount:x,amountError:""}))},f=x=>{s(b=>({...b,amountError:x}))},u=x=>{s(b=>({...b,currency:x}))},y=async x=>{s(b=>({...b,loading:!0,error:""}));try{await n(x),t()}catch{s(b=>({...b,error:_("提交失败,请重试")}))}finally{s(b=>({...b,loading:!1}))}},m=()=>{console.log("用户确认银行转账详情"),s(x=>({...x,showOfflineUpload:!0}))},h=()=>{s(x=>({...x,showOfflineUpload:!1}))};return d(Vn,{visible:e,onClose:t,title:_("充值/转账"),width:o?"95%":960,maxWidth:o?"95%":1e3,children:d("div",{style:{...r.wrapper,...o?{gridTemplateColumns:"1fr",gap:16,minWidth:"auto"}:{}},children:[d(zi,{onChannelChange:p,onAmountChange:c,onCurrencyChange:u,initialAmount:i.amount,initialCurrency:i.currency,initialPaymentType:i.paymentType,amountError:i.amountError}),i.paymentType==="online"?d(Ni,{onSubmit:y,amount:i.amount,currency:i.currency,channel:i.channel,loading:i.loading,error:i.error,onAmountError:f}):i.showOfflineUpload?d(qi,{onBack:h,onCancel:t,currency:i.currency,amount:i.amount,channel:i.channel,onAmountError:f}):d(Yi,{onConfirm:m,channelCode:i.channel})]})})}function Ki(){const[e,t]=B(!1),n=async r=>{const o=await Wn({amount:r.amount,currency:r.currency,rechargeChannel:r.rechargeChannel});window.open(o,"_blank")};return d("div",{children:[d(ht,{onClick:()=>t(!0),children:_("充值/转账")}),d(Gi,{visible:e,onClose:()=>t(!1),onSubmit:n})]})}qe(Ki,"best-payment",["theme"],{shadow:!1});const Kt={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"}}};function Xi(){return E("theme")===N.WHITE?Kt.white:Kt.dark}const Zi=({popover:e,children:t,popoverWidth:n,popoverMinWidth:r,offsetY:o,offsetX:a,popoverPosition:i="top"})=>{const s=E("size"),p=n??(s===l.SMALL?200:300),c=r??(s===l.SMALL?150:200),f=o??(s===l.SMALL?8:16),u=a??(s===l.SMALL?8:16),[y,m]=B(!1),[h,x]=B(i),b=se(null),S=se(null),L=Xi(),T=()=>{if(S.current&&(clearTimeout(S.current),S.current=null),i==="top"||i==="bottom")if(b.current){const P=b.current.getBoundingClientRect();i==="top"&&P.top<100?x("bottom"):i==="bottom"&&window.innerHeight-P.bottom<100?x("top"):x(i)}else x(i);else x(i);m(!0)},A=()=>{S.current=window.setTimeout(()=>{m(!1)},120)};let M={position:"absolute",zIndex:999,borderRadius:6,fontSize:s===l.SMALL?12:15,minWidth:c,width:p,padding:s===l.SMALL?"6px 12px":"8px 14px",pointerEvents:"auto",textAlign:"center",animation:"fadeInUp 0.3s",...L.popover},R={position:"absolute",zIndex:11,width:0,height:0};return h==="top"?(M={...M,left:"50%",top:-48,transform:"translateX(-50%)"},R={...R,left:"50%",bottom:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderTop:`8px solid ${L.arrow.top}`}):h==="bottom"?(M={...M,left:"50%",top:"100%",marginTop:f,transform:"translateX(-50%)"},R={...R,left:"50%",top:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderBottom:`8px solid ${L.arrow.bottom}`}):h==="leftTop"?(M={...M,right:"100%",top:0,marginRight:u,transform:"none"},R={...R,right:-8,top:s===l.SMALL?8:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderLeft:`8px solid ${L.arrow.left}`}):h==="rightTop"&&(M={...M,left:"100%",top:0,marginLeft:u,transform:"translateY(0)"},R={...R,left:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderRight:`8px solid ${L.arrow.right}`}),d("div",{ref:b,style:{position:"relative",display:"inline-block"},onMouseEnter:T,onMouseLeave:A,children:[t,y&&d("div",{style:M,onMouseEnter:T,onMouseLeave:A,children:[e,d("div",{style:R})]})]})};function Qi(){const e=E("size");return{white:{popoverTitle:{fontSize:e===l.SMALL?12:16,fontWeight:600,color:"#222",marginBottom:e===l.SMALL?12:16,textAlign:"center"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:e===l.SMALL?"6px 0":"8px 0",borderBottom:"1px solid #e5e7eb",fontSize:e===l.SMALL?12:15},detailLabel:{display:"flex",alignItems:"center",color:"#6b7280",fontWeight:500},detailDot:t=>({display:"inline-block",width:e===l.SMALL?6:8,height:e===l.SMALL?6:8,borderRadius:"50%",background:t,marginRight:e===l.SMALL?6:8}),detailValue:t=>({color:t,fontWeight:600,fontSize:e===l.SMALL?12:15}),main:{fontSize:e===l.SMALL?18:24,fontWeight:800,color:"#111827",display:"inline-block"},currency:{fontSize:e===l.SMALL?16:18,color:"#6b7280",marginLeft:e===l.SMALL?6:8,fontWeight:600}},dark:{popoverTitle:{fontSize:e===l.SMALL?14:16,fontWeight:600,color:"#fff",marginBottom:e===l.SMALL?14:16,textAlign:"center"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:e===l.SMALL?"6px 0":"8px 0",borderBottom:"1px solid #374151",fontSize:e===l.SMALL?12:15},detailLabel:{display:"flex",alignItems:"center",color:"#B5B8BE",fontWeight:500},detailDot:t=>({display:"inline-block",width:e===l.SMALL?6:8,height:e===l.SMALL?6:8,borderRadius:"50%",background:t,marginRight:e===l.SMALL?6:8}),detailValue:t=>({color:t,fontWeight:600,fontSize:e===l.SMALL?12:15}),main:{fontSize:e===l.SMALL?18:24,fontWeight:800,color:"#fff",display:"inline-block"},currency:{fontSize:e===l.SMALL?16:18,color:"#B5B8BE",marginLeft:e===l.SMALL?6:8,fontWeight:600}}}}function ea(){const t=E("theme")===N.WHITE,n=Qi();return t?n.white:n.dark}function Xt(e){return e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}function ta(e){const[t,n]=B({currBalance:0,currency:"USD",details:[]}),r=async()=>{try{const i=await Un(),s=[{label:"",value:i.totalAmount,color:"#15b36b",dot:"#15b36b"},{label:"",value:i.frozenAmount,color:"#f59e0b",dot:"#f59e0b"},...i.isCredit?[{label:"",value:i.creditLimit,color:"#1890ff",dot:"#1890ff"},{label:"",value:i.creditUsed,color:"#ff0000",dot:"#ff0000"}]:[],{label:"",value:i.availableAmount,color:"#1890ff",dot:"#15b36b"}],p={currBalance:i.currBalance,currency:"USD",symbol:"$",details:s};n(p)}catch(i){console.error("获取余额失败:",i)}};J(()=>{r()},[]),J(()=>{const i=()=>{r()};return window.addEventListener("refresh-balance",i),()=>{window.removeEventListener("refresh-balance",i)}},[]);const o=ea(),a=[{label:_("真实金额"),value:t.details[0]?.value||0,color:"#15b36b",dot:"#15b36b"},{label:_("冻结金额"),value:t.details[1]?.value||0,color:"#f59e0b",dot:"#f59e0b"},...t.details.length>4?[{label:_("信用额度"),value:t.details[2]?.value||0,color:"#1890ff",dot:"#1890ff"},{label:_("已用额度"),value:t.details[3]?.value||0,color:"#ff0000",dot:"#ff0000"}]:[],{label:_("可用余额"),value:t.details[4]?.value||0,color:"#1890ff",dot:"#15b36b"}];return d(Zi,{popover:d(ne,{children:[d("div",{style:o.popoverTitle,children:_("余额详情")}),a.map(i=>d("div",{style:o.detailRow,children:[d("span",{style:o.detailLabel,children:[d("span",{style:o.detailDot(i.dot)}),i.label]}),d("span",{style:o.detailValue(i.color),children:Xt(i.value)})]},i.label))]}),popoverPosition:e.popoverPosition||"bottom",children:d("div",{style:o.main,children:[Xt(t.currBalance),d("span",{style:o.currency,children:t.currency})]})})}qe(ta,"best-statistical-balance");const we={white:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,cursor:"pointer",fontWeight:600,transition:"all 0.2s ease"},dark:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,cursor:"pointer",fontWeight:600,transition:"all 0.2s ease"}};function na(e){return E("theme")===N.WHITE?{...we.white,background:e||we.white.background}:{...we.dark,background:e||we.dark.background}}function ra(e){switch(e){case"small":return{fontSize:"12px",gap:"2px"};case"large":return{fontSize:"18px",gap:"6px"};default:return{fontSize:"14px",gap:"4px"}}}function oa({color:e,size:t="medium",children:n}){const[r,o]=B(!1),a=na(e),i=ra(t),s={...a,...i,display:"flex",alignItems:"center"};return d(ne,{children:[d("style",{children:`
|
|
78
|
+
`,document.head.appendChild(n),t}function Vn({visible:e,onClose:t,title:n,children:r,width:o=re===l.SMALL?300:400,maxWidth:a=re===l.SMALL?300:400,showClose:i=!0,maskClosable:s=!0}){const[p,c]=B(!1),f=_i();J(()=>{Si(f)},[f]);const u=m=>{m.target===m.currentTarget?c(!0):c(!1)},y=m=>{m.target===m.currentTarget&&p&&s&&t(),c(!1)};return e?d("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:f.mask,display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999},onMouseDown:u,onMouseUp:y,children:d("div",{style:{background:f.modalBg,borderRadius:re===l.SMALL?8:12,minWidth:o,maxWidth:a,color:f.modalColor,boxShadow:f.modalBoxShadow,position:"relative",width:typeof o=="string"?o:`${o}px`,maxHeight:"90vh",display:"flex",flexDirection:"column"},onClick:m=>m.stopPropagation(),children:[d("div",{style:{position:"sticky",top:0,background:f.modalBg,borderRadius:re===l.SMALL?"8px 8px 0 0":"12px 12px 0 0",padding:re===l.SMALL?"24px 24px 0 24px":"32px 32px 0 32px",zIndex:1,borderBottom:`1px solid ${f.headerBorder}`},children:[i&&d("button",{type:"button",onClick:t,style:f.closeBtn,"aria-label":"关闭",children:"×"}),n&&d("div",{style:f.title,children:n})]}),d("div",{className:`modal-content ${f.scrollbarClass}`,style:{flex:1,overflowY:"auto",padding:re===l.SMALL?"16px 24px 24px 24px":"20px 32px 32px 32px"},children:r})]})}):null}function Li(){const e=E("size");return{white:{tabBtn:(t,n)=>({flex:1,background:t?"#fff":"#F7F8FA",color:t?"#1890ff":"#222",border:"1px solid #F0F1F3",borderRadius:n?"8px 0 0 8px":"0 8px 8px 0",fontWeight:500,fontSize:e===l.SMALL?12:16,height:e===l.SMALL?32:48,boxShadow:t?"0 2px 8px 0 rgba(20,20,20,0.04)":"none",outline:"none",cursor:"pointer"})},dark:{tabBtn:(t,n)=>({flex:1,background:t?"#23262F":"#181A20",color:t?"#00E8C6":"#fff",border:"1px solid #444C5C",borderRadius:n?"8px 0 0 8px":"0 8px 8px 0",fontWeight:500,fontSize:e===l.SMALL?12:16,height:e===l.SMALL?32:48,boxShadow:t?"0 2px 8px 0 rgba(20,20,20,0.10)":"none",outline:"none",cursor:"pointer"})}}}function wi(){const e=E("theme"),t=E("themeConfig"),n=e===N.WHITE,r=Li(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,tabBtn:(i,s)=>({...o.tabBtn(i,s),color:i?a.color:o.tabBtn(i,s).color})}}return o}const Ai=E("size");function ki({visible:e,onClose:t,onSubmit:n}){const[r,o]=B({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),[a,i]=B({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1}),[s,p]=B("online"),c=wi();J(()=>{e||(p("online"),o({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),i({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1}))},[e]);const f=async u=>{u.preventDefault();let y=!0;if(o(m=>({...m,amountError:"",rechargeChannelError:""})),r.amount.trim()||(o(m=>({...m,amountError:_("请输入充值金额")})),y=!1),r.rechargeChannel||(o(m=>({...m,rechargeChannelError:_("请选择支付平台")})),y=!1),!!y){o(m=>({...m,loading:!0,error:""}));try{await n({amount:r.amount,rechargeChannel:r.rechargeChannel,currency:r.currency}),t()}catch{o(m=>({...m,error:_("提交失败,请重试")}))}finally{o(m=>({...m,loading:!1}))}}};return d(Vn,{visible:e,onClose:t,title:_("充值 / 转账"),children:[d("div",{style:{display:"flex",marginBottom:Ai===l.SMALL?16:28},children:[d("button",{type:"button",onClick:()=>p("online"),style:c.tabBtn(s==="online",!0),children:_("在线充值")}),d("button",{type:"button",onClick:()=>p("offline"),style:c.tabBtn(s==="offline",!1),children:_("线下转账")})]}),d("div",{style:{display:s==="online"?"block":"none"},children:d("form",{onSubmit:f,children:d(fi,{formState:r,setFormState:o,onClose:t,loading:r.loading})})}),d("div",{style:{display:s==="offline"?"block":"none"},children:d(yi,{formState:a,setFormState:i,onClose:t,loading:a.loading})})]})}function mt(){return(mt=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 Ei=["context","children"];function Ci(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(r,o){if(r==null)return{};var a,i,s={},p=Object.keys(r);for(i=0;i<p.length;i++)o.indexOf(a=p[i])>=0||(s[a]=r[a]);return s}(e,Ei);return un(t,n)}function vi(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=ie(Ci,mt({},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=[],a={},i=0,s=n.attributes,p=n.childNodes;for(i=s.length;i--;)s[i].name!=="slot"&&(a[s[i].name]=s[i].value,a[Yn(s[i].name)]=s[i].value);for(i=p.length;i--;){var c=t(p[i],null),f=p[i].slot;f?a[f]=ie(Gt,{name:f},c):o[i]=c}var u=r?ie(Gt,null,o):o;return ie(r||n.nodeName.toLowerCase(),a,u)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?dn:ze)(this._vdom,this._root)}function Yn(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function Ti(e,t,n){if(this._vdom){var r={};r[e]=n=n??void 0,r[Yn(e)]=n,this._vdom=un(this._vdom,r),ze(this._vdom,this._root)}}function Mi(){ze(this._vdom=null,this._root)}function Gt(e,t){var n=this;return ie("slot",mt({},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 qe(e,t,n,r){function o(){var a=Reflect.construct(HTMLElement,[],o);return a._vdomComponent=e,a._root=r&&r.shadow?a.attachShadow({mode:r.mode||"open"}):a,a}return(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=vi,o.prototype.attributeChangedCallback=Ti,o.prototype.disconnectedCallback=Mi,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=n,n.forEach(function(a){Object.defineProperty(o.prototype,a,{get:function(){return this._vdom.props[a]},set:function(i){this._vdom?this.attributeChangedCallback(a,null,i):(this._props||(this._props={}),this._props[a]=i,this.connectedCallback());var s=typeof i;i!=null&&s!=="string"&&s!=="boolean"&&s!=="number"||this.setAttribute(a,i)}})}),customElements.define(t||e.tagName||e.displayName||e.name,o)}function Bi(){const[e,t]=B(!1),n=async r=>{const o=await Wn({amount:r.amount,currency:r.currency,rechargeChannel:r.rechargeChannel});window.open(o,"_blank")};return d("div",{children:[d(ht,{onClick:()=>t(!0),children:_("充值/转账")}),d(ki,{visible:e,onClose:()=>t(!1),onSubmit:n})]})}qe(Bi,"best-recharge",["theme"],{shadow:!1});function Ri(){const e=E("size"),t={wrapper:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:e===l.SMALL?12:20,alignItems:"start",minWidth:880,"@media (max-width: 1020px)":{gridTemplateColumns:"1fr",gap:16,minWidth:"auto",width:"100%"}},fieldLabel:{fontSize:e===l.SMALL?12:13,marginBottom:6,fontWeight:500,textAlign:"left"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,outline:"none",border:"1px solid",boxSizing:"border-box",paddingRight:e===l.SMALL?48:64},inputError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",marginTop:6,fontSize:e===l.SMALL?12:13},inputWrapper:{position:"relative"},inputSuffix:{padding:"0 8px",fontSize:e===l.SMALL?12:13,opacity:.8},inputSuffixAbs:{position:"absolute",top:0,right:e===l.SMALL?10:12,height:"100%",display:"flex",alignItems:"center",color:"#999",pointerEvents:"none",fontSize:e===l.SMALL?12:13},blockTitle:{fontSize:e===l.SMALL?16:18,fontWeight:700,marginBottom:e===l.SMALL?12:16,textAlign:"left",display:"flex",alignItems:"center",gap:8},subTitle:{marginTop:e===l.SMALL?10:14,marginBottom:e===l.SMALL?8:10,fontWeight:600,textAlign:"left"},titleBar:{width:3,height:e===l.SMALL?16:20,background:"#1890ff",borderRadius:2},methodList:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:10,"@media (max-width: 600px)":{gridTemplateColumns:"1fr",gap:8}},bankList:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:10,"@media (max-width: 600px)":{gridTemplateColumns:"1fr",gap:8}}};return{white:{...t,left:{background:"#fff",borderRadius:8,padding:16,border:"1px solid #E5E6EB"},right:{background:"#fff",borderRadius:8,padding:16},currencyRow:{display:"flex",gap:10,flexWrap:"wrap","@media (max-width: 480px)":{gap:8}},currencyItem:n=>({padding:"6px 12px",borderRadius:6,border:`1px solid ${n?"#1890ff":"#E5E6EB"}`,color:n?"#1890ff":"#222",background:n?"#EEF7FF":"#fff",cursor:"pointer"}),input:{...t.input,border:"1px solid #E5E6EB",background:"#fff",color:"#222"},payButton:{width:"100%",marginTop:e===l.SMALL?10:14,marginBottom:e===l.SMALL?12:16,background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"8px 12px":"12px 16px",fontWeight:600,cursor:"pointer"},methodItem:n=>({padding:"10px 12px",textAlign:"left",borderRadius:8,border:`1px solid ${n?"#1890ff":"#F0F1F3"}`,background:n?"#EEF7FF":"#F7F8FA",cursor:"pointer"}),bankItem:{padding:"10px 12px",borderRadius:8,border:"1px solid #F0F1F3",background:"#F7F8FA",textAlign:"left"},noticeBox:{marginTop:e===l.SMALL?8:12,marginBottom:e===l.SMALL?12:16,padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,background:"#FFF7E6",border:"1px solid #FFE7BA",color:"#AD6800",fontSize:e===l.SMALL?12:13},reminderTitle:{fontWeight:600,margin:"6px 0",textAlign:"left"},reminderList:{margin:0,paddingLeft:18,color:"#6b7280",lineHeight:1.6,textAlign:"left"}},dark:{...t,left:{background:"#181A20",borderRadius:8,padding:16,border:"1px solid #2B2E38"},right:{background:"#181A20",borderRadius:8,padding:16,border:"1px solid #2B2E38"},currencyRow:{display:"flex",gap:10,flexWrap:"wrap","@media (max-width: 480px)":{gap:8}},currencyItem:n=>({padding:"6px 12px",borderRadius:6,border:`1px solid ${n?"#00E8C6":"#374151"}`,color:n?"#00E8C6":"#fff",background:n?"#0F2824":"#23262F",cursor:"pointer"}),input:{...t.input,border:"1px solid #374151",background:"#23262F",color:"#fff"},payButton:{width:"100%",marginTop:e===l.SMALL?10:14,marginBottom:e===l.SMALL?12:16,background:"#00E8C6",color:"#111",border:"none",borderRadius:6,padding:e===l.SMALL?"8px 12px":"12px 16px",fontWeight:700,cursor:"pointer"},methodItem:n=>({padding:"10px 12px",textAlign:"left",borderRadius:8,border:`1px solid ${n?"#00E8C6":"#374151"}`,background:n?"#0F2824":"#23262F",color:"#fff",cursor:"pointer"}),bankItem:{padding:"10px 12px",borderRadius:8,border:"1px solid #374151",background:"#23262F",textAlign:"left",color:"#fff"},noticeBox:{marginTop:e===l.SMALL?8:12,marginBottom:e===l.SMALL?12:16,padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,background:"#2A1F0F",border:"1px solid #5C3E12",color:"#F4E3C1",fontSize:e===l.SMALL?12:13},reminderTitle:{fontWeight:600,margin:"6px 0",textAlign:"left",color:"#fff"},reminderList:{margin:0,paddingLeft:18,color:"#B5B8BE",lineHeight:1.6,textAlign:"left"}}}}function Fi(){const e=E("theme"),t=E("themeConfig"),n=e===N.WHITE,r=Ri(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,payButton:{...o.payButton,background:a.color},currencyItem:i=>({...o.currencyItem(i),border:`1px solid ${i?a.color:n?"#E5E6EB":"#374151"}`,color:i?a.color:n?"#222":"#fff"}),methodItem:i=>({...o.methodItem(i),border:`1px solid ${i?a.color:n?"#F0F1F3":"#374151"}`})}}return o}function Ii(){const e=E("size"),t={left:{background:"#fff",borderRadius:8,padding:16,border:"1px solid #E5E6EB"},blockTitle:{fontSize:e===l.SMALL?16:18,fontWeight:700,marginBottom:e===l.SMALL?12:16,textAlign:"left",display:"flex",alignItems:"center",gap:8},titleBar:{width:3,height:e===l.SMALL?16:20,background:"#1890ff",borderRadius:2},fieldLabel:{fontSize:e===l.SMALL?14:16,marginBottom:6,fontWeight:500,textAlign:"left"},required:{color:"#ff4d4f",marginRight:4},currencyRow:{display:"flex",gap:10,flexWrap:"wrap","@media (max-width: 600px)":{gap:8}},currencyItem:n=>({padding:"6px 12px",borderRadius:6,border:`1px solid ${n?"#1890ff":"#E5E6EB"}`,color:n?"#1890ff":"#222",background:n?"#EEF7FF":"#fff",cursor:"pointer"}),inputWrapper:{position:"relative"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,outline:"none",border:"1px solid",boxSizing:"border-box",paddingRight:e===l.SMALL?48:64},inputError:{border:"1px solid #ff4d4f"},inputSuffixAbs:{position:"absolute",top:0,right:e===l.SMALL?10:12,height:"100%",display:"flex",alignItems:"center",color:"#999",pointerEvents:"none",fontSize:e===l.SMALL?12:13},bizRateBox:{marginTop:6,color:"#666",fontSize:e===l.SMALL?12:13,textAlign:"left",lineHeight:1.6},bizRateStrong:{color:"#111",fontWeight:600},subTitle:{fontSize:e===l.SMALL?12:14,marginTop:e===l.SMALL?10:14,marginBottom:e===l.SMALL?8:10,textAlign:"left"},methodList:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:10,"@media (max-width: 600px)":{gridTemplateColumns:"1fr",gap:8}},methodItem:n=>({padding:"12px 16px",textAlign:"left",borderRadius:10,border:`1px solid ${n?"#1890ff":"#F0F1F3"}`,background:n?"#EEF7FF":"#F7F8FA",cursor:"pointer",display:"flex",alignItems:"center",gap:8,minHeight:44}),channelIcon:{width:22,height:22,objectFit:"contain",marginRight:8,display:"inline-block"},bankList:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:10,"@media (max-width: 600px)":{gridTemplateColumns:"1fr",gap:8}},bankItem:n=>({padding:"12px 16px",borderRadius:10,border:`1px solid ${n?"#1890ff":"#F0F1F3"}`,background:n?"#EEF7FF":"#F7F8FA",textAlign:"left",cursor:"pointer",display:"flex",alignItems:"center",gap:8,minHeight:44}),error:{color:"#ff4d4f",marginTop:6,fontSize:e===l.SMALL?12:13}};return{white:{...t,input:{...t.input,border:"1px solid #E5E6EB",background:"#fff",color:"#222"}},dark:{...t,left:{background:"#181A20",borderRadius:8,padding:16,border:"1px solid #2B2E38"},titleBar:{...t.titleBar,background:"#00E8C6"},currencyItem:n=>({padding:"6px 12px",borderRadius:6,border:`1px solid ${n?"#00E8C6":"#374151"}`,color:n?"#00E8C6":"#fff",background:n?"#0F2824":"#23262F",cursor:"pointer"}),input:{...t.input,border:"1px solid #374151",background:"#23262F",color:"#fff"},methodItem:n=>({padding:"12px 16px",textAlign:"left",borderRadius:10,border:`1px solid ${n?"#00E8C6":"#374151"}`,background:n?"#0F2824":"#23262F",color:"#fff",cursor:"pointer",display:"flex",alignItems:"center",gap:8,minHeight:44}),bankItem:n=>({padding:"12px 16px",borderRadius:10,border:`1px solid ${n?"#00E8C6":"#374151"}`,background:n?"#0F2824":"#23262F",textAlign:"left",color:"#fff",cursor:"pointer",display:"flex",alignItems:"center",gap:8,minHeight:44})}}}function Di(){const e=E("theme"),t=E("themeConfig"),n=e===N.WHITE,r=Ii(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,titleBar:{...o.titleBar,background:a.color},currencyItem:i=>({...o.currencyItem(i),border:`1px solid ${i?a.color:n?"#E5E6EB":"#374151"}`,color:i?a.color:n?"#222":"#fff"}),methodItem:i=>({...o.methodItem(i),border:`1px solid ${i?a.color:n?"#F0F1F3":"#374151"}`}),bankItem:i=>({...o.bankItem(i),border:`1px solid ${i?a.color:n?"#F0F1F3":"#374151"}`})}}return o}function zi({onChannelChange:e,onAmountChange:t,onCurrencyChange:n,initialAmount:r="",initialCurrency:o="USD",initialPaymentType:a="online",amountError:i=""}){const s=Di(),c=JSON.parse(sessionStorage.getItem("all_dicts")||"{}")?.currency||[],[f,u]=B([]),[y,m]=B([]),[h,x]=B({currency:o,amount:r,onlineChannel:"",bankChannel:"",paymentType:a,amountError:""}),[b,S]=B(null),L=se(null),M=(w,F)=>{const U=w!==void 0?w:h.amount,$=F!==void 0?F:h.currency;if(!U||Number(U)<=0){S(null);return}L.current&&clearTimeout(L.current),L.current=window.setTimeout(()=>{Jo({currency:$,amount:U}).then(V=>S(V)).catch(()=>S(null))},300)};J(()=>{qo({currency:h.currency}).then(w=>{const F=w.onlineChannel||[],U=w.offlineChannel||[];u(F),m(U);const $=F.length>0,V=U?.[0]?.value||"",Se=F?.[0]?.value||"",de=$?a:"bank",k=de==="online"?Se:V;x(v=>({...v,onlineChannel:Se,bankChannel:V,paymentType:de})),k&&e(k,de)})},[h.currency]);function A(w){return w=w.replace(/[^\d.]/g,""),w=w.replace(/\.(?=.*\.)/g,""),w=w.replace(/^(\d+)(\.\d{0,2})?.*$/,"$1$2"),w=w.replace(/^0+(\d)/,"$1"),w.startsWith(".")&&(w="0"+w),w}const T=w=>{x(F=>({...F,currency:w})),n(w),M(void 0,w)},R=w=>{const F=A(w);x(U=>({...U,amount:F,amountError:""})),t(F),M(F)},P=(w,F)=>{x(U=>({...U,[F==="online"?"onlineChannel":"bankChannel"]:w,paymentType:F})),e(w,F),M()};return d("div",{style:s.left,children:[d("div",{style:s.blockTitle,children:[d("span",{style:s.titleBar}),_("选择支付方式")]}),d("div",{style:s.fieldLabel,children:_("支付币种")}),d("div",{style:s.currencyRow,children:(c||[]).slice(0,4).map(w=>d("button",{type:"button",onClick:()=>T(w.value),style:s.currencyItem(h.currency===w.value),children:w.label}))}),d("div",{style:{height:12}}),d("div",{style:s.fieldLabel,children:[d("span",{style:s.required,children:"*"}),_("支付金额")]}),d("div",{style:s.inputWrapper,children:[d("input",{type:"text",placeholder:_("请输入充值金额"),value:h.amount,onInput:w=>{R(w.target.value)},style:{...s.input,...i?s.inputError:{}}}),d("div",{style:s.inputSuffixAbs,children:h.currency})]}),i&&d("div",{style:s.error,children:i}),b&&b.consistent===!1&&d("div",{style:s.bizRateBox,children:[d("div",{children:_("您的支付币种与默认币种不一致,将转换为默认币种入账")}),d("div",{children:[_("目前汇率为:")," ",h.currency,_(`→${b.currency} = `),d("span",{style:s.bizRateStrong,children:b.exchangeRate})]}),d("div",{children:[_("钱包预计增加"),d("span",{style:s.bizRateStrong,children:[b.currency," ",b.amount]})]})]}),d("div",{style:{height:20}}),d("div",{style:s.fieldLabel,children:_("支付方式")}),f.length>0&&d("div",{children:[d("div",{style:s.subTitle,children:_("线上支付")}),d("div",{style:s.methodList,children:f.map(w=>d("button",{type:"button",onClick:()=>P(w.value,"online"),style:s.methodItem(h.onlineChannel===w.value&&h.paymentType==="online"),children:[w.icon&&d("img",{src:w.icon,alt:w.label,style:s.channelIcon}),w.label]}))})]}),d("div",{style:s.subTitle,children:_("银行转账")}),d("div",{style:s.bankList,children:y.map(w=>d("button",{type:"button",onClick:()=>P(w.value,"bank"),style:s.bankItem(h.bankChannel===w.value&&h.paymentType==="bank"),children:[w.icon&&d("img",{src:w.icon,alt:w.label,style:s.channelIcon}),w.label]}))})]})}function Oi(){const e=E("size"),t={right:{background:"#fff",borderRadius:8,padding:16},blockTitle:{fontSize:e===l.SMALL?16:18,fontWeight:700,marginBottom:e===l.SMALL?12:16,textAlign:"left",display:"flex",alignItems:"center",gap:8},titleBar:{width:3,height:e===l.SMALL?16:20,background:"#1890ff",borderRadius:2},inputWrapper:{position:"relative"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,outline:"none",border:"1px solid",boxSizing:"border-box",paddingRight:e===l.SMALL?48:64},inputError:{border:"1px solid #ff4d4f"},disabled:{backgroundColor:"#f5f5f5",color:"#999",cursor:"not-allowed"},disabledDark:{backgroundColor:"#1A1D23",color:"#6B7280",cursor:"not-allowed",border:"1px solid #374151"},inputSuffixAbs:{position:"absolute",top:0,right:e===l.SMALL?10:12,height:"100%",display:"flex",alignItems:"center",color:"#999",pointerEvents:"none",fontSize:e===l.SMALL?12:13},payButton:{width:"100%",marginTop:e===l.SMALL?10:14,marginBottom:e===l.SMALL?12:16,background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"8px 12px":"12px 16px",fontWeight:600,cursor:"pointer"},noticeBox:{marginTop:e===l.SMALL?8:12,marginBottom:e===l.SMALL?12:16,padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,background:"#FFF7E6",border:"1px solid #FFE7BA",color:"#AD6800",fontSize:e===l.SMALL?12:13},calcBox:{marginTop:e===l.SMALL?8:12,marginBottom:e===l.SMALL?8:12,color:"#666",textAlign:"left",lineHeight:1.6,fontSize:e===l.SMALL?12:13},calcLine:{marginBottom:4},calcAmount:{color:"#ff4d4f",fontWeight:700,margin:"0 4px"},reminderTitle:{fontWeight:600,margin:"6px 0",textAlign:"left"},reminderList:{margin:0,paddingLeft:18,color:"#6b7280",lineHeight:1.6,textAlign:"left",listStyleType:"disc",listStylePosition:"outside"},listItem:{listStyleType:"disc",listStylePosition:"outside"},error:{color:"#ff4d4f",marginTop:6,fontSize:e===l.SMALL?12:13}};return{white:{...t,input:{...t.input,border:"1px solid #E5E6EB",background:"#fff",color:"#222"}},dark:{...t,right:{background:"#181A20",borderRadius:8,padding:16,border:"1px solid #2B2E38"},titleBar:{...t.titleBar,background:"#00E8C6"},input:{...t.input,border:"1px solid #374151",background:"#23262F",color:"#fff"},payButton:{...t.payButton,background:"#00E8C6",color:"#111",fontWeight:700},noticeBox:{...t.noticeBox,background:"#2A1F0F",border:"1px solid #5C3E12",color:"#F4E3C1"},reminderTitle:{...t.reminderTitle,color:"#fff"},reminderList:{...t.reminderList,color:"#B5B8BE"}}}}function Pi(){const e=E("theme"),t=E("themeConfig"),n=e===N.WHITE,r=Oi(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,payButton:{...o.payButton,background:a.color},titleBar:{...o.titleBar,background:a.color}}}return o}function Ni({onSubmit:e,amount:t,currency:n,channel:r,loading:o=!1,error:a="",onAmountError:i}){const s=Pi(),p=s.right.background==="#181A20",[c,f]=B({amount:t,currency:n,channel:r,loading:o,error:a,amountError:""}),[u,y]=B(null);J(()=>{f(x=>({...x,amount:t,currency:n,channel:r,loading:o,error:a}));const h=setTimeout(()=>{t&&r&&n?Hn({channel:r,amount:t,currency:n}).then(x=>y(x)).catch(()=>y(null)):y(null)},300);return()=>clearTimeout(h)},[t,n,r,o,a]);const m=async h=>{h&&h.preventDefault();let x=!0;if(t.trim()||(x=!1,i?.(_("请输入充值金额"))),r||(x=!1,f(b=>({...b,error:_("请选择支付平台")}))),!!x){f(b=>({...b,loading:!0,error:""}));try{await e({amount:t,currency:n,rechargeChannel:r})}finally{f(b=>({...b,loading:!1}))}}};return d("div",{style:s.right,children:[d("div",{style:s.blockTitle,children:[d("span",{style:s.titleBar}),_("在线支付")]}),d("form",{onSubmit:m,children:[d("div",{style:s.inputWrapper,children:[d("input",{type:"text",placeholder:_("支付金额"),value:c.amount,readOnly:!0,disabled:!0,style:{...s.input,...p?s.disabledDark:s.disabled,width:"100%"}}),d("div",{style:s.inputSuffixAbs,children:c.currency})]}),d("button",{type:"submit",disabled:c.loading,style:s.payButton,children:c.loading?_("提交中..."):_("立即支付")})]}),u&&d("div",{style:s.calcBox,children:[d("div",{style:s.calcLine,children:[_("预计支付金额约为:"),d("span",{style:s.calcAmount,children:`$${u.paymentAmount}`}),u.currency]}),d("div",{style:s.calcLine,children:[_("手续费约为:"),d("span",{style:s.calcAmount,children:`$${u.fee}`}),u.currency]}),d("div",{children:_("注:地区/币种/卡类型可能影响手续费,最终以平台为准。")})]}),d("div",{style:s.noticeBox,children:_("请在转账后提交银行回单,否则可能无法及时核验")}),d("div",{style:s.reminderTitle,children:_("温馨提示")}),d("ul",{style:s.reminderList,children:[d("li",{style:s.listItem,children:_("支付金额须与申请金额一致,请勿多付、少付或分批提交。")}),d("li",{style:s.listItem,children:_("请妥善保存回单并提供准确的支付时间,否则可能无法核验。")}),d("li",{style:s.listItem,children:_("工作时间提交4小时内审核,非工作时间将顺延至下一个工作日。")}),d("li",{style:s.listItem,children:_("如有问题,请联系平台客服。")}),d("li",{style:s.listItem,children:_("预付充值将收取平台服务费,具体以官方为准。")})]}),c.error&&d("div",{style:s.error,children:c.error})]})}function Ui(){const e=E("size"),t={container:{background:"#fff",borderRadius:8,padding:e===l.SMALL?14:16,width:"100%",maxWidth:"100%",boxSizing:"border-box","@media (max-width: 1020px)":{padding:e===l.SMALL?12:16}},header:{marginBottom:e===l.SMALL?16:20},backButton:{display:"flex",alignItems:"center",gap:8,background:"none",border:"none",color:"#1890ff",cursor:"pointer",fontSize:e===l.SMALL?13:14,fontWeight:500},backIcon:{fontSize:e===l.SMALL?16:18},uploadSection:{marginBottom:e===l.SMALL?18:24},uploadArea:{border:"2px dashed #D9D9D9",borderRadius:8,padding:e===l.SMALL?"30px 16px":"40px 20px",textAlign:"center",cursor:"pointer",background:"#FAFAFA",transition:"all 0.3s ease",width:"100%",boxSizing:"border-box","@media (max-width: 600px)":{padding:e===l.SMALL?"30px 15px":"40px 20px"}},uploadIcon:{fontSize:e===l.SMALL?40:52,marginBottom:e===l.SMALL?10:12},uploadTitle:{fontSize:e===l.SMALL?14:16,fontWeight:600,color:"#222",marginBottom:e===l.SMALL?6:10},uploadHint:{fontSize:e===l.SMALL?12:13,color:"#999"},hiddenInput:{display:"none"},fileList:{marginTop:e===l.SMALL?10:12},fileItem:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:e===l.SMALL?"6px 10px":"8px 12px",background:"#F5F5F5",borderRadius:6,marginBottom:6},fileName:{fontSize:e===l.SMALL?12:13,color:"#222"},removeButton:{background:"#ff4d4f",color:"#fff",border:"none",borderRadius:"50%",width:20,height:20,cursor:"pointer",fontSize:12,display:"flex",alignItems:"center",justifyContent:"center"},fieldSection:{marginBottom:e===l.SMALL?12:16},fieldLabel:{display:"block",fontSize:e===l.SMALL?13:14,fontWeight:500,color:"#222",marginBottom:e===l.SMALL?6:10},required:{color:"#ff4d4f",marginRight:4},inputWrapper:{position:"relative"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,border:"1px solid #D9D9D9",outline:"none",fontSize:14,boxSizing:"border-box"},inputError:{border:"1px solid #ff4d4f"},disabled:{backgroundColor:"#f5f5f5",color:"#999",cursor:"not-allowed"},disabledDark:{backgroundColor:"#1A1D23",color:"#6B7280",cursor:"not-allowed",border:"1px solid #374151"},calendarIcon:{position:"absolute",right:e===l.SMALL?8:10,top:"50%",transform:"translateY(-50%)",fontSize:e===l.SMALL?12:14,pointerEvents:"none"},currencySuffix:{position:"absolute",right:e===l.SMALL?10:12,top:"50%",transform:"translateY(-50%)",fontSize:e===l.SMALL?12:14,color:"#999",pointerEvents:"none"},buttonSection:{display:"flex",gap:e===l.SMALL?10:12,marginTop:e===l.SMALL?24:32,width:"100%",boxSizing:"border-box","@media (max-width: 600px)":{flexDirection:"column",gap:e===l.SMALL?8:12}},cancelButton:{flex:1,padding:e===l.SMALL?"8px 12px":"10px 16px",borderRadius:6,border:"1px solid #D9D9D9",background:"#fff",color:"#222",fontSize:e===l.SMALL?12:14,fontWeight:500,cursor:"pointer",minWidth:0,boxSizing:"border-box"},submitButton:{flex:1,padding:e===l.SMALL?"8px 12px":"10px 16px",borderRadius:6,border:"none",background:"#1890ff",color:"#fff",fontSize:e===l.SMALL?12:14,fontWeight:600,cursor:"pointer",minWidth:0,boxSizing:"border-box"},error:{color:"#ff4d4f",fontSize:e===l.SMALL?12:13,marginTop:6}};return{white:{...t},dark:{...t,container:{...t.container,background:"#181A20",border:"1px solid #2B2E38"},backButton:{...t.backButton,color:"#00E8C6"},uploadArea:{...t.uploadArea,border:"2px dashed #374151",background:"#23262F"},uploadTitle:{...t.uploadTitle,color:"#fff"},uploadHint:{...t.uploadHint,color:"#B5B8BE"},fileItem:{...t.fileItem,background:"#2B2E38"},fileName:{...t.fileName,color:"#fff"},fieldLabel:{...t.fieldLabel,color:"#fff"},input:{...t.input,border:"1px solid #374151",background:"#23262F",color:"#fff"},calendarIcon:{...t.calendarIcon,color:"#B5B8BE"},currencySuffix:{...t.currencySuffix,color:"#B5B8BE"},cancelButton:{...t.cancelButton,border:"1px solid #374151",background:"#23262F",color:"#fff"},submitButton:{...t.submitButton,background:"#00E8C6",color:"#111"}}}}function $i(){const e=E("theme"),t=E("themeConfig"),n=e===N.WHITE,r=Ui(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,backButton:{...o.backButton,color:a.color},submitButton:{...o.submitButton,background:a.color}}}return o}const Wi="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1760084950168'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='6759'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M932.579556%20137.272889h-192V64.142222a9.159111%209.159111%200%200%200-9.130667-9.159111h-64a9.159111%209.159111%200%200%200-9.159111%209.159111v73.130667H365.738667V64.142222a9.159111%209.159111%200%200%200-9.159111-9.159111h-64a9.159111%209.159111%200%200%200-9.130667%209.159111v73.130667h-192c-20.224%200-36.579556%2016.355556-36.579556%2036.579555v758.869334c0%2020.195556%2016.355556%2036.551111%2036.579556%2036.551111h841.130667c20.252444%200%2036.579556-16.327111%2036.579555-36.551111V173.852444c0-20.224-16.355556-36.579556-36.579555-36.579555zM886.897778%20887.011556H137.159111V452.693333H886.897778v434.261334z%20m-749.710222-512V219.534222h146.289777v54.869334c0%205.034667%204.124444%209.130667%209.130667%209.130666h64a9.159111%209.159111%200%200%200%209.159111-9.130666V219.562667h292.551111v54.869333c0%205.034667%204.124444%209.130667%209.159111%209.130667h64a9.159111%209.159111%200%200%200%209.130667-9.130667V219.562667h146.289778v155.448889H137.159111z'%20p-id='6760'%3e%3c/path%3e%3c/svg%3e";function Hi(){const e=E("theme"),t=E("themeConfig"),n={container:{position:"relative",display:"inline-block"},input:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 12px",border:"1px solid #d9d9d9",borderRadius:"6px",backgroundColor:"#fff",cursor:"pointer",transition:"all 0.3s",outline:"none",fontSize:"14px",lineHeight:"1.5715",color:"rgba(0, 0, 0, 0.85)"},inputText:{flex:1,textAlign:"left",color:"rgba(0, 0, 0, 0.85)"},calendarIcon:{fontSize:"16px",color:"rgba(0, 0, 0, 0.45)",marginLeft:"8px",width:16,height:16,objectFit:"contain",display:"inline-block"},disabled:{backgroundColor:"#f5f5f5",color:"rgba(0, 0, 0, 0.25)",cursor:"not-allowed"},panel:{position:"absolute",top:"100%",left:0,zIndex:1050,backgroundColor:"#fff",border:"1px solid #d9d9d9",borderRadius:"6px",boxShadow:"0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05)",padding:"8px",minWidth:"280px",marginTop:"4px"},header:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 0",marginBottom:"8px"},navButton:{display:"flex",alignItems:"center",justifyContent:"center",width:"24px",height:"24px",border:"none",backgroundColor:"transparent",cursor:"pointer",borderRadius:"4px",fontSize:"16px",color:"rgba(0, 0, 0, 0.45)",transition:"all 0.3s"},monthYear:{fontSize:"16px",fontWeight:500,color:"rgba(0, 0, 0, 0.85)"},weekHeader:{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:"4px",marginBottom:"8px"},weekDay:{display:"flex",alignItems:"center",justifyContent:"center",height:"32px",fontSize:"14px",fontWeight:500,color:"rgba(0, 0, 0, 0.85)"},calendarGrid:{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:"4px"},dayButton:{display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",border:"none",backgroundColor:"transparent",cursor:"pointer",borderRadius:"4px",fontSize:"14px",transition:"all 0.3s",color:"rgba(0, 0, 0, 0.85)"},dayCurrentMonth:{color:"rgba(0, 0, 0, 0.85)"},dayOtherMonth:{color:"rgba(0, 0, 0, 0.25)"},dayToday:{fontWeight:600,color:"#1890ff"},daySelected:{backgroundColor:"#1890ff",color:"#fff"},yearPicker:{maxHeight:"200px",overflowY:"auto",marginBottom:"8px",border:"1px solid #f0f0f0",borderRadius:"4px",padding:"8px"},yearGrid:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:"4px"},yearButton:{display:"flex",alignItems:"center",justifyContent:"center",padding:"6px 8px",border:"none",backgroundColor:"transparent",cursor:"pointer",borderRadius:"4px",fontSize:"14px",transition:"all 0.3s",color:"rgba(0, 0, 0, 0.85)"},yearSelected:{backgroundColor:"#1890ff",color:"#fff"},small:{padding:"4px 8px",fontSize:"12px"},middle:{padding:"8px 12px",fontSize:"14px"},large:{padding:"12px 16px",fontSize:"16px"}},r={white:{...n,input:{...n.input,border:"1px solid #d9d9d9",backgroundColor:"#fff",color:"rgba(0, 0, 0, 0.85)"},inputText:{...n.inputText,color:"rgba(0, 0, 0, 0.85)"},calendarIcon:{...n.calendarIcon,color:"rgba(0, 0, 0, 0.45)"},disabled:{...n.disabled,backgroundColor:"#f5f5f5",color:"rgba(0, 0, 0, 0.25)"},panel:{...n.panel,backgroundColor:"#fff",border:"1px solid #d9d9d9"},navButton:{...n.navButton,color:"rgba(0, 0, 0, 0.45)"},monthYear:{...n.monthYear,color:"rgba(0, 0, 0, 0.85)"},weekDay:{...n.weekDay,color:"rgba(0, 0, 0, 0.85)"},dayButton:{...n.dayButton,color:"rgba(0, 0, 0, 0.85)"},dayCurrentMonth:{...n.dayCurrentMonth,color:"rgba(0, 0, 0, 0.85)"},dayOtherMonth:{...n.dayOtherMonth,color:"rgba(0, 0, 0, 0.25)"},dayToday:{...n.dayToday,color:"#1890ff"},daySelected:{...n.daySelected,backgroundColor:"#1890ff",color:"#fff"},yearPicker:{...n.yearPicker,border:"1px solid #f0f0f0"},yearButton:{...n.yearButton,color:"rgba(0, 0, 0, 0.85)"},yearSelected:{...n.yearSelected,backgroundColor:"#1890ff",color:"#fff"}},dark:{...n,input:{...n.input,border:"1px solid #434343",backgroundColor:"#141414",color:"rgba(255, 255, 255, 0.85)"},inputText:{...n.inputText,color:"rgba(255, 255, 255, 0.85)"},calendarIcon:{...n.calendarIcon,color:"rgba(255, 255, 255, 0.45)"},disabled:{...n.disabled,backgroundColor:"#262626",color:"rgba(255, 255, 255, 0.25)"},panel:{...n.panel,backgroundColor:"#141414",border:"1px solid #434343"},navButton:{...n.navButton,color:"rgba(255, 255, 255, 0.45)"},monthYear:{...n.monthYear,color:"rgba(255, 255, 255, 0.85)"},weekDay:{...n.weekDay,color:"rgba(255, 255, 255, 0.85)"},dayButton:{...n.dayButton,color:"rgba(255, 255, 255, 0.85)"},dayCurrentMonth:{...n.dayCurrentMonth,color:"rgba(255, 255, 255, 0.85)"},dayOtherMonth:{...n.dayOtherMonth,color:"rgba(255, 255, 255, 0.25)"},dayToday:{...n.dayToday,color:"#00E8C6"},daySelected:{...n.daySelected,backgroundColor:"#00E8C6",color:"#111"},yearPicker:{...n.yearPicker,border:"1px solid #434343"},yearButton:{...n.yearButton,color:"rgba(255, 255, 255, 0.85)"},yearSelected:{...n.yearSelected,backgroundColor:"#00E8C6",color:"#111"}}},o=r[e]||r.white,a=t?.[e]?.color;return a&&(o.dayToday.color=a,o.daySelected.backgroundColor=a,o.yearSelected.backgroundColor=a,e==="dark"&&(o.daySelected.color="#111",o.yearSelected.color="#111")),o}function ji(){return Hi()}function qi({value:e="",placeholder:t=_("请选择日期"),disabled:n=!1,size:r="middle",onChange:o,onFocus:a,onBlur:i,className:s="",style:p={}}){const c=ji(),[f,u]=B(!1),[y,m]=B(e),[h,x]=B(new Date),[b,S]=B(!1),L=se(null),M=k=>{if(!k)return"";const v=new Date(k);return`${v.getFullYear()}-${String(v.getMonth()+1).padStart(2,"0")}-${String(v.getDate()).padStart(2,"0")}`},A=(k,v)=>new Date(k,v+1,0).getDate(),T=(k,v)=>new Date(k,v,1).getDay(),R=()=>{const k=h.getFullYear(),v=h.getMonth(),ue=A(k,v),Gn=T(k,v),fe=[],gt=v===0?11:v-1,bt=v===0?k-1:k,yt=A(bt,gt);for(let H=Gn-1;H>=0;H--)fe.push({date:yt-H,isCurrentMonth:!1,isToday:!1,isSelected:!1,fullDate:`${bt}-${String(gt+1).padStart(2,"0")}-${String(yt-H).padStart(2,"0")}`});const Kn=new Date,xt=y?new Date(y):null;for(let H=1;H<=ue;H++){const _t=`${k}-${String(v+1).padStart(2,"0")}-${String(H).padStart(2,"0")}`,St=new Date(_t);fe.push({date:H,isCurrentMonth:!0,isToday:St.toDateString()===Kn.toDateString(),isSelected:xt&&St.toDateString()===xt.toDateString(),fullDate:_t})}const Xn=v===11?0:v+1,Zn=v===11?k+1:k,Qn=42-fe.length;for(let H=1;H<=Qn;H++)fe.push({date:H,isCurrentMonth:!1,isToday:!1,isSelected:!1,fullDate:`${Zn}-${String(Xn+1).padStart(2,"0")}-${String(H).padStart(2,"0")}`});return fe},P=k=>{m(k),u(!1),o?.(k)},w=k=>{const v=new Date(h);k==="prev"?v.setMonth(v.getMonth()-1):v.setMonth(v.getMonth()+1),x(v)},F=k=>{const v=new Date(h);k==="prev"?v.setFullYear(v.getFullYear()-1):v.setFullYear(v.getFullYear()+1),x(v)},U=k=>{const v=new Date(h);v.setFullYear(k),x(v),S(!1)},$=()=>{const k=new Date().getFullYear(),v=[];for(let ue=k-50;ue<=k+50;ue++)v.push(ue);return v};J(()=>{const k=v=>{L.current&&!L.current.contains(v.target)&&u(!1)};if(f)return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[f]);const V=R(),Se=[_("一月"),_("二月"),_("三月"),_("四月"),_("五月"),_("六月"),_("七月"),_("八月"),_("九月"),_("十月"),_("十一月"),_("十二月")],de=[_("日"),_("一"),_("二"),_("三"),_("四"),_("五"),_("六")];return d("div",{ref:L,className:`date-picker-container ${s}`,style:{...c.container,...p},children:[d("div",{style:{...c.input,...c[r],...n?c.disabled:{}},onClick:()=>!n&&u(!f),onFocus:a,onBlur:i,children:[d("span",{style:c.inputText,children:y?M(y):t}),d("img",{src:Wi,alt:"calendar",style:c.calendarIcon})]}),f&&d("div",{style:c.panel,children:[d("div",{style:c.header,children:[d("button",{type:"button",style:c.navButton,onClick:()=>F("prev"),children:"‹‹"}),d("button",{type:"button",style:c.navButton,onClick:()=>w("prev"),children:"‹"}),d("span",{style:c.monthYear,onClick:()=>S(!b),children:[h.getFullYear(),"年",Se[h.getMonth()]]}),d("button",{type:"button",style:c.navButton,onClick:()=>w("next"),children:"›"}),d("button",{type:"button",style:c.navButton,onClick:()=>F("next"),children:"››"})]}),b&&d("div",{style:c.yearPicker,children:d("div",{style:c.yearGrid,children:$().map(k=>d("button",{type:"button",style:{...c.yearButton,...k===h.getFullYear()?c.yearSelected:{}},onClick:()=>U(k),children:k},k))})}),d("div",{style:c.weekHeader,children:de.map(k=>d("div",{style:c.weekDay,children:k},k))}),d("div",{style:c.calendarGrid,children:V.map((k,v)=>d("button",{type:"button",style:{...c.dayButton,...k.isCurrentMonth?c.dayCurrentMonth:c.dayOtherMonth,...k.isToday?c.dayToday:{},...k.isSelected?c.daySelected:{}},onClick:()=>P(k.fullDate),disabled:n,children:k.date},v))})]})]})}function Ji({onBack:e,onCancel:t,currency:n="USD",amount:r="",channel:o="",onAmountError:a}){const i=$i(),s=i.container.background==="#181A20",p=new Date,c=`${p.getFullYear()}-${String(p.getMonth()+1).padStart(2,"0")}-${String(p.getDate()).padStart(2,"0")}`,[f,u]=B({urls:[],transferTime:c,transferAmount:r,transactionId:"",payerName:"",filesError:"",timeError:"",amountError:"",transactionIdError:"",payerNameError:""});J(()=>{u(m=>({...m,transferAmount:r}))},[r]);const y=async()=>{let m=!0;if(f.urls.length===0&&(m=!1,u(h=>({...h,filesError:_("请上传银行转账回单")}))),f.transferTime||(m=!1,u(h=>({...h,timeError:_("请选择转账时间")}))),r.trim()||(m=!1,a?.(_("请输入充值金额"))),f.transactionId.trim()||(m=!1,u(h=>({...h,transactionIdError:_("请输入转账交易ID")}))),f.payerName.trim()||(m=!1,u(h=>({...h,payerNameError:_("请输入付款人名称")}))),!!m)try{await $n({transferDate:f.transferTime,transferNo:f.transactionId,transferChannel:o,voucherUrls:f.urls,payerName:f.payerName,submitAmount:r,submitCurrency:n}),Ie.success(_("提交成功")),t()}finally{u(h=>({...h,loading:!1}))}};return d("div",{style:i.container,children:[d("div",{style:i.header,children:d("button",{type:"button",onClick:e,style:i.backButton,children:[d("span",{style:i.backIcon,children:"←"}),_("返回账户信息")]})}),d("div",{style:i.uploadSection,children:[d(Jn,{value:f.urls,onChange:m=>{u(h=>({...h,urls:m,filesError:""}))},maxCount:10,accept:"image/*,.pdf",multiple:!0}),f.filesError&&d("div",{style:i.error,children:f.filesError})]}),d("div",{style:i.fieldSection,children:[d("label",{style:i.fieldLabel,children:[d("span",{style:i.required,children:"*"}),_("转账时间")]}),d(qi,{value:f.transferTime,placeholder:_("请选择转账时间"),onChange:m=>{u(h=>({...h,transferTime:m,timeError:""}))},style:{width:"100%"}}),f.timeError&&d("div",{style:i.error,children:f.timeError})]}),d("div",{style:i.fieldSection,children:[d("label",{style:i.fieldLabel,children:_("转账金额")}),d("div",{style:i.inputWrapper,children:[d("input",{type:"text",placeholder:_("请输入实际转账金额"),value:f.transferAmount,readOnly:!0,disabled:!0,style:{...i.input,...s?i.disabledDark:i.disabled}}),d("span",{style:i.currencySuffix,children:n})]})]}),d("div",{style:i.fieldSection,children:[d("label",{style:i.fieldLabel,children:[d("span",{style:i.required,children:"*"}),_("交易ID")]}),d("input",{type:"text",placeholder:_("请输入转账交易ID"),value:f.transactionId,onChange:m=>{u(h=>({...h,transactionId:m.target.value,transactionIdError:""}))},style:{...i.input,...f.transactionIdError?i.inputError:{}}}),f.transactionIdError&&d("div",{style:i.error,children:f.transactionIdError})]}),d("div",{style:i.fieldSection,children:[d("label",{style:i.fieldLabel,children:[d("span",{style:i.required,children:"*"}),_("付款人名称")]}),d("input",{type:"text",placeholder:_("请输入付款人名称"),value:f.payerName,onChange:m=>{u(h=>({...h,payerName:m.target.value,payerNameError:""}))},style:{...i.input,...f.payerNameError?i.inputError:{}}}),f.payerNameError&&d("div",{style:i.error,children:f.payerNameError})]}),d("div",{style:i.buttonSection,children:[d("button",{type:"button",onClick:t,style:i.cancelButton,children:_("取消")}),d("button",{type:"button",onClick:y,style:i.submitButton,children:_("提交审核")})]})]})}function Vi(){const e=E("size"),t={container:{background:"#fff",borderRadius:8,padding:e===l.SMALL?16:20,width:"100%",maxWidth:"100%",boxSizing:"border-box","@media (max-width: 1020px)":{maxWidth:"100%",margin:0,padding:e===l.SMALL?12:16},"@media (min-width: 1021px)":{maxWidth:600,margin:"0 auto"}},header:{fontSize:e===l.SMALL?16:18,fontWeight:700,marginBottom:e===l.SMALL?16:20,textAlign:"left",display:"flex",alignItems:"center",gap:8},titleBar:{width:3,height:e===l.SMALL?16:20,background:"#1890ff",borderRadius:2},bankDetails:{marginBottom:e===l.SMALL?20:24},detailCard:{marginTop:12,marginBottom:12,border:"1px solid #f0f0f0",borderRadius:8,background:"#fafafa",overflow:"hidden"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:e===l.SMALL?"8px 0":"10px 0",borderBottom:"1px solid #f0f0f0",width:"100%",boxSizing:"border-box","@media (max-width: 600px)":{flexDirection:"column",alignItems:"flex-start",gap:4}},label:{fontSize:e===l.SMALL?13:14,color:"#666",fontWeight:500,minWidth:120,"@media (max-width: 600px)":{minWidth:"auto",marginBottom:2}},value:{fontSize:e===l.SMALL?13:14,color:"#222",fontWeight:500,textAlign:"right",flex:1,"@media (max-width: 600px)":{textAlign:"left",flex:"none",width:"100%"}},valueWithCopy:{display:"flex",alignItems:"center",gap:8,flex:1,justifyContent:"flex-end",minWidth:0,"@media (max-width: 600px)":{flex:"none",width:"100%",justifyContent:"flex-start"}},row:{display:"flex",alignItems:"center",padding:"10px 12px",borderBottom:"1px solid #ededed"},rowLast:{borderBottom:"none"},rowAlt:{background:"#fafafa"},labelMuted:{fontSize:e===l.SMALL?13:14,color:"#8c8c8c",fontWeight:500,flex:.4},valueStrong:{fontSize:e===l.SMALL?13:14,color:"#111",textAlign:"right",flex:.6,wordBreak:"break-all"},copyButton:{padding:e===l.SMALL?"4px 8px":"6px 12px",fontSize:e===l.SMALL?11:12,background:"#1890ff",color:"#fff",border:"none",borderRadius:4,cursor:"pointer",fontWeight:500,flexShrink:0,whiteSpace:"nowrap"},confirmButton:{width:"100%",marginBottom:e===l.SMALL?16:20,background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"10px 12px":"12px 16px",fontWeight:600,cursor:"pointer",fontSize:e===l.SMALL?13:14},noticeBox:{marginBottom:e===l.SMALL?16:20,padding:e===l.SMALL?"10px 12px":"12px 16px",borderRadius:6,background:"#FFF7E6",border:"1px solid #FFE7BA",color:"#AD6800",fontSize:e===l.SMALL?12:13,lineHeight:1.5},reminderTitle:{fontWeight:600,marginBottom:e===l.SMALL?8:12,textAlign:"left",fontSize:e===l.SMALL?14:16},reminderList:{margin:0,paddingLeft:18,color:"#666",lineHeight:1.6,textAlign:"left",fontSize:e===l.SMALL?12:13,listStyleType:"disc",listStylePosition:"outside"},link:{color:"#1890ff",textDecoration:"none",fontWeight:500}};return{white:{...t},dark:{...t,container:{...t.container,background:"#181A20",border:"1px solid #2B2E38"},titleBar:{...t.titleBar,background:"#00E8C6"},detailCard:{...t.detailCard,border:"1px solid #374151",background:"#23262F"},row:{...t.row,borderBottom:"1px solid #374151",background:"#23262F"},rowAlt:{...t.rowAlt,borderBottom:"1px solid #374151",background:"#23262F"},rowLast:{...t.rowLast,background:"#23262F"},labelMuted:{...t.labelMuted,color:"#B5B8BE"},valueStrong:{...t.valueStrong,color:"#fff"},label:{...t.label,color:"#B5B8BE"},value:{...t.value,color:"#fff"},copyButton:{...t.copyButton,background:"#00E8C6",color:"#111"},confirmButton:{...t.confirmButton,background:"#00E8C6",color:"#111"},noticeBox:{...t.noticeBox,background:"#2A1F0F",border:"1px solid #5C3E12",color:"#F4E3C1"},reminderTitle:{...t.reminderTitle,color:"#fff"},reminderList:{...t.reminderList,color:"#B5B8BE"},link:{...t.link,color:"#00E8C6"}}}}function Yi(){const e=E("theme"),t=E("themeConfig"),n=e===N.WHITE,r=Vi(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,titleBar:{...o.titleBar,background:a.color},copyButton:{...o.copyButton,background:a.color},confirmButton:{...o.confirmButton,background:a.color},link:{...o.link,color:a.color}}}return o}function Gi({onConfirm:e,channelCode:t}){const n=Yi(),[r,o]=B([]);return J(()=>{if(!t)return;let a=!0;return jn({code:t}).then(i=>{if(a){if(Array.isArray(i)){o(i.map(s=>String(s)));return}if(i&&typeof i=="object"){const s=[];Object.keys(i).forEach(p=>{const c=i[p];s.push(`${p}: ${c}`)}),o(s);return}o(i?[String(i)]:[])}}).catch(()=>o([])),()=>{a=!1}},[t]),d("div",{style:n.container,children:[d("div",{style:n.header,children:[d("span",{style:n.titleBar}),_("银行转账")]}),r.length>0&&d("div",{style:n.detailCard,children:r.map((a,i)=>{const s=String(a).split(":"),p=s.shift()?.trim()||"",c=s.join(":").trim();return d("div",{style:{...n.row,...i===r.length-1?n.rowLast:{},...i%2===1?n.rowAlt:{}},children:[d("div",{style:n.labelMuted,children:p}),d("div",{style:n.valueStrong,children:c||"-"})]},i)})}),d("button",{type:"button",onClick:e,style:n.confirmButton,children:_("确认转账详情")}),d("div",{style:n.noticeBox,children:_("转账后提交银行回单提示")}),d("div",{style:n.reminderTitle,children:_("温馨提示")}),d("ul",{style:n.reminderList,children:[d("li",{children:_("支付金额匹配提醒")}),d("li",{children:_("保存交易回单提醒")}),d("li",{children:_("查看余额提醒")}),d("li",{children:_("联系客服提醒")}),d("li",{children:_("P卡转账延迟提醒")}),d("li",{children:[_("平台服务费说明")," ",d("a",{href:"#",style:n.link,children:_("费用政策")})," ",_("详情")]})]})]})}function Ki({visible:e,onClose:t,onSubmit:n}){const r=Fi(),[o,a]=B(!1),[i,s]=B({currency:"USD",amount:"",channel:"",paymentType:"online",loading:!1,error:"",amountError:"",channelError:"",showOfflineUpload:!1});J(()=>{const x=()=>{a(window.innerWidth<=1020)};return x(),window.addEventListener("resize",x),()=>window.removeEventListener("resize",x)},[]),J(()=>{e||s({currency:"USD",amount:"",channel:"",paymentType:"online",loading:!1,error:"",amountError:"",channelError:"",showOfflineUpload:!1})},[e]);const p=(x,b)=>{s(S=>({...S,channel:x,paymentType:b,channelError:""}))},c=x=>{s(b=>({...b,amount:x,amountError:""}))},f=x=>{s(b=>({...b,amountError:x}))},u=x=>{s(b=>({...b,currency:x}))},y=async x=>{s(b=>({...b,loading:!0,error:""}));try{await n(x),t()}catch{s(b=>({...b,error:_("提交失败,请重试")}))}finally{s(b=>({...b,loading:!1}))}},m=()=>{console.log("用户确认银行转账详情"),s(x=>({...x,showOfflineUpload:!0}))},h=()=>{s(x=>({...x,showOfflineUpload:!1}))};return d(Vn,{visible:e,onClose:t,title:_("充值/转账"),width:o?"95%":960,maxWidth:o?"95%":1e3,children:d("div",{style:{...r.wrapper,...o?{gridTemplateColumns:"1fr",gap:16,minWidth:"auto"}:{}},children:[d(zi,{onChannelChange:p,onAmountChange:c,onCurrencyChange:u,initialAmount:i.amount,initialCurrency:i.currency,initialPaymentType:i.paymentType,amountError:i.amountError}),i.paymentType==="online"?d(Ni,{onSubmit:y,amount:i.amount,currency:i.currency,channel:i.channel,loading:i.loading,error:i.error,onAmountError:f}):i.showOfflineUpload?d(Ji,{onBack:h,onCancel:t,currency:i.currency,amount:i.amount,channel:i.channel,onAmountError:f}):d(Gi,{onConfirm:m,channelCode:i.channel})]})})}function Xi(){const[e,t]=B(!1),n=async r=>{const o=await Wn({amount:r.amount,currency:r.currency,rechargeChannel:r.rechargeChannel});window.open(o,"_blank")};return d("div",{children:[d(ht,{onClick:()=>t(!0),children:_("充值/转账")}),d(Ki,{visible:e,onClose:()=>t(!1),onSubmit:n})]})}qe(Xi,"best-payment",["theme"],{shadow:!1});const Kt={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"}}};function Zi(){return E("theme")===N.WHITE?Kt.white:Kt.dark}const Qi=({popover:e,children:t,popoverWidth:n,popoverMinWidth:r,offsetY:o,offsetX:a,popoverPosition:i="top"})=>{const s=E("size"),p=n??(s===l.SMALL?200:300),c=r??(s===l.SMALL?150:200),f=o??(s===l.SMALL?8:16),u=a??(s===l.SMALL?8:16),[y,m]=B(!1),[h,x]=B(i),b=se(null),S=se(null),L=Zi(),M=()=>{if(S.current&&(clearTimeout(S.current),S.current=null),i==="top"||i==="bottom")if(b.current){const P=b.current.getBoundingClientRect();i==="top"&&P.top<100?x("bottom"):i==="bottom"&&window.innerHeight-P.bottom<100?x("top"):x(i)}else x(i);else x(i);m(!0)},A=()=>{S.current=window.setTimeout(()=>{m(!1)},120)};let T={position:"absolute",zIndex:999,borderRadius:6,fontSize:s===l.SMALL?12:15,minWidth:c,width:p,padding:s===l.SMALL?"6px 12px":"8px 14px",pointerEvents:"auto",textAlign:"center",animation:"fadeInUp 0.3s",...L.popover},R={position:"absolute",zIndex:11,width:0,height:0};return h==="top"?(T={...T,left:"50%",top:-48,transform:"translateX(-50%)"},R={...R,left:"50%",bottom:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderTop:`8px solid ${L.arrow.top}`}):h==="bottom"?(T={...T,left:"50%",top:"100%",marginTop:f,transform:"translateX(-50%)"},R={...R,left:"50%",top:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderBottom:`8px solid ${L.arrow.bottom}`}):h==="leftTop"?(T={...T,right:"100%",top:0,marginRight:u,transform:"none"},R={...R,right:-8,top:s===l.SMALL?8:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderLeft:`8px solid ${L.arrow.left}`}):h==="rightTop"&&(T={...T,left:"100%",top:0,marginLeft:u,transform:"translateY(0)"},R={...R,left:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderRight:`8px solid ${L.arrow.right}`}),d("div",{ref:b,style:{position:"relative",display:"inline-block"},onMouseEnter:M,onMouseLeave:A,children:[t,y&&d("div",{style:T,onMouseEnter:M,onMouseLeave:A,children:[e,d("div",{style:R})]})]})};function ea(){const e=E("size");return{white:{popoverTitle:{fontSize:e===l.SMALL?12:16,fontWeight:600,color:"#222",marginBottom:e===l.SMALL?12:16,textAlign:"center"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:e===l.SMALL?"6px 0":"8px 0",borderBottom:"1px solid #e5e7eb",fontSize:e===l.SMALL?12:15},detailLabel:{display:"flex",alignItems:"center",color:"#6b7280",fontWeight:500},detailDot:t=>({display:"inline-block",width:e===l.SMALL?6:8,height:e===l.SMALL?6:8,borderRadius:"50%",background:t,marginRight:e===l.SMALL?6:8}),detailValue:t=>({color:t,fontWeight:600,fontSize:e===l.SMALL?12:15}),main:{fontSize:e===l.SMALL?18:24,fontWeight:800,color:"#111827",display:"inline-block"},currency:{fontSize:e===l.SMALL?16:18,color:"#6b7280",marginLeft:e===l.SMALL?6:8,fontWeight:600}},dark:{popoverTitle:{fontSize:e===l.SMALL?14:16,fontWeight:600,color:"#fff",marginBottom:e===l.SMALL?14:16,textAlign:"center"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:e===l.SMALL?"6px 0":"8px 0",borderBottom:"1px solid #374151",fontSize:e===l.SMALL?12:15},detailLabel:{display:"flex",alignItems:"center",color:"#B5B8BE",fontWeight:500},detailDot:t=>({display:"inline-block",width:e===l.SMALL?6:8,height:e===l.SMALL?6:8,borderRadius:"50%",background:t,marginRight:e===l.SMALL?6:8}),detailValue:t=>({color:t,fontWeight:600,fontSize:e===l.SMALL?12:15}),main:{fontSize:e===l.SMALL?18:24,fontWeight:800,color:"#fff",display:"inline-block"},currency:{fontSize:e===l.SMALL?16:18,color:"#B5B8BE",marginLeft:e===l.SMALL?6:8,fontWeight:600}}}}function ta(){const t=E("theme")===N.WHITE,n=ea();return t?n.white:n.dark}function Xt(e){return e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}function na(e){const[t,n]=B({currBalance:0,currency:"USD",details:[]}),r=async()=>{try{const i=await Un(),s=[{label:"",value:i.totalAmount,color:"#15b36b",dot:"#15b36b"},{label:"",value:i.frozenAmount,color:"#f59e0b",dot:"#f59e0b"},...i.isCredit?[{label:"",value:i.creditLimit,color:"#1890ff",dot:"#1890ff"},{label:"",value:i.creditUsed,color:"#ff0000",dot:"#ff0000"}]:[],{label:"",value:i.availableAmount,color:"#1890ff",dot:"#15b36b"}],p={currBalance:i.currBalance,currency:"USD",symbol:"$",details:s};n(p)}catch(i){console.error("获取余额失败:",i)}};J(()=>{r()},[]),J(()=>{const i=()=>{r()};return window.addEventListener("refresh-balance",i),()=>{window.removeEventListener("refresh-balance",i)}},[]);const o=ta(),a=[{label:_("真实金额"),value:t.details[0]?.value||0,color:"#15b36b",dot:"#15b36b"},{label:_("冻结金额"),value:t.details[1]?.value||0,color:"#f59e0b",dot:"#f59e0b"},...t.details.length>4?[{label:_("信用额度"),value:t.details[2]?.value||0,color:"#1890ff",dot:"#1890ff"},{label:_("已用额度"),value:t.details[3]?.value||0,color:"#ff0000",dot:"#ff0000"}]:[],{label:_("可用余额"),value:t.details[4]?.value||0,color:"#1890ff",dot:"#15b36b"}];return d(Qi,{popover:d(ne,{children:[d("div",{style:o.popoverTitle,children:_("余额详情")}),a.map(i=>d("div",{style:o.detailRow,children:[d("span",{style:o.detailLabel,children:[d("span",{style:o.detailDot(i.dot)}),i.label]}),d("span",{style:o.detailValue(i.color),children:Xt(i.value)})]},i.label))]}),popoverPosition:e.popoverPosition||"bottom",children:d("div",{style:o.main,children:[Xt(t.currBalance),d("span",{style:o.currency,children:t.currency})]})})}qe(na,"best-statistical-balance");const we={white:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,cursor:"pointer",fontWeight:600,transition:"all 0.2s ease"},dark:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,cursor:"pointer",fontWeight:600,transition:"all 0.2s ease"}};function ra(e){return E("theme")===N.WHITE?{...we.white,background:e||we.white.background}:{...we.dark,background:e||we.dark.background}}function oa(e){switch(e){case"small":return{fontSize:"12px",gap:"2px"};case"large":return{fontSize:"18px",gap:"6px"};default:return{fontSize:"14px",gap:"4px"}}}function ia({color:e,size:t="medium",children:n}){const[r,o]=B(!1),a=ra(e),i=oa(t),s={...a,...i,display:"flex",alignItems:"center"};return d(ne,{children:[d("style",{children:`
|
|
79
79
|
@keyframes spin {
|
|
80
80
|
from {
|
|
81
81
|
transform: rotate(0deg);
|
|
@@ -94,4 +94,4 @@
|
|
|
94
94
|
:host {
|
|
95
95
|
display: inline-block;
|
|
96
96
|
}
|
|
97
|
-
`}),d(ht,{onClick:async()=>{o(!0);try{qn(),await new Promise(f=>setTimeout(f,300))}finally{o(!1)}},color:e,children:d("div",{style:s,children:[d("svg",{className:"refresh-icon",width:t==="small"?"14":t==="large"?"24":"18",height:t==="small"?"14":t==="large"?"24":"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{animation:r?"spin 0.6s linear infinite":"none",transition:"all 0.2s ease"},children:[d("path",{d:"M21 2v6h-6"}),d("path",{d:"M3 12a9 9 0 0 1 15-6.7L21 8"}),d("path",{d:"M3 22v-6h6"}),d("path",{d:"M21 12a9 9 0 0 1-15 6.7L3 16"})]}),n&&d("span",{children:n})]})})]})}qe(
|
|
97
|
+
`}),d(ht,{onClick:async()=>{o(!0);try{qn(),await new Promise(f=>setTimeout(f,300))}finally{o(!1)}},color:e,children:d("div",{style:s,children:[d("svg",{className:"refresh-icon",width:t==="small"?"14":t==="large"?"24":"18",height:t==="small"?"14":t==="large"?"24":"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{animation:r?"spin 0.6s linear infinite":"none",transition:"all 0.2s ease"},children:[d("path",{d:"M21 2v6h-6"}),d("path",{d:"M3 12a9 9 0 0 1 15-6.7L21 8"}),d("path",{d:"M3 22v-6h6"}),d("path",{d:"M21 12a9 9 0 0 1-15 6.7L3 16"})]}),n&&d("span",{children:n})]})})]})}qe(ia,"best-refresh-button",[],{shadow:!0});const aa=["best-recharge","best-payment","best-statistical-balance","best-refresh-button"];exports.components=aa;exports.getBalanceData=Vo;exports.initFundUnit=Yo;exports.npmTest=Xo;exports.printCurrentTime=Zo;exports.refreshBalance=qn;exports.viteProxy=Qo;
|