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/dist/best-unit.js CHANGED
@@ -1,388 +1,397 @@
1
- function tt() {
1
+ function ln() {
2
2
  console.log("npm package test!!!");
3
3
  }
4
- function nt() {
4
+ function _n() {
5
5
  console.log("Current time:", (/* @__PURE__ */ new Date()).toISOString());
6
6
  }
7
- var D, h, ve, w, oe, ge, ye, be, X, G, J, A = {}, ke = [], De = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, W = Array.isArray;
8
- function E(t, e) {
9
- for (var n in e) t[n] = e[n];
10
- return t;
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 Z(t) {
13
- t && t.parentNode && t.parentNode.removeChild(t);
12
+ function ee(e) {
13
+ e && e.parentNode && e.parentNode.removeChild(e);
14
14
  }
15
- function $(t, e, n) {
16
- var o, _, r, l = {};
17
- for (r in e) r == "key" ? o = e[r] : r == "ref" ? _ = e[r] : l[r] = e[r];
18
- if (arguments.length > 2 && (l.children = arguments.length > 3 ? D.call(arguments, 2) : n), typeof t == "function" && t.defaultProps != null) for (r in t.defaultProps) l[r] === void 0 && (l[r] = t.defaultProps[r]);
19
- return F(t, l, o, _, null);
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 F(t, e, n, o, _) {
22
- var r = { type: t, props: e, key: n, ref: o, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: _ ?? ++ve, __i: -1, __u: 0 };
23
- return _ == null && h.vnode != null && h.vnode(r), r;
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 I(t) {
26
- return t.children;
25
+ function A(e) {
26
+ return e.children;
27
27
  }
28
- function L(t, e) {
29
- this.props = t, this.context = e;
28
+ function O(e, n) {
29
+ this.props = e, this.context = n;
30
30
  }
31
- function P(t, e) {
32
- if (e == null) return t.__ ? P(t.__, t.__i + 1) : null;
33
- for (var n; e < t.__k.length; e++) if ((n = t.__k[e]) != null && n.__e != null) return n.__e;
34
- return typeof t.type == "function" ? P(t) : null;
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(t) {
37
- var e, n;
38
- if ((t = t.__) != null && t.__c != null) {
39
- for (t.__e = t.__c.base = null, e = 0; e < t.__k.length; e++) if ((n = t.__k[e]) != null && n.__e != null) {
40
- t.__e = t.__c.base = n.__e;
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(t);
43
+ return Ce(e);
44
44
  }
45
45
  }
46
- function _e(t) {
47
- (!t.__d && (t.__d = !0) && w.push(t) && !j.__r++ || oe != h.debounceRendering) && ((oe = h.debounceRendering) || ge)(j);
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 j() {
50
- for (var t, e, n, o, _, r, l, a = 1; w.length; ) w.length > a && w.sort(ye), t = w.shift(), a = w.length, t.__d && (n = void 0, _ = (o = (e = t).__v).__e, r = [], l = [], e.__P && ((n = E({}, o)).__v = o.__v + 1, h.vnode && h.vnode(n), ee(e.__P, n, o, e.__n, e.__P.namespaceURI, 32 & o.__u ? [_] : null, r, _ ?? P(o), !!(32 & o.__u), l), n.__v = o.__v, n.__.__k[n.__i] = n, Se(r, n, l), n.__e != _ && Ce(n)));
51
- j.__r = 0;
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 xe(t, e, n, o, _, r, l, a, u, c, s) {
54
- var i, p, f, b, C, k, m = o && o.__k || ke, v = e.length;
55
- for (u = Me(n, e, m, u, v), i = 0; i < v; i++) (f = n.__k[i]) != null && (p = f.__i == -1 ? A : m[f.__i] || A, f.__i = i, k = ee(t, f, p, _, r, l, a, u, c, s), b = f.__e, f.ref && p.ref != f.ref && (p.ref && te(p.ref, null, f), s.push(f.ref, f.__c || b, f)), C == null && b != null && (C = b), 4 & f.__u || p.__k === f.__k ? u = Ee(f, u, t) : typeof f.type == "function" && k !== void 0 ? u = k : b && (u = b.nextSibling), f.__u &= -7);
56
- return n.__e = C, u;
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 Me(t, e, n, o, _) {
59
- var r, l, a, u, c, s = n.length, i = s, p = 0;
60
- for (t.__k = new Array(_), r = 0; r < _; r++) (l = e[r]) != null && typeof l != "boolean" && typeof l != "function" ? (u = r + p, (l = t.__k[r] = typeof l == "string" || typeof l == "number" || typeof l == "bigint" || l.constructor == String ? F(null, l, null, null, null) : W(l) ? F(I, { children: l }, null, null, null) : l.constructor == null && l.__b > 0 ? F(l.type, l.props, l.key, l.ref ? l.ref : null, l.__v) : l).__ = t, l.__b = t.__b + 1, a = null, (c = l.__i = ze(l, n, u, i)) != -1 && (i--, (a = n[c]) && (a.__u |= 2)), a == null || a.__v == null ? (c == -1 && (_ > s ? p-- : _ < s && p++), typeof l.type != "function" && (l.__u |= 4)) : c != u && (c == u - 1 ? p-- : c == u + 1 ? p++ : (c > u ? p-- : p++, l.__u |= 4))) : t.__k[r] = null;
61
- if (i) for (r = 0; r < s; r++) (a = n[r]) != null && (2 & a.__u) == 0 && (a.__e == o && (o = P(a)), $e(a, a));
62
- return o;
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 Ee(t, e, n) {
65
- var o, _;
66
- if (typeof t.type == "function") {
67
- for (o = t.__k, _ = 0; o && _ < o.length; _++) o[_] && (o[_].__ = t, e = Ee(o[_], e, n));
68
- return e;
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
- t.__e != e && (e && t.type && !n.contains(e) && (e = P(t)), n.insertBefore(t.__e, e || null), e = t.__e);
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
- e = e && e.nextSibling;
73
- while (e != null && e.nodeType == 8);
74
- return e;
72
+ n = n && n.nextSibling;
73
+ while (n != null && n.nodeType == 8);
74
+ return n;
75
75
  }
76
- function ze(t, e, n, o) {
77
- var _, r, l = t.key, a = t.type, u = e[n];
78
- if (u === null && t.key == null || u && l == u.key && a == u.type && (2 & u.__u) == 0) return n;
79
- if (o > (u != null && (2 & u.__u) == 0 ? 1 : 0)) for (_ = n - 1, r = n + 1; _ >= 0 || r < e.length; ) {
80
- if (_ >= 0) {
81
- if ((u = e[_]) && (2 & u.__u) == 0 && l == u.key && a == u.type) return _;
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 (r < e.length) {
85
- if ((u = e[r]) && (2 & u.__u) == 0 && l == u.key && a == u.type) return r;
86
- r++;
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 ie(t, e, n) {
92
- e[0] == "-" ? t.setProperty(e, n ?? "") : t[e] = n == null ? "" : typeof n != "number" || De.test(e) ? n : n + "px";
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 B(t, e, n, o, _) {
95
- var r, l;
96
- e: if (e == "style") if (typeof n == "string") t.style.cssText = n;
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 o == "string" && (t.style.cssText = o = ""), o) for (e in o) n && e in n || ie(t.style, e, "");
99
- if (n) for (e in n) o && n[e] == o[e] || ie(t.style, e, n[e]);
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 (e[0] == "o" && e[1] == "n") r = e != (e = e.replace(be, "$1")), l = e.toLowerCase(), e = l in t || e == "onFocusOut" || e == "onFocusIn" ? l.slice(2) : e.slice(2), t.l || (t.l = {}), t.l[e + r] = n, n ? o ? n.u = o.u : (n.u = X, t.addEventListener(e, r ? J : G, r)) : t.removeEventListener(e, r ? J : G, r);
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 (_ == "http://www.w3.org/2000/svg") e = e.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
104
- else if (e != "width" && e != "height" && e != "href" && e != "list" && e != "form" && e != "tabIndex" && e != "download" && e != "rowSpan" && e != "colSpan" && e != "role" && e != "popover" && e in t) try {
105
- t[e] = n ?? "";
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 n == "function" || (n == null || n === !1 && e[4] != "-" ? t.removeAttribute(e) : t.setAttribute(e, e == "popover" && n == 1 ? "" : n));
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 le(t) {
113
- return function(e) {
112
+ function ce(e) {
113
+ return function(n) {
114
114
  if (this.l) {
115
- var n = this.l[e.type + t];
116
- if (e.t == null) e.t = X++;
117
- else if (e.t < n.u) return;
118
- return n(h.event ? h.event(e) : e);
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 ee(t, e, n, o, _, r, l, a, u, c) {
123
- var s, i, p, f, b, C, k, m, v, H, S, M, T, re, z, U, V, x = e.type;
124
- if (e.constructor != null) return null;
125
- 128 & n.__u && (u = !!(32 & n.__u), r = [a = e.__e = n.__e]), (s = h.__b) && s(e);
126
- e: if (typeof x == "function") try {
127
- if (m = e.props, v = "prototype" in x && x.prototype.render, H = (s = x.contextType) && o[s.__c], S = s ? H ? H.props.value : s.__ : o, n.__c ? k = (i = e.__c = n.__c).__ = i.__E : (v ? e.__c = i = new x(m, S) : (e.__c = i = new L(m, S), i.constructor = x, i.render = Le), H && H.sub(i), i.props = m, i.state || (i.state = {}), i.context = S, i.__n = o, p = i.__d = !0, i.__h = [], i._sb = []), v && i.__s == null && (i.__s = i.state), v && x.getDerivedStateFromProps != null && (i.__s == i.state && (i.__s = E({}, i.__s)), E(i.__s, x.getDerivedStateFromProps(m, i.__s))), f = i.props, b = i.state, i.__v = e, p) v && x.getDerivedStateFromProps == null && i.componentWillMount != null && i.componentWillMount(), v && i.componentDidMount != null && i.__h.push(i.componentDidMount);
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 (v && x.getDerivedStateFromProps == null && m !== f && i.componentWillReceiveProps != null && i.componentWillReceiveProps(m, S), !i.__e && i.shouldComponentUpdate != null && i.shouldComponentUpdate(m, i.__s, S) === !1 || e.__v == n.__v) {
130
- for (e.__v != n.__v && (i.props = m, i.state = i.__s, i.__d = !1), e.__e = n.__e, e.__k = n.__k, e.__k.some(function(N) {
131
- N && (N.__ = e);
132
- }), M = 0; M < i._sb.length; M++) i.__h.push(i._sb[M]);
133
- i._sb = [], i.__h.length && l.push(i);
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(m, i.__s, S), v && i.componentDidUpdate != null && i.__h.push(function() {
137
- i.componentDidUpdate(f, b, C);
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 = S, i.props = m, i.__P = t, i.__e = !1, T = h.__r, re = 0, v) {
141
- for (i.state = i.__s, i.__d = !1, T && T(e), s = i.render(i.props, i.state, i.context), z = 0; z < i._sb.length; z++) i.__h.push(i._sb[z]);
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, T && T(e), s = i.render(i.props, i.state, i.context), i.state = i.__s;
145
- while (i.__d && ++re < 25);
146
- i.state = i.__s, i.getChildContext != null && (o = E(E({}, o), i.getChildContext())), v && !p && i.getSnapshotBeforeUpdate != null && (C = i.getSnapshotBeforeUpdate(f, b)), U = s, s != null && s.type === I && s.key == null && (U = we(s.props.children)), a = xe(t, W(U) ? U : [U], e, n, o, _, r, l, a, u, c), i.base = e.__e, e.__u &= -161, i.__h.length && l.push(i), k && (i.__E = i.__ = null);
147
- } catch (N) {
148
- if (e.__v = null, u || r != null) if (N.then) {
149
- for (e.__u |= u ? 160 : 128; a && a.nodeType == 8 && a.nextSibling; ) a = a.nextSibling;
150
- r[r.indexOf(a)] = null, e.__e = a;
151
- } else for (V = r.length; V--; ) Z(r[V]);
152
- else e.__e = n.__e, e.__k = n.__k;
153
- h.__e(N, e, n);
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 r == null && e.__v == n.__v ? (e.__k = n.__k, e.__e = n.__e) : a = e.__e = Be(n.__e, e, n, o, _, r, l, u, c);
156
- return (s = h.diffed) && s(e), 128 & e.__u ? void 0 : a;
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(t, e, n) {
159
- for (var o = 0; o < n.length; o++) te(n[o], n[++o], n[++o]);
160
- h.__c && h.__c(e, t), t.some(function(_) {
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
- t = _.__h, _.__h = [], t.some(function(r) {
163
- r.call(_);
162
+ e = l.__h, l.__h = [], e.some(function(o) {
163
+ o.call(l);
164
164
  });
165
- } catch (r) {
166
- h.__e(r, _.__v);
165
+ } catch (o) {
166
+ g.__e(o, l.__v);
167
167
  }
168
168
  });
169
169
  }
170
- function we(t) {
171
- return typeof t != "object" || t == null || t.__b && t.__b > 0 ? t : W(t) ? t.map(we) : E({}, t);
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 Be(t, e, n, o, _, r, l, a, u) {
174
- var c, s, i, p, f, b, C, k = n.props, m = e.props, v = e.type;
175
- if (v == "svg" ? _ = "http://www.w3.org/2000/svg" : v == "math" ? _ = "http://www.w3.org/1998/Math/MathML" : _ || (_ = "http://www.w3.org/1999/xhtml"), r != null) {
176
- for (c = 0; c < r.length; c++) if ((f = r[c]) && "setAttribute" in f == !!v && (v ? f.localName == v : f.nodeType == 3)) {
177
- t = f, r[c] = null;
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 (t == null) {
182
- if (v == null) return document.createTextNode(m);
183
- t = document.createElementNS(_, v, m.is && m), a && (h.__m && h.__m(e, r), a = !1), r = null;
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 (v == null) k === m || a && t.data == m || (t.data = m);
185
+ if (y == null) x === v || a && e.data == v || (e.data = v);
186
186
  else {
187
- if (r = r && D.call(t.childNodes), k = n.props || A, !a && r != null) for (k = {}, c = 0; c < t.attributes.length; c++) k[(f = t.attributes[c]).name] = f.value;
188
- for (c in k) if (f = k[c], c != "children") {
189
- if (c == "dangerouslySetInnerHTML") i = f;
190
- else if (!(c in m)) {
191
- if (c == "value" && "defaultValue" in m || c == "checked" && "defaultChecked" in m) continue;
192
- B(t, c, null, f, _);
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 (c in m) f = m[c], c == "children" ? p = f : c == "dangerouslySetInnerHTML" ? s = f : c == "value" ? b = f : c == "checked" ? C = f : a && typeof f != "function" || k[c] === f || B(t, c, f, k[c], _);
196
- if (s) a || i && (s.__html == i.__html || s.__html == t.innerHTML) || (t.innerHTML = s.__html), e.__k = [];
197
- else if (i && (t.innerHTML = ""), xe(e.type == "template" ? t.content : t, W(p) ? p : [p], e, n, o, v == "foreignObject" ? "http://www.w3.org/1999/xhtml" : _, r, l, r ? r[0] : n.__k && P(n, 0), a, u), r != null) for (c = r.length; c--; ) Z(r[c]);
198
- a || (c = "value", v == "progress" && b == null ? t.removeAttribute("value") : b != null && (b !== t[c] || v == "progress" && !b || v == "option" && b != k[c]) && B(t, c, b, k[c], _), c = "checked", C != null && C != t[c] && B(t, c, C, k[c], _));
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 t;
200
+ return e;
201
201
  }
202
- function te(t, e, n) {
202
+ function re(e, n, r) {
203
203
  try {
204
- if (typeof t == "function") {
205
- var o = typeof t.__u == "function";
206
- o && t.__u(), o && e == null || (t.__u = t(e));
207
- } else t.current = e;
208
- } catch (_) {
209
- h.__e(_, n);
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(t, e, n) {
213
- var o, _;
214
- if (h.unmount && h.unmount(t), (o = t.ref) && (o.current && o.current != t.__e || te(o, null, e)), (o = t.__c) != null) {
215
- if (o.componentWillUnmount) try {
216
- o.componentWillUnmount();
217
- } catch (r) {
218
- h.__e(r, e);
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
- o.base = o.__P = null;
220
+ t.base = t.__P = null;
221
221
  }
222
- if (o = t.__k) for (_ = 0; _ < o.length; _++) o[_] && $e(o[_], e, n || typeof t.type != "function");
223
- n || Z(t.__e), t.__c = t.__ = t.__e = void 0;
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 Le(t, e, n) {
226
- return this.constructor(t, n);
225
+ function Me(e, n, r) {
226
+ return this.constructor(e, r);
227
227
  }
228
- function q(t, e, n) {
229
- var o, _, r, l;
230
- e == document && (e = document.documentElement), h.__ && h.__(t, e), _ = (o = typeof n == "function") ? null : n && n.__k || e.__k, r = [], l = [], ee(e, t = (!o && n || e).__k = $(I, null, [t]), _ || A, A, e.namespaceURI, !o && n ? [n] : _ ? null : e.firstChild ? D.call(e.childNodes) : null, r, !o && n ? n : _ ? _.__e : e.firstChild, o, l), Se(r, t, l);
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 Pe(t, e) {
233
- q(t, e, Pe);
232
+ function ze(e, n) {
233
+ V(e, n, ze);
234
234
  }
235
- function He(t, e, n) {
236
- var o, _, r, l, a = E({}, t.props);
237
- for (r in t.type && t.type.defaultProps && (l = t.type.defaultProps), e) r == "key" ? o = e[r] : r == "ref" ? _ = e[r] : a[r] = e[r] === void 0 && l != null ? l[r] : e[r];
238
- return arguments.length > 2 && (a.children = arguments.length > 3 ? D.call(arguments, 2) : n), F(t.type, a, o || t.key, _ || t.ref, null);
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
- D = ke.slice, h = { __e: function(t, e, n, o) {
241
- for (var _, r, l; e = e.__; ) if ((_ = e.__c) && !_.__) try {
242
- if ((r = _.constructor) && r.getDerivedStateFromError != null && (_.setState(r.getDerivedStateFromError(t)), l = _.__d), _.componentDidCatch != null && (_.componentDidCatch(t, o || {}), l = _.__d), l) return _.__E = _;
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
- t = a;
244
+ e = a;
245
245
  }
246
- throw t;
247
- } }, ve = 0, L.prototype.setState = function(t, e) {
248
- var n;
249
- n = this.__s != null && this.__s != this.state ? this.__s : this.__s = E({}, this.state), typeof t == "function" && (t = t(E({}, n), this.props)), t && E(n, t), t != null && this.__v && (e && this._sb.push(e), _e(this));
250
- }, L.prototype.forceUpdate = function(t) {
251
- this.__v && (this.__e = !0, t && this.__h.push(t), _e(this));
252
- }, L.prototype.render = I, w = [], ge = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, ye = function(t, e) {
253
- return t.__v.__b - e.__v.__b;
254
- }, j.__r = 0, be = /(PointerCapture)$|Capture$/i, X = 0, G = le(!1), J = le(!0);
255
- var Re = 0;
256
- function d(t, e, n, o, _, r) {
257
- e || (e = {});
258
- var l, a, u = e;
259
- if ("ref" in u) for (a in u = {}, e) a == "ref" ? l = e[a] : u[a] = e[a];
260
- var c = { type: t, props: u, key: n, ref: l, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --Re, __i: -1, __u: 0, __source: _, __self: r };
261
- if (typeof t == "function" && (l = t.defaultProps)) for (a in l) u[a] === void 0 && (u[a] = l[a]);
262
- return h.vnode && h.vnode(c), c;
263
- }
264
- var O, g, Y, ae, K = 0, Te = [], y = h, ce = y.__b, ue = y.__r, se = y.diffed, fe = y.__c, pe = y.unmount, de = y.__;
265
- function Ue(t, e) {
266
- y.__h && y.__h(g, t, K || e), K = 0;
267
- var n = g.__H || (g.__H = { __: [], __h: [] });
268
- return t >= n.__.length && n.__.push({}), n.__[t];
269
- }
270
- function Ne(t) {
271
- return K = 1, je(Fe, t);
272
- }
273
- function je(t, e, n) {
274
- var o = Ue(O++, 2);
275
- if (o.t = t, !o.__c && (o.__ = [Fe(void 0, e), function(a) {
276
- var u = o.__N ? o.__N[0] : o.__[0], c = o.t(u, a);
277
- u !== c && (o.__N = [c, o.__[1]], o.__c.setState({}));
278
- }], o.__c = g, !g.__f)) {
279
- var _ = function(a, u, c) {
280
- if (!o.__c.__H) return !0;
281
- var s = o.__c.__H.__.filter(function(p) {
282
- return !!p.__c;
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 (s.every(function(p) {
285
- return !p.__N;
286
- })) return !r || r.call(this, a, u, c);
287
- var i = o.__c.props !== a;
288
- return s.forEach(function(p) {
289
- if (p.__N) {
290
- var f = p.__[0];
291
- p.__ = p.__N, p.__N = void 0, f !== p.__[0] && (i = !0);
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
- }), r && r.call(this, a, u, c) || i;
293
+ }), o && o.call(this, a, f, s) || i;
294
294
  };
295
- g.__f = !0;
296
- var r = g.shouldComponentUpdate, l = g.componentWillUpdate;
297
- g.componentWillUpdate = function(a, u, c) {
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 s = r;
300
- r = void 0, _(a, u, c), r = s;
299
+ var p = o;
300
+ o = void 0, l(a, f, s), o = p;
301
301
  }
302
- l && l.call(this, a, u, c);
303
- }, g.shouldComponentUpdate = _;
302
+ _ && _.call(this, a, f, s);
303
+ }, m.shouldComponentUpdate = l;
304
304
  }
305
- return o.__N || o.__;
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 Oe(t, e) {
308
- var n = Ue(O++, 3);
309
- !y.__s && qe(n.__H, e) && (n.__ = t, n.u = e, g.__H.__h.push(n));
311
+ function We(e) {
312
+ return q = 5, qe(function() {
313
+ return { current: e };
314
+ }, []);
310
315
  }
311
- function We() {
312
- for (var t; t = Te.shift(); ) if (t.__P && t.__H) try {
313
- t.__H.__h.forEach(R), t.__H.__h.forEach(Q), t.__H.__h = [];
314
- } catch (e) {
315
- t.__H.__h = [], y.__e(e, t.__v);
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
- y.__b = function(t) {
319
- g = null, ce && ce(t);
320
- }, y.__ = function(t, e) {
321
- t && e.__k && e.__k.__m && (t.__m = e.__k.__m), de && de(t, e);
322
- }, y.__r = function(t) {
323
- ue && ue(t), O = 0;
324
- var e = (g = t.__c).__H;
325
- e && (Y === g ? (e.__h = [], g.__h = [], e.__.forEach(function(n) {
326
- n.__N && (n.__ = n.__N), n.u = n.__N = void 0;
327
- })) : (e.__h.forEach(R), e.__h.forEach(Q), e.__h = [], O = 0)), Y = g;
328
- }, y.diffed = function(t) {
329
- se && se(t);
330
- var e = t.__c;
331
- e && e.__H && (e.__H.__h.length && (Te.push(e) !== 1 && ae === y.requestAnimationFrame || ((ae = y.requestAnimationFrame) || Ie)(We)), e.__H.__.forEach(function(n) {
332
- n.u && (n.__H = n.u), n.u = void 0;
333
- })), Y = g = null;
334
- }, y.__c = function(t, e) {
335
- e.some(function(n) {
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
- n.__h.forEach(R), n.__h = n.__h.filter(function(o) {
338
- return !o.__ || Q(o);
346
+ r.__h.forEach(L), r.__h = r.__h.filter(function(t) {
347
+ return !t.__ || X(t);
339
348
  });
340
- } catch (o) {
341
- e.some(function(_) {
342
- _.__h && (_.__h = []);
343
- }), e = [], y.__e(o, n.__v);
349
+ } catch (t) {
350
+ n.some(function(l) {
351
+ l.__h && (l.__h = []);
352
+ }), n = [], b.__e(t, r.__v);
344
353
  }
345
- }), fe && fe(t, e);
346
- }, y.unmount = function(t) {
347
- pe && pe(t);
348
- var e, n = t.__c;
349
- n && n.__H && (n.__H.__.forEach(function(o) {
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
- R(o);
352
- } catch (_) {
353
- e = _;
360
+ L(t);
361
+ } catch (l) {
362
+ n = l;
354
363
  }
355
- }), n.__H = void 0, e && y.__e(e, n.__v));
364
+ }), r.__H = void 0, n && b.__e(n, r.__v));
356
365
  };
357
- var he = typeof requestAnimationFrame == "function";
358
- function Ie(t) {
359
- var e, n = function() {
360
- clearTimeout(o), he && cancelAnimationFrame(e), setTimeout(t);
361
- }, o = setTimeout(n, 35);
362
- he && (e = requestAnimationFrame(n));
363
- }
364
- function R(t) {
365
- var e = g, n = t.__c;
366
- typeof n == "function" && (t.__c = void 0, n()), g = e;
367
- }
368
- function Q(t) {
369
- var e = g;
370
- t.__c = t.__(), g = e;
371
- }
372
- function qe(t, e) {
373
- return !t || t.length !== e.length || e.some(function(n, o) {
374
- return n !== t[o];
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 Fe(t, e) {
378
- return typeof e == "function" ? e(t) : e;
386
+ function Re(e, n) {
387
+ return typeof n == "function" ? n(e) : n;
379
388
  }
380
- function Ve({ onClick: t, color: e, children: n }) {
381
- return /* @__PURE__ */ d(
389
+ function Je({ onClick: e, color: n, children: r }) {
390
+ return /* @__PURE__ */ u(
382
391
  "button",
383
392
  {
384
393
  style: {
385
- background: e || "#1890ff",
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: t,
394
- children: n
402
+ onClick: e,
403
+ children: r
395
404
  }
396
405
  );
397
406
  }
398
- function Ye({ visible: t, onClose: e, onSubmit: n, color: o }) {
399
- const [_, r] = Ne({
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 Oe(() => {
410
- t || r({
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
- }, [t]), t ? /* @__PURE__ */ d(
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.7)",
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: (u) => {
436
- u.target === u.currentTarget && e();
891
+ onClick: (d) => {
892
+ d.target === d.currentTarget && n();
437
893
  },
438
- children: /* @__PURE__ */ d(
894
+ children: /* @__PURE__ */ u(
439
895
  "form",
440
896
  {
441
- onSubmit: async (u) => {
442
- u.preventDefault();
897
+ onSubmit: async (d) => {
898
+ d.preventDefault();
443
899
  let c = !0;
444
- if (r((s) => ({ ...s, amountError: "", rechargeChannelError: "" })), _.amount.trim() || (r((s) => ({ ...s, amountError: "请输入充值金额" })), c = !1), _.rechargeChannel || (r((s) => ({ ...s, rechargeChannelError: "请选择支付平台" })), c = !1), !!c) {
445
- r((s) => ({ ...s, loading: !0, error: "" }));
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 n({ amount: _.amount, rechargeChannel: _.rechargeChannel, currency: _.currency }), e();
910
+ await r({
911
+ amount: l.amount,
912
+ rechargeChannel: l.rechargeChannel,
913
+ currency: l.currency
914
+ }), n();
448
915
  } catch {
449
- r((s) => ({ ...s, error: "提交失败,请重试" }));
916
+ o((h) => ({ ...h, error: "提交失败,请重试" }));
450
917
  } finally {
451
- r((s) => ({ ...s, loading: !1 }));
918
+ o((h) => ({ ...h, loading: !1 }));
452
919
  }
453
920
  }
454
921
  },
455
922
  style: {
456
- background: "#181A20",
923
+ background: "#fff",
924
+ // 白色弹窗
457
925
  padding: 32,
458
926
  borderRadius: 12,
459
- minWidth: 360,
460
- color: o || "#fff",
461
- boxShadow: "0 4px 24px rgba(0,0,0,0.5)",
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: (u) => u.stopPropagation(),
933
+ onClick: (d) => d.stopPropagation(),
465
934
  children: [
466
- /* @__PURE__ */ d(
935
+ /* @__PURE__ */ u(
467
936
  "button",
468
937
  {
469
938
  type: "button",
470
- onClick: e,
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: "#fff",
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__ */ d("div", { style: { fontWeight: 600, fontSize: 18, marginBottom: 24, textAlign: "left" }, children: "在线充值" }),
487
- /* @__PURE__ */ d("div", { style: { marginBottom: 18 }, children: [
488
- /* @__PURE__ */ d("div", { style: { marginBottom: 8, fontSize: 14 }, children: [
489
- /* @__PURE__ */ d("span", { style: { color: "#00E8C6" }, children: "*" }),
490
- " 充值金额"
491
- ] }),
492
- /* @__PURE__ */ d(
493
- "input",
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: "text",
496
- placeholder: "请输入充值金额",
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
- width: "100%",
508
- padding: "10px 12px",
509
- borderRadius: 6,
510
- boxSizing: "border-box",
511
- border: _.amountError ? "1px solid #ff4d4f" : "1px solid #23262F",
512
- background: "#23262F",
513
- color: "#fff",
514
- fontSize: 15,
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
- marginBottom: 0
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
- value: _.rechargeChannel,
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
- _.rechargeChannelError && /* @__PURE__ */ d("div", { style: { color: "#ff4d4f", fontSize: 13, marginTop: 4 }, children: _.rechargeChannelError })
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
- width: "100%",
565
- padding: "10px 12px",
566
- borderRadius: 6,
567
- border: "1px solid #23262F",
568
- background: "#23262F",
569
- color: "#fff",
570
- fontSize: 15,
571
- outline: "none"
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
- value: _.currency,
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
- _.error && /* @__PURE__ */ d("div", { style: { color: "#ff4d4f", marginBottom: 12 }, children: _.error }),
583
- /* @__PURE__ */ d("div", { style: { display: "flex", justifyContent: "flex-end", gap: 12 }, children: [
584
- /* @__PURE__ */ d(
585
- "button",
586
- {
587
- type: "button",
588
- onClick: e,
589
- style: { background: "#23262F", color: "#fff", border: "none", borderRadius: 6, padding: "8px 24px", fontSize: 15, cursor: "pointer" },
590
- children: "取消"
591
- }
592
- ),
593
- /* @__PURE__ */ d(
594
- "button",
595
- {
596
- type: "submit",
597
- disabled: _.loading,
598
- style: { background: "#00E8C6", color: "#fff", border: "none", borderRadius: 6, padding: "8px 24px", fontSize: 15, cursor: "pointer", fontWeight: 600 },
599
- children: _.loading ? "提交中..." : "去支付"
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 ne() {
610
- return (ne = Object.assign ? Object.assign.bind() : function(t) {
611
- for (var e = 1; e < arguments.length; e++) {
612
- var n = arguments[e];
613
- for (var o in n) Object.prototype.hasOwnProperty.call(n, o) && (t[o] = n[o]);
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 t;
1046
+ return e;
616
1047
  }).apply(this, arguments);
617
1048
  }
618
- var Ge = ["context", "children"];
619
- function Je(t) {
1049
+ var Xe = ["context", "children"];
1050
+ function Ze(e) {
620
1051
  this.getChildContext = function() {
621
- return t.context;
1052
+ return e.context;
622
1053
  };
623
- var e = t.children, n = function(o, _) {
624
- if (o == null) return {};
625
- var r, l, a = {}, u = Object.keys(o);
626
- for (l = 0; l < u.length; l++) _.indexOf(r = u[l]) >= 0 || (a[r] = o[r]);
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
- }(t, Ge);
629
- return He(e, n);
630
- }
631
- function Ke() {
632
- var t = new CustomEvent("_preact", { detail: {}, bubbles: !0, cancelable: !0 });
633
- this.dispatchEvent(t), this._vdom = $(Je, ne({}, this._props, { context: t.detail.context }), function e(n, o) {
634
- if (n.nodeType === 3) return n.data;
635
- if (n.nodeType !== 1) return null;
636
- var _ = [], r = {}, l = 0, a = n.attributes, u = n.childNodes;
637
- for (l = a.length; l--; ) a[l].name !== "slot" && (r[a[l].name] = a[l].value, r[Ae(a[l].name)] = a[l].value);
638
- for (l = u.length; l--; ) {
639
- var c = e(u[l], null), s = u[l].slot;
640
- s ? r[s] = $(me, { name: s }, c) : _[l] = c;
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 = o ? $(me, null, _) : _;
643
- return $(o || n.nodeName.toLowerCase(), r, i);
644
- }(this, this._vdomComponent)), (this.hasAttribute("hydrate") ? Pe : q)(this._vdom, this._root);
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 Ae(t) {
647
- return t.replace(/-(\w)/g, function(e, n) {
648
- return n ? n.toUpperCase() : "";
1077
+ function Te(e) {
1078
+ return e.replace(/-(\w)/g, function(n, r) {
1079
+ return r ? r.toUpperCase() : "";
649
1080
  });
650
1081
  }
651
- function Qe(t, e, n) {
1082
+ function nn(e, n, r) {
652
1083
  if (this._vdom) {
653
- var o = {};
654
- o[t] = n = n ?? void 0, o[Ae(t)] = n, this._vdom = He(this._vdom, o), q(this._vdom, this._root);
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 Xe() {
658
- q(this._vdom = null, this._root);
1088
+ function rn() {
1089
+ V(this._vdom = null, this._root);
659
1090
  }
660
- function me(t, e) {
661
- var n = this;
662
- return $("slot", ne({}, t, { ref: function(o) {
663
- o ? (n.ref = o, n._listener || (n._listener = function(_) {
664
- _.stopPropagation(), _.detail.context = e;
665
- }, o.addEventListener("_preact", n._listener))) : n.ref.removeEventListener("_preact", n._listener);
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 Ze(t, e, n, o) {
669
- function _() {
670
- var r = Reflect.construct(HTMLElement, [], _);
671
- return r._vdomComponent = t, r._root = r, r;
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 (_.prototype = Object.create(HTMLElement.prototype)).constructor = _, _.prototype.connectedCallback = Ke, _.prototype.attributeChangedCallback = Qe, _.prototype.disconnectedCallback = Xe, n = n || t.observedAttributes || Object.keys(t.propTypes || {}), _.observedAttributes = n, n.forEach(function(r) {
674
- Object.defineProperty(_.prototype, r, { get: function() {
675
- return this._vdom.props[r];
676
- }, set: function(l) {
677
- this._vdom ? this.attributeChangedCallback(r, null, l) : (this._props || (this._props = {}), this._props[r] = l, this.connectedCallback());
678
- var a = typeof l;
679
- l != null && a !== "string" && a !== "boolean" && a !== "number" || this.setAttribute(r, l);
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(e, _);
682
- }
683
- function et(t) {
684
- const [e, n] = Ne(!1), o = t.theme?.primaryColor;
685
- return /* @__PURE__ */ d("div", { children: [
686
- /* @__PURE__ */ d(Ve, { color: o, onClick: () => n(!0), children: "打开表单" }),
687
- /* @__PURE__ */ d(
688
- Ye,
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: e,
691
- onClose: () => n(!1),
692
- onSubmit: async (r) => {
693
- console.log("submit", r);
1121
+ visible: n,
1122
+ onClose: () => r(!1),
1123
+ onSubmit: async (o) => {
1124
+ console.log("submit", o);
694
1125
  },
695
- color: o
1126
+ color: t
696
1127
  }
697
1128
  )
698
1129
  ] });
699
1130
  }
700
- Ze(et, "x-best-modal-form", ["theme"]);
701
- const rt = ["x-greeting", "x-best-modal-form"];
1131
+ tn(on, "x-best-modal-form", ["theme"]);
1132
+ const an = ["x-greeting", "x-best-modal-form"];
702
1133
  export {
703
- rt as components,
704
- tt as npmTest,
705
- nt as printCurrentTime
1134
+ an as components,
1135
+ ln as npmTest,
1136
+ _n as printCurrentTime
706
1137
  };