@gx-design-vue/pro-utils 0.2.0-beta.57 → 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/pro-utils.js CHANGED
@@ -1,26 +1,71 @@
1
- import { Comment as J, Fragment as V, isVNode as v } from "vue";
2
- function X(e, t) {
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 w(e) {
50
+ function m(e) {
6
51
  return typeof e == "boolean";
7
52
  }
8
- function y(e) {
53
+ function a(e) {
9
54
  return typeof e == "number";
10
55
  }
11
- function a(e) {
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 d(e) {
15
- return e !== null && X(e, "Object");
59
+ function h(e) {
60
+ return e !== null && Z(e, "Object");
16
61
  }
17
- function Z(e) {
62
+ function X(e) {
18
63
  return typeof e == "string" || e instanceof String;
19
64
  }
20
- function we(e) {
65
+ function Ae(e) {
21
66
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Function]";
22
67
  }
23
- function he(e) {
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 xe() {
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 (Z(r))
91
+ if (X(r))
47
92
  t.push(r);
48
- else if (a(r))
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 (d(r))
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 z(e, t) {
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 O = typeof window > "u";
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 E = function(e, t) {
121
+ const C = function(e, t) {
77
122
  var n;
78
- if (O || !e || !t)
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
- }, K = (e, t) => O ? void 0 : (t == null ? E(e, "overflow") : t ? E(e, "overflow-y") : E(e, "overflow-x")).match(/(scroll|auto|overlay)/), Ae = (e, t) => {
91
- if (O)
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 (K(n, t))
142
+ if (k(n, t))
98
143
  return n;
99
144
  n = n.parentNode;
100
145
  }
101
146
  return n;
102
- }, ve = (e, t) => {
103
- if (O || !e || !t)
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 j(e, t) {
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), H = (e) => clearTimeout(e);
126
- typeof window < "u" && "requestAnimationFrame" in window && (W = (e) => window.requestAnimationFrame(e), H = (e) => window.cancelAnimationFrame(e));
127
- let F = 0;
128
- const D = /* @__PURE__ */ new Map();
129
- function q(e) {
130
- D.delete(e);
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 T(e, t = 1) {
133
- F += 1;
134
- const n = F;
177
+ function R(e, t = 1) {
178
+ P += 1;
179
+ const n = P;
135
180
  function r(i) {
136
181
  if (i === 0)
137
- q(n), e();
182
+ z(n), e();
138
183
  else {
139
184
  const o = W(() => {
140
185
  r(i - 1);
141
186
  });
142
- D.set(n, o);
187
+ U.set(n, o);
143
188
  }
144
189
  }
145
190
  return r(t), n;
146
191
  }
147
- T.cancel = (e) => {
148
- const t = D.get(e);
149
- return q(t), H(t);
192
+ R.cancel = (e) => {
193
+ const t = U.get(e);
194
+ return z(t), b(t);
150
195
  };
151
- function k(e, t, n, r) {
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 Oe(e, t = {}) {
156
- const { getContainer: n = () => window, callback: r, duration: i = 450 } = t, o = n(), u = j(o, !0), f = Date.now(), c = () => {
157
- const l = Date.now() - f, m = k(l > i ? i : l, u, e, i);
158
- I(o) ? o.scrollTo(window.pageXOffset, m) : o instanceof HTMLDocument || o.constructor.name === "HTMLDocument" ? o.documentElement.scrollTop = m : o.scrollTop = m, l < i ? T(c) : typeof r == "function" && r();
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 && T(c);
205
+ o && R(u);
161
206
  }
162
- function Se(e) {
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 S(e) {
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], u = Object.getOwnPropertyDescriptor(e, o);
252
- (u == null || u.writable) && (e[o] = p(t[o], n));
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, Ee = () => process.env.NODE_ENV === "TEST" ? !0 : typeof window < "u" && typeof window.document < "u" && typeof window.matchMedia < "u" && !re;
256
- function R(e, t, n, r) {
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, u;
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 (!R(e[o], t[o], n, r))
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 (!R(o[1], t.get(o[0]), n, r))
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 (u = Object.keys(e), i = u.length, i !== Object.keys(t).length)
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, u[o]))
352
+ if (!Object.prototype.hasOwnProperty.call(t, c[o]))
308
353
  return !1;
309
354
  for (o = i; o-- !== 0; ) {
310
- const f = u[o];
311
- if (!(n != null && n.includes(f)) && !(f === "_owner" && e.$$typeof) && !R(e[f], t[f], n, r))
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, Ie = (e) => {
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 L(e) {
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 Te = (...e) => {
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 h(e, t, n) {
348
- const r = w(n == null ? void 0 : n.omitNil) ? n == null ? void 0 : n.omitNil : !0, i = w(n == null ? void 0 : n.omitEmpty) ? n == null ? void 0 : n.omitEmpty : !0, o = Object.keys(t);
349
- for (let u = 0; u < o.length; u++) {
350
- const f = o[u], c = t[f], s = e[f];
351
- Array.isArray(c) ? Array.isArray(s) ? c.length === 0 && !i ? e[f] = c : e[f] = h(s, c, n) : e[f] = h([], c, n) : L(c) ? L(s) ? Object.keys(c).length === 0 && !i ? e[f] = c : e[f] = h(s, c, n) : e[f] = h({}, c, n) : r ? (s === void 0 || !ie(c)) && (e[f] = c) : e[f] = c;
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 C = 0;
356
- const M = (e = 21) => {
400
+ let L = 0;
401
+ const N = (e = 21) => {
357
402
  if (typeof window > "u" || !window.crypto)
358
- return (C += 1).toFixed(0);
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
- }, Ue = () => typeof window > "u" ? M() : window.crypto && window.crypto.randomUUID && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : M(), De = (e) => {
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,158 +417,158 @@ 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
- }, Be = (e) => {
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 P(e) {
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 === V && e.children.length === 0 || e.type === Text && e.children.trim() === "");
433
+ return e && (e.type === J || e.type === _ && e.children.length === 0 || e.type === Text && e.children.trim() === "");
389
434
  }
390
- function Fe(e, t) {
435
+ function Le(e, t) {
391
436
  var n;
392
- return _((n = e[t]) == null ? void 0 : n.call(e));
437
+ return H((n = e[t]) == null ? void 0 : n.call(e));
393
438
  }
394
- function _(e = []) {
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) === V ? t.push(..._(n.children)) : t.push(n);
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 b(e, ...t) {
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 = P(n);
449
+ const i = D(n);
405
450
  if (i) {
406
451
  let o;
407
- const u = z(t, n);
408
- return u === !1 ? o = !1 : u === !0 ? o = e == null ? void 0 : e[i] : d(u) && r ? v(u) ? o = u : o = e == null ? void 0 : e[i] : o = u || (e == null ? void 0 : e[i]), r ? v(o) ? o : b(o) : o;
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 ue(e, t, n = "default", r) {
412
- var o, u, f;
413
- const i = P(n);
456
+ function ce(e, t, n = "default", r) {
457
+ var o, c, f;
458
+ const i = D(n);
414
459
  if (i) {
415
- let c;
416
- const s = z(t, n);
417
- return s === !1 ? c = !1 : s === !0 ? c = (o = e == null ? void 0 : e[i]) == null ? void 0 : o.call(e, r) : d(s) ? v(s) ? c = s : c = (u = e == null ? void 0 : e[i]) == null ? void 0 : u.call(e, r) : c = s || ((f = e == null ? void 0 : e[i]) == null ? void 0 : f.call(e, r)), v(c) ? c : b(c, r);
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 Le(e, t, n, r) {
465
+ function Ne(e, t, n, r) {
421
466
  const i = {};
422
467
  return e.forEach((o) => {
423
- const u = P(o);
424
- if (u) {
425
- const f = r != null && r.render ? ue(t, n, o, r == null ? void 0 : r.params) : fe(t, n, o);
426
- (w(f) || f) && (i[u] = f);
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 A = {
475
+ const x = {
431
476
  videoAllowType: [
432
477
  "mp4",
433
478
  "webm",
434
479
  "ogg"
435
480
  ],
436
481
  audioAllowType: [
437
- ".mp3",
482
+ "mp3",
438
483
  // 最常见的音频格式,兼容性最广
439
- ".ogg",
484
+ "ogg",
440
485
  // Ogg 容器,通常使用 Vorbis 或 Opus 编码
441
- ".wav",
486
+ "wav",
442
487
  // 无损音频格式,支持 PCM 编码
443
- ".aac",
488
+ "aac",
444
489
  // 广泛支持,特别是在移动设备和现代浏览器中
445
- ".m4a",
490
+ "m4a",
446
491
  // 通常是 AAC 或 ALAC 编码,现代浏览器支持良好
447
- ".webm"
492
+ "webm"
448
493
  // WebM 容器,支持 Opus 编码,主要用于现代浏览器
449
494
  ],
450
495
  imageType: [
451
496
  // 位图格式 (Raster Graphics)
452
- ".jpeg",
453
- ".jpg",
454
- ".png",
455
- ".gif",
456
- ".bmp",
457
- ".tiff",
458
- ".tif",
459
- ".webp",
460
- ".heic",
461
- ".heif",
497
+ "jpeg",
498
+ "jpg",
499
+ "png",
500
+ "gif",
501
+ "bmp",
502
+ "tiff",
503
+ "tif",
504
+ "webp",
505
+ "heic",
506
+ "heif",
462
507
  // 矢量格式 (Vector Graphics)
463
- ".svg",
508
+ "svg",
464
509
  // 特定场景格式
465
- ".ico",
466
- ".raw",
467
- ".cr2",
468
- ".nef",
469
- ".arw",
470
- ".dng",
471
- ".psd",
472
- ".eps"
510
+ "ico",
511
+ "raw",
512
+ "cr2",
513
+ "nef",
514
+ "arw",
515
+ "dng",
516
+ "psd",
517
+ "eps"
473
518
  ],
474
519
  videoType: [
475
520
  // 常见视频格式
476
- ".mp4",
477
- ".avi",
478
- ".mov",
479
- ".wmv",
480
- ".mkv",
481
- ".flv",
482
- ".webm",
483
- ".mpeg",
484
- ".mpg",
485
- ".3gp",
486
- ".ogv",
521
+ "mp4",
522
+ "avi",
523
+ "mov",
524
+ "wmv",
525
+ "mkv",
526
+ "flv",
527
+ "webm",
528
+ "mpeg",
529
+ "mpg",
530
+ "3gp",
531
+ "ogv",
487
532
  // 专业或特定用途格式
488
- ".mxf",
489
- ".vob",
490
- ".rm",
491
- ".rmvb",
492
- ".ts",
493
- ".mts",
494
- ".m2ts",
533
+ "mxf",
534
+ "vob",
535
+ "rm",
536
+ "rmvb",
537
+ "ts",
538
+ "mts",
539
+ "m2ts",
495
540
  // 视频编解码器封装格式
496
- ".divx",
497
- ".xvid"
541
+ "divx",
542
+ "xvid"
498
543
  ],
499
544
  audioType: [
500
545
  // 常见音频格式
501
- ".mp3",
502
- ".wav",
503
- ".aac",
504
- ".flac",
505
- ".ogg",
506
- ".wma",
507
- ".m4a",
508
- ".alac",
509
- ".opus",
510
- ".amr",
546
+ "mp3",
547
+ "wav",
548
+ "aac",
549
+ "flac",
550
+ "ogg",
551
+ "wma",
552
+ "m4a",
553
+ "alac",
554
+ "opus",
555
+ "amr",
511
556
  // 专业或特定用途格式
512
- ".aiff",
513
- ".au",
514
- ".pcm",
515
- ".ape"
557
+ "aiff",
558
+ "au",
559
+ "pcm",
560
+ "ape"
516
561
  ]
517
562
  };
518
- function Ce(e) {
563
+ function Me(e) {
519
564
  return e != null;
520
565
  }
521
- const Me = ({ suffixCls: e, customizePrefixCls: t, isPor: n, className: r }) => {
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
- }, $e = (e, t) => e ? a(e) ? e.join("-") : e.toString() : `${t || 0}`;
525
- function Ne(e, { align: t, showIndex: n }) {
526
- const r = S(e);
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: le().uuid(15),
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 Ve(e, ...t) {
587
+ function We(e, ...t) {
543
588
  return typeof e == "function" ? e(...t) : e;
544
589
  }
545
- function ze(e) {
590
+ function be(e) {
546
591
  return JSON.parse(JSON.stringify(e));
547
592
  }
548
- function We(e, t) {
549
- if (d(e)) {
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((u, f) => {
559
- const c = `${i}-${f + 1}`;
560
- return u[n] && (u[n] = r(c, u[n])), u.sortIndex = c, u;
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 S(e).map((i, o) => {
564
- const u = d(t) && t.current || 1, f = d(t) && t.pageSize || 10, c = `${u ? (u - 1) * f + (o + 1) : o + 1}`;
565
- return i[n] && (i[n] = r(`${c}`, i[n])), i.sortIndex = c, i;
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 a(e) ? e == null ? void 0 : e.filter((n, r) => {
570
- if (y(t))
614
+ return d(e) ? e == null ? void 0 : e.filter((n, r) => {
615
+ if (a(t))
571
616
  return r <= t - 1;
572
- if (a(t) && t.length === 2) {
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 (a(t) && t.length === 1) {
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 ce(e, t, n, r = 0) {
583
- const i = y(r) && (r === 0 || r === 1) ? r : 0, o = e[n], u = t[n];
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 < u ? f = i === 0 ? -1 : 0 : o > u && (f = i === 0 ? 0 : -1), f;
630
+ return o < c ? f = i === 0 ? -1 : 0 : o > c && (f = i === 0 ? 0 : -1), f;
586
631
  }
587
- function se(e, t, n, r = 0) {
588
- const i = y(r) && (r === 0 || r === 1) ? r : 0, o = new Date(e[n]), u = new Date(t[n]);
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 < u ? f = i === 0 ? -1 : 0 : o > u && (f = i === 0 ? 0 : -1), f;
635
+ return o < c ? f = i === 0 ? -1 : 0 : o > c && (f = i === 0 ? 0 : -1), f;
591
636
  }
592
- function _e(e, t, n = 0) {
593
- return e.sort((r, i) => ce(r, i, t, n));
637
+ function Je(e, t, n = 0) {
638
+ return e.sort((r, i) => ue(r, i, t, n));
594
639
  }
595
- function be(e, t, n = 0) {
596
- return e.sort((r, i) => se(r, i, t, n));
640
+ function Ze(e, t, n = 0) {
641
+ return e.sort((r, i) => le(r, i, t, n));
597
642
  }
598
- function Je(e) {
599
- let t = S(e);
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 Xe(e, t) {
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 Ze(e) {
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 le() {
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 u, f;
672
+ let c, f;
628
673
  if (t)
629
- for (u = 0; u < t; u += 1)
630
- i[u] = r[Number.parseInt(String(Math.random() * o))];
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", u = 0; u < 36; u += 1)
633
- i[u] || (f = Math.random() * 16, i[u] = r[u === 19 ? f && 3 || 8 : f]);
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), a(r[t]) && r[t].length > 0 && (n = n.concat(de(r[t], t)));
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 Ye(e, t) {
670
- if (!e || !a(e) || (e == null ? void 0 : e.length) === 0)
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: u = !0 } = t || {}, f = S(e);
673
- return f.map((c) => {
674
- var s;
675
- return !u && c[i] && ((s = c[i]) == null ? void 0 : s.length) === 0 && delete c[i], c;
676
- }).filter((c) => {
677
- const s = f.filter((l) => c[n] === l[r]);
678
- return s.length > 0 ? c[i] = s : u && (c[i] = []), c[r] === o;
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 u = o[i];
687
- if (u) {
688
- const f = pe(u, t, n);
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 Ge(e) {
762
+ function Ke(e) {
695
763
  return URL.createObjectURL(e);
696
764
  }
697
- function Qe(e) {
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 Ke(e) {
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 je(e, t) {
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 u = new Uint8Array(o);
782
+ const c = new Uint8Array(o);
715
783
  for (; o--; )
716
- u[o] = i.charCodeAt(o);
717
- return new File([u], t, { type: r });
784
+ c[o] = i.charCodeAt(o);
785
+ return new File([c], t, { type: r });
718
786
  }
719
- function ke(e, t, n) {
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 U(e) {
729
- var r, i, o, u, f;
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 = (u = `${(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 : u.split(".")) == null ? void 0 : f[1]) || "";
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 x(e, t) {
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 = U(e).toLowerCase(), A.imageType.includes(n) ? "1" : A.videoType.includes(n) ? "3" : A.audioType.includes(n) ? "2" : "4";
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 me(e) {
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((u) => {
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, u(i), f = null;
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, u(i), f = null;
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(), u(i), f = null;
824
+ o(), c(i), f = null;
757
825
  };
758
826
  });
759
827
  }
760
- async function et(e) {
828
+ async function rt(e) {
761
829
  const { url: t = "", currentTime: n, videoSuffix: r = "", vidoeAllowPlay: i = !1 } = e;
762
- let o = "", u = r, f = "1", c;
763
- return t instanceof File ? (o = URL.createObjectURL(t), u = U(t.name), f = x(t.name)) : t instanceof Blob ? (o = URL.createObjectURL(t), f = x(t)) : B(t) ? (o = t, f = x(t)) : (t.includes("https") || t.includes("http")) && (o = t, u = U(t), f = x(t)), (u ? A.videoAllowType.includes(u.toLowerCase()) : !1) ? i ? $(o, n) : (c = await me({
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
- }), c.play ? $(o, n) : new Promise((l) => {
767
- l("");
768
- })) : new Promise((l) => {
769
- l("");
834
+ }), u.play ? M(o, n) : new Promise((s) => {
835
+ s("");
836
+ })) : new Promise((s) => {
837
+ s("");
770
838
  });
771
839
  }
772
- async function $(e, t = 0) {
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((m) => i = m);
781
- const o = document.createElement("canvas"), u = 0.8, f = o.getContext("2d"), c = (r == null ? void 0 : r.videoWidth) || 0 * u, s = (r == null ? void 0 : r.videoHeight) || 0 * u, l = 0;
782
- o.width = (r == null ? void 0 : r.videoWidth) || 0 * u, o.height = (r == null ? void 0 : r.videoHeight) || 0 * u, r && f.drawImage(r, 0, 0, c + l, s + l), r = null, n(c === 0 || s === 0 ? "" : o.toDataURL("image/png", 1));
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 tt(e) {
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 nt(e, t, n, r = !1) {
865
+ function ot(e, t, n, r = !1) {
798
866
  e && t && n && e.addEventListener(t, n, r);
799
867
  }
800
- function rt(e, t, n, r = !1) {
868
+ function ft(e, t, n, r = !1) {
801
869
  e && t && n && e.removeEventListener(t, n, r);
802
870
  }
803
- function it() {
871
+ function ct() {
804
872
  return /windows|win32/i.test(navigator.userAgent);
805
873
  }
806
- function ot(e) {
807
- return w(e) ? e : !!e;
874
+ function ut(e) {
875
+ return m(e) ? e : !!e;
808
876
  }
809
- function N(e, t) {
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 [u, f] = o.split(".");
882
+ const [c, f] = o.split(".");
815
883
  if (/^0*$/.test(f))
816
- return u;
884
+ return c;
817
885
  }
818
886
  return o;
819
887
  }
820
888
  return t.toString();
821
889
  }
822
- function ft(e, t) {
823
- const { toChinese: n = !1, fixed: r = 2, min: i = 1e4 } = t || {}, o = y(i) ? i : 1e4, u = y(r) ? r : 2, f = n ? e < o ? "" : e < 1e8 ? "万" : "亿" : e < o ? "" : e < 1e8 ? "w" : "亿";
824
- if (!y(e))
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 (u === 0) {
835
- const s = (e / (e < 1e8 ? 1e4 : 1e8)).toFixed(1).split(".")[0];
902
+ if (c === 0) {
903
+ const l = (e / (e < 1e8 ? 1e4 : 1e8)).toFixed(1).split(".")[0];
836
904
  return {
837
- str: `${s}${f}`,
838
- number: s,
905
+ str: `${l}${f}`,
906
+ number: l,
839
907
  unit: f
840
908
  };
841
909
  }
842
- let c;
843
- return e < 1e8 ? (c = N(u, e / 1e4), {
844
- str: c + f,
845
- number: c,
910
+ let u;
911
+ return e < 1e8 ? (u = $(c, e / 1e4), {
912
+ str: u + f,
913
+ number: u,
846
914
  unit: f
847
- }) : (c = N(u, e / 1e8), {
848
- str: c + f,
849
- number: c,
915
+ }) : (u = $(c, e / 1e8), {
916
+ str: u + f,
917
+ number: u,
850
918
  unit: f
851
919
  });
852
920
  }
853
- function ut(e, t) {
921
+ function st(e, t) {
854
922
  let n = 0;
855
- const r = w(t.removeAfter) ? t.removeAfter : !0, i = t.id || "hiddenElement", o = {
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 u = document.querySelector(`#${i}`);
864
- if (!u) {
865
- const c = document.createElement("div");
866
- c.id = i, document.body.appendChild(c), u = document.querySelector(`#${i}`);
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(u.style, o);
936
+ Object.assign(c.style, o);
869
937
  const f = document.createElement(t.createName || "span");
870
- return f.innerHTML = e, (t.cssObject || d(t.cssObject)) && Object.assign(f.style, t.cssObject), u.append(f), n = f.getBoundingClientRect()[t.type || "width"], r && u.removeChild(f), n;
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
- Je as arrayRepeat,
955
+ we as Base64,
956
+ Xe as arrayRepeat,
874
957
  qe as arraySlice,
875
- ke as blobToDataURL,
876
- x as checkFileType,
958
+ nt as blobToDataURL,
959
+ A as checkFileType,
877
960
  G as classNames,
878
- S as cloneDeep,
879
- ce as compareArray,
880
- _e as compareArraySort,
881
- be as compareArrayTimeSort,
882
- se as compareTime,
883
- ot as convertValueBoolean,
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
- Ke as dataURLtoBlob,
886
- je as dataURLtoFile,
887
- ze as deepCopy,
888
- h as deepMerge,
889
- A as fileTypes,
890
- _ as filterEmpty,
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
- Ze as formatDuraton,
893
- N as formatNumber,
894
- $e as genColumnKey,
895
- $ as generateVidoePicture,
896
- Qe as getBase64,
897
- Ge as getBlobUrl,
898
- U as getFileSuffix,
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
- me as getMediaInfos,
902
- Me as getPrefixCls,
903
- le as getRandomNumber,
904
- j as getScroll,
905
- Ae as getScrollContainer,
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
- ue as getSlotVNode,
908
- Fe as getSlotsChildren,
909
- Le as getSlotsProps,
992
+ ce as getSlotVNode,
993
+ Le as getSlotsChildren,
994
+ Ne as getSlotsProps,
910
995
  He as getSortIndex,
911
996
  ee as getSymbols,
912
- ut as getTextWidth,
913
- z as getValueFromObjectByKey,
914
- et as getVideoCoverPicture,
997
+ st as getTextWidth,
998
+ V as getValueFromObjectByKey,
999
+ rt as getVideoCoverPicture,
915
1000
  ye as getVideoFileUrl,
916
- We as handleCurrentPage,
917
- Ne as handleShowIndex,
918
- Xe as hanndleEmptyField,
919
- X as is,
920
- a as isArray,
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
- w as isBoolean,
923
- Ee as isBrowser,
924
- tt as isDataURLBase64,
925
- R as isDeepEqualReact,
1007
+ m as isBoolean,
1008
+ Ie as isBrowser,
1009
+ it as isDataURLBase64,
1010
+ E as isDeepEqualReact,
926
1011
  oe as isEmptyElement,
927
- we as isFunction,
1012
+ Ae as isFunction,
928
1013
  Re as isImg,
929
- ve as isInContainer,
930
- he as isJSONStr,
931
- xe as isMobile,
1014
+ Oe as isInContainer,
1015
+ xe as isJSONStr,
1016
+ Se as isMobile,
932
1017
  ie as isNil,
933
- Ce as isNotNil,
934
- y as isNumber,
935
- d as isObject,
936
- L as isPlainObject,
1018
+ Me as isNotNil,
1019
+ a as isNumber,
1020
+ h as isObject,
1021
+ F as isPlainObject,
937
1022
  te as isPrimitive,
938
- K as isScroll,
939
- O as isServer,
940
- Z as isString,
1023
+ k as isScroll,
1024
+ v as isServer,
1025
+ X as isString,
941
1026
  Y as isTablet,
942
1027
  ne as isTypedArray,
943
- Ie as isUrl,
944
- it as isWindowsOs,
945
- Te as merge,
946
- Ue as nanoid,
947
- rt as off,
948
- De as omitBoolean,
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
- Be as omitUndefinedAndEmptyArr,
951
- nt as on,
952
- T as raf,
953
- Ve as runFunction,
954
- Oe as scrollTo,
955
- b as slotRender,
956
- Se as throttleByAnimationFrame,
957
- ft as toConvertNumberShow,
958
- Ye as treeData
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
  };