conditional-selection 1.0.4 → 1.0.5
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/types/ui.es.d.ts +1 -1
- package/dist/ui.cjs.js +4 -4
- package/dist/ui.es.js +682 -1172
- package/dist/ui.iife.js +4 -4
- package/dist/ui.umd.js +4 -4
- package/package.json +1 -4
package/dist/ui.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import kr, { useMemo as
|
|
2
|
-
var
|
|
1
|
+
import kr, { useMemo as G, useState as Pr, useCallback as w, forwardRef as Er, useImperativeHandle as Ar, useRef as Sr, useEffect as Ve } from "react";
|
|
2
|
+
var Q = { exports: {} }, Y = {};
|
|
3
3
|
/**
|
|
4
4
|
* @license React
|
|
5
5
|
* react-jsx-runtime.production.js
|
|
@@ -9,29 +9,29 @@ var ge = { exports: {} }, ee = {};
|
|
|
9
9
|
* This source code is licensed under the MIT license found in the
|
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
|
11
11
|
*/
|
|
12
|
-
var
|
|
13
|
-
function
|
|
14
|
-
if (
|
|
15
|
-
|
|
16
|
-
var e = Symbol.for("react.transitional.element"),
|
|
17
|
-
function
|
|
18
|
-
var
|
|
19
|
-
if (
|
|
20
|
-
|
|
21
|
-
for (var c in
|
|
22
|
-
c !== "key" && (
|
|
23
|
-
} else
|
|
24
|
-
return
|
|
12
|
+
var $e;
|
|
13
|
+
function Or() {
|
|
14
|
+
if ($e) return Y;
|
|
15
|
+
$e = 1;
|
|
16
|
+
var e = Symbol.for("react.transitional.element"), r = Symbol.for("react.fragment");
|
|
17
|
+
function t(n, i, s) {
|
|
18
|
+
var a = null;
|
|
19
|
+
if (s !== void 0 && (a = "" + s), i.key !== void 0 && (a = "" + i.key), "key" in i) {
|
|
20
|
+
s = {};
|
|
21
|
+
for (var c in i)
|
|
22
|
+
c !== "key" && (s[c] = i[c]);
|
|
23
|
+
} else s = i;
|
|
24
|
+
return i = s.ref, {
|
|
25
25
|
$$typeof: e,
|
|
26
26
|
type: n,
|
|
27
|
-
key:
|
|
28
|
-
ref:
|
|
29
|
-
props:
|
|
27
|
+
key: a,
|
|
28
|
+
ref: i !== void 0 ? i : null,
|
|
29
|
+
props: s
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
return
|
|
32
|
+
return Y.Fragment = r, Y.jsx = t, Y.jsxs = t, Y;
|
|
33
33
|
}
|
|
34
|
-
var
|
|
34
|
+
var W = {};
|
|
35
35
|
/**
|
|
36
36
|
* @license React
|
|
37
37
|
* react-jsx-runtime.development.js
|
|
@@ -41,794 +41,304 @@ var te = {};
|
|
|
41
41
|
* This source code is licensed under the MIT license found in the
|
|
42
42
|
* LICENSE file in the root directory of this source tree.
|
|
43
43
|
*/
|
|
44
|
-
var
|
|
45
|
-
function
|
|
46
|
-
return
|
|
47
|
-
function e(
|
|
48
|
-
if (
|
|
49
|
-
if (typeof
|
|
50
|
-
return
|
|
51
|
-
if (typeof
|
|
52
|
-
switch (
|
|
53
|
-
case
|
|
44
|
+
var Ye;
|
|
45
|
+
function wr() {
|
|
46
|
+
return Ye || (Ye = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
47
|
+
function e(o) {
|
|
48
|
+
if (o == null) return null;
|
|
49
|
+
if (typeof o == "function")
|
|
50
|
+
return o.$$typeof === vr ? null : o.displayName || o.name || null;
|
|
51
|
+
if (typeof o == "string") return o;
|
|
52
|
+
switch (o) {
|
|
53
|
+
case $:
|
|
54
54
|
return "Fragment";
|
|
55
|
-
case
|
|
55
|
+
case ye:
|
|
56
56
|
return "Profiler";
|
|
57
|
-
case
|
|
57
|
+
case pe:
|
|
58
58
|
return "StrictMode";
|
|
59
|
-
case
|
|
59
|
+
case j:
|
|
60
60
|
return "Suspense";
|
|
61
|
-
case
|
|
61
|
+
case pr:
|
|
62
62
|
return "SuspenseList";
|
|
63
|
-
case
|
|
63
|
+
case gr:
|
|
64
64
|
return "Activity";
|
|
65
65
|
}
|
|
66
|
-
if (typeof
|
|
67
|
-
switch (typeof
|
|
66
|
+
if (typeof o == "object")
|
|
67
|
+
switch (typeof o.tag == "number" && console.error(
|
|
68
68
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
69
|
-
),
|
|
70
|
-
case
|
|
69
|
+
), o.$$typeof) {
|
|
70
|
+
case Z:
|
|
71
71
|
return "Portal";
|
|
72
|
-
case x:
|
|
73
|
-
return a.displayName || "Context";
|
|
74
72
|
case S:
|
|
75
|
-
return
|
|
76
|
-
case
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
return
|
|
81
|
-
case
|
|
82
|
-
f =
|
|
73
|
+
return o.displayName || "Context";
|
|
74
|
+
case E:
|
|
75
|
+
return (o._context.displayName || "Context") + ".Consumer";
|
|
76
|
+
case T:
|
|
77
|
+
var f = o.render;
|
|
78
|
+
return o = o.displayName, o || (o = f.displayName || f.name || "", o = o !== "" ? "ForwardRef(" + o + ")" : "ForwardRef"), o;
|
|
79
|
+
case yr:
|
|
80
|
+
return f = o.displayName || null, f !== null ? f : e(o.type) || "Memo";
|
|
81
|
+
case ge:
|
|
82
|
+
f = o._payload, o = o._init;
|
|
83
83
|
try {
|
|
84
|
-
return e(
|
|
84
|
+
return e(o(f));
|
|
85
85
|
} catch {
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
return null;
|
|
89
89
|
}
|
|
90
|
-
function
|
|
91
|
-
return "" +
|
|
90
|
+
function r(o) {
|
|
91
|
+
return "" + o;
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function t(o) {
|
|
94
94
|
try {
|
|
95
|
-
|
|
95
|
+
r(o);
|
|
96
96
|
var f = !1;
|
|
97
97
|
} catch {
|
|
98
98
|
f = !0;
|
|
99
99
|
}
|
|
100
100
|
if (f) {
|
|
101
101
|
f = console;
|
|
102
|
-
var
|
|
103
|
-
return
|
|
102
|
+
var m = f.error, v = typeof Symbol == "function" && Symbol.toStringTag && o[Symbol.toStringTag] || o.constructor.name || "Object";
|
|
103
|
+
return m.call(
|
|
104
104
|
f,
|
|
105
105
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
106
|
-
|
|
107
|
-
),
|
|
106
|
+
v
|
|
107
|
+
), r(o);
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
-
function n(
|
|
111
|
-
if (
|
|
112
|
-
if (typeof
|
|
110
|
+
function n(o) {
|
|
111
|
+
if (o === $) return "<>";
|
|
112
|
+
if (typeof o == "object" && o !== null && o.$$typeof === ge)
|
|
113
113
|
return "<...>";
|
|
114
114
|
try {
|
|
115
|
-
var f = e(
|
|
115
|
+
var f = e(o);
|
|
116
116
|
return f ? "<" + f + ">" : "<...>";
|
|
117
117
|
} catch {
|
|
118
118
|
return "<...>";
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
|
-
function o() {
|
|
122
|
-
var a = Le.A;
|
|
123
|
-
return a === null ? null : a.getOwner();
|
|
124
|
-
}
|
|
125
121
|
function i() {
|
|
122
|
+
var o = ve.A;
|
|
123
|
+
return o === null ? null : o.getOwner();
|
|
124
|
+
}
|
|
125
|
+
function s() {
|
|
126
126
|
return Error("react-stack-top-frame");
|
|
127
127
|
}
|
|
128
|
-
function
|
|
129
|
-
if (
|
|
130
|
-
var f = Object.getOwnPropertyDescriptor(
|
|
128
|
+
function a(o) {
|
|
129
|
+
if (Ie.call(o, "key")) {
|
|
130
|
+
var f = Object.getOwnPropertyDescriptor(o, "key").get;
|
|
131
131
|
if (f && f.isReactWarning) return !1;
|
|
132
132
|
}
|
|
133
|
-
return
|
|
133
|
+
return o.key !== void 0;
|
|
134
134
|
}
|
|
135
|
-
function c(
|
|
136
|
-
function
|
|
137
|
-
|
|
135
|
+
function c(o, f) {
|
|
136
|
+
function m() {
|
|
137
|
+
Fe || (Fe = !0, console.error(
|
|
138
138
|
"%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://react.dev/link/special-props)",
|
|
139
139
|
f
|
|
140
140
|
));
|
|
141
141
|
}
|
|
142
|
-
|
|
143
|
-
get:
|
|
142
|
+
m.isReactWarning = !0, Object.defineProperty(o, "key", {
|
|
143
|
+
get: m,
|
|
144
144
|
configurable: !0
|
|
145
145
|
});
|
|
146
146
|
}
|
|
147
|
-
function
|
|
148
|
-
var
|
|
149
|
-
return
|
|
147
|
+
function p() {
|
|
148
|
+
var o = e(this.type);
|
|
149
|
+
return ze[o] || (ze[o] = !0, console.error(
|
|
150
150
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
151
|
-
)),
|
|
151
|
+
)), o = this.props.ref, o !== void 0 ? o : null;
|
|
152
152
|
}
|
|
153
|
-
function
|
|
154
|
-
var
|
|
155
|
-
return
|
|
156
|
-
$$typeof:
|
|
157
|
-
type:
|
|
153
|
+
function g(o, f, m, v, K, be) {
|
|
154
|
+
var R = m.ref;
|
|
155
|
+
return o = {
|
|
156
|
+
$$typeof: h,
|
|
157
|
+
type: o,
|
|
158
158
|
key: f,
|
|
159
|
-
props:
|
|
160
|
-
_owner:
|
|
161
|
-
}, (
|
|
159
|
+
props: m,
|
|
160
|
+
_owner: v
|
|
161
|
+
}, (R !== void 0 ? R : null) !== null ? Object.defineProperty(o, "ref", {
|
|
162
162
|
enumerable: !1,
|
|
163
|
-
get:
|
|
164
|
-
}) : Object.defineProperty(
|
|
163
|
+
get: p
|
|
164
|
+
}) : Object.defineProperty(o, "ref", { enumerable: !1, value: null }), o._store = {}, Object.defineProperty(o._store, "validated", {
|
|
165
165
|
configurable: !1,
|
|
166
166
|
enumerable: !1,
|
|
167
167
|
writable: !0,
|
|
168
168
|
value: 0
|
|
169
|
-
}), Object.defineProperty(
|
|
169
|
+
}), Object.defineProperty(o, "_debugInfo", {
|
|
170
170
|
configurable: !1,
|
|
171
171
|
enumerable: !1,
|
|
172
172
|
writable: !0,
|
|
173
173
|
value: null
|
|
174
|
-
}), Object.defineProperty(
|
|
174
|
+
}), Object.defineProperty(o, "_debugStack", {
|
|
175
175
|
configurable: !1,
|
|
176
176
|
enumerable: !1,
|
|
177
177
|
writable: !0,
|
|
178
|
-
value:
|
|
179
|
-
}), Object.defineProperty(
|
|
178
|
+
value: K
|
|
179
|
+
}), Object.defineProperty(o, "_debugTask", {
|
|
180
180
|
configurable: !1,
|
|
181
181
|
enumerable: !1,
|
|
182
182
|
writable: !0,
|
|
183
|
-
value:
|
|
184
|
-
}), Object.freeze && (Object.freeze(
|
|
183
|
+
value: be
|
|
184
|
+
}), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
|
|
185
185
|
}
|
|
186
|
-
function l(
|
|
187
|
-
var
|
|
188
|
-
if (
|
|
189
|
-
if (
|
|
190
|
-
if (
|
|
191
|
-
for (
|
|
192
|
-
|
|
193
|
-
Object.freeze && Object.freeze(
|
|
186
|
+
function l(o, f, m, v, K, be) {
|
|
187
|
+
var R = f.children;
|
|
188
|
+
if (R !== void 0)
|
|
189
|
+
if (v)
|
|
190
|
+
if (Rr(R)) {
|
|
191
|
+
for (v = 0; v < R.length; v++)
|
|
192
|
+
y(R[v]);
|
|
193
|
+
Object.freeze && Object.freeze(R);
|
|
194
194
|
} else
|
|
195
195
|
console.error(
|
|
196
196
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
197
197
|
);
|
|
198
|
-
else
|
|
199
|
-
if (
|
|
200
|
-
|
|
201
|
-
var
|
|
202
|
-
return
|
|
198
|
+
else y(R);
|
|
199
|
+
if (Ie.call(f, "key")) {
|
|
200
|
+
R = e(o);
|
|
201
|
+
var U = Object.keys(f).filter(function(br) {
|
|
202
|
+
return br !== "key";
|
|
203
203
|
});
|
|
204
|
-
|
|
204
|
+
v = 0 < U.length ? "{key: someKey, " + U.join(": ..., ") + ": ...}" : "{key: someKey}", Le[R + v] || (U = 0 < U.length ? "{" + U.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
205
205
|
`A props object containing a "key" prop is being spread into JSX:
|
|
206
206
|
let props = %s;
|
|
207
207
|
<%s {...props} />
|
|
208
208
|
React keys must be passed directly to JSX without using spread:
|
|
209
209
|
let props = %s;
|
|
210
210
|
<%s key={someKey} {...props} />`,
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
),
|
|
211
|
+
v,
|
|
212
|
+
R,
|
|
213
|
+
U,
|
|
214
|
+
R
|
|
215
|
+
), Le[R + v] = !0);
|
|
216
216
|
}
|
|
217
|
-
if (
|
|
218
|
-
|
|
219
|
-
for (var
|
|
220
|
-
|
|
221
|
-
} else
|
|
222
|
-
return
|
|
223
|
-
|
|
224
|
-
typeof
|
|
225
|
-
),
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
217
|
+
if (R = null, m !== void 0 && (t(m), R = "" + m), a(f) && (t(f.key), R = "" + f.key), "key" in f) {
|
|
218
|
+
m = {};
|
|
219
|
+
for (var ke in f)
|
|
220
|
+
ke !== "key" && (m[ke] = f[ke]);
|
|
221
|
+
} else m = f;
|
|
222
|
+
return R && c(
|
|
223
|
+
m,
|
|
224
|
+
typeof o == "function" ? o.displayName || o.name || "Unknown" : o
|
|
225
|
+
), g(
|
|
226
|
+
o,
|
|
227
|
+
R,
|
|
228
|
+
m,
|
|
229
|
+
i(),
|
|
230
|
+
K,
|
|
231
|
+
be
|
|
232
232
|
);
|
|
233
233
|
}
|
|
234
|
-
function
|
|
235
|
-
d(
|
|
234
|
+
function y(o) {
|
|
235
|
+
d(o) ? o._store && (o._store.validated = 1) : typeof o == "object" && o !== null && o.$$typeof === ge && (o._payload.status === "fulfilled" ? d(o._payload.value) && o._payload.value._store && (o._payload.value._store.validated = 1) : o._store && (o._store.validated = 1));
|
|
236
236
|
}
|
|
237
|
-
function d(
|
|
238
|
-
return typeof
|
|
237
|
+
function d(o) {
|
|
238
|
+
return typeof o == "object" && o !== null && o.$$typeof === h;
|
|
239
239
|
}
|
|
240
|
-
var u = kr,
|
|
240
|
+
var u = kr, h = Symbol.for("react.transitional.element"), Z = Symbol.for("react.portal"), $ = Symbol.for("react.fragment"), pe = Symbol.for("react.strict_mode"), ye = Symbol.for("react.profiler"), E = Symbol.for("react.consumer"), S = Symbol.for("react.context"), T = Symbol.for("react.forward_ref"), j = Symbol.for("react.suspense"), pr = Symbol.for("react.suspense_list"), yr = Symbol.for("react.memo"), ge = Symbol.for("react.lazy"), gr = Symbol.for("react.activity"), vr = Symbol.for("react.client.reference"), ve = u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Ie = Object.prototype.hasOwnProperty, Rr = Array.isArray, Re = console.createTask ? console.createTask : function() {
|
|
241
241
|
return null;
|
|
242
242
|
};
|
|
243
243
|
u = {
|
|
244
|
-
react_stack_bottom_frame: function(
|
|
245
|
-
return
|
|
244
|
+
react_stack_bottom_frame: function(o) {
|
|
245
|
+
return o();
|
|
246
246
|
}
|
|
247
247
|
};
|
|
248
|
-
var
|
|
248
|
+
var Fe, ze = {}, Me = u.react_stack_bottom_frame.bind(
|
|
249
249
|
u,
|
|
250
|
-
|
|
251
|
-
)(),
|
|
252
|
-
|
|
253
|
-
var
|
|
250
|
+
s
|
|
251
|
+
)(), Ue = Re(n(s)), Le = {};
|
|
252
|
+
W.Fragment = $, W.jsx = function(o, f, m) {
|
|
253
|
+
var v = 1e4 > ve.recentlyCreatedOwnerStacks++;
|
|
254
254
|
return l(
|
|
255
|
-
|
|
255
|
+
o,
|
|
256
256
|
f,
|
|
257
|
-
|
|
257
|
+
m,
|
|
258
258
|
!1,
|
|
259
|
-
|
|
260
|
-
|
|
259
|
+
v ? Error("react-stack-top-frame") : Me,
|
|
260
|
+
v ? Re(n(o)) : Ue
|
|
261
261
|
);
|
|
262
|
-
},
|
|
263
|
-
var
|
|
262
|
+
}, W.jsxs = function(o, f, m) {
|
|
263
|
+
var v = 1e4 > ve.recentlyCreatedOwnerStacks++;
|
|
264
264
|
return l(
|
|
265
|
-
|
|
265
|
+
o,
|
|
266
266
|
f,
|
|
267
|
-
|
|
267
|
+
m,
|
|
268
268
|
!0,
|
|
269
|
-
|
|
270
|
-
|
|
269
|
+
v ? Error("react-stack-top-frame") : Me,
|
|
270
|
+
v ? Re(n(o)) : Ue
|
|
271
271
|
);
|
|
272
272
|
};
|
|
273
|
-
})()),
|
|
274
|
-
}
|
|
275
|
-
var jt;
|
|
276
|
-
function Vr() {
|
|
277
|
-
return jt || (jt = 1, process.env.NODE_ENV === "production" ? ge.exports = Ur() : ge.exports = Lr()), ge.exports;
|
|
278
|
-
}
|
|
279
|
-
var y = Vr(), tr = typeof global == "object" && global && global.Object === Object && global, Gr = typeof self == "object" && self && self.Object === Object && self, E = tr || Gr || Function("return this")(), q = E.Symbol, rr = Object.prototype, Br = rr.hasOwnProperty, Yr = rr.toString, re = q ? q.toStringTag : void 0;
|
|
280
|
-
function Wr(e) {
|
|
281
|
-
var t = Br.call(e, re), r = e[re];
|
|
282
|
-
try {
|
|
283
|
-
e[re] = void 0;
|
|
284
|
-
var n = !0;
|
|
285
|
-
} catch {
|
|
286
|
-
}
|
|
287
|
-
var o = Yr.call(e);
|
|
288
|
-
return n && (t ? e[re] = r : delete e[re]), o;
|
|
289
|
-
}
|
|
290
|
-
var Hr = Object.prototype, qr = Hr.toString;
|
|
291
|
-
function Jr(e) {
|
|
292
|
-
return qr.call(e);
|
|
293
|
-
}
|
|
294
|
-
var Kr = "[object Null]", Xr = "[object Undefined]", Tt = q ? q.toStringTag : void 0;
|
|
295
|
-
function de(e) {
|
|
296
|
-
return e == null ? e === void 0 ? Xr : Kr : Tt && Tt in Object(e) ? Wr(e) : Jr(e);
|
|
297
|
-
}
|
|
298
|
-
function pe(e) {
|
|
299
|
-
return e != null && typeof e == "object";
|
|
300
|
-
}
|
|
301
|
-
var st = Array.isArray;
|
|
302
|
-
function Ee(e) {
|
|
303
|
-
var t = typeof e;
|
|
304
|
-
return e != null && (t == "object" || t == "function");
|
|
305
|
-
}
|
|
306
|
-
var Zr = "[object AsyncFunction]", Qr = "[object Function]", en = "[object GeneratorFunction]", tn = "[object Proxy]";
|
|
307
|
-
function nr(e) {
|
|
308
|
-
if (!Ee(e))
|
|
309
|
-
return !1;
|
|
310
|
-
var t = de(e);
|
|
311
|
-
return t == Qr || t == en || t == Zr || t == tn;
|
|
312
|
-
}
|
|
313
|
-
var Ye = E["__core-js_shared__"], At = (function() {
|
|
314
|
-
var e = /[^.]+$/.exec(Ye && Ye.keys && Ye.keys.IE_PROTO || "");
|
|
315
|
-
return e ? "Symbol(src)_1." + e : "";
|
|
316
|
-
})();
|
|
317
|
-
function rn(e) {
|
|
318
|
-
return !!At && At in e;
|
|
319
|
-
}
|
|
320
|
-
var nn = Function.prototype, on = nn.toString;
|
|
321
|
-
function B(e) {
|
|
322
|
-
if (e != null) {
|
|
323
|
-
try {
|
|
324
|
-
return on.call(e);
|
|
325
|
-
} catch {
|
|
326
|
-
}
|
|
327
|
-
try {
|
|
328
|
-
return e + "";
|
|
329
|
-
} catch {
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
return "";
|
|
333
|
-
}
|
|
334
|
-
var an = /[\\^$.*+?()[\]{}|]/g, sn = /^\[object .+?Constructor\]$/, cn = Function.prototype, un = Object.prototype, ln = cn.toString, fn = un.hasOwnProperty, dn = RegExp(
|
|
335
|
-
"^" + ln.call(fn).replace(an, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
336
|
-
);
|
|
337
|
-
function pn(e) {
|
|
338
|
-
if (!Ee(e) || rn(e))
|
|
339
|
-
return !1;
|
|
340
|
-
var t = nr(e) ? dn : sn;
|
|
341
|
-
return t.test(B(e));
|
|
342
|
-
}
|
|
343
|
-
function _n(e, t) {
|
|
344
|
-
return e == null ? void 0 : e[t];
|
|
345
|
-
}
|
|
346
|
-
function Y(e, t) {
|
|
347
|
-
var r = _n(e, t);
|
|
348
|
-
return pn(r) ? r : void 0;
|
|
349
|
-
}
|
|
350
|
-
var Je = Y(E, "WeakMap"), Ot = Object.create, hn = /* @__PURE__ */ (function() {
|
|
351
|
-
function e() {
|
|
352
|
-
}
|
|
353
|
-
return function(t) {
|
|
354
|
-
if (!Ee(t))
|
|
355
|
-
return {};
|
|
356
|
-
if (Ot)
|
|
357
|
-
return Ot(t);
|
|
358
|
-
e.prototype = t;
|
|
359
|
-
var r = new e();
|
|
360
|
-
return e.prototype = void 0, r;
|
|
361
|
-
};
|
|
362
|
-
})(), wt = (function() {
|
|
363
|
-
try {
|
|
364
|
-
var e = Y(Object, "defineProperty");
|
|
365
|
-
return e({}, "", {}), e;
|
|
366
|
-
} catch {
|
|
367
|
-
}
|
|
368
|
-
})();
|
|
369
|
-
function yn(e, t) {
|
|
370
|
-
for (var r = -1, n = e == null ? 0 : e.length; ++r < n && t(e[r], r, e) !== !1; )
|
|
371
|
-
;
|
|
372
|
-
return e;
|
|
373
|
-
}
|
|
374
|
-
var gn = 9007199254740991, bn = /^(?:0|[1-9]\d*)$/;
|
|
375
|
-
function mn(e, t) {
|
|
376
|
-
var r = typeof e;
|
|
377
|
-
return t = t ?? gn, !!t && (r == "number" || r != "symbol" && bn.test(e)) && e > -1 && e % 1 == 0 && e < t;
|
|
378
|
-
}
|
|
379
|
-
function vn(e, t, r) {
|
|
380
|
-
t == "__proto__" && wt ? wt(e, t, {
|
|
381
|
-
configurable: !0,
|
|
382
|
-
enumerable: !0,
|
|
383
|
-
value: r,
|
|
384
|
-
writable: !0
|
|
385
|
-
}) : e[t] = r;
|
|
386
|
-
}
|
|
387
|
-
function or(e, t) {
|
|
388
|
-
return e === t || e !== e && t !== t;
|
|
389
|
-
}
|
|
390
|
-
var jn = Object.prototype, Tn = jn.hasOwnProperty;
|
|
391
|
-
function An(e, t, r) {
|
|
392
|
-
var n = e[t];
|
|
393
|
-
(!(Tn.call(e, t) && or(n, r)) || r === void 0 && !(t in e)) && vn(e, t, r);
|
|
394
|
-
}
|
|
395
|
-
var On = 9007199254740991;
|
|
396
|
-
function ar(e) {
|
|
397
|
-
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= On;
|
|
398
|
-
}
|
|
399
|
-
function wn(e) {
|
|
400
|
-
return e != null && ar(e.length) && !nr(e);
|
|
401
|
-
}
|
|
402
|
-
var Sn = Object.prototype;
|
|
403
|
-
function ir(e) {
|
|
404
|
-
var t = e && e.constructor, r = typeof t == "function" && t.prototype || Sn;
|
|
405
|
-
return e === r;
|
|
406
|
-
}
|
|
407
|
-
function Pn(e, t) {
|
|
408
|
-
for (var r = -1, n = Array(e); ++r < e; )
|
|
409
|
-
n[r] = t(r);
|
|
410
|
-
return n;
|
|
411
|
-
}
|
|
412
|
-
var En = "[object Arguments]";
|
|
413
|
-
function St(e) {
|
|
414
|
-
return pe(e) && de(e) == En;
|
|
415
|
-
}
|
|
416
|
-
var sr = Object.prototype, xn = sr.hasOwnProperty, Rn = sr.propertyIsEnumerable, $n = St(/* @__PURE__ */ (function() {
|
|
417
|
-
return arguments;
|
|
418
|
-
})()) ? St : function(e) {
|
|
419
|
-
return pe(e) && xn.call(e, "callee") && !Rn.call(e, "callee");
|
|
420
|
-
};
|
|
421
|
-
function Cn() {
|
|
422
|
-
return !1;
|
|
423
|
-
}
|
|
424
|
-
var cr = typeof exports == "object" && exports && !exports.nodeType && exports, Pt = cr && typeof module == "object" && module && !module.nodeType && module, In = Pt && Pt.exports === cr, Et = In ? E.Buffer : void 0, Nn = Et ? Et.isBuffer : void 0, ur = Nn || Cn, kn = "[object Arguments]", Dn = "[object Array]", Fn = "[object Boolean]", Mn = "[object Date]", zn = "[object Error]", Un = "[object Function]", Ln = "[object Map]", Vn = "[object Number]", Gn = "[object Object]", Bn = "[object RegExp]", Yn = "[object Set]", Wn = "[object String]", Hn = "[object WeakMap]", qn = "[object ArrayBuffer]", Jn = "[object DataView]", Kn = "[object Float32Array]", Xn = "[object Float64Array]", Zn = "[object Int8Array]", Qn = "[object Int16Array]", eo = "[object Int32Array]", to = "[object Uint8Array]", ro = "[object Uint8ClampedArray]", no = "[object Uint16Array]", oo = "[object Uint32Array]", b = {};
|
|
425
|
-
b[Kn] = b[Xn] = b[Zn] = b[Qn] = b[eo] = b[to] = b[ro] = b[no] = b[oo] = !0;
|
|
426
|
-
b[kn] = b[Dn] = b[qn] = b[Fn] = b[Jn] = b[Mn] = b[zn] = b[Un] = b[Ln] = b[Vn] = b[Gn] = b[Bn] = b[Yn] = b[Wn] = b[Hn] = !1;
|
|
427
|
-
function ao(e) {
|
|
428
|
-
return pe(e) && ar(e.length) && !!b[de(e)];
|
|
429
|
-
}
|
|
430
|
-
function ct(e) {
|
|
431
|
-
return function(t) {
|
|
432
|
-
return e(t);
|
|
433
|
-
};
|
|
434
|
-
}
|
|
435
|
-
var lr = typeof exports == "object" && exports && !exports.nodeType && exports, oe = lr && typeof module == "object" && module && !module.nodeType && module, io = oe && oe.exports === lr, We = io && tr.process, J = (function() {
|
|
436
|
-
try {
|
|
437
|
-
var e = oe && oe.require && oe.require("util").types;
|
|
438
|
-
return e || We && We.binding && We.binding("util");
|
|
439
|
-
} catch {
|
|
440
|
-
}
|
|
441
|
-
})(), xt = J && J.isTypedArray, so = xt ? ct(xt) : ao, co = Object.prototype, uo = co.hasOwnProperty;
|
|
442
|
-
function lo(e, t) {
|
|
443
|
-
var r = st(e), n = !r && $n(e), o = !r && !n && ur(e), i = !r && !n && !o && so(e), s = r || n || o || i, c = s ? Pn(e.length, String) : [], h = c.length;
|
|
444
|
-
for (var p in e)
|
|
445
|
-
uo.call(e, p) && !(s && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
446
|
-
(p == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
447
|
-
o && (p == "offset" || p == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
448
|
-
i && (p == "buffer" || p == "byteLength" || p == "byteOffset") || // Skip index properties.
|
|
449
|
-
mn(p, h))) && c.push(p);
|
|
450
|
-
return c;
|
|
451
|
-
}
|
|
452
|
-
function fr(e, t) {
|
|
453
|
-
return function(r) {
|
|
454
|
-
return e(t(r));
|
|
455
|
-
};
|
|
456
|
-
}
|
|
457
|
-
var fo = fr(Object.keys, Object), po = Object.prototype, _o = po.hasOwnProperty;
|
|
458
|
-
function ho(e) {
|
|
459
|
-
if (!ir(e))
|
|
460
|
-
return fo(e);
|
|
461
|
-
var t = [];
|
|
462
|
-
for (var r in Object(e))
|
|
463
|
-
_o.call(e, r) && r != "constructor" && t.push(r);
|
|
464
|
-
return t;
|
|
465
|
-
}
|
|
466
|
-
function yo(e) {
|
|
467
|
-
return wn(e) ? lo(e) : ho(e);
|
|
468
|
-
}
|
|
469
|
-
var ie = Y(Object, "create");
|
|
470
|
-
function go() {
|
|
471
|
-
this.__data__ = ie ? ie(null) : {}, this.size = 0;
|
|
472
|
-
}
|
|
473
|
-
function bo(e) {
|
|
474
|
-
var t = this.has(e) && delete this.__data__[e];
|
|
475
|
-
return this.size -= t ? 1 : 0, t;
|
|
476
|
-
}
|
|
477
|
-
var mo = "__lodash_hash_undefined__", vo = Object.prototype, jo = vo.hasOwnProperty;
|
|
478
|
-
function To(e) {
|
|
479
|
-
var t = this.__data__;
|
|
480
|
-
if (ie) {
|
|
481
|
-
var r = t[e];
|
|
482
|
-
return r === mo ? void 0 : r;
|
|
483
|
-
}
|
|
484
|
-
return jo.call(t, e) ? t[e] : void 0;
|
|
485
|
-
}
|
|
486
|
-
var Ao = Object.prototype, Oo = Ao.hasOwnProperty;
|
|
487
|
-
function wo(e) {
|
|
488
|
-
var t = this.__data__;
|
|
489
|
-
return ie ? t[e] !== void 0 : Oo.call(t, e);
|
|
490
|
-
}
|
|
491
|
-
var So = "__lodash_hash_undefined__";
|
|
492
|
-
function Po(e, t) {
|
|
493
|
-
var r = this.__data__;
|
|
494
|
-
return this.size += this.has(e) ? 0 : 1, r[e] = ie && t === void 0 ? So : t, this;
|
|
495
|
-
}
|
|
496
|
-
function V(e) {
|
|
497
|
-
var t = -1, r = e == null ? 0 : e.length;
|
|
498
|
-
for (this.clear(); ++t < r; ) {
|
|
499
|
-
var n = e[t];
|
|
500
|
-
this.set(n[0], n[1]);
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
V.prototype.clear = go;
|
|
504
|
-
V.prototype.delete = bo;
|
|
505
|
-
V.prototype.get = To;
|
|
506
|
-
V.prototype.has = wo;
|
|
507
|
-
V.prototype.set = Po;
|
|
508
|
-
function Eo() {
|
|
509
|
-
this.__data__ = [], this.size = 0;
|
|
510
|
-
}
|
|
511
|
-
function xe(e, t) {
|
|
512
|
-
for (var r = e.length; r--; )
|
|
513
|
-
if (or(e[r][0], t))
|
|
514
|
-
return r;
|
|
515
|
-
return -1;
|
|
516
|
-
}
|
|
517
|
-
var xo = Array.prototype, Ro = xo.splice;
|
|
518
|
-
function $o(e) {
|
|
519
|
-
var t = this.__data__, r = xe(t, e);
|
|
520
|
-
if (r < 0)
|
|
521
|
-
return !1;
|
|
522
|
-
var n = t.length - 1;
|
|
523
|
-
return r == n ? t.pop() : Ro.call(t, r, 1), --this.size, !0;
|
|
524
|
-
}
|
|
525
|
-
function Co(e) {
|
|
526
|
-
var t = this.__data__, r = xe(t, e);
|
|
527
|
-
return r < 0 ? void 0 : t[r][1];
|
|
528
|
-
}
|
|
529
|
-
function Io(e) {
|
|
530
|
-
return xe(this.__data__, e) > -1;
|
|
531
|
-
}
|
|
532
|
-
function No(e, t) {
|
|
533
|
-
var r = this.__data__, n = xe(r, e);
|
|
534
|
-
return n < 0 ? (++this.size, r.push([e, t])) : r[n][1] = t, this;
|
|
535
|
-
}
|
|
536
|
-
function k(e) {
|
|
537
|
-
var t = -1, r = e == null ? 0 : e.length;
|
|
538
|
-
for (this.clear(); ++t < r; ) {
|
|
539
|
-
var n = e[t];
|
|
540
|
-
this.set(n[0], n[1]);
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
k.prototype.clear = Eo;
|
|
544
|
-
k.prototype.delete = $o;
|
|
545
|
-
k.prototype.get = Co;
|
|
546
|
-
k.prototype.has = Io;
|
|
547
|
-
k.prototype.set = No;
|
|
548
|
-
var se = Y(E, "Map");
|
|
549
|
-
function ko() {
|
|
550
|
-
this.size = 0, this.__data__ = {
|
|
551
|
-
hash: new V(),
|
|
552
|
-
map: new (se || k)(),
|
|
553
|
-
string: new V()
|
|
554
|
-
};
|
|
555
|
-
}
|
|
556
|
-
function Do(e) {
|
|
557
|
-
var t = typeof e;
|
|
558
|
-
return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
|
|
559
|
-
}
|
|
560
|
-
function Re(e, t) {
|
|
561
|
-
var r = e.__data__;
|
|
562
|
-
return Do(t) ? r[typeof t == "string" ? "string" : "hash"] : r.map;
|
|
563
|
-
}
|
|
564
|
-
function Fo(e) {
|
|
565
|
-
var t = Re(this, e).delete(e);
|
|
566
|
-
return this.size -= t ? 1 : 0, t;
|
|
567
|
-
}
|
|
568
|
-
function Mo(e) {
|
|
569
|
-
return Re(this, e).get(e);
|
|
570
|
-
}
|
|
571
|
-
function zo(e) {
|
|
572
|
-
return Re(this, e).has(e);
|
|
573
|
-
}
|
|
574
|
-
function Uo(e, t) {
|
|
575
|
-
var r = Re(this, e), n = r.size;
|
|
576
|
-
return r.set(e, t), this.size += r.size == n ? 0 : 1, this;
|
|
577
|
-
}
|
|
578
|
-
function X(e) {
|
|
579
|
-
var t = -1, r = e == null ? 0 : e.length;
|
|
580
|
-
for (this.clear(); ++t < r; ) {
|
|
581
|
-
var n = e[t];
|
|
582
|
-
this.set(n[0], n[1]);
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
X.prototype.clear = ko;
|
|
586
|
-
X.prototype.delete = Fo;
|
|
587
|
-
X.prototype.get = Mo;
|
|
588
|
-
X.prototype.has = zo;
|
|
589
|
-
X.prototype.set = Uo;
|
|
590
|
-
function Lo(e, t) {
|
|
591
|
-
for (var r = -1, n = t.length, o = e.length; ++r < n; )
|
|
592
|
-
e[o + r] = t[r];
|
|
593
|
-
return e;
|
|
594
|
-
}
|
|
595
|
-
var Vo = fr(Object.getPrototypeOf, Object);
|
|
596
|
-
function Go() {
|
|
597
|
-
this.__data__ = new k(), this.size = 0;
|
|
598
|
-
}
|
|
599
|
-
function Bo(e) {
|
|
600
|
-
var t = this.__data__, r = t.delete(e);
|
|
601
|
-
return this.size = t.size, r;
|
|
602
|
-
}
|
|
603
|
-
function Yo(e) {
|
|
604
|
-
return this.__data__.get(e);
|
|
605
|
-
}
|
|
606
|
-
function Wo(e) {
|
|
607
|
-
return this.__data__.has(e);
|
|
608
|
-
}
|
|
609
|
-
var Ho = 200;
|
|
610
|
-
function qo(e, t) {
|
|
611
|
-
var r = this.__data__;
|
|
612
|
-
if (r instanceof k) {
|
|
613
|
-
var n = r.__data__;
|
|
614
|
-
if (!se || n.length < Ho - 1)
|
|
615
|
-
return n.push([e, t]), this.size = ++r.size, this;
|
|
616
|
-
r = this.__data__ = new X(n);
|
|
617
|
-
}
|
|
618
|
-
return r.set(e, t), this.size = r.size, this;
|
|
619
|
-
}
|
|
620
|
-
function Z(e) {
|
|
621
|
-
var t = this.__data__ = new k(e);
|
|
622
|
-
this.size = t.size;
|
|
623
|
-
}
|
|
624
|
-
Z.prototype.clear = Go;
|
|
625
|
-
Z.prototype.delete = Bo;
|
|
626
|
-
Z.prototype.get = Yo;
|
|
627
|
-
Z.prototype.has = Wo;
|
|
628
|
-
Z.prototype.set = qo;
|
|
629
|
-
var dr = typeof exports == "object" && exports && !exports.nodeType && exports, Rt = dr && typeof module == "object" && module && !module.nodeType && module, Jo = Rt && Rt.exports === dr, $t = Jo ? E.Buffer : void 0;
|
|
630
|
-
$t && $t.allocUnsafe;
|
|
631
|
-
function Ko(e, t) {
|
|
632
|
-
return e.slice();
|
|
633
|
-
}
|
|
634
|
-
function Xo(e, t) {
|
|
635
|
-
for (var r = -1, n = e == null ? 0 : e.length, o = 0, i = []; ++r < n; ) {
|
|
636
|
-
var s = e[r];
|
|
637
|
-
t(s, r, e) && (i[o++] = s);
|
|
638
|
-
}
|
|
639
|
-
return i;
|
|
640
|
-
}
|
|
641
|
-
function Zo() {
|
|
642
|
-
return [];
|
|
643
|
-
}
|
|
644
|
-
var Qo = Object.prototype, ea = Qo.propertyIsEnumerable, Ct = Object.getOwnPropertySymbols, ta = Ct ? function(e) {
|
|
645
|
-
return e == null ? [] : (e = Object(e), Xo(Ct(e), function(t) {
|
|
646
|
-
return ea.call(e, t);
|
|
647
|
-
}));
|
|
648
|
-
} : Zo;
|
|
649
|
-
function ra(e, t, r) {
|
|
650
|
-
var n = t(e);
|
|
651
|
-
return st(e) ? n : Lo(n, r(e));
|
|
652
|
-
}
|
|
653
|
-
function na(e) {
|
|
654
|
-
return ra(e, yo, ta);
|
|
655
|
-
}
|
|
656
|
-
var Ke = Y(E, "DataView"), Xe = Y(E, "Promise"), Ze = Y(E, "Set"), It = "[object Map]", oa = "[object Object]", Nt = "[object Promise]", kt = "[object Set]", Dt = "[object WeakMap]", Ft = "[object DataView]", aa = B(Ke), ia = B(se), sa = B(Xe), ca = B(Ze), ua = B(Je), R = de;
|
|
657
|
-
(Ke && R(new Ke(new ArrayBuffer(1))) != Ft || se && R(new se()) != It || Xe && R(Xe.resolve()) != Nt || Ze && R(new Ze()) != kt || Je && R(new Je()) != Dt) && (R = function(e) {
|
|
658
|
-
var t = de(e), r = t == oa ? e.constructor : void 0, n = r ? B(r) : "";
|
|
659
|
-
if (n)
|
|
660
|
-
switch (n) {
|
|
661
|
-
case aa:
|
|
662
|
-
return Ft;
|
|
663
|
-
case ia:
|
|
664
|
-
return It;
|
|
665
|
-
case sa:
|
|
666
|
-
return Nt;
|
|
667
|
-
case ca:
|
|
668
|
-
return kt;
|
|
669
|
-
case ua:
|
|
670
|
-
return Dt;
|
|
671
|
-
}
|
|
672
|
-
return t;
|
|
673
|
-
});
|
|
674
|
-
var la = Object.prototype, fa = la.hasOwnProperty;
|
|
675
|
-
function da(e) {
|
|
676
|
-
var t = e.length, r = new e.constructor(t);
|
|
677
|
-
return t && typeof e[0] == "string" && fa.call(e, "index") && (r.index = e.index, r.input = e.input), r;
|
|
678
|
-
}
|
|
679
|
-
var Mt = E.Uint8Array;
|
|
680
|
-
function ut(e) {
|
|
681
|
-
var t = new e.constructor(e.byteLength);
|
|
682
|
-
return new Mt(t).set(new Mt(e)), t;
|
|
683
|
-
}
|
|
684
|
-
function pa(e, t) {
|
|
685
|
-
var r = ut(e.buffer);
|
|
686
|
-
return new e.constructor(r, e.byteOffset, e.byteLength);
|
|
687
|
-
}
|
|
688
|
-
var _a = /\w*$/;
|
|
689
|
-
function ha(e) {
|
|
690
|
-
var t = new e.constructor(e.source, _a.exec(e));
|
|
691
|
-
return t.lastIndex = e.lastIndex, t;
|
|
692
|
-
}
|
|
693
|
-
var zt = q ? q.prototype : void 0, Ut = zt ? zt.valueOf : void 0;
|
|
694
|
-
function ya(e) {
|
|
695
|
-
return Ut ? Object(Ut.call(e)) : {};
|
|
696
|
-
}
|
|
697
|
-
function ga(e, t) {
|
|
698
|
-
var r = ut(e.buffer);
|
|
699
|
-
return new e.constructor(r, e.byteOffset, e.length);
|
|
273
|
+
})()), W;
|
|
700
274
|
}
|
|
701
|
-
var
|
|
702
|
-
function
|
|
703
|
-
|
|
704
|
-
switch (t) {
|
|
705
|
-
case Sa:
|
|
706
|
-
return ut(e);
|
|
707
|
-
case ba:
|
|
708
|
-
case ma:
|
|
709
|
-
return new n(+e);
|
|
710
|
-
case Pa:
|
|
711
|
-
return pa(e);
|
|
712
|
-
case Ea:
|
|
713
|
-
case xa:
|
|
714
|
-
case Ra:
|
|
715
|
-
case $a:
|
|
716
|
-
case Ca:
|
|
717
|
-
case Ia:
|
|
718
|
-
case Na:
|
|
719
|
-
case ka:
|
|
720
|
-
case Da:
|
|
721
|
-
return ga(e);
|
|
722
|
-
case va:
|
|
723
|
-
return new n();
|
|
724
|
-
case ja:
|
|
725
|
-
case Oa:
|
|
726
|
-
return new n(e);
|
|
727
|
-
case Ta:
|
|
728
|
-
return ha(e);
|
|
729
|
-
case Aa:
|
|
730
|
-
return new n();
|
|
731
|
-
case wa:
|
|
732
|
-
return ya(e);
|
|
733
|
-
}
|
|
734
|
-
}
|
|
735
|
-
function Ma(e) {
|
|
736
|
-
return typeof e.constructor == "function" && !ir(e) ? hn(Vo(e)) : {};
|
|
737
|
-
}
|
|
738
|
-
var za = "[object Map]";
|
|
739
|
-
function Ua(e) {
|
|
740
|
-
return pe(e) && R(e) == za;
|
|
741
|
-
}
|
|
742
|
-
var Lt = J && J.isMap, La = Lt ? ct(Lt) : Ua, Va = "[object Set]";
|
|
743
|
-
function Ga(e) {
|
|
744
|
-
return pe(e) && R(e) == Va;
|
|
275
|
+
var We;
|
|
276
|
+
function Nr() {
|
|
277
|
+
return We || (We = 1, process.env.NODE_ENV === "production" ? Q.exports = Or() : Q.exports = wr()), Q.exports;
|
|
745
278
|
}
|
|
746
|
-
var
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
function me(e, t, r, n, o, i) {
|
|
750
|
-
var s;
|
|
751
|
-
if (s !== void 0)
|
|
752
|
-
return s;
|
|
753
|
-
if (!Ee(e))
|
|
279
|
+
var _ = Nr();
|
|
280
|
+
function F(e) {
|
|
281
|
+
if (e === null || typeof e != "object")
|
|
754
282
|
return e;
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
else {
|
|
765
|
-
if (!g[h])
|
|
766
|
-
return o ? e : {};
|
|
767
|
-
s = Fa(e, h);
|
|
768
|
-
}
|
|
283
|
+
if (e instanceof Date)
|
|
284
|
+
return new Date(e.getTime());
|
|
285
|
+
if (e instanceof RegExp)
|
|
286
|
+
return new RegExp(e);
|
|
287
|
+
if (Array.isArray(e)) {
|
|
288
|
+
const t = [];
|
|
289
|
+
for (let n = 0; n < e.length; n++)
|
|
290
|
+
t[n] = F(e[n]);
|
|
291
|
+
return t;
|
|
769
292
|
}
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
return yn(d || e, function(u, _) {
|
|
781
|
-
d && (_ = u, u = e[_]), An(s, _, me(u, t, r, _, e, i));
|
|
782
|
-
}), s;
|
|
783
|
-
}
|
|
784
|
-
var _i = 1, hi = 4;
|
|
785
|
-
function ae(e) {
|
|
786
|
-
return me(e, _i | hi);
|
|
787
|
-
}
|
|
788
|
-
var P = /* @__PURE__ */ ((e) => (e.GROUP = "group", e.INDIVIDUAL = "individual", e))(P || {}), I = /* @__PURE__ */ ((e) => (e.AND = "and", e.OR = "or", e))(I || {});
|
|
789
|
-
const yi = {
|
|
790
|
-
[I.OR]: "或",
|
|
791
|
-
[I.AND]: "且"
|
|
792
|
-
}, Gt = ({ value: e, disabled: t, onChange: r }) => {
|
|
293
|
+
const r = {};
|
|
294
|
+
for (const t in e)
|
|
295
|
+
Object.prototype.hasOwnProperty.call(e, t) && (r[t] = F(e[t]));
|
|
296
|
+
return r;
|
|
297
|
+
}
|
|
298
|
+
var A = /* @__PURE__ */ ((e) => (e.GROUP = "group", e.INDIVIDUAL = "individual", e))(A || {}), N = /* @__PURE__ */ ((e) => (e.AND = "and", e.OR = "or", e))(N || {});
|
|
299
|
+
const xr = {
|
|
300
|
+
[N.OR]: "或",
|
|
301
|
+
[N.AND]: "且"
|
|
302
|
+
}, Ge = ({ value: e, disabled: r, onChange: t }) => {
|
|
793
303
|
function n() {
|
|
794
|
-
|
|
304
|
+
r || t(e === N.OR ? N.AND : N.OR);
|
|
795
305
|
}
|
|
796
|
-
return /* @__PURE__ */
|
|
306
|
+
return /* @__PURE__ */ _.jsx("div", { className: "link-line", children: /* @__PURE__ */ _.jsx("div", { className: "link-label", onClick: n, children: xr[e] ?? "且" }) });
|
|
797
307
|
};
|
|
798
|
-
function
|
|
308
|
+
function Tr(e) {
|
|
799
309
|
return e == null || e === "" ? !0 : Array.isArray(e) ? e.length === 0 : e !== null && typeof e == "object" ? Object.keys(e).length === 0 : !1;
|
|
800
310
|
}
|
|
801
|
-
function
|
|
802
|
-
return !!e && Object.keys(e).length > 0 && Object.keys(e).every((
|
|
311
|
+
function Cr(e) {
|
|
312
|
+
return !!e && Object.keys(e).length > 0 && Object.keys(e).every((r) => !Tr(e[r]));
|
|
803
313
|
}
|
|
804
|
-
const
|
|
314
|
+
const qe = ({
|
|
805
315
|
level: e,
|
|
806
|
-
currentItemInfo:
|
|
807
|
-
isLast:
|
|
316
|
+
currentItemInfo: r,
|
|
317
|
+
isLast: t,
|
|
808
318
|
disabledConfig: n,
|
|
809
|
-
onCreate:
|
|
810
|
-
onCreateChildRules:
|
|
811
|
-
onDel:
|
|
319
|
+
onCreate: i,
|
|
320
|
+
onCreateChildRules: s,
|
|
321
|
+
onDel: a
|
|
812
322
|
}) => {
|
|
813
|
-
const c =
|
|
814
|
-
() => !!(e > 1 &&
|
|
815
|
-
[e,
|
|
323
|
+
const c = G(() => r.level >= 1 && t, [r.level, t]), p = G(() => e > 1 && r.level < e, [e, r.level]), g = G(
|
|
324
|
+
() => !!(e > 1 && Cr(r.individual) && !n.addItem),
|
|
325
|
+
[e, r.individual, n.addItem]
|
|
816
326
|
);
|
|
817
|
-
return /* @__PURE__ */
|
|
818
|
-
|
|
819
|
-
c && /* @__PURE__ */
|
|
820
|
-
/* @__PURE__ */
|
|
327
|
+
return /* @__PURE__ */ _.jsxs("div", { className: "conditional-handle", children: [
|
|
328
|
+
g && /* @__PURE__ */ _.jsxs(_.Fragment, { children: [
|
|
329
|
+
c && /* @__PURE__ */ _.jsxs("span", { className: "create-handle", onClick: i, children: [
|
|
330
|
+
/* @__PURE__ */ _.jsx("span", { style: { color: "#c85000", marginRight: 4 }, children: "+" }),
|
|
821
331
|
"同级"
|
|
822
332
|
] }),
|
|
823
|
-
|
|
824
|
-
/* @__PURE__ */
|
|
333
|
+
p && /* @__PURE__ */ _.jsxs("span", { className: "create-handle", onClick: s, children: [
|
|
334
|
+
/* @__PURE__ */ _.jsx("span", { style: { color: "#c85000", marginRight: 4 }, children: "+" }),
|
|
825
335
|
"子级"
|
|
826
336
|
] })
|
|
827
337
|
] }),
|
|
828
|
-
!n.delItem && /* @__PURE__ */
|
|
338
|
+
!n.delItem && /* @__PURE__ */ _.jsx("span", { className: "del-handle", onClick: a, children: "-" })
|
|
829
339
|
] });
|
|
830
340
|
};
|
|
831
|
-
var
|
|
341
|
+
var nr = Symbol.for("immer-nothing"), Be = Symbol.for("immer-draftable"), b = Symbol.for("immer-state"), Dr = process.env.NODE_ENV !== "production" ? [
|
|
832
342
|
// All error codes, starting by 0:
|
|
833
343
|
function(e) {
|
|
834
344
|
return `The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`;
|
|
@@ -859,261 +369,261 @@ var yr = Symbol.for("immer-nothing"), Yt = Symbol.for("immer-draftable"), A = Sy
|
|
|
859
369
|
// Note: if more errors are added, the errorOffset in Patches.ts should be increased
|
|
860
370
|
// See Patches.ts for additional errors
|
|
861
371
|
] : [];
|
|
862
|
-
function
|
|
372
|
+
function k(e, ...r) {
|
|
863
373
|
if (process.env.NODE_ENV !== "production") {
|
|
864
|
-
const
|
|
374
|
+
const t = Dr[e], n = I(t) ? t.apply(null, r) : t;
|
|
865
375
|
throw new Error(`[Immer] ${n}`);
|
|
866
376
|
}
|
|
867
377
|
throw new Error(
|
|
868
378
|
`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`
|
|
869
379
|
);
|
|
870
380
|
}
|
|
871
|
-
var
|
|
872
|
-
function
|
|
873
|
-
var
|
|
874
|
-
return e ?
|
|
381
|
+
var P = Object, V = P.getPrototypeOf, ne = "constructor", le = "prototype", Ae = "configurable", ie = "enumerable", re = "writable", q = "value", C = (e) => !!e && !!e[b];
|
|
382
|
+
function x(e) {
|
|
383
|
+
var r;
|
|
384
|
+
return e ? ir(e) || fe(e) || !!e[Be] || !!((r = e[ne]) != null && r[Be]) || de(e) || _e(e) : !1;
|
|
875
385
|
}
|
|
876
|
-
var
|
|
877
|
-
function
|
|
878
|
-
if (!e || !
|
|
386
|
+
var jr = P[le][ne].toString(), He = /* @__PURE__ */ new WeakMap();
|
|
387
|
+
function ir(e) {
|
|
388
|
+
if (!e || !De(e))
|
|
879
389
|
return !1;
|
|
880
|
-
const
|
|
881
|
-
if (
|
|
390
|
+
const r = V(e);
|
|
391
|
+
if (r === null || r === P[le])
|
|
882
392
|
return !0;
|
|
883
|
-
const
|
|
884
|
-
if (
|
|
393
|
+
const t = P.hasOwnProperty.call(r, ne) && r[ne];
|
|
394
|
+
if (t === Object)
|
|
885
395
|
return !0;
|
|
886
|
-
if (!
|
|
396
|
+
if (!I(t))
|
|
887
397
|
return !1;
|
|
888
|
-
let n =
|
|
889
|
-
return n === void 0 && (n = Function.toString.call(
|
|
398
|
+
let n = He.get(t);
|
|
399
|
+
return n === void 0 && (n = Function.toString.call(t), He.set(t, n)), n === jr;
|
|
890
400
|
}
|
|
891
|
-
function
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
}) : e.forEach((n,
|
|
401
|
+
function ue(e, r, t = !0) {
|
|
402
|
+
X(e) === 0 ? (t ? Reflect.ownKeys(e) : P.keys(e)).forEach((i) => {
|
|
403
|
+
r(i, e[i], e);
|
|
404
|
+
}) : e.forEach((n, i) => r(i, n, e));
|
|
895
405
|
}
|
|
896
|
-
function
|
|
897
|
-
const
|
|
898
|
-
return
|
|
406
|
+
function X(e) {
|
|
407
|
+
const r = e[b];
|
|
408
|
+
return r ? r.type_ : fe(e) ? 1 : de(e) ? 2 : _e(e) ? 3 : 0;
|
|
899
409
|
}
|
|
900
|
-
var
|
|
410
|
+
var Je = (e, r, t = X(e)) => t === 2 ? e.has(r) : P[le].hasOwnProperty.call(e, r), Se = (e, r, t = X(e)) => (
|
|
901
411
|
// @ts-ignore
|
|
902
|
-
|
|
903
|
-
),
|
|
904
|
-
n === 2 ? e.set(
|
|
412
|
+
t === 2 ? e.get(r) : e[r]
|
|
413
|
+
), oe = (e, r, t, n = X(e)) => {
|
|
414
|
+
n === 2 ? e.set(r, t) : n === 3 ? e.add(t) : e[r] = t;
|
|
905
415
|
};
|
|
906
|
-
function
|
|
907
|
-
return e ===
|
|
416
|
+
function Ir(e, r) {
|
|
417
|
+
return e === r ? e !== 0 || 1 / e === 1 / r : e !== e && r !== r;
|
|
908
418
|
}
|
|
909
|
-
var
|
|
910
|
-
function
|
|
911
|
-
const
|
|
912
|
-
return Number.isInteger(
|
|
419
|
+
var fe = Array.isArray, de = (e) => e instanceof Map, _e = (e) => e instanceof Set, De = (e) => typeof e == "object", I = (e) => typeof e == "function", Pe = (e) => typeof e == "boolean";
|
|
420
|
+
function Fr(e) {
|
|
421
|
+
const r = +e;
|
|
422
|
+
return Number.isInteger(r) && String(r) === e;
|
|
913
423
|
}
|
|
914
|
-
var
|
|
915
|
-
function
|
|
916
|
-
if (
|
|
424
|
+
var O = (e) => e.copy_ || e.base_, je = (e) => e.modified_ ? e.copy_ : e.base_;
|
|
425
|
+
function Oe(e, r) {
|
|
426
|
+
if (de(e))
|
|
917
427
|
return new Map(e);
|
|
918
|
-
if (
|
|
428
|
+
if (_e(e))
|
|
919
429
|
return new Set(e);
|
|
920
|
-
if (
|
|
921
|
-
return Array[
|
|
922
|
-
const
|
|
923
|
-
if (
|
|
924
|
-
const n =
|
|
925
|
-
delete n[
|
|
926
|
-
let
|
|
927
|
-
for (let
|
|
928
|
-
const
|
|
929
|
-
c[
|
|
930
|
-
[
|
|
931
|
-
[
|
|
430
|
+
if (fe(e))
|
|
431
|
+
return Array[le].slice.call(e);
|
|
432
|
+
const t = ir(e);
|
|
433
|
+
if (r === !0 || r === "class_only" && !t) {
|
|
434
|
+
const n = P.getOwnPropertyDescriptors(e);
|
|
435
|
+
delete n[b];
|
|
436
|
+
let i = Reflect.ownKeys(n);
|
|
437
|
+
for (let s = 0; s < i.length; s++) {
|
|
438
|
+
const a = i[s], c = n[a];
|
|
439
|
+
c[re] === !1 && (c[re] = !0, c[Ae] = !0), (c.get || c.set) && (n[a] = {
|
|
440
|
+
[Ae]: !0,
|
|
441
|
+
[re]: !0,
|
|
932
442
|
// could live with !!desc.set as well here...
|
|
933
|
-
[
|
|
934
|
-
[
|
|
443
|
+
[ie]: c[ie],
|
|
444
|
+
[q]: e[a]
|
|
935
445
|
});
|
|
936
446
|
}
|
|
937
|
-
return
|
|
447
|
+
return P.create(V(e), n);
|
|
938
448
|
} else {
|
|
939
|
-
const n =
|
|
940
|
-
if (n !== null &&
|
|
449
|
+
const n = V(e);
|
|
450
|
+
if (n !== null && t)
|
|
941
451
|
return { ...e };
|
|
942
|
-
const
|
|
943
|
-
return
|
|
452
|
+
const i = P.create(n);
|
|
453
|
+
return P.assign(i, e);
|
|
944
454
|
}
|
|
945
455
|
}
|
|
946
|
-
function
|
|
947
|
-
return
|
|
948
|
-
set:
|
|
949
|
-
add:
|
|
950
|
-
clear:
|
|
951
|
-
delete:
|
|
952
|
-
}),
|
|
456
|
+
function B(e, r = !1) {
|
|
457
|
+
return he(e) || C(e) || !x(e) || (X(e) > 1 && P.defineProperties(e, {
|
|
458
|
+
set: ee,
|
|
459
|
+
add: ee,
|
|
460
|
+
clear: ee,
|
|
461
|
+
delete: ee
|
|
462
|
+
}), P.freeze(e), r && ue(
|
|
953
463
|
e,
|
|
954
|
-
(
|
|
955
|
-
|
|
464
|
+
(t, n) => {
|
|
465
|
+
B(n, !0);
|
|
956
466
|
},
|
|
957
467
|
!1
|
|
958
468
|
)), e;
|
|
959
469
|
}
|
|
960
|
-
function
|
|
961
|
-
|
|
470
|
+
function zr() {
|
|
471
|
+
k(2);
|
|
962
472
|
}
|
|
963
|
-
var
|
|
964
|
-
[
|
|
473
|
+
var ee = {
|
|
474
|
+
[q]: zr
|
|
965
475
|
};
|
|
966
|
-
function
|
|
967
|
-
return e === null || !
|
|
476
|
+
function he(e) {
|
|
477
|
+
return e === null || !De(e) ? !0 : P.isFrozen(e);
|
|
968
478
|
}
|
|
969
|
-
var
|
|
970
|
-
function
|
|
971
|
-
const
|
|
972
|
-
return
|
|
479
|
+
var se = "MapSet", we = "Patches", Xe = "ArrayMethods", or = {};
|
|
480
|
+
function M(e) {
|
|
481
|
+
const r = or[e];
|
|
482
|
+
return r || k(0, e), r;
|
|
973
483
|
}
|
|
974
|
-
var
|
|
484
|
+
var Ze = (e) => !!or[e], H, sr = () => H, Mr = (e, r) => ({
|
|
975
485
|
drafts_: [],
|
|
976
486
|
parent_: e,
|
|
977
|
-
immer_:
|
|
487
|
+
immer_: r,
|
|
978
488
|
// Whenever the modified draft contains a draft from another scope, we
|
|
979
489
|
// need to prevent auto-freezing so the unowned draft can be finalized.
|
|
980
490
|
canAutoFreeze_: !0,
|
|
981
491
|
unfinalizedDrafts_: 0,
|
|
982
492
|
handledSet_: /* @__PURE__ */ new Set(),
|
|
983
493
|
processedForPatches_: /* @__PURE__ */ new Set(),
|
|
984
|
-
mapSetPlugin_:
|
|
985
|
-
arrayMethodsPlugin_:
|
|
494
|
+
mapSetPlugin_: Ze(se) ? M(se) : void 0,
|
|
495
|
+
arrayMethodsPlugin_: Ze(Xe) ? M(Xe) : void 0
|
|
986
496
|
});
|
|
987
|
-
function
|
|
988
|
-
|
|
989
|
-
}
|
|
990
|
-
function
|
|
991
|
-
|
|
992
|
-
}
|
|
993
|
-
function
|
|
994
|
-
e ===
|
|
995
|
-
}
|
|
996
|
-
var
|
|
997
|
-
function
|
|
998
|
-
const
|
|
999
|
-
|
|
1000
|
-
}
|
|
1001
|
-
function
|
|
1002
|
-
|
|
1003
|
-
const
|
|
1004
|
-
if (e !== void 0 && e !==
|
|
1005
|
-
|
|
1006
|
-
const { patchPlugin_:
|
|
1007
|
-
|
|
1008
|
-
|
|
497
|
+
function Ke(e, r) {
|
|
498
|
+
r && (e.patchPlugin_ = M(we), e.patches_ = [], e.inversePatches_ = [], e.patchListener_ = r);
|
|
499
|
+
}
|
|
500
|
+
function Ne(e) {
|
|
501
|
+
xe(e), e.drafts_.forEach(Ur), e.drafts_ = null;
|
|
502
|
+
}
|
|
503
|
+
function xe(e) {
|
|
504
|
+
e === H && (H = e.parent_);
|
|
505
|
+
}
|
|
506
|
+
var Qe = (e) => H = Mr(H, e);
|
|
507
|
+
function Ur(e) {
|
|
508
|
+
const r = e[b];
|
|
509
|
+
r.type_ === 0 || r.type_ === 1 ? r.revoke_() : r.revoked_ = !0;
|
|
510
|
+
}
|
|
511
|
+
function er(e, r) {
|
|
512
|
+
r.unfinalizedDrafts_ = r.drafts_.length;
|
|
513
|
+
const t = r.drafts_[0];
|
|
514
|
+
if (e !== void 0 && e !== t) {
|
|
515
|
+
t[b].modified_ && (Ne(r), k(4)), x(e) && (e = rr(r, e));
|
|
516
|
+
const { patchPlugin_: i } = r;
|
|
517
|
+
i && i.generateReplacementPatches_(
|
|
518
|
+
t[b].base_,
|
|
1009
519
|
e,
|
|
1010
|
-
|
|
520
|
+
r
|
|
1011
521
|
);
|
|
1012
522
|
} else
|
|
1013
|
-
e =
|
|
1014
|
-
return
|
|
1015
|
-
}
|
|
1016
|
-
function
|
|
1017
|
-
if (
|
|
1018
|
-
return
|
|
1019
|
-
const
|
|
1020
|
-
if (!
|
|
1021
|
-
return
|
|
1022
|
-
if (!
|
|
1023
|
-
return
|
|
1024
|
-
if (!
|
|
1025
|
-
return
|
|
1026
|
-
if (!
|
|
1027
|
-
const { callbacks_: n } =
|
|
523
|
+
e = rr(r, t);
|
|
524
|
+
return Lr(r, e, !0), Ne(r), r.patches_ && r.patchListener_(r.patches_, r.inversePatches_), e !== nr ? e : void 0;
|
|
525
|
+
}
|
|
526
|
+
function rr(e, r) {
|
|
527
|
+
if (he(r))
|
|
528
|
+
return r;
|
|
529
|
+
const t = r[b];
|
|
530
|
+
if (!t)
|
|
531
|
+
return ae(r, e.handledSet_, e);
|
|
532
|
+
if (!me(t, e))
|
|
533
|
+
return r;
|
|
534
|
+
if (!t.modified_)
|
|
535
|
+
return t.base_;
|
|
536
|
+
if (!t.finalized_) {
|
|
537
|
+
const { callbacks_: n } = t;
|
|
1028
538
|
if (n)
|
|
1029
539
|
for (; n.length > 0; )
|
|
1030
540
|
n.pop()(e);
|
|
1031
|
-
|
|
541
|
+
lr(t, e);
|
|
1032
542
|
}
|
|
1033
|
-
return
|
|
543
|
+
return t.copy_;
|
|
1034
544
|
}
|
|
1035
|
-
function
|
|
1036
|
-
!e.parent_ && e.immer_.autoFreeze_ && e.canAutoFreeze_ &&
|
|
545
|
+
function Lr(e, r, t = !1) {
|
|
546
|
+
!e.parent_ && e.immer_.autoFreeze_ && e.canAutoFreeze_ && B(r, t);
|
|
1037
547
|
}
|
|
1038
|
-
function
|
|
548
|
+
function ar(e) {
|
|
1039
549
|
e.finalized_ = !0, e.scope_.unfinalizedDrafts_--;
|
|
1040
550
|
}
|
|
1041
|
-
var
|
|
1042
|
-
function
|
|
1043
|
-
const
|
|
1044
|
-
if (n !== void 0 &&
|
|
1045
|
-
|
|
551
|
+
var me = (e, r) => e.scope_ === r, Vr = [];
|
|
552
|
+
function cr(e, r, t, n) {
|
|
553
|
+
const i = O(e), s = e.type_;
|
|
554
|
+
if (n !== void 0 && Se(i, n, s) === r) {
|
|
555
|
+
oe(i, n, t, s);
|
|
1046
556
|
return;
|
|
1047
557
|
}
|
|
1048
558
|
if (!e.draftLocations_) {
|
|
1049
559
|
const c = e.draftLocations_ = /* @__PURE__ */ new Map();
|
|
1050
|
-
|
|
1051
|
-
if (
|
|
1052
|
-
const l = c.get(
|
|
1053
|
-
l.push(
|
|
560
|
+
ue(i, (p, g) => {
|
|
561
|
+
if (C(g)) {
|
|
562
|
+
const l = c.get(g) || [];
|
|
563
|
+
l.push(p), c.set(g, l);
|
|
1054
564
|
}
|
|
1055
565
|
});
|
|
1056
566
|
}
|
|
1057
|
-
const
|
|
1058
|
-
for (const c of
|
|
1059
|
-
|
|
567
|
+
const a = e.draftLocations_.get(r) ?? Vr;
|
|
568
|
+
for (const c of a)
|
|
569
|
+
oe(i, c, t, s);
|
|
1060
570
|
}
|
|
1061
|
-
function
|
|
1062
|
-
e.callbacks_.push(function(
|
|
571
|
+
function $r(e, r, t) {
|
|
572
|
+
e.callbacks_.push(function(i) {
|
|
1063
573
|
var c;
|
|
1064
|
-
const
|
|
1065
|
-
if (!
|
|
574
|
+
const s = r;
|
|
575
|
+
if (!s || !me(s, i))
|
|
1066
576
|
return;
|
|
1067
|
-
(c =
|
|
1068
|
-
const
|
|
1069
|
-
|
|
577
|
+
(c = i.mapSetPlugin_) == null || c.fixSetContents(s);
|
|
578
|
+
const a = je(s);
|
|
579
|
+
cr(e, s.draft_ ?? s, a, t), lr(s, i);
|
|
1070
580
|
});
|
|
1071
581
|
}
|
|
1072
|
-
function
|
|
582
|
+
function lr(e, r) {
|
|
1073
583
|
var n;
|
|
1074
584
|
if (e.modified_ && !e.finalized_ && (e.type_ === 3 || e.type_ === 1 && e.allIndicesReassigned_ || (((n = e.assigned_) == null ? void 0 : n.size) ?? 0) > 0)) {
|
|
1075
|
-
const { patchPlugin_:
|
|
1076
|
-
if (
|
|
1077
|
-
const
|
|
1078
|
-
|
|
585
|
+
const { patchPlugin_: i } = r;
|
|
586
|
+
if (i) {
|
|
587
|
+
const s = i.getPath(e);
|
|
588
|
+
s && i.generatePatches_(e, s, r);
|
|
1079
589
|
}
|
|
1080
|
-
|
|
590
|
+
ar(e);
|
|
1081
591
|
}
|
|
1082
592
|
}
|
|
1083
|
-
function
|
|
593
|
+
function Yr(e, r, t) {
|
|
1084
594
|
const { scope_: n } = e;
|
|
1085
|
-
if (
|
|
1086
|
-
const
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
const
|
|
1090
|
-
|
|
595
|
+
if (C(t)) {
|
|
596
|
+
const i = t[b];
|
|
597
|
+
me(i, n) && i.callbacks_.push(function() {
|
|
598
|
+
te(e);
|
|
599
|
+
const a = je(i);
|
|
600
|
+
cr(e, t, a, r);
|
|
1091
601
|
});
|
|
1092
|
-
} else
|
|
1093
|
-
const
|
|
1094
|
-
e.type_ === 3 ?
|
|
1095
|
-
|
|
602
|
+
} else x(t) && e.callbacks_.push(function() {
|
|
603
|
+
const s = O(e);
|
|
604
|
+
e.type_ === 3 ? s.has(t) && ae(t, n.handledSet_, n) : Se(s, r, e.type_) === t && n.drafts_.length > 1 && (e.assigned_.get(r) ?? !1) === !0 && e.copy_ && ae(
|
|
605
|
+
Se(e.copy_, r, e.type_),
|
|
1096
606
|
n.handledSet_,
|
|
1097
607
|
n
|
|
1098
608
|
);
|
|
1099
609
|
});
|
|
1100
610
|
}
|
|
1101
|
-
function
|
|
1102
|
-
return !
|
|
1103
|
-
if (
|
|
1104
|
-
const
|
|
1105
|
-
if (
|
|
1106
|
-
const
|
|
1107
|
-
|
|
611
|
+
function ae(e, r, t) {
|
|
612
|
+
return !t.immer_.autoFreeze_ && t.unfinalizedDrafts_ < 1 || C(e) || r.has(e) || !x(e) || he(e) || (r.add(e), ue(e, (n, i) => {
|
|
613
|
+
if (C(i)) {
|
|
614
|
+
const s = i[b];
|
|
615
|
+
if (me(s, t)) {
|
|
616
|
+
const a = je(s);
|
|
617
|
+
oe(e, n, a, e.type_), ar(s);
|
|
1108
618
|
}
|
|
1109
|
-
} else
|
|
619
|
+
} else x(i) && ae(i, r, t);
|
|
1110
620
|
})), e;
|
|
1111
621
|
}
|
|
1112
|
-
function
|
|
1113
|
-
const
|
|
1114
|
-
type_:
|
|
622
|
+
function Wr(e, r) {
|
|
623
|
+
const t = fe(e), n = {
|
|
624
|
+
type_: t ? 1 : 0,
|
|
1115
625
|
// Track which produce call this is associated with.
|
|
1116
|
-
scope_:
|
|
626
|
+
scope_: r ? r.scope_ : sr(),
|
|
1117
627
|
// True for both shallow and deep changes.
|
|
1118
628
|
modified_: !1,
|
|
1119
629
|
// Used during finalization.
|
|
@@ -1122,7 +632,7 @@ function Ri(e, t) {
|
|
|
1122
632
|
// actually instantiated in `prepareCopy()`
|
|
1123
633
|
assigned_: void 0,
|
|
1124
634
|
// The parent draft state.
|
|
1125
|
-
parent_:
|
|
635
|
+
parent_: r,
|
|
1126
636
|
// The base state.
|
|
1127
637
|
base_: e,
|
|
1128
638
|
// The base proxy.
|
|
@@ -1136,178 +646,178 @@ function Ri(e, t) {
|
|
|
1136
646
|
// `callbacks` actually gets assigned in `createProxy`
|
|
1137
647
|
callbacks_: void 0
|
|
1138
648
|
};
|
|
1139
|
-
let
|
|
1140
|
-
|
|
1141
|
-
const { revoke:
|
|
1142
|
-
return n.draft_ = c, n.revoke_ =
|
|
1143
|
-
}
|
|
1144
|
-
var
|
|
1145
|
-
get(e,
|
|
1146
|
-
if (
|
|
649
|
+
let i = n, s = ce;
|
|
650
|
+
t && (i = [n], s = J);
|
|
651
|
+
const { revoke: a, proxy: c } = Proxy.revocable(i, s);
|
|
652
|
+
return n.draft_ = c, n.revoke_ = a, [c, n];
|
|
653
|
+
}
|
|
654
|
+
var ce = {
|
|
655
|
+
get(e, r) {
|
|
656
|
+
if (r === b)
|
|
1147
657
|
return e;
|
|
1148
|
-
let
|
|
1149
|
-
const n = e.type_ === 1 && typeof
|
|
1150
|
-
if (n &&
|
|
1151
|
-
return
|
|
1152
|
-
const
|
|
1153
|
-
if (!
|
|
1154
|
-
return
|
|
1155
|
-
const
|
|
1156
|
-
if (e.finalized_ || !
|
|
658
|
+
let t = e.scope_.arrayMethodsPlugin_;
|
|
659
|
+
const n = e.type_ === 1 && typeof r == "string";
|
|
660
|
+
if (n && t != null && t.isArrayOperationMethod(r))
|
|
661
|
+
return t.createMethodInterceptor(e, r);
|
|
662
|
+
const i = O(e);
|
|
663
|
+
if (!Je(i, r, e.type_))
|
|
664
|
+
return Gr(e, i, r);
|
|
665
|
+
const s = i[r];
|
|
666
|
+
if (e.finalized_ || !x(s) || n && e.operationMethod && (t != null && t.isMutatingArrayMethod(
|
|
1157
667
|
e.operationMethod
|
|
1158
|
-
)) &&
|
|
1159
|
-
return
|
|
1160
|
-
if (
|
|
1161
|
-
|
|
1162
|
-
const
|
|
1163
|
-
return e.copy_[
|
|
668
|
+
)) && Fr(r))
|
|
669
|
+
return s;
|
|
670
|
+
if (s === Ee(e.base_, r)) {
|
|
671
|
+
te(e);
|
|
672
|
+
const a = e.type_ === 1 ? +r : r, c = Ce(e.scope_, s, e, a);
|
|
673
|
+
return e.copy_[a] = c;
|
|
1164
674
|
}
|
|
1165
|
-
return
|
|
675
|
+
return s;
|
|
1166
676
|
},
|
|
1167
|
-
has(e,
|
|
1168
|
-
return
|
|
677
|
+
has(e, r) {
|
|
678
|
+
return r in O(e);
|
|
1169
679
|
},
|
|
1170
680
|
ownKeys(e) {
|
|
1171
|
-
return Reflect.ownKeys(
|
|
681
|
+
return Reflect.ownKeys(O(e));
|
|
1172
682
|
},
|
|
1173
|
-
set(e,
|
|
1174
|
-
const n =
|
|
683
|
+
set(e, r, t) {
|
|
684
|
+
const n = ur(O(e), r);
|
|
1175
685
|
if (n != null && n.set)
|
|
1176
|
-
return n.set.call(e.draft_,
|
|
686
|
+
return n.set.call(e.draft_, t), !0;
|
|
1177
687
|
if (!e.modified_) {
|
|
1178
|
-
const
|
|
1179
|
-
if (
|
|
1180
|
-
return e.copy_[
|
|
1181
|
-
if (
|
|
688
|
+
const i = Ee(O(e), r), s = i == null ? void 0 : i[b];
|
|
689
|
+
if (s && s.base_ === t)
|
|
690
|
+
return e.copy_[r] = t, e.assigned_.set(r, !1), !0;
|
|
691
|
+
if (Ir(t, i) && (t !== void 0 || Je(e.base_, r, e.type_)))
|
|
1182
692
|
return !0;
|
|
1183
|
-
|
|
693
|
+
te(e), Te(e);
|
|
1184
694
|
}
|
|
1185
|
-
return e.copy_[
|
|
1186
|
-
(
|
|
1187
|
-
Number.isNaN(
|
|
695
|
+
return e.copy_[r] === t && // special case: handle new props with value 'undefined'
|
|
696
|
+
(t !== void 0 || r in e.copy_) || // special case: NaN
|
|
697
|
+
Number.isNaN(t) && Number.isNaN(e.copy_[r]) || (e.copy_[r] = t, e.assigned_.set(r, !0), Yr(e, r, t)), !0;
|
|
1188
698
|
},
|
|
1189
|
-
deleteProperty(e,
|
|
1190
|
-
return
|
|
699
|
+
deleteProperty(e, r) {
|
|
700
|
+
return te(e), Ee(e.base_, r) !== void 0 || r in e.base_ ? (e.assigned_.set(r, !1), Te(e)) : e.assigned_.delete(r), e.copy_ && delete e.copy_[r], !0;
|
|
1191
701
|
},
|
|
1192
702
|
// Note: We never coerce `desc.value` into an Immer draft, because we can't make
|
|
1193
703
|
// the same guarantee in ES5 mode.
|
|
1194
|
-
getOwnPropertyDescriptor(e,
|
|
1195
|
-
const
|
|
704
|
+
getOwnPropertyDescriptor(e, r) {
|
|
705
|
+
const t = O(e), n = Reflect.getOwnPropertyDescriptor(t, r);
|
|
1196
706
|
return n && {
|
|
1197
|
-
[
|
|
1198
|
-
[
|
|
1199
|
-
[
|
|
1200
|
-
[
|
|
707
|
+
[re]: !0,
|
|
708
|
+
[Ae]: e.type_ !== 1 || r !== "length",
|
|
709
|
+
[ie]: n[ie],
|
|
710
|
+
[q]: t[r]
|
|
1201
711
|
};
|
|
1202
712
|
},
|
|
1203
713
|
defineProperty() {
|
|
1204
|
-
|
|
714
|
+
k(11);
|
|
1205
715
|
},
|
|
1206
716
|
getPrototypeOf(e) {
|
|
1207
|
-
return
|
|
717
|
+
return V(e.base_);
|
|
1208
718
|
},
|
|
1209
719
|
setPrototypeOf() {
|
|
1210
|
-
|
|
720
|
+
k(12);
|
|
1211
721
|
}
|
|
1212
|
-
},
|
|
1213
|
-
for (let e in
|
|
1214
|
-
let
|
|
1215
|
-
|
|
1216
|
-
const
|
|
1217
|
-
return
|
|
722
|
+
}, J = {};
|
|
723
|
+
for (let e in ce) {
|
|
724
|
+
let r = ce[e];
|
|
725
|
+
J[e] = function() {
|
|
726
|
+
const t = arguments;
|
|
727
|
+
return t[0] = t[0][0], r.apply(this, t);
|
|
1218
728
|
};
|
|
1219
729
|
}
|
|
1220
|
-
|
|
1221
|
-
return process.env.NODE_ENV !== "production" && isNaN(parseInt(
|
|
730
|
+
J.deleteProperty = function(e, r) {
|
|
731
|
+
return process.env.NODE_ENV !== "production" && isNaN(parseInt(r)) && k(13), J.set.call(this, e, r, void 0);
|
|
1222
732
|
};
|
|
1223
|
-
|
|
1224
|
-
return process.env.NODE_ENV !== "production" &&
|
|
733
|
+
J.set = function(e, r, t) {
|
|
734
|
+
return process.env.NODE_ENV !== "production" && r !== "length" && isNaN(parseInt(r)) && k(14), ce.set.call(this, e[0], r, t, e[0]);
|
|
1225
735
|
};
|
|
1226
|
-
function
|
|
1227
|
-
const
|
|
1228
|
-
return (
|
|
1229
|
-
}
|
|
1230
|
-
function
|
|
1231
|
-
var
|
|
1232
|
-
const n =
|
|
1233
|
-
return n ?
|
|
736
|
+
function Ee(e, r) {
|
|
737
|
+
const t = e[b];
|
|
738
|
+
return (t ? O(t) : e)[r];
|
|
739
|
+
}
|
|
740
|
+
function Gr(e, r, t) {
|
|
741
|
+
var i;
|
|
742
|
+
const n = ur(r, t);
|
|
743
|
+
return n ? q in n ? n[q] : (
|
|
1234
744
|
// This is a very special case, if the prop is a getter defined by the
|
|
1235
745
|
// prototype, we should invoke it with the draft as context!
|
|
1236
|
-
(
|
|
746
|
+
(i = n.get) == null ? void 0 : i.call(e.draft_)
|
|
1237
747
|
) : void 0;
|
|
1238
748
|
}
|
|
1239
|
-
function
|
|
1240
|
-
if (!(
|
|
749
|
+
function ur(e, r) {
|
|
750
|
+
if (!(r in e))
|
|
1241
751
|
return;
|
|
1242
|
-
let
|
|
1243
|
-
for (;
|
|
1244
|
-
const n = Object.getOwnPropertyDescriptor(
|
|
752
|
+
let t = V(e);
|
|
753
|
+
for (; t; ) {
|
|
754
|
+
const n = Object.getOwnPropertyDescriptor(t, r);
|
|
1245
755
|
if (n)
|
|
1246
756
|
return n;
|
|
1247
|
-
|
|
757
|
+
t = V(t);
|
|
1248
758
|
}
|
|
1249
759
|
}
|
|
1250
|
-
function
|
|
1251
|
-
e.modified_ || (e.modified_ = !0, e.parent_ &&
|
|
760
|
+
function Te(e) {
|
|
761
|
+
e.modified_ || (e.modified_ = !0, e.parent_ && Te(e.parent_));
|
|
1252
762
|
}
|
|
1253
|
-
function
|
|
1254
|
-
e.copy_ || (e.assigned_ = /* @__PURE__ */ new Map(), e.copy_ =
|
|
763
|
+
function te(e) {
|
|
764
|
+
e.copy_ || (e.assigned_ = /* @__PURE__ */ new Map(), e.copy_ = Oe(
|
|
1255
765
|
e.base_,
|
|
1256
766
|
e.scope_.immer_.useStrictShallowCopy_
|
|
1257
767
|
));
|
|
1258
768
|
}
|
|
1259
|
-
var
|
|
769
|
+
var qr = class {
|
|
1260
770
|
constructor(e) {
|
|
1261
|
-
this.autoFreeze_ = !0, this.useStrictShallowCopy_ = !1, this.useStrictIteration_ = !1, this.produce = (
|
|
1262
|
-
if (
|
|
1263
|
-
const
|
|
1264
|
-
|
|
1265
|
-
const
|
|
1266
|
-
return function(
|
|
1267
|
-
return
|
|
771
|
+
this.autoFreeze_ = !0, this.useStrictShallowCopy_ = !1, this.useStrictIteration_ = !1, this.produce = (r, t, n) => {
|
|
772
|
+
if (I(r) && !I(t)) {
|
|
773
|
+
const s = t;
|
|
774
|
+
t = r;
|
|
775
|
+
const a = this;
|
|
776
|
+
return function(p = s, ...g) {
|
|
777
|
+
return a.produce(p, (l) => t.call(this, l, ...g));
|
|
1268
778
|
};
|
|
1269
779
|
}
|
|
1270
|
-
|
|
1271
|
-
let
|
|
1272
|
-
if (
|
|
1273
|
-
const
|
|
780
|
+
I(t) || k(6), n !== void 0 && !I(n) && k(7);
|
|
781
|
+
let i;
|
|
782
|
+
if (x(r)) {
|
|
783
|
+
const s = Qe(this), a = Ce(s, r, void 0);
|
|
1274
784
|
let c = !0;
|
|
1275
785
|
try {
|
|
1276
|
-
|
|
786
|
+
i = t(a), c = !1;
|
|
1277
787
|
} finally {
|
|
1278
|
-
c ?
|
|
788
|
+
c ? Ne(s) : xe(s);
|
|
1279
789
|
}
|
|
1280
|
-
return
|
|
1281
|
-
} else if (!
|
|
1282
|
-
if (
|
|
1283
|
-
const
|
|
1284
|
-
|
|
1285
|
-
patches_:
|
|
1286
|
-
inversePatches_:
|
|
1287
|
-
}), n(
|
|
790
|
+
return Ke(s, n), er(i, s);
|
|
791
|
+
} else if (!r || !De(r)) {
|
|
792
|
+
if (i = t(r), i === void 0 && (i = r), i === nr && (i = void 0), this.autoFreeze_ && B(i, !0), n) {
|
|
793
|
+
const s = [], a = [];
|
|
794
|
+
M(we).generateReplacementPatches_(r, i, {
|
|
795
|
+
patches_: s,
|
|
796
|
+
inversePatches_: a
|
|
797
|
+
}), n(s, a);
|
|
1288
798
|
}
|
|
1289
|
-
return
|
|
799
|
+
return i;
|
|
1290
800
|
} else
|
|
1291
|
-
|
|
1292
|
-
}, this.produceWithPatches = (
|
|
1293
|
-
if (
|
|
1294
|
-
return (
|
|
1295
|
-
let n,
|
|
1296
|
-
return [this.produce(
|
|
1297
|
-
n =
|
|
1298
|
-
}), n,
|
|
1299
|
-
},
|
|
801
|
+
k(1, r);
|
|
802
|
+
}, this.produceWithPatches = (r, t) => {
|
|
803
|
+
if (I(r))
|
|
804
|
+
return (a, ...c) => this.produceWithPatches(a, (p) => r(p, ...c));
|
|
805
|
+
let n, i;
|
|
806
|
+
return [this.produce(r, t, (a, c) => {
|
|
807
|
+
n = a, i = c;
|
|
808
|
+
}), n, i];
|
|
809
|
+
}, Pe(e == null ? void 0 : e.autoFreeze) && this.setAutoFreeze(e.autoFreeze), Pe(e == null ? void 0 : e.useStrictShallowCopy) && this.setUseStrictShallowCopy(e.useStrictShallowCopy), Pe(e == null ? void 0 : e.useStrictIteration) && this.setUseStrictIteration(e.useStrictIteration);
|
|
1300
810
|
}
|
|
1301
811
|
createDraft(e) {
|
|
1302
|
-
|
|
1303
|
-
const
|
|
1304
|
-
return
|
|
812
|
+
x(e) || k(8), C(e) && (e = Br(e));
|
|
813
|
+
const r = Qe(this), t = Ce(r, e, void 0);
|
|
814
|
+
return t[b].isManual_ = !0, xe(r), t;
|
|
1305
815
|
}
|
|
1306
|
-
finishDraft(e,
|
|
1307
|
-
const
|
|
1308
|
-
(!
|
|
1309
|
-
const { scope_: n } =
|
|
1310
|
-
return
|
|
816
|
+
finishDraft(e, r) {
|
|
817
|
+
const t = e && e[b];
|
|
818
|
+
(!t || !t.isManual_) && k(9);
|
|
819
|
+
const { scope_: n } = t;
|
|
820
|
+
return Ke(n, r), er(void 0, n);
|
|
1311
821
|
}
|
|
1312
822
|
/**
|
|
1313
823
|
* Pass true to automatically freeze all copies created by Immer.
|
|
@@ -1337,315 +847,315 @@ var Ci = class {
|
|
|
1337
847
|
shouldUseStrictIteration() {
|
|
1338
848
|
return this.useStrictIteration_;
|
|
1339
849
|
}
|
|
1340
|
-
applyPatches(e,
|
|
1341
|
-
let
|
|
1342
|
-
for (
|
|
1343
|
-
const
|
|
1344
|
-
if (
|
|
1345
|
-
e =
|
|
850
|
+
applyPatches(e, r) {
|
|
851
|
+
let t;
|
|
852
|
+
for (t = r.length - 1; t >= 0; t--) {
|
|
853
|
+
const i = r[t];
|
|
854
|
+
if (i.path.length === 0 && i.op === "replace") {
|
|
855
|
+
e = i.value;
|
|
1346
856
|
break;
|
|
1347
857
|
}
|
|
1348
858
|
}
|
|
1349
|
-
|
|
1350
|
-
const n =
|
|
1351
|
-
return
|
|
859
|
+
t > -1 && (r = r.slice(t + 1));
|
|
860
|
+
const n = M(we).applyPatches_;
|
|
861
|
+
return C(e) ? n(e, r) : this.produce(
|
|
1352
862
|
e,
|
|
1353
|
-
(
|
|
863
|
+
(i) => n(i, r)
|
|
1354
864
|
);
|
|
1355
865
|
}
|
|
1356
866
|
};
|
|
1357
|
-
function
|
|
1358
|
-
const [
|
|
1359
|
-
return ((
|
|
867
|
+
function Ce(e, r, t, n) {
|
|
868
|
+
const [i, s] = de(r) ? M(se).proxyMap_(r, t) : _e(r) ? M(se).proxySet_(r, t) : Wr(r, t);
|
|
869
|
+
return ((t == null ? void 0 : t.scope_) ?? sr()).drafts_.push(i), s.callbacks_ = (t == null ? void 0 : t.callbacks_) ?? [], s.key_ = n, t && n !== void 0 ? $r(t, s, n) : s.callbacks_.push(function(p) {
|
|
1360
870
|
var l;
|
|
1361
|
-
(l =
|
|
1362
|
-
const { patchPlugin_:
|
|
1363
|
-
|
|
1364
|
-
}),
|
|
871
|
+
(l = p.mapSetPlugin_) == null || l.fixSetContents(s);
|
|
872
|
+
const { patchPlugin_: g } = p;
|
|
873
|
+
s.modified_ && g && g.generatePatches_(s, [], p);
|
|
874
|
+
}), i;
|
|
1365
875
|
}
|
|
1366
|
-
function
|
|
1367
|
-
return
|
|
876
|
+
function Br(e) {
|
|
877
|
+
return C(e) || k(10, e), fr(e);
|
|
1368
878
|
}
|
|
1369
|
-
function
|
|
1370
|
-
if (!
|
|
879
|
+
function fr(e) {
|
|
880
|
+
if (!x(e) || he(e))
|
|
1371
881
|
return e;
|
|
1372
|
-
const
|
|
1373
|
-
let
|
|
1374
|
-
if (
|
|
1375
|
-
if (!
|
|
1376
|
-
return
|
|
1377
|
-
|
|
882
|
+
const r = e[b];
|
|
883
|
+
let t, n = !0;
|
|
884
|
+
if (r) {
|
|
885
|
+
if (!r.modified_)
|
|
886
|
+
return r.base_;
|
|
887
|
+
r.finalized_ = !0, t = Oe(e, r.scope_.immer_.useStrictShallowCopy_), n = r.scope_.immer_.shouldUseStrictIteration();
|
|
1378
888
|
} else
|
|
1379
|
-
|
|
1380
|
-
return
|
|
1381
|
-
|
|
1382
|
-
(
|
|
1383
|
-
|
|
889
|
+
t = Oe(e, !0);
|
|
890
|
+
return ue(
|
|
891
|
+
t,
|
|
892
|
+
(i, s) => {
|
|
893
|
+
oe(t, i, fr(s));
|
|
1384
894
|
},
|
|
1385
895
|
n
|
|
1386
|
-
),
|
|
1387
|
-
}
|
|
1388
|
-
var
|
|
1389
|
-
function
|
|
1390
|
-
var
|
|
1391
|
-
return
|
|
1392
|
-
}),
|
|
1393
|
-
return [
|
|
1394
|
-
|
|
896
|
+
), r && (r.finalized_ = !1), t;
|
|
897
|
+
}
|
|
898
|
+
var Hr = new qr(), Jr = Hr.produce;
|
|
899
|
+
function Xr(e) {
|
|
900
|
+
var r = Pr(function() {
|
|
901
|
+
return B(typeof e == "function" ? e() : e, !0);
|
|
902
|
+
}), t = r[1];
|
|
903
|
+
return [r[0], w(function(n) {
|
|
904
|
+
t(typeof n == "function" ? Jr(n) : B(n));
|
|
1395
905
|
}, [])];
|
|
1396
906
|
}
|
|
1397
|
-
function
|
|
907
|
+
function dr(e) {
|
|
1398
908
|
return e !== null && typeof e == "object" && !Array.isArray(e);
|
|
1399
909
|
}
|
|
1400
|
-
function
|
|
1401
|
-
return e == null || e === "" ? !0 : Array.isArray(e) ? e.length === 0 :
|
|
910
|
+
function Zr(e) {
|
|
911
|
+
return e == null || e === "" ? !0 : Array.isArray(e) ? e.length === 0 : dr(e) ? Object.keys(e).length === 0 : !1;
|
|
1402
912
|
}
|
|
1403
|
-
function
|
|
1404
|
-
return
|
|
913
|
+
function L(e = 0) {
|
|
914
|
+
return F({
|
|
1405
915
|
_id: crypto.randomUUID(),
|
|
1406
|
-
framework:
|
|
916
|
+
framework: A.INDIVIDUAL,
|
|
1407
917
|
// INDIVIDUAL 节点只保留 individual,不初始化 group
|
|
1408
918
|
individual: {},
|
|
1409
919
|
level: e
|
|
1410
920
|
});
|
|
1411
921
|
}
|
|
1412
|
-
function
|
|
1413
|
-
return e.framework ===
|
|
922
|
+
function D(e) {
|
|
923
|
+
return e.framework === A.GROUP;
|
|
1414
924
|
}
|
|
1415
|
-
function
|
|
1416
|
-
return !!e && Object.keys(e).length > 0 && Object.keys(e).every((
|
|
925
|
+
function Kr(e) {
|
|
926
|
+
return !!e && Object.keys(e).length > 0 && Object.keys(e).every((r) => !Zr(e[r]));
|
|
1417
927
|
}
|
|
1418
|
-
function
|
|
1419
|
-
return
|
|
928
|
+
function _r(e) {
|
|
929
|
+
return D(e) && Array.isArray(e.group) ? e.group.some((r) => _r(r)) : !Kr(e.individual);
|
|
1420
930
|
}
|
|
1421
|
-
function
|
|
1422
|
-
|
|
931
|
+
function hr(e) {
|
|
932
|
+
D(e) && Array.isArray(e.group) && e.group.length > 1 && e.group.forEach((r) => hr(r)), e.level = e.level - 1 < 0 ? 0 : e.level - 1;
|
|
1423
933
|
}
|
|
1424
|
-
function
|
|
1425
|
-
if (e._id ===
|
|
934
|
+
function z(e, r) {
|
|
935
|
+
if (e._id === r) return e;
|
|
1426
936
|
if (Array.isArray(e.group))
|
|
1427
|
-
for (const
|
|
1428
|
-
const n =
|
|
937
|
+
for (const t of e.group) {
|
|
938
|
+
const n = z(t, r);
|
|
1429
939
|
if (n) return n;
|
|
1430
940
|
}
|
|
1431
941
|
return null;
|
|
1432
942
|
}
|
|
1433
|
-
function
|
|
1434
|
-
const [
|
|
1435
|
-
|
|
1436
|
-
}, [
|
|
943
|
+
function Qr(e) {
|
|
944
|
+
const [r, t] = Xr(() => L()), n = w((l) => {
|
|
945
|
+
t(() => l);
|
|
946
|
+
}, [t]), i = G(() => {
|
|
1437
947
|
const l = Math.abs(Number(e.maxDeep ?? 1)) || 1;
|
|
1438
948
|
return Number(e.maxDeep ?? 1) < 1 && console.warn("[TConditionalSelection] Invalid props.maxDeep: maxDeep must be greater than 0."), l;
|
|
1439
|
-
}, [e.maxDeep]),
|
|
1440
|
-
var
|
|
1441
|
-
const l =
|
|
949
|
+
}, [e.maxDeep]), s = G(() => {
|
|
950
|
+
var y, d, u;
|
|
951
|
+
const l = dr(e.disabled);
|
|
1442
952
|
return {
|
|
1443
|
-
addItem: !!(l ? (
|
|
953
|
+
addItem: !!(l ? (y = e.disabled) != null && y.addItem : e.disabled),
|
|
1444
954
|
delItem: !!(l ? (d = e.disabled) != null && d.delItem : e.disabled),
|
|
1445
955
|
linkChange: !!(l ? (u = e.disabled) != null && u.linkChange : e.disabled)
|
|
1446
956
|
};
|
|
1447
|
-
}, [e.disabled]),
|
|
957
|
+
}, [e.disabled]), a = w(
|
|
1448
958
|
(l) => {
|
|
1449
|
-
|
|
1450
|
-
const d =
|
|
1451
|
-
d && Array.isArray(d.group) && d.group.push(
|
|
959
|
+
D(l) && t((y) => {
|
|
960
|
+
const d = z(y, l._id);
|
|
961
|
+
d && Array.isArray(d.group) && d.group.push(L(d.level + 1));
|
|
1452
962
|
});
|
|
1453
963
|
},
|
|
1454
|
-
[
|
|
1455
|
-
), c =
|
|
964
|
+
[t]
|
|
965
|
+
), c = w(
|
|
1456
966
|
(l) => {
|
|
1457
|
-
|
|
1458
|
-
const d =
|
|
967
|
+
t((y) => {
|
|
968
|
+
const d = z(y, l._id);
|
|
1459
969
|
if (d)
|
|
1460
|
-
if (d.framework ===
|
|
970
|
+
if (d.framework === A.INDIVIDUAL) {
|
|
1461
971
|
const u = {
|
|
1462
972
|
_id: crypto.randomUUID(),
|
|
1463
|
-
framework:
|
|
1464
|
-
individual:
|
|
973
|
+
framework: A.INDIVIDUAL,
|
|
974
|
+
individual: F(d.individual ?? {}),
|
|
1465
975
|
level: d.level + 1
|
|
1466
|
-
},
|
|
1467
|
-
d.framework =
|
|
976
|
+
}, h = L(d.level + 1);
|
|
977
|
+
d.framework = A.GROUP, d.link = N.AND, d._id = crypto.randomUUID(), d.group = [u, h], delete d.individual;
|
|
1468
978
|
} else
|
|
1469
|
-
Array.isArray(d.group) && d.group.push(
|
|
979
|
+
Array.isArray(d.group) && d.group.push(L(d.level + 1));
|
|
1470
980
|
});
|
|
1471
981
|
},
|
|
1472
|
-
[
|
|
1473
|
-
),
|
|
1474
|
-
|
|
1475
|
-
const u =
|
|
1476
|
-
if (!(!u || !Array.isArray(u.group)) && (u.group.splice(
|
|
1477
|
-
const
|
|
1478
|
-
|
|
982
|
+
[t]
|
|
983
|
+
), p = w((l, y) => {
|
|
984
|
+
t((d) => {
|
|
985
|
+
const u = z(d, l._id);
|
|
986
|
+
if (!(!u || !Array.isArray(u.group)) && (u.group.splice(y, 1), u.framework === A.GROUP && u.group.length === 1)) {
|
|
987
|
+
const h = u.group[0];
|
|
988
|
+
h.framework === A.GROUP && Array.isArray(h.group) && h.group.length > 1 ? (u.framework = A.GROUP, u.link = h.link, u._id = h._id, u.group = h.group, delete u.individual) : (u.framework = A.INDIVIDUAL, u._id = h._id, u.individual = F(h.individual ?? {}), delete u.link, delete u.group), hr(h);
|
|
1479
989
|
}
|
|
1480
990
|
});
|
|
1481
|
-
}, [
|
|
1482
|
-
(l = !0) => new Promise((
|
|
1483
|
-
if (l &&
|
|
991
|
+
}, [t]), g = w(
|
|
992
|
+
(l = !0) => new Promise((y, d) => {
|
|
993
|
+
if (l && _r(r)) {
|
|
1484
994
|
console.error("请填写完整"), d("含有未填写完整的项");
|
|
1485
995
|
return;
|
|
1486
996
|
}
|
|
1487
|
-
|
|
997
|
+
y(F(r));
|
|
1488
998
|
}),
|
|
1489
|
-
[
|
|
999
|
+
[r]
|
|
1490
1000
|
);
|
|
1491
1001
|
return {
|
|
1492
|
-
rulesData:
|
|
1002
|
+
rulesData: r,
|
|
1493
1003
|
setRulesData: n,
|
|
1494
|
-
level:
|
|
1495
|
-
disabledConfig:
|
|
1496
|
-
createRules:
|
|
1004
|
+
level: i,
|
|
1005
|
+
disabledConfig: s,
|
|
1006
|
+
createRules: a,
|
|
1497
1007
|
createChildRules: c,
|
|
1498
|
-
delRules:
|
|
1499
|
-
getConditionalSelectionData:
|
|
1500
|
-
isGroup:
|
|
1501
|
-
getTempRules:
|
|
1502
|
-
updateRulesData:
|
|
1008
|
+
delRules: p,
|
|
1009
|
+
getConditionalSelectionData: g,
|
|
1010
|
+
isGroup: D,
|
|
1011
|
+
getTempRules: L,
|
|
1012
|
+
updateRulesData: t
|
|
1503
1013
|
};
|
|
1504
1014
|
}
|
|
1505
|
-
function
|
|
1506
|
-
const
|
|
1507
|
-
let
|
|
1508
|
-
return !
|
|
1015
|
+
function tr(e, r) {
|
|
1016
|
+
const t = r.length - 1, n = r[t];
|
|
1017
|
+
let i = e === t;
|
|
1018
|
+
return !i && n && D(n) && (i = e === r.length - 2), i;
|
|
1509
1019
|
}
|
|
1510
|
-
const
|
|
1020
|
+
const mr = ({
|
|
1511
1021
|
levelData: e,
|
|
1512
|
-
level:
|
|
1513
|
-
disabledConfig:
|
|
1022
|
+
level: r,
|
|
1023
|
+
disabledConfig: t,
|
|
1514
1024
|
onUpdateNode: n,
|
|
1515
|
-
onCreateRules:
|
|
1516
|
-
onCreateChildRules:
|
|
1517
|
-
onDelRules:
|
|
1025
|
+
onCreateRules: i,
|
|
1026
|
+
onCreateChildRules: s,
|
|
1027
|
+
onDelRules: a,
|
|
1518
1028
|
renderConditionItem: c
|
|
1519
1029
|
}) => {
|
|
1520
|
-
const
|
|
1521
|
-
function
|
|
1030
|
+
const p = e.group;
|
|
1031
|
+
function g(l) {
|
|
1522
1032
|
n(e._id, { link: l });
|
|
1523
1033
|
}
|
|
1524
|
-
return /* @__PURE__ */
|
|
1525
|
-
/* @__PURE__ */
|
|
1526
|
-
|
|
1034
|
+
return /* @__PURE__ */ _.jsxs("div", { className: "relative-box", children: [
|
|
1035
|
+
/* @__PURE__ */ _.jsx(
|
|
1036
|
+
Ge,
|
|
1527
1037
|
{
|
|
1528
|
-
value: e.link ??
|
|
1529
|
-
disabled:
|
|
1530
|
-
onChange:
|
|
1038
|
+
value: e.link ?? N.AND,
|
|
1039
|
+
disabled: t.linkChange,
|
|
1040
|
+
onChange: g
|
|
1531
1041
|
}
|
|
1532
1042
|
),
|
|
1533
|
-
/* @__PURE__ */
|
|
1534
|
-
if (
|
|
1043
|
+
/* @__PURE__ */ _.jsx("div", { className: "conditional-list-box right-box", children: p.map((l, y) => {
|
|
1044
|
+
if (D(l)) {
|
|
1535
1045
|
const d = l.group;
|
|
1536
|
-
return /* @__PURE__ */
|
|
1537
|
-
/* @__PURE__ */
|
|
1538
|
-
|
|
1046
|
+
return /* @__PURE__ */ _.jsx("div", { className: "conditional-list", children: /* @__PURE__ */ _.jsxs("div", { className: "relative-box", children: [
|
|
1047
|
+
/* @__PURE__ */ _.jsx(
|
|
1048
|
+
Ge,
|
|
1539
1049
|
{
|
|
1540
|
-
value: l.link ??
|
|
1541
|
-
disabled:
|
|
1050
|
+
value: l.link ?? N.AND,
|
|
1051
|
+
disabled: t.linkChange,
|
|
1542
1052
|
onChange: (u) => n(l._id, { link: u })
|
|
1543
1053
|
}
|
|
1544
1054
|
),
|
|
1545
|
-
d.map((u,
|
|
1546
|
-
|
|
1055
|
+
d.map((u, h) => D(u) && u.group.length > 0 ? /* @__PURE__ */ _.jsx("div", { className: "conditional-item right-box", children: /* @__PURE__ */ _.jsx(
|
|
1056
|
+
mr,
|
|
1547
1057
|
{
|
|
1548
1058
|
levelData: u,
|
|
1549
|
-
level:
|
|
1550
|
-
disabledConfig:
|
|
1059
|
+
level: r,
|
|
1060
|
+
disabledConfig: t,
|
|
1551
1061
|
onUpdateNode: n,
|
|
1552
|
-
onCreateRules:
|
|
1553
|
-
onCreateChildRules:
|
|
1554
|
-
onDelRules:
|
|
1062
|
+
onCreateRules: i,
|
|
1063
|
+
onCreateChildRules: s,
|
|
1064
|
+
onDelRules: a,
|
|
1555
1065
|
renderConditionItem: c
|
|
1556
1066
|
}
|
|
1557
|
-
) }, u._id) : /* @__PURE__ */
|
|
1067
|
+
) }, u._id) : /* @__PURE__ */ _.jsxs("div", { className: "conditional-item right-box", children: [
|
|
1558
1068
|
c == null ? void 0 : c(u),
|
|
1559
|
-
/* @__PURE__ */
|
|
1560
|
-
|
|
1069
|
+
/* @__PURE__ */ _.jsx(
|
|
1070
|
+
qe,
|
|
1561
1071
|
{
|
|
1562
|
-
level:
|
|
1563
|
-
disabledConfig:
|
|
1072
|
+
level: r,
|
|
1073
|
+
disabledConfig: t,
|
|
1564
1074
|
currentItemInfo: u,
|
|
1565
|
-
isLast:
|
|
1566
|
-
onCreate: () =>
|
|
1567
|
-
onCreateChildRules: () =>
|
|
1568
|
-
onDel: () =>
|
|
1075
|
+
isLast: tr(h, d),
|
|
1076
|
+
onCreate: () => i(l),
|
|
1077
|
+
onCreateChildRules: () => s(u),
|
|
1078
|
+
onDel: () => a(l, h)
|
|
1569
1079
|
}
|
|
1570
1080
|
)
|
|
1571
1081
|
] }, u._id))
|
|
1572
1082
|
] }) }, l._id);
|
|
1573
1083
|
}
|
|
1574
|
-
return /* @__PURE__ */
|
|
1084
|
+
return /* @__PURE__ */ _.jsx("div", { className: "conditional-list", children: /* @__PURE__ */ _.jsxs("div", { className: "conditional-item", children: [
|
|
1575
1085
|
c == null ? void 0 : c(l),
|
|
1576
|
-
/* @__PURE__ */
|
|
1577
|
-
|
|
1086
|
+
/* @__PURE__ */ _.jsx(
|
|
1087
|
+
qe,
|
|
1578
1088
|
{
|
|
1579
|
-
level:
|
|
1580
|
-
disabledConfig:
|
|
1089
|
+
level: r,
|
|
1090
|
+
disabledConfig: t,
|
|
1581
1091
|
currentItemInfo: l,
|
|
1582
|
-
isLast:
|
|
1583
|
-
onCreate: () =>
|
|
1584
|
-
onCreateChildRules: () =>
|
|
1585
|
-
onDel: () =>
|
|
1092
|
+
isLast: tr(y, p),
|
|
1093
|
+
onCreate: () => i(e),
|
|
1094
|
+
onCreateChildRules: () => s(l),
|
|
1095
|
+
onDel: () => a(e, y)
|
|
1586
1096
|
}
|
|
1587
1097
|
)
|
|
1588
1098
|
] }) }, l._id);
|
|
1589
1099
|
}) })
|
|
1590
1100
|
] });
|
|
1591
|
-
},
|
|
1592
|
-
const { conditionalRules:
|
|
1593
|
-
|
|
1594
|
-
const
|
|
1595
|
-
|
|
1596
|
-
if (
|
|
1597
|
-
|
|
1101
|
+
}, et = Er((e, r) => {
|
|
1102
|
+
const { conditionalRules: t, onChange: n, renderConditionRules: i, renderCreateCondition: s } = e, { rulesData: a, setRulesData: c, level: p, disabledConfig: g, createRules: l, createChildRules: y, delRules: d, getConditionalSelectionData: u, updateRulesData: h } = Qr(e);
|
|
1103
|
+
Ar(r, () => ({ getConditionalSelectionData: u }), [u]);
|
|
1104
|
+
const Z = Sr(!0);
|
|
1105
|
+
Ve(() => {
|
|
1106
|
+
if (Z.current) {
|
|
1107
|
+
Z.current = !1;
|
|
1598
1108
|
return;
|
|
1599
1109
|
}
|
|
1600
|
-
n == null || n(
|
|
1601
|
-
}, [
|
|
1602
|
-
|
|
1110
|
+
n == null || n(a);
|
|
1111
|
+
}, [a]), Ve(() => {
|
|
1112
|
+
t && Object.keys(t).length !== 0 ? c(F(t)) : c(L());
|
|
1603
1113
|
}, []);
|
|
1604
|
-
const
|
|
1605
|
-
|
|
1606
|
-
const
|
|
1607
|
-
|
|
1114
|
+
const $ = w((E, S) => {
|
|
1115
|
+
h((T) => {
|
|
1116
|
+
const j = z(T, E);
|
|
1117
|
+
j && Object.assign(j, S);
|
|
1608
1118
|
});
|
|
1609
|
-
}, [
|
|
1610
|
-
(
|
|
1611
|
-
|
|
1612
|
-
const
|
|
1613
|
-
|
|
1119
|
+
}, [h]), pe = w(
|
|
1120
|
+
(E) => i == null ? void 0 : i(E, (S) => {
|
|
1121
|
+
h((T) => {
|
|
1122
|
+
const j = z(T, E._id);
|
|
1123
|
+
j && (j.individual = S);
|
|
1614
1124
|
});
|
|
1615
1125
|
}),
|
|
1616
|
-
[
|
|
1617
|
-
),
|
|
1618
|
-
(
|
|
1619
|
-
[
|
|
1126
|
+
[i, h]
|
|
1127
|
+
), ye = w(
|
|
1128
|
+
(E, S) => i == null ? void 0 : i(E, S),
|
|
1129
|
+
[i]
|
|
1620
1130
|
);
|
|
1621
|
-
return /* @__PURE__ */
|
|
1622
|
-
!
|
|
1623
|
-
/* @__PURE__ */
|
|
1131
|
+
return /* @__PURE__ */ _.jsxs("div", { className: "conditional-selection", children: [
|
|
1132
|
+
!g.addItem && (s ? s({ createRules: y, rulesData: a }) : /* @__PURE__ */ _.jsxs("span", { className: "create-box", onClick: () => y(a), children: [
|
|
1133
|
+
/* @__PURE__ */ _.jsx("span", { style: { color: "#00c8be", marginRight: 4 }, children: "➕" }),
|
|
1624
1134
|
"添加条件"
|
|
1625
1135
|
] })),
|
|
1626
|
-
/* @__PURE__ */
|
|
1627
|
-
|
|
1136
|
+
/* @__PURE__ */ _.jsx("div", { className: "conditional-content", children: D(a) && a.group.length > 0 ? /* @__PURE__ */ _.jsx(
|
|
1137
|
+
mr,
|
|
1628
1138
|
{
|
|
1629
|
-
levelData:
|
|
1630
|
-
level:
|
|
1631
|
-
disabledConfig:
|
|
1632
|
-
onUpdateNode:
|
|
1139
|
+
levelData: a,
|
|
1140
|
+
level: p,
|
|
1141
|
+
disabledConfig: g,
|
|
1142
|
+
onUpdateNode: $,
|
|
1633
1143
|
onCreateRules: l,
|
|
1634
|
-
onCreateChildRules:
|
|
1144
|
+
onCreateChildRules: y,
|
|
1635
1145
|
onDelRules: d,
|
|
1636
|
-
renderConditionItem:
|
|
1146
|
+
renderConditionItem: pe
|
|
1637
1147
|
}
|
|
1638
|
-
) :
|
|
1639
|
-
|
|
1640
|
-
const
|
|
1641
|
-
|
|
1148
|
+
) : ye(a, (E) => {
|
|
1149
|
+
h((S) => {
|
|
1150
|
+
const T = z(S, a._id);
|
|
1151
|
+
T && (T.individual = E);
|
|
1642
1152
|
});
|
|
1643
1153
|
}) })
|
|
1644
1154
|
] });
|
|
1645
1155
|
});
|
|
1646
|
-
|
|
1156
|
+
et.displayName = "ConditionalSelection";
|
|
1647
1157
|
export {
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1158
|
+
et as ConditionalSelection,
|
|
1159
|
+
A as EConditionalSelectionFramework,
|
|
1160
|
+
N as EConditionalSelectionLink
|
|
1651
1161
|
};
|