@lntvow/utils 2.3.15 → 2.4.1
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.cjs +1 -1
- package/dist/index.d.ts +22 -4
- package/dist/index.mjs +250 -244
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
function R0(...t) {
|
|
2
|
-
return t.reduce((e, n) => function(...
|
|
3
|
-
return n(e(...
|
|
2
|
+
return t.reduce((e, n) => function(...r) {
|
|
3
|
+
return n(e(...r));
|
|
4
4
|
});
|
|
5
5
|
}
|
|
6
6
|
function I0(...t) {
|
|
7
|
-
return t.reduce((e, n) => function(...
|
|
8
|
-
return e(n(...
|
|
7
|
+
return t.reduce((e, n) => function(...r) {
|
|
8
|
+
return e(n(...r));
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
function Z0(t, e = 500) {
|
|
12
12
|
let n = null;
|
|
13
|
-
return function(...
|
|
13
|
+
return function(...r) {
|
|
14
14
|
n && clearTimeout(n), n = setTimeout(() => {
|
|
15
|
-
t.apply(this,
|
|
15
|
+
t.apply(this, r);
|
|
16
16
|
}, e);
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
19
|
const S0 = Object.prototype.toString, o0 = (t) => S0.call(t);
|
|
20
|
-
let
|
|
20
|
+
let f0 = null;
|
|
21
21
|
function P0(t) {
|
|
22
|
-
i0(t) && (
|
|
22
|
+
i0(t) && (f0 = t);
|
|
23
23
|
}
|
|
24
24
|
const U0 = (t, ...e) => {
|
|
25
25
|
const n = e.length === 0 ? "" : e.length === 1 ? e[0] : e;
|
|
@@ -27,31 +27,31 @@ const U0 = (t, ...e) => {
|
|
|
27
27
|
`%c ${t} `,
|
|
28
28
|
"padding: 2px; border-radius: 3px; color: #fff; background: #000; font-weight: bold;",
|
|
29
29
|
n
|
|
30
|
-
),
|
|
31
|
-
}, k0 = (...t) => console.warn(...t), z0 = (...t) => console.error(...t), W0 = (t) => o0(t) === "[object Map]", V0 = (t) => o0(t) === "[object Set]", O0 = (t) => o0(t) === "[object Date]", x0 = (t) => o0(t) === "[object RegExp]", i0 = (t) => typeof t == "function",
|
|
30
|
+
), f0 && f0(t, n);
|
|
31
|
+
}, k0 = (...t) => console.warn(...t), z0 = (...t) => console.error(...t), W0 = (t) => o0(t) === "[object Map]", V0 = (t) => o0(t) === "[object Set]", O0 = (t) => o0(t) === "[object Date]", x0 = (t) => o0(t) === "[object RegExp]", i0 = (t) => typeof t == "function", s0 = (t) => typeof t == "number", A0 = (t) => typeof t == "string", q0 = (t) => typeof t == "symbol", W = (t) => t !== null && typeof t == "object", X0 = (t) => W(t) && i0(t.then) && i0(t.catch), r0 = (t) => t == null, B0 = (t) => t === void 0, J0 = (t) => t === null, G0 = (t) => t != null, K0 = (t) => typeof t == "boolean", n0 = Array.isArray, d0 = (t, e) => Object.hasOwn(t, e), Q0 = (t, e) => t !== e;
|
|
32
32
|
function l0(t) {
|
|
33
33
|
const e = /* @__PURE__ */ new WeakMap();
|
|
34
|
-
function n(
|
|
35
|
-
if (O0(
|
|
36
|
-
return new Date(
|
|
37
|
-
if (x0(
|
|
38
|
-
return new RegExp(
|
|
39
|
-
if (W(
|
|
40
|
-
if (e.has(
|
|
41
|
-
return e.get(
|
|
34
|
+
function n(r) {
|
|
35
|
+
if (O0(r))
|
|
36
|
+
return new Date(r);
|
|
37
|
+
if (x0(r))
|
|
38
|
+
return new RegExp(r);
|
|
39
|
+
if (W(r)) {
|
|
40
|
+
if (e.has(r))
|
|
41
|
+
return e.get(r);
|
|
42
42
|
let d = {};
|
|
43
|
-
if (n0(
|
|
44
|
-
d = [], e.set(
|
|
45
|
-
for (let f = 0; f <
|
|
46
|
-
d[f] = n(
|
|
43
|
+
if (n0(r)) {
|
|
44
|
+
d = [], e.set(r, d);
|
|
45
|
+
for (let f = 0; f < r.length; f++)
|
|
46
|
+
d[f] = n(r[f]);
|
|
47
47
|
return d;
|
|
48
48
|
}
|
|
49
|
-
e.set(
|
|
50
|
-
for (const f in
|
|
51
|
-
d0(
|
|
49
|
+
e.set(r, d);
|
|
50
|
+
for (const f in r)
|
|
51
|
+
d0(r, f) && (d[f] = n(r[f]));
|
|
52
52
|
return d;
|
|
53
53
|
} else
|
|
54
|
-
return
|
|
54
|
+
return r;
|
|
55
55
|
}
|
|
56
56
|
return n(t);
|
|
57
57
|
}
|
|
@@ -70,18 +70,18 @@ function t2(t, e) {
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
function k(t, e, n) {
|
|
73
|
-
return (!W(t) || !W(e)) && V("deepMerge", "template 和 source 必须是对象"), n0(t) ?
|
|
73
|
+
return (!W(t) || !W(e)) && V("deepMerge", "template 和 source 必须是对象"), n0(t) ? E0(t, e, n) : C0(t, e, n);
|
|
74
74
|
}
|
|
75
75
|
function C0(t, e, n) {
|
|
76
|
-
const
|
|
76
|
+
const r = e0(e, n);
|
|
77
77
|
return Object.keys(t).forEach((f) => {
|
|
78
|
-
r0(e[f]) ?
|
|
79
|
-
}),
|
|
78
|
+
r0(e[f]) ? r[f] = e0(t[f], n) : r[f] = W(t[f]) && W(e[f]) ? k(t[f], e[f], n) : e0(e[f], n);
|
|
79
|
+
}), r;
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function E0(t, e, n) {
|
|
82
82
|
if (n0(e)) {
|
|
83
|
-
const
|
|
84
|
-
return
|
|
83
|
+
const r = e0(e, n);
|
|
84
|
+
return r.push(...e0(t, n)), r;
|
|
85
85
|
} else
|
|
86
86
|
return e0(t, n);
|
|
87
87
|
}
|
|
@@ -89,42 +89,42 @@ function e0(t, e) {
|
|
|
89
89
|
const { deepClone: n = !0 } = e || {};
|
|
90
90
|
return n ? l0(t) : t;
|
|
91
91
|
}
|
|
92
|
-
function
|
|
93
|
-
const { decode: n } = k({ decode: !0 }, e || {}),
|
|
92
|
+
function L0(t, e) {
|
|
93
|
+
const { decode: n } = k({ decode: !0 }, e || {}), r = {};
|
|
94
94
|
t.startsWith("?") && (t = t.slice(1)), t.includes("?") && (t = t.slice(t.indexOf("?") + 1));
|
|
95
95
|
const d = t.split("&").filter(Boolean);
|
|
96
96
|
for (const f of d) {
|
|
97
97
|
const [Y, y] = f.split("=");
|
|
98
|
-
|
|
98
|
+
r[Y] = n ? decodeURIComponent(y) : y;
|
|
99
99
|
}
|
|
100
|
-
return
|
|
100
|
+
return r;
|
|
101
101
|
}
|
|
102
102
|
function $0(t, e) {
|
|
103
|
-
const { encode: n } = k({ encode: !0 }, e || {}),
|
|
103
|
+
const { encode: n } = k({ encode: !0 }, e || {}), r = [];
|
|
104
104
|
for (const d in t) {
|
|
105
105
|
const f = t[d];
|
|
106
|
-
|
|
106
|
+
r.push(`${d}=${n ? encodeURIComponent(f) : f}`);
|
|
107
107
|
}
|
|
108
|
-
return
|
|
108
|
+
return r.join("&");
|
|
109
109
|
}
|
|
110
110
|
function _0(t, e, n) {
|
|
111
|
-
const
|
|
111
|
+
const r = k({ encode: !0 }, n || {}), d = $0(e, r);
|
|
112
112
|
return t.includes("?") ? t.endsWith("?") || t.endsWith("&") ? `${t}${d}` : `${t}&${d}` : `${t}?${d}`;
|
|
113
113
|
}
|
|
114
114
|
const e2 = {
|
|
115
|
-
parse:
|
|
115
|
+
parse: L0,
|
|
116
116
|
stringify: $0,
|
|
117
117
|
appendQueryString: _0
|
|
118
118
|
};
|
|
119
119
|
function n2(t, e = 500) {
|
|
120
120
|
let n = null;
|
|
121
|
-
return function(...
|
|
121
|
+
return function(...r) {
|
|
122
122
|
if (r0(n))
|
|
123
|
-
return n = Date.now(), t.apply(this,
|
|
123
|
+
return n = Date.now(), t.apply(this, r);
|
|
124
124
|
{
|
|
125
125
|
const d = Date.now();
|
|
126
126
|
if (d - n >= e)
|
|
127
|
-
return n = d, t.apply(this,
|
|
127
|
+
return n = d, t.apply(this, r);
|
|
128
128
|
}
|
|
129
129
|
};
|
|
130
130
|
}
|
|
@@ -143,35 +143,38 @@ function s2(t) {
|
|
|
143
143
|
function u2(t) {
|
|
144
144
|
return /^[\dA-Z_]+$/.test(t);
|
|
145
145
|
}
|
|
146
|
+
function a2(t) {
|
|
147
|
+
return /^([\w-])+@([\w-])+(\.[\w-])+/.test(t);
|
|
148
|
+
}
|
|
146
149
|
function g0(t) {
|
|
147
150
|
return n0(t) ? t : [t];
|
|
148
151
|
}
|
|
149
|
-
function
|
|
152
|
+
function c2(t, e) {
|
|
150
153
|
return (!W(t) || !W(e)) && V("deepMerge", "template 和 source 必须是对象"), n0(t) ? void 0 : p0(t, e);
|
|
151
154
|
}
|
|
152
155
|
function p0(t, e) {
|
|
153
156
|
const n = {};
|
|
154
|
-
return Object.keys(t).forEach((
|
|
155
|
-
const d = t[
|
|
156
|
-
W(d) && W(f) ? n[
|
|
157
|
+
return Object.keys(t).forEach((r) => {
|
|
158
|
+
const d = t[r], f = e[r];
|
|
159
|
+
W(d) && W(f) ? n[r] = p0(d, f) : Object.is(d, f) || (n[r] = f);
|
|
157
160
|
}), n;
|
|
158
161
|
}
|
|
159
|
-
function
|
|
162
|
+
function f2(t, e) {
|
|
160
163
|
const n = l0(t);
|
|
161
164
|
return g0(e).forEach((d) => {
|
|
162
165
|
d0(n, d) && delete n[d];
|
|
163
166
|
}), n;
|
|
164
167
|
}
|
|
165
|
-
function
|
|
168
|
+
function d2(t, e) {
|
|
166
169
|
const n = {};
|
|
167
170
|
return g0(e).forEach((d) => {
|
|
168
171
|
d0(t, d) && (n[d] = t[d]);
|
|
169
172
|
}), n;
|
|
170
173
|
}
|
|
171
|
-
function
|
|
172
|
-
return (!
|
|
174
|
+
function h2(t, e) {
|
|
175
|
+
return (!s0(t) || t <= 0) && V("generateRandomArray", "num 必须大于0"), i0(e) || V("generateRandomArray", "cb 必须是函数"), Array.from({ length: t }).fill(0).map((n, r) => e(n, r));
|
|
173
176
|
}
|
|
174
|
-
function
|
|
177
|
+
function l2() {
|
|
175
178
|
return `#${Math.random().toString(16).slice(2, 8).padEnd(6, "0")}`;
|
|
176
179
|
}
|
|
177
180
|
var M0 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
@@ -180,63 +183,63 @@ function y0(t) {
|
|
|
180
183
|
}
|
|
181
184
|
var D0 = { exports: {} };
|
|
182
185
|
(function(t, e) {
|
|
183
|
-
(function(n,
|
|
184
|
-
t.exports =
|
|
186
|
+
(function(n, r) {
|
|
187
|
+
t.exports = r();
|
|
185
188
|
})(M0, function() {
|
|
186
|
-
var n = 1e3,
|
|
187
|
-
var s = ["th", "st", "nd", "rd"],
|
|
188
|
-
return "[" + a + (s[(
|
|
189
|
-
} }, j = function(a, s,
|
|
189
|
+
var n = 1e3, r = 6e4, d = 36e5, f = "millisecond", Y = "second", y = "minute", _ = "hour", M = "day", q = "week", x = "month", Q = "quarter", C = "year", J = "date", l = "Invalid Date", g = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, D = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, w = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(a) {
|
|
190
|
+
var s = ["th", "st", "nd", "rd"], i = a % 100;
|
|
191
|
+
return "[" + a + (s[(i - 20) % 10] || s[i] || s[0]) + "]";
|
|
192
|
+
} }, j = function(a, s, i) {
|
|
190
193
|
var u = String(a);
|
|
191
|
-
return !u || u.length >= s ? a : "" + Array(s + 1 - u.length).join(
|
|
194
|
+
return !u || u.length >= s ? a : "" + Array(s + 1 - u.length).join(i) + a;
|
|
192
195
|
}, I = { s: j, z: function(a) {
|
|
193
|
-
var s = -a.utcOffset(),
|
|
196
|
+
var s = -a.utcOffset(), i = Math.abs(s), u = Math.floor(i / 60), o = i % 60;
|
|
194
197
|
return (s <= 0 ? "+" : "-") + j(u, 2, "0") + ":" + j(o, 2, "0");
|
|
195
|
-
}, m: function a(s,
|
|
196
|
-
if (s.date() <
|
|
197
|
-
return -a(
|
|
198
|
-
var u = 12 * (
|
|
199
|
-
return +(-(u + (
|
|
198
|
+
}, m: function a(s, i) {
|
|
199
|
+
if (s.date() < i.date())
|
|
200
|
+
return -a(i, s);
|
|
201
|
+
var u = 12 * (i.year() - s.year()) + (i.month() - s.month()), o = s.clone().add(u, x), c = i - o < 0, h = s.clone().add(u + (c ? -1 : 1), x);
|
|
202
|
+
return +(-(u + (i - o) / (c ? o - h : h - o)) || 0);
|
|
200
203
|
}, a: function(a) {
|
|
201
204
|
return a < 0 ? Math.ceil(a) || 0 : Math.floor(a);
|
|
202
205
|
}, p: function(a) {
|
|
203
206
|
return { M: x, y: C, w: q, d: M, D: J, h: _, m: y, s: Y, ms: f, Q }[a] || String(a || "").toLowerCase().replace(/s$/, "");
|
|
204
207
|
}, u: function(a) {
|
|
205
208
|
return a === void 0;
|
|
206
|
-
} }, Z = "en",
|
|
207
|
-
|
|
209
|
+
} }, Z = "en", E = {};
|
|
210
|
+
E[Z] = w;
|
|
208
211
|
var H = "$isDayjsObject", T = function(a) {
|
|
209
212
|
return a instanceof A || !(!a || !a[H]);
|
|
210
|
-
}, N = function a(s,
|
|
213
|
+
}, N = function a(s, i, u) {
|
|
211
214
|
var o;
|
|
212
215
|
if (!s)
|
|
213
216
|
return Z;
|
|
214
217
|
if (typeof s == "string") {
|
|
215
218
|
var c = s.toLowerCase();
|
|
216
|
-
|
|
219
|
+
E[c] && (o = c), i && (E[c] = i, o = c);
|
|
217
220
|
var h = s.split("-");
|
|
218
221
|
if (!o && h.length > 1)
|
|
219
222
|
return a(h[0]);
|
|
220
223
|
} else {
|
|
221
224
|
var $ = s.name;
|
|
222
|
-
|
|
225
|
+
E[$] = s, o = $;
|
|
223
226
|
}
|
|
224
227
|
return !u && o && (Z = o), o || !u && Z;
|
|
225
228
|
}, p = function(a, s) {
|
|
226
229
|
if (T(a))
|
|
227
230
|
return a.clone();
|
|
228
|
-
var
|
|
229
|
-
return
|
|
231
|
+
var i = typeof s == "object" ? s : {};
|
|
232
|
+
return i.date = a, i.args = arguments, new A(i);
|
|
230
233
|
}, m = I;
|
|
231
234
|
m.l = N, m.i = T, m.w = function(a, s) {
|
|
232
235
|
return p(a, { locale: s.$L, utc: s.$u, x: s.$x, $offset: s.$offset });
|
|
233
236
|
};
|
|
234
237
|
var A = function() {
|
|
235
|
-
function a(
|
|
236
|
-
this.$L = N(
|
|
238
|
+
function a(i) {
|
|
239
|
+
this.$L = N(i.locale, null, !0), this.parse(i), this.$x = this.$x || i.x || {}, this[H] = !0;
|
|
237
240
|
}
|
|
238
241
|
var s = a.prototype;
|
|
239
|
-
return s.parse = function(
|
|
242
|
+
return s.parse = function(i) {
|
|
240
243
|
this.$d = function(u) {
|
|
241
244
|
var o = u.date, c = u.utc;
|
|
242
245
|
if (o === null)
|
|
@@ -248,97 +251,97 @@ var D0 = { exports: {} };
|
|
|
248
251
|
if (typeof o == "string" && !/Z$/i.test(o)) {
|
|
249
252
|
var h = o.match(g);
|
|
250
253
|
if (h) {
|
|
251
|
-
var $ = h[2] - 1 || 0,
|
|
252
|
-
return c ? new Date(Date.UTC(h[1], $, h[3] || 1, h[4] || 0, h[5] || 0, h[6] || 0,
|
|
254
|
+
var $ = h[2] - 1 || 0, v = (h[7] || "0").substring(0, 3);
|
|
255
|
+
return c ? new Date(Date.UTC(h[1], $, h[3] || 1, h[4] || 0, h[5] || 0, h[6] || 0, v)) : new Date(h[1], $, h[3] || 1, h[4] || 0, h[5] || 0, h[6] || 0, v);
|
|
253
256
|
}
|
|
254
257
|
}
|
|
255
258
|
return new Date(o);
|
|
256
|
-
}(
|
|
259
|
+
}(i), this.init();
|
|
257
260
|
}, s.init = function() {
|
|
258
|
-
var
|
|
259
|
-
this.$y =
|
|
261
|
+
var i = this.$d;
|
|
262
|
+
this.$y = i.getFullYear(), this.$M = i.getMonth(), this.$D = i.getDate(), this.$W = i.getDay(), this.$H = i.getHours(), this.$m = i.getMinutes(), this.$s = i.getSeconds(), this.$ms = i.getMilliseconds();
|
|
260
263
|
}, s.$utils = function() {
|
|
261
264
|
return m;
|
|
262
265
|
}, s.isValid = function() {
|
|
263
266
|
return this.$d.toString() !== l;
|
|
264
|
-
}, s.isSame = function(
|
|
265
|
-
var o = p(
|
|
267
|
+
}, s.isSame = function(i, u) {
|
|
268
|
+
var o = p(i);
|
|
266
269
|
return this.startOf(u) <= o && o <= this.endOf(u);
|
|
267
|
-
}, s.isAfter = function(
|
|
268
|
-
return p(
|
|
269
|
-
}, s.isBefore = function(
|
|
270
|
-
return this.endOf(u) < p(
|
|
271
|
-
}, s.$g = function(
|
|
272
|
-
return m.u(
|
|
270
|
+
}, s.isAfter = function(i, u) {
|
|
271
|
+
return p(i) < this.startOf(u);
|
|
272
|
+
}, s.isBefore = function(i, u) {
|
|
273
|
+
return this.endOf(u) < p(i);
|
|
274
|
+
}, s.$g = function(i, u, o) {
|
|
275
|
+
return m.u(i) ? this[u] : this.set(o, i);
|
|
273
276
|
}, s.unix = function() {
|
|
274
277
|
return Math.floor(this.valueOf() / 1e3);
|
|
275
278
|
}, s.valueOf = function() {
|
|
276
279
|
return this.$d.getTime();
|
|
277
|
-
}, s.startOf = function(
|
|
278
|
-
var o = this, c = !!m.u(u) || u, h = m.p(
|
|
280
|
+
}, s.startOf = function(i, u) {
|
|
281
|
+
var o = this, c = !!m.u(u) || u, h = m.p(i), $ = function(U, O) {
|
|
279
282
|
var F = m.w(o.$u ? Date.UTC(o.$y, O, U) : new Date(o.$y, O, U), o);
|
|
280
283
|
return c ? F : F.endOf(M);
|
|
281
|
-
},
|
|
284
|
+
}, v = function(U, O) {
|
|
282
285
|
return m.w(o.toDate()[U].apply(o.toDate("s"), (c ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(O)), o);
|
|
283
|
-
},
|
|
286
|
+
}, b = this.$W, S = this.$M, L = this.$D, G = "set" + (this.$u ? "UTC" : "");
|
|
284
287
|
switch (h) {
|
|
285
288
|
case C:
|
|
286
289
|
return c ? $(1, 0) : $(31, 11);
|
|
287
290
|
case x:
|
|
288
291
|
return c ? $(1, S) : $(0, S + 1);
|
|
289
292
|
case q:
|
|
290
|
-
var z = this.$locale().weekStart || 0, X = (
|
|
291
|
-
return $(c ?
|
|
293
|
+
var z = this.$locale().weekStart || 0, X = (b < z ? b + 7 : b) - z;
|
|
294
|
+
return $(c ? L - X : L + (6 - X), S);
|
|
292
295
|
case M:
|
|
293
296
|
case J:
|
|
294
|
-
return
|
|
297
|
+
return v(G + "Hours", 0);
|
|
295
298
|
case _:
|
|
296
|
-
return
|
|
299
|
+
return v(G + "Minutes", 1);
|
|
297
300
|
case y:
|
|
298
|
-
return
|
|
301
|
+
return v(G + "Seconds", 2);
|
|
299
302
|
case Y:
|
|
300
|
-
return
|
|
303
|
+
return v(G + "Milliseconds", 3);
|
|
301
304
|
default:
|
|
302
305
|
return this.clone();
|
|
303
306
|
}
|
|
304
|
-
}, s.endOf = function(
|
|
305
|
-
return this.startOf(
|
|
306
|
-
}, s.$set = function(
|
|
307
|
-
var o, c = m.p(
|
|
307
|
+
}, s.endOf = function(i) {
|
|
308
|
+
return this.startOf(i, !1);
|
|
309
|
+
}, s.$set = function(i, u) {
|
|
310
|
+
var o, c = m.p(i), h = "set" + (this.$u ? "UTC" : ""), $ = (o = {}, o[M] = h + "Date", o[J] = h + "Date", o[x] = h + "Month", o[C] = h + "FullYear", o[_] = h + "Hours", o[y] = h + "Minutes", o[Y] = h + "Seconds", o[f] = h + "Milliseconds", o)[c], v = c === M ? this.$D + (u - this.$W) : u;
|
|
308
311
|
if (c === x || c === C) {
|
|
309
|
-
var
|
|
310
|
-
|
|
312
|
+
var b = this.clone().set(J, 1);
|
|
313
|
+
b.$d[$](v), b.init(), this.$d = b.set(J, Math.min(this.$D, b.daysInMonth())).$d;
|
|
311
314
|
} else
|
|
312
|
-
$ && this.$d[$](
|
|
315
|
+
$ && this.$d[$](v);
|
|
313
316
|
return this.init(), this;
|
|
314
|
-
}, s.set = function(
|
|
315
|
-
return this.clone().$set(
|
|
316
|
-
}, s.get = function(
|
|
317
|
-
return this[m.p(
|
|
318
|
-
}, s.add = function(
|
|
317
|
+
}, s.set = function(i, u) {
|
|
318
|
+
return this.clone().$set(i, u);
|
|
319
|
+
}, s.get = function(i) {
|
|
320
|
+
return this[m.p(i)]();
|
|
321
|
+
}, s.add = function(i, u) {
|
|
319
322
|
var o, c = this;
|
|
320
|
-
|
|
323
|
+
i = Number(i);
|
|
321
324
|
var h = m.p(u), $ = function(S) {
|
|
322
|
-
var
|
|
323
|
-
return m.w(
|
|
325
|
+
var L = p(c);
|
|
326
|
+
return m.w(L.date(L.date() + Math.round(S * i)), c);
|
|
324
327
|
};
|
|
325
328
|
if (h === x)
|
|
326
|
-
return this.set(x, this.$M +
|
|
329
|
+
return this.set(x, this.$M + i);
|
|
327
330
|
if (h === C)
|
|
328
|
-
return this.set(C, this.$y +
|
|
331
|
+
return this.set(C, this.$y + i);
|
|
329
332
|
if (h === M)
|
|
330
333
|
return $(1);
|
|
331
334
|
if (h === q)
|
|
332
335
|
return $(7);
|
|
333
|
-
var
|
|
334
|
-
return m.w(
|
|
335
|
-
}, s.subtract = function(
|
|
336
|
-
return this.add(-1 *
|
|
337
|
-
}, s.format = function(
|
|
336
|
+
var v = (o = {}, o[y] = r, o[_] = d, o[Y] = n, o)[h] || 1, b = this.$d.getTime() + i * v;
|
|
337
|
+
return m.w(b, this);
|
|
338
|
+
}, s.subtract = function(i, u) {
|
|
339
|
+
return this.add(-1 * i, u);
|
|
340
|
+
}, s.format = function(i) {
|
|
338
341
|
var u = this, o = this.$locale();
|
|
339
342
|
if (!this.isValid())
|
|
340
343
|
return o.invalidDate || l;
|
|
341
|
-
var c =
|
|
344
|
+
var c = i || "YYYY-MM-DDTHH:mm:ssZ", h = m.z(this), $ = this.$H, v = this.$m, b = this.$M, S = o.weekdays, L = o.months, G = o.meridiem, z = function(O, F, B, K) {
|
|
342
345
|
return O && (O[F] || O(u, c)) || B[F].slice(0, K);
|
|
343
346
|
}, X = function(O) {
|
|
344
347
|
return m.s($ % 12 || 12, O, "0");
|
|
@@ -354,13 +357,13 @@ var D0 = { exports: {} };
|
|
|
354
357
|
case "YYYY":
|
|
355
358
|
return m.s(u.$y, 4, "0");
|
|
356
359
|
case "M":
|
|
357
|
-
return
|
|
360
|
+
return b + 1;
|
|
358
361
|
case "MM":
|
|
359
|
-
return m.s(
|
|
362
|
+
return m.s(b + 1, 2, "0");
|
|
360
363
|
case "MMM":
|
|
361
|
-
return z(o.monthsShort,
|
|
364
|
+
return z(o.monthsShort, b, L, 3);
|
|
362
365
|
case "MMMM":
|
|
363
|
-
return z(
|
|
366
|
+
return z(L, b);
|
|
364
367
|
case "D":
|
|
365
368
|
return u.$D;
|
|
366
369
|
case "DD":
|
|
@@ -382,13 +385,13 @@ var D0 = { exports: {} };
|
|
|
382
385
|
case "hh":
|
|
383
386
|
return X(2);
|
|
384
387
|
case "a":
|
|
385
|
-
return U($,
|
|
388
|
+
return U($, v, !0);
|
|
386
389
|
case "A":
|
|
387
|
-
return U($,
|
|
390
|
+
return U($, v, !1);
|
|
388
391
|
case "m":
|
|
389
|
-
return String(
|
|
392
|
+
return String(v);
|
|
390
393
|
case "mm":
|
|
391
|
-
return m.s(
|
|
394
|
+
return m.s(v, 2, "0");
|
|
392
395
|
case "s":
|
|
393
396
|
return String(u.$s);
|
|
394
397
|
case "ss":
|
|
@@ -403,31 +406,31 @@ var D0 = { exports: {} };
|
|
|
403
406
|
});
|
|
404
407
|
}, s.utcOffset = function() {
|
|
405
408
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
406
|
-
}, s.diff = function(
|
|
407
|
-
var c, h = this, $ = m.p(u),
|
|
408
|
-
return m.m(h,
|
|
409
|
+
}, s.diff = function(i, u, o) {
|
|
410
|
+
var c, h = this, $ = m.p(u), v = p(i), b = (v.utcOffset() - this.utcOffset()) * r, S = this - v, L = function() {
|
|
411
|
+
return m.m(h, v);
|
|
409
412
|
};
|
|
410
413
|
switch ($) {
|
|
411
414
|
case C:
|
|
412
|
-
c =
|
|
415
|
+
c = L() / 12;
|
|
413
416
|
break;
|
|
414
417
|
case x:
|
|
415
|
-
c =
|
|
418
|
+
c = L();
|
|
416
419
|
break;
|
|
417
420
|
case Q:
|
|
418
|
-
c =
|
|
421
|
+
c = L() / 3;
|
|
419
422
|
break;
|
|
420
423
|
case q:
|
|
421
|
-
c = (S -
|
|
424
|
+
c = (S - b) / 6048e5;
|
|
422
425
|
break;
|
|
423
426
|
case M:
|
|
424
|
-
c = (S -
|
|
427
|
+
c = (S - b) / 864e5;
|
|
425
428
|
break;
|
|
426
429
|
case _:
|
|
427
430
|
c = S / d;
|
|
428
431
|
break;
|
|
429
432
|
case y:
|
|
430
|
-
c = S /
|
|
433
|
+
c = S / r;
|
|
431
434
|
break;
|
|
432
435
|
case Y:
|
|
433
436
|
c = S / n;
|
|
@@ -439,11 +442,11 @@ var D0 = { exports: {} };
|
|
|
439
442
|
}, s.daysInMonth = function() {
|
|
440
443
|
return this.endOf(x).$D;
|
|
441
444
|
}, s.$locale = function() {
|
|
442
|
-
return
|
|
443
|
-
}, s.locale = function(
|
|
444
|
-
if (!
|
|
445
|
+
return E[this.$L];
|
|
446
|
+
}, s.locale = function(i, u) {
|
|
447
|
+
if (!i)
|
|
445
448
|
return this.$L;
|
|
446
|
-
var o = this.clone(), c = N(
|
|
449
|
+
var o = this.clone(), c = N(i, u, !0);
|
|
447
450
|
return c && (o.$L = c), o;
|
|
448
451
|
}, s.clone = function() {
|
|
449
452
|
return m.w(this.$d, this);
|
|
@@ -465,17 +468,17 @@ var D0 = { exports: {} };
|
|
|
465
468
|
return a.$i || (a(s, A, p), a.$i = !0), p;
|
|
466
469
|
}, p.locale = N, p.isDayjs = T, p.unix = function(a) {
|
|
467
470
|
return p(1e3 * a);
|
|
468
|
-
}, p.en =
|
|
471
|
+
}, p.en = E[Z], p.Ls = E, p.p = {}, p;
|
|
469
472
|
});
|
|
470
473
|
})(D0);
|
|
471
474
|
var j0 = D0.exports;
|
|
472
475
|
const R = /* @__PURE__ */ y0(j0);
|
|
473
476
|
var w0 = { exports: {} };
|
|
474
477
|
(function(t, e) {
|
|
475
|
-
(function(n,
|
|
476
|
-
t.exports =
|
|
478
|
+
(function(n, r) {
|
|
479
|
+
t.exports = r();
|
|
477
480
|
})(M0, function() {
|
|
478
|
-
var n = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" },
|
|
481
|
+
var n = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, r = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, d = /\d\d/, f = /\d\d?/, Y = /\d*[^-_:/,()\s\d]+/, y = {}, _ = function(l) {
|
|
479
482
|
return (l = +l) + (l > 68 ? 1900 : 2e3);
|
|
480
483
|
}, M = function(l) {
|
|
481
484
|
return function(g) {
|
|
@@ -540,8 +543,8 @@ var w0 = { exports: {} };
|
|
|
540
543
|
return p || D[m] || n[m] || D[A].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(P, a, s) {
|
|
541
544
|
return a || s.slice(1);
|
|
542
545
|
});
|
|
543
|
-
})).match(
|
|
544
|
-
var Z = w[I],
|
|
546
|
+
})).match(r), j = w.length, I = 0; I < j; I += 1) {
|
|
547
|
+
var Z = w[I], E = C[Z], H = E && E[0], T = E && E[1];
|
|
545
548
|
w[I] = T ? { regex: H, parser: T } : Z.replace(/^\[|\]$/g, "");
|
|
546
549
|
}
|
|
547
550
|
return function(N) {
|
|
@@ -550,7 +553,7 @@ var w0 = { exports: {} };
|
|
|
550
553
|
if (typeof P == "string")
|
|
551
554
|
A += P.length;
|
|
552
555
|
else {
|
|
553
|
-
var a = P.regex, s = P.parser,
|
|
556
|
+
var a = P.regex, s = P.parser, i = N.slice(A), u = a.exec(i)[0];
|
|
554
557
|
s.call(p, u), N = N.replace(u, "");
|
|
555
558
|
}
|
|
556
559
|
}
|
|
@@ -567,23 +570,23 @@ var w0 = { exports: {} };
|
|
|
567
570
|
D.p.customParseFormat = !0, l && l.parseTwoDigitYear && (_ = l.parseTwoDigitYear);
|
|
568
571
|
var w = g.prototype, j = w.parse;
|
|
569
572
|
w.parse = function(I) {
|
|
570
|
-
var Z = I.date,
|
|
571
|
-
this.$u =
|
|
573
|
+
var Z = I.date, E = I.utc, H = I.args;
|
|
574
|
+
this.$u = E;
|
|
572
575
|
var T = H[1];
|
|
573
576
|
if (typeof T == "string") {
|
|
574
577
|
var N = H[2] === !0, p = H[3] === !0, m = N || p, A = H[2];
|
|
575
|
-
p && (A = H[2]), y = this.$locale(), !N && A && (y = D.Ls[A]), this.$d = function(
|
|
578
|
+
p && (A = H[2]), y = this.$locale(), !N && A && (y = D.Ls[A]), this.$d = function(i, u, o) {
|
|
576
579
|
try {
|
|
577
580
|
if (["x", "X"].indexOf(u) > -1)
|
|
578
|
-
return new Date((u === "X" ? 1e3 : 1) *
|
|
579
|
-
var c = J(u)(
|
|
581
|
+
return new Date((u === "X" ? 1e3 : 1) * i);
|
|
582
|
+
var c = J(u)(i), h = c.year, $ = c.month, v = c.day, b = c.hours, S = c.minutes, L = c.seconds, G = c.milliseconds, z = c.zone, X = /* @__PURE__ */ new Date(), U = v || (h || $ ? 1 : X.getDate()), O = h || X.getFullYear(), F = 0;
|
|
580
583
|
h && !$ || (F = $ > 0 ? $ - 1 : X.getMonth());
|
|
581
|
-
var B =
|
|
582
|
-
return z ? new Date(Date.UTC(O, F, U, B, K,
|
|
584
|
+
var B = b || 0, K = S || 0, a0 = L || 0, c0 = G || 0;
|
|
585
|
+
return z ? new Date(Date.UTC(O, F, U, B, K, a0, c0 + 60 * z.offset * 1e3)) : o ? new Date(Date.UTC(O, F, U, B, K, a0, c0)) : new Date(O, F, U, B, K, a0, c0);
|
|
583
586
|
} catch {
|
|
584
587
|
return /* @__PURE__ */ new Date("");
|
|
585
588
|
}
|
|
586
|
-
}(Z, T,
|
|
589
|
+
}(Z, T, E), this.init(), A && A !== !0 && (this.$L = this.locale(A).$L), m && Z != this.format(T) && (this.$d = /* @__PURE__ */ new Date("")), y = {};
|
|
587
590
|
} else if (T instanceof Array)
|
|
588
591
|
for (var P = T.length, a = 1; a <= P; a += 1) {
|
|
589
592
|
H[1] = T[a - 1];
|
|
@@ -601,32 +604,28 @@ var w0 = { exports: {} };
|
|
|
601
604
|
});
|
|
602
605
|
})(w0);
|
|
603
606
|
var T0 = w0.exports;
|
|
604
|
-
const
|
|
607
|
+
const v0 = /* @__PURE__ */ y0(T0);
|
|
605
608
|
function t0(t = {}) {
|
|
606
|
-
|
|
607
|
-
const { min: e = 0, max: n = Number.MAX_SAFE_INTEGER } = t,
|
|
608
|
-
|
|
609
|
-
return i;
|
|
610
|
-
if (d < i)
|
|
611
|
-
throw n >= e ? V("generateRandomInteger", `未找到 ${e} 和 ${n} 之间的整数值`) : V("generateRandomInteger", `最大值 ${n} 应大于最小值 ${e}`);
|
|
612
|
-
return Math.floor(Math.random() * (d - i + 1) + i);
|
|
609
|
+
s0(t) && (t = { max: t });
|
|
610
|
+
const { min: e = 0, max: n = Number.MAX_SAFE_INTEGER } = t, r = Math.ceil(e), d = Math.floor(n);
|
|
611
|
+
return r === d ? r : (d < r && (n >= e && V("generateRandomInteger", `未找到 ${e} 和 ${n} 之间的整数值`), V("generateRandomInteger", `最大值 ${n} 应大于最小值 ${e}`)), Math.floor(Math.random() * (d - r + 1) + r));
|
|
613
612
|
}
|
|
614
|
-
R.extend(
|
|
615
|
-
function
|
|
613
|
+
R.extend(v0);
|
|
614
|
+
function b0(t = {}) {
|
|
616
615
|
const e = {
|
|
617
616
|
start: "1800-01-01 00:00:00",
|
|
618
617
|
end: R().format("YYYY-MM-DD HH:mm:ss"),
|
|
619
618
|
format: "YYYY-MM-DD HH:mm:ss"
|
|
620
|
-
}, { start: n, end:
|
|
621
|
-
(!R(n).isValid() || !R(
|
|
622
|
-
const f = R(n).year(), Y = R(
|
|
623
|
-
return C.isBefore(R(n)) || C.isAfter(R(
|
|
619
|
+
}, { start: n, end: r, format: d } = k(e, t);
|
|
620
|
+
(!R(n).isValid() || !R(r).isValid()) && V("generateRandomDate", "start end 参数必须是合法的时间格式");
|
|
621
|
+
const f = R(n).year(), Y = R(r).year(), y = t0({ min: f, max: Y }), _ = t0({ min: 1, max: 12 }), M = t0({ min: 1, max: 31 }), q = t0(23), x = t0(59), Q = t0(59), C = R(`${y}-${_}-${M} ${q}:${x}:${Q}`);
|
|
622
|
+
return C.isBefore(R(n)) || C.isAfter(R(r)) ? (console.log("不合法时间", R(C).format("YYYY-MM-DD HH:mm:ss")), b0(t)) : C.format(d);
|
|
624
623
|
}
|
|
625
624
|
function F0(t, e = {}) {
|
|
626
|
-
const { lowerCase: n, upperCase:
|
|
627
|
-
n ||
|
|
625
|
+
const { lowerCase: n, upperCase: r, number: d } = k({ lowerCase: !0, upperCase: !0, number: !0 }, e);
|
|
626
|
+
n || r || d || V("generateRandomString", "lowerCase upperCase number 至少需要一个参数为true");
|
|
628
627
|
let f = "";
|
|
629
|
-
n && (f += "abcdefghijklmnopqrstuvwxyz"),
|
|
628
|
+
n && (f += "abcdefghijklmnopqrstuvwxyz"), r && (f += "ABCDEFGHIJKLMNOPQRSTUVWXYZ"), d && (f += "0123456789");
|
|
630
629
|
let Y = "";
|
|
631
630
|
for (let y = 0; y < t; y++) {
|
|
632
631
|
const _ = Math.floor(Math.random() * f.length);
|
|
@@ -634,21 +633,27 @@ function F0(t, e = {}) {
|
|
|
634
633
|
}
|
|
635
634
|
return Y;
|
|
636
635
|
}
|
|
637
|
-
function
|
|
636
|
+
function u0(t) {
|
|
638
637
|
return t[Math.floor(Math.random() * t.length)];
|
|
639
638
|
}
|
|
640
|
-
function
|
|
639
|
+
function m2() {
|
|
641
640
|
const t = ["gmail.com", "yahoo.com", "outlook.com", "example.com", "qq.com", "163.com"];
|
|
642
|
-
return `${F0(10)}@${
|
|
641
|
+
return `${F0(10)}@${u0(t)}`;
|
|
643
642
|
}
|
|
644
|
-
function
|
|
645
|
-
|
|
643
|
+
function $2(t = {}) {
|
|
644
|
+
s0(t) && (t = { max: t });
|
|
645
|
+
const { min: e = 0, max: n = 1, fractionDigits: r = 2 } = t;
|
|
646
|
+
if (e === n)
|
|
647
|
+
return e;
|
|
648
|
+
if (e > n)
|
|
649
|
+
throw new Error(`最大值 ${n} 应大于最小值 ${e}`);
|
|
650
|
+
return Math.random() * (n - e) + e;
|
|
646
651
|
}
|
|
647
652
|
function h0(t, e) {
|
|
648
|
-
(!
|
|
653
|
+
(!s0(t) || t <= 0) && V("generateRandomStringFromSource", "num 必须大于0"), (!n0(e) || e.length === 0) && V("generateRandomStringFromSource", "source 不能为空数组");
|
|
649
654
|
let n = "";
|
|
650
|
-
for (let
|
|
651
|
-
n +=
|
|
655
|
+
for (let r = 0; r < t; r++)
|
|
656
|
+
n += u0(e);
|
|
652
657
|
return n;
|
|
653
658
|
}
|
|
654
659
|
const Y0 = {
|
|
@@ -3824,58 +3829,58 @@ const Y0 = {
|
|
|
3824
3829
|
香港特别行政区: "810000",
|
|
3825
3830
|
澳门特别行政区: "820000"
|
|
3826
3831
|
};
|
|
3827
|
-
function
|
|
3828
|
-
const t =
|
|
3832
|
+
function g2() {
|
|
3833
|
+
const t = u0(Object.values(Y0)), e = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
3829
3834
|
return [
|
|
3830
3835
|
t,
|
|
3831
|
-
|
|
3836
|
+
b0({ format: "YYYYMMDD" }),
|
|
3832
3837
|
h0(3, e),
|
|
3833
3838
|
h0(1, [...e, "X", "x"])
|
|
3834
3839
|
].join("");
|
|
3835
3840
|
}
|
|
3836
|
-
function
|
|
3837
|
-
return
|
|
3841
|
+
function p2() {
|
|
3842
|
+
return u0(["13", "14", "15", "16", "17", "18", "19"]) + t0(999999999).toString().padEnd(9, "0");
|
|
3838
3843
|
}
|
|
3839
|
-
function
|
|
3844
|
+
function M2(t) {
|
|
3840
3845
|
return /^\d+$/.test(t);
|
|
3841
3846
|
}
|
|
3842
|
-
function
|
|
3847
|
+
function y2(t) {
|
|
3843
3848
|
return /^[\u4E00-\u9FA5]+$/.test(t);
|
|
3844
3849
|
}
|
|
3845
|
-
function
|
|
3850
|
+
function D2(t) {
|
|
3846
3851
|
return /^[A-Za-z]+$/.test(t);
|
|
3847
3852
|
}
|
|
3848
|
-
function
|
|
3853
|
+
function w2(t) {
|
|
3849
3854
|
return /^[A-Z]+$/.test(t);
|
|
3850
3855
|
}
|
|
3851
|
-
function
|
|
3856
|
+
function v2(t) {
|
|
3852
3857
|
return /^[\dA-Z]+$/.test(t);
|
|
3853
3858
|
}
|
|
3854
3859
|
function b2(t) {
|
|
3855
3860
|
return /^[\dA-Z\u4E00-\u9FA5]+$/.test(t);
|
|
3856
3861
|
}
|
|
3857
|
-
function
|
|
3862
|
+
function Y2(t) {
|
|
3858
3863
|
return /^[a-z]+$/.test(t);
|
|
3859
3864
|
}
|
|
3860
|
-
function
|
|
3865
|
+
function S2(t) {
|
|
3861
3866
|
return /^[\da-z]+$/.test(t);
|
|
3862
3867
|
}
|
|
3863
|
-
function
|
|
3868
|
+
function O2(t) {
|
|
3864
3869
|
return /^[\da-z\u4E00-\u9FA5]+$/.test(t);
|
|
3865
3870
|
}
|
|
3866
|
-
function
|
|
3871
|
+
function x2(t, e = {}) {
|
|
3867
3872
|
const { integer: n } = k({ integer: !0 }, e);
|
|
3868
3873
|
return n ? /^-?(0|[1-9]\d*)(\.\d+)?$/.test(t) : /^-?(0|[1-9]\d*)\.\d+$/.test(t);
|
|
3869
3874
|
}
|
|
3870
|
-
function
|
|
3875
|
+
function A2(t, e = {}) {
|
|
3871
3876
|
const { integer: n } = k({ integer: !0 }, e);
|
|
3872
3877
|
return n ? /^[1-9]\d*\.?\d*|^0\.\d*[1-9]\d*$/.test(t) : /^[1-9]\d*\.\d*|^0\.\d*[1-9]\d*$/.test(t);
|
|
3873
3878
|
}
|
|
3874
|
-
function
|
|
3879
|
+
function C2(t, e = {}) {
|
|
3875
3880
|
const { integer: n } = k({ integer: !0 }, e);
|
|
3876
3881
|
return n ? /^-[1-9]\d*\.?\d*|^-0\.\d*[1-9]\d*$/.test(t) : /^-[1-9]\d*\.\d*|^-0\.\d*[1-9]\d*$/.test(t);
|
|
3877
3882
|
}
|
|
3878
|
-
function
|
|
3883
|
+
function E2(t, e = {}) {
|
|
3879
3884
|
const { integer: n } = k({ integer: !0 }, e);
|
|
3880
3885
|
return n ? /^(0|[1-9]\d*)(\.\d+)?$/.test(t) : /^(0|[1-9]\d*)\.\d+$/.test(t);
|
|
3881
3886
|
}
|
|
@@ -3883,40 +3888,40 @@ function L2(t, e = {}) {
|
|
|
3883
3888
|
const { integer: n } = k({ integer: !0 }, e);
|
|
3884
3889
|
return n ? /^(-?0(\.0+)?|-(0|[1-9]\d*)(\.\d+)?)$/.test(t) : /^(-?0\.0+|-(0|[1-9]\d*)\.\d+)$/.test(t);
|
|
3885
3890
|
}
|
|
3886
|
-
function
|
|
3891
|
+
function _2(t) {
|
|
3887
3892
|
return /^-?(0|[1-9]\d*)$/.test(t);
|
|
3888
3893
|
}
|
|
3889
|
-
function
|
|
3894
|
+
function j2(t) {
|
|
3890
3895
|
return /^[1-9]\d*$/.test(t);
|
|
3891
3896
|
}
|
|
3892
|
-
function
|
|
3897
|
+
function T2(t) {
|
|
3893
3898
|
return /^(0|[1-9]\d*)$/.test(t);
|
|
3894
3899
|
}
|
|
3895
|
-
function
|
|
3900
|
+
function F2(t) {
|
|
3896
3901
|
return /^-([1-9]\d*)$/.test(t);
|
|
3897
3902
|
}
|
|
3898
|
-
function
|
|
3903
|
+
function H2(t) {
|
|
3899
3904
|
return /^(0|-(0|[1-9]\d*))$/.test(t);
|
|
3900
3905
|
}
|
|
3901
|
-
function
|
|
3906
|
+
function N2(t) {
|
|
3902
3907
|
return /^1[3-9]\d{9}$/.test(t);
|
|
3903
3908
|
}
|
|
3904
|
-
function
|
|
3909
|
+
function R2(t) {
|
|
3905
3910
|
return /^([\w-])+@([\w-])+(\.[\w-])+/.test(t);
|
|
3906
3911
|
}
|
|
3907
|
-
function
|
|
3912
|
+
function I2(t) {
|
|
3908
3913
|
return t === "";
|
|
3909
3914
|
}
|
|
3910
3915
|
function H0(t, e = "YYYY-MM-DD HH:mm:ss") {
|
|
3911
|
-
return R.extend(
|
|
3916
|
+
return R.extend(v0), R(t, e, !0).isValid();
|
|
3912
3917
|
}
|
|
3913
|
-
function
|
|
3918
|
+
function Z2(t) {
|
|
3914
3919
|
let e = /^[1-9]\d{5}(18|19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}[\dXx]$/.test(t);
|
|
3915
3920
|
return !e || (e = Object.values(Y0).includes(t.slice(0, 6)), !e) || (e = H0(t.slice(6, 14), "YYYYMMDD"), !e), e;
|
|
3916
3921
|
}
|
|
3917
3922
|
export {
|
|
3918
3923
|
g0 as castArray,
|
|
3919
|
-
|
|
3924
|
+
c2 as compareProperties,
|
|
3920
3925
|
R0 as compose,
|
|
3921
3926
|
I0 as composeRight,
|
|
3922
3927
|
Z0 as debounce,
|
|
@@ -3924,52 +3929,52 @@ export {
|
|
|
3924
3929
|
l0 as deepClone,
|
|
3925
3930
|
k as deepMerge,
|
|
3926
3931
|
z0 as error,
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3932
|
+
f2 as excludeProperties,
|
|
3933
|
+
d2 as extractProperties,
|
|
3934
|
+
h2 as generateRandomArray,
|
|
3935
|
+
l2 as generateRandomColor,
|
|
3936
|
+
b0 as generateRandomDate,
|
|
3937
|
+
m2 as generateRandomEmail,
|
|
3938
|
+
$2 as generateRandomFloat,
|
|
3939
|
+
g2 as generateRandomIdCard,
|
|
3935
3940
|
t0 as generateRandomInteger,
|
|
3936
|
-
|
|
3941
|
+
p2 as generateRandomMobilePhone,
|
|
3937
3942
|
F0 as generateRandomString,
|
|
3938
3943
|
h0 as generateRandomStringFromSource,
|
|
3939
|
-
|
|
3944
|
+
u0 as getRandomItem,
|
|
3940
3945
|
Q0 as hasChanged,
|
|
3941
3946
|
d0 as hasOwn,
|
|
3942
3947
|
P0 as initLog,
|
|
3943
3948
|
n0 as isArray,
|
|
3944
3949
|
K0 as isBoolean,
|
|
3945
|
-
|
|
3950
|
+
y2 as isChinese,
|
|
3946
3951
|
O0 as isDate,
|
|
3947
3952
|
H0 as isDateString,
|
|
3948
3953
|
G0 as isDef,
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3954
|
+
R2 as isEmail,
|
|
3955
|
+
I2 as isEmptyString,
|
|
3956
|
+
D2 as isEnglishAphabet,
|
|
3957
|
+
x2 as isFloat,
|
|
3953
3958
|
i0 as isFunction,
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
+
Z2 as isIdCard,
|
|
3960
|
+
_2 as isInteger,
|
|
3961
|
+
Y2 as isLowerCase,
|
|
3962
|
+
S2 as isLowerCaseAndNumber,
|
|
3963
|
+
O2 as isLowerCaseAndNumberAndChinese,
|
|
3959
3964
|
W0 as isMap,
|
|
3960
|
-
|
|
3961
|
-
|
|
3965
|
+
N2 as isMobilePhone,
|
|
3966
|
+
C2 as isNegativeFloat,
|
|
3962
3967
|
L2 as isNegativeFloatOrZero,
|
|
3963
|
-
|
|
3964
|
-
|
|
3968
|
+
F2 as isNegativeInteger,
|
|
3969
|
+
H2 as isNegativeIntegerOrZero,
|
|
3965
3970
|
J0 as isNull,
|
|
3966
|
-
|
|
3967
|
-
|
|
3971
|
+
s0 as isNumber,
|
|
3972
|
+
M2 as isNumberOrNumberString,
|
|
3968
3973
|
W as isObject,
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3974
|
+
A2 as isPositiveFloat,
|
|
3975
|
+
E2 as isPositiveFloatOrZero,
|
|
3976
|
+
j2 as isPositiveInteger,
|
|
3977
|
+
T2 as isPositiveIntegerOrZero,
|
|
3973
3978
|
X0 as isPromise,
|
|
3974
3979
|
x0 as isRegExp,
|
|
3975
3980
|
V0 as isSet,
|
|
@@ -3977,8 +3982,8 @@ export {
|
|
|
3977
3982
|
q0 as isSymbol,
|
|
3978
3983
|
r0 as isUndef,
|
|
3979
3984
|
B0 as isUndefined,
|
|
3980
|
-
|
|
3981
|
-
|
|
3985
|
+
w2 as isUpperCase,
|
|
3986
|
+
v2 as isUpperCaseAndNumber,
|
|
3982
3987
|
b2 as isUpperCaseAndNumberAndChinese,
|
|
3983
3988
|
U0 as log,
|
|
3984
3989
|
S0 as objectToString,
|
|
@@ -3988,6 +3993,7 @@ export {
|
|
|
3988
3993
|
o0 as toTypeString,
|
|
3989
3994
|
o2 as validatorChineseOrEnglish,
|
|
3990
3995
|
i2 as validatorChineseOrEnglishOrNumber,
|
|
3996
|
+
a2 as validatorEmail,
|
|
3991
3997
|
r2 as validatorLatitudeOrLongitude,
|
|
3992
3998
|
s2 as validatorUppercaseOrNumbersOrSpecial,
|
|
3993
3999
|
u2 as validatorUppercaseOrNumbersOrUnderline,
|