@gx-design-vue/pro-utils 0.2.0-beta.58 → 0.2.0-beta.59
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/base64/index.d.ts +20 -0
- package/dist/index.d.ts +2 -1
- package/dist/pro-utils.js +359 -273
- package/dist/pro-utils.umd.cjs +2 -1
- package/dist/utils/index.d.ts +24 -0
- package/package.json +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export default class Base64 {
|
|
2
|
+
_keyStr: string;
|
|
3
|
+
constructor();
|
|
4
|
+
_utf8_encode(string: string): string;
|
|
5
|
+
_utf8_decode(utftext: string): string;
|
|
6
|
+
/**
|
|
7
|
+
* @Author gx12358
|
|
8
|
+
* @DateTime 2024/12/21
|
|
9
|
+
* @lastTime 2024/12/21
|
|
10
|
+
* @description 加密方法
|
|
11
|
+
*/
|
|
12
|
+
encode(input: string): string;
|
|
13
|
+
/**
|
|
14
|
+
* @Author gx12358
|
|
15
|
+
* @DateTime 2024/12/21
|
|
16
|
+
* @lastTime 2024/12/21
|
|
17
|
+
* @description 解密
|
|
18
|
+
*/
|
|
19
|
+
decode(input: string): string;
|
|
20
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import Base64 from './base64';
|
|
1
2
|
import classNames from './classNames';
|
|
2
3
|
import { getValueFromObjectByKey } from './getValueFromObjectByKey';
|
|
3
4
|
import isServer from './isServer';
|
|
@@ -20,4 +21,4 @@ export * from './omitUndefinedAndEmptyArr';
|
|
|
20
21
|
export * from './slots';
|
|
21
22
|
export * from './typings';
|
|
22
23
|
export * from './utils';
|
|
23
|
-
export { classNames, getScroll, getScrollContainer, getValueFromObjectByKey, isInContainer, isScroll, isServer, raf, scrollTo, throttleByAnimationFrame };
|
|
24
|
+
export { Base64, classNames, getScroll, getScrollContainer, getValueFromObjectByKey, isInContainer, isScroll, isServer, raf, scrollTo, throttleByAnimationFrame };
|
package/dist/pro-utils.js
CHANGED
|
@@ -1,26 +1,71 @@
|
|
|
1
|
-
import { Comment as J, Fragment as
|
|
2
|
-
|
|
1
|
+
import { Comment as J, Fragment as _, isVNode as S } from "vue";
|
|
2
|
+
class we {
|
|
3
|
+
constructor() {
|
|
4
|
+
this._keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
|
5
|
+
}
|
|
6
|
+
_utf8_encode(t) {
|
|
7
|
+
t = t.replace(/\r\n/g, `
|
|
8
|
+
`);
|
|
9
|
+
let n = "";
|
|
10
|
+
for (let r = 0; r < t.length; r++) {
|
|
11
|
+
const i = t.charCodeAt(r);
|
|
12
|
+
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));
|
|
13
|
+
}
|
|
14
|
+
return n;
|
|
15
|
+
}
|
|
16
|
+
_utf8_decode(t) {
|
|
17
|
+
let n = "", r = 0, i = 0, o = 0, c = 0;
|
|
18
|
+
for (; r < t.length; )
|
|
19
|
+
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);
|
|
20
|
+
return n;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* @Author gx12358
|
|
24
|
+
* @DateTime 2024/12/21
|
|
25
|
+
* @lastTime 2024/12/21
|
|
26
|
+
* @description 加密方法
|
|
27
|
+
*/
|
|
28
|
+
encode(t) {
|
|
29
|
+
let n = "", r, i, o, c, f, u, l, s = 0;
|
|
30
|
+
for (t = this._utf8_encode(t); s < t.length; )
|
|
31
|
+
r = t.charCodeAt(s++), i = t.charCodeAt(s++), o = t.charCodeAt(s++), c = r >> 2, f = (r & 3) << 4 | i >> 4, u = (i & 15) << 2 | o >> 6, l = o & 63, Number.isNaN(i) ? u = l = 64 : Number.isNaN(o) && (l = 64), n = n + this._keyStr.charAt(c) + this._keyStr.charAt(f) + this._keyStr.charAt(u) + this._keyStr.charAt(l);
|
|
32
|
+
return n;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* @Author gx12358
|
|
36
|
+
* @DateTime 2024/12/21
|
|
37
|
+
* @lastTime 2024/12/21
|
|
38
|
+
* @description 解密
|
|
39
|
+
*/
|
|
40
|
+
decode(t) {
|
|
41
|
+
let n = "", r, i, o, c, f, u, l, s = 0;
|
|
42
|
+
for (t = t.replace(/[^A-Z0-9+/=]/gi, ""); s < t.length; )
|
|
43
|
+
c = this._keyStr.indexOf(t.charAt(s++)), f = this._keyStr.indexOf(t.charAt(s++)), u = this._keyStr.indexOf(t.charAt(s++)), l = this._keyStr.indexOf(t.charAt(s++)), r = c << 2 | f >> 4, i = (f & 15) << 4 | u >> 2, o = (u & 3) << 6 | l, n = n + String.fromCharCode(r), u !== 64 && (n = n + String.fromCharCode(i)), l !== 64 && (n = n + String.fromCharCode(o));
|
|
44
|
+
return n = this._utf8_decode(n), n;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
function Z(e, t) {
|
|
3
48
|
return Object.prototype.toString.call(e) === `[object ${t}]`;
|
|
4
49
|
}
|
|
5
|
-
function
|
|
50
|
+
function m(e) {
|
|
6
51
|
return typeof e == "boolean";
|
|
7
52
|
}
|
|
8
|
-
function
|
|
53
|
+
function a(e) {
|
|
9
54
|
return typeof e == "number";
|
|
10
55
|
}
|
|
11
|
-
function
|
|
56
|
+
function d(e) {
|
|
12
57
|
return typeof Array.isArray > "u" ? Object.prototype.toString.call(e) === "[object Array]" : Array.isArray(e);
|
|
13
58
|
}
|
|
14
|
-
function
|
|
15
|
-
return e !== null &&
|
|
59
|
+
function h(e) {
|
|
60
|
+
return e !== null && Z(e, "Object");
|
|
16
61
|
}
|
|
17
|
-
function
|
|
62
|
+
function X(e) {
|
|
18
63
|
return typeof e == "string" || e instanceof String;
|
|
19
64
|
}
|
|
20
|
-
function
|
|
65
|
+
function Ae(e) {
|
|
21
66
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Function]";
|
|
22
67
|
}
|
|
23
|
-
function
|
|
68
|
+
function xe(e) {
|
|
24
69
|
if (typeof e != "string")
|
|
25
70
|
return !1;
|
|
26
71
|
try {
|
|
@@ -30,7 +75,7 @@ function he(e) {
|
|
|
30
75
|
return !1;
|
|
31
76
|
}
|
|
32
77
|
}
|
|
33
|
-
function
|
|
78
|
+
function Se() {
|
|
34
79
|
const e = navigator.userAgent || navigator.vendor;
|
|
35
80
|
return !!(/iPhone/.test(e) || /Android/.test(e) && /Mobile/.test(e) || /Windows Phone/.test(e) || /Mobile/.test(e) && !Y());
|
|
36
81
|
}
|
|
@@ -43,21 +88,21 @@ function G(...e) {
|
|
|
43
88
|
for (let n = 0; n < e.length; n++) {
|
|
44
89
|
const r = e[n];
|
|
45
90
|
if (r) {
|
|
46
|
-
if (
|
|
91
|
+
if (X(r))
|
|
47
92
|
t.push(r);
|
|
48
|
-
else if (
|
|
93
|
+
else if (d(r))
|
|
49
94
|
for (let i = 0; i < r.length; i++) {
|
|
50
95
|
const o = G(r[i]);
|
|
51
96
|
o && t.push(o);
|
|
52
97
|
}
|
|
53
|
-
else if (
|
|
98
|
+
else if (h(r))
|
|
54
99
|
for (const i in r)
|
|
55
100
|
r[i] && t.push(i);
|
|
56
101
|
}
|
|
57
102
|
}
|
|
58
103
|
return t.filter((n) => n).join(" ");
|
|
59
104
|
}
|
|
60
|
-
function
|
|
105
|
+
function V(e, t) {
|
|
61
106
|
if (typeof t != "string" && !Array.isArray(t))
|
|
62
107
|
return;
|
|
63
108
|
const n = Array.isArray(t) ? t : t.split(":");
|
|
@@ -69,13 +114,13 @@ function z(e, t) {
|
|
|
69
114
|
return;
|
|
70
115
|
return r;
|
|
71
116
|
}
|
|
72
|
-
const
|
|
117
|
+
const v = typeof window > "u";
|
|
73
118
|
function Q(e) {
|
|
74
119
|
return e.replace(/[-_](.)/g, (t, n) => n.toUpperCase());
|
|
75
120
|
}
|
|
76
|
-
const
|
|
121
|
+
const C = function(e, t) {
|
|
77
122
|
var n;
|
|
78
|
-
if (
|
|
123
|
+
if (v || !e || !t)
|
|
79
124
|
return "";
|
|
80
125
|
t = Q(t), t === "float" && (t = "cssFloat");
|
|
81
126
|
try {
|
|
@@ -87,20 +132,20 @@ const E = function(e, t) {
|
|
|
87
132
|
} catch {
|
|
88
133
|
return e.style[t];
|
|
89
134
|
}
|
|
90
|
-
},
|
|
91
|
-
if (
|
|
135
|
+
}, k = (e, t) => v ? void 0 : (t == null ? C(e, "overflow") : t ? C(e, "overflow-y") : C(e, "overflow-x")).match(/(scroll|auto|overlay)/), ve = (e, t) => {
|
|
136
|
+
if (v)
|
|
92
137
|
return;
|
|
93
138
|
let n = e;
|
|
94
139
|
for (; n; ) {
|
|
95
140
|
if ([window, document, document.documentElement].includes(n))
|
|
96
141
|
return window;
|
|
97
|
-
if (
|
|
142
|
+
if (k(n, t))
|
|
98
143
|
return n;
|
|
99
144
|
n = n.parentNode;
|
|
100
145
|
}
|
|
101
146
|
return n;
|
|
102
|
-
},
|
|
103
|
-
if (
|
|
147
|
+
}, Oe = (e, t) => {
|
|
148
|
+
if (v || !e || !t)
|
|
104
149
|
return !1;
|
|
105
150
|
const n = e.getBoundingClientRect();
|
|
106
151
|
let r;
|
|
@@ -114,7 +159,7 @@ const E = function(e, t) {
|
|
|
114
159
|
function I(e) {
|
|
115
160
|
return e != null && e === e.window;
|
|
116
161
|
}
|
|
117
|
-
function
|
|
162
|
+
function K(e, t) {
|
|
118
163
|
var i;
|
|
119
164
|
if (typeof window > "u")
|
|
120
165
|
return 0;
|
|
@@ -122,44 +167,44 @@ function j(e, t) {
|
|
|
122
167
|
let r = 0;
|
|
123
168
|
return I(e) ? r = e[t ? "pageYOffset" : "pageXOffset"] : e instanceof Document ? r = e.documentElement[n] : e && (r = e[n]), e && !I(e) && typeof r != "number" && (r = (i = (e.ownerDocument || e).documentElement) == null ? void 0 : i[n]), r;
|
|
124
169
|
}
|
|
125
|
-
let W = (e) => setTimeout(e, 16),
|
|
126
|
-
typeof window < "u" && "requestAnimationFrame" in window && (W = (e) => window.requestAnimationFrame(e),
|
|
127
|
-
let
|
|
128
|
-
const
|
|
129
|
-
function
|
|
130
|
-
|
|
170
|
+
let W = (e) => setTimeout(e, 16), b = (e) => clearTimeout(e);
|
|
171
|
+
typeof window < "u" && "requestAnimationFrame" in window && (W = (e) => window.requestAnimationFrame(e), b = (e) => window.cancelAnimationFrame(e));
|
|
172
|
+
let P = 0;
|
|
173
|
+
const U = /* @__PURE__ */ new Map();
|
|
174
|
+
function z(e) {
|
|
175
|
+
U.delete(e);
|
|
131
176
|
}
|
|
132
|
-
function
|
|
133
|
-
|
|
134
|
-
const n =
|
|
177
|
+
function R(e, t = 1) {
|
|
178
|
+
P += 1;
|
|
179
|
+
const n = P;
|
|
135
180
|
function r(i) {
|
|
136
181
|
if (i === 0)
|
|
137
|
-
|
|
182
|
+
z(n), e();
|
|
138
183
|
else {
|
|
139
184
|
const o = W(() => {
|
|
140
185
|
r(i - 1);
|
|
141
186
|
});
|
|
142
|
-
|
|
187
|
+
U.set(n, o);
|
|
143
188
|
}
|
|
144
189
|
}
|
|
145
190
|
return r(t), n;
|
|
146
191
|
}
|
|
147
|
-
|
|
148
|
-
const t =
|
|
149
|
-
return
|
|
192
|
+
R.cancel = (e) => {
|
|
193
|
+
const t = U.get(e);
|
|
194
|
+
return z(t), b(t);
|
|
150
195
|
};
|
|
151
|
-
function
|
|
196
|
+
function j(e, t, n, r) {
|
|
152
197
|
const i = n - t;
|
|
153
198
|
return e /= r / 2, e < 1 ? i / 2 * e * e * e + t : i / 2 * ((e -= 2) * e * e + 2) + t;
|
|
154
199
|
}
|
|
155
|
-
function
|
|
156
|
-
const { getContainer: n = () => window, callback: r, duration: i = 450 } = t, o = n(),
|
|
157
|
-
const
|
|
158
|
-
I(o) ? o.scrollTo(window.pageXOffset,
|
|
200
|
+
function Ce(e, t = {}) {
|
|
201
|
+
const { getContainer: n = () => window, callback: r, duration: i = 450 } = t, o = n(), c = K(o, !0), f = Date.now(), u = () => {
|
|
202
|
+
const s = Date.now() - f, y = j(s > i ? i : s, c, e, i);
|
|
203
|
+
I(o) ? o.scrollTo(window.pageXOffset, y) : o instanceof HTMLDocument || o.constructor.name === "HTMLDocument" ? o.documentElement.scrollTop = y : o.scrollTop = y, s < i ? R(u) : typeof r == "function" && r();
|
|
159
204
|
};
|
|
160
|
-
o &&
|
|
205
|
+
o && R(u);
|
|
161
206
|
}
|
|
162
|
-
function
|
|
207
|
+
function Ee(e) {
|
|
163
208
|
let t;
|
|
164
209
|
const n = (i) => () => {
|
|
165
210
|
t = null, e(...i);
|
|
@@ -177,7 +222,7 @@ function te(e) {
|
|
|
177
222
|
function ne(e) {
|
|
178
223
|
return ArrayBuffer.isView(e) && !(e instanceof DataView);
|
|
179
224
|
}
|
|
180
|
-
function
|
|
225
|
+
function O(e) {
|
|
181
226
|
return p(e);
|
|
182
227
|
}
|
|
183
228
|
function p(e, t = /* @__PURE__ */ new Map()) {
|
|
@@ -248,23 +293,23 @@ function p(e, t = /* @__PURE__ */ new Map()) {
|
|
|
248
293
|
function g(e, t, n) {
|
|
249
294
|
const r = [...Object.keys(t), ...ee(t)];
|
|
250
295
|
for (let i = 0; i < r.length; i++) {
|
|
251
|
-
const o = r[i],
|
|
252
|
-
(
|
|
296
|
+
const o = r[i], c = Object.getOwnPropertyDescriptor(e, o);
|
|
297
|
+
(c == null || c.writable) && (e[o] = p(t[o], n));
|
|
253
298
|
}
|
|
254
299
|
}
|
|
255
|
-
const re = typeof process < "u" && process.versions != null && process.versions.node != null,
|
|
256
|
-
function
|
|
300
|
+
const re = typeof process < "u" && process.versions != null && process.versions.node != null, Ie = () => process.env.NODE_ENV === "TEST" ? !0 : typeof window < "u" && typeof window.document < "u" && typeof window.matchMedia < "u" && !re;
|
|
301
|
+
function E(e, t, n, r) {
|
|
257
302
|
if (e === t)
|
|
258
303
|
return !0;
|
|
259
304
|
if (e && t && typeof e == "object" && typeof t == "object") {
|
|
260
305
|
if (e.constructor !== t.constructor)
|
|
261
306
|
return !1;
|
|
262
|
-
let i, o,
|
|
307
|
+
let i, o, c;
|
|
263
308
|
if (Array.isArray(e)) {
|
|
264
309
|
if (i = e.length, i != t.length)
|
|
265
310
|
return !1;
|
|
266
311
|
for (o = i; o-- !== 0; )
|
|
267
|
-
if (!
|
|
312
|
+
if (!E(e[o], t[o], n, r))
|
|
268
313
|
return !1;
|
|
269
314
|
return !0;
|
|
270
315
|
}
|
|
@@ -275,7 +320,7 @@ function R(e, t, n, r) {
|
|
|
275
320
|
if (!t.has(o[0]))
|
|
276
321
|
return !1;
|
|
277
322
|
for (o of e.entries())
|
|
278
|
-
if (!
|
|
323
|
+
if (!E(o[1], t.get(o[0]), n, r))
|
|
279
324
|
return !1;
|
|
280
325
|
return !0;
|
|
281
326
|
}
|
|
@@ -301,14 +346,14 @@ function R(e, t, n, r) {
|
|
|
301
346
|
return e.valueOf() === t.valueOf();
|
|
302
347
|
if (e.toString !== Object.prototype.toString && e.toString)
|
|
303
348
|
return e.toString() === t.toString();
|
|
304
|
-
if (
|
|
349
|
+
if (c = Object.keys(e), i = c.length, i !== Object.keys(t).length)
|
|
305
350
|
return !1;
|
|
306
351
|
for (o = i; o-- !== 0; )
|
|
307
|
-
if (!Object.prototype.hasOwnProperty.call(t,
|
|
352
|
+
if (!Object.prototype.hasOwnProperty.call(t, c[o]))
|
|
308
353
|
return !1;
|
|
309
354
|
for (o = i; o-- !== 0; ) {
|
|
310
|
-
const f =
|
|
311
|
-
if (!(n != null && n.includes(f)) && !(f === "_owner" && e.$$typeof) && !
|
|
355
|
+
const f = c[o];
|
|
356
|
+
if (!(n != null && n.includes(f)) && !(f === "_owner" && e.$$typeof) && !E(e[f], t[f], n, r))
|
|
312
357
|
return r && console.log(f), !1;
|
|
313
358
|
}
|
|
314
359
|
return !0;
|
|
@@ -318,7 +363,7 @@ function R(e, t, n, r) {
|
|
|
318
363
|
function Re(e) {
|
|
319
364
|
return /\w.(?:png|jpg|jpeg|svg|webp|gif|bmp)$/i.test(e);
|
|
320
365
|
}
|
|
321
|
-
const ie = (e) => e == null,
|
|
366
|
+
const ie = (e) => e == null, Te = (e) => {
|
|
322
367
|
if (!e || !e.startsWith("http"))
|
|
323
368
|
return !1;
|
|
324
369
|
try {
|
|
@@ -327,13 +372,13 @@ const ie = (e) => e == null, Ie = (e) => {
|
|
|
327
372
|
return !1;
|
|
328
373
|
}
|
|
329
374
|
};
|
|
330
|
-
function
|
|
375
|
+
function F(e) {
|
|
331
376
|
if (!e || typeof e != "object")
|
|
332
377
|
return !1;
|
|
333
378
|
const t = Object.getPrototypeOf(e);
|
|
334
379
|
return t === null || t === Object.prototype || Object.getPrototypeOf(t) === null ? Object.prototype.toString.call(e) === "[object Object]" : !1;
|
|
335
380
|
}
|
|
336
|
-
const
|
|
381
|
+
const Ue = (...e) => {
|
|
337
382
|
const t = {}, n = e.length;
|
|
338
383
|
let r, i = 0;
|
|
339
384
|
for (; i < n; i += 1)
|
|
@@ -344,18 +389,18 @@ const Te = (...e) => {
|
|
|
344
389
|
} : t[r] = e[i][r]);
|
|
345
390
|
return t;
|
|
346
391
|
};
|
|
347
|
-
function
|
|
348
|
-
const r =
|
|
349
|
-
for (let
|
|
350
|
-
const f = o[
|
|
351
|
-
Array.isArray(
|
|
392
|
+
function w(e, t, n) {
|
|
393
|
+
const r = m(n == null ? void 0 : n.omitNil) ? n == null ? void 0 : n.omitNil : !0, i = m(n == null ? void 0 : n.omitEmpty) ? n == null ? void 0 : n.omitEmpty : !0, o = Object.keys(t);
|
|
394
|
+
for (let c = 0; c < o.length; c++) {
|
|
395
|
+
const f = o[c], u = t[f], l = e[f];
|
|
396
|
+
Array.isArray(u) ? Array.isArray(l) ? u.length === 0 && !i ? e[f] = u : e[f] = w(l, u, n) : e[f] = w([], u, n) : F(u) ? F(l) ? Object.keys(u).length === 0 && !i ? e[f] = u : e[f] = w(l, u, n) : e[f] = w({}, u, n) : r ? (l === void 0 || !ie(u)) && (e[f] = u) : e[f] = u;
|
|
352
397
|
}
|
|
353
398
|
return e;
|
|
354
399
|
}
|
|
355
|
-
let
|
|
356
|
-
const
|
|
400
|
+
let L = 0;
|
|
401
|
+
const N = (e = 21) => {
|
|
357
402
|
if (typeof window > "u" || !window.crypto)
|
|
358
|
-
return (
|
|
403
|
+
return (L += 1).toFixed(0);
|
|
359
404
|
let t = "";
|
|
360
405
|
const n = crypto.getRandomValues(new Uint8Array(e));
|
|
361
406
|
for (; e--; ) {
|
|
@@ -363,7 +408,7 @@ const M = (e = 21) => {
|
|
|
363
408
|
t += r < 36 ? r.toString(36) : r < 62 ? (r - 26).toString(36).toUpperCase() : r < 63 ? "_" : "-";
|
|
364
409
|
}
|
|
365
410
|
return t;
|
|
366
|
-
},
|
|
411
|
+
}, De = () => typeof window > "u" ? N() : window.crypto && window.crypto.randomUUID && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : N(), Be = (e) => {
|
|
367
412
|
if (e && e !== !0)
|
|
368
413
|
return e;
|
|
369
414
|
}, Pe = (e) => {
|
|
@@ -372,62 +417,62 @@ const M = (e = 21) => {
|
|
|
372
417
|
e[n] !== void 0 && (t[n] = e[n]);
|
|
373
418
|
}), !(Object.keys(t).length < 1))
|
|
374
419
|
return t;
|
|
375
|
-
},
|
|
420
|
+
}, Fe = (e) => {
|
|
376
421
|
const t = {};
|
|
377
422
|
return Object.keys(e || {}).forEach((n) => {
|
|
378
423
|
var r;
|
|
379
424
|
Array.isArray(e[n]) && ((r = e[n]) == null ? void 0 : r.length) === 0 || e[n] !== void 0 && (t[n] = e[n]);
|
|
380
425
|
}), t;
|
|
381
426
|
};
|
|
382
|
-
function
|
|
427
|
+
function D(e) {
|
|
383
428
|
var t;
|
|
384
429
|
if (!(typeof e != "string" && !Array.isArray(e)))
|
|
385
430
|
return Array.isArray(e) ? e[e.length - 1] : (t = e.split(":")) == null ? void 0 : t.slice(-1)[0];
|
|
386
431
|
}
|
|
387
432
|
function oe(e) {
|
|
388
|
-
return e && (e.type === J || e.type ===
|
|
433
|
+
return e && (e.type === J || e.type === _ && e.children.length === 0 || e.type === Text && e.children.trim() === "");
|
|
389
434
|
}
|
|
390
|
-
function
|
|
435
|
+
function Le(e, t) {
|
|
391
436
|
var n;
|
|
392
|
-
return
|
|
437
|
+
return H((n = e[t]) == null ? void 0 : n.call(e));
|
|
393
438
|
}
|
|
394
|
-
function
|
|
439
|
+
function H(e = []) {
|
|
395
440
|
const t = [];
|
|
396
441
|
return e.forEach((n) => {
|
|
397
|
-
Array.isArray(n) ? t.push(...n) : (n == null ? void 0 : n.type) ===
|
|
442
|
+
Array.isArray(n) ? t.push(...n) : (n == null ? void 0 : n.type) === _ ? t.push(...H(n.children)) : t.push(n);
|
|
398
443
|
}), t.filter((n) => !oe(n));
|
|
399
444
|
}
|
|
400
|
-
function
|
|
445
|
+
function q(e, ...t) {
|
|
401
446
|
return typeof e == "function" ? e == null ? void 0 : e(...t) : e;
|
|
402
447
|
}
|
|
403
448
|
function fe(e, t, n = "default", r) {
|
|
404
|
-
const i =
|
|
449
|
+
const i = D(n);
|
|
405
450
|
if (i) {
|
|
406
451
|
let o;
|
|
407
|
-
const
|
|
408
|
-
return
|
|
452
|
+
const c = V(t, n);
|
|
453
|
+
return c === !1 ? o = !1 : c === !0 ? o = e == null ? void 0 : e[i] : h(c) && r ? S(c) ? o = c : o = e == null ? void 0 : e[i] : o = c || (e == null ? void 0 : e[i]), r ? S(o) ? o : q(o) : o;
|
|
409
454
|
}
|
|
410
455
|
}
|
|
411
|
-
function
|
|
412
|
-
var o,
|
|
413
|
-
const i =
|
|
456
|
+
function ce(e, t, n = "default", r) {
|
|
457
|
+
var o, c, f;
|
|
458
|
+
const i = D(n);
|
|
414
459
|
if (i) {
|
|
415
|
-
let
|
|
416
|
-
const
|
|
417
|
-
return
|
|
460
|
+
let u;
|
|
461
|
+
const l = V(t, n);
|
|
462
|
+
return l === !1 ? u = !1 : l === !0 ? u = (o = e == null ? void 0 : e[i]) == null ? void 0 : o.call(e, r) : h(l) ? S(l) ? u = l : u = (c = e == null ? void 0 : e[i]) == null ? void 0 : c.call(e, r) : u = l || ((f = e == null ? void 0 : e[i]) == null ? void 0 : f.call(e, r)), S(u) ? u : q(u, r);
|
|
418
463
|
}
|
|
419
464
|
}
|
|
420
|
-
function
|
|
465
|
+
function Ne(e, t, n, r) {
|
|
421
466
|
const i = {};
|
|
422
467
|
return e.forEach((o) => {
|
|
423
|
-
const
|
|
424
|
-
if (
|
|
425
|
-
const f = r != null && r.render ?
|
|
426
|
-
(
|
|
468
|
+
const c = D(o);
|
|
469
|
+
if (c) {
|
|
470
|
+
const f = r != null && r.render ? ce(t, n, o, r == null ? void 0 : r.params) : fe(t, n, o);
|
|
471
|
+
(m(f) || f) && (i[c] = f);
|
|
427
472
|
}
|
|
428
473
|
}), i;
|
|
429
474
|
}
|
|
430
|
-
const
|
|
475
|
+
const x = {
|
|
431
476
|
videoAllowType: [
|
|
432
477
|
"mp4",
|
|
433
478
|
"webm",
|
|
@@ -515,15 +560,15 @@ const A = {
|
|
|
515
560
|
"ape"
|
|
516
561
|
]
|
|
517
562
|
};
|
|
518
|
-
function
|
|
563
|
+
function Me(e) {
|
|
519
564
|
return e != null;
|
|
520
565
|
}
|
|
521
|
-
const
|
|
566
|
+
const $e = ({ suffixCls: e, customizePrefixCls: t, isPor: n, className: r }) => {
|
|
522
567
|
const i = r || (n ? "gx-pro" : "gx");
|
|
523
568
|
return t || (e ? `${i}-${e}` : i);
|
|
524
|
-
},
|
|
525
|
-
function
|
|
526
|
-
const r =
|
|
569
|
+
}, _e = (e, t) => e ? d(e) ? e.join("-") : e.toString() : `${t || 0}`;
|
|
570
|
+
function Ve(e, { align: t, showIndex: n }) {
|
|
571
|
+
const r = O(e);
|
|
527
572
|
if (n && e.length && e.every((i) => i.dataIndex !== "sortIndex")) {
|
|
528
573
|
const i = e[0];
|
|
529
574
|
r.unshift({
|
|
@@ -531,7 +576,7 @@ function Ne(e, { align: t, showIndex: n }) {
|
|
|
531
576
|
align: t,
|
|
532
577
|
fixed: i.fixed,
|
|
533
578
|
width: 60,
|
|
534
|
-
uuid:
|
|
579
|
+
uuid: se().uuid(15),
|
|
535
580
|
dataIndex: "sortIndex",
|
|
536
581
|
key: "sortIndex"
|
|
537
582
|
});
|
|
@@ -539,14 +584,14 @@ function Ne(e, { align: t, showIndex: n }) {
|
|
|
539
584
|
r.filter((i) => i.dataIndex !== "sortIndex");
|
|
540
585
|
return r;
|
|
541
586
|
}
|
|
542
|
-
function
|
|
587
|
+
function We(e, ...t) {
|
|
543
588
|
return typeof e == "function" ? e(...t) : e;
|
|
544
589
|
}
|
|
545
|
-
function
|
|
590
|
+
function be(e) {
|
|
546
591
|
return JSON.parse(JSON.stringify(e));
|
|
547
592
|
}
|
|
548
|
-
function
|
|
549
|
-
if (
|
|
593
|
+
function ze(e, t) {
|
|
594
|
+
if (h(e)) {
|
|
550
595
|
const { pageSize: n = 10, total: r = 0 } = e;
|
|
551
596
|
let { current: i = 1 } = e;
|
|
552
597
|
return r - t <= n * (i - 1) && (i = i - 1), i === 0 ? 1 : i;
|
|
@@ -555,52 +600,52 @@ function We(e, t) {
|
|
|
555
600
|
}
|
|
556
601
|
function He(e = [], t, n = "children") {
|
|
557
602
|
function r(i, o) {
|
|
558
|
-
return o.map((
|
|
559
|
-
const
|
|
560
|
-
return
|
|
603
|
+
return o.map((c, f) => {
|
|
604
|
+
const u = `${i}-${f + 1}`;
|
|
605
|
+
return c[n] && (c[n] = r(u, c[n])), c.sortIndex = u, c;
|
|
561
606
|
});
|
|
562
607
|
}
|
|
563
|
-
return
|
|
564
|
-
const
|
|
565
|
-
return i[n] && (i[n] = r(`${
|
|
608
|
+
return O(e).map((i, o) => {
|
|
609
|
+
const c = h(t) && t.current || 1, f = h(t) && t.pageSize || 10, u = `${c ? (c - 1) * f + (o + 1) : o + 1}`;
|
|
610
|
+
return i[n] && (i[n] = r(`${u}`, i[n])), i.sortIndex = u, i;
|
|
566
611
|
});
|
|
567
612
|
}
|
|
568
613
|
function qe(e, t) {
|
|
569
|
-
return
|
|
570
|
-
if (
|
|
614
|
+
return d(e) ? e == null ? void 0 : e.filter((n, r) => {
|
|
615
|
+
if (a(t))
|
|
571
616
|
return r <= t - 1;
|
|
572
|
-
if (
|
|
617
|
+
if (d(t) && t.length === 2) {
|
|
573
618
|
const i = t[0] - 1, o = t[1] ? t[1] - 1 : e.length - 1;
|
|
574
619
|
return r <= o && r >= i;
|
|
575
|
-
} else if (
|
|
620
|
+
} else if (d(t) && t.length === 1) {
|
|
576
621
|
const i = t[0] - 1, o = e.length - 1;
|
|
577
622
|
return r <= o && r >= i;
|
|
578
623
|
}
|
|
579
624
|
return !0;
|
|
580
625
|
}) : [];
|
|
581
626
|
}
|
|
582
|
-
function
|
|
583
|
-
const i =
|
|
627
|
+
function ue(e, t, n, r = 0) {
|
|
628
|
+
const i = a(r) && (r === 0 || r === 1) ? r : 0, o = e[n], c = t[n];
|
|
584
629
|
let f = 0;
|
|
585
|
-
return o <
|
|
630
|
+
return o < c ? f = i === 0 ? -1 : 0 : o > c && (f = i === 0 ? 0 : -1), f;
|
|
586
631
|
}
|
|
587
|
-
function
|
|
588
|
-
const i =
|
|
632
|
+
function le(e, t, n, r = 0) {
|
|
633
|
+
const i = a(r) && (r === 0 || r === 1) ? r : 0, o = new Date(e[n]), c = new Date(t[n]);
|
|
589
634
|
let f = 0;
|
|
590
|
-
return o <
|
|
635
|
+
return o < c ? f = i === 0 ? -1 : 0 : o > c && (f = i === 0 ? 0 : -1), f;
|
|
591
636
|
}
|
|
592
|
-
function
|
|
593
|
-
return e.sort((r, i) =>
|
|
637
|
+
function Je(e, t, n = 0) {
|
|
638
|
+
return e.sort((r, i) => ue(r, i, t, n));
|
|
594
639
|
}
|
|
595
|
-
function
|
|
596
|
-
return e.sort((r, i) =>
|
|
640
|
+
function Ze(e, t, n = 0) {
|
|
641
|
+
return e.sort((r, i) => le(r, i, t, n));
|
|
597
642
|
}
|
|
598
|
-
function
|
|
599
|
-
let t =
|
|
643
|
+
function Xe(e) {
|
|
644
|
+
let t = O(e);
|
|
600
645
|
const n = new Set(t);
|
|
601
646
|
return t = Array.from(n), t;
|
|
602
647
|
}
|
|
603
|
-
function
|
|
648
|
+
function Ye(e, t) {
|
|
604
649
|
const n = ["null", "undefined"];
|
|
605
650
|
let r = !0;
|
|
606
651
|
return e === 0 ? r = !0 : n.includes(e) ? r = !1 : e || (r = !1), r ? {
|
|
@@ -611,7 +656,7 @@ function Xe(e, t) {
|
|
|
611
656
|
success: r
|
|
612
657
|
};
|
|
613
658
|
}
|
|
614
|
-
function
|
|
659
|
+
function Ge(e) {
|
|
615
660
|
let t = "";
|
|
616
661
|
if (e > -1) {
|
|
617
662
|
const n = Math.floor(e / 3600), r = Math.floor(e / 60) % 60, i = Number.parseInt(String(e % 60));
|
|
@@ -619,18 +664,18 @@ function Ze(e) {
|
|
|
619
664
|
}
|
|
620
665
|
return t.split(":")[0] === "00" ? `${t.split(":")[1]}:${t.split(":")[2]}` : t;
|
|
621
666
|
}
|
|
622
|
-
function
|
|
667
|
+
function se() {
|
|
623
668
|
const e = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
|
|
624
669
|
return {
|
|
625
670
|
uuid(t, n) {
|
|
626
671
|
const r = e, i = [], o = n || r.length;
|
|
627
|
-
let
|
|
672
|
+
let c, f;
|
|
628
673
|
if (t)
|
|
629
|
-
for (
|
|
630
|
-
i[
|
|
674
|
+
for (c = 0; c < t; c += 1)
|
|
675
|
+
i[c] = r[Number.parseInt(String(Math.random() * o))];
|
|
631
676
|
else
|
|
632
|
-
for (i[8] = "-", i[13] = "-", i[18] = "-", i[23] = "-", i[14] = "4",
|
|
633
|
-
i[
|
|
677
|
+
for (i[8] = "-", i[13] = "-", i[18] = "-", i[23] = "-", i[14] = "4", c = 0; c < 36; c += 1)
|
|
678
|
+
i[c] || (f = Math.random() * 16, i[c] = r[c === 19 ? f && 3 || 8 : f]);
|
|
634
679
|
return i.join("");
|
|
635
680
|
},
|
|
636
681
|
uuidFast() {
|
|
@@ -663,44 +708,67 @@ function ae(e, t) {
|
|
|
663
708
|
function de(e, t = "children") {
|
|
664
709
|
let n = [];
|
|
665
710
|
return e.forEach((r) => {
|
|
666
|
-
n.push(r),
|
|
711
|
+
n.push(r), d(r[t]) && r[t].length > 0 && (n = n.concat(de(r[t], t)));
|
|
667
712
|
}), n;
|
|
668
713
|
}
|
|
669
|
-
function
|
|
670
|
-
if (!e || !
|
|
714
|
+
function Qe(e, t) {
|
|
715
|
+
if (!e || !d(e) || (e == null ? void 0 : e.length) === 0)
|
|
671
716
|
return [];
|
|
672
|
-
const { id: n = "id", parentId: r = "parentId", children: i = "children", rootId: o = 0, emptyChildren:
|
|
673
|
-
return f.map((
|
|
674
|
-
var
|
|
675
|
-
return !
|
|
676
|
-
}).filter((
|
|
677
|
-
const
|
|
678
|
-
return
|
|
717
|
+
const { id: n = "id", parentId: r = "parentId", children: i = "children", rootId: o = 0, emptyChildren: c = !0 } = t || {}, f = O(e);
|
|
718
|
+
return f.map((u) => {
|
|
719
|
+
var l;
|
|
720
|
+
return !c && u[i] && ((l = u[i]) == null ? void 0 : l.length) === 0 && delete u[i], u;
|
|
721
|
+
}).filter((u) => {
|
|
722
|
+
const l = f.filter((s) => u[n] === s[r]);
|
|
723
|
+
return l.length > 0 ? u[i] = l : c && (u[i] = []), u[r] === o;
|
|
679
724
|
});
|
|
680
725
|
}
|
|
726
|
+
function he(e, t) {
|
|
727
|
+
return e.map((n) => {
|
|
728
|
+
const r = { ...n };
|
|
729
|
+
return r.children && (r.children = he(r.children, t)), t(r) || r.children && r.children.length > 0 ? r : null;
|
|
730
|
+
}).filter(Boolean);
|
|
731
|
+
}
|
|
732
|
+
function ke(e, t, n) {
|
|
733
|
+
let r = [];
|
|
734
|
+
function i(o, c) {
|
|
735
|
+
if (o[n.value] === t)
|
|
736
|
+
return r = [...c, o[n.value]], !0;
|
|
737
|
+
if (o[n.children]) {
|
|
738
|
+
for (const f of o[n.children])
|
|
739
|
+
if (i(f, [...c, o[n.value]]))
|
|
740
|
+
return !0;
|
|
741
|
+
}
|
|
742
|
+
return !1;
|
|
743
|
+
}
|
|
744
|
+
for (const o of e)
|
|
745
|
+
if (i(o, []))
|
|
746
|
+
break;
|
|
747
|
+
return r;
|
|
748
|
+
}
|
|
681
749
|
function pe(e, t, n) {
|
|
682
750
|
const r = (n == null ? void 0 : n.value) || "id", i = (n == null ? void 0 : n.children) || "children";
|
|
683
751
|
for (const o of e) {
|
|
684
752
|
if (o[r] === t)
|
|
685
753
|
return o;
|
|
686
|
-
const
|
|
687
|
-
if (
|
|
688
|
-
const f = pe(
|
|
754
|
+
const c = o[i];
|
|
755
|
+
if (c) {
|
|
756
|
+
const f = pe(c, t, n);
|
|
689
757
|
if (f)
|
|
690
758
|
return f;
|
|
691
759
|
}
|
|
692
760
|
}
|
|
693
761
|
}
|
|
694
|
-
function
|
|
762
|
+
function Ke(e) {
|
|
695
763
|
return URL.createObjectURL(e);
|
|
696
764
|
}
|
|
697
|
-
function
|
|
765
|
+
function je(e) {
|
|
698
766
|
return new Promise((t, n) => {
|
|
699
767
|
const r = new FileReader();
|
|
700
768
|
r.readAsDataURL(e), r.onload = () => t(r.result), r.onerror = (i) => n(i);
|
|
701
769
|
});
|
|
702
770
|
}
|
|
703
|
-
function
|
|
771
|
+
function et(e) {
|
|
704
772
|
const t = e.split(","), n = t[0].match(/:(.*?);/)[1], r = atob(t[1]);
|
|
705
773
|
let i = r.length;
|
|
706
774
|
const o = new Uint8Array(i);
|
|
@@ -708,15 +776,15 @@ function Ke(e) {
|
|
|
708
776
|
o[i] = r.charCodeAt(i);
|
|
709
777
|
return new Blob([o], { type: n });
|
|
710
778
|
}
|
|
711
|
-
function
|
|
779
|
+
function tt(e, t) {
|
|
712
780
|
const n = e.split(","), r = n[0].match(/:(.*?);/)[1], i = atob(n[1]);
|
|
713
781
|
let o = i.length;
|
|
714
|
-
const
|
|
782
|
+
const c = new Uint8Array(o);
|
|
715
783
|
for (; o--; )
|
|
716
|
-
|
|
717
|
-
return new File([
|
|
784
|
+
c[o] = i.charCodeAt(o);
|
|
785
|
+
return new File([c], t, { type: r });
|
|
718
786
|
}
|
|
719
|
-
function
|
|
787
|
+
function nt(e, t, n) {
|
|
720
788
|
return new window.File([e], t, { type: n });
|
|
721
789
|
}
|
|
722
790
|
function ye(e) {
|
|
@@ -725,51 +793,51 @@ function ye(e) {
|
|
|
725
793
|
const t = e.indexOf("?");
|
|
726
794
|
return t > 0 ? `${e.substring(0, t)}` : e;
|
|
727
795
|
}
|
|
728
|
-
function
|
|
729
|
-
var r, i, o,
|
|
796
|
+
function T(e) {
|
|
797
|
+
var r, i, o, c, f;
|
|
730
798
|
if (!e || typeof e != "string")
|
|
731
799
|
return "";
|
|
732
800
|
const t = ye(e), n = t.lastIndexOf(".");
|
|
733
|
-
return n > 0 && ((f = (
|
|
801
|
+
return n > 0 && ((f = (c = `${(o = (i = (r = t == null ? void 0 : t.substring) == null ? void 0 : r.call(t, n)) == null ? void 0 : i.split("?")) == null ? void 0 : o[0]}`) == null ? void 0 : c.split(".")) == null ? void 0 : f[1]) || "";
|
|
734
802
|
}
|
|
735
|
-
function
|
|
803
|
+
function A(e, t) {
|
|
736
804
|
if (t)
|
|
737
805
|
return t;
|
|
738
806
|
if (!e || e === "data:")
|
|
739
807
|
return "4";
|
|
740
808
|
let n = "4";
|
|
741
|
-
return B(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 =
|
|
809
|
+
return B(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 = T(e).toLowerCase(), x.imageType.includes(n) ? "1" : x.videoType.includes(n) ? "3" : x.audioType.includes(n) ? "2" : "4";
|
|
742
810
|
}
|
|
743
|
-
function
|
|
811
|
+
function ge(e) {
|
|
744
812
|
const { url: t = "", fileType: n = "1" } = e || {};
|
|
745
813
|
let r = "", i = { play: !1, height: 0, size: 0, width: 0, duration: 0 };
|
|
746
814
|
function o() {
|
|
747
815
|
i = { play: !1, height: 0, size: 0, width: 0, duration: 0 };
|
|
748
816
|
}
|
|
749
|
-
return t instanceof File ? r = URL.createObjectURL(t) : B(t) ? r = t : t instanceof Blob ? r = URL.createObjectURL(t) : (t.includes("https") || t.includes("http")) && (r = t), new Promise((
|
|
817
|
+
return t instanceof File ? r = URL.createObjectURL(t) : B(t) ? r = t : t instanceof Blob ? r = URL.createObjectURL(t) : (t.includes("https") || t.includes("http")) && (r = t), new Promise((c) => {
|
|
750
818
|
let f;
|
|
751
819
|
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() {
|
|
752
|
-
o(), i.play = !0, i.width = f.width || 0, i.height = f.height || 0,
|
|
820
|
+
o(), i.play = !0, i.width = f.width || 0, i.height = f.height || 0, c(i), f = null;
|
|
753
821
|
} : f.oncanplay = function() {
|
|
754
|
-
o(), i.play = !0, i.width = (f == null ? void 0 : f.videoWidth) || 0, i.height = (f == null ? void 0 : f.videoHeight) || 0, i.duration = (f == null ? void 0 : f.duration) || 0,
|
|
822
|
+
o(), i.play = !0, i.width = (f == null ? void 0 : f.videoWidth) || 0, i.height = (f == null ? void 0 : f.videoHeight) || 0, i.duration = (f == null ? void 0 : f.duration) || 0, c(i), f = null;
|
|
755
823
|
}, f.onerror = function() {
|
|
756
|
-
o(),
|
|
824
|
+
o(), c(i), f = null;
|
|
757
825
|
};
|
|
758
826
|
});
|
|
759
827
|
}
|
|
760
|
-
async function
|
|
828
|
+
async function rt(e) {
|
|
761
829
|
const { url: t = "", currentTime: n, videoSuffix: r = "", vidoeAllowPlay: i = !1 } = e;
|
|
762
|
-
let o = "",
|
|
763
|
-
return t instanceof File ? (o = URL.createObjectURL(t),
|
|
830
|
+
let o = "", c = r, f = "1", u;
|
|
831
|
+
return t instanceof File ? (o = URL.createObjectURL(t), c = T(t.name), f = A(t.name)) : t instanceof Blob ? (o = URL.createObjectURL(t), f = A(t)) : B(t) ? (o = t, f = A(t)) : (t.includes("https") || t.includes("http")) && (o = t, c = T(t), f = A(t)), (c ? x.videoAllowType.includes(c.toLowerCase()) : !1) ? i ? M(o, n) : (u = await ge({
|
|
764
832
|
url: o,
|
|
765
833
|
fileType: f
|
|
766
|
-
}),
|
|
767
|
-
|
|
768
|
-
})) : new Promise((
|
|
769
|
-
|
|
834
|
+
}), u.play ? M(o, n) : new Promise((s) => {
|
|
835
|
+
s("");
|
|
836
|
+
})) : new Promise((s) => {
|
|
837
|
+
s("");
|
|
770
838
|
});
|
|
771
839
|
}
|
|
772
|
-
async function
|
|
840
|
+
async function M(e, t = 0) {
|
|
773
841
|
return new Promise((n) => {
|
|
774
842
|
let r = document.createElement("video");
|
|
775
843
|
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 () => {
|
|
@@ -777,9 +845,9 @@ async function $(e, t = 0) {
|
|
|
777
845
|
for (r == null || r.addEventListener("seeked", async () => {
|
|
778
846
|
i && i();
|
|
779
847
|
}); t < ((r == null ? void 0 : r.duration) || 0); ) {
|
|
780
|
-
r && (r.currentTime = t), await new Promise((
|
|
781
|
-
const o = document.createElement("canvas"),
|
|
782
|
-
o.width = (r == null ? void 0 : r.videoWidth) || 0 *
|
|
848
|
+
r && (r.currentTime = t), await new Promise((y) => i = y);
|
|
849
|
+
const o = document.createElement("canvas"), c = 0.8, f = o.getContext("2d"), u = (r == null ? void 0 : r.videoWidth) || 0 * c, l = (r == null ? void 0 : r.videoHeight) || 0 * c, s = 0;
|
|
850
|
+
o.width = (r == null ? void 0 : r.videoWidth) || 0 * c, o.height = (r == null ? void 0 : r.videoHeight) || 0 * c, r && f.drawImage(r, 0, 0, u + s, l + s), r = null, n(u === 0 || l === 0 ? "" : o.toDataURL("image/png", 1));
|
|
783
851
|
}
|
|
784
852
|
}));
|
|
785
853
|
});
|
|
@@ -791,37 +859,37 @@ function B(e = "") {
|
|
|
791
859
|
"data:audio/"
|
|
792
860
|
].find((n) => e.includes(n)));
|
|
793
861
|
}
|
|
794
|
-
function
|
|
862
|
+
function it(e) {
|
|
795
863
|
return typeof e == "string" && /^data:(?:image|video|audio)\/[A-Za-z]+;base64,[A-Za-z0-9+/=]+$/.test(e);
|
|
796
864
|
}
|
|
797
|
-
function
|
|
865
|
+
function ot(e, t, n, r = !1) {
|
|
798
866
|
e && t && n && e.addEventListener(t, n, r);
|
|
799
867
|
}
|
|
800
|
-
function
|
|
868
|
+
function ft(e, t, n, r = !1) {
|
|
801
869
|
e && t && n && e.removeEventListener(t, n, r);
|
|
802
870
|
}
|
|
803
|
-
function
|
|
871
|
+
function ct() {
|
|
804
872
|
return /windows|win32/i.test(navigator.userAgent);
|
|
805
873
|
}
|
|
806
|
-
function
|
|
807
|
-
return
|
|
874
|
+
function ut(e) {
|
|
875
|
+
return m(e) ? e : !!e;
|
|
808
876
|
}
|
|
809
|
-
function
|
|
877
|
+
function $(e, t) {
|
|
810
878
|
const n = `^\\d+(?:\\.\\d{0,${e}})?`, r = new RegExp(n), i = t.toString().match(r);
|
|
811
879
|
if (i) {
|
|
812
880
|
const o = i[0];
|
|
813
881
|
if (o.includes(".")) {
|
|
814
|
-
const [
|
|
882
|
+
const [c, f] = o.split(".");
|
|
815
883
|
if (/^0*$/.test(f))
|
|
816
|
-
return
|
|
884
|
+
return c;
|
|
817
885
|
}
|
|
818
886
|
return o;
|
|
819
887
|
}
|
|
820
888
|
return t.toString();
|
|
821
889
|
}
|
|
822
|
-
function
|
|
823
|
-
const { toChinese: n = !1, fixed: r = 2, min: i = 1e4 } = t || {}, o =
|
|
824
|
-
if (!
|
|
890
|
+
function lt(e, t) {
|
|
891
|
+
const { toChinese: n = !1, fixed: r = 2, min: i = 1e4 } = t || {}, o = a(i) ? i : 1e4, c = a(r) ? r : 2, f = n ? e < o ? "" : e < 1e8 ? "万" : "亿" : e < o ? "" : e < 1e8 ? "w" : "亿";
|
|
892
|
+
if (!a(e))
|
|
825
893
|
return {
|
|
826
894
|
str: `${e}`,
|
|
827
895
|
number: `${e}`
|
|
@@ -831,28 +899,28 @@ function ft(e, t) {
|
|
|
831
899
|
str: `${e}`,
|
|
832
900
|
number: `${e}`
|
|
833
901
|
};
|
|
834
|
-
if (
|
|
835
|
-
const
|
|
902
|
+
if (c === 0) {
|
|
903
|
+
const l = (e / (e < 1e8 ? 1e4 : 1e8)).toFixed(1).split(".")[0];
|
|
836
904
|
return {
|
|
837
|
-
str: `${
|
|
838
|
-
number:
|
|
905
|
+
str: `${l}${f}`,
|
|
906
|
+
number: l,
|
|
839
907
|
unit: f
|
|
840
908
|
};
|
|
841
909
|
}
|
|
842
|
-
let
|
|
843
|
-
return e < 1e8 ? (
|
|
844
|
-
str:
|
|
845
|
-
number:
|
|
910
|
+
let u;
|
|
911
|
+
return e < 1e8 ? (u = $(c, e / 1e4), {
|
|
912
|
+
str: u + f,
|
|
913
|
+
number: u,
|
|
846
914
|
unit: f
|
|
847
|
-
}) : (
|
|
848
|
-
str:
|
|
849
|
-
number:
|
|
915
|
+
}) : (u = $(c, e / 1e8), {
|
|
916
|
+
str: u + f,
|
|
917
|
+
number: u,
|
|
850
918
|
unit: f
|
|
851
919
|
});
|
|
852
920
|
}
|
|
853
|
-
function
|
|
921
|
+
function st(e, t) {
|
|
854
922
|
let n = 0;
|
|
855
|
-
const r =
|
|
923
|
+
const r = m(t.removeAfter) ? t.removeAfter : !0, i = t.id || "hiddenElement", o = {
|
|
856
924
|
opacity: 0,
|
|
857
925
|
visibility: "hidden",
|
|
858
926
|
position: "fixed",
|
|
@@ -860,100 +928,118 @@ function ut(e, t) {
|
|
|
860
928
|
top: 0,
|
|
861
929
|
left: 0
|
|
862
930
|
};
|
|
863
|
-
let
|
|
864
|
-
if (!
|
|
865
|
-
const
|
|
866
|
-
|
|
931
|
+
let c = document.querySelector(`#${i}`);
|
|
932
|
+
if (!c) {
|
|
933
|
+
const u = document.createElement("div");
|
|
934
|
+
u.id = i, document.body.appendChild(u), c = document.querySelector(`#${i}`);
|
|
867
935
|
}
|
|
868
|
-
Object.assign(
|
|
936
|
+
Object.assign(c.style, o);
|
|
869
937
|
const f = document.createElement(t.createName || "span");
|
|
870
|
-
return f.innerHTML = e, (t.cssObject ||
|
|
938
|
+
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;
|
|
939
|
+
}
|
|
940
|
+
function at(e) {
|
|
941
|
+
e = a(e) && !Number.isNaN(e) ? e : 0;
|
|
942
|
+
const t = ["零", "一", "二", "三", "四", "五", "六", "七", "八", "九"], n = ["", "十", "百", "千", "万"];
|
|
943
|
+
e = Number.parseInt(`${e}`);
|
|
944
|
+
const r = (c) => {
|
|
945
|
+
const f = c.toString().split("").reverse();
|
|
946
|
+
let u = "";
|
|
947
|
+
for (let l = 0; l < f.length; l++)
|
|
948
|
+
u = (l === 0 && f[l] === "0" || l > 0 && f[l] === "0" && f[l - 1] === "0" ? "" : (e < 20 && l > 0 ? "" : t[f[l]]) + (f[l] === "0" ? n[0] : n[l])) + u;
|
|
949
|
+
return u;
|
|
950
|
+
}, i = Math.floor(e / 1e4);
|
|
951
|
+
let o = e % 1e4;
|
|
952
|
+
return o.toString().length < 4 && (o = "0" + o), i ? r(i) + "万" + r(o) : r(e);
|
|
871
953
|
}
|
|
872
954
|
export {
|
|
873
|
-
|
|
955
|
+
we as Base64,
|
|
956
|
+
Xe as arrayRepeat,
|
|
874
957
|
qe as arraySlice,
|
|
875
|
-
|
|
876
|
-
|
|
958
|
+
nt as blobToDataURL,
|
|
959
|
+
A as checkFileType,
|
|
877
960
|
G as classNames,
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
961
|
+
O as cloneDeep,
|
|
962
|
+
ue as compareArray,
|
|
963
|
+
Je as compareArraySort,
|
|
964
|
+
Ze as compareArrayTimeSort,
|
|
965
|
+
le as compareTime,
|
|
966
|
+
ut as convertValueBoolean,
|
|
884
967
|
g as copyProperties,
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
968
|
+
et as dataURLtoBlob,
|
|
969
|
+
tt as dataURLtoFile,
|
|
970
|
+
be as deepCopy,
|
|
971
|
+
w as deepMerge,
|
|
972
|
+
x as fileTypes,
|
|
973
|
+
H as filterEmpty,
|
|
974
|
+
he as filterTree,
|
|
891
975
|
pe as findSourceByTree,
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
$
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
976
|
+
ke as findValueAndAncestors,
|
|
977
|
+
Ge as formatDuraton,
|
|
978
|
+
$ as formatNumber,
|
|
979
|
+
_e as genColumnKey,
|
|
980
|
+
M as generateVidoePicture,
|
|
981
|
+
je as getBase64,
|
|
982
|
+
Ke as getBlobUrl,
|
|
983
|
+
T as getFileSuffix,
|
|
899
984
|
de as getLevelData,
|
|
900
985
|
ae as getMaxFloor,
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
986
|
+
ge as getMediaInfos,
|
|
987
|
+
$e as getPrefixCls,
|
|
988
|
+
se as getRandomNumber,
|
|
989
|
+
K as getScroll,
|
|
990
|
+
ve as getScrollContainer,
|
|
906
991
|
fe as getSlot,
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
992
|
+
ce as getSlotVNode,
|
|
993
|
+
Le as getSlotsChildren,
|
|
994
|
+
Ne as getSlotsProps,
|
|
910
995
|
He as getSortIndex,
|
|
911
996
|
ee as getSymbols,
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
997
|
+
st as getTextWidth,
|
|
998
|
+
V as getValueFromObjectByKey,
|
|
999
|
+
rt as getVideoCoverPicture,
|
|
915
1000
|
ye as getVideoFileUrl,
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
1001
|
+
ze as handleCurrentPage,
|
|
1002
|
+
Ve as handleShowIndex,
|
|
1003
|
+
Ye as hanndleEmptyField,
|
|
1004
|
+
Z as is,
|
|
1005
|
+
d as isArray,
|
|
921
1006
|
B as isBase64,
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
1007
|
+
m as isBoolean,
|
|
1008
|
+
Ie as isBrowser,
|
|
1009
|
+
it as isDataURLBase64,
|
|
1010
|
+
E as isDeepEqualReact,
|
|
926
1011
|
oe as isEmptyElement,
|
|
927
|
-
|
|
1012
|
+
Ae as isFunction,
|
|
928
1013
|
Re as isImg,
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
1014
|
+
Oe as isInContainer,
|
|
1015
|
+
xe as isJSONStr,
|
|
1016
|
+
Se as isMobile,
|
|
932
1017
|
ie as isNil,
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
1018
|
+
Me as isNotNil,
|
|
1019
|
+
a as isNumber,
|
|
1020
|
+
h as isObject,
|
|
1021
|
+
F as isPlainObject,
|
|
937
1022
|
te as isPrimitive,
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
1023
|
+
k as isScroll,
|
|
1024
|
+
v as isServer,
|
|
1025
|
+
X as isString,
|
|
941
1026
|
Y as isTablet,
|
|
942
1027
|
ne as isTypedArray,
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
1028
|
+
Te as isUrl,
|
|
1029
|
+
ct as isWindowsOs,
|
|
1030
|
+
Ue as merge,
|
|
1031
|
+
De as nanoid,
|
|
1032
|
+
ft as off,
|
|
1033
|
+
Be as omitBoolean,
|
|
949
1034
|
Pe as omitUndefined,
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
1035
|
+
Fe as omitUndefinedAndEmptyArr,
|
|
1036
|
+
ot as on,
|
|
1037
|
+
R as raf,
|
|
1038
|
+
We as runFunction,
|
|
1039
|
+
Ce as scrollTo,
|
|
1040
|
+
q as slotRender,
|
|
1041
|
+
Ee as throttleByAnimationFrame,
|
|
1042
|
+
at as toChinesNum,
|
|
1043
|
+
lt as toConvertNumberShow,
|
|
1044
|
+
Qe as treeData
|
|
959
1045
|
};
|
package/dist/pro-utils.umd.cjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
(function(u,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],d):(u=typeof globalThis<"u"?globalThis:u||self,d(u.PorUtils={},u.vue))})(this,function(u,d){"use strict";function x(e,t){return Object.prototype.toString.call(e)===`[object ${t}]`}function h(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 m(e){return e!==null&&x(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 ye(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(y(r))for(let i=0;i<r.length;i++){const f=q(r[i]);f&&t.push(f)}else if(m(r))for(const i in r)r[i]&&t.push(i)}}return t.filter(n=>n).join(" ")}function P(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 ge(e){return e.replace(/[-_](.)/g,(t,n)=>n.toUpperCase())}const F=function(e,t){var n;if(S||!e||!t)return"";t=ge(t),t==="float"&&(t="cssFloat");try{const r=e.style[t];if(r)return r;const i=(n=document==null?void 0:document.defaultView)==null?void 0:n.getComputedStyle(e,"");return i?i[t]:""}catch{return e.style[t]}},H=(e,t)=>S?void 0:(t==null?F(e,"overflow"):t?F(e,"overflow-y"):F(e,"overflow-x")).match(/(scroll|auto|overlay)/),he=(e,t)=>{if(S)return;let n=e;for(;n;){if([window,document,document.documentElement].includes(n))return window;if(H(n,t))return n;n=n.parentNode}return n},we=(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 D(e){return e!=null&&e===e.window}function _(e,t){var i;if(typeof window>"u")return 0;const n=t?"scrollTop":"scrollLeft";let r=0;return D(e)?r=e[t?"pageYOffset":"pageXOffset"]:e instanceof Document?r=e.documentElement[n]:e&&(r=e[n]),e&&!D(e)&&typeof r!="number"&&(r=(i=(e.ownerDocument||e).documentElement)==null?void 0:i[n]),r}let J=e=>setTimeout(e,16),X=e=>clearTimeout(e);typeof window<"u"&&"requestAnimationFrame"in window&&(J=e=>window.requestAnimationFrame(e),X=e=>window.cancelAnimationFrame(e));let Z=0;const C=new Map;function Y(e){C.delete(e)}function R(e,t=1){Z+=1;const n=Z;function r(i){if(i===0)Y(n),e();else{const f=J(()=>{r(i-1)});C.set(n,f)}}return r(t),n}R.cancel=e=>{const t=C.get(e);return Y(t),X(t)};function pe(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 Se(e,t={}){const{getContainer:n=()=>window,callback:r,duration:i=450}=t,f=n(),c=_(f,!0),o=Date.now(),l=()=>{const s=Date.now()-o,E=pe(s>i?i:s,c,e,i);D(f)?f.scrollTo(window.pageXOffset,E):f instanceof HTMLDocument||f.constructor.name==="HTMLDocument"?f.documentElement.scrollTop=E:f.scrollTop=E,s<i?R(l):typeof r=="function"&&r()};f&&R(l)}function Ae(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 G(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 j(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function A(e){return w(e)}function w(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]=w(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,w(i,t));return n}if(e instanceof Set){const n=new Set;t.set(e,n);for(const r of e)n.add(w(r,t));return n}if(typeof Buffer<"u"&&Buffer.isBuffer(e))return e.subarray();if(j(e)){const n=new(Object.getPrototypeOf(e)).constructor(e.length);t.set(e,n);for(let r=0;r<e.length;r++)n[r]=w(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),p(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),p(n,e,t),n}if(e instanceof Blob){const n=new Blob([e],{type:e.type});return t.set(e,n),p(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,p(n,e,t),n}if(typeof e=="object"&&e!==null){const n={};return t.set(e,n),p(n,e,t),n}return e}function p(e,t,n){const r=[...Object.keys(t),...G(t)];for(let i=0;i<r.length;i++){const f=r[i],c=Object.getOwnPropertyDescriptor(e,f);(c==null||c.writable)&&(e[f]=w(t[f],n))}}const ve=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,Oe=()=>process.env.NODE_ENV==="TEST"?!0:typeof window<"u"&&typeof window.document<"u"&&typeof window.matchMedia<"u"&&!ve;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,f,c;if(Array.isArray(e)){if(i=e.length,i!=t.length)return!1;for(f=i;f--!==0;)if(!I(e[f],t[f],n,r))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(f of e.entries())if(!t.has(f[0]))return!1;for(f of e.entries())if(!I(f[1],t.get(f[0]),n,r))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(f of e.entries())if(!t.has(f[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(i=e.length,i!=t.length)return!1;for(f=i;f--!==0;)if(e[f]!==t[f])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(f=i;f--!==0;)if(!Object.prototype.hasOwnProperty.call(t,c[f]))return!1;for(f=i;f--!==0;){const o=c[f];if(!(n!=null&&n.includes(o))&&!(o==="_owner"&&e.$$typeof)&&!I(e[o],t[o],n,r))return r&&console.log(o),!1}return!0}return e!==e&&t!==t}function Te(e){return/\w.(?:png|jpg|jpeg|svg|webp|gif|bmp)$/i.test(e)}const K=e=>e==null,Ee=e=>{if(!e||!e.startsWith("http"))return!1;try{return!!new URL(e)}catch{return!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 Re=(...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=h(n==null?void 0:n.omitNil)?n==null?void 0:n.omitNil:!0,i=h(n==null?void 0:n.omitEmpty)?n==null?void 0:n.omitEmpty:!0,f=Object.keys(t);for(let c=0;c<f.length;c++){const o=f[c],l=t[o],a=e[o];Array.isArray(l)?Array.isArray(a)?l.length===0&&!i?e[o]=l:e[o]=v(a,l,n):e[o]=v([],l,n):L(l)?L(a)?Object.keys(l).length===0&&!i?e[o]=l:e[o]=v(a,l,n):e[o]=v({},l,n):r?(a===void 0||!K(l))&&(e[o]=l):e[o]=l}return e}let k=0;const ee=(e=21)=>{if(typeof window>"u"||!window.crypto)return(k+=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},Ie=()=>typeof window>"u"?ee():window.crypto&&window.crypto.randomUUID&&typeof crypto.randomUUID=="function"?crypto.randomUUID():ee(),Ue=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=>{var r;Array.isArray(e[n])&&((r=e[n])==null?void 0:r.length)===0||e[n]!==void 0&&(t[n]=e[n])}),t};function N(e){var t;if(!(typeof e!="string"&&!Array.isArray(e)))return Array.isArray(e)?e[e.length-1]:(t=e.split(":"))==null?void 0:t.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){var n;return M((n=e[t])==null?void 0:n.call(e))}function M(e=[]){const t=[];return e.forEach(n=>{Array.isArray(n)?t.push(...n):(n==null?void 0: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==null?void 0:e(...t):e}function ne(e,t,n="default",r){const i=N(n);if(i){let f;const c=P(t,n);return c===!1?f=!1:c===!0?f=e==null?void 0:e[i]:m(c)&&r?d.isVNode(c)?f=c:f=e==null?void 0:e[i]:f=c||(e==null?void 0:e[i]),r?d.isVNode(f)?f:V(f):f}}function re(e,t,n="default",r){var f,c,o;const i=N(n);if(i){let l;const a=P(t,n);return a===!1?l=!1:a===!0?l=(f=e==null?void 0:e[i])==null?void 0:f.call(e,r):m(a)?d.isVNode(a)?l=a:l=(c=e==null?void 0:e[i])==null?void 0:c.call(e,r):l=a||((o=e==null?void 0:e[i])==null?void 0:o.call(e,r)),d.isVNode(l)?l:V(l,r)}}function De(e,t,n,r){const i={};return e.forEach(f=>{const c=N(f);if(c){const o=r!=null&&r.render?re(t,n,f,r==null?void 0:r.params):ne(t,n,f);(h(o)||o)&&(i[c]=o)}}),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 Ce(e){return e!=null}const Le=({suffixCls:e,customizePrefixCls:t,isPor:n,className:r})=>{const i=r||(n?"gx-pro":"gx");return t||(e?`${i}-${e}`:i)},Ne=(e,t)=>e?y(e)?e.join("-"):e.toString():`${t||0}`;function Me(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:oe().uuid(15),dataIndex:"sortIndex",key:"sortIndex"})}else r.filter(i=>i.dataIndex!=="sortIndex");return r}function Ve(e,...t){return typeof e=="function"?e(...t):e}function $e(e){return JSON.parse(JSON.stringify(e))}function be(e,t){if(m(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 xe(e=[],t,n="children"){function r(i,f){return f.map((c,o)=>{const l=`${i}-${o+1}`;return c[n]&&(c[n]=r(l,c[n])),c.sortIndex=l,c})}return A(e).map((i,f)=>{const c=m(t)&&t.current||1,o=m(t)&&t.pageSize||10,l=`${c?(c-1)*o+(f+1):f+1}`;return i[n]&&(i[n]=r(`${l}`,i[n])),i.sortIndex=l,i})}function We(e,t){return y(e)?e==null?void 0:e.filter((n,r)=>{if(g(t))return r<=t-1;if(y(t)&&t.length===2){const i=t[0]-1,f=t[1]?t[1]-1:e.length-1;return r<=f&&r>=i}else if(y(t)&&t.length===1){const i=t[0]-1,f=e.length-1;return r<=f&&r>=i}return!0}):[]}function ie(e,t,n,r=0){const i=g(r)&&(r===0||r===1)?r:0,f=e[n],c=t[n];let o=0;return f<c?o=i===0?-1:0:f>c&&(o=i===0?0:-1),o}function fe(e,t,n,r=0){const i=g(r)&&(r===0||r===1)?r:0,f=new Date(e[n]),c=new Date(t[n]);let o=0;return f<c?o=i===0?-1:0:f>c&&(o=i===0?0:-1),o}function ze(e,t,n=0){return e.sort((r,i)=>ie(r,i,t,n))}function qe(e,t,n=0){return e.sort((r,i)=>fe(r,i,t,n))}function He(e){let t=A(e);const n=new Set(t);return t=Array.from(n),t}function _e(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 Je(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 oe(){const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");return{uuid(t,n){const r=e,i=[],f=n||r.length;let c,o;if(t)for(c=0;c<t;c+=1)i[c]=r[Number.parseInt(String(Math.random()*f))];else for(i[8]="-",i[13]="-",i[18]="-",i[23]="-",i[14]="4",c=0;c<36;c+=1)i[c]||(o=Math.random()*16,i[c]=r[c===19?o&&3||8:o]);return i.join("")},uuidFast(){const t=e,n=Array.from({length:36});let r=0,i,f;for(f=0;f<36;f+=1)f===8||f===13||f===18||f===23?n[f]="-":f===14?n[f]="4":(r<=2&&(r=33554432+Math.random()*16777216||0),i=r&&15,r=r>4,n[f]=t[f===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 ue(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?ue(i,n):0)}))}function ce(e,t="children"){let n=[];return e.forEach(r=>{n.push(r),y(r[t])&&r[t].length>0&&(n=n.concat(ce(r[t],t)))}),n}function Xe(e,t){if(!e||!y(e)||(e==null?void 0:e.length)===0)return[];const{id:n="id",parentId:r="parentId",children:i="children",rootId:f=0,emptyChildren:c=!0}=t||{},o=A(e);return o.map(l=>{var a;return!c&&l[i]&&((a=l[i])==null?void 0:a.length)===0&&delete l[i],l}).filter(l=>{const a=o.filter(s=>l[n]===s[r]);return a.length>0?l[i]=a:c&&(l[i]=[]),l[r]===f})}function le(e,t,n){const r=(n==null?void 0:n.value)||"id",i=(n==null?void 0:n.children)||"children";for(const f of e){if(f[r]===t)return f;const c=f[i];if(c){const o=le(c,t,n);if(o)return o}}}function Ze(e){return URL.createObjectURL(e)}function Ye(e){return new Promise((t,n)=>{const r=new FileReader;r.readAsDataURL(e),r.onload=()=>t(r.result),r.onerror=i=>n(i)})}function Ge(e){const t=e.split(","),n=t[0].match(/:(.*?);/)[1],r=atob(t[1]);let i=r.length;const f=new Uint8Array(i);for(;i--;)f[i]=r.charCodeAt(i);return new Blob([f],{type:n})}function Qe(e,t){const n=e.split(","),r=n[0].match(/:(.*?);/)[1],i=atob(n[1]);let f=i.length;const c=new Uint8Array(f);for(;f--;)c[f]=i.charCodeAt(f);return new File([c],t,{type:r})}function je(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 U(e){var r,i,f,c,o;if(!e||typeof e!="string")return"";const t=ae(e),n=t.lastIndexOf(".");return n>0&&((o=(c=`${(f=(i=(r=t==null?void 0:t.substring)==null?void 0:r.call(t,n))==null?void 0:i.split("?"))==null?void 0:f[0]}`)==null?void 0:c.split("."))==null?void 0:o[1])||""}function T(e,t){if(t)return t;if(!e||e==="data:")return"4";let n="4";return B(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(),O.imageType.includes(n)?"1":O.videoType.includes(n)?"3":O.audioType.includes(n)?"2":"4"}function se(e){const{url:t="",fileType:n="1"}=e||{};let r="",i={play:!1,height:0,size:0,width:0,duration:0};function f(){i={play:!1,height:0,size:0,width:0,duration:0}}return t instanceof File?r=URL.createObjectURL(t):B(t)?r=t:t instanceof Blob?r=URL.createObjectURL(t):(t.includes("https")||t.includes("http"))&&(r=t),new Promise(c=>{let o;n==="1"?(o=document.createElement("img"),o.src=r):n==="2"?(o=document.createElement("audio"),o.src=r):n==="3"&&(o=document.createElement("video"),o.src=r),n==="1"?o.onload=function(){f(),i.play=!0,i.width=o.width||0,i.height=o.height||0,c(i),o=null}:o.oncanplay=function(){f(),i.play=!0,i.width=(o==null?void 0:o.videoWidth)||0,i.height=(o==null?void 0:o.videoHeight)||0,i.duration=(o==null?void 0:o.duration)||0,c(i),o=null},o.onerror=function(){f(),c(i),o=null}})}async function Ke(e){const{url:t="",currentTime:n,videoSuffix:r="",vidoeAllowPlay:i=!1}=e;let f="",c=r,o="1",l;return t instanceof File?(f=URL.createObjectURL(t),c=U(t.name),o=T(t.name)):t instanceof Blob?(f=URL.createObjectURL(t),o=T(t)):B(t)?(f=t,o=T(t)):(t.includes("https")||t.includes("http"))&&(f=t,c=U(t),o=T(t)),(c?O.videoAllowType.includes(c.toLowerCase()):!1)?i?$(f,n):(l=await se({url:f,fileType:o}),l.play?$(f,n):new Promise(s=>{s("")})):new Promise(s=>{s("")})}async function $(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==null||r.addEventListener("seeked",async()=>{i&&i()});t<((r==null?void 0:r.duration)||0);){r&&(r.currentTime=t),await new Promise(E=>i=E);const f=document.createElement("canvas"),c=.8,o=f.getContext("2d"),l=(r==null?void 0:r.videoWidth)||0*c,a=(r==null?void 0:r.videoHeight)||0*c,s=0;f.width=(r==null?void 0:r.videoWidth)||0*c,f.height=(r==null?void 0:r.videoHeight)||0*c,r&&o.drawImage(r,0,0,l+s,a+s),r=null,n(l===0||a===0?"":f.toDataURL("image/png",1))}}))})}function B(e=""){return!!(e&&["data:image/","data:video/","data:audio/"].find(n=>e.includes(n)))}function ke(e){return typeof e=="string"&&/^data:(?:image|video|audio)\/[A-Za-z]+;base64,[A-Za-z0-9+/=]+$/.test(e)}function et(e,t,n,r=!1){e&&t&&n&&e.addEventListener(t,n,r)}function tt(e,t,n,r=!1){e&&t&&n&&e.removeEventListener(t,n,r)}function nt(){return/windows|win32/i.test(navigator.userAgent)}function rt(e){return h(e)?e:!!e}function b(e,t){const n=`^\\d+(?:\\.\\d{0,${e}})?`,r=new RegExp(n),i=t.toString().match(r);if(i){const f=i[0];if(f.includes(".")){const[c,o]=f.split(".");if(/^0*$/.test(o))return c}return f}return t.toString()}function it(e,t){const{toChinese:n=!1,fixed:r=2,min:i=1e4}=t||{},f=g(i)?i:1e4,c=g(r)?r:2,o=n?e<f?"":e<1e8?"万":"亿":e<f?"":e<1e8?"w":"亿";if(!g(e))return{str:`${e}`,number:`${e}`};if(e<f)return{str:`${e}`,number:`${e}`};if(c===0){const a=(e/(e<1e8?1e4:1e8)).toFixed(1).split(".")[0];return{str:`${a}${o}`,number:a,unit:o}}let l;return e<1e8?(l=b(c,e/1e4),{str:l+o,number:l,unit:o}):(l=b(c,e/1e8),{str:l+o,number:l,unit:o})}function ft(e,t){let n=0;const r=h(t.removeAfter)?t.removeAfter:!0,i=t.id||"hiddenElement",f={opacity:0,visibility:"hidden",position:"fixed",zIndex:-1,top:0,left:0};let c=document.querySelector(`#${i}`);if(!c){const l=document.createElement("div");l.id=i,document.body.appendChild(l),c=document.querySelector(`#${i}`)}Object.assign(c.style,f);const o=document.createElement(t.createName||"span");return o.innerHTML=e,(t.cssObject||m(t.cssObject))&&Object.assign(o.style,t.cssObject),c.append(o),n=o.getBoundingClientRect()[t.type||"width"],r&&c.removeChild(o),n}u.arrayRepeat=He,u.arraySlice=We,u.blobToDataURL=je,u.checkFileType=T,u.classNames=q,u.cloneDeep=A,u.compareArray=ie,u.compareArraySort=ze,u.compareArrayTimeSort=qe,u.compareTime=fe,u.convertValueBoolean=rt,u.copyProperties=p,u.dataURLtoBlob=Ge,u.dataURLtoFile=Qe,u.deepCopy=$e,u.deepMerge=v,u.fileTypes=O,u.filterEmpty=M,u.findSourceByTree=le,u.formatDuraton=Je,u.formatNumber=b,u.genColumnKey=Ne,u.generateVidoePicture=$,u.getBase64=Ye,u.getBlobUrl=Ze,u.getFileSuffix=U,u.getLevelData=ce,u.getMaxFloor=ue,u.getMediaInfos=se,u.getPrefixCls=Le,u.getRandomNumber=oe,u.getScroll=_,u.getScrollContainer=he,u.getSlot=ne,u.getSlotVNode=re,u.getSlotsChildren=Fe,u.getSlotsProps=De,u.getSortIndex=xe,u.getSymbols=G,u.getTextWidth=ft,u.getValueFromObjectByKey=P,u.getVideoCoverPicture=Ke,u.getVideoFileUrl=ae,u.handleCurrentPage=be,u.handleShowIndex=Me,u.hanndleEmptyField=_e,u.is=x,u.isArray=y,u.isBase64=B,u.isBoolean=h,u.isBrowser=Oe,u.isDataURLBase64=ke,u.isDeepEqualReact=I,u.isEmptyElement=te,u.isFunction=de,u.isImg=Te,u.isInContainer=we,u.isJSONStr=ye,u.isMobile=me,u.isNil=K,u.isNotNil=Ce,u.isNumber=g,u.isObject=m,u.isPlainObject=L,u.isPrimitive=Q,u.isScroll=H,u.isServer=S,u.isString=W,u.isTablet=z,u.isTypedArray=j,u.isUrl=Ee,u.isWindowsOs=nt,u.merge=Re,u.nanoid=Ie,u.off=tt,u.omitBoolean=Ue,u.omitUndefined=Be,u.omitUndefinedAndEmptyArr=Pe,u.on=et,u.raf=R,u.runFunction=Ve,u.scrollTo=Se,u.slotRender=V,u.throttleByAnimationFrame=Ae,u.toConvertNumberShow=it,u.treeData=Xe,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(u,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],d):(u=typeof globalThis<"u"?globalThis:u||self,d(u.PorUtils={},u.vue))})(this,function(u,d){"use strict";class he{constructor(){this._keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}_utf8_encode(t){t=t.replace(/\r\n/g,`
|
|
2
|
+
`);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,l,a,s=0;for(t=this._utf8_encode(t);s<t.length;)r=t.charCodeAt(s++),i=t.charCodeAt(s++),o=t.charCodeAt(s++),f=r>>2,c=(r&3)<<4|i>>4,l=(i&15)<<2|o>>6,a=o&63,Number.isNaN(i)?l=a=64:Number.isNaN(o)&&(a=64),n=n+this._keyStr.charAt(f)+this._keyStr.charAt(c)+this._keyStr.charAt(l)+this._keyStr.charAt(a);return n}decode(t){let n="",r,i,o,f,c,l,a,s=0;for(t=t.replace(/[^A-Z0-9+/=]/gi,"");s<t.length;)f=this._keyStr.indexOf(t.charAt(s++)),c=this._keyStr.indexOf(t.charAt(s++)),l=this._keyStr.indexOf(t.charAt(s++)),a=this._keyStr.indexOf(t.charAt(s++)),r=f<<2|c>>4,i=(c&15)<<4|l>>2,o=(l&3)<<6|a,n=n+String.fromCharCode(r),l!==64&&(n=n+String.fromCharCode(i)),a!==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 h(e){return typeof e=="number"}function y(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)&&!x())}function x(){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 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=z(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 U(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 we(e){return e.replace(/[-_](.)/g,(t,n)=>n.toUpperCase())}const N=function(e,t){var n;if(S||!e||!t)return"";t=we(t),t==="float"&&(t="cssFloat");try{const r=e.style[t];if(r)return r;const i=(n=document==null?void 0:document.defaultView)==null?void 0:n.getComputedStyle(e,"");return i?i[t]:""}catch{return e.style[t]}},q=(e,t)=>S?void 0:(t==null?N(e,"overflow"):t?N(e,"overflow-y"):N(e,"overflow-x")).match(/(scroll|auto|overlay)/),pe=(e,t)=>{if(S)return;let n=e;for(;n;){if([window,document,document.documentElement].includes(n))return window;if(q(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){var i;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=(i=(e.ownerDocument||e).documentElement)==null?void 0:i[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 Y(e){F.delete(e)}function E(e,t=1){X+=1;const n=X;function r(i){if(i===0)Y(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 Y(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(),l=()=>{const s=Date.now()-c,T=Ae(s>i?i:s,f,e,i);P(o)?o.scrollTo(window.pageXOffset,T):o instanceof HTMLDocument||o.constructor.name==="HTMLDocument"?o.documentElement.scrollTop=T:o.scrollTop=T,s<i?E(l):typeof r=="function"&&r()};o&&E(l)}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 G(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 w(e)}function w(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]=w(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,w(i,t));return n}if(e instanceof Set){const n=new Set;t.set(e,n);for(const r of e)n.add(w(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]=w(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),p(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),p(n,e,t),n}if(e instanceof Blob){const n=new Blob([e],{type:e.type});return t.set(e,n),p(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,p(n,e,t),n}if(typeof e=="object"&&e!==null){const n={};return t.set(e,n),p(n,e,t),n}return e}function p(e,t,n){const r=[...Object.keys(t),...G(t)];for(let i=0;i<r.length;i++){const o=r[i],f=Object.getOwnPropertyDescriptor(e,o);(f==null||f.writable)&&(e[o]=w(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 R(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(!R(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(!R(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!=null&&n.includes(c))&&!(c==="_owner"&&e.$$typeof)&&!R(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 j=e=>e==null,Re=e=>{if(!e||!e.startsWith("http"))return!1;try{return!!new URL(e)}catch{return!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 Be=(...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==null?void 0:n.omitNil)?n==null?void 0:n.omitNil:!0,i=m(n==null?void 0:n.omitEmpty)?n==null?void 0:n.omitEmpty:!0,o=Object.keys(t);for(let f=0;f<o.length;f++){const c=o[f],l=t[c],a=e[c];Array.isArray(l)?Array.isArray(a)?l.length===0&&!i?e[c]=l:e[c]=v(a,l,n):e[c]=v([],l,n):D(l)?D(a)?Object.keys(l).length===0&&!i?e[c]=l:e[c]=v(a,l,n):e[c]=v({},l,n):r?(a===void 0||!j(l))&&(e[c]=l):e[c]=l}return e}let K=0;const ee=(e=21)=>{if(typeof window>"u"||!window.crypto)return(K+=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},Ie=()=>typeof window>"u"?ee():window.crypto&&window.crypto.randomUUID&&typeof crypto.randomUUID=="function"?crypto.randomUUID():ee(),Ue=e=>{if(e&&e!==!0)return e},Ne=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=>{var r;Array.isArray(e[n])&&((r=e[n])==null?void 0:r.length)===0||e[n]!==void 0&&(t[n]=e[n])}),t};function L(e){var t;if(!(typeof e!="string"&&!Array.isArray(e)))return Array.isArray(e)?e[e.length-1]:(t=e.split(":"))==null?void 0:t.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){var n;return M((n=e[t])==null?void 0:n.call(e))}function M(e=[]){const t=[];return e.forEach(n=>{Array.isArray(n)?t.push(...n):(n==null?void 0: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==null?void 0:e(...t):e}function ne(e,t,n="default",r){const i=L(n);if(i){let o;const f=U(t,n);return f===!1?o=!1:f===!0?o=e==null?void 0:e[i]:g(f)&&r?d.isVNode(f)?o=f:o=e==null?void 0:e[i]:o=f||(e==null?void 0:e[i]),r?d.isVNode(o)?o:V(o):o}}function re(e,t,n="default",r){var o,f,c;const i=L(n);if(i){let l;const a=U(t,n);return a===!1?l=!1:a===!0?l=(o=e==null?void 0:e[i])==null?void 0:o.call(e,r):g(a)?d.isVNode(a)?l=a:l=(f=e==null?void 0:e[i])==null?void 0:f.call(e,r):l=a||((c=e==null?void 0:e[i])==null?void 0:c.call(e,r)),d.isVNode(l)?l:V(l,r)}}function De(e,t,n,r){const i={};return e.forEach(o=>{const f=L(o);if(f){const c=r!=null&&r.render?re(t,n,o,r==null?void 0: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?y(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 xe(e=[],t,n="children"){function r(i,o){return o.map((f,c)=>{const l=`${i}-${c+1}`;return f[n]&&(f[n]=r(l,f[n])),f.sortIndex=l,f})}return A(e).map((i,o)=>{const f=g(t)&&t.current||1,c=g(t)&&t.pageSize||10,l=`${f?(f-1)*c+(o+1):o+1}`;return i[n]&&(i[n]=r(`${l}`,i[n])),i.sortIndex=l,i})}function ze(e,t){return y(e)?e==null?void 0:e.filter((n,r)=>{if(h(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 ie(e,t,n,r=0){const i=h(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=h(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 qe(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 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==null?void 0:e.length)===0)return[];const{id:n="id",parentId:r="parentId",children:i="children",rootId:o=0,emptyChildren:f=!0}=t||{},c=A(e);return c.map(l=>{var a;return!f&&l[i]&&((a=l[i])==null?void 0:a.length)===0&&delete l[i],l}).filter(l=>{const a=c.filter(s=>l[n]===s[r]);return a.length>0?l[i]=a:f&&(l[i]=[]),l[r]===o})}function le(e,t){return e.map(n=>{const r={...n};return r.children&&(r.children=le(r.children,t)),t(r)||r.children&&r.children.length>0?r:null}).filter(Boolean)}function Ge(e,t,n){let r=[];function i(o,f){if(o[n.value]===t)return r=[...f,o[n.value]],!0;if(o[n.children]){for(const c of o[n.children])if(i(c,[...f,o[n.value]]))return!0}return!1}for(const o of e)if(i(o,[]))break;return r}function ae(e,t,n){const r=(n==null?void 0:n.value)||"id",i=(n==null?void 0:n.children)||"children";for(const o of e){if(o[r]===t)return o;const f=o[i];if(f){const c=ae(f,t,n);if(c)return c}}}function Qe(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 Ke(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 et(e,t,n){return new window.File([e],t,{type:n})}function se(e){if(!e||typeof e!="string")return"";const t=e.indexOf("?");return t>0?`${e.substring(0,t)}`:e}function B(e){var r,i,o,f,c;if(!e||typeof e!="string")return"";const t=se(e),n=t.lastIndexOf(".");return n>0&&((c=(f=`${(o=(i=(r=t==null?void 0:t.substring)==null?void 0:r.call(t,n))==null?void 0:i.split("?"))==null?void 0:o[0]}`)==null?void 0:f.split("."))==null?void 0:c[1])||""}function C(e,t){if(t)return t;if(!e||e==="data:")return"4";let n="4";return I(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=B(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):I(t)?r=t:t instanceof Blob?r=URL.createObjectURL(t):(t.includes("https")||t.includes("http"))&&(r=t),new Promise(f=>{let c;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==null?void 0:c.videoWidth)||0,i.height=(c==null?void 0:c.videoHeight)||0,i.duration=(c==null?void 0:c.duration)||0,f(i),c=null},c.onerror=function(){o(),f(i),c=null}})}async function tt(e){const{url:t="",currentTime:n,videoSuffix:r="",vidoeAllowPlay:i=!1}=e;let o="",f=r,c="1",l;return t instanceof File?(o=URL.createObjectURL(t),f=B(t.name),c=C(t.name)):t instanceof Blob?(o=URL.createObjectURL(t),c=C(t)):I(t)?(o=t,c=C(t)):(t.includes("https")||t.includes("http"))&&(o=t,f=B(t),c=C(t)),(f?O.videoAllowType.includes(f.toLowerCase()):!1)?i?b(o,n):(l=await de({url:o,fileType:c}),l.play?b(o,n):new Promise(s=>{s("")})):new Promise(s=>{s("")})}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==null||r.addEventListener("seeked",async()=>{i&&i()});t<((r==null?void 0:r.duration)||0);){r&&(r.currentTime=t),await new Promise(T=>i=T);const o=document.createElement("canvas"),f=.8,c=o.getContext("2d"),l=(r==null?void 0:r.videoWidth)||0*f,a=(r==null?void 0:r.videoHeight)||0*f,s=0;o.width=(r==null?void 0:r.videoWidth)||0*f,o.height=(r==null?void 0:r.videoHeight)||0*f,r&&c.drawImage(r,0,0,l+s,a+s),r=null,n(l===0||a===0?"":o.toDataURL("image/png",1))}}))})}function I(e=""){return!!(e&&["data:image/","data:video/","data:audio/"].find(n=>e.includes(n)))}function nt(e){return typeof e=="string"&&/^data:(?:image|video|audio)\/[A-Za-z]+;base64,[A-Za-z0-9+/=]+$/.test(e)}function rt(e,t,n,r=!1){e&&t&&n&&e.addEventListener(t,n,r)}function it(e,t,n,r=!1){e&&t&&n&&e.removeEventListener(t,n,r)}function ot(){return/windows|win32/i.test(navigator.userAgent)}function ct(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 ft(e,t){const{toChinese:n=!1,fixed:r=2,min:i=1e4}=t||{},o=h(i)?i:1e4,f=h(r)?r:2,c=n?e<o?"":e<1e8?"万":"亿":e<o?"":e<1e8?"w":"亿";if(!h(e))return{str:`${e}`,number:`${e}`};if(e<o)return{str:`${e}`,number:`${e}`};if(f===0){const a=(e/(e<1e8?1e4:1e8)).toFixed(1).split(".")[0];return{str:`${a}${c}`,number:a,unit:c}}let l;return e<1e8?(l=$(f,e/1e4),{str:l+c,number:l,unit:c}):(l=$(f,e/1e8),{str:l+c,number:l,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 l=document.createElement("div");l.id=i,document.body.appendChild(l),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 lt(e){e=h(e)&&!Number.isNaN(e)?e:0;const t=["零","一","二","三","四","五","六","七","八","九"],n=["","十","百","千","万"];e=Number.parseInt(`${e}`);const r=f=>{const c=f.toString().split("").reverse();let l="";for(let a=0;a<c.length;a++)l=(a===0&&c[a]==="0"||a>0&&c[a]==="0"&&c[a-1]==="0"?"":(e<20&&a>0?"":t[c[a]])+(c[a]==="0"?n[0]:n[a]))+l;return l},i=Math.floor(e/1e4);let o=e%1e4;return o.toString().length<4&&(o="0"+o),i?r(i)+"万"+r(o):r(e)}u.Base64=he,u.arrayRepeat=Je,u.arraySlice=ze,u.blobToDataURL=et,u.checkFileType=C,u.classNames=z,u.cloneDeep=A,u.compareArray=ie,u.compareArraySort=qe,u.compareArrayTimeSort=He,u.compareTime=oe,u.convertValueBoolean=ct,u.copyProperties=p,u.dataURLtoBlob=je,u.dataURLtoFile=Ke,u.deepCopy=_e,u.deepMerge=v,u.fileTypes=O,u.filterEmpty=M,u.filterTree=le,u.findSourceByTree=ae,u.findValueAndAncestors=Ge,u.formatDuraton=Xe,u.formatNumber=$,u.genColumnKey=Ve,u.generateVidoePicture=b,u.getBase64=ke,u.getBlobUrl=Qe,u.getFileSuffix=B,u.getLevelData=ue,u.getMaxFloor=fe,u.getMediaInfos=de,u.getPrefixCls=Me,u.getRandomNumber=ce,u.getScroll=H,u.getScrollContainer=pe,u.getSlot=ne,u.getSlotVNode=re,u.getSlotsChildren=Fe,u.getSlotsProps=De,u.getSortIndex=xe,u.getSymbols=G,u.getTextWidth=ut,u.getValueFromObjectByKey=U,u.getVideoCoverPicture=tt,u.getVideoFileUrl=se,u.handleCurrentPage=We,u.handleShowIndex=be,u.hanndleEmptyField=Ze,u.is=_,u.isArray=y,u.isBase64=I,u.isBoolean=m,u.isBrowser=Te,u.isDataURLBase64=nt,u.isDeepEqualReact=R,u.isEmptyElement=te,u.isFunction=ye,u.isImg=Ee,u.isInContainer=Se,u.isJSONStr=ge,u.isMobile=me,u.isNil=j,u.isNotNil=Le,u.isNumber=h,u.isObject=g,u.isPlainObject=D,u.isPrimitive=Q,u.isScroll=q,u.isServer=S,u.isString=W,u.isTablet=x,u.isTypedArray=k,u.isUrl=Re,u.isWindowsOs=ot,u.merge=Be,u.nanoid=Ie,u.off=it,u.omitBoolean=Ue,u.omitUndefined=Ne,u.omitUndefinedAndEmptyArr=Pe,u.on=rt,u.raf=E,u.runFunction=$e,u.scrollTo=ve,u.slotRender=V,u.throttleByAnimationFrame=Oe,u.toChinesNum=lt,u.toConvertNumberShow=ft,u.treeData=Ye,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})});
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -150,6 +150,23 @@ export declare function treeData<T extends RecordType = RecordType>(source: T[],
|
|
|
150
150
|
rootId?: number;
|
|
151
151
|
emptyChildren?: boolean;
|
|
152
152
|
}): T[];
|
|
153
|
+
/**
|
|
154
|
+
* @Author gx12358
|
|
155
|
+
* @DateTime 2024/12/21
|
|
156
|
+
* @lastTime 2024/12/21
|
|
157
|
+
* @description 树形数组 按照条件 过滤
|
|
158
|
+
*/
|
|
159
|
+
export declare function filterTree<T = any>(tree: T[], predicate: (val: T) => boolean): any[];
|
|
160
|
+
/**
|
|
161
|
+
* @Author gx12358
|
|
162
|
+
* @DateTime 2024/12/21
|
|
163
|
+
* @lastTime 2024/12/21
|
|
164
|
+
* @description 给定指定的value值,找到其所有的祖先节点
|
|
165
|
+
*/
|
|
166
|
+
export declare function findValueAndAncestors<T = any>(tree: T[], targetValue: any, fieldNames: {
|
|
167
|
+
value: 'value';
|
|
168
|
+
children: 'children';
|
|
169
|
+
}): any[];
|
|
153
170
|
/**
|
|
154
171
|
* @Author gx12358
|
|
155
172
|
* @DateTime 2024/12/6
|
|
@@ -294,3 +311,10 @@ export declare function getTextWidth(str: string, options: {
|
|
|
294
311
|
removeAfter?: boolean;
|
|
295
312
|
cssObject?: CSSProperties;
|
|
296
313
|
}): number;
|
|
314
|
+
/**
|
|
315
|
+
* @Author gx12358
|
|
316
|
+
* @DateTime 2022/8/4
|
|
317
|
+
* @lastTime 2022/8/4
|
|
318
|
+
* @description 数字转中文
|
|
319
|
+
*/
|
|
320
|
+
export declare function toChinesNum(num: number): string;
|