best-unit 1.0.12 → 1.0.14

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.
@@ -71,4 +71,9 @@
71
71
  transform-origin: center;
72
72
  will-change: transform;
73
73
  }
74
- `}),h(On,{onClick:async()=>{o(!0);try{Bn(),await new Promise(d=>setTimeout(d,300))}finally{o(!1)}},color:e,children:h("div",{style:l,children:[h("svg",{className:"refresh-icon",width:t==="small"?"14":t==="large"?"24":"18",height:t==="small"?"14":t==="large"?"24":"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{animation:r?"spin 0.6s linear infinite":"none",transition:"all 0.2s ease"},children:[h("path",{d:"M21 2v6h-6"}),h("path",{d:"M3 12a9 9 0 0 1 15-6.7L21 8"}),h("path",{d:"M3 22v-6h6"}),h("path",{d:"M21 12a9 9 0 0 1-15 6.7L3 16"})]}),n&&h("span",{children:n})]})})]})}st(pi,"best-refresh-button");const hi=["best-recharge","best-statistical-balance","best-refresh-button"];exports.components=hi;exports.getBalanceData=Po;exports.initFundUnit=No;exports.npmTest=Nn;exports.printCurrentTime=In;exports.refreshBalance=Bn;exports.viteProxy=Io;
74
+
75
+ /* 隐藏 fallback content */
76
+ :host {
77
+ display: inline-block;
78
+ }
79
+ `}),h(On,{onClick:async()=>{o(!0);try{Bn(),await new Promise(d=>setTimeout(d,300))}finally{o(!1)}},color:e,children:h("div",{style:l,children:[h("svg",{className:"refresh-icon",width:t==="small"?"14":t==="large"?"24":"18",height:t==="small"?"14":t==="large"?"24":"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{animation:r?"spin 0.6s linear infinite":"none",transition:"all 0.2s ease"},children:[h("path",{d:"M21 2v6h-6"}),h("path",{d:"M3 12a9 9 0 0 1 15-6.7L21 8"}),h("path",{d:"M3 22v-6h6"}),h("path",{d:"M21 12a9 9 0 0 1-15 6.7L3 16"})]}),n&&h("span",{children:n})]})})]})}st(pi,"best-refresh-button",[],{shadow:!0});const hi=["best-recharge","best-statistical-balance","best-refresh-button"];exports.components=hi;exports.getBalanceData=Po;exports.initFundUnit=No;exports.npmTest=Nn;exports.printCurrentTime=In;exports.refreshBalance=Bn;exports.viteProxy=Io;
package/dist/best-unit.js CHANGED
@@ -9,10 +9,10 @@ function $t(e, t) {
9
9
  return e.apply(t, arguments);
10
10
  };
11
11
  }
12
- const { toString: Pn } = Object.prototype, { getPrototypeOf: Ze } = Object, { iterator: Te, toStringTag: Wt } = Symbol, ke = /* @__PURE__ */ ((e) => (t) => {
12
+ const { toString: Pn } = Object.prototype, { getPrototypeOf: Ze } = Object, { iterator: ke, toStringTag: Wt } = Symbol, Te = /* @__PURE__ */ ((e) => (t) => {
13
13
  const n = Pn.call(t);
14
14
  return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
15
- })(/* @__PURE__ */ Object.create(null)), D = (e) => (e = e.toLowerCase(), (t) => ke(t) === e), Re = (e) => (t) => typeof t === e, { isArray: Q } = Array, oe = Re("undefined");
15
+ })(/* @__PURE__ */ Object.create(null)), D = (e) => (e = e.toLowerCase(), (t) => Te(t) === e), Re = (e) => (t) => typeof t === e, { isArray: Q } = Array, oe = Re("undefined");
16
16
  function Nn(e) {
17
17
  return e !== null && !oe(e) && e.constructor !== null && !oe(e.constructor) && P(e.constructor.isBuffer) && e.constructor.isBuffer(e);
18
18
  }
@@ -22,13 +22,13 @@ function In(e) {
22
22
  return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && qt(e.buffer), t;
23
23
  }
24
24
  const Dn = Re("string"), P = Re("function"), Jt = Re("number"), Ce = (e) => e !== null && typeof e == "object", Ln = (e) => e === !0 || e === !1, he = (e) => {
25
- if (ke(e) !== "object")
25
+ if (Te(e) !== "object")
26
26
  return !1;
27
27
  const t = Ze(e);
28
- return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Wt in e) && !(Te in e);
28
+ return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Wt in e) && !(ke in e);
29
29
  }, Un = D("Date"), zn = D("File"), Hn = D("Blob"), Mn = D("FileList"), jn = (e) => Ce(e) && P(e.pipe), $n = (e) => {
30
30
  let t;
31
- return e && (typeof FormData == "function" && e instanceof FormData || P(e.append) && ((t = ke(e)) === "formdata" || // detect form-data instance
31
+ return e && (typeof FormData == "function" && e instanceof FormData || P(e.append) && ((t = Te(e)) === "formdata" || // detect form-data instance
32
32
  t === "object" && P(e.toString) && e.toString() === "[object FormData]"));
33
33
  }, Wn = D("URLSearchParams"), [qn, Jn, Vn, Gn] = ["ReadableStream", "Request", "Response", "Headers"].map(D), Kn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
34
34
  function le(e, t, { allOwnKeys: n = !1 } = {}) {
@@ -94,7 +94,7 @@ const Xn = (e, t, n, { allOwnKeys: r } = {}) => (le(t, (o, i) => {
94
94
  n[t] = e[t];
95
95
  return n;
96
96
  }, nr = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Ze(Uint8Array)), rr = (e, t) => {
97
- const r = (e && e[Te]).call(e);
97
+ const r = (e && e[ke]).call(e);
98
98
  let o;
99
99
  for (; (o = r.next()) && !o.done; ) {
100
100
  const i = o.value;
@@ -142,7 +142,7 @@ const Xn = (e, t, n, { allOwnKeys: r } = {}) => (le(t, (o, i) => {
142
142
  }, ur = () => {
143
143
  }, dr = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
144
144
  function fr(e) {
145
- return !!(e && P(e.append) && e[Wt] === "FormData" && e[Te]);
145
+ return !!(e && P(e.append) && e[Wt] === "FormData" && e[ke]);
146
146
  }
147
147
  const pr = (e) => {
148
148
  const t = new Array(10), n = (r, o) => {
@@ -168,7 +168,7 @@ const pr = (e) => {
168
168
  }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
169
169
  typeof setImmediate == "function",
170
170
  P(q.postMessage)
171
- ), _r = typeof queueMicrotask < "u" ? queueMicrotask.bind(q) : typeof process < "u" && process.nextTick || Xt, br = (e) => e != null && P(e[Te]), f = {
171
+ ), _r = typeof queueMicrotask < "u" ? queueMicrotask.bind(q) : typeof process < "u" && process.nextTick || Xt, br = (e) => e != null && P(e[ke]), f = {
172
172
  isArray: Q,
173
173
  isArrayBuffer: qt,
174
174
  isBuffer: Nn,
@@ -200,7 +200,7 @@ const pr = (e) => {
200
200
  stripBOM: Zn,
201
201
  inherits: Qn,
202
202
  toFlatObject: Yn,
203
- kindOf: ke,
203
+ kindOf: Te,
204
204
  kindOfTest: D,
205
205
  endsWith: er,
206
206
  toArray: tr,
@@ -324,10 +324,10 @@ function Ae(e, t, n) {
324
324
  if (f.endsWith(g, "{}"))
325
325
  g = r ? g : g.slice(0, -2), b = JSON.stringify(b);
326
326
  else if (f.isArray(b) && yr(b) || (f.isFileList(b) || f.endsWith(g, "[]")) && (y = f.toArray(b)))
327
- return g = Yt(g), y.forEach(function(x, T) {
327
+ return g = Yt(g), y.forEach(function(x, k) {
328
328
  !(f.isUndefined(x) || x === null) && t.append(
329
329
  // eslint-disable-next-line no-nested-ternary
330
- s === !0 ? lt([g], T, i) : s === null ? g : g + "[]",
330
+ s === !0 ? lt([g], k, i) : s === null ? g : g + "[]",
331
331
  a(x)
332
332
  );
333
333
  }), !1;
@@ -463,7 +463,7 @@ const nn = {
463
463
  silentJSONParsing: !0,
464
464
  forcedJSONParsing: !0,
465
465
  clarifyTimeoutError: !1
466
- }, Er = typeof URLSearchParams < "u" ? URLSearchParams : Qe, Sr = typeof FormData < "u" ? FormData : null, vr = typeof Blob < "u" ? Blob : null, Tr = {
466
+ }, Er = typeof URLSearchParams < "u" ? URLSearchParams : Qe, Sr = typeof FormData < "u" ? FormData : null, vr = typeof Blob < "u" ? Blob : null, kr = {
467
467
  isBrowser: !0,
468
468
  classes: {
469
469
  URLSearchParams: Er,
@@ -471,17 +471,17 @@ const nn = {
471
471
  Blob: vr
472
472
  },
473
473
  protocols: ["http", "https", "file", "blob", "url", "data"]
474
- }, Ye = typeof window < "u" && typeof document < "u", je = typeof navigator == "object" && navigator || void 0, kr = Ye && (!je || ["ReactNative", "NativeScript", "NS"].indexOf(je.product) < 0), Rr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
474
+ }, Ye = typeof window < "u" && typeof document < "u", je = typeof navigator == "object" && navigator || void 0, Tr = Ye && (!je || ["ReactNative", "NativeScript", "NS"].indexOf(je.product) < 0), Rr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
475
475
  self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Cr = Ye && window.location.href || "http://localhost", Ar = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
476
476
  __proto__: null,
477
477
  hasBrowserEnv: Ye,
478
- hasStandardBrowserEnv: kr,
478
+ hasStandardBrowserEnv: Tr,
479
479
  hasStandardBrowserWebWorkerEnv: Rr,
480
480
  navigator: je,
481
481
  origin: Cr
482
482
  }, Symbol.toStringTag, { value: "Module" })), F = {
483
483
  ...Ar,
484
- ...Tr
484
+ ...kr
485
485
  };
486
486
  function Fr(e, t) {
487
487
  return Ae(e, new F.classes.URLSearchParams(), Object.assign({
@@ -1044,16 +1044,16 @@ const ln = (e) => {
1044
1044
  }, _.onerror = function() {
1045
1045
  r(new S("Network Error", S.ERR_NETWORK, e, _)), _ = null;
1046
1046
  }, _.ontimeout = function() {
1047
- let T = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
1047
+ let k = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
1048
1048
  const A = o.transitional || nn;
1049
- o.timeoutErrorMessage && (T = o.timeoutErrorMessage), r(new S(
1050
- T,
1049
+ o.timeoutErrorMessage && (k = o.timeoutErrorMessage), r(new S(
1050
+ k,
1051
1051
  A.clarifyTimeoutError ? S.ETIMEDOUT : S.ECONNABORTED,
1052
1052
  e,
1053
1053
  _
1054
1054
  )), _ = null;
1055
- }, i === void 0 && s.setContentType(null), "setRequestHeader" in _ && f.forEach(s.toJSON(), function(T, A) {
1056
- _.setRequestHeader(A, T);
1055
+ }, i === void 0 && s.setContentType(null), "setRequestHeader" in _ && f.forEach(s.toJSON(), function(k, A) {
1056
+ _.setRequestHeader(A, k);
1057
1057
  }), f.isUndefined(o.withCredentials) || (_.withCredentials = !!o.withCredentials), l && l !== "json" && (_.responseType = o.responseType), a && ([m, b] = we(a, !0), _.addEventListener("progress", m)), u && _.upload && ([c, p] = we(u), _.upload.addEventListener("progress", c), _.upload.addEventListener("loadend", p)), (o.cancelToken || o.signal) && (d = (x) => {
1058
1058
  _ && (r(!x || x.type ? new Y(null, e, _) : x), _.abort(), _ = null);
1059
1059
  }, o.cancelToken && o.cancelToken.subscribe(d), o.signal && (o.signal.aborted ? d() : o.signal.addEventListener("abort", d)));
@@ -1253,10 +1253,10 @@ const to = async (e) => {
1253
1253
  );
1254
1254
  }
1255
1255
  a = a || "text";
1256
- let T = await xe[f.findKey(xe, a) || "text"](w, e);
1256
+ let k = await xe[f.findKey(xe, a) || "text"](w, e);
1257
1257
  return !x && g && g(), await new Promise((A, O) => {
1258
1258
  sn(A, O, {
1259
- data: T,
1259
+ data: k,
1260
1260
  headers: N.from(w.headers),
1261
1261
  status: w.status,
1262
1262
  statusText: w.statusText,
@@ -1700,8 +1700,8 @@ const {
1700
1700
  spread: Ei,
1701
1701
  toFormData: Si,
1702
1702
  AxiosHeaders: vi,
1703
- HttpStatusCode: Ti,
1704
- formToJSON: ki,
1703
+ HttpStatusCode: ki,
1704
+ formToJSON: Ti,
1705
1705
  getAdapter: Ri,
1706
1706
  mergeConfig: Ci
1707
1707
  } = R;
@@ -1759,7 +1759,7 @@ function xn(e, t, n, r, o, i, s, l, u, a, d) {
1759
1759
  function uo(e, t, n, r, o) {
1760
1760
  var i, s, l, u, a, d = n.length, c = d, m = 0;
1761
1761
  for (e.__k = new Array(o), i = 0; i < o; i++) (s = t[i]) != null && typeof s != "boolean" && typeof s != "function" ? (u = i + m, (s = e.__k[i] = typeof s == "string" || typeof s == "number" || typeof s == "bigint" || s.constructor == String ? re(null, s, null, null, null) : Oe(s) ? re(G, { children: s }, null, null, null) : s.constructor == null && s.__b > 0 ? re(s.type, s.props, s.key, s.ref ? s.ref : null, s.__v) : s).__ = e, s.__b = e.__b + 1, l = null, (a = s.__i = fo(s, n, u, c)) != -1 && (c--, (l = n[a]) && (l.__u |= 2)), l == null || l.__v == null ? (a == -1 && (o > d ? m-- : o < d && m++), typeof s.type != "function" && (s.__u |= 4)) : a != u && (a == u - 1 ? m-- : a == u + 1 ? m++ : (a > u ? m-- : m++, s.__u |= 4))) : e.__k[i] = null;
1762
- if (c) for (i = 0; i < d; i++) (l = n[i]) != null && (2 & l.__u) == 0 && (l.__e == r && (r = Z(l)), Tn(l, l));
1762
+ if (c) for (i = 0; i < d; i++) (l = n[i]) != null && (2 & l.__u) == 0 && (l.__e == r && (r = Z(l)), kn(l, l));
1763
1763
  return r;
1764
1764
  }
1765
1765
  function En(e, t, n) {
@@ -1821,24 +1821,24 @@ function St(e) {
1821
1821
  };
1822
1822
  }
1823
1823
  function nt(e, t, n, r, o, i, s, l, u, a) {
1824
- var d, c, m, p, b, g, _, y, w, x, T, A, O, U, j, $, Ie, z = t.type;
1824
+ var d, c, m, p, b, g, _, y, w, x, k, A, O, U, j, $, Ie, z = t.type;
1825
1825
  if (t.constructor != null) return null;
1826
1826
  128 & n.__u && (u = !!(32 & n.__u), i = [l = t.__e = n.__e]), (d = v.__b) && d(t);
1827
1827
  e: if (typeof z == "function") try {
1828
- if (y = t.props, w = "prototype" in z && z.prototype.render, x = (d = z.contextType) && r[d.__c], T = d ? x ? x.props.value : d.__ : r, n.__c ? _ = (c = t.__c = n.__c).__ = c.__E : (w ? t.__c = c = new z(y, T) : (t.__c = c = new be(y, T), c.constructor = z, c.render = ho), x && x.sub(c), c.props = y, c.state || (c.state = {}), c.context = T, c.__n = r, m = c.__d = !0, c.__h = [], c._sb = []), w && c.__s == null && (c.__s = c.state), w && z.getDerivedStateFromProps != null && (c.__s == c.state && (c.__s = M({}, c.__s)), M(c.__s, z.getDerivedStateFromProps(y, c.__s))), p = c.props, b = c.state, c.__v = t, m) w && z.getDerivedStateFromProps == null && c.componentWillMount != null && c.componentWillMount(), w && c.componentDidMount != null && c.__h.push(c.componentDidMount);
1828
+ if (y = t.props, w = "prototype" in z && z.prototype.render, x = (d = z.contextType) && r[d.__c], k = d ? x ? x.props.value : d.__ : r, n.__c ? _ = (c = t.__c = n.__c).__ = c.__E : (w ? t.__c = c = new z(y, k) : (t.__c = c = new be(y, k), c.constructor = z, c.render = ho), x && x.sub(c), c.props = y, c.state || (c.state = {}), c.context = k, c.__n = r, m = c.__d = !0, c.__h = [], c._sb = []), w && c.__s == null && (c.__s = c.state), w && z.getDerivedStateFromProps != null && (c.__s == c.state && (c.__s = M({}, c.__s)), M(c.__s, z.getDerivedStateFromProps(y, c.__s))), p = c.props, b = c.state, c.__v = t, m) w && z.getDerivedStateFromProps == null && c.componentWillMount != null && c.componentWillMount(), w && c.componentDidMount != null && c.__h.push(c.componentDidMount);
1829
1829
  else {
1830
- if (w && z.getDerivedStateFromProps == null && y !== p && c.componentWillReceiveProps != null && c.componentWillReceiveProps(y, T), !c.__e && c.shouldComponentUpdate != null && c.shouldComponentUpdate(y, c.__s, T) === !1 || t.__v == n.__v) {
1830
+ if (w && z.getDerivedStateFromProps == null && y !== p && c.componentWillReceiveProps != null && c.componentWillReceiveProps(y, k), !c.__e && c.shouldComponentUpdate != null && c.shouldComponentUpdate(y, c.__s, k) === !1 || t.__v == n.__v) {
1831
1831
  for (t.__v != n.__v && (c.props = y, c.state = c.__s, c.__d = !1), t.__e = n.__e, t.__k = n.__k, t.__k.some(function(te) {
1832
1832
  te && (te.__ = t);
1833
1833
  }), A = 0; A < c._sb.length; A++) c.__h.push(c._sb[A]);
1834
1834
  c._sb = [], c.__h.length && s.push(c);
1835
1835
  break e;
1836
1836
  }
1837
- c.componentWillUpdate != null && c.componentWillUpdate(y, c.__s, T), w && c.componentDidUpdate != null && c.__h.push(function() {
1837
+ c.componentWillUpdate != null && c.componentWillUpdate(y, c.__s, k), w && c.componentDidUpdate != null && c.__h.push(function() {
1838
1838
  c.componentDidUpdate(p, b, g);
1839
1839
  });
1840
1840
  }
1841
- if (c.context = T, c.props = y, c.__P = e, c.__e = !1, O = v.__r, U = 0, w) {
1841
+ if (c.context = k, c.props = y, c.__P = e, c.__e = !1, O = v.__r, U = 0, w) {
1842
1842
  for (c.state = c.__s, c.__d = !1, O && O(t), d = c.render(c.props, c.state, c.context), j = 0; j < c._sb.length; j++) c.__h.push(c._sb[j]);
1843
1843
  c._sb = [];
1844
1844
  } else do
@@ -1910,7 +1910,7 @@ function rt(e, t, n) {
1910
1910
  v.__e(o, n);
1911
1911
  }
1912
1912
  }
1913
- function Tn(e, t, n) {
1913
+ function kn(e, t, n) {
1914
1914
  var r, o;
1915
1915
  if (v.unmount && v.unmount(e), (r = e.ref) && (r.current && r.current != e.__e || rt(r, null, t)), (r = e.__c) != null) {
1916
1916
  if (r.componentWillUnmount) try {
@@ -1920,7 +1920,7 @@ function Tn(e, t, n) {
1920
1920
  }
1921
1921
  r.base = r.__P = null;
1922
1922
  }
1923
- if (r = e.__k) for (o = 0; o < r.length; o++) r[o] && Tn(r[o], t, n || typeof e.type != "function");
1923
+ if (r = e.__k) for (o = 0; o < r.length; o++) r[o] && kn(r[o], t, n || typeof e.type != "function");
1924
1924
  n || tt(e.__e), e.__c = e.__ = e.__e = void 0;
1925
1925
  }
1926
1926
  function ho(e, t, n) {
@@ -1930,8 +1930,8 @@ function Pe(e, t, n) {
1930
1930
  var r, o, i, s;
1931
1931
  t == document && (t = document.documentElement), v.__ && v.__(e, t), o = (r = typeof n == "function") ? null : n && n.__k || t.__k, i = [], s = [], nt(t, e = (!r && n || t).__k = X(G, null, [e]), o || ie, ie, t.namespaceURI, !r && n ? [n] : o ? null : t.firstChild ? ue.call(t.childNodes) : null, i, !r && n ? n : o ? o.__e : t.firstChild, r, s), Sn(i, e, s);
1932
1932
  }
1933
- function kn(e, t) {
1934
- Pe(e, t, kn);
1933
+ function Tn(e, t) {
1934
+ Pe(e, t, Tn);
1935
1935
  }
1936
1936
  function Rn(e, t, n) {
1937
1937
  var r, o, i, s, l = M({}, e.props);
@@ -1962,10 +1962,10 @@ function h(e, t, n, r, o, i) {
1962
1962
  if (typeof e == "function" && (s = e.defaultProps)) for (l in s) u[l] === void 0 && (u[l] = s[l]);
1963
1963
  return v.vnode && v.vnode(a), a;
1964
1964
  }
1965
- var se, k, ze, vt, Se = 0, Cn = [], C = v, Tt = C.__b, kt = C.__r, Rt = C.diffed, Ct = C.__c, At = C.unmount, Ft = C.__;
1965
+ var se, T, ze, vt, Se = 0, Cn = [], C = v, kt = C.__b, Tt = C.__r, Rt = C.diffed, Ct = C.__c, At = C.unmount, Ft = C.__;
1966
1966
  function ot(e, t) {
1967
- C.__h && C.__h(k, e, Se || t), Se = 0;
1968
- var n = k.__H || (k.__H = { __: [], __h: [] });
1967
+ C.__h && C.__h(T, e, Se || t), Se = 0;
1968
+ var n = T.__H || (T.__H = { __: [], __h: [] });
1969
1969
  return e >= n.__.length && n.__.push({}), n.__[e];
1970
1970
  }
1971
1971
  function B(e) {
@@ -1976,7 +1976,7 @@ function _o(e, t, n) {
1976
1976
  if (r.t = e, !r.__c && (r.__ = [Fn(void 0, t), function(l) {
1977
1977
  var u = r.__N ? r.__N[0] : r.__[0], a = r.t(u, l);
1978
1978
  u !== a && (r.__N = [a, r.__[1]], r.__c.setState({}));
1979
- }], r.__c = k, !k.__f)) {
1979
+ }], r.__c = T, !T.__f)) {
1980
1980
  var o = function(l, u, a) {
1981
1981
  if (!r.__c.__H) return !0;
1982
1982
  var d = r.__c.__H.__.filter(function(m) {
@@ -1993,21 +1993,21 @@ function _o(e, t, n) {
1993
1993
  }
1994
1994
  }), i && i.call(this, l, u, a) || c;
1995
1995
  };
1996
- k.__f = !0;
1997
- var i = k.shouldComponentUpdate, s = k.componentWillUpdate;
1998
- k.componentWillUpdate = function(l, u, a) {
1996
+ T.__f = !0;
1997
+ var i = T.shouldComponentUpdate, s = T.componentWillUpdate;
1998
+ T.componentWillUpdate = function(l, u, a) {
1999
1999
  if (this.__e) {
2000
2000
  var d = i;
2001
2001
  i = void 0, o(l, u, a), i = d;
2002
2002
  }
2003
2003
  s && s.call(this, l, u, a);
2004
- }, k.shouldComponentUpdate = o;
2004
+ }, T.shouldComponentUpdate = o;
2005
2005
  }
2006
2006
  return r.__N || r.__;
2007
2007
  }
2008
2008
  function ae(e, t) {
2009
2009
  var n = ot(se++, 3);
2010
- !C.__s && An(n.__H, t) && (n.__ = e, n.u = t, k.__H.__h.push(n));
2010
+ !C.__s && An(n.__H, t) && (n.__ = e, n.u = t, T.__H.__h.push(n));
2011
2011
  }
2012
2012
  function ve(e) {
2013
2013
  return Se = 5, bo(function() {
@@ -2026,21 +2026,21 @@ function go() {
2026
2026
  }
2027
2027
  }
2028
2028
  C.__b = function(e) {
2029
- k = null, Tt && Tt(e);
2029
+ T = null, kt && kt(e);
2030
2030
  }, C.__ = function(e, t) {
2031
2031
  e && t.__k && t.__k.__m && (e.__m = t.__k.__m), Ft && Ft(e, t);
2032
2032
  }, C.__r = function(e) {
2033
- kt && kt(e), se = 0;
2034
- var t = (k = e.__c).__H;
2035
- t && (ze === k ? (t.__h = [], k.__h = [], t.__.forEach(function(n) {
2033
+ Tt && Tt(e), se = 0;
2034
+ var t = (T = e.__c).__H;
2035
+ t && (ze === T ? (t.__h = [], T.__h = [], t.__.forEach(function(n) {
2036
2036
  n.__N && (n.__ = n.__N), n.u = n.__N = void 0;
2037
- })) : (t.__h.forEach(ge), t.__h.forEach(Ge), t.__h = [], se = 0)), ze = k;
2037
+ })) : (t.__h.forEach(ge), t.__h.forEach(Ge), t.__h = [], se = 0)), ze = T;
2038
2038
  }, C.diffed = function(e) {
2039
2039
  Rt && Rt(e);
2040
2040
  var t = e.__c;
2041
2041
  t && t.__H && (t.__H.__h.length && (Cn.push(t) !== 1 && vt === C.requestAnimationFrame || ((vt = C.requestAnimationFrame) || yo)(go)), t.__H.__.forEach(function(n) {
2042
2042
  n.u && (n.__H = n.u), n.u = void 0;
2043
- })), ze = k = null;
2043
+ })), ze = T = null;
2044
2044
  }, C.__c = function(e, t) {
2045
2045
  t.some(function(n) {
2046
2046
  try {
@@ -2072,12 +2072,12 @@ function yo(e) {
2072
2072
  Bt && (t = requestAnimationFrame(n));
2073
2073
  }
2074
2074
  function ge(e) {
2075
- var t = k, n = e.__c;
2076
- typeof n == "function" && (e.__c = void 0, n()), k = t;
2075
+ var t = T, n = e.__c;
2076
+ typeof n == "function" && (e.__c = void 0, n()), T = t;
2077
2077
  }
2078
2078
  function Ge(e) {
2079
- var t = k;
2080
- e.__c = e.__(), k = t;
2079
+ var t = T;
2080
+ e.__c = e.__(), T = t;
2081
2081
  }
2082
2082
  function An(e, t) {
2083
2083
  return !e || e.length !== t.length || t.some(function(n, r) {
@@ -2280,7 +2280,7 @@ function vo() {
2280
2280
  return sessionStorage.setItem("balanceData", JSON.stringify(r)), r;
2281
2281
  });
2282
2282
  }
2283
- const To = async () => ee().get("/all-dicts", {}).then((e) => (sessionStorage.setItem("all_dicts", JSON.stringify(e.data)), e.data || {})), ko = async (e, t) => ee().post("/oss/upload", e, {
2283
+ const ko = async () => ee().get("/all-dicts", {}).then((e) => (sessionStorage.setItem("all_dicts", JSON.stringify(e.data)), e.data || {})), To = async (e, t) => ee().post("/oss/upload", e, {
2284
2284
  headers: {
2285
2285
  "Content-Type": "multipart/form-data"
2286
2286
  },
@@ -2347,7 +2347,7 @@ function Fi(e) {
2347
2347
  locale: s,
2348
2348
  env: l
2349
2349
  })
2350
- ), So(), To(), {
2350
+ ), So(), ko(), {
2351
2351
  token: u,
2352
2352
  merchantId: t,
2353
2353
  bizType: n,
@@ -2611,8 +2611,8 @@ const Xe = ({
2611
2611
  const [c, m] = B(!1), p = ve(null), [b, g] = B(null), _ = Lo();
2612
2612
  ae(() => {
2613
2613
  if (!c) return;
2614
- const x = (T) => {
2615
- p.current && !p.current.contains(T.target) && m(!1);
2614
+ const x = (k) => {
2615
+ p.current && !p.current.contains(k.target) && m(!1);
2616
2616
  };
2617
2617
  return document.addEventListener("mousedown", x), () => document.removeEventListener("mousedown", x);
2618
2618
  }, [c]);
@@ -2754,13 +2754,13 @@ const Xe = ({
2754
2754
  ]
2755
2755
  }
2756
2756
  ),
2757
- n.map((x, T) => /* @__PURE__ */ h(
2757
+ n.map((x, k) => /* @__PURE__ */ h(
2758
2758
  "div",
2759
2759
  {
2760
2760
  onClick: () => {
2761
2761
  x.disabled || (m(!1), t?.(x.value));
2762
2762
  },
2763
- onMouseEnter: () => g(T),
2763
+ onMouseEnter: () => g(k),
2764
2764
  onMouseLeave: () => g(null),
2765
2765
  style: {
2766
2766
  padding: "10px 16px",
@@ -2770,7 +2770,7 @@ const Xe = ({
2770
2770
  ..._.option(
2771
2771
  e === x.value,
2772
2772
  !!x.disabled,
2773
- b === T
2773
+ b === k
2774
2774
  )
2775
2775
  },
2776
2776
  children: x.label
@@ -3143,9 +3143,9 @@ const $o = ({
3143
3143
  const w = new FormData();
3144
3144
  w.append("file", g[y]);
3145
3145
  try {
3146
- const x = await ko(
3146
+ const x = await To(
3147
3147
  w,
3148
- (T) => d(T)
3148
+ (k) => d(k)
3149
3149
  );
3150
3150
  x && _.push(x);
3151
3151
  } catch {
@@ -3868,7 +3868,7 @@ function Qo() {
3868
3868
  }
3869
3869
  var c = r ? X(zt, null, o) : o;
3870
3870
  return X(r || n.nodeName.toLowerCase(), i, c);
3871
- }(this, this._vdomComponent)), (this.hasAttribute("hydrate") ? kn : Pe)(this._vdom, this._root);
3871
+ }(this, this._vdomComponent)), (this.hasAttribute("hydrate") ? Tn : Pe)(this._vdom, this._root);
3872
3872
  }
3873
3873
  function On(e) {
3874
3874
  return e.replace(/-(\w)/g, function(t, n) {
@@ -4349,6 +4349,11 @@ function li({
4349
4349
  transform-origin: center;
4350
4350
  will-change: transform;
4351
4351
  }
4352
+
4353
+ /* 隐藏 fallback content */
4354
+ :host {
4355
+ display: inline-block;
4356
+ }
4352
4357
  ` }),
4353
4358
  /* @__PURE__ */ h(Bn, { onClick: async () => {
4354
4359
  o(!0);
@@ -4386,7 +4391,7 @@ function li({
4386
4391
  ] }) })
4387
4392
  ] });
4388
4393
  }
4389
- st(li, "best-refresh-button");
4394
+ st(li, "best-refresh-button", [], { shadow: !0 });
4390
4395
  const Oi = [
4391
4396
  "best-recharge",
4392
4397
  "best-statistical-balance",
@@ -63,6 +63,7 @@ declare global {
63
63
  [key: string]: any;
64
64
  };
65
65
  "best-statistical-balance": any;
66
+ "best-refresh-button": any;
66
67
  }
67
68
  }
68
69
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "best-unit",
3
3
  "private": false,
4
- "version": "1.0.12",
4
+ "version": "1.0.14",
5
5
  "type": "module",
6
6
  "main": "dist/best-unit.cjs",
7
7
  "module": "dist/best-unit.js",
@@ -41,6 +41,11 @@ function RefreshButton({
41
41
  transform-origin: center;
42
42
  will-change: transform;
43
43
  }
44
+
45
+ /* 隐藏 fallback content */
46
+ :host {
47
+ display: inline-block;
48
+ }
44
49
  `;
45
50
 
46
51
  const handleClick = async () => {
@@ -89,6 +94,6 @@ function RefreshButton({
89
94
  );
90
95
  }
91
96
 
92
- register(RefreshButton, "best-refresh-button");
97
+ register(RefreshButton, "best-refresh-button", [], { shadow: true });
93
98
 
94
99
  export default RefreshButton;
@@ -63,6 +63,7 @@ declare global {
63
63
  [key: string]: any;
64
64
  };
65
65
  "best-statistical-balance": any;
66
+ "best-refresh-button": any;
66
67
  }
67
68
  }
68
69
  }