@gx-design-vue/pro-utils 0.2.0-beta.81 → 0.2.0-beta.83
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/pro-utils.js +102 -102
- package/dist/pro-utils.umd.cjs +3 -3
- package/dist/typings/index.d.ts +5 -0
- package/package.json +1 -1
package/dist/pro-utils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Gx Design Pro
|
|
3
|
-
* Version: 0.2.0-beta.
|
|
3
|
+
* Version: 0.2.0-beta.82
|
|
4
4
|
* Author: gx12358
|
|
5
5
|
* Copyright (C) 2024 gx12358
|
|
6
6
|
* License: MIT License
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Contact: gx12358@gmail.com
|
|
11
11
|
*/
|
|
12
12
|
import { Comment as q, Fragment as v, isVNode as B } from "vue";
|
|
13
|
-
class
|
|
13
|
+
class Vt {
|
|
14
14
|
constructor() {
|
|
15
15
|
this._keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
|
16
16
|
}
|
|
@@ -73,10 +73,10 @@ function m(t) {
|
|
|
73
73
|
function Z(t) {
|
|
74
74
|
return typeof t == "string" || t instanceof String;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function Ht(t) {
|
|
77
77
|
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Function]";
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function qt(t) {
|
|
80
80
|
if (typeof t != "string")
|
|
81
81
|
return !1;
|
|
82
82
|
try {
|
|
@@ -86,7 +86,7 @@ function Jt(t) {
|
|
|
86
86
|
return !1;
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function Jt() {
|
|
90
90
|
const t = navigator.userAgent || navigator.vendor;
|
|
91
91
|
return !!(/iPhone/.test(t) || /Android/.test(t) && /Mobile/.test(t) || /Windows Phone/.test(t) || /Mobile/.test(t) && !X());
|
|
92
92
|
}
|
|
@@ -113,7 +113,7 @@ function Y(...t) {
|
|
|
113
113
|
}
|
|
114
114
|
return e.filter((n) => n).join(" ");
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function Zt(t, e) {
|
|
117
117
|
if (typeof e != "string" && !Array.isArray(e))
|
|
118
118
|
return;
|
|
119
119
|
const n = Array.isArray(e) ? e : e.split(":");
|
|
@@ -142,7 +142,7 @@ const O = function(t, e) {
|
|
|
142
142
|
} catch {
|
|
143
143
|
return t.style[e];
|
|
144
144
|
}
|
|
145
|
-
}, Q = (t, e) => x ? void 0 : (e == null ? O(t, "overflow") : e ? O(t, "overflow-y") : O(t, "overflow-x")).match(/(scroll|auto|overlay)/),
|
|
145
|
+
}, Q = (t, e) => x ? void 0 : (e == null ? O(t, "overflow") : e ? O(t, "overflow-y") : O(t, "overflow-x")).match(/(scroll|auto|overlay)/), Xt = (t, e) => {
|
|
146
146
|
if (x)
|
|
147
147
|
return;
|
|
148
148
|
let n = t;
|
|
@@ -154,7 +154,7 @@ const O = function(t, e) {
|
|
|
154
154
|
n = n.parentNode;
|
|
155
155
|
}
|
|
156
156
|
return n;
|
|
157
|
-
},
|
|
157
|
+
}, Yt = (t, e) => {
|
|
158
158
|
if (x || !t || !e)
|
|
159
159
|
return !1;
|
|
160
160
|
const n = t.getBoundingClientRect();
|
|
@@ -189,7 +189,7 @@ function tt(t) {
|
|
|
189
189
|
return ArrayBuffer.isView(t) && !(t instanceof DataView);
|
|
190
190
|
}
|
|
191
191
|
const et = "[object RegExp]", rt = "[object String]", nt = "[object Number]", it = "[object Boolean]", ot = "[object Arguments]", st = "[object Symbol]", ct = "[object Date]", ft = "[object Map]", ut = "[object Set]", at = "[object Array]", lt = "[object ArrayBuffer]", dt = "[object Object]", pt = "[object DataView]", gt = "[object Uint8Array]", yt = "[object Uint8ClampedArray]", ht = "[object Uint16Array]", mt = "[object Uint32Array]", wt = "[object Int8Array]", At = "[object Int16Array]", bt = "[object Int32Array]", St = "[object Float32Array]", xt = "[object Float64Array]";
|
|
192
|
-
function
|
|
192
|
+
function Gt(t, e) {
|
|
193
193
|
return y(t, void 0, t, /* @__PURE__ */ new Map(), e);
|
|
194
194
|
}
|
|
195
195
|
function y(t, e, n, r = /* @__PURE__ */ new Map(), i = void 0) {
|
|
@@ -427,7 +427,7 @@ U.cancel = (t) => {
|
|
|
427
427
|
const e = N.get(t);
|
|
428
428
|
return V(e), z(e);
|
|
429
429
|
};
|
|
430
|
-
function
|
|
430
|
+
function Qt(t) {
|
|
431
431
|
return t != null;
|
|
432
432
|
}
|
|
433
433
|
function A(t) {
|
|
@@ -436,11 +436,11 @@ function A(t) {
|
|
|
436
436
|
const e = Object.getPrototypeOf(t);
|
|
437
437
|
return e === null || e === Object.prototype || Object.getPrototypeOf(e) === null ? Object.prototype.toString.call(t) === "[object Object]" : !1;
|
|
438
438
|
}
|
|
439
|
-
const
|
|
439
|
+
const Kt = ({ suffixCls: t, customizePrefixCls: e, isPor: n, className: r }) => {
|
|
440
440
|
const i = r || (n ? "gx-pro" : "gx");
|
|
441
441
|
return e || (t ? `${i}-${t}` : i);
|
|
442
|
-
},
|
|
443
|
-
function
|
|
442
|
+
}, kt = (t, e) => t ? p(t) ? t.join("-") : t.toString() : `${e || 0}`;
|
|
443
|
+
function Ct(t, { align: e, showIndex: n }) {
|
|
444
444
|
const r = w(t);
|
|
445
445
|
if (n && t.length && t.every((i) => i.dataIndex !== "sortIndex")) {
|
|
446
446
|
const i = t[0];
|
|
@@ -457,13 +457,13 @@ function Tt(t, { align: e, showIndex: n }) {
|
|
|
457
457
|
r.filter((i) => i.dataIndex !== "sortIndex");
|
|
458
458
|
return r;
|
|
459
459
|
}
|
|
460
|
-
function
|
|
460
|
+
function Tt(t, ...e) {
|
|
461
461
|
return typeof t == "function" ? t(...e) : t;
|
|
462
462
|
}
|
|
463
|
-
function
|
|
463
|
+
function te(t) {
|
|
464
464
|
return JSON.parse(JSON.stringify(t));
|
|
465
465
|
}
|
|
466
|
-
function
|
|
466
|
+
function ee(t, e) {
|
|
467
467
|
if (m(t)) {
|
|
468
468
|
const { pageSize: n = 10, total: r = 0 } = t;
|
|
469
469
|
let { current: i = 1 } = t;
|
|
@@ -471,7 +471,7 @@ function re(t, e) {
|
|
|
471
471
|
}
|
|
472
472
|
return 1;
|
|
473
473
|
}
|
|
474
|
-
function
|
|
474
|
+
function re(t = [], e, n = "children") {
|
|
475
475
|
function r(i, s) {
|
|
476
476
|
return s.map((o, c) => {
|
|
477
477
|
const f = `${i}-${c + 1}`;
|
|
@@ -483,7 +483,7 @@ function ne(t = [], e, n = "children") {
|
|
|
483
483
|
return i[n] && (i[n] = r(`${f}`, i[n])), i.sortIndex = f, i;
|
|
484
484
|
});
|
|
485
485
|
}
|
|
486
|
-
function
|
|
486
|
+
function ne(t, e) {
|
|
487
487
|
return p(t) ? t?.filter((n, r) => {
|
|
488
488
|
if (h(e))
|
|
489
489
|
return r <= e - 1;
|
|
@@ -507,18 +507,18 @@ function Ut(t, e, n, r = 0) {
|
|
|
507
507
|
let c = 0;
|
|
508
508
|
return s < o ? c = i === 0 ? -1 : 0 : s > o && (c = i === 0 ? 0 : -1), c;
|
|
509
509
|
}
|
|
510
|
-
function
|
|
510
|
+
function ie(t, e, n = 0) {
|
|
511
511
|
return t.sort((r, i) => It(r, i, e, n));
|
|
512
512
|
}
|
|
513
|
-
function
|
|
513
|
+
function oe(t, e, n = 0) {
|
|
514
514
|
return t.sort((r, i) => Ut(r, i, e, n));
|
|
515
515
|
}
|
|
516
|
-
function
|
|
516
|
+
function se(t) {
|
|
517
517
|
let e = w(t);
|
|
518
518
|
const n = new Set(e);
|
|
519
519
|
return e = Array.from(n), e;
|
|
520
520
|
}
|
|
521
|
-
function
|
|
521
|
+
function ce(t, e) {
|
|
522
522
|
const n = ["null", "undefined"];
|
|
523
523
|
let r = !0;
|
|
524
524
|
return t === 0 ? r = !0 : n.includes(t) ? r = !1 : t || (r = !1), r ? {
|
|
@@ -529,7 +529,7 @@ function fe(t, e) {
|
|
|
529
529
|
success: r
|
|
530
530
|
};
|
|
531
531
|
}
|
|
532
|
-
function
|
|
532
|
+
function fe(t) {
|
|
533
533
|
let e = "";
|
|
534
534
|
if (t > -1) {
|
|
535
535
|
const n = Math.floor(t / 3600), r = Math.floor(t / 60) % 60, i = Number.parseInt(String(t % 60));
|
|
@@ -584,7 +584,7 @@ function Bt(t, e = "children") {
|
|
|
584
584
|
n.push(r), p(r[e]) && r[e].length > 0 && (n = n.concat(Bt(r[e], e)));
|
|
585
585
|
}), n;
|
|
586
586
|
}
|
|
587
|
-
function
|
|
587
|
+
function ue(t, e) {
|
|
588
588
|
if (!t || !p(t) || t?.length === 0)
|
|
589
589
|
return [];
|
|
590
590
|
const { id: n = "id", parentId: r = "parentId", children: i = "children", emptyChildren: s = !0 } = e || {}, o = e?.rootId ?? 0, c = w(t);
|
|
@@ -599,7 +599,7 @@ function Dt(t, e) {
|
|
|
599
599
|
return r.children && (r.children = Dt(r.children, e)), e(r) || r.children && r.children.length > 0 ? r : null;
|
|
600
600
|
}).filter(Boolean);
|
|
601
601
|
}
|
|
602
|
-
function
|
|
602
|
+
function ae(t, e, n) {
|
|
603
603
|
const { value: r, children: i } = n || {
|
|
604
604
|
value: "value",
|
|
605
605
|
children: "children"
|
|
@@ -620,7 +620,7 @@ function le(t, e, n) {
|
|
|
620
620
|
break;
|
|
621
621
|
return s;
|
|
622
622
|
}
|
|
623
|
-
function
|
|
623
|
+
function le(t) {
|
|
624
624
|
return t && p(t) ? t[t.length - 1] : null;
|
|
625
625
|
}
|
|
626
626
|
function Nt(t, e, n) {
|
|
@@ -636,16 +636,16 @@ function Nt(t, e, n) {
|
|
|
636
636
|
}
|
|
637
637
|
}
|
|
638
638
|
}
|
|
639
|
-
function
|
|
639
|
+
function de(t) {
|
|
640
640
|
return URL.createObjectURL(t);
|
|
641
641
|
}
|
|
642
|
-
function
|
|
642
|
+
function pe(t) {
|
|
643
643
|
return new Promise((e, n) => {
|
|
644
644
|
const r = new FileReader();
|
|
645
645
|
r.readAsDataURL(t), r.onload = () => e(r.result), r.onerror = (i) => n(i);
|
|
646
646
|
});
|
|
647
647
|
}
|
|
648
|
-
function
|
|
648
|
+
function ge(t) {
|
|
649
649
|
const e = t.split(","), n = e[0].match(/:(.*?);/)[1], r = atob(e[1]);
|
|
650
650
|
let i = r.length;
|
|
651
651
|
const s = new Uint8Array(i);
|
|
@@ -653,7 +653,7 @@ function ye(t) {
|
|
|
653
653
|
s[i] = r.charCodeAt(i);
|
|
654
654
|
return new Blob([s], { type: n });
|
|
655
655
|
}
|
|
656
|
-
function
|
|
656
|
+
function ye(t, e) {
|
|
657
657
|
const n = t.split(","), r = n[0].match(/:(.*?);/)[1], i = atob(n[1]);
|
|
658
658
|
let s = i.length;
|
|
659
659
|
const o = new Uint8Array(s);
|
|
@@ -661,7 +661,7 @@ function he(t, e) {
|
|
|
661
661
|
o[s] = i.charCodeAt(s);
|
|
662
662
|
return new File([o], e, { type: r });
|
|
663
663
|
}
|
|
664
|
-
function
|
|
664
|
+
function he(t, e, n) {
|
|
665
665
|
return new window.File([t], e, { type: n });
|
|
666
666
|
}
|
|
667
667
|
function Ft(t) {
|
|
@@ -705,7 +705,7 @@ function Pt(t) {
|
|
|
705
705
|
};
|
|
706
706
|
});
|
|
707
707
|
}
|
|
708
|
-
async function
|
|
708
|
+
async function me(t) {
|
|
709
709
|
const { url: e = "", currentTime: n, videoSuffix: r = "", videoAllowPlay: i = !1 } = t;
|
|
710
710
|
let s = "", o = r, c = "1", f;
|
|
711
711
|
return e instanceof File ? (s = URL.createObjectURL(e), o = R(e.name), c = b(e.name)) : e instanceof Blob ? (s = URL.createObjectURL(e), c = b(e)) : F(e) ? (s = e, c = b(e)) : (e.includes("https") || e.includes("http")) && (s = e, o = R(e), c = b(e)), (o ? S.videoAllowType.includes(o.toLowerCase()) : !1) ? i ? L(s, n) : (f = await Pt({
|
|
@@ -739,19 +739,19 @@ function F(t = "") {
|
|
|
739
739
|
"data:audio/"
|
|
740
740
|
].find((n) => t.includes(n)));
|
|
741
741
|
}
|
|
742
|
-
function
|
|
742
|
+
function we(t) {
|
|
743
743
|
return typeof t == "string" && /^data:(?:image|video|audio)\/[A-Za-z]+;base64,[A-Za-z0-9+/=]+$/.test(t);
|
|
744
744
|
}
|
|
745
|
-
function
|
|
745
|
+
function Ae(t, e, n, r = !1) {
|
|
746
746
|
t && e && n && t.addEventListener(e, n, r);
|
|
747
747
|
}
|
|
748
|
-
function
|
|
748
|
+
function be(t, e, n, r = !1) {
|
|
749
749
|
t && e && n && t.removeEventListener(e, n, r);
|
|
750
750
|
}
|
|
751
|
-
function
|
|
751
|
+
function Se() {
|
|
752
752
|
return /windows|win32/i.test(navigator.userAgent);
|
|
753
753
|
}
|
|
754
|
-
function
|
|
754
|
+
function xe(t) {
|
|
755
755
|
return D(t) ? t : !!t;
|
|
756
756
|
}
|
|
757
757
|
function M(t, e) {
|
|
@@ -767,7 +767,7 @@ function M(t, e) {
|
|
|
767
767
|
}
|
|
768
768
|
return e.toString();
|
|
769
769
|
}
|
|
770
|
-
function
|
|
770
|
+
function Oe(t, e) {
|
|
771
771
|
const { toChinese: n = !1, fixed: r = 2, min: i = 1e4 } = e || {}, s = h(i) ? i : 1e4, o = h(r) ? r : 2, c = n ? t < s ? "" : t < 1e8 ? "万" : "亿" : t < s ? "" : t < 1e8 ? "w" : "亿";
|
|
772
772
|
if (!h(t))
|
|
773
773
|
return {
|
|
@@ -798,7 +798,7 @@ function je(t, e) {
|
|
|
798
798
|
unit: c
|
|
799
799
|
});
|
|
800
800
|
}
|
|
801
|
-
function
|
|
801
|
+
function je(t, e) {
|
|
802
802
|
let n = 0;
|
|
803
803
|
const r = D(e.removeAfter) ? e.removeAfter : !0, i = e.id || "hiddenElement", s = {
|
|
804
804
|
opacity: 0,
|
|
@@ -817,7 +817,7 @@ function Ie(t, e) {
|
|
|
817
817
|
const c = document.createElement(e.createName || "span");
|
|
818
818
|
return c.innerHTML = t, (e.cssObject || m(e.cssObject)) && Object.assign(c.style, e.cssObject), o.append(c), n = c.getBoundingClientRect()[e.type || "width"], r && o.removeChild(c), n;
|
|
819
819
|
}
|
|
820
|
-
function
|
|
820
|
+
function Ie(t) {
|
|
821
821
|
t = h(t) && !Number.isNaN(t) ? t : 0;
|
|
822
822
|
const e = ["零", "一", "二", "三", "四", "五", "六", "七", "八", "九"], n = ["", "十", "百", "千", "万"];
|
|
823
823
|
t = Number.parseInt(`${t}`);
|
|
@@ -831,7 +831,7 @@ function Ue(t) {
|
|
|
831
831
|
let s = t % 1e4;
|
|
832
832
|
return s.toString().length < 4 && (s = "0" + s), i ? r(i) + "万" + r(s) : r(t);
|
|
833
833
|
}
|
|
834
|
-
function
|
|
834
|
+
function Ue(t, e) {
|
|
835
835
|
Object.keys(t).forEach((n) => {
|
|
836
836
|
e(n, t[n]);
|
|
837
837
|
});
|
|
@@ -840,14 +840,14 @@ function Lt(t, e, n, r) {
|
|
|
840
840
|
const i = n - e;
|
|
841
841
|
return t /= r / 2, t < 1 ? i / 2 * t * t * t + e : i / 2 * ((t -= 2) * t * t + 2) + e;
|
|
842
842
|
}
|
|
843
|
-
function
|
|
843
|
+
function Re(t, e = {}) {
|
|
844
844
|
const { getContainer: n = () => window, callback: r, duration: i = 450 } = e, s = n(), o = K(s, !0), c = Date.now(), f = () => {
|
|
845
845
|
const a = Date.now() - c, l = Lt(a > i ? i : a, o, t, i);
|
|
846
846
|
I(s) ? s.scrollTo(window.pageXOffset, l) : s instanceof HTMLDocument || s.constructor.name === "HTMLDocument" ? s.documentElement.scrollTop = l : s.scrollTop = l, a < i ? U(f) : typeof r == "function" && r();
|
|
847
847
|
};
|
|
848
848
|
s && U(f);
|
|
849
849
|
}
|
|
850
|
-
function
|
|
850
|
+
function Ee(t) {
|
|
851
851
|
let e;
|
|
852
852
|
const n = (i) => () => {
|
|
853
853
|
e = null, t(...i);
|
|
@@ -856,7 +856,7 @@ function Be(t) {
|
|
|
856
856
|
};
|
|
857
857
|
return r.cancel = () => cancelAnimationFrame(e), r;
|
|
858
858
|
}
|
|
859
|
-
const Mt = typeof process < "u" && process.versions != null && process.versions.node != null,
|
|
859
|
+
const Mt = typeof process < "u" && process.versions != null && process.versions.node != null, Be = () => process.env.NODE_ENV === "TEST" ? !0 : typeof window < "u" && typeof window.document < "u" && typeof window.matchMedia < "u" && !Mt;
|
|
860
860
|
function j(t, e, n, r) {
|
|
861
861
|
if (t === e)
|
|
862
862
|
return !0;
|
|
@@ -919,10 +919,10 @@ function j(t, e, n, r) {
|
|
|
919
919
|
}
|
|
920
920
|
return t !== t && e !== e;
|
|
921
921
|
}
|
|
922
|
-
function
|
|
922
|
+
function De(t) {
|
|
923
923
|
return /\w.(?:png|jpg|jpeg|svg|webp|gif|bmp)$/i.test(t);
|
|
924
924
|
}
|
|
925
|
-
const
|
|
925
|
+
const Ne = (t) => t == null, Fe = (t) => {
|
|
926
926
|
if (!t || !t.startsWith("http"))
|
|
927
927
|
return !1;
|
|
928
928
|
try {
|
|
@@ -931,17 +931,17 @@ const _t = (t) => t == null, Fe = (t) => {
|
|
|
931
931
|
return console.error("isUrl error", e), !1;
|
|
932
932
|
}
|
|
933
933
|
};
|
|
934
|
-
function
|
|
934
|
+
function _t(t) {
|
|
935
935
|
return t === "__proto__";
|
|
936
936
|
}
|
|
937
937
|
function g(t, e, n) {
|
|
938
938
|
const r = Object.keys(e);
|
|
939
939
|
for (let i = 0; i < r.length; i++) {
|
|
940
940
|
const s = r[i];
|
|
941
|
-
if (
|
|
941
|
+
if (_t(s))
|
|
942
942
|
continue;
|
|
943
943
|
const o = e[s], c = t[s], f = n(c, o, s, t, e);
|
|
944
|
-
f !== void 0 ? t[s] = f : A(o) ? A(c) ? t[s] = g(c, o, n) : t[s] = g({}, o, n) :
|
|
944
|
+
f !== void 0 ? t[s] = f : A(o) ? A(c) ? t[s] = g(c, o, n) : t[s] = g({}, o, n) : t[s] = o;
|
|
945
945
|
}
|
|
946
946
|
return t;
|
|
947
947
|
}
|
|
@@ -998,7 +998,7 @@ function ze(t) {
|
|
|
998
998
|
if (!(typeof t != "string" && !Array.isArray(t)))
|
|
999
999
|
return Array.isArray(t) ? t[t.length - 1] : t.split(":")?.slice(-1)[0];
|
|
1000
1000
|
}
|
|
1001
|
-
function
|
|
1001
|
+
function $t(t) {
|
|
1002
1002
|
return t && (t.type === q || t.type === v && t.children.length === 0 || t.type === Text && t.children.trim() === "");
|
|
1003
1003
|
}
|
|
1004
1004
|
function Ve(t, e) {
|
|
@@ -1007,19 +1007,19 @@ function Ve(t, e) {
|
|
|
1007
1007
|
function E(t = [], e = !0) {
|
|
1008
1008
|
const n = Array.isArray(t) ? t : [t], r = [];
|
|
1009
1009
|
return n.forEach((i) => {
|
|
1010
|
-
Array.isArray(i) ? r.push(...E(i, e)) : i?.type === v || i?.type === "template" ? r.push(...E(i.children, e)) : i && B(i) ? e &&
|
|
1010
|
+
Array.isArray(i) ? r.push(...E(i, e)) : i?.type === v || i?.type === "template" ? r.push(...E(i.children, e)) : i && B(i) ? e && !$t(i) ? r.push(i) : e || r.push(i) : jt(i) && r.push(i);
|
|
1011
1011
|
}), r;
|
|
1012
1012
|
}
|
|
1013
1013
|
function H({ vnode: t, defaultVNode: e }, ...n) {
|
|
1014
1014
|
return t === !1 ? null : typeof t == "function" ? t?.(...n) : t || e;
|
|
1015
1015
|
}
|
|
1016
|
-
function
|
|
1016
|
+
function vt(t, ...e) {
|
|
1017
1017
|
const { slots: n, key: r = "default", render: i, props: s, defaultChildren: o } = t;
|
|
1018
1018
|
let c;
|
|
1019
1019
|
const f = s[r], u = n?.[r], a = typeof o == "function" ? o?.() : o;
|
|
1020
1020
|
return f === !1 ? c = !1 : f === !0 ? c = u ?? a : m(f) && i ? B(f) ? c = f : c = u : c = f || u, c === !1 ? !1 : i ? H({ vnode: c, defaultVNode: a }, ...e) : c;
|
|
1021
1021
|
}
|
|
1022
|
-
function
|
|
1022
|
+
function Wt(t, ...e) {
|
|
1023
1023
|
const { slots: n, key: r = "default", props: i, defaultChildren: s } = t;
|
|
1024
1024
|
let o;
|
|
1025
1025
|
const c = i[r], f = n?.[r]?.(...e), u = typeof s == "function" ? s?.() : s;
|
|
@@ -1028,80 +1028,80 @@ function zt(t, ...e) {
|
|
|
1028
1028
|
function He(t, ...e) {
|
|
1029
1029
|
const { slots: n, props: r, keys: i, render: s, defaultVNodes: o } = t, c = {};
|
|
1030
1030
|
return i.forEach((f, u) => {
|
|
1031
|
-
const a = o ? o[u] : null, l = s ?
|
|
1031
|
+
const a = o ? o[u] : null, l = s ? Wt({ slots: n, props: r, key: f, defaultChildren: a }, ...e) : vt({ slots: n, props: r, key: f, render: !1, defaultChildren: a }, ...e);
|
|
1032
1032
|
(D(l) || l) && (c[f] = l);
|
|
1033
1033
|
}), c;
|
|
1034
1034
|
}
|
|
1035
1035
|
export {
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1036
|
+
Vt as Base64,
|
|
1037
|
+
se as arrayRepeat,
|
|
1038
|
+
ne as arraySlice,
|
|
1039
|
+
he as blobToDataURL,
|
|
1040
1040
|
b as checkFileType,
|
|
1041
1041
|
Y as classNames,
|
|
1042
1042
|
w as cloneDeep,
|
|
1043
|
-
|
|
1043
|
+
Gt as cloneDeepWith,
|
|
1044
1044
|
y as cloneDeepWithImpl,
|
|
1045
1045
|
It as compareArray,
|
|
1046
|
-
|
|
1047
|
-
|
|
1046
|
+
ie as compareArraySort,
|
|
1047
|
+
oe as compareArrayTimeSort,
|
|
1048
1048
|
Ut as compareTime,
|
|
1049
|
-
|
|
1049
|
+
xe as convertValueBoolean,
|
|
1050
1050
|
d as copyProperties,
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1051
|
+
ge as dataURLtoBlob,
|
|
1052
|
+
ye as dataURLtoFile,
|
|
1053
|
+
te as deepCopy,
|
|
1054
1054
|
Le as deepMerge,
|
|
1055
1055
|
S as fileTypes,
|
|
1056
1056
|
E as filterEmpty,
|
|
1057
1057
|
Dt as filterTree,
|
|
1058
1058
|
Nt as findSourceByTree,
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1059
|
+
ae as findValueAndAncestors,
|
|
1060
|
+
Ue as forInObject,
|
|
1061
|
+
fe as formatDuration,
|
|
1062
1062
|
M as formatNumber,
|
|
1063
|
-
|
|
1063
|
+
kt as genColumnKey,
|
|
1064
1064
|
L as generateVideoPicture,
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1065
|
+
le as getArrayLast,
|
|
1066
|
+
pe as getBase64,
|
|
1067
|
+
de as getBlobUrl,
|
|
1068
1068
|
R as getFileSuffix,
|
|
1069
1069
|
ze as getKeys,
|
|
1070
1070
|
Bt as getLevelData,
|
|
1071
1071
|
Et as getMaxFloor,
|
|
1072
1072
|
Pt as getMediaInfos,
|
|
1073
|
-
|
|
1073
|
+
Kt as getPrefixCls,
|
|
1074
1074
|
Rt as getRandomNumber,
|
|
1075
1075
|
K as getScroll,
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1076
|
+
Xt as getScrollContainer,
|
|
1077
|
+
vt as getSlot,
|
|
1078
|
+
Wt as getSlotVNode,
|
|
1079
1079
|
Ve as getSlotsChildren,
|
|
1080
1080
|
He as getSlotsProps,
|
|
1081
|
-
|
|
1081
|
+
re as getSortIndex,
|
|
1082
1082
|
k as getSymbols,
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1083
|
+
je as getTextWidth,
|
|
1084
|
+
Zt as getValueFromObjectByKey,
|
|
1085
|
+
me as getVideoCoverPicture,
|
|
1086
1086
|
Ft as getVideoFileUrl,
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1087
|
+
ee as handleCurrentPage,
|
|
1088
|
+
ce as handleEmptyField,
|
|
1089
|
+
Ct as handleShowIndex,
|
|
1090
1090
|
J as is,
|
|
1091
1091
|
p as isArray,
|
|
1092
1092
|
F as isBase64,
|
|
1093
1093
|
D as isBoolean,
|
|
1094
|
-
|
|
1095
|
-
|
|
1094
|
+
Be as isBrowser,
|
|
1095
|
+
we as isDataURLBase64,
|
|
1096
1096
|
j as isDeepEqualReact,
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1097
|
+
$t as isEmptyElement,
|
|
1098
|
+
Ht as isFunction,
|
|
1099
|
+
De as isImg,
|
|
1100
|
+
Yt as isInContainer,
|
|
1101
|
+
qt as isJSONStr,
|
|
1102
|
+
Jt as isMobile,
|
|
1103
|
+
Ne as isNil,
|
|
1104
|
+
Qt as isNotNil,
|
|
1105
1105
|
h as isNumber,
|
|
1106
1106
|
m as isObject,
|
|
1107
1107
|
A as isPlainObject,
|
|
@@ -1113,22 +1113,22 @@ export {
|
|
|
1113
1113
|
tt as isTypedArray,
|
|
1114
1114
|
Fe as isUrl,
|
|
1115
1115
|
jt as isValid,
|
|
1116
|
-
|
|
1116
|
+
Se as isWindowsOs,
|
|
1117
1117
|
Pe as merge,
|
|
1118
1118
|
g as mergeWith,
|
|
1119
1119
|
_e as nanoid,
|
|
1120
|
-
|
|
1120
|
+
be as off,
|
|
1121
1121
|
$e as omitBoolean,
|
|
1122
1122
|
ve as omitUndefined,
|
|
1123
1123
|
We as omitUndefinedAndEmptyArr,
|
|
1124
|
-
|
|
1124
|
+
Ae as on,
|
|
1125
1125
|
U as raf,
|
|
1126
|
-
|
|
1127
|
-
|
|
1126
|
+
Tt as runFunction,
|
|
1127
|
+
Re as scrollTo,
|
|
1128
1128
|
H as slotRender,
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1129
|
+
Ee as throttleByAnimationFrame,
|
|
1130
|
+
Ie as toChinesNum,
|
|
1131
|
+
Oe as toConvertNumberShow,
|
|
1132
|
+
ue as treeData,
|
|
1133
1133
|
Me as useDeepMerge
|
|
1134
1134
|
};
|
package/dist/pro-utils.umd.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Gx Design Pro
|
|
3
|
-
* Version: 0.2.0-beta.
|
|
3
|
+
* Version: 0.2.0-beta.82
|
|
4
4
|
* Author: gx12358
|
|
5
5
|
* Copyright (C) 2024 gx12358
|
|
6
6
|
* License: MIT License
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* Homepage:
|
|
10
10
|
* Contact: gx12358@gmail.com
|
|
11
11
|
*/
|
|
12
|
-
(function(s,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],d):(s=typeof globalThis<"u"?globalThis:s||self,d(s.GPorUtils={},s.vue))})(this,(function(s,d){"use strict";class
|
|
13
|
-
`);let r="";for(let n=0;n<t.length;n++){const i=t.charCodeAt(n);i<128?r+=String.fromCharCode(i):i>127&&i<2048?(r+=String.fromCharCode(i>>6|192),r+=String.fromCharCode(i&63|128)):(r+=String.fromCharCode(i>>12|224),r+=String.fromCharCode(i>>6&63|128),r+=String.fromCharCode(i&63|128))}return r}_utf8_decode(t){let r="",n=0,i=0,c=0,o=0;for(;n<t.length;)i=t.charCodeAt(n),i<128?(r+=String.fromCharCode(i),n++):i>191&&i<224?(c=t.charCodeAt(n+1),r+=String.fromCharCode((i&31)<<6|c&63),n+=2):(c=t.charCodeAt(n+1),o=t.charCodeAt(n+2),r+=String.fromCharCode((i&15)<<12|(c&63)<<6|o&63),n+=3);return r}encode(t){let r="",n,i,c,o,f,u,a,l=0;for(t=this._utf8_encode(t);l<t.length;)n=t.charCodeAt(l++),i=t.charCodeAt(l++),c=t.charCodeAt(l++),o=n>>2,f=(n&3)<<4|i>>4,u=(i&15)<<2|c>>6,a=c&63,Number.isNaN(i)?u=a=64:Number.isNaN(c)&&(a=64),r=r+this._keyStr.charAt(o)+this._keyStr.charAt(f)+this._keyStr.charAt(u)+this._keyStr.charAt(a);return r}decode(t){let r="",n,i,c,o,f,u,a,l=0;for(t=t.replace(/[^A-Z0-9+/=]/gi,"");l<t.length;)o=this._keyStr.indexOf(t.charAt(l++)),f=this._keyStr.indexOf(t.charAt(l++)),u=this._keyStr.indexOf(t.charAt(l++)),a=this._keyStr.indexOf(t.charAt(l++)),n=o<<2|f>>4,i=(f&15)<<4|u>>2,c=(u&3)<<6|a,r=r+String.fromCharCode(n),u!==64&&(r=r+String.fromCharCode(i)),a!==64&&(r=r+String.fromCharCode(c));return r=this._utf8_decode(r),r}}function v(e,t){return Object.prototype.toString.call(e)===`[object ${t}]`}function I(e){return typeof e=="boolean"}function p(e){return typeof e=="number"}function g(e){return typeof Array.isArray>"u"?Object.prototype.toString.call(e)==="[object Array]":Array.isArray(e)}function w(e){return e!==null&&v(e,"Object")}function W(e){return typeof e=="string"||e instanceof String}function ge(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Function]"}function ye(e){if(typeof e!="string")return!1;try{const t=JSON.parse(e);return typeof t=="object"&&t!==null}catch{return!1}}function he(){const e=navigator.userAgent||navigator.vendor;return!!(/iPhone/.test(e)||/Android/.test(e)&&/Mobile/.test(e)||/Windows Phone/.test(e)||/Mobile/.test(e)&&!V())}function V(){const e=navigator.userAgent||navigator.vendor;return!!(/iPad/.test(e)||/Macintosh/.test(e)&&"ontouchend"in document||/Android/.test(e)&&!/Mobile/.test(e))}function z(...e){const t=[];for(let r=0;r<e.length;r++){const n=e[r];if(n){if(W(n))t.push(n);else if(g(n))for(let i=0;i<n.length;i++){const c=z(n[i]);c&&t.push(c)}else if(w(n))for(const i in n)n[i]&&t.push(i)}}return t.filter(r=>r).join(" ")}function me(e,t){if(typeof t!="string"&&!Array.isArray(t))return;const r=Array.isArray(t)?t:t.split(":");let n=e;for(let i=0;i<r.length;i++)if(n&&Object.prototype.hasOwnProperty.call(n,r[i]))n=n[r[i]];else return;return n}const O=typeof window>"u";function pe(e){return e.replace(/[-_](.)/g,(t,r)=>r.toUpperCase())}const F=function(e,t){if(O||!e||!t)return"";t=pe(t),t==="float"&&(t="cssFloat");try{const r=e.style[t];if(r)return r;const n=document?.defaultView?.getComputedStyle(e,"");return n?n[t]:""}catch{return e.style[t]}},q=(e,t)=>O?void 0:(t==null?F(e,"overflow"):t?F(e,"overflow-y"):F(e,"overflow-x")).match(/(scroll|auto|overlay)/),we=(e,t)=>{if(O)return;let r=e;for(;r;){if([window,document,document.documentElement].includes(r))return window;if(q(r,t))return r;r=r.parentNode}return r},Ae=(e,t)=>{if(O||!e||!t)return!1;const r=e.getBoundingClientRect();let n;return[window,document,document.documentElement,null,void 0].includes(t)?n={top:0,right:window.innerWidth,bottom:window.innerHeight,left:0}:n=t.getBoundingClientRect(),r.top<n.bottom&&r.bottom>n.top&&r.right>n.left&&r.left<n.right};function P(e){return e!=null&&e===e.window}function H(e,t){if(typeof window>"u")return 0;const r=t?"scrollTop":"scrollLeft";let n=0;return P(e)?n=e[t?"pageYOffset":"pageXOffset"]:e instanceof Document?n=e.documentElement[r]:e&&(n=e[r]),e&&!P(e)&&typeof n!="number"&&(n=(e.ownerDocument||e).documentElement?.[r]),n}function x(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function Se(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}function J(e){return e==null||typeof e!="object"&&typeof e!="function"}function Z(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}const be="[object RegExp]",Oe="[object String]",je="[object Number]",Ue="[object Boolean]",Ie="[object Arguments]",Re="[object Symbol]",Be="[object Date]",Ne="[object Map]",De="[object Set]",Ee="[object Array]",Fe="[object ArrayBuffer]",Pe="[object Object]",Le="[object DataView]",Me="[object Uint8Array]",_e="[object Uint8ClampedArray]",$e="[object Uint16Array]",ve="[object Uint32Array]",We="[object Int8Array]",Ve="[object Int16Array]",ze="[object Int32Array]",qe="[object Float32Array]",He="[object Float64Array]";function xe(e,t){return A(e,void 0,e,new Map,t)}function A(e,t,r,n=new Map,i=void 0){const c=i?.(e,t,r,n);if(c!==void 0)return c;if(J(e))return e;if(n.has(e))return n.get(e);if(Array.isArray(e)){const o=Array.from({length:e.length});n.set(e,o);for(let f=0;f<e.length;f++)o[f]=A(e[f],f,r,n,i);return Object.hasOwn(e,"index")&&(o.index=e.index),Object.hasOwn(e,"input")&&(o.input=e.input),o}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const o=new RegExp(e.source,e.flags);return o.lastIndex=e.lastIndex,o}if(e instanceof Map){const o=new Map;n.set(e,o);for(const[f,u]of e)o.set(f,A(u,f,r,n,i));return o}if(e instanceof Set){const o=new Set;n.set(e,o);for(const f of e)o.add(A(f,void 0,r,n,i));return o}if(typeof Buffer<"u"&&Buffer.isBuffer(e))return e.subarray();if(Z(e)){const o=new(Object.getPrototypeOf(e)).constructor(e.length);n.set(e,o);for(let f=0;f<e.length;f++)o[f]=A(e[f],f,r,n,i);return o}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const o=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return n.set(e,o),y(o,e,r,n,i),o}if(typeof File<"u"&&e instanceof File){const o=new File([e],e.name,{type:e.type});return n.set(e,o),y(o,e,r,n,i),o}if(typeof Blob<"u"&&e instanceof Blob){const o=new Blob([e],{type:e.type});return n.set(e,o),y(o,e,r,n,i),o}if(e instanceof Error){const o=new e.constructor;return n.set(e,o),o.message=e.message,o.name=e.name,o.stack=e.stack,o.cause=e.cause,y(o,e,r,n,i),o}if(typeof e=="boolean"){const o=!!e.valueOf();return n.set(e,o),y(o,e,r,n,i),o}if(typeof e=="number"){const o=Number(e.valueOf());return n.set(e,o),y(o,e,r,n,i),o}if(typeof e=="string"){const o=String(e.valueOf());return n.set(e,o),y(o,e,r,n,i),o}if(typeof e=="object"&&Je(e)){const o=Object.create(Object.getPrototypeOf(e));return n.set(e,o),y(o,e,r,n,i),o}return e}function y(e,t,r=e,n,i){const c=[...Object.keys(t),...x(t)];for(let o=0;o<c.length;o++){const f=c[o],u=Object.getOwnPropertyDescriptor(e,f);(u==null||u.writable)&&(e[f]=A(t[f],f,r,n,i))}}function Je(e){switch(Se(e)){case Ie:case Ee:case Fe:case Le:case Ue:case Be:case qe:case He:case We:case Ve:case ze:case Ne:case je:case Pe:case be:case De:case Oe:case Re:case Me:case _e:case $e:case ve:return!0;default:return!1}}function S(e){return A(e,void 0,e,new Map,void 0)}const j={videoAllowType:["mp4","webm","ogg"],audioAllowType:["mp3","ogg","wav","aac","m4a","webm"],imageType:["jpeg","jpg","png","gif","bmp","tiff","tif","webp","heic","heif","svg","ico","raw","cr2","nef","arw","dng","psd","eps"],videoType:["mp4","avi","mov","wmv","mkv","flv","webm","mpeg","mpg","3gp","ogv","mxf","vob","rm","rmvb","ts","mts","m2ts","divx","xvid"],audioType:["mp3","wav","aac","flac","ogg","wma","m4a","alac","opus","amr","aiff","au","pcm","ape"]},X=e=>e!=null&&e!=="";let G=e=>setTimeout(e,16),Y=e=>clearTimeout(e);typeof window<"u"&&"requestAnimationFrame"in window&&(G=e=>window.requestAnimationFrame(e),Y=e=>window.cancelAnimationFrame(e));let K=0;const L=new Map;function Q(e){L.delete(e)}function R(e,t=1){K+=1;const r=K;function n(i){if(i===0)Q(r),e();else{const c=G(()=>{n(i-1)});L.set(r,c)}}return n(t),r}R.cancel=e=>{const t=L.get(e);return Q(t),Y(t)};function Ze(e){return e!=null}function b(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null?Object.prototype.toString.call(e)==="[object Object]":!1}const Xe=({suffixCls:e,customizePrefixCls:t,isPor:r,className:n})=>{const i=n||(r?"gx-pro":"gx");return t||(e?`${i}-${e}`:i)},Ge=(e,t)=>e?g(e)?e.join("-"):e.toString():`${t||0}`;function Ye(e,{align:t,showIndex:r}){const n=S(e);if(r&&e.length&&e.every(i=>i.dataIndex!=="sortIndex")){const i=e[0];n.unshift({title:"序号",align:t,fixed:i.fixed,width:60,uuid:C().uuid(15),dataIndex:"sortIndex",key:"sortIndex"})}else n.filter(i=>i.dataIndex!=="sortIndex");return n}function Ke(e,...t){return typeof e=="function"?e(...t):e}function Qe(e){return JSON.parse(JSON.stringify(e))}function ke(e,t){if(w(e)){const{pageSize:r=10,total:n=0}=e;let{current:i=1}=e;return n-t<=r*(i-1)&&(i=i-1),i===0?1:i}return 1}function Te(e=[],t,r="children"){function n(i,c){return c.map((o,f)=>{const u=`${i}-${f+1}`;return o[r]&&(o[r]=n(u,o[r])),o.sortIndex=u,o})}return S(e).map((i,c)=>{const o=w(t)&&t.current||1,f=w(t)&&t.pageSize||10,u=`${(o-1)*f+(c+1)}`;return i[r]&&(i[r]=n(`${u}`,i[r])),i.sortIndex=u,i})}function Ce(e,t){return g(e)?e?.filter((r,n)=>{if(p(t))return n<=t-1;if(g(t)&&t.length===2){const i=t[0]-1,c=t[1]?t[1]-1:e.length-1;return n<=c&&n>=i}else if(g(t)&&t.length===1){const i=t[0]-1,c=e.length-1;return n<=c&&n>=i}return!0}):[]}function k(e,t,r,n=0){const i=p(n)&&(n===0||n===1)?n:0,c=e[r],o=t[r];let f=0;return c<o?f=i===0?-1:0:c>o&&(f=i===0?0:-1),f}function T(e,t,r,n=0){const i=p(n)&&(n===0||n===1)?n:0,c=new Date(e[r]),o=new Date(t[r]);let f=0;return c<o?f=i===0?-1:0:c>o&&(f=i===0?0:-1),f}function et(e,t,r=0){return e.sort((n,i)=>k(n,i,t,r))}function tt(e,t,r=0){return e.sort((n,i)=>T(n,i,t,r))}function nt(e){let t=S(e);const r=new Set(t);return t=Array.from(r),t}function rt(e,t){const r=["null","undefined"];let n=!0;return e===0?n=!0:r.includes(e)?n=!1:e||(n=!1),n?{value:e,success:n}:{value:t===""?t:t||"-",success:n}}function it(e){let t="";if(e>-1){const r=Math.floor(e/3600),n=Math.floor(e/60)%60,i=Number.parseInt(String(e%60));r<10?t="0"+r+":":t=r+":",n<10&&(t+="0"),t+=n+":",i<10&&(t+="0"),t+=i}return t.split(":")[0]==="00"?`${t.split(":")[1]}:${t.split(":")[2]}`:t}function C(){const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");return{uuid(t,r){const n=e,i=[],c=r||n.length;let o,f;if(t)for(o=0;o<t;o+=1)i[o]=n[Number.parseInt(String(Math.random()*c))];else for(i[8]="-",i[13]="-",i[18]="-",i[23]="-",i[14]="4",o=0;o<36;o+=1)i[o]||(f=Math.random()*16,i[o]=n[o===19?f&&3||8:f]);return i.join("")},uuidFast(){const t=e,r=Array.from({length:36});let n=0,i,c;for(c=0;c<36;c+=1)c===8||c===13||c===18||c===23?r[c]="-":c===14?r[c]="4":(n<=2&&(n=33554432+Math.random()*16777216||0),i=n&&15,n=n>4,r[c]=t[c===19?i&&3||8:i]);return r.join("")},uuidString(){return this.uuidFast().replace(new RegExp("-","g"),"")},uuidCompact(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=Math.random()*16||0;return(t==="x"?r:r&&3||8).toString(16)})}}}function ee(e,t){if(!Array.isArray(e)||e.length===0)return 0;const r=t||"children";return Math.max(...e.map(n=>{const i=n[r];return 1+(i?ee(i,r):0)}))}function te(e,t="children"){let r=[];return e.forEach(n=>{r.push(n),g(n[t])&&n[t].length>0&&(r=r.concat(te(n[t],t)))}),r}function ot(e,t){if(!e||!g(e)||e?.length===0)return[];const{id:r="id",parentId:n="parentId",children:i="children",emptyChildren:c=!0}=t||{},o=t?.rootId??0,f=S(e);return f.map(u=>(!c&&u[i]&&u[i]?.length===0&&delete u[i],u)).filter(u=>{const a=f.filter(l=>u[r]===l[n]);return a.length>0?u[i]=a:c&&(u[i]=[]),o===!1?!0:u[n]===o})}function ne(e,t){return e.map(r=>{const n={...r};return n.children&&(n.children=ne(n.children,t)),t(n)||n.children&&n.children.length>0?n:null}).filter(Boolean)}function ct(e,t,r){const{value:n,children:i}=r||{value:"value",children:"children"};let c=[];function o(f,u){if(f[n]===t)return c=[...u,f[n]],!0;if(f[i]){for(const a of f[i])if(o(a,[...u,f[n]]))return!0}return!1}for(const f of e)if(o(f,[]))break;return c}function ft(e){return e&&g(e)?e[e.length-1]:null}function re(e,t,r){const n=r?.value||"id",i=r?.children||"children";for(const c of e){if(c[n]===t)return c;const o=c[i];if(o){const f=re(o,t,r);if(f)return f}}}function st(e){return URL.createObjectURL(e)}function ut(e){return new Promise((t,r)=>{const n=new FileReader;n.readAsDataURL(e),n.onload=()=>t(n.result),n.onerror=i=>r(i)})}function at(e){const t=e.split(","),r=t[0].match(/:(.*?);/)[1],n=atob(t[1]);let i=n.length;const c=new Uint8Array(i);for(;i--;)c[i]=n.charCodeAt(i);return new Blob([c],{type:r})}function lt(e,t){const r=e.split(","),n=r[0].match(/:(.*?);/)[1],i=atob(r[1]);let c=i.length;const o=new Uint8Array(c);for(;c--;)o[c]=i.charCodeAt(c);return new File([o],t,{type:n})}function dt(e,t,r){return new window.File([e],t,{type:r})}function ie(e){if(!e||typeof e!="string")return"";const t=e.indexOf("?");return t>0?`${e.substring(0,t)}`:e}function B(e){if(!e||typeof e!="string")return"";const t=ie(e),r=t.lastIndexOf(".");return r>0&&`${t?.substring?.(r)?.split("?")?.[0]}`?.split(".")?.[1]||""}function U(e,t){if(t)return t;if(!e||e==="data:")return"4";let r="4";return N(e)?e.includes("data:image/")?r="png":e.includes("data:video/")?r="mp4":e.includes("data:audio/")&&(r="mp3"):e instanceof Blob?(e=String(e),e.includes("image")?r="png":e.includes("video")?r="mp4":e.includes("audio")&&(r="mp3")):r=B(e).toLowerCase(),j.imageType.includes(r)?"1":j.videoType.includes(r)?"3":j.audioType.includes(r)?"2":"4"}function oe(e){const{url:t="",fileType:r="1"}=e||{};let n="",i={play:!1,height:0,size:0,width:0,duration:0};function c(){i={play:!1,height:0,size:0,width:0,duration:0}}return t instanceof File?n=URL.createObjectURL(t):N(t)?n=t:t instanceof Blob?n=URL.createObjectURL(t):(t.includes("https")||t.includes("http"))&&(n=t),new Promise(o=>{let f;if(r==="4"){o(i);return}r==="1"?(f=document.createElement("img"),f.src=n):r==="2"?(f=document.createElement("audio"),f.src=n):r==="3"&&(f=document.createElement("video"),f.src=n),r==="1"?f.onload=function(){c(),i.play=!0,i.width=f.width||0,i.height=f.height||0,o(i),f=null}:f.oncanplay=function(){c(),i.play=!0,i.width=f?.videoWidth||0,i.height=f?.videoHeight||0,i.duration=f?.duration||0,o(i),f=null},f.onerror=function(){c(),o(i),f=null}})}async function gt(e){const{url:t="",currentTime:r,videoSuffix:n="",videoAllowPlay:i=!1}=e;let c="",o=n,f="1",u;return t instanceof File?(c=URL.createObjectURL(t),o=B(t.name),f=U(t.name)):t instanceof Blob?(c=URL.createObjectURL(t),f=U(t)):N(t)?(c=t,f=U(t)):(t.includes("https")||t.includes("http"))&&(c=t,o=B(t),f=U(t)),(o?j.videoAllowType.includes(o.toLowerCase()):!1)?i?M(c,r):(u=await oe({url:c,fileType:f}),u.play?M(c,r):new Promise(l=>{l("")})):new Promise(l=>{l("")})}async function M(e,t=0){return new Promise(r=>{let n=document.createElement("video");n&&(n.controls=!0,n.muted=!0,n.setAttribute("src",e),n.setAttribute("muted",String(!0)),n.setAttribute("crossorigin","anonymous"),n.setAttribute("autoplay",String(!0)),n.addEventListener("loadeddata",async()=>{let i;for(n?.addEventListener("seeked",async()=>{i&&i()});t<(n?.duration||0);){n&&(n.currentTime=t),await new Promise(m=>i=m);const c=document.createElement("canvas"),o=.8,f=c.getContext("2d"),u=n?.videoWidth||0*o,a=n?.videoHeight||0*o,l=0;c.width=n?.videoWidth||0*o,c.height=n?.videoHeight||0*o,n&&f.drawImage(n,0,0,u+l,a+l),n=null,r(u===0||a===0?"":c.toDataURL("image/png",1))}}))})}function N(e=""){return!!(e&&["data:image/","data:video/","data:audio/"].find(r=>e.includes(r)))}function yt(e){return typeof e=="string"&&/^data:(?:image|video|audio)\/[A-Za-z]+;base64,[A-Za-z0-9+/=]+$/.test(e)}function ht(e,t,r,n=!1){e&&t&&r&&e.addEventListener(t,r,n)}function mt(e,t,r,n=!1){e&&t&&r&&e.removeEventListener(t,r,n)}function pt(){return/windows|win32/i.test(navigator.userAgent)}function wt(e){return I(e)?e:!!e}function _(e,t){const r=`^\\d+(?:\\.\\d{0,${e}})?`,n=new RegExp(r),i=t.toString().match(n);if(i){const c=i[0];if(c.includes(".")){const[o,f]=c.split(".");if(/^0*$/.test(f))return o}return c}return t.toString()}function At(e,t){const{toChinese:r=!1,fixed:n=2,min:i=1e4}=t||{},c=p(i)?i:1e4,o=p(n)?n:2,f=r?e<c?"":e<1e8?"万":"亿":e<c?"":e<1e8?"w":"亿";if(!p(e))return{str:`${e}`,number:`${e}`};if(e<c)return{str:`${e}`,number:`${e}`};if(o===0){const a=(e/(e<1e8?1e4:1e8)).toFixed(1).split(".")[0];return{str:`${a}${f}`,number:a,unit:f}}let u;return e<1e8?(u=_(o,e/1e4),{str:u+f,number:u,unit:f}):(u=_(o,e/1e8),{str:u+f,number:u,unit:f})}function St(e,t){let r=0;const n=I(t.removeAfter)?t.removeAfter:!0,i=t.id||"hiddenElement",c={opacity:0,visibility:"hidden",position:"fixed",zIndex:-1,top:0,left:0};let o=document.querySelector(`#${i}`);if(!o){const u=document.createElement("div");u.id=i,document.body.appendChild(u),o=document.querySelector(`#${i}`)}Object.assign(o.style,c);const f=document.createElement(t.createName||"span");return f.innerHTML=e,(t.cssObject||w(t.cssObject))&&Object.assign(f.style,t.cssObject),o.append(f),r=f.getBoundingClientRect()[t.type||"width"],n&&o.removeChild(f),r}function bt(e){e=p(e)&&!Number.isNaN(e)?e:0;const t=["零","一","二","三","四","五","六","七","八","九"],r=["","十","百","千","万"];e=Number.parseInt(`${e}`);const n=o=>{const f=o.toString().split("").reverse();let u="";for(let a=0;a<f.length;a++)u=(a===0&&f[a]==="0"||a>0&&f[a]==="0"&&f[a-1]==="0"?"":(e<20&&a>0?"":t[f[a]])+(f[a]==="0"?r[0]:r[a]))+u;return u},i=Math.floor(e/1e4);let c=e%1e4;return c.toString().length<4&&(c="0"+c),i?n(i)+"万"+n(c):n(e)}function Ot(e,t){Object.keys(e).forEach(r=>{t(r,e[r])})}function jt(e,t,r,n){const i=r-t;return e/=n/2,e<1?i/2*e*e*e+t:i/2*((e-=2)*e*e+2)+t}function Ut(e,t={}){const{getContainer:r=()=>window,callback:n,duration:i=450}=t,c=r(),o=H(c,!0),f=Date.now(),u=()=>{const l=Date.now()-f,m=jt(l>i?i:l,o,e,i);P(c)?c.scrollTo(window.pageXOffset,m):c instanceof HTMLDocument||c.constructor.name==="HTMLDocument"?c.documentElement.scrollTop=m:c.scrollTop=m,l<i?R(u):typeof n=="function"&&n()};c&&R(u)}function It(e){let t;const r=i=>()=>{t=null,e(...i)},n=(...i)=>{t==null&&(t=requestAnimationFrame(r(i)))};return n.cancel=()=>cancelAnimationFrame(t),n}const Rt=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,Bt=()=>process.env.NODE_ENV==="TEST"?!0:typeof window<"u"&&typeof window.document<"u"&&typeof window.matchMedia<"u"&&!Rt;function D(e,t,r,n){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let i,c,o;if(Array.isArray(e)){if(i=e.length,i!=t.length)return!1;for(c=i;c--!==0;)if(!D(e[c],t[c],r,n))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(c of e.entries())if(!t.has(c[0]))return!1;for(c of e.entries())if(!D(c[1],t.get(c[0]),r,n))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(c of e.entries())if(!t.has(c[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(i=e.length,i!=t.length)return!1;for(c=i;c--!==0;)if(e[c]!==t[c])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&e.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&e.toString)return e.toString()===t.toString();if(o=Object.keys(e),i=o.length,i!==Object.keys(t).length)return!1;for(c=i;c--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[c]))return!1;for(c=i;c--!==0;){const f=o[c];if(!r?.includes(f)&&!(f==="_owner"&&e.$$typeof)&&!D(e[f],t[f],r,n))return n&&console.log(f),!1}return!0}return e!==e&&t!==t}function Nt(e){return/\w.(?:png|jpg|jpeg|svg|webp|gif|bmp)$/i.test(e)}const ce=e=>e==null,Dt=e=>{if(!e||!e.startsWith("http"))return!1;try{return!!new URL(e)}catch(t){return console.error("isUrl error",t),!1}};function Et(e){return e==="__proto__"}function h(e,t,r){const n=Object.keys(t);for(let i=0;i<n.length;i++){const c=n[i];if(Et(c))continue;const o=t[c],f=e[c],u=r(f,o,c,e,t);u!==void 0?e[c]=u:b(o)?b(f)?e[c]=h(f,o,r):e[c]=h({},o,r):ce(o)&&(e[c]=o)}return e}const Ft=(...e)=>{const t={},r=e.length;let n,i=0;for(;i<r;i+=1)for(n in e[i])Object.prototype.hasOwnProperty.call(e[i],n)&&(typeof t[n]=="object"&&typeof e[i][n]=="object"&&t[n]!==void 0&&t[n]!==null&&!Array.isArray(t[n])&&!Array.isArray(e[i][n])?t[n]={...t[n],...e[i][n]}:t[n]=e[i][n]);return t};function Pt(e,t){return h(S(e),t,function r(n,i){if(b(i))return b(n)?h(S(n),i,r):h({},i,r)})}function Lt(e,t){return h(e,t,function r(n,i){if(b(i))return b(n)?h(n,i,r):h({},i,r)})}let fe=0;const se=(e=21)=>{if(typeof window>"u"||!window.crypto)return(fe+=1).toFixed(0);let t="";const r=crypto.getRandomValues(new Uint8Array(e));for(;e--;){const n=63&r[e];t+=n<36?n.toString(36):n<62?(n-26).toString(36).toUpperCase():n<63?"_":"-"}return t},Mt=()=>typeof window>"u"?se():window.crypto&&window.crypto.randomUUID&&typeof crypto.randomUUID=="function"?crypto.randomUUID():se(),_t=e=>{if(e&&e!==!0)return e},$t=e=>{const t={};if(Object.keys(e||{}).forEach(r=>{e[r]!==void 0&&(t[r]=e[r])}),!(Object.keys(t).length<1))return t},vt=e=>{const t={};return Object.keys(e||{}).forEach(r=>{Array.isArray(e[r])&&e[r]?.length===0||e[r]!==void 0&&(t[r]=e[r])}),t};function Wt(e){if(!(typeof e!="string"&&!Array.isArray(e)))return Array.isArray(e)?e[e.length-1]:e.split(":")?.slice(-1)[0]}function ue(e){return e&&(e.type===d.Comment||e.type===d.Fragment&&e.children.length===0||e.type===Text&&e.children.trim()==="")}function Vt(e,t){return E(typeof e[t]=="function"?e[t]?.():[])}function E(e=[],t=!0){const r=Array.isArray(e)?e:[e],n=[];return r.forEach(i=>{Array.isArray(i)?n.push(...E(i,t)):i?.type===d.Fragment||i?.type==="template"?n.push(...E(i.children,t)):i&&d.isVNode(i)?t&&!ue(i)?n.push(i):t||n.push(i):X(i)&&n.push(i)}),n}function $({vnode:e,defaultVNode:t},...r){return e===!1?null:typeof e=="function"?e?.(...r):e||t}function ae(e,...t){const{slots:r,key:n="default",render:i,props:c,defaultChildren:o}=e;let f;const u=c[n],a=r?.[n],l=typeof o=="function"?o?.():o;return u===!1?f=!1:u===!0?f=a??l:w(u)&&i?d.isVNode(u)?f=u:f=a:f=u||a,f===!1?!1:i?$({vnode:f,defaultVNode:l},...t):f}function le(e,...t){const{slots:r,key:n="default",props:i,defaultChildren:c}=e;let o;const f=i[n],u=r?.[n]?.(...t),a=typeof c=="function"?c?.():c;return f===!1?o=!1:f===!0?o=u??a:w(f)?d.isVNode(f)?o=f:o=u:o=f||u,o===!1?!1:$({vnode:o,defaultVNode:a},...t)}function zt(e,...t){const{slots:r,props:n,keys:i,render:c,defaultVNodes:o}=e,f={};return i.forEach((u,a)=>{const l=o?o[a]:null,m=c?le({slots:r,props:n,key:u,defaultChildren:l},...t):ae({slots:r,props:n,key:u,render:!1,defaultChildren:l},...t);(I(m)||m)&&(f[u]=m)}),f}s.Base64=de,s.arrayRepeat=nt,s.arraySlice=Ce,s.blobToDataURL=dt,s.checkFileType=U,s.classNames=z,s.cloneDeep=S,s.cloneDeepWith=xe,s.cloneDeepWithImpl=A,s.compareArray=k,s.compareArraySort=et,s.compareArrayTimeSort=tt,s.compareTime=T,s.convertValueBoolean=wt,s.copyProperties=y,s.dataURLtoBlob=at,s.dataURLtoFile=lt,s.deepCopy=Qe,s.deepMerge=Pt,s.fileTypes=j,s.filterEmpty=E,s.filterTree=ne,s.findSourceByTree=re,s.findValueAndAncestors=ct,s.forInObject=Ot,s.formatDuration=it,s.formatNumber=_,s.genColumnKey=Ge,s.generateVideoPicture=M,s.getArrayLast=ft,s.getBase64=ut,s.getBlobUrl=st,s.getFileSuffix=B,s.getKeys=Wt,s.getLevelData=te,s.getMaxFloor=ee,s.getMediaInfos=oe,s.getPrefixCls=Xe,s.getRandomNumber=C,s.getScroll=H,s.getScrollContainer=we,s.getSlot=ae,s.getSlotVNode=le,s.getSlotsChildren=Vt,s.getSlotsProps=zt,s.getSortIndex=Te,s.getSymbols=x,s.getTextWidth=St,s.getValueFromObjectByKey=me,s.getVideoCoverPicture=gt,s.getVideoFileUrl=ie,s.handleCurrentPage=ke,s.handleEmptyField=rt,s.handleShowIndex=Ye,s.is=v,s.isArray=g,s.isBase64=N,s.isBoolean=I,s.isBrowser=Bt,s.isDataURLBase64=yt,s.isDeepEqualReact=D,s.isEmptyElement=ue,s.isFunction=ge,s.isImg=Nt,s.isInContainer=Ae,s.isJSONStr=ye,s.isMobile=he,s.isNil=ce,s.isNotNil=Ze,s.isNumber=p,s.isObject=w,s.isPlainObject=b,s.isPrimitive=J,s.isScroll=q,s.isServer=O,s.isString=W,s.isTablet=V,s.isTypedArray=Z,s.isUrl=Dt,s.isValid=X,s.isWindowsOs=pt,s.merge=Ft,s.mergeWith=h,s.nanoid=Mt,s.off=mt,s.omitBoolean=_t,s.omitUndefined=$t,s.omitUndefinedAndEmptyArr=vt,s.on=ht,s.raf=R,s.runFunction=Ke,s.scrollTo=Ut,s.slotRender=$,s.throttleByAnimationFrame=It,s.toChinesNum=bt,s.toConvertNumberShow=At,s.treeData=ot,s.useDeepMerge=Lt,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})}));
|
|
12
|
+
(function(s,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],d):(s=typeof globalThis<"u"?globalThis:s||self,d(s.GPorUtils={},s.vue))})(this,(function(s,d){"use strict";class le{constructor(){this._keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}_utf8_encode(t){t=t.replace(/\r\n/g,`
|
|
13
|
+
`);let r="";for(let n=0;n<t.length;n++){const i=t.charCodeAt(n);i<128?r+=String.fromCharCode(i):i>127&&i<2048?(r+=String.fromCharCode(i>>6|192),r+=String.fromCharCode(i&63|128)):(r+=String.fromCharCode(i>>12|224),r+=String.fromCharCode(i>>6&63|128),r+=String.fromCharCode(i&63|128))}return r}_utf8_decode(t){let r="",n=0,i=0,c=0,o=0;for(;n<t.length;)i=t.charCodeAt(n),i<128?(r+=String.fromCharCode(i),n++):i>191&&i<224?(c=t.charCodeAt(n+1),r+=String.fromCharCode((i&31)<<6|c&63),n+=2):(c=t.charCodeAt(n+1),o=t.charCodeAt(n+2),r+=String.fromCharCode((i&15)<<12|(c&63)<<6|o&63),n+=3);return r}encode(t){let r="",n,i,c,o,f,u,a,l=0;for(t=this._utf8_encode(t);l<t.length;)n=t.charCodeAt(l++),i=t.charCodeAt(l++),c=t.charCodeAt(l++),o=n>>2,f=(n&3)<<4|i>>4,u=(i&15)<<2|c>>6,a=c&63,Number.isNaN(i)?u=a=64:Number.isNaN(c)&&(a=64),r=r+this._keyStr.charAt(o)+this._keyStr.charAt(f)+this._keyStr.charAt(u)+this._keyStr.charAt(a);return r}decode(t){let r="",n,i,c,o,f,u,a,l=0;for(t=t.replace(/[^A-Z0-9+/=]/gi,"");l<t.length;)o=this._keyStr.indexOf(t.charAt(l++)),f=this._keyStr.indexOf(t.charAt(l++)),u=this._keyStr.indexOf(t.charAt(l++)),a=this._keyStr.indexOf(t.charAt(l++)),n=o<<2|f>>4,i=(f&15)<<4|u>>2,c=(u&3)<<6|a,r=r+String.fromCharCode(n),u!==64&&(r=r+String.fromCharCode(i)),a!==64&&(r=r+String.fromCharCode(c));return r=this._utf8_decode(r),r}}function v(e,t){return Object.prototype.toString.call(e)===`[object ${t}]`}function I(e){return typeof e=="boolean"}function p(e){return typeof e=="number"}function g(e){return typeof Array.isArray>"u"?Object.prototype.toString.call(e)==="[object Array]":Array.isArray(e)}function w(e){return e!==null&&v(e,"Object")}function W(e){return typeof e=="string"||e instanceof String}function de(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Function]"}function ge(e){if(typeof e!="string")return!1;try{const t=JSON.parse(e);return typeof t=="object"&&t!==null}catch{return!1}}function ye(){const e=navigator.userAgent||navigator.vendor;return!!(/iPhone/.test(e)||/Android/.test(e)&&/Mobile/.test(e)||/Windows Phone/.test(e)||/Mobile/.test(e)&&!V())}function V(){const e=navigator.userAgent||navigator.vendor;return!!(/iPad/.test(e)||/Macintosh/.test(e)&&"ontouchend"in document||/Android/.test(e)&&!/Mobile/.test(e))}function z(...e){const t=[];for(let r=0;r<e.length;r++){const n=e[r];if(n){if(W(n))t.push(n);else if(g(n))for(let i=0;i<n.length;i++){const c=z(n[i]);c&&t.push(c)}else if(w(n))for(const i in n)n[i]&&t.push(i)}}return t.filter(r=>r).join(" ")}function he(e,t){if(typeof t!="string"&&!Array.isArray(t))return;const r=Array.isArray(t)?t:t.split(":");let n=e;for(let i=0;i<r.length;i++)if(n&&Object.prototype.hasOwnProperty.call(n,r[i]))n=n[r[i]];else return;return n}const O=typeof window>"u";function me(e){return e.replace(/[-_](.)/g,(t,r)=>r.toUpperCase())}const F=function(e,t){if(O||!e||!t)return"";t=me(t),t==="float"&&(t="cssFloat");try{const r=e.style[t];if(r)return r;const n=document?.defaultView?.getComputedStyle(e,"");return n?n[t]:""}catch{return e.style[t]}},q=(e,t)=>O?void 0:(t==null?F(e,"overflow"):t?F(e,"overflow-y"):F(e,"overflow-x")).match(/(scroll|auto|overlay)/),pe=(e,t)=>{if(O)return;let r=e;for(;r;){if([window,document,document.documentElement].includes(r))return window;if(q(r,t))return r;r=r.parentNode}return r},we=(e,t)=>{if(O||!e||!t)return!1;const r=e.getBoundingClientRect();let n;return[window,document,document.documentElement,null,void 0].includes(t)?n={top:0,right:window.innerWidth,bottom:window.innerHeight,left:0}:n=t.getBoundingClientRect(),r.top<n.bottom&&r.bottom>n.top&&r.right>n.left&&r.left<n.right};function P(e){return e!=null&&e===e.window}function H(e,t){if(typeof window>"u")return 0;const r=t?"scrollTop":"scrollLeft";let n=0;return P(e)?n=e[t?"pageYOffset":"pageXOffset"]:e instanceof Document?n=e.documentElement[r]:e&&(n=e[r]),e&&!P(e)&&typeof n!="number"&&(n=(e.ownerDocument||e).documentElement?.[r]),n}function x(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function Ae(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}function J(e){return e==null||typeof e!="object"&&typeof e!="function"}function Z(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}const Se="[object RegExp]",be="[object String]",Oe="[object Number]",je="[object Boolean]",Ue="[object Arguments]",Ie="[object Symbol]",Re="[object Date]",Be="[object Map]",Ne="[object Set]",De="[object Array]",Ee="[object ArrayBuffer]",Fe="[object Object]",Pe="[object DataView]",Le="[object Uint8Array]",Me="[object Uint8ClampedArray]",_e="[object Uint16Array]",$e="[object Uint32Array]",ve="[object Int8Array]",We="[object Int16Array]",Ve="[object Int32Array]",ze="[object Float32Array]",qe="[object Float64Array]";function He(e,t){return A(e,void 0,e,new Map,t)}function A(e,t,r,n=new Map,i=void 0){const c=i?.(e,t,r,n);if(c!==void 0)return c;if(J(e))return e;if(n.has(e))return n.get(e);if(Array.isArray(e)){const o=Array.from({length:e.length});n.set(e,o);for(let f=0;f<e.length;f++)o[f]=A(e[f],f,r,n,i);return Object.hasOwn(e,"index")&&(o.index=e.index),Object.hasOwn(e,"input")&&(o.input=e.input),o}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const o=new RegExp(e.source,e.flags);return o.lastIndex=e.lastIndex,o}if(e instanceof Map){const o=new Map;n.set(e,o);for(const[f,u]of e)o.set(f,A(u,f,r,n,i));return o}if(e instanceof Set){const o=new Set;n.set(e,o);for(const f of e)o.add(A(f,void 0,r,n,i));return o}if(typeof Buffer<"u"&&Buffer.isBuffer(e))return e.subarray();if(Z(e)){const o=new(Object.getPrototypeOf(e)).constructor(e.length);n.set(e,o);for(let f=0;f<e.length;f++)o[f]=A(e[f],f,r,n,i);return o}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const o=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return n.set(e,o),y(o,e,r,n,i),o}if(typeof File<"u"&&e instanceof File){const o=new File([e],e.name,{type:e.type});return n.set(e,o),y(o,e,r,n,i),o}if(typeof Blob<"u"&&e instanceof Blob){const o=new Blob([e],{type:e.type});return n.set(e,o),y(o,e,r,n,i),o}if(e instanceof Error){const o=new e.constructor;return n.set(e,o),o.message=e.message,o.name=e.name,o.stack=e.stack,o.cause=e.cause,y(o,e,r,n,i),o}if(typeof e=="boolean"){const o=!!e.valueOf();return n.set(e,o),y(o,e,r,n,i),o}if(typeof e=="number"){const o=Number(e.valueOf());return n.set(e,o),y(o,e,r,n,i),o}if(typeof e=="string"){const o=String(e.valueOf());return n.set(e,o),y(o,e,r,n,i),o}if(typeof e=="object"&&xe(e)){const o=Object.create(Object.getPrototypeOf(e));return n.set(e,o),y(o,e,r,n,i),o}return e}function y(e,t,r=e,n,i){const c=[...Object.keys(t),...x(t)];for(let o=0;o<c.length;o++){const f=c[o],u=Object.getOwnPropertyDescriptor(e,f);(u==null||u.writable)&&(e[f]=A(t[f],f,r,n,i))}}function xe(e){switch(Ae(e)){case Ue:case De:case Ee:case Pe:case je:case Re:case ze:case qe:case ve:case We:case Ve:case Be:case Oe:case Fe:case Se:case Ne:case be:case Ie:case Le:case Me:case _e:case $e:return!0;default:return!1}}function S(e){return A(e,void 0,e,new Map,void 0)}const j={videoAllowType:["mp4","webm","ogg"],audioAllowType:["mp3","ogg","wav","aac","m4a","webm"],imageType:["jpeg","jpg","png","gif","bmp","tiff","tif","webp","heic","heif","svg","ico","raw","cr2","nef","arw","dng","psd","eps"],videoType:["mp4","avi","mov","wmv","mkv","flv","webm","mpeg","mpg","3gp","ogv","mxf","vob","rm","rmvb","ts","mts","m2ts","divx","xvid"],audioType:["mp3","wav","aac","flac","ogg","wma","m4a","alac","opus","amr","aiff","au","pcm","ape"]},X=e=>e!=null&&e!=="";let G=e=>setTimeout(e,16),Y=e=>clearTimeout(e);typeof window<"u"&&"requestAnimationFrame"in window&&(G=e=>window.requestAnimationFrame(e),Y=e=>window.cancelAnimationFrame(e));let K=0;const L=new Map;function Q(e){L.delete(e)}function R(e,t=1){K+=1;const r=K;function n(i){if(i===0)Q(r),e();else{const c=G(()=>{n(i-1)});L.set(r,c)}}return n(t),r}R.cancel=e=>{const t=L.get(e);return Q(t),Y(t)};function Je(e){return e!=null}function b(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null?Object.prototype.toString.call(e)==="[object Object]":!1}const Ze=({suffixCls:e,customizePrefixCls:t,isPor:r,className:n})=>{const i=n||(r?"gx-pro":"gx");return t||(e?`${i}-${e}`:i)},Xe=(e,t)=>e?g(e)?e.join("-"):e.toString():`${t||0}`;function Ge(e,{align:t,showIndex:r}){const n=S(e);if(r&&e.length&&e.every(i=>i.dataIndex!=="sortIndex")){const i=e[0];n.unshift({title:"序号",align:t,fixed:i.fixed,width:60,uuid:C().uuid(15),dataIndex:"sortIndex",key:"sortIndex"})}else n.filter(i=>i.dataIndex!=="sortIndex");return n}function Ye(e,...t){return typeof e=="function"?e(...t):e}function Ke(e){return JSON.parse(JSON.stringify(e))}function Qe(e,t){if(w(e)){const{pageSize:r=10,total:n=0}=e;let{current:i=1}=e;return n-t<=r*(i-1)&&(i=i-1),i===0?1:i}return 1}function ke(e=[],t,r="children"){function n(i,c){return c.map((o,f)=>{const u=`${i}-${f+1}`;return o[r]&&(o[r]=n(u,o[r])),o.sortIndex=u,o})}return S(e).map((i,c)=>{const o=w(t)&&t.current||1,f=w(t)&&t.pageSize||10,u=`${(o-1)*f+(c+1)}`;return i[r]&&(i[r]=n(`${u}`,i[r])),i.sortIndex=u,i})}function Te(e,t){return g(e)?e?.filter((r,n)=>{if(p(t))return n<=t-1;if(g(t)&&t.length===2){const i=t[0]-1,c=t[1]?t[1]-1:e.length-1;return n<=c&&n>=i}else if(g(t)&&t.length===1){const i=t[0]-1,c=e.length-1;return n<=c&&n>=i}return!0}):[]}function k(e,t,r,n=0){const i=p(n)&&(n===0||n===1)?n:0,c=e[r],o=t[r];let f=0;return c<o?f=i===0?-1:0:c>o&&(f=i===0?0:-1),f}function T(e,t,r,n=0){const i=p(n)&&(n===0||n===1)?n:0,c=new Date(e[r]),o=new Date(t[r]);let f=0;return c<o?f=i===0?-1:0:c>o&&(f=i===0?0:-1),f}function Ce(e,t,r=0){return e.sort((n,i)=>k(n,i,t,r))}function et(e,t,r=0){return e.sort((n,i)=>T(n,i,t,r))}function tt(e){let t=S(e);const r=new Set(t);return t=Array.from(r),t}function nt(e,t){const r=["null","undefined"];let n=!0;return e===0?n=!0:r.includes(e)?n=!1:e||(n=!1),n?{value:e,success:n}:{value:t===""?t:t||"-",success:n}}function rt(e){let t="";if(e>-1){const r=Math.floor(e/3600),n=Math.floor(e/60)%60,i=Number.parseInt(String(e%60));r<10?t="0"+r+":":t=r+":",n<10&&(t+="0"),t+=n+":",i<10&&(t+="0"),t+=i}return t.split(":")[0]==="00"?`${t.split(":")[1]}:${t.split(":")[2]}`:t}function C(){const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");return{uuid(t,r){const n=e,i=[],c=r||n.length;let o,f;if(t)for(o=0;o<t;o+=1)i[o]=n[Number.parseInt(String(Math.random()*c))];else for(i[8]="-",i[13]="-",i[18]="-",i[23]="-",i[14]="4",o=0;o<36;o+=1)i[o]||(f=Math.random()*16,i[o]=n[o===19?f&&3||8:f]);return i.join("")},uuidFast(){const t=e,r=Array.from({length:36});let n=0,i,c;for(c=0;c<36;c+=1)c===8||c===13||c===18||c===23?r[c]="-":c===14?r[c]="4":(n<=2&&(n=33554432+Math.random()*16777216||0),i=n&&15,n=n>4,r[c]=t[c===19?i&&3||8:i]);return r.join("")},uuidString(){return this.uuidFast().replace(new RegExp("-","g"),"")},uuidCompact(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=Math.random()*16||0;return(t==="x"?r:r&&3||8).toString(16)})}}}function ee(e,t){if(!Array.isArray(e)||e.length===0)return 0;const r=t||"children";return Math.max(...e.map(n=>{const i=n[r];return 1+(i?ee(i,r):0)}))}function te(e,t="children"){let r=[];return e.forEach(n=>{r.push(n),g(n[t])&&n[t].length>0&&(r=r.concat(te(n[t],t)))}),r}function it(e,t){if(!e||!g(e)||e?.length===0)return[];const{id:r="id",parentId:n="parentId",children:i="children",emptyChildren:c=!0}=t||{},o=t?.rootId??0,f=S(e);return f.map(u=>(!c&&u[i]&&u[i]?.length===0&&delete u[i],u)).filter(u=>{const a=f.filter(l=>u[r]===l[n]);return a.length>0?u[i]=a:c&&(u[i]=[]),o===!1?!0:u[n]===o})}function ne(e,t){return e.map(r=>{const n={...r};return n.children&&(n.children=ne(n.children,t)),t(n)||n.children&&n.children.length>0?n:null}).filter(Boolean)}function ot(e,t,r){const{value:n,children:i}=r||{value:"value",children:"children"};let c=[];function o(f,u){if(f[n]===t)return c=[...u,f[n]],!0;if(f[i]){for(const a of f[i])if(o(a,[...u,f[n]]))return!0}return!1}for(const f of e)if(o(f,[]))break;return c}function ct(e){return e&&g(e)?e[e.length-1]:null}function re(e,t,r){const n=r?.value||"id",i=r?.children||"children";for(const c of e){if(c[n]===t)return c;const o=c[i];if(o){const f=re(o,t,r);if(f)return f}}}function ft(e){return URL.createObjectURL(e)}function st(e){return new Promise((t,r)=>{const n=new FileReader;n.readAsDataURL(e),n.onload=()=>t(n.result),n.onerror=i=>r(i)})}function ut(e){const t=e.split(","),r=t[0].match(/:(.*?);/)[1],n=atob(t[1]);let i=n.length;const c=new Uint8Array(i);for(;i--;)c[i]=n.charCodeAt(i);return new Blob([c],{type:r})}function at(e,t){const r=e.split(","),n=r[0].match(/:(.*?);/)[1],i=atob(r[1]);let c=i.length;const o=new Uint8Array(c);for(;c--;)o[c]=i.charCodeAt(c);return new File([o],t,{type:n})}function lt(e,t,r){return new window.File([e],t,{type:r})}function ie(e){if(!e||typeof e!="string")return"";const t=e.indexOf("?");return t>0?`${e.substring(0,t)}`:e}function B(e){if(!e||typeof e!="string")return"";const t=ie(e),r=t.lastIndexOf(".");return r>0&&`${t?.substring?.(r)?.split("?")?.[0]}`?.split(".")?.[1]||""}function U(e,t){if(t)return t;if(!e||e==="data:")return"4";let r="4";return N(e)?e.includes("data:image/")?r="png":e.includes("data:video/")?r="mp4":e.includes("data:audio/")&&(r="mp3"):e instanceof Blob?(e=String(e),e.includes("image")?r="png":e.includes("video")?r="mp4":e.includes("audio")&&(r="mp3")):r=B(e).toLowerCase(),j.imageType.includes(r)?"1":j.videoType.includes(r)?"3":j.audioType.includes(r)?"2":"4"}function oe(e){const{url:t="",fileType:r="1"}=e||{};let n="",i={play:!1,height:0,size:0,width:0,duration:0};function c(){i={play:!1,height:0,size:0,width:0,duration:0}}return t instanceof File?n=URL.createObjectURL(t):N(t)?n=t:t instanceof Blob?n=URL.createObjectURL(t):(t.includes("https")||t.includes("http"))&&(n=t),new Promise(o=>{let f;if(r==="4"){o(i);return}r==="1"?(f=document.createElement("img"),f.src=n):r==="2"?(f=document.createElement("audio"),f.src=n):r==="3"&&(f=document.createElement("video"),f.src=n),r==="1"?f.onload=function(){c(),i.play=!0,i.width=f.width||0,i.height=f.height||0,o(i),f=null}:f.oncanplay=function(){c(),i.play=!0,i.width=f?.videoWidth||0,i.height=f?.videoHeight||0,i.duration=f?.duration||0,o(i),f=null},f.onerror=function(){c(),o(i),f=null}})}async function dt(e){const{url:t="",currentTime:r,videoSuffix:n="",videoAllowPlay:i=!1}=e;let c="",o=n,f="1",u;return t instanceof File?(c=URL.createObjectURL(t),o=B(t.name),f=U(t.name)):t instanceof Blob?(c=URL.createObjectURL(t),f=U(t)):N(t)?(c=t,f=U(t)):(t.includes("https")||t.includes("http"))&&(c=t,o=B(t),f=U(t)),(o?j.videoAllowType.includes(o.toLowerCase()):!1)?i?M(c,r):(u=await oe({url:c,fileType:f}),u.play?M(c,r):new Promise(l=>{l("")})):new Promise(l=>{l("")})}async function M(e,t=0){return new Promise(r=>{let n=document.createElement("video");n&&(n.controls=!0,n.muted=!0,n.setAttribute("src",e),n.setAttribute("muted",String(!0)),n.setAttribute("crossorigin","anonymous"),n.setAttribute("autoplay",String(!0)),n.addEventListener("loadeddata",async()=>{let i;for(n?.addEventListener("seeked",async()=>{i&&i()});t<(n?.duration||0);){n&&(n.currentTime=t),await new Promise(m=>i=m);const c=document.createElement("canvas"),o=.8,f=c.getContext("2d"),u=n?.videoWidth||0*o,a=n?.videoHeight||0*o,l=0;c.width=n?.videoWidth||0*o,c.height=n?.videoHeight||0*o,n&&f.drawImage(n,0,0,u+l,a+l),n=null,r(u===0||a===0?"":c.toDataURL("image/png",1))}}))})}function N(e=""){return!!(e&&["data:image/","data:video/","data:audio/"].find(r=>e.includes(r)))}function gt(e){return typeof e=="string"&&/^data:(?:image|video|audio)\/[A-Za-z]+;base64,[A-Za-z0-9+/=]+$/.test(e)}function yt(e,t,r,n=!1){e&&t&&r&&e.addEventListener(t,r,n)}function ht(e,t,r,n=!1){e&&t&&r&&e.removeEventListener(t,r,n)}function mt(){return/windows|win32/i.test(navigator.userAgent)}function pt(e){return I(e)?e:!!e}function _(e,t){const r=`^\\d+(?:\\.\\d{0,${e}})?`,n=new RegExp(r),i=t.toString().match(n);if(i){const c=i[0];if(c.includes(".")){const[o,f]=c.split(".");if(/^0*$/.test(f))return o}return c}return t.toString()}function wt(e,t){const{toChinese:r=!1,fixed:n=2,min:i=1e4}=t||{},c=p(i)?i:1e4,o=p(n)?n:2,f=r?e<c?"":e<1e8?"万":"亿":e<c?"":e<1e8?"w":"亿";if(!p(e))return{str:`${e}`,number:`${e}`};if(e<c)return{str:`${e}`,number:`${e}`};if(o===0){const a=(e/(e<1e8?1e4:1e8)).toFixed(1).split(".")[0];return{str:`${a}${f}`,number:a,unit:f}}let u;return e<1e8?(u=_(o,e/1e4),{str:u+f,number:u,unit:f}):(u=_(o,e/1e8),{str:u+f,number:u,unit:f})}function At(e,t){let r=0;const n=I(t.removeAfter)?t.removeAfter:!0,i=t.id||"hiddenElement",c={opacity:0,visibility:"hidden",position:"fixed",zIndex:-1,top:0,left:0};let o=document.querySelector(`#${i}`);if(!o){const u=document.createElement("div");u.id=i,document.body.appendChild(u),o=document.querySelector(`#${i}`)}Object.assign(o.style,c);const f=document.createElement(t.createName||"span");return f.innerHTML=e,(t.cssObject||w(t.cssObject))&&Object.assign(f.style,t.cssObject),o.append(f),r=f.getBoundingClientRect()[t.type||"width"],n&&o.removeChild(f),r}function St(e){e=p(e)&&!Number.isNaN(e)?e:0;const t=["零","一","二","三","四","五","六","七","八","九"],r=["","十","百","千","万"];e=Number.parseInt(`${e}`);const n=o=>{const f=o.toString().split("").reverse();let u="";for(let a=0;a<f.length;a++)u=(a===0&&f[a]==="0"||a>0&&f[a]==="0"&&f[a-1]==="0"?"":(e<20&&a>0?"":t[f[a]])+(f[a]==="0"?r[0]:r[a]))+u;return u},i=Math.floor(e/1e4);let c=e%1e4;return c.toString().length<4&&(c="0"+c),i?n(i)+"万"+n(c):n(e)}function bt(e,t){Object.keys(e).forEach(r=>{t(r,e[r])})}function Ot(e,t,r,n){const i=r-t;return e/=n/2,e<1?i/2*e*e*e+t:i/2*((e-=2)*e*e+2)+t}function jt(e,t={}){const{getContainer:r=()=>window,callback:n,duration:i=450}=t,c=r(),o=H(c,!0),f=Date.now(),u=()=>{const l=Date.now()-f,m=Ot(l>i?i:l,o,e,i);P(c)?c.scrollTo(window.pageXOffset,m):c instanceof HTMLDocument||c.constructor.name==="HTMLDocument"?c.documentElement.scrollTop=m:c.scrollTop=m,l<i?R(u):typeof n=="function"&&n()};c&&R(u)}function Ut(e){let t;const r=i=>()=>{t=null,e(...i)},n=(...i)=>{t==null&&(t=requestAnimationFrame(r(i)))};return n.cancel=()=>cancelAnimationFrame(t),n}const It=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,Rt=()=>process.env.NODE_ENV==="TEST"?!0:typeof window<"u"&&typeof window.document<"u"&&typeof window.matchMedia<"u"&&!It;function D(e,t,r,n){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let i,c,o;if(Array.isArray(e)){if(i=e.length,i!=t.length)return!1;for(c=i;c--!==0;)if(!D(e[c],t[c],r,n))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(c of e.entries())if(!t.has(c[0]))return!1;for(c of e.entries())if(!D(c[1],t.get(c[0]),r,n))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(c of e.entries())if(!t.has(c[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(i=e.length,i!=t.length)return!1;for(c=i;c--!==0;)if(e[c]!==t[c])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&e.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&e.toString)return e.toString()===t.toString();if(o=Object.keys(e),i=o.length,i!==Object.keys(t).length)return!1;for(c=i;c--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[c]))return!1;for(c=i;c--!==0;){const f=o[c];if(!r?.includes(f)&&!(f==="_owner"&&e.$$typeof)&&!D(e[f],t[f],r,n))return n&&console.log(f),!1}return!0}return e!==e&&t!==t}function Bt(e){return/\w.(?:png|jpg|jpeg|svg|webp|gif|bmp)$/i.test(e)}const Nt=e=>e==null,Dt=e=>{if(!e||!e.startsWith("http"))return!1;try{return!!new URL(e)}catch(t){return console.error("isUrl error",t),!1}};function Et(e){return e==="__proto__"}function h(e,t,r){const n=Object.keys(t);for(let i=0;i<n.length;i++){const c=n[i];if(Et(c))continue;const o=t[c],f=e[c],u=r(f,o,c,e,t);u!==void 0?e[c]=u:b(o)?b(f)?e[c]=h(f,o,r):e[c]=h({},o,r):e[c]=o}return e}const Ft=(...e)=>{const t={},r=e.length;let n,i=0;for(;i<r;i+=1)for(n in e[i])Object.prototype.hasOwnProperty.call(e[i],n)&&(typeof t[n]=="object"&&typeof e[i][n]=="object"&&t[n]!==void 0&&t[n]!==null&&!Array.isArray(t[n])&&!Array.isArray(e[i][n])?t[n]={...t[n],...e[i][n]}:t[n]=e[i][n]);return t};function Pt(e,t){return h(S(e),t,function r(n,i){if(b(i))return b(n)?h(S(n),i,r):h({},i,r)})}function Lt(e,t){return h(e,t,function r(n,i){if(b(i))return b(n)?h(n,i,r):h({},i,r)})}let ce=0;const fe=(e=21)=>{if(typeof window>"u"||!window.crypto)return(ce+=1).toFixed(0);let t="";const r=crypto.getRandomValues(new Uint8Array(e));for(;e--;){const n=63&r[e];t+=n<36?n.toString(36):n<62?(n-26).toString(36).toUpperCase():n<63?"_":"-"}return t},Mt=()=>typeof window>"u"?fe():window.crypto&&window.crypto.randomUUID&&typeof crypto.randomUUID=="function"?crypto.randomUUID():fe(),_t=e=>{if(e&&e!==!0)return e},$t=e=>{const t={};if(Object.keys(e||{}).forEach(r=>{e[r]!==void 0&&(t[r]=e[r])}),!(Object.keys(t).length<1))return t},vt=e=>{const t={};return Object.keys(e||{}).forEach(r=>{Array.isArray(e[r])&&e[r]?.length===0||e[r]!==void 0&&(t[r]=e[r])}),t};function Wt(e){if(!(typeof e!="string"&&!Array.isArray(e)))return Array.isArray(e)?e[e.length-1]:e.split(":")?.slice(-1)[0]}function se(e){return e&&(e.type===d.Comment||e.type===d.Fragment&&e.children.length===0||e.type===Text&&e.children.trim()==="")}function Vt(e,t){return E(typeof e[t]=="function"?e[t]?.():[])}function E(e=[],t=!0){const r=Array.isArray(e)?e:[e],n=[];return r.forEach(i=>{Array.isArray(i)?n.push(...E(i,t)):i?.type===d.Fragment||i?.type==="template"?n.push(...E(i.children,t)):i&&d.isVNode(i)?t&&!se(i)?n.push(i):t||n.push(i):X(i)&&n.push(i)}),n}function $({vnode:e,defaultVNode:t},...r){return e===!1?null:typeof e=="function"?e?.(...r):e||t}function ue(e,...t){const{slots:r,key:n="default",render:i,props:c,defaultChildren:o}=e;let f;const u=c[n],a=r?.[n],l=typeof o=="function"?o?.():o;return u===!1?f=!1:u===!0?f=a??l:w(u)&&i?d.isVNode(u)?f=u:f=a:f=u||a,f===!1?!1:i?$({vnode:f,defaultVNode:l},...t):f}function ae(e,...t){const{slots:r,key:n="default",props:i,defaultChildren:c}=e;let o;const f=i[n],u=r?.[n]?.(...t),a=typeof c=="function"?c?.():c;return f===!1?o=!1:f===!0?o=u??a:w(f)?d.isVNode(f)?o=f:o=u:o=f||u,o===!1?!1:$({vnode:o,defaultVNode:a},...t)}function zt(e,...t){const{slots:r,props:n,keys:i,render:c,defaultVNodes:o}=e,f={};return i.forEach((u,a)=>{const l=o?o[a]:null,m=c?ae({slots:r,props:n,key:u,defaultChildren:l},...t):ue({slots:r,props:n,key:u,render:!1,defaultChildren:l},...t);(I(m)||m)&&(f[u]=m)}),f}s.Base64=le,s.arrayRepeat=tt,s.arraySlice=Te,s.blobToDataURL=lt,s.checkFileType=U,s.classNames=z,s.cloneDeep=S,s.cloneDeepWith=He,s.cloneDeepWithImpl=A,s.compareArray=k,s.compareArraySort=Ce,s.compareArrayTimeSort=et,s.compareTime=T,s.convertValueBoolean=pt,s.copyProperties=y,s.dataURLtoBlob=ut,s.dataURLtoFile=at,s.deepCopy=Ke,s.deepMerge=Pt,s.fileTypes=j,s.filterEmpty=E,s.filterTree=ne,s.findSourceByTree=re,s.findValueAndAncestors=ot,s.forInObject=bt,s.formatDuration=rt,s.formatNumber=_,s.genColumnKey=Xe,s.generateVideoPicture=M,s.getArrayLast=ct,s.getBase64=st,s.getBlobUrl=ft,s.getFileSuffix=B,s.getKeys=Wt,s.getLevelData=te,s.getMaxFloor=ee,s.getMediaInfos=oe,s.getPrefixCls=Ze,s.getRandomNumber=C,s.getScroll=H,s.getScrollContainer=pe,s.getSlot=ue,s.getSlotVNode=ae,s.getSlotsChildren=Vt,s.getSlotsProps=zt,s.getSortIndex=ke,s.getSymbols=x,s.getTextWidth=At,s.getValueFromObjectByKey=he,s.getVideoCoverPicture=dt,s.getVideoFileUrl=ie,s.handleCurrentPage=Qe,s.handleEmptyField=nt,s.handleShowIndex=Ge,s.is=v,s.isArray=g,s.isBase64=N,s.isBoolean=I,s.isBrowser=Rt,s.isDataURLBase64=gt,s.isDeepEqualReact=D,s.isEmptyElement=se,s.isFunction=de,s.isImg=Bt,s.isInContainer=we,s.isJSONStr=ge,s.isMobile=ye,s.isNil=Nt,s.isNotNil=Je,s.isNumber=p,s.isObject=w,s.isPlainObject=b,s.isPrimitive=J,s.isScroll=q,s.isServer=O,s.isString=W,s.isTablet=V,s.isTypedArray=Z,s.isUrl=Dt,s.isValid=X,s.isWindowsOs=mt,s.merge=Ft,s.mergeWith=h,s.nanoid=Mt,s.off=ht,s.omitBoolean=_t,s.omitUndefined=$t,s.omitUndefinedAndEmptyArr=vt,s.on=yt,s.raf=R,s.runFunction=Ye,s.scrollTo=jt,s.slotRender=$,s.throttleByAnimationFrame=Ut,s.toChinesNum=St,s.toConvertNumberShow=wt,s.treeData=it,s.useDeepMerge=Lt,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})}));
|
package/dist/typings/index.d.ts
CHANGED
|
@@ -2,6 +2,10 @@ import type { Slot, VNode, VNodeChild } from 'vue';
|
|
|
2
2
|
export type DeepPartial<T> = T extends object ? {
|
|
3
3
|
[P in keyof T]?: DeepPartial<T[P]>;
|
|
4
4
|
} : T;
|
|
5
|
+
export type LimitDeepPartial<T, Depth extends number = 5> = Depth extends 0 ? Partial<T> : T extends object ? {
|
|
6
|
+
[P in keyof T]?: LimitDeepPartial<T[P], Prev[Depth]>;
|
|
7
|
+
} : T;
|
|
8
|
+
type Prev = [0, 0, 1, 2, 3, 4, 5];
|
|
5
9
|
export interface Fn<T = any, R = T> {
|
|
6
10
|
(...arg: T[]): R;
|
|
7
11
|
}
|
|
@@ -29,3 +33,4 @@ export interface MaterialOptions {
|
|
|
29
33
|
export type OmitUndefined<T> = {
|
|
30
34
|
[P in keyof T]: NonNullable<T[P]>;
|
|
31
35
|
};
|
|
36
|
+
export {};
|