@gx-design-vue/pro-utils 0.2.0-beta.67 → 0.2.0-beta.68
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 +277 -276
- package/dist/pro-utils.umd.cjs +3 -3
- package/dist/slots/index.d.ts +7 -13
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/isValid.d.ts +2 -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.67
|
|
4
4
|
* Author: gx12358
|
|
5
5
|
* Copyright (C) 2024 gx12358
|
|
6
6
|
* License: MIT License
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* Homepage:
|
|
10
10
|
* Contact: gx12358@gmail.com
|
|
11
11
|
*/
|
|
12
|
-
import { Comment as J, Fragment as
|
|
13
|
-
class
|
|
12
|
+
import { Comment as J, Fragment as V, isVNode as m } from "vue";
|
|
13
|
+
class Ae {
|
|
14
14
|
constructor() {
|
|
15
15
|
this._keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
|
16
16
|
}
|
|
@@ -25,9 +25,9 @@ class we {
|
|
|
25
25
|
return n;
|
|
26
26
|
}
|
|
27
27
|
_utf8_decode(t) {
|
|
28
|
-
let n = "", r = 0, i = 0, o = 0,
|
|
28
|
+
let n = "", r = 0, i = 0, o = 0, f = 0;
|
|
29
29
|
for (; r < t.length; )
|
|
30
|
-
i = t.charCodeAt(r), i < 128 ? (n += String.fromCharCode(i), r++) : i > 191 && i < 224 ? (o = t.charCodeAt(r + 1), n += String.fromCharCode((i & 31) << 6 | o & 63), r += 2) : (o = t.charCodeAt(r + 1),
|
|
30
|
+
i = t.charCodeAt(r), i < 128 ? (n += String.fromCharCode(i), r++) : i > 191 && i < 224 ? (o = t.charCodeAt(r + 1), n += String.fromCharCode((i & 31) << 6 | o & 63), r += 2) : (o = t.charCodeAt(r + 1), f = t.charCodeAt(r + 2), n += String.fromCharCode((i & 15) << 12 | (o & 63) << 6 | f & 63), r += 3);
|
|
31
31
|
return n;
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
@@ -37,9 +37,9 @@ class we {
|
|
|
37
37
|
* @description 加密方法
|
|
38
38
|
*/
|
|
39
39
|
encode(t) {
|
|
40
|
-
let n = "", r, i, o,
|
|
40
|
+
let n = "", r, i, o, f, s, c, u, l = 0;
|
|
41
41
|
for (t = this._utf8_encode(t); l < t.length; )
|
|
42
|
-
r = t.charCodeAt(l++), i = t.charCodeAt(l++), o = t.charCodeAt(l++),
|
|
42
|
+
r = t.charCodeAt(l++), i = t.charCodeAt(l++), o = t.charCodeAt(l++), f = r >> 2, s = (r & 3) << 4 | i >> 4, c = (i & 15) << 2 | o >> 6, u = o & 63, Number.isNaN(i) ? c = u = 64 : Number.isNaN(o) && (u = 64), n = n + this._keyStr.charAt(f) + this._keyStr.charAt(s) + this._keyStr.charAt(c) + this._keyStr.charAt(u);
|
|
43
43
|
return n;
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
@@ -49,16 +49,16 @@ class we {
|
|
|
49
49
|
* @description 解密
|
|
50
50
|
*/
|
|
51
51
|
decode(t) {
|
|
52
|
-
let n = "", r, i, o,
|
|
52
|
+
let n = "", r, i, o, f, s, c, u, l = 0;
|
|
53
53
|
for (t = t.replace(/[^A-Z0-9+/=]/gi, ""); l < t.length; )
|
|
54
|
-
|
|
54
|
+
f = this._keyStr.indexOf(t.charAt(l++)), s = this._keyStr.indexOf(t.charAt(l++)), c = this._keyStr.indexOf(t.charAt(l++)), u = this._keyStr.indexOf(t.charAt(l++)), r = f << 2 | s >> 4, i = (s & 15) << 4 | c >> 2, o = (c & 3) << 6 | u, n = n + String.fromCharCode(r), c !== 64 && (n = n + String.fromCharCode(i)), u !== 64 && (n = n + String.fromCharCode(o));
|
|
55
55
|
return n = this._utf8_decode(n), n;
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
function Z(e, t) {
|
|
59
59
|
return Object.prototype.toString.call(e) === `[object ${t}]`;
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function w(e) {
|
|
62
62
|
return typeof e == "boolean";
|
|
63
63
|
}
|
|
64
64
|
function d(e) {
|
|
@@ -73,10 +73,10 @@ function p(e) {
|
|
|
73
73
|
function X(e) {
|
|
74
74
|
return typeof e == "string" || e instanceof String;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function xe(e) {
|
|
77
77
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Function]";
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function Se(e) {
|
|
80
80
|
if (typeof e != "string")
|
|
81
81
|
return !1;
|
|
82
82
|
try {
|
|
@@ -86,7 +86,7 @@ function ve(e) {
|
|
|
86
86
|
return !1;
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function ve() {
|
|
90
90
|
const e = navigator.userAgent || navigator.vendor;
|
|
91
91
|
return !!(/iPhone/.test(e) || /Android/.test(e) && /Mobile/.test(e) || /Windows Phone/.test(e) || /Mobile/.test(e) && !Y());
|
|
92
92
|
}
|
|
@@ -113,7 +113,7 @@ function G(...e) {
|
|
|
113
113
|
}
|
|
114
114
|
return t.filter((n) => n).join(" ");
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function W(e, t) {
|
|
117
117
|
if (typeof t != "string" && !Array.isArray(t))
|
|
118
118
|
return;
|
|
119
119
|
const n = Array.isArray(t) ? t : t.split(":");
|
|
@@ -125,12 +125,12 @@ function V(e, t) {
|
|
|
125
125
|
return;
|
|
126
126
|
return r;
|
|
127
127
|
}
|
|
128
|
-
const
|
|
128
|
+
const v = typeof window > "u";
|
|
129
129
|
function Q(e) {
|
|
130
130
|
return e.replace(/[-_](.)/g, (t, n) => n.toUpperCase());
|
|
131
131
|
}
|
|
132
132
|
const C = function(e, t) {
|
|
133
|
-
if (
|
|
133
|
+
if (v || !e || !t)
|
|
134
134
|
return "";
|
|
135
135
|
t = Q(t), t === "float" && (t = "cssFloat");
|
|
136
136
|
try {
|
|
@@ -142,8 +142,8 @@ const C = function(e, t) {
|
|
|
142
142
|
} catch {
|
|
143
143
|
return e.style[t];
|
|
144
144
|
}
|
|
145
|
-
}, k = (e, t) =>
|
|
146
|
-
if (
|
|
145
|
+
}, k = (e, t) => v ? void 0 : (t == null ? C(e, "overflow") : t ? C(e, "overflow-y") : C(e, "overflow-x")).match(/(scroll|auto|overlay)/), Oe = (e, t) => {
|
|
146
|
+
if (v)
|
|
147
147
|
return;
|
|
148
148
|
let n = e;
|
|
149
149
|
for (; n; ) {
|
|
@@ -154,8 +154,8 @@ const C = function(e, t) {
|
|
|
154
154
|
n = n.parentNode;
|
|
155
155
|
}
|
|
156
156
|
return n;
|
|
157
|
-
},
|
|
158
|
-
if (
|
|
157
|
+
}, Ce = (e, t) => {
|
|
158
|
+
if (v || !e || !t)
|
|
159
159
|
return !1;
|
|
160
160
|
const n = e.getBoundingClientRect();
|
|
161
161
|
let r;
|
|
@@ -166,7 +166,7 @@ const C = function(e, t) {
|
|
|
166
166
|
left: 0
|
|
167
167
|
} : r = t.getBoundingClientRect(), n.top < r.bottom && n.bottom > r.top && n.right > r.left && n.left < r.right;
|
|
168
168
|
};
|
|
169
|
-
function
|
|
169
|
+
function E(e) {
|
|
170
170
|
return e != null && e === e.window;
|
|
171
171
|
}
|
|
172
172
|
function K(e, t) {
|
|
@@ -174,44 +174,44 @@ function K(e, t) {
|
|
|
174
174
|
return 0;
|
|
175
175
|
const n = t ? "scrollTop" : "scrollLeft";
|
|
176
176
|
let r = 0;
|
|
177
|
-
return
|
|
177
|
+
return E(e) ? r = e[t ? "pageYOffset" : "pageXOffset"] : e instanceof Document ? r = e.documentElement[n] : e && (r = e[n]), e && !E(e) && typeof r != "number" && (r = (e.ownerDocument || e).documentElement?.[n]), r;
|
|
178
178
|
}
|
|
179
|
-
let
|
|
180
|
-
typeof window < "u" && "requestAnimationFrame" in window && (
|
|
181
|
-
let
|
|
182
|
-
const
|
|
183
|
-
function
|
|
184
|
-
|
|
179
|
+
let z = (e) => setTimeout(e, 16), b = (e) => clearTimeout(e);
|
|
180
|
+
typeof window < "u" && "requestAnimationFrame" in window && (z = (e) => window.requestAnimationFrame(e), b = (e) => window.cancelAnimationFrame(e));
|
|
181
|
+
let P = 0;
|
|
182
|
+
const D = /* @__PURE__ */ new Map();
|
|
183
|
+
function H(e) {
|
|
184
|
+
D.delete(e);
|
|
185
185
|
}
|
|
186
186
|
function R(e, t = 1) {
|
|
187
|
-
|
|
188
|
-
const n =
|
|
187
|
+
P += 1;
|
|
188
|
+
const n = P;
|
|
189
189
|
function r(i) {
|
|
190
190
|
if (i === 0)
|
|
191
|
-
|
|
191
|
+
H(n), e();
|
|
192
192
|
else {
|
|
193
|
-
const o =
|
|
193
|
+
const o = z(() => {
|
|
194
194
|
r(i - 1);
|
|
195
195
|
});
|
|
196
|
-
|
|
196
|
+
D.set(n, o);
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
return r(t), n;
|
|
200
200
|
}
|
|
201
201
|
R.cancel = (e) => {
|
|
202
|
-
const t =
|
|
203
|
-
return
|
|
202
|
+
const t = D.get(e);
|
|
203
|
+
return H(t), b(t);
|
|
204
204
|
};
|
|
205
205
|
function j(e, t, n, r) {
|
|
206
206
|
const i = n - t;
|
|
207
207
|
return e /= r / 2, e < 1 ? i / 2 * e * e * e + t : i / 2 * ((e -= 2) * e * e + 2) + t;
|
|
208
208
|
}
|
|
209
|
-
function
|
|
210
|
-
const { getContainer: n = () => window, callback: r, duration: i = 450 } = t, o = n(),
|
|
211
|
-
const l = Date.now() - s, y = j(l > i ? i : l,
|
|
212
|
-
|
|
209
|
+
function Ie(e, t = {}) {
|
|
210
|
+
const { getContainer: n = () => window, callback: r, duration: i = 450 } = t, o = n(), f = K(o, !0), s = Date.now(), c = () => {
|
|
211
|
+
const l = Date.now() - s, y = j(l > i ? i : l, f, e, i);
|
|
212
|
+
E(o) ? o.scrollTo(window.pageXOffset, y) : o instanceof HTMLDocument || o.constructor.name === "HTMLDocument" ? o.documentElement.scrollTop = y : o.scrollTop = y, l < i ? R(c) : typeof r == "function" && r();
|
|
213
213
|
};
|
|
214
|
-
o && R(
|
|
214
|
+
o && R(c);
|
|
215
215
|
}
|
|
216
216
|
function Ee(e) {
|
|
217
217
|
let t;
|
|
@@ -302,23 +302,23 @@ function h(e, t = /* @__PURE__ */ new Map()) {
|
|
|
302
302
|
function g(e, t, n) {
|
|
303
303
|
const r = [...Object.keys(t), ...ee(t)];
|
|
304
304
|
for (let i = 0; i < r.length; i++) {
|
|
305
|
-
const o = r[i],
|
|
306
|
-
(
|
|
305
|
+
const o = r[i], f = Object.getOwnPropertyDescriptor(e, o);
|
|
306
|
+
(f == null || f.writable) && (e[o] = h(t[o], n));
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
|
-
const re = typeof process < "u" && process.versions != null && process.versions.node != null,
|
|
310
|
-
function
|
|
309
|
+
const re = typeof process < "u" && process.versions != null && process.versions.node != null, Re = () => process.env.NODE_ENV === "TEST" ? !0 : typeof window < "u" && typeof window.document < "u" && typeof window.matchMedia < "u" && !re;
|
|
310
|
+
function I(e, t, n, r) {
|
|
311
311
|
if (e === t)
|
|
312
312
|
return !0;
|
|
313
313
|
if (e && t && typeof e == "object" && typeof t == "object") {
|
|
314
314
|
if (e.constructor !== t.constructor)
|
|
315
315
|
return !1;
|
|
316
|
-
let i, o,
|
|
316
|
+
let i, o, f;
|
|
317
317
|
if (Array.isArray(e)) {
|
|
318
318
|
if (i = e.length, i != t.length)
|
|
319
319
|
return !1;
|
|
320
320
|
for (o = i; o-- !== 0; )
|
|
321
|
-
if (!
|
|
321
|
+
if (!I(e[o], t[o], n, r))
|
|
322
322
|
return !1;
|
|
323
323
|
return !0;
|
|
324
324
|
}
|
|
@@ -329,7 +329,7 @@ function E(e, t, n, r) {
|
|
|
329
329
|
if (!t.has(o[0]))
|
|
330
330
|
return !1;
|
|
331
331
|
for (o of e.entries())
|
|
332
|
-
if (!
|
|
332
|
+
if (!I(o[1], t.get(o[0]), n, r))
|
|
333
333
|
return !1;
|
|
334
334
|
return !0;
|
|
335
335
|
}
|
|
@@ -355,24 +355,24 @@ function E(e, t, n, r) {
|
|
|
355
355
|
return e.valueOf() === t.valueOf();
|
|
356
356
|
if (e.toString !== Object.prototype.toString && e.toString)
|
|
357
357
|
return e.toString() === t.toString();
|
|
358
|
-
if (
|
|
358
|
+
if (f = Object.keys(e), i = f.length, i !== Object.keys(t).length)
|
|
359
359
|
return !1;
|
|
360
360
|
for (o = i; o-- !== 0; )
|
|
361
|
-
if (!Object.prototype.hasOwnProperty.call(t,
|
|
361
|
+
if (!Object.prototype.hasOwnProperty.call(t, f[o]))
|
|
362
362
|
return !1;
|
|
363
363
|
for (o = i; o-- !== 0; ) {
|
|
364
|
-
const s =
|
|
365
|
-
if (!n?.includes(s) && !(s === "_owner" && e.$$typeof) && !
|
|
364
|
+
const s = f[o];
|
|
365
|
+
if (!n?.includes(s) && !(s === "_owner" && e.$$typeof) && !I(e[s], t[s], n, r))
|
|
366
366
|
return r && console.log(s), !1;
|
|
367
367
|
}
|
|
368
368
|
return !0;
|
|
369
369
|
}
|
|
370
370
|
return e !== e && t !== t;
|
|
371
371
|
}
|
|
372
|
-
function
|
|
372
|
+
function Te(e) {
|
|
373
373
|
return /\w.(?:png|jpg|jpeg|svg|webp|gif|bmp)$/i.test(e);
|
|
374
374
|
}
|
|
375
|
-
const ie = (e) => e == null,
|
|
375
|
+
const ie = (e) => e == null, Ue = (e) => {
|
|
376
376
|
if (!e || !e.startsWith("http"))
|
|
377
377
|
return !1;
|
|
378
378
|
try {
|
|
@@ -381,13 +381,13 @@ const ie = (e) => e == null, Te = (e) => {
|
|
|
381
381
|
return console.error("isUrl error", t), !1;
|
|
382
382
|
}
|
|
383
383
|
};
|
|
384
|
-
function
|
|
384
|
+
function F(e) {
|
|
385
385
|
if (!e || typeof e != "object")
|
|
386
386
|
return !1;
|
|
387
387
|
const t = Object.getPrototypeOf(e);
|
|
388
388
|
return t === null || t === Object.prototype || Object.getPrototypeOf(t) === null ? Object.prototype.toString.call(e) === "[object Object]" : !1;
|
|
389
389
|
}
|
|
390
|
-
const
|
|
390
|
+
const De = (...e) => {
|
|
391
391
|
const t = {}, n = e.length;
|
|
392
392
|
let r, i = 0;
|
|
393
393
|
for (; i < n; i += 1)
|
|
@@ -398,18 +398,18 @@ const Ue = (...e) => {
|
|
|
398
398
|
} : t[r] = e[i][r]);
|
|
399
399
|
return t;
|
|
400
400
|
};
|
|
401
|
-
function
|
|
402
|
-
const r =
|
|
403
|
-
for (let
|
|
404
|
-
const s = o[
|
|
405
|
-
Array.isArray(
|
|
401
|
+
function A(e, t, n) {
|
|
402
|
+
const r = w(n?.omitNil) ? n?.omitNil : !0, i = w(n?.omitEmpty) ? n?.omitEmpty : !0, o = Object.keys(t);
|
|
403
|
+
for (let f = 0; f < o.length; f++) {
|
|
404
|
+
const s = o[f], c = t[s], u = e[s];
|
|
405
|
+
Array.isArray(c) ? Array.isArray(u) ? c.length === 0 && !i ? e[s] = c : e[s] = A(u, c, n) : e[s] = A([], c, n) : F(c) ? F(u) ? Object.keys(c).length === 0 && !i ? e[s] = c : e[s] = A(u, c, n) : e[s] = A({}, c, n) : r ? (u === void 0 || !ie(c)) && (e[s] = c) : e[s] = c;
|
|
406
406
|
}
|
|
407
407
|
return e;
|
|
408
408
|
}
|
|
409
|
-
let
|
|
410
|
-
const
|
|
409
|
+
let L = 0;
|
|
410
|
+
const M = (e = 21) => {
|
|
411
411
|
if (typeof window > "u" || !window.crypto)
|
|
412
|
-
return (
|
|
412
|
+
return (L += 1).toFixed(0);
|
|
413
413
|
let t = "";
|
|
414
414
|
const n = crypto.getRandomValues(new Uint8Array(e));
|
|
415
415
|
for (; e--; ) {
|
|
@@ -417,67 +417,67 @@ const L = (e = 21) => {
|
|
|
417
417
|
t += r < 36 ? r.toString(36) : r < 62 ? (r - 26).toString(36).toUpperCase() : r < 63 ? "_" : "-";
|
|
418
418
|
}
|
|
419
419
|
return t;
|
|
420
|
-
},
|
|
420
|
+
}, Be = () => typeof window > "u" ? M() : window.crypto && window.crypto.randomUUID && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : M(), Ne = (e) => {
|
|
421
421
|
if (e && e !== !0)
|
|
422
422
|
return e;
|
|
423
|
-
},
|
|
423
|
+
}, Pe = (e) => {
|
|
424
424
|
const t = {};
|
|
425
425
|
if (Object.keys(e || {}).forEach((n) => {
|
|
426
426
|
e[n] !== void 0 && (t[n] = e[n]);
|
|
427
427
|
}), !(Object.keys(t).length < 1))
|
|
428
428
|
return t;
|
|
429
|
-
},
|
|
429
|
+
}, Fe = (e) => {
|
|
430
430
|
const t = {};
|
|
431
431
|
return Object.keys(e || {}).forEach((n) => {
|
|
432
432
|
Array.isArray(e[n]) && e[n]?.length === 0 || e[n] !== void 0 && (t[n] = e[n]);
|
|
433
433
|
}), t;
|
|
434
|
-
};
|
|
435
|
-
function
|
|
434
|
+
}, oe = (e) => e != null && e !== "";
|
|
435
|
+
function B(e) {
|
|
436
436
|
if (!(typeof e != "string" && !Array.isArray(e)))
|
|
437
437
|
return Array.isArray(e) ? e[e.length - 1] : e.split(":")?.slice(-1)[0];
|
|
438
438
|
}
|
|
439
|
-
function
|
|
440
|
-
return e && (e.type === J || e.type ===
|
|
439
|
+
function se(e) {
|
|
440
|
+
return e && (e.type === J || e.type === V && e.children.length === 0 || e.type === Text && e.children.trim() === "");
|
|
441
441
|
}
|
|
442
|
-
function
|
|
443
|
-
return
|
|
442
|
+
function Le(e, t) {
|
|
443
|
+
return T(e[t]?.());
|
|
444
444
|
}
|
|
445
|
-
function
|
|
446
|
-
const
|
|
447
|
-
return
|
|
448
|
-
Array.isArray(
|
|
449
|
-
}),
|
|
445
|
+
function T(e = [], t = !0) {
|
|
446
|
+
const n = Array.isArray(e) ? e : [e], r = [];
|
|
447
|
+
return n.forEach((i) => {
|
|
448
|
+
Array.isArray(i) ? r.push(...T(i, t)) : i?.type === V || i?.type === "template" ? r.push(...T(i.children, t)) : i && m(i) ? t && !se(i) ? r.push(i) : t || r.push(i) : oe(i) && r.push(i);
|
|
449
|
+
}), r;
|
|
450
450
|
}
|
|
451
451
|
function q(e, ...t) {
|
|
452
452
|
return typeof e == "function" ? e?.(...t) : e;
|
|
453
453
|
}
|
|
454
|
-
function
|
|
455
|
-
const i =
|
|
454
|
+
function fe(e, t, n = "default", r) {
|
|
455
|
+
const i = B(n);
|
|
456
456
|
if (i) {
|
|
457
457
|
let o;
|
|
458
|
-
const
|
|
459
|
-
return
|
|
458
|
+
const f = W(t, n);
|
|
459
|
+
return f === !1 ? o = !1 : f === !0 ? o = e?.[i] : p(f) && r ? m(f) ? o = f : o = e?.[i] : o = f || e?.[i], r ? m(o) ? o : q(o) : o;
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
462
|
function ce(e, t, n = "default", r) {
|
|
463
|
-
const i =
|
|
463
|
+
const i = B(n);
|
|
464
464
|
if (i) {
|
|
465
465
|
let o;
|
|
466
|
-
const
|
|
467
|
-
return
|
|
466
|
+
const f = W(t, n);
|
|
467
|
+
return f === !1 ? o = !1 : f === !0 ? o = e?.[i]?.(r) : p(f) ? m(f) ? o = f : o = e?.[i]?.(r) : o = f || e?.[i]?.(r), m(o) ? o : q(o, r);
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
|
-
function
|
|
470
|
+
function Me(e, t, n, r) {
|
|
471
471
|
const i = {};
|
|
472
472
|
return e.forEach((o) => {
|
|
473
|
-
const
|
|
474
|
-
if (
|
|
475
|
-
const s = r?.render ? ce(t, n, o, r?.params) :
|
|
476
|
-
(
|
|
473
|
+
const f = B(o);
|
|
474
|
+
if (f) {
|
|
475
|
+
const s = r?.render ? ce(t, n, o, r?.params) : fe(t, n, o);
|
|
476
|
+
(w(s) || s) && (i[f] = s);
|
|
477
477
|
}
|
|
478
478
|
}), i;
|
|
479
479
|
}
|
|
480
|
-
const
|
|
480
|
+
const S = {
|
|
481
481
|
videoAllowType: [
|
|
482
482
|
"mp4",
|
|
483
483
|
"webm",
|
|
@@ -565,14 +565,14 @@ const v = {
|
|
|
565
565
|
"ape"
|
|
566
566
|
]
|
|
567
567
|
};
|
|
568
|
-
function
|
|
568
|
+
function $e(e) {
|
|
569
569
|
return e != null;
|
|
570
570
|
}
|
|
571
|
-
const
|
|
571
|
+
const _e = ({ suffixCls: e, customizePrefixCls: t, isPor: n, className: r }) => {
|
|
572
572
|
const i = r || (n ? "gx-pro" : "gx");
|
|
573
573
|
return t || (e ? `${i}-${e}` : i);
|
|
574
|
-
},
|
|
575
|
-
function
|
|
574
|
+
}, Ve = (e, t) => e ? a(e) ? e.join("-") : e.toString() : `${t || 0}`;
|
|
575
|
+
function We(e, { align: t, showIndex: n }) {
|
|
576
576
|
const r = O(e);
|
|
577
577
|
if (n && e.length && e.every((i) => i.dataIndex !== "sortIndex")) {
|
|
578
578
|
const i = e[0];
|
|
@@ -581,7 +581,7 @@ function Ve(e, { align: t, showIndex: n }) {
|
|
|
581
581
|
align: t,
|
|
582
582
|
fixed: i.fixed,
|
|
583
583
|
width: 60,
|
|
584
|
-
uuid:
|
|
584
|
+
uuid: ae().uuid(15),
|
|
585
585
|
dataIndex: "sortIndex",
|
|
586
586
|
key: "sortIndex"
|
|
587
587
|
});
|
|
@@ -589,13 +589,13 @@ function Ve(e, { align: t, showIndex: n }) {
|
|
|
589
589
|
r.filter((i) => i.dataIndex !== "sortIndex");
|
|
590
590
|
return r;
|
|
591
591
|
}
|
|
592
|
-
function
|
|
592
|
+
function ze(e, ...t) {
|
|
593
593
|
return typeof e == "function" ? e(...t) : e;
|
|
594
594
|
}
|
|
595
|
-
function
|
|
595
|
+
function be(e) {
|
|
596
596
|
return JSON.parse(JSON.stringify(e));
|
|
597
597
|
}
|
|
598
|
-
function
|
|
598
|
+
function He(e, t) {
|
|
599
599
|
if (p(e)) {
|
|
600
600
|
const { pageSize: n = 10, total: r = 0 } = e;
|
|
601
601
|
let { current: i = 1 } = e;
|
|
@@ -603,19 +603,19 @@ function be(e, t) {
|
|
|
603
603
|
}
|
|
604
604
|
return 1;
|
|
605
605
|
}
|
|
606
|
-
function
|
|
606
|
+
function qe(e = [], t, n = "children") {
|
|
607
607
|
function r(i, o) {
|
|
608
|
-
return o.map((
|
|
609
|
-
const
|
|
610
|
-
return
|
|
608
|
+
return o.map((f, s) => {
|
|
609
|
+
const c = `${i}-${s + 1}`;
|
|
610
|
+
return f[n] && (f[n] = r(c, f[n])), f.sortIndex = c, f;
|
|
611
611
|
});
|
|
612
612
|
}
|
|
613
613
|
return O(e).map((i, o) => {
|
|
614
|
-
const
|
|
615
|
-
return i[n] && (i[n] = r(`${
|
|
614
|
+
const f = p(t) && t.current || 1, s = p(t) && t.pageSize || 10, c = `${(f - 1) * s + (o + 1)}`;
|
|
615
|
+
return i[n] && (i[n] = r(`${c}`, i[n])), i.sortIndex = c, i;
|
|
616
616
|
});
|
|
617
617
|
}
|
|
618
|
-
function
|
|
618
|
+
function Je(e, t) {
|
|
619
619
|
return a(e) ? e?.filter((n, r) => {
|
|
620
620
|
if (d(t))
|
|
621
621
|
return r <= t - 1;
|
|
@@ -629,28 +629,28 @@ function qe(e, t) {
|
|
|
629
629
|
return !0;
|
|
630
630
|
}) : [];
|
|
631
631
|
}
|
|
632
|
-
function fe(e, t, n, r = 0) {
|
|
633
|
-
const i = d(r) && (r === 0 || r === 1) ? r : 0, o = e[n], c = t[n];
|
|
634
|
-
let s = 0;
|
|
635
|
-
return o < c ? s = i === 0 ? -1 : 0 : o > c && (s = i === 0 ? 0 : -1), s;
|
|
636
|
-
}
|
|
637
632
|
function ue(e, t, n, r = 0) {
|
|
638
|
-
const i = d(r) && (r === 0 || r === 1) ? r : 0, o =
|
|
633
|
+
const i = d(r) && (r === 0 || r === 1) ? r : 0, o = e[n], f = t[n];
|
|
639
634
|
let s = 0;
|
|
640
|
-
return o <
|
|
635
|
+
return o < f ? s = i === 0 ? -1 : 0 : o > f && (s = i === 0 ? 0 : -1), s;
|
|
641
636
|
}
|
|
642
|
-
function
|
|
643
|
-
|
|
637
|
+
function le(e, t, n, r = 0) {
|
|
638
|
+
const i = d(r) && (r === 0 || r === 1) ? r : 0, o = new Date(e[n]), f = new Date(t[n]);
|
|
639
|
+
let s = 0;
|
|
640
|
+
return o < f ? s = i === 0 ? -1 : 0 : o > f && (s = i === 0 ? 0 : -1), s;
|
|
644
641
|
}
|
|
645
642
|
function Ze(e, t, n = 0) {
|
|
646
643
|
return e.sort((r, i) => ue(r, i, t, n));
|
|
647
644
|
}
|
|
648
|
-
function Xe(e) {
|
|
645
|
+
function Xe(e, t, n = 0) {
|
|
646
|
+
return e.sort((r, i) => le(r, i, t, n));
|
|
647
|
+
}
|
|
648
|
+
function Ye(e) {
|
|
649
649
|
let t = O(e);
|
|
650
650
|
const n = new Set(t);
|
|
651
651
|
return t = Array.from(n), t;
|
|
652
652
|
}
|
|
653
|
-
function
|
|
653
|
+
function Ge(e, t) {
|
|
654
654
|
const n = ["null", "undefined"];
|
|
655
655
|
let r = !0;
|
|
656
656
|
return e === 0 ? r = !0 : n.includes(e) ? r = !1 : e || (r = !1), r ? {
|
|
@@ -661,7 +661,7 @@ function Ye(e, t) {
|
|
|
661
661
|
success: r
|
|
662
662
|
};
|
|
663
663
|
}
|
|
664
|
-
function
|
|
664
|
+
function Qe(e) {
|
|
665
665
|
let t = "";
|
|
666
666
|
if (e > -1) {
|
|
667
667
|
const n = Math.floor(e / 3600), r = Math.floor(e / 60) % 60, i = Number.parseInt(String(e % 60));
|
|
@@ -669,18 +669,18 @@ function Ge(e) {
|
|
|
669
669
|
}
|
|
670
670
|
return t.split(":")[0] === "00" ? `${t.split(":")[1]}:${t.split(":")[2]}` : t;
|
|
671
671
|
}
|
|
672
|
-
function
|
|
672
|
+
function ae() {
|
|
673
673
|
const e = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
|
|
674
674
|
return {
|
|
675
675
|
uuid(t, n) {
|
|
676
676
|
const r = e, i = [], o = n || r.length;
|
|
677
|
-
let
|
|
677
|
+
let f, s;
|
|
678
678
|
if (t)
|
|
679
|
-
for (
|
|
680
|
-
i[
|
|
679
|
+
for (f = 0; f < t; f += 1)
|
|
680
|
+
i[f] = r[Number.parseInt(String(Math.random() * o))];
|
|
681
681
|
else
|
|
682
|
-
for (i[8] = "-", i[13] = "-", i[18] = "-", i[23] = "-", i[14] = "4",
|
|
683
|
-
i[
|
|
682
|
+
for (i[8] = "-", i[13] = "-", i[18] = "-", i[23] = "-", i[14] = "4", f = 0; f < 36; f += 1)
|
|
683
|
+
i[f] || (s = Math.random() * 16, i[f] = r[f === 19 ? s && 3 || 8 : s]);
|
|
684
684
|
return i.join("");
|
|
685
685
|
},
|
|
686
686
|
uuidFast() {
|
|
@@ -701,83 +701,83 @@ function le() {
|
|
|
701
701
|
}
|
|
702
702
|
};
|
|
703
703
|
}
|
|
704
|
-
function
|
|
704
|
+
function de(e, t) {
|
|
705
705
|
if (!Array.isArray(e) || e.length === 0)
|
|
706
706
|
return 0;
|
|
707
707
|
const n = t || "children";
|
|
708
708
|
return Math.max(...e.map((r) => {
|
|
709
709
|
const i = r[n];
|
|
710
|
-
return 1 + (i ?
|
|
710
|
+
return 1 + (i ? de(i, n) : 0);
|
|
711
711
|
}));
|
|
712
712
|
}
|
|
713
|
-
function
|
|
713
|
+
function pe(e, t = "children") {
|
|
714
714
|
let n = [];
|
|
715
715
|
return e.forEach((r) => {
|
|
716
|
-
n.push(r), a(r[t]) && r[t].length > 0 && (n = n.concat(
|
|
716
|
+
n.push(r), a(r[t]) && r[t].length > 0 && (n = n.concat(pe(r[t], t)));
|
|
717
717
|
}), n;
|
|
718
718
|
}
|
|
719
|
-
function
|
|
719
|
+
function ke(e, t) {
|
|
720
720
|
if (!e || !a(e) || e?.length === 0)
|
|
721
721
|
return [];
|
|
722
|
-
const { id: n = "id", parentId: r = "parentId", children: i = "children", emptyChildren: o = !0 } = t || {},
|
|
723
|
-
return s.map((
|
|
724
|
-
const u = s.filter((l) =>
|
|
725
|
-
return u.length > 0 ?
|
|
722
|
+
const { id: n = "id", parentId: r = "parentId", children: i = "children", emptyChildren: o = !0 } = t || {}, f = t?.rootId ?? 0, s = O(e);
|
|
723
|
+
return s.map((c) => (!o && c[i] && c[i]?.length === 0 && delete c[i], c)).filter((c) => {
|
|
724
|
+
const u = s.filter((l) => c[n] === l[r]);
|
|
725
|
+
return u.length > 0 ? c[i] = u : o && (c[i] = []), f === !1 ? !0 : c[r] === f;
|
|
726
726
|
});
|
|
727
727
|
}
|
|
728
|
-
function
|
|
728
|
+
function he(e, t) {
|
|
729
729
|
return e.map((n) => {
|
|
730
730
|
const r = { ...n };
|
|
731
|
-
return r.children && (r.children =
|
|
731
|
+
return r.children && (r.children = he(r.children, t)), t(r) || r.children && r.children.length > 0 ? r : null;
|
|
732
732
|
}).filter(Boolean);
|
|
733
733
|
}
|
|
734
|
-
function
|
|
734
|
+
function Ke(e, t, n) {
|
|
735
735
|
const { value: r, children: i } = n || {
|
|
736
736
|
value: "value",
|
|
737
737
|
children: "children"
|
|
738
738
|
};
|
|
739
739
|
let o = [];
|
|
740
|
-
function
|
|
740
|
+
function f(s, c) {
|
|
741
741
|
if (s[r] === t)
|
|
742
|
-
return o = [...
|
|
742
|
+
return o = [...c, s[r]], !0;
|
|
743
743
|
if (s[i]) {
|
|
744
744
|
for (const u of s[i])
|
|
745
|
-
if (
|
|
745
|
+
if (f(u, [...c, s[r]]))
|
|
746
746
|
return !0;
|
|
747
747
|
}
|
|
748
748
|
return !1;
|
|
749
749
|
}
|
|
750
750
|
for (const s of e)
|
|
751
|
-
if (
|
|
751
|
+
if (f(s, []))
|
|
752
752
|
break;
|
|
753
753
|
return o;
|
|
754
754
|
}
|
|
755
|
-
function
|
|
755
|
+
function je(e) {
|
|
756
756
|
return e && a(e) ? e[e.length - 1] : null;
|
|
757
757
|
}
|
|
758
|
-
function
|
|
758
|
+
function ye(e, t, n) {
|
|
759
759
|
const r = n?.value || "id", i = n?.children || "children";
|
|
760
760
|
for (const o of e) {
|
|
761
761
|
if (o[r] === t)
|
|
762
762
|
return o;
|
|
763
|
-
const
|
|
764
|
-
if (
|
|
765
|
-
const s =
|
|
763
|
+
const f = o[i];
|
|
764
|
+
if (f) {
|
|
765
|
+
const s = ye(f, t, n);
|
|
766
766
|
if (s)
|
|
767
767
|
return s;
|
|
768
768
|
}
|
|
769
769
|
}
|
|
770
770
|
}
|
|
771
|
-
function
|
|
771
|
+
function et(e) {
|
|
772
772
|
return URL.createObjectURL(e);
|
|
773
773
|
}
|
|
774
|
-
function
|
|
774
|
+
function tt(e) {
|
|
775
775
|
return new Promise((t, n) => {
|
|
776
776
|
const r = new FileReader();
|
|
777
777
|
r.readAsDataURL(e), r.onload = () => t(r.result), r.onerror = (i) => n(i);
|
|
778
778
|
});
|
|
779
779
|
}
|
|
780
|
-
function
|
|
780
|
+
function nt(e) {
|
|
781
781
|
const t = e.split(","), n = t[0].match(/:(.*?);/)[1], r = atob(t[1]);
|
|
782
782
|
let i = r.length;
|
|
783
783
|
const o = new Uint8Array(i);
|
|
@@ -785,71 +785,71 @@ function tt(e) {
|
|
|
785
785
|
o[i] = r.charCodeAt(i);
|
|
786
786
|
return new Blob([o], { type: n });
|
|
787
787
|
}
|
|
788
|
-
function
|
|
788
|
+
function rt(e, t) {
|
|
789
789
|
const n = e.split(","), r = n[0].match(/:(.*?);/)[1], i = atob(n[1]);
|
|
790
790
|
let o = i.length;
|
|
791
|
-
const
|
|
791
|
+
const f = new Uint8Array(o);
|
|
792
792
|
for (; o--; )
|
|
793
|
-
|
|
794
|
-
return new File([
|
|
793
|
+
f[o] = i.charCodeAt(o);
|
|
794
|
+
return new File([f], t, { type: r });
|
|
795
795
|
}
|
|
796
|
-
function
|
|
796
|
+
function it(e, t, n) {
|
|
797
797
|
return new window.File([e], t, { type: n });
|
|
798
798
|
}
|
|
799
|
-
function
|
|
799
|
+
function ge(e) {
|
|
800
800
|
if (!e || typeof e != "string")
|
|
801
801
|
return "";
|
|
802
802
|
const t = e.indexOf("?");
|
|
803
803
|
return t > 0 ? `${e.substring(0, t)}` : e;
|
|
804
804
|
}
|
|
805
|
-
function
|
|
805
|
+
function U(e) {
|
|
806
806
|
if (!e || typeof e != "string")
|
|
807
807
|
return "";
|
|
808
|
-
const t =
|
|
808
|
+
const t = ge(e), n = t.lastIndexOf(".");
|
|
809
809
|
return n > 0 && `${t?.substring?.(n)?.split("?")?.[0]}`?.split(".")?.[1] || "";
|
|
810
810
|
}
|
|
811
|
-
function
|
|
811
|
+
function x(e, t) {
|
|
812
812
|
if (t)
|
|
813
813
|
return t;
|
|
814
814
|
if (!e || e === "data:")
|
|
815
815
|
return "4";
|
|
816
816
|
let n = "4";
|
|
817
|
-
return
|
|
817
|
+
return N(e) ? e.includes("data:image/") ? n = "png" : e.includes("data:video/") ? n = "mp4" : e.includes("data:audio/") && (n = "mp3") : e instanceof Blob ? (e = String(e), e.includes("image") ? n = "png" : e.includes("video") ? n = "mp4" : e.includes("audio") && (n = "mp3")) : n = U(e).toLowerCase(), S.imageType.includes(n) ? "1" : S.videoType.includes(n) ? "3" : S.audioType.includes(n) ? "2" : "4";
|
|
818
818
|
}
|
|
819
|
-
function
|
|
819
|
+
function me(e) {
|
|
820
820
|
const { url: t = "", fileType: n = "1" } = e || {};
|
|
821
821
|
let r = "", i = { play: !1, height: 0, size: 0, width: 0, duration: 0 };
|
|
822
822
|
function o() {
|
|
823
823
|
i = { play: !1, height: 0, size: 0, width: 0, duration: 0 };
|
|
824
824
|
}
|
|
825
|
-
return t instanceof File ? r = URL.createObjectURL(t) :
|
|
825
|
+
return t instanceof File ? r = URL.createObjectURL(t) : N(t) ? r = t : t instanceof Blob ? r = URL.createObjectURL(t) : (t.includes("https") || t.includes("http")) && (r = t), new Promise((f) => {
|
|
826
826
|
let s;
|
|
827
827
|
if (n === "4") {
|
|
828
|
-
|
|
828
|
+
f(i);
|
|
829
829
|
return;
|
|
830
830
|
}
|
|
831
831
|
n === "1" ? (s = document.createElement("img"), s.src = r) : n === "2" ? (s = document.createElement("audio"), s.src = r) : n === "3" && (s = document.createElement("video"), s.src = r), n === "1" ? s.onload = function() {
|
|
832
|
-
o(), i.play = !0, i.width = s.width || 0, i.height = s.height || 0,
|
|
832
|
+
o(), i.play = !0, i.width = s.width || 0, i.height = s.height || 0, f(i), s = null;
|
|
833
833
|
} : s.oncanplay = function() {
|
|
834
|
-
o(), i.play = !0, i.width = s?.videoWidth || 0, i.height = s?.videoHeight || 0, i.duration = s?.duration || 0,
|
|
834
|
+
o(), i.play = !0, i.width = s?.videoWidth || 0, i.height = s?.videoHeight || 0, i.duration = s?.duration || 0, f(i), s = null;
|
|
835
835
|
}, s.onerror = function() {
|
|
836
|
-
o(),
|
|
836
|
+
o(), f(i), s = null;
|
|
837
837
|
};
|
|
838
838
|
});
|
|
839
839
|
}
|
|
840
|
-
async function
|
|
840
|
+
async function ot(e) {
|
|
841
841
|
const { url: t = "", currentTime: n, videoSuffix: r = "", videoAllowPlay: i = !1 } = e;
|
|
842
|
-
let o = "",
|
|
843
|
-
return t instanceof File ? (o = URL.createObjectURL(t),
|
|
842
|
+
let o = "", f = r, s = "1", c;
|
|
843
|
+
return t instanceof File ? (o = URL.createObjectURL(t), f = U(t.name), s = x(t.name)) : t instanceof Blob ? (o = URL.createObjectURL(t), s = x(t)) : N(t) ? (o = t, s = x(t)) : (t.includes("https") || t.includes("http")) && (o = t, f = U(t), s = x(t)), (f ? S.videoAllowType.includes(f.toLowerCase()) : !1) ? i ? $(o, n) : (c = await me({
|
|
844
844
|
url: o,
|
|
845
845
|
fileType: s
|
|
846
|
-
}),
|
|
846
|
+
}), c.play ? $(o, n) : new Promise((l) => {
|
|
847
847
|
l("");
|
|
848
848
|
})) : new Promise((l) => {
|
|
849
849
|
l("");
|
|
850
850
|
});
|
|
851
851
|
}
|
|
852
|
-
async function
|
|
852
|
+
async function $(e, t = 0) {
|
|
853
853
|
return new Promise((n) => {
|
|
854
854
|
let r = document.createElement("video");
|
|
855
855
|
r && (r.controls = !0, r.muted = !0, r.setAttribute("src", e), r.setAttribute("muted", String(!0)), r.setAttribute("crossorigin", "anonymous"), r.setAttribute("autoplay", String(!0)), r.addEventListener("loadeddata", async () => {
|
|
@@ -858,49 +858,49 @@ async function M(e, t = 0) {
|
|
|
858
858
|
i && i();
|
|
859
859
|
}); t < (r?.duration || 0); ) {
|
|
860
860
|
r && (r.currentTime = t), await new Promise((y) => i = y);
|
|
861
|
-
const o = document.createElement("canvas"),
|
|
862
|
-
o.width = r?.videoWidth || 0 *
|
|
861
|
+
const o = document.createElement("canvas"), f = 0.8, s = o.getContext("2d"), c = r?.videoWidth || 0 * f, u = r?.videoHeight || 0 * f, l = 0;
|
|
862
|
+
o.width = r?.videoWidth || 0 * f, o.height = r?.videoHeight || 0 * f, r && s.drawImage(r, 0, 0, c + l, u + l), r = null, n(c === 0 || u === 0 ? "" : o.toDataURL("image/png", 1));
|
|
863
863
|
}
|
|
864
864
|
}));
|
|
865
865
|
});
|
|
866
866
|
}
|
|
867
|
-
function
|
|
867
|
+
function N(e = "") {
|
|
868
868
|
return !!(e && [
|
|
869
869
|
"data:image/",
|
|
870
870
|
"data:video/",
|
|
871
871
|
"data:audio/"
|
|
872
872
|
].find((n) => e.includes(n)));
|
|
873
873
|
}
|
|
874
|
-
function
|
|
874
|
+
function st(e) {
|
|
875
875
|
return typeof e == "string" && /^data:(?:image|video|audio)\/[A-Za-z]+;base64,[A-Za-z0-9+/=]+$/.test(e);
|
|
876
876
|
}
|
|
877
|
-
function
|
|
877
|
+
function ft(e, t, n, r = !1) {
|
|
878
878
|
e && t && n && e.addEventListener(t, n, r);
|
|
879
879
|
}
|
|
880
880
|
function ct(e, t, n, r = !1) {
|
|
881
881
|
e && t && n && e.removeEventListener(t, n, r);
|
|
882
882
|
}
|
|
883
|
-
function
|
|
883
|
+
function ut() {
|
|
884
884
|
return /windows|win32/i.test(navigator.userAgent);
|
|
885
885
|
}
|
|
886
|
-
function
|
|
887
|
-
return
|
|
886
|
+
function lt(e) {
|
|
887
|
+
return w(e) ? e : !!e;
|
|
888
888
|
}
|
|
889
|
-
function
|
|
889
|
+
function _(e, t) {
|
|
890
890
|
const n = `^\\d+(?:\\.\\d{0,${e}})?`, r = new RegExp(n), i = t.toString().match(r);
|
|
891
891
|
if (i) {
|
|
892
892
|
const o = i[0];
|
|
893
893
|
if (o.includes(".")) {
|
|
894
|
-
const [
|
|
894
|
+
const [f, s] = o.split(".");
|
|
895
895
|
if (/^0*$/.test(s))
|
|
896
|
-
return
|
|
896
|
+
return f;
|
|
897
897
|
}
|
|
898
898
|
return o;
|
|
899
899
|
}
|
|
900
900
|
return t.toString();
|
|
901
901
|
}
|
|
902
|
-
function
|
|
903
|
-
const { toChinese: n = !1, fixed: r = 2, min: i = 1e4 } = t || {}, o = d(i) ? i : 1e4,
|
|
902
|
+
function at(e, t) {
|
|
903
|
+
const { toChinese: n = !1, fixed: r = 2, min: i = 1e4 } = t || {}, o = d(i) ? i : 1e4, f = d(r) ? r : 2, s = n ? e < o ? "" : e < 1e8 ? "万" : "亿" : e < o ? "" : e < 1e8 ? "w" : "亿";
|
|
904
904
|
if (!d(e))
|
|
905
905
|
return {
|
|
906
906
|
str: `${e}`,
|
|
@@ -911,7 +911,7 @@ function lt(e, t) {
|
|
|
911
911
|
str: `${e}`,
|
|
912
912
|
number: `${e}`
|
|
913
913
|
};
|
|
914
|
-
if (
|
|
914
|
+
if (f === 0) {
|
|
915
915
|
const u = (e / (e < 1e8 ? 1e4 : 1e8)).toFixed(1).split(".")[0];
|
|
916
916
|
return {
|
|
917
917
|
str: `${u}${s}`,
|
|
@@ -919,20 +919,20 @@ function lt(e, t) {
|
|
|
919
919
|
unit: s
|
|
920
920
|
};
|
|
921
921
|
}
|
|
922
|
-
let
|
|
923
|
-
return e < 1e8 ? (
|
|
924
|
-
str:
|
|
925
|
-
number:
|
|
922
|
+
let c;
|
|
923
|
+
return e < 1e8 ? (c = _(f, e / 1e4), {
|
|
924
|
+
str: c + s,
|
|
925
|
+
number: c,
|
|
926
926
|
unit: s
|
|
927
|
-
}) : (
|
|
928
|
-
str:
|
|
929
|
-
number:
|
|
927
|
+
}) : (c = _(f, e / 1e8), {
|
|
928
|
+
str: c + s,
|
|
929
|
+
number: c,
|
|
930
930
|
unit: s
|
|
931
931
|
});
|
|
932
932
|
}
|
|
933
|
-
function
|
|
933
|
+
function dt(e, t) {
|
|
934
934
|
let n = 0;
|
|
935
|
-
const r =
|
|
935
|
+
const r = w(t.removeAfter) ? t.removeAfter : !0, i = t.id || "hiddenElement", o = {
|
|
936
936
|
opacity: 0,
|
|
937
937
|
visibility: "hidden",
|
|
938
938
|
position: "fixed",
|
|
@@ -940,125 +940,126 @@ function at(e, t) {
|
|
|
940
940
|
top: 0,
|
|
941
941
|
left: 0
|
|
942
942
|
};
|
|
943
|
-
let
|
|
944
|
-
if (!
|
|
945
|
-
const
|
|
946
|
-
|
|
943
|
+
let f = document.querySelector(`#${i}`);
|
|
944
|
+
if (!f) {
|
|
945
|
+
const c = document.createElement("div");
|
|
946
|
+
c.id = i, document.body.appendChild(c), f = document.querySelector(`#${i}`);
|
|
947
947
|
}
|
|
948
|
-
Object.assign(
|
|
948
|
+
Object.assign(f.style, o);
|
|
949
949
|
const s = document.createElement(t.createName || "span");
|
|
950
|
-
return s.innerHTML = e, (t.cssObject || p(t.cssObject)) && Object.assign(s.style, t.cssObject),
|
|
950
|
+
return s.innerHTML = e, (t.cssObject || p(t.cssObject)) && Object.assign(s.style, t.cssObject), f.append(s), n = s.getBoundingClientRect()[t.type || "width"], r && f.removeChild(s), n;
|
|
951
951
|
}
|
|
952
|
-
function
|
|
952
|
+
function pt(e) {
|
|
953
953
|
e = d(e) && !Number.isNaN(e) ? e : 0;
|
|
954
954
|
const t = ["零", "一", "二", "三", "四", "五", "六", "七", "八", "九"], n = ["", "十", "百", "千", "万"];
|
|
955
955
|
e = Number.parseInt(`${e}`);
|
|
956
|
-
const r = (
|
|
957
|
-
const s =
|
|
958
|
-
let
|
|
956
|
+
const r = (f) => {
|
|
957
|
+
const s = f.toString().split("").reverse();
|
|
958
|
+
let c = "";
|
|
959
959
|
for (let u = 0; u < s.length; u++)
|
|
960
|
-
|
|
961
|
-
return
|
|
960
|
+
c = (u === 0 && s[u] === "0" || u > 0 && s[u] === "0" && s[u - 1] === "0" ? "" : (e < 20 && u > 0 ? "" : t[s[u]]) + (s[u] === "0" ? n[0] : n[u])) + c;
|
|
961
|
+
return c;
|
|
962
962
|
}, i = Math.floor(e / 1e4);
|
|
963
963
|
let o = e % 1e4;
|
|
964
964
|
return o.toString().length < 4 && (o = "0" + o), i ? r(i) + "万" + r(o) : r(e);
|
|
965
965
|
}
|
|
966
|
-
function
|
|
966
|
+
function ht(e, t) {
|
|
967
967
|
Object.keys(e).forEach((n) => {
|
|
968
968
|
t(n, e[n]);
|
|
969
969
|
});
|
|
970
970
|
}
|
|
971
971
|
export {
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
972
|
+
Ae as Base64,
|
|
973
|
+
Ye as arrayRepeat,
|
|
974
|
+
Je as arraySlice,
|
|
975
|
+
it as blobToDataURL,
|
|
976
|
+
x as checkFileType,
|
|
977
977
|
G as classNames,
|
|
978
978
|
O as cloneDeep,
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
979
|
+
ue as compareArray,
|
|
980
|
+
Ze as compareArraySort,
|
|
981
|
+
Xe as compareArrayTimeSort,
|
|
982
|
+
le as compareTime,
|
|
983
|
+
lt as convertValueBoolean,
|
|
984
984
|
g as copyProperties,
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
985
|
+
nt as dataURLtoBlob,
|
|
986
|
+
rt as dataURLtoFile,
|
|
987
|
+
be as deepCopy,
|
|
988
|
+
A as deepMerge,
|
|
989
|
+
S as fileTypes,
|
|
990
|
+
T as filterEmpty,
|
|
991
|
+
he as filterTree,
|
|
992
|
+
ye as findSourceByTree,
|
|
993
|
+
Ke as findValueAndAncestors,
|
|
994
|
+
ht as forInObject,
|
|
995
|
+
Qe as formatDuration,
|
|
996
|
+
_ as formatNumber,
|
|
997
|
+
Ve as genColumnKey,
|
|
998
|
+
$ as generateVideoPicture,
|
|
999
|
+
je as getArrayLast,
|
|
1000
|
+
tt as getBase64,
|
|
1001
|
+
et as getBlobUrl,
|
|
1002
|
+
U as getFileSuffix,
|
|
1003
|
+
pe as getLevelData,
|
|
1004
|
+
de as getMaxFloor,
|
|
1005
|
+
me as getMediaInfos,
|
|
1006
|
+
_e as getPrefixCls,
|
|
1007
|
+
ae as getRandomNumber,
|
|
1008
1008
|
K as getScroll,
|
|
1009
|
-
|
|
1010
|
-
|
|
1009
|
+
Oe as getScrollContainer,
|
|
1010
|
+
fe as getSlot,
|
|
1011
1011
|
ce as getSlotVNode,
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1012
|
+
Le as getSlotsChildren,
|
|
1013
|
+
Me as getSlotsProps,
|
|
1014
|
+
qe as getSortIndex,
|
|
1015
1015
|
ee as getSymbols,
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1016
|
+
dt as getTextWidth,
|
|
1017
|
+
W as getValueFromObjectByKey,
|
|
1018
|
+
ot as getVideoCoverPicture,
|
|
1019
|
+
ge as getVideoFileUrl,
|
|
1020
|
+
He as handleCurrentPage,
|
|
1021
|
+
Ge as handleEmptyField,
|
|
1022
|
+
We as handleShowIndex,
|
|
1023
1023
|
Z as is,
|
|
1024
1024
|
a as isArray,
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1025
|
+
N as isBase64,
|
|
1026
|
+
w as isBoolean,
|
|
1027
|
+
Re as isBrowser,
|
|
1028
|
+
st as isDataURLBase64,
|
|
1029
|
+
I as isDeepEqualReact,
|
|
1030
|
+
se as isEmptyElement,
|
|
1031
|
+
xe as isFunction,
|
|
1032
|
+
Te as isImg,
|
|
1033
|
+
Ce as isInContainer,
|
|
1034
|
+
Se as isJSONStr,
|
|
1035
|
+
ve as isMobile,
|
|
1036
1036
|
ie as isNil,
|
|
1037
|
-
|
|
1037
|
+
$e as isNotNil,
|
|
1038
1038
|
d as isNumber,
|
|
1039
1039
|
p as isObject,
|
|
1040
|
-
|
|
1040
|
+
F as isPlainObject,
|
|
1041
1041
|
te as isPrimitive,
|
|
1042
1042
|
k as isScroll,
|
|
1043
|
-
|
|
1043
|
+
v as isServer,
|
|
1044
1044
|
X as isString,
|
|
1045
1045
|
Y as isTablet,
|
|
1046
1046
|
ne as isTypedArray,
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
De as
|
|
1047
|
+
Ue as isUrl,
|
|
1048
|
+
oe as isValid,
|
|
1049
|
+
ut as isWindowsOs,
|
|
1050
|
+
De as merge,
|
|
1051
|
+
Be as nanoid,
|
|
1051
1052
|
ct as off,
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1053
|
+
Ne as omitBoolean,
|
|
1054
|
+
Pe as omitUndefined,
|
|
1055
|
+
Fe as omitUndefinedAndEmptyArr,
|
|
1056
|
+
ft as on,
|
|
1056
1057
|
R as raf,
|
|
1057
|
-
|
|
1058
|
-
|
|
1058
|
+
ze as runFunction,
|
|
1059
|
+
Ie as scrollTo,
|
|
1059
1060
|
q as slotRender,
|
|
1060
1061
|
Ee as throttleByAnimationFrame,
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1062
|
+
pt as toChinesNum,
|
|
1063
|
+
at as toConvertNumberShow,
|
|
1064
|
+
ke as treeData
|
|
1064
1065
|
};
|
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.67
|
|
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(l,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],d):(l=typeof globalThis<"u"?globalThis:l||self,d(l.GPorUtils={},l.vue))})(this,(function(l,d){"use strict";class
|
|
13
|
-
`);let n="";for(let r=0;r<t.length;r++){const i=t.charCodeAt(r);i<128?n+=String.fromCharCode(i):i>127&&i<2048?(n+=String.fromCharCode(i>>6|192),n+=String.fromCharCode(i&63|128)):(n+=String.fromCharCode(i>>12|224),n+=String.fromCharCode(i>>6&63|128),n+=String.fromCharCode(i&63|128))}return n}_utf8_decode(t){let n="",r=0,i=0,o=0,f=0;for(;r<t.length;)i=t.charCodeAt(r),i<128?(n+=String.fromCharCode(i),r++):i>191&&i<224?(o=t.charCodeAt(r+1),n+=String.fromCharCode((i&31)<<6|o&63),r+=2):(o=t.charCodeAt(r+1),f=t.charCodeAt(r+2),n+=String.fromCharCode((i&15)<<12|(o&63)<<6|f&63),r+=3);return n}encode(t){let n="",r,i,o,f,c,u,s,a=0;for(t=this._utf8_encode(t);a<t.length;)r=t.charCodeAt(a++),i=t.charCodeAt(a++),o=t.charCodeAt(a++),f=r>>2,c=(r&3)<<4|i>>4,u=(i&15)<<2|o>>6,s=o&63,Number.isNaN(i)?u=s=64:Number.isNaN(o)&&(s=64),n=n+this._keyStr.charAt(f)+this._keyStr.charAt(c)+this._keyStr.charAt(u)+this._keyStr.charAt(s);return n}decode(t){let n="",r,i,o,f,c,u,s,a=0;for(t=t.replace(/[^A-Z0-9+/=]/gi,"");a<t.length;)f=this._keyStr.indexOf(t.charAt(a++)),c=this._keyStr.indexOf(t.charAt(a++)),u=this._keyStr.indexOf(t.charAt(a++)),s=this._keyStr.indexOf(t.charAt(a++)),r=f<<2|c>>4,i=(c&15)<<4|u>>2,o=(u&3)<<6|s,n=n+String.fromCharCode(r),u!==64&&(n=n+String.fromCharCode(i)),s!==64&&(n=n+String.fromCharCode(o));return n=this._utf8_decode(n),n}}function _(e,t){return Object.prototype.toString.call(e)===`[object ${t}]`}function m(e){return typeof e=="boolean"}function y(e){return typeof e=="number"}function h(e){return typeof Array.isArray>"u"?Object.prototype.toString.call(e)==="[object Array]":Array.isArray(e)}function g(e){return e!==null&&_(e,"Object")}function W(e){return typeof e=="string"||e instanceof String}function ye(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 me(){const e=navigator.userAgent||navigator.vendor;return!!(/iPhone/.test(e)||/Android/.test(e)&&/Mobile/.test(e)||/Windows Phone/.test(e)||/Mobile/.test(e)&&!z())}function z(){const e=navigator.userAgent||navigator.vendor;return!!(/iPad/.test(e)||/Macintosh/.test(e)&&"ontouchend"in document||/Android/.test(e)&&!/Mobile/.test(e))}function q(...e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];if(r){if(W(r))t.push(r);else if(h(r))for(let i=0;i<r.length;i++){const o=q(r[i]);o&&t.push(o)}else if(g(r))for(const i in r)r[i]&&t.push(i)}}return t.filter(n=>n).join(" ")}function N(e,t){if(typeof t!="string"&&!Array.isArray(t))return;const n=Array.isArray(t)?t:t.split(":");let r=e;for(let i=0;i<n.length;i++)if(r&&Object.prototype.hasOwnProperty.call(r,n[i]))r=r[n[i]];else return;return r}const S=typeof window>"u";function pe(e){return e.replace(/[-_](.)/g,(t,n)=>n.toUpperCase())}const B=function(e,t){if(S||!e||!t)return"";t=pe(t),t==="float"&&(t="cssFloat");try{const n=e.style[t];if(n)return n;const r=document?.defaultView?.getComputedStyle(e,"");return r?r[t]:""}catch{return e.style[t]}},x=(e,t)=>S?void 0:(t==null?B(e,"overflow"):t?B(e,"overflow-y"):B(e,"overflow-x")).match(/(scroll|auto|overlay)/),we=(e,t)=>{if(S)return;let n=e;for(;n;){if([window,document,document.documentElement].includes(n))return window;if(x(n,t))return n;n=n.parentNode}return n},Se=(e,t)=>{if(S||!e||!t)return!1;const n=e.getBoundingClientRect();let r;return[window,document,document.documentElement,null,void 0].includes(t)?r={top:0,right:window.innerWidth,bottom:window.innerHeight,left:0}:r=t.getBoundingClientRect(),n.top<r.bottom&&n.bottom>r.top&&n.right>r.left&&n.left<r.right};function P(e){return e!=null&&e===e.window}function H(e,t){if(typeof window>"u")return 0;const n=t?"scrollTop":"scrollLeft";let r=0;return P(e)?r=e[t?"pageYOffset":"pageXOffset"]:e instanceof Document?r=e.documentElement[n]:e&&(r=e[n]),e&&!P(e)&&typeof r!="number"&&(r=(e.ownerDocument||e).documentElement?.[n]),r}let J=e=>setTimeout(e,16),Z=e=>clearTimeout(e);typeof window<"u"&&"requestAnimationFrame"in window&&(J=e=>window.requestAnimationFrame(e),Z=e=>window.cancelAnimationFrame(e));let X=0;const F=new Map;function G(e){F.delete(e)}function E(e,t=1){X+=1;const n=X;function r(i){if(i===0)G(n),e();else{const o=J(()=>{r(i-1)});F.set(n,o)}}return r(t),n}E.cancel=e=>{const t=F.get(e);return G(t),Z(t)};function Ae(e,t,n,r){const i=n-t;return e/=r/2,e<1?i/2*e*e*e+t:i/2*((e-=2)*e*e+2)+t}function ve(e,t={}){const{getContainer:n=()=>window,callback:r,duration:i=450}=t,o=n(),f=H(o,!0),c=Date.now(),u=()=>{const a=Date.now()-c,T=Ae(a>i?i:a,f,e,i);P(o)?o.scrollTo(window.pageXOffset,T):o instanceof HTMLDocument||o.constructor.name==="HTMLDocument"?o.documentElement.scrollTop=T:o.scrollTop=T,a<i?E(u):typeof r=="function"&&r()};o&&E(u)}function Oe(e){let t;const n=i=>()=>{t=null,e(...i)},r=(...i)=>{t==null&&(t=requestAnimationFrame(n(i)))};return r.cancel=()=>cancelAnimationFrame(t),r}function Y(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function Q(e){return e==null||typeof e!="object"&&typeof e!="function"}function k(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function A(e){return p(e)}function p(e,t=new Map){if(Q(e))return e;if(t.has(e))return t.get(e);if(Array.isArray(e)){const n=Array.from({length:e.length});t.set(e,n);for(let r=0;r<e.length;r++)n[r]=p(e[r],t);return Object.prototype.hasOwnProperty.call(e,"index")&&(n.index=e.index),Object.prototype.hasOwnProperty.call(e,"input")&&(n.input=e.input),n}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const n=new RegExp(e.source,e.flags);return n.lastIndex=e.lastIndex,n}if(e instanceof Map){const n=new Map;t.set(e,n);for(const[r,i]of e)n.set(r,p(i,t));return n}if(e instanceof Set){const n=new Set;t.set(e,n);for(const r of e)n.add(p(r,t));return n}if(typeof Buffer<"u"&&Buffer.isBuffer(e))return e.subarray();if(k(e)){const n=new(Object.getPrototypeOf(e)).constructor(e.length);t.set(e,n);for(let r=0;r<e.length;r++)n[r]=p(e[r],t);return n}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const n=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return t.set(e,n),w(n,e,t),n}if(typeof File<"u"&&e instanceof File){const n=new File([e],e.name,{type:e.type});return t.set(e,n),w(n,e,t),n}if(e instanceof Blob){const n=new Blob([e],{type:e.type});return t.set(e,n),w(n,e,t),n}if(e instanceof Error){const n=new e.constructor;return t.set(e,n),n.message=e.message,n.name=e.name,n.stack=e.stack,n.cause=e.cause,w(n,e,t),n}if(typeof e=="object"&&e!==null){const n={};return t.set(e,n),w(n,e,t),n}return e}function w(e,t,n){const r=[...Object.keys(t),...Y(t)];for(let i=0;i<r.length;i++){const o=r[i],f=Object.getOwnPropertyDescriptor(e,o);(f==null||f.writable)&&(e[o]=p(t[o],n))}}const Ce=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,Te=()=>process.env.NODE_ENV==="TEST"?!0:typeof window<"u"&&typeof window.document<"u"&&typeof window.matchMedia<"u"&&!Ce;function U(e,t,n,r){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let i,o,f;if(Array.isArray(e)){if(i=e.length,i!=t.length)return!1;for(o=i;o--!==0;)if(!U(e[o],t[o],n,r))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o of e.entries())if(!t.has(o[0]))return!1;for(o of e.entries())if(!U(o[1],t.get(o[0]),n,r))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o of e.entries())if(!t.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(i=e.length,i!=t.length)return!1;for(o=i;o--!==0;)if(e[o]!==t[o])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(f=Object.keys(e),i=f.length,i!==Object.keys(t).length)return!1;for(o=i;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,f[o]))return!1;for(o=i;o--!==0;){const c=f[o];if(!n?.includes(c)&&!(c==="_owner"&&e.$$typeof)&&!U(e[c],t[c],n,r))return r&&console.log(c),!1}return!0}return e!==e&&t!==t}function Ee(e){return/\w.(?:png|jpg|jpeg|svg|webp|gif|bmp)$/i.test(e)}const K=e=>e==null,Ue=e=>{if(!e||!e.startsWith("http"))return!1;try{return!!new URL(e)}catch(t){return console.error("isUrl error",t),!1}};function D(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 Ie=(...e)=>{const t={},n=e.length;let r,i=0;for(;i<n;i+=1)for(r in e[i])Object.prototype.hasOwnProperty.call(e[i],r)&&(typeof t[r]=="object"&&typeof e[i][r]=="object"&&t[r]!==void 0&&t[r]!==null&&!Array.isArray(t[r])&&!Array.isArray(e[i][r])?t[r]={...t[r],...e[i][r]}:t[r]=e[i][r]);return t};function v(e,t,n){const r=m(n?.omitNil)?n?.omitNil:!0,i=m(n?.omitEmpty)?n?.omitEmpty:!0,o=Object.keys(t);for(let f=0;f<o.length;f++){const c=o[f],u=t[c],s=e[c];Array.isArray(u)?Array.isArray(s)?u.length===0&&!i?e[c]=u:e[c]=v(s,u,n):e[c]=v([],u,n):D(u)?D(s)?Object.keys(u).length===0&&!i?e[c]=u:e[c]=v(s,u,n):e[c]=v({},u,n):r?(s===void 0||!K(u))&&(e[c]=u):e[c]=u}return e}let j=0;const ee=(e=21)=>{if(typeof window>"u"||!window.crypto)return(j+=1).toFixed(0);let t="";const n=crypto.getRandomValues(new Uint8Array(e));for(;e--;){const r=63&n[e];t+=r<36?r.toString(36):r<62?(r-26).toString(36).toUpperCase():r<63?"_":"-"}return t},Re=()=>typeof window>"u"?ee():window.crypto&&window.crypto.randomUUID&&typeof crypto.randomUUID=="function"?crypto.randomUUID():ee(),Ne=e=>{if(e&&e!==!0)return e},Be=e=>{const t={};if(Object.keys(e||{}).forEach(n=>{e[n]!==void 0&&(t[n]=e[n])}),!(Object.keys(t).length<1))return t},Pe=e=>{const t={};return Object.keys(e||{}).forEach(n=>{Array.isArray(e[n])&&e[n]?.length===0||e[n]!==void 0&&(t[n]=e[n])}),t};function L(e){if(!(typeof e!="string"&&!Array.isArray(e)))return Array.isArray(e)?e[e.length-1]:e.split(":")?.slice(-1)[0]}function te(e){return e&&(e.type===d.Comment||e.type===d.Fragment&&e.children.length===0||e.type===Text&&e.children.trim()==="")}function Fe(e,t){return M(e[t]?.())}function M(e=[]){const t=[];return e.forEach(n=>{Array.isArray(n)?t.push(...n):n?.type===d.Fragment?t.push(...M(n.children)):t.push(n)}),t.filter(n=>!te(n))}function V(e,...t){return typeof e=="function"?e?.(...t):e}function ne(e,t,n="default",r){const i=L(n);if(i){let o;const f=N(t,n);return f===!1?o=!1:f===!0?o=e?.[i]:g(f)&&r?d.isVNode(f)?o=f:o=e?.[i]:o=f||e?.[i],r?d.isVNode(o)?o:V(o):o}}function re(e,t,n="default",r){const i=L(n);if(i){let o;const f=N(t,n);return f===!1?o=!1:f===!0?o=e?.[i]?.(r):g(f)?d.isVNode(f)?o=f:o=e?.[i]?.(r):o=f||e?.[i]?.(r),d.isVNode(o)?o:V(o,r)}}function De(e,t,n,r){const i={};return e.forEach(o=>{const f=L(o);if(f){const c=r?.render?re(t,n,o,r?.params):ne(t,n,o);(m(c)||c)&&(i[f]=c)}}),i}const O={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"]};function Le(e){return e!=null}const Me=({suffixCls:e,customizePrefixCls:t,isPor:n,className:r})=>{const i=r||(n?"gx-pro":"gx");return t||(e?`${i}-${e}`:i)},Ve=(e,t)=>e?h(e)?e.join("-"):e.toString():`${t||0}`;function be(e,{align:t,showIndex:n}){const r=A(e);if(n&&e.length&&e.every(i=>i.dataIndex!=="sortIndex")){const i=e[0];r.unshift({title:"序号",align:t,fixed:i.fixed,width:60,uuid:ce().uuid(15),dataIndex:"sortIndex",key:"sortIndex"})}else r.filter(i=>i.dataIndex!=="sortIndex");return r}function $e(e,...t){return typeof e=="function"?e(...t):e}function _e(e){return JSON.parse(JSON.stringify(e))}function We(e,t){if(g(e)){const{pageSize:n=10,total:r=0}=e;let{current:i=1}=e;return r-t<=n*(i-1)&&(i=i-1),i===0?1:i}return 1}function ze(e=[],t,n="children"){function r(i,o){return o.map((f,c)=>{const u=`${i}-${c+1}`;return f[n]&&(f[n]=r(u,f[n])),f.sortIndex=u,f})}return A(e).map((i,o)=>{const f=g(t)&&t.current||1,c=g(t)&&t.pageSize||10,u=`${(f-1)*c+(o+1)}`;return i[n]&&(i[n]=r(`${u}`,i[n])),i.sortIndex=u,i})}function qe(e,t){return h(e)?e?.filter((n,r)=>{if(y(t))return r<=t-1;if(h(t)&&t.length===2){const i=t[0]-1,o=t[1]?t[1]-1:e.length-1;return r<=o&&r>=i}else if(h(t)&&t.length===1){const i=t[0]-1,o=e.length-1;return r<=o&&r>=i}return!0}):[]}function ie(e,t,n,r=0){const i=y(r)&&(r===0||r===1)?r:0,o=e[n],f=t[n];let c=0;return o<f?c=i===0?-1:0:o>f&&(c=i===0?0:-1),c}function oe(e,t,n,r=0){const i=y(r)&&(r===0||r===1)?r:0,o=new Date(e[n]),f=new Date(t[n]);let c=0;return o<f?c=i===0?-1:0:o>f&&(c=i===0?0:-1),c}function xe(e,t,n=0){return e.sort((r,i)=>ie(r,i,t,n))}function He(e,t,n=0){return e.sort((r,i)=>oe(r,i,t,n))}function Je(e){let t=A(e);const n=new Set(t);return t=Array.from(n),t}function Ze(e,t){const n=["null","undefined"];let r=!0;return e===0?r=!0:n.includes(e)?r=!1:e||(r=!1),r?{value:e,success:r}:{value:t===""?t:t||"-",success:r}}function Xe(e){let t="";if(e>-1){const n=Math.floor(e/3600),r=Math.floor(e/60)%60,i=Number.parseInt(String(e%60));n<10?t="0"+n+":":t=n+":",r<10&&(t+="0"),t+=r+":",i<10&&(t+="0"),t+=i}return t.split(":")[0]==="00"?`${t.split(":")[1]}:${t.split(":")[2]}`:t}function ce(){const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");return{uuid(t,n){const r=e,i=[],o=n||r.length;let f,c;if(t)for(f=0;f<t;f+=1)i[f]=r[Number.parseInt(String(Math.random()*o))];else for(i[8]="-",i[13]="-",i[18]="-",i[23]="-",i[14]="4",f=0;f<36;f+=1)i[f]||(c=Math.random()*16,i[f]=r[f===19?c&&3||8:c]);return i.join("")},uuidFast(){const t=e,n=Array.from({length:36});let r=0,i,o;for(o=0;o<36;o+=1)o===8||o===13||o===18||o===23?n[o]="-":o===14?n[o]="4":(r<=2&&(r=33554432+Math.random()*16777216||0),i=r&&15,r=r>4,n[o]=t[o===19?i&&3||8:i]);return n.join("")},uuidString(){return this.uuidFast().replace(new RegExp("-","g"),"")},uuidCompact(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=Math.random()*16||0;return(t==="x"?n:n&&3||8).toString(16)})}}}function fe(e,t){if(!Array.isArray(e)||e.length===0)return 0;const n=t||"children";return Math.max(...e.map(r=>{const i=r[n];return 1+(i?fe(i,n):0)}))}function le(e,t="children"){let n=[];return e.forEach(r=>{n.push(r),h(r[t])&&r[t].length>0&&(n=n.concat(le(r[t],t)))}),n}function Ge(e,t){if(!e||!h(e)||e?.length===0)return[];const{id:n="id",parentId:r="parentId",children:i="children",emptyChildren:o=!0}=t||{},f=t?.rootId??0,c=A(e);return c.map(u=>(!o&&u[i]&&u[i]?.length===0&&delete u[i],u)).filter(u=>{const s=c.filter(a=>u[n]===a[r]);return s.length>0?u[i]=s:o&&(u[i]=[]),f===!1?!0:u[r]===f})}function ue(e,t){return e.map(n=>{const r={...n};return r.children&&(r.children=ue(r.children,t)),t(r)||r.children&&r.children.length>0?r:null}).filter(Boolean)}function Ye(e,t,n){const{value:r,children:i}=n||{value:"value",children:"children"};let o=[];function f(c,u){if(c[r]===t)return o=[...u,c[r]],!0;if(c[i]){for(const s of c[i])if(f(s,[...u,c[r]]))return!0}return!1}for(const c of e)if(f(c,[]))break;return o}function Qe(e){return e&&h(e)?e[e.length-1]:null}function se(e,t,n){const r=n?.value||"id",i=n?.children||"children";for(const o of e){if(o[r]===t)return o;const f=o[i];if(f){const c=se(f,t,n);if(c)return c}}}function ke(e){return URL.createObjectURL(e)}function Ke(e){return new Promise((t,n)=>{const r=new FileReader;r.readAsDataURL(e),r.onload=()=>t(r.result),r.onerror=i=>n(i)})}function je(e){const t=e.split(","),n=t[0].match(/:(.*?);/)[1],r=atob(t[1]);let i=r.length;const o=new Uint8Array(i);for(;i--;)o[i]=r.charCodeAt(i);return new Blob([o],{type:n})}function et(e,t){const n=e.split(","),r=n[0].match(/:(.*?);/)[1],i=atob(n[1]);let o=i.length;const f=new Uint8Array(o);for(;o--;)f[o]=i.charCodeAt(o);return new File([f],t,{type:r})}function tt(e,t,n){return new window.File([e],t,{type:n})}function ae(e){if(!e||typeof e!="string")return"";const t=e.indexOf("?");return t>0?`${e.substring(0,t)}`:e}function I(e){if(!e||typeof e!="string")return"";const t=ae(e),n=t.lastIndexOf(".");return n>0&&`${t?.substring?.(n)?.split("?")?.[0]}`?.split(".")?.[1]||""}function C(e,t){if(t)return t;if(!e||e==="data:")return"4";let n="4";return R(e)?e.includes("data:image/")?n="png":e.includes("data:video/")?n="mp4":e.includes("data:audio/")&&(n="mp3"):e instanceof Blob?(e=String(e),e.includes("image")?n="png":e.includes("video")?n="mp4":e.includes("audio")&&(n="mp3")):n=I(e).toLowerCase(),O.imageType.includes(n)?"1":O.videoType.includes(n)?"3":O.audioType.includes(n)?"2":"4"}function de(e){const{url:t="",fileType:n="1"}=e||{};let r="",i={play:!1,height:0,size:0,width:0,duration:0};function o(){i={play:!1,height:0,size:0,width:0,duration:0}}return t instanceof File?r=URL.createObjectURL(t):R(t)?r=t:t instanceof Blob?r=URL.createObjectURL(t):(t.includes("https")||t.includes("http"))&&(r=t),new Promise(f=>{let c;if(n==="4"){f(i);return}n==="1"?(c=document.createElement("img"),c.src=r):n==="2"?(c=document.createElement("audio"),c.src=r):n==="3"&&(c=document.createElement("video"),c.src=r),n==="1"?c.onload=function(){o(),i.play=!0,i.width=c.width||0,i.height=c.height||0,f(i),c=null}:c.oncanplay=function(){o(),i.play=!0,i.width=c?.videoWidth||0,i.height=c?.videoHeight||0,i.duration=c?.duration||0,f(i),c=null},c.onerror=function(){o(),f(i),c=null}})}async function nt(e){const{url:t="",currentTime:n,videoSuffix:r="",videoAllowPlay:i=!1}=e;let o="",f=r,c="1",u;return t instanceof File?(o=URL.createObjectURL(t),f=I(t.name),c=C(t.name)):t instanceof Blob?(o=URL.createObjectURL(t),c=C(t)):R(t)?(o=t,c=C(t)):(t.includes("https")||t.includes("http"))&&(o=t,f=I(t),c=C(t)),(f?O.videoAllowType.includes(f.toLowerCase()):!1)?i?b(o,n):(u=await de({url:o,fileType:c}),u.play?b(o,n):new Promise(a=>{a("")})):new Promise(a=>{a("")})}async function b(e,t=0){return new Promise(n=>{let r=document.createElement("video");r&&(r.controls=!0,r.muted=!0,r.setAttribute("src",e),r.setAttribute("muted",String(!0)),r.setAttribute("crossorigin","anonymous"),r.setAttribute("autoplay",String(!0)),r.addEventListener("loadeddata",async()=>{let i;for(r?.addEventListener("seeked",async()=>{i&&i()});t<(r?.duration||0);){r&&(r.currentTime=t),await new Promise(T=>i=T);const o=document.createElement("canvas"),f=.8,c=o.getContext("2d"),u=r?.videoWidth||0*f,s=r?.videoHeight||0*f,a=0;o.width=r?.videoWidth||0*f,o.height=r?.videoHeight||0*f,r&&c.drawImage(r,0,0,u+a,s+a),r=null,n(u===0||s===0?"":o.toDataURL("image/png",1))}}))})}function R(e=""){return!!(e&&["data:image/","data:video/","data:audio/"].find(n=>e.includes(n)))}function rt(e){return typeof e=="string"&&/^data:(?:image|video|audio)\/[A-Za-z]+;base64,[A-Za-z0-9+/=]+$/.test(e)}function it(e,t,n,r=!1){e&&t&&n&&e.addEventListener(t,n,r)}function ot(e,t,n,r=!1){e&&t&&n&&e.removeEventListener(t,n,r)}function ct(){return/windows|win32/i.test(navigator.userAgent)}function ft(e){return m(e)?e:!!e}function $(e,t){const n=`^\\d+(?:\\.\\d{0,${e}})?`,r=new RegExp(n),i=t.toString().match(r);if(i){const o=i[0];if(o.includes(".")){const[f,c]=o.split(".");if(/^0*$/.test(c))return f}return o}return t.toString()}function lt(e,t){const{toChinese:n=!1,fixed:r=2,min:i=1e4}=t||{},o=y(i)?i:1e4,f=y(r)?r:2,c=n?e<o?"":e<1e8?"万":"亿":e<o?"":e<1e8?"w":"亿";if(!y(e))return{str:`${e}`,number:`${e}`};if(e<o)return{str:`${e}`,number:`${e}`};if(f===0){const s=(e/(e<1e8?1e4:1e8)).toFixed(1).split(".")[0];return{str:`${s}${c}`,number:s,unit:c}}let u;return e<1e8?(u=$(f,e/1e4),{str:u+c,number:u,unit:c}):(u=$(f,e/1e8),{str:u+c,number:u,unit:c})}function ut(e,t){let n=0;const r=m(t.removeAfter)?t.removeAfter:!0,i=t.id||"hiddenElement",o={opacity:0,visibility:"hidden",position:"fixed",zIndex:-1,top:0,left:0};let f=document.querySelector(`#${i}`);if(!f){const u=document.createElement("div");u.id=i,document.body.appendChild(u),f=document.querySelector(`#${i}`)}Object.assign(f.style,o);const c=document.createElement(t.createName||"span");return c.innerHTML=e,(t.cssObject||g(t.cssObject))&&Object.assign(c.style,t.cssObject),f.append(c),n=c.getBoundingClientRect()[t.type||"width"],r&&f.removeChild(c),n}function st(e){e=y(e)&&!Number.isNaN(e)?e:0;const t=["零","一","二","三","四","五","六","七","八","九"],n=["","十","百","千","万"];e=Number.parseInt(`${e}`);const r=f=>{const c=f.toString().split("").reverse();let u="";for(let s=0;s<c.length;s++)u=(s===0&&c[s]==="0"||s>0&&c[s]==="0"&&c[s-1]==="0"?"":(e<20&&s>0?"":t[c[s]])+(c[s]==="0"?n[0]:n[s]))+u;return u},i=Math.floor(e/1e4);let o=e%1e4;return o.toString().length<4&&(o="0"+o),i?r(i)+"万"+r(o):r(e)}function at(e,t){Object.keys(e).forEach(n=>{t(n,e[n])})}l.Base64=he,l.arrayRepeat=Je,l.arraySlice=qe,l.blobToDataURL=tt,l.checkFileType=C,l.classNames=q,l.cloneDeep=A,l.compareArray=ie,l.compareArraySort=xe,l.compareArrayTimeSort=He,l.compareTime=oe,l.convertValueBoolean=ft,l.copyProperties=w,l.dataURLtoBlob=je,l.dataURLtoFile=et,l.deepCopy=_e,l.deepMerge=v,l.fileTypes=O,l.filterEmpty=M,l.filterTree=ue,l.findSourceByTree=se,l.findValueAndAncestors=Ye,l.forInObject=at,l.formatDuration=Xe,l.formatNumber=$,l.genColumnKey=Ve,l.generateVideoPicture=b,l.getArrayLast=Qe,l.getBase64=Ke,l.getBlobUrl=ke,l.getFileSuffix=I,l.getLevelData=le,l.getMaxFloor=fe,l.getMediaInfos=de,l.getPrefixCls=Me,l.getRandomNumber=ce,l.getScroll=H,l.getScrollContainer=we,l.getSlot=ne,l.getSlotVNode=re,l.getSlotsChildren=Fe,l.getSlotsProps=De,l.getSortIndex=ze,l.getSymbols=Y,l.getTextWidth=ut,l.getValueFromObjectByKey=N,l.getVideoCoverPicture=nt,l.getVideoFileUrl=ae,l.handleCurrentPage=We,l.handleEmptyField=Ze,l.handleShowIndex=be,l.is=_,l.isArray=h,l.isBase64=R,l.isBoolean=m,l.isBrowser=Te,l.isDataURLBase64=rt,l.isDeepEqualReact=U,l.isEmptyElement=te,l.isFunction=ye,l.isImg=Ee,l.isInContainer=Se,l.isJSONStr=ge,l.isMobile=me,l.isNil=K,l.isNotNil=Le,l.isNumber=y,l.isObject=g,l.isPlainObject=D,l.isPrimitive=Q,l.isScroll=x,l.isServer=S,l.isString=W,l.isTablet=z,l.isTypedArray=k,l.isUrl=Ue,l.isWindowsOs=ct,l.merge=Ie,l.nanoid=Re,l.off=ot,l.omitBoolean=Ne,l.omitUndefined=Be,l.omitUndefinedAndEmptyArr=Pe,l.on=it,l.raf=E,l.runFunction=$e,l.scrollTo=ve,l.slotRender=V,l.throttleByAnimationFrame=Oe,l.toChinesNum=st,l.toConvertNumberShow=lt,l.treeData=Ge,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})}));
|
|
12
|
+
(function(l,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],d):(l=typeof globalThis<"u"?globalThis:l||self,d(l.GPorUtils={},l.vue))})(this,(function(l,d){"use strict";class ge{constructor(){this._keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}_utf8_encode(t){t=t.replace(/\r\n/g,`
|
|
13
|
+
`);let n="";for(let r=0;r<t.length;r++){const i=t.charCodeAt(r);i<128?n+=String.fromCharCode(i):i>127&&i<2048?(n+=String.fromCharCode(i>>6|192),n+=String.fromCharCode(i&63|128)):(n+=String.fromCharCode(i>>12|224),n+=String.fromCharCode(i>>6&63|128),n+=String.fromCharCode(i&63|128))}return n}_utf8_decode(t){let n="",r=0,i=0,o=0,c=0;for(;r<t.length;)i=t.charCodeAt(r),i<128?(n+=String.fromCharCode(i),r++):i>191&&i<224?(o=t.charCodeAt(r+1),n+=String.fromCharCode((i&31)<<6|o&63),r+=2):(o=t.charCodeAt(r+1),c=t.charCodeAt(r+2),n+=String.fromCharCode((i&15)<<12|(o&63)<<6|c&63),r+=3);return n}encode(t){let n="",r,i,o,c,f,u,s,a=0;for(t=this._utf8_encode(t);a<t.length;)r=t.charCodeAt(a++),i=t.charCodeAt(a++),o=t.charCodeAt(a++),c=r>>2,f=(r&3)<<4|i>>4,u=(i&15)<<2|o>>6,s=o&63,Number.isNaN(i)?u=s=64:Number.isNaN(o)&&(s=64),n=n+this._keyStr.charAt(c)+this._keyStr.charAt(f)+this._keyStr.charAt(u)+this._keyStr.charAt(s);return n}decode(t){let n="",r,i,o,c,f,u,s,a=0;for(t=t.replace(/[^A-Z0-9+/=]/gi,"");a<t.length;)c=this._keyStr.indexOf(t.charAt(a++)),f=this._keyStr.indexOf(t.charAt(a++)),u=this._keyStr.indexOf(t.charAt(a++)),s=this._keyStr.indexOf(t.charAt(a++)),r=c<<2|f>>4,i=(f&15)<<4|u>>2,o=(u&3)<<6|s,n=n+String.fromCharCode(r),u!==64&&(n=n+String.fromCharCode(i)),s!==64&&(n=n+String.fromCharCode(o));return n=this._utf8_decode(n),n}}function _(e,t){return Object.prototype.toString.call(e)===`[object ${t}]`}function m(e){return typeof e=="boolean"}function g(e){return typeof e=="number"}function y(e){return typeof Array.isArray>"u"?Object.prototype.toString.call(e)==="[object Array]":Array.isArray(e)}function h(e){return e!==null&&_(e,"Object")}function W(e){return typeof e=="string"||e instanceof String}function he(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Function]"}function me(e){if(typeof e!="string")return!1;try{const t=JSON.parse(e);return typeof t=="object"&&t!==null}catch{return!1}}function pe(){const e=navigator.userAgent||navigator.vendor;return!!(/iPhone/.test(e)||/Android/.test(e)&&/Mobile/.test(e)||/Windows Phone/.test(e)||/Mobile/.test(e)&&!z())}function z(){const e=navigator.userAgent||navigator.vendor;return!!(/iPad/.test(e)||/Macintosh/.test(e)&&"ontouchend"in document||/Android/.test(e)&&!/Mobile/.test(e))}function q(...e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];if(r){if(W(r))t.push(r);else if(y(r))for(let i=0;i<r.length;i++){const o=q(r[i]);o&&t.push(o)}else if(h(r))for(const i in r)r[i]&&t.push(i)}}return t.filter(n=>n).join(" ")}function B(e,t){if(typeof t!="string"&&!Array.isArray(t))return;const n=Array.isArray(t)?t:t.split(":");let r=e;for(let i=0;i<n.length;i++)if(r&&Object.prototype.hasOwnProperty.call(r,n[i]))r=r[n[i]];else return;return r}const A=typeof window>"u";function we(e){return e.replace(/[-_](.)/g,(t,n)=>n.toUpperCase())}const P=function(e,t){if(A||!e||!t)return"";t=we(t),t==="float"&&(t="cssFloat");try{const n=e.style[t];if(n)return n;const r=document?.defaultView?.getComputedStyle(e,"");return r?r[t]:""}catch{return e.style[t]}},x=(e,t)=>A?void 0:(t==null?P(e,"overflow"):t?P(e,"overflow-y"):P(e,"overflow-x")).match(/(scroll|auto|overlay)/),Ae=(e,t)=>{if(A)return;let n=e;for(;n;){if([window,document,document.documentElement].includes(n))return window;if(x(n,t))return n;n=n.parentNode}return n},Se=(e,t)=>{if(A||!e||!t)return!1;const n=e.getBoundingClientRect();let r;return[window,document,document.documentElement,null,void 0].includes(t)?r={top:0,right:window.innerWidth,bottom:window.innerHeight,left:0}:r=t.getBoundingClientRect(),n.top<r.bottom&&n.bottom>r.top&&n.right>r.left&&n.left<r.right};function F(e){return e!=null&&e===e.window}function H(e,t){if(typeof window>"u")return 0;const n=t?"scrollTop":"scrollLeft";let r=0;return F(e)?r=e[t?"pageYOffset":"pageXOffset"]:e instanceof Document?r=e.documentElement[n]:e&&(r=e[n]),e&&!F(e)&&typeof r!="number"&&(r=(e.ownerDocument||e).documentElement?.[n]),r}let J=e=>setTimeout(e,16),Z=e=>clearTimeout(e);typeof window<"u"&&"requestAnimationFrame"in window&&(J=e=>window.requestAnimationFrame(e),Z=e=>window.cancelAnimationFrame(e));let X=0;const D=new Map;function G(e){D.delete(e)}function U(e,t=1){X+=1;const n=X;function r(i){if(i===0)G(n),e();else{const o=J(()=>{r(i-1)});D.set(n,o)}}return r(t),n}U.cancel=e=>{const t=D.get(e);return G(t),Z(t)};function ve(e,t,n,r){const i=n-t;return e/=r/2,e<1?i/2*e*e*e+t:i/2*((e-=2)*e*e+2)+t}function Oe(e,t={}){const{getContainer:n=()=>window,callback:r,duration:i=450}=t,o=n(),c=H(o,!0),f=Date.now(),u=()=>{const a=Date.now()-f,T=ve(a>i?i:a,c,e,i);F(o)?o.scrollTo(window.pageXOffset,T):o instanceof HTMLDocument||o.constructor.name==="HTMLDocument"?o.documentElement.scrollTop=T:o.scrollTop=T,a<i?U(u):typeof r=="function"&&r()};o&&U(u)}function Ce(e){let t;const n=i=>()=>{t=null,e(...i)},r=(...i)=>{t==null&&(t=requestAnimationFrame(n(i)))};return r.cancel=()=>cancelAnimationFrame(t),r}function Y(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function Q(e){return e==null||typeof e!="object"&&typeof e!="function"}function k(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function S(e){return p(e)}function p(e,t=new Map){if(Q(e))return e;if(t.has(e))return t.get(e);if(Array.isArray(e)){const n=Array.from({length:e.length});t.set(e,n);for(let r=0;r<e.length;r++)n[r]=p(e[r],t);return Object.prototype.hasOwnProperty.call(e,"index")&&(n.index=e.index),Object.prototype.hasOwnProperty.call(e,"input")&&(n.input=e.input),n}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const n=new RegExp(e.source,e.flags);return n.lastIndex=e.lastIndex,n}if(e instanceof Map){const n=new Map;t.set(e,n);for(const[r,i]of e)n.set(r,p(i,t));return n}if(e instanceof Set){const n=new Set;t.set(e,n);for(const r of e)n.add(p(r,t));return n}if(typeof Buffer<"u"&&Buffer.isBuffer(e))return e.subarray();if(k(e)){const n=new(Object.getPrototypeOf(e)).constructor(e.length);t.set(e,n);for(let r=0;r<e.length;r++)n[r]=p(e[r],t);return n}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const n=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return t.set(e,n),w(n,e,t),n}if(typeof File<"u"&&e instanceof File){const n=new File([e],e.name,{type:e.type});return t.set(e,n),w(n,e,t),n}if(e instanceof Blob){const n=new Blob([e],{type:e.type});return t.set(e,n),w(n,e,t),n}if(e instanceof Error){const n=new e.constructor;return t.set(e,n),n.message=e.message,n.name=e.name,n.stack=e.stack,n.cause=e.cause,w(n,e,t),n}if(typeof e=="object"&&e!==null){const n={};return t.set(e,n),w(n,e,t),n}return e}function w(e,t,n){const r=[...Object.keys(t),...Y(t)];for(let i=0;i<r.length;i++){const o=r[i],c=Object.getOwnPropertyDescriptor(e,o);(c==null||c.writable)&&(e[o]=p(t[o],n))}}const Te=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,Ue=()=>process.env.NODE_ENV==="TEST"?!0:typeof window<"u"&&typeof window.document<"u"&&typeof window.matchMedia<"u"&&!Te;function I(e,t,n,r){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let i,o,c;if(Array.isArray(e)){if(i=e.length,i!=t.length)return!1;for(o=i;o--!==0;)if(!I(e[o],t[o],n,r))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o of e.entries())if(!t.has(o[0]))return!1;for(o of e.entries())if(!I(o[1],t.get(o[0]),n,r))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o of e.entries())if(!t.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(i=e.length,i!=t.length)return!1;for(o=i;o--!==0;)if(e[o]!==t[o])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(c=Object.keys(e),i=c.length,i!==Object.keys(t).length)return!1;for(o=i;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,c[o]))return!1;for(o=i;o--!==0;){const f=c[o];if(!n?.includes(f)&&!(f==="_owner"&&e.$$typeof)&&!I(e[f],t[f],n,r))return r&&console.log(f),!1}return!0}return e!==e&&t!==t}function Ie(e){return/\w.(?:png|jpg|jpeg|svg|webp|gif|bmp)$/i.test(e)}const K=e=>e==null,Re=e=>{if(!e||!e.startsWith("http"))return!1;try{return!!new URL(e)}catch(t){return console.error("isUrl error",t),!1}};function L(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 Ee=(...e)=>{const t={},n=e.length;let r,i=0;for(;i<n;i+=1)for(r in e[i])Object.prototype.hasOwnProperty.call(e[i],r)&&(typeof t[r]=="object"&&typeof e[i][r]=="object"&&t[r]!==void 0&&t[r]!==null&&!Array.isArray(t[r])&&!Array.isArray(e[i][r])?t[r]={...t[r],...e[i][r]}:t[r]=e[i][r]);return t};function v(e,t,n){const r=m(n?.omitNil)?n?.omitNil:!0,i=m(n?.omitEmpty)?n?.omitEmpty:!0,o=Object.keys(t);for(let c=0;c<o.length;c++){const f=o[c],u=t[f],s=e[f];Array.isArray(u)?Array.isArray(s)?u.length===0&&!i?e[f]=u:e[f]=v(s,u,n):e[f]=v([],u,n):L(u)?L(s)?Object.keys(u).length===0&&!i?e[f]=u:e[f]=v(s,u,n):e[f]=v({},u,n):r?(s===void 0||!K(u))&&(e[f]=u):e[f]=u}return e}let j=0;const ee=(e=21)=>{if(typeof window>"u"||!window.crypto)return(j+=1).toFixed(0);let t="";const n=crypto.getRandomValues(new Uint8Array(e));for(;e--;){const r=63&n[e];t+=r<36?r.toString(36):r<62?(r-26).toString(36).toUpperCase():r<63?"_":"-"}return t},Ne=()=>typeof window>"u"?ee():window.crypto&&window.crypto.randomUUID&&typeof crypto.randomUUID=="function"?crypto.randomUUID():ee(),Be=e=>{if(e&&e!==!0)return e},Pe=e=>{const t={};if(Object.keys(e||{}).forEach(n=>{e[n]!==void 0&&(t[n]=e[n])}),!(Object.keys(t).length<1))return t},Fe=e=>{const t={};return Object.keys(e||{}).forEach(n=>{Array.isArray(e[n])&&e[n]?.length===0||e[n]!==void 0&&(t[n]=e[n])}),t},te=e=>e!=null&&e!=="";function V(e){if(!(typeof e!="string"&&!Array.isArray(e)))return Array.isArray(e)?e[e.length-1]:e.split(":")?.slice(-1)[0]}function ne(e){return e&&(e.type===d.Comment||e.type===d.Fragment&&e.children.length===0||e.type===Text&&e.children.trim()==="")}function De(e,t){return R(e[t]?.())}function R(e=[],t=!0){const n=Array.isArray(e)?e:[e],r=[];return n.forEach(i=>{Array.isArray(i)?r.push(...R(i,t)):i?.type===d.Fragment||i?.type==="template"?r.push(...R(i.children,t)):i&&d.isVNode(i)?t&&!ne(i)?r.push(i):t||r.push(i):te(i)&&r.push(i)}),r}function M(e,...t){return typeof e=="function"?e?.(...t):e}function re(e,t,n="default",r){const i=V(n);if(i){let o;const c=B(t,n);return c===!1?o=!1:c===!0?o=e?.[i]:h(c)&&r?d.isVNode(c)?o=c:o=e?.[i]:o=c||e?.[i],r?d.isVNode(o)?o:M(o):o}}function ie(e,t,n="default",r){const i=V(n);if(i){let o;const c=B(t,n);return c===!1?o=!1:c===!0?o=e?.[i]?.(r):h(c)?d.isVNode(c)?o=c:o=e?.[i]?.(r):o=c||e?.[i]?.(r),d.isVNode(o)?o:M(o,r)}}function Le(e,t,n,r){const i={};return e.forEach(o=>{const c=V(o);if(c){const f=r?.render?ie(t,n,o,r?.params):re(t,n,o);(m(f)||f)&&(i[c]=f)}}),i}const O={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"]};function Ve(e){return e!=null}const Me=({suffixCls:e,customizePrefixCls:t,isPor:n,className:r})=>{const i=r||(n?"gx-pro":"gx");return t||(e?`${i}-${e}`:i)},be=(e,t)=>e?y(e)?e.join("-"):e.toString():`${t||0}`;function $e(e,{align:t,showIndex:n}){const r=S(e);if(n&&e.length&&e.every(i=>i.dataIndex!=="sortIndex")){const i=e[0];r.unshift({title:"序号",align:t,fixed:i.fixed,width:60,uuid:ce().uuid(15),dataIndex:"sortIndex",key:"sortIndex"})}else r.filter(i=>i.dataIndex!=="sortIndex");return r}function _e(e,...t){return typeof e=="function"?e(...t):e}function We(e){return JSON.parse(JSON.stringify(e))}function ze(e,t){if(h(e)){const{pageSize:n=10,total:r=0}=e;let{current:i=1}=e;return r-t<=n*(i-1)&&(i=i-1),i===0?1:i}return 1}function qe(e=[],t,n="children"){function r(i,o){return o.map((c,f)=>{const u=`${i}-${f+1}`;return c[n]&&(c[n]=r(u,c[n])),c.sortIndex=u,c})}return S(e).map((i,o)=>{const c=h(t)&&t.current||1,f=h(t)&&t.pageSize||10,u=`${(c-1)*f+(o+1)}`;return i[n]&&(i[n]=r(`${u}`,i[n])),i.sortIndex=u,i})}function xe(e,t){return y(e)?e?.filter((n,r)=>{if(g(t))return r<=t-1;if(y(t)&&t.length===2){const i=t[0]-1,o=t[1]?t[1]-1:e.length-1;return r<=o&&r>=i}else if(y(t)&&t.length===1){const i=t[0]-1,o=e.length-1;return r<=o&&r>=i}return!0}):[]}function oe(e,t,n,r=0){const i=g(r)&&(r===0||r===1)?r:0,o=e[n],c=t[n];let f=0;return o<c?f=i===0?-1:0:o>c&&(f=i===0?0:-1),f}function fe(e,t,n,r=0){const i=g(r)&&(r===0||r===1)?r:0,o=new Date(e[n]),c=new Date(t[n]);let f=0;return o<c?f=i===0?-1:0:o>c&&(f=i===0?0:-1),f}function He(e,t,n=0){return e.sort((r,i)=>oe(r,i,t,n))}function Je(e,t,n=0){return e.sort((r,i)=>fe(r,i,t,n))}function Ze(e){let t=S(e);const n=new Set(t);return t=Array.from(n),t}function Xe(e,t){const n=["null","undefined"];let r=!0;return e===0?r=!0:n.includes(e)?r=!1:e||(r=!1),r?{value:e,success:r}:{value:t===""?t:t||"-",success:r}}function Ge(e){let t="";if(e>-1){const n=Math.floor(e/3600),r=Math.floor(e/60)%60,i=Number.parseInt(String(e%60));n<10?t="0"+n+":":t=n+":",r<10&&(t+="0"),t+=r+":",i<10&&(t+="0"),t+=i}return t.split(":")[0]==="00"?`${t.split(":")[1]}:${t.split(":")[2]}`:t}function ce(){const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");return{uuid(t,n){const r=e,i=[],o=n||r.length;let c,f;if(t)for(c=0;c<t;c+=1)i[c]=r[Number.parseInt(String(Math.random()*o))];else for(i[8]="-",i[13]="-",i[18]="-",i[23]="-",i[14]="4",c=0;c<36;c+=1)i[c]||(f=Math.random()*16,i[c]=r[c===19?f&&3||8:f]);return i.join("")},uuidFast(){const t=e,n=Array.from({length:36});let r=0,i,o;for(o=0;o<36;o+=1)o===8||o===13||o===18||o===23?n[o]="-":o===14?n[o]="4":(r<=2&&(r=33554432+Math.random()*16777216||0),i=r&&15,r=r>4,n[o]=t[o===19?i&&3||8:i]);return n.join("")},uuidString(){return this.uuidFast().replace(new RegExp("-","g"),"")},uuidCompact(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=Math.random()*16||0;return(t==="x"?n:n&&3||8).toString(16)})}}}function le(e,t){if(!Array.isArray(e)||e.length===0)return 0;const n=t||"children";return Math.max(...e.map(r=>{const i=r[n];return 1+(i?le(i,n):0)}))}function ue(e,t="children"){let n=[];return e.forEach(r=>{n.push(r),y(r[t])&&r[t].length>0&&(n=n.concat(ue(r[t],t)))}),n}function Ye(e,t){if(!e||!y(e)||e?.length===0)return[];const{id:n="id",parentId:r="parentId",children:i="children",emptyChildren:o=!0}=t||{},c=t?.rootId??0,f=S(e);return f.map(u=>(!o&&u[i]&&u[i]?.length===0&&delete u[i],u)).filter(u=>{const s=f.filter(a=>u[n]===a[r]);return s.length>0?u[i]=s:o&&(u[i]=[]),c===!1?!0:u[r]===c})}function se(e,t){return e.map(n=>{const r={...n};return r.children&&(r.children=se(r.children,t)),t(r)||r.children&&r.children.length>0?r:null}).filter(Boolean)}function Qe(e,t,n){const{value:r,children:i}=n||{value:"value",children:"children"};let o=[];function c(f,u){if(f[r]===t)return o=[...u,f[r]],!0;if(f[i]){for(const s of f[i])if(c(s,[...u,f[r]]))return!0}return!1}for(const f of e)if(c(f,[]))break;return o}function ke(e){return e&&y(e)?e[e.length-1]:null}function ae(e,t,n){const r=n?.value||"id",i=n?.children||"children";for(const o of e){if(o[r]===t)return o;const c=o[i];if(c){const f=ae(c,t,n);if(f)return f}}}function Ke(e){return URL.createObjectURL(e)}function je(e){return new Promise((t,n)=>{const r=new FileReader;r.readAsDataURL(e),r.onload=()=>t(r.result),r.onerror=i=>n(i)})}function et(e){const t=e.split(","),n=t[0].match(/:(.*?);/)[1],r=atob(t[1]);let i=r.length;const o=new Uint8Array(i);for(;i--;)o[i]=r.charCodeAt(i);return new Blob([o],{type:n})}function tt(e,t){const n=e.split(","),r=n[0].match(/:(.*?);/)[1],i=atob(n[1]);let o=i.length;const c=new Uint8Array(o);for(;o--;)c[o]=i.charCodeAt(o);return new File([c],t,{type:r})}function nt(e,t,n){return new window.File([e],t,{type:n})}function de(e){if(!e||typeof e!="string")return"";const t=e.indexOf("?");return t>0?`${e.substring(0,t)}`:e}function E(e){if(!e||typeof e!="string")return"";const t=de(e),n=t.lastIndexOf(".");return n>0&&`${t?.substring?.(n)?.split("?")?.[0]}`?.split(".")?.[1]||""}function C(e,t){if(t)return t;if(!e||e==="data:")return"4";let n="4";return N(e)?e.includes("data:image/")?n="png":e.includes("data:video/")?n="mp4":e.includes("data:audio/")&&(n="mp3"):e instanceof Blob?(e=String(e),e.includes("image")?n="png":e.includes("video")?n="mp4":e.includes("audio")&&(n="mp3")):n=E(e).toLowerCase(),O.imageType.includes(n)?"1":O.videoType.includes(n)?"3":O.audioType.includes(n)?"2":"4"}function ye(e){const{url:t="",fileType:n="1"}=e||{};let r="",i={play:!1,height:0,size:0,width:0,duration:0};function o(){i={play:!1,height:0,size:0,width:0,duration:0}}return t instanceof File?r=URL.createObjectURL(t):N(t)?r=t:t instanceof Blob?r=URL.createObjectURL(t):(t.includes("https")||t.includes("http"))&&(r=t),new Promise(c=>{let f;if(n==="4"){c(i);return}n==="1"?(f=document.createElement("img"),f.src=r):n==="2"?(f=document.createElement("audio"),f.src=r):n==="3"&&(f=document.createElement("video"),f.src=r),n==="1"?f.onload=function(){o(),i.play=!0,i.width=f.width||0,i.height=f.height||0,c(i),f=null}:f.oncanplay=function(){o(),i.play=!0,i.width=f?.videoWidth||0,i.height=f?.videoHeight||0,i.duration=f?.duration||0,c(i),f=null},f.onerror=function(){o(),c(i),f=null}})}async function rt(e){const{url:t="",currentTime:n,videoSuffix:r="",videoAllowPlay:i=!1}=e;let o="",c=r,f="1",u;return t instanceof File?(o=URL.createObjectURL(t),c=E(t.name),f=C(t.name)):t instanceof Blob?(o=URL.createObjectURL(t),f=C(t)):N(t)?(o=t,f=C(t)):(t.includes("https")||t.includes("http"))&&(o=t,c=E(t),f=C(t)),(c?O.videoAllowType.includes(c.toLowerCase()):!1)?i?b(o,n):(u=await ye({url:o,fileType:f}),u.play?b(o,n):new Promise(a=>{a("")})):new Promise(a=>{a("")})}async function b(e,t=0){return new Promise(n=>{let r=document.createElement("video");r&&(r.controls=!0,r.muted=!0,r.setAttribute("src",e),r.setAttribute("muted",String(!0)),r.setAttribute("crossorigin","anonymous"),r.setAttribute("autoplay",String(!0)),r.addEventListener("loadeddata",async()=>{let i;for(r?.addEventListener("seeked",async()=>{i&&i()});t<(r?.duration||0);){r&&(r.currentTime=t),await new Promise(T=>i=T);const o=document.createElement("canvas"),c=.8,f=o.getContext("2d"),u=r?.videoWidth||0*c,s=r?.videoHeight||0*c,a=0;o.width=r?.videoWidth||0*c,o.height=r?.videoHeight||0*c,r&&f.drawImage(r,0,0,u+a,s+a),r=null,n(u===0||s===0?"":o.toDataURL("image/png",1))}}))})}function N(e=""){return!!(e&&["data:image/","data:video/","data:audio/"].find(n=>e.includes(n)))}function it(e){return typeof e=="string"&&/^data:(?:image|video|audio)\/[A-Za-z]+;base64,[A-Za-z0-9+/=]+$/.test(e)}function ot(e,t,n,r=!1){e&&t&&n&&e.addEventListener(t,n,r)}function ft(e,t,n,r=!1){e&&t&&n&&e.removeEventListener(t,n,r)}function ct(){return/windows|win32/i.test(navigator.userAgent)}function lt(e){return m(e)?e:!!e}function $(e,t){const n=`^\\d+(?:\\.\\d{0,${e}})?`,r=new RegExp(n),i=t.toString().match(r);if(i){const o=i[0];if(o.includes(".")){const[c,f]=o.split(".");if(/^0*$/.test(f))return c}return o}return t.toString()}function ut(e,t){const{toChinese:n=!1,fixed:r=2,min:i=1e4}=t||{},o=g(i)?i:1e4,c=g(r)?r:2,f=n?e<o?"":e<1e8?"万":"亿":e<o?"":e<1e8?"w":"亿";if(!g(e))return{str:`${e}`,number:`${e}`};if(e<o)return{str:`${e}`,number:`${e}`};if(c===0){const s=(e/(e<1e8?1e4:1e8)).toFixed(1).split(".")[0];return{str:`${s}${f}`,number:s,unit:f}}let u;return e<1e8?(u=$(c,e/1e4),{str:u+f,number:u,unit:f}):(u=$(c,e/1e8),{str:u+f,number:u,unit:f})}function st(e,t){let n=0;const r=m(t.removeAfter)?t.removeAfter:!0,i=t.id||"hiddenElement",o={opacity:0,visibility:"hidden",position:"fixed",zIndex:-1,top:0,left:0};let c=document.querySelector(`#${i}`);if(!c){const u=document.createElement("div");u.id=i,document.body.appendChild(u),c=document.querySelector(`#${i}`)}Object.assign(c.style,o);const f=document.createElement(t.createName||"span");return f.innerHTML=e,(t.cssObject||h(t.cssObject))&&Object.assign(f.style,t.cssObject),c.append(f),n=f.getBoundingClientRect()[t.type||"width"],r&&c.removeChild(f),n}function at(e){e=g(e)&&!Number.isNaN(e)?e:0;const t=["零","一","二","三","四","五","六","七","八","九"],n=["","十","百","千","万"];e=Number.parseInt(`${e}`);const r=c=>{const f=c.toString().split("").reverse();let u="";for(let s=0;s<f.length;s++)u=(s===0&&f[s]==="0"||s>0&&f[s]==="0"&&f[s-1]==="0"?"":(e<20&&s>0?"":t[f[s]])+(f[s]==="0"?n[0]:n[s]))+u;return u},i=Math.floor(e/1e4);let o=e%1e4;return o.toString().length<4&&(o="0"+o),i?r(i)+"万"+r(o):r(e)}function dt(e,t){Object.keys(e).forEach(n=>{t(n,e[n])})}l.Base64=ge,l.arrayRepeat=Ze,l.arraySlice=xe,l.blobToDataURL=nt,l.checkFileType=C,l.classNames=q,l.cloneDeep=S,l.compareArray=oe,l.compareArraySort=He,l.compareArrayTimeSort=Je,l.compareTime=fe,l.convertValueBoolean=lt,l.copyProperties=w,l.dataURLtoBlob=et,l.dataURLtoFile=tt,l.deepCopy=We,l.deepMerge=v,l.fileTypes=O,l.filterEmpty=R,l.filterTree=se,l.findSourceByTree=ae,l.findValueAndAncestors=Qe,l.forInObject=dt,l.formatDuration=Ge,l.formatNumber=$,l.genColumnKey=be,l.generateVideoPicture=b,l.getArrayLast=ke,l.getBase64=je,l.getBlobUrl=Ke,l.getFileSuffix=E,l.getLevelData=ue,l.getMaxFloor=le,l.getMediaInfos=ye,l.getPrefixCls=Me,l.getRandomNumber=ce,l.getScroll=H,l.getScrollContainer=Ae,l.getSlot=re,l.getSlotVNode=ie,l.getSlotsChildren=De,l.getSlotsProps=Le,l.getSortIndex=qe,l.getSymbols=Y,l.getTextWidth=st,l.getValueFromObjectByKey=B,l.getVideoCoverPicture=rt,l.getVideoFileUrl=de,l.handleCurrentPage=ze,l.handleEmptyField=Xe,l.handleShowIndex=$e,l.is=_,l.isArray=y,l.isBase64=N,l.isBoolean=m,l.isBrowser=Ue,l.isDataURLBase64=it,l.isDeepEqualReact=I,l.isEmptyElement=ne,l.isFunction=he,l.isImg=Ie,l.isInContainer=Se,l.isJSONStr=me,l.isMobile=pe,l.isNil=K,l.isNotNil=Ve,l.isNumber=g,l.isObject=h,l.isPlainObject=L,l.isPrimitive=Q,l.isScroll=x,l.isServer=A,l.isString=W,l.isTablet=z,l.isTypedArray=k,l.isUrl=Re,l.isValid=te,l.isWindowsOs=ct,l.merge=Ee,l.nanoid=Ne,l.off=ft,l.omitBoolean=Be,l.omitUndefined=Pe,l.omitUndefinedAndEmptyArr=Fe,l.on=ot,l.raf=U,l.runFunction=_e,l.scrollTo=Oe,l.slotRender=M,l.throttleByAnimationFrame=Ce,l.toChinesNum=at,l.toConvertNumberShow=ut,l.treeData=Ye,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})}));
|
package/dist/slots/index.d.ts
CHANGED
|
@@ -1,26 +1,24 @@
|
|
|
1
1
|
import type { VNode } from 'vue';
|
|
2
|
-
import type { CustomRender, WithFalse } from '../typings';
|
|
3
2
|
export declare function isEmptyElement(c: any): any;
|
|
4
3
|
export declare function getSlotsChildren<T extends Readonly<Record<string, any>>>(slots: T, key: keyof T): VNode[];
|
|
5
|
-
export declare function filterEmpty(children?:
|
|
4
|
+
export declare function filterEmpty(children?: any[], isEmpty?: boolean): VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
6
5
|
[key: string]: any;
|
|
7
6
|
}>[];
|
|
8
|
-
export declare function slotRender(slot:
|
|
7
|
+
export declare function slotRender(slot: Record<string, any>, ...arg: any): any;
|
|
9
8
|
/**
|
|
10
9
|
* @Author gx12358
|
|
11
10
|
* @DateTime 2024/2/2
|
|
12
11
|
* @lastTime 2024/2/2
|
|
13
|
-
* @description () => CustomRender
|
|
12
|
+
* @description Function () => CustomRender
|
|
14
13
|
*/
|
|
15
|
-
export declare function getSlot<T = undefined>(slots: Readonly<Record<string, any>>, props: Record<string, unknown>, keys
|
|
16
|
-
export declare function getSlot<T = undefined>(slots: Readonly<Record<string, any>>, props: Record<string, unknown>, keys: string | string[], render?: true): VNode;
|
|
14
|
+
export declare function getSlot<T = undefined>(slots: Readonly<Record<string, any>>, props: Record<string, unknown>, keys?: string | string[], render?: boolean): T extends undefined ? any : T;
|
|
17
15
|
/**
|
|
18
16
|
* @Author gx12358
|
|
19
17
|
* @DateTime 2024/2/2
|
|
20
18
|
* @lastTime 2024/2/2
|
|
21
|
-
* @description
|
|
19
|
+
* @description VNode
|
|
22
20
|
*/
|
|
23
|
-
export declare function getSlotVNode<T = undefined>(slots: Readonly<Record<string, any>>, props: Record<string, unknown>, keys
|
|
21
|
+
export declare function getSlotVNode<T = undefined>(slots: Readonly<Record<string, any>>, props: Record<string, unknown>, keys?: string | string[], options?: any): T extends undefined ? any : T;
|
|
24
22
|
/**
|
|
25
23
|
* @Author gx12358
|
|
26
24
|
* @DateTime 2024/10/13
|
|
@@ -28,10 +26,6 @@ export declare function getSlotVNode<T = undefined>(slots: Readonly<Record<strin
|
|
|
28
26
|
* @description 获取names的slots或者props的VNode
|
|
29
27
|
*/
|
|
30
28
|
export declare function getSlotsProps<T extends string, K = undefined>(names: T[], slots: Readonly<Record<string, any>>, props: Record<string, unknown>, options?: {
|
|
31
|
-
render?:
|
|
29
|
+
render?: boolean;
|
|
32
30
|
params?: any;
|
|
33
31
|
}): K extends undefined ? Record<T, any> : K;
|
|
34
|
-
export declare function getSlotsProps<T extends string, K = undefined>(names: T[], slots: Readonly<Record<string, any>>, props: Record<string, unknown>, options?: {
|
|
35
|
-
render?: true;
|
|
36
|
-
params?: any;
|
|
37
|
-
}): K extends undefined ? Record<T, WithFalse<VNode | VNode[]>> : K;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { CSSProperties } from 'vue';
|
|
2
2
|
import type { AlignType, BasicTablePageConfig, MaterialOptions, RecordType } from '../typings';
|
|
3
|
+
import isValid from './isValid';
|
|
3
4
|
export * from './config';
|
|
4
5
|
export * from './getSymbols';
|
|
5
6
|
export * from './isNotNil';
|
|
@@ -7,6 +8,7 @@ export * from './isPlainObject';
|
|
|
7
8
|
export * from './isPrimitive';
|
|
8
9
|
export * from './isTypedArray';
|
|
9
10
|
export * from './validate';
|
|
11
|
+
export { isValid };
|
|
10
12
|
export interface PrefixCls {
|
|
11
13
|
suffixCls?: string;
|
|
12
14
|
customizePrefixCls?: string;
|