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

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,5 +1,5 @@
1
- import { Comment as X, Fragment as z, isVNode as v } from "vue";
2
- function Z(e, t) {
1
+ import { Comment as J, Fragment as V, isVNode as v } from "vue";
2
+ function X(e, t) {
3
3
  return Object.prototype.toString.call(e) === `[object ${t}]`;
4
4
  }
5
5
  function w(e) {
@@ -12,9 +12,9 @@ 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 && Z(e, "Object");
15
+ return e !== null && X(e, "Object");
16
16
  }
17
- function Y(e) {
17
+ function Z(e) {
18
18
  return typeof e == "string" || e instanceof String;
19
19
  }
20
20
  function we(e) {
@@ -32,22 +32,22 @@ function he(e) {
32
32
  }
33
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) && !G());
35
+ return !!(/iPhone/.test(e) || /Android/.test(e) && /Mobile/.test(e) || /Windows Phone/.test(e) || /Mobile/.test(e) && !Y());
36
36
  }
37
- function G() {
37
+ function Y() {
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 Q(...e) {
41
+ function G(...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 (Y(r))
46
+ if (Z(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 = Q(r[i]);
50
+ const o = G(r[i]);
51
51
  o && t.push(o);
52
52
  }
53
53
  else if (d(r))
@@ -57,7 +57,7 @@ function Q(...e) {
57
57
  }
58
58
  return t.filter((n) => n).join(" ");
59
59
  }
60
- function W(e, t) {
60
+ function z(e, t) {
61
61
  if (typeof t != "string" && !Array.isArray(t))
62
62
  return;
63
63
  const n = Array.isArray(t) ? t : t.split(":");
@@ -70,14 +70,14 @@ function W(e, t) {
70
70
  return r;
71
71
  }
72
72
  const O = typeof window > "u";
73
- function K(e) {
73
+ function Q(e) {
74
74
  return e.replace(/[-_](.)/g, (t, n) => n.toUpperCase());
75
75
  }
76
76
  const E = function(e, t) {
77
77
  var n;
78
78
  if (O || !e || !t)
79
79
  return "";
80
- t = K(t), t === "float" && (t = "cssFloat");
80
+ t = Q(t), t === "float" && (t = "cssFloat");
81
81
  try {
82
82
  const r = e.style[t];
83
83
  if (r)
@@ -87,14 +87,14 @@ const E = function(e, t) {
87
87
  } catch {
88
88
  return e.style[t];
89
89
  }
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) => {
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
91
  if (O)
92
92
  return;
93
93
  let n = e;
94
94
  for (; n; ) {
95
95
  if ([window, document, document.documentElement].includes(n))
96
96
  return window;
97
- if (j(n, t))
97
+ if (K(n, t))
98
98
  return n;
99
99
  n = n.parentNode;
100
100
  }
@@ -114,7 +114,7 @@ const E = function(e, t) {
114
114
  function I(e) {
115
115
  return e != null && e === e.window;
116
116
  }
117
- function k(e, t) {
117
+ function j(e, t) {
118
118
  var i;
119
119
  if (typeof window > "u")
120
120
  return 0;
@@ -122,11 +122,11 @@ function k(e, t) {
122
122
  let r = 0;
123
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;
124
124
  }
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));
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
127
  let F = 0;
128
128
  const D = /* @__PURE__ */ new Map();
129
- function _(e) {
129
+ function q(e) {
130
130
  D.delete(e);
131
131
  }
132
132
  function T(e, t = 1) {
@@ -134,9 +134,9 @@ function T(e, t = 1) {
134
134
  const n = F;
135
135
  function r(i) {
136
136
  if (i === 0)
137
- _(n), e();
137
+ q(n), e();
138
138
  else {
139
- const o = H(() => {
139
+ const o = W(() => {
140
140
  r(i - 1);
141
141
  });
142
142
  D.set(n, o);
@@ -146,15 +146,15 @@ function T(e, t = 1) {
146
146
  }
147
147
  T.cancel = (e) => {
148
148
  const t = D.get(e);
149
- return _(t), q(t);
149
+ return q(t), H(t);
150
150
  };
151
- function ee(e, t, n, r) {
151
+ function k(e, t, n, r) {
152
152
  const i = n - t;
153
153
  return e /= r / 2, e < 1 ? i / 2 * e * e * e + t : i / 2 * ((e -= 2) * e * e + 2) + t;
154
154
  }
155
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);
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
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();
159
159
  };
160
160
  o && T(c);
@@ -168,20 +168,20 @@ function Se(e) {
168
168
  };
169
169
  return r.cancel = () => cancelAnimationFrame(t), r;
170
170
  }
171
- function te(e) {
171
+ function ee(e) {
172
172
  return Object.getOwnPropertySymbols(e).filter((t) => Object.prototype.propertyIsEnumerable.call(e, t));
173
173
  }
174
- function ne(e) {
174
+ function te(e) {
175
175
  return e == null || typeof e != "object" && typeof e != "function";
176
176
  }
177
- function re(e) {
177
+ function ne(e) {
178
178
  return ArrayBuffer.isView(e) && !(e instanceof DataView);
179
179
  }
180
180
  function S(e) {
181
181
  return p(e);
182
182
  }
183
183
  function p(e, t = /* @__PURE__ */ new Map()) {
184
- if (ne(e))
184
+ if (te(e))
185
185
  return e;
186
186
  if (t.has(e))
187
187
  return t.get(e);
@@ -214,7 +214,7 @@ function p(e, t = /* @__PURE__ */ new Map()) {
214
214
  }
215
215
  if (typeof Buffer < "u" && Buffer.isBuffer(e))
216
216
  return e.subarray();
217
- if (re(e)) {
217
+ if (ne(e)) {
218
218
  const n = new (Object.getPrototypeOf(e)).constructor(e.length);
219
219
  t.set(e, n);
220
220
  for (let r = 0; r < e.length; r++)
@@ -246,13 +246,13 @@ function p(e, t = /* @__PURE__ */ new Map()) {
246
246
  return e;
247
247
  }
248
248
  function g(e, t, n) {
249
- const r = [...Object.keys(t), ...te(t)];
249
+ const r = [...Object.keys(t), ...ee(t)];
250
250
  for (let i = 0; i < r.length; i++) {
251
251
  const o = r[i], u = Object.getOwnPropertyDescriptor(e, o);
252
252
  (u == null || u.writable) && (e[o] = p(t[o], n));
253
253
  }
254
254
  }
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;
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
256
  function R(e, t, n, r) {
257
257
  if (e === t)
258
258
  return !0;
@@ -318,7 +318,7 @@ function R(e, t, n, r) {
318
318
  function Re(e) {
319
319
  return /\w.(?:png|jpg|jpeg|svg|webp|gif|bmp)$/i.test(e);
320
320
  }
321
- const L = (e) => e == null, Ie = (e) => {
321
+ const ie = (e) => e == null, Ie = (e) => {
322
322
  if (!e || !e.startsWith("http"))
323
323
  return !1;
324
324
  try {
@@ -327,7 +327,7 @@ const L = (e) => e == null, Ie = (e) => {
327
327
  return !1;
328
328
  }
329
329
  };
330
- function C(e) {
330
+ function L(e) {
331
331
  if (!e || typeof e != "object")
332
332
  return !1;
333
333
  const t = Object.getPrototypeOf(e);
@@ -348,14 +348,14 @@ function h(e, t, n) {
348
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
349
  for (let u = 0; u < o.length; u++) {
350
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);
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;
352
352
  }
353
353
  return e;
354
354
  }
355
- let M = 0;
356
- const $ = (e = 21) => {
355
+ let C = 0;
356
+ const M = (e = 21) => {
357
357
  if (typeof window > "u" || !window.crypto)
358
- return (M += 1).toFixed(0);
358
+ return (C += 1).toFixed(0);
359
359
  let t = "";
360
360
  const n = crypto.getRandomValues(new Uint8Array(e));
361
361
  for (; e--; ) {
@@ -363,7 +363,7 @@ const $ = (e = 21) => {
363
363
  t += r < 36 ? r.toString(36) : r < 62 ? (r - 26).toString(36).toUpperCase() : r < 63 ? "_" : "-";
364
364
  }
365
365
  return t;
366
- }, Ue = () => typeof window > "u" ? $() : window.crypto && window.crypto.randomUUID && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : $(), De = (e) => {
366
+ }, Ue = () => typeof window > "u" ? M() : window.crypto && window.crypto.randomUUID && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : M(), De = (e) => {
367
367
  if (e && e !== !0)
368
368
  return e;
369
369
  }, Pe = (e) => {
@@ -385,27 +385,27 @@ function P(e) {
385
385
  return Array.isArray(e) ? e[e.length - 1] : (t = e.split(":")) == null ? void 0 : t.slice(-1)[0];
386
386
  }
387
387
  function oe(e) {
388
- return e && (e.type === X || e.type === z && e.children.length === 0 || e.type === Text && e.children.trim() === "");
388
+ return e && (e.type === J || e.type === V && e.children.length === 0 || e.type === Text && e.children.trim() === "");
389
389
  }
390
390
  function Fe(e, t) {
391
391
  var n;
392
- return b((n = e[t]) == null ? void 0 : n.call(e));
392
+ return _((n = e[t]) == null ? void 0 : n.call(e));
393
393
  }
394
- function b(e = []) {
394
+ function _(e = []) {
395
395
  const t = [];
396
396
  return e.forEach((n) => {
397
- Array.isArray(n) ? t.push(...n) : (n == null ? void 0 : n.type) === z ? t.push(...b(n.children)) : t.push(n);
397
+ Array.isArray(n) ? t.push(...n) : (n == null ? void 0 : n.type) === V ? t.push(..._(n.children)) : t.push(n);
398
398
  }), t.filter((n) => !oe(n));
399
399
  }
400
- function J(e, ...t) {
400
+ function b(e, ...t) {
401
401
  return typeof e == "function" ? e == null ? void 0 : e(...t) : e;
402
402
  }
403
403
  function fe(e, t, n = "default", r) {
404
404
  const i = P(n);
405
405
  if (i) {
406
406
  let 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;
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;
409
409
  }
410
410
  }
411
411
  function ue(e, t, n = "default", r) {
@@ -413,8 +413,8 @@ function ue(e, t, n = "default", r) {
413
413
  const i = P(n);
414
414
  if (i) {
415
415
  let c;
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);
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);
418
418
  }
419
419
  }
420
420
  function Le(e, t, n, r) {
@@ -760,16 +760,16 @@ function me(e) {
760
760
  async function et(e) {
761
761
  const { url: t = "", currentTime: n, videoSuffix: r = "", vidoeAllowPlay: i = !1 } = e;
762
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({
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({
764
764
  url: o,
765
765
  fileType: f
766
- }), c.play ? N(o, n) : new Promise((l) => {
766
+ }), c.play ? $(o, n) : new Promise((l) => {
767
767
  l("");
768
768
  })) : new Promise((l) => {
769
769
  l("");
770
770
  });
771
771
  }
772
- async function N(e, t = 0) {
772
+ async function $(e, t = 0) {
773
773
  return new Promise((n) => {
774
774
  let r = document.createElement("video");
775
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 () => {
@@ -806,7 +806,7 @@ function it() {
806
806
  function ot(e) {
807
807
  return w(e) ? e : !!e;
808
808
  }
809
- function V(e, t) {
809
+ function N(e, t) {
810
810
  const n = `^\\d+(?:\\.\\d{0,${e}})?`, r = new RegExp(n), i = t.toString().match(r);
811
811
  if (i) {
812
812
  const o = i[0];
@@ -840,11 +840,11 @@ function ft(e, t) {
840
840
  };
841
841
  }
842
842
  let c;
843
- return e < 1e8 ? (c = V(u, e / 1e4), {
843
+ return e < 1e8 ? (c = N(u, e / 1e4), {
844
844
  str: c + f,
845
845
  number: c,
846
846
  unit: f
847
- }) : (c = V(u, e / 1e8), {
847
+ }) : (c = N(u, e / 1e8), {
848
848
  str: c + f,
849
849
  number: c,
850
850
  unit: f
@@ -874,7 +874,7 @@ export {
874
874
  qe as arraySlice,
875
875
  ke as blobToDataURL,
876
876
  x as checkFileType,
877
- Q as classNames,
877
+ G as classNames,
878
878
  S as cloneDeep,
879
879
  ce as compareArray,
880
880
  _e as compareArraySort,
@@ -887,12 +887,12 @@ export {
887
887
  ze as deepCopy,
888
888
  h as deepMerge,
889
889
  A as fileTypes,
890
- b as filterEmpty,
890
+ _ as filterEmpty,
891
891
  pe as findSourceByTree,
892
892
  Ze as formatDuraton,
893
- V as formatNumber,
893
+ N as formatNumber,
894
894
  $e as genColumnKey,
895
- N as generateVidoePicture,
895
+ $ as generateVidoePicture,
896
896
  Qe as getBase64,
897
897
  Ge as getBlobUrl,
898
898
  U as getFileSuffix,
@@ -901,22 +901,22 @@ export {
901
901
  me as getMediaInfos,
902
902
  Me as getPrefixCls,
903
903
  le as getRandomNumber,
904
- k as getScroll,
904
+ j as getScroll,
905
905
  Ae as getScrollContainer,
906
906
  fe as getSlot,
907
907
  ue as getSlotVNode,
908
908
  Fe as getSlotsChildren,
909
909
  Le as getSlotsProps,
910
910
  He as getSortIndex,
911
- te as getSymbols,
911
+ ee as getSymbols,
912
912
  ut as getTextWidth,
913
- W as getValueFromObjectByKey,
913
+ z as getValueFromObjectByKey,
914
914
  et as getVideoCoverPicture,
915
915
  ye as getVideoFileUrl,
916
916
  We as handleCurrentPage,
917
917
  Ne as handleShowIndex,
918
918
  Xe as hanndleEmptyField,
919
- Z as is,
919
+ X as is,
920
920
  a as isArray,
921
921
  B as isBase64,
922
922
  w as isBoolean,
@@ -929,17 +929,17 @@ export {
929
929
  ve as isInContainer,
930
930
  he as isJSONStr,
931
931
  xe as isMobile,
932
- L as isNil,
932
+ ie as isNil,
933
933
  Ce as isNotNil,
934
934
  y as isNumber,
935
935
  d as isObject,
936
- C as isPlainObject,
937
- ne as isPrimitive,
938
- j as isScroll,
936
+ L as isPlainObject,
937
+ te as isPrimitive,
938
+ K as isScroll,
939
939
  O as isServer,
940
- Y as isString,
941
- G as isTablet,
942
- re as isTypedArray,
940
+ Z as isString,
941
+ Y as isTablet,
942
+ ne as isTypedArray,
943
943
  Ie as isUrl,
944
944
  it as isWindowsOs,
945
945
  Te as merge,
@@ -952,7 +952,7 @@ export {
952
952
  T as raf,
953
953
  Ve as runFunction,
954
954
  Oe as scrollTo,
955
- J as slotRender,
955
+ b as slotRender,
956
956
  Se as throttleByAnimationFrame,
957
957
  ft as toConvertNumberShow,
958
958
  Ye as treeData
@@ -1 +1 @@
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 W(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&&W(e,"Object")}function z(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)&&!q())}function q(){const e=navigator.userAgent||navigator.vendor;return!!(/iPad/.test(e)||/Macintosh/.test(e)&&"ontouchend"in document||/Android/.test(e)&&!/Mobile/.test(e))}function H(...e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];if(r){if(z(r))t.push(r);else if(y(r))for(let i=0;i<r.length;i++){const f=H(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]}},_=(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(_(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 J(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 X=e=>setTimeout(e,16),Z=e=>clearTimeout(e);typeof window<"u"&&"requestAnimationFrame"in window&&(X=e=>window.requestAnimationFrame(e),Z=e=>window.cancelAnimationFrame(e));let Y=0;const C=new Map;function G(e){C.delete(e)}function R(e,t=1){Y+=1;const n=Y;function r(i){if(i===0)G(n),e();else{const f=X(()=>{r(i-1)});C.set(n,f)}}return r(t),n}R.cancel=e=>{const t=C.get(e);return G(t),Z(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=J(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 Q(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function j(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(j(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),...Q(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 L=e=>e==null,Ee=e=>{if(!e||!e.startsWith("http"))return!1;try{return!!new URL(e)}catch{return!1}};function N(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):N(l)?N(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&&!L(l)&&(e[o]=l):(l||L(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 M(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 V((n=e[t])==null?void 0:n.call(e))}function V(e=[]){const t=[];return e.forEach(n=>{Array.isArray(n)?t.push(...n):(n==null?void 0:n.type)===d.Fragment?t.push(...V(n.children)):t.push(n)}),t.filter(n=>!te(n))}function $(e,...t){return typeof e=="function"?e==null?void 0:e(...t):e}function ne(e,t,n="default",r){const i=M(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:$(f):f}}function re(e,t,n="default",r){var f,c,o;const i=M(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:$(l,r)}}function De(e,t,n,r){const i={};return e.forEach(f=>{const c=M(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?b(f,n):(l=await se({url:f,fileType:o}),l.play?b(f,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(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 x(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=x(c,e/1e4),{str:l+o,number:l,unit:o}):(l=x(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=H,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=V,u.findSourceByTree=le,u.formatDuraton=Je,u.formatNumber=x,u.genColumnKey=Ne,u.generateVidoePicture=b,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=J,u.getScrollContainer=he,u.getSlot=ne,u.getSlotVNode=re,u.getSlotsChildren=Fe,u.getSlotsProps=De,u.getSortIndex=xe,u.getSymbols=Q,u.getTextWidth=ft,u.getValueFromObjectByKey=P,u.getVideoCoverPicture=Ke,u.getVideoFileUrl=ae,u.handleCurrentPage=be,u.handleShowIndex=Me,u.hanndleEmptyField=_e,u.is=W,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=L,u.isNotNil=Ce,u.isNumber=g,u.isObject=m,u.isPlainObject=N,u.isPrimitive=j,u.isScroll=_,u.isServer=S,u.isString=z,u.isTablet=q,u.isTypedArray=K,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=$,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";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"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gx-design-vue/pro-utils",
3
- "version": "0.2.0-beta.55",
3
+ "version": "0.2.0-beta.56",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "vite build",