best-unit 0.0.8 → 0.0.9
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/README.md +1 -0
- package/dist/best-unit.cjs +1 -1
- package/dist/best-unit.js +922 -491
- package/package.json +1 -1
- package/src/components/ModalForm/components/Button.tsx +7 -7
- package/src/components/ModalForm/components/OfflineTransferForm.tsx +302 -0
- package/src/components/ModalForm/components/OnlineRechargeForm.tsx +227 -0
- package/src/components/ModalForm/components/recharge.tsx +244 -0
- package/src/components/ModalForm/index.tsx +11 -8
- package/tsconfig.json +4 -1
- package/src/components/ModalForm/components/ModalForm.tsx +0 -189
package/dist/best-unit.js
CHANGED
|
@@ -1,388 +1,397 @@
|
|
|
1
|
-
function
|
|
1
|
+
function ln() {
|
|
2
2
|
console.log("npm package test!!!");
|
|
3
3
|
}
|
|
4
|
-
function
|
|
4
|
+
function _n() {
|
|
5
5
|
console.log("Current time:", (/* @__PURE__ */ new Date()).toISOString());
|
|
6
6
|
}
|
|
7
|
-
var
|
|
8
|
-
function
|
|
9
|
-
for (var
|
|
10
|
-
return
|
|
7
|
+
var H, g, me, w, le, be, xe, Ee, Z, K, Q, R = {}, ke = [], He = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, G = Array.isArray;
|
|
8
|
+
function C(e, n) {
|
|
9
|
+
for (var r in n) e[r] = n[r];
|
|
10
|
+
return e;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
|
|
12
|
+
function ee(e) {
|
|
13
|
+
e && e.parentNode && e.parentNode.removeChild(e);
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
var
|
|
17
|
-
for (
|
|
18
|
-
if (arguments.length > 2 && (
|
|
19
|
-
return
|
|
15
|
+
function S(e, n, r) {
|
|
16
|
+
var t, l, o, _ = {};
|
|
17
|
+
for (o in n) o == "key" ? t = n[o] : o == "ref" ? l = n[o] : _[o] = n[o];
|
|
18
|
+
if (arguments.length > 2 && (_.children = arguments.length > 3 ? H.call(arguments, 2) : r), typeof e == "function" && e.defaultProps != null) for (o in e.defaultProps) _[o] === void 0 && (_[o] = e.defaultProps[o]);
|
|
19
|
+
return D(e, _, t, l, null);
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
var
|
|
23
|
-
return
|
|
21
|
+
function D(e, n, r, t, l) {
|
|
22
|
+
var o = { type: e, props: n, key: r, ref: t, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: l ?? ++me, __i: -1, __u: 0 };
|
|
23
|
+
return l == null && g.vnode != null && g.vnode(o), o;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
return
|
|
25
|
+
function A(e) {
|
|
26
|
+
return e.children;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
this.props =
|
|
28
|
+
function O(e, n) {
|
|
29
|
+
this.props = e, this.context = n;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
if (
|
|
33
|
-
for (var
|
|
34
|
-
return typeof
|
|
31
|
+
function B(e, n) {
|
|
32
|
+
if (n == null) return e.__ ? B(e.__, e.__i + 1) : null;
|
|
33
|
+
for (var r; n < e.__k.length; n++) if ((r = e.__k[n]) != null && r.__e != null) return r.__e;
|
|
34
|
+
return typeof e.type == "function" ? B(e) : null;
|
|
35
35
|
}
|
|
36
|
-
function Ce(
|
|
37
|
-
var
|
|
38
|
-
if ((
|
|
39
|
-
for (
|
|
40
|
-
|
|
36
|
+
function Ce(e) {
|
|
37
|
+
var n, r;
|
|
38
|
+
if ((e = e.__) != null && e.__c != null) {
|
|
39
|
+
for (e.__e = e.__c.base = null, n = 0; n < e.__k.length; n++) if ((r = e.__k[n]) != null && r.__e != null) {
|
|
40
|
+
e.__e = e.__c.base = r.__e;
|
|
41
41
|
break;
|
|
42
42
|
}
|
|
43
|
-
return Ce(
|
|
43
|
+
return Ce(e);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
function _e(
|
|
47
|
-
(!
|
|
46
|
+
function _e(e) {
|
|
47
|
+
(!e.__d && (e.__d = !0) && w.push(e) && !W.__r++ || le != g.debounceRendering) && ((le = g.debounceRendering) || be)(W);
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
for (var
|
|
51
|
-
|
|
49
|
+
function W() {
|
|
50
|
+
for (var e, n, r, t, l, o, _, a = 1; w.length; ) w.length > a && w.sort(xe), e = w.shift(), a = w.length, e.__d && (r = void 0, l = (t = (n = e).__v).__e, o = [], _ = [], n.__P && ((r = C({}, t)).__v = t.__v + 1, g.vnode && g.vnode(r), ne(n.__P, r, t, n.__n, n.__P.namespaceURI, 32 & t.__u ? [l] : null, o, l ?? B(t), !!(32 & t.__u), _), r.__v = t.__v, r.__.__k[r.__i] = r, Se(o, r, _), r.__e != l && Ce(r)));
|
|
51
|
+
W.__r = 0;
|
|
52
52
|
}
|
|
53
|
-
function
|
|
54
|
-
var i,
|
|
55
|
-
for (
|
|
56
|
-
return
|
|
53
|
+
function Fe(e, n, r, t, l, o, _, a, f, s, p) {
|
|
54
|
+
var i, d, c, h, E, x, v = t && t.__k || ke, y = n.length;
|
|
55
|
+
for (f = Ae(r, n, v, f, y), i = 0; i < y; i++) (c = r.__k[i]) != null && (d = c.__i == -1 ? R : v[c.__i] || R, c.__i = i, x = ne(e, c, d, l, o, _, a, f, s, p), h = c.__e, c.ref && d.ref != c.ref && (d.ref && re(d.ref, null, c), p.push(c.ref, c.__c || h, c)), E == null && h != null && (E = h), 4 & c.__u || d.__k === c.__k ? f = we(c, f, e) : typeof c.type == "function" && x !== void 0 ? f = x : h && (f = h.nextSibling), c.__u &= -7);
|
|
56
|
+
return r.__e = E, f;
|
|
57
57
|
}
|
|
58
|
-
function
|
|
59
|
-
var
|
|
60
|
-
for (
|
|
61
|
-
if (i) for (
|
|
62
|
-
return
|
|
58
|
+
function Ae(e, n, r, t, l) {
|
|
59
|
+
var o, _, a, f, s, p = r.length, i = p, d = 0;
|
|
60
|
+
for (e.__k = new Array(l), o = 0; o < l; o++) (_ = n[o]) != null && typeof _ != "boolean" && typeof _ != "function" ? (f = o + d, (_ = e.__k[o] = typeof _ == "string" || typeof _ == "number" || typeof _ == "bigint" || _.constructor == String ? D(null, _, null, null, null) : G(_) ? D(A, { children: _ }, null, null, null) : _.constructor == null && _.__b > 0 ? D(_.type, _.props, _.key, _.ref ? _.ref : null, _.__v) : _).__ = e, _.__b = e.__b + 1, a = null, (s = _.__i = Ne(_, r, f, i)) != -1 && (i--, (a = r[s]) && (a.__u |= 2)), a == null || a.__v == null ? (s == -1 && (l > p ? d-- : l < p && d++), typeof _.type != "function" && (_.__u |= 4)) : s != f && (s == f - 1 ? d-- : s == f + 1 ? d++ : (s > f ? d-- : d++, _.__u |= 4))) : e.__k[o] = null;
|
|
61
|
+
if (i) for (o = 0; o < p; o++) (a = r[o]) != null && (2 & a.__u) == 0 && (a.__e == t && (t = B(a)), $e(a, a));
|
|
62
|
+
return t;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
65
|
-
var
|
|
66
|
-
if (typeof
|
|
67
|
-
for (
|
|
68
|
-
return
|
|
64
|
+
function we(e, n, r) {
|
|
65
|
+
var t, l;
|
|
66
|
+
if (typeof e.type == "function") {
|
|
67
|
+
for (t = e.__k, l = 0; t && l < t.length; l++) t[l] && (t[l].__ = e, n = we(t[l], n, r));
|
|
68
|
+
return n;
|
|
69
69
|
}
|
|
70
|
-
|
|
70
|
+
e.__e != n && (n && e.type && !r.contains(n) && (n = B(e)), r.insertBefore(e.__e, n || null), n = e.__e);
|
|
71
71
|
do
|
|
72
|
-
|
|
73
|
-
while (
|
|
74
|
-
return
|
|
72
|
+
n = n && n.nextSibling;
|
|
73
|
+
while (n != null && n.nodeType == 8);
|
|
74
|
+
return n;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
77
|
-
var
|
|
78
|
-
if (
|
|
79
|
-
if (
|
|
80
|
-
if (
|
|
81
|
-
if ((
|
|
82
|
-
|
|
76
|
+
function Ne(e, n, r, t) {
|
|
77
|
+
var l, o, _ = e.key, a = e.type, f = n[r];
|
|
78
|
+
if (f === null && e.key == null || f && _ == f.key && a == f.type && (2 & f.__u) == 0) return r;
|
|
79
|
+
if (t > (f != null && (2 & f.__u) == 0 ? 1 : 0)) for (l = r - 1, o = r + 1; l >= 0 || o < n.length; ) {
|
|
80
|
+
if (l >= 0) {
|
|
81
|
+
if ((f = n[l]) && (2 & f.__u) == 0 && _ == f.key && a == f.type) return l;
|
|
82
|
+
l--;
|
|
83
83
|
}
|
|
84
|
-
if (
|
|
85
|
-
if ((
|
|
86
|
-
|
|
84
|
+
if (o < n.length) {
|
|
85
|
+
if ((f = n[o]) && (2 & f.__u) == 0 && _ == f.key && a == f.type) return o;
|
|
86
|
+
o++;
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
return -1;
|
|
90
90
|
}
|
|
91
|
-
function
|
|
92
|
-
|
|
91
|
+
function ae(e, n, r) {
|
|
92
|
+
n[0] == "-" ? e.setProperty(n, r ?? "") : e[n] = r == null ? "" : typeof r != "number" || He.test(n) ? r : r + "px";
|
|
93
93
|
}
|
|
94
|
-
function
|
|
95
|
-
var
|
|
96
|
-
e: if (
|
|
94
|
+
function M(e, n, r, t, l) {
|
|
95
|
+
var o, _;
|
|
96
|
+
e: if (n == "style") if (typeof r == "string") e.style.cssText = r;
|
|
97
97
|
else {
|
|
98
|
-
if (typeof
|
|
99
|
-
if (
|
|
98
|
+
if (typeof t == "string" && (e.style.cssText = t = ""), t) for (n in t) r && n in r || ae(e.style, n, "");
|
|
99
|
+
if (r) for (n in r) t && r[n] == t[n] || ae(e.style, n, r[n]);
|
|
100
100
|
}
|
|
101
|
-
else if (
|
|
101
|
+
else if (n[0] == "o" && n[1] == "n") o = n != (n = n.replace(Ee, "$1")), _ = n.toLowerCase(), n = _ in e || n == "onFocusOut" || n == "onFocusIn" ? _.slice(2) : n.slice(2), e.l || (e.l = {}), e.l[n + o] = r, r ? t ? r.u = t.u : (r.u = Z, e.addEventListener(n, o ? Q : K, o)) : e.removeEventListener(n, o ? Q : K, o);
|
|
102
102
|
else {
|
|
103
|
-
if (
|
|
104
|
-
else if (
|
|
105
|
-
|
|
103
|
+
if (l == "http://www.w3.org/2000/svg") n = n.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
|
|
104
|
+
else if (n != "width" && n != "height" && n != "href" && n != "list" && n != "form" && n != "tabIndex" && n != "download" && n != "rowSpan" && n != "colSpan" && n != "role" && n != "popover" && n in e) try {
|
|
105
|
+
e[n] = r ?? "";
|
|
106
106
|
break e;
|
|
107
107
|
} catch {
|
|
108
108
|
}
|
|
109
|
-
typeof
|
|
109
|
+
typeof r == "function" || (r == null || r === !1 && n[4] != "-" ? e.removeAttribute(n) : e.setAttribute(n, n == "popover" && r == 1 ? "" : r));
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
-
function
|
|
113
|
-
return function(
|
|
112
|
+
function ce(e) {
|
|
113
|
+
return function(n) {
|
|
114
114
|
if (this.l) {
|
|
115
|
-
var
|
|
116
|
-
if (
|
|
117
|
-
else if (
|
|
118
|
-
return
|
|
115
|
+
var r = this.l[n.type + e];
|
|
116
|
+
if (n.t == null) n.t = Z++;
|
|
117
|
+
else if (n.t < r.u) return;
|
|
118
|
+
return r(g.event ? g.event(n) : n);
|
|
119
119
|
}
|
|
120
120
|
};
|
|
121
121
|
}
|
|
122
|
-
function
|
|
123
|
-
var
|
|
124
|
-
if (
|
|
125
|
-
128 &
|
|
126
|
-
e: if (typeof
|
|
127
|
-
if (
|
|
122
|
+
function ne(e, n, r, t, l, o, _, a, f, s) {
|
|
123
|
+
var p, i, d, c, h, E, x, v, y, $, F, N, z, ie, U, P, J, k = n.type;
|
|
124
|
+
if (n.constructor != null) return null;
|
|
125
|
+
128 & r.__u && (f = !!(32 & r.__u), o = [a = n.__e = r.__e]), (p = g.__b) && p(n);
|
|
126
|
+
e: if (typeof k == "function") try {
|
|
127
|
+
if (v = n.props, y = "prototype" in k && k.prototype.render, $ = (p = k.contextType) && t[p.__c], F = p ? $ ? $.props.value : p.__ : t, r.__c ? x = (i = n.__c = r.__c).__ = i.__E : (y ? n.__c = i = new k(v, F) : (n.__c = i = new O(v, F), i.constructor = k, i.render = Me), $ && $.sub(i), i.props = v, i.state || (i.state = {}), i.context = F, i.__n = t, d = i.__d = !0, i.__h = [], i._sb = []), y && i.__s == null && (i.__s = i.state), y && k.getDerivedStateFromProps != null && (i.__s == i.state && (i.__s = C({}, i.__s)), C(i.__s, k.getDerivedStateFromProps(v, i.__s))), c = i.props, h = i.state, i.__v = n, d) y && k.getDerivedStateFromProps == null && i.componentWillMount != null && i.componentWillMount(), y && i.componentDidMount != null && i.__h.push(i.componentDidMount);
|
|
128
128
|
else {
|
|
129
|
-
if (
|
|
130
|
-
for (
|
|
131
|
-
|
|
132
|
-
}),
|
|
133
|
-
i._sb = [], i.__h.length &&
|
|
129
|
+
if (y && k.getDerivedStateFromProps == null && v !== c && i.componentWillReceiveProps != null && i.componentWillReceiveProps(v, F), !i.__e && i.shouldComponentUpdate != null && i.shouldComponentUpdate(v, i.__s, F) === !1 || n.__v == r.__v) {
|
|
130
|
+
for (n.__v != r.__v && (i.props = v, i.state = i.__s, i.__d = !1), n.__e = r.__e, n.__k = r.__k, n.__k.some(function(I) {
|
|
131
|
+
I && (I.__ = n);
|
|
132
|
+
}), N = 0; N < i._sb.length; N++) i.__h.push(i._sb[N]);
|
|
133
|
+
i._sb = [], i.__h.length && _.push(i);
|
|
134
134
|
break e;
|
|
135
135
|
}
|
|
136
|
-
i.componentWillUpdate != null && i.componentWillUpdate(
|
|
137
|
-
i.componentDidUpdate(
|
|
136
|
+
i.componentWillUpdate != null && i.componentWillUpdate(v, i.__s, F), y && i.componentDidUpdate != null && i.__h.push(function() {
|
|
137
|
+
i.componentDidUpdate(c, h, E);
|
|
138
138
|
});
|
|
139
139
|
}
|
|
140
|
-
if (i.context =
|
|
141
|
-
for (i.state = i.__s, i.__d = !1,
|
|
140
|
+
if (i.context = F, i.props = v, i.__P = e, i.__e = !1, z = g.__r, ie = 0, y) {
|
|
141
|
+
for (i.state = i.__s, i.__d = !1, z && z(n), p = i.render(i.props, i.state, i.context), U = 0; U < i._sb.length; U++) i.__h.push(i._sb[U]);
|
|
142
142
|
i._sb = [];
|
|
143
143
|
} else do
|
|
144
|
-
i.__d = !1,
|
|
145
|
-
while (i.__d && ++
|
|
146
|
-
i.state = i.__s, i.getChildContext != null && (
|
|
147
|
-
} catch (
|
|
148
|
-
if (
|
|
149
|
-
for (
|
|
150
|
-
|
|
151
|
-
} else for (
|
|
152
|
-
else
|
|
153
|
-
|
|
144
|
+
i.__d = !1, z && z(n), p = i.render(i.props, i.state, i.context), i.state = i.__s;
|
|
145
|
+
while (i.__d && ++ie < 25);
|
|
146
|
+
i.state = i.__s, i.getChildContext != null && (t = C(C({}, t), i.getChildContext())), y && !d && i.getSnapshotBeforeUpdate != null && (E = i.getSnapshotBeforeUpdate(c, h)), P = p, p != null && p.type === A && p.key == null && (P = Be(p.props.children)), a = Fe(e, G(P) ? P : [P], n, r, t, l, o, _, a, f, s), i.base = n.__e, n.__u &= -161, i.__h.length && _.push(i), x && (i.__E = i.__ = null);
|
|
147
|
+
} catch (I) {
|
|
148
|
+
if (n.__v = null, f || o != null) if (I.then) {
|
|
149
|
+
for (n.__u |= f ? 160 : 128; a && a.nodeType == 8 && a.nextSibling; ) a = a.nextSibling;
|
|
150
|
+
o[o.indexOf(a)] = null, n.__e = a;
|
|
151
|
+
} else for (J = o.length; J--; ) ee(o[J]);
|
|
152
|
+
else n.__e = r.__e, n.__k = r.__k;
|
|
153
|
+
g.__e(I, n, r);
|
|
154
154
|
}
|
|
155
|
-
else
|
|
156
|
-
return (
|
|
155
|
+
else o == null && n.__v == r.__v ? (n.__k = r.__k, n.__e = r.__e) : a = n.__e = Ue(r.__e, n, r, t, l, o, _, f, s);
|
|
156
|
+
return (p = g.diffed) && p(n), 128 & n.__u ? void 0 : a;
|
|
157
157
|
}
|
|
158
|
-
function Se(
|
|
159
|
-
for (var
|
|
160
|
-
|
|
158
|
+
function Se(e, n, r) {
|
|
159
|
+
for (var t = 0; t < r.length; t++) re(r[t], r[++t], r[++t]);
|
|
160
|
+
g.__c && g.__c(n, e), e.some(function(l) {
|
|
161
161
|
try {
|
|
162
|
-
|
|
163
|
-
|
|
162
|
+
e = l.__h, l.__h = [], e.some(function(o) {
|
|
163
|
+
o.call(l);
|
|
164
164
|
});
|
|
165
|
-
} catch (
|
|
166
|
-
|
|
165
|
+
} catch (o) {
|
|
166
|
+
g.__e(o, l.__v);
|
|
167
167
|
}
|
|
168
168
|
});
|
|
169
169
|
}
|
|
170
|
-
function
|
|
171
|
-
return typeof
|
|
170
|
+
function Be(e) {
|
|
171
|
+
return typeof e != "object" || e == null || e.__b && e.__b > 0 ? e : G(e) ? e.map(Be) : C({}, e);
|
|
172
172
|
}
|
|
173
|
-
function
|
|
174
|
-
var
|
|
175
|
-
if (
|
|
176
|
-
for (
|
|
177
|
-
|
|
173
|
+
function Ue(e, n, r, t, l, o, _, a, f) {
|
|
174
|
+
var s, p, i, d, c, h, E, x = r.props, v = n.props, y = n.type;
|
|
175
|
+
if (y == "svg" ? l = "http://www.w3.org/2000/svg" : y == "math" ? l = "http://www.w3.org/1998/Math/MathML" : l || (l = "http://www.w3.org/1999/xhtml"), o != null) {
|
|
176
|
+
for (s = 0; s < o.length; s++) if ((c = o[s]) && "setAttribute" in c == !!y && (y ? c.localName == y : c.nodeType == 3)) {
|
|
177
|
+
e = c, o[s] = null;
|
|
178
178
|
break;
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
|
-
if (
|
|
182
|
-
if (
|
|
183
|
-
|
|
181
|
+
if (e == null) {
|
|
182
|
+
if (y == null) return document.createTextNode(v);
|
|
183
|
+
e = document.createElementNS(l, y, v.is && v), a && (g.__m && g.__m(n, o), a = !1), o = null;
|
|
184
184
|
}
|
|
185
|
-
if (
|
|
185
|
+
if (y == null) x === v || a && e.data == v || (e.data = v);
|
|
186
186
|
else {
|
|
187
|
-
if (
|
|
188
|
-
for (
|
|
189
|
-
if (
|
|
190
|
-
else if (!(
|
|
191
|
-
if (
|
|
192
|
-
|
|
187
|
+
if (o = o && H.call(e.childNodes), x = r.props || R, !a && o != null) for (x = {}, s = 0; s < e.attributes.length; s++) x[(c = e.attributes[s]).name] = c.value;
|
|
188
|
+
for (s in x) if (c = x[s], s != "children") {
|
|
189
|
+
if (s == "dangerouslySetInnerHTML") i = c;
|
|
190
|
+
else if (!(s in v)) {
|
|
191
|
+
if (s == "value" && "defaultValue" in v || s == "checked" && "defaultChecked" in v) continue;
|
|
192
|
+
M(e, s, null, c, l);
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
|
-
for (
|
|
196
|
-
if (
|
|
197
|
-
else if (i && (
|
|
198
|
-
a || (
|
|
195
|
+
for (s in v) c = v[s], s == "children" ? d = c : s == "dangerouslySetInnerHTML" ? p = c : s == "value" ? h = c : s == "checked" ? E = c : a && typeof c != "function" || x[s] === c || M(e, s, c, x[s], l);
|
|
196
|
+
if (p) a || i && (p.__html == i.__html || p.__html == e.innerHTML) || (e.innerHTML = p.__html), n.__k = [];
|
|
197
|
+
else if (i && (e.innerHTML = ""), Fe(n.type == "template" ? e.content : e, G(d) ? d : [d], n, r, t, y == "foreignObject" ? "http://www.w3.org/1999/xhtml" : l, o, _, o ? o[0] : r.__k && B(r, 0), a, f), o != null) for (s = o.length; s--; ) ee(o[s]);
|
|
198
|
+
a || (s = "value", y == "progress" && h == null ? e.removeAttribute("value") : h != null && (h !== e[s] || y == "progress" && !h || y == "option" && h != x[s]) && M(e, s, h, x[s], l), s = "checked", E != null && E != e[s] && M(e, s, E, x[s], l));
|
|
199
199
|
}
|
|
200
|
-
return
|
|
200
|
+
return e;
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function re(e, n, r) {
|
|
203
203
|
try {
|
|
204
|
-
if (typeof
|
|
205
|
-
var
|
|
206
|
-
|
|
207
|
-
} else
|
|
208
|
-
} catch (
|
|
209
|
-
|
|
204
|
+
if (typeof e == "function") {
|
|
205
|
+
var t = typeof e.__u == "function";
|
|
206
|
+
t && e.__u(), t && n == null || (e.__u = e(n));
|
|
207
|
+
} else e.current = n;
|
|
208
|
+
} catch (l) {
|
|
209
|
+
g.__e(l, r);
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
|
-
function $e(
|
|
213
|
-
var
|
|
214
|
-
if (
|
|
215
|
-
if (
|
|
216
|
-
|
|
217
|
-
} catch (
|
|
218
|
-
|
|
212
|
+
function $e(e, n, r) {
|
|
213
|
+
var t, l;
|
|
214
|
+
if (g.unmount && g.unmount(e), (t = e.ref) && (t.current && t.current != e.__e || re(t, null, n)), (t = e.__c) != null) {
|
|
215
|
+
if (t.componentWillUnmount) try {
|
|
216
|
+
t.componentWillUnmount();
|
|
217
|
+
} catch (o) {
|
|
218
|
+
g.__e(o, n);
|
|
219
219
|
}
|
|
220
|
-
|
|
220
|
+
t.base = t.__P = null;
|
|
221
221
|
}
|
|
222
|
-
if (
|
|
223
|
-
|
|
222
|
+
if (t = e.__k) for (l = 0; l < t.length; l++) t[l] && $e(t[l], n, r || typeof e.type != "function");
|
|
223
|
+
r || ee(e.__e), e.__c = e.__ = e.__e = void 0;
|
|
224
224
|
}
|
|
225
|
-
function
|
|
226
|
-
return this.constructor(
|
|
225
|
+
function Me(e, n, r) {
|
|
226
|
+
return this.constructor(e, r);
|
|
227
227
|
}
|
|
228
|
-
function
|
|
229
|
-
var
|
|
230
|
-
|
|
228
|
+
function V(e, n, r) {
|
|
229
|
+
var t, l, o, _;
|
|
230
|
+
n == document && (n = document.documentElement), g.__ && g.__(e, n), l = (t = typeof r == "function") ? null : r && r.__k || n.__k, o = [], _ = [], ne(n, e = (!t && r || n).__k = S(A, null, [e]), l || R, R, n.namespaceURI, !t && r ? [r] : l ? null : n.firstChild ? H.call(n.childNodes) : null, o, !t && r ? r : l ? l.__e : n.firstChild, t, _), Se(o, e, _);
|
|
231
231
|
}
|
|
232
|
-
function
|
|
233
|
-
|
|
232
|
+
function ze(e, n) {
|
|
233
|
+
V(e, n, ze);
|
|
234
234
|
}
|
|
235
|
-
function
|
|
236
|
-
var
|
|
237
|
-
for (
|
|
238
|
-
return arguments.length > 2 && (a.children = arguments.length > 3 ?
|
|
235
|
+
function Pe(e, n, r) {
|
|
236
|
+
var t, l, o, _, a = C({}, e.props);
|
|
237
|
+
for (o in e.type && e.type.defaultProps && (_ = e.type.defaultProps), n) o == "key" ? t = n[o] : o == "ref" ? l = n[o] : a[o] = n[o] === void 0 && _ != null ? _[o] : n[o];
|
|
238
|
+
return arguments.length > 2 && (a.children = arguments.length > 3 ? H.call(arguments, 2) : r), D(e.type, a, t || e.key, l || e.ref, null);
|
|
239
239
|
}
|
|
240
|
-
|
|
241
|
-
for (var
|
|
242
|
-
if ((
|
|
240
|
+
H = ke.slice, g = { __e: function(e, n, r, t) {
|
|
241
|
+
for (var l, o, _; n = n.__; ) if ((l = n.__c) && !l.__) try {
|
|
242
|
+
if ((o = l.constructor) && o.getDerivedStateFromError != null && (l.setState(o.getDerivedStateFromError(e)), _ = l.__d), l.componentDidCatch != null && (l.componentDidCatch(e, t || {}), _ = l.__d), _) return l.__E = l;
|
|
243
243
|
} catch (a) {
|
|
244
|
-
|
|
244
|
+
e = a;
|
|
245
245
|
}
|
|
246
|
-
throw
|
|
247
|
-
} },
|
|
248
|
-
var
|
|
249
|
-
|
|
250
|
-
},
|
|
251
|
-
this.__v && (this.__e = !0,
|
|
252
|
-
},
|
|
253
|
-
return
|
|
254
|
-
},
|
|
255
|
-
var
|
|
256
|
-
function
|
|
257
|
-
|
|
258
|
-
var
|
|
259
|
-
if ("ref" in
|
|
260
|
-
var
|
|
261
|
-
if (typeof
|
|
262
|
-
return
|
|
263
|
-
}
|
|
264
|
-
var
|
|
265
|
-
function
|
|
266
|
-
|
|
267
|
-
var
|
|
268
|
-
return
|
|
269
|
-
}
|
|
270
|
-
function
|
|
271
|
-
return
|
|
272
|
-
}
|
|
273
|
-
function je(
|
|
274
|
-
var
|
|
275
|
-
if (
|
|
276
|
-
var
|
|
277
|
-
|
|
278
|
-
}],
|
|
279
|
-
var
|
|
280
|
-
if (!
|
|
281
|
-
var
|
|
282
|
-
return !!
|
|
246
|
+
throw e;
|
|
247
|
+
} }, me = 0, O.prototype.setState = function(e, n) {
|
|
248
|
+
var r;
|
|
249
|
+
r = this.__s != null && this.__s != this.state ? this.__s : this.__s = C({}, this.state), typeof e == "function" && (e = e(C({}, r), this.props)), e && C(r, e), e != null && this.__v && (n && this._sb.push(n), _e(this));
|
|
250
|
+
}, O.prototype.forceUpdate = function(e) {
|
|
251
|
+
this.__v && (this.__e = !0, e && this.__h.push(e), _e(this));
|
|
252
|
+
}, O.prototype.render = A, w = [], be = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, xe = function(e, n) {
|
|
253
|
+
return e.__v.__b - n.__v.__b;
|
|
254
|
+
}, W.__r = 0, Ee = /(PointerCapture)$|Capture$/i, Z = 0, K = ce(!1), Q = ce(!0);
|
|
255
|
+
var Oe = 0;
|
|
256
|
+
function u(e, n, r, t, l, o) {
|
|
257
|
+
n || (n = {});
|
|
258
|
+
var _, a, f = n;
|
|
259
|
+
if ("ref" in f) for (a in f = {}, n) a == "ref" ? _ = n[a] : f[a] = n[a];
|
|
260
|
+
var s = { type: e, props: f, key: r, ref: _, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --Oe, __i: -1, __u: 0, __source: l, __self: o };
|
|
261
|
+
if (typeof e == "function" && (_ = e.defaultProps)) for (a in _) f[a] === void 0 && (f[a] = _[a]);
|
|
262
|
+
return g.vnode && g.vnode(s), s;
|
|
263
|
+
}
|
|
264
|
+
var T, m, Y, se, q = 0, Ie = [], b = g, ue = b.__b, fe = b.__r, de = b.diffed, pe = b.__c, he = b.unmount, ge = b.__;
|
|
265
|
+
function te(e, n) {
|
|
266
|
+
b.__h && b.__h(m, e, q || n), q = 0;
|
|
267
|
+
var r = m.__H || (m.__H = { __: [], __h: [] });
|
|
268
|
+
return e >= r.__.length && r.__.push({}), r.__[e];
|
|
269
|
+
}
|
|
270
|
+
function j(e) {
|
|
271
|
+
return q = 1, je(Re, e);
|
|
272
|
+
}
|
|
273
|
+
function je(e, n, r) {
|
|
274
|
+
var t = te(T++, 2);
|
|
275
|
+
if (t.t = e, !t.__c && (t.__ = [Re(void 0, n), function(a) {
|
|
276
|
+
var f = t.__N ? t.__N[0] : t.__[0], s = t.t(f, a);
|
|
277
|
+
f !== s && (t.__N = [s, t.__[1]], t.__c.setState({}));
|
|
278
|
+
}], t.__c = m, !m.__f)) {
|
|
279
|
+
var l = function(a, f, s) {
|
|
280
|
+
if (!t.__c.__H) return !0;
|
|
281
|
+
var p = t.__c.__H.__.filter(function(d) {
|
|
282
|
+
return !!d.__c;
|
|
283
283
|
});
|
|
284
|
-
if (
|
|
285
|
-
return !
|
|
286
|
-
})) return !
|
|
287
|
-
var i =
|
|
288
|
-
return
|
|
289
|
-
if (
|
|
290
|
-
var
|
|
291
|
-
|
|
284
|
+
if (p.every(function(d) {
|
|
285
|
+
return !d.__N;
|
|
286
|
+
})) return !o || o.call(this, a, f, s);
|
|
287
|
+
var i = t.__c.props !== a;
|
|
288
|
+
return p.forEach(function(d) {
|
|
289
|
+
if (d.__N) {
|
|
290
|
+
var c = d.__[0];
|
|
291
|
+
d.__ = d.__N, d.__N = void 0, c !== d.__[0] && (i = !0);
|
|
292
292
|
}
|
|
293
|
-
}),
|
|
293
|
+
}), o && o.call(this, a, f, s) || i;
|
|
294
294
|
};
|
|
295
|
-
|
|
296
|
-
var
|
|
297
|
-
|
|
295
|
+
m.__f = !0;
|
|
296
|
+
var o = m.shouldComponentUpdate, _ = m.componentWillUpdate;
|
|
297
|
+
m.componentWillUpdate = function(a, f, s) {
|
|
298
298
|
if (this.__e) {
|
|
299
|
-
var
|
|
300
|
-
|
|
299
|
+
var p = o;
|
|
300
|
+
o = void 0, l(a, f, s), o = p;
|
|
301
301
|
}
|
|
302
|
-
|
|
303
|
-
},
|
|
302
|
+
_ && _.call(this, a, f, s);
|
|
303
|
+
}, m.shouldComponentUpdate = l;
|
|
304
304
|
}
|
|
305
|
-
return
|
|
305
|
+
return t.__N || t.__;
|
|
306
|
+
}
|
|
307
|
+
function Le(e, n) {
|
|
308
|
+
var r = te(T++, 3);
|
|
309
|
+
!b.__s && De(r.__H, n) && (r.__ = e, r.u = n, m.__H.__h.push(r));
|
|
306
310
|
}
|
|
307
|
-
function
|
|
308
|
-
|
|
309
|
-
|
|
311
|
+
function We(e) {
|
|
312
|
+
return q = 5, qe(function() {
|
|
313
|
+
return { current: e };
|
|
314
|
+
}, []);
|
|
310
315
|
}
|
|
311
|
-
function
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
+
function qe(e, n) {
|
|
317
|
+
var r = te(T++, 7);
|
|
318
|
+
return De(r.__H, n) && (r.__ = e(), r.__H = n, r.__h = e), r.__;
|
|
319
|
+
}
|
|
320
|
+
function Ge() {
|
|
321
|
+
for (var e; e = Ie.shift(); ) if (e.__P && e.__H) try {
|
|
322
|
+
e.__H.__h.forEach(L), e.__H.__h.forEach(X), e.__H.__h = [];
|
|
323
|
+
} catch (n) {
|
|
324
|
+
e.__H.__h = [], b.__e(n, e.__v);
|
|
316
325
|
}
|
|
317
326
|
}
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
},
|
|
321
|
-
|
|
322
|
-
},
|
|
323
|
-
|
|
324
|
-
var
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
})) : (
|
|
328
|
-
},
|
|
329
|
-
|
|
330
|
-
var
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
})), Y =
|
|
334
|
-
},
|
|
335
|
-
|
|
327
|
+
b.__b = function(e) {
|
|
328
|
+
m = null, ue && ue(e);
|
|
329
|
+
}, b.__ = function(e, n) {
|
|
330
|
+
e && n.__k && n.__k.__m && (e.__m = n.__k.__m), ge && ge(e, n);
|
|
331
|
+
}, b.__r = function(e) {
|
|
332
|
+
fe && fe(e), T = 0;
|
|
333
|
+
var n = (m = e.__c).__H;
|
|
334
|
+
n && (Y === m ? (n.__h = [], m.__h = [], n.__.forEach(function(r) {
|
|
335
|
+
r.__N && (r.__ = r.__N), r.u = r.__N = void 0;
|
|
336
|
+
})) : (n.__h.forEach(L), n.__h.forEach(X), n.__h = [], T = 0)), Y = m;
|
|
337
|
+
}, b.diffed = function(e) {
|
|
338
|
+
de && de(e);
|
|
339
|
+
var n = e.__c;
|
|
340
|
+
n && n.__H && (n.__H.__h.length && (Ie.push(n) !== 1 && se === b.requestAnimationFrame || ((se = b.requestAnimationFrame) || Ve)(Ge)), n.__H.__.forEach(function(r) {
|
|
341
|
+
r.u && (r.__H = r.u), r.u = void 0;
|
|
342
|
+
})), Y = m = null;
|
|
343
|
+
}, b.__c = function(e, n) {
|
|
344
|
+
n.some(function(r) {
|
|
336
345
|
try {
|
|
337
|
-
|
|
338
|
-
return !
|
|
346
|
+
r.__h.forEach(L), r.__h = r.__h.filter(function(t) {
|
|
347
|
+
return !t.__ || X(t);
|
|
339
348
|
});
|
|
340
|
-
} catch (
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
}),
|
|
349
|
+
} catch (t) {
|
|
350
|
+
n.some(function(l) {
|
|
351
|
+
l.__h && (l.__h = []);
|
|
352
|
+
}), n = [], b.__e(t, r.__v);
|
|
344
353
|
}
|
|
345
|
-
}),
|
|
346
|
-
},
|
|
347
|
-
|
|
348
|
-
var
|
|
349
|
-
|
|
354
|
+
}), pe && pe(e, n);
|
|
355
|
+
}, b.unmount = function(e) {
|
|
356
|
+
he && he(e);
|
|
357
|
+
var n, r = e.__c;
|
|
358
|
+
r && r.__H && (r.__H.__.forEach(function(t) {
|
|
350
359
|
try {
|
|
351
|
-
|
|
352
|
-
} catch (
|
|
353
|
-
|
|
360
|
+
L(t);
|
|
361
|
+
} catch (l) {
|
|
362
|
+
n = l;
|
|
354
363
|
}
|
|
355
|
-
}),
|
|
364
|
+
}), r.__H = void 0, n && b.__e(n, r.__v));
|
|
356
365
|
};
|
|
357
|
-
var
|
|
358
|
-
function
|
|
359
|
-
var
|
|
360
|
-
clearTimeout(
|
|
361
|
-
},
|
|
362
|
-
|
|
363
|
-
}
|
|
364
|
-
function
|
|
365
|
-
var
|
|
366
|
-
typeof
|
|
367
|
-
}
|
|
368
|
-
function
|
|
369
|
-
var
|
|
370
|
-
|
|
371
|
-
}
|
|
372
|
-
function
|
|
373
|
-
return !
|
|
374
|
-
return
|
|
366
|
+
var ve = typeof requestAnimationFrame == "function";
|
|
367
|
+
function Ve(e) {
|
|
368
|
+
var n, r = function() {
|
|
369
|
+
clearTimeout(t), ve && cancelAnimationFrame(n), setTimeout(e);
|
|
370
|
+
}, t = setTimeout(r, 35);
|
|
371
|
+
ve && (n = requestAnimationFrame(r));
|
|
372
|
+
}
|
|
373
|
+
function L(e) {
|
|
374
|
+
var n = m, r = e.__c;
|
|
375
|
+
typeof r == "function" && (e.__c = void 0, r()), m = n;
|
|
376
|
+
}
|
|
377
|
+
function X(e) {
|
|
378
|
+
var n = m;
|
|
379
|
+
e.__c = e.__(), m = n;
|
|
380
|
+
}
|
|
381
|
+
function De(e, n) {
|
|
382
|
+
return !e || e.length !== n.length || n.some(function(r, t) {
|
|
383
|
+
return r !== e[t];
|
|
375
384
|
});
|
|
376
385
|
}
|
|
377
|
-
function
|
|
378
|
-
return typeof
|
|
386
|
+
function Re(e, n) {
|
|
387
|
+
return typeof n == "function" ? n(e) : n;
|
|
379
388
|
}
|
|
380
|
-
function
|
|
381
|
-
return /* @__PURE__ */
|
|
389
|
+
function Je({ onClick: e, color: n, children: r }) {
|
|
390
|
+
return /* @__PURE__ */ u(
|
|
382
391
|
"button",
|
|
383
392
|
{
|
|
384
393
|
style: {
|
|
385
|
-
background:
|
|
394
|
+
background: n || "#1890ff",
|
|
386
395
|
color: "#fff",
|
|
387
396
|
border: "none",
|
|
388
397
|
borderRadius: 4,
|
|
@@ -390,13 +399,443 @@ function Ve({ onClick: t, color: e, children: n }) {
|
|
|
390
399
|
cursor: "pointer",
|
|
391
400
|
fontSize: 16
|
|
392
401
|
},
|
|
393
|
-
onClick:
|
|
394
|
-
children:
|
|
402
|
+
onClick: e,
|
|
403
|
+
children: r
|
|
395
404
|
}
|
|
396
405
|
);
|
|
397
406
|
}
|
|
398
|
-
|
|
399
|
-
const
|
|
407
|
+
const Ye = ({ formState: e, setFormState: n, onClose: r, loading: t, whiteTheme: l = !1 }) => {
|
|
408
|
+
const o = l ? {
|
|
409
|
+
width: "100%",
|
|
410
|
+
padding: "10px 12px",
|
|
411
|
+
borderRadius: 6,
|
|
412
|
+
boxSizing: "border-box",
|
|
413
|
+
border: e.amountError ? "1px solid #ff4d4f" : "1px solid #E5E6EB",
|
|
414
|
+
background: "#fff",
|
|
415
|
+
color: "#222",
|
|
416
|
+
fontSize: 15,
|
|
417
|
+
outline: "none",
|
|
418
|
+
marginBottom: 0
|
|
419
|
+
} : {
|
|
420
|
+
width: "100%",
|
|
421
|
+
padding: "10px 12px",
|
|
422
|
+
borderRadius: 6,
|
|
423
|
+
boxSizing: "border-box",
|
|
424
|
+
border: e.amountError ? "1px solid #ff4d4f" : "1px solid #23262F",
|
|
425
|
+
background: "#23262F",
|
|
426
|
+
color: "#fff",
|
|
427
|
+
fontSize: 15,
|
|
428
|
+
outline: "none",
|
|
429
|
+
marginBottom: 0
|
|
430
|
+
}, _ = l ? {
|
|
431
|
+
width: "100%",
|
|
432
|
+
padding: "10px 12px",
|
|
433
|
+
borderRadius: 6,
|
|
434
|
+
border: e.rechargeChannelError ? "1px solid #ff4d4f" : "1px solid #E5E6EB",
|
|
435
|
+
background: "#fff",
|
|
436
|
+
color: "#222",
|
|
437
|
+
fontSize: 15,
|
|
438
|
+
outline: "none"
|
|
439
|
+
} : {
|
|
440
|
+
width: "100%",
|
|
441
|
+
padding: "10px 12px",
|
|
442
|
+
borderRadius: 6,
|
|
443
|
+
border: e.rechargeChannelError ? "1px solid #ff4d4f" : "1px solid #23262F",
|
|
444
|
+
background: "#23262F",
|
|
445
|
+
color: "#fff",
|
|
446
|
+
fontSize: 15,
|
|
447
|
+
outline: "none"
|
|
448
|
+
}, a = l ? {
|
|
449
|
+
width: "100%",
|
|
450
|
+
padding: "10px 12px",
|
|
451
|
+
borderRadius: 6,
|
|
452
|
+
border: "1px solid #E5E6EB",
|
|
453
|
+
background: "#fff",
|
|
454
|
+
color: "#222",
|
|
455
|
+
fontSize: 15,
|
|
456
|
+
outline: "none"
|
|
457
|
+
} : {
|
|
458
|
+
width: "100%",
|
|
459
|
+
padding: "10px 12px",
|
|
460
|
+
borderRadius: 6,
|
|
461
|
+
border: "1px solid #23262F",
|
|
462
|
+
background: "#23262F",
|
|
463
|
+
color: "#fff",
|
|
464
|
+
fontSize: 15,
|
|
465
|
+
outline: "none"
|
|
466
|
+
}, f = l ? { marginBottom: 8, fontSize: 14, color: "#222" } : { marginBottom: 8, fontSize: 14 }, s = { color: "#ff4d4f", fontSize: 13, marginTop: 4 }, p = l ? {
|
|
467
|
+
background: "#fff",
|
|
468
|
+
color: "#222",
|
|
469
|
+
border: "1px solid #E5E6EB",
|
|
470
|
+
borderRadius: 6,
|
|
471
|
+
padding: "8px 24px",
|
|
472
|
+
fontSize: 15,
|
|
473
|
+
cursor: "pointer"
|
|
474
|
+
} : {
|
|
475
|
+
background: "#23262F",
|
|
476
|
+
color: "#fff",
|
|
477
|
+
border: "none",
|
|
478
|
+
borderRadius: 6,
|
|
479
|
+
padding: "8px 24px",
|
|
480
|
+
fontSize: 15,
|
|
481
|
+
cursor: "pointer"
|
|
482
|
+
}, i = l ? {
|
|
483
|
+
background: "#155EEF",
|
|
484
|
+
color: "#fff",
|
|
485
|
+
border: "none",
|
|
486
|
+
borderRadius: 6,
|
|
487
|
+
padding: "8px 24px",
|
|
488
|
+
fontSize: 15,
|
|
489
|
+
cursor: "pointer",
|
|
490
|
+
fontWeight: 600
|
|
491
|
+
} : {
|
|
492
|
+
background: "#00E8C6",
|
|
493
|
+
color: "#fff",
|
|
494
|
+
border: "none",
|
|
495
|
+
borderRadius: 6,
|
|
496
|
+
padding: "8px 24px",
|
|
497
|
+
fontSize: 15,
|
|
498
|
+
cursor: "pointer",
|
|
499
|
+
fontWeight: 600
|
|
500
|
+
};
|
|
501
|
+
return /* @__PURE__ */ u(A, { children: [
|
|
502
|
+
/* @__PURE__ */ u("div", { style: { marginBottom: 18 }, children: [
|
|
503
|
+
/* @__PURE__ */ u("div", { style: f, children: [
|
|
504
|
+
/* @__PURE__ */ u("span", { style: { color: "#F53F3F" }, children: "*" }),
|
|
505
|
+
" 充值币种"
|
|
506
|
+
] }),
|
|
507
|
+
/* @__PURE__ */ u(
|
|
508
|
+
"select",
|
|
509
|
+
{
|
|
510
|
+
style: a,
|
|
511
|
+
value: e.currency,
|
|
512
|
+
onInput: (d) => {
|
|
513
|
+
const c = d.target.value;
|
|
514
|
+
n((h) => ({
|
|
515
|
+
...h,
|
|
516
|
+
currency: c
|
|
517
|
+
}));
|
|
518
|
+
},
|
|
519
|
+
children: [
|
|
520
|
+
/* @__PURE__ */ u("option", { value: "USD", children: "USD - 美元" }),
|
|
521
|
+
/* @__PURE__ */ u("option", { value: "CNY", children: "CNY - 人民币" }),
|
|
522
|
+
/* @__PURE__ */ u("option", { value: "EUR", children: "EUR - 欧元" })
|
|
523
|
+
]
|
|
524
|
+
}
|
|
525
|
+
)
|
|
526
|
+
] }),
|
|
527
|
+
/* @__PURE__ */ u("div", { style: { marginBottom: 18 }, children: [
|
|
528
|
+
/* @__PURE__ */ u("div", { style: f, children: [
|
|
529
|
+
/* @__PURE__ */ u("span", { style: { color: "#F53F3F" }, children: "*" }),
|
|
530
|
+
" 充值金额"
|
|
531
|
+
] }),
|
|
532
|
+
/* @__PURE__ */ u(
|
|
533
|
+
"input",
|
|
534
|
+
{
|
|
535
|
+
type: "text",
|
|
536
|
+
placeholder: "请输入充值金额",
|
|
537
|
+
value: e.amount,
|
|
538
|
+
onInput: (d) => {
|
|
539
|
+
const c = d.target.value;
|
|
540
|
+
n((h) => ({
|
|
541
|
+
...h,
|
|
542
|
+
amount: c,
|
|
543
|
+
amountError: c.trim() ? "" : h.amountError
|
|
544
|
+
}));
|
|
545
|
+
},
|
|
546
|
+
style: o
|
|
547
|
+
}
|
|
548
|
+
),
|
|
549
|
+
e.amountError && /* @__PURE__ */ u("div", { style: s, children: e.amountError })
|
|
550
|
+
] }),
|
|
551
|
+
/* @__PURE__ */ u("div", { style: { marginBottom: 24 }, children: [
|
|
552
|
+
/* @__PURE__ */ u("div", { style: f, children: [
|
|
553
|
+
/* @__PURE__ */ u("span", { style: { color: "#F53F3F" }, children: "*" }),
|
|
554
|
+
" 支付平台"
|
|
555
|
+
] }),
|
|
556
|
+
/* @__PURE__ */ u(
|
|
557
|
+
"select",
|
|
558
|
+
{
|
|
559
|
+
style: _,
|
|
560
|
+
value: e.rechargeChannel,
|
|
561
|
+
onInput: (d) => {
|
|
562
|
+
const c = d.target.value;
|
|
563
|
+
n((h) => ({
|
|
564
|
+
...h,
|
|
565
|
+
rechargeChannel: c,
|
|
566
|
+
rechargeChannelError: c ? "" : h.rechargeChannelError
|
|
567
|
+
}));
|
|
568
|
+
},
|
|
569
|
+
children: [
|
|
570
|
+
/* @__PURE__ */ u("option", { value: "alipay", children: "支付宝" }),
|
|
571
|
+
/* @__PURE__ */ u("option", { value: "wechat", children: "微信" }),
|
|
572
|
+
/* @__PURE__ */ u("option", { value: "paypal", children: "PayPal" })
|
|
573
|
+
]
|
|
574
|
+
}
|
|
575
|
+
),
|
|
576
|
+
e.rechargeChannelError && /* @__PURE__ */ u("div", { style: s, children: e.rechargeChannelError })
|
|
577
|
+
] }),
|
|
578
|
+
e.error && /* @__PURE__ */ u("div", { style: { color: "#ff4d4f", marginBottom: 12 }, children: e.error }),
|
|
579
|
+
/* @__PURE__ */ u("div", { style: { display: "flex", justifyContent: "flex-end", gap: 12 }, children: [
|
|
580
|
+
/* @__PURE__ */ u("button", { type: "button", onClick: r, style: p, children: "取消" }),
|
|
581
|
+
/* @__PURE__ */ u("button", { type: "submit", disabled: t, style: i, children: t ? "提交中..." : "去支付" })
|
|
582
|
+
] })
|
|
583
|
+
] });
|
|
584
|
+
}, Ke = ({ formState: e, setFormState: n, onClose: r, loading: t }) => {
|
|
585
|
+
const l = We(null), o = (i) => {
|
|
586
|
+
const d = Array.from(i.target.files).slice(0, 10);
|
|
587
|
+
n((c) => ({ ...c, files: d, filesError: "" }));
|
|
588
|
+
}, _ = (i) => {
|
|
589
|
+
i.preventDefault();
|
|
590
|
+
const d = Array.from(i.dataTransfer.files).slice(0, 10);
|
|
591
|
+
n((c) => ({ ...c, files: d, filesError: "" }));
|
|
592
|
+
}, a = (i) => {
|
|
593
|
+
i.preventDefault();
|
|
594
|
+
}, f = (i) => {
|
|
595
|
+
n((d) => ({
|
|
596
|
+
...d,
|
|
597
|
+
files: d.files.filter((c, h) => h !== i)
|
|
598
|
+
}));
|
|
599
|
+
}, s = (i) => {
|
|
600
|
+
i.preventDefault();
|
|
601
|
+
let d = !0;
|
|
602
|
+
n((c) => ({
|
|
603
|
+
...c,
|
|
604
|
+
platformError: "",
|
|
605
|
+
transactionIdError: "",
|
|
606
|
+
filesError: ""
|
|
607
|
+
})), e.platform || (n((c) => ({
|
|
608
|
+
...c,
|
|
609
|
+
platformError: "请选择支付平台"
|
|
610
|
+
})), d = !1), e.transactionId.trim() || (n((c) => ({
|
|
611
|
+
...c,
|
|
612
|
+
transactionIdError: "请输入转账交易ID"
|
|
613
|
+
})), d = !1), (!e.files || e.files.length === 0) && (n((c) => ({
|
|
614
|
+
...c,
|
|
615
|
+
filesError: "请上传转账凭证"
|
|
616
|
+
})), d = !1), d && console.log("OfflineTransferForm values:", e);
|
|
617
|
+
}, p = (i) => i > 1024 * 1024 ? (i / 1024 / 1024).toFixed(2) + " MB" : i > 1024 ? (i / 1024).toFixed(2) + " KB" : i + " B";
|
|
618
|
+
return /* @__PURE__ */ u("form", { onSubmit: s, children: [
|
|
619
|
+
/* @__PURE__ */ u("div", { style: { marginBottom: 18 }, children: [
|
|
620
|
+
/* @__PURE__ */ u("div", { style: { marginBottom: 8, fontSize: 14, color: "#222" }, children: [
|
|
621
|
+
/* @__PURE__ */ u("span", { style: { color: "#F53F3F" }, children: "*" }),
|
|
622
|
+
" 第三方支付平台"
|
|
623
|
+
] }),
|
|
624
|
+
/* @__PURE__ */ u(
|
|
625
|
+
"select",
|
|
626
|
+
{
|
|
627
|
+
style: {
|
|
628
|
+
width: "100%",
|
|
629
|
+
padding: "10px 12px",
|
|
630
|
+
borderRadius: 6,
|
|
631
|
+
border: e.platformError ? "1px solid #ff4d4f" : "1px solid #E5E6EB",
|
|
632
|
+
background: "#fff",
|
|
633
|
+
color: "#222",
|
|
634
|
+
fontSize: 15,
|
|
635
|
+
outline: "none"
|
|
636
|
+
},
|
|
637
|
+
value: e.platform,
|
|
638
|
+
onInput: (i) => {
|
|
639
|
+
const d = i.target.value;
|
|
640
|
+
n((c) => ({
|
|
641
|
+
...c,
|
|
642
|
+
platform: d,
|
|
643
|
+
platformError: d ? "" : c.platformError
|
|
644
|
+
}));
|
|
645
|
+
},
|
|
646
|
+
children: [
|
|
647
|
+
/* @__PURE__ */ u("option", { value: "paypal", children: "PayPal" }),
|
|
648
|
+
/* @__PURE__ */ u("option", { value: "alipay", children: "支付宝" }),
|
|
649
|
+
/* @__PURE__ */ u("option", { value: "wechat", children: "微信" })
|
|
650
|
+
]
|
|
651
|
+
}
|
|
652
|
+
),
|
|
653
|
+
e.platformError && /* @__PURE__ */ u("div", { style: { color: "#ff4d4f", fontSize: 13, marginTop: 4 }, children: e.platformError })
|
|
654
|
+
] }),
|
|
655
|
+
/* @__PURE__ */ u("div", { style: { marginBottom: 18 }, children: [
|
|
656
|
+
/* @__PURE__ */ u("div", { style: { marginBottom: 8, fontSize: 14, color: "#222" }, children: [
|
|
657
|
+
/* @__PURE__ */ u("span", { style: { color: "#F53F3F" }, children: "*" }),
|
|
658
|
+
" 交易ID"
|
|
659
|
+
] }),
|
|
660
|
+
/* @__PURE__ */ u(
|
|
661
|
+
"input",
|
|
662
|
+
{
|
|
663
|
+
type: "text",
|
|
664
|
+
placeholder: "请输入转账交易ID",
|
|
665
|
+
value: e.transactionId,
|
|
666
|
+
onInput: (i) => {
|
|
667
|
+
const d = i.target.value;
|
|
668
|
+
n((c) => ({
|
|
669
|
+
...c,
|
|
670
|
+
transactionId: d,
|
|
671
|
+
transactionIdError: d ? "" : c.transactionIdError
|
|
672
|
+
}));
|
|
673
|
+
},
|
|
674
|
+
style: {
|
|
675
|
+
width: "100%",
|
|
676
|
+
padding: "10px 12px",
|
|
677
|
+
borderRadius: 6,
|
|
678
|
+
boxSizing: "border-box",
|
|
679
|
+
border: e.transactionIdError ? "1px solid #ff4d4f" : "1px solid #E5E6EB",
|
|
680
|
+
background: "#fff",
|
|
681
|
+
color: "#222",
|
|
682
|
+
fontSize: 15,
|
|
683
|
+
outline: "none",
|
|
684
|
+
marginBottom: 0
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
),
|
|
688
|
+
e.transactionIdError && /* @__PURE__ */ u("div", { style: { color: "#ff4d4f", fontSize: 13, marginTop: 4 }, children: e.transactionIdError })
|
|
689
|
+
] }),
|
|
690
|
+
/* @__PURE__ */ u("div", { style: { marginBottom: 24 }, children: [
|
|
691
|
+
/* @__PURE__ */ u("div", { style: { marginBottom: 8, fontSize: 14, color: "#222" }, children: [
|
|
692
|
+
/* @__PURE__ */ u("span", { style: { color: "#F53F3F" }, children: "*" }),
|
|
693
|
+
" 上传文件"
|
|
694
|
+
] }),
|
|
695
|
+
/* @__PURE__ */ u(
|
|
696
|
+
"div",
|
|
697
|
+
{
|
|
698
|
+
style: {
|
|
699
|
+
border: e.filesError ? "1px dashed #ff4d4f" : "1px dashed #E5E6EB",
|
|
700
|
+
borderRadius: 8,
|
|
701
|
+
background: "#FCFCFD",
|
|
702
|
+
padding: 24,
|
|
703
|
+
textAlign: "center",
|
|
704
|
+
cursor: "pointer",
|
|
705
|
+
minHeight: 120,
|
|
706
|
+
display: "flex",
|
|
707
|
+
flexDirection: "column",
|
|
708
|
+
alignItems: "center",
|
|
709
|
+
justifyContent: "center",
|
|
710
|
+
color: "#999",
|
|
711
|
+
fontSize: 15
|
|
712
|
+
},
|
|
713
|
+
onClick: () => l.current?.click(),
|
|
714
|
+
onDrop: _,
|
|
715
|
+
onDragOver: a,
|
|
716
|
+
children: [
|
|
717
|
+
/* @__PURE__ */ u("div", { style: { fontSize: 48, marginBottom: 12 }, children: /* @__PURE__ */ u("svg", { width: "64", height: "64", viewBox: "0 0 64 64", fill: "none", children: [
|
|
718
|
+
/* @__PURE__ */ u("rect", { x: "8", y: "8", width: "48", height: "48", rx: "12", fill: "#F4F6FA" }),
|
|
719
|
+
/* @__PURE__ */ u("rect", { x: "28", y: "20", width: "8", height: "24", rx: "4", fill: "#E5E6EB" })
|
|
720
|
+
] }) }),
|
|
721
|
+
/* @__PURE__ */ u("div", { style: { color: "#222", fontSize: 15, marginBottom: 4 }, children: "点击或拖拽文件到此处上传" }),
|
|
722
|
+
/* @__PURE__ */ u("div", { style: { color: "#999", fontSize: 13 }, children: "支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传 10 个文件" }),
|
|
723
|
+
/* @__PURE__ */ u(
|
|
724
|
+
"input",
|
|
725
|
+
{
|
|
726
|
+
ref: l,
|
|
727
|
+
type: "file",
|
|
728
|
+
multiple: !0,
|
|
729
|
+
accept: ".jpg,.jpeg,.png,.pdf",
|
|
730
|
+
style: { display: "none" },
|
|
731
|
+
onChange: o
|
|
732
|
+
}
|
|
733
|
+
)
|
|
734
|
+
]
|
|
735
|
+
}
|
|
736
|
+
),
|
|
737
|
+
e.files && e.files.length > 0 && /* @__PURE__ */ u("div", { style: { marginTop: 12 }, children: e.files.map((i, d) => /* @__PURE__ */ u(
|
|
738
|
+
"div",
|
|
739
|
+
{
|
|
740
|
+
style: {
|
|
741
|
+
display: "flex",
|
|
742
|
+
alignItems: "center",
|
|
743
|
+
background: "#F7F8FA",
|
|
744
|
+
borderRadius: 8,
|
|
745
|
+
padding: "12px 16px",
|
|
746
|
+
marginBottom: 8,
|
|
747
|
+
fontSize: 15,
|
|
748
|
+
color: "#222",
|
|
749
|
+
justifyContent: "space-between"
|
|
750
|
+
},
|
|
751
|
+
children: [
|
|
752
|
+
/* @__PURE__ */ u("div", { style: { display: "flex", alignItems: "center", flex: 1 }, children: [
|
|
753
|
+
/* @__PURE__ */ u("span", { style: { fontWeight: 500 }, children: i.name }),
|
|
754
|
+
/* @__PURE__ */ u(
|
|
755
|
+
"span",
|
|
756
|
+
{
|
|
757
|
+
style: { color: "#8C8F93", fontSize: 13, marginLeft: 8 },
|
|
758
|
+
children: [
|
|
759
|
+
"(",
|
|
760
|
+
p(i.size),
|
|
761
|
+
")"
|
|
762
|
+
]
|
|
763
|
+
}
|
|
764
|
+
)
|
|
765
|
+
] }),
|
|
766
|
+
/* @__PURE__ */ u(
|
|
767
|
+
"button",
|
|
768
|
+
{
|
|
769
|
+
type: "button",
|
|
770
|
+
onClick: (c) => {
|
|
771
|
+
c.stopPropagation(), f(d);
|
|
772
|
+
},
|
|
773
|
+
style: {
|
|
774
|
+
background: "#FF4D4F",
|
|
775
|
+
color: "#fff",
|
|
776
|
+
border: "none",
|
|
777
|
+
borderRadius: 6,
|
|
778
|
+
padding: "4px 14px",
|
|
779
|
+
fontSize: 15,
|
|
780
|
+
marginLeft: 16,
|
|
781
|
+
cursor: "pointer"
|
|
782
|
+
},
|
|
783
|
+
children: "移除"
|
|
784
|
+
}
|
|
785
|
+
)
|
|
786
|
+
]
|
|
787
|
+
},
|
|
788
|
+
d
|
|
789
|
+
)) }),
|
|
790
|
+
e.filesError && /* @__PURE__ */ u("div", { style: { color: "#ff4d4f", fontSize: 13, marginTop: 4 }, children: e.filesError })
|
|
791
|
+
] }),
|
|
792
|
+
/* @__PURE__ */ u("div", { style: { display: "flex", justifyContent: "flex-end", gap: 12 }, children: [
|
|
793
|
+
/* @__PURE__ */ u(
|
|
794
|
+
"button",
|
|
795
|
+
{
|
|
796
|
+
type: "button",
|
|
797
|
+
onClick: r,
|
|
798
|
+
style: {
|
|
799
|
+
background: "#fff",
|
|
800
|
+
color: "#222",
|
|
801
|
+
border: "1px solid #E5E6EB",
|
|
802
|
+
borderRadius: 6,
|
|
803
|
+
padding: "8px 24px",
|
|
804
|
+
fontSize: 15,
|
|
805
|
+
cursor: "pointer"
|
|
806
|
+
},
|
|
807
|
+
children: "取消"
|
|
808
|
+
}
|
|
809
|
+
),
|
|
810
|
+
/* @__PURE__ */ u(
|
|
811
|
+
"button",
|
|
812
|
+
{
|
|
813
|
+
type: "submit",
|
|
814
|
+
disabled: t,
|
|
815
|
+
style: {
|
|
816
|
+
background: "#155EEF",
|
|
817
|
+
color: "#fff",
|
|
818
|
+
border: "none",
|
|
819
|
+
borderRadius: 6,
|
|
820
|
+
padding: "8px 24px",
|
|
821
|
+
fontSize: 15,
|
|
822
|
+
cursor: "pointer",
|
|
823
|
+
fontWeight: 600
|
|
824
|
+
},
|
|
825
|
+
children: "去支付"
|
|
826
|
+
}
|
|
827
|
+
)
|
|
828
|
+
] })
|
|
829
|
+
] });
|
|
830
|
+
};
|
|
831
|
+
function Qe({
|
|
832
|
+
visible: e,
|
|
833
|
+
onClose: n,
|
|
834
|
+
onSubmit: r,
|
|
835
|
+
color: t
|
|
836
|
+
}) {
|
|
837
|
+
console.log(1111);
|
|
838
|
+
const [l, o] = j({
|
|
400
839
|
amount: "",
|
|
401
840
|
rechargeChannel: "paypal",
|
|
402
841
|
currency: "USD",
|
|
@@ -405,9 +844,17 @@ function Ye({ visible: t, onClose: e, onSubmit: n, color: o }) {
|
|
|
405
844
|
amountError: "",
|
|
406
845
|
rechargeChannelError: "",
|
|
407
846
|
currencyError: ""
|
|
847
|
+
}), [_, a] = j("online"), [f, s] = j({
|
|
848
|
+
platform: "paypal",
|
|
849
|
+
transactionId: "",
|
|
850
|
+
files: [],
|
|
851
|
+
platformError: "",
|
|
852
|
+
transactionIdError: "",
|
|
853
|
+
filesError: "",
|
|
854
|
+
loading: !1
|
|
408
855
|
});
|
|
409
|
-
return
|
|
410
|
-
|
|
856
|
+
return Le(() => {
|
|
857
|
+
e || (a("online"), o({
|
|
411
858
|
amount: "",
|
|
412
859
|
rechargeChannel: "paypal",
|
|
413
860
|
currency: "USD",
|
|
@@ -416,8 +863,16 @@ function Ye({ visible: t, onClose: e, onSubmit: n, color: o }) {
|
|
|
416
863
|
amountError: "",
|
|
417
864
|
rechargeChannelError: "",
|
|
418
865
|
currencyError: ""
|
|
419
|
-
})
|
|
420
|
-
|
|
866
|
+
}), s({
|
|
867
|
+
platform: "paypal",
|
|
868
|
+
transactionId: "",
|
|
869
|
+
files: [],
|
|
870
|
+
platformError: "",
|
|
871
|
+
transactionIdError: "",
|
|
872
|
+
filesError: "",
|
|
873
|
+
loading: !1
|
|
874
|
+
}));
|
|
875
|
+
}, [e]), e ? /* @__PURE__ */ u(
|
|
421
876
|
"div",
|
|
422
877
|
{
|
|
423
878
|
style: {
|
|
@@ -426,55 +881,69 @@ function Ye({ visible: t, onClose: e, onSubmit: n, color: o }) {
|
|
|
426
881
|
left: 0,
|
|
427
882
|
right: 0,
|
|
428
883
|
bottom: 0,
|
|
429
|
-
background: "rgba(0,0,0,0.
|
|
884
|
+
background: "rgba(0,0,0,0.3)",
|
|
885
|
+
// 更浅的遮罩
|
|
430
886
|
display: "flex",
|
|
431
887
|
alignItems: "center",
|
|
432
888
|
justifyContent: "center",
|
|
433
889
|
zIndex: 9999
|
|
434
890
|
},
|
|
435
|
-
onClick: (
|
|
436
|
-
|
|
891
|
+
onClick: (d) => {
|
|
892
|
+
d.target === d.currentTarget && n();
|
|
437
893
|
},
|
|
438
|
-
children: /* @__PURE__ */
|
|
894
|
+
children: /* @__PURE__ */ u(
|
|
439
895
|
"form",
|
|
440
896
|
{
|
|
441
|
-
onSubmit: async (
|
|
442
|
-
|
|
897
|
+
onSubmit: async (d) => {
|
|
898
|
+
d.preventDefault();
|
|
443
899
|
let c = !0;
|
|
444
|
-
if (
|
|
445
|
-
|
|
900
|
+
if (o((h) => ({
|
|
901
|
+
...h,
|
|
902
|
+
amountError: "",
|
|
903
|
+
rechargeChannelError: ""
|
|
904
|
+
})), l.amount.trim() || (o((h) => ({ ...h, amountError: "请输入充值金额" })), c = !1), l.rechargeChannel || (o((h) => ({
|
|
905
|
+
...h,
|
|
906
|
+
rechargeChannelError: "请选择支付平台"
|
|
907
|
+
})), c = !1), !!c) {
|
|
908
|
+
o((h) => ({ ...h, loading: !0, error: "" }));
|
|
446
909
|
try {
|
|
447
|
-
await
|
|
910
|
+
await r({
|
|
911
|
+
amount: l.amount,
|
|
912
|
+
rechargeChannel: l.rechargeChannel,
|
|
913
|
+
currency: l.currency
|
|
914
|
+
}), n();
|
|
448
915
|
} catch {
|
|
449
|
-
|
|
916
|
+
o((h) => ({ ...h, error: "提交失败,请重试" }));
|
|
450
917
|
} finally {
|
|
451
|
-
|
|
918
|
+
o((h) => ({ ...h, loading: !1 }));
|
|
452
919
|
}
|
|
453
920
|
}
|
|
454
921
|
},
|
|
455
922
|
style: {
|
|
456
|
-
background: "#
|
|
923
|
+
background: "#fff",
|
|
924
|
+
// 白色弹窗
|
|
457
925
|
padding: 32,
|
|
458
926
|
borderRadius: 12,
|
|
459
|
-
minWidth:
|
|
460
|
-
color:
|
|
461
|
-
|
|
927
|
+
minWidth: 400,
|
|
928
|
+
color: t || "#222",
|
|
929
|
+
// 深色字体
|
|
930
|
+
boxShadow: "0 4px 24px rgba(0,0,0,0.08)",
|
|
462
931
|
position: "relative"
|
|
463
932
|
},
|
|
464
|
-
onClick: (
|
|
933
|
+
onClick: (d) => d.stopPropagation(),
|
|
465
934
|
children: [
|
|
466
|
-
/* @__PURE__ */
|
|
935
|
+
/* @__PURE__ */ u(
|
|
467
936
|
"button",
|
|
468
937
|
{
|
|
469
938
|
type: "button",
|
|
470
|
-
onClick:
|
|
939
|
+
onClick: n,
|
|
471
940
|
style: {
|
|
472
941
|
position: "absolute",
|
|
473
942
|
right: 16,
|
|
474
943
|
top: 16,
|
|
475
944
|
background: "none",
|
|
476
945
|
border: "none",
|
|
477
|
-
color: "#
|
|
946
|
+
color: "#222",
|
|
478
947
|
fontSize: 22,
|
|
479
948
|
cursor: "pointer",
|
|
480
949
|
lineHeight: 1
|
|
@@ -483,224 +952,186 @@ function Ye({ visible: t, onClose: e, onSubmit: n, color: o }) {
|
|
|
483
952
|
children: "×"
|
|
484
953
|
}
|
|
485
954
|
),
|
|
486
|
-
/* @__PURE__ */
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
955
|
+
/* @__PURE__ */ u(
|
|
956
|
+
"div",
|
|
957
|
+
{
|
|
958
|
+
style: {
|
|
959
|
+
fontWeight: 600,
|
|
960
|
+
fontSize: 20,
|
|
961
|
+
marginBottom: 24,
|
|
962
|
+
textAlign: "left",
|
|
963
|
+
color: "#222"
|
|
964
|
+
},
|
|
965
|
+
children: "充值 / 转账"
|
|
966
|
+
}
|
|
967
|
+
),
|
|
968
|
+
/* @__PURE__ */ u("div", { style: { display: "flex", marginBottom: 28 }, children: [
|
|
969
|
+
/* @__PURE__ */ u(
|
|
970
|
+
"button",
|
|
494
971
|
{
|
|
495
|
-
type: "
|
|
496
|
-
|
|
497
|
-
value: _.amount,
|
|
498
|
-
onInput: (u) => {
|
|
499
|
-
const c = u.target.value;
|
|
500
|
-
r((s) => ({
|
|
501
|
-
...s,
|
|
502
|
-
amount: c,
|
|
503
|
-
amountError: c.trim() ? "" : s.amountError
|
|
504
|
-
}));
|
|
505
|
-
},
|
|
972
|
+
type: "button",
|
|
973
|
+
onClick: () => a("online"),
|
|
506
974
|
style: {
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
975
|
+
flex: 1,
|
|
976
|
+
background: _ === "online" ? "#fff" : "#F7F8FA",
|
|
977
|
+
color: _ === "online" ? "#155EEF" : "#222",
|
|
978
|
+
border: "none",
|
|
979
|
+
borderRadius: "8px 0 0 8px",
|
|
980
|
+
fontWeight: _ === "online" ? 600 : 400,
|
|
981
|
+
fontSize: 16,
|
|
982
|
+
height: 48,
|
|
983
|
+
boxShadow: _ === "online" ? "0 2px 8px 0 rgba(20,20,20,0.04)" : "none",
|
|
515
984
|
outline: "none",
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
),
|
|
520
|
-
_.amountError && /* @__PURE__ */ d("div", { style: { color: "#ff4d4f", fontSize: 13, marginTop: 4 }, children: _.amountError })
|
|
521
|
-
] }),
|
|
522
|
-
/* @__PURE__ */ d("div", { style: { marginBottom: 18 }, children: [
|
|
523
|
-
/* @__PURE__ */ d("div", { style: { marginBottom: 8, fontSize: 14 }, children: [
|
|
524
|
-
/* @__PURE__ */ d("span", { style: { color: "#00E8C6" }, children: "*" }),
|
|
525
|
-
" 支付平台"
|
|
526
|
-
] }),
|
|
527
|
-
/* @__PURE__ */ d(
|
|
528
|
-
"select",
|
|
529
|
-
{
|
|
530
|
-
style: {
|
|
531
|
-
width: "100%",
|
|
532
|
-
padding: "10px 12px",
|
|
533
|
-
borderRadius: 6,
|
|
534
|
-
border: _.rechargeChannelError ? "1px solid #ff4d4f" : "1px solid #23262F",
|
|
535
|
-
background: "#23262F",
|
|
536
|
-
color: "#fff",
|
|
537
|
-
fontSize: 15,
|
|
538
|
-
outline: "none"
|
|
985
|
+
cursor: "pointer",
|
|
986
|
+
borderRight: "1px solid #F0F1F3",
|
|
987
|
+
transition: "all 0.2s"
|
|
539
988
|
},
|
|
540
|
-
|
|
541
|
-
onInput: (u) => {
|
|
542
|
-
const c = u.target.value;
|
|
543
|
-
r((s) => ({
|
|
544
|
-
...s,
|
|
545
|
-
rechargeChannel: c,
|
|
546
|
-
rechargeChannelError: c ? "" : s.rechargeChannelError
|
|
547
|
-
}));
|
|
548
|
-
},
|
|
549
|
-
children: [
|
|
550
|
-
/* @__PURE__ */ d("option", { value: "alipay", children: "支付宝" }),
|
|
551
|
-
/* @__PURE__ */ d("option", { value: "wechat", children: "微信" }),
|
|
552
|
-
/* @__PURE__ */ d("option", { value: "paypal", children: "PayPal" })
|
|
553
|
-
]
|
|
989
|
+
children: "在线充值"
|
|
554
990
|
}
|
|
555
991
|
),
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
/* @__PURE__ */ d("div", { style: { marginBottom: 24 }, children: [
|
|
559
|
-
/* @__PURE__ */ d("div", { style: { marginBottom: 8, fontSize: 14 }, children: "币种" }),
|
|
560
|
-
/* @__PURE__ */ d(
|
|
561
|
-
"select",
|
|
992
|
+
/* @__PURE__ */ u(
|
|
993
|
+
"button",
|
|
562
994
|
{
|
|
995
|
+
type: "button",
|
|
996
|
+
onClick: () => a("offline"),
|
|
563
997
|
style: {
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
border: "
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
fontSize:
|
|
571
|
-
|
|
998
|
+
flex: 1,
|
|
999
|
+
background: _ === "offline" ? "#fff" : "#F7F8FA",
|
|
1000
|
+
color: _ === "offline" ? "#155EEF" : "#222",
|
|
1001
|
+
border: "none",
|
|
1002
|
+
borderRadius: "0 8px 8px 0",
|
|
1003
|
+
fontWeight: _ === "offline" ? 600 : 400,
|
|
1004
|
+
fontSize: 16,
|
|
1005
|
+
height: 48,
|
|
1006
|
+
boxShadow: _ === "offline" ? "0 2px 8px 0 rgba(20,20,20,0.04)" : "none",
|
|
1007
|
+
outline: "none",
|
|
1008
|
+
cursor: "pointer",
|
|
1009
|
+
borderLeft: "1px solid #F0F1F3",
|
|
1010
|
+
transition: "all 0.2s"
|
|
572
1011
|
},
|
|
573
|
-
|
|
574
|
-
children: [
|
|
575
|
-
/* @__PURE__ */ d("option", { value: "USD", children: "USD" }),
|
|
576
|
-
/* @__PURE__ */ d("option", { value: "CNY", children: "CNY" }),
|
|
577
|
-
/* @__PURE__ */ d("option", { value: "EUR", children: "EUR" })
|
|
578
|
-
]
|
|
1012
|
+
children: "线下转账"
|
|
579
1013
|
}
|
|
580
1014
|
)
|
|
581
1015
|
] }),
|
|
582
|
-
_
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
}
|
|
601
|
-
)
|
|
602
|
-
] })
|
|
1016
|
+
_ === "online" ? /* @__PURE__ */ u(
|
|
1017
|
+
Ye,
|
|
1018
|
+
{
|
|
1019
|
+
formState: l,
|
|
1020
|
+
setFormState: o,
|
|
1021
|
+
onClose: n,
|
|
1022
|
+
loading: l.loading,
|
|
1023
|
+
whiteTheme: !0
|
|
1024
|
+
}
|
|
1025
|
+
) : /* @__PURE__ */ u(
|
|
1026
|
+
Ke,
|
|
1027
|
+
{
|
|
1028
|
+
formState: f,
|
|
1029
|
+
setFormState: s,
|
|
1030
|
+
onClose: n,
|
|
1031
|
+
loading: f.loading
|
|
1032
|
+
}
|
|
1033
|
+
)
|
|
603
1034
|
]
|
|
604
1035
|
}
|
|
605
1036
|
)
|
|
606
1037
|
}
|
|
607
1038
|
) : null;
|
|
608
1039
|
}
|
|
609
|
-
function
|
|
610
|
-
return (
|
|
611
|
-
for (var
|
|
612
|
-
var
|
|
613
|
-
for (var
|
|
1040
|
+
function oe() {
|
|
1041
|
+
return (oe = Object.assign ? Object.assign.bind() : function(e) {
|
|
1042
|
+
for (var n = 1; n < arguments.length; n++) {
|
|
1043
|
+
var r = arguments[n];
|
|
1044
|
+
for (var t in r) Object.prototype.hasOwnProperty.call(r, t) && (e[t] = r[t]);
|
|
614
1045
|
}
|
|
615
|
-
return
|
|
1046
|
+
return e;
|
|
616
1047
|
}).apply(this, arguments);
|
|
617
1048
|
}
|
|
618
|
-
var
|
|
619
|
-
function
|
|
1049
|
+
var Xe = ["context", "children"];
|
|
1050
|
+
function Ze(e) {
|
|
620
1051
|
this.getChildContext = function() {
|
|
621
|
-
return
|
|
1052
|
+
return e.context;
|
|
622
1053
|
};
|
|
623
|
-
var
|
|
624
|
-
if (
|
|
625
|
-
var
|
|
626
|
-
for (
|
|
1054
|
+
var n = e.children, r = function(t, l) {
|
|
1055
|
+
if (t == null) return {};
|
|
1056
|
+
var o, _, a = {}, f = Object.keys(t);
|
|
1057
|
+
for (_ = 0; _ < f.length; _++) l.indexOf(o = f[_]) >= 0 || (a[o] = t[o]);
|
|
627
1058
|
return a;
|
|
628
|
-
}(
|
|
629
|
-
return
|
|
630
|
-
}
|
|
631
|
-
function
|
|
632
|
-
var
|
|
633
|
-
this.dispatchEvent(
|
|
634
|
-
if (
|
|
635
|
-
if (
|
|
636
|
-
var
|
|
637
|
-
for (
|
|
638
|
-
for (
|
|
639
|
-
var
|
|
640
|
-
|
|
1059
|
+
}(e, Xe);
|
|
1060
|
+
return Pe(n, r);
|
|
1061
|
+
}
|
|
1062
|
+
function en() {
|
|
1063
|
+
var e = new CustomEvent("_preact", { detail: {}, bubbles: !0, cancelable: !0 });
|
|
1064
|
+
this.dispatchEvent(e), this._vdom = S(Ze, oe({}, this._props, { context: e.detail.context }), function n(r, t) {
|
|
1065
|
+
if (r.nodeType === 3) return r.data;
|
|
1066
|
+
if (r.nodeType !== 1) return null;
|
|
1067
|
+
var l = [], o = {}, _ = 0, a = r.attributes, f = r.childNodes;
|
|
1068
|
+
for (_ = a.length; _--; ) a[_].name !== "slot" && (o[a[_].name] = a[_].value, o[Te(a[_].name)] = a[_].value);
|
|
1069
|
+
for (_ = f.length; _--; ) {
|
|
1070
|
+
var s = n(f[_], null), p = f[_].slot;
|
|
1071
|
+
p ? o[p] = S(ye, { name: p }, s) : l[_] = s;
|
|
641
1072
|
}
|
|
642
|
-
var i =
|
|
643
|
-
return
|
|
644
|
-
}(this, this._vdomComponent)), (this.hasAttribute("hydrate") ?
|
|
1073
|
+
var i = t ? S(ye, null, l) : l;
|
|
1074
|
+
return S(t || r.nodeName.toLowerCase(), o, i);
|
|
1075
|
+
}(this, this._vdomComponent)), (this.hasAttribute("hydrate") ? ze : V)(this._vdom, this._root);
|
|
645
1076
|
}
|
|
646
|
-
function
|
|
647
|
-
return
|
|
648
|
-
return
|
|
1077
|
+
function Te(e) {
|
|
1078
|
+
return e.replace(/-(\w)/g, function(n, r) {
|
|
1079
|
+
return r ? r.toUpperCase() : "";
|
|
649
1080
|
});
|
|
650
1081
|
}
|
|
651
|
-
function
|
|
1082
|
+
function nn(e, n, r) {
|
|
652
1083
|
if (this._vdom) {
|
|
653
|
-
var
|
|
654
|
-
|
|
1084
|
+
var t = {};
|
|
1085
|
+
t[e] = r = r ?? void 0, t[Te(e)] = r, this._vdom = Pe(this._vdom, t), V(this._vdom, this._root);
|
|
655
1086
|
}
|
|
656
1087
|
}
|
|
657
|
-
function
|
|
658
|
-
|
|
1088
|
+
function rn() {
|
|
1089
|
+
V(this._vdom = null, this._root);
|
|
659
1090
|
}
|
|
660
|
-
function
|
|
661
|
-
var
|
|
662
|
-
return
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
},
|
|
1091
|
+
function ye(e, n) {
|
|
1092
|
+
var r = this;
|
|
1093
|
+
return S("slot", oe({}, e, { ref: function(t) {
|
|
1094
|
+
t ? (r.ref = t, r._listener || (r._listener = function(l) {
|
|
1095
|
+
l.stopPropagation(), l.detail.context = n;
|
|
1096
|
+
}, t.addEventListener("_preact", r._listener))) : r.ref.removeEventListener("_preact", r._listener);
|
|
666
1097
|
} }));
|
|
667
1098
|
}
|
|
668
|
-
function
|
|
669
|
-
function
|
|
670
|
-
var
|
|
671
|
-
return
|
|
1099
|
+
function tn(e, n, r, t) {
|
|
1100
|
+
function l() {
|
|
1101
|
+
var o = Reflect.construct(HTMLElement, [], l);
|
|
1102
|
+
return o._vdomComponent = e, o._root = o, o;
|
|
672
1103
|
}
|
|
673
|
-
return (
|
|
674
|
-
Object.defineProperty(
|
|
675
|
-
return this._vdom.props[
|
|
676
|
-
}, set: function(
|
|
677
|
-
this._vdom ? this.attributeChangedCallback(
|
|
678
|
-
var a = typeof
|
|
679
|
-
|
|
1104
|
+
return (l.prototype = Object.create(HTMLElement.prototype)).constructor = l, l.prototype.connectedCallback = en, l.prototype.attributeChangedCallback = nn, l.prototype.disconnectedCallback = rn, r = r || e.observedAttributes || Object.keys(e.propTypes || {}), l.observedAttributes = r, r.forEach(function(o) {
|
|
1105
|
+
Object.defineProperty(l.prototype, o, { get: function() {
|
|
1106
|
+
return this._vdom.props[o];
|
|
1107
|
+
}, set: function(_) {
|
|
1108
|
+
this._vdom ? this.attributeChangedCallback(o, null, _) : (this._props || (this._props = {}), this._props[o] = _, this.connectedCallback());
|
|
1109
|
+
var a = typeof _;
|
|
1110
|
+
_ != null && a !== "string" && a !== "boolean" && a !== "number" || this.setAttribute(o, _);
|
|
680
1111
|
} });
|
|
681
|
-
}), customElements.define(
|
|
682
|
-
}
|
|
683
|
-
function
|
|
684
|
-
const [
|
|
685
|
-
return /* @__PURE__ */
|
|
686
|
-
/* @__PURE__ */
|
|
687
|
-
/* @__PURE__ */
|
|
688
|
-
|
|
1112
|
+
}), customElements.define(n, l);
|
|
1113
|
+
}
|
|
1114
|
+
function on(e) {
|
|
1115
|
+
const [n, r] = j(!1), t = e.theme?.primaryColor;
|
|
1116
|
+
return /* @__PURE__ */ u("div", { children: [
|
|
1117
|
+
/* @__PURE__ */ u(Je, { color: t, onClick: () => r(!0), children: "打开表单" }),
|
|
1118
|
+
/* @__PURE__ */ u(
|
|
1119
|
+
Qe,
|
|
689
1120
|
{
|
|
690
|
-
visible:
|
|
691
|
-
onClose: () =>
|
|
692
|
-
onSubmit: async (
|
|
693
|
-
console.log("submit",
|
|
1121
|
+
visible: n,
|
|
1122
|
+
onClose: () => r(!1),
|
|
1123
|
+
onSubmit: async (o) => {
|
|
1124
|
+
console.log("submit", o);
|
|
694
1125
|
},
|
|
695
|
-
color:
|
|
1126
|
+
color: t
|
|
696
1127
|
}
|
|
697
1128
|
)
|
|
698
1129
|
] });
|
|
699
1130
|
}
|
|
700
|
-
|
|
701
|
-
const
|
|
1131
|
+
tn(on, "x-best-modal-form", ["theme"]);
|
|
1132
|
+
const an = ["x-greeting", "x-best-modal-form"];
|
|
702
1133
|
export {
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
1134
|
+
an as components,
|
|
1135
|
+
ln as npmTest,
|
|
1136
|
+
_n as printCurrentTime
|
|
706
1137
|
};
|