@mi-avalon/libs 0.0.24 → 0.0.26
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/components/MiModal/index.d.ts +15 -0
- package/dist/components/MiModal/index.js +70 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -1
- package/dist/constants/date.d.ts +2 -0
- package/dist/constants/date.js +2 -0
- package/dist/constants/pattern.d.ts +66 -0
- package/dist/constants/pattern.js +66 -22
- package/dist/index.es.js +1647 -1180
- package/dist/index.umd.js +15 -15
- package/dist/utils/calc.d.ts +179 -12
- package/dist/utils/calc.js +355 -81
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -1
- package/dist/utils/openModal.d.ts +15 -0
- package/dist/utils/openModal.js +98 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,13 +1,30 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
6
|
-
import { theme as
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
var Xr = Object.defineProperty;
|
|
2
|
+
var Qr = (n, e, t) => e in n ? Xr(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var m = (n, e, t) => (Qr(n, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
|
+
import * as W from "react";
|
|
5
|
+
import Ve, { createContext as tr, useContext as rr, useEffect as ie, Component as en, useState as Y, useRef as K, useCallback as oe } from "react";
|
|
6
|
+
import { theme as ze, ConfigProvider as nr, Button as Pe, Affix as tn, Card as ar, Breadcrumb as It, Descriptions as Lt, Input as nt, InputNumber as rn, DatePicker as sr, Select as nn, Radio as an, Checkbox as sn, Upload as on, Mentions as cn, Cascader as ln, TreeSelect as un, Form as it, Row as fn, Col as dn, Modal as hn, Table as gn } from "antd";
|
|
7
|
+
import pn from "react-dom";
|
|
8
|
+
function mn(n, e) {
|
|
9
|
+
for (var t = 0; t < e.length; t++) {
|
|
10
|
+
const r = e[t];
|
|
11
|
+
if (typeof r != "string" && !Array.isArray(r)) {
|
|
12
|
+
for (const s in r)
|
|
13
|
+
if (s !== "default" && !(s in n)) {
|
|
14
|
+
const o = Object.getOwnPropertyDescriptor(r, s);
|
|
15
|
+
o && Object.defineProperty(n, s, o.get ? o : {
|
|
16
|
+
enumerable: !0,
|
|
17
|
+
get: () => r[s]
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return Object.freeze(Object.defineProperty(n, Symbol.toStringTag, { value: "Module" }));
|
|
23
|
+
}
|
|
24
|
+
function vn(n) {
|
|
25
|
+
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
26
|
+
}
|
|
27
|
+
var ct = { exports: {} }, _e = {};
|
|
11
28
|
/**
|
|
12
29
|
* @license React
|
|
13
30
|
* react-jsx-runtime.production.min.js
|
|
@@ -17,25 +34,25 @@ var Xe = { exports: {} }, xe = {};
|
|
|
17
34
|
* This source code is licensed under the MIT license found in the
|
|
18
35
|
* LICENSE file in the root directory of this source tree.
|
|
19
36
|
*/
|
|
20
|
-
var
|
|
21
|
-
function
|
|
22
|
-
if (
|
|
23
|
-
return
|
|
24
|
-
|
|
25
|
-
var
|
|
26
|
-
function
|
|
27
|
-
var g, d = {}, b = null,
|
|
28
|
-
|
|
37
|
+
var Yt;
|
|
38
|
+
function bn() {
|
|
39
|
+
if (Yt)
|
|
40
|
+
return _e;
|
|
41
|
+
Yt = 1;
|
|
42
|
+
var n = Ve, e = Symbol.for("react.element"), t = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, s = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
43
|
+
function i(l, u, c) {
|
|
44
|
+
var g, d = {}, b = null, O = null;
|
|
45
|
+
c !== void 0 && (b = "" + c), u.key !== void 0 && (b = "" + u.key), u.ref !== void 0 && (O = u.ref);
|
|
29
46
|
for (g in u)
|
|
30
|
-
|
|
31
|
-
if (
|
|
32
|
-
for (g in u =
|
|
47
|
+
r.call(u, g) && !o.hasOwnProperty(g) && (d[g] = u[g]);
|
|
48
|
+
if (l && l.defaultProps)
|
|
49
|
+
for (g in u = l.defaultProps, u)
|
|
33
50
|
d[g] === void 0 && (d[g] = u[g]);
|
|
34
|
-
return { $$typeof: e, type:
|
|
51
|
+
return { $$typeof: e, type: l, key: b, ref: O, props: d, _owner: s.current };
|
|
35
52
|
}
|
|
36
|
-
return
|
|
53
|
+
return _e.Fragment = t, _e.jsx = i, _e.jsxs = i, _e;
|
|
37
54
|
}
|
|
38
|
-
var
|
|
55
|
+
var Ee = {};
|
|
39
56
|
/**
|
|
40
57
|
* @license React
|
|
41
58
|
* react-jsx-runtime.development.js
|
|
@@ -45,54 +62,54 @@ var we = {};
|
|
|
45
62
|
* This source code is licensed under the MIT license found in the
|
|
46
63
|
* LICENSE file in the root directory of this source tree.
|
|
47
64
|
*/
|
|
48
|
-
var
|
|
49
|
-
function
|
|
50
|
-
return
|
|
51
|
-
var
|
|
52
|
-
function
|
|
65
|
+
var Ht;
|
|
66
|
+
function yn() {
|
|
67
|
+
return Ht || (Ht = 1, process.env.NODE_ENV !== "production" && function() {
|
|
68
|
+
var n = Ve, e = Symbol.for("react.element"), t = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), l = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), d = Symbol.for("react.memo"), b = Symbol.for("react.lazy"), O = Symbol.for("react.offscreen"), P = Symbol.iterator, T = "@@iterator";
|
|
69
|
+
function H(a) {
|
|
53
70
|
if (a === null || typeof a != "object")
|
|
54
71
|
return null;
|
|
55
|
-
var f =
|
|
72
|
+
var f = P && a[P] || a[T];
|
|
56
73
|
return typeof f == "function" ? f : null;
|
|
57
74
|
}
|
|
58
|
-
var
|
|
75
|
+
var j = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
59
76
|
function y(a) {
|
|
60
77
|
{
|
|
61
|
-
for (var f = arguments.length, h = new Array(f > 1 ? f - 1 : 0),
|
|
62
|
-
h[
|
|
78
|
+
for (var f = arguments.length, h = new Array(f > 1 ? f - 1 : 0), v = 1; v < f; v++)
|
|
79
|
+
h[v - 1] = arguments[v];
|
|
63
80
|
E("error", a, h);
|
|
64
81
|
}
|
|
65
82
|
}
|
|
66
83
|
function E(a, f, h) {
|
|
67
84
|
{
|
|
68
|
-
var
|
|
69
|
-
|
|
70
|
-
var _ = h.map(function(
|
|
71
|
-
return String(
|
|
85
|
+
var v = j.ReactDebugCurrentFrame, C = v.getStackAddendum();
|
|
86
|
+
C !== "" && (f += "%s", h = h.concat([C]));
|
|
87
|
+
var _ = h.map(function(x) {
|
|
88
|
+
return String(x);
|
|
72
89
|
});
|
|
73
90
|
_.unshift("Warning: " + f), Function.prototype.apply.call(console[a], console, _);
|
|
74
91
|
}
|
|
75
92
|
}
|
|
76
|
-
var M = !1,
|
|
77
|
-
|
|
78
|
-
function
|
|
79
|
-
return !!(typeof a == "string" || typeof a == "function" || a ===
|
|
93
|
+
var M = !1, B = !1, ne = !1, J = !1, xe = !1, X;
|
|
94
|
+
X = Symbol.for("react.module.reference");
|
|
95
|
+
function ce(a) {
|
|
96
|
+
return !!(typeof a == "string" || typeof a == "function" || a === r || a === o || xe || a === s || a === c || a === g || J || a === O || M || B || ne || typeof a == "object" && a !== null && (a.$$typeof === b || a.$$typeof === d || a.$$typeof === i || a.$$typeof === l || a.$$typeof === u || // This needs to include all possible module reference object
|
|
80
97
|
// types supported by any Flight configuration anywhere since
|
|
81
98
|
// we don't know which Flight build this will end up being used
|
|
82
99
|
// with.
|
|
83
|
-
a.$$typeof ===
|
|
100
|
+
a.$$typeof === X || a.getModuleId !== void 0));
|
|
84
101
|
}
|
|
85
|
-
function
|
|
86
|
-
var
|
|
87
|
-
if (
|
|
88
|
-
return
|
|
89
|
-
var
|
|
90
|
-
return
|
|
102
|
+
function Ce(a, f, h) {
|
|
103
|
+
var v = a.displayName;
|
|
104
|
+
if (v)
|
|
105
|
+
return v;
|
|
106
|
+
var C = f.displayName || f.name || "";
|
|
107
|
+
return C !== "" ? h + "(" + C + ")" : h;
|
|
91
108
|
}
|
|
92
109
|
function z(a) {
|
|
93
110
|
return a.displayName || "Context";
|
|
94
111
|
}
|
|
95
|
-
function
|
|
112
|
+
function D(a) {
|
|
96
113
|
if (a == null)
|
|
97
114
|
return null;
|
|
98
115
|
if (typeof a.tag == "number" && y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof a == "function")
|
|
@@ -100,36 +117,36 @@ function en() {
|
|
|
100
117
|
if (typeof a == "string")
|
|
101
118
|
return a;
|
|
102
119
|
switch (a) {
|
|
103
|
-
case
|
|
120
|
+
case r:
|
|
104
121
|
return "Fragment";
|
|
105
122
|
case t:
|
|
106
123
|
return "Portal";
|
|
107
|
-
case
|
|
124
|
+
case o:
|
|
108
125
|
return "Profiler";
|
|
109
126
|
case s:
|
|
110
127
|
return "StrictMode";
|
|
111
|
-
case
|
|
128
|
+
case c:
|
|
112
129
|
return "Suspense";
|
|
113
130
|
case g:
|
|
114
131
|
return "SuspenseList";
|
|
115
132
|
}
|
|
116
133
|
if (typeof a == "object")
|
|
117
134
|
switch (a.$$typeof) {
|
|
118
|
-
case
|
|
135
|
+
case l:
|
|
119
136
|
var f = a;
|
|
120
137
|
return z(f) + ".Consumer";
|
|
121
|
-
case
|
|
138
|
+
case i:
|
|
122
139
|
var h = a;
|
|
123
140
|
return z(h._context) + ".Provider";
|
|
124
141
|
case u:
|
|
125
|
-
return
|
|
142
|
+
return Ce(a, a.render, "ForwardRef");
|
|
126
143
|
case d:
|
|
127
|
-
var
|
|
128
|
-
return
|
|
144
|
+
var v = a.displayName || null;
|
|
145
|
+
return v !== null ? v : D(a.type) || "Memo";
|
|
129
146
|
case b: {
|
|
130
|
-
var
|
|
147
|
+
var C = a, _ = C._payload, x = C._init;
|
|
131
148
|
try {
|
|
132
|
-
return
|
|
149
|
+
return D(x(_));
|
|
133
150
|
} catch {
|
|
134
151
|
return null;
|
|
135
152
|
}
|
|
@@ -137,18 +154,18 @@ function en() {
|
|
|
137
154
|
}
|
|
138
155
|
return null;
|
|
139
156
|
}
|
|
140
|
-
var
|
|
141
|
-
function
|
|
157
|
+
var V = Object.assign, S = 0, $, ee, q, le, te, ke, xt;
|
|
158
|
+
function Ct() {
|
|
142
159
|
}
|
|
143
|
-
|
|
144
|
-
function
|
|
160
|
+
Ct.__reactDisabledLog = !0;
|
|
161
|
+
function _r() {
|
|
145
162
|
{
|
|
146
|
-
if (
|
|
147
|
-
|
|
163
|
+
if (S === 0) {
|
|
164
|
+
$ = console.log, ee = console.info, q = console.warn, le = console.error, te = console.group, ke = console.groupCollapsed, xt = console.groupEnd;
|
|
148
165
|
var a = {
|
|
149
166
|
configurable: !0,
|
|
150
167
|
enumerable: !0,
|
|
151
|
-
value:
|
|
168
|
+
value: Ct,
|
|
152
169
|
writable: !0
|
|
153
170
|
};
|
|
154
171
|
Object.defineProperties(console, {
|
|
@@ -161,254 +178,254 @@ function en() {
|
|
|
161
178
|
groupEnd: a
|
|
162
179
|
});
|
|
163
180
|
}
|
|
164
|
-
|
|
181
|
+
S++;
|
|
165
182
|
}
|
|
166
183
|
}
|
|
167
|
-
function
|
|
184
|
+
function Er() {
|
|
168
185
|
{
|
|
169
|
-
if (
|
|
186
|
+
if (S--, S === 0) {
|
|
170
187
|
var a = {
|
|
171
188
|
configurable: !0,
|
|
172
189
|
enumerable: !0,
|
|
173
190
|
writable: !0
|
|
174
191
|
};
|
|
175
192
|
Object.defineProperties(console, {
|
|
176
|
-
log:
|
|
177
|
-
value:
|
|
193
|
+
log: V({}, a, {
|
|
194
|
+
value: $
|
|
178
195
|
}),
|
|
179
|
-
info:
|
|
180
|
-
value:
|
|
196
|
+
info: V({}, a, {
|
|
197
|
+
value: ee
|
|
181
198
|
}),
|
|
182
|
-
warn:
|
|
183
|
-
value:
|
|
199
|
+
warn: V({}, a, {
|
|
200
|
+
value: q
|
|
184
201
|
}),
|
|
185
|
-
error:
|
|
186
|
-
value:
|
|
202
|
+
error: V({}, a, {
|
|
203
|
+
value: le
|
|
187
204
|
}),
|
|
188
|
-
group:
|
|
189
|
-
value:
|
|
205
|
+
group: V({}, a, {
|
|
206
|
+
value: te
|
|
190
207
|
}),
|
|
191
|
-
groupCollapsed:
|
|
192
|
-
value:
|
|
208
|
+
groupCollapsed: V({}, a, {
|
|
209
|
+
value: ke
|
|
193
210
|
}),
|
|
194
|
-
groupEnd:
|
|
195
|
-
value:
|
|
211
|
+
groupEnd: V({}, a, {
|
|
212
|
+
value: xt
|
|
196
213
|
})
|
|
197
214
|
});
|
|
198
215
|
}
|
|
199
|
-
|
|
216
|
+
S < 0 && y("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
200
217
|
}
|
|
201
218
|
}
|
|
202
|
-
var
|
|
203
|
-
function
|
|
219
|
+
var Ze = j.ReactCurrentDispatcher, Ge;
|
|
220
|
+
function Ae(a, f, h) {
|
|
204
221
|
{
|
|
205
|
-
if (
|
|
222
|
+
if (Ge === void 0)
|
|
206
223
|
try {
|
|
207
224
|
throw Error();
|
|
208
|
-
} catch (
|
|
209
|
-
var
|
|
210
|
-
|
|
225
|
+
} catch (C) {
|
|
226
|
+
var v = C.stack.trim().match(/\n( *(at )?)/);
|
|
227
|
+
Ge = v && v[1] || "";
|
|
211
228
|
}
|
|
212
229
|
return `
|
|
213
|
-
` +
|
|
230
|
+
` + Ge + a;
|
|
214
231
|
}
|
|
215
232
|
}
|
|
216
|
-
var
|
|
233
|
+
var Ke = !1, $e;
|
|
217
234
|
{
|
|
218
|
-
var
|
|
219
|
-
|
|
235
|
+
var Or = typeof WeakMap == "function" ? WeakMap : Map;
|
|
236
|
+
$e = new Or();
|
|
220
237
|
}
|
|
221
|
-
function
|
|
222
|
-
if (!a ||
|
|
238
|
+
function St(a, f) {
|
|
239
|
+
if (!a || Ke)
|
|
223
240
|
return "";
|
|
224
241
|
{
|
|
225
|
-
var h =
|
|
242
|
+
var h = $e.get(a);
|
|
226
243
|
if (h !== void 0)
|
|
227
244
|
return h;
|
|
228
245
|
}
|
|
229
|
-
var
|
|
230
|
-
|
|
231
|
-
var
|
|
246
|
+
var v;
|
|
247
|
+
Ke = !0;
|
|
248
|
+
var C = Error.prepareStackTrace;
|
|
232
249
|
Error.prepareStackTrace = void 0;
|
|
233
250
|
var _;
|
|
234
|
-
_ =
|
|
251
|
+
_ = Ze.current, Ze.current = null, _r();
|
|
235
252
|
try {
|
|
236
253
|
if (f) {
|
|
237
|
-
var
|
|
254
|
+
var x = function() {
|
|
238
255
|
throw Error();
|
|
239
256
|
};
|
|
240
|
-
if (Object.defineProperty(
|
|
257
|
+
if (Object.defineProperty(x.prototype, "props", {
|
|
241
258
|
set: function() {
|
|
242
259
|
throw Error();
|
|
243
260
|
}
|
|
244
261
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
245
262
|
try {
|
|
246
|
-
Reflect.construct(
|
|
263
|
+
Reflect.construct(x, []);
|
|
247
264
|
} catch (Z) {
|
|
248
|
-
|
|
265
|
+
v = Z;
|
|
249
266
|
}
|
|
250
|
-
Reflect.construct(a, [],
|
|
267
|
+
Reflect.construct(a, [], x);
|
|
251
268
|
} else {
|
|
252
269
|
try {
|
|
253
|
-
|
|
270
|
+
x.call();
|
|
254
271
|
} catch (Z) {
|
|
255
|
-
|
|
272
|
+
v = Z;
|
|
256
273
|
}
|
|
257
|
-
a.call(
|
|
274
|
+
a.call(x.prototype);
|
|
258
275
|
}
|
|
259
276
|
} else {
|
|
260
277
|
try {
|
|
261
278
|
throw Error();
|
|
262
279
|
} catch (Z) {
|
|
263
|
-
|
|
280
|
+
v = Z;
|
|
264
281
|
}
|
|
265
282
|
a();
|
|
266
283
|
}
|
|
267
284
|
} catch (Z) {
|
|
268
|
-
if (Z &&
|
|
269
|
-
for (var
|
|
270
|
-
`),
|
|
271
|
-
`),
|
|
285
|
+
if (Z && v && typeof Z.stack == "string") {
|
|
286
|
+
for (var w = Z.stack.split(`
|
|
287
|
+
`), F = v.stack.split(`
|
|
288
|
+
`), k = w.length - 1, A = F.length - 1; k >= 1 && A >= 0 && w[k] !== F[A]; )
|
|
272
289
|
A--;
|
|
273
|
-
for (;
|
|
274
|
-
if (
|
|
275
|
-
if (
|
|
290
|
+
for (; k >= 1 && A >= 0; k--, A--)
|
|
291
|
+
if (w[k] !== F[A]) {
|
|
292
|
+
if (k !== 1 || A !== 1)
|
|
276
293
|
do
|
|
277
|
-
if (
|
|
278
|
-
var
|
|
279
|
-
` +
|
|
280
|
-
return a.displayName &&
|
|
294
|
+
if (k--, A--, A < 0 || w[k] !== F[A]) {
|
|
295
|
+
var Q = `
|
|
296
|
+
` + w[k].replace(" at new ", " at ");
|
|
297
|
+
return a.displayName && Q.includes("<anonymous>") && (Q = Q.replace("<anonymous>", a.displayName)), typeof a == "function" && $e.set(a, Q), Q;
|
|
281
298
|
}
|
|
282
|
-
while (
|
|
299
|
+
while (k >= 1 && A >= 0);
|
|
283
300
|
break;
|
|
284
301
|
}
|
|
285
302
|
}
|
|
286
303
|
} finally {
|
|
287
|
-
|
|
304
|
+
Ke = !1, Ze.current = _, Er(), Error.prepareStackTrace = C;
|
|
288
305
|
}
|
|
289
|
-
var
|
|
290
|
-
return typeof a == "function" &&
|
|
306
|
+
var ge = a ? a.displayName || a.name : "", ue = ge ? Ae(ge) : "";
|
|
307
|
+
return typeof a == "function" && $e.set(a, ue), ue;
|
|
291
308
|
}
|
|
292
|
-
function
|
|
293
|
-
return
|
|
309
|
+
function jr(a, f, h) {
|
|
310
|
+
return St(a, !1);
|
|
294
311
|
}
|
|
295
|
-
function
|
|
312
|
+
function Nr(a) {
|
|
296
313
|
var f = a.prototype;
|
|
297
314
|
return !!(f && f.isReactComponent);
|
|
298
315
|
}
|
|
299
|
-
function
|
|
316
|
+
function Me(a, f, h) {
|
|
300
317
|
if (a == null)
|
|
301
318
|
return "";
|
|
302
319
|
if (typeof a == "function")
|
|
303
|
-
return
|
|
320
|
+
return St(a, Nr(a));
|
|
304
321
|
if (typeof a == "string")
|
|
305
|
-
return
|
|
322
|
+
return Ae(a);
|
|
306
323
|
switch (a) {
|
|
307
|
-
case
|
|
308
|
-
return
|
|
324
|
+
case c:
|
|
325
|
+
return Ae("Suspense");
|
|
309
326
|
case g:
|
|
310
|
-
return
|
|
327
|
+
return Ae("SuspenseList");
|
|
311
328
|
}
|
|
312
329
|
if (typeof a == "object")
|
|
313
330
|
switch (a.$$typeof) {
|
|
314
331
|
case u:
|
|
315
|
-
return
|
|
332
|
+
return jr(a.render);
|
|
316
333
|
case d:
|
|
317
|
-
return
|
|
334
|
+
return Me(a.type, f, h);
|
|
318
335
|
case b: {
|
|
319
|
-
var
|
|
336
|
+
var v = a, C = v._payload, _ = v._init;
|
|
320
337
|
try {
|
|
321
|
-
return
|
|
338
|
+
return Me(_(C), f, h);
|
|
322
339
|
} catch {
|
|
323
340
|
}
|
|
324
341
|
}
|
|
325
342
|
}
|
|
326
343
|
return "";
|
|
327
344
|
}
|
|
328
|
-
var
|
|
329
|
-
function
|
|
345
|
+
var Se = Object.prototype.hasOwnProperty, Rt = {}, _t = j.ReactDebugCurrentFrame;
|
|
346
|
+
function Ie(a) {
|
|
330
347
|
if (a) {
|
|
331
|
-
var f = a._owner, h =
|
|
332
|
-
|
|
348
|
+
var f = a._owner, h = Me(a.type, a._source, f ? f.type : null);
|
|
349
|
+
_t.setExtraStackFrame(h);
|
|
333
350
|
} else
|
|
334
|
-
|
|
351
|
+
_t.setExtraStackFrame(null);
|
|
335
352
|
}
|
|
336
|
-
function
|
|
353
|
+
function Pr(a, f, h, v, C) {
|
|
337
354
|
{
|
|
338
|
-
var _ = Function.call.bind(
|
|
339
|
-
for (var
|
|
340
|
-
if (_(a,
|
|
341
|
-
var
|
|
355
|
+
var _ = Function.call.bind(Se);
|
|
356
|
+
for (var x in a)
|
|
357
|
+
if (_(a, x)) {
|
|
358
|
+
var w = void 0;
|
|
342
359
|
try {
|
|
343
|
-
if (typeof a[
|
|
344
|
-
var
|
|
345
|
-
throw
|
|
360
|
+
if (typeof a[x] != "function") {
|
|
361
|
+
var F = Error((v || "React class") + ": " + h + " type `" + x + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[x] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
362
|
+
throw F.name = "Invariant Violation", F;
|
|
346
363
|
}
|
|
347
|
-
|
|
348
|
-
} catch (
|
|
349
|
-
|
|
364
|
+
w = a[x](f, x, v, h, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
365
|
+
} catch (k) {
|
|
366
|
+
w = k;
|
|
350
367
|
}
|
|
351
|
-
|
|
368
|
+
w && !(w instanceof Error) && (Ie(C), y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", v || "React class", h, x, typeof w), Ie(null)), w instanceof Error && !(w.message in Rt) && (Rt[w.message] = !0, Ie(C), y("Failed %s type: %s", h, w.message), Ie(null));
|
|
352
369
|
}
|
|
353
370
|
}
|
|
354
371
|
}
|
|
355
|
-
var
|
|
356
|
-
function
|
|
357
|
-
return
|
|
372
|
+
var Tr = Array.isArray;
|
|
373
|
+
function Je(a) {
|
|
374
|
+
return Tr(a);
|
|
358
375
|
}
|
|
359
|
-
function
|
|
376
|
+
function Dr(a) {
|
|
360
377
|
{
|
|
361
378
|
var f = typeof Symbol == "function" && Symbol.toStringTag, h = f && a[Symbol.toStringTag] || a.constructor.name || "Object";
|
|
362
379
|
return h;
|
|
363
380
|
}
|
|
364
381
|
}
|
|
365
|
-
function
|
|
382
|
+
function kr(a) {
|
|
366
383
|
try {
|
|
367
|
-
return
|
|
384
|
+
return Et(a), !1;
|
|
368
385
|
} catch {
|
|
369
386
|
return !0;
|
|
370
387
|
}
|
|
371
388
|
}
|
|
372
|
-
function
|
|
389
|
+
function Et(a) {
|
|
373
390
|
return "" + a;
|
|
374
391
|
}
|
|
375
|
-
function
|
|
376
|
-
if (
|
|
377
|
-
return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",
|
|
392
|
+
function Ot(a) {
|
|
393
|
+
if (kr(a))
|
|
394
|
+
return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Dr(a)), Et(a);
|
|
378
395
|
}
|
|
379
|
-
var
|
|
396
|
+
var Re = j.ReactCurrentOwner, Ar = {
|
|
380
397
|
key: !0,
|
|
381
398
|
ref: !0,
|
|
382
399
|
__self: !0,
|
|
383
400
|
__source: !0
|
|
384
|
-
},
|
|
385
|
-
|
|
386
|
-
function
|
|
387
|
-
if (
|
|
401
|
+
}, jt, Nt, Xe;
|
|
402
|
+
Xe = {};
|
|
403
|
+
function $r(a) {
|
|
404
|
+
if (Se.call(a, "ref")) {
|
|
388
405
|
var f = Object.getOwnPropertyDescriptor(a, "ref").get;
|
|
389
406
|
if (f && f.isReactWarning)
|
|
390
407
|
return !1;
|
|
391
408
|
}
|
|
392
409
|
return a.ref !== void 0;
|
|
393
410
|
}
|
|
394
|
-
function
|
|
395
|
-
if (
|
|
411
|
+
function Mr(a) {
|
|
412
|
+
if (Se.call(a, "key")) {
|
|
396
413
|
var f = Object.getOwnPropertyDescriptor(a, "key").get;
|
|
397
414
|
if (f && f.isReactWarning)
|
|
398
415
|
return !1;
|
|
399
416
|
}
|
|
400
417
|
return a.key !== void 0;
|
|
401
418
|
}
|
|
402
|
-
function
|
|
403
|
-
if (typeof a.ref == "string" &&
|
|
404
|
-
var h =
|
|
405
|
-
|
|
419
|
+
function Ir(a, f) {
|
|
420
|
+
if (typeof a.ref == "string" && Re.current && f && Re.current.stateNode !== f) {
|
|
421
|
+
var h = D(Re.current.type);
|
|
422
|
+
Xe[h] || (y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', D(Re.current.type), a.ref), Xe[h] = !0);
|
|
406
423
|
}
|
|
407
424
|
}
|
|
408
|
-
function
|
|
425
|
+
function Lr(a, f) {
|
|
409
426
|
{
|
|
410
427
|
var h = function() {
|
|
411
|
-
|
|
428
|
+
jt || (jt = !0, y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", f));
|
|
412
429
|
};
|
|
413
430
|
h.isReactWarning = !0, Object.defineProperty(a, "key", {
|
|
414
431
|
get: h,
|
|
@@ -416,10 +433,10 @@ function en() {
|
|
|
416
433
|
});
|
|
417
434
|
}
|
|
418
435
|
}
|
|
419
|
-
function
|
|
436
|
+
function Yr(a, f) {
|
|
420
437
|
{
|
|
421
438
|
var h = function() {
|
|
422
|
-
|
|
439
|
+
Nt || (Nt = !0, y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", f));
|
|
423
440
|
};
|
|
424
441
|
h.isReactWarning = !0, Object.defineProperty(a, "ref", {
|
|
425
442
|
get: h,
|
|
@@ -427,70 +444,70 @@ function en() {
|
|
|
427
444
|
});
|
|
428
445
|
}
|
|
429
446
|
}
|
|
430
|
-
var
|
|
431
|
-
var
|
|
447
|
+
var Hr = function(a, f, h, v, C, _, x) {
|
|
448
|
+
var w = {
|
|
432
449
|
// This tag allows us to uniquely identify this as a React Element
|
|
433
450
|
$$typeof: e,
|
|
434
451
|
// Built-in properties that belong on the element
|
|
435
452
|
type: a,
|
|
436
453
|
key: f,
|
|
437
454
|
ref: h,
|
|
438
|
-
props:
|
|
455
|
+
props: x,
|
|
439
456
|
// Record the component responsible for creating this element.
|
|
440
457
|
_owner: _
|
|
441
458
|
};
|
|
442
|
-
return
|
|
459
|
+
return w._store = {}, Object.defineProperty(w._store, "validated", {
|
|
443
460
|
configurable: !1,
|
|
444
461
|
enumerable: !1,
|
|
445
462
|
writable: !0,
|
|
446
463
|
value: !1
|
|
447
|
-
}), Object.defineProperty(
|
|
464
|
+
}), Object.defineProperty(w, "_self", {
|
|
448
465
|
configurable: !1,
|
|
449
466
|
enumerable: !1,
|
|
450
467
|
writable: !1,
|
|
451
|
-
value:
|
|
452
|
-
}), Object.defineProperty(
|
|
468
|
+
value: v
|
|
469
|
+
}), Object.defineProperty(w, "_source", {
|
|
453
470
|
configurable: !1,
|
|
454
471
|
enumerable: !1,
|
|
455
472
|
writable: !1,
|
|
456
|
-
value:
|
|
457
|
-
}), Object.freeze && (Object.freeze(
|
|
473
|
+
value: C
|
|
474
|
+
}), Object.freeze && (Object.freeze(w.props), Object.freeze(w)), w;
|
|
458
475
|
};
|
|
459
|
-
function
|
|
476
|
+
function zr(a, f, h, v, C) {
|
|
460
477
|
{
|
|
461
|
-
var _,
|
|
462
|
-
h !== void 0 && (
|
|
478
|
+
var _, x = {}, w = null, F = null;
|
|
479
|
+
h !== void 0 && (Ot(h), w = "" + h), Mr(f) && (Ot(f.key), w = "" + f.key), $r(f) && (F = f.ref, Ir(f, C));
|
|
463
480
|
for (_ in f)
|
|
464
|
-
|
|
481
|
+
Se.call(f, _) && !Ar.hasOwnProperty(_) && (x[_] = f[_]);
|
|
465
482
|
if (a && a.defaultProps) {
|
|
466
|
-
var
|
|
467
|
-
for (_ in
|
|
468
|
-
|
|
483
|
+
var k = a.defaultProps;
|
|
484
|
+
for (_ in k)
|
|
485
|
+
x[_] === void 0 && (x[_] = k[_]);
|
|
469
486
|
}
|
|
470
|
-
if (
|
|
487
|
+
if (w || F) {
|
|
471
488
|
var A = typeof a == "function" ? a.displayName || a.name || "Unknown" : a;
|
|
472
|
-
|
|
489
|
+
w && Lr(x, A), F && Yr(x, A);
|
|
473
490
|
}
|
|
474
|
-
return
|
|
491
|
+
return Hr(a, w, F, C, v, Re.current, x);
|
|
475
492
|
}
|
|
476
493
|
}
|
|
477
|
-
var
|
|
478
|
-
function
|
|
494
|
+
var Qe = j.ReactCurrentOwner, Pt = j.ReactDebugCurrentFrame;
|
|
495
|
+
function he(a) {
|
|
479
496
|
if (a) {
|
|
480
|
-
var f = a._owner, h =
|
|
481
|
-
|
|
497
|
+
var f = a._owner, h = Me(a.type, a._source, f ? f.type : null);
|
|
498
|
+
Pt.setExtraStackFrame(h);
|
|
482
499
|
} else
|
|
483
|
-
|
|
500
|
+
Pt.setExtraStackFrame(null);
|
|
484
501
|
}
|
|
485
|
-
var
|
|
486
|
-
|
|
487
|
-
function
|
|
502
|
+
var et;
|
|
503
|
+
et = !1;
|
|
504
|
+
function tt(a) {
|
|
488
505
|
return typeof a == "object" && a !== null && a.$$typeof === e;
|
|
489
506
|
}
|
|
490
|
-
function
|
|
507
|
+
function Tt() {
|
|
491
508
|
{
|
|
492
|
-
if (
|
|
493
|
-
var a =
|
|
509
|
+
if (Qe.current) {
|
|
510
|
+
var a = D(Qe.current.type);
|
|
494
511
|
if (a)
|
|
495
512
|
return `
|
|
496
513
|
|
|
@@ -499,7 +516,7 @@ Check the render method of \`` + a + "`.";
|
|
|
499
516
|
return "";
|
|
500
517
|
}
|
|
501
518
|
}
|
|
502
|
-
function
|
|
519
|
+
function Vr(a) {
|
|
503
520
|
{
|
|
504
521
|
if (a !== void 0) {
|
|
505
522
|
var f = a.fileName.replace(/^.*[\\\/]/, ""), h = a.lineNumber;
|
|
@@ -510,10 +527,10 @@ Check your code at ` + f + ":" + h + ".";
|
|
|
510
527
|
return "";
|
|
511
528
|
}
|
|
512
529
|
}
|
|
513
|
-
var
|
|
514
|
-
function
|
|
530
|
+
var Dt = {};
|
|
531
|
+
function Fr(a) {
|
|
515
532
|
{
|
|
516
|
-
var f =
|
|
533
|
+
var f = Tt();
|
|
517
534
|
if (!f) {
|
|
518
535
|
var h = typeof a == "string" ? a : a.displayName || a.name;
|
|
519
536
|
h && (f = `
|
|
@@ -523,39 +540,39 @@ Check the top-level render call using <` + h + ">.");
|
|
|
523
540
|
return f;
|
|
524
541
|
}
|
|
525
542
|
}
|
|
526
|
-
function
|
|
543
|
+
function kt(a, f) {
|
|
527
544
|
{
|
|
528
545
|
if (!a._store || a._store.validated || a.key != null)
|
|
529
546
|
return;
|
|
530
547
|
a._store.validated = !0;
|
|
531
|
-
var h =
|
|
532
|
-
if (
|
|
548
|
+
var h = Fr(f);
|
|
549
|
+
if (Dt[h])
|
|
533
550
|
return;
|
|
534
|
-
|
|
535
|
-
var
|
|
536
|
-
a && a._owner && a._owner !==
|
|
551
|
+
Dt[h] = !0;
|
|
552
|
+
var v = "";
|
|
553
|
+
a && a._owner && a._owner !== Qe.current && (v = " It was passed a child from " + D(a._owner.type) + "."), he(a), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', h, v), he(null);
|
|
537
554
|
}
|
|
538
555
|
}
|
|
539
|
-
function
|
|
556
|
+
function At(a, f) {
|
|
540
557
|
{
|
|
541
558
|
if (typeof a != "object")
|
|
542
559
|
return;
|
|
543
|
-
if (
|
|
560
|
+
if (Je(a))
|
|
544
561
|
for (var h = 0; h < a.length; h++) {
|
|
545
|
-
var
|
|
546
|
-
|
|
562
|
+
var v = a[h];
|
|
563
|
+
tt(v) && kt(v, f);
|
|
547
564
|
}
|
|
548
|
-
else if (
|
|
565
|
+
else if (tt(a))
|
|
549
566
|
a._store && (a._store.validated = !0);
|
|
550
567
|
else if (a) {
|
|
551
|
-
var
|
|
552
|
-
if (typeof
|
|
553
|
-
for (var _ =
|
|
554
|
-
|
|
568
|
+
var C = H(a);
|
|
569
|
+
if (typeof C == "function" && C !== a.entries)
|
|
570
|
+
for (var _ = C.call(a), x; !(x = _.next()).done; )
|
|
571
|
+
tt(x.value) && kt(x.value, f);
|
|
555
572
|
}
|
|
556
573
|
}
|
|
557
574
|
}
|
|
558
|
-
function
|
|
575
|
+
function Ur(a) {
|
|
559
576
|
{
|
|
560
577
|
var f = a.type;
|
|
561
578
|
if (f == null || typeof f == "string")
|
|
@@ -570,163 +587,406 @@ Check the top-level render call using <` + h + ">.");
|
|
|
570
587
|
else
|
|
571
588
|
return;
|
|
572
589
|
if (h) {
|
|
573
|
-
var
|
|
574
|
-
|
|
575
|
-
} else if (f.PropTypes !== void 0 && !
|
|
576
|
-
|
|
577
|
-
var
|
|
578
|
-
y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",
|
|
590
|
+
var v = D(f);
|
|
591
|
+
Pr(h, a.props, "prop", v, a);
|
|
592
|
+
} else if (f.PropTypes !== void 0 && !et) {
|
|
593
|
+
et = !0;
|
|
594
|
+
var C = D(f);
|
|
595
|
+
y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", C || "Unknown");
|
|
579
596
|
}
|
|
580
597
|
typeof f.getDefaultProps == "function" && !f.getDefaultProps.isReactClassApproved && y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
581
598
|
}
|
|
582
599
|
}
|
|
583
|
-
function
|
|
600
|
+
function Wr(a) {
|
|
584
601
|
{
|
|
585
602
|
for (var f = Object.keys(a.props), h = 0; h < f.length; h++) {
|
|
586
|
-
var
|
|
587
|
-
if (
|
|
588
|
-
|
|
603
|
+
var v = f[h];
|
|
604
|
+
if (v !== "children" && v !== "key") {
|
|
605
|
+
he(a), y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", v), he(null);
|
|
589
606
|
break;
|
|
590
607
|
}
|
|
591
608
|
}
|
|
592
|
-
a.ref !== null && (
|
|
609
|
+
a.ref !== null && (he(a), y("Invalid attribute `ref` supplied to `React.Fragment`."), he(null));
|
|
593
610
|
}
|
|
594
611
|
}
|
|
595
|
-
var
|
|
596
|
-
function
|
|
612
|
+
var $t = {};
|
|
613
|
+
function Mt(a, f, h, v, C, _) {
|
|
597
614
|
{
|
|
598
|
-
var
|
|
599
|
-
if (!
|
|
600
|
-
var
|
|
601
|
-
(a === void 0 || typeof a == "object" && a !== null && Object.keys(a).length === 0) && (
|
|
602
|
-
var
|
|
603
|
-
|
|
604
|
-
var
|
|
605
|
-
a === null ?
|
|
615
|
+
var x = ce(a);
|
|
616
|
+
if (!x) {
|
|
617
|
+
var w = "";
|
|
618
|
+
(a === void 0 || typeof a == "object" && a !== null && Object.keys(a).length === 0) && (w += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
619
|
+
var F = Vr(C);
|
|
620
|
+
F ? w += F : w += Tt();
|
|
621
|
+
var k;
|
|
622
|
+
a === null ? k = "null" : Je(a) ? k = "array" : a !== void 0 && a.$$typeof === e ? (k = "<" + (D(a.type) || "Unknown") + " />", w = " Did you accidentally export a JSX literal instead of a component?") : k = typeof a, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", k, w);
|
|
606
623
|
}
|
|
607
|
-
var A =
|
|
624
|
+
var A = zr(a, f, h, C, _);
|
|
608
625
|
if (A == null)
|
|
609
626
|
return A;
|
|
610
|
-
if (
|
|
611
|
-
var
|
|
612
|
-
if (
|
|
613
|
-
if (
|
|
614
|
-
if (
|
|
615
|
-
for (var
|
|
616
|
-
|
|
617
|
-
Object.freeze && Object.freeze(
|
|
627
|
+
if (x) {
|
|
628
|
+
var Q = f.children;
|
|
629
|
+
if (Q !== void 0)
|
|
630
|
+
if (v)
|
|
631
|
+
if (Je(Q)) {
|
|
632
|
+
for (var ge = 0; ge < Q.length; ge++)
|
|
633
|
+
At(Q[ge], a);
|
|
634
|
+
Object.freeze && Object.freeze(Q);
|
|
618
635
|
} else
|
|
619
636
|
y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
620
637
|
else
|
|
621
|
-
|
|
638
|
+
At(Q, a);
|
|
622
639
|
}
|
|
623
|
-
if (
|
|
624
|
-
var
|
|
625
|
-
return
|
|
626
|
-
}),
|
|
627
|
-
if (
|
|
628
|
-
var
|
|
640
|
+
if (Se.call(f, "key")) {
|
|
641
|
+
var ue = D(a), Z = Object.keys(f).filter(function(Jr) {
|
|
642
|
+
return Jr !== "key";
|
|
643
|
+
}), rt = Z.length > 0 ? "{key: someKey, " + Z.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
644
|
+
if (!$t[ue + rt]) {
|
|
645
|
+
var Kr = Z.length > 0 ? "{" + Z.join(": ..., ") + ": ...}" : "{}";
|
|
629
646
|
y(`A props object containing a "key" prop is being spread into JSX:
|
|
630
647
|
let props = %s;
|
|
631
648
|
<%s {...props} />
|
|
632
649
|
React keys must be passed directly to JSX without using spread:
|
|
633
650
|
let props = %s;
|
|
634
|
-
<%s key={someKey} {...props} />`,
|
|
651
|
+
<%s key={someKey} {...props} />`, rt, ue, Kr, ue), $t[ue + rt] = !0;
|
|
635
652
|
}
|
|
636
653
|
}
|
|
637
|
-
return a ===
|
|
654
|
+
return a === r ? Wr(A) : Ur(A), A;
|
|
638
655
|
}
|
|
639
656
|
}
|
|
640
|
-
function
|
|
641
|
-
return
|
|
657
|
+
function Br(a, f, h) {
|
|
658
|
+
return Mt(a, f, h, !0);
|
|
642
659
|
}
|
|
643
|
-
function
|
|
644
|
-
return
|
|
660
|
+
function qr(a, f, h) {
|
|
661
|
+
return Mt(a, f, h, !1);
|
|
645
662
|
}
|
|
646
|
-
var
|
|
647
|
-
|
|
648
|
-
}()),
|
|
663
|
+
var Zr = qr, Gr = Br;
|
|
664
|
+
Ee.Fragment = r, Ee.jsx = Zr, Ee.jsxs = Gr;
|
|
665
|
+
}()), Ee;
|
|
649
666
|
}
|
|
650
|
-
process.env.NODE_ENV === "production" ?
|
|
651
|
-
var p =
|
|
652
|
-
class
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
try {
|
|
687
|
-
s = t.toString().split(".")[1].length;
|
|
688
|
-
} catch {
|
|
689
|
-
s = 0;
|
|
690
|
-
}
|
|
691
|
-
return i = Math.pow(10, Math.max(n, s)), o = n >= s ? n : s, Number(((e * i - t * i) / i).toFixed(o));
|
|
667
|
+
process.env.NODE_ENV === "production" ? ct.exports = bn() : ct.exports = yn();
|
|
668
|
+
var p = ct.exports;
|
|
669
|
+
const L = class L {
|
|
670
|
+
/**
|
|
671
|
+
* 获取数字的小数位数长度
|
|
672
|
+
* @private
|
|
673
|
+
* @param num 要检查的数字
|
|
674
|
+
* @returns 小数位数长度
|
|
675
|
+
*/
|
|
676
|
+
static getDecimalLength(e) {
|
|
677
|
+
const t = e.toString(), r = t.indexOf(".");
|
|
678
|
+
return r === -1 ? 0 : t.length - r - 1;
|
|
679
|
+
}
|
|
680
|
+
/**
|
|
681
|
+
* 将数字转换为整数(移除小数点)
|
|
682
|
+
* @private
|
|
683
|
+
* @param num 要转换的数字
|
|
684
|
+
* @param decimalPlaces 需要补零的小数位数
|
|
685
|
+
* @returns 转换后的整数值
|
|
686
|
+
*/
|
|
687
|
+
static toInteger(e, t) {
|
|
688
|
+
const r = e.toString().replace(".", "");
|
|
689
|
+
return Number(r) * Math.pow(10, t);
|
|
690
|
+
}
|
|
691
|
+
/**
|
|
692
|
+
* 精确加法运算(支持多个参数)
|
|
693
|
+
* @param args 要相加的数字序列
|
|
694
|
+
* @returns 所有数字的和
|
|
695
|
+
* @example
|
|
696
|
+
* cmx.add(0.1, 0.2) // 返回 0.3
|
|
697
|
+
* cmx.add(1, 2, 3) // 返回 6
|
|
698
|
+
*/
|
|
699
|
+
add(...e) {
|
|
700
|
+
return e.length < 2 ? e[0] || 0 : e.reduce((t, r) => {
|
|
701
|
+
const s = L.getDecimalLength(t), o = L.getDecimalLength(r), i = Math.max(s, o), l = Math.pow(10, i), u = L.toInteger(t, i - s), c = L.toInteger(r, i - o);
|
|
702
|
+
return (u + c) / l;
|
|
692
703
|
});
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
704
|
+
}
|
|
705
|
+
/**
|
|
706
|
+
* 精确减法运算
|
|
707
|
+
* @param arg1 被减数
|
|
708
|
+
* @param arg2 减数
|
|
709
|
+
* @returns 两数之差
|
|
710
|
+
* @example
|
|
711
|
+
* cmx.sub(0.3, 0.1) // 返回 0.2
|
|
712
|
+
*/
|
|
713
|
+
sub(e, t) {
|
|
714
|
+
const r = L.getDecimalLength(e), s = L.getDecimalLength(t), o = Math.max(r, s), i = Math.pow(10, o);
|
|
715
|
+
return Number(((e * i - t * i) / i).toFixed(o));
|
|
716
|
+
}
|
|
717
|
+
/**
|
|
718
|
+
* 精确乘法运算(支持多个参数)
|
|
719
|
+
* @param args 要相乘的数字序列
|
|
720
|
+
* @returns 所有数字的乘积
|
|
721
|
+
* @example
|
|
722
|
+
* cmx.mul(0.1, 0.2) // 返回 0.02
|
|
723
|
+
* cmx.mul(2, 3, 4) // 返回 24
|
|
724
|
+
*/
|
|
725
|
+
mul(...e) {
|
|
726
|
+
return e.length < 2 ? e[0] || 0 : e.reduce((t, r) => {
|
|
727
|
+
const s = L.getDecimalLength(t) + L.getDecimalLength(r), o = Number(t.toString().replace(".", "")), i = Number(r.toString().replace(".", ""));
|
|
728
|
+
return o * i / Math.pow(10, s);
|
|
707
729
|
});
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
730
|
+
}
|
|
731
|
+
/**
|
|
732
|
+
* 精确除法运算
|
|
733
|
+
* @param arg1 被除数
|
|
734
|
+
* @param arg2 除数
|
|
735
|
+
* @returns 两数之商
|
|
736
|
+
* @throws {Error} 除数为零时抛出错误
|
|
737
|
+
* @example
|
|
738
|
+
* cmx.div(0.3, 0.1) // 返回 3
|
|
739
|
+
*/
|
|
740
|
+
div(e, t) {
|
|
741
|
+
if (t === 0)
|
|
742
|
+
throw new Error("除数不能为零");
|
|
743
|
+
const r = 1 + Number.EPSILON, s = L.getDecimalLength(e), o = L.getDecimalLength(t), i = Number(e.toString().replace(".", "")) * r, l = Number(t.toString().replace(".", "")) * r;
|
|
744
|
+
return i / l * Math.pow(10, o - s);
|
|
745
|
+
}
|
|
746
|
+
/**
|
|
747
|
+
* 精确四舍五入
|
|
748
|
+
* @param num 要舍入的数字
|
|
749
|
+
* @param decimalPlaces 保留的小数位数(默认为0)
|
|
750
|
+
* @returns 舍入后的数字
|
|
751
|
+
* @example
|
|
752
|
+
* cmx.round(1.2345, 2) // 返回 1.23
|
|
753
|
+
*/
|
|
754
|
+
round(e, t = 0) {
|
|
755
|
+
const r = Math.pow(10, t);
|
|
756
|
+
return Math.round(e * r) / r;
|
|
757
|
+
}
|
|
758
|
+
/**
|
|
759
|
+
* 计算百分比值
|
|
760
|
+
* @param value 基础值
|
|
761
|
+
* @param percent 百分比
|
|
762
|
+
* @returns 计算后的百分比值
|
|
763
|
+
* @example
|
|
764
|
+
* cmx.percent(200, 15) // 返回 30(200的15%)
|
|
765
|
+
*/
|
|
766
|
+
percent(e, t) {
|
|
767
|
+
return this.div(this.mul(e, t), 100);
|
|
768
|
+
}
|
|
769
|
+
/**
|
|
770
|
+
* 计算平均数
|
|
771
|
+
* @param args 要计算平均数的数字序列
|
|
772
|
+
* @returns 平均数
|
|
773
|
+
* @example
|
|
774
|
+
* cmx.average(1, 2, 3) // 返回 2
|
|
775
|
+
*/
|
|
776
|
+
average(...e) {
|
|
777
|
+
return e.length === 0 ? 0 : this.div(
|
|
778
|
+
e.reduce((t, r) => this.add(t, r)),
|
|
779
|
+
e.length
|
|
780
|
+
);
|
|
781
|
+
}
|
|
782
|
+
/**
|
|
783
|
+
* 判断两个数是否近似相等(解决浮点数精度问题)
|
|
784
|
+
* @param a 第一个数
|
|
785
|
+
* @param b 第二个数
|
|
786
|
+
* @param tolerance 允许的误差范围(默认为1e-10)
|
|
787
|
+
* @returns 如果差值小于误差范围则返回true
|
|
788
|
+
* @example
|
|
789
|
+
* cmx.approxEqual(0.1 + 0.2, 0.3) // 返回 true
|
|
790
|
+
*/
|
|
791
|
+
approxEqual(e, t, r = 1e-10) {
|
|
792
|
+
return Math.abs(this.sub(e, t)) < r;
|
|
793
|
+
}
|
|
794
|
+
/**
|
|
795
|
+
* 计算自然对数(ln(x))
|
|
796
|
+
* @param num 要计算对数的数字
|
|
797
|
+
* @param decimalPlaces 结果保留的小数位数(默认保留10位)
|
|
798
|
+
* @returns 自然对数值
|
|
799
|
+
* @throws {Error} 当输入小于等于0时抛出错误
|
|
800
|
+
* @example
|
|
801
|
+
* cmx.ln(1) // 返回 0
|
|
802
|
+
* cmx.ln(Math.E) // 返回 1
|
|
803
|
+
*/
|
|
804
|
+
ln(e, t = 10) {
|
|
805
|
+
if (e <= 0)
|
|
806
|
+
throw new Error("对数函数的输入必须为正数");
|
|
807
|
+
if (e === 1)
|
|
808
|
+
return 0;
|
|
809
|
+
let r = 0;
|
|
810
|
+
const s = Math.pow(10, -t - 1);
|
|
811
|
+
let o = this.div(this.sub(e, 1), this.add(e, 1));
|
|
812
|
+
const i = this.mul(o, o);
|
|
813
|
+
let l = o, u = 1;
|
|
814
|
+
do
|
|
815
|
+
r = this.add(r, this.div(l, u)), l = this.mul(l, i), u += 2;
|
|
816
|
+
while (Math.abs(l) > s);
|
|
817
|
+
return this.round(this.mul(2, r), t);
|
|
818
|
+
}
|
|
819
|
+
/**
|
|
820
|
+
* 高精度指数函数(解决Math.exp的精度问题)
|
|
821
|
+
* @param x 指数
|
|
822
|
+
* @param decimalPlaces 精度位数(默认10位)
|
|
823
|
+
* @returns e^x 的精确值
|
|
824
|
+
* @example
|
|
825
|
+
* cmx.exp(1) // 2.7182818285(比Math.exp(1)更可控精度)
|
|
826
|
+
* cmx.exp(-3.5) // 0.0301973834
|
|
827
|
+
*/
|
|
828
|
+
exp(e, t = 10) {
|
|
829
|
+
if (e === 0)
|
|
830
|
+
return 1;
|
|
831
|
+
if (e === 1)
|
|
832
|
+
return Math.E;
|
|
833
|
+
let r = 1, s = 1;
|
|
834
|
+
const o = Math.pow(10, -t - 1);
|
|
835
|
+
let i = 1, l = 0;
|
|
836
|
+
do
|
|
837
|
+
l = r, s = this.div(this.mul(s, e), i), r = this.add(r, s), i++;
|
|
838
|
+
while (Math.abs(s) > o && !this.approxEqual(r, l, o));
|
|
839
|
+
return this.round(r, t);
|
|
840
|
+
}
|
|
841
|
+
/**
|
|
842
|
+
* 精确计算平方根(解决Math.sqrt的精度问题)
|
|
843
|
+
* @param num 输入数字(必须 ≥0)
|
|
844
|
+
* @param decimalPlaces 结果精度(默认10位)
|
|
845
|
+
* @returns 精确的平方根值
|
|
846
|
+
* @throws {Error} 输入负数时抛出
|
|
847
|
+
* @example
|
|
848
|
+
* cmx.sqrt(2) // 1.4142135624 (Math.sqrt(2)可能产生微小误差)
|
|
849
|
+
*/
|
|
850
|
+
sqrt(e, t = 10) {
|
|
851
|
+
if (e < 0)
|
|
852
|
+
throw new Error("负数平方根需使用复数计算");
|
|
853
|
+
if (e === 0)
|
|
854
|
+
return 0;
|
|
855
|
+
let r = e / 2;
|
|
856
|
+
const s = Math.pow(10, -t - 1);
|
|
857
|
+
do
|
|
858
|
+
r = this.div(this.add(r, this.div(e, r)), 2);
|
|
859
|
+
while (Math.abs(this.sub(this.mul(r, r), e)) > s);
|
|
860
|
+
return this.round(r, t);
|
|
861
|
+
}
|
|
862
|
+
/**
|
|
863
|
+
* 安全对数计算(解决Math.log的边界问题)
|
|
864
|
+
* @param num 输入数字(支持 ≤0 的特殊处理)
|
|
865
|
+
* @param options 配置项:
|
|
866
|
+
* - safe: 是否返回安全值(默认true)
|
|
867
|
+
* - replaceNeg: 负数替换值(默认NaN)
|
|
868
|
+
* - replaceZero: 零替换值(默认-Infinity)
|
|
869
|
+
* @returns 处理后的结果
|
|
870
|
+
* @example
|
|
871
|
+
* cmx.safeLog(-1) // NaN(Math.log直接报错)
|
|
872
|
+
* cmx.safeLog(0) // -Infinity(可配置替换值)
|
|
873
|
+
*/
|
|
874
|
+
safeLog(e, t = {}) {
|
|
875
|
+
const { safe: r = !0, replaceNeg: s = NaN, replaceZero: o = -1 / 0 } = t;
|
|
876
|
+
if (e > 0)
|
|
877
|
+
return Math.log(e);
|
|
878
|
+
if (!r)
|
|
879
|
+
throw new Error("Invalid input");
|
|
880
|
+
return e === 0 ? o : s;
|
|
881
|
+
}
|
|
882
|
+
/**
|
|
883
|
+
* 精确阶乘(解决Math无阶乘方法的问题)
|
|
884
|
+
* @param n 输入整数(0≤n≤170)
|
|
885
|
+
* @returns 精确结果(超过170返回Infinity)
|
|
886
|
+
* @example
|
|
887
|
+
* cmx.factorial(20) // 2432902008176640000(JS整数精确范围)
|
|
888
|
+
*/
|
|
889
|
+
factorial(e) {
|
|
890
|
+
if (!Number.isInteger(e) || e < 0)
|
|
891
|
+
return NaN;
|
|
892
|
+
if (e < 0)
|
|
893
|
+
return NaN;
|
|
894
|
+
if (e > Number.MAX_SAFE_INTEGER) {
|
|
895
|
+
let r = BigInt(1);
|
|
896
|
+
for (let s = 2; s <= e; s++)
|
|
897
|
+
r *= BigInt(s);
|
|
898
|
+
return Number(r.toString());
|
|
899
|
+
}
|
|
900
|
+
if (e > 170)
|
|
901
|
+
return 1 / 0;
|
|
902
|
+
if (L.factorialCache.has(e))
|
|
903
|
+
return L.factorialCache.get(e);
|
|
904
|
+
let t = 1;
|
|
905
|
+
for (let r = 2; r <= e; r++) {
|
|
906
|
+
if (L.factorialCache.has(r)) {
|
|
907
|
+
t = L.factorialCache.get(r);
|
|
908
|
+
continue;
|
|
720
909
|
}
|
|
721
|
-
|
|
722
|
-
}
|
|
910
|
+
t = this.mul(t, r), L.factorialCache.set(r, t);
|
|
911
|
+
}
|
|
912
|
+
return t;
|
|
723
913
|
}
|
|
724
|
-
|
|
725
|
-
|
|
914
|
+
/**
|
|
915
|
+
* 双曲函数精确计算(解决大数精度问题)
|
|
916
|
+
* @param x 输入值
|
|
917
|
+
* @param type 函数类型:'sinh' | 'cosh' | 'tanh'
|
|
918
|
+
* @param decimalPlaces 精度(默认10位)
|
|
919
|
+
* @returns 计算结果
|
|
920
|
+
* @example
|
|
921
|
+
* cmx.hypFunc(1, 'tanh') // 0.761594156(比Math.tanh更精确)
|
|
922
|
+
*/
|
|
923
|
+
hypFunc(e, t, r = 10) {
|
|
924
|
+
const s = this.exp(e, r + 2), o = this.exp(-e, r + 2);
|
|
925
|
+
switch (t) {
|
|
926
|
+
case "sinh":
|
|
927
|
+
return this.round(this.div(this.sub(s, o), 2), r);
|
|
928
|
+
case "cosh":
|
|
929
|
+
return this.round(this.div(this.add(s, o), 2), r);
|
|
930
|
+
case "tanh":
|
|
931
|
+
return this.round(
|
|
932
|
+
this.div(this.sub(s, o), this.add(s, o)),
|
|
933
|
+
r
|
|
934
|
+
);
|
|
935
|
+
default:
|
|
936
|
+
throw new Error("不支持的函数类型");
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
/**
|
|
940
|
+
* 精确排列组合(解决大数计算问题)
|
|
941
|
+
* @param n 总数
|
|
942
|
+
* @param k 选取数
|
|
943
|
+
* @param type 计算类型:'permutation' | 'combination'
|
|
944
|
+
* @returns 精确结果
|
|
945
|
+
* @example
|
|
946
|
+
* cmx.permComb(100, 5, 'combination') // 75287520
|
|
947
|
+
*/
|
|
948
|
+
permComb(e, t, r) {
|
|
949
|
+
if (!Number.isInteger(e) || !Number.isInteger(t) || t > e || t < 0)
|
|
950
|
+
return NaN;
|
|
951
|
+
let s = 1;
|
|
952
|
+
for (let o = 0; o < t; o++)
|
|
953
|
+
s = this.mul(s, e - o), r === "combination" && (s = this.div(s, o + 1));
|
|
954
|
+
return s;
|
|
955
|
+
}
|
|
956
|
+
/**
|
|
957
|
+
* 计算最大公约数(GCD)
|
|
958
|
+
* @param a 第一个数字
|
|
959
|
+
* @param b 第二个数字
|
|
960
|
+
* @returns 最大公约数
|
|
961
|
+
* @example
|
|
962
|
+
* cmx.gcd(48, 18) // 返回 6
|
|
963
|
+
*/
|
|
964
|
+
gcd(e, t) {
|
|
965
|
+
for (e = Math.abs(e), t = Math.abs(t); t !== 0; ) {
|
|
966
|
+
const r = t;
|
|
967
|
+
t = e % t, e = r;
|
|
968
|
+
}
|
|
969
|
+
return e;
|
|
970
|
+
}
|
|
971
|
+
/**
|
|
972
|
+
* 计算最小公倍数(LCM)
|
|
973
|
+
* @param a 第一个数字
|
|
974
|
+
* @param b 第二个数字
|
|
975
|
+
* @returns 最小公倍数
|
|
976
|
+
* @example
|
|
977
|
+
* cmx.lcm(12, 15) // 返回 60
|
|
978
|
+
*/
|
|
979
|
+
lcm(e, t) {
|
|
980
|
+
return this.div(this.mul(e, t), this.gcd(e, t));
|
|
981
|
+
}
|
|
982
|
+
};
|
|
983
|
+
m(L, "factorialCache", /* @__PURE__ */ new Map());
|
|
984
|
+
let lt = L;
|
|
985
|
+
const Ta = new lt(), De = class De {
|
|
726
986
|
constructor() {
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
987
|
+
m(this, "callbacks", []);
|
|
988
|
+
m(this, "pending", !1);
|
|
989
|
+
m(this, "timerFunc");
|
|
730
990
|
this.timerFunc = this.determineTimerFunc();
|
|
731
991
|
}
|
|
732
992
|
determineTimerFunc() {
|
|
@@ -736,9 +996,9 @@ const la = new tn(), Ee = class Ee {
|
|
|
736
996
|
}
|
|
737
997
|
if (typeof MutationObserver < "u" && typeof window < "u") {
|
|
738
998
|
let e = 1;
|
|
739
|
-
const t = new MutationObserver(this.flushCallbacks.bind(this)),
|
|
740
|
-
return t.observe(
|
|
741
|
-
e = (e + 1) % 2,
|
|
999
|
+
const t = new MutationObserver(this.flushCallbacks.bind(this)), r = document.createTextNode(String(e));
|
|
1000
|
+
return t.observe(r, { characterData: !0 }), () => {
|
|
1001
|
+
e = (e + 1) % 2, r.data = String(e);
|
|
742
1002
|
};
|
|
743
1003
|
}
|
|
744
1004
|
return () => setTimeout(this.flushCallbacks.bind(this), 0);
|
|
@@ -751,7 +1011,7 @@ const la = new tn(), Ee = class Ee {
|
|
|
751
1011
|
e[t]();
|
|
752
1012
|
}
|
|
753
1013
|
nextTick(e, t) {
|
|
754
|
-
let
|
|
1014
|
+
let r;
|
|
755
1015
|
if (this.callbacks.push(() => {
|
|
756
1016
|
if (e)
|
|
757
1017
|
try {
|
|
@@ -760,60 +1020,139 @@ const la = new tn(), Ee = class Ee {
|
|
|
760
1020
|
console.error("Error in nextTick:", s);
|
|
761
1021
|
}
|
|
762
1022
|
else
|
|
763
|
-
|
|
1023
|
+
r && r();
|
|
764
1024
|
}), this.pending || (this.pending = !0, this.timerFunc()), !e && typeof Promise < "u")
|
|
765
1025
|
return new Promise((s) => {
|
|
766
|
-
|
|
1026
|
+
r = s;
|
|
767
1027
|
});
|
|
768
1028
|
}
|
|
769
1029
|
static nextTick(e, t) {
|
|
770
|
-
return
|
|
1030
|
+
return De.instance.nextTick(e, t);
|
|
771
1031
|
}
|
|
772
1032
|
static get instance() {
|
|
773
|
-
return this._instance || (this._instance = new
|
|
1033
|
+
return this._instance || (this._instance = new De()), this._instance;
|
|
774
1034
|
}
|
|
775
1035
|
};
|
|
776
|
-
|
|
777
|
-
let
|
|
778
|
-
const
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
1036
|
+
m(De, "_instance");
|
|
1037
|
+
let Fe = De;
|
|
1038
|
+
const Da = Fe.instance.nextTick.bind(Fe.instance);
|
|
1039
|
+
var pe = {}, ut, ft, Oe = pn;
|
|
1040
|
+
if (process.env.NODE_ENV === "production")
|
|
1041
|
+
ft = pe.createRoot = Oe.createRoot, ut = pe.hydrateRoot = Oe.hydrateRoot;
|
|
1042
|
+
else {
|
|
1043
|
+
var Le = Oe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
1044
|
+
ft = pe.createRoot = function(n, e) {
|
|
1045
|
+
Le.usingClientEntryPoint = !0;
|
|
1046
|
+
try {
|
|
1047
|
+
return Oe.createRoot(n, e);
|
|
1048
|
+
} finally {
|
|
1049
|
+
Le.usingClientEntryPoint = !1;
|
|
1050
|
+
}
|
|
1051
|
+
}, ut = pe.hydrateRoot = function(n, e, t) {
|
|
1052
|
+
Le.usingClientEntryPoint = !0;
|
|
1053
|
+
try {
|
|
1054
|
+
return Oe.hydrateRoot(n, e, t);
|
|
1055
|
+
} finally {
|
|
1056
|
+
Le.usingClientEntryPoint = !1;
|
|
1057
|
+
}
|
|
1058
|
+
};
|
|
1059
|
+
}
|
|
1060
|
+
const wn = /* @__PURE__ */ mn({
|
|
1061
|
+
__proto__: null,
|
|
1062
|
+
get createRoot() {
|
|
1063
|
+
return ft;
|
|
1064
|
+
},
|
|
1065
|
+
default: pe,
|
|
1066
|
+
get hydrateRoot() {
|
|
1067
|
+
return ut;
|
|
1068
|
+
}
|
|
1069
|
+
}, [pe]), { createRoot: xn } = wn;
|
|
1070
|
+
let se = null, fe = null;
|
|
1071
|
+
function Cn() {
|
|
1072
|
+
return se || (se = document.createElement("div"), document.body.appendChild(se)), se;
|
|
1073
|
+
}
|
|
1074
|
+
function Sn(n, e) {
|
|
1075
|
+
const t = Cn();
|
|
1076
|
+
let r = {
|
|
1077
|
+
open: !0,
|
|
1078
|
+
...e,
|
|
1079
|
+
// 默认自动关闭
|
|
1080
|
+
onClosed: e.onClosed || ((c) => {
|
|
1081
|
+
u(c);
|
|
1082
|
+
})
|
|
1083
|
+
};
|
|
1084
|
+
if (!fe)
|
|
1085
|
+
try {
|
|
1086
|
+
fe = xn(t);
|
|
1087
|
+
} catch (c) {
|
|
1088
|
+
return console.error("Failed to create root:", c), {
|
|
1089
|
+
destroy: () => {
|
|
1090
|
+
},
|
|
1091
|
+
update: () => {
|
|
1092
|
+
}
|
|
1093
|
+
};
|
|
1094
|
+
}
|
|
1095
|
+
const s = () => {
|
|
1096
|
+
fe && (fe.unmount(), fe = null), se && se.parentNode && (se.parentNode.removeChild(se), se = null);
|
|
1097
|
+
}, o = (c) => {
|
|
1098
|
+
typeof r.onClosed == "function" && r.onClosed(c), s();
|
|
1099
|
+
}, i = (c) => {
|
|
1100
|
+
fe && fe.render(/* @__PURE__ */ p.jsx(n, { ...c }));
|
|
1101
|
+
}, l = (c) => {
|
|
1102
|
+
r = typeof c == "function" ? c(r) : { ...r, ...c }, i(r);
|
|
1103
|
+
}, u = (c) => {
|
|
1104
|
+
r.open ? (r = {
|
|
1105
|
+
...r,
|
|
1106
|
+
open: !1,
|
|
1107
|
+
onClosed: (g) => {
|
|
1108
|
+
e.onClosed && e.onClosed(g || c), o(g || c);
|
|
1109
|
+
}
|
|
1110
|
+
}, i(r)) : console.warn("Modal is already closed.");
|
|
1111
|
+
};
|
|
1112
|
+
return i(r), {
|
|
1113
|
+
destroy: u,
|
|
1114
|
+
update: l
|
|
1115
|
+
};
|
|
1116
|
+
}
|
|
1117
|
+
const ka = () => {
|
|
1118
|
+
}, Ue = (n, e) => {
|
|
1119
|
+
const t = n;
|
|
1120
|
+
let r = n;
|
|
782
1121
|
if (e.includes(" ")) {
|
|
783
|
-
|
|
1122
|
+
r = "";
|
|
784
1123
|
const s = e == null ? void 0 : e.split(" ");
|
|
785
|
-
for (const
|
|
786
|
-
|
|
1124
|
+
for (const o of s)
|
|
1125
|
+
r += ` ${t}-${o}`;
|
|
787
1126
|
} else
|
|
788
|
-
e && (
|
|
789
|
-
return
|
|
790
|
-
},
|
|
1127
|
+
e && (r = `${n}-${e}`);
|
|
1128
|
+
return r;
|
|
1129
|
+
}, Aa = (n, e) => {
|
|
791
1130
|
const t = e == null ? void 0 : e.split(".");
|
|
792
|
-
let
|
|
1131
|
+
let r = n;
|
|
793
1132
|
for (const s of t)
|
|
794
|
-
|
|
795
|
-
return n;
|
|
796
|
-
}, rn = (r) => {
|
|
797
|
-
for (const e in r)
|
|
798
|
-
r[e] === null && delete r[e];
|
|
1133
|
+
r = r[s];
|
|
799
1134
|
return r;
|
|
800
|
-
},
|
|
1135
|
+
}, Rn = (n) => {
|
|
1136
|
+
for (const e in n)
|
|
1137
|
+
n[e] === null && delete n[e];
|
|
1138
|
+
return n;
|
|
1139
|
+
}, or = (n, e) => {
|
|
801
1140
|
let t = null;
|
|
802
|
-
return (...
|
|
1141
|
+
return (...r) => {
|
|
803
1142
|
t && clearTimeout(t), t = setTimeout(() => {
|
|
804
|
-
|
|
1143
|
+
n(...r);
|
|
805
1144
|
}, e);
|
|
806
1145
|
};
|
|
807
|
-
},
|
|
808
|
-
let t = null,
|
|
1146
|
+
}, $a = (n, e) => {
|
|
1147
|
+
let t = null, r = 0;
|
|
809
1148
|
return (...s) => {
|
|
810
|
-
const
|
|
811
|
-
t ?
|
|
1149
|
+
const o = Date.now();
|
|
1150
|
+
t ? o - r >= e && (n(...s), r = o) : (n(...s), r = o, t = setTimeout(() => {
|
|
812
1151
|
t = null;
|
|
813
1152
|
}, e));
|
|
814
1153
|
};
|
|
815
1154
|
};
|
|
816
|
-
class
|
|
1155
|
+
class Ma {
|
|
817
1156
|
/**
|
|
818
1157
|
* 验证版本号格式是否有效
|
|
819
1158
|
* @param version 版本号字符串
|
|
@@ -831,16 +1170,16 @@ class ga {
|
|
|
831
1170
|
static compare(e, t) {
|
|
832
1171
|
if (!this.isValid(e) || !this.isValid(t))
|
|
833
1172
|
throw new Error("Invalid version format");
|
|
834
|
-
const
|
|
1173
|
+
const r = (u) => u.replace(/^v/, "").split(/[-+]/)[0].split("."), s = r(e), o = r(t);
|
|
835
1174
|
for (let u = 0; u < 3; u++) {
|
|
836
|
-
const
|
|
837
|
-
if (
|
|
1175
|
+
const c = parseInt(s[u] || "0", 10), g = parseInt(o[u] || "0", 10);
|
|
1176
|
+
if (c > g)
|
|
838
1177
|
return 1;
|
|
839
|
-
if (
|
|
1178
|
+
if (c < g)
|
|
840
1179
|
return -1;
|
|
841
1180
|
}
|
|
842
|
-
const
|
|
843
|
-
return
|
|
1181
|
+
const i = e.match(/-(.+)/), l = t.match(/-(.+)/);
|
|
1182
|
+
return i && !l ? -1 : !i && l ? 1 : i && l ? i[1].localeCompare(l[1]) : 0;
|
|
844
1183
|
}
|
|
845
1184
|
/**
|
|
846
1185
|
* 检查版本号是否满足范围要求
|
|
@@ -851,24 +1190,24 @@ class ga {
|
|
|
851
1190
|
static satisfies(e, t) {
|
|
852
1191
|
if (!this.isValid(e))
|
|
853
1192
|
return !1;
|
|
854
|
-
const
|
|
855
|
-
return !s || s.length === 0 ? !1 : s.every((
|
|
856
|
-
const
|
|
857
|
-
if (!
|
|
1193
|
+
const r = /([<>]=?|==?|\^|~)?\s*v?([0-9]+\.[0-9]+\.[0-9]+(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+)?)/g, s = t.match(r);
|
|
1194
|
+
return !s || s.length === 0 ? !1 : s.every((o) => {
|
|
1195
|
+
const i = o.match(/([<>]=?|==?|\^|~)?\s*(v?[0-9].*)/);
|
|
1196
|
+
if (!i)
|
|
858
1197
|
return !1;
|
|
859
|
-
const
|
|
1198
|
+
const l = i[1] || "==", u = i[2];
|
|
860
1199
|
if (!this.isValid(u))
|
|
861
1200
|
return !1;
|
|
862
|
-
const
|
|
863
|
-
switch (
|
|
1201
|
+
const c = this.compare(e, u);
|
|
1202
|
+
switch (l) {
|
|
864
1203
|
case ">":
|
|
865
|
-
return
|
|
1204
|
+
return c > 0;
|
|
866
1205
|
case ">=":
|
|
867
|
-
return
|
|
1206
|
+
return c >= 0;
|
|
868
1207
|
case "<":
|
|
869
|
-
return
|
|
1208
|
+
return c < 0;
|
|
870
1209
|
case "<=":
|
|
871
|
-
return
|
|
1210
|
+
return c <= 0;
|
|
872
1211
|
case "^":
|
|
873
1212
|
return this.caretRange(e, u);
|
|
874
1213
|
case "~":
|
|
@@ -876,7 +1215,7 @@ class ga {
|
|
|
876
1215
|
case "=":
|
|
877
1216
|
case "==":
|
|
878
1217
|
default:
|
|
879
|
-
return
|
|
1218
|
+
return c === 0;
|
|
880
1219
|
}
|
|
881
1220
|
});
|
|
882
1221
|
}
|
|
@@ -887,16 +1226,16 @@ class ga {
|
|
|
887
1226
|
* @returns 是否匹配
|
|
888
1227
|
*/
|
|
889
1228
|
static caretRange(e, t) {
|
|
890
|
-
const
|
|
891
|
-
let
|
|
892
|
-
for (let
|
|
893
|
-
if (parseInt(
|
|
894
|
-
|
|
1229
|
+
const r = (l) => l.replace(/^v/, "").split(/[-+]/)[0].split("."), s = r(e), o = r(t);
|
|
1230
|
+
let i = 0;
|
|
1231
|
+
for (let l = 0; l < o.length; l++)
|
|
1232
|
+
if (parseInt(o[l], 10) !== 0) {
|
|
1233
|
+
i = l;
|
|
895
1234
|
break;
|
|
896
1235
|
}
|
|
897
|
-
for (let
|
|
898
|
-
const u = parseInt(s[
|
|
899
|
-
if (u !==
|
|
1236
|
+
for (let l = 0; l <= i; l++) {
|
|
1237
|
+
const u = parseInt(s[l] || "0", 10), c = parseInt(o[l] || "0", 10);
|
|
1238
|
+
if (u !== c)
|
|
900
1239
|
return !1;
|
|
901
1240
|
}
|
|
902
1241
|
return this.compare(e, t) >= 0;
|
|
@@ -908,14 +1247,14 @@ class ga {
|
|
|
908
1247
|
* @returns 是否匹配
|
|
909
1248
|
*/
|
|
910
1249
|
static tildeRange(e, t) {
|
|
911
|
-
const
|
|
912
|
-
for (let u = 0; u <
|
|
913
|
-
const
|
|
914
|
-
if (
|
|
1250
|
+
const r = (u) => u.replace(/^v/, "").split(/[-+]/)[0].split("."), s = r(e), o = r(t);
|
|
1251
|
+
for (let u = 0; u < o.length - 1; u++) {
|
|
1252
|
+
const c = parseInt(s[u] || "0", 10), g = parseInt(o[u] || "0", 10);
|
|
1253
|
+
if (c !== g)
|
|
915
1254
|
return !1;
|
|
916
1255
|
}
|
|
917
|
-
const
|
|
918
|
-
return
|
|
1256
|
+
const i = parseInt(s[o.length - 1] || "0", 10), l = parseInt(o[o.length - 1] || "0", 10);
|
|
1257
|
+
return i >= l;
|
|
919
1258
|
}
|
|
920
1259
|
/**
|
|
921
1260
|
* 获取主版本号 (major)
|
|
@@ -973,25 +1312,25 @@ class ga {
|
|
|
973
1312
|
return t ? t[1] : null;
|
|
974
1313
|
}
|
|
975
1314
|
}
|
|
976
|
-
const
|
|
1315
|
+
const ir = tr({
|
|
977
1316
|
theme: {
|
|
978
1317
|
cssVar: !0,
|
|
979
|
-
algorithm: [
|
|
1318
|
+
algorithm: [ze.defaultAlgorithm]
|
|
980
1319
|
}
|
|
981
|
-
}),
|
|
982
|
-
function
|
|
983
|
-
return
|
|
1320
|
+
}), Ia = ir.Provider;
|
|
1321
|
+
function _n() {
|
|
1322
|
+
return rr(ir);
|
|
984
1323
|
}
|
|
985
|
-
function
|
|
986
|
-
const { theme: e } =
|
|
987
|
-
return /* @__PURE__ */ p.jsx(
|
|
1324
|
+
function we(n) {
|
|
1325
|
+
const { theme: e } = _n();
|
|
1326
|
+
return /* @__PURE__ */ p.jsx(nr, { theme: e, children: n.children });
|
|
988
1327
|
}
|
|
989
|
-
const
|
|
990
|
-
const
|
|
991
|
-
return e.render ? /* @__PURE__ */ p.jsx("span", { className:
|
|
992
|
-
|
|
1328
|
+
const zt = (n = "") => Ue("items-row", n), En = (n) => n.items ? /* @__PURE__ */ p.jsx(we, { children: /* @__PURE__ */ p.jsx("div", { className: `${zt()} ${n.className || ""}`, style: n.style, children: (n.items || []).map((e, t) => {
|
|
1329
|
+
const r = `${zt("item")} ${e.className}`;
|
|
1330
|
+
return e.render ? /* @__PURE__ */ p.jsx("span", { className: r, children: e.render() }, t) : /* @__PURE__ */ p.jsx(
|
|
1331
|
+
Pe,
|
|
993
1332
|
{
|
|
994
|
-
className:
|
|
1333
|
+
className: r,
|
|
995
1334
|
...e.btnProps,
|
|
996
1335
|
type: e.type || "primary",
|
|
997
1336
|
onClick: e.onClick,
|
|
@@ -1000,280 +1339,280 @@ const Ot = (r = "") => De("items-row", r), an = (r) => r.items ? /* @__PURE__ */
|
|
|
1000
1339
|
e.label
|
|
1001
1340
|
);
|
|
1002
1341
|
}) }) }) : null;
|
|
1003
|
-
const
|
|
1342
|
+
const je = (n = "") => Ue("m-breadcrumb", n), La = (n) => {
|
|
1004
1343
|
const {
|
|
1005
1344
|
routes: e,
|
|
1006
1345
|
customItems: t,
|
|
1007
|
-
style:
|
|
1346
|
+
style: r,
|
|
1008
1347
|
className: s,
|
|
1009
|
-
offsetTop:
|
|
1010
|
-
mainAppBaseUrl:
|
|
1011
|
-
microAppName:
|
|
1012
|
-
} =
|
|
1348
|
+
offsetTop: o = 64,
|
|
1349
|
+
mainAppBaseUrl: i,
|
|
1350
|
+
microAppName: l
|
|
1351
|
+
} = n, u = W.useRef(null), c = W.useCallback(() => {
|
|
1013
1352
|
var d, b;
|
|
1014
1353
|
(b = (d = u.current) == null ? void 0 : d.updatePosition) == null || b.call(d);
|
|
1015
1354
|
}, []);
|
|
1016
|
-
|
|
1017
|
-
const g =
|
|
1355
|
+
W.useEffect(() => (window.addEventListener("scroll", c, !0), () => window.removeEventListener("scroll", c)), [c]);
|
|
1356
|
+
const g = W.useCallback(
|
|
1018
1357
|
(d) => {
|
|
1019
1358
|
if (!d)
|
|
1020
1359
|
return "";
|
|
1021
1360
|
const b = d.replace(/^\/+/, "");
|
|
1022
1361
|
return `/${[
|
|
1023
|
-
|
|
1024
|
-
|
|
1362
|
+
i == null ? void 0 : i.replace(/\/+$/, ""),
|
|
1363
|
+
l == null ? void 0 : l.replace(/\/+$/, ""),
|
|
1025
1364
|
b
|
|
1026
1365
|
].filter(Boolean).join("/")}`;
|
|
1027
1366
|
},
|
|
1028
|
-
[
|
|
1367
|
+
[i, l]
|
|
1029
1368
|
);
|
|
1030
|
-
return /* @__PURE__ */ p.jsx(
|
|
1031
|
-
|
|
1369
|
+
return /* @__PURE__ */ p.jsx(we, { children: /* @__PURE__ */ p.jsx("div", { className: `${je()} ${s || ""}`, style: r, children: /* @__PURE__ */ p.jsx(tn, { ref: u, offsetTop: o, children: /* @__PURE__ */ p.jsxs(
|
|
1370
|
+
ar,
|
|
1032
1371
|
{
|
|
1033
|
-
className:
|
|
1034
|
-
rootClassName:
|
|
1372
|
+
className: je("container"),
|
|
1373
|
+
rootClassName: je("body"),
|
|
1035
1374
|
variant: "borderless",
|
|
1036
1375
|
children: [
|
|
1037
|
-
/* @__PURE__ */ p.jsx(
|
|
1038
|
-
/* @__PURE__ */ p.jsx("div", { className:
|
|
1376
|
+
/* @__PURE__ */ p.jsx(It, { className: je("inner-breadcrumb"), style: { fontSize: "18px" }, children: e == null ? void 0 : e.map((d) => /* @__PURE__ */ p.jsx(It.Item, { children: d.url ? /* @__PURE__ */ p.jsx("a", { href: `#${g(d.url)}`, children: d.name }) : d.name }, d.url || d.name)) }),
|
|
1377
|
+
/* @__PURE__ */ p.jsx("div", { className: je("custom-item-wrapper"), children: /* @__PURE__ */ p.jsx(En, { items: t }) })
|
|
1039
1378
|
]
|
|
1040
1379
|
}
|
|
1041
1380
|
) }) }) });
|
|
1042
|
-
},
|
|
1381
|
+
}, On = (n) => {
|
|
1043
1382
|
const {
|
|
1044
1383
|
data: e,
|
|
1045
1384
|
title: t,
|
|
1046
|
-
column:
|
|
1385
|
+
column: r = 3,
|
|
1047
1386
|
lineHeight: s,
|
|
1048
|
-
align:
|
|
1049
|
-
itemLayout:
|
|
1050
|
-
colon:
|
|
1387
|
+
align: o = "left",
|
|
1388
|
+
itemLayout: i,
|
|
1389
|
+
colon: l = !0,
|
|
1051
1390
|
bordered: u = !1,
|
|
1052
|
-
style:
|
|
1391
|
+
style: c,
|
|
1053
1392
|
className: g,
|
|
1054
1393
|
labelStyle: d,
|
|
1055
1394
|
contentStyle: b
|
|
1056
|
-
} =
|
|
1395
|
+
} = n, O = {
|
|
1057
1396
|
...s ? { lineHeight: `${s}px` } : {},
|
|
1058
|
-
textAlign:
|
|
1059
|
-
...
|
|
1397
|
+
textAlign: o,
|
|
1398
|
+
...i != null && i.label ? { width: `${i.label}px` } : {},
|
|
1060
1399
|
...d
|
|
1061
|
-
},
|
|
1400
|
+
}, P = {
|
|
1062
1401
|
...s ? { lineHeight: `${s}px` } : {},
|
|
1063
|
-
...
|
|
1402
|
+
...i != null && i.value ? { width: `${i.value}px` } : {},
|
|
1064
1403
|
...b
|
|
1065
1404
|
};
|
|
1066
|
-
return /* @__PURE__ */ p.jsx(
|
|
1067
|
-
|
|
1405
|
+
return /* @__PURE__ */ p.jsx(we, { children: /* @__PURE__ */ p.jsx(
|
|
1406
|
+
Lt,
|
|
1068
1407
|
{
|
|
1069
1408
|
title: t,
|
|
1070
|
-
column:
|
|
1071
|
-
colon:
|
|
1409
|
+
column: r,
|
|
1410
|
+
colon: l,
|
|
1072
1411
|
bordered: u,
|
|
1073
|
-
style:
|
|
1412
|
+
style: c,
|
|
1074
1413
|
className: g,
|
|
1075
|
-
labelStyle:
|
|
1076
|
-
contentStyle:
|
|
1077
|
-
children: e.map((
|
|
1078
|
-
var
|
|
1414
|
+
labelStyle: O,
|
|
1415
|
+
contentStyle: P,
|
|
1416
|
+
children: e.map((T, H) => {
|
|
1417
|
+
var j;
|
|
1079
1418
|
return /* @__PURE__ */ p.jsx(
|
|
1080
|
-
|
|
1419
|
+
Lt.Item,
|
|
1081
1420
|
{
|
|
1082
|
-
label:
|
|
1083
|
-
span:
|
|
1084
|
-
children:
|
|
1421
|
+
label: T.label,
|
|
1422
|
+
span: T.span,
|
|
1423
|
+
children: T.value || "-"
|
|
1085
1424
|
},
|
|
1086
|
-
((
|
|
1425
|
+
((j = T.label) == null ? void 0 : j.toString()) || H
|
|
1087
1426
|
);
|
|
1088
1427
|
})
|
|
1089
1428
|
}
|
|
1090
1429
|
) });
|
|
1091
1430
|
};
|
|
1092
|
-
|
|
1093
|
-
var
|
|
1094
|
-
const
|
|
1095
|
-
function
|
|
1096
|
-
return
|
|
1431
|
+
On.displayName = "MDescriptions";
|
|
1432
|
+
var jn = /* @__PURE__ */ tr({});
|
|
1433
|
+
const cr = jn;
|
|
1434
|
+
function ye() {
|
|
1435
|
+
return ye = Object.assign ? Object.assign.bind() : function(n) {
|
|
1097
1436
|
for (var e = 1; e < arguments.length; e++) {
|
|
1098
1437
|
var t = arguments[e];
|
|
1099
|
-
for (var
|
|
1100
|
-
({}).hasOwnProperty.call(t,
|
|
1438
|
+
for (var r in t)
|
|
1439
|
+
({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
1101
1440
|
}
|
|
1102
|
-
return
|
|
1103
|
-
},
|
|
1441
|
+
return n;
|
|
1442
|
+
}, ye.apply(null, arguments);
|
|
1104
1443
|
}
|
|
1105
|
-
function
|
|
1106
|
-
if (Array.isArray(
|
|
1107
|
-
return
|
|
1444
|
+
function Nn(n) {
|
|
1445
|
+
if (Array.isArray(n))
|
|
1446
|
+
return n;
|
|
1108
1447
|
}
|
|
1109
|
-
function
|
|
1110
|
-
var t =
|
|
1448
|
+
function Pn(n, e) {
|
|
1449
|
+
var t = n == null ? null : typeof Symbol < "u" && n[Symbol.iterator] || n["@@iterator"];
|
|
1111
1450
|
if (t != null) {
|
|
1112
|
-
var
|
|
1451
|
+
var r, s, o, i, l = [], u = !0, c = !1;
|
|
1113
1452
|
try {
|
|
1114
|
-
if (
|
|
1453
|
+
if (o = (t = t.call(n)).next, e === 0) {
|
|
1115
1454
|
if (Object(t) !== t)
|
|
1116
1455
|
return;
|
|
1117
1456
|
u = !1;
|
|
1118
1457
|
} else
|
|
1119
|
-
for (; !(u = (
|
|
1458
|
+
for (; !(u = (r = o.call(t)).done) && (l.push(r.value), l.length !== e); u = !0)
|
|
1120
1459
|
;
|
|
1121
1460
|
} catch (g) {
|
|
1122
|
-
|
|
1461
|
+
c = !0, s = g;
|
|
1123
1462
|
} finally {
|
|
1124
1463
|
try {
|
|
1125
|
-
if (!u && t.return != null && (
|
|
1464
|
+
if (!u && t.return != null && (i = t.return(), Object(i) !== i))
|
|
1126
1465
|
return;
|
|
1127
1466
|
} finally {
|
|
1128
|
-
if (
|
|
1467
|
+
if (c)
|
|
1129
1468
|
throw s;
|
|
1130
1469
|
}
|
|
1131
1470
|
}
|
|
1132
|
-
return
|
|
1471
|
+
return l;
|
|
1133
1472
|
}
|
|
1134
1473
|
}
|
|
1135
|
-
function
|
|
1136
|
-
(e == null || e >
|
|
1137
|
-
for (var t = 0,
|
|
1138
|
-
|
|
1139
|
-
return
|
|
1474
|
+
function Vt(n, e) {
|
|
1475
|
+
(e == null || e > n.length) && (e = n.length);
|
|
1476
|
+
for (var t = 0, r = Array(e); t < e; t++)
|
|
1477
|
+
r[t] = n[t];
|
|
1478
|
+
return r;
|
|
1140
1479
|
}
|
|
1141
|
-
function
|
|
1142
|
-
if (
|
|
1143
|
-
if (typeof
|
|
1144
|
-
return
|
|
1145
|
-
var t = {}.toString.call(
|
|
1146
|
-
return t === "Object" &&
|
|
1480
|
+
function Tn(n, e) {
|
|
1481
|
+
if (n) {
|
|
1482
|
+
if (typeof n == "string")
|
|
1483
|
+
return Vt(n, e);
|
|
1484
|
+
var t = {}.toString.call(n).slice(8, -1);
|
|
1485
|
+
return t === "Object" && n.constructor && (t = n.constructor.name), t === "Map" || t === "Set" ? Array.from(n) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? Vt(n, e) : void 0;
|
|
1147
1486
|
}
|
|
1148
1487
|
}
|
|
1149
|
-
function
|
|
1488
|
+
function Dn() {
|
|
1150
1489
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1151
1490
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1152
1491
|
}
|
|
1153
|
-
function
|
|
1154
|
-
return
|
|
1492
|
+
function lr(n, e) {
|
|
1493
|
+
return Nn(n) || Pn(n, e) || Tn(n, e) || Dn();
|
|
1155
1494
|
}
|
|
1156
|
-
function
|
|
1495
|
+
function de(n) {
|
|
1157
1496
|
"@babel/helpers - typeof";
|
|
1158
|
-
return
|
|
1497
|
+
return de = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
1159
1498
|
return typeof e;
|
|
1160
1499
|
} : function(e) {
|
|
1161
1500
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
1162
|
-
},
|
|
1501
|
+
}, de(n);
|
|
1163
1502
|
}
|
|
1164
|
-
function
|
|
1165
|
-
if (
|
|
1166
|
-
return
|
|
1167
|
-
var t =
|
|
1503
|
+
function kn(n, e) {
|
|
1504
|
+
if (de(n) != "object" || !n)
|
|
1505
|
+
return n;
|
|
1506
|
+
var t = n[Symbol.toPrimitive];
|
|
1168
1507
|
if (t !== void 0) {
|
|
1169
|
-
var
|
|
1170
|
-
if (
|
|
1171
|
-
return
|
|
1508
|
+
var r = t.call(n, e || "default");
|
|
1509
|
+
if (de(r) != "object")
|
|
1510
|
+
return r;
|
|
1172
1511
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1173
1512
|
}
|
|
1174
|
-
return (e === "string" ? String : Number)(
|
|
1513
|
+
return (e === "string" ? String : Number)(n);
|
|
1175
1514
|
}
|
|
1176
|
-
function
|
|
1177
|
-
var e =
|
|
1178
|
-
return
|
|
1515
|
+
function An(n) {
|
|
1516
|
+
var e = kn(n, "string");
|
|
1517
|
+
return de(e) == "symbol" ? e : e + "";
|
|
1179
1518
|
}
|
|
1180
|
-
function
|
|
1181
|
-
return (e =
|
|
1519
|
+
function U(n, e, t) {
|
|
1520
|
+
return (e = An(e)) in n ? Object.defineProperty(n, e, {
|
|
1182
1521
|
value: t,
|
|
1183
1522
|
enumerable: !0,
|
|
1184
1523
|
configurable: !0,
|
|
1185
1524
|
writable: !0
|
|
1186
|
-
}) :
|
|
1525
|
+
}) : n[e] = t, n;
|
|
1187
1526
|
}
|
|
1188
|
-
function
|
|
1189
|
-
if (
|
|
1527
|
+
function $n(n, e) {
|
|
1528
|
+
if (n == null)
|
|
1190
1529
|
return {};
|
|
1191
1530
|
var t = {};
|
|
1192
|
-
for (var
|
|
1193
|
-
if ({}.hasOwnProperty.call(
|
|
1194
|
-
if (e.indexOf(
|
|
1531
|
+
for (var r in n)
|
|
1532
|
+
if ({}.hasOwnProperty.call(n, r)) {
|
|
1533
|
+
if (e.indexOf(r) !== -1)
|
|
1195
1534
|
continue;
|
|
1196
|
-
t[
|
|
1535
|
+
t[r] = n[r];
|
|
1197
1536
|
}
|
|
1198
1537
|
return t;
|
|
1199
1538
|
}
|
|
1200
|
-
function
|
|
1201
|
-
if (
|
|
1539
|
+
function ur(n, e) {
|
|
1540
|
+
if (n == null)
|
|
1202
1541
|
return {};
|
|
1203
|
-
var t,
|
|
1542
|
+
var t, r, s = $n(n, e);
|
|
1204
1543
|
if (Object.getOwnPropertySymbols) {
|
|
1205
|
-
var
|
|
1206
|
-
for (
|
|
1207
|
-
t =
|
|
1544
|
+
var o = Object.getOwnPropertySymbols(n);
|
|
1545
|
+
for (r = 0; r < o.length; r++)
|
|
1546
|
+
t = o[r], e.indexOf(t) === -1 && {}.propertyIsEnumerable.call(n, t) && (s[t] = n[t]);
|
|
1208
1547
|
}
|
|
1209
1548
|
return s;
|
|
1210
1549
|
}
|
|
1211
|
-
var
|
|
1550
|
+
var fr = { exports: {} };
|
|
1212
1551
|
/*!
|
|
1213
1552
|
Copyright (c) 2018 Jed Watson.
|
|
1214
1553
|
Licensed under the MIT License (MIT), see
|
|
1215
1554
|
http://jedwatson.github.io/classnames
|
|
1216
1555
|
*/
|
|
1217
|
-
(function(
|
|
1556
|
+
(function(n) {
|
|
1218
1557
|
(function() {
|
|
1219
1558
|
var e = {}.hasOwnProperty;
|
|
1220
1559
|
function t() {
|
|
1221
|
-
for (var
|
|
1222
|
-
var
|
|
1223
|
-
|
|
1560
|
+
for (var o = "", i = 0; i < arguments.length; i++) {
|
|
1561
|
+
var l = arguments[i];
|
|
1562
|
+
l && (o = s(o, r(l)));
|
|
1224
1563
|
}
|
|
1225
|
-
return
|
|
1564
|
+
return o;
|
|
1226
1565
|
}
|
|
1227
|
-
function
|
|
1228
|
-
if (typeof
|
|
1229
|
-
return
|
|
1230
|
-
if (typeof
|
|
1566
|
+
function r(o) {
|
|
1567
|
+
if (typeof o == "string" || typeof o == "number")
|
|
1568
|
+
return o;
|
|
1569
|
+
if (typeof o != "object")
|
|
1231
1570
|
return "";
|
|
1232
|
-
if (Array.isArray(
|
|
1233
|
-
return t.apply(null,
|
|
1234
|
-
if (
|
|
1235
|
-
return
|
|
1236
|
-
var
|
|
1237
|
-
for (var
|
|
1238
|
-
e.call(
|
|
1239
|
-
return
|
|
1571
|
+
if (Array.isArray(o))
|
|
1572
|
+
return t.apply(null, o);
|
|
1573
|
+
if (o.toString !== Object.prototype.toString && !o.toString.toString().includes("[native code]"))
|
|
1574
|
+
return o.toString();
|
|
1575
|
+
var i = "";
|
|
1576
|
+
for (var l in o)
|
|
1577
|
+
e.call(o, l) && o[l] && (i = s(i, l));
|
|
1578
|
+
return i;
|
|
1240
1579
|
}
|
|
1241
|
-
function s(
|
|
1242
|
-
return
|
|
1580
|
+
function s(o, i) {
|
|
1581
|
+
return i ? o ? o + " " + i : o + i : o;
|
|
1243
1582
|
}
|
|
1244
|
-
|
|
1583
|
+
n.exports ? (t.default = t, n.exports = t) : window.classNames = t;
|
|
1245
1584
|
})();
|
|
1246
|
-
})(
|
|
1247
|
-
var
|
|
1248
|
-
const
|
|
1249
|
-
function
|
|
1250
|
-
const t =
|
|
1585
|
+
})(fr);
|
|
1586
|
+
var Mn = fr.exports;
|
|
1587
|
+
const In = /* @__PURE__ */ vn(Mn), I = Math.round;
|
|
1588
|
+
function at(n, e) {
|
|
1589
|
+
const t = n.replace(/^[^(]*\((.*)/, "$1").replace(/\).*/, "").match(/\d*\.?\d+%?/g) || [], r = t.map((s) => parseFloat(s));
|
|
1251
1590
|
for (let s = 0; s < 3; s += 1)
|
|
1252
|
-
|
|
1253
|
-
return t[3] ?
|
|
1591
|
+
r[s] = e(r[s] || 0, t[s] || "", s);
|
|
1592
|
+
return t[3] ? r[3] = t[3].includes("%") ? r[3] / 100 : r[3] : r[3] = 1, r;
|
|
1254
1593
|
}
|
|
1255
|
-
const
|
|
1256
|
-
function
|
|
1594
|
+
const Ft = (n, e, t) => t === 0 ? n : n / 100;
|
|
1595
|
+
function Ne(n, e) {
|
|
1257
1596
|
const t = e || 255;
|
|
1258
|
-
return
|
|
1597
|
+
return n > t ? t : n < 0 ? 0 : n;
|
|
1259
1598
|
}
|
|
1260
|
-
class
|
|
1599
|
+
class me {
|
|
1261
1600
|
constructor(e) {
|
|
1262
|
-
|
|
1263
|
-
function t(
|
|
1264
|
-
return
|
|
1601
|
+
U(this, "isValid", !0), U(this, "r", 0), U(this, "g", 0), U(this, "b", 0), U(this, "a", 1), U(this, "_h", void 0), U(this, "_s", void 0), U(this, "_l", void 0), U(this, "_v", void 0), U(this, "_max", void 0), U(this, "_min", void 0), U(this, "_brightness", void 0);
|
|
1602
|
+
function t(r) {
|
|
1603
|
+
return r[0] in e && r[1] in e && r[2] in e;
|
|
1265
1604
|
}
|
|
1266
1605
|
if (e)
|
|
1267
1606
|
if (typeof e == "string") {
|
|
1268
|
-
let s = function(
|
|
1269
|
-
return
|
|
1607
|
+
let s = function(o) {
|
|
1608
|
+
return r.startsWith(o);
|
|
1270
1609
|
};
|
|
1271
|
-
const
|
|
1272
|
-
/^#?[A-F\d]{3,8}$/i.test(
|
|
1273
|
-
} else if (e instanceof
|
|
1610
|
+
const r = e.trim();
|
|
1611
|
+
/^#?[A-F\d]{3,8}$/i.test(r) ? this.fromHexString(r) : s("rgb") ? this.fromRgbString(r) : s("hsl") ? this.fromHslString(r) : (s("hsv") || s("hsb")) && this.fromHsvString(r);
|
|
1612
|
+
} else if (e instanceof me)
|
|
1274
1613
|
this.r = e.r, this.g = e.g, this.b = e.b, this.a = e.a, this._h = e._h, this._s = e._s, this._l = e._l, this._v = e._v;
|
|
1275
1614
|
else if (t("rgb"))
|
|
1276
|
-
this.r =
|
|
1615
|
+
this.r = Ne(e.r), this.g = Ne(e.g), this.b = Ne(e.b), this.a = typeof e.a == "number" ? Ne(e.a, 1) : 1;
|
|
1277
1616
|
else if (t("hsl"))
|
|
1278
1617
|
this.fromHsl(e);
|
|
1279
1618
|
else if (t("hsv"))
|
|
@@ -1304,12 +1643,12 @@ class de {
|
|
|
1304
1643
|
* @see http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
|
|
1305
1644
|
*/
|
|
1306
1645
|
getLuminance() {
|
|
1307
|
-
function e(
|
|
1308
|
-
const
|
|
1309
|
-
return
|
|
1646
|
+
function e(o) {
|
|
1647
|
+
const i = o / 255;
|
|
1648
|
+
return i <= 0.03928 ? i / 12.92 : Math.pow((i + 0.055) / 1.055, 2.4);
|
|
1310
1649
|
}
|
|
1311
|
-
const t = e(this.r),
|
|
1312
|
-
return 0.2126 * t + 0.7152 *
|
|
1650
|
+
const t = e(this.r), r = e(this.g), s = e(this.b);
|
|
1651
|
+
return 0.2126 * t + 0.7152 * r + 0.0722 * s;
|
|
1313
1652
|
}
|
|
1314
1653
|
getHue() {
|
|
1315
1654
|
if (typeof this._h > "u") {
|
|
@@ -1341,21 +1680,21 @@ class de {
|
|
|
1341
1680
|
}
|
|
1342
1681
|
// ======================== Func ========================
|
|
1343
1682
|
darken(e = 10) {
|
|
1344
|
-
const t = this.getHue(),
|
|
1683
|
+
const t = this.getHue(), r = this.getSaturation();
|
|
1345
1684
|
let s = this.getLightness() - e / 100;
|
|
1346
1685
|
return s < 0 && (s = 0), this._c({
|
|
1347
1686
|
h: t,
|
|
1348
|
-
s:
|
|
1687
|
+
s: r,
|
|
1349
1688
|
l: s,
|
|
1350
1689
|
a: this.a
|
|
1351
1690
|
});
|
|
1352
1691
|
}
|
|
1353
1692
|
lighten(e = 10) {
|
|
1354
|
-
const t = this.getHue(),
|
|
1693
|
+
const t = this.getHue(), r = this.getSaturation();
|
|
1355
1694
|
let s = this.getLightness() + e / 100;
|
|
1356
1695
|
return s > 1 && (s = 1), this._c({
|
|
1357
1696
|
h: t,
|
|
1358
|
-
s:
|
|
1697
|
+
s: r,
|
|
1359
1698
|
l: s,
|
|
1360
1699
|
a: this.a
|
|
1361
1700
|
});
|
|
@@ -1365,13 +1704,13 @@ class de {
|
|
|
1365
1704
|
* 0 means no mixing (return current color).
|
|
1366
1705
|
*/
|
|
1367
1706
|
mix(e, t = 50) {
|
|
1368
|
-
const
|
|
1369
|
-
r: I(
|
|
1370
|
-
g: I(
|
|
1371
|
-
b: I(
|
|
1372
|
-
a: I(
|
|
1707
|
+
const r = this._c(e), s = t / 100, o = (l) => (r[l] - this[l]) * s + this[l], i = {
|
|
1708
|
+
r: I(o("r")),
|
|
1709
|
+
g: I(o("g")),
|
|
1710
|
+
b: I(o("b")),
|
|
1711
|
+
a: I(o("a") * 100) / 100
|
|
1373
1712
|
};
|
|
1374
|
-
return this._c(
|
|
1713
|
+
return this._c(i);
|
|
1375
1714
|
}
|
|
1376
1715
|
/**
|
|
1377
1716
|
* Mix the color with pure white, from 0 to 100.
|
|
@@ -1398,12 +1737,12 @@ class de {
|
|
|
1398
1737
|
}, e);
|
|
1399
1738
|
}
|
|
1400
1739
|
onBackground(e) {
|
|
1401
|
-
const t = this._c(e),
|
|
1740
|
+
const t = this._c(e), r = this.a + t.a * (1 - this.a), s = (o) => I((this[o] * this.a + t[o] * t.a * (1 - this.a)) / r);
|
|
1402
1741
|
return this._c({
|
|
1403
1742
|
r: s("r"),
|
|
1404
1743
|
g: s("g"),
|
|
1405
1744
|
b: s("b"),
|
|
1406
|
-
a:
|
|
1745
|
+
a: r
|
|
1407
1746
|
});
|
|
1408
1747
|
}
|
|
1409
1748
|
// ======================= Status =======================
|
|
@@ -1425,12 +1764,12 @@ class de {
|
|
|
1425
1764
|
let e = "#";
|
|
1426
1765
|
const t = (this.r || 0).toString(16);
|
|
1427
1766
|
e += t.length === 2 ? t : "0" + t;
|
|
1428
|
-
const
|
|
1429
|
-
e +=
|
|
1767
|
+
const r = (this.g || 0).toString(16);
|
|
1768
|
+
e += r.length === 2 ? r : "0" + r;
|
|
1430
1769
|
const s = (this.b || 0).toString(16);
|
|
1431
1770
|
if (e += s.length === 2 ? s : "0" + s, typeof this.a == "number" && this.a >= 0 && this.a < 1) {
|
|
1432
|
-
const
|
|
1433
|
-
e +=
|
|
1771
|
+
const o = I(this.a * 255).toString(16);
|
|
1772
|
+
e += o.length === 2 ? o : "0" + o;
|
|
1434
1773
|
}
|
|
1435
1774
|
return e;
|
|
1436
1775
|
}
|
|
@@ -1445,8 +1784,8 @@ class de {
|
|
|
1445
1784
|
}
|
|
1446
1785
|
/** CSS support color pattern */
|
|
1447
1786
|
toHslString() {
|
|
1448
|
-
const e = this.getHue(), t = I(this.getSaturation() * 100),
|
|
1449
|
-
return this.a !== 1 ? `hsla(${e},${t}%,${
|
|
1787
|
+
const e = this.getHue(), t = I(this.getSaturation() * 100), r = I(this.getLightness() * 100);
|
|
1788
|
+
return this.a !== 1 ? `hsla(${e},${t}%,${r}%,${this.a})` : `hsl(${e},${t}%,${r}%)`;
|
|
1450
1789
|
}
|
|
1451
1790
|
/** Same as toHsb */
|
|
1452
1791
|
toHsv() {
|
|
@@ -1473,9 +1812,9 @@ class de {
|
|
|
1473
1812
|
}
|
|
1474
1813
|
// ====================== Privates ======================
|
|
1475
1814
|
/** Return a new FastColor object with one channel changed */
|
|
1476
|
-
_sc(e, t,
|
|
1815
|
+
_sc(e, t, r) {
|
|
1477
1816
|
const s = this.clone();
|
|
1478
|
-
return s[e] =
|
|
1817
|
+
return s[e] = Ne(t, r), s;
|
|
1479
1818
|
}
|
|
1480
1819
|
_c(e) {
|
|
1481
1820
|
return new this.constructor(e);
|
|
@@ -1488,62 +1827,62 @@ class de {
|
|
|
1488
1827
|
}
|
|
1489
1828
|
fromHexString(e) {
|
|
1490
1829
|
const t = e.replace("#", "");
|
|
1491
|
-
function
|
|
1492
|
-
return parseInt(t[s] + t[
|
|
1830
|
+
function r(s, o) {
|
|
1831
|
+
return parseInt(t[s] + t[o || s], 16);
|
|
1493
1832
|
}
|
|
1494
|
-
t.length < 6 ? (this.r =
|
|
1833
|
+
t.length < 6 ? (this.r = r(0), this.g = r(1), this.b = r(2), this.a = t[3] ? r(3) / 255 : 1) : (this.r = r(0, 1), this.g = r(2, 3), this.b = r(4, 5), this.a = t[6] ? r(6, 7) / 255 : 1);
|
|
1495
1834
|
}
|
|
1496
1835
|
fromHsl({
|
|
1497
1836
|
h: e,
|
|
1498
1837
|
s: t,
|
|
1499
|
-
l:
|
|
1838
|
+
l: r,
|
|
1500
1839
|
a: s
|
|
1501
1840
|
}) {
|
|
1502
|
-
if (this._h = e % 360, this._s = t, this._l =
|
|
1503
|
-
const b = I(
|
|
1841
|
+
if (this._h = e % 360, this._s = t, this._l = r, this.a = typeof s == "number" ? s : 1, t <= 0) {
|
|
1842
|
+
const b = I(r * 255);
|
|
1504
1843
|
this.r = b, this.g = b, this.b = b;
|
|
1505
1844
|
}
|
|
1506
|
-
let
|
|
1507
|
-
const u = e / 60,
|
|
1508
|
-
u >= 0 && u < 1 ? (
|
|
1509
|
-
const d =
|
|
1510
|
-
this.r = I((
|
|
1845
|
+
let o = 0, i = 0, l = 0;
|
|
1846
|
+
const u = e / 60, c = (1 - Math.abs(2 * r - 1)) * t, g = c * (1 - Math.abs(u % 2 - 1));
|
|
1847
|
+
u >= 0 && u < 1 ? (o = c, i = g) : u >= 1 && u < 2 ? (o = g, i = c) : u >= 2 && u < 3 ? (i = c, l = g) : u >= 3 && u < 4 ? (i = g, l = c) : u >= 4 && u < 5 ? (o = g, l = c) : u >= 5 && u < 6 && (o = c, l = g);
|
|
1848
|
+
const d = r - c / 2;
|
|
1849
|
+
this.r = I((o + d) * 255), this.g = I((i + d) * 255), this.b = I((l + d) * 255);
|
|
1511
1850
|
}
|
|
1512
1851
|
fromHsv({
|
|
1513
1852
|
h: e,
|
|
1514
1853
|
s: t,
|
|
1515
|
-
v:
|
|
1854
|
+
v: r,
|
|
1516
1855
|
a: s
|
|
1517
1856
|
}) {
|
|
1518
|
-
this._h = e % 360, this._s = t, this._v =
|
|
1519
|
-
const
|
|
1520
|
-
if (this.r =
|
|
1857
|
+
this._h = e % 360, this._s = t, this._v = r, this.a = typeof s == "number" ? s : 1;
|
|
1858
|
+
const o = I(r * 255);
|
|
1859
|
+
if (this.r = o, this.g = o, this.b = o, t <= 0)
|
|
1521
1860
|
return;
|
|
1522
|
-
const
|
|
1523
|
-
switch (
|
|
1861
|
+
const i = e / 60, l = Math.floor(i), u = i - l, c = I(r * (1 - t) * 255), g = I(r * (1 - t * u) * 255), d = I(r * (1 - t * (1 - u)) * 255);
|
|
1862
|
+
switch (l) {
|
|
1524
1863
|
case 0:
|
|
1525
|
-
this.g = d, this.b =
|
|
1864
|
+
this.g = d, this.b = c;
|
|
1526
1865
|
break;
|
|
1527
1866
|
case 1:
|
|
1528
|
-
this.r = g, this.b =
|
|
1867
|
+
this.r = g, this.b = c;
|
|
1529
1868
|
break;
|
|
1530
1869
|
case 2:
|
|
1531
|
-
this.r =
|
|
1870
|
+
this.r = c, this.b = d;
|
|
1532
1871
|
break;
|
|
1533
1872
|
case 3:
|
|
1534
|
-
this.r =
|
|
1873
|
+
this.r = c, this.g = g;
|
|
1535
1874
|
break;
|
|
1536
1875
|
case 4:
|
|
1537
|
-
this.r = d, this.g =
|
|
1876
|
+
this.r = d, this.g = c;
|
|
1538
1877
|
break;
|
|
1539
1878
|
case 5:
|
|
1540
1879
|
default:
|
|
1541
|
-
this.g =
|
|
1880
|
+
this.g = c, this.b = g;
|
|
1542
1881
|
break;
|
|
1543
1882
|
}
|
|
1544
1883
|
}
|
|
1545
1884
|
fromHsvString(e) {
|
|
1546
|
-
const t =
|
|
1885
|
+
const t = at(e, Ft);
|
|
1547
1886
|
this.fromHsv({
|
|
1548
1887
|
h: t[0],
|
|
1549
1888
|
s: t[1],
|
|
@@ -1552,7 +1891,7 @@ class de {
|
|
|
1552
1891
|
});
|
|
1553
1892
|
}
|
|
1554
1893
|
fromHslString(e) {
|
|
1555
|
-
const t =
|
|
1894
|
+
const t = at(e, Ft);
|
|
1556
1895
|
this.fromHsl({
|
|
1557
1896
|
h: t[0],
|
|
1558
1897
|
s: t[1],
|
|
@@ -1561,14 +1900,14 @@ class de {
|
|
|
1561
1900
|
});
|
|
1562
1901
|
}
|
|
1563
1902
|
fromRgbString(e) {
|
|
1564
|
-
const t =
|
|
1903
|
+
const t = at(e, (r, s) => (
|
|
1565
1904
|
// Convert percentage to number. e.g. 50% -> 128
|
|
1566
|
-
s.includes("%") ? I(
|
|
1905
|
+
s.includes("%") ? I(r / 100 * 255) : r
|
|
1567
1906
|
));
|
|
1568
1907
|
this.r = t[0], this.g = t[1], this.b = t[2], this.a = t[3];
|
|
1569
1908
|
}
|
|
1570
1909
|
}
|
|
1571
|
-
var
|
|
1910
|
+
var Ye = 2, Ut = 0.16, Ln = 0.05, Yn = 0.05, Hn = 0.15, dr = 5, hr = 4, zn = [{
|
|
1572
1911
|
index: 7,
|
|
1573
1912
|
amount: 15
|
|
1574
1913
|
}, {
|
|
@@ -1599,242 +1938,242 @@ var ke = 2, Nt = 0.16, mn = 0.05, bn = 0.05, yn = 0.15, Gt = 5, Jt = 4, xn = [{
|
|
|
1599
1938
|
index: 1,
|
|
1600
1939
|
amount: 98
|
|
1601
1940
|
}];
|
|
1602
|
-
function
|
|
1603
|
-
var
|
|
1604
|
-
return Math.round(
|
|
1605
|
-
}
|
|
1606
|
-
function
|
|
1607
|
-
if (
|
|
1608
|
-
return
|
|
1609
|
-
var
|
|
1610
|
-
return t ?
|
|
1611
|
-
}
|
|
1612
|
-
function
|
|
1613
|
-
var
|
|
1614
|
-
return t ?
|
|
1615
|
-
}
|
|
1616
|
-
function
|
|
1617
|
-
for (var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = [],
|
|
1618
|
-
var
|
|
1619
|
-
h:
|
|
1620
|
-
s:
|
|
1621
|
-
v:
|
|
1941
|
+
function Wt(n, e, t) {
|
|
1942
|
+
var r;
|
|
1943
|
+
return Math.round(n.h) >= 60 && Math.round(n.h) <= 240 ? r = t ? Math.round(n.h) - Ye * e : Math.round(n.h) + Ye * e : r = t ? Math.round(n.h) + Ye * e : Math.round(n.h) - Ye * e, r < 0 ? r += 360 : r >= 360 && (r -= 360), r;
|
|
1944
|
+
}
|
|
1945
|
+
function Bt(n, e, t) {
|
|
1946
|
+
if (n.h === 0 && n.s === 0)
|
|
1947
|
+
return n.s;
|
|
1948
|
+
var r;
|
|
1949
|
+
return t ? r = n.s - Ut * e : e === hr ? r = n.s + Ut : r = n.s + Ln * e, r > 1 && (r = 1), t && e === dr && r > 0.1 && (r = 0.1), r < 0.06 && (r = 0.06), Math.round(r * 100) / 100;
|
|
1950
|
+
}
|
|
1951
|
+
function qt(n, e, t) {
|
|
1952
|
+
var r;
|
|
1953
|
+
return t ? r = n.v + Yn * e : r = n.v - Hn * e, r = Math.max(0, Math.min(1, r)), Math.round(r * 100) / 100;
|
|
1954
|
+
}
|
|
1955
|
+
function Vn(n) {
|
|
1956
|
+
for (var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = [], r = new me(n), s = r.toHsv(), o = dr; o > 0; o -= 1) {
|
|
1957
|
+
var i = new me({
|
|
1958
|
+
h: Wt(s, o, !0),
|
|
1959
|
+
s: Bt(s, o, !0),
|
|
1960
|
+
v: qt(s, o, !0)
|
|
1622
1961
|
});
|
|
1623
|
-
t.push(
|
|
1624
|
-
}
|
|
1625
|
-
t.push(
|
|
1626
|
-
for (var
|
|
1627
|
-
var u = new
|
|
1628
|
-
h:
|
|
1629
|
-
s:
|
|
1630
|
-
v:
|
|
1962
|
+
t.push(i);
|
|
1963
|
+
}
|
|
1964
|
+
t.push(r);
|
|
1965
|
+
for (var l = 1; l <= hr; l += 1) {
|
|
1966
|
+
var u = new me({
|
|
1967
|
+
h: Wt(s, l),
|
|
1968
|
+
s: Bt(s, l),
|
|
1969
|
+
v: qt(s, l)
|
|
1631
1970
|
});
|
|
1632
1971
|
t.push(u);
|
|
1633
1972
|
}
|
|
1634
|
-
return e.theme === "dark" ?
|
|
1635
|
-
var g =
|
|
1636
|
-
return new
|
|
1637
|
-
}) : t.map(function(
|
|
1638
|
-
return
|
|
1973
|
+
return e.theme === "dark" ? zn.map(function(c) {
|
|
1974
|
+
var g = c.index, d = c.amount;
|
|
1975
|
+
return new me(e.backgroundColor || "#141414").mix(t[g], d).toHexString();
|
|
1976
|
+
}) : t.map(function(c) {
|
|
1977
|
+
return c.toHexString();
|
|
1639
1978
|
});
|
|
1640
1979
|
}
|
|
1641
|
-
var
|
|
1642
|
-
|
|
1643
|
-
function
|
|
1644
|
-
var t = Object.keys(
|
|
1980
|
+
var dt = ["#e6f4ff", "#bae0ff", "#91caff", "#69b1ff", "#4096ff", "#1677ff", "#0958d9", "#003eb3", "#002c8c", "#001d66"];
|
|
1981
|
+
dt.primary = dt[5];
|
|
1982
|
+
function Zt(n, e) {
|
|
1983
|
+
var t = Object.keys(n);
|
|
1645
1984
|
if (Object.getOwnPropertySymbols) {
|
|
1646
|
-
var
|
|
1647
|
-
e && (
|
|
1648
|
-
return Object.getOwnPropertyDescriptor(
|
|
1649
|
-
})), t.push.apply(t,
|
|
1985
|
+
var r = Object.getOwnPropertySymbols(n);
|
|
1986
|
+
e && (r = r.filter(function(s) {
|
|
1987
|
+
return Object.getOwnPropertyDescriptor(n, s).enumerable;
|
|
1988
|
+
})), t.push.apply(t, r);
|
|
1650
1989
|
}
|
|
1651
1990
|
return t;
|
|
1652
1991
|
}
|
|
1653
|
-
function
|
|
1992
|
+
function re(n) {
|
|
1654
1993
|
for (var e = 1; e < arguments.length; e++) {
|
|
1655
1994
|
var t = arguments[e] != null ? arguments[e] : {};
|
|
1656
|
-
e % 2 ?
|
|
1657
|
-
|
|
1658
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
1659
|
-
Object.defineProperty(
|
|
1995
|
+
e % 2 ? Zt(Object(t), !0).forEach(function(r) {
|
|
1996
|
+
U(n, r, t[r]);
|
|
1997
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : Zt(Object(t)).forEach(function(r) {
|
|
1998
|
+
Object.defineProperty(n, r, Object.getOwnPropertyDescriptor(t, r));
|
|
1660
1999
|
});
|
|
1661
2000
|
}
|
|
1662
|
-
return
|
|
2001
|
+
return n;
|
|
1663
2002
|
}
|
|
1664
|
-
function
|
|
2003
|
+
function Fn() {
|
|
1665
2004
|
return !!(typeof window < "u" && window.document && window.document.createElement);
|
|
1666
2005
|
}
|
|
1667
|
-
function
|
|
1668
|
-
if (!
|
|
2006
|
+
function Un(n, e) {
|
|
2007
|
+
if (!n)
|
|
1669
2008
|
return !1;
|
|
1670
|
-
if (
|
|
1671
|
-
return
|
|
2009
|
+
if (n.contains)
|
|
2010
|
+
return n.contains(e);
|
|
1672
2011
|
for (var t = e; t; ) {
|
|
1673
|
-
if (t ===
|
|
2012
|
+
if (t === n)
|
|
1674
2013
|
return !0;
|
|
1675
2014
|
t = t.parentNode;
|
|
1676
2015
|
}
|
|
1677
2016
|
return !1;
|
|
1678
2017
|
}
|
|
1679
|
-
var
|
|
1680
|
-
function
|
|
1681
|
-
var
|
|
1682
|
-
return e ? e.startsWith("data-") ? e : "data-".concat(e) :
|
|
2018
|
+
var Gt = "data-rc-order", Kt = "data-rc-priority", Wn = "rc-util-key", ht = /* @__PURE__ */ new Map();
|
|
2019
|
+
function gr() {
|
|
2020
|
+
var n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e = n.mark;
|
|
2021
|
+
return e ? e.startsWith("data-") ? e : "data-".concat(e) : Wn;
|
|
1683
2022
|
}
|
|
1684
|
-
function
|
|
1685
|
-
if (
|
|
1686
|
-
return
|
|
2023
|
+
function mt(n) {
|
|
2024
|
+
if (n.attachTo)
|
|
2025
|
+
return n.attachTo;
|
|
1687
2026
|
var e = document.querySelector("head");
|
|
1688
2027
|
return e || document.body;
|
|
1689
2028
|
}
|
|
1690
|
-
function
|
|
1691
|
-
return
|
|
2029
|
+
function Bn(n) {
|
|
2030
|
+
return n === "queue" ? "prependQueue" : n ? "prepend" : "append";
|
|
1692
2031
|
}
|
|
1693
|
-
function
|
|
1694
|
-
return Array.from((
|
|
2032
|
+
function vt(n) {
|
|
2033
|
+
return Array.from((ht.get(n) || n).children).filter(function(e) {
|
|
1695
2034
|
return e.tagName === "STYLE";
|
|
1696
2035
|
});
|
|
1697
2036
|
}
|
|
1698
|
-
function
|
|
2037
|
+
function pr(n) {
|
|
1699
2038
|
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1700
|
-
if (!
|
|
2039
|
+
if (!Fn())
|
|
1701
2040
|
return null;
|
|
1702
|
-
var t = e.csp,
|
|
1703
|
-
u.setAttribute(
|
|
1704
|
-
var
|
|
1705
|
-
if (
|
|
1706
|
-
if (
|
|
1707
|
-
var d = (e.styles ||
|
|
1708
|
-
if (!["prepend", "prependQueue"].includes(b.getAttribute(
|
|
2041
|
+
var t = e.csp, r = e.prepend, s = e.priority, o = s === void 0 ? 0 : s, i = Bn(r), l = i === "prependQueue", u = document.createElement("style");
|
|
2042
|
+
u.setAttribute(Gt, i), l && o && u.setAttribute(Kt, "".concat(o)), t != null && t.nonce && (u.nonce = t == null ? void 0 : t.nonce), u.innerHTML = n;
|
|
2043
|
+
var c = mt(e), g = c.firstChild;
|
|
2044
|
+
if (r) {
|
|
2045
|
+
if (l) {
|
|
2046
|
+
var d = (e.styles || vt(c)).filter(function(b) {
|
|
2047
|
+
if (!["prepend", "prependQueue"].includes(b.getAttribute(Gt)))
|
|
1709
2048
|
return !1;
|
|
1710
|
-
var
|
|
1711
|
-
return
|
|
2049
|
+
var O = Number(b.getAttribute(Kt) || 0);
|
|
2050
|
+
return o >= O;
|
|
1712
2051
|
});
|
|
1713
2052
|
if (d.length)
|
|
1714
|
-
return
|
|
2053
|
+
return c.insertBefore(u, d[d.length - 1].nextSibling), u;
|
|
1715
2054
|
}
|
|
1716
|
-
|
|
2055
|
+
c.insertBefore(u, g);
|
|
1717
2056
|
} else
|
|
1718
|
-
|
|
2057
|
+
c.appendChild(u);
|
|
1719
2058
|
return u;
|
|
1720
2059
|
}
|
|
1721
|
-
function
|
|
1722
|
-
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t =
|
|
1723
|
-
return (e.styles ||
|
|
1724
|
-
return
|
|
2060
|
+
function qn(n) {
|
|
2061
|
+
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = mt(e);
|
|
2062
|
+
return (e.styles || vt(t)).find(function(r) {
|
|
2063
|
+
return r.getAttribute(gr(e)) === n;
|
|
1725
2064
|
});
|
|
1726
2065
|
}
|
|
1727
|
-
function
|
|
1728
|
-
var t =
|
|
1729
|
-
if (!t || !
|
|
1730
|
-
var
|
|
1731
|
-
|
|
2066
|
+
function Zn(n, e) {
|
|
2067
|
+
var t = ht.get(n);
|
|
2068
|
+
if (!t || !Un(document, t)) {
|
|
2069
|
+
var r = pr("", e), s = r.parentNode;
|
|
2070
|
+
ht.set(n, s), n.removeChild(r);
|
|
1732
2071
|
}
|
|
1733
2072
|
}
|
|
1734
|
-
function
|
|
1735
|
-
var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {},
|
|
2073
|
+
function Gn(n, e) {
|
|
2074
|
+
var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = mt(t), s = vt(r), o = re(re({}, t), {}, {
|
|
1736
2075
|
styles: s
|
|
1737
2076
|
});
|
|
1738
|
-
|
|
1739
|
-
var
|
|
1740
|
-
if (
|
|
1741
|
-
var
|
|
1742
|
-
if ((
|
|
1743
|
-
var
|
|
1744
|
-
|
|
2077
|
+
Zn(r, o);
|
|
2078
|
+
var i = qn(e, o);
|
|
2079
|
+
if (i) {
|
|
2080
|
+
var l, u;
|
|
2081
|
+
if ((l = o.csp) !== null && l !== void 0 && l.nonce && i.nonce !== ((u = o.csp) === null || u === void 0 ? void 0 : u.nonce)) {
|
|
2082
|
+
var c;
|
|
2083
|
+
i.nonce = (c = o.csp) === null || c === void 0 ? void 0 : c.nonce;
|
|
1745
2084
|
}
|
|
1746
|
-
return
|
|
2085
|
+
return i.innerHTML !== n && (i.innerHTML = n), i;
|
|
1747
2086
|
}
|
|
1748
|
-
var g =
|
|
1749
|
-
return g.setAttribute(
|
|
2087
|
+
var g = pr(n, o);
|
|
2088
|
+
return g.setAttribute(gr(o), e), g;
|
|
1750
2089
|
}
|
|
1751
|
-
function
|
|
2090
|
+
function mr(n) {
|
|
1752
2091
|
var e;
|
|
1753
|
-
return
|
|
2092
|
+
return n == null || (e = n.getRootNode) === null || e === void 0 ? void 0 : e.call(n);
|
|
1754
2093
|
}
|
|
1755
|
-
function
|
|
1756
|
-
return
|
|
2094
|
+
function Kn(n) {
|
|
2095
|
+
return mr(n) instanceof ShadowRoot;
|
|
1757
2096
|
}
|
|
1758
|
-
function
|
|
1759
|
-
return
|
|
2097
|
+
function Jn(n) {
|
|
2098
|
+
return Kn(n) ? mr(n) : null;
|
|
1760
2099
|
}
|
|
1761
|
-
var
|
|
1762
|
-
|
|
2100
|
+
var gt = {}, bt = [], Xn = function(e) {
|
|
2101
|
+
bt.push(e);
|
|
1763
2102
|
};
|
|
1764
|
-
function
|
|
1765
|
-
if (process.env.NODE_ENV !== "production" && !
|
|
1766
|
-
var t =
|
|
1767
|
-
return s(
|
|
2103
|
+
function Qn(n, e) {
|
|
2104
|
+
if (process.env.NODE_ENV !== "production" && !n && console !== void 0) {
|
|
2105
|
+
var t = bt.reduce(function(r, s) {
|
|
2106
|
+
return s(r ?? "", "warning");
|
|
1768
2107
|
}, e);
|
|
1769
2108
|
t && console.error("Warning: ".concat(t));
|
|
1770
2109
|
}
|
|
1771
2110
|
}
|
|
1772
|
-
function
|
|
1773
|
-
if (process.env.NODE_ENV !== "production" && !
|
|
1774
|
-
var t =
|
|
1775
|
-
return s(
|
|
2111
|
+
function ea(n, e) {
|
|
2112
|
+
if (process.env.NODE_ENV !== "production" && !n && console !== void 0) {
|
|
2113
|
+
var t = bt.reduce(function(r, s) {
|
|
2114
|
+
return s(r ?? "", "note");
|
|
1776
2115
|
}, e);
|
|
1777
2116
|
t && console.warn("Note: ".concat(t));
|
|
1778
2117
|
}
|
|
1779
2118
|
}
|
|
1780
|
-
function
|
|
1781
|
-
|
|
2119
|
+
function ta() {
|
|
2120
|
+
gt = {};
|
|
1782
2121
|
}
|
|
1783
|
-
function
|
|
1784
|
-
!e && !
|
|
2122
|
+
function vr(n, e, t) {
|
|
2123
|
+
!e && !gt[t] && (n(!1, t), gt[t] = !0);
|
|
1785
2124
|
}
|
|
1786
|
-
function
|
|
1787
|
-
|
|
2125
|
+
function We(n, e) {
|
|
2126
|
+
vr(Qn, n, e);
|
|
1788
2127
|
}
|
|
1789
|
-
function
|
|
1790
|
-
|
|
2128
|
+
function ra(n, e) {
|
|
2129
|
+
vr(ea, n, e);
|
|
1791
2130
|
}
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
function
|
|
1796
|
-
return
|
|
2131
|
+
We.preMessage = Xn;
|
|
2132
|
+
We.resetWarned = ta;
|
|
2133
|
+
We.noteOnce = ra;
|
|
2134
|
+
function na(n) {
|
|
2135
|
+
return n.replace(/-(.)/g, function(e, t) {
|
|
1797
2136
|
return t.toUpperCase();
|
|
1798
2137
|
});
|
|
1799
2138
|
}
|
|
1800
|
-
function
|
|
1801
|
-
|
|
2139
|
+
function aa(n, e) {
|
|
2140
|
+
We(n, "[@ant-design/icons] ".concat(e));
|
|
1802
2141
|
}
|
|
1803
|
-
function
|
|
1804
|
-
return
|
|
2142
|
+
function Jt(n) {
|
|
2143
|
+
return de(n) === "object" && typeof n.name == "string" && typeof n.theme == "string" && (de(n.icon) === "object" || typeof n.icon == "function");
|
|
1805
2144
|
}
|
|
1806
|
-
function
|
|
1807
|
-
var
|
|
1808
|
-
return Object.keys(
|
|
1809
|
-
var
|
|
2145
|
+
function Xt() {
|
|
2146
|
+
var n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
2147
|
+
return Object.keys(n).reduce(function(e, t) {
|
|
2148
|
+
var r = n[t];
|
|
1810
2149
|
switch (t) {
|
|
1811
2150
|
case "class":
|
|
1812
|
-
e.className =
|
|
2151
|
+
e.className = r, delete e.class;
|
|
1813
2152
|
break;
|
|
1814
2153
|
default:
|
|
1815
|
-
delete e[t], e[
|
|
2154
|
+
delete e[t], e[na(t)] = r;
|
|
1816
2155
|
}
|
|
1817
2156
|
return e;
|
|
1818
2157
|
}, {});
|
|
1819
2158
|
}
|
|
1820
|
-
function
|
|
1821
|
-
return t ? /* @__PURE__ */
|
|
2159
|
+
function pt(n, e, t) {
|
|
2160
|
+
return t ? /* @__PURE__ */ Ve.createElement(n.tag, re(re({
|
|
1822
2161
|
key: e
|
|
1823
|
-
},
|
|
1824
|
-
return
|
|
1825
|
-
})) : /* @__PURE__ */
|
|
2162
|
+
}, Xt(n.attrs)), t), (n.children || []).map(function(r, s) {
|
|
2163
|
+
return pt(r, "".concat(e, "-").concat(n.tag, "-").concat(s));
|
|
2164
|
+
})) : /* @__PURE__ */ Ve.createElement(n.tag, re({
|
|
1826
2165
|
key: e
|
|
1827
|
-
},
|
|
1828
|
-
return
|
|
2166
|
+
}, Xt(n.attrs)), (n.children || []).map(function(r, s) {
|
|
2167
|
+
return pt(r, "".concat(e, "-").concat(n.tag, "-").concat(s));
|
|
1829
2168
|
}));
|
|
1830
2169
|
}
|
|
1831
|
-
function
|
|
1832
|
-
return
|
|
2170
|
+
function br(n) {
|
|
2171
|
+
return Vn(n)[0];
|
|
1833
2172
|
}
|
|
1834
|
-
function
|
|
1835
|
-
return
|
|
2173
|
+
function yr(n) {
|
|
2174
|
+
return n ? Array.isArray(n) ? n : [n] : [];
|
|
1836
2175
|
}
|
|
1837
|
-
var
|
|
2176
|
+
var sa = `
|
|
1838
2177
|
.anticon {
|
|
1839
2178
|
display: inline-flex;
|
|
1840
2179
|
align-items: center;
|
|
@@ -1889,128 +2228,128 @@ var Hn = `
|
|
|
1889
2228
|
transform: rotate(360deg);
|
|
1890
2229
|
}
|
|
1891
2230
|
}
|
|
1892
|
-
`,
|
|
1893
|
-
var t =
|
|
1894
|
-
s && (
|
|
1895
|
-
`).concat(
|
|
1896
|
-
}`)),
|
|
1897
|
-
var
|
|
1898
|
-
|
|
1899
|
-
prepend: !
|
|
1900
|
-
csp:
|
|
2231
|
+
`, oa = function(e) {
|
|
2232
|
+
var t = rr(cr), r = t.csp, s = t.prefixCls, o = t.layer, i = sa;
|
|
2233
|
+
s && (i = i.replace(/anticon/g, s)), o && (i = "@layer ".concat(o, ` {
|
|
2234
|
+
`).concat(i, `
|
|
2235
|
+
}`)), ie(function() {
|
|
2236
|
+
var l = e.current, u = Jn(l);
|
|
2237
|
+
Gn(i, "@ant-design-icons", {
|
|
2238
|
+
prepend: !o,
|
|
2239
|
+
csp: r,
|
|
1901
2240
|
attachTo: u
|
|
1902
2241
|
});
|
|
1903
2242
|
}, []);
|
|
1904
|
-
},
|
|
2243
|
+
}, ia = ["icon", "className", "onClick", "style", "primaryColor", "secondaryColor"], Te = {
|
|
1905
2244
|
primaryColor: "#333",
|
|
1906
2245
|
secondaryColor: "#E6E6E6",
|
|
1907
2246
|
calculated: !1
|
|
1908
2247
|
};
|
|
1909
|
-
function
|
|
1910
|
-
var e =
|
|
1911
|
-
|
|
1912
|
-
}
|
|
1913
|
-
function
|
|
1914
|
-
return
|
|
1915
|
-
}
|
|
1916
|
-
var
|
|
1917
|
-
var t = e.icon,
|
|
1918
|
-
if (
|
|
1919
|
-
primaryColor:
|
|
1920
|
-
secondaryColor:
|
|
1921
|
-
}),
|
|
2248
|
+
function ca(n) {
|
|
2249
|
+
var e = n.primaryColor, t = n.secondaryColor;
|
|
2250
|
+
Te.primaryColor = e, Te.secondaryColor = t || br(e), Te.calculated = !!t;
|
|
2251
|
+
}
|
|
2252
|
+
function la() {
|
|
2253
|
+
return re({}, Te);
|
|
2254
|
+
}
|
|
2255
|
+
var Be = function(e) {
|
|
2256
|
+
var t = e.icon, r = e.className, s = e.onClick, o = e.style, i = e.primaryColor, l = e.secondaryColor, u = ur(e, ia), c = W.useRef(), g = Te;
|
|
2257
|
+
if (i && (g = {
|
|
2258
|
+
primaryColor: i,
|
|
2259
|
+
secondaryColor: l || br(i)
|
|
2260
|
+
}), oa(c), aa(Jt(t), "icon should be icon definiton, but got ".concat(t)), !Jt(t))
|
|
1922
2261
|
return null;
|
|
1923
2262
|
var d = t;
|
|
1924
|
-
return d && typeof d.icon == "function" && (d =
|
|
2263
|
+
return d && typeof d.icon == "function" && (d = re(re({}, d), {}, {
|
|
1925
2264
|
icon: d.icon(g.primaryColor, g.secondaryColor)
|
|
1926
|
-
})),
|
|
1927
|
-
className:
|
|
2265
|
+
})), pt(d.icon, "svg-".concat(d.name), re(re({
|
|
2266
|
+
className: r,
|
|
1928
2267
|
onClick: s,
|
|
1929
|
-
style:
|
|
2268
|
+
style: o,
|
|
1930
2269
|
"data-icon": d.name,
|
|
1931
2270
|
width: "1em",
|
|
1932
2271
|
height: "1em",
|
|
1933
2272
|
fill: "currentColor",
|
|
1934
2273
|
"aria-hidden": "true"
|
|
1935
2274
|
}, u), {}, {
|
|
1936
|
-
ref:
|
|
2275
|
+
ref: c
|
|
1937
2276
|
}));
|
|
1938
2277
|
};
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
const
|
|
1943
|
-
function
|
|
1944
|
-
var e =
|
|
1945
|
-
return
|
|
1946
|
-
primaryColor:
|
|
2278
|
+
Be.displayName = "IconReact";
|
|
2279
|
+
Be.getTwoToneColors = la;
|
|
2280
|
+
Be.setTwoToneColors = ca;
|
|
2281
|
+
const yt = Be;
|
|
2282
|
+
function wr(n) {
|
|
2283
|
+
var e = yr(n), t = lr(e, 2), r = t[0], s = t[1];
|
|
2284
|
+
return yt.setTwoToneColors({
|
|
2285
|
+
primaryColor: r,
|
|
1947
2286
|
secondaryColor: s
|
|
1948
2287
|
});
|
|
1949
2288
|
}
|
|
1950
|
-
function
|
|
1951
|
-
var
|
|
1952
|
-
return
|
|
1953
|
-
}
|
|
1954
|
-
var
|
|
1955
|
-
|
|
1956
|
-
var
|
|
1957
|
-
var t =
|
|
1958
|
-
|
|
1959
|
-
var
|
|
1960
|
-
msTransform: "rotate(".concat(
|
|
1961
|
-
transform: "rotate(".concat(
|
|
1962
|
-
} : void 0,
|
|
1963
|
-
return /* @__PURE__ */
|
|
2289
|
+
function ua() {
|
|
2290
|
+
var n = yt.getTwoToneColors();
|
|
2291
|
+
return n.calculated ? [n.primaryColor, n.secondaryColor] : n.primaryColor;
|
|
2292
|
+
}
|
|
2293
|
+
var fa = ["className", "icon", "spin", "rotate", "tabIndex", "onClick", "twoToneColor"];
|
|
2294
|
+
wr(dt.primary);
|
|
2295
|
+
var qe = /* @__PURE__ */ W.forwardRef(function(n, e) {
|
|
2296
|
+
var t = n.className, r = n.icon, s = n.spin, o = n.rotate, i = n.tabIndex, l = n.onClick, u = n.twoToneColor, c = ur(n, fa), g = W.useContext(cr), d = g.prefixCls, b = d === void 0 ? "anticon" : d, O = g.rootClassName, P = In(O, b, U(U({}, "".concat(b, "-").concat(r.name), !!r.name), "".concat(b, "-spin"), !!s || r.name === "loading"), t), T = i;
|
|
2297
|
+
T === void 0 && l && (T = -1);
|
|
2298
|
+
var H = o ? {
|
|
2299
|
+
msTransform: "rotate(".concat(o, "deg)"),
|
|
2300
|
+
transform: "rotate(".concat(o, "deg)")
|
|
2301
|
+
} : void 0, j = yr(u), y = lr(j, 2), E = y[0], M = y[1];
|
|
2302
|
+
return /* @__PURE__ */ W.createElement("span", ye({
|
|
1964
2303
|
role: "img",
|
|
1965
|
-
"aria-label":
|
|
1966
|
-
},
|
|
2304
|
+
"aria-label": r.name
|
|
2305
|
+
}, c, {
|
|
1967
2306
|
ref: e,
|
|
1968
|
-
tabIndex:
|
|
1969
|
-
onClick:
|
|
1970
|
-
className:
|
|
1971
|
-
}), /* @__PURE__ */
|
|
1972
|
-
icon:
|
|
2307
|
+
tabIndex: T,
|
|
2308
|
+
onClick: l,
|
|
2309
|
+
className: P
|
|
2310
|
+
}), /* @__PURE__ */ W.createElement(yt, {
|
|
2311
|
+
icon: r,
|
|
1973
2312
|
primaryColor: E,
|
|
1974
2313
|
secondaryColor: M,
|
|
1975
|
-
style:
|
|
2314
|
+
style: H
|
|
1976
2315
|
}));
|
|
1977
2316
|
});
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
const
|
|
1982
|
-
var
|
|
1983
|
-
const
|
|
1984
|
-
var
|
|
1985
|
-
return /* @__PURE__ */
|
|
2317
|
+
qe.displayName = "AntdIcon";
|
|
2318
|
+
qe.getTwoToneColor = ua;
|
|
2319
|
+
qe.setTwoToneColor = wr;
|
|
2320
|
+
const wt = qe;
|
|
2321
|
+
var da = { icon: { tag: "svg", attrs: { viewBox: "0 0 1024 1024", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z" } }] }, name: "caret-down", theme: "outlined" };
|
|
2322
|
+
const ha = da;
|
|
2323
|
+
var ga = function(e, t) {
|
|
2324
|
+
return /* @__PURE__ */ W.createElement(wt, ye({}, e, {
|
|
1986
2325
|
ref: t,
|
|
1987
|
-
icon:
|
|
2326
|
+
icon: ha
|
|
1988
2327
|
}));
|
|
1989
|
-
},
|
|
1990
|
-
process.env.NODE_ENV !== "production" && (
|
|
1991
|
-
const
|
|
1992
|
-
var
|
|
1993
|
-
const
|
|
1994
|
-
var
|
|
1995
|
-
return /* @__PURE__ */
|
|
2328
|
+
}, xr = /* @__PURE__ */ W.forwardRef(ga);
|
|
2329
|
+
process.env.NODE_ENV !== "production" && (xr.displayName = "CaretDownOutlined");
|
|
2330
|
+
const pa = xr;
|
|
2331
|
+
var ma = { icon: { tag: "svg", attrs: { viewBox: "0 0 1024 1024", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z" } }] }, name: "caret-up", theme: "outlined" };
|
|
2332
|
+
const va = ma;
|
|
2333
|
+
var ba = function(e, t) {
|
|
2334
|
+
return /* @__PURE__ */ W.createElement(wt, ye({}, e, {
|
|
1996
2335
|
ref: t,
|
|
1997
|
-
icon:
|
|
2336
|
+
icon: va
|
|
1998
2337
|
}));
|
|
1999
|
-
},
|
|
2000
|
-
process.env.NODE_ENV !== "production" && (
|
|
2001
|
-
const
|
|
2002
|
-
var
|
|
2003
|
-
const
|
|
2004
|
-
var
|
|
2005
|
-
return /* @__PURE__ */
|
|
2338
|
+
}, Cr = /* @__PURE__ */ W.forwardRef(ba);
|
|
2339
|
+
process.env.NODE_ENV !== "production" && (Cr.displayName = "CaretUpOutlined");
|
|
2340
|
+
const ya = Cr;
|
|
2341
|
+
var wa = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z" } }] }, name: "upload", theme: "outlined" };
|
|
2342
|
+
const xa = wa;
|
|
2343
|
+
var Ca = function(e, t) {
|
|
2344
|
+
return /* @__PURE__ */ W.createElement(wt, ye({}, e, {
|
|
2006
2345
|
ref: t,
|
|
2007
|
-
icon:
|
|
2346
|
+
icon: xa
|
|
2008
2347
|
}));
|
|
2009
|
-
},
|
|
2010
|
-
process.env.NODE_ENV !== "production" && (
|
|
2011
|
-
const
|
|
2012
|
-
var
|
|
2013
|
-
const { RangePicker:
|
|
2348
|
+
}, Sr = /* @__PURE__ */ W.forwardRef(Ca);
|
|
2349
|
+
process.env.NODE_ENV !== "production" && (Sr.displayName = "UploadOutlined");
|
|
2350
|
+
const Sa = Sr;
|
|
2351
|
+
var G = /* @__PURE__ */ ((n) => (n.Input = "input", n.InputNumber = "inputNumber", n.Text = "text", n.Password = "password", n.Radio = "radio", n.Select = "select", n.Checkbox = "checkbox", n.DatePicker = "datePicker", n.RangePicker = "rangePicker", n.Upload = "upload", n.Mentions = "mentions", n.Cascader = "cascader", n.TreeSelect = "treeSelect", n))(G || {});
|
|
2352
|
+
const { RangePicker: Ra } = sr, R = class R {
|
|
2014
2353
|
static getDefaultArrayPlaceholder(e) {
|
|
2015
2354
|
let t;
|
|
2016
2355
|
switch (e.type) {
|
|
@@ -2023,21 +2362,21 @@ const { RangePicker: na } = Ft, R = class R {
|
|
|
2023
2362
|
static getDefaultPlaceholder(e) {
|
|
2024
2363
|
let t;
|
|
2025
2364
|
switch (e.type) {
|
|
2026
|
-
case
|
|
2027
|
-
case
|
|
2028
|
-
case
|
|
2029
|
-
case
|
|
2030
|
-
case
|
|
2365
|
+
case G.Input:
|
|
2366
|
+
case G.Password:
|
|
2367
|
+
case G.InputNumber:
|
|
2368
|
+
case G.Text:
|
|
2369
|
+
case G.Mentions:
|
|
2031
2370
|
t = `请输入${e.label}`;
|
|
2032
2371
|
break;
|
|
2033
|
-
case
|
|
2034
|
-
case
|
|
2035
|
-
case
|
|
2036
|
-
case
|
|
2037
|
-
case
|
|
2038
|
-
case
|
|
2039
|
-
case
|
|
2040
|
-
case
|
|
2372
|
+
case G.Select:
|
|
2373
|
+
case G.Checkbox:
|
|
2374
|
+
case G.Radio:
|
|
2375
|
+
case G.DatePicker:
|
|
2376
|
+
case G.RangePicker:
|
|
2377
|
+
case G.Cascader:
|
|
2378
|
+
case G.Upload:
|
|
2379
|
+
case G.TreeSelect:
|
|
2041
2380
|
t = `请选择${e.label}`;
|
|
2042
2381
|
break;
|
|
2043
2382
|
}
|
|
@@ -2047,195 +2386,275 @@ const { RangePicker: na } = Ft, R = class R {
|
|
|
2047
2386
|
// return <Slider {...item.props} />;
|
|
2048
2387
|
// };
|
|
2049
2388
|
};
|
|
2050
|
-
|
|
2051
|
-
|
|
2389
|
+
m(R, "labelCol", { span: 7 }), m(R, "wrapperCol", { span: 17 }), m(R, "defaultRowGutter", 24), m(R, "input", (e) => /* @__PURE__ */ p.jsx(
|
|
2390
|
+
nt,
|
|
2052
2391
|
{
|
|
2053
2392
|
disabled: e.disabled,
|
|
2054
2393
|
maxLength: e.maxLength,
|
|
2055
2394
|
...e.props,
|
|
2056
2395
|
placeholder: e.placeholder || R.getDefaultPlaceholder(e)
|
|
2057
2396
|
}
|
|
2058
|
-
)),
|
|
2059
|
-
|
|
2397
|
+
)), m(R, "password", (e) => /* @__PURE__ */ p.jsx(
|
|
2398
|
+
nt.Password,
|
|
2060
2399
|
{
|
|
2061
2400
|
disabled: e.disabled,
|
|
2062
2401
|
...e.props,
|
|
2063
2402
|
placeholder: e.placeholder || R.getDefaultPlaceholder(e)
|
|
2064
2403
|
}
|
|
2065
|
-
)),
|
|
2066
|
-
|
|
2404
|
+
)), m(R, "text", (e) => /* @__PURE__ */ p.jsx(
|
|
2405
|
+
nt.TextArea,
|
|
2067
2406
|
{
|
|
2068
2407
|
disabled: e.disabled,
|
|
2069
2408
|
maxLength: e.maxLength,
|
|
2070
2409
|
...e.props,
|
|
2071
2410
|
placeholder: e.placeholder || R.getDefaultPlaceholder(e)
|
|
2072
2411
|
}
|
|
2073
|
-
)),
|
|
2074
|
-
|
|
2412
|
+
)), m(R, "inputNumber", (e) => /* @__PURE__ */ p.jsx(
|
|
2413
|
+
rn,
|
|
2075
2414
|
{
|
|
2076
2415
|
disabled: e.disabled,
|
|
2077
2416
|
maxLength: e.maxLength,
|
|
2078
2417
|
...e.props,
|
|
2079
2418
|
placeholder: e.placeholder || R.getDefaultPlaceholder(e)
|
|
2080
2419
|
}
|
|
2081
|
-
)),
|
|
2082
|
-
|
|
2420
|
+
)), m(R, "datePicker", (e) => /* @__PURE__ */ p.jsx(
|
|
2421
|
+
sr,
|
|
2083
2422
|
{
|
|
2084
2423
|
disabled: e.disabled,
|
|
2085
2424
|
...e.props,
|
|
2086
2425
|
placeholder: e.placeholder || R.getDefaultPlaceholder(e)
|
|
2087
2426
|
}
|
|
2088
|
-
)),
|
|
2089
|
-
|
|
2427
|
+
)), m(R, "rangePicker", (e) => /* @__PURE__ */ p.jsx(
|
|
2428
|
+
Ra,
|
|
2090
2429
|
{
|
|
2091
2430
|
disabled: e.disabled,
|
|
2092
2431
|
...e.props,
|
|
2093
2432
|
placeholder: e.placeholder || R.getDefaultArrayPlaceholder(e)
|
|
2094
2433
|
}
|
|
2095
|
-
)),
|
|
2096
|
-
|
|
2434
|
+
)), m(R, "select", (e) => /* @__PURE__ */ p.jsx(
|
|
2435
|
+
nn,
|
|
2097
2436
|
{
|
|
2098
2437
|
...e.props,
|
|
2099
2438
|
disabled: e.disabled,
|
|
2100
2439
|
placeholder: e.placeholder || R.getDefaultPlaceholder(e)
|
|
2101
2440
|
}
|
|
2102
|
-
)),
|
|
2103
|
-
/* @__PURE__ */ p.jsx(
|
|
2441
|
+
)), m(R, "radio", (e) => /* @__PURE__ */ p.jsx(an.Group, { disabled: e.disabled, ...e.props })), m(R, "checkbox", (e) => /* @__PURE__ */ p.jsx(sn.Group, { disabled: e.disabled, ...e.props })), m(R, "upload", (e) => /* @__PURE__ */ p.jsx(on, { defaultFileList: e.initialValue, ...e.props, children: e.children || /* @__PURE__ */ p.jsxs(Pe, { children: [
|
|
2442
|
+
/* @__PURE__ */ p.jsx(Sa, {}),
|
|
2104
2443
|
" 点击上传"
|
|
2105
|
-
] }) })),
|
|
2106
|
-
|
|
2444
|
+
] }) })), m(R, "mentions", (e) => /* @__PURE__ */ p.jsx(
|
|
2445
|
+
cn,
|
|
2107
2446
|
{
|
|
2108
2447
|
...e.props,
|
|
2109
2448
|
placeholder: e.placeholder || R.getDefaultPlaceholder(e)
|
|
2110
2449
|
}
|
|
2111
|
-
)),
|
|
2112
|
-
|
|
2450
|
+
)), m(R, "cascader", (e) => /* @__PURE__ */ p.jsx(
|
|
2451
|
+
ln,
|
|
2113
2452
|
{
|
|
2114
2453
|
...e.props,
|
|
2115
2454
|
placeholder: e.placeholder || R.getDefaultPlaceholder(e)
|
|
2116
2455
|
}
|
|
2117
|
-
)),
|
|
2118
|
-
|
|
2456
|
+
)), m(R, "treeSelect", (e) => /* @__PURE__ */ p.jsx(
|
|
2457
|
+
un,
|
|
2119
2458
|
{
|
|
2120
2459
|
...e.props,
|
|
2121
2460
|
placeholder: e.placeholder || R.getDefaultPlaceholder(e)
|
|
2122
2461
|
}
|
|
2123
2462
|
));
|
|
2124
|
-
let
|
|
2125
|
-
const
|
|
2126
|
-
function
|
|
2127
|
-
const { formProps: e, formItems: t = [], column:
|
|
2128
|
-
if (
|
|
2129
|
-
return
|
|
2130
|
-
const d =
|
|
2131
|
-
return
|
|
2132
|
-
}, u = (
|
|
2133
|
-
const { show: g = !0 } =
|
|
2463
|
+
let ve = R;
|
|
2464
|
+
const st = (n = "") => Ue("m-form", n);
|
|
2465
|
+
function Rr(n) {
|
|
2466
|
+
const { formProps: e, formItems: t = [], column: r = 1, form: s, itemLayout: o, formRowProps: i } = n, l = (c, g) => {
|
|
2467
|
+
if (c.render)
|
|
2468
|
+
return c.render(g);
|
|
2469
|
+
const d = ve[c.type];
|
|
2470
|
+
return c && c.type && d ? d(c) : /* @__PURE__ */ p.jsx("div", { className: "error-message", children: "Invalid form item configuration" });
|
|
2471
|
+
}, u = (c) => {
|
|
2472
|
+
const { show: g = !0 } = c;
|
|
2134
2473
|
if (!g)
|
|
2135
2474
|
return null;
|
|
2136
|
-
const d = [...
|
|
2137
|
-
|
|
2475
|
+
const d = [...c.rules || []];
|
|
2476
|
+
c.required && d.push({ required: !0, message: c.required });
|
|
2138
2477
|
const b = {
|
|
2139
|
-
labelCol:
|
|
2140
|
-
wrapperCol:
|
|
2141
|
-
...
|
|
2142
|
-
...
|
|
2478
|
+
labelCol: ve.labelCol,
|
|
2479
|
+
wrapperCol: ve.wrapperCol,
|
|
2480
|
+
...o,
|
|
2481
|
+
...c.itemLayout
|
|
2143
2482
|
};
|
|
2144
|
-
return /* @__PURE__ */ p.jsx(
|
|
2145
|
-
|
|
2483
|
+
return /* @__PURE__ */ p.jsx(dn, { span: c.span || 24 / r, children: /* @__PURE__ */ p.jsx("div", { className: st("item-wrapper"), children: /* @__PURE__ */ p.jsx(
|
|
2484
|
+
it.Item,
|
|
2146
2485
|
{
|
|
2147
|
-
label:
|
|
2148
|
-
name:
|
|
2486
|
+
label: c.label,
|
|
2487
|
+
name: c.id,
|
|
2149
2488
|
rules: d,
|
|
2150
|
-
initialValue:
|
|
2489
|
+
initialValue: c.initialValue,
|
|
2151
2490
|
...b,
|
|
2152
|
-
...
|
|
2153
|
-
children: c
|
|
2491
|
+
...c.formItemProps,
|
|
2492
|
+
children: l(c, s)
|
|
2154
2493
|
}
|
|
2155
|
-
) }) }, `col-${
|
|
2494
|
+
) }) }, `col-${c.id}`);
|
|
2156
2495
|
};
|
|
2157
|
-
return /* @__PURE__ */ p.jsx(
|
|
2158
|
-
|
|
2496
|
+
return /* @__PURE__ */ p.jsx(we, { children: /* @__PURE__ */ p.jsx(it, { form: s, ...e, className: `${st()} ${e == null ? void 0 : e.className}`, children: /* @__PURE__ */ p.jsx(
|
|
2497
|
+
fn,
|
|
2159
2498
|
{
|
|
2160
|
-
gutter:
|
|
2161
|
-
...
|
|
2162
|
-
className: `${
|
|
2163
|
-
children: t.map((
|
|
2499
|
+
gutter: ve.defaultRowGutter,
|
|
2500
|
+
...i,
|
|
2501
|
+
className: `${st("grid")} ${i == null ? void 0 : i.className}`,
|
|
2502
|
+
children: t.map((c) => u(c))
|
|
2164
2503
|
}
|
|
2165
2504
|
) }) });
|
|
2166
2505
|
}
|
|
2167
|
-
|
|
2168
|
-
|
|
2506
|
+
Rr.displayName = "MForm";
|
|
2507
|
+
let ot = "default";
|
|
2508
|
+
const He = [];
|
|
2509
|
+
let Qt = (n) => {
|
|
2510
|
+
switch (n) {
|
|
2511
|
+
case "light":
|
|
2512
|
+
return {
|
|
2513
|
+
algorithm: [ze.defaultAlgorithm]
|
|
2514
|
+
};
|
|
2515
|
+
case "dark":
|
|
2516
|
+
return {
|
|
2517
|
+
algorithm: [ze.darkAlgorithm]
|
|
2518
|
+
};
|
|
2519
|
+
default:
|
|
2520
|
+
return {
|
|
2521
|
+
algorithm: [ze.defaultAlgorithm]
|
|
2522
|
+
};
|
|
2523
|
+
}
|
|
2524
|
+
};
|
|
2525
|
+
const be = class be extends en {
|
|
2526
|
+
constructor() {
|
|
2527
|
+
super(...arguments);
|
|
2528
|
+
m(this, "handleCancel", (t) => {
|
|
2529
|
+
var r, s, o, i;
|
|
2530
|
+
(s = (r = this.props).onCancel) == null || s.call(r, t), (i = (o = this.props).onClosed) == null || i.call(o, { cancel: !0 });
|
|
2531
|
+
});
|
|
2532
|
+
m(this, "handleOk", (t) => {
|
|
2533
|
+
var r, s, o, i;
|
|
2534
|
+
(s = (r = this.props).onOk) == null || s.call(r, t), (i = (o = this.props).onClosed) == null || i.call(o, { ok: !0 });
|
|
2535
|
+
});
|
|
2536
|
+
}
|
|
2537
|
+
getTheme() {
|
|
2538
|
+
const t = this.props.mode || ot;
|
|
2539
|
+
return Qt(t);
|
|
2540
|
+
}
|
|
2541
|
+
render() {
|
|
2542
|
+
return /* @__PURE__ */ p.jsx(
|
|
2543
|
+
nr,
|
|
2544
|
+
{
|
|
2545
|
+
theme: this.getTheme(),
|
|
2546
|
+
componentSize: "middle",
|
|
2547
|
+
componentDisabled: !1,
|
|
2548
|
+
children: /* @__PURE__ */ p.jsx(
|
|
2549
|
+
hn,
|
|
2550
|
+
{
|
|
2551
|
+
maskClosable: !1,
|
|
2552
|
+
open: this.props.open,
|
|
2553
|
+
onCancel: this.handleCancel,
|
|
2554
|
+
onOk: this.handleOk,
|
|
2555
|
+
okText: "确定",
|
|
2556
|
+
cancelText: "取消",
|
|
2557
|
+
...this.props,
|
|
2558
|
+
children: this.props.children
|
|
2559
|
+
}
|
|
2560
|
+
)
|
|
2561
|
+
}
|
|
2562
|
+
);
|
|
2563
|
+
}
|
|
2564
|
+
};
|
|
2565
|
+
// 静态方法设置全局模式并更新所有弹窗
|
|
2566
|
+
m(be, "setMode", (t) => {
|
|
2567
|
+
ot = t, He.forEach((r) => {
|
|
2568
|
+
r.update({ mode: t });
|
|
2569
|
+
});
|
|
2570
|
+
}), // 静态方法设置全局ThemeConfig
|
|
2571
|
+
m(be, "setThemeConfig", (t) => {
|
|
2572
|
+
Qt = t;
|
|
2573
|
+
}), m(be, "open", (t) => {
|
|
2574
|
+
const r = Sn(be, {
|
|
2575
|
+
mode: ot,
|
|
2576
|
+
// 默认使用全局主题
|
|
2577
|
+
...t
|
|
2578
|
+
});
|
|
2579
|
+
He.push(r);
|
|
2580
|
+
const s = r.destroy;
|
|
2581
|
+
return r.destroy = (...o) => {
|
|
2582
|
+
const i = He.indexOf(r);
|
|
2583
|
+
return i !== -1 && He.splice(i, 1), s(...o);
|
|
2584
|
+
}, r;
|
|
2585
|
+
});
|
|
2586
|
+
let er = be;
|
|
2587
|
+
const _a = 13, ae = (n = "") => Ue("m-search", n), Ya = (n) => {
|
|
2169
2588
|
const {
|
|
2170
2589
|
className: e,
|
|
2171
2590
|
searchItems: t = [],
|
|
2172
|
-
onSearch:
|
|
2591
|
+
onSearch: r,
|
|
2173
2592
|
defaultShowAll: s = !1,
|
|
2174
|
-
customButtons:
|
|
2175
|
-
form:
|
|
2176
|
-
} =
|
|
2593
|
+
customButtons: o = [],
|
|
2594
|
+
form: i
|
|
2595
|
+
} = n, [l, u] = Y(s), [c] = it.useForm(), g = K(null), d = i ?? c, b = (y) => {
|
|
2177
2596
|
const { keyCode: E } = y;
|
|
2178
|
-
E ===
|
|
2597
|
+
E === _a && P();
|
|
2179
2598
|
};
|
|
2180
|
-
|
|
2599
|
+
ie(() => {
|
|
2181
2600
|
const y = g.current;
|
|
2182
2601
|
return y == null || y.addEventListener("keydown", b), () => {
|
|
2183
2602
|
y == null || y.removeEventListener("keydown", b);
|
|
2184
2603
|
};
|
|
2185
2604
|
}, []);
|
|
2186
|
-
const
|
|
2187
|
-
d == null || d.resetFields(),
|
|
2188
|
-
},
|
|
2605
|
+
const O = () => {
|
|
2606
|
+
d == null || d.resetFields(), P(!0);
|
|
2607
|
+
}, P = (y = !1) => {
|
|
2189
2608
|
d == null || d.validateFields().then((E) => {
|
|
2190
|
-
|
|
2609
|
+
Rn(E), r == null || r(E, y);
|
|
2191
2610
|
});
|
|
2192
|
-
},
|
|
2611
|
+
}, T = () => {
|
|
2193
2612
|
const y = t.length > 2;
|
|
2194
|
-
return /* @__PURE__ */ p.jsxs("div", { className:
|
|
2195
|
-
(
|
|
2196
|
-
/* @__PURE__ */ p.jsx(
|
|
2197
|
-
/* @__PURE__ */ p.jsx(
|
|
2613
|
+
return /* @__PURE__ */ p.jsxs("div", { className: ae("btn-wrapper"), children: [
|
|
2614
|
+
(o == null ? void 0 : o.length) > 0 ? /* @__PURE__ */ p.jsx(p.Fragment, { children: o.map((E, M) => /* @__PURE__ */ p.jsx(Pe, { className: ae("btn"), ...E, children: E.children }, `custom-btn-${M}`)) }) : /* @__PURE__ */ p.jsxs(p.Fragment, { children: [
|
|
2615
|
+
/* @__PURE__ */ p.jsx(Pe, { className: ae("btn btn-reset"), onClick: O, children: "重置" }),
|
|
2616
|
+
/* @__PURE__ */ p.jsx(Pe, { className: ae("btn btn-search"), onClick: () => P(), type: "primary", children: "搜索" })
|
|
2198
2617
|
] }),
|
|
2199
|
-
y && /* @__PURE__ */ p.jsxs("div", { className:
|
|
2200
|
-
/* @__PURE__ */ p.jsx("span", { children:
|
|
2201
|
-
|
|
2618
|
+
y && /* @__PURE__ */ p.jsxs("div", { className: ae("btn btn-collapse"), onClick: () => u(!l), children: [
|
|
2619
|
+
/* @__PURE__ */ p.jsx("span", { children: l ? "收起" : "展开" }),
|
|
2620
|
+
l ? /* @__PURE__ */ p.jsx(ya, {}) : /* @__PURE__ */ p.jsx(pa, {})
|
|
2202
2621
|
] })
|
|
2203
2622
|
] });
|
|
2204
|
-
},
|
|
2205
|
-
var
|
|
2623
|
+
}, H = t.map((y, E) => {
|
|
2624
|
+
var B;
|
|
2206
2625
|
const M = { ...y };
|
|
2207
|
-
return t.length > 2 && E >= 2 && !
|
|
2626
|
+
return t.length > 2 && E >= 2 && !l && (M.formItemProps = {
|
|
2208
2627
|
...y.formItemProps,
|
|
2209
2628
|
style: {
|
|
2210
|
-
...(
|
|
2629
|
+
...(B = y.formItemProps) == null ? void 0 : B.style,
|
|
2211
2630
|
display: "none"
|
|
2212
2631
|
}
|
|
2213
2632
|
}), M;
|
|
2214
|
-
}),
|
|
2215
|
-
return /* @__PURE__ */ p.jsx(
|
|
2633
|
+
}), j = t.length > 2;
|
|
2634
|
+
return /* @__PURE__ */ p.jsx(we, { children: /* @__PURE__ */ p.jsx(
|
|
2216
2635
|
"div",
|
|
2217
2636
|
{
|
|
2218
|
-
className: `${
|
|
2637
|
+
className: `${ae("")} ${l ? "" : ae("collapsed")} ${e || ""}`,
|
|
2219
2638
|
ref: g,
|
|
2220
|
-
children: /* @__PURE__ */ p.jsxs(
|
|
2221
|
-
/* @__PURE__ */ p.jsxs("div", { className:
|
|
2222
|
-
/* @__PURE__ */ p.jsx(
|
|
2223
|
-
(!
|
|
2639
|
+
children: /* @__PURE__ */ p.jsxs(ar, { children: [
|
|
2640
|
+
/* @__PURE__ */ p.jsxs("div", { className: ae("form"), children: [
|
|
2641
|
+
/* @__PURE__ */ p.jsx(Rr, { form: d, formItems: H, column: 3 }),
|
|
2642
|
+
(!j || j && !l) && T()
|
|
2224
2643
|
] }),
|
|
2225
|
-
|
|
2644
|
+
j && l && /* @__PURE__ */ p.jsx("div", { className: ae("footer"), children: T() })
|
|
2226
2645
|
] })
|
|
2227
2646
|
}
|
|
2228
2647
|
) });
|
|
2229
2648
|
};
|
|
2230
|
-
function
|
|
2649
|
+
function Ha(n) {
|
|
2231
2650
|
var t;
|
|
2232
|
-
const e = ((t =
|
|
2233
|
-
return /* @__PURE__ */ p.jsxs(
|
|
2234
|
-
/* @__PURE__ */ p.jsx(
|
|
2651
|
+
const e = ((t = n.columns) == null ? void 0 : t.map((r) => ({ ...r, dataIndex: r.key }))) ?? [];
|
|
2652
|
+
return /* @__PURE__ */ p.jsxs(we, { children: [
|
|
2653
|
+
/* @__PURE__ */ p.jsx(gn, { rowKey: (r) => r.id, ...n, columns: e }),
|
|
2235
2654
|
";"
|
|
2236
2655
|
] });
|
|
2237
2656
|
}
|
|
2238
|
-
const
|
|
2657
|
+
const za = {
|
|
2239
2658
|
YMD_Hms: "YYYY-MM-DD HH:mm:ss",
|
|
2240
2659
|
YMD: "YYYY-MM-DD",
|
|
2241
2660
|
YMD2: "YYYYMMDD",
|
|
@@ -2244,274 +2663,322 @@ const ya = {
|
|
|
2244
2663
|
Hm: "HH:mm",
|
|
2245
2664
|
YMD_000: "YYYY-MM-DD 00:00:00",
|
|
2246
2665
|
YMD_end: "YYYY-MM-DD 23:59:59",
|
|
2247
|
-
YMD_Hm: "YYYYMMDD HHmm"
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
}
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2666
|
+
YMD_Hm: "YYYYMMDD HHmm",
|
|
2667
|
+
YMD_SLASH: "YYYY/MM/DD",
|
|
2668
|
+
YMD_SLASH_Hms: "YYYY/MM/DD HH:mm:ss"
|
|
2669
|
+
}, Ea = 10;
|
|
2670
|
+
class N {
|
|
2671
|
+
}
|
|
2672
|
+
/**
|
|
2673
|
+
* 整数
|
|
2674
|
+
*/
|
|
2675
|
+
m(N, "integerRegex", /^-?\d+$/), /**
|
|
2676
|
+
* 正整数
|
|
2677
|
+
*/
|
|
2678
|
+
m(N, "positiveIntegerRegex", /^[1-9]\d*$/), /**
|
|
2679
|
+
* 负整数
|
|
2680
|
+
*/
|
|
2681
|
+
m(N, "negativeIntegerRegex", /^-[1-9]\d*$/), /**
|
|
2682
|
+
* 浮点数
|
|
2683
|
+
*/
|
|
2684
|
+
m(N, "floatRegex", /^-?\d+(\.\d+)?$/), /**
|
|
2685
|
+
* 字母
|
|
2686
|
+
*/
|
|
2687
|
+
m(N, "letter", /^[a-zA-Z]+$/), /**
|
|
2688
|
+
* 汉字
|
|
2689
|
+
*/
|
|
2690
|
+
m(N, "chinese", /^[\u4e00-\u9fa5]+$/), /**
|
|
2691
|
+
* 数字
|
|
2692
|
+
*/
|
|
2693
|
+
m(N, "number", /^[0-9]*$/), /**
|
|
2694
|
+
* 用户名 字母开头,允许字母数字下划线,长度4-16
|
|
2695
|
+
*/
|
|
2696
|
+
m(N, "username", /^[a-zA-Z]\w{3,15}$/), /**
|
|
2697
|
+
* 强用户名 必须包含大小写字母和数字,6-20位
|
|
2698
|
+
*/
|
|
2699
|
+
m(N, "strongUsername", /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{6,20}$/), /**
|
|
2700
|
+
* 密码 至少8位,包含字母和数字
|
|
2701
|
+
*/
|
|
2702
|
+
m(N, "password", /^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$/), /**
|
|
2703
|
+
* 强密码 至少8位,包含大小写字母、数字和特殊字符
|
|
2704
|
+
*/
|
|
2705
|
+
m(N, "strongPassword", /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/), /**
|
|
2706
|
+
* 中国大陆的手机号
|
|
2707
|
+
*/
|
|
2708
|
+
m(N, "phone", /^1[3-9]\d{9}$/), /**
|
|
2709
|
+
* 带区号的手机号
|
|
2710
|
+
*/
|
|
2711
|
+
m(N, "phoneWithAreaCode", /^\+?\d{2,3}-?\d{8,11}$/), /**
|
|
2712
|
+
* 邮箱
|
|
2713
|
+
*/
|
|
2714
|
+
m(N, "email", /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/), /**
|
|
2715
|
+
* 身份证
|
|
2716
|
+
*/
|
|
2717
|
+
m(N, "idCard", /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/), /**
|
|
2718
|
+
* 银行卡
|
|
2719
|
+
*/
|
|
2720
|
+
m(N, "bankCard", /^[1-9]\d{3,30}$/), /**
|
|
2721
|
+
* 邮政编码
|
|
2722
|
+
*/
|
|
2723
|
+
m(N, "zipCode", /^[1-9]\d{5}$/), /**
|
|
2724
|
+
* IP
|
|
2725
|
+
*/
|
|
2726
|
+
m(N, "ip", /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/), /**
|
|
2727
|
+
* URL
|
|
2728
|
+
*/
|
|
2729
|
+
m(N, "url", /^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)*\/?$/), /**
|
|
2730
|
+
* 车牌
|
|
2731
|
+
*/
|
|
2732
|
+
m(N, "carNumber", /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-HJ-NP-Z][A-HJ-NP-Z0-9]{4,5}[A-HJ-NP-Z0-9挂学警港澳]$/), /**
|
|
2733
|
+
* 时间 hh:mm:ss
|
|
2734
|
+
*/
|
|
2735
|
+
m(N, "time", /^([0-1][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/), /**
|
|
2736
|
+
* 日期 YYYY-MM-DD
|
|
2737
|
+
*/
|
|
2738
|
+
m(N, "date", /^(\d{4})-(\d{2})-(\d{2})$/);
|
|
2739
|
+
function Va(n, e) {
|
|
2740
|
+
const [t, r] = Y(!1), [s, o] = Y(null), [i, l] = Y(null), u = K(void 0), c = K(0), g = () => {
|
|
2276
2741
|
var b;
|
|
2277
|
-
(b = u.current) == null || b.abort(),
|
|
2742
|
+
(b = u.current) == null || b.abort(), r(!1), o(null);
|
|
2278
2743
|
}, d = async (...b) => {
|
|
2279
|
-
var
|
|
2280
|
-
const
|
|
2744
|
+
var T, H, j, y;
|
|
2745
|
+
const O = ++c.current;
|
|
2281
2746
|
g();
|
|
2282
|
-
const
|
|
2283
|
-
u.current =
|
|
2747
|
+
const P = new AbortController();
|
|
2748
|
+
u.current = P;
|
|
2284
2749
|
try {
|
|
2285
|
-
if (
|
|
2750
|
+
if (r(!0), o(null), e != null && e.onBefore && !await ((T = e == null ? void 0 : e.onBefore) == null ? void 0 : T.call(e, ...b))) {
|
|
2286
2751
|
g();
|
|
2287
2752
|
return;
|
|
2288
2753
|
}
|
|
2289
|
-
const E = b.length >=
|
|
2290
|
-
return !
|
|
2754
|
+
const E = b.length >= n.length ? b : [...b, { signal: P.signal }], M = await n(...E);
|
|
2755
|
+
return !P.signal.aborted && O === c.current && (l(M), await ((H = e == null ? void 0 : e.onSuccess) == null ? void 0 : H.call(e, M))), M;
|
|
2291
2756
|
} catch (E) {
|
|
2292
|
-
throw !
|
|
2757
|
+
throw !P.signal.aborted && O === c.current && (o(E), await ((j = e == null ? void 0 : e.onError) == null ? void 0 : j.call(e, E))), E;
|
|
2293
2758
|
} finally {
|
|
2294
|
-
!
|
|
2759
|
+
!P.signal.aborted && O === c.current && (r(!1), await ((y = e == null ? void 0 : e.onFinally) == null ? void 0 : y.call(e)));
|
|
2295
2760
|
}
|
|
2296
2761
|
};
|
|
2297
|
-
return
|
|
2298
|
-
}), g), [JSON.stringify(e == null ? void 0 : e.autoRunArgs)]), { run: d, cancel: g, loading: t, error: s, data:
|
|
2299
|
-
}
|
|
2300
|
-
function
|
|
2301
|
-
const
|
|
2302
|
-
|
|
2303
|
-
s.current =
|
|
2304
|
-
}, [
|
|
2305
|
-
const
|
|
2306
|
-
|
|
2307
|
-
}, []),
|
|
2308
|
-
|
|
2309
|
-
}, [e,
|
|
2310
|
-
return
|
|
2311
|
-
}
|
|
2312
|
-
const
|
|
2762
|
+
return ie(() => (e != null && e.autoRunArgs && d(...e.autoRunArgs).catch(() => {
|
|
2763
|
+
}), g), [JSON.stringify(e == null ? void 0 : e.autoRunArgs)]), { run: d, cancel: g, loading: t, error: s, data: i };
|
|
2764
|
+
}
|
|
2765
|
+
function Fa(n, e, t = !1) {
|
|
2766
|
+
const r = K(void 0), s = K(n);
|
|
2767
|
+
ie(() => {
|
|
2768
|
+
s.current = n;
|
|
2769
|
+
}, [n]);
|
|
2770
|
+
const o = oe(() => {
|
|
2771
|
+
r.current && (clearInterval(r.current), r.current = void 0);
|
|
2772
|
+
}, []), i = oe(() => {
|
|
2773
|
+
o(), e != null && (r.current = setInterval(() => s.current(), e));
|
|
2774
|
+
}, [e, o]);
|
|
2775
|
+
return ie(() => (t && s.current(), i(), o), [e, i, o, t]), { start: i, clear: o, isRunning: !!r.current };
|
|
2776
|
+
}
|
|
2777
|
+
const Ua = (n, e, t) => {
|
|
2313
2778
|
const {
|
|
2314
|
-
isReady:
|
|
2779
|
+
isReady: r = !0,
|
|
2315
2780
|
dataSource: s = [],
|
|
2316
|
-
current:
|
|
2317
|
-
pageSize:
|
|
2318
|
-
} = t || {}, [
|
|
2319
|
-
u(
|
|
2320
|
-
},
|
|
2321
|
-
g(
|
|
2322
|
-
},
|
|
2323
|
-
if (!
|
|
2781
|
+
current: o = 1,
|
|
2782
|
+
pageSize: i = 10
|
|
2783
|
+
} = t || {}, [l, u] = Y(o), [c, g] = Y(i), [d, b] = Y(s), [O, P] = Y(0), [T, H] = Y(!1), [j, y] = Y(!1), E = K(l), M = K(c), B = (S) => {
|
|
2784
|
+
u(S), E.current = S;
|
|
2785
|
+
}, ne = (S) => {
|
|
2786
|
+
g(S), M.current = S;
|
|
2787
|
+
}, J = K(0), xe = async () => {
|
|
2788
|
+
if (!r)
|
|
2324
2789
|
return;
|
|
2325
|
-
let
|
|
2326
|
-
|
|
2327
|
-
const
|
|
2790
|
+
let S = E.current, $ = M.current;
|
|
2791
|
+
H(!0), J.current++;
|
|
2792
|
+
const ee = J.current;
|
|
2328
2793
|
try {
|
|
2329
|
-
let
|
|
2330
|
-
|
|
2331
|
-
let { dataSource:
|
|
2332
|
-
limit:
|
|
2333
|
-
offset:
|
|
2334
|
-
current:
|
|
2794
|
+
let q = Math.round((S - 1) * $);
|
|
2795
|
+
q < 0 && (q = 0), $ < 1 && ($ = 1);
|
|
2796
|
+
let { dataSource: le, total: te } = await n({
|
|
2797
|
+
limit: $,
|
|
2798
|
+
offset: q,
|
|
2799
|
+
current: S
|
|
2335
2800
|
});
|
|
2336
|
-
if (
|
|
2801
|
+
if (ee !== J.current)
|
|
2337
2802
|
return;
|
|
2338
|
-
if (
|
|
2339
|
-
|
|
2340
|
-
const
|
|
2341
|
-
if ({ dataSource:
|
|
2342
|
-
limit:
|
|
2343
|
-
offset:
|
|
2344
|
-
current:
|
|
2345
|
-
}),
|
|
2803
|
+
if (c * (S - 1) >= te && S !== 1) {
|
|
2804
|
+
S = 1;
|
|
2805
|
+
const ke = Math.ceil(te / c);
|
|
2806
|
+
if ({ dataSource: le, total: te } = await n({
|
|
2807
|
+
limit: $,
|
|
2808
|
+
offset: q,
|
|
2809
|
+
current: S
|
|
2810
|
+
}), ee !== J.current)
|
|
2346
2811
|
return;
|
|
2347
|
-
|
|
2812
|
+
S = ke;
|
|
2348
2813
|
}
|
|
2349
|
-
b(
|
|
2350
|
-
} catch (
|
|
2351
|
-
if (console.error("fetch err",
|
|
2814
|
+
b(le), B(S), ne($), P(te);
|
|
2815
|
+
} catch (q) {
|
|
2816
|
+
if (console.error("fetch err", q), ee !== J.current)
|
|
2352
2817
|
return;
|
|
2353
2818
|
} finally {
|
|
2354
|
-
y(!0),
|
|
2355
|
-
}
|
|
2356
|
-
},
|
|
2357
|
-
|
|
2358
|
-
},
|
|
2359
|
-
return
|
|
2360
|
-
|
|
2361
|
-
},
|
|
2819
|
+
y(!0), H(!1);
|
|
2820
|
+
}
|
|
2821
|
+
}, X = async (S) => {
|
|
2822
|
+
S && (b([]), B(o), ne(i)), await xe();
|
|
2823
|
+
}, ce = oe(or(X, 500), [X]), Ce = [...e || [], r];
|
|
2824
|
+
return ie(() => {
|
|
2825
|
+
r && ce(!0);
|
|
2826
|
+
}, Ce), {
|
|
2362
2827
|
tableProps: {
|
|
2363
|
-
loading:
|
|
2828
|
+
loading: T,
|
|
2364
2829
|
dataSource: d
|
|
2365
2830
|
},
|
|
2366
|
-
loading:
|
|
2831
|
+
loading: T,
|
|
2367
2832
|
dataSource: d,
|
|
2368
2833
|
paginationProps: {
|
|
2369
|
-
current:
|
|
2370
|
-
pageSize:
|
|
2371
|
-
total:
|
|
2372
|
-
onChange: async (
|
|
2373
|
-
|
|
2834
|
+
current: l,
|
|
2835
|
+
pageSize: c,
|
|
2836
|
+
total: O,
|
|
2837
|
+
onChange: async (S, $) => {
|
|
2838
|
+
B(S), ne($), await X();
|
|
2374
2839
|
},
|
|
2375
|
-
onShowSizeChange: async (
|
|
2376
|
-
|
|
2840
|
+
onShowSizeChange: async (S, $) => {
|
|
2841
|
+
ne(S), B($), await X();
|
|
2377
2842
|
}
|
|
2378
2843
|
},
|
|
2379
|
-
isFirstComplete:
|
|
2380
|
-
refresh:
|
|
2381
|
-
debounceRefresh:
|
|
2844
|
+
isFirstComplete: j,
|
|
2845
|
+
refresh: X,
|
|
2846
|
+
debounceRefresh: ce,
|
|
2382
2847
|
setDataSource: b
|
|
2383
2848
|
};
|
|
2384
2849
|
};
|
|
2385
|
-
function
|
|
2386
|
-
const
|
|
2850
|
+
function Wa() {
|
|
2851
|
+
const n = window.location.href.split("?")[1] || "", e = new URLSearchParams(n);
|
|
2387
2852
|
return Object.fromEntries(e.entries());
|
|
2388
2853
|
}
|
|
2389
|
-
const
|
|
2390
|
-
const [e, t] =
|
|
2854
|
+
const Ba = (n) => {
|
|
2855
|
+
const [e, t] = Y(n), r = K(e), s = oe((l) => {
|
|
2391
2856
|
t((u) => {
|
|
2392
|
-
const
|
|
2393
|
-
return
|
|
2857
|
+
const c = typeof l == "function" ? l(u) : l, g = { ...u, ...c };
|
|
2858
|
+
return r.current = g, g;
|
|
2394
2859
|
});
|
|
2395
|
-
}, []),
|
|
2396
|
-
t(
|
|
2397
|
-
}, [
|
|
2398
|
-
return [e, s,
|
|
2860
|
+
}, []), o = oe(() => r.current, []), i = oe(() => {
|
|
2861
|
+
t(n), r.current = n;
|
|
2862
|
+
}, [n]);
|
|
2863
|
+
return [e, s, o, i];
|
|
2399
2864
|
};
|
|
2400
|
-
function
|
|
2401
|
-
const
|
|
2402
|
-
|
|
2403
|
-
s.current =
|
|
2404
|
-
}, [
|
|
2405
|
-
const
|
|
2406
|
-
|
|
2407
|
-
}, []),
|
|
2408
|
-
|
|
2409
|
-
}, [e,
|
|
2410
|
-
return
|
|
2411
|
-
}
|
|
2412
|
-
const
|
|
2865
|
+
function qa(n, e, t = !1) {
|
|
2866
|
+
const r = K(void 0), s = K(n);
|
|
2867
|
+
ie(() => {
|
|
2868
|
+
s.current = n;
|
|
2869
|
+
}, [n]);
|
|
2870
|
+
const o = oe(() => {
|
|
2871
|
+
r.current && (clearTimeout(r.current), r.current = void 0);
|
|
2872
|
+
}, []), i = oe(() => {
|
|
2873
|
+
o(), e != null && (r.current = setTimeout(() => s.current(), e));
|
|
2874
|
+
}, [e, o]);
|
|
2875
|
+
return ie(() => (t && s.current(), i(), o), [e, i, o, t]), { start: i, clear: o, isRunning: !!r.current };
|
|
2876
|
+
}
|
|
2877
|
+
const Za = (n, e, t) => {
|
|
2413
2878
|
const {
|
|
2414
|
-
isReady:
|
|
2879
|
+
isReady: r = !0,
|
|
2415
2880
|
dataSource: s = [],
|
|
2416
|
-
current:
|
|
2417
|
-
pageSize:
|
|
2418
|
-
} = t || {}, [
|
|
2881
|
+
current: o = 1,
|
|
2882
|
+
pageSize: i = Ea
|
|
2883
|
+
} = t || {}, [l, u] = Y(!1), [c, g] = Y(o), [d, b] = Y(i), [O, P] = Y(0), [T, H] = Y(!1), [j, y] = Y(s), E = K(c), M = K(d), B = (z) => {
|
|
2419
2884
|
g(z), E.current = z;
|
|
2420
|
-
},
|
|
2885
|
+
}, ne = (z) => {
|
|
2421
2886
|
b(z), M.current = z;
|
|
2422
|
-
},
|
|
2423
|
-
if (!
|
|
2887
|
+
}, J = K(0), xe = async (z) => {
|
|
2888
|
+
if (!r)
|
|
2424
2889
|
return;
|
|
2425
|
-
let
|
|
2426
|
-
|
|
2427
|
-
const
|
|
2890
|
+
let D = E.current, V = M.current;
|
|
2891
|
+
H(!0), J.current += 1;
|
|
2892
|
+
const S = J.current;
|
|
2428
2893
|
try {
|
|
2429
|
-
let
|
|
2430
|
-
|
|
2431
|
-
let { dataSource:
|
|
2432
|
-
limit:
|
|
2433
|
-
offset:
|
|
2434
|
-
current:
|
|
2894
|
+
let $ = Math.round((D - 1) * V);
|
|
2895
|
+
$ < 0 && ($ = 0), V < 1 && (V = 1);
|
|
2896
|
+
let { dataSource: ee, total: q } = await n({
|
|
2897
|
+
limit: V,
|
|
2898
|
+
offset: $,
|
|
2899
|
+
current: D
|
|
2435
2900
|
});
|
|
2436
|
-
if (
|
|
2901
|
+
if (S !== J.current)
|
|
2437
2902
|
return;
|
|
2438
|
-
if (d * (
|
|
2439
|
-
const
|
|
2440
|
-
if ({ dataSource:
|
|
2441
|
-
limit:
|
|
2442
|
-
offset: Math.round((
|
|
2443
|
-
current:
|
|
2444
|
-
}),
|
|
2903
|
+
if (d * (D - 1) >= q && D !== 1) {
|
|
2904
|
+
const te = Math.ceil(q / d);
|
|
2905
|
+
if ({ dataSource: ee, total: q } = await n({
|
|
2906
|
+
limit: V,
|
|
2907
|
+
offset: Math.round((te - 1) * V),
|
|
2908
|
+
current: D
|
|
2909
|
+
}), S !== J.current)
|
|
2445
2910
|
return;
|
|
2446
|
-
|
|
2911
|
+
D = te;
|
|
2447
2912
|
}
|
|
2448
|
-
const
|
|
2449
|
-
y(
|
|
2450
|
-
} catch (
|
|
2451
|
-
if (console.error("fetch err",
|
|
2913
|
+
const le = z ? ee : j.concat(ee);
|
|
2914
|
+
y(le), B(D), ne(V), P(q);
|
|
2915
|
+
} catch ($) {
|
|
2916
|
+
if (console.error("fetch err", $), S !== J.current)
|
|
2452
2917
|
return;
|
|
2453
2918
|
}
|
|
2454
|
-
u(!0),
|
|
2455
|
-
},
|
|
2919
|
+
u(!0), H(!1);
|
|
2920
|
+
}, X = async (z) => {
|
|
2456
2921
|
if (z)
|
|
2457
|
-
y([]),
|
|
2922
|
+
y([]), B(o), ne(i);
|
|
2458
2923
|
else {
|
|
2459
|
-
const
|
|
2460
|
-
if (
|
|
2924
|
+
const D = d * c;
|
|
2925
|
+
if (O && O <= D)
|
|
2461
2926
|
return;
|
|
2462
|
-
|
|
2463
|
-
}
|
|
2464
|
-
await
|
|
2465
|
-
},
|
|
2466
|
-
return
|
|
2467
|
-
|
|
2468
|
-
},
|
|
2469
|
-
loading:
|
|
2470
|
-
dataSource:
|
|
2927
|
+
B(c + 1);
|
|
2928
|
+
}
|
|
2929
|
+
await xe(z);
|
|
2930
|
+
}, ce = oe(or(X, 500), [X]), Ce = [...e || [], r];
|
|
2931
|
+
return ie(() => {
|
|
2932
|
+
r && ce(!0);
|
|
2933
|
+
}, Ce), {
|
|
2934
|
+
loading: T,
|
|
2935
|
+
dataSource: j,
|
|
2471
2936
|
paginationProps: {
|
|
2472
|
-
current:
|
|
2937
|
+
current: c,
|
|
2473
2938
|
pageSize: d,
|
|
2474
|
-
total:
|
|
2939
|
+
total: O
|
|
2475
2940
|
},
|
|
2476
|
-
isFirstComplete:
|
|
2941
|
+
isFirstComplete: l,
|
|
2477
2942
|
refresh: async (z) => {
|
|
2478
|
-
await
|
|
2943
|
+
await X(z);
|
|
2479
2944
|
},
|
|
2480
|
-
debounceRefresh:
|
|
2945
|
+
debounceRefresh: ce,
|
|
2481
2946
|
setDataSource: y,
|
|
2482
|
-
setTotal:
|
|
2947
|
+
setTotal: P
|
|
2483
2948
|
};
|
|
2484
2949
|
};
|
|
2485
2950
|
export {
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2951
|
+
we as CompThemeProvider,
|
|
2952
|
+
za as DATE_FORMAT,
|
|
2953
|
+
En as ItemsRow,
|
|
2954
|
+
La as MBreadcrumb,
|
|
2955
|
+
On as MDescriptions,
|
|
2956
|
+
Rr as MForm,
|
|
2957
|
+
ve as MFormItemConst,
|
|
2958
|
+
G as MFormItemTypeEnum,
|
|
2959
|
+
Ya as MSearch,
|
|
2960
|
+
Ha as MTable,
|
|
2961
|
+
er as MiModal,
|
|
2962
|
+
Ia as MiThemeProvider,
|
|
2963
|
+
Fe as NextTick,
|
|
2964
|
+
Ea as PAGE_SIZE,
|
|
2965
|
+
N as PatternType,
|
|
2966
|
+
Ma as VersionUtil,
|
|
2967
|
+
Ta as cmx,
|
|
2968
|
+
or as debounce,
|
|
2969
|
+
Ue as getClassName,
|
|
2970
|
+
Aa as getFieldsByPath,
|
|
2971
|
+
Da as nextTick,
|
|
2972
|
+
ka as noop,
|
|
2973
|
+
Sn as openModal,
|
|
2974
|
+
Rn as removeNull,
|
|
2975
|
+
$a as throttle,
|
|
2976
|
+
Va as useFuncRequest,
|
|
2977
|
+
Fa as useInterval,
|
|
2978
|
+
_n as useMiThemeConfig,
|
|
2979
|
+
Ua as usePagination,
|
|
2980
|
+
Wa as useQuery,
|
|
2981
|
+
Ba as useReactive,
|
|
2982
|
+
qa as useTimeout,
|
|
2983
|
+
Za as useVirtualList
|
|
2517
2984
|
};
|