best-unit 0.0.34 → 0.0.36
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 +5 -5
- package/dist/best-unit.js +77 -79
- package/dist/types/global.d.ts +0 -1
- package/package.json +1 -1
- package/src/components/business/statistical-balance/index.tsx +3 -3
- package/src/demo/App.tsx +0 -1
- package/src/types/global.d.ts +0 -1
- package/src/utils/business/index.ts +1 -4
package/dist/best-unit.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function _n(){console.log("npm package test!!!")}function mn(){console.log("Current time:",new Date().toISOString())}function bn(e){const{merchant_id:t,biz_type:n,theme:r,user_id:o,locale:i="zh"}=e,s="Bearer "+e.token;return sessionStorage.setItem("fund_unit_params",JSON.stringify({merchantId:t,bizType:n,userId:o,token:s,theme:r,locale:i})),{token:s,merchantId:t,bizType:n,theme:r,userId:o,locale:i}}const gn={"/api":{target:"https://fund.bestfulfill.tech/api/sdk",changeOrigin:!0,rewrite:e=>e.replace(/^\/api/,""),secure:!1}};var re,S,St,M,Xe,vt,Rt,Ct,He,Fe,Pe,ee={},Tt=[],yn=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,me=Array.isArray;function I(e,t){for(var n in t)e[n]=t[n];return e}function Me(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function J(e,t,n){var r,o,i,s={};for(i in t)i=="key"?r=t[i]:i=="ref"?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?re.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return Y(e,s,r,o,null)}function Y(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++St,__i:-1,__u:0};return o==null&&S.vnode!=null&&S.vnode(i),i}function G(e){return e.children}function ae(e,t){this.props=e,this.context=t}function V(e,t){if(t==null)return e.__?V(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"?V(e):null}function kt(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 kt(e)}}function Ze(e){(!e.__d&&(e.__d=!0)&&M.push(e)&&!de.__r++||Xe!=S.debounceRendering)&&((Xe=S.debounceRendering)||vt)(de)}function de(){for(var e,t,n,r,o,i,s,a=1;M.length;)M.length>a&&M.sort(Rt),e=M.shift(),a=M.length,e.__d&&(n=void 0,o=(r=(t=e).__v).__e,i=[],s=[],t.__P&&((n=I({},r)).__v=r.__v+1,S.vnode&&S.vnode(n),$e(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[o]:null,i,o??V(r),!!(32&r.__u),s),n.__v=r.__v,n.__.__k[n.__i]=n,Ft(i,n,s),n.__e!=o&&kt(n)));de.__r=0}function At(e,t,n,r,o,i,s,a,c,u,f){var l,b,h,p,g,_,y=r&&r.__k||Tt,w=t.length;for(c=wn(n,t,y,c,w),l=0;l<w;l++)(h=n.__k[l])!=null&&(b=h.__i==-1?ee:y[h.__i]||ee,h.__i=l,_=$e(e,h,b,o,i,s,a,c,u,f),p=h.__e,h.ref&&b.ref!=h.ref&&(b.ref&&qe(b.ref,null,h),f.push(h.ref,h.__c||p,h)),g==null&&p!=null&&(g=p),4&h.__u||b.__k===h.__k?c=Ot(h,c,e):typeof h.type=="function"&&_!==void 0?c=_:p&&(c=p.nextSibling),h.__u&=-7);return n.__e=g,c}function wn(e,t,n,r,o){var i,s,a,c,u,f=n.length,l=f,b=0;for(e.__k=new Array(o),i=0;i<o;i++)(s=t[i])!=null&&typeof s!="boolean"&&typeof s!="function"?(c=i+b,(s=e.__k[i]=typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?Y(null,s,null,null,null):me(s)?Y(G,{children:s},null,null,null):s.constructor==null&&s.__b>0?Y(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s).__=e,s.__b=e.__b+1,a=null,(u=s.__i=xn(s,n,c,l))!=-1&&(l--,(a=n[u])&&(a.__u|=2)),a==null||a.__v==null?(u==-1&&(o>f?b--:o<f&&b++),typeof s.type!="function"&&(s.__u|=4)):u!=c&&(u==c-1?b--:u==c+1?b++:(u>c?b--:b++,s.__u|=4))):e.__k[i]=null;if(l)for(i=0;i<f;i++)(a=n[i])!=null&&(2&a.__u)==0&&(a.__e==r&&(r=V(a)),Bt(a,a));return r}function Ot(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=Ot(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=V(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function xn(e,t,n,r){var o,i,s=e.key,a=e.type,c=t[n];if(c===null&&e.key==null||c&&s==c.key&&a==c.type&&(2&c.__u)==0)return n;if(r>(c!=null&&(2&c.__u)==0?1:0))for(o=n-1,i=n+1;o>=0||i<t.length;){if(o>=0){if((c=t[o])&&(2&c.__u)==0&&s==c.key&&a==c.type)return o;o--}if(i<t.length){if((c=t[i])&&(2&c.__u)==0&&s==c.key&&a==c.type)return i;i++}}return-1}function Qe(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||yn.test(t)?n:n+"px"}function se(e,t,n,r,o){var i,s;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Qe(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||Qe(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(Ct,"$1")),s=t.toLowerCase(),t=s in e||t=="onFocusOut"||t=="onFocusIn"?s.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=He,e.addEventListener(t,i?Pe:Fe,i)):e.removeEventListener(t,i?Pe:Fe,i);else{if(o=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function Ye(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=He++;else if(t.t<n.u)return;return n(S.event?S.event(t):t)}}}function $e(e,t,n,r,o,i,s,a,c,u){var f,l,b,h,p,g,_,y,w,v,A,k,F,D,j,H,Ce,U=t.type;if(t.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),i=[a=t.__e=n.__e]),(f=S.__b)&&f(t);e:if(typeof U=="function")try{if(y=t.props,w="prototype"in U&&U.prototype.render,v=(f=U.contextType)&&r[f.__c],A=f?v?v.props.value:f.__:r,n.__c?_=(l=t.__c=n.__c).__=l.__E:(w?t.__c=l=new U(y,A):(t.__c=l=new ae(y,A),l.constructor=U,l.render=Sn),v&&v.sub(l),l.props=y,l.state||(l.state={}),l.context=A,l.__n=r,b=l.__d=!0,l.__h=[],l._sb=[]),w&&l.__s==null&&(l.__s=l.state),w&&U.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=I({},l.__s)),I(l.__s,U.getDerivedStateFromProps(y,l.__s))),h=l.props,p=l.state,l.__v=t,b)w&&U.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),w&&l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(w&&U.getDerivedStateFromProps==null&&y!==h&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(y,A),!l.__e&&l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(y,l.__s,A)===!1||t.__v==n.__v){for(t.__v!=n.__v&&(l.props=y,l.state=l.__s,l.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(Z){Z&&(Z.__=t)}),k=0;k<l._sb.length;k++)l.__h.push(l._sb[k]);l._sb=[],l.__h.length&&s.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(y,l.__s,A),w&&l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(h,p,g)})}if(l.context=A,l.props=y,l.__P=e,l.__e=!1,F=S.__r,D=0,w){for(l.state=l.__s,l.__d=!1,F&&F(t),f=l.render(l.props,l.state,l.context),j=0;j<l._sb.length;j++)l.__h.push(l._sb[j]);l._sb=[]}else do l.__d=!1,F&&F(t),f=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++D<25);l.state=l.__s,l.getChildContext!=null&&(r=I(I({},r),l.getChildContext())),w&&!b&&l.getSnapshotBeforeUpdate!=null&&(g=l.getSnapshotBeforeUpdate(h,p)),H=f,f!=null&&f.type===G&&f.key==null&&(H=Pt(f.props.children)),a=At(e,me(H)?H:[H],t,n,r,o,i,s,a,c,u),l.base=t.__e,t.__u&=-161,l.__h.length&&s.push(l),_&&(l.__E=l.__=null)}catch(Z){if(t.__v=null,c||i!=null)if(Z.then){for(t.__u|=c?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;i[i.indexOf(a)]=null,t.__e=a}else for(Ce=i.length;Ce--;)Me(i[Ce]);else t.__e=n.__e,t.__k=n.__k;S.__e(Z,t,n)}else i==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=En(n.__e,t,n,r,o,i,s,c,u);return(f=S.diffed)&&f(t),128&t.__u?void 0:a}function Ft(e,t,n){for(var r=0;r<n.length;r++)qe(n[r],n[++r],n[++r]);S.__c&&S.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){S.__e(i,o.__v)}})}function Pt(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:me(e)?e.map(Pt):I({},e)}function En(e,t,n,r,o,i,s,a,c){var u,f,l,b,h,p,g,_=n.props,y=t.props,w=t.type;if(w=="svg"?o="http://www.w3.org/2000/svg":w=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),i!=null){for(u=0;u<i.length;u++)if((h=i[u])&&"setAttribute"in h==!!w&&(w?h.localName==w:h.nodeType==3)){e=h,i[u]=null;break}}if(e==null){if(w==null)return document.createTextNode(y);e=document.createElementNS(o,w,y.is&&y),a&&(S.__m&&S.__m(t,i),a=!1),i=null}if(w==null)_===y||a&&e.data==y||(e.data=y);else{if(i=i&&re.call(e.childNodes),_=n.props||ee,!a&&i!=null)for(_={},u=0;u<e.attributes.length;u++)_[(h=e.attributes[u]).name]=h.value;for(u in _)if(h=_[u],u!="children"){if(u=="dangerouslySetInnerHTML")l=h;else if(!(u in y)){if(u=="value"&&"defaultValue"in y||u=="checked"&&"defaultChecked"in y)continue;se(e,u,null,h,o)}}for(u in y)h=y[u],u=="children"?b=h:u=="dangerouslySetInnerHTML"?f=h:u=="value"?p=h:u=="checked"?g=h:a&&typeof h!="function"||_[u]===h||se(e,u,h,_[u],o);if(f)a||l&&(f.__html==l.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(l&&(e.innerHTML=""),At(t.type=="template"?e.content:e,me(b)?b:[b],t,n,r,w=="foreignObject"?"http://www.w3.org/1999/xhtml":o,i,s,i?i[0]:n.__k&&V(n,0),a,c),i!=null)for(u=i.length;u--;)Me(i[u]);a||(u="value",w=="progress"&&p==null?e.removeAttribute("value"):p!=null&&(p!==e[u]||w=="progress"&&!p||w=="option"&&p!=_[u])&&se(e,u,p,_[u],o),u="checked",g!=null&&g!=e[u]&&se(e,u,g,_[u],o))}return e}function qe(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(o){S.__e(o,n)}}function Bt(e,t,n){var r,o;if(S.unmount&&S.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||qe(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){S.__e(i,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&Bt(r[o],t,n||typeof e.type!="function");n||Me(e.__e),e.__c=e.__=e.__e=void 0}function Sn(e,t,n){return this.constructor(e,n)}function be(e,t,n){var r,o,i,s;t==document&&(t=document.documentElement),S.__&&S.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],s=[],$e(t,e=(!r&&n||t).__k=J(G,null,[e]),o||ee,ee,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?re.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,s),Ft(i,e,s)}function Nt(e,t){be(e,t,Nt)}function Dt(e,t,n){var r,o,i,s,a=I({},e.props);for(i in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)i=="key"?r=t[i]:i=="ref"?o=t[i]:a[i]=t[i]===void 0&&s!=null?s[i]:t[i];return arguments.length>2&&(a.children=arguments.length>3?re.call(arguments,2):n),Y(e.type,a,r||e.key,o||e.ref,null)}re=Tt.slice,S={__e:function(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(a){e=a}throw e}},St=0,ae.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=I({},this.state),typeof e=="function"&&(e=e(I({},n),this.props)),e&&I(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Ze(this))},ae.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ze(this))},ae.prototype.render=G,M=[],vt=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Rt=function(e,t){return e.__v.__b-t.__v.__b},de.__r=0,Ct=/(PointerCapture)$|Capture$/i,He=0,Fe=Ye(!1),Pe=Ye(!0);var vn=0;function m(e,t,n,r,o,i){t||(t={});var s,a,c=t;if("ref"in c)for(a in c={},t)a=="ref"?s=t[a]:c[a]=t[a];var u={type:e,props:c,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--vn,__i:-1,__u:0,__source:o,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(a in s)c[a]===void 0&&(c[a]=s[a]);return S.vnode&&S.vnode(u),u}var te,R,Te,et,pe=0,Ut=[],T=S,tt=T.__b,nt=T.__r,rt=T.diffed,ot=T.__c,it=T.unmount,st=T.__;function We(e,t){T.__h&&T.__h(R,e,pe||t),pe=0;var n=R.__H||(R.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function z(e){return pe=1,Rn(jt,e)}function Rn(e,t,n){var r=We(te++,2);if(r.t=e,!r.__c&&(r.__=[jt(void 0,t),function(a){var c=r.__N?r.__N[0]:r.__[0],u=r.t(c,a);c!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=R,!R.__f)){var o=function(a,c,u){if(!r.__c.__H)return!0;var f=r.__c.__H.__.filter(function(b){return!!b.__c});if(f.every(function(b){return!b.__N}))return!i||i.call(this,a,c,u);var l=r.__c.props!==a;return f.forEach(function(b){if(b.__N){var h=b.__[0];b.__=b.__N,b.__N=void 0,h!==b.__[0]&&(l=!0)}}),i&&i.call(this,a,c,u)||l};R.__f=!0;var i=R.shouldComponentUpdate,s=R.componentWillUpdate;R.componentWillUpdate=function(a,c,u){if(this.__e){var f=i;i=void 0,o(a,c,u),i=f}s&&s.call(this,a,c,u)},R.shouldComponentUpdate=o}return r.__N||r.__}function Lt(e,t){var n=We(te++,3);!T.__s&&zt(n.__H,t)&&(n.__=e,n.u=t,R.__H.__h.push(n))}function It(e){return pe=5,Cn(function(){return{current:e}},[])}function Cn(e,t){var n=We(te++,7);return zt(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Tn(){for(var e;e=Ut.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(le),e.__H.__h.forEach(Be),e.__H.__h=[]}catch(t){e.__H.__h=[],T.__e(t,e.__v)}}T.__b=function(e){R=null,tt&&tt(e)},T.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),st&&st(e,t)},T.__r=function(e){nt&&nt(e),te=0;var t=(R=e.__c).__H;t&&(Te===R?(t.__h=[],R.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(le),t.__h.forEach(Be),t.__h=[],te=0)),Te=R},T.diffed=function(e){rt&&rt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Ut.push(t)!==1&&et===T.requestAnimationFrame||((et=T.requestAnimationFrame)||kn)(Tn)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Te=R=null},T.__c=function(e,t){t.some(function(n){try{n.__h.forEach(le),n.__h=n.__h.filter(function(r){return!r.__||Be(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],T.__e(r,n.__v)}}),ot&&ot(e,t)},T.unmount=function(e){it&&it(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{le(r)}catch(o){t=o}}),n.__H=void 0,t&&T.__e(t,n.__v))};var at=typeof requestAnimationFrame=="function";function kn(e){var t,n=function(){clearTimeout(r),at&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);at&&(t=requestAnimationFrame(n))}function le(e){var t=R,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),R=t}function Be(e){var t=R;e.__c=e.__(),R=t}function zt(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function jt(e,t){return typeof t=="function"?t(e):t}function An({onClick:e,color:t,children:n}){return m("button",{style:{background:t||"#1890ff",color:"#fff",border:"none",borderRadius:4,padding:"8px 16px",cursor:"pointer",fontSize:16},onClick:e,children:n})}const On={余额详情:"余额详情",真实金额:"真实金额",冻结金额:"冻结金额",总可用:"总可用","充值 / 转账":"充值 / 转账",在线充值:"在线充值",线下转账:"线下转账",充值币种:"充值币种",充值金额:"充值金额",支付平台:"支付平台",请选择充值币种:"请选择充值币种",请输入充值金额:"请输入充值金额",请选择支付平台:"请选择支付平台","提交失败,请重试":"提交失败,请重试","提交中...":"提交中...",去支付:"去支付",取消:"取消",关闭:"关闭",第三方支付平台:"第三方支付平台",交易ID:"交易ID",请输入转账交易ID:"请输入转账交易ID",上传文件:"上传文件",请上传转账凭证:"请上传转账凭证",离线充值创建成功:"离线充值创建成功","加载中...":"加载中...",错误:"错误",成功:"成功",必填:"必填","充值/转账":"充值/转账",切换为暗黑主题:"切换为暗黑主题",切换为白色主题:"切换为白色主题",点击或拖拽文件到此处上传:"点击或拖拽文件到此处上传","支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传":"支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传",个文件:"个文件","正在上传...":"正在上传...",已上传:"已上传",移除:"移除"};function Fn(e){return On[e]||e}const Pn={余额详情:"Balance Details",真实金额:"Real Amount",冻结金额:"Frozen Amount",总可用:"Total Available","充值 / 转账":"Recharge / Transfer",在线充值:"Online Recharge",线下转账:"Offline Transfer",充值币种:"Recharge Currency",充值金额:"Recharge Amount",支付平台:"Payment Platform",请选择充值币种:"Please select recharge currency",请输入充值金额:"Please enter recharge amount",请选择支付平台:"Please select payment platform","提交失败,请重试":"Submit failed, please try again","提交中...":"Submitting...",去支付:"Go to Pay",取消:"Cancel",关闭:"Close",第三方支付平台:"Third-party Payment Platform",交易ID:"Transaction ID",请输入转账交易ID:"Please enter transfer transaction ID",上传文件:"Upload Files",请上传转账凭证:"Please upload transfer voucher",离线充值创建成功:"Offline recharge created successfully","加载中...":"Loading...",错误:"Error",成功:"Success",必填:"Required","充值/转账":"Recharge/Transfer",切换为暗黑主题:"Switch to Dark Theme",切换为白色主题:"Switch to Light Theme",点击或拖拽文件到此处上传:"Click or drag files here to upload","支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传":"Supports JPG, PNG, PDF formats, single file not exceeding 20MB, maximum",个文件:"files can be uploaded","正在上传...":"Uploading...",已上传:"Uploaded",移除:"Remove"};function Bn(e){return Pn[e]||e}function Nn(){return JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").locale||"zh"}function E(e){return Nn()==="zh"?Fn(e):Bn(e)}const Dn=({formState:e,setFormState:t,onClose:n,loading:r,whiteTheme:o=!1})=>{const i=JSON.parse(sessionStorage.getItem("all_dicts")||"{}"),s=i?.currency||[],a=i?.channel?.filter(l=>l.payment_support)||[],c=o?{label:{marginBottom:8,fontSize:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},select:{width:"100%",padding:"10px 12px",borderRadius:6,border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}}:{label:{marginBottom:8,fontSize:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #23262F",background:"#23262F",color:"#fff",fontSize:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},select:{width:"100%",padding:"10px 12px",borderRadius:6,border:"1px solid #23262F",background:"#23262F",color:"#fff",fontSize:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}},u=o?{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"}:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"},f=o?{background:"#155EEF",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600}:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600};return m(G,{children:[m("div",{style:{marginBottom:18},children:[m("div",{style:c.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",E("充值币种")]}),m("select",{style:{...c.select},value:e.currency,onInput:l=>{const b=l.target.value;t(h=>({...h,currency:b}))},children:[m("option",{value:"",disabled:!0,hidden:!0,children:E("请选择充值币种")}),s?.map(l=>m("option",{value:l.value,children:l.label}))]})]}),m("div",{style:{marginBottom:18},children:[m("div",{style:c.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",E("充值金额")]}),m("input",{type:"text",placeholder:E("请输入充值金额"),value:e.amount,onInput:l=>{const b=l.target.value;t(h=>({...h,amount:b,amountError:b.trim()?"":h.amountError}))},style:{...c.input,...e.amountError?c.inputError:{}}}),e.amountError&&m("div",{style:c.error,children:e.amountError})]}),m("div",{style:{marginBottom:24},children:[m("div",{style:c.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",E("支付平台")]}),m("select",{style:{...c.select,...e.rechargeChannelError?c.selectError:{}},value:e.rechargeChannel,onInput:l=>{const b=l.target.value;t(h=>({...h,rechargeChannel:b,rechargeChannelError:b?"":h.rechargeChannelError}))},children:[m("option",{value:"",disabled:!0,hidden:!0,children:E("请选择支付平台")}),a?.map(l=>m("option",{value:l.value,children:l.label}))]}),e.rechargeChannelError&&m("div",{style:c.error,children:e.rechargeChannelError})]}),e.error&&m("div",{style:{color:"#ff4d4f",marginBottom:12},children:e.error}),m("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[m("button",{type:"button",onClick:n,style:u,children:E("取消")}),m("button",{type:"submit",disabled:r,style:f,children:E(r?"提交中...":"去支付")})]})]})};function Ht(e,t){return function(){return e.apply(t,arguments)}}const{toString:Un}=Object.prototype,{getPrototypeOf:Je}=Object,{iterator:ge,toStringTag:Mt}=Symbol,ye=(e=>t=>{const n=Un.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),N=e=>(e=e.toLowerCase(),t=>ye(t)===e),we=e=>t=>typeof t===e,{isArray:K}=Array,ne=we("undefined");function Ln(e){return e!==null&&!ne(e)&&e.constructor!==null&&!ne(e.constructor)&&P(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const $t=N("ArrayBuffer");function In(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&$t(e.buffer),t}const zn=we("string"),P=we("function"),qt=we("number"),xe=e=>e!==null&&typeof e=="object",jn=e=>e===!0||e===!1,ce=e=>{if(ye(e)!=="object")return!1;const t=Je(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Mt in e)&&!(ge in e)},Hn=N("Date"),Mn=N("File"),$n=N("Blob"),qn=N("FileList"),Wn=e=>xe(e)&&P(e.pipe),Jn=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||P(e.append)&&((t=ye(e))==="formdata"||t==="object"&&P(e.toString)&&e.toString()==="[object FormData]"))},Vn=N("URLSearchParams"),[Gn,Kn,Xn,Zn]=["ReadableStream","Request","Response","Headers"].map(N),Qn=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function oe(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),K(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),s=i.length;let a;for(r=0;r<s;r++)a=i[r],t.call(null,e[a],a,e)}}function Wt(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 $=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Jt=e=>!ne(e)&&e!==$;function Ne(){const{caseless:e}=Jt(this)&&this||{},t={},n=(r,o)=>{const i=e&&Wt(t,o)||o;ce(t[i])&&ce(r)?t[i]=Ne(t[i],r):ce(r)?t[i]=Ne({},r):K(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&oe(arguments[r],n);return t}const Yn=(e,t,n,{allOwnKeys:r}={})=>(oe(t,(o,i)=>{n&&P(o)?e[i]=Ht(o,n):e[i]=o},{allOwnKeys:r}),e),er=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)},nr=(e,t,n,r)=>{let o,i,s;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],(!r||r(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=n!==!1&&Je(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},rr=(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},or=e=>{if(!e)return null;if(K(e))return e;let t=e.length;if(!qt(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},ir=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Je(Uint8Array)),sr=(e,t)=>{const r=(e&&e[ge]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},ar=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},lr=N("HTMLFormElement"),cr=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),lt=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),ur=N("RegExp"),Vt=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};oe(n,(o,i)=>{let s;(s=t(o,i,e))!==!1&&(r[i]=s||o)}),Object.defineProperties(e,r)},fr=e=>{Vt(e,(t,n)=>{if(P(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(P(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},dr=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return K(e)?r(e):r(String(e).split(t)),n},pr=()=>{},hr=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function _r(e){return!!(e&&P(e.append)&&e[Mt]==="FormData"&&e[ge])}const mr=e=>{const t=new Array(10),n=(r,o)=>{if(xe(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=K(r)?[]:{};return oe(r,(s,a)=>{const c=n(s,o+1);!ne(c)&&(i[a]=c)}),t[o]=void 0,i}}return r};return n(e,0)},br=N("AsyncFunction"),gr=e=>e&&(xe(e)||P(e))&&P(e.then)&&P(e.catch),Gt=((e,t)=>e?setImmediate:t?((n,r)=>($.addEventListener("message",({source:o,data:i})=>{o===$&&i===n&&r.length&&r.shift()()},!1),o=>{r.push(o),$.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",P($.postMessage)),yr=typeof queueMicrotask<"u"?queueMicrotask.bind($):typeof process<"u"&&process.nextTick||Gt,wr=e=>e!=null&&P(e[ge]),d={isArray:K,isArrayBuffer:$t,isBuffer:Ln,isFormData:Jn,isArrayBufferView:In,isString:zn,isNumber:qt,isBoolean:jn,isObject:xe,isPlainObject:ce,isReadableStream:Gn,isRequest:Kn,isResponse:Xn,isHeaders:Zn,isUndefined:ne,isDate:Hn,isFile:Mn,isBlob:$n,isRegExp:ur,isFunction:P,isStream:Wn,isURLSearchParams:Vn,isTypedArray:ir,isFileList:qn,forEach:oe,merge:Ne,extend:Yn,trim:Qn,stripBOM:er,inherits:tr,toFlatObject:nr,kindOf:ye,kindOfTest:N,endsWith:rr,toArray:or,forEachEntry:sr,matchAll:ar,isHTMLForm:lr,hasOwnProperty:lt,hasOwnProp:lt,reduceDescriptors:Vt,freezeMethods:fr,toObjectSet:dr,toCamelCase:cr,noop:pr,toFiniteNumber:hr,findKey:Wt,global:$,isContextDefined:Jt,isSpecCompliantForm:_r,toJSONObject:mr,isAsyncFn:br,isThenable:gr,setImmediate:Gt,asap:yr,isIterable:wr};function x(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}d.inherits(x,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:d.toJSONObject(this.config),code:this.code,status:this.status}}});const Kt=x.prototype,Xt={};["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=>{Xt[e]={value:e}});Object.defineProperties(x,Xt);Object.defineProperty(Kt,"isAxiosError",{value:!0});x.from=(e,t,n,r,o,i)=>{const s=Object.create(Kt);return d.toFlatObject(e,s,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),x.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const xr=null;function De(e){return d.isPlainObject(e)||d.isArray(e)}function Zt(e){return d.endsWith(e,"[]")?e.slice(0,-2):e}function ct(e,t,n){return e?e.concat(t).map(function(o,i){return o=Zt(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function Er(e){return d.isArray(e)&&!e.some(De)}const Sr=d.toFlatObject(d,{},null,function(t){return/^is[A-Z]/.test(t)});function Ee(e,t,n){if(!d.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=d.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,_){return!d.isUndefined(_[g])});const r=n.metaTokens,o=n.visitor||f,i=n.dots,s=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&d.isSpecCompliantForm(t);if(!d.isFunction(o))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(d.isDate(p))return p.toISOString();if(d.isBoolean(p))return p.toString();if(!c&&d.isBlob(p))throw new x("Blob is not supported. Use a Buffer instead.");return d.isArrayBuffer(p)||d.isTypedArray(p)?c&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function f(p,g,_){let y=p;if(p&&!_&&typeof p=="object"){if(d.endsWith(g,"{}"))g=r?g:g.slice(0,-2),p=JSON.stringify(p);else if(d.isArray(p)&&Er(p)||(d.isFileList(p)||d.endsWith(g,"[]"))&&(y=d.toArray(p)))return g=Zt(g),y.forEach(function(v,A){!(d.isUndefined(v)||v===null)&&t.append(s===!0?ct([g],A,i):s===null?g:g+"[]",u(v))}),!1}return De(p)?!0:(t.append(ct(_,g,i),u(p)),!1)}const l=[],b=Object.assign(Sr,{defaultVisitor:f,convertValue:u,isVisitable:De});function h(p,g){if(!d.isUndefined(p)){if(l.indexOf(p)!==-1)throw Error("Circular reference detected in "+g.join("."));l.push(p),d.forEach(p,function(y,w){(!(d.isUndefined(y)||y===null)&&o.call(t,y,d.isString(w)?w.trim():w,g,b))===!0&&h(y,g?g.concat(w):[w])}),l.pop()}}if(!d.isObject(e))throw new TypeError("data must be an object");return h(e),t}function ut(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Ve(e,t){this._pairs=[],e&&Ee(e,this,t)}const Qt=Ve.prototype;Qt.append=function(t,n){this._pairs.push([t,n])};Qt.toString=function(t){const n=t?function(r){return t.call(this,r,ut)}:ut;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function vr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Yt(e,t,n){if(!t)return e;const r=n&&n.encode||vr;d.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(o?i=o(t,n):i=d.isURLSearchParams(t)?t.toString():new Ve(t,n).toString(r),i){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class ft{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){d.forEach(this.handlers,function(r){r!==null&&t(r)})}}const en={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Rr=typeof URLSearchParams<"u"?URLSearchParams:Ve,Cr=typeof FormData<"u"?FormData:null,Tr=typeof Blob<"u"?Blob:null,kr={isBrowser:!0,classes:{URLSearchParams:Rr,FormData:Cr,Blob:Tr},protocols:["http","https","file","blob","url","data"]},Ge=typeof window<"u"&&typeof document<"u",Ue=typeof navigator=="object"&&navigator||void 0,Ar=Ge&&(!Ue||["ReactNative","NativeScript","NS"].indexOf(Ue.product)<0),Or=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Fr=Ge&&window.location.href||"http://localhost",Pr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ge,hasStandardBrowserEnv:Ar,hasStandardBrowserWebWorkerEnv:Or,navigator:Ue,origin:Fr},Symbol.toStringTag,{value:"Module"})),O={...Pr,...kr};function Br(e,t){return Ee(e,new O.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return O.isNode&&d.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function Nr(e){return d.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Dr(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}function tn(e){function t(n,r,o,i){let s=n[i++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),c=i>=n.length;return s=!s&&d.isArray(o)?o.length:s,c?(d.hasOwnProp(o,s)?o[s]=[o[s],r]:o[s]=r,!a):((!o[s]||!d.isObject(o[s]))&&(o[s]=[]),t(n,r,o[s],i)&&d.isArray(o[s])&&(o[s]=Dr(o[s])),!a)}if(d.isFormData(e)&&d.isFunction(e.entries)){const n={};return d.forEachEntry(e,(r,o)=>{t(Nr(r),o,n,0)}),n}return null}function Ur(e,t,n){if(d.isString(e))try{return(t||JSON.parse)(e),d.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ie={transitional:en,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=d.isObject(t);if(i&&d.isHTMLForm(t)&&(t=new FormData(t)),d.isFormData(t))return o?JSON.stringify(tn(t)):t;if(d.isArrayBuffer(t)||d.isBuffer(t)||d.isStream(t)||d.isFile(t)||d.isBlob(t)||d.isReadableStream(t))return t;if(d.isArrayBufferView(t))return t.buffer;if(d.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Br(t,this.formSerializer).toString();if((a=d.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Ee(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),Ur(t)):t}],transformResponse:[function(t){const n=this.transitional||ie.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(d.isResponse(t)||d.isReadableStream(t))return t;if(t&&d.isString(t)&&(r&&!this.responseType||o)){const s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(a){if(s)throw a.name==="SyntaxError"?x.from(a,x.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:O.classes.FormData,Blob:O.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};d.forEach(["delete","get","head","post","put","patch"],e=>{ie.headers[e]={}});const Lr=d.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ir=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function _n(){console.log("npm package test!!!")}function mn(){console.log("Current time:",new Date().toISOString())}function bn(e){const{merchant_id:t,biz_type:n,theme:r,locale:o="zh"}=e,i="Bearer "+e.token;return sessionStorage.setItem("fund_unit_params",JSON.stringify({merchantId:t,bizType:n,token:i,theme:r,locale:o})),{token:i,merchantId:t,bizType:n,theme:r,locale:o}}const gn={"/api":{target:"https://fund.bestfulfill.tech/api/sdk",changeOrigin:!0,rewrite:e=>e.replace(/^\/api/,""),secure:!1}};var re,S,St,M,Xe,vt,Rt,Ct,He,Fe,Pe,ee={},Tt=[],yn=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,me=Array.isArray;function I(e,t){for(var n in t)e[n]=t[n];return e}function Me(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function J(e,t,n){var r,o,i,s={};for(i in t)i=="key"?r=t[i]:i=="ref"?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?re.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return Y(e,s,r,o,null)}function Y(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++St,__i:-1,__u:0};return o==null&&S.vnode!=null&&S.vnode(i),i}function G(e){return e.children}function ae(e,t){this.props=e,this.context=t}function V(e,t){if(t==null)return e.__?V(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"?V(e):null}function kt(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 kt(e)}}function Ze(e){(!e.__d&&(e.__d=!0)&&M.push(e)&&!de.__r++||Xe!=S.debounceRendering)&&((Xe=S.debounceRendering)||vt)(de)}function de(){for(var e,t,n,r,o,i,s,a=1;M.length;)M.length>a&&M.sort(Rt),e=M.shift(),a=M.length,e.__d&&(n=void 0,o=(r=(t=e).__v).__e,i=[],s=[],t.__P&&((n=I({},r)).__v=r.__v+1,S.vnode&&S.vnode(n),$e(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[o]:null,i,o??V(r),!!(32&r.__u),s),n.__v=r.__v,n.__.__k[n.__i]=n,Ft(i,n,s),n.__e!=o&&kt(n)));de.__r=0}function At(e,t,n,r,o,i,s,a,c,u,f){var l,b,h,p,g,_,y=r&&r.__k||Tt,w=t.length;for(c=wn(n,t,y,c,w),l=0;l<w;l++)(h=n.__k[l])!=null&&(b=h.__i==-1?ee:y[h.__i]||ee,h.__i=l,_=$e(e,h,b,o,i,s,a,c,u,f),p=h.__e,h.ref&&b.ref!=h.ref&&(b.ref&&qe(b.ref,null,h),f.push(h.ref,h.__c||p,h)),g==null&&p!=null&&(g=p),4&h.__u||b.__k===h.__k?c=Ot(h,c,e):typeof h.type=="function"&&_!==void 0?c=_:p&&(c=p.nextSibling),h.__u&=-7);return n.__e=g,c}function wn(e,t,n,r,o){var i,s,a,c,u,f=n.length,l=f,b=0;for(e.__k=new Array(o),i=0;i<o;i++)(s=t[i])!=null&&typeof s!="boolean"&&typeof s!="function"?(c=i+b,(s=e.__k[i]=typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?Y(null,s,null,null,null):me(s)?Y(G,{children:s},null,null,null):s.constructor==null&&s.__b>0?Y(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s).__=e,s.__b=e.__b+1,a=null,(u=s.__i=xn(s,n,c,l))!=-1&&(l--,(a=n[u])&&(a.__u|=2)),a==null||a.__v==null?(u==-1&&(o>f?b--:o<f&&b++),typeof s.type!="function"&&(s.__u|=4)):u!=c&&(u==c-1?b--:u==c+1?b++:(u>c?b--:b++,s.__u|=4))):e.__k[i]=null;if(l)for(i=0;i<f;i++)(a=n[i])!=null&&(2&a.__u)==0&&(a.__e==r&&(r=V(a)),Bt(a,a));return r}function Ot(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=Ot(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=V(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function xn(e,t,n,r){var o,i,s=e.key,a=e.type,c=t[n];if(c===null&&e.key==null||c&&s==c.key&&a==c.type&&(2&c.__u)==0)return n;if(r>(c!=null&&(2&c.__u)==0?1:0))for(o=n-1,i=n+1;o>=0||i<t.length;){if(o>=0){if((c=t[o])&&(2&c.__u)==0&&s==c.key&&a==c.type)return o;o--}if(i<t.length){if((c=t[i])&&(2&c.__u)==0&&s==c.key&&a==c.type)return i;i++}}return-1}function Qe(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||yn.test(t)?n:n+"px"}function se(e,t,n,r,o){var i,s;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Qe(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||Qe(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(Ct,"$1")),s=t.toLowerCase(),t=s in e||t=="onFocusOut"||t=="onFocusIn"?s.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=He,e.addEventListener(t,i?Pe:Fe,i)):e.removeEventListener(t,i?Pe:Fe,i);else{if(o=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function Ye(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=He++;else if(t.t<n.u)return;return n(S.event?S.event(t):t)}}}function $e(e,t,n,r,o,i,s,a,c,u){var f,l,b,h,p,g,_,y,w,v,A,k,F,D,j,H,Ce,U=t.type;if(t.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),i=[a=t.__e=n.__e]),(f=S.__b)&&f(t);e:if(typeof U=="function")try{if(y=t.props,w="prototype"in U&&U.prototype.render,v=(f=U.contextType)&&r[f.__c],A=f?v?v.props.value:f.__:r,n.__c?_=(l=t.__c=n.__c).__=l.__E:(w?t.__c=l=new U(y,A):(t.__c=l=new ae(y,A),l.constructor=U,l.render=Sn),v&&v.sub(l),l.props=y,l.state||(l.state={}),l.context=A,l.__n=r,b=l.__d=!0,l.__h=[],l._sb=[]),w&&l.__s==null&&(l.__s=l.state),w&&U.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=I({},l.__s)),I(l.__s,U.getDerivedStateFromProps(y,l.__s))),h=l.props,p=l.state,l.__v=t,b)w&&U.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),w&&l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(w&&U.getDerivedStateFromProps==null&&y!==h&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(y,A),!l.__e&&l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(y,l.__s,A)===!1||t.__v==n.__v){for(t.__v!=n.__v&&(l.props=y,l.state=l.__s,l.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(Z){Z&&(Z.__=t)}),k=0;k<l._sb.length;k++)l.__h.push(l._sb[k]);l._sb=[],l.__h.length&&s.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(y,l.__s,A),w&&l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(h,p,g)})}if(l.context=A,l.props=y,l.__P=e,l.__e=!1,F=S.__r,D=0,w){for(l.state=l.__s,l.__d=!1,F&&F(t),f=l.render(l.props,l.state,l.context),j=0;j<l._sb.length;j++)l.__h.push(l._sb[j]);l._sb=[]}else do l.__d=!1,F&&F(t),f=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++D<25);l.state=l.__s,l.getChildContext!=null&&(r=I(I({},r),l.getChildContext())),w&&!b&&l.getSnapshotBeforeUpdate!=null&&(g=l.getSnapshotBeforeUpdate(h,p)),H=f,f!=null&&f.type===G&&f.key==null&&(H=Pt(f.props.children)),a=At(e,me(H)?H:[H],t,n,r,o,i,s,a,c,u),l.base=t.__e,t.__u&=-161,l.__h.length&&s.push(l),_&&(l.__E=l.__=null)}catch(Z){if(t.__v=null,c||i!=null)if(Z.then){for(t.__u|=c?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;i[i.indexOf(a)]=null,t.__e=a}else for(Ce=i.length;Ce--;)Me(i[Ce]);else t.__e=n.__e,t.__k=n.__k;S.__e(Z,t,n)}else i==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=En(n.__e,t,n,r,o,i,s,c,u);return(f=S.diffed)&&f(t),128&t.__u?void 0:a}function Ft(e,t,n){for(var r=0;r<n.length;r++)qe(n[r],n[++r],n[++r]);S.__c&&S.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){S.__e(i,o.__v)}})}function Pt(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:me(e)?e.map(Pt):I({},e)}function En(e,t,n,r,o,i,s,a,c){var u,f,l,b,h,p,g,_=n.props,y=t.props,w=t.type;if(w=="svg"?o="http://www.w3.org/2000/svg":w=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),i!=null){for(u=0;u<i.length;u++)if((h=i[u])&&"setAttribute"in h==!!w&&(w?h.localName==w:h.nodeType==3)){e=h,i[u]=null;break}}if(e==null){if(w==null)return document.createTextNode(y);e=document.createElementNS(o,w,y.is&&y),a&&(S.__m&&S.__m(t,i),a=!1),i=null}if(w==null)_===y||a&&e.data==y||(e.data=y);else{if(i=i&&re.call(e.childNodes),_=n.props||ee,!a&&i!=null)for(_={},u=0;u<e.attributes.length;u++)_[(h=e.attributes[u]).name]=h.value;for(u in _)if(h=_[u],u!="children"){if(u=="dangerouslySetInnerHTML")l=h;else if(!(u in y)){if(u=="value"&&"defaultValue"in y||u=="checked"&&"defaultChecked"in y)continue;se(e,u,null,h,o)}}for(u in y)h=y[u],u=="children"?b=h:u=="dangerouslySetInnerHTML"?f=h:u=="value"?p=h:u=="checked"?g=h:a&&typeof h!="function"||_[u]===h||se(e,u,h,_[u],o);if(f)a||l&&(f.__html==l.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(l&&(e.innerHTML=""),At(t.type=="template"?e.content:e,me(b)?b:[b],t,n,r,w=="foreignObject"?"http://www.w3.org/1999/xhtml":o,i,s,i?i[0]:n.__k&&V(n,0),a,c),i!=null)for(u=i.length;u--;)Me(i[u]);a||(u="value",w=="progress"&&p==null?e.removeAttribute("value"):p!=null&&(p!==e[u]||w=="progress"&&!p||w=="option"&&p!=_[u])&&se(e,u,p,_[u],o),u="checked",g!=null&&g!=e[u]&&se(e,u,g,_[u],o))}return e}function qe(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(o){S.__e(o,n)}}function Bt(e,t,n){var r,o;if(S.unmount&&S.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||qe(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){S.__e(i,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&Bt(r[o],t,n||typeof e.type!="function");n||Me(e.__e),e.__c=e.__=e.__e=void 0}function Sn(e,t,n){return this.constructor(e,n)}function be(e,t,n){var r,o,i,s;t==document&&(t=document.documentElement),S.__&&S.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],s=[],$e(t,e=(!r&&n||t).__k=J(G,null,[e]),o||ee,ee,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?re.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,s),Ft(i,e,s)}function Nt(e,t){be(e,t,Nt)}function Dt(e,t,n){var r,o,i,s,a=I({},e.props);for(i in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)i=="key"?r=t[i]:i=="ref"?o=t[i]:a[i]=t[i]===void 0&&s!=null?s[i]:t[i];return arguments.length>2&&(a.children=arguments.length>3?re.call(arguments,2):n),Y(e.type,a,r||e.key,o||e.ref,null)}re=Tt.slice,S={__e:function(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(a){e=a}throw e}},St=0,ae.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=I({},this.state),typeof e=="function"&&(e=e(I({},n),this.props)),e&&I(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Ze(this))},ae.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ze(this))},ae.prototype.render=G,M=[],vt=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Rt=function(e,t){return e.__v.__b-t.__v.__b},de.__r=0,Ct=/(PointerCapture)$|Capture$/i,He=0,Fe=Ye(!1),Pe=Ye(!0);var vn=0;function m(e,t,n,r,o,i){t||(t={});var s,a,c=t;if("ref"in c)for(a in c={},t)a=="ref"?s=t[a]:c[a]=t[a];var u={type:e,props:c,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--vn,__i:-1,__u:0,__source:o,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(a in s)c[a]===void 0&&(c[a]=s[a]);return S.vnode&&S.vnode(u),u}var te,R,Te,et,pe=0,Ut=[],T=S,tt=T.__b,nt=T.__r,rt=T.diffed,ot=T.__c,it=T.unmount,st=T.__;function We(e,t){T.__h&&T.__h(R,e,pe||t),pe=0;var n=R.__H||(R.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function z(e){return pe=1,Rn(jt,e)}function Rn(e,t,n){var r=We(te++,2);if(r.t=e,!r.__c&&(r.__=[jt(void 0,t),function(a){var c=r.__N?r.__N[0]:r.__[0],u=r.t(c,a);c!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=R,!R.__f)){var o=function(a,c,u){if(!r.__c.__H)return!0;var f=r.__c.__H.__.filter(function(b){return!!b.__c});if(f.every(function(b){return!b.__N}))return!i||i.call(this,a,c,u);var l=r.__c.props!==a;return f.forEach(function(b){if(b.__N){var h=b.__[0];b.__=b.__N,b.__N=void 0,h!==b.__[0]&&(l=!0)}}),i&&i.call(this,a,c,u)||l};R.__f=!0;var i=R.shouldComponentUpdate,s=R.componentWillUpdate;R.componentWillUpdate=function(a,c,u){if(this.__e){var f=i;i=void 0,o(a,c,u),i=f}s&&s.call(this,a,c,u)},R.shouldComponentUpdate=o}return r.__N||r.__}function Lt(e,t){var n=We(te++,3);!T.__s&&zt(n.__H,t)&&(n.__=e,n.u=t,R.__H.__h.push(n))}function It(e){return pe=5,Cn(function(){return{current:e}},[])}function Cn(e,t){var n=We(te++,7);return zt(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Tn(){for(var e;e=Ut.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(le),e.__H.__h.forEach(Be),e.__H.__h=[]}catch(t){e.__H.__h=[],T.__e(t,e.__v)}}T.__b=function(e){R=null,tt&&tt(e)},T.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),st&&st(e,t)},T.__r=function(e){nt&&nt(e),te=0;var t=(R=e.__c).__H;t&&(Te===R?(t.__h=[],R.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(le),t.__h.forEach(Be),t.__h=[],te=0)),Te=R},T.diffed=function(e){rt&&rt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Ut.push(t)!==1&&et===T.requestAnimationFrame||((et=T.requestAnimationFrame)||kn)(Tn)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Te=R=null},T.__c=function(e,t){t.some(function(n){try{n.__h.forEach(le),n.__h=n.__h.filter(function(r){return!r.__||Be(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],T.__e(r,n.__v)}}),ot&&ot(e,t)},T.unmount=function(e){it&&it(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{le(r)}catch(o){t=o}}),n.__H=void 0,t&&T.__e(t,n.__v))};var at=typeof requestAnimationFrame=="function";function kn(e){var t,n=function(){clearTimeout(r),at&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);at&&(t=requestAnimationFrame(n))}function le(e){var t=R,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),R=t}function Be(e){var t=R;e.__c=e.__(),R=t}function zt(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function jt(e,t){return typeof t=="function"?t(e):t}function An({onClick:e,color:t,children:n}){return m("button",{style:{background:t||"#1890ff",color:"#fff",border:"none",borderRadius:4,padding:"8px 16px",cursor:"pointer",fontSize:16},onClick:e,children:n})}const On={余额详情:"余额详情",真实金额:"真实金额",冻结金额:"冻结金额",总可用:"总可用","充值 / 转账":"充值 / 转账",在线充值:"在线充值",线下转账:"线下转账",充值币种:"充值币种",充值金额:"充值金额",支付平台:"支付平台",请选择充值币种:"请选择充值币种",请输入充值金额:"请输入充值金额",请选择支付平台:"请选择支付平台","提交失败,请重试":"提交失败,请重试","提交中...":"提交中...",去支付:"去支付",取消:"取消",关闭:"关闭",第三方支付平台:"第三方支付平台",交易ID:"交易ID",请输入转账交易ID:"请输入转账交易ID",上传文件:"上传文件",请上传转账凭证:"请上传转账凭证",离线充值创建成功:"离线充值创建成功","加载中...":"加载中...",错误:"错误",成功:"成功",必填:"必填","充值/转账":"充值/转账",切换为暗黑主题:"切换为暗黑主题",切换为白色主题:"切换为白色主题",点击或拖拽文件到此处上传:"点击或拖拽文件到此处上传","支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传":"支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传",个文件:"个文件","正在上传...":"正在上传...",已上传:"已上传",移除:"移除"};function Fn(e){return On[e]||e}const Pn={余额详情:"Balance Details",真实金额:"Real Amount",冻结金额:"Frozen Amount",总可用:"Total Available","充值 / 转账":"Recharge / Transfer",在线充值:"Online Recharge",线下转账:"Offline Transfer",充值币种:"Recharge Currency",充值金额:"Recharge Amount",支付平台:"Payment Platform",请选择充值币种:"Please select recharge currency",请输入充值金额:"Please enter recharge amount",请选择支付平台:"Please select payment platform","提交失败,请重试":"Submit failed, please try again","提交中...":"Submitting...",去支付:"Go to Pay",取消:"Cancel",关闭:"Close",第三方支付平台:"Third-party Payment Platform",交易ID:"Transaction ID",请输入转账交易ID:"Please enter transfer transaction ID",上传文件:"Upload Files",请上传转账凭证:"Please upload transfer voucher",离线充值创建成功:"Offline recharge created successfully","加载中...":"Loading...",错误:"Error",成功:"Success",必填:"Required","充值/转账":"Recharge/Transfer",切换为暗黑主题:"Switch to Dark Theme",切换为白色主题:"Switch to Light Theme",点击或拖拽文件到此处上传:"Click or drag files here to upload","支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传":"Supports JPG, PNG, PDF formats, single file not exceeding 20MB, maximum",个文件:"files can be uploaded","正在上传...":"Uploading...",已上传:"Uploaded",移除:"Remove"};function Bn(e){return Pn[e]||e}function Nn(){return JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").locale||"zh"}function x(e){return Nn()==="zh"?Fn(e):Bn(e)}const Dn=({formState:e,setFormState:t,onClose:n,loading:r,whiteTheme:o=!1})=>{const i=JSON.parse(sessionStorage.getItem("all_dicts")||"{}"),s=i?.currency||[],a=i?.channel?.filter(l=>l.payment_support)||[],c=o?{label:{marginBottom:8,fontSize:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},select:{width:"100%",padding:"10px 12px",borderRadius:6,border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}}:{label:{marginBottom:8,fontSize:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #23262F",background:"#23262F",color:"#fff",fontSize:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},select:{width:"100%",padding:"10px 12px",borderRadius:6,border:"1px solid #23262F",background:"#23262F",color:"#fff",fontSize:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}},u=o?{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"}:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"},f=o?{background:"#155EEF",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600}:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600};return m(G,{children:[m("div",{style:{marginBottom:18},children:[m("div",{style:c.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",x("充值币种")]}),m("select",{style:{...c.select},value:e.currency,onInput:l=>{const b=l.target.value;t(h=>({...h,currency:b}))},children:[m("option",{value:"",disabled:!0,hidden:!0,children:x("请选择充值币种")}),s?.map(l=>m("option",{value:l.value,children:l.label}))]})]}),m("div",{style:{marginBottom:18},children:[m("div",{style:c.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",x("充值金额")]}),m("input",{type:"text",placeholder:x("请输入充值金额"),value:e.amount,onInput:l=>{const b=l.target.value;t(h=>({...h,amount:b,amountError:b.trim()?"":h.amountError}))},style:{...c.input,...e.amountError?c.inputError:{}}}),e.amountError&&m("div",{style:c.error,children:e.amountError})]}),m("div",{style:{marginBottom:24},children:[m("div",{style:c.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",x("支付平台")]}),m("select",{style:{...c.select,...e.rechargeChannelError?c.selectError:{}},value:e.rechargeChannel,onInput:l=>{const b=l.target.value;t(h=>({...h,rechargeChannel:b,rechargeChannelError:b?"":h.rechargeChannelError}))},children:[m("option",{value:"",disabled:!0,hidden:!0,children:x("请选择支付平台")}),a?.map(l=>m("option",{value:l.value,children:l.label}))]}),e.rechargeChannelError&&m("div",{style:c.error,children:e.rechargeChannelError})]}),e.error&&m("div",{style:{color:"#ff4d4f",marginBottom:12},children:e.error}),m("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[m("button",{type:"button",onClick:n,style:u,children:x("取消")}),m("button",{type:"submit",disabled:r,style:f,children:x(r?"提交中...":"去支付")})]})]})};function Ht(e,t){return function(){return e.apply(t,arguments)}}const{toString:Un}=Object.prototype,{getPrototypeOf:Je}=Object,{iterator:ge,toStringTag:Mt}=Symbol,ye=(e=>t=>{const n=Un.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),N=e=>(e=e.toLowerCase(),t=>ye(t)===e),we=e=>t=>typeof t===e,{isArray:K}=Array,ne=we("undefined");function Ln(e){return e!==null&&!ne(e)&&e.constructor!==null&&!ne(e.constructor)&&P(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const $t=N("ArrayBuffer");function In(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&$t(e.buffer),t}const zn=we("string"),P=we("function"),qt=we("number"),xe=e=>e!==null&&typeof e=="object",jn=e=>e===!0||e===!1,ce=e=>{if(ye(e)!=="object")return!1;const t=Je(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Mt in e)&&!(ge in e)},Hn=N("Date"),Mn=N("File"),$n=N("Blob"),qn=N("FileList"),Wn=e=>xe(e)&&P(e.pipe),Jn=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||P(e.append)&&((t=ye(e))==="formdata"||t==="object"&&P(e.toString)&&e.toString()==="[object FormData]"))},Vn=N("URLSearchParams"),[Gn,Kn,Xn,Zn]=["ReadableStream","Request","Response","Headers"].map(N),Qn=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function oe(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),K(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),s=i.length;let a;for(r=0;r<s;r++)a=i[r],t.call(null,e[a],a,e)}}function Wt(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 $=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Jt=e=>!ne(e)&&e!==$;function Ne(){const{caseless:e}=Jt(this)&&this||{},t={},n=(r,o)=>{const i=e&&Wt(t,o)||o;ce(t[i])&&ce(r)?t[i]=Ne(t[i],r):ce(r)?t[i]=Ne({},r):K(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&oe(arguments[r],n);return t}const Yn=(e,t,n,{allOwnKeys:r}={})=>(oe(t,(o,i)=>{n&&P(o)?e[i]=Ht(o,n):e[i]=o},{allOwnKeys:r}),e),er=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)},nr=(e,t,n,r)=>{let o,i,s;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],(!r||r(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=n!==!1&&Je(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},rr=(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},or=e=>{if(!e)return null;if(K(e))return e;let t=e.length;if(!qt(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},ir=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Je(Uint8Array)),sr=(e,t)=>{const r=(e&&e[ge]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},ar=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},lr=N("HTMLFormElement"),cr=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),lt=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),ur=N("RegExp"),Vt=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};oe(n,(o,i)=>{let s;(s=t(o,i,e))!==!1&&(r[i]=s||o)}),Object.defineProperties(e,r)},fr=e=>{Vt(e,(t,n)=>{if(P(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(P(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},dr=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return K(e)?r(e):r(String(e).split(t)),n},pr=()=>{},hr=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function _r(e){return!!(e&&P(e.append)&&e[Mt]==="FormData"&&e[ge])}const mr=e=>{const t=new Array(10),n=(r,o)=>{if(xe(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=K(r)?[]:{};return oe(r,(s,a)=>{const c=n(s,o+1);!ne(c)&&(i[a]=c)}),t[o]=void 0,i}}return r};return n(e,0)},br=N("AsyncFunction"),gr=e=>e&&(xe(e)||P(e))&&P(e.then)&&P(e.catch),Gt=((e,t)=>e?setImmediate:t?((n,r)=>($.addEventListener("message",({source:o,data:i})=>{o===$&&i===n&&r.length&&r.shift()()},!1),o=>{r.push(o),$.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",P($.postMessage)),yr=typeof queueMicrotask<"u"?queueMicrotask.bind($):typeof process<"u"&&process.nextTick||Gt,wr=e=>e!=null&&P(e[ge]),d={isArray:K,isArrayBuffer:$t,isBuffer:Ln,isFormData:Jn,isArrayBufferView:In,isString:zn,isNumber:qt,isBoolean:jn,isObject:xe,isPlainObject:ce,isReadableStream:Gn,isRequest:Kn,isResponse:Xn,isHeaders:Zn,isUndefined:ne,isDate:Hn,isFile:Mn,isBlob:$n,isRegExp:ur,isFunction:P,isStream:Wn,isURLSearchParams:Vn,isTypedArray:ir,isFileList:qn,forEach:oe,merge:Ne,extend:Yn,trim:Qn,stripBOM:er,inherits:tr,toFlatObject:nr,kindOf:ye,kindOfTest:N,endsWith:rr,toArray:or,forEachEntry:sr,matchAll:ar,isHTMLForm:lr,hasOwnProperty:lt,hasOwnProp:lt,reduceDescriptors:Vt,freezeMethods:fr,toObjectSet:dr,toCamelCase:cr,noop:pr,toFiniteNumber:hr,findKey:Wt,global:$,isContextDefined:Jt,isSpecCompliantForm:_r,toJSONObject:mr,isAsyncFn:br,isThenable:gr,setImmediate:Gt,asap:yr,isIterable:wr};function E(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}d.inherits(E,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:d.toJSONObject(this.config),code:this.code,status:this.status}}});const Kt=E.prototype,Xt={};["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=>{Xt[e]={value:e}});Object.defineProperties(E,Xt);Object.defineProperty(Kt,"isAxiosError",{value:!0});E.from=(e,t,n,r,o,i)=>{const s=Object.create(Kt);return d.toFlatObject(e,s,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),E.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const xr=null;function De(e){return d.isPlainObject(e)||d.isArray(e)}function Zt(e){return d.endsWith(e,"[]")?e.slice(0,-2):e}function ct(e,t,n){return e?e.concat(t).map(function(o,i){return o=Zt(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function Er(e){return d.isArray(e)&&!e.some(De)}const Sr=d.toFlatObject(d,{},null,function(t){return/^is[A-Z]/.test(t)});function Ee(e,t,n){if(!d.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=d.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,_){return!d.isUndefined(_[g])});const r=n.metaTokens,o=n.visitor||f,i=n.dots,s=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&d.isSpecCompliantForm(t);if(!d.isFunction(o))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(d.isDate(p))return p.toISOString();if(d.isBoolean(p))return p.toString();if(!c&&d.isBlob(p))throw new E("Blob is not supported. Use a Buffer instead.");return d.isArrayBuffer(p)||d.isTypedArray(p)?c&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function f(p,g,_){let y=p;if(p&&!_&&typeof p=="object"){if(d.endsWith(g,"{}"))g=r?g:g.slice(0,-2),p=JSON.stringify(p);else if(d.isArray(p)&&Er(p)||(d.isFileList(p)||d.endsWith(g,"[]"))&&(y=d.toArray(p)))return g=Zt(g),y.forEach(function(v,A){!(d.isUndefined(v)||v===null)&&t.append(s===!0?ct([g],A,i):s===null?g:g+"[]",u(v))}),!1}return De(p)?!0:(t.append(ct(_,g,i),u(p)),!1)}const l=[],b=Object.assign(Sr,{defaultVisitor:f,convertValue:u,isVisitable:De});function h(p,g){if(!d.isUndefined(p)){if(l.indexOf(p)!==-1)throw Error("Circular reference detected in "+g.join("."));l.push(p),d.forEach(p,function(y,w){(!(d.isUndefined(y)||y===null)&&o.call(t,y,d.isString(w)?w.trim():w,g,b))===!0&&h(y,g?g.concat(w):[w])}),l.pop()}}if(!d.isObject(e))throw new TypeError("data must be an object");return h(e),t}function ut(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Ve(e,t){this._pairs=[],e&&Ee(e,this,t)}const Qt=Ve.prototype;Qt.append=function(t,n){this._pairs.push([t,n])};Qt.toString=function(t){const n=t?function(r){return t.call(this,r,ut)}:ut;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function vr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Yt(e,t,n){if(!t)return e;const r=n&&n.encode||vr;d.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(o?i=o(t,n):i=d.isURLSearchParams(t)?t.toString():new Ve(t,n).toString(r),i){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class ft{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){d.forEach(this.handlers,function(r){r!==null&&t(r)})}}const en={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Rr=typeof URLSearchParams<"u"?URLSearchParams:Ve,Cr=typeof FormData<"u"?FormData:null,Tr=typeof Blob<"u"?Blob:null,kr={isBrowser:!0,classes:{URLSearchParams:Rr,FormData:Cr,Blob:Tr},protocols:["http","https","file","blob","url","data"]},Ge=typeof window<"u"&&typeof document<"u",Ue=typeof navigator=="object"&&navigator||void 0,Ar=Ge&&(!Ue||["ReactNative","NativeScript","NS"].indexOf(Ue.product)<0),Or=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Fr=Ge&&window.location.href||"http://localhost",Pr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ge,hasStandardBrowserEnv:Ar,hasStandardBrowserWebWorkerEnv:Or,navigator:Ue,origin:Fr},Symbol.toStringTag,{value:"Module"})),O={...Pr,...kr};function Br(e,t){return Ee(e,new O.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return O.isNode&&d.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function Nr(e){return d.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Dr(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}function tn(e){function t(n,r,o,i){let s=n[i++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),c=i>=n.length;return s=!s&&d.isArray(o)?o.length:s,c?(d.hasOwnProp(o,s)?o[s]=[o[s],r]:o[s]=r,!a):((!o[s]||!d.isObject(o[s]))&&(o[s]=[]),t(n,r,o[s],i)&&d.isArray(o[s])&&(o[s]=Dr(o[s])),!a)}if(d.isFormData(e)&&d.isFunction(e.entries)){const n={};return d.forEachEntry(e,(r,o)=>{t(Nr(r),o,n,0)}),n}return null}function Ur(e,t,n){if(d.isString(e))try{return(t||JSON.parse)(e),d.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ie={transitional:en,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=d.isObject(t);if(i&&d.isHTMLForm(t)&&(t=new FormData(t)),d.isFormData(t))return o?JSON.stringify(tn(t)):t;if(d.isArrayBuffer(t)||d.isBuffer(t)||d.isStream(t)||d.isFile(t)||d.isBlob(t)||d.isReadableStream(t))return t;if(d.isArrayBufferView(t))return t.buffer;if(d.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Br(t,this.formSerializer).toString();if((a=d.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Ee(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),Ur(t)):t}],transformResponse:[function(t){const n=this.transitional||ie.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(d.isResponse(t)||d.isReadableStream(t))return t;if(t&&d.isString(t)&&(r&&!this.responseType||o)){const s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(a){if(s)throw a.name==="SyntaxError"?E.from(a,E.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:O.classes.FormData,Blob:O.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};d.forEach(["delete","get","head","post","put","patch"],e=>{ie.headers[e]={}});const Lr=d.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ir=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
2
2
|
`).forEach(function(s){o=s.indexOf(":"),n=s.substring(0,o).trim().toLowerCase(),r=s.substring(o+1).trim(),!(!n||t[n]&&Lr[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},dt=Symbol("internals");function Q(e){return e&&String(e).trim().toLowerCase()}function ue(e){return e===!1||e==null?e:d.isArray(e)?e.map(ue):String(e)}function zr(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 jr=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ke(e,t,n,r,o){if(d.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!d.isString(t)){if(d.isString(r))return t.indexOf(r)!==-1;if(d.isRegExp(r))return r.test(t)}}function Hr(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Mr(e,t){const n=d.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,s){return this[r].call(this,t,o,i,s)},configurable:!0})})}let B=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(a,c,u){const f=Q(c);if(!f)throw new Error("header name must be a non-empty string");const l=d.findKey(o,f);(!l||o[l]===void 0||u===!0||u===void 0&&o[l]!==!1)&&(o[l||c]=ue(a))}const s=(a,c)=>d.forEach(a,(u,f)=>i(u,f,c));if(d.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(d.isString(t)&&(t=t.trim())&&!jr(t))s(Ir(t),n);else if(d.isObject(t)&&d.isIterable(t)){let a={},c,u;for(const f of t){if(!d.isArray(f))throw TypeError("Object iterator must return a key-value pair");a[u=f[0]]=(c=a[u])?d.isArray(c)?[...c,f[1]]:[c,f[1]]:f[1]}s(a,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=Q(t),t){const r=d.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return zr(o);if(d.isFunction(n))return n.call(this,o,r);if(d.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Q(t),t){const r=d.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ke(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(s){if(s=Q(s),s){const a=d.findKey(r,s);a&&(!n||ke(r,r[a],a,n))&&(delete r[a],o=!0)}}return d.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!t||ke(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return d.forEach(this,(o,i)=>{const s=d.findKey(r,i);if(s){n[s]=ue(o),delete n[i];return}const a=t?Hr(i):String(i).trim();a!==i&&delete n[i],n[a]=ue(o),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return d.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&d.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
3
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[dt]=this[dt]={accessors:{}}).accessors,o=this.prototype;function i(s){const a=Q(s);r[a]||(Mr(o,s),r[a]=!0)}return d.isArray(t)?t.forEach(i):i(t),this}};B.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);d.reduceDescriptors(B.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});d.freezeMethods(B);function Ae(e,t){const n=this||ie,r=t||n,o=B.from(r.headers);let i=r.data;return d.forEach(e,function(a){i=a.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function nn(e){return!!(e&&e.__CANCEL__)}function X(e,t,n){x.call(this,e??"canceled",x.ERR_CANCELED,t,n),this.name="CanceledError"}d.inherits(X,x,{__CANCEL__:!0});function rn(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new x("Request failed with status code "+n.status,[x.ERR_BAD_REQUEST,x.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function $r(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function qr(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,s;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),f=r[i];s||(s=u),n[o]=c,r[o]=u;let l=i,b=0;for(;l!==o;)b+=n[l++],l=l%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),u-s<t)return;const h=f&&u-f;return h?Math.round(b*1e3/h):void 0}}function Wr(e,t){let n=0,r=1e3/t,o,i;const s=(u,f=Date.now())=>{n=f,o=null,i&&(clearTimeout(i),i=null),e.apply(null,u)};return[(...u)=>{const f=Date.now(),l=f-n;l>=r?s(u,f):(o=u,i||(i=setTimeout(()=>{i=null,s(o)},r-l)))},()=>o&&s(o)]}const he=(e,t,n=3)=>{let r=0;const o=qr(50,250);return Wr(i=>{const s=i.loaded,a=i.lengthComputable?i.total:void 0,c=s-r,u=o(c),f=s<=a;r=s;const l={loaded:s,total:a,progress:a?s/a:void 0,bytes:c,rate:u||void 0,estimated:u&&a&&f?(a-s)/u:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(l)},n)},pt=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},ht=e=>(...t)=>d.asap(()=>e(...t)),Jr=O.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,O.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(O.origin),O.navigator&&/(msie|trident)/i.test(O.navigator.userAgent)):()=>!0,Vr=O.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const s=[e+"="+encodeURIComponent(t)];d.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),d.isString(r)&&s.push("path="+r),d.isString(o)&&s.push("domain="+o),i===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Gr(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Kr(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function on(e,t,n){let r=!Gr(t);return e&&(r||n==!1)?Kr(e,t):t}const _t=e=>e instanceof B?{...e}:e;function W(e,t){t=t||{};const n={};function r(u,f,l,b){return d.isPlainObject(u)&&d.isPlainObject(f)?d.merge.call({caseless:b},u,f):d.isPlainObject(f)?d.merge({},f):d.isArray(f)?f.slice():f}function o(u,f,l,b){if(d.isUndefined(f)){if(!d.isUndefined(u))return r(void 0,u,l,b)}else return r(u,f,l,b)}function i(u,f){if(!d.isUndefined(f))return r(void 0,f)}function s(u,f){if(d.isUndefined(f)){if(!d.isUndefined(u))return r(void 0,u)}else return r(void 0,f)}function a(u,f,l){if(l in t)return r(u,f);if(l in e)return r(void 0,u)}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(u,f,l)=>o(_t(u),_t(f),l,!0)};return d.forEach(Object.keys(Object.assign({},e,t)),function(f){const l=c[f]||o,b=l(e[f],t[f],f);d.isUndefined(b)&&l!==a||(n[f]=b)}),n}const sn=e=>{const t=W({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:a}=t;t.headers=s=B.from(s),t.url=Yt(on(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let c;if(d.isFormData(n)){if(O.hasStandardBrowserEnv||O.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((c=s.getContentType())!==!1){const[u,...f]=c?c.split(";").map(l=>l.trim()).filter(Boolean):[];s.setContentType([u||"multipart/form-data",...f].join("; "))}}if(O.hasStandardBrowserEnv&&(r&&d.isFunction(r)&&(r=r(t)),r||r!==!1&&Jr(t.url))){const u=o&&i&&Vr.read(i);u&&s.set(o,u)}return t},Xr=typeof XMLHttpRequest<"u",Zr=Xr&&function(e){return new Promise(function(n,r){const o=sn(e);let i=o.data;const s=B.from(o.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:u}=o,f,l,b,h,p;function g(){h&&h(),p&&p(),o.cancelToken&&o.cancelToken.unsubscribe(f),o.signal&&o.signal.removeEventListener("abort",f)}let _=new XMLHttpRequest;_.open(o.method.toUpperCase(),o.url,!0),_.timeout=o.timeout;function y(){if(!_)return;const v=B.from("getAllResponseHeaders"in _&&_.getAllResponseHeaders()),k={data:!a||a==="text"||a==="json"?_.responseText:_.response,status:_.status,statusText:_.statusText,headers:v,config:e,request:_};rn(function(D){n(D),g()},function(D){r(D),g()},k),_=null}"onloadend"in _?_.onloadend=y:_.onreadystatechange=function(){!_||_.readyState!==4||_.status===0&&!(_.responseURL&&_.responseURL.indexOf("file:")===0)||setTimeout(y)},_.onabort=function(){_&&(r(new x("Request aborted",x.ECONNABORTED,e,_)),_=null)},_.onerror=function(){r(new x("Network Error",x.ERR_NETWORK,e,_)),_=null},_.ontimeout=function(){let A=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const k=o.transitional||en;o.timeoutErrorMessage&&(A=o.timeoutErrorMessage),r(new x(A,k.clarifyTimeoutError?x.ETIMEDOUT:x.ECONNABORTED,e,_)),_=null},i===void 0&&s.setContentType(null),"setRequestHeader"in _&&d.forEach(s.toJSON(),function(A,k){_.setRequestHeader(k,A)}),d.isUndefined(o.withCredentials)||(_.withCredentials=!!o.withCredentials),a&&a!=="json"&&(_.responseType=o.responseType),u&&([b,p]=he(u,!0),_.addEventListener("progress",b)),c&&_.upload&&([l,h]=he(c),_.upload.addEventListener("progress",l),_.upload.addEventListener("loadend",h)),(o.cancelToken||o.signal)&&(f=v=>{_&&(r(!v||v.type?new X(null,e,_):v),_.abort(),_=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const w=$r(o.url);if(w&&O.protocols.indexOf(w)===-1){r(new x("Unsupported protocol "+w+":",x.ERR_BAD_REQUEST,e));return}_.send(i||null)})},Qr=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const i=function(u){if(!o){o=!0,a();const f=u instanceof Error?u:this.reason;r.abort(f instanceof x?f:new X(f instanceof Error?f.message:f))}};let s=t&&setTimeout(()=>{s=null,i(new x(`timeout ${t} of ms exceeded`,x.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));const{signal:c}=r;return c.unsubscribe=()=>d.asap(a),c}},Yr=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},eo=async function*(e,t){for await(const n of to(e))yield*Yr(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()}},mt=(e,t,n,r)=>{const o=eo(e,t);let i=0,s,a=c=>{s||(s=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:u,value:f}=await o.next();if(u){a(),c.close();return}let l=f.byteLength;if(n){let b=i+=l;n(b)}c.enqueue(new Uint8Array(f))}catch(u){throw a(u),u}},cancel(c){return a(c),o.return()}},{highWaterMark:2})},Se=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",an=Se&&typeof ReadableStream=="function",no=Se&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),ln=(e,...t)=>{try{return!!e(...t)}catch{return!1}},ro=an&&ln(()=>{let e=!1;const t=new Request(O.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),bt=64*1024,Le=an&&ln(()=>d.isReadableStream(new Response("").body)),_e={stream:Le&&(e=>e.body)};Se&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!_e[t]&&(_e[t]=d.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new x(`Response type '${t}' is not supported`,x.ERR_NOT_SUPPORT,r)})})})(new Response);const oo=async e=>{if(e==null)return 0;if(d.isBlob(e))return e.size;if(d.isSpecCompliantForm(e))return(await new Request(O.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(d.isArrayBufferView(e)||d.isArrayBuffer(e))return e.byteLength;if(d.isURLSearchParams(e)&&(e=e+""),d.isString(e))return(await no(e)).byteLength},io=async(e,t)=>{const n=d.toFiniteNumber(e.getContentLength());return n??oo(t)},so=Se&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:s,onDownloadProgress:a,onUploadProgress:c,responseType:u,headers:f,withCredentials:l="same-origin",fetchOptions:b}=sn(e);u=u?(u+"").toLowerCase():"text";let h=Qr([o,i&&i.toAbortSignal()],s),p;const g=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let _;try{if(c&&ro&&n!=="get"&&n!=="head"&&(_=await io(f,r))!==0){let k=new Request(t,{method:"POST",body:r,duplex:"half"}),F;if(d.isFormData(r)&&(F=k.headers.get("content-type"))&&f.setContentType(F),k.body){const[D,j]=pt(_,he(ht(c)));r=mt(k.body,bt,D,j)}}d.isString(l)||(l=l?"include":"omit");const y="credentials"in Request.prototype;p=new Request(t,{...b,signal:h,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",credentials:y?l:void 0});let w=await fetch(p,b);const v=Le&&(u==="stream"||u==="response");if(Le&&(a||v&&g)){const k={};["status","statusText","headers"].forEach(H=>{k[H]=w[H]});const F=d.toFiniteNumber(w.headers.get("content-length")),[D,j]=a&&pt(F,he(ht(a),!0))||[];w=new Response(mt(w.body,bt,D,()=>{j&&j(),g&&g()}),k)}u=u||"text";let A=await _e[d.findKey(_e,u)||"text"](w,e);return!v&&g&&g(),await new Promise((k,F)=>{rn(k,F,{data:A,headers:B.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:p})})}catch(y){throw g&&g(),y&&y.name==="TypeError"&&/Load failed|fetch/i.test(y.message)?Object.assign(new x("Network Error",x.ERR_NETWORK,e,p),{cause:y.cause||y}):x.from(y,y&&y.code,e,p)}}),Ie={http:xr,xhr:Zr,fetch:so};d.forEach(Ie,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const gt=e=>`- ${e}`,ao=e=>d.isFunction(e)||e===null||e===!1,cn={getAdapter:e=>{e=d.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){n=e[i];let s;if(r=n,!ao(n)&&(r=Ie[(s=String(n)).toLowerCase()],r===void 0))throw new x(`Unknown adapter '${s}'`);if(r)break;o[s||"#"+i]=r}if(!r){const i=Object.entries(o).map(([a,c])=>`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build"));let s=t?i.length>1?`since :
|
|
3
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[dt]=this[dt]={accessors:{}}).accessors,o=this.prototype;function i(s){const a=Q(s);r[a]||(Mr(o,s),r[a]=!0)}return d.isArray(t)?t.forEach(i):i(t),this}};B.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);d.reduceDescriptors(B.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});d.freezeMethods(B);function Ae(e,t){const n=this||ie,r=t||n,o=B.from(r.headers);let i=r.data;return d.forEach(e,function(a){i=a.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function nn(e){return!!(e&&e.__CANCEL__)}function X(e,t,n){E.call(this,e??"canceled",E.ERR_CANCELED,t,n),this.name="CanceledError"}d.inherits(X,E,{__CANCEL__:!0});function rn(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new E("Request failed with status code "+n.status,[E.ERR_BAD_REQUEST,E.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function $r(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function qr(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,s;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),f=r[i];s||(s=u),n[o]=c,r[o]=u;let l=i,b=0;for(;l!==o;)b+=n[l++],l=l%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),u-s<t)return;const h=f&&u-f;return h?Math.round(b*1e3/h):void 0}}function Wr(e,t){let n=0,r=1e3/t,o,i;const s=(u,f=Date.now())=>{n=f,o=null,i&&(clearTimeout(i),i=null),e.apply(null,u)};return[(...u)=>{const f=Date.now(),l=f-n;l>=r?s(u,f):(o=u,i||(i=setTimeout(()=>{i=null,s(o)},r-l)))},()=>o&&s(o)]}const he=(e,t,n=3)=>{let r=0;const o=qr(50,250);return Wr(i=>{const s=i.loaded,a=i.lengthComputable?i.total:void 0,c=s-r,u=o(c),f=s<=a;r=s;const l={loaded:s,total:a,progress:a?s/a:void 0,bytes:c,rate:u||void 0,estimated:u&&a&&f?(a-s)/u:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(l)},n)},pt=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},ht=e=>(...t)=>d.asap(()=>e(...t)),Jr=O.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,O.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(O.origin),O.navigator&&/(msie|trident)/i.test(O.navigator.userAgent)):()=>!0,Vr=O.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const s=[e+"="+encodeURIComponent(t)];d.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),d.isString(r)&&s.push("path="+r),d.isString(o)&&s.push("domain="+o),i===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Gr(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Kr(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function on(e,t,n){let r=!Gr(t);return e&&(r||n==!1)?Kr(e,t):t}const _t=e=>e instanceof B?{...e}:e;function W(e,t){t=t||{};const n={};function r(u,f,l,b){return d.isPlainObject(u)&&d.isPlainObject(f)?d.merge.call({caseless:b},u,f):d.isPlainObject(f)?d.merge({},f):d.isArray(f)?f.slice():f}function o(u,f,l,b){if(d.isUndefined(f)){if(!d.isUndefined(u))return r(void 0,u,l,b)}else return r(u,f,l,b)}function i(u,f){if(!d.isUndefined(f))return r(void 0,f)}function s(u,f){if(d.isUndefined(f)){if(!d.isUndefined(u))return r(void 0,u)}else return r(void 0,f)}function a(u,f,l){if(l in t)return r(u,f);if(l in e)return r(void 0,u)}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(u,f,l)=>o(_t(u),_t(f),l,!0)};return d.forEach(Object.keys(Object.assign({},e,t)),function(f){const l=c[f]||o,b=l(e[f],t[f],f);d.isUndefined(b)&&l!==a||(n[f]=b)}),n}const sn=e=>{const t=W({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:a}=t;t.headers=s=B.from(s),t.url=Yt(on(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let c;if(d.isFormData(n)){if(O.hasStandardBrowserEnv||O.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((c=s.getContentType())!==!1){const[u,...f]=c?c.split(";").map(l=>l.trim()).filter(Boolean):[];s.setContentType([u||"multipart/form-data",...f].join("; "))}}if(O.hasStandardBrowserEnv&&(r&&d.isFunction(r)&&(r=r(t)),r||r!==!1&&Jr(t.url))){const u=o&&i&&Vr.read(i);u&&s.set(o,u)}return t},Xr=typeof XMLHttpRequest<"u",Zr=Xr&&function(e){return new Promise(function(n,r){const o=sn(e);let i=o.data;const s=B.from(o.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:u}=o,f,l,b,h,p;function g(){h&&h(),p&&p(),o.cancelToken&&o.cancelToken.unsubscribe(f),o.signal&&o.signal.removeEventListener("abort",f)}let _=new XMLHttpRequest;_.open(o.method.toUpperCase(),o.url,!0),_.timeout=o.timeout;function y(){if(!_)return;const v=B.from("getAllResponseHeaders"in _&&_.getAllResponseHeaders()),k={data:!a||a==="text"||a==="json"?_.responseText:_.response,status:_.status,statusText:_.statusText,headers:v,config:e,request:_};rn(function(D){n(D),g()},function(D){r(D),g()},k),_=null}"onloadend"in _?_.onloadend=y:_.onreadystatechange=function(){!_||_.readyState!==4||_.status===0&&!(_.responseURL&&_.responseURL.indexOf("file:")===0)||setTimeout(y)},_.onabort=function(){_&&(r(new E("Request aborted",E.ECONNABORTED,e,_)),_=null)},_.onerror=function(){r(new E("Network Error",E.ERR_NETWORK,e,_)),_=null},_.ontimeout=function(){let A=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const k=o.transitional||en;o.timeoutErrorMessage&&(A=o.timeoutErrorMessage),r(new E(A,k.clarifyTimeoutError?E.ETIMEDOUT:E.ECONNABORTED,e,_)),_=null},i===void 0&&s.setContentType(null),"setRequestHeader"in _&&d.forEach(s.toJSON(),function(A,k){_.setRequestHeader(k,A)}),d.isUndefined(o.withCredentials)||(_.withCredentials=!!o.withCredentials),a&&a!=="json"&&(_.responseType=o.responseType),u&&([b,p]=he(u,!0),_.addEventListener("progress",b)),c&&_.upload&&([l,h]=he(c),_.upload.addEventListener("progress",l),_.upload.addEventListener("loadend",h)),(o.cancelToken||o.signal)&&(f=v=>{_&&(r(!v||v.type?new X(null,e,_):v),_.abort(),_=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const w=$r(o.url);if(w&&O.protocols.indexOf(w)===-1){r(new E("Unsupported protocol "+w+":",E.ERR_BAD_REQUEST,e));return}_.send(i||null)})},Qr=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const i=function(u){if(!o){o=!0,a();const f=u instanceof Error?u:this.reason;r.abort(f instanceof E?f:new X(f instanceof Error?f.message:f))}};let s=t&&setTimeout(()=>{s=null,i(new E(`timeout ${t} of ms exceeded`,E.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));const{signal:c}=r;return c.unsubscribe=()=>d.asap(a),c}},Yr=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},eo=async function*(e,t){for await(const n of to(e))yield*Yr(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()}},mt=(e,t,n,r)=>{const o=eo(e,t);let i=0,s,a=c=>{s||(s=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:u,value:f}=await o.next();if(u){a(),c.close();return}let l=f.byteLength;if(n){let b=i+=l;n(b)}c.enqueue(new Uint8Array(f))}catch(u){throw a(u),u}},cancel(c){return a(c),o.return()}},{highWaterMark:2})},Se=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",an=Se&&typeof ReadableStream=="function",no=Se&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),ln=(e,...t)=>{try{return!!e(...t)}catch{return!1}},ro=an&&ln(()=>{let e=!1;const t=new Request(O.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),bt=64*1024,Le=an&&ln(()=>d.isReadableStream(new Response("").body)),_e={stream:Le&&(e=>e.body)};Se&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!_e[t]&&(_e[t]=d.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new E(`Response type '${t}' is not supported`,E.ERR_NOT_SUPPORT,r)})})})(new Response);const oo=async e=>{if(e==null)return 0;if(d.isBlob(e))return e.size;if(d.isSpecCompliantForm(e))return(await new Request(O.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(d.isArrayBufferView(e)||d.isArrayBuffer(e))return e.byteLength;if(d.isURLSearchParams(e)&&(e=e+""),d.isString(e))return(await no(e)).byteLength},io=async(e,t)=>{const n=d.toFiniteNumber(e.getContentLength());return n??oo(t)},so=Se&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:s,onDownloadProgress:a,onUploadProgress:c,responseType:u,headers:f,withCredentials:l="same-origin",fetchOptions:b}=sn(e);u=u?(u+"").toLowerCase():"text";let h=Qr([o,i&&i.toAbortSignal()],s),p;const g=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let _;try{if(c&&ro&&n!=="get"&&n!=="head"&&(_=await io(f,r))!==0){let k=new Request(t,{method:"POST",body:r,duplex:"half"}),F;if(d.isFormData(r)&&(F=k.headers.get("content-type"))&&f.setContentType(F),k.body){const[D,j]=pt(_,he(ht(c)));r=mt(k.body,bt,D,j)}}d.isString(l)||(l=l?"include":"omit");const y="credentials"in Request.prototype;p=new Request(t,{...b,signal:h,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",credentials:y?l:void 0});let w=await fetch(p,b);const v=Le&&(u==="stream"||u==="response");if(Le&&(a||v&&g)){const k={};["status","statusText","headers"].forEach(H=>{k[H]=w[H]});const F=d.toFiniteNumber(w.headers.get("content-length")),[D,j]=a&&pt(F,he(ht(a),!0))||[];w=new Response(mt(w.body,bt,D,()=>{j&&j(),g&&g()}),k)}u=u||"text";let A=await _e[d.findKey(_e,u)||"text"](w,e);return!v&&g&&g(),await new Promise((k,F)=>{rn(k,F,{data:A,headers:B.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:p})})}catch(y){throw g&&g(),y&&y.name==="TypeError"&&/Load failed|fetch/i.test(y.message)?Object.assign(new E("Network Error",E.ERR_NETWORK,e,p),{cause:y.cause||y}):E.from(y,y&&y.code,e,p)}}),Ie={http:xr,xhr:Zr,fetch:so};d.forEach(Ie,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const gt=e=>`- ${e}`,ao=e=>d.isFunction(e)||e===null||e===!1,cn={getAdapter:e=>{e=d.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){n=e[i];let s;if(r=n,!ao(n)&&(r=Ie[(s=String(n)).toLowerCase()],r===void 0))throw new E(`Unknown adapter '${s}'`);if(r)break;o[s||"#"+i]=r}if(!r){const i=Object.entries(o).map(([a,c])=>`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build"));let s=t?i.length>1?`since :
|
|
4
4
|
`+i.map(gt).join(`
|
|
5
|
-
`):" "+gt(i[0]):"as no adapter specified";throw new
|
|
6
|
-
`+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=W(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&fe.assertOptions(r,{silentJSONParsing:L.transitional(L.boolean),forcedJSONParsing:L.transitional(L.boolean),clarifyTimeoutError:L.transitional(L.boolean)},!1),o!=null&&(d.isFunction(o)?n.paramsSerializer={serialize:o}:fe.assertOptions(o,{encode:L.function,serialize:L.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),fe.assertOptions(n,{baseUrl:L.spelling("baseURL"),withXsrfToken:L.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&d.merge(i.common,i[n.method]);i&&d.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),n.headers=B.concat(s,i);const a=[];let c=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(c=c&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let f,l=0,b;if(!c){const p=[yt.bind(this),void 0];for(p.unshift.apply(p,a),p.push.apply(p,u),b=p.length,f=Promise.resolve(n);l<b;)f=f.then(p[l++],p[l++]);return f}b=a.length;let h=n;for(l=0;l<b;){const p=a[l++],g=a[l++];try{h=p(h)}catch(_){g.call(this,_);break}}try{f=yt.call(this,h)}catch(p){return Promise.reject(p)}for(l=0,b=u.length;l<b;)f=f.then(u[l++],u[l++]);return f}getUri(t){t=W(this.defaults,t);const n=on(t.baseURL,t.url,t.allowAbsoluteUrls);return Yt(n,t.params,t.paramsSerializer)}};d.forEach(["delete","get","head","options"],function(t){q.prototype[t]=function(n,r){return this.request(W(r||{},{method:t,url:n,data:(r||{}).data}))}});d.forEach(["post","put","patch"],function(t){function n(r){return function(i,s,a){return this.request(W(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}q.prototype[t]=n(),q.prototype[t+"Form"]=n(!0)});let co=class fn{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(a=>{r.subscribe(a),i=a}).then(o);return s.cancel=function(){r.unsubscribe(i)},s},t(function(i,s,a){r.reason||(r.reason=new X(i,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new fn(function(o){t=o}),cancel:t}}};function uo(e){return function(n){return e.apply(null,n)}}function fo(e){return d.isObject(e)&&e.isAxiosError===!0}const ze={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(ze).forEach(([e,t])=>{ze[t]=e});function dn(e){const t=new q(e),n=Ht(q.prototype.request,t);return d.extend(n,q.prototype,t,{allOwnKeys:!0}),d.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return dn(W(e,o))},n}const C=dn(ie);C.Axios=q;C.CanceledError=X;C.CancelToken=co;C.isCancel=nn;C.VERSION=un;C.toFormData=Ee;C.AxiosError=
|
|
5
|
+
`):" "+gt(i[0]):"as no adapter specified";throw new E("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:Ie};function Oe(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new X(null,e)}function yt(e){return Oe(e),e.headers=B.from(e.headers),e.data=Ae.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),cn.getAdapter(e.adapter||ie.adapter)(e).then(function(r){return Oe(e),r.data=Ae.call(e,e.transformResponse,r),r.headers=B.from(r.headers),r},function(r){return nn(r)||(Oe(e),r&&r.response&&(r.response.data=Ae.call(e,e.transformResponse,r.response),r.response.headers=B.from(r.response.headers))),Promise.reject(r)})}const un="1.10.0",ve={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ve[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const wt={};ve.transitional=function(t,n,r){function o(i,s){return"[Axios v"+un+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,a)=>{if(t===!1)throw new E(o(s," has been removed"+(n?" in "+n:"")),E.ERR_DEPRECATED);return n&&!wt[s]&&(wt[s]=!0,console.warn(o(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,s,a):!0}};ve.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function lo(e,t,n){if(typeof e!="object")throw new E("options must be an object",E.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],s=t[i];if(s){const a=e[i],c=a===void 0||s(a,i,e);if(c!==!0)throw new E("option "+i+" must be "+c,E.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new E("Unknown option "+i,E.ERR_BAD_OPTION)}}const fe={assertOptions:lo,validators:ve},L=fe.validators;let q=class{constructor(t){this.defaults=t||{},this.interceptors={request:new ft,response:new ft}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
6
|
+
`+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=W(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&fe.assertOptions(r,{silentJSONParsing:L.transitional(L.boolean),forcedJSONParsing:L.transitional(L.boolean),clarifyTimeoutError:L.transitional(L.boolean)},!1),o!=null&&(d.isFunction(o)?n.paramsSerializer={serialize:o}:fe.assertOptions(o,{encode:L.function,serialize:L.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),fe.assertOptions(n,{baseUrl:L.spelling("baseURL"),withXsrfToken:L.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&d.merge(i.common,i[n.method]);i&&d.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),n.headers=B.concat(s,i);const a=[];let c=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(c=c&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let f,l=0,b;if(!c){const p=[yt.bind(this),void 0];for(p.unshift.apply(p,a),p.push.apply(p,u),b=p.length,f=Promise.resolve(n);l<b;)f=f.then(p[l++],p[l++]);return f}b=a.length;let h=n;for(l=0;l<b;){const p=a[l++],g=a[l++];try{h=p(h)}catch(_){g.call(this,_);break}}try{f=yt.call(this,h)}catch(p){return Promise.reject(p)}for(l=0,b=u.length;l<b;)f=f.then(u[l++],u[l++]);return f}getUri(t){t=W(this.defaults,t);const n=on(t.baseURL,t.url,t.allowAbsoluteUrls);return Yt(n,t.params,t.paramsSerializer)}};d.forEach(["delete","get","head","options"],function(t){q.prototype[t]=function(n,r){return this.request(W(r||{},{method:t,url:n,data:(r||{}).data}))}});d.forEach(["post","put","patch"],function(t){function n(r){return function(i,s,a){return this.request(W(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}q.prototype[t]=n(),q.prototype[t+"Form"]=n(!0)});let co=class fn{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(a=>{r.subscribe(a),i=a}).then(o);return s.cancel=function(){r.unsubscribe(i)},s},t(function(i,s,a){r.reason||(r.reason=new X(i,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new fn(function(o){t=o}),cancel:t}}};function uo(e){return function(n){return e.apply(null,n)}}function fo(e){return d.isObject(e)&&e.isAxiosError===!0}const ze={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(ze).forEach(([e,t])=>{ze[t]=e});function dn(e){const t=new q(e),n=Ht(q.prototype.request,t);return d.extend(n,q.prototype,t,{allOwnKeys:!0}),d.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return dn(W(e,o))},n}const C=dn(ie);C.Axios=q;C.CanceledError=X;C.CancelToken=co;C.isCancel=nn;C.VERSION=un;C.toFormData=Ee;C.AxiosError=E;C.Cancel=C.CanceledError;C.all=function(t){return Promise.all(t)};C.spread=uo;C.isAxiosError=fo;C.mergeConfig=W;C.AxiosHeaders=B;C.formToJSON=e=>tn(d.isHTMLForm(e)?new FormData(e):e);C.getAdapter=cn.getAdapter;C.HttpStatusCode=ze;C.default=C;const{Axios:Bo,AxiosError:No,CanceledError:Do,isCancel:Uo,CancelToken:Lo,VERSION:Io,all:zo,Cancel:jo,isAxiosError:Ho,spread:Mo,toFormData:$o,AxiosHeaders:qo,HttpStatusCode:Wo,formToJSON:Jo,getAdapter:Vo,mergeConfig:Go}=C;class po{parseArg(t){return typeof t=="string"?{content:t}:t}show(t,n){const{content:r,duration:o,closable:i}=this.parseArg(n),s=document.createElement("div");if(s.style.cssText=`
|
|
7
7
|
position: fixed;
|
|
8
8
|
top: 20px;
|
|
9
9
|
left: 50%;
|
|
@@ -42,4 +42,4 @@
|
|
|
42
42
|
padding: 4px;
|
|
43
43
|
color: #999;
|
|
44
44
|
font-size: 12px;
|
|
45
|
-
`,c.onclick=()=>{document.body.removeChild(s)},s.appendChild(c)}document.body.appendChild(s),o!==0&&setTimeout(()=>{document.body.contains(s)&&document.body.removeChild(s)},o||3e3)}success(t){this.show("success",t)}error(t){this.show("error",t)}warning(t){this.show("warning",t)}info(t){this.show("info",t)}}const je=new po;function ho(e={}){const{baseURL:t="/api",timeout:n=1e4,getLocale:r,onError:o}=e,i=C.create({baseURL:t,timeout:n});return i.interceptors.request.use(s=>{const a=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}"),{token:c}=a;if(s.headers={...s.headers,Authorization:c},r){const u=r();u&&(s.headers={...s.headers,"Accept-Language":u})}return s}),i.interceptors.response.use(s=>{if(s.data&&s.data.code===0)return s.data;const a=s.data?.msg||s.data?.message||"未知错误";return je.error(a),o&&o(a,s),Promise.reject(s.data||{message:"未知错误"})},s=>{const a=s.response?.data?.msg||s.response?.data?.message||s.message||"网络请求失败";return je.error(a),o&&o(a,s),Promise.reject(s)}),i}const Re=ho();function _o(){const e=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");return Re.get("/balance",{params:{merchant_id:e.merchantId,biz_type:e.bizType}}).then(t=>{const n=t.data;return{totalAmount:n.total_amount||0,availableAmount:n.available_amount||0,frozenAmount:n.frozen_amount||0}})}const mo=async(e,t)=>Re.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||""),bo=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}"),n={merchant_id:Number(t.merchantId),biz_type:t.bizType,source_operator:String(t.userId),transfer_no:e.transferNo,transfer_channel:e.transferChannel,voucher_urls:e.voucherUrls};return Re.post("/offline/recharge/create",n,{})},go=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");console.log(t,"fundUnitParams");const n={merchant_id:Number(t.merchantId),biz_type:t.bizType,source_operator:String(t.userId),amount:e.amount,currency:e.currency,recharge_channel:e.rechargeChannel,return_url:window.location.href};return Re.post("/online/recharge/create",n,{}).then(r=>r.data.redirect_url)},yo=({value:e=[],onChange:t,maxCount:n=10,accept:r=".jpg,.jpeg,.png,.pdf",multiple:o=!0,disabled:i=!1})=>{const s=It(null),[a,c]=z(!1),[u,f]=z(0),l=async h=>{const p=Array.from(h.target.files).slice(0,n);if(!p.length)return;c(!0);const g=[];for(let _=0;_<p.length;_++){f(0);const y=new FormData;y.append("file",p[_]);try{const w=await mo(y,v=>f(v));w&&g.push(w)}catch{}}c(!1),f(0),t?.([...e,...g]),s.current&&(s.current.value="")},b=h=>{const p=e.filter((g,_)=>_!==h);t?.(p)};return m("div",{children:[m("div",{style:{border:"1px dashed #E5E6EB",borderRadius:8,background:"#FCFCFD",padding:24,textAlign:"center",cursor:i?"not-allowed":"pointer",minHeight:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:15,opacity:i?.6:1},onClick:()=>!i&&s.current?.click(),children:[m("div",{style:{fontSize:48,marginBottom:12},children:"📁"}),m("div",{style:{color:"#222",fontSize:15,marginBottom:4},children:E("点击或拖拽文件到此处上传")}),m("div",{style:{color:"#999",fontSize:13},children:[E("支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传")," ",n," ",E("个文件")]}),m("input",{ref:s,type:"file",multiple:o,accept:r,style:{display:"none"},onChange:l,disabled:i}),a&&m("div",{style:{marginTop:12,color:"#1677ff"},children:[E("正在上传...")," ",u,"%"]})]}),e&&e.length>0&&m("div",{style:{marginTop:12},children:e.map((h,p)=>m("div",{style:{display:"flex",alignItems:"center",background:"#F7F8FA",borderRadius:8,padding:"12px 16px",marginBottom:8,fontSize:15,color:"#222",justifyContent:"space-between"},children:[m("div",{style:{display:"flex",alignItems:"center",flex:1},children:[m("span",{style:{fontWeight:500,wordBreak:"break-all"},children:h.split("/").pop()}),m("span",{style:{color:"#8C8F93",fontSize:13,marginLeft:8},children:["[",E("已上传"),"]"]})]}),m("button",{type:"button",onClick:g=>{g.stopPropagation(),b(p)},style:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:"4px 14px",fontSize:15,marginLeft:16,cursor:"pointer"},disabled:i,children:E("移除")})]},h))})]})},wo=({formState:e,setFormState:t,onClose:n,loading:r,whiteTheme:o=!1})=>{const i=JSON.parse(sessionStorage.getItem("all_dicts")||"{}");console.log(i,"allDicts");const s=i?.channel||[],a=o?{label:{marginBottom:8,fontSize:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},select:{width:"100%",padding:"10px 12px",borderRadius:6,border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},buttonCancel:{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"},buttonSubmit:{background:"#155EEF",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}}:{label:{marginBottom:8,fontSize:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #23262F",background:"#23262F",color:"#fff",fontSize:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},select:{width:"100%",padding:"10px 12px",borderRadius:6,border:"1px solid #23262F",background:"#23262F",color:"#fff",fontSize:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},buttonCancel:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"},buttonSubmit:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}};return m("form",{onSubmit:async u=>{u.preventDefault();let f=!0;t(l=>({...l,platformError:"",transactionIdError:"",filesError:""})),e.platform||(t(l=>({...l,platformError:E("请选择支付平台")})),f=!1),e.transactionId.trim()||(t(l=>({...l,transactionIdError:E("请输入转账交易ID")})),f=!1),(!e.files||e.files.length===0)&&(t(l=>({...l,filesError:E("请上传转账凭证")})),f=!1),f&&(await bo({transferChannel:e.platform,transferNo:e.transactionId,voucherUrls:e.files}),n(),je.success(E("离线充值创建成功")))},children:[m("div",{style:{marginBottom:18},children:[m("div",{style:a.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",E("第三方支付平台")]}),m("select",{style:{...a.select,...e.platformError?a.selectError:{}},value:e.platform,onInput:u=>{const f=u.target.value;t(l=>({...l,platform:f,platformError:f?"":l.platformError}))},children:[m("option",{value:"",disabled:!0,hidden:!0,children:E("请选择支付平台")}),s?.map(u=>m("option",{value:u.value,children:u.label}))]}),e.platformError&&m("div",{style:a.error,children:e.platformError})]}),m("div",{style:{marginBottom:18},children:[m("div",{style:a.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",E("交易ID")]}),m("input",{type:"text",placeholder:E("请输入转账交易ID"),value:e.transactionId,onInput:u=>{const f=u.target.value;t(l=>({...l,transactionId:f,transactionIdError:f?"":l.transactionIdError}))},style:{...a.input,...e.transactionIdError?a.inputError:{}}}),e.transactionIdError&&m("div",{style:a.error,children:e.transactionIdError})]}),m("div",{style:{marginBottom:24},children:[m("div",{style:a.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",E("上传文件")]}),m(yo,{value:e.files,onChange:u=>t(f=>({...f,files:u,filesError:""})),maxCount:10,accept:".jpg,.jpeg,.png,.pdf",multiple:!0}),e.filesError&&m("div",{style:a.error,children:e.filesError})]}),m("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[m("button",{type:"button",onClick:n,style:a.buttonCancel,children:E("取消")}),m("button",{type:"submit",disabled:r,style:a.buttonSubmit,children:E("去支付")})]})]})};function xo({visible:e,onClose:t,onSubmit:n,color:r,whiteTheme:o=!0}){const[i,s]=z({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),[a,c]=z("online"),[u,f]=z({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1});if(Lt(()=>{e||(c("online"),s({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),f({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1}))},[e]),!e)return null;const l=async p=>{p.preventDefault();let g=!0;if(s(_=>({..._,amountError:"",rechargeChannelError:""})),i.amount.trim()||(s(_=>({..._,amountError:E("请输入充值金额")})),g=!1),i.rechargeChannel||(s(_=>({..._,rechargeChannelError:E("请选择支付平台")})),g=!1),!!g){s(_=>({..._,loading:!0,error:""}));try{await n({amount:i.amount,rechargeChannel:i.rechargeChannel,currency:i.currency}),t()}catch{s(_=>({..._,error:E("提交失败,请重试")}))}finally{s(_=>({..._,loading:!1}))}}},b=p=>{p.target===p.currentTarget&&t()},h=o?{modalBg:"#fff",modalColor:"#222",modalBoxShadow:"0 4px 24px rgba(0,0,0,0.08)",mask:"rgba(0,0,0,0.3)",title:{fontWeight:600,fontSize:20,marginBottom:24,textAlign:"left",color:"#222"},closeBtn:{position:"absolute",right:16,top:16,background:"none",border:"none",color:"#222",fontSize:22,cursor:"pointer",lineHeight:1},tabBtn:(p,g)=>({flex:1,background:p?"#fff":"#F7F8FA",color:p?"#155EEF":"#222",border:"none",borderRadius:g?"8px 0 0 8px":"0 8px 8px 0",fontWeight:p?600:400,fontSize:16,height:48,boxShadow:p?"0 2px 8px 0 rgba(20,20,20,0.04)":"none",outline:"none",cursor:"pointer",borderRight:g?"1px solid #F0F1F3":void 0,borderLeft:g?void 0:"1px solid #F0F1F3",transition:"all 0.2s"})}:{modalBg:"#181A20",modalColor:"#fff",modalBoxShadow:"0 4px 24px rgba(0,0,0,0.5)",mask:"rgba(0,0,0,0.7)",title:{fontWeight:600,fontSize:20,marginBottom:24,textAlign:"left",color:"#fff"},closeBtn:{position:"absolute",right:16,top:16,background:"none",border:"none",color:"#fff",fontSize:22,cursor:"pointer",lineHeight:1},tabBtn:(p,g)=>({flex:1,background:p?"#23262F":"#181A20",color:p?"#00E8C6":"#fff",border:"none",borderRadius:g?"8px 0 0 8px":"0 8px 8px 0",fontWeight:p?600:400,fontSize:16,height:48,boxShadow:p?"0 2px 8px 0 rgba(20,20,20,0.10)":"none",outline:"none",cursor:"pointer",borderRight:g?"1px solid #23262F":void 0,borderLeft:g?void 0:"1px solid #23262F",transition:"all 0.2s"})};return m("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:h.mask,display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999},onClick:b,children:m("form",{onSubmit:l,style:{background:h.modalBg,padding:32,borderRadius:12,minWidth:400,maxWidth:400,color:r||h.modalColor,boxShadow:h.modalBoxShadow,position:"relative"},onClick:p=>p.stopPropagation(),children:[m("button",{type:"button",onClick:t,style:h.closeBtn,"aria-label":E("关闭"),children:"×"}),m("div",{style:h.title,children:E("充值 / 转账")}),m("div",{style:{display:"flex",marginBottom:28},children:[m("button",{type:"button",onClick:()=>c("online"),style:h.tabBtn(a==="online",!0),children:E("在线充值")}),m("button",{type:"button",onClick:()=>c("offline"),style:h.tabBtn(a==="offline",!1),children:E("线下转账")})]}),a==="online"?m(Dn,{formState:i,setFormState:s,onClose:t,loading:i.loading,whiteTheme:o}):m(wo,{formState:u,setFormState:f,onClose:t,loading:u.loading,whiteTheme:o})]})})}function Ke(){return(Ke=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 Eo=["context","children"];function So(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(r,o){if(r==null)return{};var i,s,a={},c=Object.keys(r);for(s=0;s<c.length;s++)o.indexOf(i=c[s])>=0||(a[i]=r[i]);return a}(e,Eo);return Dt(t,n)}function vo(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=J(So,Ke({},this._props,{context:e.detail.context}),function t(n,r){if(n.nodeType===3)return n.data;if(n.nodeType!==1)return null;var o=[],i={},s=0,a=n.attributes,c=n.childNodes;for(s=a.length;s--;)a[s].name!=="slot"&&(i[a[s].name]=a[s].value,i[pn(a[s].name)]=a[s].value);for(s=c.length;s--;){var u=t(c[s],null),f=c[s].slot;f?i[f]=J(xt,{name:f},u):o[s]=u}var l=r?J(xt,null,o):o;return J(r||n.nodeName.toLowerCase(),i,l)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?Nt:be)(this._vdom,this._root)}function pn(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function Ro(e,t,n){if(this._vdom){var r={};r[e]=n=n??void 0,r[pn(e)]=n,this._vdom=Dt(this._vdom,r),be(this._vdom,this._root)}}function Co(){be(this._vdom=null,this._root)}function xt(e,t){var n=this;return J("slot",Ke({},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 hn(e,t,n,r){function o(){var i=Reflect.construct(HTMLElement,[],o);return i._vdomComponent=e,i._root=r&&r.shadow?i.attachShadow({mode:r.mode||"open"}):i,i}return(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=vo,o.prototype.attributeChangedCallback=Ro,o.prototype.disconnectedCallback=Co,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=n,n.forEach(function(i){Object.defineProperty(o.prototype,i,{get:function(){return this._vdom.props[i]},set:function(s){this._vdom?this.attributeChangedCallback(i,null,s):(this._props||(this._props={}),this._props[i]=s,this.connectedCallback());var a=typeof s;s!=null&&a!=="string"&&a!=="boolean"&&a!=="number"||this.setAttribute(i,s)}})}),customElements.define(t||e.tagName||e.displayName||e.name,o)}function To(e){const[t,n]=z(!1),[r,o]=z(!0),i=e.theme?.primaryColor,s=async a=>{const c=await go({amount:a.amount,currency:a.currency,rechargeChannel:a.rechargeChannel});window.open(c,"_blank")};return m("div",{children:[m(An,{color:i,onClick:()=>n(!0),children:E("充值/转账")}),m("button",{style:{marginLeft:16,padding:"8px 16px",borderRadius:6,border:"1px solid #eee",cursor:"pointer"},onClick:()=>o(a=>!a),children:E(r?"切换为暗黑主题":"切换为白色主题")}),m(xo,{visible:t,onClose:()=>n(!1),onSubmit:s,color:i,whiteTheme:r})]})}hn(To,"best-recharge",["theme"],{shadow:!1});const ko=({popover:e,children:t,popoverWidth:n=300,popoverMinWidth:r=200,offsetY:o=16,offsetX:i=16,popoverPosition:s="top"})=>{const[a,c]=z(!1),[u,f]=z(s),l=It(null),b=()=>{if(s==="top"||s==="bottom")if(l.current){const g=l.current.getBoundingClientRect();s==="top"&&g.top<100?f("bottom"):s==="bottom"&&window.innerHeight-g.bottom<100?f("top"):f(s)}else f(s);else f(s);c(!0)};let h={position:"absolute",zIndex:999,background:"#fff",color:"#222",borderRadius:6,fontSize:15,minWidth:r,width:n,padding:"8px 14px",boxShadow:"0 4px 16px rgba(0,0,0,0.12)",pointerEvents:"auto",textAlign:"center",border:"none",animation:"fadeInUp 0.3s"},p={position:"absolute",zIndex:11,width:0,height:0};return u==="top"?(h={...h,left:"50%",top:-48,transform:"translateX(-50%)"},p={...p,left:"50%",bottom:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderTop:"8px solid #fff"}):u==="bottom"?(h={...h,left:"50%",top:"100%",marginTop:o,transform:"translateX(-50%)"},p={...p,left:"50%",top:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderBottom:"8px solid #fff"}):u==="leftTop"?(h={...h,right:"100%",top:0,marginRight:i,transform:"none"},p={...p,right:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderLeft:"8px solid #fff"}):u==="rightTop"&&(h={...h,left:"100%",top:0,marginLeft:i,transform:"translateY(0)"},p={...p,left:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderRight:"8px solid #fff"}),m("div",{ref:l,style:{position:"relative",display:"inline-block"},onMouseEnter:b,onMouseLeave:()=>c(!1),children:[t,a&&m("div",{style:h,children:[e,m("div",{style:p})]})]})};function Et(e){return e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}function Ao(e){const[t,n]=z({available:0,currency:"USD",symbol:"$",details:[{label:"",value:0,color:"#15b36b",dot:"#15b36b"},{label:"",value:0,color:"#f59e0b",dot:"#f59e0b"},{label:"",value:0,color:"#155EEF",dot:"#15b36b"}]});return Lt(()=>{(async()=>{try{const o=await _o(),i={available:o.availableAmount,currency:"USD",symbol:"$",details:[{label:E("真实金额"),value:o.totalAmount,color:"#15b36b",dot:"#15b36b"},{label:E("冻结金额"),value:o.frozenAmount,color:"#f59e0b",dot:"#f59e0b"},{label:E("总可用"),value:o.availableAmount,color:"#155EEF",dot:"#15b36b"}]};n(i)}catch(o){console.error("获取余额失败:",o)}})()},[]),m(ko,{popover:m(G,{children:[m("div",{style:{fontSize:16,fontWeight:600,color:"#222",marginBottom:16,textAlign:"center"},children:E("余额详情")}),t.details.map(r=>m("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"8px 0",borderBottom:"1px solid #e5e7eb",fontSize:15},children:[m("span",{style:{display:"flex",alignItems:"center",color:"#6b7280",fontWeight:500},children:[m("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:r.dot,marginRight:8}}),r.label]}),m("span",{style:{color:r.color,fontWeight:600,fontSize:15},children:[t.symbol,Et(r.value)]})]},r.label))]}),popoverPosition:e.popoverPosition||"bottom",children:m("div",{style:{fontSize:24,fontWeight:800,color:"#111827",display:"inline-block"},children:[t.symbol,Et(t.available),m("span",{style:{fontSize:18,color:"#6b7280",marginLeft:8,fontWeight:600},children:t.currency})]})})}hn(Ao,"best-statistical-balance");const Oo=["best-recharge","best-statistical-balance"];exports.components=Oo;exports.initFundUnit=bn;exports.npmTest=_n;exports.printCurrentTime=mn;exports.viteProxy=gn;
|
|
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 je=new po;function ho(e={}){const{baseURL:t="/api",timeout:n=1e4,getLocale:r,onError:o}=e,i=C.create({baseURL:t,timeout:n});return i.interceptors.request.use(s=>{const a=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}"),{token:c}=a;if(s.headers={...s.headers,Authorization:c},r){const u=r();u&&(s.headers={...s.headers,"Accept-Language":u})}return s}),i.interceptors.response.use(s=>{if(s.data&&s.data.code===0)return s.data;const a=s.data?.msg||s.data?.message||"未知错误";return je.error(a),o&&o(a,s),Promise.reject(s.data||{message:"未知错误"})},s=>{const a=s.response?.data?.msg||s.response?.data?.message||s.message||"网络请求失败";return je.error(a),o&&o(a,s),Promise.reject(s)}),i}const Re=ho();function _o(){const e=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");return Re.get("/balance",{params:{merchant_id:e.merchantId,biz_type:e.bizType}}).then(t=>{const n=t.data;return{totalAmount:n.total_amount||0,availableAmount:n.available_amount||0,frozenAmount:n.frozen_amount||0}})}const mo=async(e,t)=>Re.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||""),bo=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}"),n={merchant_id:Number(t.merchantId),biz_type:t.bizType,source_operator:String(t.userId),transfer_no:e.transferNo,transfer_channel:e.transferChannel,voucher_urls:e.voucherUrls};return Re.post("/offline/recharge/create",n,{})},go=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");console.log(t,"fundUnitParams");const n={merchant_id:Number(t.merchantId),biz_type:t.bizType,source_operator:String(t.userId),amount:e.amount,currency:e.currency,recharge_channel:e.rechargeChannel,return_url:window.location.href};return Re.post("/online/recharge/create",n,{}).then(r=>r.data.redirect_url)},yo=({value:e=[],onChange:t,maxCount:n=10,accept:r=".jpg,.jpeg,.png,.pdf",multiple:o=!0,disabled:i=!1})=>{const s=It(null),[a,c]=z(!1),[u,f]=z(0),l=async h=>{const p=Array.from(h.target.files).slice(0,n);if(!p.length)return;c(!0);const g=[];for(let _=0;_<p.length;_++){f(0);const y=new FormData;y.append("file",p[_]);try{const w=await mo(y,v=>f(v));w&&g.push(w)}catch{}}c(!1),f(0),t?.([...e,...g]),s.current&&(s.current.value="")},b=h=>{const p=e.filter((g,_)=>_!==h);t?.(p)};return m("div",{children:[m("div",{style:{border:"1px dashed #E5E6EB",borderRadius:8,background:"#FCFCFD",padding:24,textAlign:"center",cursor:i?"not-allowed":"pointer",minHeight:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:15,opacity:i?.6:1},onClick:()=>!i&&s.current?.click(),children:[m("div",{style:{fontSize:48,marginBottom:12},children:"📁"}),m("div",{style:{color:"#222",fontSize:15,marginBottom:4},children:x("点击或拖拽文件到此处上传")}),m("div",{style:{color:"#999",fontSize:13},children:[x("支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传")," ",n," ",x("个文件")]}),m("input",{ref:s,type:"file",multiple:o,accept:r,style:{display:"none"},onChange:l,disabled:i}),a&&m("div",{style:{marginTop:12,color:"#1677ff"},children:[x("正在上传...")," ",u,"%"]})]}),e&&e.length>0&&m("div",{style:{marginTop:12},children:e.map((h,p)=>m("div",{style:{display:"flex",alignItems:"center",background:"#F7F8FA",borderRadius:8,padding:"12px 16px",marginBottom:8,fontSize:15,color:"#222",justifyContent:"space-between"},children:[m("div",{style:{display:"flex",alignItems:"center",flex:1},children:[m("span",{style:{fontWeight:500,wordBreak:"break-all"},children:h.split("/").pop()}),m("span",{style:{color:"#8C8F93",fontSize:13,marginLeft:8},children:["[",x("已上传"),"]"]})]}),m("button",{type:"button",onClick:g=>{g.stopPropagation(),b(p)},style:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:"4px 14px",fontSize:15,marginLeft:16,cursor:"pointer"},disabled:i,children:x("移除")})]},h))})]})},wo=({formState:e,setFormState:t,onClose:n,loading:r,whiteTheme:o=!1})=>{const i=JSON.parse(sessionStorage.getItem("all_dicts")||"{}");console.log(i,"allDicts");const s=i?.channel||[],a=o?{label:{marginBottom:8,fontSize:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},select:{width:"100%",padding:"10px 12px",borderRadius:6,border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},buttonCancel:{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"},buttonSubmit:{background:"#155EEF",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}}:{label:{marginBottom:8,fontSize:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #23262F",background:"#23262F",color:"#fff",fontSize:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},select:{width:"100%",padding:"10px 12px",borderRadius:6,border:"1px solid #23262F",background:"#23262F",color:"#fff",fontSize:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},buttonCancel:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"},buttonSubmit:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}};return m("form",{onSubmit:async u=>{u.preventDefault();let f=!0;t(l=>({...l,platformError:"",transactionIdError:"",filesError:""})),e.platform||(t(l=>({...l,platformError:x("请选择支付平台")})),f=!1),e.transactionId.trim()||(t(l=>({...l,transactionIdError:x("请输入转账交易ID")})),f=!1),(!e.files||e.files.length===0)&&(t(l=>({...l,filesError:x("请上传转账凭证")})),f=!1),f&&(await bo({transferChannel:e.platform,transferNo:e.transactionId,voucherUrls:e.files}),n(),je.success(x("离线充值创建成功")))},children:[m("div",{style:{marginBottom:18},children:[m("div",{style:a.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",x("第三方支付平台")]}),m("select",{style:{...a.select,...e.platformError?a.selectError:{}},value:e.platform,onInput:u=>{const f=u.target.value;t(l=>({...l,platform:f,platformError:f?"":l.platformError}))},children:[m("option",{value:"",disabled:!0,hidden:!0,children:x("请选择支付平台")}),s?.map(u=>m("option",{value:u.value,children:u.label}))]}),e.platformError&&m("div",{style:a.error,children:e.platformError})]}),m("div",{style:{marginBottom:18},children:[m("div",{style:a.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",x("交易ID")]}),m("input",{type:"text",placeholder:x("请输入转账交易ID"),value:e.transactionId,onInput:u=>{const f=u.target.value;t(l=>({...l,transactionId:f,transactionIdError:f?"":l.transactionIdError}))},style:{...a.input,...e.transactionIdError?a.inputError:{}}}),e.transactionIdError&&m("div",{style:a.error,children:e.transactionIdError})]}),m("div",{style:{marginBottom:24},children:[m("div",{style:a.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",x("上传文件")]}),m(yo,{value:e.files,onChange:u=>t(f=>({...f,files:u,filesError:""})),maxCount:10,accept:".jpg,.jpeg,.png,.pdf",multiple:!0}),e.filesError&&m("div",{style:a.error,children:e.filesError})]}),m("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[m("button",{type:"button",onClick:n,style:a.buttonCancel,children:x("取消")}),m("button",{type:"submit",disabled:r,style:a.buttonSubmit,children:x("去支付")})]})]})};function xo({visible:e,onClose:t,onSubmit:n,color:r,whiteTheme:o=!0}){const[i,s]=z({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),[a,c]=z("online"),[u,f]=z({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1});if(Lt(()=>{e||(c("online"),s({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),f({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1}))},[e]),!e)return null;const l=async p=>{p.preventDefault();let g=!0;if(s(_=>({..._,amountError:"",rechargeChannelError:""})),i.amount.trim()||(s(_=>({..._,amountError:x("请输入充值金额")})),g=!1),i.rechargeChannel||(s(_=>({..._,rechargeChannelError:x("请选择支付平台")})),g=!1),!!g){s(_=>({..._,loading:!0,error:""}));try{await n({amount:i.amount,rechargeChannel:i.rechargeChannel,currency:i.currency}),t()}catch{s(_=>({..._,error:x("提交失败,请重试")}))}finally{s(_=>({..._,loading:!1}))}}},b=p=>{p.target===p.currentTarget&&t()},h=o?{modalBg:"#fff",modalColor:"#222",modalBoxShadow:"0 4px 24px rgba(0,0,0,0.08)",mask:"rgba(0,0,0,0.3)",title:{fontWeight:600,fontSize:20,marginBottom:24,textAlign:"left",color:"#222"},closeBtn:{position:"absolute",right:16,top:16,background:"none",border:"none",color:"#222",fontSize:22,cursor:"pointer",lineHeight:1},tabBtn:(p,g)=>({flex:1,background:p?"#fff":"#F7F8FA",color:p?"#155EEF":"#222",border:"none",borderRadius:g?"8px 0 0 8px":"0 8px 8px 0",fontWeight:p?600:400,fontSize:16,height:48,boxShadow:p?"0 2px 8px 0 rgba(20,20,20,0.04)":"none",outline:"none",cursor:"pointer",borderRight:g?"1px solid #F0F1F3":void 0,borderLeft:g?void 0:"1px solid #F0F1F3",transition:"all 0.2s"})}:{modalBg:"#181A20",modalColor:"#fff",modalBoxShadow:"0 4px 24px rgba(0,0,0,0.5)",mask:"rgba(0,0,0,0.7)",title:{fontWeight:600,fontSize:20,marginBottom:24,textAlign:"left",color:"#fff"},closeBtn:{position:"absolute",right:16,top:16,background:"none",border:"none",color:"#fff",fontSize:22,cursor:"pointer",lineHeight:1},tabBtn:(p,g)=>({flex:1,background:p?"#23262F":"#181A20",color:p?"#00E8C6":"#fff",border:"none",borderRadius:g?"8px 0 0 8px":"0 8px 8px 0",fontWeight:p?600:400,fontSize:16,height:48,boxShadow:p?"0 2px 8px 0 rgba(20,20,20,0.10)":"none",outline:"none",cursor:"pointer",borderRight:g?"1px solid #23262F":void 0,borderLeft:g?void 0:"1px solid #23262F",transition:"all 0.2s"})};return m("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:h.mask,display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999},onClick:b,children:m("form",{onSubmit:l,style:{background:h.modalBg,padding:32,borderRadius:12,minWidth:400,maxWidth:400,color:r||h.modalColor,boxShadow:h.modalBoxShadow,position:"relative"},onClick:p=>p.stopPropagation(),children:[m("button",{type:"button",onClick:t,style:h.closeBtn,"aria-label":x("关闭"),children:"×"}),m("div",{style:h.title,children:x("充值 / 转账")}),m("div",{style:{display:"flex",marginBottom:28},children:[m("button",{type:"button",onClick:()=>c("online"),style:h.tabBtn(a==="online",!0),children:x("在线充值")}),m("button",{type:"button",onClick:()=>c("offline"),style:h.tabBtn(a==="offline",!1),children:x("线下转账")})]}),a==="online"?m(Dn,{formState:i,setFormState:s,onClose:t,loading:i.loading,whiteTheme:o}):m(wo,{formState:u,setFormState:f,onClose:t,loading:u.loading,whiteTheme:o})]})})}function Ke(){return(Ke=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 Eo=["context","children"];function So(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(r,o){if(r==null)return{};var i,s,a={},c=Object.keys(r);for(s=0;s<c.length;s++)o.indexOf(i=c[s])>=0||(a[i]=r[i]);return a}(e,Eo);return Dt(t,n)}function vo(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=J(So,Ke({},this._props,{context:e.detail.context}),function t(n,r){if(n.nodeType===3)return n.data;if(n.nodeType!==1)return null;var o=[],i={},s=0,a=n.attributes,c=n.childNodes;for(s=a.length;s--;)a[s].name!=="slot"&&(i[a[s].name]=a[s].value,i[pn(a[s].name)]=a[s].value);for(s=c.length;s--;){var u=t(c[s],null),f=c[s].slot;f?i[f]=J(xt,{name:f},u):o[s]=u}var l=r?J(xt,null,o):o;return J(r||n.nodeName.toLowerCase(),i,l)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?Nt:be)(this._vdom,this._root)}function pn(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function Ro(e,t,n){if(this._vdom){var r={};r[e]=n=n??void 0,r[pn(e)]=n,this._vdom=Dt(this._vdom,r),be(this._vdom,this._root)}}function Co(){be(this._vdom=null,this._root)}function xt(e,t){var n=this;return J("slot",Ke({},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 hn(e,t,n,r){function o(){var i=Reflect.construct(HTMLElement,[],o);return i._vdomComponent=e,i._root=r&&r.shadow?i.attachShadow({mode:r.mode||"open"}):i,i}return(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=vo,o.prototype.attributeChangedCallback=Ro,o.prototype.disconnectedCallback=Co,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=n,n.forEach(function(i){Object.defineProperty(o.prototype,i,{get:function(){return this._vdom.props[i]},set:function(s){this._vdom?this.attributeChangedCallback(i,null,s):(this._props||(this._props={}),this._props[i]=s,this.connectedCallback());var a=typeof s;s!=null&&a!=="string"&&a!=="boolean"&&a!=="number"||this.setAttribute(i,s)}})}),customElements.define(t||e.tagName||e.displayName||e.name,o)}function To(e){const[t,n]=z(!1),[r,o]=z(!0),i=e.theme?.primaryColor,s=async a=>{const c=await go({amount:a.amount,currency:a.currency,rechargeChannel:a.rechargeChannel});window.open(c,"_blank")};return m("div",{children:[m(An,{color:i,onClick:()=>n(!0),children:x("充值/转账")}),m("button",{style:{marginLeft:16,padding:"8px 16px",borderRadius:6,border:"1px solid #eee",cursor:"pointer"},onClick:()=>o(a=>!a),children:x(r?"切换为暗黑主题":"切换为白色主题")}),m(xo,{visible:t,onClose:()=>n(!1),onSubmit:s,color:i,whiteTheme:r})]})}hn(To,"best-recharge",["theme"],{shadow:!1});const ko=({popover:e,children:t,popoverWidth:n=300,popoverMinWidth:r=200,offsetY:o=16,offsetX:i=16,popoverPosition:s="top"})=>{const[a,c]=z(!1),[u,f]=z(s),l=It(null),b=()=>{if(s==="top"||s==="bottom")if(l.current){const g=l.current.getBoundingClientRect();s==="top"&&g.top<100?f("bottom"):s==="bottom"&&window.innerHeight-g.bottom<100?f("top"):f(s)}else f(s);else f(s);c(!0)};let h={position:"absolute",zIndex:999,background:"#fff",color:"#222",borderRadius:6,fontSize:15,minWidth:r,width:n,padding:"8px 14px",boxShadow:"0 4px 16px rgba(0,0,0,0.12)",pointerEvents:"auto",textAlign:"center",border:"none",animation:"fadeInUp 0.3s"},p={position:"absolute",zIndex:11,width:0,height:0};return u==="top"?(h={...h,left:"50%",top:-48,transform:"translateX(-50%)"},p={...p,left:"50%",bottom:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderTop:"8px solid #fff"}):u==="bottom"?(h={...h,left:"50%",top:"100%",marginTop:o,transform:"translateX(-50%)"},p={...p,left:"50%",top:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderBottom:"8px solid #fff"}):u==="leftTop"?(h={...h,right:"100%",top:0,marginRight:i,transform:"none"},p={...p,right:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderLeft:"8px solid #fff"}):u==="rightTop"&&(h={...h,left:"100%",top:0,marginLeft:i,transform:"translateY(0)"},p={...p,left:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderRight:"8px solid #fff"}),m("div",{ref:l,style:{position:"relative",display:"inline-block"},onMouseEnter:b,onMouseLeave:()=>c(!1),children:[t,a&&m("div",{style:h,children:[e,m("div",{style:p})]})]})};function Et(e){return e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}function Ao(e){const[t,n]=z({available:0,currency:"USD",symbol:"$",details:[{label:x("真实金额"),value:0,color:"#15b36b",dot:"#15b36b"},{label:x("冻结金额"),value:0,color:"#f59e0b",dot:"#f59e0b"},{label:x("总可用"),value:0,color:"#155EEF",dot:"#15b36b"}]});return Lt(()=>{(async()=>{try{const o=await _o(),i={available:o.availableAmount,currency:"USD",symbol:"$",details:[{label:x("真实金额"),value:o.totalAmount,color:"#15b36b",dot:"#15b36b"},{label:x("冻结金额"),value:o.frozenAmount,color:"#f59e0b",dot:"#f59e0b"},{label:x("总可用"),value:o.availableAmount,color:"#155EEF",dot:"#15b36b"}]};n(i)}catch(o){console.error("获取余额失败:",o)}})()},[]),m(ko,{popover:m(G,{children:[m("div",{style:{fontSize:16,fontWeight:600,color:"#222",marginBottom:16,textAlign:"center"},children:x("余额详情")}),t.details.map(r=>m("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"8px 0",borderBottom:"1px solid #e5e7eb",fontSize:15},children:[m("span",{style:{display:"flex",alignItems:"center",color:"#6b7280",fontWeight:500},children:[m("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:r.dot,marginRight:8}}),r.label]}),m("span",{style:{color:r.color,fontWeight:600,fontSize:15},children:[t.symbol,Et(r.value)]})]},r.label))]}),popoverPosition:e.popoverPosition||"bottom",children:m("div",{style:{fontSize:24,fontWeight:800,color:"#111827",display:"inline-block"},children:[t.symbol,Et(t.available),m("span",{style:{fontSize:18,color:"#6b7280",marginLeft:8,fontWeight:600},children:t.currency})]})})}hn(Ao,"best-statistical-balance");const Oo=["best-recharge","best-statistical-balance"];exports.components=Oo;exports.initFundUnit=bn;exports.npmTest=_n;exports.printCurrentTime=mn;exports.viteProxy=gn;
|
package/dist/best-unit.js
CHANGED
|
@@ -5,24 +5,22 @@ function To() {
|
|
|
5
5
|
console.log("Current time:", (/* @__PURE__ */ new Date()).toISOString());
|
|
6
6
|
}
|
|
7
7
|
function ko(e) {
|
|
8
|
-
const { merchant_id: t, biz_type: n, theme: r,
|
|
8
|
+
const { merchant_id: t, biz_type: n, theme: r, locale: o = "zh" } = e, i = "Bearer " + e.token;
|
|
9
9
|
return sessionStorage.setItem(
|
|
10
10
|
"fund_unit_params",
|
|
11
11
|
JSON.stringify({
|
|
12
12
|
merchantId: t,
|
|
13
13
|
bizType: n,
|
|
14
|
-
|
|
15
|
-
token: s,
|
|
14
|
+
token: i,
|
|
16
15
|
theme: r,
|
|
17
|
-
locale:
|
|
16
|
+
locale: o
|
|
18
17
|
})
|
|
19
18
|
), {
|
|
20
|
-
token:
|
|
19
|
+
token: i,
|
|
21
20
|
merchantId: t,
|
|
22
21
|
bizType: n,
|
|
23
22
|
theme: r,
|
|
24
|
-
|
|
25
|
-
locale: i
|
|
23
|
+
locale: o
|
|
26
24
|
};
|
|
27
25
|
}
|
|
28
26
|
const Ao = {
|
|
@@ -534,7 +532,7 @@ function On() {
|
|
|
534
532
|
sessionStorage.getItem("fund_unit_params") || "{}"
|
|
535
533
|
).locale || "zh";
|
|
536
534
|
}
|
|
537
|
-
function
|
|
535
|
+
function x(e) {
|
|
538
536
|
return On() === "zh" ? Tn(e) : An(e);
|
|
539
537
|
}
|
|
540
538
|
const Fn = ({ formState: e, setFormState: t, onClose: n, loading: r, whiteTheme: o = !1 }) => {
|
|
@@ -662,7 +660,7 @@ const Fn = ({ formState: e, setFormState: t, onClose: n, loading: r, whiteTheme:
|
|
|
662
660
|
/* @__PURE__ */ m("div", { style: c.label, children: [
|
|
663
661
|
/* @__PURE__ */ m("span", { style: { color: "#F53F3F" }, children: "*" }),
|
|
664
662
|
" ",
|
|
665
|
-
|
|
663
|
+
x("充值币种")
|
|
666
664
|
] }),
|
|
667
665
|
/* @__PURE__ */ m(
|
|
668
666
|
"select",
|
|
@@ -680,7 +678,7 @@ const Fn = ({ formState: e, setFormState: t, onClose: n, loading: r, whiteTheme:
|
|
|
680
678
|
}));
|
|
681
679
|
},
|
|
682
680
|
children: [
|
|
683
|
-
/* @__PURE__ */ m("option", { value: "", disabled: !0, hidden: !0, children:
|
|
681
|
+
/* @__PURE__ */ m("option", { value: "", disabled: !0, hidden: !0, children: x("请选择充值币种") }),
|
|
684
682
|
s?.map((l) => /* @__PURE__ */ m("option", { value: l.value, children: l.label }))
|
|
685
683
|
]
|
|
686
684
|
}
|
|
@@ -690,13 +688,13 @@ const Fn = ({ formState: e, setFormState: t, onClose: n, loading: r, whiteTheme:
|
|
|
690
688
|
/* @__PURE__ */ m("div", { style: c.label, children: [
|
|
691
689
|
/* @__PURE__ */ m("span", { style: { color: "#F53F3F" }, children: "*" }),
|
|
692
690
|
" ",
|
|
693
|
-
|
|
691
|
+
x("充值金额")
|
|
694
692
|
] }),
|
|
695
693
|
/* @__PURE__ */ m(
|
|
696
694
|
"input",
|
|
697
695
|
{
|
|
698
696
|
type: "text",
|
|
699
|
-
placeholder:
|
|
697
|
+
placeholder: x("请输入充值金额"),
|
|
700
698
|
value: e.amount,
|
|
701
699
|
onInput: (l) => {
|
|
702
700
|
const b = l.target.value;
|
|
@@ -718,7 +716,7 @@ const Fn = ({ formState: e, setFormState: t, onClose: n, loading: r, whiteTheme:
|
|
|
718
716
|
/* @__PURE__ */ m("div", { style: c.label, children: [
|
|
719
717
|
/* @__PURE__ */ m("span", { style: { color: "#F53F3F" }, children: "*" }),
|
|
720
718
|
" ",
|
|
721
|
-
|
|
719
|
+
x("支付平台")
|
|
722
720
|
] }),
|
|
723
721
|
/* @__PURE__ */ m(
|
|
724
722
|
"select",
|
|
@@ -737,7 +735,7 @@ const Fn = ({ formState: e, setFormState: t, onClose: n, loading: r, whiteTheme:
|
|
|
737
735
|
}));
|
|
738
736
|
},
|
|
739
737
|
children: [
|
|
740
|
-
/* @__PURE__ */ m("option", { value: "", disabled: !0, hidden: !0, children:
|
|
738
|
+
/* @__PURE__ */ m("option", { value: "", disabled: !0, hidden: !0, children: x("请选择支付平台") }),
|
|
741
739
|
a?.map((l) => /* @__PURE__ */ m("option", { value: l.value, children: l.label }))
|
|
742
740
|
]
|
|
743
741
|
}
|
|
@@ -746,8 +744,8 @@ const Fn = ({ formState: e, setFormState: t, onClose: n, loading: r, whiteTheme:
|
|
|
746
744
|
] }),
|
|
747
745
|
e.error && /* @__PURE__ */ m("div", { style: { color: "#ff4d4f", marginBottom: 12 }, children: e.error }),
|
|
748
746
|
/* @__PURE__ */ m("div", { style: { display: "flex", justifyContent: "flex-end", gap: 12 }, children: [
|
|
749
|
-
/* @__PURE__ */ m("button", { type: "button", onClick: n, style: u, children:
|
|
750
|
-
/* @__PURE__ */ m("button", { type: "submit", disabled: r, style: f, children:
|
|
747
|
+
/* @__PURE__ */ m("button", { type: "button", onClick: n, style: u, children: x("取消") }),
|
|
748
|
+
/* @__PURE__ */ m("button", { type: "submit", disabled: r, style: f, children: x(r ? "提交中..." : "去支付") })
|
|
751
749
|
] })
|
|
752
750
|
] });
|
|
753
751
|
};
|
|
@@ -974,10 +972,10 @@ const dr = (e) => {
|
|
|
974
972
|
asap: _r,
|
|
975
973
|
isIterable: mr
|
|
976
974
|
};
|
|
977
|
-
function
|
|
975
|
+
function E(e, t, n, r, o) {
|
|
978
976
|
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);
|
|
979
977
|
}
|
|
980
|
-
d.inherits(
|
|
978
|
+
d.inherits(E, Error, {
|
|
981
979
|
toJSON: function() {
|
|
982
980
|
return {
|
|
983
981
|
// Standard
|
|
@@ -998,7 +996,7 @@ d.inherits(x, Error, {
|
|
|
998
996
|
};
|
|
999
997
|
}
|
|
1000
998
|
});
|
|
1001
|
-
const Kt =
|
|
999
|
+
const Kt = E.prototype, Xt = {};
|
|
1002
1000
|
[
|
|
1003
1001
|
"ERR_BAD_OPTION_VALUE",
|
|
1004
1002
|
"ERR_BAD_OPTION",
|
|
@@ -1016,13 +1014,13 @@ const Kt = x.prototype, Xt = {};
|
|
|
1016
1014
|
].forEach((e) => {
|
|
1017
1015
|
Xt[e] = { value: e };
|
|
1018
1016
|
});
|
|
1019
|
-
Object.defineProperties(
|
|
1017
|
+
Object.defineProperties(E, Xt);
|
|
1020
1018
|
Object.defineProperty(Kt, "isAxiosError", { value: !0 });
|
|
1021
|
-
|
|
1019
|
+
E.from = (e, t, n, r, o, i) => {
|
|
1022
1020
|
const s = Object.create(Kt);
|
|
1023
1021
|
return d.toFlatObject(e, s, function(c) {
|
|
1024
1022
|
return c !== Error.prototype;
|
|
1025
|
-
}, (a) => a !== "isAxiosError"),
|
|
1023
|
+
}, (a) => a !== "isAxiosError"), E.call(s, e.message, t, n, r, o), s.cause = e, s.name = e.name, i && Object.assign(s, i), s;
|
|
1026
1024
|
};
|
|
1027
1025
|
const br = null;
|
|
1028
1026
|
function De(e) {
|
|
@@ -1062,7 +1060,7 @@ function Ee(e, t, n) {
|
|
|
1062
1060
|
if (d.isBoolean(p))
|
|
1063
1061
|
return p.toString();
|
|
1064
1062
|
if (!c && d.isBlob(p))
|
|
1065
|
-
throw new
|
|
1063
|
+
throw new E("Blob is not supported. Use a Buffer instead.");
|
|
1066
1064
|
return d.isArrayBuffer(p) || d.isTypedArray(p) ? c && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
|
|
1067
1065
|
}
|
|
1068
1066
|
function f(p, g, _) {
|
|
@@ -1312,7 +1310,7 @@ const ie = {
|
|
|
1312
1310
|
return JSON.parse(t);
|
|
1313
1311
|
} catch (a) {
|
|
1314
1312
|
if (s)
|
|
1315
|
-
throw a.name === "SyntaxError" ?
|
|
1313
|
+
throw a.name === "SyntaxError" ? E.from(a, E.ERR_BAD_RESPONSE, this, null, this.response) : a;
|
|
1316
1314
|
}
|
|
1317
1315
|
}
|
|
1318
1316
|
return t;
|
|
@@ -1555,16 +1553,16 @@ function nn(e) {
|
|
|
1555
1553
|
return !!(e && e.__CANCEL__);
|
|
1556
1554
|
}
|
|
1557
1555
|
function X(e, t, n) {
|
|
1558
|
-
|
|
1556
|
+
E.call(this, e ?? "canceled", E.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
1559
1557
|
}
|
|
1560
|
-
d.inherits(X,
|
|
1558
|
+
d.inherits(X, E, {
|
|
1561
1559
|
__CANCEL__: !0
|
|
1562
1560
|
});
|
|
1563
1561
|
function rn(e, t, n) {
|
|
1564
1562
|
const r = n.config.validateStatus;
|
|
1565
|
-
!n.status || !r || r(n.status) ? e(n) : t(new
|
|
1563
|
+
!n.status || !r || r(n.status) ? e(n) : t(new E(
|
|
1566
1564
|
"Request failed with status code " + n.status,
|
|
1567
|
-
[
|
|
1565
|
+
[E.ERR_BAD_REQUEST, E.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
1568
1566
|
n.config,
|
|
1569
1567
|
n.request,
|
|
1570
1568
|
n
|
|
@@ -1787,15 +1785,15 @@ const sn = (e) => {
|
|
|
1787
1785
|
"onloadend" in _ ? _.onloadend = y : _.onreadystatechange = function() {
|
|
1788
1786
|
!_ || _.readyState !== 4 || _.status === 0 && !(_.responseURL && _.responseURL.indexOf("file:") === 0) || setTimeout(y);
|
|
1789
1787
|
}, _.onabort = function() {
|
|
1790
|
-
_ && (r(new
|
|
1788
|
+
_ && (r(new E("Request aborted", E.ECONNABORTED, e, _)), _ = null);
|
|
1791
1789
|
}, _.onerror = function() {
|
|
1792
|
-
r(new
|
|
1790
|
+
r(new E("Network Error", E.ERR_NETWORK, e, _)), _ = null;
|
|
1793
1791
|
}, _.ontimeout = function() {
|
|
1794
1792
|
let A = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
|
|
1795
1793
|
const k = o.transitional || en;
|
|
1796
|
-
o.timeoutErrorMessage && (A = o.timeoutErrorMessage), r(new
|
|
1794
|
+
o.timeoutErrorMessage && (A = o.timeoutErrorMessage), r(new E(
|
|
1797
1795
|
A,
|
|
1798
|
-
k.clarifyTimeoutError ?
|
|
1796
|
+
k.clarifyTimeoutError ? E.ETIMEDOUT : E.ECONNABORTED,
|
|
1799
1797
|
e,
|
|
1800
1798
|
_
|
|
1801
1799
|
)), _ = null;
|
|
@@ -1806,7 +1804,7 @@ const sn = (e) => {
|
|
|
1806
1804
|
}, o.cancelToken && o.cancelToken.subscribe(f), o.signal && (o.signal.aborted ? f() : o.signal.addEventListener("abort", f)));
|
|
1807
1805
|
const w = zr(o.url);
|
|
1808
1806
|
if (w && O.protocols.indexOf(w) === -1) {
|
|
1809
|
-
r(new
|
|
1807
|
+
r(new E("Unsupported protocol " + w + ":", E.ERR_BAD_REQUEST, e));
|
|
1810
1808
|
return;
|
|
1811
1809
|
}
|
|
1812
1810
|
_.send(i || null);
|
|
@@ -1819,11 +1817,11 @@ const sn = (e) => {
|
|
|
1819
1817
|
if (!o) {
|
|
1820
1818
|
o = !0, a();
|
|
1821
1819
|
const f = u instanceof Error ? u : this.reason;
|
|
1822
|
-
r.abort(f instanceof
|
|
1820
|
+
r.abort(f instanceof E ? f : new X(f instanceof Error ? f.message : f));
|
|
1823
1821
|
}
|
|
1824
1822
|
};
|
|
1825
1823
|
let s = t && setTimeout(() => {
|
|
1826
|
-
s = null, i(new
|
|
1824
|
+
s = null, i(new E(`timeout ${t} of ms exceeded`, E.ETIMEDOUT));
|
|
1827
1825
|
}, t);
|
|
1828
1826
|
const a = () => {
|
|
1829
1827
|
e && (s && clearTimeout(s), s = null, e.forEach((u) => {
|
|
@@ -1913,7 +1911,7 @@ const sn = (e) => {
|
|
|
1913
1911
|
Se && ((e) => {
|
|
1914
1912
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1915
1913
|
!_e[t] && (_e[t] = d.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
|
1916
|
-
throw new
|
|
1914
|
+
throw new E(`Response type '${t}' is not supported`, E.ERR_NOT_SUPPORT, r);
|
|
1917
1915
|
});
|
|
1918
1916
|
});
|
|
1919
1917
|
})(new Response());
|
|
@@ -2013,11 +2011,11 @@ const eo = async (e) => {
|
|
|
2013
2011
|
});
|
|
2014
2012
|
} catch (y) {
|
|
2015
2013
|
throw g && g(), y && y.name === "TypeError" && /Load failed|fetch/i.test(y.message) ? Object.assign(
|
|
2016
|
-
new
|
|
2014
|
+
new E("Network Error", E.ERR_NETWORK, e, p),
|
|
2017
2015
|
{
|
|
2018
2016
|
cause: y.cause || y
|
|
2019
2017
|
}
|
|
2020
|
-
) :
|
|
2018
|
+
) : E.from(y, y && y.code, e, p);
|
|
2021
2019
|
}
|
|
2022
2020
|
}), Ie = {
|
|
2023
2021
|
http: br,
|
|
@@ -2043,7 +2041,7 @@ const gt = (e) => `- ${e}`, ro = (e) => d.isFunction(e) || e === null || e === !
|
|
|
2043
2041
|
n = e[i];
|
|
2044
2042
|
let s;
|
|
2045
2043
|
if (r = n, !ro(n) && (r = Ie[(s = String(n)).toLowerCase()], r === void 0))
|
|
2046
|
-
throw new
|
|
2044
|
+
throw new E(`Unknown adapter '${s}'`);
|
|
2047
2045
|
if (r)
|
|
2048
2046
|
break;
|
|
2049
2047
|
o[s || "#" + i] = r;
|
|
@@ -2055,7 +2053,7 @@ const gt = (e) => `- ${e}`, ro = (e) => d.isFunction(e) || e === null || e === !
|
|
|
2055
2053
|
let s = t ? i.length > 1 ? `since :
|
|
2056
2054
|
` + i.map(gt).join(`
|
|
2057
2055
|
`) : " " + gt(i[0]) : "as no adapter specified";
|
|
2058
|
-
throw new
|
|
2056
|
+
throw new E(
|
|
2059
2057
|
"There is no suitable adapter to dispatch the request " + s,
|
|
2060
2058
|
"ERR_NOT_SUPPORT"
|
|
2061
2059
|
);
|
|
@@ -2099,9 +2097,9 @@ ve.transitional = function(t, n, r) {
|
|
|
2099
2097
|
}
|
|
2100
2098
|
return (i, s, a) => {
|
|
2101
2099
|
if (t === !1)
|
|
2102
|
-
throw new
|
|
2100
|
+
throw new E(
|
|
2103
2101
|
o(s, " has been removed" + (n ? " in " + n : "")),
|
|
2104
|
-
|
|
2102
|
+
E.ERR_DEPRECATED
|
|
2105
2103
|
);
|
|
2106
2104
|
return n && !wt[s] && (wt[s] = !0, console.warn(
|
|
2107
2105
|
o(
|
|
@@ -2116,7 +2114,7 @@ ve.spelling = function(t) {
|
|
|
2116
2114
|
};
|
|
2117
2115
|
function oo(e, t, n) {
|
|
2118
2116
|
if (typeof e != "object")
|
|
2119
|
-
throw new
|
|
2117
|
+
throw new E("options must be an object", E.ERR_BAD_OPTION_VALUE);
|
|
2120
2118
|
const r = Object.keys(e);
|
|
2121
2119
|
let o = r.length;
|
|
2122
2120
|
for (; o-- > 0; ) {
|
|
@@ -2124,11 +2122,11 @@ function oo(e, t, n) {
|
|
|
2124
2122
|
if (s) {
|
|
2125
2123
|
const a = e[i], c = a === void 0 || s(a, i, e);
|
|
2126
2124
|
if (c !== !0)
|
|
2127
|
-
throw new
|
|
2125
|
+
throw new E("option " + i + " must be " + c, E.ERR_BAD_OPTION_VALUE);
|
|
2128
2126
|
continue;
|
|
2129
2127
|
}
|
|
2130
2128
|
if (n !== !0)
|
|
2131
|
-
throw new
|
|
2129
|
+
throw new E("Unknown option " + i, E.ERR_BAD_OPTION);
|
|
2132
2130
|
}
|
|
2133
2131
|
}
|
|
2134
2132
|
const fe = {
|
|
@@ -2421,7 +2419,7 @@ C.CancelToken = io;
|
|
|
2421
2419
|
C.isCancel = nn;
|
|
2422
2420
|
C.VERSION = un;
|
|
2423
2421
|
C.toFormData = Ee;
|
|
2424
|
-
C.AxiosError =
|
|
2422
|
+
C.AxiosError = E;
|
|
2425
2423
|
C.Cancel = C.CanceledError;
|
|
2426
2424
|
C.all = function(t) {
|
|
2427
2425
|
return Promise.all(t);
|
|
@@ -2692,13 +2690,13 @@ const fo = async (e, t) => Re.post("/oss/upload", e, {
|
|
|
2692
2690
|
onClick: () => !i && s.current?.click(),
|
|
2693
2691
|
children: [
|
|
2694
2692
|
/* @__PURE__ */ m("div", { style: { fontSize: 48, marginBottom: 12 }, children: "📁" }),
|
|
2695
|
-
/* @__PURE__ */ m("div", { style: { color: "#222", fontSize: 15, marginBottom: 4 }, children:
|
|
2693
|
+
/* @__PURE__ */ m("div", { style: { color: "#222", fontSize: 15, marginBottom: 4 }, children: x("点击或拖拽文件到此处上传") }),
|
|
2696
2694
|
/* @__PURE__ */ m("div", { style: { color: "#999", fontSize: 13 }, children: [
|
|
2697
|
-
|
|
2695
|
+
x("支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传"),
|
|
2698
2696
|
" ",
|
|
2699
2697
|
n,
|
|
2700
2698
|
" ",
|
|
2701
|
-
|
|
2699
|
+
x("个文件")
|
|
2702
2700
|
] }),
|
|
2703
2701
|
/* @__PURE__ */ m(
|
|
2704
2702
|
"input",
|
|
@@ -2713,7 +2711,7 @@ const fo = async (e, t) => Re.post("/oss/upload", e, {
|
|
|
2713
2711
|
}
|
|
2714
2712
|
),
|
|
2715
2713
|
a && /* @__PURE__ */ m("div", { style: { marginTop: 12, color: "#1677ff" }, children: [
|
|
2716
|
-
|
|
2714
|
+
x("正在上传..."),
|
|
2717
2715
|
" ",
|
|
2718
2716
|
u,
|
|
2719
2717
|
"%"
|
|
@@ -2740,7 +2738,7 @@ const fo = async (e, t) => Re.post("/oss/upload", e, {
|
|
|
2740
2738
|
/* @__PURE__ */ m("span", { style: { fontWeight: 500, wordBreak: "break-all" }, children: h.split("/").pop() }),
|
|
2741
2739
|
/* @__PURE__ */ m("span", { style: { color: "#8C8F93", fontSize: 13, marginLeft: 8 }, children: [
|
|
2742
2740
|
"[",
|
|
2743
|
-
|
|
2741
|
+
x("已上传"),
|
|
2744
2742
|
"]"
|
|
2745
2743
|
] })
|
|
2746
2744
|
] }),
|
|
@@ -2762,7 +2760,7 @@ const fo = async (e, t) => Re.post("/oss/upload", e, {
|
|
|
2762
2760
|
cursor: "pointer"
|
|
2763
2761
|
},
|
|
2764
2762
|
disabled: i,
|
|
2765
|
-
children:
|
|
2763
|
+
children: x("移除")
|
|
2766
2764
|
}
|
|
2767
2765
|
)
|
|
2768
2766
|
]
|
|
@@ -2906,24 +2904,24 @@ const fo = async (e, t) => Re.post("/oss/upload", e, {
|
|
|
2906
2904
|
filesError: ""
|
|
2907
2905
|
})), e.platform || (t((l) => ({
|
|
2908
2906
|
...l,
|
|
2909
|
-
platformError:
|
|
2907
|
+
platformError: x("请选择支付平台")
|
|
2910
2908
|
})), f = !1), e.transactionId.trim() || (t((l) => ({
|
|
2911
2909
|
...l,
|
|
2912
|
-
transactionIdError:
|
|
2910
|
+
transactionIdError: x("请输入转账交易ID")
|
|
2913
2911
|
})), f = !1), (!e.files || e.files.length === 0) && (t((l) => ({
|
|
2914
2912
|
...l,
|
|
2915
|
-
filesError:
|
|
2913
|
+
filesError: x("请上传转账凭证")
|
|
2916
2914
|
})), f = !1), f && (await po({
|
|
2917
2915
|
transferChannel: e.platform,
|
|
2918
2916
|
transferNo: e.transactionId,
|
|
2919
2917
|
voucherUrls: e.files
|
|
2920
|
-
}), n(), je.success(
|
|
2918
|
+
}), n(), je.success(x("离线充值创建成功")));
|
|
2921
2919
|
}, children: [
|
|
2922
2920
|
/* @__PURE__ */ m("div", { style: { marginBottom: 18 }, children: [
|
|
2923
2921
|
/* @__PURE__ */ m("div", { style: a.label, children: [
|
|
2924
2922
|
/* @__PURE__ */ m("span", { style: { color: "#F53F3F" }, children: "*" }),
|
|
2925
2923
|
" ",
|
|
2926
|
-
|
|
2924
|
+
x("第三方支付平台")
|
|
2927
2925
|
] }),
|
|
2928
2926
|
/* @__PURE__ */ m(
|
|
2929
2927
|
"select",
|
|
@@ -2942,7 +2940,7 @@ const fo = async (e, t) => Re.post("/oss/upload", e, {
|
|
|
2942
2940
|
}));
|
|
2943
2941
|
},
|
|
2944
2942
|
children: [
|
|
2945
|
-
/* @__PURE__ */ m("option", { value: "", disabled: !0, hidden: !0, children:
|
|
2943
|
+
/* @__PURE__ */ m("option", { value: "", disabled: !0, hidden: !0, children: x("请选择支付平台") }),
|
|
2946
2944
|
s?.map((u) => /* @__PURE__ */ m("option", { value: u.value, children: u.label }))
|
|
2947
2945
|
]
|
|
2948
2946
|
}
|
|
@@ -2953,13 +2951,13 @@ const fo = async (e, t) => Re.post("/oss/upload", e, {
|
|
|
2953
2951
|
/* @__PURE__ */ m("div", { style: a.label, children: [
|
|
2954
2952
|
/* @__PURE__ */ m("span", { style: { color: "#F53F3F" }, children: "*" }),
|
|
2955
2953
|
" ",
|
|
2956
|
-
|
|
2954
|
+
x("交易ID")
|
|
2957
2955
|
] }),
|
|
2958
2956
|
/* @__PURE__ */ m(
|
|
2959
2957
|
"input",
|
|
2960
2958
|
{
|
|
2961
2959
|
type: "text",
|
|
2962
|
-
placeholder:
|
|
2960
|
+
placeholder: x("请输入转账交易ID"),
|
|
2963
2961
|
value: e.transactionId,
|
|
2964
2962
|
onInput: (u) => {
|
|
2965
2963
|
const f = u.target.value;
|
|
@@ -2981,7 +2979,7 @@ const fo = async (e, t) => Re.post("/oss/upload", e, {
|
|
|
2981
2979
|
/* @__PURE__ */ m("div", { style: a.label, children: [
|
|
2982
2980
|
/* @__PURE__ */ m("span", { style: { color: "#F53F3F" }, children: "*" }),
|
|
2983
2981
|
" ",
|
|
2984
|
-
|
|
2982
|
+
x("上传文件")
|
|
2985
2983
|
] }),
|
|
2986
2984
|
/* @__PURE__ */ m(
|
|
2987
2985
|
_o,
|
|
@@ -3000,8 +2998,8 @@ const fo = async (e, t) => Re.post("/oss/upload", e, {
|
|
|
3000
2998
|
e.filesError && /* @__PURE__ */ m("div", { style: a.error, children: e.filesError })
|
|
3001
2999
|
] }),
|
|
3002
3000
|
/* @__PURE__ */ m("div", { style: { display: "flex", justifyContent: "flex-end", gap: 12 }, children: [
|
|
3003
|
-
/* @__PURE__ */ m("button", { type: "button", onClick: n, style: a.buttonCancel, children:
|
|
3004
|
-
/* @__PURE__ */ m("button", { type: "submit", disabled: r, style: a.buttonSubmit, children:
|
|
3001
|
+
/* @__PURE__ */ m("button", { type: "button", onClick: n, style: a.buttonCancel, children: x("取消") }),
|
|
3002
|
+
/* @__PURE__ */ m("button", { type: "submit", disabled: r, style: a.buttonSubmit, children: x("去支付") })
|
|
3005
3003
|
] })
|
|
3006
3004
|
] });
|
|
3007
3005
|
};
|
|
@@ -3057,9 +3055,9 @@ function bo({
|
|
|
3057
3055
|
..._,
|
|
3058
3056
|
amountError: "",
|
|
3059
3057
|
rechargeChannelError: ""
|
|
3060
|
-
})), i.amount.trim() || (s((_) => ({ ..._, amountError:
|
|
3058
|
+
})), i.amount.trim() || (s((_) => ({ ..._, amountError: x("请输入充值金额") })), g = !1), i.rechargeChannel || (s((_) => ({
|
|
3061
3059
|
..._,
|
|
3062
|
-
rechargeChannelError:
|
|
3060
|
+
rechargeChannelError: x("请选择支付平台")
|
|
3063
3061
|
})), g = !1), !!g) {
|
|
3064
3062
|
s((_) => ({ ..._, loading: !0, error: "" }));
|
|
3065
3063
|
try {
|
|
@@ -3069,7 +3067,7 @@ function bo({
|
|
|
3069
3067
|
currency: i.currency
|
|
3070
3068
|
}), t();
|
|
3071
3069
|
} catch {
|
|
3072
|
-
s((_) => ({ ..._, error:
|
|
3070
|
+
s((_) => ({ ..._, error: x("提交失败,请重试") }));
|
|
3073
3071
|
} finally {
|
|
3074
3072
|
s((_) => ({ ..._, loading: !1 }));
|
|
3075
3073
|
}
|
|
@@ -3193,11 +3191,11 @@ function bo({
|
|
|
3193
3191
|
type: "button",
|
|
3194
3192
|
onClick: t,
|
|
3195
3193
|
style: h.closeBtn,
|
|
3196
|
-
"aria-label":
|
|
3194
|
+
"aria-label": x("关闭"),
|
|
3197
3195
|
children: "×"
|
|
3198
3196
|
}
|
|
3199
3197
|
),
|
|
3200
|
-
/* @__PURE__ */ m("div", { style: h.title, children:
|
|
3198
|
+
/* @__PURE__ */ m("div", { style: h.title, children: x("充值 / 转账") }),
|
|
3201
3199
|
/* @__PURE__ */ m("div", { style: { display: "flex", marginBottom: 28 }, children: [
|
|
3202
3200
|
/* @__PURE__ */ m(
|
|
3203
3201
|
"button",
|
|
@@ -3205,7 +3203,7 @@ function bo({
|
|
|
3205
3203
|
type: "button",
|
|
3206
3204
|
onClick: () => c("online"),
|
|
3207
3205
|
style: h.tabBtn(a === "online", !0),
|
|
3208
|
-
children:
|
|
3206
|
+
children: x("在线充值")
|
|
3209
3207
|
}
|
|
3210
3208
|
),
|
|
3211
3209
|
/* @__PURE__ */ m(
|
|
@@ -3214,7 +3212,7 @@ function bo({
|
|
|
3214
3212
|
type: "button",
|
|
3215
3213
|
onClick: () => c("offline"),
|
|
3216
3214
|
style: h.tabBtn(a === "offline", !1),
|
|
3217
|
-
children:
|
|
3215
|
+
children: x("线下转账")
|
|
3218
3216
|
}
|
|
3219
3217
|
)
|
|
3220
3218
|
] }),
|
|
@@ -3327,7 +3325,7 @@ function So(e) {
|
|
|
3327
3325
|
window.open(c, "_blank");
|
|
3328
3326
|
};
|
|
3329
3327
|
return /* @__PURE__ */ m("div", { children: [
|
|
3330
|
-
/* @__PURE__ */ m(Rn, { color: i, onClick: () => n(!0), children:
|
|
3328
|
+
/* @__PURE__ */ m(Rn, { color: i, onClick: () => n(!0), children: x("充值/转账") }),
|
|
3331
3329
|
/* @__PURE__ */ m(
|
|
3332
3330
|
"button",
|
|
3333
3331
|
{
|
|
@@ -3339,7 +3337,7 @@ function So(e) {
|
|
|
3339
3337
|
cursor: "pointer"
|
|
3340
3338
|
},
|
|
3341
3339
|
onClick: () => o((a) => !a),
|
|
3342
|
-
children:
|
|
3340
|
+
children: x(r ? "切换为暗黑主题" : "切换为白色主题")
|
|
3343
3341
|
}
|
|
3344
3342
|
),
|
|
3345
3343
|
/* @__PURE__ */ m(
|
|
@@ -3479,9 +3477,9 @@ function Ro(e) {
|
|
|
3479
3477
|
currency: "USD",
|
|
3480
3478
|
symbol: "$",
|
|
3481
3479
|
details: [
|
|
3482
|
-
{ label: "", value: 0, color: "#15b36b", dot: "#15b36b" },
|
|
3483
|
-
{ label: "", value: 0, color: "#f59e0b", dot: "#f59e0b" },
|
|
3484
|
-
{ label: "", value: 0, color: "#155EEF", dot: "#15b36b" }
|
|
3480
|
+
{ label: x("真实金额"), value: 0, color: "#15b36b", dot: "#15b36b" },
|
|
3481
|
+
{ label: x("冻结金额"), value: 0, color: "#f59e0b", dot: "#f59e0b" },
|
|
3482
|
+
{ label: x("总可用"), value: 0, color: "#155EEF", dot: "#15b36b" }
|
|
3485
3483
|
]
|
|
3486
3484
|
});
|
|
3487
3485
|
return Lt(() => {
|
|
@@ -3494,19 +3492,19 @@ function Ro(e) {
|
|
|
3494
3492
|
symbol: "$",
|
|
3495
3493
|
details: [
|
|
3496
3494
|
{
|
|
3497
|
-
label:
|
|
3495
|
+
label: x("真实金额"),
|
|
3498
3496
|
value: o.totalAmount,
|
|
3499
3497
|
color: "#15b36b",
|
|
3500
3498
|
dot: "#15b36b"
|
|
3501
3499
|
},
|
|
3502
3500
|
{
|
|
3503
|
-
label:
|
|
3501
|
+
label: x("冻结金额"),
|
|
3504
3502
|
value: o.frozenAmount,
|
|
3505
3503
|
color: "#f59e0b",
|
|
3506
3504
|
dot: "#f59e0b"
|
|
3507
3505
|
},
|
|
3508
3506
|
{
|
|
3509
|
-
label:
|
|
3507
|
+
label: x("总可用"),
|
|
3510
3508
|
value: o.availableAmount,
|
|
3511
3509
|
color: "#155EEF",
|
|
3512
3510
|
dot: "#15b36b"
|
|
@@ -3532,7 +3530,7 @@ function Ro(e) {
|
|
|
3532
3530
|
marginBottom: 16,
|
|
3533
3531
|
textAlign: "center"
|
|
3534
3532
|
},
|
|
3535
|
-
children:
|
|
3533
|
+
children: x("余额详情")
|
|
3536
3534
|
}
|
|
3537
3535
|
),
|
|
3538
3536
|
t.details.map((r) => /* @__PURE__ */ m(
|
package/dist/types/global.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -17,9 +17,9 @@ function StatisticalBalance(props: { popoverPosition?: PopoverPosition }) {
|
|
|
17
17
|
currency: "USD",
|
|
18
18
|
symbol: "$",
|
|
19
19
|
details: [
|
|
20
|
-
{ label: "", value: 0, color: "#15b36b", dot: "#15b36b" },
|
|
21
|
-
{ label: "", value: 0, color: "#f59e0b", dot: "#f59e0b" },
|
|
22
|
-
{ label: "", value: 0, color: "#155EEF", dot: "#15b36b" },
|
|
20
|
+
{ label: t("真实金额"), value: 0, color: "#15b36b", dot: "#15b36b" },
|
|
21
|
+
{ label: t("冻结金额"), value: 0, color: "#f59e0b", dot: "#f59e0b" },
|
|
22
|
+
{ label: t("总可用"), value: 0, color: "#155EEF", dot: "#15b36b" },
|
|
23
23
|
],
|
|
24
24
|
});
|
|
25
25
|
|
package/src/demo/App.tsx
CHANGED
|
@@ -14,7 +14,6 @@ export default function DemoApp() {
|
|
|
14
14
|
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NTM0MTM1MjksIm1lcmNoYW50X2lkIjoxMTI4LCJ0aW1lc3RhbXAiOjE3NTMxNTQzMjl9.UAvzq0P4HCnbJR1Ga3CgF6q3vk2RHiZRvnAFohBTHpw",
|
|
15
15
|
merchant_id: "1128",
|
|
16
16
|
biz_type: "ad",
|
|
17
|
-
user_id: "123",
|
|
18
17
|
locale: locale,
|
|
19
18
|
});
|
|
20
19
|
};
|
package/src/types/global.d.ts
CHANGED
|
@@ -2,18 +2,16 @@ export function initFundUnit(params: {
|
|
|
2
2
|
token: string;
|
|
3
3
|
merchant_id: string;
|
|
4
4
|
biz_type: string;
|
|
5
|
-
user_id: string;
|
|
6
5
|
theme?: string;
|
|
7
6
|
locale?: "zh" | "en";
|
|
8
7
|
}) {
|
|
9
|
-
const { merchant_id, biz_type, theme,
|
|
8
|
+
const { merchant_id, biz_type, theme, locale = "zh" } = params;
|
|
10
9
|
const token = "Bearer " + params.token;
|
|
11
10
|
sessionStorage.setItem(
|
|
12
11
|
"fund_unit_params",
|
|
13
12
|
JSON.stringify({
|
|
14
13
|
merchantId: merchant_id,
|
|
15
14
|
bizType: biz_type,
|
|
16
|
-
userId: user_id,
|
|
17
15
|
token,
|
|
18
16
|
theme,
|
|
19
17
|
locale,
|
|
@@ -24,7 +22,6 @@ export function initFundUnit(params: {
|
|
|
24
22
|
merchantId: merchant_id,
|
|
25
23
|
bizType: biz_type,
|
|
26
24
|
theme,
|
|
27
|
-
userId: user_id,
|
|
28
25
|
locale,
|
|
29
26
|
};
|
|
30
27
|
}
|