@gx-design-vue/pro-utils 0.2.0-beta.54 → 0.2.0-beta.55

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,8 +1,8 @@
1
- import { Comment as J, Fragment as N, isVNode as O } from "vue";
2
- function X(e, t) {
1
+ import { Comment as X, Fragment as z, isVNode as v } from "vue";
2
+ function Z(e, t) {
3
3
  return Object.prototype.toString.call(e) === `[object ${t}]`;
4
4
  }
5
- function U(e) {
5
+ function w(e) {
6
6
  return typeof e == "boolean";
7
7
  }
8
8
  function y(e) {
@@ -12,15 +12,15 @@ function a(e) {
12
12
  return typeof Array.isArray > "u" ? Object.prototype.toString.call(e) === "[object Array]" : Array.isArray(e);
13
13
  }
14
14
  function d(e) {
15
- return e !== null && X(e, "Object");
15
+ return e !== null && Z(e, "Object");
16
16
  }
17
- function Z(e) {
17
+ function Y(e) {
18
18
  return typeof e == "string" || e instanceof String;
19
19
  }
20
20
  function we(e) {
21
21
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Function]";
22
22
  }
23
- function me(e) {
23
+ function he(e) {
24
24
  if (typeof e != "string")
25
25
  return !1;
26
26
  try {
@@ -30,24 +30,24 @@ function me(e) {
30
30
  return !1;
31
31
  }
32
32
  }
33
- function he() {
33
+ function xe() {
34
34
  const e = navigator.userAgent || navigator.vendor;
35
- return !!(/iPhone/.test(e) || /Android/.test(e) && /Mobile/.test(e) || /Windows Phone/.test(e) || /Mobile/.test(e) && !Y());
35
+ return !!(/iPhone/.test(e) || /Android/.test(e) && /Mobile/.test(e) || /Windows Phone/.test(e) || /Mobile/.test(e) && !G());
36
36
  }
37
- function Y() {
37
+ function G() {
38
38
  const e = navigator.userAgent || navigator.vendor;
39
39
  return !!(/iPad/.test(e) || /Macintosh/.test(e) && "ontouchend" in document || /Android/.test(e) && !/Mobile/.test(e));
40
40
  }
41
- function G(...e) {
41
+ function Q(...e) {
42
42
  const t = [];
43
43
  for (let n = 0; n < e.length; n++) {
44
44
  const r = e[n];
45
45
  if (r) {
46
- if (Z(r))
46
+ if (Y(r))
47
47
  t.push(r);
48
48
  else if (a(r))
49
49
  for (let i = 0; i < r.length; i++) {
50
- const o = G(r[i]);
50
+ const o = Q(r[i]);
51
51
  o && t.push(o);
52
52
  }
53
53
  else if (d(r))
@@ -57,82 +57,25 @@ function G(...e) {
57
57
  }
58
58
  return t.filter((n) => n).join(" ");
59
59
  }
60
- function z(e, t) {
60
+ function W(e, t) {
61
61
  if (typeof t != "string" && !Array.isArray(t))
62
62
  return;
63
63
  const n = Array.isArray(t) ? t : t.split(":");
64
64
  let r = e;
65
65
  for (let i = 0; i < n.length; i++)
66
- if (r && r.hasOwnProperty(n[i]))
66
+ if (r && Object.prototype.hasOwnProperty.call(r, n[i]))
67
67
  r = r[n[i]];
68
68
  else
69
69
  return;
70
70
  return r;
71
71
  }
72
- function xe(e) {
73
- return /\w.(png|jpg|jpeg|svg|webp|gif|bmp)$/i.test(e);
74
- }
75
- const Oe = (e) => e == null, A = typeof window > "u", Ae = (e) => {
76
- if (!e || !e.startsWith("http"))
77
- return !1;
78
- try {
79
- return !!new URL(e);
80
- } catch {
81
- return !1;
82
- }
83
- };
84
- function B(e) {
85
- if (!e || typeof e != "object")
86
- return !1;
87
- const t = Object.getPrototypeOf(e);
88
- return t === null || t === Object.prototype || Object.getPrototypeOf(t) === null ? Object.prototype.toString.call(e) === "[object Object]" : !1;
89
- }
90
- const ve = (...e) => {
91
- const t = {}, n = e.length;
92
- let r, i = 0;
93
- for (; i < n; i += 1)
94
- for (r in e[i])
95
- 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] = {
96
- ...t[r],
97
- ...e[i][r]
98
- } : t[r] = e[i][r]);
99
- return t;
100
- };
101
- function m(e, t, n) {
102
- const r = U(n == null ? void 0 : n.omitUndefined) ? n == null ? void 0 : n.omitUndefined : !0, i = Object.keys(t);
103
- for (let o = 0; o < i.length; o++) {
104
- const f = i[o], u = t[f], c = e[f];
105
- Array.isArray(u) ? Array.isArray(c) ? e[f] = m(c, u, n) : e[f] = m([], u, n) : B(u) ? B(c) ? Object.keys(u).length === 0 ? e[f] = u : e[f] = m(c, u, n) : e[f] = m({}, u, n) : r ? c === void 0 && u !== void 0 && (e[f] = u) : e[f] = u;
106
- }
107
- return e;
72
+ const O = typeof window > "u";
73
+ function K(e) {
74
+ return e.replace(/[-_](.)/g, (t, n) => n.toUpperCase());
108
75
  }
109
- let L = 0;
110
- const C = (e = 21) => {
111
- if (typeof window > "u" || !window.crypto)
112
- return (L += 1).toFixed(0);
113
- let t = "";
114
- const n = crypto.getRandomValues(new Uint8Array(e));
115
- for (; e--; ) {
116
- const r = 63 & n[e];
117
- t += r < 36 ? r.toString(36) : r < 62 ? (r - 26).toString(36).toUpperCase() : r < 63 ? "_" : "-";
118
- }
119
- return t;
120
- }, Se = () => typeof window > "u" ? C() : window.crypto && window.crypto.randomUUID && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : C();
121
- /**
122
- * @vue/shared v3.5.13
123
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
124
- * @license MIT
125
- **/
126
- process.env.NODE_ENV !== "production" && Object.freeze({});
127
- process.env.NODE_ENV !== "production" && Object.freeze([]);
128
- const Q = (e) => {
129
- const t = /* @__PURE__ */ Object.create(null);
130
- return (n) => t[n] || (t[n] = e(n));
131
- }, j = /-(\w)/g, K = Q(
132
- (e) => e.replace(j, (t, n) => n ? n.toUpperCase() : "")
133
- ), S = function(e, t) {
76
+ const E = function(e, t) {
134
77
  var n;
135
- if (A || !e || !t)
78
+ if (O || !e || !t)
136
79
  return "";
137
80
  t = K(t), t === "float" && (t = "cssFloat");
138
81
  try {
@@ -144,20 +87,20 @@ const Q = (e) => {
144
87
  } catch {
145
88
  return e.style[t];
146
89
  }
147
- }, k = (e, t) => A ? void 0 : (t == null ? S(e, "overflow") : t ? S(e, "overflow-y") : S(e, "overflow-x")).match(/(scroll|auto|overlay)/), Ee = (e, t) => {
148
- if (A)
90
+ }, j = (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)
149
92
  return;
150
93
  let n = e;
151
94
  for (; n; ) {
152
95
  if ([window, document, document.documentElement].includes(n))
153
96
  return window;
154
- if (k(n, t))
97
+ if (j(n, t))
155
98
  return n;
156
99
  n = n.parentNode;
157
100
  }
158
101
  return n;
159
- }, Re = (e, t) => {
160
- if (A || !e || !t)
102
+ }, ve = (e, t) => {
103
+ if (O || !e || !t)
161
104
  return !1;
162
105
  const n = e.getBoundingClientRect();
163
106
  let r;
@@ -168,36 +111,32 @@ const Q = (e) => {
168
111
  left: 0
169
112
  } : r = t.getBoundingClientRect(), n.top < r.bottom && n.bottom > r.top && n.right > r.left && n.left < r.right;
170
113
  };
171
- function R(e) {
114
+ function I(e) {
172
115
  return e != null && e === e.window;
173
116
  }
174
- function ee(e, t) {
117
+ function k(e, t) {
175
118
  var i;
176
119
  if (typeof window > "u")
177
120
  return 0;
178
121
  const n = t ? "scrollTop" : "scrollLeft";
179
122
  let r = 0;
180
- return R(e) ? r = e[t ? "pageYOffset" : "pageXOffset"] : e instanceof Document ? r = e.documentElement[n] : e && (r = e[n]), e && !R(e) && typeof r != "number" && (r = (i = (e.ownerDocument || e).documentElement) == null ? void 0 : i[n]), r;
123
+ 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;
181
124
  }
182
- function te(e, t, n, r) {
183
- const i = n - t;
184
- return e /= r / 2, e < 1 ? i / 2 * e * e * e + t : i / 2 * ((e -= 2) * e * e + 2) + t;
185
- }
186
- let W = (e) => setTimeout(e, 16), H = (e) => clearTimeout(e);
187
- typeof window < "u" && "requestAnimationFrame" in window && (W = (e) => window.requestAnimationFrame(e), H = (e) => window.cancelAnimationFrame(e));
188
- let M = 0;
125
+ let H = (e) => setTimeout(e, 16), q = (e) => clearTimeout(e);
126
+ typeof window < "u" && "requestAnimationFrame" in window && (H = (e) => window.requestAnimationFrame(e), q = (e) => window.cancelAnimationFrame(e));
127
+ let F = 0;
189
128
  const D = /* @__PURE__ */ new Map();
190
129
  function _(e) {
191
130
  D.delete(e);
192
131
  }
193
- function I(e, t = 1) {
194
- M += 1;
195
- const n = M;
132
+ function T(e, t = 1) {
133
+ F += 1;
134
+ const n = F;
196
135
  function r(i) {
197
136
  if (i === 0)
198
137
  _(n), e();
199
138
  else {
200
- const o = W(() => {
139
+ const o = H(() => {
201
140
  r(i - 1);
202
141
  });
203
142
  D.set(n, o);
@@ -205,18 +144,22 @@ function I(e, t = 1) {
205
144
  }
206
145
  return r(t), n;
207
146
  }
208
- I.cancel = (e) => {
147
+ T.cancel = (e) => {
209
148
  const t = D.get(e);
210
- return _(t), H(t);
149
+ return _(t), q(t);
211
150
  };
212
- function Ie(e, t = {}) {
213
- const { getContainer: n = () => window, callback: r, duration: i = 450 } = t, o = n(), f = ee(o, !0), u = Date.now(), c = () => {
214
- const l = Date.now() - u, g = te(l > i ? i : l, f, e, i);
215
- R(o) ? o.scrollTo(window.pageXOffset, g) : o instanceof HTMLDocument || o.constructor.name === "HTMLDocument" ? o.documentElement.scrollTop = g : o.scrollTop = g, l < i ? I(c) : typeof r == "function" && r();
151
+ function ee(e, t, n, r) {
152
+ const i = n - t;
153
+ return e /= r / 2, e < 1 ? i / 2 * e * e * e + t : i / 2 * ((e -= 2) * e * e + 2) + t;
154
+ }
155
+ function Oe(e, t = {}) {
156
+ const { getContainer: n = () => window, callback: r, duration: i = 450 } = t, o = n(), u = k(o, !0), f = Date.now(), c = () => {
157
+ const l = Date.now() - f, m = ee(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();
216
159
  };
217
- o && I(c);
160
+ o && T(c);
218
161
  }
219
- function Te(e) {
162
+ function Se(e) {
220
163
  let t;
221
164
  const n = (i) => () => {
222
165
  t = null, e(...i);
@@ -225,49 +168,20 @@ function Te(e) {
225
168
  };
226
169
  return r.cancel = () => cancelAnimationFrame(t), r;
227
170
  }
228
- const x = {
229
- videoAllowType: [
230
- "mp4",
231
- "webm",
232
- "ogg"
233
- ],
234
- audioAllowType: ["mp3"],
235
- imageType: ["bmp", "png", "gif", "jpg", "jpeg", "psd", "tif"],
236
- videoType: [
237
- "mp4",
238
- "swf",
239
- "rmvb",
240
- "avi",
241
- "flv",
242
- "mpg",
243
- "rm",
244
- "mov",
245
- "asf",
246
- "3gp",
247
- "mkv",
248
- "ts",
249
- "f4v",
250
- "webm",
251
- "m4v",
252
- "3g2",
253
- "m3u8"
254
- ],
255
- audioType: ["mp3", "mpeg", "aac", "wav", "wma", "mp2", "flac", "midi", "ra", "ape", "aac", "cda"]
256
- };
257
- function ne(e) {
171
+ function te(e) {
258
172
  return Object.getOwnPropertySymbols(e).filter((t) => Object.prototype.propertyIsEnumerable.call(e, t));
259
173
  }
260
- function re(e) {
174
+ function ne(e) {
261
175
  return e == null || typeof e != "object" && typeof e != "function";
262
176
  }
263
- function ie(e) {
177
+ function re(e) {
264
178
  return ArrayBuffer.isView(e) && !(e instanceof DataView);
265
179
  }
266
- function v(e) {
180
+ function S(e) {
267
181
  return p(e);
268
182
  }
269
183
  function p(e, t = /* @__PURE__ */ new Map()) {
270
- if (re(e))
184
+ if (ne(e))
271
185
  return e;
272
186
  if (t.has(e))
273
187
  return t.get(e);
@@ -300,7 +214,7 @@ function p(e, t = /* @__PURE__ */ new Map()) {
300
214
  }
301
215
  if (typeof Buffer < "u" && Buffer.isBuffer(e))
302
216
  return e.subarray();
303
- if (ie(e)) {
217
+ if (re(e)) {
304
218
  const n = new (Object.getPrototypeOf(e)).constructor(e.length);
305
219
  t.set(e, n);
306
220
  for (let r = 0; r < e.length; r++)
@@ -311,46 +225,46 @@ function p(e, t = /* @__PURE__ */ new Map()) {
311
225
  return e.slice(0);
312
226
  if (e instanceof DataView) {
313
227
  const n = new DataView(e.buffer.slice(0), e.byteOffset, e.byteLength);
314
- return t.set(e, n), w(n, e, t), n;
228
+ return t.set(e, n), g(n, e, t), n;
315
229
  }
316
230
  if (typeof File < "u" && e instanceof File) {
317
231
  const n = new File([e], e.name, { type: e.type });
318
- return t.set(e, n), w(n, e, t), n;
232
+ return t.set(e, n), g(n, e, t), n;
319
233
  }
320
234
  if (e instanceof Blob) {
321
235
  const n = new Blob([e], { type: e.type });
322
- return t.set(e, n), w(n, e, t), n;
236
+ return t.set(e, n), g(n, e, t), n;
323
237
  }
324
238
  if (e instanceof Error) {
325
239
  const n = new e.constructor();
326
- return t.set(e, n), n.message = e.message, n.name = e.name, n.stack = e.stack, n.cause = e.cause, w(n, e, t), n;
240
+ return t.set(e, n), n.message = e.message, n.name = e.name, n.stack = e.stack, n.cause = e.cause, g(n, e, t), n;
327
241
  }
328
242
  if (typeof e == "object" && e !== null) {
329
243
  const n = {};
330
- return t.set(e, n), w(n, e, t), n;
244
+ return t.set(e, n), g(n, e, t), n;
331
245
  }
332
246
  return e;
333
247
  }
334
- function w(e, t, n) {
335
- const r = [...Object.keys(t), ...ne(t)];
248
+ function g(e, t, n) {
249
+ const r = [...Object.keys(t), ...te(t)];
336
250
  for (let i = 0; i < r.length; i++) {
337
- const o = r[i], f = Object.getOwnPropertyDescriptor(e, o);
338
- (f == null || f.writable) && (e[o] = p(t[o], n));
251
+ const o = r[i], u = Object.getOwnPropertyDescriptor(e, o);
252
+ (u == null || u.writable) && (e[o] = p(t[o], n));
339
253
  }
340
254
  }
341
- const oe = typeof process < "u" && process.versions != null && process.versions.node != null, Ue = () => process.env.NODE_ENV === "TEST" ? !0 : typeof window < "u" && typeof window.document < "u" && typeof window.matchMedia < "u" && !oe;
342
- function E(e, t, n, r) {
255
+ const ie = 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" && !ie;
256
+ function R(e, t, n, r) {
343
257
  if (e === t)
344
258
  return !0;
345
259
  if (e && t && typeof e == "object" && typeof t == "object") {
346
260
  if (e.constructor !== t.constructor)
347
261
  return !1;
348
- let i, o, f;
262
+ let i, o, u;
349
263
  if (Array.isArray(e)) {
350
264
  if (i = e.length, i != t.length)
351
265
  return !1;
352
266
  for (o = i; o-- !== 0; )
353
- if (!E(e[o], t[o], n, r))
267
+ if (!R(e[o], t[o], n, r))
354
268
  return !1;
355
269
  return !0;
356
270
  }
@@ -361,7 +275,7 @@ function E(e, t, n, r) {
361
275
  if (!t.has(o[0]))
362
276
  return !1;
363
277
  for (o of e.entries())
364
- if (!E(o[1], t.get(o[0]), n, r))
278
+ if (!R(o[1], t.get(o[0]), n, r))
365
279
  return !1;
366
280
  return !0;
367
281
  }
@@ -387,21 +301,69 @@ function E(e, t, n, r) {
387
301
  return e.valueOf() === t.valueOf();
388
302
  if (e.toString !== Object.prototype.toString && e.toString)
389
303
  return e.toString() === t.toString();
390
- if (f = Object.keys(e), i = f.length, i !== Object.keys(t).length)
304
+ if (u = Object.keys(e), i = u.length, i !== Object.keys(t).length)
391
305
  return !1;
392
306
  for (o = i; o-- !== 0; )
393
- if (!Object.prototype.hasOwnProperty.call(t, f[o]))
307
+ if (!Object.prototype.hasOwnProperty.call(t, u[o]))
394
308
  return !1;
395
309
  for (o = i; o-- !== 0; ) {
396
- const u = f[o];
397
- if (!(n != null && n.includes(u)) && !(u === "_owner" && e.$$typeof) && !E(e[u], t[u], n, r))
398
- return r && console.log(u), !1;
310
+ const f = u[o];
311
+ if (!(n != null && n.includes(f)) && !(f === "_owner" && e.$$typeof) && !R(e[f], t[f], n, r))
312
+ return r && console.log(f), !1;
399
313
  }
400
314
  return !0;
401
315
  }
402
316
  return e !== e && t !== t;
403
317
  }
404
- const De = (e) => {
318
+ function Re(e) {
319
+ return /\w.(?:png|jpg|jpeg|svg|webp|gif|bmp)$/i.test(e);
320
+ }
321
+ const L = (e) => e == null, Ie = (e) => {
322
+ if (!e || !e.startsWith("http"))
323
+ return !1;
324
+ try {
325
+ return !!new URL(e);
326
+ } catch {
327
+ return !1;
328
+ }
329
+ };
330
+ function C(e) {
331
+ if (!e || typeof e != "object")
332
+ return !1;
333
+ const t = Object.getPrototypeOf(e);
334
+ return t === null || t === Object.prototype || Object.getPrototypeOf(t) === null ? Object.prototype.toString.call(e) === "[object Object]" : !1;
335
+ }
336
+ const Te = (...e) => {
337
+ const t = {}, n = e.length;
338
+ let r, i = 0;
339
+ for (; i < n; i += 1)
340
+ for (r in e[i])
341
+ 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] = {
342
+ ...t[r],
343
+ ...e[i][r]
344
+ } : t[r] = e[i][r]);
345
+ return t;
346
+ };
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) : C(c) ? C(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 && !L(c) && (e[f] = c) : (c || L(c)) && (e[f] = c);
352
+ }
353
+ return e;
354
+ }
355
+ let M = 0;
356
+ const $ = (e = 21) => {
357
+ if (typeof window > "u" || !window.crypto)
358
+ return (M += 1).toFixed(0);
359
+ let t = "";
360
+ const n = crypto.getRandomValues(new Uint8Array(e));
361
+ for (; e--; ) {
362
+ const r = 63 & n[e];
363
+ t += r < 36 ? r.toString(36) : r < 62 ? (r - 26).toString(36).toUpperCase() : r < 63 ? "_" : "-";
364
+ }
365
+ return t;
366
+ }, Ue = () => typeof window > "u" ? $() : window.crypto && window.crypto.randomUUID && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : $(), De = (e) => {
405
367
  if (e && e !== !0)
406
368
  return e;
407
369
  }, Pe = (e) => {
@@ -410,7 +372,7 @@ const De = (e) => {
410
372
  e[n] !== void 0 && (t[n] = e[n]);
411
373
  }), !(Object.keys(t).length < 1))
412
374
  return t;
413
- }, Fe = (e) => {
375
+ }, Be = (e) => {
414
376
  const t = {};
415
377
  return Object.keys(e || {}).forEach((n) => {
416
378
  var r;
@@ -422,55 +384,146 @@ function P(e) {
422
384
  if (!(typeof e != "string" && !Array.isArray(e)))
423
385
  return Array.isArray(e) ? e[e.length - 1] : (t = e.split(":")) == null ? void 0 : t.slice(-1)[0];
424
386
  }
425
- function fe(e) {
426
- return e && (e.type === J || e.type === N && e.children.length === 0 || e.type === Text && e.children.trim() === "");
387
+ function oe(e) {
388
+ return e && (e.type === X || e.type === z && e.children.length === 0 || e.type === Text && e.children.trim() === "");
427
389
  }
428
- function Be(e, t) {
390
+ function Fe(e, t) {
429
391
  var n;
430
- return q((n = e[t]) == null ? void 0 : n.call(e));
392
+ return b((n = e[t]) == null ? void 0 : n.call(e));
431
393
  }
432
- function q(e = []) {
394
+ function b(e = []) {
433
395
  const t = [];
434
396
  return e.forEach((n) => {
435
- Array.isArray(n) ? t.push(...n) : (n == null ? void 0 : n.type) === N ? t.push(...q(n.children)) : t.push(n);
436
- }), t.filter((n) => !fe(n));
397
+ Array.isArray(n) ? t.push(...n) : (n == null ? void 0 : n.type) === z ? t.push(...b(n.children)) : t.push(n);
398
+ }), t.filter((n) => !oe(n));
437
399
  }
438
- function b(e, ...t) {
400
+ function J(e, ...t) {
439
401
  return typeof e == "function" ? e == null ? void 0 : e(...t) : e;
440
402
  }
441
- function ue(e, t, n = "default", r) {
403
+ function fe(e, t, n = "default", r) {
442
404
  const i = P(n);
443
405
  if (i) {
444
406
  let o;
445
- const f = z(t, n);
446
- return f === !1 ? o = !1 : f === !0 ? o = e == null ? void 0 : e[i] : d(f) && r ? O(f) ? o = f : o = e == null ? void 0 : e[i] : o = f || (e == null ? void 0 : e[i]), r ? O(o) ? o : b(o) : o;
407
+ const u = W(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 : J(o) : o;
447
409
  }
448
410
  }
449
- function ce(e, t, n = "default", r) {
450
- var o, f, u;
411
+ function ue(e, t, n = "default", r) {
412
+ var o, u, f;
451
413
  const i = P(n);
452
414
  if (i) {
453
415
  let c;
454
- const s = z(t, n);
455
- return s === !1 ? c = !1 : s === !0 ? c = (o = e == null ? void 0 : e[i]) == null ? void 0 : o.call(e, r) : d(s) ? O(s) ? c = s : c = (f = e == null ? void 0 : e[i]) == null ? void 0 : f.call(e, r) : c = s || ((u = e == null ? void 0 : e[i]) == null ? void 0 : u.call(e, r)), O(c) ? c : b(c, r);
416
+ const s = W(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 : J(c, r);
456
418
  }
457
419
  }
458
420
  function Le(e, t, n, r) {
459
421
  const i = {};
460
422
  return e.forEach((o) => {
461
- const f = P(o);
462
- if (f) {
463
- const u = r != null && r.render ? ce(t, n, o, r == null ? void 0 : r.params) : ue(t, n, o);
464
- (U(u) || u) && (i[f] = u);
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);
465
427
  }
466
428
  }), i;
467
429
  }
468
- const Ce = ({ suffixCls: e, customizePrefixCls: t, isPor: n, className: r }) => {
430
+ const A = {
431
+ videoAllowType: [
432
+ "mp4",
433
+ "webm",
434
+ "ogg"
435
+ ],
436
+ audioAllowType: [
437
+ ".mp3",
438
+ // 最常见的音频格式,兼容性最广
439
+ ".ogg",
440
+ // Ogg 容器,通常使用 Vorbis 或 Opus 编码
441
+ ".wav",
442
+ // 无损音频格式,支持 PCM 编码
443
+ ".aac",
444
+ // 广泛支持,特别是在移动设备和现代浏览器中
445
+ ".m4a",
446
+ // 通常是 AAC 或 ALAC 编码,现代浏览器支持良好
447
+ ".webm"
448
+ // WebM 容器,支持 Opus 编码,主要用于现代浏览器
449
+ ],
450
+ imageType: [
451
+ // 位图格式 (Raster Graphics)
452
+ ".jpeg",
453
+ ".jpg",
454
+ ".png",
455
+ ".gif",
456
+ ".bmp",
457
+ ".tiff",
458
+ ".tif",
459
+ ".webp",
460
+ ".heic",
461
+ ".heif",
462
+ // 矢量格式 (Vector Graphics)
463
+ ".svg",
464
+ // 特定场景格式
465
+ ".ico",
466
+ ".raw",
467
+ ".cr2",
468
+ ".nef",
469
+ ".arw",
470
+ ".dng",
471
+ ".psd",
472
+ ".eps"
473
+ ],
474
+ videoType: [
475
+ // 常见视频格式
476
+ ".mp4",
477
+ ".avi",
478
+ ".mov",
479
+ ".wmv",
480
+ ".mkv",
481
+ ".flv",
482
+ ".webm",
483
+ ".mpeg",
484
+ ".mpg",
485
+ ".3gp",
486
+ ".ogv",
487
+ // 专业或特定用途格式
488
+ ".mxf",
489
+ ".vob",
490
+ ".rm",
491
+ ".rmvb",
492
+ ".ts",
493
+ ".mts",
494
+ ".m2ts",
495
+ // 视频编解码器封装格式
496
+ ".divx",
497
+ ".xvid"
498
+ ],
499
+ audioType: [
500
+ // 常见音频格式
501
+ ".mp3",
502
+ ".wav",
503
+ ".aac",
504
+ ".flac",
505
+ ".ogg",
506
+ ".wma",
507
+ ".m4a",
508
+ ".alac",
509
+ ".opus",
510
+ ".amr",
511
+ // 专业或特定用途格式
512
+ ".aiff",
513
+ ".au",
514
+ ".pcm",
515
+ ".ape"
516
+ ]
517
+ };
518
+ function Ce(e) {
519
+ return e != null;
520
+ }
521
+ const Me = ({ suffixCls: e, customizePrefixCls: t, isPor: n, className: r }) => {
469
522
  const i = r || (n ? "gx-pro" : "gx");
470
523
  return t || (e ? `${i}-${e}` : i);
471
- }, Me = (e, t) => e ? a(e) ? e.join("-") : e.toString() : `${t || 0}`;
472
- function $e(e, { align: t, showIndex: n }) {
473
- const r = v(e);
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);
474
527
  if (n && e.length && e.every((i) => i.dataIndex !== "sortIndex")) {
475
528
  const i = e[0];
476
529
  r.unshift({
@@ -478,7 +531,7 @@ function $e(e, { align: t, showIndex: n }) {
478
531
  align: t,
479
532
  fixed: i.fixed,
480
533
  width: 60,
481
- uuid: ae().uuid(15),
534
+ uuid: le().uuid(15),
482
535
  dataIndex: "sortIndex",
483
536
  key: "sortIndex"
484
537
  });
@@ -489,10 +542,10 @@ function $e(e, { align: t, showIndex: n }) {
489
542
  function Ve(e, ...t) {
490
543
  return typeof e == "function" ? e(...t) : e;
491
544
  }
492
- function Ne(e) {
545
+ function ze(e) {
493
546
  return JSON.parse(JSON.stringify(e));
494
547
  }
495
- function ze(e, t) {
548
+ function We(e, t) {
496
549
  if (d(e)) {
497
550
  const { pageSize: n = 10, total: r = 0 } = e;
498
551
  let { current: i = 1 } = e;
@@ -500,19 +553,19 @@ function ze(e, t) {
500
553
  }
501
554
  return 1;
502
555
  }
503
- function We(e = [], t, n = "children") {
556
+ function He(e = [], t, n = "children") {
504
557
  function r(i, o) {
505
- return o.map((f, u) => {
506
- const c = `${i}-${u + 1}`;
507
- return f[n] && (f[n] = r(c, f[n])), f.sortIndex = c, f;
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;
508
561
  });
509
562
  }
510
- return v(e).map((i, o) => {
511
- const f = d(t) && t.current || 1, u = d(t) && t.pageSize || 10, c = `${f ? (f - 1) * u + (o + 1) : o + 1}`;
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}`;
512
565
  return i[n] && (i[n] = r(`${c}`, i[n])), i.sortIndex = c, i;
513
566
  });
514
567
  }
515
- function He(e, t) {
568
+ function qe(e, t) {
516
569
  return a(e) ? e == null ? void 0 : e.filter((n, r) => {
517
570
  if (y(t))
518
571
  return r <= t - 1;
@@ -526,28 +579,28 @@ function He(e, t) {
526
579
  return !0;
527
580
  }) : [];
528
581
  }
529
- function se(e, t, n, r = 0) {
530
- const i = y(r) && (r === 0 || r === 1) ? r : 0, o = e[n], f = t[n];
531
- let u = 0;
532
- return o < f ? u = i === 0 ? -1 : 0 : o > f && (u = i === 0 ? 0 : -1), u;
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];
584
+ let f = 0;
585
+ return o < u ? f = i === 0 ? -1 : 0 : o > u && (f = i === 0 ? 0 : -1), f;
533
586
  }
534
- function le(e, t, n, r = 0) {
535
- const i = y(r) && (r === 0 || r === 1) ? r : 0, o = new Date(e[n]), f = new Date(t[n]);
536
- let u = 0;
537
- return o < f ? u = i === 0 ? -1 : 0 : o > f && (u = i === 0 ? 0 : -1), u;
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]);
589
+ let f = 0;
590
+ return o < u ? f = i === 0 ? -1 : 0 : o > u && (f = i === 0 ? 0 : -1), f;
538
591
  }
539
592
  function _e(e, t, n = 0) {
540
- return e.sort((r, i) => se(r, i, t, n));
593
+ return e.sort((r, i) => ce(r, i, t, n));
541
594
  }
542
- function qe(e, t, n = 0) {
543
- return e.sort((r, i) => le(r, i, t, n));
595
+ function be(e, t, n = 0) {
596
+ return e.sort((r, i) => se(r, i, t, n));
544
597
  }
545
- function be(e) {
546
- let t = v(e);
598
+ function Je(e) {
599
+ let t = S(e);
547
600
  const n = new Set(t);
548
601
  return t = Array.from(n), t;
549
602
  }
550
- function Je(e, t) {
603
+ function Xe(e, t) {
551
604
  const n = ["null", "undefined"];
552
605
  let r = !0;
553
606
  return e === 0 ? r = !0 : n.includes(e) ? r = !1 : e || (r = !1), r ? {
@@ -558,7 +611,7 @@ function Je(e, t) {
558
611
  success: r
559
612
  };
560
613
  }
561
- function Xe(e) {
614
+ function Ze(e) {
562
615
  let t = "";
563
616
  if (e > -1) {
564
617
  const n = Math.floor(e / 3600), r = Math.floor(e / 60) % 60, i = Number.parseInt(String(e % 60));
@@ -566,18 +619,18 @@ function Xe(e) {
566
619
  }
567
620
  return t.split(":")[0] === "00" ? `${t.split(":")[1]}:${t.split(":")[2]}` : t;
568
621
  }
569
- function ae() {
622
+ function le() {
570
623
  const e = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
571
624
  return {
572
625
  uuid(t, n) {
573
626
  const r = e, i = [], o = n || r.length;
574
- let f, u;
627
+ let u, f;
575
628
  if (t)
576
- for (f = 0; f < t; f += 1)
577
- i[f] = r[Number.parseInt(String(Math.random() * o))];
629
+ for (u = 0; u < t; u += 1)
630
+ i[u] = r[Number.parseInt(String(Math.random() * o))];
578
631
  else
579
- for (i[8] = "-", i[13] = "-", i[18] = "-", i[23] = "-", i[14] = "4", f = 0; f < 36; f += 1)
580
- i[f] || (u = Math.random() * 16, i[f] = r[f === 19 ? u && 3 || 8 : u]);
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]);
581
634
  return i.join("");
582
635
  },
583
636
  uuidFast() {
@@ -598,14 +651,14 @@ function ae() {
598
651
  }
599
652
  };
600
653
  }
601
- function Ze(e = [], t = "children") {
602
- let n = 0;
603
- function r(i = [], o) {
604
- i.forEach((f) => {
605
- f.floor = o, o > n && (n = o), f[t] && f[t].length > 0 && r(f[t], o + 1);
606
- });
607
- }
608
- return r(e, 1), n;
654
+ function ae(e, t) {
655
+ if (!Array.isArray(e) || e.length === 0)
656
+ return 0;
657
+ const n = t || "children";
658
+ return Math.max(...e.map((r) => {
659
+ const i = r[n];
660
+ return 1 + (i ? ae(i, n) : 0);
661
+ }));
609
662
  }
610
663
  function de(e, t = "children") {
611
664
  let n = [];
@@ -616,15 +669,28 @@ function de(e, t = "children") {
616
669
  function Ye(e, t) {
617
670
  if (!e || !a(e) || (e == null ? void 0 : e.length) === 0)
618
671
  return [];
619
- const { id: n = "id", parentId: r = "parentId", children: i = "children", rootId: o = 0, emptyChildren: f = !0 } = t || {}, u = v(e);
620
- return u.map((c) => {
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) => {
621
674
  var s;
622
- return !f && c[i] && ((s = c[i]) == null ? void 0 : s.length) === 0 && delete c[i], c;
675
+ return !u && c[i] && ((s = c[i]) == null ? void 0 : s.length) === 0 && delete c[i], c;
623
676
  }).filter((c) => {
624
- const s = u.filter((l) => c[n] === l[r]);
625
- return s.length > 0 ? c[i] = s : f && (c[i] = []), c[r] === o;
677
+ const s = f.filter((l) => c[n] === l[r]);
678
+ return s.length > 0 ? c[i] = s : u && (c[i] = []), c[r] === o;
626
679
  });
627
680
  }
681
+ function pe(e, t, n) {
682
+ const r = (n == null ? void 0 : n.value) || "id", i = (n == null ? void 0 : n.children) || "children";
683
+ for (const o of e) {
684
+ if (o[r] === t)
685
+ return o;
686
+ const u = o[i];
687
+ if (u) {
688
+ const f = pe(u, t, n);
689
+ if (f)
690
+ return f;
691
+ }
692
+ }
693
+ }
628
694
  function Ge(e) {
629
695
  return URL.createObjectURL(e);
630
696
  }
@@ -634,7 +700,7 @@ function Qe(e) {
634
700
  r.readAsDataURL(e), r.onload = () => t(r.result), r.onerror = (i) => n(i);
635
701
  });
636
702
  }
637
- function je(e) {
703
+ function Ke(e) {
638
704
  const t = e.split(","), n = t[0].match(/:(.*?);/)[1], r = atob(t[1]);
639
705
  let i = r.length;
640
706
  const o = new Uint8Array(i);
@@ -642,68 +708,68 @@ function je(e) {
642
708
  o[i] = r.charCodeAt(i);
643
709
  return new Blob([o], { type: n });
644
710
  }
645
- function Ke(e, t) {
711
+ function je(e, t) {
646
712
  const n = e.split(","), r = n[0].match(/:(.*?);/)[1], i = atob(n[1]);
647
713
  let o = i.length;
648
- const f = new Uint8Array(o);
714
+ const u = new Uint8Array(o);
649
715
  for (; o--; )
650
- f[o] = i.charCodeAt(o);
651
- return new File([f], t, { type: r });
716
+ u[o] = i.charCodeAt(o);
717
+ return new File([u], t, { type: r });
652
718
  }
653
719
  function ke(e, t, n) {
654
720
  return new window.File([e], t, { type: n });
655
721
  }
656
- function pe(e) {
722
+ function ye(e) {
657
723
  if (!e || typeof e != "string")
658
724
  return "";
659
725
  const t = e.indexOf("?");
660
726
  return t > 0 ? `${e.substring(0, t)}` : e;
661
727
  }
662
- function T(e) {
663
- var r, i, o, f, u;
728
+ function U(e) {
729
+ var r, i, o, u, f;
664
730
  if (!e || typeof e != "string")
665
731
  return "";
666
- const t = pe(e), n = t.lastIndexOf(".");
667
- return n > 0 && ((u = (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 : u[1]) || "";
732
+ 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]) || "";
668
734
  }
669
- function h(e, t) {
735
+ function x(e, t) {
670
736
  if (t)
671
737
  return t;
672
738
  if (!e || e === "data:")
673
739
  return "4";
674
740
  let n = "4";
675
- return F(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";
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";
676
742
  }
677
- function ye(e) {
743
+ function me(e) {
678
744
  const { url: t = "", fileType: n = "1" } = e || {};
679
745
  let r = "", i = { play: !1, height: 0, size: 0, width: 0, duration: 0 };
680
746
  function o() {
681
747
  i = { play: !1, height: 0, size: 0, width: 0, duration: 0 };
682
748
  }
683
- return t instanceof File ? r = URL.createObjectURL(t) : F(t) ? r = t : t instanceof Blob ? r = URL.createObjectURL(t) : (t.includes("https") || t.includes("http")) && (r = t), new Promise((f) => {
684
- let u;
685
- n === "1" ? (u = document.createElement("img"), u.src = r) : n === "2" ? (u = document.createElement("audio"), u.src = r) : n === "3" && (u = document.createElement("video"), u.src = r), n === "1" ? u.onload = function() {
686
- o(), i.play = !0, i.width = u.width || 0, i.height = u.height || 0, f(i), u = null;
687
- } : u.oncanplay = function() {
688
- o(), i.play = !0, i.width = (u == null ? void 0 : u.videoWidth) || 0, i.height = (u == null ? void 0 : u.videoHeight) || 0, i.duration = (u == null ? void 0 : u.duration) || 0, f(i), u = null;
689
- }, u.onerror = function() {
690
- o(), f(i), u = null;
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) => {
750
+ let f;
751
+ 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;
753
+ } : 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;
755
+ }, f.onerror = function() {
756
+ o(), u(i), f = null;
691
757
  };
692
758
  });
693
759
  }
694
760
  async function et(e) {
695
761
  const { url: t = "", currentTime: n, videoSuffix: r = "", vidoeAllowPlay: i = !1 } = e;
696
- let o = "", f = r, u = "1", c;
697
- return t instanceof File ? (o = URL.createObjectURL(t), f = T(t.name), u = h(t.name)) : t instanceof Blob ? (o = URL.createObjectURL(t), u = h(t)) : F(t) ? (o = t, u = h(t)) : (t.includes("https") || t.includes("http")) && (o = t, f = T(t), u = h(t)), (f ? x.videoAllowType.includes(f.toLowerCase()) : !1) ? i ? $(o, n) : (c = await ye({
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 ? N(o, n) : (c = await me({
698
764
  url: o,
699
- fileType: u
700
- }), c.play ? $(o, n) : new Promise((l) => {
765
+ fileType: f
766
+ }), c.play ? N(o, n) : new Promise((l) => {
701
767
  l("");
702
768
  })) : new Promise((l) => {
703
769
  l("");
704
770
  });
705
771
  }
706
- async function $(e, t = 0) {
772
+ async function N(e, t = 0) {
707
773
  return new Promise((n) => {
708
774
  let r = document.createElement("video");
709
775
  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 () => {
@@ -711,14 +777,14 @@ async function $(e, t = 0) {
711
777
  for (r == null || r.addEventListener("seeked", async () => {
712
778
  i && i();
713
779
  }); t < ((r == null ? void 0 : r.duration) || 0); ) {
714
- r && (r.currentTime = t), await new Promise((g) => i = g);
715
- const o = document.createElement("canvas"), f = 0.8, u = o.getContext("2d"), c = (r == null ? void 0 : r.videoWidth) || 0 * f, s = (r == null ? void 0 : r.videoHeight) || 0 * f, l = 0;
716
- o.width = (r == null ? void 0 : r.videoWidth) || 0 * f, o.height = (r == null ? void 0 : r.videoHeight) || 0 * f, r && u.drawImage(r, 0, 0, c + l, s + l), r = null, n(c === 0 || s === 0 ? "" : o.toDataURL("image/png", 1));
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));
717
783
  }
718
784
  }));
719
785
  });
720
786
  }
721
- function F(e = "") {
787
+ function B(e = "") {
722
788
  return !!(e && [
723
789
  "data:image/",
724
790
  "data:video/",
@@ -726,7 +792,7 @@ function F(e = "") {
726
792
  ].find((n) => e.includes(n)));
727
793
  }
728
794
  function tt(e) {
729
- return typeof e == "string" && /^data:(image|video|audio)\/[A-Za-z]+;base64,[A-Za-z0-9+/=]+$/.test(e);
795
+ return typeof e == "string" && /^data:(?:image|video|audio)\/[A-Za-z]+;base64,[A-Za-z0-9+/=]+$/.test(e);
730
796
  }
731
797
  function nt(e, t, n, r = !1) {
732
798
  e && t && n && e.addEventListener(t, n, r);
@@ -738,23 +804,23 @@ function it() {
738
804
  return /windows|win32/i.test(navigator.userAgent);
739
805
  }
740
806
  function ot(e) {
741
- return U(e) ? e : !!e;
807
+ return w(e) ? e : !!e;
742
808
  }
743
809
  function V(e, t) {
744
810
  const n = `^\\d+(?:\\.\\d{0,${e}})?`, r = new RegExp(n), i = t.toString().match(r);
745
811
  if (i) {
746
812
  const o = i[0];
747
813
  if (o.includes(".")) {
748
- const [f, u] = o.split(".");
749
- if (/^0*$/.test(u))
750
- return f;
814
+ const [u, f] = o.split(".");
815
+ if (/^0*$/.test(f))
816
+ return u;
751
817
  }
752
818
  return o;
753
819
  }
754
820
  return t.toString();
755
821
  }
756
822
  function ft(e, t) {
757
- const { toChinese: n = !1, fixed: r = 2, min: i = 1e4 } = t || {}, o = y(i) ? i : 1e4, f = y(r) ? r : 2, u = n ? e < o ? "" : e < 1e8 ? "万" : "亿" : e < o ? "" : e < 1e8 ? "w" : "亿";
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" : "亿";
758
824
  if (!y(e))
759
825
  return {
760
826
  str: `${e}`,
@@ -765,114 +831,129 @@ function ft(e, t) {
765
831
  str: `${e}`,
766
832
  number: `${e}`
767
833
  };
768
- if (f === 0) {
834
+ if (u === 0) {
769
835
  const s = (e / (e < 1e8 ? 1e4 : 1e8)).toFixed(1).split(".")[0];
770
836
  return {
771
- str: `${s}${u}`,
837
+ str: `${s}${f}`,
772
838
  number: s,
773
- unit: u
839
+ unit: f
774
840
  };
775
841
  }
776
842
  let c;
777
- return e < 1e8 ? (c = V(f, e / 1e4), {
778
- str: c + u,
843
+ return e < 1e8 ? (c = V(u, e / 1e4), {
844
+ str: c + f,
779
845
  number: c,
780
- unit: u
781
- }) : (c = V(f, e / 1e8), {
782
- str: c + u,
846
+ unit: f
847
+ }) : (c = V(u, e / 1e8), {
848
+ str: c + f,
783
849
  number: c,
784
- unit: u
850
+ unit: f
785
851
  });
786
852
  }
787
853
  function ut(e, t) {
788
854
  let n = 0;
789
- const r = document.querySelector(t.root || "hiddenElement");
790
- if (!r)
791
- return 0;
792
- const i = document.createElement(t.createName || "span");
793
- return i.innerHTML = e, (t.cssObject || d(t.cssObject)) && Object.keys(t.cssObject).forEach((o) => {
794
- var f, u;
795
- (f = t.cssObject) != null && f[o] && (i.style[o] = (u = t.cssObject) == null ? void 0 : u[o]);
796
- }), r.append(i), n = i.getBoundingClientRect()[t.type || "width"], r.removeChild(i), n;
855
+ const r = w(t.removeAfter) ? t.removeAfter : !0, i = t.id || "hiddenElement", o = {
856
+ opacity: 0,
857
+ visibility: "hidden",
858
+ position: "fixed",
859
+ zIndex: -1,
860
+ top: 0,
861
+ left: 0
862
+ };
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}`);
867
+ }
868
+ Object.assign(u.style, o);
869
+ 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;
797
871
  }
798
872
  export {
799
- be as arrayRepeat,
800
- He as arraySlice,
873
+ Je as arrayRepeat,
874
+ qe as arraySlice,
801
875
  ke as blobToDataURL,
802
- h as checkFileType,
803
- G as classNames,
804
- v as cloneDeep,
805
- se as compareArray,
876
+ x as checkFileType,
877
+ Q as classNames,
878
+ S as cloneDeep,
879
+ ce as compareArray,
806
880
  _e as compareArraySort,
807
- qe as compareArrayTimeSort,
808
- le as compareTime,
881
+ be as compareArrayTimeSort,
882
+ se as compareTime,
809
883
  ot as convertValueBoolean,
810
- w as copyProperties,
811
- je as dataURLtoBlob,
812
- Ke as dataURLtoFile,
813
- Ne as deepCopy,
814
- m as deepMerge,
815
- q as filterEmpty,
816
- Xe as formatDuraton,
884
+ g as copyProperties,
885
+ Ke as dataURLtoBlob,
886
+ je as dataURLtoFile,
887
+ ze as deepCopy,
888
+ h as deepMerge,
889
+ A as fileTypes,
890
+ b as filterEmpty,
891
+ pe as findSourceByTree,
892
+ Ze as formatDuraton,
817
893
  V as formatNumber,
818
- Me as genColumnKey,
819
- $ as generateVidoePicture,
894
+ $e as genColumnKey,
895
+ N as generateVidoePicture,
820
896
  Qe as getBase64,
821
897
  Ge as getBlobUrl,
822
- T as getFileSuffix,
898
+ U as getFileSuffix,
823
899
  de as getLevelData,
824
- Ze as getMaxFloor,
825
- ye as getMediaInfos,
826
- Ce as getPrefixCls,
827
- ae as getRandomNumber,
828
- ee as getScroll,
829
- Ee as getScrollContainer,
830
- ue as getSlot,
831
- ce as getSlotVNode,
832
- Be as getSlotsChildren,
900
+ ae as getMaxFloor,
901
+ me as getMediaInfos,
902
+ Me as getPrefixCls,
903
+ le as getRandomNumber,
904
+ k as getScroll,
905
+ Ae as getScrollContainer,
906
+ fe as getSlot,
907
+ ue as getSlotVNode,
908
+ Fe as getSlotsChildren,
833
909
  Le as getSlotsProps,
834
- We as getSortIndex,
910
+ He as getSortIndex,
911
+ te as getSymbols,
835
912
  ut as getTextWidth,
836
- z as getValueFromObjectByKey,
913
+ W as getValueFromObjectByKey,
837
914
  et as getVideoCoverPicture,
838
- pe as getVideoFileUrl,
839
- x as globalConfig,
840
- ze as handleCurrentPage,
841
- $e as handleShowIndex,
842
- Je as hanndleEmptyField,
843
- X as is,
915
+ ye as getVideoFileUrl,
916
+ We as handleCurrentPage,
917
+ Ne as handleShowIndex,
918
+ Xe as hanndleEmptyField,
919
+ Z as is,
844
920
  a as isArray,
845
- F as isBase64,
846
- U as isBoolean,
847
- Ue as isBrowser,
921
+ B as isBase64,
922
+ w as isBoolean,
923
+ Ee as isBrowser,
848
924
  tt as isDataURLBase64,
849
- E as isDeepEqualReact,
850
- fe as isEmptyElement,
925
+ R as isDeepEqualReact,
926
+ oe as isEmptyElement,
851
927
  we as isFunction,
852
- xe as isImg,
853
- Re as isInContainer,
854
- me as isJSONStr,
855
- he as isMobile,
856
- Oe as isNil,
928
+ Re as isImg,
929
+ ve as isInContainer,
930
+ he as isJSONStr,
931
+ xe as isMobile,
932
+ L as isNil,
933
+ Ce as isNotNil,
857
934
  y as isNumber,
858
935
  d as isObject,
859
- k as isScroll,
860
- A as isServer,
861
- Z as isString,
862
- Y as isTablet,
863
- Ae as isUrl,
936
+ C as isPlainObject,
937
+ ne as isPrimitive,
938
+ j as isScroll,
939
+ O as isServer,
940
+ Y as isString,
941
+ G as isTablet,
942
+ re as isTypedArray,
943
+ Ie as isUrl,
864
944
  it as isWindowsOs,
865
- ve as merge,
866
- Se as nanoid,
945
+ Te as merge,
946
+ Ue as nanoid,
867
947
  rt as off,
868
948
  De as omitBoolean,
869
949
  Pe as omitUndefined,
870
- Fe as omitUndefinedAndEmptyArr,
950
+ Be as omitUndefinedAndEmptyArr,
871
951
  nt as on,
952
+ T as raf,
872
953
  Ve as runFunction,
873
- Ie as scrollTo,
874
- b as slotRender,
875
- Te as throttleByAnimationFrame,
954
+ Oe as scrollTo,
955
+ J as slotRender,
956
+ Se as throttleByAnimationFrame,
876
957
  ft as toConvertNumberShow,
877
958
  Ye as treeData
878
959
  };