finform-react-builder 1.7.0 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +905 -899
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +20 -20
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -175,7 +175,7 @@ function Qc(e) {
|
|
|
175
175
|
name: r
|
|
176
176
|
},
|
|
177
177
|
type: ni.CHANGE
|
|
178
|
-
}), [r]),
|
|
178
|
+
}), [r]), b = be.useCallback(() => u.current.onBlur({
|
|
179
179
|
target: {
|
|
180
180
|
value: G(i._formValues, r),
|
|
181
181
|
name: r
|
|
@@ -194,9 +194,9 @@ function Qc(e) {
|
|
|
194
194
|
value: o,
|
|
195
195
|
...at(n) || l.disabled ? { disabled: l.disabled || n } : {},
|
|
196
196
|
onChange: m,
|
|
197
|
-
onBlur:
|
|
197
|
+
onBlur: b,
|
|
198
198
|
ref: x
|
|
199
|
-
}), [r, n, l.disabled, m,
|
|
199
|
+
}), [r, n, l.disabled, m, b, x, o]);
|
|
200
200
|
return be.useEffect(() => {
|
|
201
201
|
const S = i._options.shouldUnregister || a;
|
|
202
202
|
i.register(r, {
|
|
@@ -431,85 +431,85 @@ var Rr = (e) => Ve(e) && !si(e) ? e : {
|
|
|
431
431
|
value: e,
|
|
432
432
|
message: ""
|
|
433
433
|
}, ys = async (e, t, r, n, i, a) => {
|
|
434
|
-
const { ref: s, refs: o, required: l, maxLength: f, minLength: u, min: p, max: m, pattern:
|
|
434
|
+
const { ref: s, refs: o, required: l, maxLength: f, minLength: u, min: p, max: m, pattern: b, validate: x, name: c, valueAsNumber: S, mount: y } = e._f, C = G(r, c);
|
|
435
435
|
if (!y || t.has(c))
|
|
436
436
|
return {};
|
|
437
437
|
const A = o ? o[0] : s, _ = (D) => {
|
|
438
438
|
i && A.reportValidity && (A.setCustomValidity(at(D) ? "" : D || ""), A.reportValidity());
|
|
439
|
-
},
|
|
440
|
-
const de = D ? L :
|
|
441
|
-
|
|
439
|
+
}, v = {}, z = Ia(s), F = An(s), Z = z || F, B = (S || Pa(s)) && ze(s.value) && ze(C) || ii(s) && s.value === "" || C === "" || Array.isArray(C) && !C.length, d = nl.bind(null, c, n, v), j = (D, L, V, K = It.maxLength, ee = It.minLength) => {
|
|
440
|
+
const de = D ? L : V;
|
|
441
|
+
v[c] = {
|
|
442
442
|
type: D ? K : ee,
|
|
443
443
|
message: de,
|
|
444
444
|
ref: s,
|
|
445
445
|
...d(D ? K : ee, de)
|
|
446
446
|
};
|
|
447
447
|
};
|
|
448
|
-
if (a ? !Array.isArray(C) || !C.length : l && (!
|
|
448
|
+
if (a ? !Array.isArray(C) || !C.length : l && (!Z && (B || Ze(C)) || at(C) && !C || F && !ol(o).isValid || z && !cl(o).isValid)) {
|
|
449
449
|
const { value: D, message: L } = Zn(l) ? { value: !!l, message: l } : Rr(l);
|
|
450
|
-
if (D && (
|
|
450
|
+
if (D && (v[c] = {
|
|
451
451
|
type: It.required,
|
|
452
452
|
message: L,
|
|
453
453
|
ref: A,
|
|
454
454
|
...d(It.required, L)
|
|
455
455
|
}, !n))
|
|
456
|
-
return _(L),
|
|
456
|
+
return _(L), v;
|
|
457
457
|
}
|
|
458
|
-
if (!
|
|
458
|
+
if (!B && (!Ze(p) || !Ze(m))) {
|
|
459
459
|
let D, L;
|
|
460
|
-
const
|
|
460
|
+
const V = Rr(m), K = Rr(p);
|
|
461
461
|
if (!Ze(C) && !isNaN(C)) {
|
|
462
462
|
const ee = s.valueAsNumber || C && +C;
|
|
463
|
-
Ze(
|
|
463
|
+
Ze(V.value) || (D = ee > V.value), Ze(K.value) || (L = ee < K.value);
|
|
464
464
|
} else {
|
|
465
465
|
const ee = s.valueAsDate || new Date(C), de = (M) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + M), oe = s.type == "time", ae = s.type == "week";
|
|
466
|
-
$t(
|
|
466
|
+
$t(V.value) && C && (D = oe ? de(C) > de(V.value) : ae ? C > V.value : ee > new Date(V.value)), $t(K.value) && C && (L = oe ? de(C) < de(K.value) : ae ? C < K.value : ee < new Date(K.value));
|
|
467
467
|
}
|
|
468
|
-
if ((D || L) && (j(!!D,
|
|
469
|
-
return _(
|
|
468
|
+
if ((D || L) && (j(!!D, V.message, K.message, It.max, It.min), !n))
|
|
469
|
+
return _(v[c].message), v;
|
|
470
470
|
}
|
|
471
|
-
if ((f || u) && !
|
|
472
|
-
const D = Rr(f), L = Rr(u),
|
|
473
|
-
if ((
|
|
474
|
-
return _(
|
|
471
|
+
if ((f || u) && !B && ($t(C) || a && Array.isArray(C))) {
|
|
472
|
+
const D = Rr(f), L = Rr(u), V = !Ze(D.value) && C.length > +D.value, K = !Ze(L.value) && C.length < +L.value;
|
|
473
|
+
if ((V || K) && (j(V, D.message, L.message), !n))
|
|
474
|
+
return _(v[c].message), v;
|
|
475
475
|
}
|
|
476
|
-
if (
|
|
477
|
-
const { value: D, message: L } = Rr(
|
|
478
|
-
if (si(D) && !C.match(D) && (
|
|
476
|
+
if (b && !B && $t(C)) {
|
|
477
|
+
const { value: D, message: L } = Rr(b);
|
|
478
|
+
if (si(D) && !C.match(D) && (v[c] = {
|
|
479
479
|
type: It.pattern,
|
|
480
480
|
message: L,
|
|
481
481
|
ref: s,
|
|
482
482
|
...d(It.pattern, L)
|
|
483
483
|
}, !n))
|
|
484
|
-
return _(L),
|
|
484
|
+
return _(L), v;
|
|
485
485
|
}
|
|
486
486
|
if (x) {
|
|
487
487
|
if (xt(x)) {
|
|
488
488
|
const D = await x(C, r), L = hs(D, A);
|
|
489
|
-
if (L && (
|
|
489
|
+
if (L && (v[c] = {
|
|
490
490
|
...L,
|
|
491
491
|
...d(It.validate, L.message)
|
|
492
492
|
}, !n))
|
|
493
|
-
return _(L.message),
|
|
493
|
+
return _(L.message), v;
|
|
494
494
|
} else if (Ve(x)) {
|
|
495
495
|
let D = {};
|
|
496
496
|
for (const L in x) {
|
|
497
497
|
if (!tt(D) && !n)
|
|
498
498
|
break;
|
|
499
|
-
const
|
|
500
|
-
|
|
501
|
-
...
|
|
502
|
-
...d(L,
|
|
503
|
-
}, _(
|
|
499
|
+
const V = hs(await x[L](C, r), A, L);
|
|
500
|
+
V && (D = {
|
|
501
|
+
...V,
|
|
502
|
+
...d(L, V.message)
|
|
503
|
+
}, _(V.message), n && (v[c] = D));
|
|
504
504
|
}
|
|
505
|
-
if (!tt(D) && (
|
|
505
|
+
if (!tt(D) && (v[c] = {
|
|
506
506
|
ref: A,
|
|
507
507
|
...D
|
|
508
508
|
}, !n))
|
|
509
|
-
return
|
|
509
|
+
return v;
|
|
510
510
|
}
|
|
511
511
|
}
|
|
512
|
-
return _(!0),
|
|
512
|
+
return _(!0), v;
|
|
513
513
|
};
|
|
514
514
|
const su = {
|
|
515
515
|
mode: bt.onSubmit,
|
|
@@ -563,11 +563,11 @@ function ou(e = {}) {
|
|
|
563
563
|
const m = {
|
|
564
564
|
array: ss(),
|
|
565
565
|
state: ss()
|
|
566
|
-
},
|
|
566
|
+
}, b = t.criteriaMode === bt.all, x = (h) => (k) => {
|
|
567
567
|
clearTimeout(f), f = setTimeout(h, k);
|
|
568
568
|
}, c = async (h) => {
|
|
569
569
|
if (!t.disabled && (u.isValid || p.isValid || h)) {
|
|
570
|
-
const k = t.resolver ? tt((await
|
|
570
|
+
const k = t.resolver ? tt((await F()).errors) : await B(n, !0);
|
|
571
571
|
k !== r.isValid && m.state.next({
|
|
572
572
|
isValid: k
|
|
573
573
|
});
|
|
@@ -579,19 +579,19 @@ function ou(e = {}) {
|
|
|
579
579
|
validatingFields: r.validatingFields,
|
|
580
580
|
isValidating: !tt(r.validatingFields)
|
|
581
581
|
}));
|
|
582
|
-
}, y = (h, k = [], T, Y, O = !0,
|
|
582
|
+
}, y = (h, k = [], T, Y, O = !0, R = !0) => {
|
|
583
583
|
if (Y && T && !t.disabled) {
|
|
584
|
-
if (s.action = !0,
|
|
585
|
-
const
|
|
586
|
-
O && Se(n, h,
|
|
584
|
+
if (s.action = !0, R && Array.isArray(G(n, h))) {
|
|
585
|
+
const X = T(G(n, h), Y.argA, Y.argB);
|
|
586
|
+
O && Se(n, h, X);
|
|
587
587
|
}
|
|
588
|
-
if (
|
|
589
|
-
const
|
|
590
|
-
O && Se(r.errors, h,
|
|
588
|
+
if (R && Array.isArray(G(r.errors, h))) {
|
|
589
|
+
const X = T(G(r.errors, h), Y.argA, Y.argB);
|
|
590
|
+
O && Se(r.errors, h, X), iu(r.errors, h);
|
|
591
591
|
}
|
|
592
|
-
if ((u.touchedFields || p.touchedFields) &&
|
|
593
|
-
const
|
|
594
|
-
O && Se(r.touchedFields, h,
|
|
592
|
+
if ((u.touchedFields || p.touchedFields) && R && Array.isArray(G(r.touchedFields, h))) {
|
|
593
|
+
const X = T(G(r.touchedFields, h), Y.argA, Y.argB);
|
|
594
|
+
O && Se(r.touchedFields, h, X);
|
|
595
595
|
}
|
|
596
596
|
(u.dirtyFields || p.dirtyFields) && (r.dirtyFields = cn(i, a)), m.state.next({
|
|
597
597
|
name: h,
|
|
@@ -614,47 +614,47 @@ function ou(e = {}) {
|
|
|
614
614
|
}, _ = (h, k, T, Y) => {
|
|
615
615
|
const O = G(n, h);
|
|
616
616
|
if (O) {
|
|
617
|
-
const
|
|
618
|
-
ze(
|
|
617
|
+
const R = G(a, h, ze(T) ? G(i, h) : T);
|
|
618
|
+
ze(R) || Y && Y.defaultChecked || k ? Se(a, h, k ? R : us(O._f)) : V(h, R), s.mount && c();
|
|
619
619
|
}
|
|
620
|
-
},
|
|
621
|
-
let
|
|
620
|
+
}, v = (h, k, T, Y, O) => {
|
|
621
|
+
let R = !1, X = !1;
|
|
622
622
|
const ue = {
|
|
623
623
|
name: h
|
|
624
624
|
};
|
|
625
625
|
if (!t.disabled) {
|
|
626
626
|
if (!T || Y) {
|
|
627
|
-
(u.isDirty || p.isDirty) && (
|
|
627
|
+
(u.isDirty || p.isDirty) && (X = r.isDirty, r.isDirty = ue.isDirty = j(), R = X !== ue.isDirty);
|
|
628
628
|
const fe = Ht(G(i, h), k);
|
|
629
|
-
|
|
629
|
+
X = !!G(r.dirtyFields, h), fe ? qe(r.dirtyFields, h) : Se(r.dirtyFields, h, !0), ue.dirtyFields = r.dirtyFields, R = R || (u.dirtyFields || p.dirtyFields) && X !== !fe;
|
|
630
630
|
}
|
|
631
631
|
if (T) {
|
|
632
632
|
const fe = G(r.touchedFields, h);
|
|
633
|
-
fe || (Se(r.touchedFields, h, T), ue.touchedFields = r.touchedFields,
|
|
633
|
+
fe || (Se(r.touchedFields, h, T), ue.touchedFields = r.touchedFields, R = R || (u.touchedFields || p.touchedFields) && fe !== T);
|
|
634
634
|
}
|
|
635
|
-
|
|
635
|
+
R && O && m.state.next(ue);
|
|
636
636
|
}
|
|
637
|
-
return
|
|
638
|
-
},
|
|
639
|
-
const O = G(r.errors, h),
|
|
640
|
-
if (t.delayError && T ? (l = x(() => C(h, T)), l(t.delayError)) : (clearTimeout(f), l = null, T ? Se(r.errors, h, T) : qe(r.errors, h)), (T ? !Ht(O, T) : O) || !tt(Y) ||
|
|
641
|
-
const
|
|
637
|
+
return R ? ue : {};
|
|
638
|
+
}, z = (h, k, T, Y) => {
|
|
639
|
+
const O = G(r.errors, h), R = (u.isValid || p.isValid) && at(k) && r.isValid !== k;
|
|
640
|
+
if (t.delayError && T ? (l = x(() => C(h, T)), l(t.delayError)) : (clearTimeout(f), l = null, T ? Se(r.errors, h, T) : qe(r.errors, h)), (T ? !Ht(O, T) : O) || !tt(Y) || R) {
|
|
641
|
+
const X = {
|
|
642
642
|
...Y,
|
|
643
|
-
...
|
|
643
|
+
...R && at(k) ? { isValid: k } : {},
|
|
644
644
|
errors: r.errors,
|
|
645
645
|
name: h
|
|
646
646
|
};
|
|
647
647
|
r = {
|
|
648
648
|
...r,
|
|
649
|
-
...
|
|
650
|
-
}, m.state.next(
|
|
649
|
+
...X
|
|
650
|
+
}, m.state.next(X);
|
|
651
651
|
}
|
|
652
|
-
},
|
|
652
|
+
}, F = async (h) => {
|
|
653
653
|
S(h, !0);
|
|
654
654
|
const k = await t.resolver(a, t.context, Xc(h || o.mount, n, t.criteriaMode, t.shouldUseNativeValidation));
|
|
655
655
|
return S(h), k;
|
|
656
|
-
},
|
|
657
|
-
const { errors: k } = await
|
|
656
|
+
}, Z = async (h) => {
|
|
657
|
+
const { errors: k } = await F(h);
|
|
658
658
|
if (h)
|
|
659
659
|
for (const T of h) {
|
|
660
660
|
const Y = G(k, T);
|
|
@@ -663,63 +663,63 @@ function ou(e = {}) {
|
|
|
663
663
|
else
|
|
664
664
|
r.errors = k;
|
|
665
665
|
return k;
|
|
666
|
-
},
|
|
666
|
+
}, B = async (h, k, T = {
|
|
667
667
|
valid: !0
|
|
668
668
|
}) => {
|
|
669
669
|
for (const Y in h) {
|
|
670
670
|
const O = h[Y];
|
|
671
671
|
if (O) {
|
|
672
|
-
const { _f:
|
|
673
|
-
if (
|
|
674
|
-
const ue = o.array.has(
|
|
672
|
+
const { _f: R, ...X } = O;
|
|
673
|
+
if (R) {
|
|
674
|
+
const ue = o.array.has(R.name), fe = O._f && Jc(O._f);
|
|
675
675
|
fe && u.validatingFields && S([Y], !0);
|
|
676
|
-
const Ue = await ys(O, o.disabled, a,
|
|
677
|
-
if (fe && u.validatingFields && S([Y]), Ue[
|
|
676
|
+
const Ue = await ys(O, o.disabled, a, b, t.shouldUseNativeValidation && !k, ue);
|
|
677
|
+
if (fe && u.validatingFields && S([Y]), Ue[R.name] && (T.valid = !1, k))
|
|
678
678
|
break;
|
|
679
|
-
!k && (G(Ue,
|
|
679
|
+
!k && (G(Ue, R.name) ? ue ? au(r.errors, Ue, R.name) : Se(r.errors, R.name, Ue[R.name]) : qe(r.errors, R.name));
|
|
680
680
|
}
|
|
681
|
-
!tt(
|
|
681
|
+
!tt(X) && await B(X, k, T);
|
|
682
682
|
}
|
|
683
683
|
}
|
|
684
684
|
return T.valid;
|
|
685
685
|
}, d = () => {
|
|
686
686
|
for (const h of o.unMount) {
|
|
687
687
|
const k = G(n, h);
|
|
688
|
-
k && (k._f.refs ? k._f.refs.every((T) => !Ii(T)) : !Ii(k._f.ref)) &&
|
|
688
|
+
k && (k._f.refs ? k._f.refs.every((T) => !Ii(T)) : !Ii(k._f.ref)) && W(h);
|
|
689
689
|
}
|
|
690
690
|
o.unMount = /* @__PURE__ */ new Set();
|
|
691
691
|
}, j = (h, k) => !t.disabled && (h && k && Se(a, h, k), !Ht(M(), i)), D = (h, k, T) => rl(h, o, {
|
|
692
692
|
...s.mount ? a : ze(k) ? i : $t(h) ? { [h]: k } : k
|
|
693
|
-
}, T, k), L = (h) => Fa(G(s.mount ? a : i, h, t.shouldUnregister ? G(i, h, []) : [])),
|
|
693
|
+
}, T, k), L = (h) => Fa(G(s.mount ? a : i, h, t.shouldUnregister ? G(i, h, []) : [])), V = (h, k, T = {}) => {
|
|
694
694
|
const Y = G(n, h);
|
|
695
695
|
let O = k;
|
|
696
696
|
if (Y) {
|
|
697
|
-
const
|
|
698
|
-
|
|
699
|
-
(!
|
|
700
|
-
}) :
|
|
697
|
+
const R = Y._f;
|
|
698
|
+
R && (!R.disabled && Se(a, h, ll(k, R)), O = ii(R.ref) && Ze(k) ? "" : k, il(R.ref) ? [...R.ref.options].forEach((X) => X.selected = O.includes(X.value)) : R.refs ? An(R.ref) ? R.refs.forEach((X) => {
|
|
699
|
+
(!X.defaultChecked || !X.disabled) && (Array.isArray(O) ? X.checked = !!O.find((ue) => ue === X.value) : X.checked = O === X.value || !!O);
|
|
700
|
+
}) : R.refs.forEach((X) => X.checked = X.value === O) : Pa(R.ref) ? R.ref.value = "" : (R.ref.value = O, R.ref.type || m.state.next({
|
|
701
701
|
name: h,
|
|
702
702
|
values: We(a)
|
|
703
703
|
})));
|
|
704
704
|
}
|
|
705
|
-
(T.shouldDirty || T.shouldTouch) &&
|
|
705
|
+
(T.shouldDirty || T.shouldTouch) && v(h, O, T.shouldTouch, T.shouldDirty, !0), T.shouldValidate && ae(h);
|
|
706
706
|
}, K = (h, k, T) => {
|
|
707
707
|
for (const Y in k) {
|
|
708
708
|
if (!k.hasOwnProperty(Y))
|
|
709
709
|
return;
|
|
710
|
-
const O = k[Y],
|
|
711
|
-
(o.array.has(h) || Ve(O) ||
|
|
710
|
+
const O = k[Y], R = h + "." + Y, X = G(n, R);
|
|
711
|
+
(o.array.has(h) || Ve(O) || X && !X._f) && !pr(O) ? K(R, O, T) : V(R, O, T);
|
|
712
712
|
}
|
|
713
713
|
}, ee = (h, k, T = {}) => {
|
|
714
|
-
const Y = G(n, h), O = o.array.has(h),
|
|
715
|
-
Se(a, h,
|
|
714
|
+
const Y = G(n, h), O = o.array.has(h), R = We(k);
|
|
715
|
+
Se(a, h, R), O ? (m.array.next({
|
|
716
716
|
name: h,
|
|
717
717
|
values: We(a)
|
|
718
718
|
}), (u.isDirty || u.dirtyFields || p.isDirty || p.dirtyFields) && T.shouldDirty && m.state.next({
|
|
719
719
|
name: h,
|
|
720
720
|
dirtyFields: cn(i, a),
|
|
721
|
-
isDirty: j(h,
|
|
722
|
-
})) : Y && !Y._f && !Ze(
|
|
721
|
+
isDirty: j(h, R)
|
|
722
|
+
})) : Y && !Y._f && !Ze(R) ? K(h, R, T) : V(h, R, T), fs(h, o) && m.state.next({ ...r }), m.state.next({
|
|
723
723
|
name: s.mount ? h : void 0,
|
|
724
724
|
values: We(a)
|
|
725
725
|
});
|
|
@@ -727,14 +727,14 @@ function ou(e = {}) {
|
|
|
727
727
|
s.mount = !0;
|
|
728
728
|
const k = h.target;
|
|
729
729
|
let T = k.name, Y = !0;
|
|
730
|
-
const O = G(n, T),
|
|
730
|
+
const O = G(n, T), R = (fe) => {
|
|
731
731
|
Y = Number.isNaN(fe) || pr(fe) && isNaN(fe.getTime()) || Ht(fe, G(a, T, fe));
|
|
732
|
-
},
|
|
732
|
+
}, X = ps(t.mode), ue = ps(t.reValidateMode);
|
|
733
733
|
if (O) {
|
|
734
734
|
let fe, Ue;
|
|
735
|
-
const yt = k.type ? us(O._f) : Xo(h), ct = h.type === ni.BLUR || h.type === ni.FOCUS_OUT, nn = !eu(O._f) && !t.resolver && !G(r.errors, T) && !O._f.deps || nu(ct, G(r.touchedFields, T), r.isSubmitted, ue,
|
|
735
|
+
const yt = k.type ? us(O._f) : Xo(h), ct = h.type === ni.BLUR || h.type === ni.FOCUS_OUT, nn = !eu(O._f) && !t.resolver && !G(r.errors, T) && !O._f.deps || nu(ct, G(r.touchedFields, T), r.isSubmitted, ue, X), lr = fs(T, o, ct);
|
|
736
736
|
Se(a, T, yt), ct ? (O._f.onBlur && O._f.onBlur(h), l && l(0)) : O._f.onChange && O._f.onChange(h);
|
|
737
|
-
const Bt =
|
|
737
|
+
const Bt = v(T, yt, ct), an = !tt(Bt) || lr;
|
|
738
738
|
if (!ct && m.state.next({
|
|
739
739
|
name: T,
|
|
740
740
|
type: h.type,
|
|
@@ -742,14 +742,14 @@ function ou(e = {}) {
|
|
|
742
742
|
}), nn)
|
|
743
743
|
return (u.isValid || p.isValid) && (t.mode === "onBlur" ? ct && c() : ct || c()), an && m.state.next({ name: T, ...lr ? {} : Bt });
|
|
744
744
|
if (!ct && lr && m.state.next({ ...r }), t.resolver) {
|
|
745
|
-
const { errors: Ar } = await
|
|
746
|
-
if (
|
|
745
|
+
const { errors: Ar } = await F([T]);
|
|
746
|
+
if (R(yt), Y) {
|
|
747
747
|
const sn = ms(r.errors, n, T), Fr = ms(Ar, n, sn.name || T);
|
|
748
748
|
fe = Fr.error, T = Fr.name, Ue = tt(Ar);
|
|
749
749
|
}
|
|
750
750
|
} else
|
|
751
|
-
S([T], !0), fe = (await ys(O, o.disabled, a,
|
|
752
|
-
Y && (O._f.deps && ae(O._f.deps),
|
|
751
|
+
S([T], !0), fe = (await ys(O, o.disabled, a, b, t.shouldUseNativeValidation))[T], S([T]), R(yt), Y && (fe ? Ue = !1 : (u.isValid || p.isValid) && (Ue = await B(n, !0)));
|
|
752
|
+
Y && (O._f.deps && ae(O._f.deps), z(T, Ue, fe, Bt));
|
|
753
753
|
}
|
|
754
754
|
}, oe = (h, k) => {
|
|
755
755
|
if (G(r.errors, k) && h.focus)
|
|
@@ -758,12 +758,12 @@ function ou(e = {}) {
|
|
|
758
758
|
let T, Y;
|
|
759
759
|
const O = yn(h);
|
|
760
760
|
if (t.resolver) {
|
|
761
|
-
const
|
|
762
|
-
T = tt(
|
|
763
|
-
} else h ? (Y = (await Promise.all(O.map(async (
|
|
764
|
-
const
|
|
765
|
-
return await
|
|
766
|
-
}))).every(Boolean), !(!Y && !r.isValid) && c()) : Y = T = await
|
|
761
|
+
const R = await Z(ze(h) ? h : O);
|
|
762
|
+
T = tt(R), Y = h ? !O.some((X) => G(R, X)) : T;
|
|
763
|
+
} else h ? (Y = (await Promise.all(O.map(async (R) => {
|
|
764
|
+
const X = G(n, R);
|
|
765
|
+
return await B(X && X._f ? { [R]: X } : X);
|
|
766
|
+
}))).every(Boolean), !(!Y && !r.isValid) && c()) : Y = T = await B(n);
|
|
767
767
|
return m.state.next({
|
|
768
768
|
...!$t(h) || (u.isValid || p.isValid) && T !== r.isValid ? {} : { name: h },
|
|
769
769
|
...t.resolver || !h ? { isValid: T } : {},
|
|
@@ -774,7 +774,7 @@ function ou(e = {}) {
|
|
|
774
774
|
...s.mount ? a : i
|
|
775
775
|
};
|
|
776
776
|
return ze(h) ? k : $t(h) ? G(k, h) : h.map((T) => G(k, T));
|
|
777
|
-
},
|
|
777
|
+
}, q = (h, k) => ({
|
|
778
778
|
invalid: !!G((k || r).errors, h),
|
|
779
779
|
isDirty: !!G((k || r).dirtyFields, h),
|
|
780
780
|
error: G((k || r).errors, h),
|
|
@@ -785,7 +785,7 @@ function ou(e = {}) {
|
|
|
785
785
|
errors: h ? r.errors : {}
|
|
786
786
|
});
|
|
787
787
|
}, H = (h, k, T) => {
|
|
788
|
-
const Y = (G(n, h, { _f: {} })._f || {}).ref, O = G(r.errors, h) || {}, { ref:
|
|
788
|
+
const Y = (G(n, h, { _f: {} })._f || {}).ref, O = G(r.errors, h) || {}, { ref: R, message: X, type: ue, ...fe } = O;
|
|
789
789
|
Se(r.errors, h, {
|
|
790
790
|
...fe,
|
|
791
791
|
...k,
|
|
@@ -805,13 +805,13 @@ function ou(e = {}) {
|
|
|
805
805
|
...k
|
|
806
806
|
});
|
|
807
807
|
}
|
|
808
|
-
}).unsubscribe,
|
|
808
|
+
}).unsubscribe, U = (h) => (s.mount = !0, p = {
|
|
809
809
|
...p,
|
|
810
810
|
...h.formState
|
|
811
811
|
}, se({
|
|
812
812
|
...h,
|
|
813
813
|
formState: p
|
|
814
|
-
})),
|
|
814
|
+
})), W = (h, k = {}) => {
|
|
815
815
|
for (const T of h ? yn(h) : o.mount)
|
|
816
816
|
o.mount.delete(T), o.array.delete(T), k.keepValue || (qe(n, T), qe(a, T)), !k.keepError && qe(r.errors, T), !k.keepDirty && qe(r.dirtyFields, T), !k.keepTouched && qe(r.touchedFields, T), !k.keepIsValidating && qe(r.validatingFields, T), !t.shouldUnregister && !k.keepDefaultValue && qe(i, T);
|
|
817
817
|
m.state.next({
|
|
@@ -852,22 +852,22 @@ function ou(e = {}) {
|
|
|
852
852
|
ref: (O) => {
|
|
853
853
|
if (O) {
|
|
854
854
|
ce(h, k), T = G(n, h);
|
|
855
|
-
const
|
|
856
|
-
if (
|
|
855
|
+
const R = ze(O.value) && O.querySelectorAll && O.querySelectorAll("input,select,textarea")[0] || O, X = Yc(R), ue = T._f.refs || [];
|
|
856
|
+
if (X ? ue.find((fe) => fe === R) : R === T._f.ref)
|
|
857
857
|
return;
|
|
858
858
|
Se(n, h, {
|
|
859
859
|
_f: {
|
|
860
860
|
...T._f,
|
|
861
|
-
...
|
|
861
|
+
...X ? {
|
|
862
862
|
refs: [
|
|
863
863
|
...ue.filter(Ii),
|
|
864
|
-
|
|
864
|
+
R,
|
|
865
865
|
...Array.isArray(G(i, h)) ? [{}] : []
|
|
866
866
|
],
|
|
867
|
-
ref: { type:
|
|
868
|
-
} : { ref:
|
|
867
|
+
ref: { type: R.type, name: h }
|
|
868
|
+
} : { ref: R }
|
|
869
869
|
}
|
|
870
|
-
}), _(h, !1, void 0,
|
|
870
|
+
}), _(h, !1, void 0, R);
|
|
871
871
|
} else
|
|
872
872
|
T = G(n, h, {}), T._f && (T._f.mount = !1), (t.shouldUnregister || k.shouldUnregister) && !(Jo(o.array, h) && s.action) && o.unMount.add(h);
|
|
873
873
|
}
|
|
@@ -886,21 +886,21 @@ function ou(e = {}) {
|
|
|
886
886
|
if (m.state.next({
|
|
887
887
|
isSubmitting: !0
|
|
888
888
|
}), t.resolver) {
|
|
889
|
-
const { errors:
|
|
890
|
-
r.errors =
|
|
889
|
+
const { errors: R, values: X } = await F();
|
|
890
|
+
r.errors = R, O = X;
|
|
891
891
|
} else
|
|
892
|
-
await
|
|
892
|
+
await B(n);
|
|
893
893
|
if (o.disabled.size)
|
|
894
|
-
for (const
|
|
895
|
-
Se(O,
|
|
894
|
+
for (const R of o.disabled)
|
|
895
|
+
Se(O, R, void 0);
|
|
896
896
|
if (qe(r.errors, "root"), tt(r.errors)) {
|
|
897
897
|
m.state.next({
|
|
898
898
|
errors: {}
|
|
899
899
|
});
|
|
900
900
|
try {
|
|
901
901
|
await h(O, T);
|
|
902
|
-
} catch (
|
|
903
|
-
Y =
|
|
902
|
+
} catch (R) {
|
|
903
|
+
Y = R;
|
|
904
904
|
}
|
|
905
905
|
} else
|
|
906
906
|
k && await k({ ...r.errors }, T), I(), setTimeout(I);
|
|
@@ -912,22 +912,22 @@ function ou(e = {}) {
|
|
|
912
912
|
errors: r.errors
|
|
913
913
|
}), Y)
|
|
914
914
|
throw Y;
|
|
915
|
-
},
|
|
915
|
+
}, N = (h, k = {}) => {
|
|
916
916
|
G(n, h) && (ze(k.defaultValue) ? ee(h, We(G(i, h))) : (ee(h, k.defaultValue), Se(i, h, We(k.defaultValue))), k.keepTouched || qe(r.touchedFields, h), k.keepDirty || (qe(r.dirtyFields, h), r.isDirty = k.defaultValue ? j(h, We(G(i, h))) : j()), k.keepError || (qe(r.errors, h), u.isValid && c()), m.state.next({ ...r }));
|
|
917
917
|
}, Q = (h, k = {}) => {
|
|
918
|
-
const T = h ? We(h) : i, Y = We(T), O = tt(h),
|
|
918
|
+
const T = h ? We(h) : i, Y = We(T), O = tt(h), R = O ? i : Y;
|
|
919
919
|
if (k.keepDefaultValues || (i = T), !k.keepValues) {
|
|
920
920
|
if (k.keepDirtyValues) {
|
|
921
|
-
const
|
|
921
|
+
const X = /* @__PURE__ */ new Set([
|
|
922
922
|
...o.mount,
|
|
923
923
|
...Object.keys(cn(i, a))
|
|
924
924
|
]);
|
|
925
|
-
for (const ue of Array.from(
|
|
926
|
-
G(r.dirtyFields, ue) ? Se(
|
|
925
|
+
for (const ue of Array.from(X))
|
|
926
|
+
G(r.dirtyFields, ue) ? Se(R, ue, G(a, ue)) : ee(ue, G(R, ue));
|
|
927
927
|
} else {
|
|
928
928
|
if (Aa && ze(h))
|
|
929
|
-
for (const
|
|
930
|
-
const ue = G(n,
|
|
929
|
+
for (const X of o.mount) {
|
|
930
|
+
const ue = G(n, X);
|
|
931
931
|
if (ue && ue._f) {
|
|
932
932
|
const fe = Array.isArray(ue._f.refs) ? ue._f.refs[0] : ue._f.ref;
|
|
933
933
|
if (ii(fe)) {
|
|
@@ -939,13 +939,13 @@ function ou(e = {}) {
|
|
|
939
939
|
}
|
|
940
940
|
}
|
|
941
941
|
}
|
|
942
|
-
for (const
|
|
943
|
-
ee(
|
|
942
|
+
for (const X of o.mount)
|
|
943
|
+
ee(X, G(R, X));
|
|
944
944
|
}
|
|
945
|
-
a = We(
|
|
946
|
-
values: { ...
|
|
945
|
+
a = We(R), m.array.next({
|
|
946
|
+
values: { ...R }
|
|
947
947
|
}), m.state.next({
|
|
948
|
-
values: { ...
|
|
948
|
+
values: { ...R }
|
|
949
949
|
});
|
|
950
950
|
}
|
|
951
951
|
o = {
|
|
@@ -980,12 +980,12 @@ function ou(e = {}) {
|
|
|
980
980
|
}, Ke = {
|
|
981
981
|
control: {
|
|
982
982
|
register: ce,
|
|
983
|
-
unregister:
|
|
984
|
-
getFieldState:
|
|
983
|
+
unregister: W,
|
|
984
|
+
getFieldState: q,
|
|
985
985
|
handleSubmit: P,
|
|
986
986
|
setError: H,
|
|
987
987
|
_subscribe: se,
|
|
988
|
-
_runSchema:
|
|
988
|
+
_runSchema: F,
|
|
989
989
|
_focusError: I,
|
|
990
990
|
_getWatch: D,
|
|
991
991
|
_getDirty: j,
|
|
@@ -1038,7 +1038,7 @@ function ou(e = {}) {
|
|
|
1038
1038
|
};
|
|
1039
1039
|
}
|
|
1040
1040
|
},
|
|
1041
|
-
subscribe:
|
|
1041
|
+
subscribe: U,
|
|
1042
1042
|
trigger: ae,
|
|
1043
1043
|
register: ce,
|
|
1044
1044
|
handleSubmit: P,
|
|
@@ -1046,12 +1046,12 @@ function ou(e = {}) {
|
|
|
1046
1046
|
setValue: ee,
|
|
1047
1047
|
getValues: M,
|
|
1048
1048
|
reset: me,
|
|
1049
|
-
resetField:
|
|
1049
|
+
resetField: N,
|
|
1050
1050
|
clearErrors: le,
|
|
1051
|
-
unregister:
|
|
1051
|
+
unregister: W,
|
|
1052
1052
|
setError: H,
|
|
1053
1053
|
setFocus: $e,
|
|
1054
|
-
getFieldState:
|
|
1054
|
+
getFieldState: q
|
|
1055
1055
|
};
|
|
1056
1056
|
return {
|
|
1057
1057
|
...Ke,
|
|
@@ -1462,7 +1462,7 @@ function hl(e) {
|
|
|
1462
1462
|
}, m = (c) => {
|
|
1463
1463
|
var S;
|
|
1464
1464
|
n || (n = !0, (S = e.onError) == null || S.call(e, c), i == null || i(), a.reject(c));
|
|
1465
|
-
},
|
|
1465
|
+
}, b = () => new Promise((c) => {
|
|
1466
1466
|
var S;
|
|
1467
1467
|
i = (y) => {
|
|
1468
1468
|
(n || f()) && c(y);
|
|
@@ -1481,15 +1481,15 @@ function hl(e) {
|
|
|
1481
1481
|
c = Promise.reject(y);
|
|
1482
1482
|
}
|
|
1483
1483
|
Promise.resolve(c).then(p).catch((y) => {
|
|
1484
|
-
var
|
|
1484
|
+
var z;
|
|
1485
1485
|
if (n)
|
|
1486
1486
|
return;
|
|
1487
|
-
const C = e.retry ?? (Er ? 0 : 3), A = e.retryDelay ?? bu, _ = typeof A == "function" ? A(r, y) : A,
|
|
1488
|
-
if (t || !
|
|
1487
|
+
const C = e.retry ?? (Er ? 0 : 3), A = e.retryDelay ?? bu, _ = typeof A == "function" ? A(r, y) : A, v = C === !0 || typeof C == "number" && r < C || typeof C == "function" && C(r, y);
|
|
1488
|
+
if (t || !v) {
|
|
1489
1489
|
m(y);
|
|
1490
1490
|
return;
|
|
1491
1491
|
}
|
|
1492
|
-
r++, (
|
|
1492
|
+
r++, (z = e.onFail) == null || z.call(e, r, y), fu(_).then(() => f() ? void 0 : b()).then(() => {
|
|
1493
1493
|
t ? m(y) : x();
|
|
1494
1494
|
});
|
|
1495
1495
|
});
|
|
@@ -1501,7 +1501,7 @@ function hl(e) {
|
|
|
1501
1501
|
cancelRetry: o,
|
|
1502
1502
|
continueRetry: l,
|
|
1503
1503
|
canStart: u,
|
|
1504
|
-
start: () => (u() ? x() :
|
|
1504
|
+
start: () => (u() ? x() : b().then(x), a)
|
|
1505
1505
|
};
|
|
1506
1506
|
}
|
|
1507
1507
|
var xu = (e) => setTimeout(e, 0);
|
|
@@ -1686,7 +1686,7 @@ var He = wu(), mr, Lo, yl = (Lo = class {
|
|
|
1686
1686
|
return w(this, Qe).continueRetry(), w(this, Qe).promise;
|
|
1687
1687
|
}
|
|
1688
1688
|
if (t && this.setOptions(t), !this.options.queryFn) {
|
|
1689
|
-
const m = this.observers.find((
|
|
1689
|
+
const m = this.observers.find((b) => b.options.queryFn);
|
|
1690
1690
|
m && this.setOptions(m.options);
|
|
1691
1691
|
}
|
|
1692
1692
|
process.env.NODE_ENV !== "production" && (Array.isArray(this.options.queryKey) || console.error(
|
|
@@ -1724,12 +1724,12 @@ var He = wu(), mr, Lo, yl = (Lo = class {
|
|
|
1724
1724
|
})();
|
|
1725
1725
|
(f = this.options.behavior) == null || f.onFetch(o, this), te(this, hr, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((u = o.fetchOptions) == null ? void 0 : u.meta)) && ye(this, gt, Vt).call(this, { type: "fetch", meta: (p = o.fetchOptions) == null ? void 0 : p.meta });
|
|
1726
1726
|
const l = (m) => {
|
|
1727
|
-
var
|
|
1727
|
+
var b, x, c, S;
|
|
1728
1728
|
ji(m) && m.silent || ye(this, gt, Vt).call(this, {
|
|
1729
1729
|
type: "error",
|
|
1730
1730
|
error: m
|
|
1731
|
-
}), ji(m) || ((x = (
|
|
1732
|
-
|
|
1731
|
+
}), ji(m) || ((x = (b = w(this, ut).config).onError) == null || x.call(
|
|
1732
|
+
b,
|
|
1733
1733
|
m,
|
|
1734
1734
|
this
|
|
1735
1735
|
), (S = (c = w(this, ut).config).onSettled) == null || S.call(
|
|
@@ -1744,7 +1744,7 @@ var He = wu(), mr, Lo, yl = (Lo = class {
|
|
|
1744
1744
|
fn: o.fetchFn,
|
|
1745
1745
|
abort: n.abort.bind(n),
|
|
1746
1746
|
onSuccess: (m) => {
|
|
1747
|
-
var
|
|
1747
|
+
var b, x, c, S;
|
|
1748
1748
|
if (m === void 0) {
|
|
1749
1749
|
process.env.NODE_ENV !== "production" && console.error(
|
|
1750
1750
|
`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`
|
|
@@ -1757,7 +1757,7 @@ var He = wu(), mr, Lo, yl = (Lo = class {
|
|
|
1757
1757
|
l(y);
|
|
1758
1758
|
return;
|
|
1759
1759
|
}
|
|
1760
|
-
(x = (
|
|
1760
|
+
(x = (b = w(this, ut).config).onSuccess) == null || x.call(b, m, this), (S = (c = w(this, ut).config).onSettled) == null || S.call(
|
|
1761
1761
|
c,
|
|
1762
1762
|
m,
|
|
1763
1763
|
this.state.error,
|
|
@@ -1765,8 +1765,8 @@ var He = wu(), mr, Lo, yl = (Lo = class {
|
|
|
1765
1765
|
), this.scheduleGc();
|
|
1766
1766
|
},
|
|
1767
1767
|
onError: l,
|
|
1768
|
-
onFail: (m,
|
|
1769
|
-
ye(this, gt, Vt).call(this, { type: "failed", failureCount: m, error:
|
|
1768
|
+
onFail: (m, b) => {
|
|
1769
|
+
ye(this, gt, Vt).call(this, { type: "failed", failureCount: m, error: b });
|
|
1770
1770
|
},
|
|
1771
1771
|
onPause: () => {
|
|
1772
1772
|
ye(this, gt, Vt).call(this, { type: "pause" });
|
|
@@ -1988,14 +1988,14 @@ var Ot, qo, Tu = (qo = class extends Fn {
|
|
|
1988
1988
|
this.execute(this.state.variables);
|
|
1989
1989
|
}
|
|
1990
1990
|
async execute(t) {
|
|
1991
|
-
var a, s, o, l, f, u, p, m,
|
|
1991
|
+
var a, s, o, l, f, u, p, m, b, x, c, S, y, C, A, _, v, z, F, Z;
|
|
1992
1992
|
const r = () => {
|
|
1993
1993
|
ye(this, At, Ut).call(this, { type: "continue" });
|
|
1994
1994
|
};
|
|
1995
1995
|
te(this, vr, hl({
|
|
1996
1996
|
fn: () => this.options.mutationFn ? this.options.mutationFn(t) : Promise.reject(new Error("No mutationFn found")),
|
|
1997
|
-
onFail: (
|
|
1998
|
-
ye(this, At, Ut).call(this, { type: "failed", failureCount:
|
|
1997
|
+
onFail: (B, d) => {
|
|
1998
|
+
ye(this, At, Ut).call(this, { type: "failed", failureCount: B, error: d });
|
|
1999
1999
|
},
|
|
2000
2000
|
onPause: () => {
|
|
2001
2001
|
ye(this, At, Ut).call(this, { type: "pause" });
|
|
@@ -2024,50 +2024,50 @@ var Ot, qo, Tu = (qo = class extends Fn {
|
|
|
2024
2024
|
isPaused: i
|
|
2025
2025
|
});
|
|
2026
2026
|
}
|
|
2027
|
-
const
|
|
2027
|
+
const B = await w(this, vr).start();
|
|
2028
2028
|
return await ((u = (f = w(this, Ye).config).onSuccess) == null ? void 0 : u.call(
|
|
2029
2029
|
f,
|
|
2030
|
-
|
|
2030
|
+
B,
|
|
2031
2031
|
t,
|
|
2032
2032
|
this.state.context,
|
|
2033
2033
|
this
|
|
2034
|
-
)), await ((m = (p = this.options).onSuccess) == null ? void 0 : m.call(p,
|
|
2035
|
-
|
|
2036
|
-
|
|
2034
|
+
)), await ((m = (p = this.options).onSuccess) == null ? void 0 : m.call(p, B, t, this.state.context)), await ((x = (b = w(this, Ye).config).onSettled) == null ? void 0 : x.call(
|
|
2035
|
+
b,
|
|
2036
|
+
B,
|
|
2037
2037
|
null,
|
|
2038
2038
|
this.state.variables,
|
|
2039
2039
|
this.state.context,
|
|
2040
2040
|
this
|
|
2041
|
-
)), await ((S = (c = this.options).onSettled) == null ? void 0 : S.call(c,
|
|
2042
|
-
} catch (
|
|
2041
|
+
)), await ((S = (c = this.options).onSettled) == null ? void 0 : S.call(c, B, null, t, this.state.context)), ye(this, At, Ut).call(this, { type: "success", data: B }), B;
|
|
2042
|
+
} catch (B) {
|
|
2043
2043
|
try {
|
|
2044
2044
|
throw await ((C = (y = w(this, Ye).config).onError) == null ? void 0 : C.call(
|
|
2045
2045
|
y,
|
|
2046
|
-
|
|
2046
|
+
B,
|
|
2047
2047
|
t,
|
|
2048
2048
|
this.state.context,
|
|
2049
2049
|
this
|
|
2050
2050
|
)), await ((_ = (A = this.options).onError) == null ? void 0 : _.call(
|
|
2051
2051
|
A,
|
|
2052
|
-
|
|
2052
|
+
B,
|
|
2053
2053
|
t,
|
|
2054
2054
|
this.state.context
|
|
2055
|
-
)), await ((
|
|
2056
|
-
|
|
2055
|
+
)), await ((z = (v = w(this, Ye).config).onSettled) == null ? void 0 : z.call(
|
|
2056
|
+
v,
|
|
2057
2057
|
void 0,
|
|
2058
|
-
|
|
2058
|
+
B,
|
|
2059
2059
|
this.state.variables,
|
|
2060
2060
|
this.state.context,
|
|
2061
2061
|
this
|
|
2062
|
-
)), await ((
|
|
2063
|
-
|
|
2062
|
+
)), await ((Z = (F = this.options).onSettled) == null ? void 0 : Z.call(
|
|
2063
|
+
F,
|
|
2064
2064
|
void 0,
|
|
2065
|
-
|
|
2065
|
+
B,
|
|
2066
2066
|
t,
|
|
2067
2067
|
this.state.context
|
|
2068
|
-
)),
|
|
2068
|
+
)), B;
|
|
2069
2069
|
} finally {
|
|
2070
|
-
ye(this, At, Ut).call(this, { type: "error", error:
|
|
2070
|
+
ye(this, At, Ut).call(this, { type: "error", error: B });
|
|
2071
2071
|
}
|
|
2072
2072
|
} finally {
|
|
2073
2073
|
w(this, Ye).runNext(this);
|
|
@@ -2251,8 +2251,8 @@ function Vn(e) {
|
|
|
2251
2251
|
function Es(e) {
|
|
2252
2252
|
return {
|
|
2253
2253
|
onFetch: (t, r) => {
|
|
2254
|
-
var u, p, m,
|
|
2255
|
-
const n = t.options, i = (m = (p = (u = t.fetchOptions) == null ? void 0 : u.meta) == null ? void 0 : p.fetchMore) == null ? void 0 : m.direction, a = ((
|
|
2254
|
+
var u, p, m, b, x;
|
|
2255
|
+
const n = t.options, i = (m = (p = (u = t.fetchOptions) == null ? void 0 : u.meta) == null ? void 0 : p.fetchMore) == null ? void 0 : m.direction, a = ((b = t.state.data) == null ? void 0 : b.pages) || [], s = ((x = t.state.data) == null ? void 0 : x.pageParams) || [];
|
|
2256
2256
|
let o = { pages: [], pageParams: [] }, l = 0;
|
|
2257
2257
|
const f = async () => {
|
|
2258
2258
|
let c = !1;
|
|
@@ -2263,32 +2263,32 @@ function Es(e) {
|
|
|
2263
2263
|
c = !0;
|
|
2264
2264
|
}), t.signal)
|
|
2265
2265
|
});
|
|
2266
|
-
}, y = dl(t.options, t.fetchOptions), C = async (A, _,
|
|
2266
|
+
}, y = dl(t.options, t.fetchOptions), C = async (A, _, v) => {
|
|
2267
2267
|
if (c)
|
|
2268
2268
|
return Promise.reject();
|
|
2269
2269
|
if (_ == null && A.pages.length)
|
|
2270
2270
|
return Promise.resolve(A);
|
|
2271
|
-
const
|
|
2271
|
+
const F = (() => {
|
|
2272
2272
|
const j = {
|
|
2273
2273
|
client: t.client,
|
|
2274
2274
|
queryKey: t.queryKey,
|
|
2275
2275
|
pageParam: _,
|
|
2276
|
-
direction:
|
|
2276
|
+
direction: v ? "backward" : "forward",
|
|
2277
2277
|
meta: t.options.meta
|
|
2278
2278
|
};
|
|
2279
2279
|
return S(j), j;
|
|
2280
|
-
})(),
|
|
2280
|
+
})(), Z = await y(F), { maxPages: B } = t.options, d = v ? hu : mu;
|
|
2281
2281
|
return {
|
|
2282
|
-
pages: d(A.pages,
|
|
2283
|
-
pageParams: d(A.pageParams, _,
|
|
2282
|
+
pages: d(A.pages, Z, B),
|
|
2283
|
+
pageParams: d(A.pageParams, _, B)
|
|
2284
2284
|
};
|
|
2285
2285
|
};
|
|
2286
2286
|
if (i && a.length) {
|
|
2287
|
-
const A = i === "backward", _ = A ? _u : Ts,
|
|
2287
|
+
const A = i === "backward", _ = A ? _u : Ts, v = {
|
|
2288
2288
|
pages: a,
|
|
2289
2289
|
pageParams: s
|
|
2290
|
-
},
|
|
2291
|
-
o = await C(
|
|
2290
|
+
}, z = _(n, v);
|
|
2291
|
+
o = await C(v, z, A);
|
|
2292
2292
|
} else {
|
|
2293
2293
|
const A = e ?? a.length;
|
|
2294
2294
|
do {
|
|
@@ -2642,9 +2642,9 @@ var Me, Yt, Gt, Hr, Kr, Zt, Qr, Yr, Ho, Au = (Ho = class {
|
|
|
2642
2642
|
}).then(() => (this.updateResult(), w(this, Ge)));
|
|
2643
2643
|
}
|
|
2644
2644
|
createResult(t, r) {
|
|
2645
|
-
var
|
|
2645
|
+
var B;
|
|
2646
2646
|
const n = w(this, ge), i = this.options, a = w(this, Ge), s = w(this, br), o = w(this, Gr), f = t !== n ? t.state : w(this, Cn), { state: u } = t;
|
|
2647
|
-
let p = { ...u }, m = !1,
|
|
2647
|
+
let p = { ...u }, m = !1, b;
|
|
2648
2648
|
if (r._optimisticResults) {
|
|
2649
2649
|
const d = this.hasListeners(), j = !d && ks(t, r), D = d && Cs(t, n, r, i);
|
|
2650
2650
|
(j || D) && (p = {
|
|
@@ -2653,38 +2653,38 @@ var Me, Yt, Gt, Hr, Kr, Zt, Qr, Yr, Ho, Au = (Ho = class {
|
|
|
2653
2653
|
}), r._optimisticResults === "isRestoring" && (p.fetchStatus = "idle");
|
|
2654
2654
|
}
|
|
2655
2655
|
let { error: x, errorUpdatedAt: c, status: S } = p;
|
|
2656
|
-
|
|
2656
|
+
b = p.data;
|
|
2657
2657
|
let y = !1;
|
|
2658
|
-
if (r.placeholderData !== void 0 &&
|
|
2658
|
+
if (r.placeholderData !== void 0 && b === void 0 && S === "pending") {
|
|
2659
2659
|
let d;
|
|
2660
2660
|
a != null && a.isPlaceholderData && r.placeholderData === (o == null ? void 0 : o.placeholderData) ? (d = a.data, y = !0) : d = typeof r.placeholderData == "function" ? r.placeholderData(
|
|
2661
|
-
(
|
|
2661
|
+
(B = w(this, Xr)) == null ? void 0 : B.state.data,
|
|
2662
2662
|
w(this, Xr)
|
|
2663
|
-
) : r.placeholderData, d !== void 0 && (S = "success",
|
|
2663
|
+
) : r.placeholderData, d !== void 0 && (S = "success", b = na(
|
|
2664
2664
|
a == null ? void 0 : a.data,
|
|
2665
2665
|
d,
|
|
2666
2666
|
r
|
|
2667
2667
|
), m = !0);
|
|
2668
2668
|
}
|
|
2669
|
-
if (r.select &&
|
|
2670
|
-
if (a &&
|
|
2671
|
-
|
|
2669
|
+
if (r.select && b !== void 0 && !y)
|
|
2670
|
+
if (a && b === (s == null ? void 0 : s.data) && r.select === w(this, On))
|
|
2671
|
+
b = w(this, Zr);
|
|
2672
2672
|
else
|
|
2673
2673
|
try {
|
|
2674
|
-
te(this, On, r.select),
|
|
2674
|
+
te(this, On, r.select), b = r.select(b), b = na(a == null ? void 0 : a.data, b, r), te(this, Zr, b), te(this, Jt, null);
|
|
2675
2675
|
} catch (d) {
|
|
2676
2676
|
te(this, Jt, d);
|
|
2677
2677
|
}
|
|
2678
|
-
w(this, Jt) && (x = w(this, Jt),
|
|
2679
|
-
const C = p.fetchStatus === "fetching", A = S === "pending", _ = S === "error",
|
|
2678
|
+
w(this, Jt) && (x = w(this, Jt), b = w(this, Zr), c = Date.now(), S = "error");
|
|
2679
|
+
const C = p.fetchStatus === "fetching", A = S === "pending", _ = S === "error", v = A && C, z = b !== void 0, Z = {
|
|
2680
2680
|
status: S,
|
|
2681
2681
|
fetchStatus: p.fetchStatus,
|
|
2682
2682
|
isPending: A,
|
|
2683
2683
|
isSuccess: S === "success",
|
|
2684
2684
|
isError: _,
|
|
2685
|
-
isInitialLoading:
|
|
2686
|
-
isLoading:
|
|
2687
|
-
data:
|
|
2685
|
+
isInitialLoading: v,
|
|
2686
|
+
isLoading: v,
|
|
2687
|
+
data: b,
|
|
2688
2688
|
dataUpdatedAt: p.dataUpdatedAt,
|
|
2689
2689
|
error: x,
|
|
2690
2690
|
errorUpdatedAt: c,
|
|
@@ -2695,10 +2695,10 @@ var Me, Yt, Gt, Hr, Kr, Zt, Qr, Yr, Ho, Au = (Ho = class {
|
|
|
2695
2695
|
isFetchedAfterMount: p.dataUpdateCount > f.dataUpdateCount || p.errorUpdateCount > f.errorUpdateCount,
|
|
2696
2696
|
isFetching: C,
|
|
2697
2697
|
isRefetching: C && !A,
|
|
2698
|
-
isLoadingError: _ && !
|
|
2698
|
+
isLoadingError: _ && !z,
|
|
2699
2699
|
isPaused: p.fetchStatus === "paused",
|
|
2700
2700
|
isPlaceholderData: m,
|
|
2701
|
-
isRefetchError: _ &&
|
|
2701
|
+
isRefetchError: _ && z,
|
|
2702
2702
|
isStale: za(t, r),
|
|
2703
2703
|
refetch: this.refetch,
|
|
2704
2704
|
promise: w(this, Xt),
|
|
@@ -2706,9 +2706,9 @@ var Me, Yt, Gt, Hr, Kr, Zt, Qr, Yr, Ho, Au = (Ho = class {
|
|
|
2706
2706
|
};
|
|
2707
2707
|
if (this.options.experimental_prefetchInRender) {
|
|
2708
2708
|
const d = (L) => {
|
|
2709
|
-
|
|
2709
|
+
Z.status === "error" ? L.reject(Z.error) : Z.data !== void 0 && L.resolve(Z.data);
|
|
2710
2710
|
}, j = () => {
|
|
2711
|
-
const L = te(this, Xt,
|
|
2711
|
+
const L = te(this, Xt, Z.promise = ia());
|
|
2712
2712
|
d(L);
|
|
2713
2713
|
}, D = w(this, Xt);
|
|
2714
2714
|
switch (D.status) {
|
|
@@ -2716,14 +2716,14 @@ var Me, Yt, Gt, Hr, Kr, Zt, Qr, Yr, Ho, Au = (Ho = class {
|
|
|
2716
2716
|
t.queryHash === n.queryHash && d(D);
|
|
2717
2717
|
break;
|
|
2718
2718
|
case "fulfilled":
|
|
2719
|
-
(
|
|
2719
|
+
(Z.status === "error" || Z.data !== D.value) && j();
|
|
2720
2720
|
break;
|
|
2721
2721
|
case "rejected":
|
|
2722
|
-
(
|
|
2722
|
+
(Z.status !== "error" || Z.error !== D.reason) && j();
|
|
2723
2723
|
break;
|
|
2724
2724
|
}
|
|
2725
2725
|
}
|
|
2726
|
-
return
|
|
2726
|
+
return Z;
|
|
2727
2727
|
}
|
|
2728
2728
|
updateResult() {
|
|
2729
2729
|
const t = w(this, Ge), r = this.createResult(w(this, ge), this.options);
|
|
@@ -2865,7 +2865,7 @@ var Mu = re.createContext(ju()), zu = () => re.useContext(Mu), Vu = (e, t) => {
|
|
|
2865
2865
|
r.clearReset();
|
|
2866
2866
|
});
|
|
2867
2867
|
function Wu(e, t, r) {
|
|
2868
|
-
var p, m,
|
|
2868
|
+
var p, m, b, x, c;
|
|
2869
2869
|
if (process.env.NODE_ENV !== "production" && (typeof e != "object" || Array.isArray(e)))
|
|
2870
2870
|
throw new Error(
|
|
2871
2871
|
'Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object'
|
|
@@ -2905,8 +2905,8 @@ function Wu(e, t, r) {
|
|
|
2905
2905
|
suspense: s.suspense
|
|
2906
2906
|
}))
|
|
2907
2907
|
throw f.error;
|
|
2908
|
-
if ((x = (
|
|
2909
|
-
|
|
2908
|
+
if ((x = (b = a.getDefaultOptions().queries) == null ? void 0 : b._experimental_afterQuery) == null || x.call(
|
|
2909
|
+
b,
|
|
2910
2910
|
s,
|
|
2911
2911
|
f
|
|
2912
2912
|
), s.experimental_prefetchInRender && !Er && qu(f, n)) {
|
|
@@ -2942,66 +2942,66 @@ var _s;
|
|
|
2942
2942
|
function Ku() {
|
|
2943
2943
|
if (_s) return xe;
|
|
2944
2944
|
_s = 1;
|
|
2945
|
-
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, i = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, o = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111, f = e ? Symbol.for("react.concurrent_mode") : 60111, u = e ? Symbol.for("react.forward_ref") : 60112, p = e ? Symbol.for("react.suspense") : 60113, m = e ? Symbol.for("react.suspense_list") : 60120,
|
|
2946
|
-
function A(
|
|
2947
|
-
if (typeof
|
|
2948
|
-
var
|
|
2949
|
-
switch (
|
|
2945
|
+
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, i = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, o = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111, f = e ? Symbol.for("react.concurrent_mode") : 60111, u = e ? Symbol.for("react.forward_ref") : 60112, p = e ? Symbol.for("react.suspense") : 60113, m = e ? Symbol.for("react.suspense_list") : 60120, b = e ? Symbol.for("react.memo") : 60115, x = e ? Symbol.for("react.lazy") : 60116, c = e ? Symbol.for("react.block") : 60121, S = e ? Symbol.for("react.fundamental") : 60117, y = e ? Symbol.for("react.responder") : 60118, C = e ? Symbol.for("react.scope") : 60119;
|
|
2946
|
+
function A(v) {
|
|
2947
|
+
if (typeof v == "object" && v !== null) {
|
|
2948
|
+
var z = v.$$typeof;
|
|
2949
|
+
switch (z) {
|
|
2950
2950
|
case t:
|
|
2951
|
-
switch (
|
|
2951
|
+
switch (v = v.type, v) {
|
|
2952
2952
|
case l:
|
|
2953
2953
|
case f:
|
|
2954
2954
|
case n:
|
|
2955
2955
|
case a:
|
|
2956
2956
|
case i:
|
|
2957
2957
|
case p:
|
|
2958
|
-
return
|
|
2958
|
+
return v;
|
|
2959
2959
|
default:
|
|
2960
|
-
switch (
|
|
2960
|
+
switch (v = v && v.$$typeof, v) {
|
|
2961
2961
|
case o:
|
|
2962
2962
|
case u:
|
|
2963
2963
|
case x:
|
|
2964
|
-
case
|
|
2964
|
+
case b:
|
|
2965
2965
|
case s:
|
|
2966
|
-
return
|
|
2966
|
+
return v;
|
|
2967
2967
|
default:
|
|
2968
|
-
return
|
|
2968
|
+
return z;
|
|
2969
2969
|
}
|
|
2970
2970
|
}
|
|
2971
2971
|
case r:
|
|
2972
|
-
return
|
|
2972
|
+
return z;
|
|
2973
2973
|
}
|
|
2974
2974
|
}
|
|
2975
2975
|
}
|
|
2976
|
-
function _(
|
|
2977
|
-
return A(
|
|
2978
|
-
}
|
|
2979
|
-
return xe.AsyncMode = l, xe.ConcurrentMode = f, xe.ContextConsumer = o, xe.ContextProvider = s, xe.Element = t, xe.ForwardRef = u, xe.Fragment = n, xe.Lazy = x, xe.Memo =
|
|
2980
|
-
return _(
|
|
2981
|
-
}, xe.isConcurrentMode = _, xe.isContextConsumer = function(
|
|
2982
|
-
return A(
|
|
2983
|
-
}, xe.isContextProvider = function(
|
|
2984
|
-
return A(
|
|
2985
|
-
}, xe.isElement = function(
|
|
2986
|
-
return typeof
|
|
2987
|
-
}, xe.isForwardRef = function(
|
|
2988
|
-
return A(
|
|
2989
|
-
}, xe.isFragment = function(
|
|
2990
|
-
return A(
|
|
2991
|
-
}, xe.isLazy = function(
|
|
2992
|
-
return A(
|
|
2993
|
-
}, xe.isMemo = function(
|
|
2994
|
-
return A(
|
|
2995
|
-
}, xe.isPortal = function(
|
|
2996
|
-
return A(
|
|
2997
|
-
}, xe.isProfiler = function(
|
|
2998
|
-
return A(
|
|
2999
|
-
}, xe.isStrictMode = function(
|
|
3000
|
-
return A(
|
|
3001
|
-
}, xe.isSuspense = function(
|
|
3002
|
-
return A(
|
|
3003
|
-
}, xe.isValidElementType = function(
|
|
3004
|
-
return typeof
|
|
2976
|
+
function _(v) {
|
|
2977
|
+
return A(v) === f;
|
|
2978
|
+
}
|
|
2979
|
+
return xe.AsyncMode = l, xe.ConcurrentMode = f, xe.ContextConsumer = o, xe.ContextProvider = s, xe.Element = t, xe.ForwardRef = u, xe.Fragment = n, xe.Lazy = x, xe.Memo = b, xe.Portal = r, xe.Profiler = a, xe.StrictMode = i, xe.Suspense = p, xe.isAsyncMode = function(v) {
|
|
2980
|
+
return _(v) || A(v) === l;
|
|
2981
|
+
}, xe.isConcurrentMode = _, xe.isContextConsumer = function(v) {
|
|
2982
|
+
return A(v) === o;
|
|
2983
|
+
}, xe.isContextProvider = function(v) {
|
|
2984
|
+
return A(v) === s;
|
|
2985
|
+
}, xe.isElement = function(v) {
|
|
2986
|
+
return typeof v == "object" && v !== null && v.$$typeof === t;
|
|
2987
|
+
}, xe.isForwardRef = function(v) {
|
|
2988
|
+
return A(v) === u;
|
|
2989
|
+
}, xe.isFragment = function(v) {
|
|
2990
|
+
return A(v) === n;
|
|
2991
|
+
}, xe.isLazy = function(v) {
|
|
2992
|
+
return A(v) === x;
|
|
2993
|
+
}, xe.isMemo = function(v) {
|
|
2994
|
+
return A(v) === b;
|
|
2995
|
+
}, xe.isPortal = function(v) {
|
|
2996
|
+
return A(v) === r;
|
|
2997
|
+
}, xe.isProfiler = function(v) {
|
|
2998
|
+
return A(v) === a;
|
|
2999
|
+
}, xe.isStrictMode = function(v) {
|
|
3000
|
+
return A(v) === i;
|
|
3001
|
+
}, xe.isSuspense = function(v) {
|
|
3002
|
+
return A(v) === p;
|
|
3003
|
+
}, xe.isValidElementType = function(v) {
|
|
3004
|
+
return typeof v == "string" || typeof v == "function" || v === n || v === f || v === a || v === i || v === p || v === m || typeof v == "object" && v !== null && (v.$$typeof === x || v.$$typeof === b || v.$$typeof === s || v.$$typeof === o || v.$$typeof === u || v.$$typeof === S || v.$$typeof === y || v.$$typeof === C || v.$$typeof === c);
|
|
3005
3005
|
}, xe.typeOf = A, xe;
|
|
3006
3006
|
}
|
|
3007
3007
|
var we = {};
|
|
@@ -3016,15 +3016,15 @@ var we = {};
|
|
|
3016
3016
|
var As;
|
|
3017
3017
|
function Qu() {
|
|
3018
3018
|
return As || (As = 1, process.env.NODE_ENV !== "production" && function() {
|
|
3019
|
-
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, i = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, o = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111, f = e ? Symbol.for("react.concurrent_mode") : 60111, u = e ? Symbol.for("react.forward_ref") : 60112, p = e ? Symbol.for("react.suspense") : 60113, m = e ? Symbol.for("react.suspense_list") : 60120,
|
|
3019
|
+
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, i = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, o = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111, f = e ? Symbol.for("react.concurrent_mode") : 60111, u = e ? Symbol.for("react.forward_ref") : 60112, p = e ? Symbol.for("react.suspense") : 60113, m = e ? Symbol.for("react.suspense_list") : 60120, b = e ? Symbol.for("react.memo") : 60115, x = e ? Symbol.for("react.lazy") : 60116, c = e ? Symbol.for("react.block") : 60121, S = e ? Symbol.for("react.fundamental") : 60117, y = e ? Symbol.for("react.responder") : 60118, C = e ? Symbol.for("react.scope") : 60119;
|
|
3020
3020
|
function A(P) {
|
|
3021
3021
|
return typeof P == "string" || typeof P == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
3022
|
-
P === n || P === f || P === a || P === i || P === p || P === m || typeof P == "object" && P !== null && (P.$$typeof === x || P.$$typeof ===
|
|
3022
|
+
P === n || P === f || P === a || P === i || P === p || P === m || typeof P == "object" && P !== null && (P.$$typeof === x || P.$$typeof === b || P.$$typeof === s || P.$$typeof === o || P.$$typeof === u || P.$$typeof === S || P.$$typeof === y || P.$$typeof === C || P.$$typeof === c);
|
|
3023
3023
|
}
|
|
3024
3024
|
function _(P) {
|
|
3025
3025
|
if (typeof P == "object" && P !== null) {
|
|
3026
|
-
var
|
|
3027
|
-
switch (
|
|
3026
|
+
var N = P.$$typeof;
|
|
3027
|
+
switch (N) {
|
|
3028
3028
|
case t:
|
|
3029
3029
|
var Q = P.type;
|
|
3030
3030
|
switch (Q) {
|
|
@@ -3041,26 +3041,26 @@ function Qu() {
|
|
|
3041
3041
|
case o:
|
|
3042
3042
|
case u:
|
|
3043
3043
|
case x:
|
|
3044
|
-
case
|
|
3044
|
+
case b:
|
|
3045
3045
|
case s:
|
|
3046
3046
|
return me;
|
|
3047
3047
|
default:
|
|
3048
|
-
return
|
|
3048
|
+
return N;
|
|
3049
3049
|
}
|
|
3050
3050
|
}
|
|
3051
3051
|
case r:
|
|
3052
|
-
return
|
|
3052
|
+
return N;
|
|
3053
3053
|
}
|
|
3054
3054
|
}
|
|
3055
3055
|
}
|
|
3056
|
-
var
|
|
3056
|
+
var v = l, z = f, F = o, Z = s, B = t, d = u, j = n, D = x, L = b, V = r, K = a, ee = i, de = p, oe = !1;
|
|
3057
3057
|
function ae(P) {
|
|
3058
3058
|
return oe || (oe = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), M(P) || _(P) === l;
|
|
3059
3059
|
}
|
|
3060
3060
|
function M(P) {
|
|
3061
3061
|
return _(P) === f;
|
|
3062
3062
|
}
|
|
3063
|
-
function
|
|
3063
|
+
function q(P) {
|
|
3064
3064
|
return _(P) === o;
|
|
3065
3065
|
}
|
|
3066
3066
|
function le(P) {
|
|
@@ -3075,11 +3075,11 @@ function Qu() {
|
|
|
3075
3075
|
function se(P) {
|
|
3076
3076
|
return _(P) === n;
|
|
3077
3077
|
}
|
|
3078
|
-
function
|
|
3078
|
+
function U(P) {
|
|
3079
3079
|
return _(P) === x;
|
|
3080
3080
|
}
|
|
3081
|
-
function
|
|
3082
|
-
return _(P) ===
|
|
3081
|
+
function W(P) {
|
|
3082
|
+
return _(P) === b;
|
|
3083
3083
|
}
|
|
3084
3084
|
function ne(P) {
|
|
3085
3085
|
return _(P) === r;
|
|
@@ -3093,7 +3093,7 @@ function Qu() {
|
|
|
3093
3093
|
function ie(P) {
|
|
3094
3094
|
return _(P) === p;
|
|
3095
3095
|
}
|
|
3096
|
-
we.AsyncMode =
|
|
3096
|
+
we.AsyncMode = v, we.ConcurrentMode = z, we.ContextConsumer = F, we.ContextProvider = Z, we.Element = B, we.ForwardRef = d, we.Fragment = j, we.Lazy = D, we.Memo = L, we.Portal = V, we.Profiler = K, we.StrictMode = ee, we.Suspense = de, we.isAsyncMode = ae, we.isConcurrentMode = M, we.isContextConsumer = q, we.isContextProvider = le, we.isElement = H, we.isForwardRef = J, we.isFragment = se, we.isLazy = U, we.isMemo = W, we.isPortal = ne, we.isProfiler = ce, we.isStrictMode = I, we.isSuspense = ie, we.isValidElementType = A, we.typeOf = _;
|
|
3097
3097
|
}()), we;
|
|
3098
3098
|
}
|
|
3099
3099
|
var Fs;
|
|
@@ -3199,9 +3199,9 @@ function Gu() {
|
|
|
3199
3199
|
(l || "React class") + ": type specification of " + o + " `" + u + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof p + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
3200
3200
|
), p instanceof Error && !(p.message in r)) {
|
|
3201
3201
|
r[p.message] = !0;
|
|
3202
|
-
var
|
|
3202
|
+
var b = f ? f() : "";
|
|
3203
3203
|
e(
|
|
3204
|
-
"Failed " + o + " type: " + p.message + (
|
|
3204
|
+
"Failed " + o + " type: " + p.message + (b ?? "")
|
|
3205
3205
|
);
|
|
3206
3206
|
}
|
|
3207
3207
|
}
|
|
@@ -3231,11 +3231,11 @@ function Zu() {
|
|
|
3231
3231
|
return Li = function(o, l) {
|
|
3232
3232
|
var f = typeof Symbol == "function" && Symbol.iterator, u = "@@iterator";
|
|
3233
3233
|
function p(M) {
|
|
3234
|
-
var
|
|
3235
|
-
if (typeof
|
|
3236
|
-
return
|
|
3234
|
+
var q = M && (f && M[f] || M[u]);
|
|
3235
|
+
if (typeof q == "function")
|
|
3236
|
+
return q;
|
|
3237
3237
|
}
|
|
3238
|
-
var m = "<<anonymous>>",
|
|
3238
|
+
var m = "<<anonymous>>", b = {
|
|
3239
3239
|
array: y("array"),
|
|
3240
3240
|
bigint: y("bigint"),
|
|
3241
3241
|
bool: y("boolean"),
|
|
@@ -3247,220 +3247,220 @@ function Zu() {
|
|
|
3247
3247
|
any: C(),
|
|
3248
3248
|
arrayOf: A,
|
|
3249
3249
|
element: _(),
|
|
3250
|
-
elementType:
|
|
3251
|
-
instanceOf:
|
|
3250
|
+
elementType: v(),
|
|
3251
|
+
instanceOf: z,
|
|
3252
3252
|
node: d(),
|
|
3253
|
-
objectOf:
|
|
3254
|
-
oneOf:
|
|
3255
|
-
oneOfType:
|
|
3253
|
+
objectOf: Z,
|
|
3254
|
+
oneOf: F,
|
|
3255
|
+
oneOfType: B,
|
|
3256
3256
|
shape: D,
|
|
3257
3257
|
exact: L
|
|
3258
3258
|
};
|
|
3259
|
-
function x(M,
|
|
3260
|
-
return M ===
|
|
3259
|
+
function x(M, q) {
|
|
3260
|
+
return M === q ? M !== 0 || 1 / M === 1 / q : M !== M && q !== q;
|
|
3261
3261
|
}
|
|
3262
|
-
function c(M,
|
|
3263
|
-
this.message = M, this.data =
|
|
3262
|
+
function c(M, q) {
|
|
3263
|
+
this.message = M, this.data = q && typeof q == "object" ? q : {}, this.stack = "";
|
|
3264
3264
|
}
|
|
3265
3265
|
c.prototype = Error.prototype;
|
|
3266
3266
|
function S(M) {
|
|
3267
3267
|
if (process.env.NODE_ENV !== "production")
|
|
3268
|
-
var
|
|
3269
|
-
function H(se,
|
|
3270
|
-
if (ne = ne || m, I = I ||
|
|
3268
|
+
var q = {}, le = 0;
|
|
3269
|
+
function H(se, U, W, ne, ce, I, ie) {
|
|
3270
|
+
if (ne = ne || m, I = I || W, ie !== r) {
|
|
3271
3271
|
if (l) {
|
|
3272
3272
|
var P = new Error(
|
|
3273
3273
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
|
|
3274
3274
|
);
|
|
3275
3275
|
throw P.name = "Invariant Violation", P;
|
|
3276
3276
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
3277
|
-
var
|
|
3278
|
-
!
|
|
3277
|
+
var N = ne + ":" + W;
|
|
3278
|
+
!q[N] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
3279
3279
|
le < 3 && (a(
|
|
3280
3280
|
"You are manually calling a React.PropTypes validation function for the `" + I + "` prop on `" + ne + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
3281
|
-
),
|
|
3281
|
+
), q[N] = !0, le++);
|
|
3282
3282
|
}
|
|
3283
3283
|
}
|
|
3284
|
-
return
|
|
3284
|
+
return U[W] == null ? se ? U[W] === null ? new c("The " + ce + " `" + I + "` is marked as required " + ("in `" + ne + "`, but its value is `null`.")) : new c("The " + ce + " `" + I + "` is marked as required in " + ("`" + ne + "`, but its value is `undefined`.")) : null : M(U, W, ne, ce, I);
|
|
3285
3285
|
}
|
|
3286
3286
|
var J = H.bind(null, !1);
|
|
3287
3287
|
return J.isRequired = H.bind(null, !0), J;
|
|
3288
3288
|
}
|
|
3289
3289
|
function y(M) {
|
|
3290
|
-
function
|
|
3290
|
+
function q(le, H, J, se, U, W) {
|
|
3291
3291
|
var ne = le[H], ce = ee(ne);
|
|
3292
3292
|
if (ce !== M) {
|
|
3293
3293
|
var I = de(ne);
|
|
3294
3294
|
return new c(
|
|
3295
|
-
"Invalid " + se + " `" +
|
|
3295
|
+
"Invalid " + se + " `" + U + "` of type " + ("`" + I + "` supplied to `" + J + "`, expected ") + ("`" + M + "`."),
|
|
3296
3296
|
{ expectedType: M }
|
|
3297
3297
|
);
|
|
3298
3298
|
}
|
|
3299
3299
|
return null;
|
|
3300
3300
|
}
|
|
3301
|
-
return S(
|
|
3301
|
+
return S(q);
|
|
3302
3302
|
}
|
|
3303
3303
|
function C() {
|
|
3304
3304
|
return S(s);
|
|
3305
3305
|
}
|
|
3306
3306
|
function A(M) {
|
|
3307
|
-
function
|
|
3307
|
+
function q(le, H, J, se, U) {
|
|
3308
3308
|
if (typeof M != "function")
|
|
3309
|
-
return new c("Property `" +
|
|
3310
|
-
var
|
|
3311
|
-
if (!Array.isArray(
|
|
3312
|
-
var ne = ee(
|
|
3313
|
-
return new c("Invalid " + se + " `" +
|
|
3309
|
+
return new c("Property `" + U + "` of component `" + J + "` has invalid PropType notation inside arrayOf.");
|
|
3310
|
+
var W = le[H];
|
|
3311
|
+
if (!Array.isArray(W)) {
|
|
3312
|
+
var ne = ee(W);
|
|
3313
|
+
return new c("Invalid " + se + " `" + U + "` of type " + ("`" + ne + "` supplied to `" + J + "`, expected an array."));
|
|
3314
3314
|
}
|
|
3315
|
-
for (var ce = 0; ce <
|
|
3316
|
-
var I = M(
|
|
3315
|
+
for (var ce = 0; ce < W.length; ce++) {
|
|
3316
|
+
var I = M(W, ce, J, se, U + "[" + ce + "]", r);
|
|
3317
3317
|
if (I instanceof Error)
|
|
3318
3318
|
return I;
|
|
3319
3319
|
}
|
|
3320
3320
|
return null;
|
|
3321
3321
|
}
|
|
3322
|
-
return S(
|
|
3322
|
+
return S(q);
|
|
3323
3323
|
}
|
|
3324
3324
|
function _() {
|
|
3325
|
-
function M(
|
|
3326
|
-
var
|
|
3327
|
-
if (!o(
|
|
3328
|
-
var
|
|
3329
|
-
return new c("Invalid " + J + " `" + se + "` of type " + ("`" +
|
|
3325
|
+
function M(q, le, H, J, se) {
|
|
3326
|
+
var U = q[le];
|
|
3327
|
+
if (!o(U)) {
|
|
3328
|
+
var W = ee(U);
|
|
3329
|
+
return new c("Invalid " + J + " `" + se + "` of type " + ("`" + W + "` supplied to `" + H + "`, expected a single ReactElement."));
|
|
3330
3330
|
}
|
|
3331
3331
|
return null;
|
|
3332
3332
|
}
|
|
3333
3333
|
return S(M);
|
|
3334
3334
|
}
|
|
3335
|
-
function
|
|
3336
|
-
function M(
|
|
3337
|
-
var
|
|
3338
|
-
if (!e.isValidElementType(
|
|
3339
|
-
var
|
|
3340
|
-
return new c("Invalid " + J + " `" + se + "` of type " + ("`" +
|
|
3335
|
+
function v() {
|
|
3336
|
+
function M(q, le, H, J, se) {
|
|
3337
|
+
var U = q[le];
|
|
3338
|
+
if (!e.isValidElementType(U)) {
|
|
3339
|
+
var W = ee(U);
|
|
3340
|
+
return new c("Invalid " + J + " `" + se + "` of type " + ("`" + W + "` supplied to `" + H + "`, expected a single ReactElement type."));
|
|
3341
3341
|
}
|
|
3342
3342
|
return null;
|
|
3343
3343
|
}
|
|
3344
3344
|
return S(M);
|
|
3345
3345
|
}
|
|
3346
|
-
function
|
|
3347
|
-
function
|
|
3346
|
+
function z(M) {
|
|
3347
|
+
function q(le, H, J, se, U) {
|
|
3348
3348
|
if (!(le[H] instanceof M)) {
|
|
3349
|
-
var
|
|
3350
|
-
return new c("Invalid " + se + " `" +
|
|
3349
|
+
var W = M.name || m, ne = ae(le[H]);
|
|
3350
|
+
return new c("Invalid " + se + " `" + U + "` of type " + ("`" + ne + "` supplied to `" + J + "`, expected ") + ("instance of `" + W + "`."));
|
|
3351
3351
|
}
|
|
3352
3352
|
return null;
|
|
3353
3353
|
}
|
|
3354
|
-
return S(
|
|
3354
|
+
return S(q);
|
|
3355
3355
|
}
|
|
3356
|
-
function
|
|
3356
|
+
function F(M) {
|
|
3357
3357
|
if (!Array.isArray(M))
|
|
3358
3358
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? a(
|
|
3359
3359
|
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
3360
3360
|
) : a("Invalid argument supplied to oneOf, expected an array.")), s;
|
|
3361
|
-
function
|
|
3362
|
-
for (var
|
|
3363
|
-
if (x(
|
|
3361
|
+
function q(le, H, J, se, U) {
|
|
3362
|
+
for (var W = le[H], ne = 0; ne < M.length; ne++)
|
|
3363
|
+
if (x(W, M[ne]))
|
|
3364
3364
|
return null;
|
|
3365
3365
|
var ce = JSON.stringify(M, function(ie, P) {
|
|
3366
|
-
var
|
|
3367
|
-
return
|
|
3366
|
+
var N = de(P);
|
|
3367
|
+
return N === "symbol" ? String(P) : P;
|
|
3368
3368
|
});
|
|
3369
|
-
return new c("Invalid " + se + " `" +
|
|
3369
|
+
return new c("Invalid " + se + " `" + U + "` of value `" + String(W) + "` " + ("supplied to `" + J + "`, expected one of " + ce + "."));
|
|
3370
3370
|
}
|
|
3371
|
-
return S(
|
|
3371
|
+
return S(q);
|
|
3372
3372
|
}
|
|
3373
|
-
function
|
|
3374
|
-
function
|
|
3373
|
+
function Z(M) {
|
|
3374
|
+
function q(le, H, J, se, U) {
|
|
3375
3375
|
if (typeof M != "function")
|
|
3376
|
-
return new c("Property `" +
|
|
3377
|
-
var
|
|
3376
|
+
return new c("Property `" + U + "` of component `" + J + "` has invalid PropType notation inside objectOf.");
|
|
3377
|
+
var W = le[H], ne = ee(W);
|
|
3378
3378
|
if (ne !== "object")
|
|
3379
|
-
return new c("Invalid " + se + " `" +
|
|
3380
|
-
for (var ce in
|
|
3381
|
-
if (n(
|
|
3382
|
-
var I = M(
|
|
3379
|
+
return new c("Invalid " + se + " `" + U + "` of type " + ("`" + ne + "` supplied to `" + J + "`, expected an object."));
|
|
3380
|
+
for (var ce in W)
|
|
3381
|
+
if (n(W, ce)) {
|
|
3382
|
+
var I = M(W, ce, J, se, U + "." + ce, r);
|
|
3383
3383
|
if (I instanceof Error)
|
|
3384
3384
|
return I;
|
|
3385
3385
|
}
|
|
3386
3386
|
return null;
|
|
3387
3387
|
}
|
|
3388
|
-
return S(
|
|
3388
|
+
return S(q);
|
|
3389
3389
|
}
|
|
3390
|
-
function
|
|
3390
|
+
function B(M) {
|
|
3391
3391
|
if (!Array.isArray(M))
|
|
3392
3392
|
return process.env.NODE_ENV !== "production" && a("Invalid argument supplied to oneOfType, expected an instance of array."), s;
|
|
3393
|
-
for (var
|
|
3394
|
-
var le = M[
|
|
3393
|
+
for (var q = 0; q < M.length; q++) {
|
|
3394
|
+
var le = M[q];
|
|
3395
3395
|
if (typeof le != "function")
|
|
3396
3396
|
return a(
|
|
3397
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + oe(le) + " at index " +
|
|
3397
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + oe(le) + " at index " + q + "."
|
|
3398
3398
|
), s;
|
|
3399
3399
|
}
|
|
3400
|
-
function H(J, se,
|
|
3400
|
+
function H(J, se, U, W, ne) {
|
|
3401
3401
|
for (var ce = [], I = 0; I < M.length; I++) {
|
|
3402
|
-
var ie = M[I], P = ie(J, se,
|
|
3402
|
+
var ie = M[I], P = ie(J, se, U, W, ne, r);
|
|
3403
3403
|
if (P == null)
|
|
3404
3404
|
return null;
|
|
3405
3405
|
P.data && n(P.data, "expectedType") && ce.push(P.data.expectedType);
|
|
3406
3406
|
}
|
|
3407
|
-
var
|
|
3408
|
-
return new c("Invalid " +
|
|
3407
|
+
var N = ce.length > 0 ? ", expected one of type [" + ce.join(", ") + "]" : "";
|
|
3408
|
+
return new c("Invalid " + W + " `" + ne + "` supplied to " + ("`" + U + "`" + N + "."));
|
|
3409
3409
|
}
|
|
3410
3410
|
return S(H);
|
|
3411
3411
|
}
|
|
3412
3412
|
function d() {
|
|
3413
|
-
function M(
|
|
3414
|
-
return
|
|
3413
|
+
function M(q, le, H, J, se) {
|
|
3414
|
+
return V(q[le]) ? null : new c("Invalid " + J + " `" + se + "` supplied to " + ("`" + H + "`, expected a ReactNode."));
|
|
3415
3415
|
}
|
|
3416
3416
|
return S(M);
|
|
3417
3417
|
}
|
|
3418
|
-
function j(M,
|
|
3418
|
+
function j(M, q, le, H, J) {
|
|
3419
3419
|
return new c(
|
|
3420
|
-
(M || "React class") + ": " +
|
|
3420
|
+
(M || "React class") + ": " + q + " type `" + le + "." + H + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + J + "`."
|
|
3421
3421
|
);
|
|
3422
3422
|
}
|
|
3423
3423
|
function D(M) {
|
|
3424
|
-
function
|
|
3425
|
-
var
|
|
3424
|
+
function q(le, H, J, se, U) {
|
|
3425
|
+
var W = le[H], ne = ee(W);
|
|
3426
3426
|
if (ne !== "object")
|
|
3427
|
-
return new c("Invalid " + se + " `" +
|
|
3427
|
+
return new c("Invalid " + se + " `" + U + "` of type `" + ne + "` " + ("supplied to `" + J + "`, expected `object`."));
|
|
3428
3428
|
for (var ce in M) {
|
|
3429
3429
|
var I = M[ce];
|
|
3430
3430
|
if (typeof I != "function")
|
|
3431
|
-
return j(J, se,
|
|
3432
|
-
var ie = I(
|
|
3431
|
+
return j(J, se, U, ce, de(I));
|
|
3432
|
+
var ie = I(W, ce, J, se, U + "." + ce, r);
|
|
3433
3433
|
if (ie)
|
|
3434
3434
|
return ie;
|
|
3435
3435
|
}
|
|
3436
3436
|
return null;
|
|
3437
3437
|
}
|
|
3438
|
-
return S(
|
|
3438
|
+
return S(q);
|
|
3439
3439
|
}
|
|
3440
3440
|
function L(M) {
|
|
3441
|
-
function
|
|
3442
|
-
var
|
|
3441
|
+
function q(le, H, J, se, U) {
|
|
3442
|
+
var W = le[H], ne = ee(W);
|
|
3443
3443
|
if (ne !== "object")
|
|
3444
|
-
return new c("Invalid " + se + " `" +
|
|
3444
|
+
return new c("Invalid " + se + " `" + U + "` of type `" + ne + "` " + ("supplied to `" + J + "`, expected `object`."));
|
|
3445
3445
|
var ce = t({}, le[H], M);
|
|
3446
3446
|
for (var I in ce) {
|
|
3447
3447
|
var ie = M[I];
|
|
3448
3448
|
if (n(M, I) && typeof ie != "function")
|
|
3449
|
-
return j(J, se,
|
|
3449
|
+
return j(J, se, U, I, de(ie));
|
|
3450
3450
|
if (!ie)
|
|
3451
3451
|
return new c(
|
|
3452
|
-
"Invalid " + se + " `" +
|
|
3452
|
+
"Invalid " + se + " `" + U + "` key `" + I + "` supplied to `" + J + "`.\nBad object: " + JSON.stringify(le[H], null, " ") + `
|
|
3453
3453
|
Valid keys: ` + JSON.stringify(Object.keys(M), null, " ")
|
|
3454
3454
|
);
|
|
3455
|
-
var P = ie(
|
|
3455
|
+
var P = ie(W, I, J, se, U + "." + I, r);
|
|
3456
3456
|
if (P)
|
|
3457
3457
|
return P;
|
|
3458
3458
|
}
|
|
3459
3459
|
return null;
|
|
3460
3460
|
}
|
|
3461
|
-
return S(
|
|
3461
|
+
return S(q);
|
|
3462
3462
|
}
|
|
3463
|
-
function
|
|
3463
|
+
function V(M) {
|
|
3464
3464
|
switch (typeof M) {
|
|
3465
3465
|
case "number":
|
|
3466
3466
|
case "string":
|
|
@@ -3470,20 +3470,20 @@ Valid keys: ` + JSON.stringify(Object.keys(M), null, " ")
|
|
|
3470
3470
|
return !M;
|
|
3471
3471
|
case "object":
|
|
3472
3472
|
if (Array.isArray(M))
|
|
3473
|
-
return M.every(
|
|
3473
|
+
return M.every(V);
|
|
3474
3474
|
if (M === null || o(M))
|
|
3475
3475
|
return !0;
|
|
3476
|
-
var
|
|
3477
|
-
if (
|
|
3478
|
-
var le =
|
|
3479
|
-
if (
|
|
3476
|
+
var q = p(M);
|
|
3477
|
+
if (q) {
|
|
3478
|
+
var le = q.call(M), H;
|
|
3479
|
+
if (q !== M.entries) {
|
|
3480
3480
|
for (; !(H = le.next()).done; )
|
|
3481
|
-
if (!
|
|
3481
|
+
if (!V(H.value))
|
|
3482
3482
|
return !1;
|
|
3483
3483
|
} else
|
|
3484
3484
|
for (; !(H = le.next()).done; ) {
|
|
3485
3485
|
var J = H.value;
|
|
3486
|
-
if (J && !
|
|
3486
|
+
if (J && !V(J[1]))
|
|
3487
3487
|
return !1;
|
|
3488
3488
|
}
|
|
3489
3489
|
} else
|
|
@@ -3493,43 +3493,43 @@ Valid keys: ` + JSON.stringify(Object.keys(M), null, " ")
|
|
|
3493
3493
|
return !1;
|
|
3494
3494
|
}
|
|
3495
3495
|
}
|
|
3496
|
-
function K(M,
|
|
3497
|
-
return M === "symbol" ? !0 :
|
|
3496
|
+
function K(M, q) {
|
|
3497
|
+
return M === "symbol" ? !0 : q ? q["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && q instanceof Symbol : !1;
|
|
3498
3498
|
}
|
|
3499
3499
|
function ee(M) {
|
|
3500
|
-
var
|
|
3501
|
-
return Array.isArray(M) ? "array" : M instanceof RegExp ? "object" : K(
|
|
3500
|
+
var q = typeof M;
|
|
3501
|
+
return Array.isArray(M) ? "array" : M instanceof RegExp ? "object" : K(q, M) ? "symbol" : q;
|
|
3502
3502
|
}
|
|
3503
3503
|
function de(M) {
|
|
3504
3504
|
if (typeof M > "u" || M === null)
|
|
3505
3505
|
return "" + M;
|
|
3506
|
-
var
|
|
3507
|
-
if (
|
|
3506
|
+
var q = ee(M);
|
|
3507
|
+
if (q === "object") {
|
|
3508
3508
|
if (M instanceof Date)
|
|
3509
3509
|
return "date";
|
|
3510
3510
|
if (M instanceof RegExp)
|
|
3511
3511
|
return "regexp";
|
|
3512
3512
|
}
|
|
3513
|
-
return
|
|
3513
|
+
return q;
|
|
3514
3514
|
}
|
|
3515
3515
|
function oe(M) {
|
|
3516
|
-
var
|
|
3517
|
-
switch (
|
|
3516
|
+
var q = de(M);
|
|
3517
|
+
switch (q) {
|
|
3518
3518
|
case "array":
|
|
3519
3519
|
case "object":
|
|
3520
|
-
return "an " +
|
|
3520
|
+
return "an " + q;
|
|
3521
3521
|
case "boolean":
|
|
3522
3522
|
case "date":
|
|
3523
3523
|
case "regexp":
|
|
3524
|
-
return "a " +
|
|
3524
|
+
return "a " + q;
|
|
3525
3525
|
default:
|
|
3526
|
-
return
|
|
3526
|
+
return q;
|
|
3527
3527
|
}
|
|
3528
3528
|
}
|
|
3529
3529
|
function ae(M) {
|
|
3530
3530
|
return !M.constructor || !M.constructor.name ? m : M.constructor.name;
|
|
3531
3531
|
}
|
|
3532
|
-
return
|
|
3532
|
+
return b.checkPropTypes = i, b.resetWarningCache = i.resetWarningCache, b.PropTypes = b, b;
|
|
3533
3533
|
}, Li;
|
|
3534
3534
|
}
|
|
3535
3535
|
var Bi, js;
|
|
@@ -3641,7 +3641,7 @@ var zs;
|
|
|
3641
3641
|
function tp() {
|
|
3642
3642
|
if (zs) return Te;
|
|
3643
3643
|
zs = 1;
|
|
3644
|
-
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), n = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), a = Symbol.for("react.consumer"), s = Symbol.for("react.context"), o = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), u = Symbol.for("react.memo"), p = Symbol.for("react.lazy"), m = Symbol.for("react.view_transition"),
|
|
3644
|
+
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), n = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), a = Symbol.for("react.consumer"), s = Symbol.for("react.context"), o = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), u = Symbol.for("react.memo"), p = Symbol.for("react.lazy"), m = Symbol.for("react.view_transition"), b = Symbol.for("react.client.reference");
|
|
3645
3645
|
function x(c) {
|
|
3646
3646
|
if (typeof c == "object" && c !== null) {
|
|
3647
3647
|
var S = c.$$typeof;
|
|
@@ -3698,7 +3698,7 @@ function tp() {
|
|
|
3698
3698
|
}, Te.isSuspenseList = function(c) {
|
|
3699
3699
|
return x(c) === f;
|
|
3700
3700
|
}, Te.isValidElementType = function(c) {
|
|
3701
|
-
return typeof c == "string" || typeof c == "function" || c === r || c === i || c === n || c === l || c === f || typeof c == "object" && c !== null && (c.$$typeof === p || c.$$typeof === u || c.$$typeof === s || c.$$typeof === a || c.$$typeof === o || c.$$typeof ===
|
|
3701
|
+
return typeof c == "string" || typeof c == "function" || c === r || c === i || c === n || c === l || c === f || typeof c == "object" && c !== null && (c.$$typeof === p || c.$$typeof === u || c.$$typeof === s || c.$$typeof === a || c.$$typeof === o || c.$$typeof === b || c.getModuleId !== void 0);
|
|
3702
3702
|
}, Te.typeOf = x, Te;
|
|
3703
3703
|
}
|
|
3704
3704
|
var ke = {};
|
|
@@ -3725,7 +3725,7 @@ function rp() {
|
|
|
3725
3725
|
case i:
|
|
3726
3726
|
case f:
|
|
3727
3727
|
case u:
|
|
3728
|
-
case
|
|
3728
|
+
case b:
|
|
3729
3729
|
return c;
|
|
3730
3730
|
default:
|
|
3731
3731
|
switch (c = c && c.$$typeof, c) {
|
|
@@ -3745,7 +3745,7 @@ function rp() {
|
|
|
3745
3745
|
}
|
|
3746
3746
|
}
|
|
3747
3747
|
}
|
|
3748
|
-
var t = Symbol.for("react.transitional.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), s = Symbol.for("react.consumer"), o = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), m = Symbol.for("react.lazy"),
|
|
3748
|
+
var t = Symbol.for("react.transitional.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), s = Symbol.for("react.consumer"), o = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), m = Symbol.for("react.lazy"), b = Symbol.for("react.view_transition"), x = Symbol.for("react.client.reference");
|
|
3749
3749
|
ke.ContextConsumer = s, ke.ContextProvider = o, ke.Element = t, ke.ForwardRef = l, ke.Fragment = n, ke.Lazy = m, ke.Memo = p, ke.Portal = r, ke.Profiler = a, ke.StrictMode = i, ke.Suspense = f, ke.SuspenseList = u, ke.isContextConsumer = function(c) {
|
|
3750
3750
|
return e(c) === s;
|
|
3751
3751
|
}, ke.isContextProvider = function(c) {
|
|
@@ -4526,24 +4526,24 @@ function Gp() {
|
|
|
4526
4526
|
const f = cp(i.breakpoints), u = Object.keys(f);
|
|
4527
4527
|
let p = f;
|
|
4528
4528
|
return Object.keys(l).forEach((m) => {
|
|
4529
|
-
const
|
|
4530
|
-
if (
|
|
4531
|
-
if (typeof
|
|
4529
|
+
const b = Yp(l[m], i);
|
|
4530
|
+
if (b != null)
|
|
4531
|
+
if (typeof b == "object")
|
|
4532
4532
|
if (a[m])
|
|
4533
|
-
p = vn(p, e(m,
|
|
4533
|
+
p = vn(p, e(m, b, i, a));
|
|
4534
4534
|
else {
|
|
4535
4535
|
const x = Lt({
|
|
4536
4536
|
theme: i
|
|
4537
|
-
},
|
|
4537
|
+
}, b, (c) => ({
|
|
4538
4538
|
[m]: c
|
|
4539
4539
|
}));
|
|
4540
|
-
Qp(x,
|
|
4541
|
-
sx:
|
|
4540
|
+
Qp(x, b) ? p[m] = t({
|
|
4541
|
+
sx: b,
|
|
4542
4542
|
theme: i
|
|
4543
4543
|
}) : p = vn(p, x);
|
|
4544
4544
|
}
|
|
4545
4545
|
else
|
|
4546
|
-
p = vn(p, e(m,
|
|
4546
|
+
p = vn(p, e(m, b, i, a));
|
|
4547
4547
|
}), ip(i, up(u, p));
|
|
4548
4548
|
}
|
|
4549
4549
|
return Array.isArray(n) ? n.map(s) : s(n);
|
|
@@ -4832,16 +4832,16 @@ function cd(e) {
|
|
|
4832
4832
|
function l(m) {
|
|
4833
4833
|
return `@media (max-width:${(typeof t[m] == "number" ? t[m] : m) - n / 100}${r})`;
|
|
4834
4834
|
}
|
|
4835
|
-
function f(m,
|
|
4836
|
-
const x = s.indexOf(
|
|
4837
|
-
return `@media (min-width:${typeof t[m] == "number" ? t[m] : m}${r}) and (max-width:${(x !== -1 && typeof t[s[x]] == "number" ? t[s[x]] :
|
|
4835
|
+
function f(m, b) {
|
|
4836
|
+
const x = s.indexOf(b);
|
|
4837
|
+
return `@media (min-width:${typeof t[m] == "number" ? t[m] : m}${r}) and (max-width:${(x !== -1 && typeof t[s[x]] == "number" ? t[s[x]] : b) - n / 100}${r})`;
|
|
4838
4838
|
}
|
|
4839
4839
|
function u(m) {
|
|
4840
4840
|
return s.indexOf(m) + 1 < s.length ? f(m, s[s.indexOf(m) + 1]) : o(m);
|
|
4841
4841
|
}
|
|
4842
4842
|
function p(m) {
|
|
4843
|
-
const
|
|
4844
|
-
return
|
|
4843
|
+
const b = s.indexOf(m);
|
|
4844
|
+
return b === 0 ? o(s[1]) : b === s.length - 1 ? l(s[b]) : f(m, s[s.indexOf(m) + 1]).replace("@media", "@media not all and");
|
|
4845
4845
|
}
|
|
4846
4846
|
return {
|
|
4847
4847
|
keys: s,
|
|
@@ -5053,7 +5053,7 @@ function bd(e = {}) {
|
|
|
5053
5053
|
vd(o, t, r);
|
|
5054
5054
|
}
|
|
5055
5055
|
return (o, l = {}) => {
|
|
5056
|
-
od(o, (
|
|
5056
|
+
od(o, (v) => v.filter((z) => z !== en));
|
|
5057
5057
|
const {
|
|
5058
5058
|
name: f,
|
|
5059
5059
|
slot: u,
|
|
@@ -5061,7 +5061,7 @@ function bd(e = {}) {
|
|
|
5061
5061
|
skipSx: m,
|
|
5062
5062
|
// TODO v6: remove `lowercaseFirstLetter()` in the next major release
|
|
5063
5063
|
// For more details: https://github.com/mui/material-ui/pull/37908
|
|
5064
|
-
overridesResolver:
|
|
5064
|
+
overridesResolver: b = gd($l(u)),
|
|
5065
5065
|
...x
|
|
5066
5066
|
} = l, c = p !== void 0 ? p : (
|
|
5067
5067
|
// TODO v6: remove `Root` in the next major release
|
|
@@ -5074,41 +5074,41 @@ function bd(e = {}) {
|
|
|
5074
5074
|
shouldForwardProp: y,
|
|
5075
5075
|
label: wd(f, u),
|
|
5076
5076
|
...x
|
|
5077
|
-
}), A = (
|
|
5078
|
-
if (
|
|
5079
|
-
return
|
|
5080
|
-
if (typeof
|
|
5081
|
-
return function(
|
|
5082
|
-
return Xn(
|
|
5077
|
+
}), A = (v) => {
|
|
5078
|
+
if (v.__emotion_real === v)
|
|
5079
|
+
return v;
|
|
5080
|
+
if (typeof v == "function")
|
|
5081
|
+
return function(F) {
|
|
5082
|
+
return Xn(F, v);
|
|
5083
5083
|
};
|
|
5084
|
-
if (Rt(
|
|
5085
|
-
const
|
|
5086
|
-
return
|
|
5087
|
-
return Xn(
|
|
5088
|
-
} :
|
|
5084
|
+
if (Rt(v)) {
|
|
5085
|
+
const z = Fl(v);
|
|
5086
|
+
return z.variants ? function(Z) {
|
|
5087
|
+
return Xn(Z, z);
|
|
5088
|
+
} : z.style;
|
|
5089
5089
|
}
|
|
5090
|
-
return
|
|
5091
|
-
}, _ = (...
|
|
5092
|
-
const
|
|
5093
|
-
if (
|
|
5090
|
+
return v;
|
|
5091
|
+
}, _ = (...v) => {
|
|
5092
|
+
const z = [], F = v.map(A), Z = [];
|
|
5093
|
+
if (z.push(a), f && b && Z.push(function(D) {
|
|
5094
5094
|
var ee, de;
|
|
5095
|
-
const
|
|
5096
|
-
if (!
|
|
5095
|
+
const V = (de = (ee = D.theme.components) == null ? void 0 : ee[f]) == null ? void 0 : de.styleOverrides;
|
|
5096
|
+
if (!V)
|
|
5097
5097
|
return null;
|
|
5098
5098
|
const K = {};
|
|
5099
|
-
for (const oe in
|
|
5100
|
-
K[oe] = Xn(D,
|
|
5101
|
-
return
|
|
5102
|
-
}), f && !c &&
|
|
5099
|
+
for (const oe in V)
|
|
5100
|
+
K[oe] = Xn(D, V[oe]);
|
|
5101
|
+
return b(D, K);
|
|
5102
|
+
}), f && !c && Z.push(function(D) {
|
|
5103
5103
|
var K, ee;
|
|
5104
|
-
const L = D.theme,
|
|
5105
|
-
return
|
|
5106
|
-
}), S ||
|
|
5107
|
-
const j =
|
|
5108
|
-
let
|
|
5109
|
-
|
|
5104
|
+
const L = D.theme, V = (ee = (K = L == null ? void 0 : L.components) == null ? void 0 : K[f]) == null ? void 0 : ee.variants;
|
|
5105
|
+
return V ? Rl(D, V) : null;
|
|
5106
|
+
}), S || Z.push(en), Array.isArray(F[0])) {
|
|
5107
|
+
const j = F.shift(), D = new Array(z.length).fill(""), L = new Array(Z.length).fill("");
|
|
5108
|
+
let V;
|
|
5109
|
+
V = [...D, ...j, ...L], V.raw = [...D, ...j.raw, ...L], z.unshift(V);
|
|
5110
5110
|
}
|
|
5111
|
-
const
|
|
5111
|
+
const B = [...z, ...F, ...Z], d = C(...B);
|
|
5112
5112
|
return o.muiName && (d.muiName = o.muiName), process.env.NODE_ENV !== "production" && (d.displayName = xd(f, u, o)), d;
|
|
5113
5113
|
};
|
|
5114
5114
|
return C.withConfig && (_.withConfig = C.withConfig), _;
|
|
@@ -5393,43 +5393,43 @@ function jd(e, t = {}) {
|
|
|
5393
5393
|
varsWithDefaults: p
|
|
5394
5394
|
} = Wi(l, t);
|
|
5395
5395
|
let m = p;
|
|
5396
|
-
const
|
|
5396
|
+
const b = {}, {
|
|
5397
5397
|
[o]: x,
|
|
5398
5398
|
...c
|
|
5399
5399
|
} = a;
|
|
5400
5400
|
if (Object.entries(c || {}).forEach(([A, _]) => {
|
|
5401
5401
|
const {
|
|
5402
|
-
vars:
|
|
5403
|
-
css:
|
|
5404
|
-
varsWithDefaults:
|
|
5402
|
+
vars: v,
|
|
5403
|
+
css: z,
|
|
5404
|
+
varsWithDefaults: F
|
|
5405
5405
|
} = Wi(_, t);
|
|
5406
|
-
m = ot(m,
|
|
5407
|
-
css:
|
|
5408
|
-
vars:
|
|
5406
|
+
m = ot(m, F), b[A] = {
|
|
5407
|
+
css: z,
|
|
5408
|
+
vars: v
|
|
5409
5409
|
};
|
|
5410
5410
|
}), x) {
|
|
5411
5411
|
const {
|
|
5412
5412
|
css: A,
|
|
5413
5413
|
vars: _,
|
|
5414
|
-
varsWithDefaults:
|
|
5414
|
+
varsWithDefaults: v
|
|
5415
5415
|
} = Wi(x, t);
|
|
5416
|
-
m = ot(m,
|
|
5416
|
+
m = ot(m, v), b[o] = {
|
|
5417
5417
|
css: A,
|
|
5418
5418
|
vars: _
|
|
5419
5419
|
};
|
|
5420
5420
|
}
|
|
5421
5421
|
function S(A, _) {
|
|
5422
|
-
var
|
|
5423
|
-
let
|
|
5424
|
-
if (i === "class" && (
|
|
5425
|
-
if (
|
|
5422
|
+
var z, F;
|
|
5423
|
+
let v = i;
|
|
5424
|
+
if (i === "class" && (v = ".%s"), i === "data" && (v = "[data-%s]"), i != null && i.startsWith("data-") && !i.includes("%s") && (v = `[${i}="%s"]`), A) {
|
|
5425
|
+
if (v === "media")
|
|
5426
5426
|
return e.defaultColorScheme === A ? ":root" : {
|
|
5427
|
-
[`@media (prefers-color-scheme: ${((
|
|
5427
|
+
[`@media (prefers-color-scheme: ${((F = (z = a[A]) == null ? void 0 : z.palette) == null ? void 0 : F.mode) || A})`]: {
|
|
5428
5428
|
":root": _
|
|
5429
5429
|
}
|
|
5430
5430
|
};
|
|
5431
|
-
if (
|
|
5432
|
-
return e.defaultColorScheme === A ? `:root, ${
|
|
5431
|
+
if (v)
|
|
5432
|
+
return e.defaultColorScheme === A ? `:root, ${v.replace("%s", String(A))}` : v.replace("%s", String(A));
|
|
5433
5433
|
}
|
|
5434
5434
|
return ":root";
|
|
5435
5435
|
}
|
|
@@ -5439,53 +5439,53 @@ function jd(e, t = {}) {
|
|
|
5439
5439
|
let A = {
|
|
5440
5440
|
...f
|
|
5441
5441
|
};
|
|
5442
|
-
return Object.entries(
|
|
5442
|
+
return Object.entries(b).forEach(([, {
|
|
5443
5443
|
vars: _
|
|
5444
5444
|
}]) => {
|
|
5445
5445
|
A = ot(A, _);
|
|
5446
5446
|
}), A;
|
|
5447
5447
|
},
|
|
5448
5448
|
generateStyleSheets: () => {
|
|
5449
|
-
var
|
|
5449
|
+
var Z, B;
|
|
5450
5450
|
const A = [], _ = e.defaultColorScheme || "light";
|
|
5451
|
-
function
|
|
5451
|
+
function v(d, j) {
|
|
5452
5452
|
Object.keys(j).length && A.push(typeof d == "string" ? {
|
|
5453
5453
|
[d]: {
|
|
5454
5454
|
...j
|
|
5455
5455
|
}
|
|
5456
5456
|
} : d);
|
|
5457
5457
|
}
|
|
5458
|
-
|
|
5458
|
+
v(r(void 0, {
|
|
5459
5459
|
...u
|
|
5460
5460
|
}), u);
|
|
5461
5461
|
const {
|
|
5462
|
-
[_]:
|
|
5463
|
-
...
|
|
5464
|
-
} =
|
|
5465
|
-
if (
|
|
5462
|
+
[_]: z,
|
|
5463
|
+
...F
|
|
5464
|
+
} = b;
|
|
5465
|
+
if (z) {
|
|
5466
5466
|
const {
|
|
5467
5467
|
css: d
|
|
5468
|
-
} =
|
|
5468
|
+
} = z, j = (B = (Z = a[_]) == null ? void 0 : Z.palette) == null ? void 0 : B.mode, D = !n && j ? {
|
|
5469
5469
|
colorScheme: j,
|
|
5470
5470
|
...d
|
|
5471
5471
|
} : {
|
|
5472
5472
|
...d
|
|
5473
5473
|
};
|
|
5474
|
-
|
|
5474
|
+
v(r(_, {
|
|
5475
5475
|
...D
|
|
5476
5476
|
}), D);
|
|
5477
5477
|
}
|
|
5478
|
-
return Object.entries(
|
|
5478
|
+
return Object.entries(F).forEach(([d, {
|
|
5479
5479
|
css: j
|
|
5480
5480
|
}]) => {
|
|
5481
|
-
var
|
|
5482
|
-
const D = (K = (
|
|
5481
|
+
var V, K;
|
|
5482
|
+
const D = (K = (V = a[d]) == null ? void 0 : V.palette) == null ? void 0 : K.mode, L = !n && D ? {
|
|
5483
5483
|
colorScheme: D,
|
|
5484
5484
|
...j
|
|
5485
5485
|
} : {
|
|
5486
5486
|
...j
|
|
5487
5487
|
};
|
|
5488
|
-
|
|
5488
|
+
v(r(d, {
|
|
5489
5489
|
...L
|
|
5490
5490
|
}), L);
|
|
5491
5491
|
}), A;
|
|
@@ -5740,8 +5740,8 @@ const theme2 = createTheme({ palette: {
|
|
|
5740
5740
|
} });` : ir(12, S ? ` (${S})` : "", JSON.stringify(c.main)));
|
|
5741
5741
|
return eo(c, "light", C, n), eo(c, "dark", A, n), c.contrastText || (c.contrastText = p(c.main)), c;
|
|
5742
5742
|
};
|
|
5743
|
-
let
|
|
5744
|
-
return t === "light" ?
|
|
5743
|
+
let b;
|
|
5744
|
+
return t === "light" ? b = Pl() : t === "dark" && (b = Il()), process.env.NODE_ENV !== "production" && (b || console.error(`MUI: The palette mode \`${t}\` is not supported.`)), ot({
|
|
5745
5745
|
// A collection of common colors.
|
|
5746
5746
|
common: {
|
|
5747
5747
|
...Sn
|
|
@@ -5796,7 +5796,7 @@ const theme2 = createTheme({ palette: {
|
|
|
5796
5796
|
// E.g., shift from Red 500 to Red 300 or Red 700.
|
|
5797
5797
|
tonalOffset: n,
|
|
5798
5798
|
// The light and dark mode object.
|
|
5799
|
-
...
|
|
5799
|
+
...b
|
|
5800
5800
|
}, i);
|
|
5801
5801
|
}
|
|
5802
5802
|
function Hd(e) {
|
|
@@ -5847,10 +5847,10 @@ function Yd(e, t) {
|
|
|
5847
5847
|
...p
|
|
5848
5848
|
} = typeof t == "function" ? t(e) : t;
|
|
5849
5849
|
process.env.NODE_ENV !== "production" && (typeof n != "number" && console.error("MUI: `fontSize` is required to be a number."), typeof l != "number" && console.error("MUI: `htmlFontSize` is required to be a number."));
|
|
5850
|
-
const m = n / 14,
|
|
5850
|
+
const m = n / 14, b = u || ((S) => `${S / l * m}rem`), x = (S, y, C, A, _) => ({
|
|
5851
5851
|
fontFamily: r,
|
|
5852
5852
|
fontWeight: S,
|
|
5853
|
-
fontSize:
|
|
5853
|
+
fontSize: b(y),
|
|
5854
5854
|
// Unitless following https://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/
|
|
5855
5855
|
lineHeight: C,
|
|
5856
5856
|
// The letter spacing was designed for the Roboto font-family. Using the same letter-spacing
|
|
@@ -5885,7 +5885,7 @@ function Yd(e, t) {
|
|
|
5885
5885
|
};
|
|
5886
5886
|
return ot({
|
|
5887
5887
|
htmlFontSize: l,
|
|
5888
|
-
pxToRem:
|
|
5888
|
+
pxToRem: b,
|
|
5889
5889
|
fontFamily: r,
|
|
5890
5890
|
fontSize: n,
|
|
5891
5891
|
fontWeightLight: i,
|
|
@@ -6025,12 +6025,12 @@ function ha(e = {}, ...t) {
|
|
|
6025
6025
|
...af
|
|
6026
6026
|
}
|
|
6027
6027
|
});
|
|
6028
|
-
if (m = ot(m, f), m = t.reduce((
|
|
6029
|
-
const
|
|
6028
|
+
if (m = ot(m, f), m = t.reduce((b, x) => ot(b, x), m), process.env.NODE_ENV !== "production") {
|
|
6029
|
+
const b = ["active", "checked", "completed", "disabled", "error", "expanded", "focused", "focusVisible", "required", "selected"], x = (c, S) => {
|
|
6030
6030
|
let y;
|
|
6031
6031
|
for (y in c) {
|
|
6032
6032
|
const C = c[y];
|
|
6033
|
-
if (
|
|
6033
|
+
if (b.includes(y) && Object.keys(C).length > 0) {
|
|
6034
6034
|
if (process.env.NODE_ENV !== "production") {
|
|
6035
6035
|
const A = or("", y);
|
|
6036
6036
|
console.error([`MUI: The \`${S}\` component increases the CSS specificity of the \`${y}\` internal state.`, "You can not override it like this: ", JSON.stringify(c, null, 2), "", `Instead, you need to use the '&.${A}' syntax:`, JSON.stringify({
|
|
@@ -6214,14 +6214,14 @@ function yf(e = {}, ...t) {
|
|
|
6214
6214
|
rootSelector: l = ":root",
|
|
6215
6215
|
...f
|
|
6216
6216
|
} = e, u = Object.keys(r)[0], p = n || (r.light && u !== "light" ? "light" : u), m = hf(a), {
|
|
6217
|
-
[p]:
|
|
6217
|
+
[p]: b,
|
|
6218
6218
|
light: x,
|
|
6219
6219
|
dark: c,
|
|
6220
6220
|
...S
|
|
6221
6221
|
} = r, y = {
|
|
6222
6222
|
...S
|
|
6223
6223
|
};
|
|
6224
|
-
let C =
|
|
6224
|
+
let C = b;
|
|
6225
6225
|
if ((p === "dark" && !("dark" in r) || p === "light" && !("light" in r)) && (C = !0), !C)
|
|
6226
6226
|
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: The \`colorSchemes.${p}\` option is either missing or invalid.` : ir(21, p));
|
|
6227
6227
|
const A = Hi(y, C, f, p);
|
|
@@ -6240,10 +6240,10 @@ function yf(e = {}, ...t) {
|
|
|
6240
6240
|
},
|
|
6241
6241
|
spacing: mf(f.spacing)
|
|
6242
6242
|
};
|
|
6243
|
-
Object.keys(_.colorSchemes).forEach((
|
|
6244
|
-
const d = _.colorSchemes[
|
|
6245
|
-
const L = D.split("-"),
|
|
6246
|
-
return m(D, d[
|
|
6243
|
+
Object.keys(_.colorSchemes).forEach((B) => {
|
|
6244
|
+
const d = _.colorSchemes[B].palette, j = (D) => {
|
|
6245
|
+
const L = D.split("-"), V = L[1], K = L[2];
|
|
6246
|
+
return m(D, d[V][K]);
|
|
6247
6247
|
};
|
|
6248
6248
|
if (d.mode === "light" && ($(d.common, "background", "#fff"), $(d.common, "onBackground", "#000")), d.mode === "dark" && ($(d.common, "background", "#000"), $(d.common, "onBackground", "#fff")), ff(d, ["Alert", "AppBar", "Avatar", "Button", "Chip", "FilledInput", "LinearProgress", "Skeleton", "Slider", "SnackbarContent", "SpeedDialAction", "StepConnector", "StepContent", "Switch", "TableCell", "Tooltip"]), d.mode === "light") {
|
|
6249
6249
|
$(d.Alert, "errorColor", Oe(d.error.light, 0.6)), $(d.Alert, "infoColor", Oe(d.info.light, 0.6)), $(d.Alert, "successColor", Oe(d.success.light, 0.6)), $(d.Alert, "warningColor", Oe(d.warning.light, 0.6)), $(d.Alert, "errorFilledBg", j("palette-error-main")), $(d.Alert, "infoFilledBg", j("palette-info-main")), $(d.Alert, "successFilledBg", j("palette-success-main")), $(d.Alert, "warningFilledBg", j("palette-warning-main")), $(d.Alert, "errorFilledColor", Tt(() => d.getContrastText(d.error.main))), $(d.Alert, "infoFilledColor", Tt(() => d.getContrastText(d.info.main))), $(d.Alert, "successFilledColor", Tt(() => d.getContrastText(d.success.main))), $(d.Alert, "warningFilledColor", Tt(() => d.getContrastText(d.warning.main))), $(d.Alert, "errorStandardBg", _e(d.error.light, 0.9)), $(d.Alert, "infoStandardBg", _e(d.info.light, 0.9)), $(d.Alert, "successStandardBg", _e(d.success.light, 0.9)), $(d.Alert, "warningStandardBg", _e(d.warning.light, 0.9)), $(d.Alert, "errorIconColor", j("palette-error-main")), $(d.Alert, "infoIconColor", j("palette-info-main")), $(d.Alert, "successIconColor", j("palette-success-main")), $(d.Alert, "warningIconColor", j("palette-warning-main")), $(d.AppBar, "defaultBg", j("palette-grey-100")), $(d.Avatar, "defaultBg", j("palette-grey-400")), $(d.Button, "inheritContainedBg", j("palette-grey-300")), $(d.Button, "inheritContainedHoverBg", j("palette-grey-A100")), $(d.Chip, "defaultBorder", j("palette-grey-400")), $(d.Chip, "defaultAvatarColor", j("palette-grey-700")), $(d.Chip, "defaultIconColor", j("palette-grey-700")), $(d.FilledInput, "bg", "rgba(0, 0, 0, 0.06)"), $(d.FilledInput, "hoverBg", "rgba(0, 0, 0, 0.09)"), $(d.FilledInput, "disabledBg", "rgba(0, 0, 0, 0.12)"), $(d.LinearProgress, "primaryBg", _e(d.primary.main, 0.62)), $(d.LinearProgress, "secondaryBg", _e(d.secondary.main, 0.62)), $(d.LinearProgress, "errorBg", _e(d.error.main, 0.62)), $(d.LinearProgress, "infoBg", _e(d.info.main, 0.62)), $(d.LinearProgress, "successBg", _e(d.success.main, 0.62)), $(d.LinearProgress, "warningBg", _e(d.warning.main, 0.62)), $(d.Skeleton, "bg", `rgba(${j("palette-text-primaryChannel")} / 0.11)`), $(d.Slider, "primaryTrack", _e(d.primary.main, 0.62)), $(d.Slider, "secondaryTrack", _e(d.secondary.main, 0.62)), $(d.Slider, "errorTrack", _e(d.error.main, 0.62)), $(d.Slider, "infoTrack", _e(d.info.main, 0.62)), $(d.Slider, "successTrack", _e(d.success.main, 0.62)), $(d.Slider, "warningTrack", _e(d.warning.main, 0.62));
|
|
@@ -6259,20 +6259,20 @@ function yf(e = {}, ...t) {
|
|
|
6259
6259
|
const L = d[D];
|
|
6260
6260
|
D !== "tonalOffset" && L && typeof L == "object" && (L.main && $(d[D], "mainChannel", fn(mn(L.main))), L.light && $(d[D], "lightChannel", fn(mn(L.light))), L.dark && $(d[D], "darkChannel", fn(mn(L.dark))), L.contrastText && $(d[D], "contrastTextChannel", fn(mn(L.contrastText))), D === "text" && (jt(d[D], "primary"), jt(d[D], "secondary")), D === "action" && (L.active && jt(d[D], "active"), L.selected && jt(d[D], "selected")));
|
|
6261
6261
|
});
|
|
6262
|
-
}), _ = t.reduce((
|
|
6263
|
-
const
|
|
6262
|
+
}), _ = t.reduce((B, d) => ot(B, d), _);
|
|
6263
|
+
const v = {
|
|
6264
6264
|
prefix: a,
|
|
6265
6265
|
disableCssColorScheme: i,
|
|
6266
6266
|
shouldSkipGeneratingVar: s,
|
|
6267
6267
|
getSelector: df(_)
|
|
6268
6268
|
}, {
|
|
6269
|
-
vars:
|
|
6270
|
-
generateThemeVars:
|
|
6271
|
-
generateStyleSheets:
|
|
6272
|
-
} = jd(_,
|
|
6273
|
-
return _.vars =
|
|
6274
|
-
_[
|
|
6275
|
-
}), _.generateThemeVars =
|
|
6269
|
+
vars: z,
|
|
6270
|
+
generateThemeVars: F,
|
|
6271
|
+
generateStyleSheets: Z
|
|
6272
|
+
} = jd(_, v);
|
|
6273
|
+
return _.vars = z, Object.entries(_.colorSchemes[_.defaultColorScheme]).forEach(([B, d]) => {
|
|
6274
|
+
_[B] = d;
|
|
6275
|
+
}), _.generateThemeVars = F, _.generateStyleSheets = Z, _.generateSpacing = function() {
|
|
6276
6276
|
return Ol(f.spacing, La(this));
|
|
6277
6277
|
}, _.getColorSchemeSelector = Md(o), _.spacing = _.generateSpacing(), _.shouldSkipGeneratingVar = s, _.unstable_sxConfig = {
|
|
6278
6278
|
...Dn,
|
|
@@ -6502,7 +6502,7 @@ const Cf = {
|
|
|
6502
6502
|
gutterBottom: u = !1,
|
|
6503
6503
|
noWrap: p = !1,
|
|
6504
6504
|
paragraph: m = !1,
|
|
6505
|
-
variant:
|
|
6505
|
+
variant: b = "body1",
|
|
6506
6506
|
variantMapping: x = ao,
|
|
6507
6507
|
...c
|
|
6508
6508
|
} = s, S = {
|
|
@@ -6514,9 +6514,9 @@ const Cf = {
|
|
|
6514
6514
|
gutterBottom: u,
|
|
6515
6515
|
noWrap: p,
|
|
6516
6516
|
paragraph: m,
|
|
6517
|
-
variant:
|
|
6517
|
+
variant: b,
|
|
6518
6518
|
variantMapping: x
|
|
6519
|
-
}, y = f || (m ? "p" : x[
|
|
6519
|
+
}, y = f || (m ? "p" : x[b] || ao[b]) || "span", C = _f(S);
|
|
6520
6520
|
return /* @__PURE__ */ E(Af, {
|
|
6521
6521
|
as: y,
|
|
6522
6522
|
ref: r,
|
|
@@ -6701,15 +6701,15 @@ const $f = (e, t) => {
|
|
|
6701
6701
|
variant: u,
|
|
6702
6702
|
...p
|
|
6703
6703
|
} = n, m = Ff() || {};
|
|
6704
|
-
let
|
|
6705
|
-
u && m.variant && process.env.NODE_ENV !== "production" && u === m.variant && console.error("MUI: The `InputAdornment` variant infers the variant prop you do not have to provide one."), m && !
|
|
6704
|
+
let b = u;
|
|
6705
|
+
u && m.variant && process.env.NODE_ENV !== "production" && u === m.variant && console.error("MUI: The `InputAdornment` variant infers the variant prop you do not have to provide one."), m && !b && (b = m.variant);
|
|
6706
6706
|
const x = {
|
|
6707
6707
|
...n,
|
|
6708
6708
|
hiddenLabel: m.hiddenLabel,
|
|
6709
6709
|
size: m.size,
|
|
6710
6710
|
disablePointerEvents: o,
|
|
6711
6711
|
position: f,
|
|
6712
|
-
variant:
|
|
6712
|
+
variant: b
|
|
6713
6713
|
}, c = Df(x);
|
|
6714
6714
|
return /* @__PURE__ */ E(Ka.Provider, {
|
|
6715
6715
|
value: null,
|
|
@@ -6813,7 +6813,7 @@ const jf = (e) => {
|
|
|
6813
6813
|
})(Tr(({
|
|
6814
6814
|
theme: e
|
|
6815
6815
|
}) => {
|
|
6816
|
-
var t, r, n, i, a, s, o, l, f, u, p, m,
|
|
6816
|
+
var t, r, n, i, a, s, o, l, f, u, p, m, b, x;
|
|
6817
6817
|
return {
|
|
6818
6818
|
userSelect: "none",
|
|
6819
6819
|
width: "1em",
|
|
@@ -6889,7 +6889,7 @@ const jf = (e) => {
|
|
|
6889
6889
|
color: "disabled"
|
|
6890
6890
|
},
|
|
6891
6891
|
style: {
|
|
6892
|
-
color: (x = (
|
|
6892
|
+
color: (x = (b = (e.vars ?? e).palette) == null ? void 0 : b.action) == null ? void 0 : x.disabled
|
|
6893
6893
|
}
|
|
6894
6894
|
},
|
|
6895
6895
|
{
|
|
@@ -6916,7 +6916,7 @@ const jf = (e) => {
|
|
|
6916
6916
|
inheritViewBox: u = !1,
|
|
6917
6917
|
titleAccess: p,
|
|
6918
6918
|
viewBox: m = "0 0 24 24",
|
|
6919
|
-
...
|
|
6919
|
+
...b
|
|
6920
6920
|
} = n, x = /* @__PURE__ */ re.isValidElement(i) && i.type === "svg", c = {
|
|
6921
6921
|
...n,
|
|
6922
6922
|
color: s,
|
|
@@ -6938,7 +6938,7 @@ const jf = (e) => {
|
|
|
6938
6938
|
role: p ? "img" : void 0,
|
|
6939
6939
|
ref: r,
|
|
6940
6940
|
...S,
|
|
6941
|
-
...
|
|
6941
|
+
...b,
|
|
6942
6942
|
...x && i.props,
|
|
6943
6943
|
ownerState: c,
|
|
6944
6944
|
children: [x ? i.props.children : i, p ? /* @__PURE__ */ E("title", {
|
|
@@ -7412,7 +7412,7 @@ function Bl(e) {
|
|
|
7412
7412
|
in: o,
|
|
7413
7413
|
onExited: l,
|
|
7414
7414
|
timeout: f
|
|
7415
|
-
} = e, [u, p] = re.useState(!1), m = Xe(t, r.ripple, r.rippleVisible, n && r.ripplePulsate),
|
|
7415
|
+
} = e, [u, p] = re.useState(!1), m = Xe(t, r.ripple, r.rippleVisible, n && r.ripplePulsate), b = {
|
|
7416
7416
|
width: s,
|
|
7417
7417
|
height: s,
|
|
7418
7418
|
top: -(s / 2) + a,
|
|
@@ -7427,7 +7427,7 @@ function Bl(e) {
|
|
|
7427
7427
|
}
|
|
7428
7428
|
}, [l, o, f]), /* @__PURE__ */ E("span", {
|
|
7429
7429
|
className: m,
|
|
7430
|
-
style:
|
|
7430
|
+
style: b,
|
|
7431
7431
|
children: /* @__PURE__ */ E("span", {
|
|
7432
7432
|
className: x
|
|
7433
7433
|
})
|
|
@@ -7578,13 +7578,13 @@ const dt = kr("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsa
|
|
|
7578
7578
|
re.useEffect(() => {
|
|
7579
7579
|
p.current && (p.current(), p.current = null);
|
|
7580
7580
|
}, [l]);
|
|
7581
|
-
const m = re.useRef(!1),
|
|
7581
|
+
const m = re.useRef(!1), b = nm(), x = re.useRef(null), c = re.useRef(null), S = re.useCallback((_) => {
|
|
7582
7582
|
const {
|
|
7583
|
-
pulsate:
|
|
7584
|
-
rippleX:
|
|
7585
|
-
rippleY:
|
|
7586
|
-
rippleSize:
|
|
7587
|
-
cb:
|
|
7583
|
+
pulsate: v,
|
|
7584
|
+
rippleX: z,
|
|
7585
|
+
rippleY: F,
|
|
7586
|
+
rippleSize: Z,
|
|
7587
|
+
cb: B
|
|
7588
7588
|
} = _;
|
|
7589
7589
|
f((d) => [...d, /* @__PURE__ */ E(cm, {
|
|
7590
7590
|
classes: {
|
|
@@ -7596,32 +7596,32 @@ const dt = kr("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsa
|
|
|
7596
7596
|
childPulsate: Xe(a.childPulsate, dt.childPulsate)
|
|
7597
7597
|
},
|
|
7598
7598
|
timeout: va,
|
|
7599
|
-
pulsate:
|
|
7600
|
-
rippleX:
|
|
7601
|
-
rippleY:
|
|
7602
|
-
rippleSize:
|
|
7603
|
-
}, u.current)]), u.current += 1, p.current =
|
|
7604
|
-
}, [a]), y = re.useCallback((_ = {},
|
|
7599
|
+
pulsate: v,
|
|
7600
|
+
rippleX: z,
|
|
7601
|
+
rippleY: F,
|
|
7602
|
+
rippleSize: Z
|
|
7603
|
+
}, u.current)]), u.current += 1, p.current = B;
|
|
7604
|
+
}, [a]), y = re.useCallback((_ = {}, v = {}, z = () => {
|
|
7605
7605
|
}) => {
|
|
7606
7606
|
const {
|
|
7607
|
-
pulsate:
|
|
7608
|
-
center:
|
|
7609
|
-
fakeElement:
|
|
7607
|
+
pulsate: F = !1,
|
|
7608
|
+
center: Z = i || v.pulsate,
|
|
7609
|
+
fakeElement: B = !1
|
|
7610
7610
|
// For test purposes
|
|
7611
|
-
} =
|
|
7611
|
+
} = v;
|
|
7612
7612
|
if ((_ == null ? void 0 : _.type) === "mousedown" && m.current) {
|
|
7613
7613
|
m.current = !1;
|
|
7614
7614
|
return;
|
|
7615
7615
|
}
|
|
7616
7616
|
(_ == null ? void 0 : _.type) === "touchstart" && (m.current = !0);
|
|
7617
|
-
const d =
|
|
7617
|
+
const d = B ? null : c.current, j = d ? d.getBoundingClientRect() : {
|
|
7618
7618
|
width: 0,
|
|
7619
7619
|
height: 0,
|
|
7620
7620
|
left: 0,
|
|
7621
7621
|
top: 0
|
|
7622
7622
|
};
|
|
7623
|
-
let D, L,
|
|
7624
|
-
if (
|
|
7623
|
+
let D, L, V;
|
|
7624
|
+
if (Z || _ === void 0 || _.clientX === 0 && _.clientY === 0 || !_.clientX && !_.touches)
|
|
7625
7625
|
D = Math.round(j.width / 2), L = Math.round(j.height / 2);
|
|
7626
7626
|
else {
|
|
7627
7627
|
const {
|
|
@@ -7630,42 +7630,42 @@ const dt = kr("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsa
|
|
|
7630
7630
|
} = _.touches && _.touches.length > 0 ? _.touches[0] : _;
|
|
7631
7631
|
D = Math.round(K - j.left), L = Math.round(ee - j.top);
|
|
7632
7632
|
}
|
|
7633
|
-
if (
|
|
7634
|
-
|
|
7633
|
+
if (Z)
|
|
7634
|
+
V = Math.sqrt((2 * j.width ** 2 + j.height ** 2) / 3), V % 2 === 0 && (V += 1);
|
|
7635
7635
|
else {
|
|
7636
7636
|
const K = Math.max(Math.abs((d ? d.clientWidth : 0) - D), D) * 2 + 2, ee = Math.max(Math.abs((d ? d.clientHeight : 0) - L), L) * 2 + 2;
|
|
7637
|
-
|
|
7637
|
+
V = Math.sqrt(K ** 2 + ee ** 2);
|
|
7638
7638
|
}
|
|
7639
7639
|
_ != null && _.touches ? x.current === null && (x.current = () => {
|
|
7640
7640
|
S({
|
|
7641
|
-
pulsate:
|
|
7641
|
+
pulsate: F,
|
|
7642
7642
|
rippleX: D,
|
|
7643
7643
|
rippleY: L,
|
|
7644
|
-
rippleSize:
|
|
7645
|
-
cb:
|
|
7644
|
+
rippleSize: V,
|
|
7645
|
+
cb: z
|
|
7646
7646
|
});
|
|
7647
|
-
},
|
|
7647
|
+
}, b.start(im, () => {
|
|
7648
7648
|
x.current && (x.current(), x.current = null);
|
|
7649
7649
|
})) : S({
|
|
7650
|
-
pulsate:
|
|
7650
|
+
pulsate: F,
|
|
7651
7651
|
rippleX: D,
|
|
7652
7652
|
rippleY: L,
|
|
7653
|
-
rippleSize:
|
|
7654
|
-
cb:
|
|
7653
|
+
rippleSize: V,
|
|
7654
|
+
cb: z
|
|
7655
7655
|
});
|
|
7656
|
-
}, [i, S,
|
|
7656
|
+
}, [i, S, b]), C = re.useCallback(() => {
|
|
7657
7657
|
y({}, {
|
|
7658
7658
|
pulsate: !0
|
|
7659
7659
|
});
|
|
7660
|
-
}, [y]), A = re.useCallback((_,
|
|
7661
|
-
if (
|
|
7662
|
-
x.current(), x.current = null,
|
|
7663
|
-
A(_,
|
|
7660
|
+
}, [y]), A = re.useCallback((_, v) => {
|
|
7661
|
+
if (b.clear(), (_ == null ? void 0 : _.type) === "touchend" && x.current) {
|
|
7662
|
+
x.current(), x.current = null, b.start(0, () => {
|
|
7663
|
+
A(_, v);
|
|
7664
7664
|
});
|
|
7665
7665
|
return;
|
|
7666
7666
|
}
|
|
7667
|
-
x.current = null, f((
|
|
7668
|
-
}, [
|
|
7667
|
+
x.current = null, f((z) => z.length > 0 ? z.slice(1) : z), p.current = v;
|
|
7668
|
+
}, [b]);
|
|
7669
7669
|
return re.useImperativeHandle(r, () => ({
|
|
7670
7670
|
pulsate: C,
|
|
7671
7671
|
start: y,
|
|
@@ -7765,7 +7765,7 @@ const pm = kr("MuiButtonBase", ["root", "disabled", "focusVisible"]), dm = (e) =
|
|
|
7765
7765
|
disableRipple: u = !1,
|
|
7766
7766
|
disableTouchRipple: p = !1,
|
|
7767
7767
|
focusRipple: m = !1,
|
|
7768
|
-
focusVisibleClassName:
|
|
7768
|
+
focusVisibleClassName: b,
|
|
7769
7769
|
LinkComponent: x = "a",
|
|
7770
7770
|
onBlur: c,
|
|
7771
7771
|
onClick: S,
|
|
@@ -7773,46 +7773,46 @@ const pm = kr("MuiButtonBase", ["root", "disabled", "focusVisible"]), dm = (e) =
|
|
|
7773
7773
|
onDragLeave: C,
|
|
7774
7774
|
onFocus: A,
|
|
7775
7775
|
onFocusVisible: _,
|
|
7776
|
-
onKeyDown:
|
|
7777
|
-
onKeyUp:
|
|
7778
|
-
onMouseDown:
|
|
7779
|
-
onMouseLeave:
|
|
7780
|
-
onMouseUp:
|
|
7776
|
+
onKeyDown: v,
|
|
7777
|
+
onKeyUp: z,
|
|
7778
|
+
onMouseDown: F,
|
|
7779
|
+
onMouseLeave: Z,
|
|
7780
|
+
onMouseUp: B,
|
|
7781
7781
|
onTouchEnd: d,
|
|
7782
7782
|
onTouchMove: j,
|
|
7783
7783
|
onTouchStart: D,
|
|
7784
7784
|
tabIndex: L = 0,
|
|
7785
|
-
TouchRippleProps:
|
|
7785
|
+
TouchRippleProps: V,
|
|
7786
7786
|
touchRippleRef: K,
|
|
7787
7787
|
type: ee,
|
|
7788
7788
|
...de
|
|
7789
|
-
} = n, oe = re.useRef(null), ae = Wf(), M = uo(ae.ref, K), [
|
|
7790
|
-
f &&
|
|
7789
|
+
} = n, oe = re.useRef(null), ae = Wf(), M = uo(ae.ref, K), [q, le] = re.useState(!1);
|
|
7790
|
+
f && q && le(!1), re.useImperativeHandle(i, () => ({
|
|
7791
7791
|
focusVisible: () => {
|
|
7792
7792
|
le(!0), oe.current.focus();
|
|
7793
7793
|
}
|
|
7794
7794
|
}), []);
|
|
7795
7795
|
const H = ae.shouldMount && !u && !f;
|
|
7796
7796
|
re.useEffect(() => {
|
|
7797
|
-
|
|
7798
|
-
}, [u, m,
|
|
7799
|
-
const J = Mt(ae, "start",
|
|
7800
|
-
|
|
7797
|
+
q && m && !u && ae.pulsate();
|
|
7798
|
+
}, [u, m, q, ae]);
|
|
7799
|
+
const J = Mt(ae, "start", F, p), se = Mt(ae, "stop", y, p), U = Mt(ae, "stop", C, p), W = Mt(ae, "stop", B, p), ne = Mt(ae, "stop", (T) => {
|
|
7800
|
+
q && T.preventDefault(), Z && Z(T);
|
|
7801
7801
|
}, p), ce = Mt(ae, "start", D, p), I = Mt(ae, "stop", d, p), ie = Mt(ae, "stop", j, p), P = Mt(ae, "stop", (T) => {
|
|
7802
7802
|
po(T.target) || le(!1), c && c(T);
|
|
7803
|
-
}, !1),
|
|
7803
|
+
}, !1), N = Jn((T) => {
|
|
7804
7804
|
oe.current || (oe.current = T.currentTarget), po(T.target) && (le(!0), _ && _(T)), A && A(T);
|
|
7805
7805
|
}), Q = () => {
|
|
7806
7806
|
const T = oe.current;
|
|
7807
7807
|
return l && l !== "button" && !(T.tagName === "A" && T.href);
|
|
7808
7808
|
}, me = Jn((T) => {
|
|
7809
|
-
m && !T.repeat &&
|
|
7809
|
+
m && !T.repeat && q && T.key === " " && ae.stop(T, () => {
|
|
7810
7810
|
ae.start(T);
|
|
7811
|
-
}), T.target === T.currentTarget && Q() && T.key === " " && T.preventDefault(),
|
|
7811
|
+
}), T.target === T.currentTarget && Q() && T.key === " " && T.preventDefault(), v && v(T), T.target === T.currentTarget && Q() && T.key === "Enter" && !f && (T.preventDefault(), S && S(T));
|
|
7812
7812
|
}), $e = Jn((T) => {
|
|
7813
|
-
m && T.key === " " &&
|
|
7813
|
+
m && T.key === " " && q && !T.defaultPrevented && ae.stop(T, () => {
|
|
7814
7814
|
ae.pulsate(T);
|
|
7815
|
-
}),
|
|
7815
|
+
}), z && z(T), S && T.target === T.currentTarget && Q() && T.key === " " && !T.defaultPrevented && S(T);
|
|
7816
7816
|
});
|
|
7817
7817
|
let Ae = l;
|
|
7818
7818
|
Ae === "button" && (de.href || de.to) && (Ae = x);
|
|
@@ -7827,7 +7827,7 @@ const pm = kr("MuiButtonBase", ["root", "disabled", "focusVisible"]), dm = (e) =
|
|
|
7827
7827
|
disableTouchRipple: p,
|
|
7828
7828
|
focusRipple: m,
|
|
7829
7829
|
tabIndex: L,
|
|
7830
|
-
focusVisible:
|
|
7830
|
+
focusVisible: q
|
|
7831
7831
|
}, k = dm(h);
|
|
7832
7832
|
return /* @__PURE__ */ he(fm, {
|
|
7833
7833
|
as: Ae,
|
|
@@ -7836,13 +7836,13 @@ const pm = kr("MuiButtonBase", ["root", "disabled", "focusVisible"]), dm = (e) =
|
|
|
7836
7836
|
onBlur: P,
|
|
7837
7837
|
onClick: S,
|
|
7838
7838
|
onContextMenu: se,
|
|
7839
|
-
onFocus:
|
|
7839
|
+
onFocus: N,
|
|
7840
7840
|
onKeyDown: me,
|
|
7841
7841
|
onKeyUp: $e,
|
|
7842
7842
|
onMouseDown: J,
|
|
7843
7843
|
onMouseLeave: ne,
|
|
7844
|
-
onMouseUp:
|
|
7845
|
-
onDragLeave:
|
|
7844
|
+
onMouseUp: W,
|
|
7845
|
+
onDragLeave: U,
|
|
7846
7846
|
onTouchEnd: I,
|
|
7847
7847
|
onTouchMove: ie,
|
|
7848
7848
|
onTouchStart: ce,
|
|
@@ -7854,7 +7854,7 @@ const pm = kr("MuiButtonBase", ["root", "disabled", "focusVisible"]), dm = (e) =
|
|
|
7854
7854
|
children: [s, H ? /* @__PURE__ */ E(ql, {
|
|
7855
7855
|
ref: M,
|
|
7856
7856
|
center: a,
|
|
7857
|
-
...
|
|
7857
|
+
...V
|
|
7858
7858
|
}) : null]
|
|
7859
7859
|
});
|
|
7860
7860
|
});
|
|
@@ -8156,7 +8156,7 @@ const qt = 44, ba = _n`
|
|
|
8156
8156
|
value: u = 0,
|
|
8157
8157
|
variant: p = "indeterminate",
|
|
8158
8158
|
...m
|
|
8159
|
-
} = n,
|
|
8159
|
+
} = n, b = {
|
|
8160
8160
|
...n,
|
|
8161
8161
|
color: a,
|
|
8162
8162
|
disableShrink: s,
|
|
@@ -8164,7 +8164,7 @@ const qt = 44, ba = _n`
|
|
|
8164
8164
|
thickness: f,
|
|
8165
8165
|
value: u,
|
|
8166
8166
|
variant: p
|
|
8167
|
-
}, x = gm(
|
|
8167
|
+
}, x = gm(b), c = {}, S = {}, y = {};
|
|
8168
8168
|
if (p === "determinate") {
|
|
8169
8169
|
const C = 2 * Math.PI * ((qt - f) / 2);
|
|
8170
8170
|
c.strokeDasharray = C.toFixed(3), y["aria-valuenow"] = Math.round(u), c.strokeDashoffset = `${((100 - u) / 100 * C).toFixed(3)}px`, S.transform = "rotate(-90deg)";
|
|
@@ -8177,19 +8177,19 @@ const qt = 44, ba = _n`
|
|
|
8177
8177
|
...S,
|
|
8178
8178
|
...l
|
|
8179
8179
|
},
|
|
8180
|
-
ownerState:
|
|
8180
|
+
ownerState: b,
|
|
8181
8181
|
ref: r,
|
|
8182
8182
|
role: "progressbar",
|
|
8183
8183
|
...y,
|
|
8184
8184
|
...m,
|
|
8185
8185
|
children: /* @__PURE__ */ E(bm, {
|
|
8186
8186
|
className: x.svg,
|
|
8187
|
-
ownerState:
|
|
8187
|
+
ownerState: b,
|
|
8188
8188
|
viewBox: `${qt / 2} ${qt / 2} ${qt} ${qt}`,
|
|
8189
8189
|
children: /* @__PURE__ */ E(xm, {
|
|
8190
8190
|
className: x.circle,
|
|
8191
8191
|
style: c,
|
|
8192
|
-
ownerState:
|
|
8192
|
+
ownerState: b,
|
|
8193
8193
|
cx: qt,
|
|
8194
8194
|
cy: qt,
|
|
8195
8195
|
r: (qt - f) / 2,
|
|
@@ -8422,9 +8422,9 @@ const ho = kr("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimar
|
|
|
8422
8422
|
size: u = "medium",
|
|
8423
8423
|
id: p,
|
|
8424
8424
|
loading: m = null,
|
|
8425
|
-
loadingIndicator:
|
|
8425
|
+
loadingIndicator: b,
|
|
8426
8426
|
...x
|
|
8427
|
-
} = n, c = Nf(p), S =
|
|
8427
|
+
} = n, c = Nf(p), S = b ?? /* @__PURE__ */ E(Wl, {
|
|
8428
8428
|
"aria-labelledby": c,
|
|
8429
8429
|
color: "inherit",
|
|
8430
8430
|
size: 16
|
|
@@ -8565,20 +8565,27 @@ async function _m(e, t, r, n) {
|
|
|
8565
8565
|
body: u,
|
|
8566
8566
|
transform: p,
|
|
8567
8567
|
dependsOn: m,
|
|
8568
|
-
passThroughFields:
|
|
8568
|
+
passThroughFields: b
|
|
8569
8569
|
} = e;
|
|
8570
8570
|
let x = i;
|
|
8571
8571
|
if (t && !i.startsWith("http") && (x = `${t}${i.startsWith("/") ? i : `/${i}`}`), n) {
|
|
8572
|
-
const
|
|
8573
|
-
x = x.replace(
|
|
8574
|
-
const
|
|
8575
|
-
return
|
|
8572
|
+
const v = /\{([^}]+)\}/g;
|
|
8573
|
+
x = x.replace(v, (z, F) => {
|
|
8574
|
+
const Z = n[F];
|
|
8575
|
+
return Z != null ? encodeURIComponent(String(Z)) : "";
|
|
8576
8576
|
}), x = x.replace(/\?&/g, "?").replace(/&&/g, "&").replace(/\?$/g, "");
|
|
8577
8577
|
}
|
|
8578
8578
|
const c = new URLSearchParams();
|
|
8579
|
-
Object.entries(f).forEach(([
|
|
8580
|
-
|
|
8579
|
+
Object.entries(f).forEach(([v, z]) => {
|
|
8580
|
+
z != null && c.append(v, String(z));
|
|
8581
8581
|
}), c.toString() && (x += `${x.includes("?") ? "&" : "?"}${c.toString()}`);
|
|
8582
|
+
try {
|
|
8583
|
+
const v = /^https?:\/\//i.test(x), z = new URL(x, v ? void 0 : "http://local.placeholder"), F = Array.from(z.searchParams.entries());
|
|
8584
|
+
for (const [Z, B] of F)
|
|
8585
|
+
(B === "" || B === "undefined" || B === "null") && z.searchParams.delete(Z);
|
|
8586
|
+
v ? x = z.toString() : x = z.pathname + (z.search ? z.search : ""), x = x.replace(/\?&/g, "?").replace(/&&/g, "&").replace(/\?$/g, "");
|
|
8587
|
+
} catch {
|
|
8588
|
+
}
|
|
8582
8589
|
const S = {
|
|
8583
8590
|
"Content-Type": "application/json",
|
|
8584
8591
|
...r,
|
|
@@ -8597,15 +8604,15 @@ async function _m(e, t, r, n) {
|
|
|
8597
8604
|
const _ = Array.isArray(A) ? A : A.data || A;
|
|
8598
8605
|
if (!Array.isArray(_))
|
|
8599
8606
|
throw new Error("API response is not an array");
|
|
8600
|
-
return _.map((
|
|
8601
|
-
const
|
|
8602
|
-
label:
|
|
8603
|
-
value:
|
|
8604
|
-
},
|
|
8605
|
-
if (Array.isArray(
|
|
8606
|
-
for (const
|
|
8607
|
-
|
|
8608
|
-
return
|
|
8607
|
+
return _.map((v) => {
|
|
8608
|
+
const z = {
|
|
8609
|
+
label: v[o] || v.name || v.title || String(v[s] || ""),
|
|
8610
|
+
value: v[s] || v.id || v.value || ""
|
|
8611
|
+
}, F = Array.isArray(b) ? b : void 0;
|
|
8612
|
+
if (Array.isArray(F))
|
|
8613
|
+
for (const Z of F)
|
|
8614
|
+
v[Z] !== void 0 && (z[Z] = v[Z]);
|
|
8615
|
+
return z;
|
|
8609
8616
|
});
|
|
8610
8617
|
} catch (i) {
|
|
8611
8618
|
throw console.error("API fetch error:", i), new Error(`Failed to fetch data: ${i instanceof Error ? i.message : "Unknown error"}`);
|
|
@@ -8626,7 +8633,6 @@ function Am(e, t, r, n, i = !1) {
|
|
|
8626
8633
|
a,
|
|
8627
8634
|
// primary dependency value for gating
|
|
8628
8635
|
n ? JSON.stringify(n) : null
|
|
8629
|
-
// include all placeholder values to bust cache on change
|
|
8630
8636
|
], [e == null ? void 0 : e.endpoint, e == null ? void 0 : e.method, e == null ? void 0 : e.valueField, e == null ? void 0 : e.labelField, t, a, n]);
|
|
8631
8637
|
return Hu({
|
|
8632
8638
|
queryKey: s,
|
|
@@ -8676,38 +8682,38 @@ function wy(e, t) {
|
|
|
8676
8682
|
return !0;
|
|
8677
8683
|
}
|
|
8678
8684
|
const Fm = ({ field: e, control: t, errors: r, baseUrl: n, apiHeaders: i, formData: a, setValue: s }) => {
|
|
8679
|
-
const o = r[e.name], l = !!o, [f, u] = Ft(!1), p = mt(!1), [m,
|
|
8685
|
+
const o = r[e.name], l = !!o, [f, u] = Ft(!1), p = mt(!1), [m, b] = Ft(!1), [x, c] = Ft(!1), [S, y] = Ft(!1), C = mt(null), A = mt(null), _ = () => {
|
|
8680
8686
|
var H;
|
|
8681
8687
|
return e.required !== void 0 ? e.required : ((H = e.validation) == null ? void 0 : H.required) !== void 0 ? e.validation.required : !1;
|
|
8682
|
-
},
|
|
8688
|
+
}, v = (H) => _() ? `${H} *` : H, z = () => e.value !== void 0 ? e.value : e.type === "checkbox" ? !1 : e.type === "select" && e.default ? e.default : e.type === "autocomplete" && e.multiple ? [] : "", F = Be(() => {
|
|
8683
8689
|
const H = Hl(e);
|
|
8684
8690
|
return H && Array.isArray(e.passThroughFields) && (H.passThroughFields = e.passThroughFields), H;
|
|
8685
|
-
}, [e.apiConfig, e.api_endpoint, e.api_method, e.value_field, e.label_field, e.depends_on, e.conditional, e.passThroughFields]),
|
|
8686
|
-
if (!(
|
|
8687
|
-
const H =
|
|
8688
|
-
return se && (
|
|
8689
|
-
}, [
|
|
8691
|
+
}, [e.apiConfig, e.api_endpoint, e.api_method, e.value_field, e.label_field, e.depends_on, e.conditional, e.passThroughFields]), Z = mt(null), B = F != null && F.dependsOn ? a == null ? void 0 : a[F.dependsOn] : null, d = Be(() => {
|
|
8692
|
+
if (!(F != null && F.dependsOn)) return !1;
|
|
8693
|
+
const H = B, J = Z.current, se = H !== J;
|
|
8694
|
+
return se && (Z.current = H), se;
|
|
8695
|
+
}, [F == null ? void 0 : F.dependsOn, B]), j = Be(() => !0, []), D = Be(() => f && Mr(e) && (!(F != null && F.dependsOn) || B), [f, e, F == null ? void 0 : F.dependsOn, B]), L = Be(() => {
|
|
8690
8696
|
const H = {};
|
|
8691
8697
|
if (!a) return H;
|
|
8692
|
-
const J = (
|
|
8698
|
+
const J = (F == null ? void 0 : F.endpoint) || (e == null ? void 0 : e.api_endpoint);
|
|
8693
8699
|
if (J && typeof J == "string") {
|
|
8694
8700
|
const se = J.match(/\{([^}]+)\}/g) || [];
|
|
8695
|
-
for (const
|
|
8696
|
-
const
|
|
8697
|
-
ne !== void 0 && (H[
|
|
8701
|
+
for (const U of se) {
|
|
8702
|
+
const W = U.slice(1, -1), ne = a[W];
|
|
8703
|
+
ne !== void 0 && (H[W] = ne);
|
|
8698
8704
|
}
|
|
8699
8705
|
}
|
|
8700
|
-
if (
|
|
8701
|
-
const se =
|
|
8702
|
-
|
|
8706
|
+
if (F != null && F.dependsOn) {
|
|
8707
|
+
const se = F.dependsOn, U = a[se];
|
|
8708
|
+
U !== void 0 && (H[se] = U);
|
|
8703
8709
|
}
|
|
8704
8710
|
return H;
|
|
8705
|
-
}, [
|
|
8706
|
-
data:
|
|
8711
|
+
}, [F == null ? void 0 : F.endpoint, e == null ? void 0 : e.api_endpoint, F == null ? void 0 : F.dependsOn, a]), {
|
|
8712
|
+
data: V = [],
|
|
8707
8713
|
isLoading: K,
|
|
8708
8714
|
error: ee
|
|
8709
8715
|
} = Am(
|
|
8710
|
-
|
|
8716
|
+
F,
|
|
8711
8717
|
n,
|
|
8712
8718
|
i,
|
|
8713
8719
|
L,
|
|
@@ -8724,9 +8730,9 @@ const Fm = ({ field: e, control: t, errors: r, baseUrl: n, apiHeaders: i, formDa
|
|
|
8724
8730
|
H != null && H !== "" && (p.current = !0, u(!0));
|
|
8725
8731
|
}
|
|
8726
8732
|
}, [e, a]), Dt(() => {
|
|
8727
|
-
Mr(e) && (
|
|
8728
|
-
}, [d,
|
|
8729
|
-
const ae = Le(() => Mr(e) ?
|
|
8733
|
+
Mr(e) && (F != null && F.dependsOn) && d && p.current && (p.current = !1, u(!1));
|
|
8734
|
+
}, [d, F == null ? void 0 : F.dependsOn]);
|
|
8735
|
+
const ae = Le(() => Mr(e) ? V : e.type === "select" || e.type === "toggle" || e.type === "radio" || e.type === "autocomplete" ? e.options || [] : [], [e, V]);
|
|
8730
8736
|
if (!j)
|
|
8731
8737
|
return null;
|
|
8732
8738
|
const M = () => {
|
|
@@ -8765,14 +8771,14 @@ const Fm = ({ field: e, control: t, errors: r, baseUrl: n, apiHeaders: i, formDa
|
|
|
8765
8771
|
{
|
|
8766
8772
|
name: e.name,
|
|
8767
8773
|
control: t,
|
|
8768
|
-
defaultValue:
|
|
8769
|
-
render: ({ field:
|
|
8774
|
+
defaultValue: z(),
|
|
8775
|
+
render: ({ field: U }) => /* @__PURE__ */ E(
|
|
8770
8776
|
jn,
|
|
8771
8777
|
{
|
|
8772
|
-
...
|
|
8778
|
+
...U,
|
|
8773
8779
|
id: e.id,
|
|
8774
8780
|
fullWidth: !0,
|
|
8775
|
-
label:
|
|
8781
|
+
label: v(e.label),
|
|
8776
8782
|
size: "small",
|
|
8777
8783
|
type: e.type === "password" ? m ? "text" : "password" : e.type !== "textarea" ? e.type : void 0,
|
|
8778
8784
|
placeholder: e.placeholder,
|
|
@@ -8786,7 +8792,7 @@ const Fm = ({ field: e, control: t, errors: r, baseUrl: n, apiHeaders: i, formDa
|
|
|
8786
8792
|
ei,
|
|
8787
8793
|
{
|
|
8788
8794
|
"aria-label": "toggle password visibility",
|
|
8789
|
-
onClick: () =>
|
|
8795
|
+
onClick: () => b((W) => !W),
|
|
8790
8796
|
edge: "end",
|
|
8791
8797
|
children: m ? /* @__PURE__ */ E(go, {}) : /* @__PURE__ */ E(yo, {})
|
|
8792
8798
|
}
|
|
@@ -8802,14 +8808,14 @@ const Fm = ({ field: e, control: t, errors: r, baseUrl: n, apiHeaders: i, formDa
|
|
|
8802
8808
|
{
|
|
8803
8809
|
name: e.name,
|
|
8804
8810
|
control: t,
|
|
8805
|
-
defaultValue:
|
|
8806
|
-
render: ({ field:
|
|
8811
|
+
defaultValue: z(),
|
|
8812
|
+
render: ({ field: U }) => /* @__PURE__ */ E(
|
|
8807
8813
|
jn,
|
|
8808
8814
|
{
|
|
8809
|
-
...
|
|
8815
|
+
...U,
|
|
8810
8816
|
id: e.id,
|
|
8811
8817
|
fullWidth: !0,
|
|
8812
|
-
label:
|
|
8818
|
+
label: v(e.label),
|
|
8813
8819
|
size: "small",
|
|
8814
8820
|
type: "number",
|
|
8815
8821
|
placeholder: e.placeholder,
|
|
@@ -8831,15 +8837,15 @@ const Fm = ({ field: e, control: t, errors: r, baseUrl: n, apiHeaders: i, formDa
|
|
|
8831
8837
|
{
|
|
8832
8838
|
name: e.name,
|
|
8833
8839
|
control: t,
|
|
8834
|
-
defaultValue:
|
|
8835
|
-
render: ({ field:
|
|
8836
|
-
/* @__PURE__ */ E(Pc, { id: e.id, size: "small", children:
|
|
8840
|
+
defaultValue: z(),
|
|
8841
|
+
render: ({ field: U }) => /* @__PURE__ */ he(Pi, { fullWidth: !0, error: l || !!ee, size: "small", children: [
|
|
8842
|
+
/* @__PURE__ */ E(Pc, { id: e.id, size: "small", children: v(e.label) }),
|
|
8837
8843
|
/* @__PURE__ */ E(
|
|
8838
8844
|
Ic,
|
|
8839
8845
|
{
|
|
8840
|
-
...
|
|
8846
|
+
...U,
|
|
8841
8847
|
labelId: e.id,
|
|
8842
|
-
label:
|
|
8848
|
+
label: v(e.label),
|
|
8843
8849
|
size: "small",
|
|
8844
8850
|
disabled: e.disabled || K,
|
|
8845
8851
|
endAdornment: K ? /* @__PURE__ */ E(Nr, { size: 20 }) : void 0,
|
|
@@ -8847,7 +8853,7 @@ const Fm = ({ field: e, control: t, errors: r, baseUrl: n, apiHeaders: i, formDa
|
|
|
8847
8853
|
children: K ? /* @__PURE__ */ E(zn, { disabled: !0, children: /* @__PURE__ */ he(ve, { sx: { display: "flex", alignItems: "center", gap: 1, width: "100%" }, children: [
|
|
8848
8854
|
/* @__PURE__ */ E(Nr, { size: 16 }),
|
|
8849
8855
|
/* @__PURE__ */ E(Re, { variant: "body2", children: "Fetching data..." })
|
|
8850
|
-
] }) }) : H.length > 0 ? H.map((
|
|
8856
|
+
] }) }) : H.length > 0 ? H.map((W) => /* @__PURE__ */ E(zn, { value: W.value, children: W.label }, W.value)) : f && !K ? /* @__PURE__ */ E(zn, { disabled: !0, children: /* @__PURE__ */ E(Re, { variant: "body2", color: "text.secondary", children: "No options available" }) }) : /* @__PURE__ */ E(zn, { disabled: !0, children: /* @__PURE__ */ E(Re, { variant: "body2", color: "text.secondary", children: "Click to load options" }) })
|
|
8851
8857
|
}
|
|
8852
8858
|
),
|
|
8853
8859
|
(l || ee || e.helperText) && /* @__PURE__ */ E(ln, { children: (o == null ? void 0 : o.message) || (ee == null ? void 0 : ee.message) || e.helperText })
|
|
@@ -8860,22 +8866,22 @@ const Fm = ({ field: e, control: t, errors: r, baseUrl: n, apiHeaders: i, formDa
|
|
|
8860
8866
|
{
|
|
8861
8867
|
name: e.name,
|
|
8862
8868
|
control: t,
|
|
8863
|
-
defaultValue:
|
|
8864
|
-
render: ({ field:
|
|
8869
|
+
defaultValue: z(),
|
|
8870
|
+
render: ({ field: U }) => /* @__PURE__ */ he(ve, { sx: { mt: 1, mb: 0 }, children: [
|
|
8865
8871
|
/* @__PURE__ */ E(
|
|
8866
8872
|
Mn,
|
|
8867
8873
|
{
|
|
8868
8874
|
control: /* @__PURE__ */ E(
|
|
8869
8875
|
ns,
|
|
8870
8876
|
{
|
|
8871
|
-
...
|
|
8877
|
+
...U,
|
|
8872
8878
|
id: e.id,
|
|
8873
|
-
checked:
|
|
8879
|
+
checked: U.value,
|
|
8874
8880
|
size: "small",
|
|
8875
8881
|
disabled: e.disabled
|
|
8876
8882
|
}
|
|
8877
8883
|
),
|
|
8878
|
-
label:
|
|
8884
|
+
label: v(e.label)
|
|
8879
8885
|
}
|
|
8880
8886
|
),
|
|
8881
8887
|
(l || e.helperText) && /* @__PURE__ */ E(ln, { error: l, sx: { ml: 0 }, children: (o == null ? void 0 : o.message) || e.helperText })
|
|
@@ -8888,22 +8894,22 @@ const Fm = ({ field: e, control: t, errors: r, baseUrl: n, apiHeaders: i, formDa
|
|
|
8888
8894
|
{
|
|
8889
8895
|
name: e.name,
|
|
8890
8896
|
control: t,
|
|
8891
|
-
defaultValue:
|
|
8892
|
-
render: ({ field:
|
|
8893
|
-
/* @__PURE__ */ E(Re, { variant: "body2", component: "legend", sx: { mb: 1 }, children:
|
|
8897
|
+
defaultValue: z(),
|
|
8898
|
+
render: ({ field: U }) => /* @__PURE__ */ he(Pi, { component: "fieldset", error: l, children: [
|
|
8899
|
+
/* @__PURE__ */ E(Re, { variant: "body2", component: "legend", sx: { mb: 1 }, children: v(e.label) }),
|
|
8894
8900
|
/* @__PURE__ */ E(
|
|
8895
8901
|
is,
|
|
8896
8902
|
{
|
|
8897
|
-
...
|
|
8903
|
+
...U,
|
|
8898
8904
|
row: !0,
|
|
8899
|
-
children: e.options.map((
|
|
8905
|
+
children: e.options.map((W) => /* @__PURE__ */ E(
|
|
8900
8906
|
Mn,
|
|
8901
8907
|
{
|
|
8902
|
-
value:
|
|
8908
|
+
value: W.value,
|
|
8903
8909
|
control: /* @__PURE__ */ E(as, { size: "small" }),
|
|
8904
|
-
label:
|
|
8910
|
+
label: W.label
|
|
8905
8911
|
},
|
|
8906
|
-
|
|
8912
|
+
W.value
|
|
8907
8913
|
))
|
|
8908
8914
|
}
|
|
8909
8915
|
),
|
|
@@ -8917,21 +8923,21 @@ const Fm = ({ field: e, control: t, errors: r, baseUrl: n, apiHeaders: i, formDa
|
|
|
8917
8923
|
{
|
|
8918
8924
|
name: e.name,
|
|
8919
8925
|
control: t,
|
|
8920
|
-
defaultValue:
|
|
8921
|
-
render: ({ field:
|
|
8922
|
-
/* @__PURE__ */ E(Re, { variant: "body2", component: "legend", sx: { mb: 1 }, children:
|
|
8926
|
+
defaultValue: z(),
|
|
8927
|
+
render: ({ field: U }) => /* @__PURE__ */ he(Pi, { component: "fieldset", error: l, children: [
|
|
8928
|
+
/* @__PURE__ */ E(Re, { variant: "body2", component: "legend", sx: { mb: 1 }, children: v(e.label) }),
|
|
8923
8929
|
/* @__PURE__ */ E(
|
|
8924
8930
|
is,
|
|
8925
8931
|
{
|
|
8926
|
-
...
|
|
8927
|
-
children: e.options.map((
|
|
8932
|
+
...U,
|
|
8933
|
+
children: e.options.map((W) => /* @__PURE__ */ E(
|
|
8928
8934
|
Mn,
|
|
8929
8935
|
{
|
|
8930
|
-
value:
|
|
8936
|
+
value: W.value,
|
|
8931
8937
|
control: /* @__PURE__ */ E(as, { size: "small" }),
|
|
8932
|
-
label:
|
|
8938
|
+
label: W.label
|
|
8933
8939
|
},
|
|
8934
|
-
|
|
8940
|
+
W.value
|
|
8935
8941
|
))
|
|
8936
8942
|
}
|
|
8937
8943
|
),
|
|
@@ -8945,22 +8951,22 @@ const Fm = ({ field: e, control: t, errors: r, baseUrl: n, apiHeaders: i, formDa
|
|
|
8945
8951
|
{
|
|
8946
8952
|
name: e.name,
|
|
8947
8953
|
control: t,
|
|
8948
|
-
defaultValue:
|
|
8949
|
-
render: ({ field:
|
|
8954
|
+
defaultValue: z(),
|
|
8955
|
+
render: ({ field: U }) => /* @__PURE__ */ he(ve, { sx: { mt: 1, mb: 0 }, children: [
|
|
8950
8956
|
/* @__PURE__ */ E(
|
|
8951
8957
|
Mn,
|
|
8952
8958
|
{
|
|
8953
8959
|
control: /* @__PURE__ */ E(
|
|
8954
8960
|
Dc,
|
|
8955
8961
|
{
|
|
8956
|
-
...
|
|
8962
|
+
...U,
|
|
8957
8963
|
id: e.id,
|
|
8958
|
-
checked:
|
|
8964
|
+
checked: U.value,
|
|
8959
8965
|
size: "small",
|
|
8960
8966
|
disabled: e.disabled
|
|
8961
8967
|
}
|
|
8962
8968
|
),
|
|
8963
|
-
label:
|
|
8969
|
+
label: v(e.label)
|
|
8964
8970
|
}
|
|
8965
8971
|
),
|
|
8966
8972
|
(l || e.helperText) && /* @__PURE__ */ E(ln, { error: l, sx: { ml: 0 }, children: (o == null ? void 0 : o.message) || e.helperText })
|
|
@@ -8968,26 +8974,26 @@ const Fm = ({ field: e, control: t, errors: r, baseUrl: n, apiHeaders: i, formDa
|
|
|
8968
8974
|
}
|
|
8969
8975
|
);
|
|
8970
8976
|
case "autocomplete":
|
|
8971
|
-
const J = ae(), se = !!(e.disabled || K ||
|
|
8977
|
+
const J = ae(), se = !!(e.disabled || K || F != null && F.dependsOn && !B);
|
|
8972
8978
|
return /* @__PURE__ */ E(
|
|
8973
8979
|
Et,
|
|
8974
8980
|
{
|
|
8975
8981
|
name: e.name,
|
|
8976
8982
|
control: t,
|
|
8977
|
-
defaultValue:
|
|
8978
|
-
render: ({ field:
|
|
8979
|
-
const
|
|
8980
|
-
if (
|
|
8981
|
-
if (typeof
|
|
8982
|
-
if (typeof
|
|
8983
|
-
if (
|
|
8984
|
-
if (
|
|
8985
|
-
if (
|
|
8983
|
+
defaultValue: z(),
|
|
8984
|
+
render: ({ field: U }) => {
|
|
8985
|
+
const W = U.value, ne = e.multiple === !0, ce = (F == null ? void 0 : F.valueField) || e.value_field || "value", I = (F == null ? void 0 : F.labelField) || e.label_field || "label", ie = (N) => {
|
|
8986
|
+
if (N != null) {
|
|
8987
|
+
if (typeof N == "string" || typeof N == "number") return N;
|
|
8988
|
+
if (typeof N == "object") {
|
|
8989
|
+
if (N[ce] !== void 0) return N[ce];
|
|
8990
|
+
if (N.value !== void 0) return N.value;
|
|
8991
|
+
if (N.id !== void 0) return N.id;
|
|
8986
8992
|
}
|
|
8987
8993
|
}
|
|
8988
8994
|
}, P = (() => {
|
|
8989
8995
|
if (ne)
|
|
8990
|
-
return (Array.isArray(
|
|
8996
|
+
return (Array.isArray(W) ? W : []).map((Q) => {
|
|
8991
8997
|
const me = J.find(($e) => {
|
|
8992
8998
|
const Ae = ie($e);
|
|
8993
8999
|
return Ae !== void 0 && Ae === Q;
|
|
@@ -9000,30 +9006,30 @@ const Fm = ({ field: e, control: t, errors: r, baseUrl: n, apiHeaders: i, formDa
|
|
|
9000
9006
|
};
|
|
9001
9007
|
});
|
|
9002
9008
|
{
|
|
9003
|
-
if (
|
|
9004
|
-
const
|
|
9009
|
+
if (W == null || W === "") return null;
|
|
9010
|
+
const N = J.find((Q) => {
|
|
9005
9011
|
const me = ie(Q);
|
|
9006
|
-
return me !== void 0 && me ===
|
|
9012
|
+
return me !== void 0 && me === W;
|
|
9007
9013
|
});
|
|
9008
|
-
return
|
|
9009
|
-
[ce]:
|
|
9010
|
-
[I]: `Selected: ${
|
|
9011
|
-
value:
|
|
9012
|
-
label: `Selected: ${
|
|
9014
|
+
return N || {
|
|
9015
|
+
[ce]: W,
|
|
9016
|
+
[I]: `Selected: ${W}`,
|
|
9017
|
+
value: W,
|
|
9018
|
+
label: `Selected: ${W}`
|
|
9013
9019
|
};
|
|
9014
9020
|
}
|
|
9015
9021
|
})();
|
|
9016
9022
|
return /* @__PURE__ */ E(
|
|
9017
9023
|
$c,
|
|
9018
9024
|
{
|
|
9019
|
-
...
|
|
9025
|
+
...U,
|
|
9020
9026
|
id: e.id,
|
|
9021
9027
|
options: J,
|
|
9022
9028
|
value: P,
|
|
9023
9029
|
size: "small",
|
|
9024
|
-
getOptionLabel: (
|
|
9025
|
-
isOptionEqualToValue: (
|
|
9026
|
-
const me = ie(
|
|
9030
|
+
getOptionLabel: (N) => typeof N == "string" ? N : N[I] || N.label || N.name || "",
|
|
9031
|
+
isOptionEqualToValue: (N, Q) => {
|
|
9032
|
+
const me = ie(N), $e = ie(Q);
|
|
9027
9033
|
return me === void 0 || $e === void 0 ? !1 : me === $e;
|
|
9028
9034
|
},
|
|
9029
9035
|
multiple: e.multiple,
|
|
@@ -9033,9 +9039,9 @@ const Fm = ({ field: e, control: t, errors: r, baseUrl: n, apiHeaders: i, formDa
|
|
|
9033
9039
|
disabled: se,
|
|
9034
9040
|
loading: K,
|
|
9035
9041
|
onOpen: oe,
|
|
9036
|
-
renderOption: (
|
|
9042
|
+
renderOption: (N, Q, { selected: me }) => {
|
|
9037
9043
|
const $e = typeof Q == "string" ? Q : Q[I] || Q.label || Q.name || "";
|
|
9038
|
-
return /* @__PURE__ */ he("li", { ...
|
|
9044
|
+
return /* @__PURE__ */ he("li", { ...N, children: [
|
|
9039
9045
|
ne && /* @__PURE__ */ E(
|
|
9040
9046
|
ns,
|
|
9041
9047
|
{
|
|
@@ -9046,39 +9052,39 @@ const Fm = ({ field: e, control: t, errors: r, baseUrl: n, apiHeaders: i, formDa
|
|
|
9046
9052
|
$e
|
|
9047
9053
|
] });
|
|
9048
9054
|
},
|
|
9049
|
-
renderTags: ne ? (
|
|
9050
|
-
const $e =
|
|
9055
|
+
renderTags: ne ? (N, Q) => {
|
|
9056
|
+
const $e = N.slice(0, 2).map((Ce, Ke) => {
|
|
9051
9057
|
const h = typeof Ce == "string" ? Ce : Ce[I] || Ce.label || Ce.name || "", k = Q({ index: Ke });
|
|
9052
9058
|
return /* @__PURE__ */ Qo(rs, { ...k, key: Ke, label: h, size: "small" });
|
|
9053
|
-
}), Ae =
|
|
9059
|
+
}), Ae = N.length - 2;
|
|
9054
9060
|
return Ae > 0 && $e.push(/* @__PURE__ */ E(rs, { label: `+${Ae} more`, size: "small" }, "more")), $e;
|
|
9055
9061
|
} : void 0,
|
|
9056
|
-
renderInput: (
|
|
9062
|
+
renderInput: (N) => /* @__PURE__ */ E(
|
|
9057
9063
|
jn,
|
|
9058
9064
|
{
|
|
9059
|
-
...
|
|
9060
|
-
label:
|
|
9065
|
+
...N,
|
|
9066
|
+
label: v(e.label),
|
|
9061
9067
|
size: "small",
|
|
9062
|
-
placeholder: se && (
|
|
9068
|
+
placeholder: se && (F != null && F.dependsOn) && !B ? `Please select ${F.dependsOn.replace(/_/g, " ")} first` : e.placeholder,
|
|
9063
9069
|
error: l || !!ee,
|
|
9064
9070
|
helperText: (o == null ? void 0 : o.message) || (ee == null ? void 0 : ee.message) || e.helperText || "",
|
|
9065
9071
|
InputProps: {
|
|
9066
|
-
...
|
|
9072
|
+
...N.InputProps,
|
|
9067
9073
|
endAdornment: /* @__PURE__ */ he(Sc, { children: [
|
|
9068
9074
|
K ? /* @__PURE__ */ E(Nr, { color: "inherit", size: 20 }) : null,
|
|
9069
|
-
|
|
9075
|
+
N.InputProps.endAdornment
|
|
9070
9076
|
] })
|
|
9071
9077
|
}
|
|
9072
9078
|
}
|
|
9073
9079
|
),
|
|
9074
|
-
onChange: (
|
|
9075
|
-
const me = (
|
|
9080
|
+
onChange: (N, Q) => {
|
|
9081
|
+
const me = (F == null ? void 0 : F.valueField) || e.value_field || "value";
|
|
9076
9082
|
if (ne) {
|
|
9077
9083
|
const Ae = (Array.isArray(Q) ? Q : []).map((Ce) => typeof Ce == "object" && (Ce[me] || Ce.value || Ce.id) || Ce);
|
|
9078
|
-
|
|
9084
|
+
U.onChange(Ae);
|
|
9079
9085
|
} else {
|
|
9080
9086
|
let $e;
|
|
9081
|
-
Q && typeof Q == "object" ? $e = Q[me] || Q.value || Q.id || Q : $e = Q,
|
|
9087
|
+
Q && typeof Q == "object" ? $e = Q[me] || Q.value || Q.id || Q : $e = Q, U.onChange($e);
|
|
9082
9088
|
const Ae = e.selectedAssignments;
|
|
9083
9089
|
if (Ae && Q && typeof Q == "object")
|
|
9084
9090
|
for (const [Ce, Ke] of Object.entries(Ae)) {
|
|
@@ -9091,7 +9097,7 @@ const Fm = ({ field: e, control: t, errors: r, baseUrl: n, apiHeaders: i, formDa
|
|
|
9091
9097
|
}
|
|
9092
9098
|
}
|
|
9093
9099
|
},
|
|
9094
|
-
noOptionsText: se && (
|
|
9100
|
+
noOptionsText: se && (F != null && F.dependsOn) && !B ? `Please select ${F.dependsOn.replace(/_/g, " ")} first` : K ? "Fetching data..." : f && !K && J.length === 0 ? "No options available" : "Click to load options"
|
|
9095
9101
|
}
|
|
9096
9102
|
);
|
|
9097
9103
|
}
|
|
@@ -9103,14 +9109,14 @@ const Fm = ({ field: e, control: t, errors: r, baseUrl: n, apiHeaders: i, formDa
|
|
|
9103
9109
|
{
|
|
9104
9110
|
name: e.name,
|
|
9105
9111
|
control: t,
|
|
9106
|
-
defaultValue:
|
|
9107
|
-
render: ({ field:
|
|
9112
|
+
defaultValue: z(),
|
|
9113
|
+
render: ({ field: U }) => /* @__PURE__ */ E(
|
|
9108
9114
|
jn,
|
|
9109
9115
|
{
|
|
9110
|
-
...
|
|
9116
|
+
...U,
|
|
9111
9117
|
id: e.name,
|
|
9112
9118
|
fullWidth: !0,
|
|
9113
|
-
label:
|
|
9119
|
+
label: v(e.label),
|
|
9114
9120
|
size: "small",
|
|
9115
9121
|
type: "date",
|
|
9116
9122
|
disabled: e.disabled,
|
|
@@ -9133,20 +9139,20 @@ const Fm = ({ field: e, control: t, errors: r, baseUrl: n, apiHeaders: i, formDa
|
|
|
9133
9139
|
{
|
|
9134
9140
|
name: e.name,
|
|
9135
9141
|
control: t,
|
|
9136
|
-
defaultValue:
|
|
9137
|
-
render: ({ field:
|
|
9138
|
-
const
|
|
9139
|
-
if (
|
|
9140
|
-
const
|
|
9142
|
+
defaultValue: z(),
|
|
9143
|
+
render: ({ field: U }) => {
|
|
9144
|
+
const W = U.value || e.defaultValue || e.src;
|
|
9145
|
+
if (W) {
|
|
9146
|
+
const N = e.imageUploaded || {}, Q = N.previewText || "Preview", me = N.removeText || "Remove", $e = N.saveText || "Save logo", Ae = N.showSave !== void 0 ? N.showSave : !!(e.onSave || N.saveText), Ce = () => {
|
|
9141
9147
|
if (y(!0), typeof e.onPreview == "function")
|
|
9142
9148
|
try {
|
|
9143
|
-
e.onPreview(
|
|
9149
|
+
e.onPreview(W);
|
|
9144
9150
|
} catch {
|
|
9145
9151
|
}
|
|
9146
9152
|
}, Ke = () => {
|
|
9147
|
-
|
|
9153
|
+
U.onChange(""), typeof e.onRemove == "function" && e.onRemove();
|
|
9148
9154
|
}, h = () => {
|
|
9149
|
-
typeof e.onSave == "function" && e.onSave({ url:
|
|
9155
|
+
typeof e.onSave == "function" && e.onSave({ url: W, file: A.current || void 0 });
|
|
9150
9156
|
}, k = (T) => {
|
|
9151
9157
|
const Y = T.target.files && T.target.files[0];
|
|
9152
9158
|
if (Y) {
|
|
@@ -9157,7 +9163,7 @@ const Fm = ({ field: e, control: t, errors: r, baseUrl: n, apiHeaders: i, formDa
|
|
|
9157
9163
|
}
|
|
9158
9164
|
try {
|
|
9159
9165
|
const O = URL.createObjectURL(Y);
|
|
9160
|
-
|
|
9166
|
+
U.onChange(O);
|
|
9161
9167
|
} catch {
|
|
9162
9168
|
}
|
|
9163
9169
|
A.current = Y, y(!1);
|
|
@@ -9172,7 +9178,7 @@ const Fm = ({ field: e, control: t, errors: r, baseUrl: n, apiHeaders: i, formDa
|
|
|
9172
9178
|
gap: 2,
|
|
9173
9179
|
p: 2,
|
|
9174
9180
|
boxShadow: "0px 1px 4px 0px #00000014",
|
|
9175
|
-
...
|
|
9181
|
+
...N.cardSx
|
|
9176
9182
|
},
|
|
9177
9183
|
children: [
|
|
9178
9184
|
/* @__PURE__ */ E(
|
|
@@ -9186,17 +9192,17 @@ const Fm = ({ field: e, control: t, errors: r, baseUrl: n, apiHeaders: i, formDa
|
|
|
9186
9192
|
}
|
|
9187
9193
|
),
|
|
9188
9194
|
/* @__PURE__ */ he(ve, { sx: { display: "flex", flexDirection: "column", gap: 1 }, children: [
|
|
9189
|
-
/* @__PURE__ */ E(ve, { sx: { width: "30%", height: "10%", display: "flex", alignItems: "center", justifyContent: "center", borderRadius: "6px", background: "#FFFFFF", overflow: "hidden", ...
|
|
9195
|
+
/* @__PURE__ */ E(ve, { sx: { width: "30%", height: "10%", display: "flex", alignItems: "center", justifyContent: "center", borderRadius: "6px", background: "#FFFFFF", overflow: "hidden", ...N.thumbnailSx }, children: /* @__PURE__ */ E("img", { src: W, alt: e.alt || e.label, style: { maxWidth: "100%", maxHeight: "100%" } }) }),
|
|
9190
9196
|
/* @__PURE__ */ he(ve, { sx: { flexGrow: 1 }, children: [
|
|
9191
|
-
/* @__PURE__ */ E(Re, { sx: { fontSize: "12px", fontWeight: 500, ...
|
|
9192
|
-
/* @__PURE__ */ E(Re, { sx: { fontSize: "10px", ...
|
|
9197
|
+
/* @__PURE__ */ E(Re, { sx: { fontSize: "12px", fontWeight: 500, ...N.fileNameSx }, children: typeof W == "string" ? W.split("/").pop() : "Selected image" }),
|
|
9198
|
+
/* @__PURE__ */ E(Re, { sx: { fontSize: "10px", ...N.fileMetaSx }, children: "Image selected" })
|
|
9193
9199
|
] }),
|
|
9194
9200
|
/* @__PURE__ */ he(ve, { sx: { display: "flex", gap: 1 }, children: [
|
|
9195
9201
|
/* @__PURE__ */ E(
|
|
9196
9202
|
nt,
|
|
9197
9203
|
{
|
|
9198
9204
|
type: "button",
|
|
9199
|
-
sx: { ...
|
|
9205
|
+
sx: { ...N.previewButtonSx },
|
|
9200
9206
|
variant: "outlined",
|
|
9201
9207
|
onClick: Ce,
|
|
9202
9208
|
startIcon: /* @__PURE__ */ E(yo, {}),
|
|
@@ -9209,7 +9215,7 @@ const Fm = ({ field: e, control: t, errors: r, baseUrl: n, apiHeaders: i, formDa
|
|
|
9209
9215
|
variant: "outlined",
|
|
9210
9216
|
color: "error",
|
|
9211
9217
|
onClick: Ke,
|
|
9212
|
-
sx: { ...
|
|
9218
|
+
sx: { ...N.removeButtonSx },
|
|
9213
9219
|
startIcon: /* @__PURE__ */ E(go, {}),
|
|
9214
9220
|
children: me
|
|
9215
9221
|
}
|
|
@@ -9219,14 +9225,14 @@ const Fm = ({ field: e, control: t, errors: r, baseUrl: n, apiHeaders: i, formDa
|
|
|
9219
9225
|
{
|
|
9220
9226
|
variant: "contained",
|
|
9221
9227
|
onClick: h,
|
|
9222
|
-
sx: { ...
|
|
9228
|
+
sx: { ...N.saveButtonSx },
|
|
9223
9229
|
children: $e
|
|
9224
9230
|
}
|
|
9225
9231
|
)
|
|
9226
9232
|
] })
|
|
9227
9233
|
] }),
|
|
9228
9234
|
/* @__PURE__ */ he(_c, { open: S, onClose: () => y(!1), maxWidth: "md", fullWidth: !0, children: [
|
|
9229
|
-
/* @__PURE__ */ E(Ac, { children:
|
|
9235
|
+
/* @__PURE__ */ E(Ac, { children: N.previewTitle || "Image preview" }),
|
|
9230
9236
|
/* @__PURE__ */ E(Fc, { children: /* @__PURE__ */ E(ve, { sx: {
|
|
9231
9237
|
display: "flex",
|
|
9232
9238
|
alignItems: "center",
|
|
@@ -9237,13 +9243,13 @@ const Fm = ({ field: e, control: t, errors: r, baseUrl: n, apiHeaders: i, formDa
|
|
|
9237
9243
|
backgroundColor: "background.paper",
|
|
9238
9244
|
p: 1,
|
|
9239
9245
|
minHeight: 260
|
|
9240
|
-
}, children: /* @__PURE__ */ E("img", { src:
|
|
9246
|
+
}, children: /* @__PURE__ */ E("img", { src: W, alt: e.alt || e.label, style: { maxWidth: "100%", maxHeight: 380 } }) }) }),
|
|
9241
9247
|
/* @__PURE__ */ he(Rc, { children: [
|
|
9242
9248
|
/* @__PURE__ */ E(nt, { type: "button", variant: "outlined", onClick: () => {
|
|
9243
9249
|
var T;
|
|
9244
9250
|
return (T = C.current) == null ? void 0 : T.click();
|
|
9245
|
-
}, children:
|
|
9246
|
-
/* @__PURE__ */ E(nt, { type: "button", variant: "contained", onClick: () => y(!1), children:
|
|
9251
|
+
}, children: N.replaceText || "Replace logo" }),
|
|
9252
|
+
/* @__PURE__ */ E(nt, { type: "button", variant: "contained", onClick: () => y(!1), children: N.closeText || "Close" })
|
|
9247
9253
|
] })
|
|
9248
9254
|
] })
|
|
9249
9255
|
]
|
|
@@ -9251,18 +9257,18 @@ const Fm = ({ field: e, control: t, errors: r, baseUrl: n, apiHeaders: i, formDa
|
|
|
9251
9257
|
);
|
|
9252
9258
|
}
|
|
9253
9259
|
const ne = e.imagePlaceholder || {}, ce = ne.icon || "upload", I = C, ie = () => {
|
|
9254
|
-
var
|
|
9260
|
+
var N;
|
|
9255
9261
|
try {
|
|
9256
|
-
(
|
|
9262
|
+
(N = I.current) == null || N.click();
|
|
9257
9263
|
} catch {
|
|
9258
9264
|
}
|
|
9259
|
-
}, P = (
|
|
9260
|
-
const Q =
|
|
9265
|
+
}, P = (N) => {
|
|
9266
|
+
const Q = N.target.files && N.target.files[0];
|
|
9261
9267
|
if (Q) {
|
|
9262
9268
|
typeof e.onFileSelected == "function" && e.onFileSelected(Q);
|
|
9263
9269
|
try {
|
|
9264
9270
|
const me = URL.createObjectURL(Q);
|
|
9265
|
-
|
|
9271
|
+
U.onChange(me);
|
|
9266
9272
|
} catch {
|
|
9267
9273
|
}
|
|
9268
9274
|
A.current = Q;
|
|
@@ -9317,7 +9323,7 @@ const Fm = ({ field: e, control: t, errors: r, baseUrl: n, apiHeaders: i, formDa
|
|
|
9317
9323
|
default:
|
|
9318
9324
|
return null;
|
|
9319
9325
|
}
|
|
9320
|
-
},
|
|
9326
|
+
}, q = Be(() => !e.disabled || e.copyWhenDisabled === !1 ? !1 : !["title", "section", "image", "component"].includes(e.type), [e.disabled, e.copyWhenDisabled, e.type]), le = Le(async () => {
|
|
9321
9327
|
try {
|
|
9322
9328
|
const H = a ? a[e.name] : void 0;
|
|
9323
9329
|
let J = "";
|
|
@@ -9327,7 +9333,7 @@ const Fm = ({ field: e, control: t, errors: r, baseUrl: n, apiHeaders: i, formDa
|
|
|
9327
9333
|
}, [a, e.name]);
|
|
9328
9334
|
return /* @__PURE__ */ he(ve, { sx: { display: "flex", alignItems: "center", gap: 0.3 }, children: [
|
|
9329
9335
|
/* @__PURE__ */ E(ve, { sx: { flexGrow: 1 }, children: M() }),
|
|
9330
|
-
|
|
9336
|
+
q && /* @__PURE__ */ E(ei, { "aria-label": `copy ${e.label || e.name}`, onClick: le, size: "small", children: x ? /* @__PURE__ */ E(Cm, { fontSize: "small" }) : /* @__PURE__ */ E(km, { fontSize: "small" }) })
|
|
9331
9337
|
] });
|
|
9332
9338
|
};
|
|
9333
9339
|
var Ki, vo;
|
|
@@ -9351,28 +9357,28 @@ function Rm() {
|
|
|
9351
9357
|
normalizePath: u,
|
|
9352
9358
|
setter: function(y) {
|
|
9353
9359
|
var C = u(y);
|
|
9354
|
-
return l.get(y) || l.set(y, function(_,
|
|
9355
|
-
for (var
|
|
9356
|
-
var
|
|
9357
|
-
if (
|
|
9360
|
+
return l.get(y) || l.set(y, function(_, v) {
|
|
9361
|
+
for (var z = 0, F = C.length, Z = _; z < F - 1; ) {
|
|
9362
|
+
var B = C[z];
|
|
9363
|
+
if (B === "__proto__" || B === "constructor" || B === "prototype")
|
|
9358
9364
|
return _;
|
|
9359
|
-
|
|
9365
|
+
Z = Z[C[z++]];
|
|
9360
9366
|
}
|
|
9361
|
-
|
|
9367
|
+
Z[C[z]] = v;
|
|
9362
9368
|
});
|
|
9363
9369
|
},
|
|
9364
9370
|
getter: function(y, C) {
|
|
9365
9371
|
var A = u(y);
|
|
9366
|
-
return f.get(y) || f.set(y, function(
|
|
9367
|
-
for (var
|
|
9368
|
-
if (
|
|
9372
|
+
return f.get(y) || f.set(y, function(v) {
|
|
9373
|
+
for (var z = 0, F = A.length; z < F; )
|
|
9374
|
+
if (v != null || !C) v = v[A[z++]];
|
|
9369
9375
|
else return;
|
|
9370
|
-
return
|
|
9376
|
+
return v;
|
|
9371
9377
|
});
|
|
9372
9378
|
},
|
|
9373
9379
|
join: function(y) {
|
|
9374
9380
|
return y.reduce(function(C, A) {
|
|
9375
|
-
return C + (
|
|
9381
|
+
return C + (b(A) || r.test(A) ? "[" + A + "]" : (C ? "." : "") + A);
|
|
9376
9382
|
}, "");
|
|
9377
9383
|
},
|
|
9378
9384
|
forEach: function(y, C, A) {
|
|
@@ -9391,11 +9397,11 @@ function Rm() {
|
|
|
9391
9397
|
return y.match(t) || [""];
|
|
9392
9398
|
}
|
|
9393
9399
|
function m(y, C, A) {
|
|
9394
|
-
var _ = y.length,
|
|
9395
|
-
for (
|
|
9396
|
-
|
|
9400
|
+
var _ = y.length, v, z, F, Z;
|
|
9401
|
+
for (z = 0; z < _; z++)
|
|
9402
|
+
v = y[z], v && (S(v) && (v = '"' + v + '"'), Z = b(v), F = !Z && /^\d+$/.test(v), C.call(A, v, Z, F, z, y));
|
|
9397
9403
|
}
|
|
9398
|
-
function
|
|
9404
|
+
function b(y) {
|
|
9399
9405
|
return typeof y == "string" && y && ["'", '"'].indexOf(y.charAt(0)) !== -1;
|
|
9400
9406
|
}
|
|
9401
9407
|
function x(y) {
|
|
@@ -9405,7 +9411,7 @@ function Rm() {
|
|
|
9405
9411
|
return i.test(y);
|
|
9406
9412
|
}
|
|
9407
9413
|
function S(y) {
|
|
9408
|
-
return !
|
|
9414
|
+
return !b(y) && (x(y) || c(y));
|
|
9409
9415
|
}
|
|
9410
9416
|
return Ki;
|
|
9411
9417
|
}
|
|
@@ -9436,36 +9442,36 @@ function Dm() {
|
|
|
9436
9442
|
}, Wn.exports.array = e;
|
|
9437
9443
|
function e(i, a) {
|
|
9438
9444
|
var s = i.length, o = new Array(s), l = {}, f = s, u = r(a), p = n(i);
|
|
9439
|
-
for (a.forEach(function(
|
|
9440
|
-
if (!p.has(
|
|
9445
|
+
for (a.forEach(function(b) {
|
|
9446
|
+
if (!p.has(b[0]) || !p.has(b[1]))
|
|
9441
9447
|
throw new Error("Unknown node. There is an unknown node in the supplied edges.");
|
|
9442
9448
|
}); f--; )
|
|
9443
9449
|
l[f] || m(i[f], f, /* @__PURE__ */ new Set());
|
|
9444
9450
|
return o;
|
|
9445
|
-
function m(
|
|
9446
|
-
if (c.has(
|
|
9451
|
+
function m(b, x, c) {
|
|
9452
|
+
if (c.has(b)) {
|
|
9447
9453
|
var S;
|
|
9448
9454
|
try {
|
|
9449
|
-
S = ", node was:" + JSON.stringify(
|
|
9455
|
+
S = ", node was:" + JSON.stringify(b);
|
|
9450
9456
|
} catch {
|
|
9451
9457
|
S = "";
|
|
9452
9458
|
}
|
|
9453
9459
|
throw new Error("Cyclic dependency" + S);
|
|
9454
9460
|
}
|
|
9455
|
-
if (!p.has(
|
|
9456
|
-
throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: " + JSON.stringify(
|
|
9461
|
+
if (!p.has(b))
|
|
9462
|
+
throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: " + JSON.stringify(b));
|
|
9457
9463
|
if (!l[x]) {
|
|
9458
9464
|
l[x] = !0;
|
|
9459
|
-
var y = u.get(
|
|
9465
|
+
var y = u.get(b) || /* @__PURE__ */ new Set();
|
|
9460
9466
|
if (y = Array.from(y), x = y.length) {
|
|
9461
|
-
c.add(
|
|
9467
|
+
c.add(b);
|
|
9462
9468
|
do {
|
|
9463
9469
|
var C = y[--x];
|
|
9464
9470
|
m(C, p.get(C), c);
|
|
9465
9471
|
} while (x);
|
|
9466
|
-
c.delete(
|
|
9472
|
+
c.delete(b);
|
|
9467
9473
|
}
|
|
9468
|
-
o[--s] =
|
|
9474
|
+
o[--s] = b;
|
|
9469
9475
|
}
|
|
9470
9476
|
}
|
|
9471
9477
|
}
|
|
@@ -9713,7 +9719,7 @@ function zr(e) {
|
|
|
9713
9719
|
test: u,
|
|
9714
9720
|
params: p,
|
|
9715
9721
|
message: m,
|
|
9716
|
-
skipAbsent:
|
|
9722
|
+
skipAbsent: b
|
|
9717
9723
|
} = e;
|
|
9718
9724
|
let {
|
|
9719
9725
|
parent: x,
|
|
@@ -9733,12 +9739,12 @@ function zr(e) {
|
|
|
9733
9739
|
spec: s.spec,
|
|
9734
9740
|
disableStackTrace: j.disableStackTrace || y
|
|
9735
9741
|
}, p, j.params);
|
|
9736
|
-
for (const
|
|
9742
|
+
for (const V of Object.keys(D)) D[V] = C(D[V]);
|
|
9737
9743
|
const L = new it(it.formatError(j.message || m, D), r, D.path, j.type || f, D.disableStackTrace);
|
|
9738
9744
|
return L.params = D, L;
|
|
9739
9745
|
}
|
|
9740
9746
|
const _ = S ? o : l;
|
|
9741
|
-
let
|
|
9747
|
+
let v = {
|
|
9742
9748
|
path: n,
|
|
9743
9749
|
parent: x,
|
|
9744
9750
|
type: f,
|
|
@@ -9749,26 +9755,26 @@ function zr(e) {
|
|
|
9749
9755
|
originalValue: a,
|
|
9750
9756
|
schema: s
|
|
9751
9757
|
};
|
|
9752
|
-
const
|
|
9758
|
+
const z = (j) => {
|
|
9753
9759
|
it.isError(j) ? _(j) : j ? l(null) : _(A());
|
|
9754
|
-
},
|
|
9760
|
+
}, F = (j) => {
|
|
9755
9761
|
it.isError(j) ? _(j) : o(j);
|
|
9756
9762
|
};
|
|
9757
|
-
if (
|
|
9758
|
-
return
|
|
9759
|
-
let
|
|
9763
|
+
if (b && wt(r))
|
|
9764
|
+
return z(!0);
|
|
9765
|
+
let B;
|
|
9760
9766
|
try {
|
|
9761
9767
|
var d;
|
|
9762
|
-
if (
|
|
9768
|
+
if (B = u.call(v, r, v), typeof ((d = B) == null ? void 0 : d.then) == "function") {
|
|
9763
9769
|
if (i.sync)
|
|
9764
|
-
throw new Error(`Validation test of type: "${
|
|
9765
|
-
return Promise.resolve(
|
|
9770
|
+
throw new Error(`Validation test of type: "${v.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);
|
|
9771
|
+
return Promise.resolve(B).then(z, F);
|
|
9766
9772
|
}
|
|
9767
9773
|
} catch (j) {
|
|
9768
|
-
|
|
9774
|
+
F(j);
|
|
9769
9775
|
return;
|
|
9770
9776
|
}
|
|
9771
|
-
|
|
9777
|
+
z(B);
|
|
9772
9778
|
}
|
|
9773
9779
|
return t.OPTIONS = e, t;
|
|
9774
9780
|
}
|
|
@@ -9989,7 +9995,7 @@ attempted value: ${s}
|
|
|
9989
9995
|
i || (i = !0, r(c, s));
|
|
9990
9996
|
}, p = (c) => {
|
|
9991
9997
|
i || (i = !0, n(c, s));
|
|
9992
|
-
}, m = a.length,
|
|
9998
|
+
}, m = a.length, b = [];
|
|
9993
9999
|
if (!m) return p([]);
|
|
9994
10000
|
let x = {
|
|
9995
10001
|
value: s,
|
|
@@ -10001,7 +10007,7 @@ attempted value: ${s}
|
|
|
10001
10007
|
for (let c = 0; c < a.length; c++) {
|
|
10002
10008
|
const S = a[c];
|
|
10003
10009
|
S(x, u, function(C) {
|
|
10004
|
-
C && (Array.isArray(C) ?
|
|
10010
|
+
C && (Array.isArray(C) ? b.push(...C) : b.push(C)), --m <= 0 && p(b);
|
|
10005
10011
|
});
|
|
10006
10012
|
}
|
|
10007
10013
|
}
|
|
@@ -10033,7 +10039,7 @@ attempted value: ${s}
|
|
|
10033
10039
|
[l ? "index" : "key"]: o,
|
|
10034
10040
|
path: l || o.includes(".") ? `${i || ""}[${l ? o : `"${o}"`}]` : (i ? `${i}.` : "") + t
|
|
10035
10041
|
});
|
|
10036
|
-
return (p, m,
|
|
10042
|
+
return (p, m, b) => this.resolve(u)._validate(f, u, m, b);
|
|
10037
10043
|
}
|
|
10038
10044
|
validate(t, r) {
|
|
10039
10045
|
var n;
|
|
@@ -10824,7 +10830,7 @@ class oc extends lt {
|
|
|
10824
10830
|
__validating: r.__validating || !1
|
|
10825
10831
|
}), u = !1;
|
|
10826
10832
|
for (const p of o) {
|
|
10827
|
-
let m = a[p],
|
|
10833
|
+
let m = a[p], b = p in i;
|
|
10828
10834
|
if (m) {
|
|
10829
10835
|
let x, c = i[p];
|
|
10830
10836
|
f.path = (r.path ? `${r.path}.` : "") + p, m = m.resolve({
|
|
@@ -10841,8 +10847,8 @@ class oc extends lt {
|
|
|
10841
10847
|
// TODO: use _cast, this is double resolving
|
|
10842
10848
|
m.cast(i[p], f)
|
|
10843
10849
|
) : i[p], x !== void 0 && (l[p] = x);
|
|
10844
|
-
} else
|
|
10845
|
-
(
|
|
10850
|
+
} else b && !s && (l[p] = i[p]);
|
|
10851
|
+
(b !== p in l || l[p] !== i[p]) && (u = !0);
|
|
10846
10852
|
}
|
|
10847
10853
|
return u ? l : i;
|
|
10848
10854
|
}
|
|
@@ -11148,7 +11154,7 @@ const uh = (e) => {
|
|
|
11148
11154
|
flexWrap: "wrap"
|
|
11149
11155
|
},
|
|
11150
11156
|
children: s.map((u, p) => {
|
|
11151
|
-
const m = u === e,
|
|
11157
|
+
const m = u === e, b = u < e || a.includes(u), x = m || b ? "primary.main" : "#8F97A4";
|
|
11152
11158
|
return /* @__PURE__ */ he(ve, { sx: { display: "flex", alignItems: "center" }, children: [
|
|
11153
11159
|
/* @__PURE__ */ he(
|
|
11154
11160
|
ve,
|
|
@@ -11167,15 +11173,15 @@ const uh = (e) => {
|
|
|
11167
11173
|
width: 24,
|
|
11168
11174
|
height: 24,
|
|
11169
11175
|
borderRadius: "50%",
|
|
11170
|
-
border: m ||
|
|
11171
|
-
borderColor: m ||
|
|
11176
|
+
border: m || b ? "2px solid" : "1px solid",
|
|
11177
|
+
borderColor: m || b ? "primary.main" : "#8F97A4",
|
|
11172
11178
|
display: "flex",
|
|
11173
11179
|
alignItems: "center",
|
|
11174
11180
|
justifyContent: "center",
|
|
11175
|
-
backgroundColor: (c) => m ||
|
|
11181
|
+
backgroundColor: (c) => m || b ? di(c.palette.primary.main, 0.2) : "transparent",
|
|
11176
11182
|
mr: 0.5,
|
|
11177
11183
|
color: x,
|
|
11178
|
-
fontWeight: m ||
|
|
11184
|
+
fontWeight: m || b ? 600 : 500,
|
|
11179
11185
|
fontSize: "12px"
|
|
11180
11186
|
},
|
|
11181
11187
|
children: u
|
|
@@ -11237,12 +11243,12 @@ const uh = (e) => {
|
|
|
11237
11243
|
const r = (o) => {
|
|
11238
11244
|
o.onClick && o.onClick();
|
|
11239
11245
|
}, n = e.filter((o) => o.position === "left" || !o.position), i = e.filter((o) => o.position === "center"), a = e.filter((o) => o.position === "right"), s = (o, l) => {
|
|
11240
|
-
const f = (o.text || "").toLowerCase(), u = o.type === "submit" || f.includes("submit") || f.includes("save") || f.includes("next"), p = o.position === "left" || f.includes("cancel") || f.includes("back") || f.includes("draft"), m = o.type ? o.type : u ? "submit" : "button",
|
|
11246
|
+
const f = (o.text || "").toLowerCase(), u = o.type === "submit" || f.includes("submit") || f.includes("save") || f.includes("next"), p = o.position === "left" || f.includes("cancel") || f.includes("back") || f.includes("draft"), m = o.type ? o.type : u ? "submit" : "button", b = p ? "outlined" : "contained", x = o.disabled || t;
|
|
11241
11247
|
return /* @__PURE__ */ he(
|
|
11242
11248
|
nt,
|
|
11243
11249
|
{
|
|
11244
11250
|
type: m,
|
|
11245
|
-
variant:
|
|
11251
|
+
variant: b,
|
|
11246
11252
|
color: ((S) => S && ["primary", "secondary", "error", "info", "success", "warning"].includes(S) ? S : "primary")(o.color),
|
|
11247
11253
|
size: o.size || "large",
|
|
11248
11254
|
disabled: x,
|
|
@@ -11273,17 +11279,17 @@ const uh = (e) => {
|
|
|
11273
11279
|
const { buttons: o, position: l = "right", layout: f = "horizontal", spacing: u = 2, sx: p } = e, m = (y) => {
|
|
11274
11280
|
let C = "button", A = "contained";
|
|
11275
11281
|
return y.type ? C = y.type : y.text.toLowerCase().includes("submit") || y.text.toLowerCase().includes("save") || y.text.toLowerCase().includes("next") ? C = "submit" : (y.text.toLowerCase().includes("reset") || y.text.toLowerCase().includes("clear")) && (C = "reset"), (y.text.toLowerCase().includes("cancel") || y.text.toLowerCase().includes("back") || y.text.toLowerCase().includes("draft")) && (A = "outlined"), { buttonType: C, buttonVariant: A };
|
|
11276
|
-
},
|
|
11282
|
+
}, b = (y) => ["primary", "secondary", "error", "warning", "info", "success"].includes(y || "") ? y : "primary", x = (y) => {
|
|
11277
11283
|
const { buttonType: C } = m(y);
|
|
11278
11284
|
y.onClick ? y.onClick() : C === "submit" && t ? t(s) : a && r && (y.text.toLowerCase().includes("next") ? r(n + 1, i) : (y.text.toLowerCase().includes("back") || y.text.toLowerCase().includes("previous")) && r(n - 1, i));
|
|
11279
11285
|
}, c = (y, C) => {
|
|
11280
|
-
const { buttonType: A, buttonVariant: _ } = m(y),
|
|
11286
|
+
const { buttonType: A, buttonVariant: _ } = m(y), v = b(y.color);
|
|
11281
11287
|
return /* @__PURE__ */ E(
|
|
11282
11288
|
nt,
|
|
11283
11289
|
{
|
|
11284
11290
|
type: A,
|
|
11285
11291
|
variant: _,
|
|
11286
|
-
color:
|
|
11292
|
+
color: v,
|
|
11287
11293
|
size: y.size || "medium",
|
|
11288
11294
|
disabled: y.disabled,
|
|
11289
11295
|
onClick: () => x(y),
|
|
@@ -11341,22 +11347,22 @@ const uh = (e) => {
|
|
|
11341
11347
|
// API configuration
|
|
11342
11348
|
baseUrl: p,
|
|
11343
11349
|
apiHeaders: m,
|
|
11344
|
-
stepNavigationProps:
|
|
11350
|
+
stepNavigationProps: b
|
|
11345
11351
|
}) => {
|
|
11346
11352
|
var ne, ce;
|
|
11347
11353
|
const x = [...new Set(r.map((I) => I.step).filter((I) => I != null && I > 0))].sort((I, ie) => (I || 0) - (ie || 0)), c = x.length > 1, S = x.length || 1, [y, C] = Ft(1), A = c ? r.filter((I) => I.step === y) : r, _ = Be(() => uh(A), [A]), {
|
|
11348
|
-
control:
|
|
11349
|
-
handleSubmit:
|
|
11350
|
-
formState: { errors:
|
|
11351
|
-
watch:
|
|
11352
|
-
setValue:
|
|
11354
|
+
control: v,
|
|
11355
|
+
handleSubmit: z,
|
|
11356
|
+
formState: { errors: F },
|
|
11357
|
+
watch: Z,
|
|
11358
|
+
setValue: B,
|
|
11353
11359
|
resetField: d,
|
|
11354
11360
|
trigger: j
|
|
11355
11361
|
} = lu({
|
|
11356
11362
|
resolver: pu(_),
|
|
11357
11363
|
mode: "onChange",
|
|
11358
11364
|
defaultValues: o
|
|
11359
|
-
}), D =
|
|
11365
|
+
}), D = Z(), L = mt({});
|
|
11360
11366
|
Dt(() => {
|
|
11361
11367
|
const I = [];
|
|
11362
11368
|
for (const ie of r) {
|
|
@@ -11365,8 +11371,8 @@ const uh = (e) => {
|
|
|
11365
11371
|
}
|
|
11366
11372
|
if (I.length !== 0)
|
|
11367
11373
|
for (const { dependentField: ie, dependencyName: P } of I) {
|
|
11368
|
-
const
|
|
11369
|
-
if (
|
|
11374
|
+
const N = L.current[P], Q = D == null ? void 0 : D[P];
|
|
11375
|
+
if (N !== Q)
|
|
11370
11376
|
try {
|
|
11371
11377
|
d(ie);
|
|
11372
11378
|
} catch {
|
|
@@ -11374,9 +11380,9 @@ const uh = (e) => {
|
|
|
11374
11380
|
L.current[P] = Q;
|
|
11375
11381
|
}
|
|
11376
11382
|
}, [r, D, d]);
|
|
11377
|
-
const
|
|
11383
|
+
const V = mt(i);
|
|
11378
11384
|
Dt(() => {
|
|
11379
|
-
|
|
11385
|
+
V.current = i;
|
|
11380
11386
|
}, [i]);
|
|
11381
11387
|
const K = Be(() => {
|
|
11382
11388
|
try {
|
|
@@ -11386,34 +11392,34 @@ const uh = (e) => {
|
|
|
11386
11392
|
}
|
|
11387
11393
|
}, [D]), ee = mt(null);
|
|
11388
11394
|
Dt(() => {
|
|
11389
|
-
|
|
11395
|
+
V.current && ee.current !== K && (ee.current = K, V.current(D));
|
|
11390
11396
|
}, [K]);
|
|
11391
11397
|
const de = async () => {
|
|
11392
11398
|
if (!c) return !0;
|
|
11393
11399
|
const I = r.filter((P) => P.step === y);
|
|
11394
11400
|
for (const P of I)
|
|
11395
11401
|
if (P.required) {
|
|
11396
|
-
const
|
|
11402
|
+
const N = D[P.name];
|
|
11397
11403
|
let Q = !0;
|
|
11398
|
-
if (P.type === "checkbox" ? Q =
|
|
11404
|
+
if (P.type === "checkbox" ? Q = N === !0 : Array.isArray(N) ? Q = N.length > 0 : Q = N != null && N !== "", !Q)
|
|
11399
11405
|
return !1;
|
|
11400
11406
|
}
|
|
11401
|
-
return await j() ? !0 : Object.keys(
|
|
11402
|
-
const Q =
|
|
11403
|
-
return typeof (Q == null ? void 0 : Q.message) == "string" ? Q.message : `${
|
|
11407
|
+
return await j() ? !0 : Object.keys(F).filter((N) => I.some((Q) => Q.name === N)).map((N) => {
|
|
11408
|
+
const Q = F[N];
|
|
11409
|
+
return typeof (Q == null ? void 0 : Q.message) == "string" ? Q.message : `${N} is invalid`;
|
|
11404
11410
|
}).length === 0;
|
|
11405
11411
|
}, oe = Be(() => {
|
|
11406
11412
|
if (!c) return !0;
|
|
11407
11413
|
const I = r.filter((P) => P.step === y);
|
|
11408
11414
|
for (const P of I)
|
|
11409
11415
|
if (P.required) {
|
|
11410
|
-
const
|
|
11416
|
+
const N = D[P.name];
|
|
11411
11417
|
let Q = !0;
|
|
11412
|
-
if (P.type === "checkbox" ? Q =
|
|
11418
|
+
if (P.type === "checkbox" ? Q = N === !0 : Array.isArray(N) ? Q = N.length > 0 : Q = N != null && N !== "", !Q)
|
|
11413
11419
|
return !1;
|
|
11414
11420
|
}
|
|
11415
|
-
return Object.keys(
|
|
11416
|
-
}, [c, y, r, D,
|
|
11421
|
+
return Object.keys(F).filter((P) => I.some((N) => N.name === P)).length === 0;
|
|
11422
|
+
}, [c, y, r, D, F]), ae = Be(() => {
|
|
11417
11423
|
if (c)
|
|
11418
11424
|
return oe;
|
|
11419
11425
|
for (const I of r)
|
|
@@ -11423,10 +11429,10 @@ const uh = (e) => {
|
|
|
11423
11429
|
if (I.type === "checkbox" ? P = ie === !0 : P = ie != null && ie !== "" && !(Array.isArray(ie) && ie.length === 0), !P)
|
|
11424
11430
|
return !1;
|
|
11425
11431
|
}
|
|
11426
|
-
return Object.keys(
|
|
11427
|
-
}, [c, oe, r, D,
|
|
11432
|
+
return Object.keys(F).length === 0;
|
|
11433
|
+
}, [c, oe, r, D, F]), M = async (I) => {
|
|
11428
11434
|
I < 1 || I > S || I > y && c && !await de() || C(I);
|
|
11429
|
-
},
|
|
11435
|
+
}, q = async (I) => {
|
|
11430
11436
|
if (c && y < S) {
|
|
11431
11437
|
console.warn("Form submission attempted on non-final step");
|
|
11432
11438
|
return;
|
|
@@ -11459,21 +11465,21 @@ const uh = (e) => {
|
|
|
11459
11465
|
fontFamily: ((ne = t.typography) == null ? void 0 : ne.fontFamily) || "Roboto, Arial, sans-serif",
|
|
11460
11466
|
fontSize: typeof ((ce = t.typography) == null ? void 0 : ce.fontSize) == "number" ? t.typography.fontSize : 14
|
|
11461
11467
|
}
|
|
11462
|
-
}) : void 0,
|
|
11468
|
+
}) : void 0, U = () => {
|
|
11463
11469
|
if (u && u.buttons && u.buttons.length > 0) {
|
|
11464
11470
|
const I = {
|
|
11465
11471
|
...u,
|
|
11466
11472
|
buttons: u.buttons.map((ie) => {
|
|
11467
|
-
const P = (ie.text || "").toLowerCase(),
|
|
11473
|
+
const P = (ie.text || "").toLowerCase(), N = ie.type === "submit" || P.includes("submit") || P.includes("save") || P.includes("finish") || P.includes("complete"), Q = P.includes("next");
|
|
11468
11474
|
let me = !1;
|
|
11469
|
-
return c ? (
|
|
11475
|
+
return c ? (N || Q) && (me = !oe) : N && (me = !ae), { ...ie, disabled: ie.disabled || me };
|
|
11470
11476
|
})
|
|
11471
11477
|
};
|
|
11472
11478
|
return /* @__PURE__ */ E(ve, { sx: { mt: 3 }, children: /* @__PURE__ */ E(
|
|
11473
11479
|
fh,
|
|
11474
11480
|
{
|
|
11475
11481
|
config: I,
|
|
11476
|
-
onSubmit:
|
|
11482
|
+
onSubmit: q,
|
|
11477
11483
|
onStepChange: M,
|
|
11478
11484
|
currentStep: y,
|
|
11479
11485
|
totalSteps: S,
|
|
@@ -11484,9 +11490,9 @@ const uh = (e) => {
|
|
|
11484
11490
|
}
|
|
11485
11491
|
if (f && f.length > 0) {
|
|
11486
11492
|
const I = f.map((ie) => {
|
|
11487
|
-
const P = (ie.text || "").toLowerCase(),
|
|
11493
|
+
const P = (ie.text || "").toLowerCase(), N = ie.type === "submit" || P.includes("submit") || P.includes("save") || P.includes("finish") || P.includes("complete"), Q = P.includes("next");
|
|
11488
11494
|
let me = !1;
|
|
11489
|
-
return c ? (
|
|
11495
|
+
return c ? (N || Q) && (me = !oe) : N && (me = !ae), {
|
|
11490
11496
|
...ie,
|
|
11491
11497
|
disabled: ie.disabled || me
|
|
11492
11498
|
};
|
|
@@ -11547,7 +11553,7 @@ const uh = (e) => {
|
|
|
11547
11553
|
)
|
|
11548
11554
|
)
|
|
11549
11555
|
] }) }) : null;
|
|
11550
|
-
},
|
|
11556
|
+
}, W = /* @__PURE__ */ he(
|
|
11551
11557
|
ve,
|
|
11552
11558
|
{
|
|
11553
11559
|
component: "form",
|
|
@@ -11556,7 +11562,7 @@ const uh = (e) => {
|
|
|
11556
11562
|
I.preventDefault(), I.stopPropagation(), oe && le();
|
|
11557
11563
|
return;
|
|
11558
11564
|
}
|
|
11559
|
-
|
|
11565
|
+
z(q)(I);
|
|
11560
11566
|
},
|
|
11561
11567
|
id: e,
|
|
11562
11568
|
onKeyDown: (I) => {
|
|
@@ -11569,8 +11575,8 @@ const uh = (e) => {
|
|
|
11569
11575
|
currentStep: y,
|
|
11570
11576
|
totalSteps: S,
|
|
11571
11577
|
onStepChange: M,
|
|
11572
|
-
stepTitles:
|
|
11573
|
-
showStepTitles: (
|
|
11578
|
+
stepTitles: b == null ? void 0 : b.stepTitles,
|
|
11579
|
+
showStepTitles: (b == null ? void 0 : b.showStepTitles) !== !1
|
|
11574
11580
|
}
|
|
11575
11581
|
),
|
|
11576
11582
|
/* @__PURE__ */ E(
|
|
@@ -11597,12 +11603,12 @@ const uh = (e) => {
|
|
|
11597
11603
|
Fm,
|
|
11598
11604
|
{
|
|
11599
11605
|
field: I,
|
|
11600
|
-
control:
|
|
11601
|
-
errors:
|
|
11606
|
+
control: v,
|
|
11607
|
+
errors: F,
|
|
11602
11608
|
baseUrl: p,
|
|
11603
11609
|
apiHeaders: m,
|
|
11604
11610
|
formData: D,
|
|
11605
|
-
setValue:
|
|
11611
|
+
setValue: B
|
|
11606
11612
|
}
|
|
11607
11613
|
)
|
|
11608
11614
|
},
|
|
@@ -11611,11 +11617,11 @@ const uh = (e) => {
|
|
|
11611
11617
|
})
|
|
11612
11618
|
}
|
|
11613
11619
|
),
|
|
11614
|
-
|
|
11620
|
+
U()
|
|
11615
11621
|
]
|
|
11616
11622
|
}
|
|
11617
11623
|
);
|
|
11618
|
-
return se ? /* @__PURE__ */ E(Vc, { theme: se, children:
|
|
11624
|
+
return se ? /* @__PURE__ */ E(Vc, { theme: se, children: W }) : W;
|
|
11619
11625
|
}, Ey = ({
|
|
11620
11626
|
src: e,
|
|
11621
11627
|
alt: t,
|
|
@@ -13163,7 +13169,7 @@ function ur(e) {
|
|
|
13163
13169
|
function qh(e) {
|
|
13164
13170
|
var t = e.files, r = e.accept, n = e.minSize, i = e.maxSize, a = e.multiple, s = e.maxFiles, o = e.validator;
|
|
13165
13171
|
return !a && t.length > 1 || a && s >= 1 && t.length > s ? !1 : t.every(function(l) {
|
|
13166
|
-
var f = dc(l, r), u = En(f, 1), p = u[0], m = fc(l, n, i),
|
|
13172
|
+
var f = dc(l, r), u = En(f, 1), p = u[0], m = fc(l, n, i), b = En(m, 1), x = b[0], c = o ? o(l) : null;
|
|
13167
13173
|
return p && x && !c;
|
|
13168
13174
|
});
|
|
13169
13175
|
}
|
|
@@ -13544,7 +13550,7 @@ var _a = {
|
|
|
13544
13550
|
fileRejections: []
|
|
13545
13551
|
};
|
|
13546
13552
|
function vc() {
|
|
13547
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = De(De({}, gc), e), r = t.accept, n = t.disabled, i = t.getFilesFromEvent, a = t.maxSize, s = t.minSize, o = t.multiple, l = t.maxFiles, f = t.onDragEnter, u = t.onDragLeave, p = t.onDragOver, m = t.onDrop,
|
|
13553
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = De(De({}, gc), e), r = t.accept, n = t.disabled, i = t.getFilesFromEvent, a = t.maxSize, s = t.minSize, o = t.multiple, l = t.maxFiles, f = t.onDragEnter, u = t.onDragLeave, p = t.onDragOver, m = t.onDrop, b = t.onDropAccepted, x = t.onDropRejected, c = t.onFileDialogCancel, S = t.onFileDialogOpen, y = t.useFsAccessApi, C = t.autoFocus, A = t.preventDropOnDocument, _ = t.noClick, v = t.noKeyboard, z = t.noDrag, F = t.noDragEventsBubbling, Z = t.onError, B = t.validator, d = Be(function() {
|
|
13548
13554
|
return Yh(r);
|
|
13549
13555
|
}, [r]), j = Be(function() {
|
|
13550
13556
|
return Qh(r);
|
|
@@ -13552,11 +13558,11 @@ function vc() {
|
|
|
13552
13558
|
return typeof S == "function" ? S : Mo;
|
|
13553
13559
|
}, [S]), L = Be(function() {
|
|
13554
13560
|
return typeof c == "function" ? c : Mo;
|
|
13555
|
-
}, [c]),
|
|
13556
|
-
!le.current &&
|
|
13561
|
+
}, [c]), V = mt(null), K = mt(null), ee = Tc(uy, _a), de = Zi(ee, 2), oe = de[0], ae = de[1], M = oe.isFocused, q = oe.isFileDialogActive, le = mt(typeof window < "u" && window.isSecureContext && y && Kh()), H = function() {
|
|
13562
|
+
!le.current && q && setTimeout(function() {
|
|
13557
13563
|
if (K.current) {
|
|
13558
|
-
var
|
|
13559
|
-
|
|
13564
|
+
var R = K.current.files;
|
|
13565
|
+
R.length || (ae({
|
|
13560
13566
|
type: "closeDialog"
|
|
13561
13567
|
}), L());
|
|
13562
13568
|
}
|
|
@@ -13566,32 +13572,32 @@ function vc() {
|
|
|
13566
13572
|
return window.addEventListener("focus", H, !1), function() {
|
|
13567
13573
|
window.removeEventListener("focus", H, !1);
|
|
13568
13574
|
};
|
|
13569
|
-
}, [K,
|
|
13570
|
-
var J = mt([]), se = function(
|
|
13571
|
-
|
|
13575
|
+
}, [K, q, L, le]);
|
|
13576
|
+
var J = mt([]), se = function(R) {
|
|
13577
|
+
V.current && V.current.contains(R.target) || (R.preventDefault(), J.current = []);
|
|
13572
13578
|
};
|
|
13573
13579
|
Dt(function() {
|
|
13574
13580
|
return A && (document.addEventListener("dragover", Io, !1), document.addEventListener("drop", se, !1)), function() {
|
|
13575
13581
|
A && (document.removeEventListener("dragover", Io), document.removeEventListener("drop", se));
|
|
13576
13582
|
};
|
|
13577
|
-
}, [
|
|
13578
|
-
return !n && C &&
|
|
13583
|
+
}, [V, A]), Dt(function() {
|
|
13584
|
+
return !n && C && V.current && V.current.focus(), function() {
|
|
13579
13585
|
};
|
|
13580
|
-
}, [
|
|
13581
|
-
var
|
|
13582
|
-
|
|
13583
|
-
}, [
|
|
13584
|
-
O.preventDefault(), O.persist(), h(O), J.current = [].concat(ry(J.current), [O.target]), Qn(O) && Promise.resolve(i(O)).then(function(
|
|
13585
|
-
if (!(xi(O) && !
|
|
13586
|
-
var
|
|
13587
|
-
files:
|
|
13586
|
+
}, [V, C, n]);
|
|
13587
|
+
var U = Le(function(O) {
|
|
13588
|
+
Z ? Z(O) : console.error(O);
|
|
13589
|
+
}, [Z]), W = Le(function(O) {
|
|
13590
|
+
O.preventDefault(), O.persist(), h(O), J.current = [].concat(ry(J.current), [O.target]), Qn(O) && Promise.resolve(i(O)).then(function(R) {
|
|
13591
|
+
if (!(xi(O) && !F)) {
|
|
13592
|
+
var X = R.length, ue = X > 0 && qh({
|
|
13593
|
+
files: R,
|
|
13588
13594
|
accept: d,
|
|
13589
13595
|
minSize: s,
|
|
13590
13596
|
maxSize: a,
|
|
13591
13597
|
multiple: o,
|
|
13592
13598
|
maxFiles: l,
|
|
13593
|
-
validator:
|
|
13594
|
-
}), fe =
|
|
13599
|
+
validator: B
|
|
13600
|
+
}), fe = X > 0 && !ue;
|
|
13595
13601
|
ae({
|
|
13596
13602
|
isDragAccept: ue,
|
|
13597
13603
|
isDragReject: fe,
|
|
@@ -13599,35 +13605,35 @@ function vc() {
|
|
|
13599
13605
|
type: "setDraggedFiles"
|
|
13600
13606
|
}), f && f(O);
|
|
13601
13607
|
}
|
|
13602
|
-
}).catch(function(
|
|
13603
|
-
return
|
|
13608
|
+
}).catch(function(R) {
|
|
13609
|
+
return U(R);
|
|
13604
13610
|
});
|
|
13605
|
-
}, [i, f,
|
|
13611
|
+
}, [i, f, U, F, d, s, a, o, l, B]), ne = Le(function(O) {
|
|
13606
13612
|
O.preventDefault(), O.persist(), h(O);
|
|
13607
|
-
var
|
|
13608
|
-
if (
|
|
13613
|
+
var R = Qn(O);
|
|
13614
|
+
if (R && O.dataTransfer)
|
|
13609
13615
|
try {
|
|
13610
13616
|
O.dataTransfer.dropEffect = "copy";
|
|
13611
13617
|
} catch {
|
|
13612
13618
|
}
|
|
13613
|
-
return
|
|
13614
|
-
}, [p,
|
|
13619
|
+
return R && p && p(O), !1;
|
|
13620
|
+
}, [p, F]), ce = Le(function(O) {
|
|
13615
13621
|
O.preventDefault(), O.persist(), h(O);
|
|
13616
|
-
var
|
|
13617
|
-
return
|
|
13618
|
-
}),
|
|
13619
|
-
|
|
13622
|
+
var R = J.current.filter(function(ue) {
|
|
13623
|
+
return V.current && V.current.contains(ue);
|
|
13624
|
+
}), X = R.indexOf(O.target);
|
|
13625
|
+
X !== -1 && R.splice(X, 1), J.current = R, !(R.length > 0) && (ae({
|
|
13620
13626
|
type: "setDraggedFiles",
|
|
13621
13627
|
isDragActive: !1,
|
|
13622
13628
|
isDragAccept: !1,
|
|
13623
13629
|
isDragReject: !1
|
|
13624
13630
|
}), Qn(O) && u && u(O));
|
|
13625
|
-
}, [
|
|
13626
|
-
var
|
|
13631
|
+
}, [V, u, F]), I = Le(function(O, R) {
|
|
13632
|
+
var X = [], ue = [];
|
|
13627
13633
|
O.forEach(function(fe) {
|
|
13628
|
-
var Ue = dc(fe, d), yt = Zi(Ue, 2), ct = yt[0], nn = yt[1], lr = fc(fe, s, a), Bt = Zi(lr, 2), an = Bt[0], Ar = Bt[1], sn =
|
|
13634
|
+
var Ue = dc(fe, d), yt = Zi(Ue, 2), ct = yt[0], nn = yt[1], lr = fc(fe, s, a), Bt = Zi(lr, 2), an = Bt[0], Ar = Bt[1], sn = B ? B(fe) : null;
|
|
13629
13635
|
if (ct && an && !sn)
|
|
13630
|
-
|
|
13636
|
+
X.push(fe);
|
|
13631
13637
|
else {
|
|
13632
13638
|
var Fr = [nn, Ar];
|
|
13633
13639
|
sn && (Fr = Fr.concat(sn)), ue.push({
|
|
@@ -13637,26 +13643,26 @@ function vc() {
|
|
|
13637
13643
|
})
|
|
13638
13644
|
});
|
|
13639
13645
|
}
|
|
13640
|
-
}), (!o &&
|
|
13646
|
+
}), (!o && X.length > 1 || o && l >= 1 && X.length > l) && (X.forEach(function(fe) {
|
|
13641
13647
|
ue.push({
|
|
13642
13648
|
file: fe,
|
|
13643
13649
|
errors: [Bh]
|
|
13644
13650
|
});
|
|
13645
|
-
}),
|
|
13646
|
-
acceptedFiles:
|
|
13651
|
+
}), X.splice(0)), ae({
|
|
13652
|
+
acceptedFiles: X,
|
|
13647
13653
|
fileRejections: ue,
|
|
13648
13654
|
isDragReject: ue.length > 0,
|
|
13649
13655
|
type: "setFiles"
|
|
13650
|
-
}), m && m(
|
|
13651
|
-
}, [ae, o, d, s, a, l, m,
|
|
13652
|
-
O.preventDefault(), O.persist(), h(O), J.current = [], Qn(O) && Promise.resolve(i(O)).then(function(
|
|
13653
|
-
xi(O) && !
|
|
13654
|
-
}).catch(function(
|
|
13655
|
-
return
|
|
13656
|
+
}), m && m(X, ue, R), ue.length > 0 && x && x(ue, R), X.length > 0 && b && b(X, R);
|
|
13657
|
+
}, [ae, o, d, s, a, l, m, b, x, B]), ie = Le(function(O) {
|
|
13658
|
+
O.preventDefault(), O.persist(), h(O), J.current = [], Qn(O) && Promise.resolve(i(O)).then(function(R) {
|
|
13659
|
+
xi(O) && !F || I(R, O);
|
|
13660
|
+
}).catch(function(R) {
|
|
13661
|
+
return U(R);
|
|
13656
13662
|
}), ae({
|
|
13657
13663
|
type: "reset"
|
|
13658
13664
|
});
|
|
13659
|
-
}, [i, I,
|
|
13665
|
+
}, [i, I, U, F]), P = Le(function() {
|
|
13660
13666
|
if (le.current) {
|
|
13661
13667
|
ae({
|
|
13662
13668
|
type: "openDialog"
|
|
@@ -13665,25 +13671,25 @@ function vc() {
|
|
|
13665
13671
|
multiple: o,
|
|
13666
13672
|
types: j
|
|
13667
13673
|
};
|
|
13668
|
-
window.showOpenFilePicker(O).then(function(
|
|
13669
|
-
return i(
|
|
13670
|
-
}).then(function(
|
|
13671
|
-
I(
|
|
13674
|
+
window.showOpenFilePicker(O).then(function(R) {
|
|
13675
|
+
return i(R);
|
|
13676
|
+
}).then(function(R) {
|
|
13677
|
+
I(R, null), ae({
|
|
13672
13678
|
type: "closeDialog"
|
|
13673
13679
|
});
|
|
13674
|
-
}).catch(function(
|
|
13675
|
-
Gh(
|
|
13680
|
+
}).catch(function(R) {
|
|
13681
|
+
Gh(R) ? (L(R), ae({
|
|
13676
13682
|
type: "closeDialog"
|
|
13677
|
-
})) : Zh(
|
|
13683
|
+
})) : Zh(R) ? (le.current = !1, K.current ? (K.current.value = null, K.current.click()) : U(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))) : U(R);
|
|
13678
13684
|
});
|
|
13679
13685
|
return;
|
|
13680
13686
|
}
|
|
13681
13687
|
K.current && (ae({
|
|
13682
13688
|
type: "openDialog"
|
|
13683
13689
|
}), D(), K.current.value = null, K.current.click());
|
|
13684
|
-
}, [ae, D, L, y, I,
|
|
13685
|
-
!
|
|
13686
|
-
}, [
|
|
13690
|
+
}, [ae, D, L, y, I, U, j, o]), N = Le(function(O) {
|
|
13691
|
+
!V.current || !V.current.isEqualNode(O.target) || (O.key === " " || O.key === "Enter" || O.keyCode === 32 || O.keyCode === 13) && (O.preventDefault(), P());
|
|
13692
|
+
}, [V, P]), Q = Le(function() {
|
|
13687
13693
|
ae({
|
|
13688
13694
|
type: "focus"
|
|
13689
13695
|
});
|
|
@@ -13693,36 +13699,36 @@ function vc() {
|
|
|
13693
13699
|
});
|
|
13694
13700
|
}, []), $e = Le(function() {
|
|
13695
13701
|
_ || (Hh() ? setTimeout(P, 0) : P());
|
|
13696
|
-
}, [_, P]), Ae = function(
|
|
13697
|
-
return n ? null :
|
|
13698
|
-
}, Ce = function(
|
|
13699
|
-
return
|
|
13700
|
-
}, Ke = function(
|
|
13701
|
-
return
|
|
13702
|
-
}, h = function(
|
|
13703
|
-
|
|
13702
|
+
}, [_, P]), Ae = function(R) {
|
|
13703
|
+
return n ? null : R;
|
|
13704
|
+
}, Ce = function(R) {
|
|
13705
|
+
return v ? null : Ae(R);
|
|
13706
|
+
}, Ke = function(R) {
|
|
13707
|
+
return z ? null : Ae(R);
|
|
13708
|
+
}, h = function(R) {
|
|
13709
|
+
F && R.stopPropagation();
|
|
13704
13710
|
}, k = Be(function() {
|
|
13705
13711
|
return function() {
|
|
13706
|
-
var O = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {},
|
|
13712
|
+
var O = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, R = O.refKey, X = R === void 0 ? "ref" : R, ue = O.role, fe = O.onKeyDown, Ue = O.onFocus, yt = O.onBlur, ct = O.onClick, nn = O.onDragEnter, lr = O.onDragOver, Bt = O.onDragLeave, an = O.onDrop, Ar = wi(O, ey);
|
|
13707
13713
|
return De(De(Oa({
|
|
13708
|
-
onKeyDown: Ce(kt(fe,
|
|
13714
|
+
onKeyDown: Ce(kt(fe, N)),
|
|
13709
13715
|
onFocus: Ce(kt(Ue, Q)),
|
|
13710
13716
|
onBlur: Ce(kt(yt, me)),
|
|
13711
13717
|
onClick: Ae(kt(ct, $e)),
|
|
13712
|
-
onDragEnter: Ke(kt(nn,
|
|
13718
|
+
onDragEnter: Ke(kt(nn, W)),
|
|
13713
13719
|
onDragOver: Ke(kt(lr, ne)),
|
|
13714
13720
|
onDragLeave: Ke(kt(Bt, ce)),
|
|
13715
13721
|
onDrop: Ke(kt(an, ie)),
|
|
13716
13722
|
role: typeof ue == "string" && ue !== "" ? ue : "presentation"
|
|
13717
|
-
},
|
|
13723
|
+
}, X, V), !n && !v ? {
|
|
13718
13724
|
tabIndex: 0
|
|
13719
13725
|
} : {}), Ar);
|
|
13720
13726
|
};
|
|
13721
|
-
}, [
|
|
13727
|
+
}, [V, N, Q, me, $e, W, ne, ce, ie, v, z, n]), T = Le(function(O) {
|
|
13722
13728
|
O.stopPropagation();
|
|
13723
13729
|
}, []), Y = Be(function() {
|
|
13724
13730
|
return function() {
|
|
13725
|
-
var O = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {},
|
|
13731
|
+
var O = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, R = O.refKey, X = R === void 0 ? "ref" : R, ue = O.onChange, fe = O.onClick, Ue = wi(O, ty), yt = Oa({
|
|
13726
13732
|
accept: d,
|
|
13727
13733
|
multiple: o,
|
|
13728
13734
|
type: "file",
|
|
@@ -13741,7 +13747,7 @@ function vc() {
|
|
|
13741
13747
|
onChange: Ae(kt(ue, ie)),
|
|
13742
13748
|
onClick: Ae(kt(fe, T)),
|
|
13743
13749
|
tabIndex: -1
|
|
13744
|
-
},
|
|
13750
|
+
}, X, K);
|
|
13745
13751
|
return De(De({}, yt), Ue);
|
|
13746
13752
|
};
|
|
13747
13753
|
}, [K, r, o, ie, n]);
|
|
@@ -13749,7 +13755,7 @@ function vc() {
|
|
|
13749
13755
|
isFocused: M && !n,
|
|
13750
13756
|
getRootProps: k,
|
|
13751
13757
|
getInputProps: Y,
|
|
13752
|
-
rootRef:
|
|
13758
|
+
rootRef: V,
|
|
13753
13759
|
inputRef: K,
|
|
13754
13760
|
open: Ae(P)
|
|
13755
13761
|
});
|
|
@@ -13867,38 +13873,38 @@ const py = Pt(/* @__PURE__ */ E("path", {
|
|
|
13867
13873
|
buttonText: f,
|
|
13868
13874
|
fileSupportedText: u
|
|
13869
13875
|
}) => {
|
|
13870
|
-
const [p, m] = Ft(t), [
|
|
13876
|
+
const [p, m] = Ft(t), [b, x] = Ft([]), [c, S] = Ft(!1), [y, C] = Ft(!1), [A, _] = Ft(
|
|
13871
13877
|
[]
|
|
13872
|
-
),
|
|
13878
|
+
), v = mt(null);
|
|
13873
13879
|
Dt(() => {
|
|
13874
13880
|
m(t);
|
|
13875
13881
|
}, [t]);
|
|
13876
|
-
const
|
|
13877
|
-
(
|
|
13882
|
+
const z = Le(
|
|
13883
|
+
(V) => {
|
|
13878
13884
|
var ee, de;
|
|
13879
13885
|
return ((ee = e == null ? void 0 : e.fileTypes) == null ? void 0 : ee.some((oe) => {
|
|
13880
13886
|
if (oe.includes("*")) {
|
|
13881
13887
|
const ae = oe.split("/")[0];
|
|
13882
|
-
return
|
|
13888
|
+
return V.type.startsWith(ae);
|
|
13883
13889
|
}
|
|
13884
|
-
return
|
|
13885
|
-
})) ? e != null && e.maxSize &&
|
|
13890
|
+
return V.type === oe;
|
|
13891
|
+
})) ? e != null && e.maxSize && V.size > e.maxSize ? `File size exceeds maximum limit of ${(e.maxSize / 1048576).toFixed(1)}MB` : null : `File type ${V.type} is not allowed. Allowed types: ${(de = e == null ? void 0 : e.fileTypes) == null ? void 0 : de.join(", ")}`;
|
|
13886
13892
|
},
|
|
13887
13893
|
[e]
|
|
13888
|
-
),
|
|
13889
|
-
async (
|
|
13890
|
-
console.log("handleFiles called with:",
|
|
13894
|
+
), F = Le(
|
|
13895
|
+
async (V) => {
|
|
13896
|
+
console.log("handleFiles called with:", V.length, "files"), S(!0);
|
|
13891
13897
|
const K = [], ee = [];
|
|
13892
13898
|
try {
|
|
13893
|
-
for (const oe of
|
|
13899
|
+
for (const oe of V) {
|
|
13894
13900
|
let ae = null;
|
|
13895
13901
|
if (e != null && e.multiple && p.some(
|
|
13896
|
-
(
|
|
13902
|
+
(q) => q.file.name === oe.name && q.file.size === oe.size && q.file.lastModified === oe.lastModified
|
|
13897
13903
|
)) {
|
|
13898
13904
|
ee.push(`${oe.name}: File already exists`);
|
|
13899
13905
|
continue;
|
|
13900
13906
|
}
|
|
13901
|
-
if (ae =
|
|
13907
|
+
if (ae = z(oe), !ae && (e != null && e.customValidation))
|
|
13902
13908
|
try {
|
|
13903
13909
|
const M = e.customValidation(oe);
|
|
13904
13910
|
M instanceof Promise ? ae = await M : ae = M;
|
|
@@ -13926,24 +13932,24 @@ const py = Pt(/* @__PURE__ */ E("path", {
|
|
|
13926
13932
|
_([oe]), x([oe]);
|
|
13927
13933
|
}
|
|
13928
13934
|
},
|
|
13929
|
-
[p, e == null ? void 0 : e.multiple,
|
|
13930
|
-
),
|
|
13931
|
-
(
|
|
13935
|
+
[p, e == null ? void 0 : e.multiple, z, e == null ? void 0 : e.customValidation, r]
|
|
13936
|
+
), Z = Le(
|
|
13937
|
+
(V) => {
|
|
13932
13938
|
S(!0);
|
|
13933
|
-
const K = p.filter((ee) => ee.id !==
|
|
13934
|
-
m(K), r == null || r(K), _([]),
|
|
13939
|
+
const K = p.filter((ee) => ee.id !== V);
|
|
13940
|
+
m(K), r == null || r(K), _([]), v.current && (v.current.value = "");
|
|
13935
13941
|
},
|
|
13936
13942
|
[p, r]
|
|
13937
|
-
),
|
|
13943
|
+
), B = Le(() => {
|
|
13938
13944
|
if (e != null && e.required && p.length === 0) {
|
|
13939
13945
|
x([`${e.title} is required`]);
|
|
13940
13946
|
return;
|
|
13941
13947
|
}
|
|
13942
13948
|
_([]), C(!0);
|
|
13943
|
-
const
|
|
13944
|
-
n == null || n(
|
|
13949
|
+
const V = p.filter((K) => K.status !== "error");
|
|
13950
|
+
n == null || n(V);
|
|
13945
13951
|
}, [p, n, e == null ? void 0 : e.required, e == null ? void 0 : e.title]), { getRootProps: d, getInputProps: j, isDragActive: D } = vc({
|
|
13946
|
-
onDrop:
|
|
13952
|
+
onDrop: F,
|
|
13947
13953
|
multiple: e == null ? void 0 : e.multiple,
|
|
13948
13954
|
disabled: i,
|
|
13949
13955
|
noClick: !1,
|
|
@@ -13951,7 +13957,7 @@ const py = Pt(/* @__PURE__ */ E("path", {
|
|
|
13951
13957
|
});
|
|
13952
13958
|
Dt(() => {
|
|
13953
13959
|
if (!c) return;
|
|
13954
|
-
const
|
|
13960
|
+
const V = [], K = [...A, ...V];
|
|
13955
13961
|
K.length > 0 ? x(K) : x([]);
|
|
13956
13962
|
}, [
|
|
13957
13963
|
p,
|
|
@@ -13962,8 +13968,8 @@ const py = Pt(/* @__PURE__ */ E("path", {
|
|
|
13962
13968
|
A
|
|
13963
13969
|
]);
|
|
13964
13970
|
const L = () => {
|
|
13965
|
-
var
|
|
13966
|
-
switch (((
|
|
13971
|
+
var V;
|
|
13972
|
+
switch (((V = e == null ? void 0 : e.submitButton) == null ? void 0 : V.position) || "right") {
|
|
13967
13973
|
case "left":
|
|
13968
13974
|
return "flex-start";
|
|
13969
13975
|
case "center":
|
|
@@ -14000,7 +14006,7 @@ const py = Pt(/* @__PURE__ */ E("path", {
|
|
|
14000
14006
|
}
|
|
14001
14007
|
}
|
|
14002
14008
|
},
|
|
14003
|
-
/* @__PURE__ */ E("input", { ...j(), ref:
|
|
14009
|
+
/* @__PURE__ */ E("input", { ...j(), ref: v }),
|
|
14004
14010
|
/* @__PURE__ */ E(
|
|
14005
14011
|
Yo,
|
|
14006
14012
|
{
|
|
@@ -14018,19 +14024,19 @@ const py = Pt(/* @__PURE__ */ E("path", {
|
|
|
14018
14024
|
/* @__PURE__ */ E(Re, { sx: { fontSize: "16px", fontWeight: 600, color: "primary.main" }, children: o }),
|
|
14019
14025
|
/* @__PURE__ */ E(Re, { sx: { fontSize: "12px", fontWeight: 400, color: "primary.main" }, children: l }),
|
|
14020
14026
|
/* @__PURE__ */ E(nt, { onClick: () => {
|
|
14021
|
-
var
|
|
14022
|
-
return (
|
|
14027
|
+
var V;
|
|
14028
|
+
return (V = v.current) == null ? void 0 : V.click();
|
|
14023
14029
|
}, sx: { my: 2 }, startIcon: /* @__PURE__ */ E(yi, {}), variant: "contained", children: f }),
|
|
14024
14030
|
/* @__PURE__ */ E(Re, { sx: { fontSize: "12px", fontWeight: 400 }, children: u })
|
|
14025
14031
|
),
|
|
14026
|
-
|
|
14032
|
+
b.length > 0 && /* @__PURE__ */ E(Bc, { severity: "error", sx: { mt: 2 }, children: b.map((V, K) => /* @__PURE__ */ E(Re, { variant: "body2", children: V }, K)) }),
|
|
14027
14033
|
p.length > 0 && /* @__PURE__ */ he(ve, { sx: { mt: 2 }, children: [
|
|
14028
14034
|
/* @__PURE__ */ he(Re, { variant: "subtitle1", gutterBottom: !0, children: [
|
|
14029
14035
|
"Selected Files (",
|
|
14030
14036
|
p.length,
|
|
14031
14037
|
")"
|
|
14032
14038
|
] }),
|
|
14033
|
-
p.map((
|
|
14039
|
+
p.map((V) => /* @__PURE__ */ E(my, { file: V, onRemove: Z }, V.id))
|
|
14034
14040
|
] }),
|
|
14035
14041
|
(e == null ? void 0 : e.helperText) && /* @__PURE__ */ E(
|
|
14036
14042
|
Re,
|
|
@@ -14053,7 +14059,7 @@ const py = Pt(/* @__PURE__ */ E("path", {
|
|
|
14053
14059
|
nt,
|
|
14054
14060
|
{
|
|
14055
14061
|
variant: "contained",
|
|
14056
|
-
onClick:
|
|
14062
|
+
onClick: B,
|
|
14057
14063
|
disabled: i || e.submitButton.disabled || p.length === 0,
|
|
14058
14064
|
startIcon: e.submitButton.loading ? /* @__PURE__ */ E(Nr, { size: 16, color: "inherit" }) : void 0,
|
|
14059
14065
|
children: e.submitButton.text
|