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