mixlea-utils-js 0.1.38 → 0.1.40

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,7 +71,7 @@ function Z(e) {
71
71
  function C(e) {
72
72
  return Array.isArray(e) ? e.length === 0 : e instanceof Map || e instanceof Set ? e.size === 0 : typeof e == "string" ? e.length === 0 : typeof e == "object" && e !== null && Object.prototype.toString.call(e) === "[object Object]" ? Object.keys(e).length === 0 : e == null;
73
73
  }
74
- function T(e) {
74
+ function v(e) {
75
75
  return !C(e);
76
76
  }
77
77
  function He(e, t, n) {
@@ -145,10 +145,10 @@ function An(e, t = 10) {
145
145
  function Sn(e) {
146
146
  return Y(e) && e > 0;
147
147
  }
148
- function D(e) {
148
+ function O(e) {
149
149
  return e == null;
150
150
  }
151
- function Oe(e) {
151
+ function De(e) {
152
152
  return e != null;
153
153
  }
154
154
  function wn(e) {
@@ -204,10 +204,10 @@ function Rn(e, t) {
204
204
  r.length > 0 && r[0].index === s ? i.push(r.shift().item) : (i.push(n[o].item), o++);
205
205
  return i;
206
206
  }
207
- function On(e) {
207
+ function Dn(e) {
208
208
  return e.length > 0 ? e.length - 1 : -1;
209
209
  }
210
- function Dn(e) {
210
+ function On(e) {
211
211
  return e[e.length - 1];
212
212
  }
213
213
  function In(e, t, n) {
@@ -247,11 +247,11 @@ function Fn(e, t) {
247
247
  Array.from(n).map((r) => [r, e.filter((i) => t(i) === r)])
248
248
  );
249
249
  }
250
- function vn(e, t) {
250
+ function Tn(e, t) {
251
251
  const n = t || ((r) => r);
252
252
  return Array.from(new Set(e.map(n))).length !== e.length;
253
253
  }
254
- function Tn(e) {
254
+ function vn(e) {
255
255
  const t = /* @__PURE__ */ new Map();
256
256
  return Array.isArray(e) && e.forEach((n) => {
257
257
  t.has(n) ? t.set(n, (t.get(n) ?? 0) + 1) : t.set(n, 1);
@@ -411,7 +411,7 @@ function Qn(...e) {
411
411
  }), t;
412
412
  }
413
413
  function x(e, t, n) {
414
- return D(t) || t === "" ? n : t.replace(/\[([^\[\]]*)\]/g, ".$1.").split(".").filter((i) => i !== "").reduce((i, o) => i == null ? void 0 : i[o], e) ?? n;
414
+ return O(t) || t === "" ? n : t.replace(/\[([^\[\]]*)\]/g, ".$1.").split(".").filter((i) => i !== "").reduce((i, o) => i == null ? void 0 : i[o], e) ?? n;
415
415
  }
416
416
  function w(e, t, n) {
417
417
  let r = t;
@@ -419,7 +419,7 @@ function w(e, t, n) {
419
419
  e[r[0]] = n;
420
420
  else {
421
421
  const i = r.shift();
422
- Object.prototype.hasOwnProperty.call(e, i) || (e[i] = De(r[0]) ? [] : {}), w(e[i], r, n);
422
+ Object.prototype.hasOwnProperty.call(e, i) || (e[i] = Oe(r[0]) ? [] : {}), w(e[i], r, n);
423
423
  }
424
424
  return e;
425
425
  }
@@ -427,9 +427,9 @@ function We(e) {
427
427
  const t = /([^\[\]\.]+)|(\d+)/g, n = e.match(t);
428
428
  if (!n)
429
429
  throw new Error(`Invalid path: ${e}`);
430
- return n.map((r) => De(r) ? Number.parseInt(r, 10) : r);
430
+ return n.map((r) => Oe(r) ? Number.parseInt(r, 10) : r);
431
431
  }
432
- function De(e) {
432
+ function Oe(e) {
433
433
  return typeof e == "number" || /^\d+$/.test(e);
434
434
  }
435
435
  function er(e, t, n, r) {
@@ -560,11 +560,11 @@ function Ar(e, t) {
560
560
  function Je(e) {
561
561
  return Array.from(e).map(([, t]) => t);
562
562
  }
563
- function O(e, t, n) {
563
+ function D(e, t, n) {
564
564
  if (y(e) && j(t)) {
565
565
  if (t.includes(".")) {
566
566
  const [r, ...i] = t.split("."), o = e[r];
567
- return r in e ? O(o, i.join("."), n) : n;
567
+ return r in e ? D(o, i.join("."), n) : n;
568
568
  }
569
569
  return t in e ? e[t] : n;
570
570
  }
@@ -573,7 +573,7 @@ function O(e, t, n) {
573
573
  function Sr(e, t, n) {
574
574
  const r = /* @__PURE__ */ new Map();
575
575
  return e.forEach((i) => {
576
- const o = t.map((u) => `${O(i, u)}`).join("_"), s = r.get(o);
576
+ const o = t.map((u) => `${D(i, u)}`).join("_"), s = r.get(o);
577
577
  s ? n && r.set(o, n(s, i)) : r.set(o, i);
578
578
  }), Je(r);
579
579
  }
@@ -612,7 +612,7 @@ function $r(e, t) {
612
612
  function Rr(e) {
613
613
  return y(e) ? Object.entries(e) : [];
614
614
  }
615
- function Or(e, t) {
615
+ function Dr(e, t) {
616
616
  const n = [], r = Math.min(e.x, t.x), i = Math.max(e.x, t.x), o = Math.min(e.y, t.y), s = Math.max(e.y, t.y);
617
617
  for (let u = r; u <= i; u++)
618
618
  for (let c = o; c <= s; c++)
@@ -621,7 +621,7 @@ function Or(e, t) {
621
621
  }
622
622
  function I(e, t = "yyyy/MM/dd", n) {
623
623
  if (j(e) || Y(e) || qe(e)) {
624
- const r = j(e) ? new Date(Number.parseInt(e, 10)) : Y(e) ? new Date(e) : e;
624
+ const r = j(e) ? /^\d{13}$/.test(e) ? new Date(Number.parseInt(e, 10)) : new Date(e) : Y(e) ? new Date(e) : e;
625
625
  if (r.toString() === "Invalid Date")
626
626
  return n ?? r.toString();
627
627
  const i = r.getFullYear(), o = r.getMonth() + 1, s = r.getDate(), u = r.getHours(), c = r.getMinutes(), f = r.getSeconds(), a = [...Array(10)].map((m, g) => `0${g}`);
@@ -714,7 +714,7 @@ function ue(e, t = "") {
714
714
  const ye = {
715
715
  stringify: ue
716
716
  };
717
- function Dr(e) {
717
+ function Or(e) {
718
718
  return e === void 0 ? [] : Array.isArray(e) ? e : [e];
719
719
  }
720
720
  function Ir() {
@@ -757,7 +757,7 @@ function Lr(e, t) {
757
757
  function Fr(e) {
758
758
  return Array.isArray(e) ? e : e == null ? [] : [e];
759
759
  }
760
- function vr(e, t, n) {
760
+ function Tr(e, t, n) {
761
761
  if (e.length > 0) {
762
762
  if (e.every((r) => y(r)))
763
763
  return new Set(e.map((i) => i[t])).size === 1;
@@ -765,10 +765,10 @@ function vr(e, t, n) {
765
765
  }
766
766
  return (n == null ? void 0 : n.whenEmptyResult) ?? !1;
767
767
  }
768
- function Tr(e, t, n) {
768
+ function vr(e, t, n) {
769
769
  if (e.length > 0) {
770
770
  if (e.every((r) => y(r)))
771
- return new Set(e.map((i) => i[t])).size === 1 ? T(Array.from(/* @__PURE__ */ new Set([1]))[0]) : !1;
771
+ return new Set(e.map((i) => i[t])).size === 1 ? v(Array.from(/* @__PURE__ */ new Set([1]))[0]) : !1;
772
772
  throw new Error("arrayObjectFieldSame input value type is not Object");
773
773
  }
774
774
  return (n == null ? void 0 : n.whenEmptyResult) ?? !1;
@@ -1108,7 +1108,7 @@ function be(e, t, n, r) {
1108
1108
  return e.replace(i, (c, f) => (u++, (r == null ? void 0 : r({ matchStr: c, matchStrIndex: f, matchCount: u, matchTotal: s })) ?? !0 ? n : c));
1109
1109
  }
1110
1110
  function Ai(e) {
1111
- return D(e) || typeof e == "function" ? "" : String(e);
1111
+ return O(e) || typeof e == "function" ? "" : String(e);
1112
1112
  }
1113
1113
  function Si(e, t = 2, n) {
1114
1114
  const r = typeof e == "number" ? e : Number(e);
@@ -1147,7 +1147,7 @@ function Ei(e) {
1147
1147
  }
1148
1148
  function E(e, t) {
1149
1149
  const { nanReplace: n, multiply: r } = t ?? {};
1150
- if (D(e) || e === "")
1150
+ if (O(e) || e === "")
1151
1151
  return n ?? Number.NaN;
1152
1152
  let i = Number(e);
1153
1153
  return Number.isNaN(i) || !Number.isFinite(i) ? n ?? Number.NaN : (typeof r == "number" && (i *= r), i);
@@ -1155,7 +1155,7 @@ function E(e, t) {
1155
1155
  function Mi(e, t) {
1156
1156
  return E(e, { ...t, nanReplace: 0 });
1157
1157
  }
1158
- function v(e, t) {
1158
+ function T(e, t) {
1159
1159
  if (["number", "string"].includes(typeof e)) {
1160
1160
  const n = Number(e);
1161
1161
  if (Number.isNaN(n) || !Number.isFinite(n))
@@ -1178,7 +1178,7 @@ function Ne(e, t) {
1178
1178
  function $i(e, t, n) {
1179
1179
  const { replaceNaNResult: r = 0 } = n ?? {};
1180
1180
  if (Array.isArray(e)) {
1181
- const { replaceNaNItem: i = 0 } = n ?? {}, o = typeof t == "function" ? t : (s) => O(s, t);
1181
+ const { replaceNaNItem: i = 0 } = n ?? {}, o = typeof t == "function" ? t : (s) => D(s, t);
1182
1182
  return K(
1183
1183
  e.reduce((s, u) => s + K(E(o(u)), i), 0),
1184
1184
  r
@@ -1192,7 +1192,7 @@ function Ri(...e) {
1192
1192
  typeof n == "number" && (t += n);
1193
1193
  }), t;
1194
1194
  }
1195
- function Oi(e, t) {
1195
+ function Di(e, t) {
1196
1196
  if (e > t) {
1197
1197
  const n = e;
1198
1198
  e = t, t = n;
@@ -1251,12 +1251,12 @@ function le(e, t) {
1251
1251
  return "";
1252
1252
  if (f > 0) {
1253
1253
  const l = ce(a);
1254
- l > 0 ? o && l > f ? (a = `${v(a, f)}`, ce(a) < f && c && (a = H(a, f))) : l > f ? a = `${H(a, f, { mode: "truncate" })}` : c && l < f && (a = H(a, f)) : c && (a = H(a, f));
1254
+ l > 0 ? o && l > f ? (a = `${T(a, f)}`, ce(a) < f && c && (a = H(a, f))) : l > f ? a = `${H(a, f, { mode: "truncate" })}` : c && l < f && (a = H(a, f)) : c && (a = H(a, f));
1255
1255
  } else
1256
1256
  a = `${Number.parseInt(a, 10)}`;
1257
1257
  return n && (a = ke(a)), r && (a = `${a} %`), a;
1258
1258
  }
1259
- function Di(e, t) {
1259
+ function Oi(e, t) {
1260
1260
  return le(e, { ...t, percent: !0 });
1261
1261
  }
1262
1262
  function Ii(e, t) {
@@ -1312,20 +1312,20 @@ function Fi(e, t) {
1312
1312
  } else
1313
1313
  return r;
1314
1314
  }
1315
- function vi(e, t, n) {
1315
+ function Ti(e, t, n) {
1316
1316
  const { replaceNaNItem: r = Number.NaN, replaceNaNResult: i = 0 } = n ?? {};
1317
1317
  if (t.length === 0)
1318
1318
  return i;
1319
1319
  if (Array.isArray(t) && t.length >= 2) {
1320
- const o = Number(O(e, t[0])), s = Number.isNaN(o) ? r : o, u = t.slice(1).reduce((c, f) => {
1321
- const a = Number(O(e, f)), l = Number.isNaN(a) ? r : a, m = c / l;
1320
+ const o = Number(D(e, t[0])), s = Number.isNaN(o) ? r : o, u = t.slice(1).reduce((c, f) => {
1321
+ const a = Number(D(e, f)), l = Number.isNaN(a) ? r : a, m = c / l;
1322
1322
  return Number.isFinite(m) ? m : Number.NaN;
1323
1323
  }, s);
1324
1324
  return Number.isNaN(u) ? i : u;
1325
1325
  } else
1326
1326
  return i;
1327
1327
  }
1328
- function Ti(e, t) {
1328
+ function vi(e, t) {
1329
1329
  return le(e, { precision: 4, ...t });
1330
1330
  }
1331
1331
  function xi(e, t) {
@@ -1485,7 +1485,7 @@ function Vi(e, t, n) {
1485
1485
  return i;
1486
1486
  let o = 1;
1487
1487
  for (const s of t) {
1488
- const u = E(O(e, s)), c = Number.isNaN(u) ? r : u;
1488
+ const u = E(D(e, s)), c = Number.isNaN(u) ? r : u;
1489
1489
  o *= c;
1490
1490
  }
1491
1491
  return Number.isNaN(o) ? i : o;
@@ -1628,7 +1628,7 @@ function oo(e, t, n) {
1628
1628
  return e ? typeof t == "function" ? t(e) : t : typeof n == "function" ? n(e) : n;
1629
1629
  }
1630
1630
  function so(e, t) {
1631
- if (!(D(t) || t === ""))
1631
+ if (!(O(t) || t === ""))
1632
1632
  return { [e]: t };
1633
1633
  }
1634
1634
  function uo(...e) {
@@ -1748,13 +1748,13 @@ function wo(e, t) {
1748
1748
  }
1749
1749
  function Eo(e, t, n) {
1750
1750
  if (Object.prototype.toString.call(e) === "[object Object]") {
1751
- const r = n ?? T, i = Array.isArray(t) ? t : Object.keys(e);
1752
- return i.length === 0 ? !1 : i.every((o) => r(O(e, o)));
1751
+ const r = n ?? v, i = Array.isArray(t) ? t : Object.keys(e);
1752
+ return i.length === 0 ? !1 : i.every((o) => r(D(e, o)));
1753
1753
  }
1754
1754
  return !1;
1755
1755
  }
1756
1756
  function Mo(e, t, n, r) {
1757
- const i = D(r) ? !1 : r;
1757
+ const i = O(r) ? !1 : r;
1758
1758
  if (Object.prototype.toString.call(e) === "[object Object]") {
1759
1759
  const o = Array.isArray(n) ? n : Object.keys(e);
1760
1760
  return o.length === 0 ? i : o.some((s) => t(x(e, s, void 0)));
@@ -1762,23 +1762,23 @@ function Mo(e, t, n, r) {
1762
1762
  return i;
1763
1763
  }
1764
1764
  function $o(e, t, n) {
1765
- return y(e) && y(t) && n != null && n.compareFields && (n == null ? void 0 : n.compareFields.length) > 0 ? n == null ? void 0 : n.compareFields.every((r) => O(e, r) === O(t, r)) : !1;
1765
+ return y(e) && y(t) && n != null && n.compareFields && (n == null ? void 0 : n.compareFields.length) > 0 ? n == null ? void 0 : n.compareFields.every((r) => D(e, r) === D(t, r)) : !1;
1766
1766
  }
1767
1767
  function Ro(e, t, n) {
1768
1768
  const r = n ?? $e;
1769
- return t.map((i) => [i, r(O(e, i))]);
1769
+ return t.map((i) => [i, r(D(e, i))]);
1770
1770
  }
1771
- function Oo(e, t) {
1772
- return t.filter((n) => Z(O(e, n)));
1771
+ function Do(e, t) {
1772
+ return t.filter((n) => Z(D(e, n)));
1773
1773
  }
1774
- function Do(e, t, n) {
1775
- return t.reduce((i, o) => [...i, `${O(e, o)}`], []).join(n ?? ", ");
1774
+ function Oo(e, t, n) {
1775
+ return t.reduce((i, o) => [...i, `${D(e, o)}`], []).join(n ?? ", ");
1776
1776
  }
1777
1777
  function Io(e, t, n, r) {
1778
- const i = D(r) ? !1 : r;
1778
+ const i = O(r) ? !1 : r;
1779
1779
  if (Object.prototype.toString.call(e) === "[object Object]") {
1780
1780
  const o = t ?? C, s = Array.isArray(n) ? n : Object.keys(e);
1781
- return s.length === 0 ? i : s.every((u) => o(O(e, u)));
1781
+ return s.length === 0 ? i : s.every((u) => o(D(e, u)));
1782
1782
  }
1783
1783
  return i;
1784
1784
  }
@@ -1816,13 +1816,13 @@ const ne = /* @__PURE__ */ new WeakMap();
1816
1816
  function Fo(e) {
1817
1817
  return ne.has(e) || ne.set(e, G()), ne.get(e);
1818
1818
  }
1819
- function vo(...e) {
1819
+ function To(...e) {
1820
1820
  return e.reduce(
1821
1821
  (t, n) => y(n) ? { ...t, ...n } : t,
1822
1822
  /* @__PURE__ */ Object.create(null)
1823
1823
  );
1824
1824
  }
1825
- function To(e, t) {
1825
+ function vo(e, t) {
1826
1826
  if (y(e)) {
1827
1827
  const n = {};
1828
1828
  return Object.keys(e).forEach((r) => {
@@ -1836,7 +1836,7 @@ function xo(e, t) {
1836
1836
  }
1837
1837
  function A(e, t) {
1838
1838
  let n;
1839
- return (typeof e == "string" || typeof e == "number" || e instanceof Date) && (n = new Date(e)), n && n.toString() !== "Invalid Date" ? n : t ?? /* @__PURE__ */ new Date("Invalid Date");
1839
+ return typeof e == "string" ? /^\d{13}$/.test(e) ? n = new Date(Number.parseInt(e, 10)) : n = new Date(e) : typeof e == "number" ? n = new Date(e) : e instanceof Date && (n = e), n && n.toString() !== "Invalid Date" ? n : t ?? /* @__PURE__ */ new Date("Invalid Date");
1840
1840
  }
1841
1841
  function Bo(e, t) {
1842
1842
  const n = A(e);
@@ -1920,11 +1920,11 @@ function Zo(e, t = "Invalid Date") {
1920
1920
  function Qo(e, t = "Invalid Date") {
1921
1921
  return I(e, "yyyy/MM", t);
1922
1922
  }
1923
- function ve(e, t) {
1923
+ function Te(e, t) {
1924
1924
  const n = new Date(e);
1925
1925
  return t && n.toString() === "Invalid Date" ? t : /* @__PURE__ */ new Date(`${n.getFullYear()}-${n.getMonth() + 1}-01 00:00:00`);
1926
1926
  }
1927
- function Te(e, t) {
1927
+ function ve(e, t) {
1928
1928
  const n = new Date(e);
1929
1929
  return t && n.toString() === "Invalid Date" ? t : /* @__PURE__ */ new Date(`${n.getFullYear()}-${n.getMonth() + 1}-${pt(n)} 23:59:59`);
1930
1930
  }
@@ -1960,12 +1960,12 @@ function ns([e, t]) {
1960
1960
  function rs(e) {
1961
1961
  if (q(e) && e.length > 0) {
1962
1962
  let t = "", n = "";
1963
- if (T(e[0])) {
1964
- const r = ve(A(e[0]));
1963
+ if (v(e[0])) {
1964
+ const r = Te(A(e[0]));
1965
1965
  k(r) && (t = I(r, "yyyy/MM"));
1966
1966
  }
1967
- if (T(e[1])) {
1968
- const r = Te(A(e[1]));
1967
+ if (v(e[1])) {
1968
+ const r = ve(A(e[1]));
1969
1969
  k(r) && (n = I(r, "yyyy/MM"));
1970
1970
  }
1971
1971
  if (t && n)
@@ -1980,12 +1980,12 @@ function rs(e) {
1980
1980
  function is(e) {
1981
1981
  if (q(e) && e.length > 0) {
1982
1982
  let t = "", n = "";
1983
- if (T(e[0])) {
1984
- const r = ve(A(e[0]));
1983
+ if (v(e[0])) {
1984
+ const r = Te(A(e[0]));
1985
1985
  k(r) && (t = I(r, "yyyy"));
1986
1986
  }
1987
- if (T(e[1])) {
1988
- const r = Te(A(e[1]));
1987
+ if (v(e[1])) {
1988
+ const r = ve(A(e[1]));
1989
1989
  k(r) && (n = I(r, "yyyy"));
1990
1990
  }
1991
1991
  if (t && n)
@@ -2087,7 +2087,7 @@ function $s(e) {
2087
2087
  function Rs(e, ...t) {
2088
2088
  return typeof e == "function" ? e(...t) : e;
2089
2089
  }
2090
- function Os(e) {
2090
+ function Ds(e) {
2091
2091
  return e > 1920 ? "3xl" : e > 1536 ? "2xl" : e > 1280 ? "xl" : e > 1024 ? "lg" : e > 768 ? "md" : e > 500 ? "sm" : "xs";
2092
2092
  }
2093
2093
  function bt() {
@@ -2096,7 +2096,7 @@ function bt() {
2096
2096
  function Nt() {
2097
2097
  return !!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
2098
2098
  }
2099
- function Ds() {
2099
+ function Os() {
2100
2100
  return bt() ? "webview" : Nt() ? "mobile" : "desktop";
2101
2101
  }
2102
2102
  const ae = /* @__PURE__ */ new Map();
@@ -2279,14 +2279,14 @@ function Fs(e) {
2279
2279
  };
2280
2280
  });
2281
2281
  }
2282
- function vs(e) {
2282
+ function Ts(e) {
2283
2283
  return fetch(e).then((t) => {
2284
2284
  if (!t.ok)
2285
2285
  throw new Error("Network response was not ok.");
2286
2286
  return t.blob();
2287
2287
  }).then((t) => Rt(t));
2288
2288
  }
2289
- function Ts(e, t) {
2289
+ function vs(e, t) {
2290
2290
  fetch(e).then((n) => {
2291
2291
  if (!n.ok)
2292
2292
  throw new Error("Network response was not ok.");
@@ -2361,13 +2361,13 @@ function Xs(e, t) {
2361
2361
  return r.observe(e), r;
2362
2362
  }
2363
2363
  function Ys(e) {
2364
- return typeof e == "string" ? e : D(e) ? "" : Array.isArray(e) ? e.join(", ") : y(e) ? JSON.stringify(e) : `${e}`;
2364
+ return typeof e == "string" ? e : O(e) ? "" : Array.isArray(e) ? e.join(", ") : y(e) ? JSON.stringify(e) : `${e}`;
2365
2365
  }
2366
- function Ot(e, t) {
2366
+ function Dt(e, t) {
2367
2367
  return typeof e == "string" && e.length > 0 ? e.split(t).map((n) => n.trim()) : [];
2368
2368
  }
2369
2369
  function Ws(e, t) {
2370
- return j(e) ? Ot(e, t) : q(e) ? e : [];
2370
+ return j(e) ? Dt(e, t) : q(e) ? e : [];
2371
2371
  }
2372
2372
  function Ks(e, t) {
2373
2373
  return e === 0 ? t : e;
@@ -2554,13 +2554,13 @@ const ou = {
2554
2554
  nativeStringify: JSON.stringify,
2555
2555
  nativeParse: JSON.parse
2556
2556
  };
2557
- function Dt(e, t) {
2557
+ function Ot(e, t) {
2558
2558
  if (typeof e != typeof t)
2559
2559
  return !1;
2560
2560
  if (!e || !t || typeof e != "object")
2561
2561
  return e === t;
2562
2562
  for (const n in e)
2563
- if (!Dt(e[n], t[n]) || !Reflect.has(t, n))
2563
+ if (!Ot(e[n], t[n]) || !Reflect.has(t, n))
2564
2564
  return !1;
2565
2565
  for (const n in t)
2566
2566
  if (!(n in e))
@@ -2570,7 +2570,7 @@ function Dt(e, t) {
2570
2570
  function su(e) {
2571
2571
  let t = e;
2572
2572
  try {
2573
- if (typeof t == "string" && (t = Number.parseFloat(t.replaceAll(",", ""))), D(t) || isNaN(t))
2573
+ if (typeof t == "string" && (t = Number.parseFloat(t.replaceAll(",", ""))), O(t) || isNaN(t))
2574
2574
  throw new Error("不是有效的金额!");
2575
2575
  let n = "";
2576
2576
  if (t < 0 && (n = "欠", t = Math.abs(t)), t >= 1e12)
@@ -2606,7 +2606,7 @@ function su(e) {
2606
2606
  }
2607
2607
  }
2608
2608
  function uu(e, t) {
2609
- return Oe(e) ? e : typeof t == "function" ? t() : t;
2609
+ return De(e) ? e : typeof t == "function" ? t() : t;
2610
2610
  }
2611
2611
  function cu(e, t) {
2612
2612
  return typeof e == "function" ? t.length === 0 ? e() : e(...t) : e;
@@ -2625,9 +2625,9 @@ function Pt(e, t) {
2625
2625
  };
2626
2626
  }
2627
2627
  function fu(e, t) {
2628
- if (D(e))
2628
+ if (O(e))
2629
2629
  return t;
2630
- if (D(t))
2630
+ if (O(t))
2631
2631
  return e;
2632
2632
  const n = { ...e };
2633
2633
  for (const r of Object.keys(t)) {
@@ -2638,7 +2638,7 @@ function fu(e, t) {
2638
2638
  ["className", "class"].includes(r) ? n[r] = dt(n[r], i) : n[r] = i;
2639
2639
  else if (o === "function") {
2640
2640
  const s = n[r];
2641
- D(s) ? n[r] = i : n[r] = Pt(s, i);
2641
+ O(s) ? n[r] = i : n[r] = Pt(s, i);
2642
2642
  } else o === "object" && (n[r] = { ...n[r], ...i });
2643
2643
  }
2644
2644
  return n;
@@ -2675,8 +2675,8 @@ function jt(e) {
2675
2675
  return Q(e, "").replace(/公斤/g, "KG").replace(/千克/g, "KG").replace(/毫克/g, "MG").replace(/克/g, "G").replace(/磅/g, "LB").replace(/毫升/g, "ML").replace(/升/g, "L");
2676
2676
  }
2677
2677
  function kt(e) {
2678
- const t = /(?:(\d+(?:\.\d+)?)\s*\*\s*)?([\d.]+)\s*(kg|g|lb|l|ml|mg)/i, n = Tt(
2679
- vt(
2678
+ const t = /(?:(\d+(?:\.\d+)?)\s*\*\s*)?([\d.]+)\s*(kg|g|lb|l|ml|mg)/i, n = vt(
2679
+ Tt(
2680
2680
  Ft(
2681
2681
  // 统一括号
2682
2682
  Lt(
@@ -2713,7 +2713,7 @@ function Lt(e) {
2713
2713
  function Ft(e) {
2714
2714
  return e.replace("毫克", "mg").replace("千克", "kg").replace("公斤", "kg").replace("克", "g").replace("毫升", "ml").replace("升", "l").replace("磅", "lb");
2715
2715
  }
2716
- function vt(e) {
2716
+ function Tt(e) {
2717
2717
  let t = null;
2718
2718
  if (t = e.match(/\s*(\d+(?:\.\d+)?)(mg|kg|g|lb|ml|l)(\s+)?\(/i), t) {
2719
2719
  const n = t[1], r = t[2].toLowerCase();
@@ -2771,7 +2771,7 @@ function vt(e) {
2771
2771
  }
2772
2772
  return e;
2773
2773
  }
2774
- function Tt(e) {
2774
+ function vt(e) {
2775
2775
  let t = Q(e, "");
2776
2776
  return ["kg(kg)"].includes(t) && (t = "1kg"), ["mg(mg)"].includes(t) && (t = "1mg"), ["g(g)"].includes(t) && (t = "1g"), ["ml(ml)"].includes(t) && (t = "1ml"), ["l(l)"].includes(t) && (t = "1l"), ["lb(lb)"].includes(t) && (t = "1lb"), t === "斤" && (t = "0.5KG"), /^(kg|g|lb|l|ml|mg)$/i.test(t) && (t = `1${t}`), t = t.replace("/盒", "").replace("/件", "").replace("/箱", "").replace("/个", "").replace("/袋", "").replace("/颗", "").replace("/筐", "").replace(/\(KG\)/gi, "KG").replace(/\(G\)/gi, "G"), t;
2777
2777
  }
@@ -2780,17 +2780,17 @@ function mu(e) {
2780
2780
  if (t)
2781
2781
  switch (t.unit) {
2782
2782
  case "KG":
2783
- return v(Number.parseFloat(t.value) * t.quantity, 6);
2783
+ return T(Number.parseFloat(t.value) * t.quantity, 6);
2784
2784
  case "G":
2785
- return v(Number.parseFloat(t.value) / 1e3 * t.quantity, 6);
2785
+ return T(Number.parseFloat(t.value) / 1e3 * t.quantity, 6);
2786
2786
  case "MG":
2787
- return v(Number.parseFloat(t.value) / 1e6 * t.quantity, 6);
2787
+ return T(Number.parseFloat(t.value) / 1e6 * t.quantity, 6);
2788
2788
  case "L":
2789
- return v(Number.parseFloat(t.value) * t.quantity, 6);
2789
+ return T(Number.parseFloat(t.value) * t.quantity, 6);
2790
2790
  case "ML":
2791
- return v(Number.parseFloat(t.value) / 1e3 * t.quantity, 6);
2791
+ return T(Number.parseFloat(t.value) / 1e3 * t.quantity, 6);
2792
2792
  case "LB":
2793
- return v(Number.parseFloat(t.value) * 0.45359237 * t.quantity, 6);
2793
+ return T(Number.parseFloat(t.value) * 0.45359237 * t.quantity, 6);
2794
2794
  default:
2795
2795
  return null;
2796
2796
  }
@@ -2810,7 +2810,7 @@ function gu(e) {
2810
2810
  setStore: (s) => {
2811
2811
  t = V(s, t), n.forEach((u) => u(t));
2812
2812
  },
2813
- subscribeStore: (s) => (D(n.find((u) => u === s)) && n.push(s), () => {
2813
+ subscribeStore: (s) => (O(n.find((u) => u === s)) && n.push(s), () => {
2814
2814
  n = n.filter((u) => u !== s);
2815
2815
  })
2816
2816
  };
@@ -2982,14 +2982,14 @@ const Nu = {
2982
2982
  function Au(...e) {
2983
2983
  for (const t of e) {
2984
2984
  const n = V(t);
2985
- if (Oe(n))
2985
+ if (De(n))
2986
2986
  return n;
2987
2987
  }
2988
2988
  }
2989
2989
  function Su(...e) {
2990
2990
  for (const t of e) {
2991
2991
  const n = V(t);
2992
- if (T(n))
2992
+ if (v(n))
2993
2993
  return n;
2994
2994
  }
2995
2995
  }
@@ -3064,10 +3064,10 @@ function Ru(e, t) {
3064
3064
  const n = Vt(e, t), r = Math.max(e.length, t.length);
3065
3065
  return r === 0 ? 1 : 1 - n / r;
3066
3066
  }
3067
- function Ou(e, t) {
3067
+ function Du(e, t) {
3068
3068
  return e.includes(t) || t.includes(e) ? 1 : 0;
3069
3069
  }
3070
- function Du(e, ...t) {
3070
+ function Ou(e, ...t) {
3071
3071
  return () => e(...t);
3072
3072
  }
3073
3073
  function Iu(e, ...t) {
@@ -3114,19 +3114,19 @@ export {
3114
3114
  rr as arrayIncludes,
3115
3115
  Cn as arrayInsert,
3116
3116
  kn as arrayInsertInterval,
3117
- vn as arrayIsDuplicate,
3117
+ Tn as arrayIsDuplicate,
3118
3118
  In as arrayIteMove,
3119
- Tn as arrayItemCount,
3119
+ vn as arrayItemCount,
3120
3120
  nr as arrayJoin,
3121
- On as arrayLastIndex,
3122
- Dn as arrayLastItem,
3121
+ Dn as arrayLastIndex,
3122
+ On as arrayLastItem,
3123
3123
  _n as arrayLastPick,
3124
3124
  Gn as arrayMap,
3125
3125
  lr as arrayMapToObject,
3126
3126
  Qn as arrayMerge,
3127
3127
  ir as arrayNotIn,
3128
- Tr as arrayObjectFieldNotEmptySame,
3129
- vr as arrayObjectFieldSame,
3128
+ vr as arrayObjectFieldNotEmptySame,
3129
+ Tr as arrayObjectFieldSame,
3130
3130
  gr as arrayObjectMultiSort,
3131
3131
  mr as arrayPickLast,
3132
3132
  Rn as arrayPrioritySort,
@@ -3143,7 +3143,7 @@ export {
3143
3143
  $s as cacheDelete,
3144
3144
  Es as cacheGet,
3145
3145
  Ms as cacheSet,
3146
- Os as calcAdaptivePoint,
3146
+ Ds as calcAdaptivePoint,
3147
3147
  yu as calcGridRegionBoundaryPoints,
3148
3148
  xt as calcGridRegionBoundarySegments,
3149
3149
  bu as calcMartixRange,
@@ -3158,7 +3158,7 @@ export {
3158
3158
  ho as cloneShallow,
3159
3159
  du as compareSetDifference,
3160
3160
  jt as convertWeightUnitToStandard,
3161
- Or as coordinateBetween,
3161
+ Dr as coordinateBetween,
3162
3162
  Ke as createArray,
3163
3163
  Xs as createDelayResizeObserver,
3164
3164
  po as createFormData,
@@ -3184,13 +3184,13 @@ export {
3184
3184
  pi as dispatchNodeEvents,
3185
3185
  Ru as distanceSimilarity,
3186
3186
  Fi as divide,
3187
- vi as divideBy,
3187
+ Ti as divideBy,
3188
3188
  ii as domAddClassNames,
3189
3189
  ni as domContains,
3190
3190
  oi as domRemoveClassNames,
3191
3191
  xs as downloadBuffer,
3192
3192
  Bs as downloadFile,
3193
- Ts as downloadURL,
3193
+ vs as downloadURL,
3194
3194
  Su as emptyCoalesce,
3195
3195
  uo as emptyCoalescing,
3196
3196
  Ir as emptyFunction,
@@ -3209,7 +3209,7 @@ export {
3209
3209
  Ks as ensureZero,
3210
3210
  qs as escapeRegExp,
3211
3211
  Le as evaluateMathExpression,
3212
- Ti as exchangeRateFormatter,
3212
+ vi as exchangeRateFormatter,
3213
3213
  go as execFunc,
3214
3214
  Gs as executePromises,
3215
3215
  ps as extractMapKeys,
@@ -3221,11 +3221,11 @@ export {
3221
3221
  ei as findHtmlElementUpward,
3222
3222
  di as findNodeClosest,
3223
3223
  tu as flatArrayToTree,
3224
- Du as functionWrap,
3224
+ Ou as functionWrap,
3225
3225
  Iu as functionWrapable,
3226
3226
  bs as getAllLocalStorage,
3227
3227
  bo as getAssignData,
3228
- Ds as getBrowserEnv,
3228
+ Os as getBrowserEnv,
3229
3229
  Ei as getClosestInteger,
3230
3230
  Kt as getConfigStoreAtKey,
3231
3231
  fs as getCurrentDate,
@@ -3233,8 +3233,8 @@ export {
3233
3233
  Ho as getDateDay,
3234
3234
  pt as getDateLastDay,
3235
3235
  Uo as getDateMonth,
3236
- Te as getDateMonthEndDate,
3237
- ve as getDateMonthStartDate,
3236
+ ve as getDateMonthEndDate,
3237
+ Te as getDateMonthStartDate,
3238
3238
  Bo as getDateTimestamp,
3239
3239
  Go as getDateWeekday,
3240
3240
  _o as getDateYear,
@@ -3296,17 +3296,17 @@ export {
3296
3296
  sn as isMobileBrowser,
3297
3297
  Sn as isMoreThanZero,
3298
3298
  mi as isNodeContains,
3299
- T as isNotEmpty,
3299
+ v as isNotEmpty,
3300
3300
  Ge as isNotEmptyArray,
3301
3301
  Me as isNotEmptyString,
3302
3302
  An as isNotEqualZero,
3303
- Oe as isNotNullish,
3303
+ De as isNotNullish,
3304
3304
  bn as isNotPlainObject,
3305
3305
  en as isNotUndefined,
3306
3306
  $e as isNotVoid,
3307
- D as isNullish,
3307
+ O as isNullish,
3308
3308
  Y as isNumber,
3309
- Dt as isObjStructureEqual,
3309
+ Ot as isObjStructureEqual,
3310
3310
  y as isObject,
3311
3311
  yn as isPlainObject,
3312
3312
  wn as isPromise,
@@ -3334,7 +3334,7 @@ export {
3334
3334
  Hi as mathTakeEvaluate,
3335
3335
  Is as memoStore,
3336
3336
  Cr as mergeArray,
3337
- vo as mergeObject,
3337
+ To as mergeObject,
3338
3338
  fu as mergeProps,
3339
3339
  qi as multiply,
3340
3340
  Vi as multiplyBy,
@@ -3343,8 +3343,8 @@ export {
3343
3343
  ke as numberFormateThousandth,
3344
3344
  le as numberFormatter,
3345
3345
  Si as numberKeepDecimal,
3346
- Oi as numberRandom,
3347
- v as numberRound,
3346
+ Di as numberRandom,
3347
+ T as numberRound,
3348
3348
  wi as numberToInt,
3349
3349
  Qs as objToUrl,
3350
3350
  ko as objectArrayExpressionCalcInject,
@@ -3359,17 +3359,17 @@ export {
3359
3359
  Lr as objectFieldsSetUndefined,
3360
3360
  Eo as objectFieldsValidate,
3361
3361
  Ro as objectFieldsValidatePaths,
3362
- Oo as objectFieldsValidateVoidPaths,
3362
+ Do as objectFieldsValidateVoidPaths,
3363
3363
  je as objectForEach,
3364
- O as objectGet,
3364
+ D as objectGet,
3365
3365
  No as objectHas,
3366
3366
  xo as objectHasKey,
3367
3367
  Qe as objectKeys,
3368
3368
  Co as objectOmit,
3369
3369
  $r as objectOmitFields,
3370
- Do as objectPathsJoin,
3370
+ Oo as objectPathsJoin,
3371
3371
  Ar as objectPick,
3372
- To as objectRemoveFields,
3372
+ vo as objectRemoveFields,
3373
3373
  jr as objectRemoveNullishFields,
3374
3374
  Ie as objectSet,
3375
3375
  Er as objectShallowGet,
@@ -3379,7 +3379,7 @@ export {
3379
3379
  wo as objectToArray,
3380
3380
  So as objectValueMap,
3381
3381
  Ct as parseURL,
3382
- Di as percentFormatter,
3382
+ Oi as percentFormatter,
3383
3383
  It as pipe,
3384
3384
  au as pipeWith,
3385
3385
  _s as promiseQueue,
@@ -3391,7 +3391,7 @@ export {
3391
3391
  Rt as readBlobAsBuffer,
3392
3392
  Ls as readFileAsArrayBuffer,
3393
3393
  Fs as readFileAsBuffer,
3394
- vs as readURLAsBuffer,
3394
+ Ts as readURLAsBuffer,
3395
3395
  uu as returnNotVoid,
3396
3396
  iu as rgba2obj,
3397
3397
  Us as runPromiseQueue,
@@ -3412,15 +3412,15 @@ export {
3412
3412
  Ni as stringInsert,
3413
3413
  bi as stringJoin,
3414
3414
  be as stringReplaceAll,
3415
- Ot as stringSplit,
3415
+ Dt as stringSplit,
3416
3416
  yi as stringToKebabCase,
3417
3417
  zs as stringWordCount,
3418
- Ou as substringSimilarity,
3418
+ Du as substringSimilarity,
3419
3419
  Xi as subtract,
3420
3420
  Ne as sum,
3421
3421
  $i as sumBy,
3422
3422
  lo as switchCase,
3423
- Dr as toArray,
3423
+ Or as toArray,
3424
3424
  A as toDate,
3425
3425
  yt as toFormatDate,
3426
3426
  Vo as toFormatUtcDate,