@gx-design-vue/pro-utils 0.2.0-beta.50 → 0.2.0-beta.52
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/index.d.ts +9 -9
- package/dist/merge/index.d.ts +5 -1
- package/dist/omitUndefined/index.d.ts +1 -4
- package/dist/pro-utils.js +380 -364
- package/dist/pro-utils.umd.cjs +2 -2
- package/dist/slots/index.d.ts +1 -1
- package/dist/typings/index.d.ts +3 -1
- package/dist/utils/isPlainObject.d.ts +43 -0
- package/package.json +1 -1
package/dist/pro-utils.js
CHANGED
|
@@ -1,123 +1,26 @@
|
|
|
1
|
-
import { Comment as
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @vue/shared v3.5.13
|
|
5
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
6
|
-
* @license MIT
|
|
7
|
-
**/
|
|
8
|
-
process.env.NODE_ENV !== "production" && Object.freeze({});
|
|
9
|
-
process.env.NODE_ENV !== "production" && Object.freeze([]);
|
|
10
|
-
const J = (e) => {
|
|
11
|
-
const t = /* @__PURE__ */ Object.create(null);
|
|
12
|
-
return (n) => t[n] || (t[n] = e(n));
|
|
13
|
-
}, X = /-(\w)/g, Z = J(
|
|
14
|
-
(e) => e.replace(X, (t, n) => n ? n.toUpperCase() : "")
|
|
15
|
-
), S = function(e, t) {
|
|
16
|
-
var n;
|
|
17
|
-
if (A || !e || !t)
|
|
18
|
-
return "";
|
|
19
|
-
t = Z(t), t === "float" && (t = "cssFloat");
|
|
20
|
-
try {
|
|
21
|
-
const r = e.style[t];
|
|
22
|
-
if (r)
|
|
23
|
-
return r;
|
|
24
|
-
const i = (n = document == null ? void 0 : document.defaultView) == null ? void 0 : n.getComputedStyle(e, "");
|
|
25
|
-
return i ? i[t] : "";
|
|
26
|
-
} catch {
|
|
27
|
-
return e.style[t];
|
|
28
|
-
}
|
|
29
|
-
}, Y = (e, t) => A ? void 0 : (t == null ? S(e, "overflow") : t ? S(e, "overflow-y") : S(e, "overflow-x")).match(/(scroll|auto|overlay)/), ge = (e, t) => {
|
|
30
|
-
if (A)
|
|
31
|
-
return;
|
|
32
|
-
let n = e;
|
|
33
|
-
for (; n; ) {
|
|
34
|
-
if ([window, document, document.documentElement].includes(n))
|
|
35
|
-
return window;
|
|
36
|
-
if (Y(n, t))
|
|
37
|
-
return n;
|
|
38
|
-
n = n.parentNode;
|
|
39
|
-
}
|
|
40
|
-
return n;
|
|
41
|
-
}, ye = (e, t) => {
|
|
42
|
-
if (A || !e || !t)
|
|
43
|
-
return !1;
|
|
44
|
-
const n = e.getBoundingClientRect();
|
|
45
|
-
let r;
|
|
46
|
-
return [window, document, document.documentElement, null, void 0].includes(t) ? r = {
|
|
47
|
-
top: 0,
|
|
48
|
-
right: window.innerWidth,
|
|
49
|
-
bottom: window.innerHeight,
|
|
50
|
-
left: 0
|
|
51
|
-
} : r = t.getBoundingClientRect(), n.top < r.bottom && n.bottom > r.top && n.right > r.left && n.left < r.right;
|
|
52
|
-
};
|
|
53
|
-
function we(e) {
|
|
54
|
-
return /\w.(png|jpg|jpeg|svg|webp|gif|bmp)$/i.test(e);
|
|
55
|
-
}
|
|
56
|
-
const me = (e) => e == null, he = (e) => {
|
|
57
|
-
if (!e || !e.startsWith("http"))
|
|
58
|
-
return !1;
|
|
59
|
-
try {
|
|
60
|
-
return !!new URL(e);
|
|
61
|
-
} catch {
|
|
62
|
-
return !1;
|
|
63
|
-
}
|
|
64
|
-
}, xe = (...e) => {
|
|
65
|
-
const t = {}, n = e.length;
|
|
66
|
-
let r, i = 0;
|
|
67
|
-
for (; i < n; i += 1)
|
|
68
|
-
for (r in e[i])
|
|
69
|
-
e[i].hasOwnProperty(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] = {
|
|
70
|
-
...t[r],
|
|
71
|
-
...e[i][r]
|
|
72
|
-
} : t[r] = e[i][r]);
|
|
73
|
-
return t;
|
|
74
|
-
};
|
|
75
|
-
let F = 0;
|
|
76
|
-
const B = (e = 21) => {
|
|
77
|
-
if (typeof window > "u" || !window.crypto)
|
|
78
|
-
return (F += 1).toFixed(0);
|
|
79
|
-
let t = "";
|
|
80
|
-
const n = crypto.getRandomValues(new Uint8Array(e));
|
|
81
|
-
for (; e--; ) {
|
|
82
|
-
const r = 63 & n[e];
|
|
83
|
-
t += r < 36 ? r.toString(36) : r < 62 ? (r - 26).toString(36).toUpperCase() : r < 63 ? "_" : "-";
|
|
84
|
-
}
|
|
85
|
-
return t;
|
|
86
|
-
}, Ae = () => typeof window > "u" ? B() : window.crypto && window.crypto.randomUUID && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : B();
|
|
87
|
-
function $(e, t) {
|
|
88
|
-
if (typeof t != "string" && !Array.isArray(t))
|
|
89
|
-
return;
|
|
90
|
-
const n = Array.isArray(t) ? t : t.split(":");
|
|
91
|
-
let r = e;
|
|
92
|
-
for (let i = 0; i < n.length; i++)
|
|
93
|
-
if (r && r.hasOwnProperty(n[i]))
|
|
94
|
-
r = r[n[i]];
|
|
95
|
-
else
|
|
96
|
-
return;
|
|
97
|
-
return r;
|
|
98
|
-
}
|
|
99
|
-
function G(e, t) {
|
|
1
|
+
import { Comment as J, Fragment as V, isVNode as O } from "vue";
|
|
2
|
+
function X(e, t) {
|
|
100
3
|
return Object.prototype.toString.call(e) === `[object ${t}]`;
|
|
101
4
|
}
|
|
102
5
|
function N(e) {
|
|
103
6
|
return typeof e == "boolean";
|
|
104
7
|
}
|
|
105
|
-
function
|
|
8
|
+
function y(e) {
|
|
106
9
|
return typeof e == "number";
|
|
107
10
|
}
|
|
108
11
|
function a(e) {
|
|
109
12
|
return typeof Array.isArray > "u" ? Object.prototype.toString.call(e) === "[object Array]" : Array.isArray(e);
|
|
110
13
|
}
|
|
111
14
|
function d(e) {
|
|
112
|
-
return e !== null &&
|
|
15
|
+
return e !== null && X(e, "Object");
|
|
113
16
|
}
|
|
114
|
-
function
|
|
17
|
+
function Z(e) {
|
|
115
18
|
return typeof e == "string" || e instanceof String;
|
|
116
19
|
}
|
|
117
|
-
function
|
|
20
|
+
function we(e) {
|
|
118
21
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Function]";
|
|
119
22
|
}
|
|
120
|
-
function
|
|
23
|
+
function me(e) {
|
|
121
24
|
if (typeof e != "string")
|
|
122
25
|
return !1;
|
|
123
26
|
try {
|
|
@@ -127,24 +30,24 @@ function Se(e) {
|
|
|
127
30
|
return !1;
|
|
128
31
|
}
|
|
129
32
|
}
|
|
130
|
-
function
|
|
33
|
+
function he() {
|
|
131
34
|
const e = navigator.userAgent || navigator.vendor;
|
|
132
|
-
return !!(/iPhone/.test(e) || /Android/.test(e) && /Mobile/.test(e) || /Windows Phone/.test(e) || /Mobile/.test(e) && !
|
|
35
|
+
return !!(/iPhone/.test(e) || /Android/.test(e) && /Mobile/.test(e) || /Windows Phone/.test(e) || /Mobile/.test(e) && !Y());
|
|
133
36
|
}
|
|
134
|
-
function
|
|
37
|
+
function Y() {
|
|
135
38
|
const e = navigator.userAgent || navigator.vendor;
|
|
136
39
|
return !!(/iPad/.test(e) || /Macintosh/.test(e) && "ontouchend" in document || /Android/.test(e) && !/Mobile/.test(e));
|
|
137
40
|
}
|
|
138
|
-
function
|
|
41
|
+
function G(...e) {
|
|
139
42
|
const t = [];
|
|
140
43
|
for (let n = 0; n < e.length; n++) {
|
|
141
44
|
const r = e[n];
|
|
142
45
|
if (r) {
|
|
143
|
-
if (
|
|
46
|
+
if (Z(r))
|
|
144
47
|
t.push(r);
|
|
145
48
|
else if (a(r))
|
|
146
49
|
for (let i = 0; i < r.length; i++) {
|
|
147
|
-
const o =
|
|
50
|
+
const o = G(r[i]);
|
|
148
51
|
o && t.push(o);
|
|
149
52
|
}
|
|
150
53
|
else if (d(r))
|
|
@@ -154,55 +57,166 @@ function K(...e) {
|
|
|
154
57
|
}
|
|
155
58
|
return t.filter((n) => n).join(" ");
|
|
156
59
|
}
|
|
157
|
-
|
|
158
|
-
typeof
|
|
159
|
-
|
|
160
|
-
const
|
|
161
|
-
|
|
162
|
-
|
|
60
|
+
function z(e, t) {
|
|
61
|
+
if (typeof t != "string" && !Array.isArray(t))
|
|
62
|
+
return;
|
|
63
|
+
const n = Array.isArray(t) ? t : t.split(":");
|
|
64
|
+
let r = e;
|
|
65
|
+
for (let i = 0; i < n.length; i++)
|
|
66
|
+
if (r && r.hasOwnProperty(n[i]))
|
|
67
|
+
r = r[n[i]];
|
|
68
|
+
else
|
|
69
|
+
return;
|
|
70
|
+
return r;
|
|
163
71
|
}
|
|
164
|
-
function
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
T.set(n, o);
|
|
175
|
-
}
|
|
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;
|
|
176
82
|
}
|
|
177
|
-
|
|
83
|
+
};
|
|
84
|
+
function S(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;
|
|
178
89
|
}
|
|
179
|
-
|
|
180
|
-
const t =
|
|
181
|
-
|
|
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 = Object.keys(t);
|
|
103
|
+
for (let i = 0; i < r.length; i++) {
|
|
104
|
+
const o = r[i], f = t[o], u = e[o];
|
|
105
|
+
console.log(22, S(f)), Array.isArray(f) ? Array.isArray(u) ? e[o] = m(u, f) : e[o] = m([], f) : S(f) ? S(u) ? Object.keys(f).length === 0 ? e[o] = f : e[o] = m(u, f) : e[o] = m({}, f) : (n != null && n.omitUndefined, e[o] = f);
|
|
106
|
+
}
|
|
107
|
+
return e;
|
|
108
|
+
}
|
|
109
|
+
let B = 0;
|
|
110
|
+
const L = (e = 21) => {
|
|
111
|
+
if (typeof window > "u" || !window.crypto)
|
|
112
|
+
return (B += 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" ? L() : window.crypto && window.crypto.randomUUID && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : L();
|
|
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
|
+
), E = function(e, t) {
|
|
134
|
+
var n;
|
|
135
|
+
if (A || !e || !t)
|
|
136
|
+
return "";
|
|
137
|
+
t = K(t), t === "float" && (t = "cssFloat");
|
|
138
|
+
try {
|
|
139
|
+
const r = e.style[t];
|
|
140
|
+
if (r)
|
|
141
|
+
return r;
|
|
142
|
+
const i = (n = document == null ? void 0 : document.defaultView) == null ? void 0 : n.getComputedStyle(e, "");
|
|
143
|
+
return i ? i[t] : "";
|
|
144
|
+
} catch {
|
|
145
|
+
return e.style[t];
|
|
146
|
+
}
|
|
147
|
+
}, k = (e, t) => A ? void 0 : (t == null ? E(e, "overflow") : t ? E(e, "overflow-y") : E(e, "overflow-x")).match(/(scroll|auto|overlay)/), Ee = (e, t) => {
|
|
148
|
+
if (A)
|
|
149
|
+
return;
|
|
150
|
+
let n = e;
|
|
151
|
+
for (; n; ) {
|
|
152
|
+
if ([window, document, document.documentElement].includes(n))
|
|
153
|
+
return window;
|
|
154
|
+
if (k(n, t))
|
|
155
|
+
return n;
|
|
156
|
+
n = n.parentNode;
|
|
157
|
+
}
|
|
158
|
+
return n;
|
|
159
|
+
}, Re = (e, t) => {
|
|
160
|
+
if (A || !e || !t)
|
|
161
|
+
return !1;
|
|
162
|
+
const n = e.getBoundingClientRect();
|
|
163
|
+
let r;
|
|
164
|
+
return [window, document, document.documentElement, null, void 0].includes(t) ? r = {
|
|
165
|
+
top: 0,
|
|
166
|
+
right: window.innerWidth,
|
|
167
|
+
bottom: window.innerHeight,
|
|
168
|
+
left: 0
|
|
169
|
+
} : r = t.getBoundingClientRect(), n.top < r.bottom && n.bottom > r.top && n.right > r.left && n.left < r.right;
|
|
182
170
|
};
|
|
183
|
-
function
|
|
171
|
+
function I(e) {
|
|
184
172
|
return e != null && e === e.window;
|
|
185
173
|
}
|
|
186
|
-
function
|
|
174
|
+
function ee(e, t) {
|
|
187
175
|
var i;
|
|
188
176
|
if (typeof window > "u")
|
|
189
177
|
return 0;
|
|
190
178
|
const n = t ? "scrollTop" : "scrollLeft";
|
|
191
179
|
let r = 0;
|
|
192
|
-
return
|
|
180
|
+
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;
|
|
193
181
|
}
|
|
194
|
-
function
|
|
182
|
+
function te(e, t, n, r) {
|
|
195
183
|
const i = n - t;
|
|
196
184
|
return e /= r / 2, e < 1 ? i / 2 * e * e * e + t : i / 2 * ((e -= 2) * e * e + 2) + t;
|
|
197
185
|
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
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 C = 0;
|
|
189
|
+
const U = /* @__PURE__ */ new Map();
|
|
190
|
+
function _(e) {
|
|
191
|
+
U.delete(e);
|
|
192
|
+
}
|
|
193
|
+
function T(e, t = 1) {
|
|
194
|
+
C += 1;
|
|
195
|
+
const n = C;
|
|
196
|
+
function r(i) {
|
|
197
|
+
if (i === 0)
|
|
198
|
+
_(n), e();
|
|
199
|
+
else {
|
|
200
|
+
const o = W(() => {
|
|
201
|
+
r(i - 1);
|
|
202
|
+
});
|
|
203
|
+
U.set(n, o);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
return r(t), n;
|
|
207
|
+
}
|
|
208
|
+
T.cancel = (e) => {
|
|
209
|
+
const t = U.get(e);
|
|
210
|
+
return _(t), H(t);
|
|
211
|
+
};
|
|
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
|
+
I(o) ? o.scrollTo(window.pageXOffset, g) : o instanceof HTMLDocument || o.constructor.name === "HTMLDocument" ? o.documentElement.scrollTop = g : o.scrollTop = g, l < i ? T(c) : typeof r == "function" && r();
|
|
202
216
|
};
|
|
203
|
-
o &&
|
|
217
|
+
o && T(c);
|
|
204
218
|
}
|
|
205
|
-
function
|
|
219
|
+
function Te(e) {
|
|
206
220
|
let t;
|
|
207
221
|
const n = (i) => () => {
|
|
208
222
|
t = null, e(...i);
|
|
@@ -211,7 +225,7 @@ function Re(e) {
|
|
|
211
225
|
};
|
|
212
226
|
return r.cancel = () => cancelAnimationFrame(t), r;
|
|
213
227
|
}
|
|
214
|
-
const
|
|
228
|
+
const x = {
|
|
215
229
|
videoAllowType: [
|
|
216
230
|
"mp4",
|
|
217
231
|
"webm",
|
|
@@ -240,20 +254,20 @@ const h = {
|
|
|
240
254
|
],
|
|
241
255
|
audioType: ["mp3", "mpeg", "aac", "wav", "wma", "mp2", "flac", "midi", "ra", "ape", "aac", "cda"]
|
|
242
256
|
};
|
|
243
|
-
function
|
|
257
|
+
function ne(e) {
|
|
244
258
|
return Object.getOwnPropertySymbols(e).filter((t) => Object.prototype.propertyIsEnumerable.call(e, t));
|
|
245
259
|
}
|
|
246
|
-
function
|
|
260
|
+
function re(e) {
|
|
247
261
|
return e == null || typeof e != "object" && typeof e != "function";
|
|
248
262
|
}
|
|
249
|
-
function
|
|
263
|
+
function ie(e) {
|
|
250
264
|
return ArrayBuffer.isView(e) && !(e instanceof DataView);
|
|
251
265
|
}
|
|
252
266
|
function v(e) {
|
|
253
267
|
return p(e);
|
|
254
268
|
}
|
|
255
269
|
function p(e, t = /* @__PURE__ */ new Map()) {
|
|
256
|
-
if (
|
|
270
|
+
if (re(e))
|
|
257
271
|
return e;
|
|
258
272
|
if (t.has(e))
|
|
259
273
|
return t.get(e);
|
|
@@ -286,7 +300,7 @@ function p(e, t = /* @__PURE__ */ new Map()) {
|
|
|
286
300
|
}
|
|
287
301
|
if (typeof Buffer < "u" && Buffer.isBuffer(e))
|
|
288
302
|
return e.subarray();
|
|
289
|
-
if (
|
|
303
|
+
if (ie(e)) {
|
|
290
304
|
const n = new (Object.getPrototypeOf(e)).constructor(e.length);
|
|
291
305
|
t.set(e, n);
|
|
292
306
|
for (let r = 0; r < e.length; r++)
|
|
@@ -318,24 +332,25 @@ function p(e, t = /* @__PURE__ */ new Map()) {
|
|
|
318
332
|
return e;
|
|
319
333
|
}
|
|
320
334
|
function w(e, t, n) {
|
|
321
|
-
const r = [...Object.keys(t), ...
|
|
335
|
+
const r = [...Object.keys(t), ...ne(t)];
|
|
322
336
|
for (let i = 0; i < r.length; i++) {
|
|
323
|
-
const o = r[i],
|
|
324
|
-
(
|
|
337
|
+
const o = r[i], f = Object.getOwnPropertyDescriptor(e, o);
|
|
338
|
+
(f == null || f.writable) && (e[o] = p(t[o], n));
|
|
325
339
|
}
|
|
326
340
|
}
|
|
327
|
-
|
|
341
|
+
const oe = typeof process < "u" && process.versions != null && process.versions.node != null, De = () => process.env.NODE_ENV === "TEST" ? !0 : typeof window < "u" && typeof window.document < "u" && typeof window.matchMedia < "u" && !oe;
|
|
342
|
+
function R(e, t, n, r) {
|
|
328
343
|
if (e === t)
|
|
329
344
|
return !0;
|
|
330
345
|
if (e && t && typeof e == "object" && typeof t == "object") {
|
|
331
346
|
if (e.constructor !== t.constructor)
|
|
332
347
|
return !1;
|
|
333
|
-
let i, o,
|
|
348
|
+
let i, o, f;
|
|
334
349
|
if (Array.isArray(e)) {
|
|
335
350
|
if (i = e.length, i != t.length)
|
|
336
351
|
return !1;
|
|
337
352
|
for (o = i; o-- !== 0; )
|
|
338
|
-
if (!
|
|
353
|
+
if (!R(e[o], t[o], n, r))
|
|
339
354
|
return !1;
|
|
340
355
|
return !0;
|
|
341
356
|
}
|
|
@@ -346,7 +361,7 @@ function O(e, t, n, r) {
|
|
|
346
361
|
if (!t.has(o[0]))
|
|
347
362
|
return !1;
|
|
348
363
|
for (o of e.entries())
|
|
349
|
-
if (!
|
|
364
|
+
if (!R(o[1], t.get(o[0]), n, r))
|
|
350
365
|
return !1;
|
|
351
366
|
return !0;
|
|
352
367
|
}
|
|
@@ -372,89 +387,89 @@ function O(e, t, n, r) {
|
|
|
372
387
|
return e.valueOf() === t.valueOf();
|
|
373
388
|
if (e.toString !== Object.prototype.toString && e.toString)
|
|
374
389
|
return e.toString() === t.toString();
|
|
375
|
-
if (
|
|
390
|
+
if (f = Object.keys(e), i = f.length, i !== Object.keys(t).length)
|
|
376
391
|
return !1;
|
|
377
392
|
for (o = i; o-- !== 0; )
|
|
378
|
-
if (!Object.prototype.hasOwnProperty.call(t,
|
|
393
|
+
if (!Object.prototype.hasOwnProperty.call(t, f[o]))
|
|
379
394
|
return !1;
|
|
380
395
|
for (o = i; o-- !== 0; ) {
|
|
381
|
-
const
|
|
382
|
-
if (!(n != null && n.includes(
|
|
383
|
-
return r && console.log(
|
|
396
|
+
const u = f[o];
|
|
397
|
+
if (!(n != null && n.includes(u)) && !(u === "_owner" && e.$$typeof) && !R(e[u], t[u], n, r))
|
|
398
|
+
return r && console.log(u), !1;
|
|
384
399
|
}
|
|
385
400
|
return !0;
|
|
386
401
|
}
|
|
387
402
|
return e !== e && t !== t;
|
|
388
403
|
}
|
|
389
|
-
const
|
|
404
|
+
const Ue = (e) => {
|
|
390
405
|
if (e && e !== !0)
|
|
391
406
|
return e;
|
|
392
|
-
},
|
|
407
|
+
}, Pe = (e) => {
|
|
393
408
|
const t = {};
|
|
394
409
|
if (Object.keys(e || {}).forEach((n) => {
|
|
395
410
|
e[n] !== void 0 && (t[n] = e[n]);
|
|
396
411
|
}), !(Object.keys(t).length < 1))
|
|
397
412
|
return t;
|
|
398
|
-
},
|
|
413
|
+
}, Fe = (e) => {
|
|
399
414
|
const t = {};
|
|
400
415
|
return Object.keys(e || {}).forEach((n) => {
|
|
401
416
|
var r;
|
|
402
417
|
Array.isArray(e[n]) && ((r = e[n]) == null ? void 0 : r.length) === 0 || e[n] !== void 0 && (t[n] = e[n]);
|
|
403
418
|
}), t;
|
|
404
419
|
};
|
|
405
|
-
function
|
|
420
|
+
function P(e) {
|
|
406
421
|
var t;
|
|
407
422
|
if (!(typeof e != "string" && !Array.isArray(e)))
|
|
408
423
|
return Array.isArray(e) ? e[e.length - 1] : (t = e.split(":")) == null ? void 0 : t.slice(-1)[0];
|
|
409
424
|
}
|
|
410
|
-
function
|
|
411
|
-
return e && (e.type ===
|
|
425
|
+
function fe(e) {
|
|
426
|
+
return e && (e.type === J || e.type === V && e.children.length === 0 || e.type === Text && e.children.trim() === "");
|
|
412
427
|
}
|
|
413
|
-
function
|
|
428
|
+
function Be(e, t) {
|
|
414
429
|
var n;
|
|
415
|
-
return
|
|
430
|
+
return q((n = e[t]) == null ? void 0 : n.call(e));
|
|
416
431
|
}
|
|
417
|
-
function
|
|
432
|
+
function q(e = []) {
|
|
418
433
|
const t = [];
|
|
419
434
|
return e.forEach((n) => {
|
|
420
|
-
Array.isArray(n) ? t.push(...n) : (n == null ? void 0 : n.type) ===
|
|
421
|
-
}), t.filter((n) => !
|
|
435
|
+
Array.isArray(n) ? t.push(...n) : (n == null ? void 0 : n.type) === V ? t.push(...q(n.children)) : t.push(n);
|
|
436
|
+
}), t.filter((n) => !fe(n));
|
|
422
437
|
}
|
|
423
|
-
function
|
|
438
|
+
function b(e, ...t) {
|
|
424
439
|
return typeof e == "function" ? e == null ? void 0 : e(...t) : e;
|
|
425
440
|
}
|
|
426
|
-
function
|
|
427
|
-
const i =
|
|
441
|
+
function ue(e, t, n = "default", r) {
|
|
442
|
+
const i = P(n);
|
|
428
443
|
if (i) {
|
|
429
444
|
let o;
|
|
430
|
-
const
|
|
431
|
-
return
|
|
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;
|
|
432
447
|
}
|
|
433
448
|
}
|
|
434
|
-
function
|
|
435
|
-
var o,
|
|
436
|
-
const i =
|
|
449
|
+
function ce(e, t, n = "default", r) {
|
|
450
|
+
var o, f, u;
|
|
451
|
+
const i = P(n);
|
|
437
452
|
if (i) {
|
|
438
453
|
let c;
|
|
439
|
-
const s =
|
|
440
|
-
return s === !1 ? c = !1 : s === !0 ? c = (o = e == null ? void 0 : e[i]) == null ? void 0 : o.call(e, r) : d(s) ?
|
|
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);
|
|
441
456
|
}
|
|
442
457
|
}
|
|
443
|
-
function
|
|
458
|
+
function Le(e, t, n, r) {
|
|
444
459
|
const i = {};
|
|
445
460
|
return e.forEach((o) => {
|
|
446
|
-
const
|
|
447
|
-
if (
|
|
448
|
-
const
|
|
449
|
-
(N(
|
|
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
|
+
(N(u) || u) && (i[f] = u);
|
|
450
465
|
}
|
|
451
466
|
}), i;
|
|
452
467
|
}
|
|
453
|
-
const
|
|
468
|
+
const Ce = ({ suffixCls: e, customizePrefixCls: t, isPor: n, className: r }) => {
|
|
454
469
|
const i = r || (n ? "gx-pro" : "gx");
|
|
455
470
|
return t || (e ? `${i}-${e}` : i);
|
|
456
|
-
},
|
|
457
|
-
function
|
|
471
|
+
}, Me = (e, t) => e ? a(e) ? e.join("-") : e.toString() : `${t || 0}`;
|
|
472
|
+
function $e(e, { align: t, showIndex: n }) {
|
|
458
473
|
const r = v(e);
|
|
459
474
|
if (n && e.length && e.every((i) => i.dataIndex !== "sortIndex")) {
|
|
460
475
|
const i = e[0];
|
|
@@ -463,7 +478,7 @@ function Ce(e, { align: t, showIndex: n }) {
|
|
|
463
478
|
align: t,
|
|
464
479
|
fixed: i.fixed,
|
|
465
480
|
width: 60,
|
|
466
|
-
uuid:
|
|
481
|
+
uuid: ae().uuid(15),
|
|
467
482
|
dataIndex: "sortIndex",
|
|
468
483
|
key: "sortIndex"
|
|
469
484
|
});
|
|
@@ -471,13 +486,13 @@ function Ce(e, { align: t, showIndex: n }) {
|
|
|
471
486
|
r.filter((i) => i.dataIndex !== "sortIndex");
|
|
472
487
|
return r;
|
|
473
488
|
}
|
|
474
|
-
function
|
|
489
|
+
function Ve(e, ...t) {
|
|
475
490
|
return typeof e == "function" ? e(...t) : e;
|
|
476
491
|
}
|
|
477
|
-
function
|
|
492
|
+
function Ne(e) {
|
|
478
493
|
return JSON.parse(JSON.stringify(e));
|
|
479
494
|
}
|
|
480
|
-
function
|
|
495
|
+
function ze(e, t) {
|
|
481
496
|
if (d(e)) {
|
|
482
497
|
const { pageSize: n = 10, total: r = 0 } = e;
|
|
483
498
|
let { current: i = 1 } = e;
|
|
@@ -485,21 +500,21 @@ function Ne(e, t) {
|
|
|
485
500
|
}
|
|
486
501
|
return 1;
|
|
487
502
|
}
|
|
488
|
-
function
|
|
503
|
+
function We(e = [], t, n = "children") {
|
|
489
504
|
function r(i, o) {
|
|
490
|
-
return o.map((
|
|
491
|
-
const c = `${i}-${
|
|
492
|
-
return
|
|
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;
|
|
493
508
|
});
|
|
494
509
|
}
|
|
495
510
|
return v(e).map((i, o) => {
|
|
496
|
-
const
|
|
511
|
+
const f = d(t) && t.current || 1, u = d(t) && t.pageSize || 10, c = `${f ? (f - 1) * u + (o + 1) : o + 1}`;
|
|
497
512
|
return i[n] && (i[n] = r(`${c}`, i[n])), i.sortIndex = c, i;
|
|
498
513
|
});
|
|
499
514
|
}
|
|
500
|
-
function
|
|
515
|
+
function He(e, t) {
|
|
501
516
|
return a(e) ? e == null ? void 0 : e.filter((n, r) => {
|
|
502
|
-
if (
|
|
517
|
+
if (y(t))
|
|
503
518
|
return r <= t - 1;
|
|
504
519
|
if (a(t) && t.length === 2) {
|
|
505
520
|
const i = t[0] - 1, o = t[1] ? t[1] - 1 : e.length - 1;
|
|
@@ -511,28 +526,28 @@ function ze(e, t) {
|
|
|
511
526
|
return !0;
|
|
512
527
|
}) : [];
|
|
513
528
|
}
|
|
514
|
-
function
|
|
515
|
-
const i =
|
|
516
|
-
let
|
|
517
|
-
return o <
|
|
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;
|
|
518
533
|
}
|
|
519
|
-
function
|
|
520
|
-
const i =
|
|
521
|
-
let
|
|
522
|
-
return o <
|
|
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;
|
|
523
538
|
}
|
|
524
|
-
function
|
|
525
|
-
return e.sort((r, i) =>
|
|
539
|
+
function _e(e, t, n = 0) {
|
|
540
|
+
return e.sort((r, i) => se(r, i, t, n));
|
|
526
541
|
}
|
|
527
|
-
function
|
|
528
|
-
return e.sort((r, i) =>
|
|
542
|
+
function qe(e, t, n = 0) {
|
|
543
|
+
return e.sort((r, i) => le(r, i, t, n));
|
|
529
544
|
}
|
|
530
|
-
function
|
|
545
|
+
function be(e) {
|
|
531
546
|
let t = v(e);
|
|
532
547
|
const n = new Set(t);
|
|
533
548
|
return t = Array.from(n), t;
|
|
534
549
|
}
|
|
535
|
-
function
|
|
550
|
+
function Je(e, t) {
|
|
536
551
|
const n = ["null", "undefined"];
|
|
537
552
|
let r = !0;
|
|
538
553
|
return e === 0 ? r = !0 : n.includes(e) ? r = !1 : e || (r = !1), r ? {
|
|
@@ -543,7 +558,7 @@ function qe(e, t) {
|
|
|
543
558
|
success: r
|
|
544
559
|
};
|
|
545
560
|
}
|
|
546
|
-
function
|
|
561
|
+
function Xe(e) {
|
|
547
562
|
let t = "";
|
|
548
563
|
if (e > -1) {
|
|
549
564
|
const n = Math.floor(e / 3600), r = Math.floor(e / 60) % 60, i = Number.parseInt(String(e % 60));
|
|
@@ -551,18 +566,18 @@ function Je(e) {
|
|
|
551
566
|
}
|
|
552
567
|
return t.split(":")[0] === "00" ? `${t.split(":")[1]}:${t.split(":")[2]}` : t;
|
|
553
568
|
}
|
|
554
|
-
function
|
|
569
|
+
function ae() {
|
|
555
570
|
const e = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
|
|
556
571
|
return {
|
|
557
572
|
uuid(t, n) {
|
|
558
573
|
const r = e, i = [], o = n || r.length;
|
|
559
|
-
let
|
|
574
|
+
let f, u;
|
|
560
575
|
if (t)
|
|
561
|
-
for (
|
|
562
|
-
i[
|
|
576
|
+
for (f = 0; f < t; f += 1)
|
|
577
|
+
i[f] = r[Number.parseInt(String(Math.random() * o))];
|
|
563
578
|
else
|
|
564
|
-
for (i[8] = "-", i[13] = "-", i[18] = "-", i[23] = "-", i[14] = "4",
|
|
565
|
-
i[
|
|
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]);
|
|
566
581
|
return i.join("");
|
|
567
582
|
},
|
|
568
583
|
uuidFast() {
|
|
@@ -583,43 +598,43 @@ function se() {
|
|
|
583
598
|
}
|
|
584
599
|
};
|
|
585
600
|
}
|
|
586
|
-
function
|
|
601
|
+
function Ze(e = [], t = "children") {
|
|
587
602
|
let n = 0;
|
|
588
603
|
function r(i = [], o) {
|
|
589
|
-
i.forEach((
|
|
590
|
-
|
|
604
|
+
i.forEach((f) => {
|
|
605
|
+
f.floor = o, o > n && (n = o), f[t] && f[t].length > 0 && r(f[t], o + 1);
|
|
591
606
|
});
|
|
592
607
|
}
|
|
593
608
|
return r(e, 1), n;
|
|
594
609
|
}
|
|
595
|
-
function
|
|
610
|
+
function de(e, t = "children") {
|
|
596
611
|
let n = [];
|
|
597
612
|
return e.forEach((r) => {
|
|
598
|
-
n.push(r), a(r[t]) && r[t].length > 0 && (n = n.concat(
|
|
613
|
+
n.push(r), a(r[t]) && r[t].length > 0 && (n = n.concat(de(r[t], t)));
|
|
599
614
|
}), n;
|
|
600
615
|
}
|
|
601
|
-
function
|
|
616
|
+
function Ye(e, t) {
|
|
602
617
|
if (!e || !a(e) || (e == null ? void 0 : e.length) === 0)
|
|
603
618
|
return [];
|
|
604
|
-
const { id: n = "id", parentId: r = "parentId", children: i = "children", rootId: o = 0, emptyChildren:
|
|
605
|
-
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) => {
|
|
606
621
|
var s;
|
|
607
|
-
return !
|
|
622
|
+
return !f && c[i] && ((s = c[i]) == null ? void 0 : s.length) === 0 && delete c[i], c;
|
|
608
623
|
}).filter((c) => {
|
|
609
|
-
const s =
|
|
610
|
-
return s.length > 0 ? c[i] = s :
|
|
624
|
+
const s = u.filter((l) => c[n] === l[r]);
|
|
625
|
+
return s.length > 0 ? c[i] = s : f && (c[i] = []), c[r] === o;
|
|
611
626
|
});
|
|
612
627
|
}
|
|
613
|
-
function
|
|
628
|
+
function Ge(e) {
|
|
614
629
|
return URL.createObjectURL(e);
|
|
615
630
|
}
|
|
616
|
-
function
|
|
631
|
+
function Qe(e) {
|
|
617
632
|
return new Promise((t, n) => {
|
|
618
633
|
const r = new FileReader();
|
|
619
634
|
r.readAsDataURL(e), r.onload = () => t(r.result), r.onerror = (i) => n(i);
|
|
620
635
|
});
|
|
621
636
|
}
|
|
622
|
-
function
|
|
637
|
+
function je(e) {
|
|
623
638
|
const t = e.split(","), n = t[0].match(/:(.*?);/)[1], r = atob(t[1]);
|
|
624
639
|
let i = r.length;
|
|
625
640
|
const o = new Uint8Array(i);
|
|
@@ -627,120 +642,120 @@ function Qe(e) {
|
|
|
627
642
|
o[i] = r.charCodeAt(i);
|
|
628
643
|
return new Blob([o], { type: n });
|
|
629
644
|
}
|
|
630
|
-
function
|
|
645
|
+
function Ke(e, t) {
|
|
631
646
|
const n = e.split(","), r = n[0].match(/:(.*?);/)[1], i = atob(n[1]);
|
|
632
647
|
let o = i.length;
|
|
633
|
-
const
|
|
648
|
+
const f = new Uint8Array(o);
|
|
634
649
|
for (; o--; )
|
|
635
|
-
|
|
636
|
-
return new File([
|
|
650
|
+
f[o] = i.charCodeAt(o);
|
|
651
|
+
return new File([f], t, { type: r });
|
|
637
652
|
}
|
|
638
|
-
function
|
|
653
|
+
function ke(e, t, n) {
|
|
639
654
|
return new window.File([e], t, { type: n });
|
|
640
655
|
}
|
|
641
|
-
function
|
|
656
|
+
function pe(e) {
|
|
642
657
|
if (!e || typeof e != "string")
|
|
643
658
|
return "";
|
|
644
659
|
const t = e.indexOf("?");
|
|
645
660
|
return t > 0 ? `${e.substring(0, t)}` : e;
|
|
646
661
|
}
|
|
647
|
-
function
|
|
648
|
-
var r, i, o,
|
|
662
|
+
function D(e) {
|
|
663
|
+
var r, i, o, f, u;
|
|
649
664
|
if (!e || typeof e != "string")
|
|
650
665
|
return "";
|
|
651
|
-
const t =
|
|
652
|
-
return n > 0 && ((
|
|
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]) || "";
|
|
653
668
|
}
|
|
654
|
-
function
|
|
669
|
+
function h(e, t) {
|
|
655
670
|
if (t)
|
|
656
671
|
return t;
|
|
657
672
|
if (!e || e === "data:")
|
|
658
673
|
return "4";
|
|
659
674
|
let n = "4";
|
|
660
|
-
return
|
|
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 = D(e).toLowerCase(), x.imageType.includes(n) ? "1" : x.videoType.includes(n) ? "3" : x.audioType.includes(n) ? "2" : "4";
|
|
661
676
|
}
|
|
662
|
-
function
|
|
677
|
+
function ye(e) {
|
|
663
678
|
const { url: t = "", fileType: n = "1" } = e || {};
|
|
664
679
|
let r = "", i = { play: !1, height: 0, size: 0, width: 0, duration: 0 };
|
|
665
680
|
function o() {
|
|
666
681
|
i = { play: !1, height: 0, size: 0, width: 0, duration: 0 };
|
|
667
682
|
}
|
|
668
|
-
return t instanceof File ? r = URL.createObjectURL(t) :
|
|
669
|
-
let
|
|
670
|
-
n === "1" ? (
|
|
671
|
-
o(), i.play = !0, i.width =
|
|
672
|
-
} :
|
|
673
|
-
o(), i.play = !0, i.width = (
|
|
674
|
-
},
|
|
675
|
-
o(),
|
|
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;
|
|
676
691
|
};
|
|
677
692
|
});
|
|
678
693
|
}
|
|
679
|
-
async function
|
|
694
|
+
async function et(e) {
|
|
680
695
|
const { url: t = "", currentTime: n, videoSuffix: r = "", vidoeAllowPlay: i = !1 } = e;
|
|
681
|
-
let o = "",
|
|
682
|
-
return t instanceof File ? (o = URL.createObjectURL(t),
|
|
696
|
+
let o = "", f = r, u = "1", c;
|
|
697
|
+
return t instanceof File ? (o = URL.createObjectURL(t), f = D(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 = D(t), u = h(t)), (f ? x.videoAllowType.includes(f.toLowerCase()) : !1) ? i ? M(o, n) : (c = await ye({
|
|
683
698
|
url: o,
|
|
684
|
-
fileType:
|
|
685
|
-
}), c.play ?
|
|
699
|
+
fileType: u
|
|
700
|
+
}), c.play ? M(o, n) : new Promise((l) => {
|
|
686
701
|
l("");
|
|
687
702
|
})) : new Promise((l) => {
|
|
688
703
|
l("");
|
|
689
704
|
});
|
|
690
705
|
}
|
|
691
|
-
async function
|
|
706
|
+
async function M(e, t = 0) {
|
|
692
707
|
return new Promise((n) => {
|
|
693
708
|
let r = document.createElement("video");
|
|
694
|
-
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
|
|
709
|
+
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 () => {
|
|
695
710
|
let i;
|
|
696
|
-
for (r == null || r.addEventListener("seeked", async
|
|
711
|
+
for (r == null || r.addEventListener("seeked", async () => {
|
|
697
712
|
i && i();
|
|
698
713
|
}); t < ((r == null ? void 0 : r.duration) || 0); ) {
|
|
699
|
-
r && (r.currentTime = t), await new Promise((
|
|
700
|
-
const o = document.createElement("canvas"),
|
|
701
|
-
o.width = (r == null ? void 0 : r.videoWidth) || 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));
|
|
702
717
|
}
|
|
703
718
|
}));
|
|
704
719
|
});
|
|
705
720
|
}
|
|
706
|
-
function
|
|
721
|
+
function F(e = "") {
|
|
707
722
|
return !!(e && [
|
|
708
723
|
"data:image/",
|
|
709
724
|
"data:video/",
|
|
710
725
|
"data:audio/"
|
|
711
726
|
].find((n) => e.includes(n)));
|
|
712
727
|
}
|
|
713
|
-
function
|
|
728
|
+
function tt(e) {
|
|
714
729
|
return typeof e == "string" && /^data:(image|video|audio)\/[A-Za-z]+;base64,[A-Za-z0-9+/=]+$/.test(e);
|
|
715
730
|
}
|
|
716
|
-
function
|
|
731
|
+
function nt(e, t, n, r = !1) {
|
|
717
732
|
e && t && n && e.addEventListener(t, n, r);
|
|
718
733
|
}
|
|
719
|
-
function
|
|
734
|
+
function rt(e, t, n, r = !1) {
|
|
720
735
|
e && t && n && e.removeEventListener(t, n, r);
|
|
721
736
|
}
|
|
722
|
-
function
|
|
737
|
+
function it() {
|
|
723
738
|
return /windows|win32/i.test(navigator.userAgent);
|
|
724
739
|
}
|
|
725
|
-
function
|
|
740
|
+
function ot(e) {
|
|
726
741
|
return N(e) ? e : !!e;
|
|
727
742
|
}
|
|
728
|
-
function
|
|
743
|
+
function $(e, t) {
|
|
729
744
|
const n = `^\\d+(?:\\.\\d{0,${e}})?`, r = new RegExp(n), i = t.toString().match(r);
|
|
730
745
|
if (i) {
|
|
731
746
|
const o = i[0];
|
|
732
747
|
if (o.includes(".")) {
|
|
733
|
-
const [
|
|
734
|
-
if (/^0*$/.test(
|
|
735
|
-
return
|
|
748
|
+
const [f, u] = o.split(".");
|
|
749
|
+
if (/^0*$/.test(u))
|
|
750
|
+
return f;
|
|
736
751
|
}
|
|
737
752
|
return o;
|
|
738
753
|
}
|
|
739
754
|
return t.toString();
|
|
740
755
|
}
|
|
741
|
-
function
|
|
742
|
-
const { toChinese: n = !1, fixed: r = 2, min: i = 1e4 } = t || {}, o =
|
|
743
|
-
if (!
|
|
756
|
+
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" : "亿";
|
|
758
|
+
if (!y(e))
|
|
744
759
|
return {
|
|
745
760
|
str: `${e}`,
|
|
746
761
|
number: `${e}`
|
|
@@ -750,113 +765,114 @@ function it(e, t) {
|
|
|
750
765
|
str: `${e}`,
|
|
751
766
|
number: `${e}`
|
|
752
767
|
};
|
|
753
|
-
if (
|
|
768
|
+
if (f === 0) {
|
|
754
769
|
const s = (e / (e < 1e8 ? 1e4 : 1e8)).toFixed(1).split(".")[0];
|
|
755
770
|
return {
|
|
756
|
-
str: `${s}${
|
|
771
|
+
str: `${s}${u}`,
|
|
757
772
|
number: s,
|
|
758
|
-
unit:
|
|
773
|
+
unit: u
|
|
759
774
|
};
|
|
760
775
|
}
|
|
761
776
|
let c;
|
|
762
|
-
return e < 1e8 ? (c =
|
|
763
|
-
str: c +
|
|
777
|
+
return e < 1e8 ? (c = $(f, e / 1e4), {
|
|
778
|
+
str: c + u,
|
|
764
779
|
number: c,
|
|
765
|
-
unit:
|
|
766
|
-
}) : (c =
|
|
767
|
-
str: c +
|
|
780
|
+
unit: u
|
|
781
|
+
}) : (c = $(f, e / 1e8), {
|
|
782
|
+
str: c + u,
|
|
768
783
|
number: c,
|
|
769
|
-
unit:
|
|
784
|
+
unit: u
|
|
770
785
|
});
|
|
771
786
|
}
|
|
772
|
-
function
|
|
787
|
+
function ut(e, t) {
|
|
773
788
|
let n = 0;
|
|
774
789
|
const r = document.querySelector(t.root || "hiddenElement");
|
|
775
790
|
if (!r)
|
|
776
791
|
return 0;
|
|
777
792
|
const i = document.createElement(t.createName || "span");
|
|
778
793
|
return i.innerHTML = e, (t.cssObject || d(t.cssObject)) && Object.keys(t.cssObject).forEach((o) => {
|
|
779
|
-
var
|
|
780
|
-
(
|
|
794
|
+
var f, u;
|
|
795
|
+
(f = t.cssObject) != null && f[o] && (i.style[o] = (u = t.cssObject) == null ? void 0 : u[o]);
|
|
781
796
|
}), r.append(i), n = i.getBoundingClientRect()[t.type || "width"], r.removeChild(i), n;
|
|
782
797
|
}
|
|
783
798
|
export {
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
799
|
+
be as arrayRepeat,
|
|
800
|
+
He as arraySlice,
|
|
801
|
+
ke as blobToDataURL,
|
|
802
|
+
h as checkFileType,
|
|
803
|
+
G as classNames,
|
|
789
804
|
v as cloneDeep,
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
805
|
+
se as compareArray,
|
|
806
|
+
_e as compareArraySort,
|
|
807
|
+
qe as compareArrayTimeSort,
|
|
808
|
+
le as compareTime,
|
|
809
|
+
ot as convertValueBoolean,
|
|
795
810
|
w as copyProperties,
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
ue as
|
|
816
|
-
|
|
817
|
-
Be as
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
811
|
+
je as dataURLtoBlob,
|
|
812
|
+
Ke as dataURLtoFile,
|
|
813
|
+
Ne as deepCopy,
|
|
814
|
+
m as deepMerge,
|
|
815
|
+
q as filterEmpty,
|
|
816
|
+
Xe as formatDuraton,
|
|
817
|
+
$ as formatNumber,
|
|
818
|
+
Me as genColumnKey,
|
|
819
|
+
M as generateVidoePicture,
|
|
820
|
+
Qe as getBase64,
|
|
821
|
+
Ge as getBlobUrl,
|
|
822
|
+
D as getFileSuffix,
|
|
823
|
+
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,
|
|
833
|
+
Le as getSlotsProps,
|
|
834
|
+
We as getSortIndex,
|
|
835
|
+
ut as getTextWidth,
|
|
836
|
+
z as getValueFromObjectByKey,
|
|
837
|
+
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,
|
|
828
844
|
a as isArray,
|
|
829
|
-
|
|
845
|
+
F as isBase64,
|
|
830
846
|
N as isBoolean,
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
847
|
+
De as isBrowser,
|
|
848
|
+
tt as isDataURLBase64,
|
|
849
|
+
R as isDeepEqualReact,
|
|
850
|
+
fe as isEmptyElement,
|
|
851
|
+
we as isFunction,
|
|
852
|
+
xe as isImg,
|
|
853
|
+
Re as isInContainer,
|
|
854
|
+
me as isJSONStr,
|
|
855
|
+
he as isMobile,
|
|
856
|
+
Oe as isNil,
|
|
857
|
+
y as isNumber,
|
|
842
858
|
d as isObject,
|
|
843
|
-
|
|
859
|
+
k as isScroll,
|
|
844
860
|
A as isServer,
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
861
|
+
Z as isString,
|
|
862
|
+
Y as isTablet,
|
|
863
|
+
Ae as isUrl,
|
|
864
|
+
it as isWindowsOs,
|
|
865
|
+
ve as merge,
|
|
866
|
+
Se as nanoid,
|
|
867
|
+
rt as off,
|
|
868
|
+
Ue as omitBoolean,
|
|
869
|
+
Pe as omitUndefined,
|
|
870
|
+
Fe as omitUndefinedAndEmptyArr,
|
|
871
|
+
nt as on,
|
|
872
|
+
Ve as runFunction,
|
|
873
|
+
Ie as scrollTo,
|
|
874
|
+
b as slotRender,
|
|
875
|
+
Te as throttleByAnimationFrame,
|
|
876
|
+
ft as toConvertNumberShow,
|
|
877
|
+
Ye as treeData
|
|
862
878
|
};
|