@techlabi/kycrazy-ui-kit 0.53.0-beta.1 → 0.53.0-beta.2
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 +894 -879
- package/dist/index.umd.js +20 -20
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -160,8 +160,8 @@ function pn(r, e = []) {
|
|
|
160
160
|
a = [...a, o];
|
|
161
161
|
const f = (c) => {
|
|
162
162
|
var I;
|
|
163
|
-
const { scope: h, children: d, ...g } = c, b = ((I = h == null ? void 0 : h[r]) == null ? void 0 : I[s]) || A,
|
|
164
|
-
return /* @__PURE__ */ l(b.Provider, { value:
|
|
163
|
+
const { scope: h, children: d, ...g } = c, b = ((I = h == null ? void 0 : h[r]) == null ? void 0 : I[s]) || A, v = p.useMemo(() => g, Object.values(g));
|
|
164
|
+
return /* @__PURE__ */ l(b.Provider, { value: v, children: d });
|
|
165
165
|
};
|
|
166
166
|
f.displayName = i + "Provider";
|
|
167
167
|
function u(c, h) {
|
|
@@ -258,34 +258,34 @@ function D6(r) {
|
|
|
258
258
|
e,
|
|
259
259
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
260
260
|
), o = (b) => {
|
|
261
|
-
const { scope:
|
|
262
|
-
return /* @__PURE__ */ l(n, { scope:
|
|
261
|
+
const { scope: v, children: I } = b, _ = j.useRef(null), N = j.useRef(/* @__PURE__ */ new Map()).current;
|
|
262
|
+
return /* @__PURE__ */ l(n, { scope: v, itemMap: N, collectionRef: _, children: I });
|
|
263
263
|
};
|
|
264
264
|
o.displayName = e;
|
|
265
265
|
const A = r + "CollectionSlot", s = /* @__PURE__ */ qn(A), f = j.forwardRef(
|
|
266
|
-
(b,
|
|
267
|
-
const { scope: I, children: _ } = b, N = i(A, I), R = k0(
|
|
266
|
+
(b, v) => {
|
|
267
|
+
const { scope: I, children: _ } = b, N = i(A, I), R = k0(v, N.collectionRef);
|
|
268
268
|
return /* @__PURE__ */ l(s, { ref: R, children: _ });
|
|
269
269
|
}
|
|
270
270
|
);
|
|
271
271
|
f.displayName = A;
|
|
272
272
|
const u = r + "CollectionItemSlot", c = "data-radix-collection-item", h = /* @__PURE__ */ qn(u), d = j.forwardRef(
|
|
273
|
-
(b,
|
|
274
|
-
const { scope: I, children: _, ...N } = b, R = j.useRef(null), C = k0(
|
|
273
|
+
(b, v) => {
|
|
274
|
+
const { scope: I, children: _, ...N } = b, R = j.useRef(null), C = k0(v, R), P = i(u, I);
|
|
275
275
|
return j.useEffect(() => (P.itemMap.set(R, { ref: R, ...N }), () => void P.itemMap.delete(R))), /* @__PURE__ */ l(h, { [c]: "", ref: C, children: _ });
|
|
276
276
|
}
|
|
277
277
|
);
|
|
278
278
|
d.displayName = u;
|
|
279
279
|
function g(b) {
|
|
280
|
-
const
|
|
280
|
+
const v = i(r + "CollectionConsumer", b);
|
|
281
281
|
return j.useCallback(() => {
|
|
282
|
-
const _ =
|
|
282
|
+
const _ = v.collectionRef.current;
|
|
283
283
|
if (!_) return [];
|
|
284
284
|
const N = Array.from(_.querySelectorAll(`[${c}]`));
|
|
285
|
-
return Array.from(
|
|
285
|
+
return Array.from(v.itemMap.values()).sort(
|
|
286
286
|
(P, V) => N.indexOf(P.ref.current) - N.indexOf(V.ref.current)
|
|
287
287
|
);
|
|
288
|
-
}, [
|
|
288
|
+
}, [v.collectionRef, v.itemMap]);
|
|
289
289
|
}
|
|
290
290
|
return [
|
|
291
291
|
{ Provider: o, Slot: f, ItemSlot: d },
|
|
@@ -353,12 +353,12 @@ var R9 = "DismissableLayer", zu = "dismissableLayer.update", Z9 = "dismissableLa
|
|
|
353
353
|
onInteractOutside: o,
|
|
354
354
|
onDismiss: A,
|
|
355
355
|
...s
|
|
356
|
-
} = r, f = p.useContext(M6), [u, c] = p.useState(null), h = (u == null ? void 0 : u.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, d] = p.useState({}), g = k0(e, (V) => c(V)), b = Array.from(f.layers), [
|
|
357
|
-
const
|
|
356
|
+
} = r, f = p.useContext(M6), [u, c] = p.useState(null), h = (u == null ? void 0 : u.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, d] = p.useState({}), g = k0(e, (V) => c(V)), b = Array.from(f.layers), [v] = [...f.layersWithOutsidePointerEventsDisabled].slice(-1), I = b.indexOf(v), _ = u ? b.indexOf(u) : -1, N = f.layersWithOutsidePointerEventsDisabled.size > 0, R = _ >= I, C = $9((V) => {
|
|
357
|
+
const q = V.target, tr = [...f.branches].some((X) => X.contains(q));
|
|
358
358
|
!R || tr || (n == null || n(V), o == null || o(V), V.defaultPrevented || A == null || A());
|
|
359
359
|
}, h), P = W9((V) => {
|
|
360
|
-
const
|
|
361
|
-
[...f.branches].some((X) => X.contains(
|
|
360
|
+
const q = V.target;
|
|
361
|
+
[...f.branches].some((X) => X.contains(q)) || (i == null || i(V), o == null || o(V), V.defaultPrevented || A == null || A());
|
|
362
362
|
}, h);
|
|
363
363
|
return x9((V) => {
|
|
364
364
|
_ === f.layers.size - 1 && (t == null || t(V), !V.defaultPrevented && A && (V.preventDefault(), A()));
|
|
@@ -501,9 +501,9 @@ function V9(r) {
|
|
|
501
501
|
const u = e.ownerDocument.defaultView ?? window, c = (d) => {
|
|
502
502
|
const b = mA(t.current).includes(CSS.escape(d.animationName));
|
|
503
503
|
if (d.target === e && b && (s("ANIMATION_END"), !n.current)) {
|
|
504
|
-
const
|
|
504
|
+
const v = e.style.animationFillMode;
|
|
505
505
|
e.style.animationFillMode = "forwards", f = u.setTimeout(() => {
|
|
506
|
-
e.style.animationFillMode === "forwards" && (e.style.animationFillMode =
|
|
506
|
+
e.style.animationFillMode === "forwards" && (e.style.animationFillMode = v);
|
|
507
507
|
});
|
|
508
508
|
}
|
|
509
509
|
}, h = (d) => {
|
|
@@ -641,14 +641,14 @@ var Y6 = "ToastViewport", J9 = ["F8"], Ku = "toast.viewportPause", qu = "toast.v
|
|
|
641
641
|
...i
|
|
642
642
|
} = r, o = Ts(Y6, a), A = Y9(a), s = p.useRef(null), f = p.useRef(null), u = p.useRef(null), c = p.useRef(null), h = k0(e, c, o.onViewportChange), d = t.join("+").replace(/Key/g, "").replace(/Digit/g, ""), g = o.toastCount > 0;
|
|
643
643
|
p.useEffect(() => {
|
|
644
|
-
const
|
|
644
|
+
const v = (I) => {
|
|
645
645
|
var N;
|
|
646
646
|
t.length !== 0 && t.every((R) => I[R] || I.code === R) && ((N = c.current) == null || N.focus());
|
|
647
647
|
};
|
|
648
|
-
return document.addEventListener("keydown",
|
|
648
|
+
return document.addEventListener("keydown", v), () => document.removeEventListener("keydown", v);
|
|
649
649
|
}, [t]), p.useEffect(() => {
|
|
650
|
-
const
|
|
651
|
-
if (g &&
|
|
650
|
+
const v = s.current, I = c.current;
|
|
651
|
+
if (g && v && I) {
|
|
652
652
|
const _ = () => {
|
|
653
653
|
if (!o.isClosePausedRef.current) {
|
|
654
654
|
const P = new CustomEvent(Ku);
|
|
@@ -660,42 +660,42 @@ var Y6 = "ToastViewport", J9 = ["F8"], Ku = "toast.viewportPause", qu = "toast.v
|
|
|
660
660
|
I.dispatchEvent(P), o.isClosePausedRef.current = !1;
|
|
661
661
|
}
|
|
662
662
|
}, R = (P) => {
|
|
663
|
-
!
|
|
663
|
+
!v.contains(P.relatedTarget) && N();
|
|
664
664
|
}, C = () => {
|
|
665
|
-
|
|
665
|
+
v.contains(document.activeElement) || N();
|
|
666
666
|
};
|
|
667
|
-
return
|
|
668
|
-
|
|
667
|
+
return v.addEventListener("focusin", _), v.addEventListener("focusout", R), v.addEventListener("pointermove", _), v.addEventListener("pointerleave", C), window.addEventListener("blur", _), window.addEventListener("focus", N), () => {
|
|
668
|
+
v.removeEventListener("focusin", _), v.removeEventListener("focusout", R), v.removeEventListener("pointermove", _), v.removeEventListener("pointerleave", C), window.removeEventListener("blur", _), window.removeEventListener("focus", N);
|
|
669
669
|
};
|
|
670
670
|
}
|
|
671
671
|
}, [g, o.isClosePausedRef]);
|
|
672
672
|
const b = p.useCallback(
|
|
673
|
-
({ tabbingDirection:
|
|
673
|
+
({ tabbingDirection: v }) => {
|
|
674
674
|
const _ = A().map((N) => {
|
|
675
675
|
const R = N.ref.current, C = [R, ...fw(R)];
|
|
676
|
-
return
|
|
676
|
+
return v === "forwards" ? C : C.reverse();
|
|
677
677
|
});
|
|
678
|
-
return (
|
|
678
|
+
return (v === "forwards" ? _.reverse() : _).flat();
|
|
679
679
|
},
|
|
680
680
|
[A]
|
|
681
681
|
);
|
|
682
682
|
return p.useEffect(() => {
|
|
683
|
-
const
|
|
684
|
-
if (
|
|
683
|
+
const v = c.current;
|
|
684
|
+
if (v) {
|
|
685
685
|
const I = (_) => {
|
|
686
686
|
var C, P, V;
|
|
687
687
|
const N = _.altKey || _.ctrlKey || _.metaKey;
|
|
688
688
|
if (_.key === "Tab" && !N) {
|
|
689
|
-
const
|
|
690
|
-
if (_.target ===
|
|
689
|
+
const q = document.activeElement, tr = _.shiftKey;
|
|
690
|
+
if (_.target === v && tr) {
|
|
691
691
|
(C = f.current) == null || C.focus();
|
|
692
692
|
return;
|
|
693
693
|
}
|
|
694
|
-
const Y = b({ tabbingDirection: tr ? "backwards" : "forwards" }), ar = Y.findIndex(($) => $ ===
|
|
694
|
+
const Y = b({ tabbingDirection: tr ? "backwards" : "forwards" }), ar = Y.findIndex(($) => $ === q);
|
|
695
695
|
qf(Y.slice(ar + 1)) ? _.preventDefault() : tr ? (P = f.current) == null || P.focus() : (V = u.current) == null || V.focus();
|
|
696
696
|
}
|
|
697
697
|
};
|
|
698
|
-
return
|
|
698
|
+
return v.addEventListener("keydown", I), () => v.removeEventListener("keydown", I);
|
|
699
699
|
}
|
|
700
700
|
}, [A, b]), /* @__PURE__ */ M(
|
|
701
701
|
P9,
|
|
@@ -711,10 +711,10 @@ var Y6 = "ToastViewport", J9 = ["F8"], Ku = "toast.viewportPause", qu = "toast.v
|
|
|
711
711
|
{
|
|
712
712
|
ref: f,
|
|
713
713
|
onFocusFromOutsideViewport: () => {
|
|
714
|
-
const
|
|
714
|
+
const v = b({
|
|
715
715
|
tabbingDirection: "forwards"
|
|
716
716
|
});
|
|
717
|
-
qf(
|
|
717
|
+
qf(v);
|
|
718
718
|
}
|
|
719
719
|
}
|
|
720
720
|
),
|
|
@@ -724,10 +724,10 @@ var Y6 = "ToastViewport", J9 = ["F8"], Ku = "toast.viewportPause", qu = "toast.v
|
|
|
724
724
|
{
|
|
725
725
|
ref: u,
|
|
726
726
|
onFocusFromOutsideViewport: () => {
|
|
727
|
-
const
|
|
727
|
+
const v = b({
|
|
728
728
|
tabbingDirection: "backwards"
|
|
729
729
|
});
|
|
730
|
-
qf(
|
|
730
|
+
qf(v);
|
|
731
731
|
}
|
|
732
732
|
}
|
|
733
733
|
)
|
|
@@ -812,12 +812,12 @@ var [ew, aw] = L6(zo, {
|
|
|
812
812
|
onSwipeCancel: h,
|
|
813
813
|
onSwipeEnd: d,
|
|
814
814
|
...g
|
|
815
|
-
} = r, b = Ts(zo, a), [
|
|
815
|
+
} = r, b = Ts(zo, a), [v, I] = p.useState(null), _ = k0(e, ($) => I($)), N = p.useRef(null), R = p.useRef(null), C = n || b.duration, P = p.useRef(0), V = p.useRef(C), q = p.useRef(0), { onToastAdd: tr, onToastRemove: X } = b, er = Ra(() => {
|
|
816
816
|
var J;
|
|
817
|
-
(
|
|
817
|
+
(v == null ? void 0 : v.contains(document.activeElement)) && ((J = b.viewport) == null || J.focus()), o();
|
|
818
818
|
}), Y = p.useCallback(
|
|
819
819
|
($) => {
|
|
820
|
-
!$ || $ === 1 / 0 || (window.clearTimeout(
|
|
820
|
+
!$ || $ === 1 / 0 || (window.clearTimeout(q.current), P.current = (/* @__PURE__ */ new Date()).getTime(), q.current = window.setTimeout(er, $));
|
|
821
821
|
},
|
|
822
822
|
[er]
|
|
823
823
|
);
|
|
@@ -828,7 +828,7 @@ var [ew, aw] = L6(zo, {
|
|
|
828
828
|
Y(V.current), f == null || f();
|
|
829
829
|
}, L = () => {
|
|
830
830
|
const O = (/* @__PURE__ */ new Date()).getTime() - P.current;
|
|
831
|
-
V.current = V.current - O, window.clearTimeout(
|
|
831
|
+
V.current = V.current - O, window.clearTimeout(q.current), s == null || s();
|
|
832
832
|
};
|
|
833
833
|
return $.addEventListener(Ku, L), $.addEventListener(qu, J), () => {
|
|
834
834
|
$.removeEventListener(Ku, L), $.removeEventListener(qu, J);
|
|
@@ -837,7 +837,7 @@ var [ew, aw] = L6(zo, {
|
|
|
837
837
|
}, [b.viewport, C, s, f, Y]), p.useEffect(() => {
|
|
838
838
|
i && !b.isClosePausedRef.current && Y(C);
|
|
839
839
|
}, [i, C, b.isClosePausedRef, Y]), p.useEffect(() => (tr(), () => X()), [tr, X]);
|
|
840
|
-
const ar = p.useMemo(() =>
|
|
840
|
+
const ar = p.useMemo(() => v ? t8(v) : null, [v]);
|
|
841
841
|
return b.viewport ? /* @__PURE__ */ M($0, { children: [
|
|
842
842
|
ar && /* @__PURE__ */ l(
|
|
843
843
|
nw,
|
|
@@ -873,7 +873,7 @@ var [ew, aw] = L6(zo, {
|
|
|
873
873
|
}),
|
|
874
874
|
onPointerMove: Pr(r.onPointerMove, ($) => {
|
|
875
875
|
if (!N.current) return;
|
|
876
|
-
const J = $.clientX - N.current.x, L = $.clientY - N.current.y, O = !!R.current,
|
|
876
|
+
const J = $.clientX - N.current.x, L = $.clientY - N.current.y, O = !!R.current, m = ["left", "right"].includes(b.swipeDirection), w = ["left", "up"].includes(b.swipeDirection) ? Math.min : Math.max, y = m ? w(0, J) : 0, k = m ? 0 : w(0, L), E = $.pointerType === "touch" ? 10 : 2, x = { x: y, y: k }, B = { originalEvent: $, delta: x };
|
|
877
877
|
O ? (R.current = x, vA(K9, c, B, {
|
|
878
878
|
discrete: !1
|
|
879
879
|
})) : u4(x, b.swipeDirection, E) ? (R.current = x, vA(z9, u, B, {
|
|
@@ -883,13 +883,13 @@ var [ew, aw] = L6(zo, {
|
|
|
883
883
|
onPointerUp: Pr(r.onPointerUp, ($) => {
|
|
884
884
|
const J = R.current, L = $.target;
|
|
885
885
|
if (L.hasPointerCapture($.pointerId) && L.releasePointerCapture($.pointerId), R.current = null, N.current = null, J) {
|
|
886
|
-
const O = $.currentTarget,
|
|
887
|
-
u4(J, b.swipeDirection, b.swipeThreshold) ? vA(rw, d,
|
|
886
|
+
const O = $.currentTarget, m = { originalEvent: $, delta: J };
|
|
887
|
+
u4(J, b.swipeDirection, b.swipeThreshold) ? vA(rw, d, m, {
|
|
888
888
|
discrete: !0
|
|
889
889
|
}) : vA(
|
|
890
890
|
q9,
|
|
891
891
|
h,
|
|
892
|
-
|
|
892
|
+
m,
|
|
893
893
|
{
|
|
894
894
|
discrete: !0
|
|
895
895
|
}
|
|
@@ -1043,14 +1043,14 @@ const l4 = (r) => typeof r == "boolean" ? `${r}` : r === 0 ? "0" : r, c4 = Dl, V
|
|
|
1043
1043
|
}, {}), s = e == null || (t = e.compoundVariants) === null || t === void 0 ? void 0 : t.reduce((f, u) => {
|
|
1044
1044
|
let { class: c, className: h, ...d } = u;
|
|
1045
1045
|
return Object.entries(d).every((g) => {
|
|
1046
|
-
let [b,
|
|
1047
|
-
return Array.isArray(
|
|
1046
|
+
let [b, v] = g;
|
|
1047
|
+
return Array.isArray(v) ? v.includes({
|
|
1048
1048
|
...i,
|
|
1049
1049
|
...A
|
|
1050
1050
|
}[b]) : {
|
|
1051
1051
|
...i,
|
|
1052
1052
|
...A
|
|
1053
|
-
}[b] ===
|
|
1053
|
+
}[b] === v;
|
|
1054
1054
|
}) ? [
|
|
1055
1055
|
...f,
|
|
1056
1056
|
c,
|
|
@@ -1455,15 +1455,15 @@ const Gl = K0("X", [
|
|
|
1455
1455
|
} = r, t = e.length === 1, n = e[0], i = e.length, o = (A) => {
|
|
1456
1456
|
const s = [];
|
|
1457
1457
|
let f = 0, u = 0, c;
|
|
1458
|
-
for (let
|
|
1459
|
-
let I = A[
|
|
1458
|
+
for (let v = 0; v < A.length; v++) {
|
|
1459
|
+
let I = A[v];
|
|
1460
1460
|
if (f === 0) {
|
|
1461
|
-
if (I === n && (t || A.slice(
|
|
1462
|
-
s.push(A.slice(u,
|
|
1461
|
+
if (I === n && (t || A.slice(v, v + i) === e)) {
|
|
1462
|
+
s.push(A.slice(u, v)), u = v + i;
|
|
1463
1463
|
continue;
|
|
1464
1464
|
}
|
|
1465
1465
|
if (I === "/") {
|
|
1466
|
-
c =
|
|
1466
|
+
c = v;
|
|
1467
1467
|
continue;
|
|
1468
1468
|
}
|
|
1469
1469
|
}
|
|
@@ -1519,7 +1519,7 @@ const Gl = K0("X", [
|
|
|
1519
1519
|
}
|
|
1520
1520
|
g = !1;
|
|
1521
1521
|
}
|
|
1522
|
-
const
|
|
1522
|
+
const v = Sw(u).join(":"), I = c ? v + b8 : v, _ = I + b;
|
|
1523
1523
|
if (i.includes(_))
|
|
1524
1524
|
continue;
|
|
1525
1525
|
i.push(_);
|
|
@@ -1575,7 +1575,7 @@ const I0 = (r) => {
|
|
|
1575
1575
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
1576
1576
|
Mw.test(r) && !Gw.test(r)
|
|
1577
1577
|
), g8 = () => !1, qw = (r) => Xw.test(r), rk = (r) => jw.test(r), ek = () => {
|
|
1578
|
-
const r = I0("colors"), e = I0("spacing"), a = I0("blur"), t = I0("brightness"), n = I0("borderColor"), i = I0("borderRadius"), o = I0("borderSpacing"), A = I0("borderWidth"), s = I0("contrast"), f = I0("grayscale"), u = I0("hueRotate"), c = I0("invert"), h = I0("gap"), d = I0("gradientColorStops"), g = I0("gradientColorStopPositions"), b = I0("inset"),
|
|
1578
|
+
const r = I0("colors"), e = I0("spacing"), a = I0("blur"), t = I0("brightness"), n = I0("borderColor"), i = I0("borderRadius"), o = I0("borderSpacing"), A = I0("borderWidth"), s = I0("contrast"), f = I0("grayscale"), u = I0("hueRotate"), c = I0("invert"), h = I0("gap"), d = I0("gradientColorStops"), g = I0("gradientColorStopPositions"), b = I0("inset"), v = I0("margin"), I = I0("opacity"), _ = I0("padding"), N = I0("saturate"), R = I0("scale"), C = I0("sepia"), P = I0("skew"), V = I0("space"), q = I0("translate"), tr = () => ["auto", "contain", "none"], X = () => ["auto", "hidden", "clip", "visible", "scroll"], er = () => ["auto", Hr, e], Y = () => [Hr, e], ar = () => ["", ht, Dt], $ = () => ["auto", Wi, Hr], J = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], L = () => ["solid", "dashed", "dotted", "double", "none"], O = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], m = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], w = () => ["", "0", Hr], y = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], k = () => [Wi, Hr];
|
|
1579
1579
|
return {
|
|
1580
1580
|
cacheSize: 500,
|
|
1581
1581
|
separator: ":",
|
|
@@ -1979,7 +1979,7 @@ const I0 = (r) => {
|
|
|
1979
1979
|
* @see https://tailwindcss.com/docs/justify-content
|
|
1980
1980
|
*/
|
|
1981
1981
|
"justify-content": [{
|
|
1982
|
-
justify: ["normal", ...
|
|
1982
|
+
justify: ["normal", ...m()]
|
|
1983
1983
|
}],
|
|
1984
1984
|
/**
|
|
1985
1985
|
* Justify Items
|
|
@@ -2000,7 +2000,7 @@ const I0 = (r) => {
|
|
|
2000
2000
|
* @see https://tailwindcss.com/docs/align-content
|
|
2001
2001
|
*/
|
|
2002
2002
|
"align-content": [{
|
|
2003
|
-
content: ["normal", ...
|
|
2003
|
+
content: ["normal", ...m(), "baseline"]
|
|
2004
2004
|
}],
|
|
2005
2005
|
/**
|
|
2006
2006
|
* Align Items
|
|
@@ -2021,7 +2021,7 @@ const I0 = (r) => {
|
|
|
2021
2021
|
* @see https://tailwindcss.com/docs/place-content
|
|
2022
2022
|
*/
|
|
2023
2023
|
"place-content": [{
|
|
2024
|
-
"place-content": [...
|
|
2024
|
+
"place-content": [...m(), "baseline"]
|
|
2025
2025
|
}],
|
|
2026
2026
|
/**
|
|
2027
2027
|
* Place Items
|
|
@@ -2106,63 +2106,63 @@ const I0 = (r) => {
|
|
|
2106
2106
|
* @see https://tailwindcss.com/docs/margin
|
|
2107
2107
|
*/
|
|
2108
2108
|
m: [{
|
|
2109
|
-
m: [
|
|
2109
|
+
m: [v]
|
|
2110
2110
|
}],
|
|
2111
2111
|
/**
|
|
2112
2112
|
* Margin X
|
|
2113
2113
|
* @see https://tailwindcss.com/docs/margin
|
|
2114
2114
|
*/
|
|
2115
2115
|
mx: [{
|
|
2116
|
-
mx: [
|
|
2116
|
+
mx: [v]
|
|
2117
2117
|
}],
|
|
2118
2118
|
/**
|
|
2119
2119
|
* Margin Y
|
|
2120
2120
|
* @see https://tailwindcss.com/docs/margin
|
|
2121
2121
|
*/
|
|
2122
2122
|
my: [{
|
|
2123
|
-
my: [
|
|
2123
|
+
my: [v]
|
|
2124
2124
|
}],
|
|
2125
2125
|
/**
|
|
2126
2126
|
* Margin Start
|
|
2127
2127
|
* @see https://tailwindcss.com/docs/margin
|
|
2128
2128
|
*/
|
|
2129
2129
|
ms: [{
|
|
2130
|
-
ms: [
|
|
2130
|
+
ms: [v]
|
|
2131
2131
|
}],
|
|
2132
2132
|
/**
|
|
2133
2133
|
* Margin End
|
|
2134
2134
|
* @see https://tailwindcss.com/docs/margin
|
|
2135
2135
|
*/
|
|
2136
2136
|
me: [{
|
|
2137
|
-
me: [
|
|
2137
|
+
me: [v]
|
|
2138
2138
|
}],
|
|
2139
2139
|
/**
|
|
2140
2140
|
* Margin Top
|
|
2141
2141
|
* @see https://tailwindcss.com/docs/margin
|
|
2142
2142
|
*/
|
|
2143
2143
|
mt: [{
|
|
2144
|
-
mt: [
|
|
2144
|
+
mt: [v]
|
|
2145
2145
|
}],
|
|
2146
2146
|
/**
|
|
2147
2147
|
* Margin Right
|
|
2148
2148
|
* @see https://tailwindcss.com/docs/margin
|
|
2149
2149
|
*/
|
|
2150
2150
|
mr: [{
|
|
2151
|
-
mr: [
|
|
2151
|
+
mr: [v]
|
|
2152
2152
|
}],
|
|
2153
2153
|
/**
|
|
2154
2154
|
* Margin Bottom
|
|
2155
2155
|
* @see https://tailwindcss.com/docs/margin
|
|
2156
2156
|
*/
|
|
2157
2157
|
mb: [{
|
|
2158
|
-
mb: [
|
|
2158
|
+
mb: [v]
|
|
2159
2159
|
}],
|
|
2160
2160
|
/**
|
|
2161
2161
|
* Margin Left
|
|
2162
2162
|
* @see https://tailwindcss.com/docs/margin
|
|
2163
2163
|
*/
|
|
2164
2164
|
ml: [{
|
|
2165
|
-
ml: [
|
|
2165
|
+
ml: [v]
|
|
2166
2166
|
}],
|
|
2167
2167
|
/**
|
|
2168
2168
|
* Space Between X
|
|
@@ -3241,14 +3241,14 @@ const I0 = (r) => {
|
|
|
3241
3241
|
* @see https://tailwindcss.com/docs/translate
|
|
3242
3242
|
*/
|
|
3243
3243
|
"translate-x": [{
|
|
3244
|
-
"translate-x": [
|
|
3244
|
+
"translate-x": [q]
|
|
3245
3245
|
}],
|
|
3246
3246
|
/**
|
|
3247
3247
|
* Translate Y
|
|
3248
3248
|
* @see https://tailwindcss.com/docs/translate
|
|
3249
3249
|
*/
|
|
3250
3250
|
"translate-y": [{
|
|
3251
|
-
"translate-y": [
|
|
3251
|
+
"translate-y": [q]
|
|
3252
3252
|
}],
|
|
3253
3253
|
/**
|
|
3254
3254
|
* Skew X
|
|
@@ -3707,9 +3707,9 @@ var m4 = ["light", "dark"], ok = "(prefers-color-scheme: dark)", Ak = p.createCo
|
|
|
3707
3707
|
return (r = p.useContext(Ak)) != null ? r : sk;
|
|
3708
3708
|
};
|
|
3709
3709
|
p.memo(({ forcedTheme: r, storageKey: e, attribute: a, enableSystem: t, enableColorScheme: n, defaultTheme: i, value: o, attrs: A, nonce: s }) => {
|
|
3710
|
-
let f = i === "system", u = a === "class" ? `var d=document.documentElement,c=d.classList;${`c.remove(${A.map((g) => `'${g}'`).join(",")})`};` : `var d=document.documentElement,n='${a}',s='setAttribute';`, c = n ? m4.includes(i) && i ? `if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'` : "if(e==='light'||e==='dark')d.style.colorScheme=e" : "", h = (g, b = !1,
|
|
3710
|
+
let f = i === "system", u = a === "class" ? `var d=document.documentElement,c=d.classList;${`c.remove(${A.map((g) => `'${g}'`).join(",")})`};` : `var d=document.documentElement,n='${a}',s='setAttribute';`, c = n ? m4.includes(i) && i ? `if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'` : "if(e==='light'||e==='dark')d.style.colorScheme=e" : "", h = (g, b = !1, v = !0) => {
|
|
3711
3711
|
let I = o ? o[g] : g, _ = b ? g + "|| ''" : `'${I}'`, N = "";
|
|
3712
|
-
return n &&
|
|
3712
|
+
return n && v && !b && m4.includes(g) && (N += `d.style.colorScheme = '${g}';`), a === "class" ? b || I ? N += `c.add(${_})` : N += "null" : I && (N += `d[s](n,${_})`), N;
|
|
3713
3713
|
}, d = r ? `!function(){${u}${h(r)}}()` : t ? `!function(){try{${u}var e=localStorage.getItem('${e}');if('system'===e||(!e&&${f})){var t='${ok}',m=window.matchMedia(t);if(m.media!==t||m.matches){${h("dark")}}else{${h("light")}}}else if(e){${o ? `var x=${JSON.stringify(o)};` : ""}${h(o ? "x[e]" : "e", !0)}}${f ? "" : "else{" + h(i, !1, !1) + "}"}${c}}catch(e){}}()` : `!function(){try{${u}var e=localStorage.getItem('${e}');if(e){${o ? `var x=${JSON.stringify(o)};` : ""}${h(o ? "x[e]" : "e", !0)}}else{${h(i, !1, !1)};}${c}}catch(t){}}();`;
|
|
3714
3714
|
return p.createElement("script", { nonce: s, dangerouslySetInnerHTML: { __html: d } });
|
|
3715
3715
|
});
|
|
@@ -3805,10 +3805,10 @@ function Fk(r) {
|
|
|
3805
3805
|
}
|
|
3806
3806
|
var $k = (r) => {
|
|
3807
3807
|
var e, a, t, n, i, o, A, s, f, u, c;
|
|
3808
|
-
let { invert: h, toast: d, unstyled: g, interacting: b, setHeights:
|
|
3808
|
+
let { invert: h, toast: d, unstyled: g, interacting: b, setHeights: v, visibleToasts: I, heights: _, index: N, toasts: R, expanded: C, removeToast: P, defaultRichColors: V, closeButton: q, style: tr, cancelButtonStyle: X, actionButtonStyle: er, className: Y = "", descriptionClassName: ar = "", duration: $, position: J, gap: L, loadingIcon: O, expandByDefault: m, classNames: w, icons: y, closeButtonAriaLabel: k = "Close toast", pauseWhenPageIsHidden: E } = r, [x, B] = j.useState(null), [Z, W] = j.useState(null), [F, U] = j.useState(!1), [K, H] = j.useState(!1), [rr, T] = j.useState(!1), [nr, pr] = j.useState(!1), [Ir, Br] = j.useState(!1), [wr, Ur] = j.useState(0), [Yr, S] = j.useState(0), G = j.useRef(d.duration || $ || v4), Q = j.useRef(null), or = j.useRef(null), Ar = N === 0, ir = N + 1 <= I, lr = d.type, Tr = d.dismissible !== !1, zr = d.className || "", S0 = d.descriptionClassName || "", oe = j.useMemo(() => _.findIndex((sr) => sr.toastId === d.id) || 0, [_, d.id]), N0 = j.useMemo(() => {
|
|
3809
3809
|
var sr;
|
|
3810
|
-
return (sr = d.closeButton) != null ? sr :
|
|
3811
|
-
}, [d.closeButton,
|
|
3810
|
+
return (sr = d.closeButton) != null ? sr : q;
|
|
3811
|
+
}, [d.closeButton, q]), na = j.useMemo(() => d.duration || $ || v4, [d.duration, $]), Ve = j.useRef(0), he = j.useRef(0), ct = j.useRef(0), Ce = j.useRef(null), [Nn, be] = J.split("-"), ia = j.useMemo(() => _.reduce((sr, Nr, cr) => cr >= oe ? sr : sr + Nr.height, 0), [_, oe]), ma = gk(), Ma = d.invert || h, dt = lr === "loading";
|
|
3812
3812
|
he.current = j.useMemo(() => oe * L + ia, [oe, ia]), j.useEffect(() => {
|
|
3813
3813
|
G.current = na;
|
|
3814
3814
|
}, [na]), j.useEffect(() => {
|
|
@@ -3817,20 +3817,20 @@ var $k = (r) => {
|
|
|
3817
3817
|
let sr = or.current;
|
|
3818
3818
|
if (sr) {
|
|
3819
3819
|
let Nr = sr.getBoundingClientRect().height;
|
|
3820
|
-
return S(Nr),
|
|
3820
|
+
return S(Nr), v((cr) => [{ toastId: d.id, height: Nr, position: d.position }, ...cr]), () => v((cr) => cr.filter((Er) => Er.toastId !== d.id));
|
|
3821
3821
|
}
|
|
3822
|
-
}, [
|
|
3822
|
+
}, [v, d.id]), j.useLayoutEffect(() => {
|
|
3823
3823
|
if (!F) return;
|
|
3824
3824
|
let sr = or.current, Nr = sr.style.height;
|
|
3825
3825
|
sr.style.height = "auto";
|
|
3826
3826
|
let cr = sr.getBoundingClientRect().height;
|
|
3827
|
-
sr.style.height = Nr, S(cr),
|
|
3828
|
-
}, [F, d.title, d.description,
|
|
3827
|
+
sr.style.height = Nr, S(cr), v((Er) => Er.find((dr) => dr.toastId === d.id) ? Er.map((dr) => dr.toastId === d.id ? { ...dr, height: cr } : dr) : [{ toastId: d.id, height: cr, position: d.position }, ...Er]);
|
|
3828
|
+
}, [F, d.title, d.description, v, d.id]);
|
|
3829
3829
|
let ue = j.useCallback(() => {
|
|
3830
|
-
H(!0), Ur(he.current),
|
|
3830
|
+
H(!0), Ur(he.current), v((sr) => sr.filter((Nr) => Nr.toastId !== d.id)), setTimeout(() => {
|
|
3831
3831
|
P(d);
|
|
3832
3832
|
}, Sk);
|
|
3833
|
-
}, [d, P,
|
|
3833
|
+
}, [d, P, v, he]);
|
|
3834
3834
|
j.useEffect(() => {
|
|
3835
3835
|
if (d.promise && lr === "loading" || d.duration === 1 / 0 || d.type === "loading") return;
|
|
3836
3836
|
let sr;
|
|
@@ -3851,7 +3851,7 @@ var $k = (r) => {
|
|
|
3851
3851
|
var sr, Nr, cr;
|
|
3852
3852
|
return y != null && y.loading ? j.createElement("div", { className: ga(w == null ? void 0 : w.loader, (sr = d == null ? void 0 : d.classNames) == null ? void 0 : sr.loader, "sonner-loader"), "data-visible": lr === "loading" }, y.loading) : O ? j.createElement("div", { className: ga(w == null ? void 0 : w.loader, (Nr = d == null ? void 0 : d.classNames) == null ? void 0 : Nr.loader, "sonner-loader"), "data-visible": lr === "loading" }, O) : j.createElement(ck, { className: ga(w == null ? void 0 : w.loader, (cr = d == null ? void 0 : d.classNames) == null ? void 0 : cr.loader), visible: lr === "loading" });
|
|
3853
3853
|
}
|
|
3854
|
-
return j.createElement("li", { tabIndex: 0, ref: or, className: ga(Y, zr, w == null ? void 0 : w.toast, (e = d == null ? void 0 : d.classNames) == null ? void 0 : e.toast, w == null ? void 0 : w.default, w == null ? void 0 : w[lr], (a = d == null ? void 0 : d.classNames) == null ? void 0 : a[lr]), "data-sonner-toast": "", "data-rich-colors": (t = d.richColors) != null ? t : V, "data-styled": !(d.jsx || d.unstyled || g), "data-mounted": F, "data-promise": !!d.promise, "data-swiped": Ir, "data-removed": K, "data-visible": ir, "data-y-position": Nn, "data-x-position": be, "data-index": N, "data-front": Ar, "data-swiping":
|
|
3854
|
+
return j.createElement("li", { tabIndex: 0, ref: or, className: ga(Y, zr, w == null ? void 0 : w.toast, (e = d == null ? void 0 : d.classNames) == null ? void 0 : e.toast, w == null ? void 0 : w.default, w == null ? void 0 : w[lr], (a = d == null ? void 0 : d.classNames) == null ? void 0 : a[lr]), "data-sonner-toast": "", "data-rich-colors": (t = d.richColors) != null ? t : V, "data-styled": !(d.jsx || d.unstyled || g), "data-mounted": F, "data-promise": !!d.promise, "data-swiped": Ir, "data-removed": K, "data-visible": ir, "data-y-position": Nn, "data-x-position": be, "data-index": N, "data-front": Ar, "data-swiping": rr, "data-dismissible": Tr, "data-type": lr, "data-invert": Ma, "data-swipe-out": nr, "data-swipe-direction": Z, "data-expanded": !!(C || m && F), style: { "--index": N, "--toasts-before": N, "--z-index": R.length - N, "--offset": `${K ? wr : he.current}px`, "--initial-height": m ? "auto" : `${Yr}px`, ...tr, ...d.style }, onDragEnd: () => {
|
|
3855
3855
|
T(!1), B(null), Ce.current = null;
|
|
3856
3856
|
}, onPointerDown: (sr) => {
|
|
3857
3857
|
dt || !Tr || (Q.current = /* @__PURE__ */ new Date(), Ur(he.current), sr.target.setPointerCapture(sr.pointerId), sr.target.tagName !== "BUTTON" && (T(!0), Ce.current = { x: sr.clientX, y: sr.clientY }));
|
|
@@ -3904,7 +3904,7 @@ function Wk(r, e) {
|
|
|
3904
3904
|
}), a;
|
|
3905
3905
|
}
|
|
3906
3906
|
var Tk = I2(function(r, e) {
|
|
3907
|
-
let { invert: a, position: t = "bottom-right", hotkey: n = ["altKey", "KeyT"], expand: i, closeButton: o, className: A, offset: s, mobileOffset: f, theme: u = "light", richColors: c, duration: h, style: d, visibleToasts: g = Ik, toastOptions: b, dir:
|
|
3907
|
+
let { invert: a, position: t = "bottom-right", hotkey: n = ["altKey", "KeyT"], expand: i, closeButton: o, className: A, offset: s, mobileOffset: f, theme: u = "light", richColors: c, duration: h, style: d, visibleToasts: g = Ik, toastOptions: b, dir: v = g4(), gap: I = Rk, loadingIcon: _, icons: N, containerAriaLabel: R = "Notifications", pauseWhenPageIsHidden: C } = r, [P, V] = j.useState([]), q = j.useMemo(() => Array.from(new Set([t].concat(P.filter((E) => E.position).map((E) => E.position)))), [P, t]), [tr, X] = j.useState([]), [er, Y] = j.useState(!1), [ar, $] = j.useState(!1), [J, L] = j.useState(u !== "system" ? u : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), O = j.useRef(null), m = n.join("+").replace(/Key/g, "").replace(/Digit/g, ""), w = j.useRef(null), y = j.useRef(!1), k = j.useCallback((E) => {
|
|
3908
3908
|
V((x) => {
|
|
3909
3909
|
var B;
|
|
3910
3910
|
return (B = x.find((Z) => Z.id === E.id)) != null && B.delete || xe.dismiss(E.id), x.filter(({ id: Z }) => Z !== E.id);
|
|
@@ -3955,10 +3955,10 @@ var Tk = I2(function(r, e) {
|
|
|
3955
3955
|
if (O.current) return () => {
|
|
3956
3956
|
w.current && (w.current.focus({ preventScroll: !0 }), w.current = null, y.current = !1);
|
|
3957
3957
|
};
|
|
3958
|
-
}, [O.current]), j.createElement("section", { ref: e, "aria-label": `${R} ${
|
|
3958
|
+
}, [O.current]), j.createElement("section", { ref: e, "aria-label": `${R} ${m}`, tabIndex: -1, "aria-live": "polite", "aria-relevant": "additions text", "aria-atomic": "false", suppressHydrationWarning: !0 }, q.map((E, x) => {
|
|
3959
3959
|
var B;
|
|
3960
3960
|
let [Z, W] = E.split("-");
|
|
3961
|
-
return P.length ? j.createElement("ol", { key: E, dir:
|
|
3961
|
+
return P.length ? j.createElement("ol", { key: E, dir: v === "auto" ? g4() : v, tabIndex: -1, ref: O, className: A, "data-sonner-toaster": !0, "data-theme": J, "data-y-position": Z, "data-lifted": er && P.length > 1 && !i, "data-x-position": W, style: { "--front-toast-height": `${((B = tr[0]) == null ? void 0 : B.height) || 0}px`, "--width": `${xk}px`, "--gap": `${I}px`, ...d, ...Wk(s, f) }, onBlur: (F) => {
|
|
3962
3962
|
y.current && !F.currentTarget.contains(F.relatedTarget) && (y.current = !1, w.current && (w.current.focus({ preventScroll: !0 }), w.current = null));
|
|
3963
3963
|
}, onFocus: (F) => {
|
|
3964
3964
|
F.target instanceof HTMLElement && F.target.dataset.dismissible === "false" || y.current || (y.current = !0, w.current = F.relatedTarget);
|
|
@@ -3968,7 +3968,7 @@ var Tk = I2(function(r, e) {
|
|
|
3968
3968
|
F.target instanceof HTMLElement && F.target.dataset.dismissible === "false" || $(!0);
|
|
3969
3969
|
}, onPointerUp: () => $(!1) }, P.filter((F) => !F.position && x === 0 || F.position === E).map((F, U) => {
|
|
3970
3970
|
var K, H;
|
|
3971
|
-
return j.createElement($k, { key: F.id, icons: N, index: U, toast: F, defaultRichColors: c, duration: (K = b == null ? void 0 : b.duration) != null ? K : h, className: b == null ? void 0 : b.className, descriptionClassName: b == null ? void 0 : b.descriptionClassName, invert: a, visibleToasts: g, closeButton: (H = b == null ? void 0 : b.closeButton) != null ? H : o, interacting: ar, position: E, style: b == null ? void 0 : b.style, unstyled: b == null ? void 0 : b.unstyled, classNames: b == null ? void 0 : b.classNames, cancelButtonStyle: b == null ? void 0 : b.cancelButtonStyle, actionButtonStyle: b == null ? void 0 : b.actionButtonStyle, removeToast: k, toasts: P.filter((
|
|
3971
|
+
return j.createElement($k, { key: F.id, icons: N, index: U, toast: F, defaultRichColors: c, duration: (K = b == null ? void 0 : b.duration) != null ? K : h, className: b == null ? void 0 : b.className, descriptionClassName: b == null ? void 0 : b.descriptionClassName, invert: a, visibleToasts: g, closeButton: (H = b == null ? void 0 : b.closeButton) != null ? H : o, interacting: ar, position: E, style: b == null ? void 0 : b.style, unstyled: b == null ? void 0 : b.unstyled, classNames: b == null ? void 0 : b.classNames, cancelButtonStyle: b == null ? void 0 : b.cancelButtonStyle, actionButtonStyle: b == null ? void 0 : b.actionButtonStyle, removeToast: k, toasts: P.filter((rr) => rr.position == F.position), heights: tr.filter((rr) => rr.position == F.position), setHeights: X, expandByDefault: i, gap: I, loadingIcon: _, expanded: er, pauseWhenPageIsHidden: C, swipeDirections: r.swipeDirections });
|
|
3972
3972
|
})) : null;
|
|
3973
3973
|
}));
|
|
3974
3974
|
});
|
|
@@ -4170,7 +4170,7 @@ const zk = async (r, e, a) => {
|
|
|
4170
4170
|
} = w4(f, t, s), h = t, d = {}, g = 0;
|
|
4171
4171
|
for (let b = 0; b < A.length; b++) {
|
|
4172
4172
|
const {
|
|
4173
|
-
name:
|
|
4173
|
+
name: v,
|
|
4174
4174
|
fn: I
|
|
4175
4175
|
} = A[b], {
|
|
4176
4176
|
x: _,
|
|
@@ -4193,8 +4193,8 @@ const zk = async (r, e, a) => {
|
|
|
4193
4193
|
});
|
|
4194
4194
|
u = _ ?? u, c = N ?? c, d = {
|
|
4195
4195
|
...d,
|
|
4196
|
-
[
|
|
4197
|
-
...d[
|
|
4196
|
+
[v]: {
|
|
4197
|
+
...d[v],
|
|
4198
4198
|
...R
|
|
4199
4199
|
}
|
|
4200
4200
|
}, C && g <= 50 && (g++, typeof C == "object" && (C.placement && (h = C.placement), C.rects && (f = C.rects === !0 ? await o.getElementRects({
|
|
@@ -4230,8 +4230,8 @@ async function mo(r, e) {
|
|
|
4230
4230
|
elementContext: c = "floating",
|
|
4231
4231
|
altBoundary: h = !1,
|
|
4232
4232
|
padding: d = 0
|
|
4233
|
-
} = Rt(e, r), g = _8(d),
|
|
4234
|
-
element: (a = await (i.isElement == null ? void 0 : i.isElement(
|
|
4233
|
+
} = Rt(e, r), g = _8(d), v = A[h ? c === "floating" ? "reference" : "floating" : c], I = as(await i.getClippingRect({
|
|
4234
|
+
element: (a = await (i.isElement == null ? void 0 : i.isElement(v))) == null || a ? v : v.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(A.floating)),
|
|
4235
4235
|
boundary: f,
|
|
4236
4236
|
rootBoundary: u,
|
|
4237
4237
|
strategy: s
|
|
@@ -4280,10 +4280,10 @@ const Kk = (r) => ({
|
|
|
4280
4280
|
const c = _8(u), h = {
|
|
4281
4281
|
x: a,
|
|
4282
4282
|
y: t
|
|
4283
|
-
}, d = Ul(n), g = Ll(d), b = await o.getDimensions(f),
|
|
4283
|
+
}, d = Ul(n), g = Ll(d), b = await o.getDimensions(f), v = d === "y", I = v ? "top" : "left", _ = v ? "bottom" : "right", N = v ? "clientHeight" : "clientWidth", R = i.reference[g] + i.reference[d] - h[d] - i.floating[g], C = h[d] - i.reference[d], P = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(f));
|
|
4284
4284
|
let V = P ? P[N] : 0;
|
|
4285
4285
|
(!V || !await (o.isElement == null ? void 0 : o.isElement(P))) && (V = A.floating[N] || i.floating[g]);
|
|
4286
|
-
const
|
|
4286
|
+
const q = R / 2 - C / 2, tr = V / 2 - b[g] / 2 - 1, X = ln(c[I], tr), er = ln(c[_], tr), Y = X, ar = V - b[g] - er, $ = V / 2 - b[g] / 2 + q, J = n1(Y, $, ar), L = !s.arrow && x2(n) != null && $ !== J && i.reference[g] / 2 - ($ < Y ? X : er) - b[g] / 2 < 0, O = L ? $ < Y ? $ - Y : $ - ar : 0;
|
|
4287
4287
|
return {
|
|
4288
4288
|
[d]: h[d] + O,
|
|
4289
4289
|
data: {
|
|
@@ -4316,17 +4316,17 @@ const Kk = (r) => ({
|
|
|
4316
4316
|
fallbackStrategy: d = "bestFit",
|
|
4317
4317
|
fallbackAxisSideDirection: g = "none",
|
|
4318
4318
|
flipAlignment: b = !0,
|
|
4319
|
-
...
|
|
4319
|
+
...v
|
|
4320
4320
|
} = Rt(r, e);
|
|
4321
4321
|
if ((a = i.arrow) != null && a.alignmentOffset)
|
|
4322
4322
|
return {};
|
|
4323
4323
|
const I = Zt(n), _ = et(A), N = Zt(A) === A, R = await (s.isRTL == null ? void 0 : s.isRTL(f.floating)), C = h || (N || !b ? [es(A)] : Lk(A)), P = g !== "none";
|
|
4324
4324
|
!h && P && C.push(...Qk(A, b, g, R));
|
|
4325
|
-
const V = [A, ...C],
|
|
4325
|
+
const V = [A, ...C], q = await mo(e, v), tr = [];
|
|
4326
4326
|
let X = ((t = i.flip) == null ? void 0 : t.overflows) || [];
|
|
4327
|
-
if (u && tr.push(
|
|
4327
|
+
if (u && tr.push(q[I]), c) {
|
|
4328
4328
|
const $ = jk(n, o, R);
|
|
4329
|
-
tr.push(
|
|
4329
|
+
tr.push(q[$[0]], q[$[1]]);
|
|
4330
4330
|
}
|
|
4331
4331
|
if (X = [...X, {
|
|
4332
4332
|
placement: n,
|
|
@@ -4336,7 +4336,7 @@ const Kk = (r) => ({
|
|
|
4336
4336
|
const $ = (((er = i.flip) == null ? void 0 : er.index) || 0) + 1, J = V[$];
|
|
4337
4337
|
if (J && (!(c === "alignment" ? _ !== et(J) : !1) || // We leave the current main axis only if every placement on that axis
|
|
4338
4338
|
// overflows the main axis.
|
|
4339
|
-
X.every((
|
|
4339
|
+
X.every((m) => et(m.placement) === _ ? m.overflows[0] > 0 : !0)))
|
|
4340
4340
|
return {
|
|
4341
4341
|
data: {
|
|
4342
4342
|
index: $,
|
|
@@ -4346,20 +4346,20 @@ const Kk = (r) => ({
|
|
|
4346
4346
|
placement: J
|
|
4347
4347
|
}
|
|
4348
4348
|
};
|
|
4349
|
-
let L = (Y = X.filter((O) => O.overflows[0] <= 0).sort((O,
|
|
4349
|
+
let L = (Y = X.filter((O) => O.overflows[0] <= 0).sort((O, m) => O.overflows[1] - m.overflows[1])[0]) == null ? void 0 : Y.placement;
|
|
4350
4350
|
if (!L)
|
|
4351
4351
|
switch (d) {
|
|
4352
4352
|
case "bestFit": {
|
|
4353
4353
|
var ar;
|
|
4354
|
-
const O = (ar = X.filter((
|
|
4354
|
+
const O = (ar = X.filter((m) => {
|
|
4355
4355
|
if (P) {
|
|
4356
|
-
const w = et(
|
|
4356
|
+
const w = et(m.placement);
|
|
4357
4357
|
return w === _ || // Create a bias to the `y` side axis due to horizontal
|
|
4358
4358
|
// reading directions favoring greater width.
|
|
4359
4359
|
w === "y";
|
|
4360
4360
|
}
|
|
4361
4361
|
return !0;
|
|
4362
|
-
}).map((
|
|
4362
|
+
}).map((m) => [m.placement, m.overflows.filter((w) => w > 0).reduce((w, y) => w + y, 0)]).sort((m, w) => m[1] - w[1])[0]) == null ? void 0 : ar[0];
|
|
4363
4363
|
O && (L = O);
|
|
4364
4364
|
break;
|
|
4365
4365
|
}
|
|
@@ -4493,11 +4493,11 @@ const a7 = function(r) {
|
|
|
4493
4493
|
mainAxis: i = !0,
|
|
4494
4494
|
crossAxis: o = !1,
|
|
4495
4495
|
limiter: A = {
|
|
4496
|
-
fn: (
|
|
4496
|
+
fn: (v) => {
|
|
4497
4497
|
let {
|
|
4498
4498
|
x: I,
|
|
4499
4499
|
y: _
|
|
4500
|
-
} =
|
|
4500
|
+
} = v;
|
|
4501
4501
|
return {
|
|
4502
4502
|
x: I,
|
|
4503
4503
|
y: _
|
|
@@ -4511,11 +4511,11 @@ const a7 = function(r) {
|
|
|
4511
4511
|
}, u = await mo(e, s), c = et(Zt(n)), h = jl(c);
|
|
4512
4512
|
let d = f[h], g = f[c];
|
|
4513
4513
|
if (i) {
|
|
4514
|
-
const
|
|
4514
|
+
const v = h === "y" ? "top" : "left", I = h === "y" ? "bottom" : "right", _ = d + u[v], N = d - u[I];
|
|
4515
4515
|
d = n1(_, d, N);
|
|
4516
4516
|
}
|
|
4517
4517
|
if (o) {
|
|
4518
|
-
const
|
|
4518
|
+
const v = c === "y" ? "top" : "left", I = c === "y" ? "bottom" : "right", _ = g + u[v], N = g - u[I];
|
|
4519
4519
|
g = n1(_, g, N);
|
|
4520
4520
|
}
|
|
4521
4521
|
const b = A.fn({
|
|
@@ -4555,7 +4555,7 @@ const a7 = function(r) {
|
|
|
4555
4555
|
y: t
|
|
4556
4556
|
}, c = et(n), h = jl(c);
|
|
4557
4557
|
let d = u[h], g = u[c];
|
|
4558
|
-
const b = Rt(A, e),
|
|
4558
|
+
const b = Rt(A, e), v = typeof b == "number" ? {
|
|
4559
4559
|
mainAxis: b,
|
|
4560
4560
|
crossAxis: 0
|
|
4561
4561
|
} : {
|
|
@@ -4564,12 +4564,12 @@ const a7 = function(r) {
|
|
|
4564
4564
|
...b
|
|
4565
4565
|
};
|
|
4566
4566
|
if (s) {
|
|
4567
|
-
const N = h === "y" ? "height" : "width", R = i.reference[h] - i.floating[N] +
|
|
4567
|
+
const N = h === "y" ? "height" : "width", R = i.reference[h] - i.floating[N] + v.mainAxis, C = i.reference[h] + i.reference[N] - v.mainAxis;
|
|
4568
4568
|
d < R ? d = R : d > C && (d = C);
|
|
4569
4569
|
}
|
|
4570
4570
|
if (f) {
|
|
4571
4571
|
var I, _;
|
|
4572
|
-
const N = h === "y" ? "width" : "height", R = I8.has(Zt(n)), C = i.reference[c] - i.floating[N] + (R && ((I = o.offset) == null ? void 0 : I[c]) || 0) + (R ? 0 :
|
|
4572
|
+
const N = h === "y" ? "width" : "height", R = I8.has(Zt(n)), C = i.reference[c] - i.floating[N] + (R && ((I = o.offset) == null ? void 0 : I[c]) || 0) + (R ? 0 : v.crossAxis), P = i.reference[c] + i.reference[N] + (R ? 0 : ((_ = o.offset) == null ? void 0 : _[c]) || 0) - (R ? v.crossAxis : 0);
|
|
4573
4573
|
g < C ? g = C : g > P && (g = P);
|
|
4574
4574
|
}
|
|
4575
4575
|
return {
|
|
@@ -4597,17 +4597,17 @@ const a7 = function(r) {
|
|
|
4597
4597
|
width: g,
|
|
4598
4598
|
height: b
|
|
4599
4599
|
} = i.floating;
|
|
4600
|
-
let
|
|
4601
|
-
c === "top" || c === "bottom" ? (
|
|
4602
|
-
const _ = b - u.top - u.bottom, N = g - u.left - u.right, R = ln(b - u[
|
|
4603
|
-
let V = R,
|
|
4604
|
-
if ((a = e.middlewareData.shift) != null && a.enabled.x && (
|
|
4600
|
+
let v, I;
|
|
4601
|
+
c === "top" || c === "bottom" ? (v = c, I = h === (await (o.isRTL == null ? void 0 : o.isRTL(A.floating)) ? "start" : "end") ? "left" : "right") : (I = c, v = h === "end" ? "top" : "bottom");
|
|
4602
|
+
const _ = b - u.top - u.bottom, N = g - u.left - u.right, R = ln(b - u[v], _), C = ln(g - u[I], N), P = !e.middlewareData.shift;
|
|
4603
|
+
let V = R, q = C;
|
|
4604
|
+
if ((a = e.middlewareData.shift) != null && a.enabled.x && (q = N), (t = e.middlewareData.shift) != null && t.enabled.y && (V = _), P && !h) {
|
|
4605
4605
|
const X = Ye(u.left, 0), er = Ye(u.right, 0), Y = Ye(u.top, 0), ar = Ye(u.bottom, 0);
|
|
4606
|
-
d ?
|
|
4606
|
+
d ? q = g - 2 * (X !== 0 || er !== 0 ? X + er : Ye(u.left, u.right)) : V = b - 2 * (Y !== 0 || ar !== 0 ? Y + ar : Ye(u.top, u.bottom));
|
|
4607
4607
|
}
|
|
4608
4608
|
await s({
|
|
4609
4609
|
...e,
|
|
4610
|
-
availableWidth:
|
|
4610
|
+
availableWidth: q,
|
|
4611
4611
|
availableHeight: V
|
|
4612
4612
|
});
|
|
4613
4613
|
const tr = await o.getDimensions(A.floating);
|
|
@@ -4783,8 +4783,8 @@ function ri(r, e, a, t) {
|
|
|
4783
4783
|
const h = Je(i), d = t && Za(t) ? Je(t) : t;
|
|
4784
4784
|
let g = h, b = o1(g);
|
|
4785
4785
|
for (; b && t && d !== g; ) {
|
|
4786
|
-
const
|
|
4787
|
-
s *=
|
|
4786
|
+
const v = Ti(b), I = b.getBoundingClientRect(), _ = Sa(b), N = I.left + (b.clientLeft + parseFloat(_.paddingLeft)) * v.x, R = I.top + (b.clientTop + parseFloat(_.paddingTop)) * v.y;
|
|
4787
|
+
s *= v.x, f *= v.y, u *= v.x, c *= v.y, s += N, f += R, g = Je(b), b = o1(g);
|
|
4788
4788
|
}
|
|
4789
4789
|
}
|
|
4790
4790
|
return as({
|
|
@@ -5041,8 +5041,8 @@ function R7(r, e) {
|
|
|
5041
5041
|
} = f;
|
|
5042
5042
|
if (A || e(), !h || !d)
|
|
5043
5043
|
return;
|
|
5044
|
-
const g = pA(c), b = pA(n.clientWidth - (u + h)),
|
|
5045
|
-
rootMargin: -g + "px " + -b + "px " + -
|
|
5044
|
+
const g = pA(c), b = pA(n.clientWidth - (u + h)), v = pA(n.clientHeight - (c + d)), I = pA(u), N = {
|
|
5045
|
+
rootMargin: -g + "px " + -b + "px " + -v + "px " + -I + "px",
|
|
5046
5046
|
threshold: Ye(0, ln(1, s)) || 1
|
|
5047
5047
|
};
|
|
5048
5048
|
let R = !0;
|
|
@@ -5094,10 +5094,10 @@ function Z7(r, e, a, t) {
|
|
|
5094
5094
|
})), a();
|
|
5095
5095
|
}), f && !s && d.observe(f), d.observe(e));
|
|
5096
5096
|
let g, b = s ? ri(r) : null;
|
|
5097
|
-
s &&
|
|
5098
|
-
function
|
|
5097
|
+
s && v();
|
|
5098
|
+
function v() {
|
|
5099
5099
|
const I = ri(r);
|
|
5100
|
-
b && !$8(b, I) && a(), b = I, g = requestAnimationFrame(
|
|
5100
|
+
b && !$8(b, I) && a(), b = I, g = requestAnimationFrame(v);
|
|
5101
5101
|
}
|
|
5102
5102
|
return a(), () => {
|
|
5103
5103
|
var I;
|
|
@@ -5187,19 +5187,19 @@ function M7(r) {
|
|
|
5187
5187
|
isPositioned: !1
|
|
5188
5188
|
}), [h, d] = p.useState(t);
|
|
5189
5189
|
ts(h, t) || d(t);
|
|
5190
|
-
const [g, b] = p.useState(null), [
|
|
5191
|
-
|
|
5192
|
-
}, []), N = p.useCallback((
|
|
5193
|
-
|
|
5194
|
-
}, []), R = i || g, C = o ||
|
|
5190
|
+
const [g, b] = p.useState(null), [v, I] = p.useState(null), _ = p.useCallback((m) => {
|
|
5191
|
+
m !== P.current && (P.current = m, b(m));
|
|
5192
|
+
}, []), N = p.useCallback((m) => {
|
|
5193
|
+
m !== V.current && (V.current = m, I(m));
|
|
5194
|
+
}, []), R = i || g, C = o || v, P = p.useRef(null), V = p.useRef(null), q = p.useRef(u), tr = s != null, X = au(s), er = au(n), Y = au(f), ar = p.useCallback(() => {
|
|
5195
5195
|
if (!P.current || !V.current)
|
|
5196
5196
|
return;
|
|
5197
|
-
const
|
|
5197
|
+
const m = {
|
|
5198
5198
|
placement: e,
|
|
5199
5199
|
strategy: a,
|
|
5200
5200
|
middleware: h
|
|
5201
5201
|
};
|
|
5202
|
-
er.current && (
|
|
5202
|
+
er.current && (m.platform = er.current), O7(P.current, V.current, m).then((w) => {
|
|
5203
5203
|
const y = {
|
|
5204
5204
|
...w,
|
|
5205
5205
|
// The floating element's position may be recomputed while it's closed
|
|
@@ -5208,14 +5208,14 @@ function M7(r) {
|
|
|
5208
5208
|
// setting it to `true` when `open === false` (must be specified).
|
|
5209
5209
|
isPositioned: Y.current !== !1
|
|
5210
5210
|
};
|
|
5211
|
-
$.current && !ts(
|
|
5211
|
+
$.current && !ts(q.current, y) && (q.current = y, Ho.flushSync(() => {
|
|
5212
5212
|
c(y);
|
|
5213
5213
|
}));
|
|
5214
5214
|
});
|
|
5215
5215
|
}, [h, e, a, er, Y]);
|
|
5216
5216
|
PA(() => {
|
|
5217
|
-
f === !1 &&
|
|
5218
|
-
...
|
|
5217
|
+
f === !1 && q.current.isPositioned && (q.current.isPositioned = !1, c((m) => ({
|
|
5218
|
+
...m,
|
|
5219
5219
|
isPositioned: !1
|
|
5220
5220
|
})));
|
|
5221
5221
|
}, [f]);
|
|
@@ -5238,16 +5238,16 @@ function M7(r) {
|
|
|
5238
5238
|
reference: R,
|
|
5239
5239
|
floating: C
|
|
5240
5240
|
}), [R, C]), O = p.useMemo(() => {
|
|
5241
|
-
const
|
|
5241
|
+
const m = {
|
|
5242
5242
|
position: a,
|
|
5243
5243
|
left: 0,
|
|
5244
5244
|
top: 0
|
|
5245
5245
|
};
|
|
5246
5246
|
if (!L.floating)
|
|
5247
|
-
return
|
|
5247
|
+
return m;
|
|
5248
5248
|
const w = x4(L.floating, u.x), y = x4(L.floating, u.y);
|
|
5249
5249
|
return A ? {
|
|
5250
|
-
...
|
|
5250
|
+
...m,
|
|
5251
5251
|
transform: "translate(" + w + "px, " + y + "px)",
|
|
5252
5252
|
...W8(L.floating) >= 1.5 && {
|
|
5253
5253
|
willChange: "transform"
|
|
@@ -5365,7 +5365,7 @@ var V8 = "PopperAnchor", M8 = p.forwardRef(
|
|
|
5365
5365
|
M8.displayName = V8;
|
|
5366
5366
|
var zl = "PopperContent", [rE, eE] = P8(zl), G8 = p.forwardRef(
|
|
5367
5367
|
(r, e) => {
|
|
5368
|
-
var F, U, K, H,
|
|
5368
|
+
var F, U, K, H, rr, T;
|
|
5369
5369
|
const {
|
|
5370
5370
|
__scopePopper: a,
|
|
5371
5371
|
side: t = "bottom",
|
|
@@ -5381,12 +5381,12 @@ var zl = "PopperContent", [rE, eE] = P8(zl), G8 = p.forwardRef(
|
|
|
5381
5381
|
updatePositionStrategy: d = "optimized",
|
|
5382
5382
|
onPlaced: g,
|
|
5383
5383
|
...b
|
|
5384
|
-
} = r,
|
|
5384
|
+
} = r, v = O8(zl, a), [I, _] = p.useState(null), N = k0(e, (nr) => _(nr)), [R, C] = p.useState(null), P = K7(R), V = (P == null ? void 0 : P.width) ?? 0, q = (P == null ? void 0 : P.height) ?? 0, tr = t + (i !== "center" ? "-" + i : ""), X = typeof u == "number" ? u : { top: 0, right: 0, bottom: 0, left: 0, ...u }, er = Array.isArray(f) ? f : [f], Y = er.length > 0, ar = {
|
|
5385
5385
|
padding: X,
|
|
5386
5386
|
boundary: er.filter(tE),
|
|
5387
5387
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
5388
5388
|
altBoundary: Y
|
|
5389
|
-
}, { refs: $, floatingStyles: J, placement: L, isPositioned: O, middlewareData:
|
|
5389
|
+
}, { refs: $, floatingStyles: J, placement: L, isPositioned: O, middlewareData: m } = M7({
|
|
5390
5390
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
5391
5391
|
strategy: "fixed",
|
|
5392
5392
|
placement: tr,
|
|
@@ -5394,10 +5394,10 @@ var zl = "PopperContent", [rE, eE] = P8(zl), G8 = p.forwardRef(
|
|
|
5394
5394
|
animationFrame: d === "always"
|
|
5395
5395
|
}),
|
|
5396
5396
|
elements: {
|
|
5397
|
-
reference:
|
|
5397
|
+
reference: v.anchor
|
|
5398
5398
|
},
|
|
5399
5399
|
middleware: [
|
|
5400
|
-
X7({ mainAxis: n +
|
|
5400
|
+
X7({ mainAxis: n + q, alignmentAxis: o }),
|
|
5401
5401
|
s && j7({
|
|
5402
5402
|
mainAxis: !0,
|
|
5403
5403
|
crossAxis: !1,
|
|
@@ -5413,14 +5413,14 @@ var zl = "PopperContent", [rE, eE] = P8(zl), G8 = p.forwardRef(
|
|
|
5413
5413
|
}
|
|
5414
5414
|
}),
|
|
5415
5415
|
R && Q7({ element: R, padding: A }),
|
|
5416
|
-
nE({ arrowWidth: V, arrowHeight:
|
|
5416
|
+
nE({ arrowWidth: V, arrowHeight: q }),
|
|
5417
5417
|
h && H7({ strategy: "referenceHidden", ...ar })
|
|
5418
5418
|
]
|
|
5419
5419
|
}), [w, y] = L8(L), k = Ra(g);
|
|
5420
5420
|
fe(() => {
|
|
5421
5421
|
O && (k == null || k());
|
|
5422
5422
|
}, [O, k]);
|
|
5423
|
-
const E = (F =
|
|
5423
|
+
const E = (F = m.arrow) == null ? void 0 : F.x, x = (U = m.arrow) == null ? void 0 : U.y, B = ((K = m.arrow) == null ? void 0 : K.centerOffset) !== 0, [Z, W] = p.useState();
|
|
5424
5424
|
return fe(() => {
|
|
5425
5425
|
I && W(window.getComputedStyle(I).zIndex);
|
|
5426
5426
|
}, [I]), /* @__PURE__ */ l(
|
|
@@ -5435,13 +5435,13 @@ var zl = "PopperContent", [rE, eE] = P8(zl), G8 = p.forwardRef(
|
|
|
5435
5435
|
minWidth: "max-content",
|
|
5436
5436
|
zIndex: Z,
|
|
5437
5437
|
"--radix-popper-transform-origin": [
|
|
5438
|
-
(H =
|
|
5439
|
-
(
|
|
5438
|
+
(H = m.transformOrigin) == null ? void 0 : H.x,
|
|
5439
|
+
(rr = m.transformOrigin) == null ? void 0 : rr.y
|
|
5440
5440
|
].join(" "),
|
|
5441
5441
|
// hide the content if using the hide middleware and should be hidden
|
|
5442
5442
|
// set visibility to hidden and disable pointer events so the UI behaves
|
|
5443
5443
|
// as if the PopperContent isn't there at all
|
|
5444
|
-
...((T =
|
|
5444
|
+
...((T = m.hide) == null ? void 0 : T.referenceHidden) && {
|
|
5445
5445
|
visibility: "hidden",
|
|
5446
5446
|
pointerEvents: "none"
|
|
5447
5447
|
}
|
|
@@ -5536,8 +5536,8 @@ var nE = (r) => ({
|
|
|
5536
5536
|
name: "transformOrigin",
|
|
5537
5537
|
options: r,
|
|
5538
5538
|
fn(e) {
|
|
5539
|
-
var
|
|
5540
|
-
const { placement: a, rects: t, middlewareData: n } = e, o = ((
|
|
5539
|
+
var v, I, _;
|
|
5540
|
+
const { placement: a, rects: t, middlewareData: n } = e, o = ((v = n.arrow) == null ? void 0 : v.centerOffset) !== 0, A = o ? 0 : r.arrowWidth, s = o ? 0 : r.arrowHeight, [f, u] = L8(a), c = { start: "0%", center: "50%", end: "100%" }[u], h = (((I = n.arrow) == null ? void 0 : I.x) ?? 0) + A / 2, d = (((_ = n.arrow) == null ? void 0 : _.y) ?? 0) + s / 2;
|
|
5541
5541
|
let g = "", b = "";
|
|
5542
5542
|
return f === "bottom" ? (g = o ? c : `${h}px`, b = `${-s}px`) : f === "top" ? (g = o ? c : `${h}px`, b = `${t.floating.height + s}px`) : f === "right" ? (g = `${-s}px`, b = o ? c : `${d}px`) : f === "left" && (g = `${t.floating.width + s}px`, b = o ? c : `${d}px`), { data: { x: g, y: b } };
|
|
5543
5543
|
}
|
|
@@ -5625,14 +5625,14 @@ var sE = "TooltipPortal", [GV, fE] = Gs(sE, {
|
|
|
5625
5625
|
A(null), c(!1);
|
|
5626
5626
|
}, [c]), d = p.useCallback(
|
|
5627
5627
|
(g, b) => {
|
|
5628
|
-
const
|
|
5628
|
+
const v = g.currentTarget, I = { x: g.clientX, y: g.clientY }, _ = bE(I, v.getBoundingClientRect()), N = mE(I, _), R = vE(b.getBoundingClientRect()), C = pE([...N, ...R]);
|
|
5629
5629
|
A(C), c(!0);
|
|
5630
5630
|
},
|
|
5631
5631
|
[c]
|
|
5632
5632
|
);
|
|
5633
5633
|
return p.useEffect(() => () => h(), [h]), p.useEffect(() => {
|
|
5634
5634
|
if (s && u) {
|
|
5635
|
-
const g = (
|
|
5635
|
+
const g = (v) => d(v, u), b = (v) => d(v, s);
|
|
5636
5636
|
return s.addEventListener("pointerleave", g), u.addEventListener("pointerleave", b), () => {
|
|
5637
5637
|
s.removeEventListener("pointerleave", g), u.removeEventListener("pointerleave", b);
|
|
5638
5638
|
};
|
|
@@ -5640,7 +5640,7 @@ var sE = "TooltipPortal", [GV, fE] = Gs(sE, {
|
|
|
5640
5640
|
}, [s, u, d, h]), p.useEffect(() => {
|
|
5641
5641
|
if (o) {
|
|
5642
5642
|
const g = (b) => {
|
|
5643
|
-
const
|
|
5643
|
+
const v = b.target, I = { x: b.clientX, y: b.clientY }, _ = (s == null ? void 0 : s.contains(v)) || (u == null ? void 0 : u.contains(v)), N = !gE(I, o);
|
|
5644
5644
|
_ ? h() : N && (h(), f());
|
|
5645
5645
|
};
|
|
5646
5646
|
return document.addEventListener("pointermove", g), () => document.removeEventListener("pointermove", g);
|
|
@@ -6202,10 +6202,10 @@ var h1 = class extends Error {
|
|
|
6202
6202
|
function n5(r) {
|
|
6203
6203
|
let e = !1, a = 0, t;
|
|
6204
6204
|
const n = d1(), i = () => n.status !== "pending", o = (b) => {
|
|
6205
|
-
var
|
|
6205
|
+
var v;
|
|
6206
6206
|
if (!i()) {
|
|
6207
6207
|
const I = new h1(b);
|
|
6208
|
-
h(I), (
|
|
6208
|
+
h(I), (v = r.onCancel) == null || v.call(r, I);
|
|
6209
6209
|
}
|
|
6210
6210
|
}, A = () => {
|
|
6211
6211
|
e = !0;
|
|
@@ -6216,10 +6216,10 @@ function n5(r) {
|
|
|
6216
6216
|
}, h = (b) => {
|
|
6217
6217
|
i() || (t == null || t(), n.reject(b));
|
|
6218
6218
|
}, d = () => new Promise((b) => {
|
|
6219
|
-
var
|
|
6219
|
+
var v;
|
|
6220
6220
|
t = (I) => {
|
|
6221
6221
|
(i() || f()) && b(I);
|
|
6222
|
-
}, (
|
|
6222
|
+
}, (v = r.onPause) == null || v.call(r);
|
|
6223
6223
|
}).then(() => {
|
|
6224
6224
|
var b;
|
|
6225
6225
|
t = void 0, i() || (b = r.onContinue) == null || b.call(r);
|
|
@@ -6227,9 +6227,9 @@ function n5(r) {
|
|
|
6227
6227
|
if (i())
|
|
6228
6228
|
return;
|
|
6229
6229
|
let b;
|
|
6230
|
-
const
|
|
6230
|
+
const v = a === 0 ? r.initialPromise : void 0;
|
|
6231
6231
|
try {
|
|
6232
|
-
b =
|
|
6232
|
+
b = v ?? r.fn();
|
|
6233
6233
|
} catch (I) {
|
|
6234
6234
|
b = Promise.reject(I);
|
|
6235
6235
|
}
|
|
@@ -6378,7 +6378,7 @@ var Mn, N6, i5 = (N6 = class {
|
|
|
6378
6378
|
this.state.isInvalidated || a0(this, _a, vt).call(this, { type: "invalidate" });
|
|
6379
6379
|
}
|
|
6380
6380
|
async fetch(e, a) {
|
|
6381
|
-
var s, f, u, c, h, d, g, b,
|
|
6381
|
+
var s, f, u, c, h, d, g, b, v, I, _, N;
|
|
6382
6382
|
if (this.state.fetchStatus !== "idle" && // If the promise in the retyer is already rejected, we have to definitely
|
|
6383
6383
|
// re-start the fetch; there is a chance that the query is still in a
|
|
6384
6384
|
// pending state when that happens
|
|
@@ -6473,8 +6473,8 @@ var Mn, N6, i5 = (N6 = class {
|
|
|
6473
6473
|
throw a0(this, _a, vt).call(this, {
|
|
6474
6474
|
type: "error",
|
|
6475
6475
|
error: R
|
|
6476
|
-
}), (I = (
|
|
6477
|
-
|
|
6476
|
+
}), (I = (v = D(this, sa).config).onError) == null || I.call(
|
|
6477
|
+
v,
|
|
6478
6478
|
R,
|
|
6479
6479
|
this
|
|
6480
6480
|
), (N = (_ = D(this, sa).config).onSettled) == null || N.call(
|
|
@@ -6704,15 +6704,15 @@ var Be, t0, jo, me, Ln, Qi, yt, qt, Lo, Ji, zi, Un, Yn, rn, Ki, m0, eo, b1, m1,
|
|
|
6704
6704
|
...o5(u.data, e.options)
|
|
6705
6705
|
}), a._optimisticResults === "isRestoring" && (c.fetchStatus = "idle");
|
|
6706
6706
|
}
|
|
6707
|
-
let { error: g, errorUpdatedAt: b, status:
|
|
6707
|
+
let { error: g, errorUpdatedAt: b, status: v } = c;
|
|
6708
6708
|
d = c.data;
|
|
6709
6709
|
let I = !1;
|
|
6710
|
-
if (a.placeholderData !== void 0 && d === void 0 &&
|
|
6710
|
+
if (a.placeholderData !== void 0 && d === void 0 && v === "pending") {
|
|
6711
6711
|
let X;
|
|
6712
6712
|
i != null && i.isPlaceholderData && a.placeholderData === (A == null ? void 0 : A.placeholderData) ? (X = i.data, I = !0) : X = typeof a.placeholderData == "function" ? a.placeholderData(
|
|
6713
6713
|
(tr = D(this, zi)) == null ? void 0 : tr.state.data,
|
|
6714
6714
|
D(this, zi)
|
|
6715
|
-
) : a.placeholderData, X !== void 0 && (
|
|
6715
|
+
) : a.placeholderData, X !== void 0 && (v = "success", d = c1(
|
|
6716
6716
|
i == null ? void 0 : i.data,
|
|
6717
6717
|
X,
|
|
6718
6718
|
a
|
|
@@ -6727,12 +6727,12 @@ var Be, t0, jo, me, Ln, Qi, yt, qt, Lo, Ji, zi, Un, Yn, rn, Ki, m0, eo, b1, m1,
|
|
|
6727
6727
|
} catch (X) {
|
|
6728
6728
|
br(this, qt, X);
|
|
6729
6729
|
}
|
|
6730
|
-
D(this, qt) && (g = D(this, qt), d = D(this, Ji), b = Date.now(),
|
|
6731
|
-
const _ = c.fetchStatus === "fetching", N =
|
|
6732
|
-
status:
|
|
6730
|
+
D(this, qt) && (g = D(this, qt), d = D(this, Ji), b = Date.now(), v = "error");
|
|
6731
|
+
const _ = c.fetchStatus === "fetching", N = v === "pending", R = v === "error", C = N && _, P = d !== void 0, q = {
|
|
6732
|
+
status: v,
|
|
6733
6733
|
fetchStatus: c.fetchStatus,
|
|
6734
6734
|
isPending: N,
|
|
6735
|
-
isSuccess:
|
|
6735
|
+
isSuccess: v === "success",
|
|
6736
6736
|
isError: R,
|
|
6737
6737
|
isInitialLoading: C,
|
|
6738
6738
|
isLoading: C,
|
|
@@ -6758,9 +6758,9 @@ var Be, t0, jo, me, Ln, Qi, yt, qt, Lo, Ji, zi, Un, Yn, rn, Ki, m0, eo, b1, m1,
|
|
|
6758
6758
|
};
|
|
6759
6759
|
if (this.options.experimental_prefetchInRender) {
|
|
6760
6760
|
const X = (ar) => {
|
|
6761
|
-
|
|
6761
|
+
q.status === "error" ? ar.reject(q.error) : q.data !== void 0 && ar.resolve(q.data);
|
|
6762
6762
|
}, er = () => {
|
|
6763
|
-
const ar = br(this, yt,
|
|
6763
|
+
const ar = br(this, yt, q.promise = d1());
|
|
6764
6764
|
X(ar);
|
|
6765
6765
|
}, Y = D(this, yt);
|
|
6766
6766
|
switch (Y.status) {
|
|
@@ -6768,14 +6768,14 @@ var Be, t0, jo, me, Ln, Qi, yt, qt, Lo, Ji, zi, Un, Yn, rn, Ki, m0, eo, b1, m1,
|
|
|
6768
6768
|
e.queryHash === t.queryHash && X(Y);
|
|
6769
6769
|
break;
|
|
6770
6770
|
case "fulfilled":
|
|
6771
|
-
(
|
|
6771
|
+
(q.status === "error" || q.data !== Y.value) && er();
|
|
6772
6772
|
break;
|
|
6773
6773
|
case "rejected":
|
|
6774
|
-
(
|
|
6774
|
+
(q.status !== "error" || q.error !== Y.reason) && er();
|
|
6775
6775
|
break;
|
|
6776
6776
|
}
|
|
6777
6777
|
}
|
|
6778
|
-
return
|
|
6778
|
+
return q;
|
|
6779
6779
|
}
|
|
6780
6780
|
updateResult() {
|
|
6781
6781
|
const e = D(this, me), a = this.createResult(D(this, t0), this.options);
|
|
@@ -6878,7 +6878,7 @@ function O4(r) {
|
|
|
6878
6878
|
let A = { pages: [], pageParams: [] }, s = 0;
|
|
6879
6879
|
const f = async () => {
|
|
6880
6880
|
let b = !1;
|
|
6881
|
-
const
|
|
6881
|
+
const v = (N) => {
|
|
6882
6882
|
Object.defineProperty(N, "signal", {
|
|
6883
6883
|
enumerable: !0,
|
|
6884
6884
|
get: () => (e.signal.aborted ? b = !0 : e.signal.addEventListener("abort", () => {
|
|
@@ -6898,10 +6898,10 @@ function O4(r) {
|
|
|
6898
6898
|
direction: C ? "backward" : "forward",
|
|
6899
6899
|
meta: e.options.meta
|
|
6900
6900
|
};
|
|
6901
|
-
return
|
|
6902
|
-
})(),
|
|
6901
|
+
return v(er), er;
|
|
6902
|
+
})(), q = await I(V), { maxPages: tr } = e.options, X = C ? ZE : RE;
|
|
6903
6903
|
return {
|
|
6904
|
-
pages: X(N.pages,
|
|
6904
|
+
pages: X(N.pages, q, tr),
|
|
6905
6905
|
pageParams: X(N.pageParams, R, tr)
|
|
6906
6906
|
};
|
|
6907
6907
|
};
|
|
@@ -6923,8 +6923,8 @@ function O4(r) {
|
|
|
6923
6923
|
return A;
|
|
6924
6924
|
};
|
|
6925
6925
|
e.options.persister ? e.fetchFn = () => {
|
|
6926
|
-
var b,
|
|
6927
|
-
return (
|
|
6926
|
+
var b, v;
|
|
6927
|
+
return (v = (b = e.options).persister) == null ? void 0 : v.call(
|
|
6928
6928
|
b,
|
|
6929
6929
|
f,
|
|
6930
6930
|
{
|
|
@@ -6991,7 +6991,7 @@ var Uo, Ja, ve, Hn, za, jt, Z6, XE = (Z6 = class extends i5 {
|
|
|
6991
6991
|
this.execute(this.state.variables);
|
|
6992
6992
|
}
|
|
6993
6993
|
async execute(e) {
|
|
6994
|
-
var o, A, s, f, u, c, h, d, g, b,
|
|
6994
|
+
var o, A, s, f, u, c, h, d, g, b, v, I, _, N, R, C, P, V, q, tr;
|
|
6995
6995
|
const a = () => {
|
|
6996
6996
|
a0(this, za, jt).call(this, { type: "continue" });
|
|
6997
6997
|
}, t = {
|
|
@@ -7058,8 +7058,8 @@ var Uo, Ja, ve, Hn, za, jt, Z6, XE = (Z6 = class extends i5 {
|
|
|
7058
7058
|
this.state.context,
|
|
7059
7059
|
this,
|
|
7060
7060
|
t
|
|
7061
|
-
)), await ((I = (
|
|
7062
|
-
|
|
7061
|
+
)), await ((I = (v = this.options).onSettled) == null ? void 0 : I.call(
|
|
7062
|
+
v,
|
|
7063
7063
|
X,
|
|
7064
7064
|
null,
|
|
7065
7065
|
e,
|
|
@@ -7089,8 +7089,8 @@ var Uo, Ja, ve, Hn, za, jt, Z6, XE = (Z6 = class extends i5 {
|
|
|
7089
7089
|
this.state.context,
|
|
7090
7090
|
this,
|
|
7091
7091
|
t
|
|
7092
|
-
)), await ((tr = (
|
|
7093
|
-
|
|
7092
|
+
)), await ((tr = (q = this.options).onSettled) == null ? void 0 : tr.call(
|
|
7093
|
+
q,
|
|
7094
7094
|
void 0,
|
|
7095
7095
|
X,
|
|
7096
7096
|
e,
|
|
@@ -7628,8 +7628,8 @@ function oC(r, e, a) {
|
|
|
7628
7628
|
), f = s.getOptimisticResult(o), u = !t && r.subscribed !== !1;
|
|
7629
7629
|
if (p.useSyncExternalStore(
|
|
7630
7630
|
p.useCallback(
|
|
7631
|
-
(
|
|
7632
|
-
const I = u ? s.subscribe(se.batchCalls(
|
|
7631
|
+
(v) => {
|
|
7632
|
+
const I = u ? s.subscribe(se.batchCalls(v)) : Re;
|
|
7633
7633
|
return s.updateResult(), I;
|
|
7634
7634
|
},
|
|
7635
7635
|
[s, u]
|
|
@@ -7653,14 +7653,14 @@ function oC(r, e, a) {
|
|
|
7653
7653
|
o,
|
|
7654
7654
|
f
|
|
7655
7655
|
), o.experimental_prefetchInRender && !ei && nC(f, t)) {
|
|
7656
|
-
const
|
|
7656
|
+
const v = A ? (
|
|
7657
7657
|
// Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
|
|
7658
7658
|
V4(o, s, n)
|
|
7659
7659
|
) : (
|
|
7660
7660
|
// subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
|
|
7661
7661
|
(b = i.getQueryCache().get(o.queryHash)) == null ? void 0 : b.promise
|
|
7662
7662
|
);
|
|
7663
|
-
|
|
7663
|
+
v == null || v.catch(Re).finally(() => {
|
|
7664
7664
|
s.updateResult();
|
|
7665
7665
|
});
|
|
7666
7666
|
}
|
|
@@ -7984,8 +7984,8 @@ function Ys(r, e, a) {
|
|
|
7984
7984
|
metaTokens: !0,
|
|
7985
7985
|
dots: !1,
|
|
7986
7986
|
indexes: !1
|
|
7987
|
-
}, !1, function(b,
|
|
7988
|
-
return !z.isUndefined(
|
|
7987
|
+
}, !1, function(b, v) {
|
|
7988
|
+
return !z.isUndefined(v[b]);
|
|
7989
7989
|
});
|
|
7990
7990
|
const t = a.metaTokens, n = a.visitor || u, i = a.dots, o = a.indexes, s = (a.Blob || typeof Blob < "u" && Blob) && z.isSpecCompliantForm(e);
|
|
7991
7991
|
if (!z.isFunction(n))
|
|
@@ -8000,9 +8000,9 @@ function Ys(r, e, a) {
|
|
|
8000
8000
|
throw new Lr("Blob is not supported. Use a Buffer instead.");
|
|
8001
8001
|
return z.isArrayBuffer(g) || z.isTypedArray(g) ? s && typeof Blob == "function" ? new Blob([g]) : Buffer.from(g) : g;
|
|
8002
8002
|
}
|
|
8003
|
-
function u(g, b,
|
|
8003
|
+
function u(g, b, v) {
|
|
8004
8004
|
let I = g;
|
|
8005
|
-
if (g && !
|
|
8005
|
+
if (g && !v && typeof g == "object") {
|
|
8006
8006
|
if (z.endsWith(b, "{}"))
|
|
8007
8007
|
b = t ? b : b.slice(0, -2), g = JSON.stringify(g);
|
|
8008
8008
|
else if (z.isArray(g) && YC(g) || (z.isFileList(g) || z.endsWith(b, "[]")) && (I = z.toArray(g)))
|
|
@@ -8014,7 +8014,7 @@ function Ys(r, e, a) {
|
|
|
8014
8014
|
);
|
|
8015
8015
|
}), !1;
|
|
8016
8016
|
}
|
|
8017
|
-
return C1(g) ? !0 : (e.append(G4(
|
|
8017
|
+
return C1(g) ? !0 : (e.append(G4(v, b, i), f(g)), !1);
|
|
8018
8018
|
}
|
|
8019
8019
|
const c = [], h = Object.assign(HC, {
|
|
8020
8020
|
defaultVisitor: u,
|
|
@@ -8701,54 +8701,54 @@ const x5 = (r) => {
|
|
|
8701
8701
|
function b() {
|
|
8702
8702
|
d && d(), g && g(), n.cancelToken && n.cancelToken.unsubscribe(u), n.signal && n.signal.removeEventListener("abort", u);
|
|
8703
8703
|
}
|
|
8704
|
-
let
|
|
8705
|
-
|
|
8704
|
+
let v = new XMLHttpRequest();
|
|
8705
|
+
v.open(n.method.toUpperCase(), n.url, !0), v.timeout = n.timeout;
|
|
8706
8706
|
function I() {
|
|
8707
|
-
if (!
|
|
8707
|
+
if (!v)
|
|
8708
8708
|
return;
|
|
8709
8709
|
const N = $e.from(
|
|
8710
|
-
"getAllResponseHeaders" in
|
|
8710
|
+
"getAllResponseHeaders" in v && v.getAllResponseHeaders()
|
|
8711
8711
|
), C = {
|
|
8712
|
-
data: !A || A === "text" || A === "json" ?
|
|
8713
|
-
status:
|
|
8714
|
-
statusText:
|
|
8712
|
+
data: !A || A === "text" || A === "json" ? v.responseText : v.response,
|
|
8713
|
+
status: v.status,
|
|
8714
|
+
statusText: v.statusText,
|
|
8715
8715
|
headers: N,
|
|
8716
8716
|
config: r,
|
|
8717
|
-
request:
|
|
8717
|
+
request: v
|
|
8718
8718
|
};
|
|
8719
8719
|
B5(function(V) {
|
|
8720
8720
|
a(V), b();
|
|
8721
8721
|
}, function(V) {
|
|
8722
8722
|
t(V), b();
|
|
8723
|
-
}, C),
|
|
8724
|
-
}
|
|
8725
|
-
"onloadend" in
|
|
8726
|
-
!
|
|
8727
|
-
},
|
|
8728
|
-
|
|
8729
|
-
},
|
|
8730
|
-
const C = R && R.message ? R.message : "Network Error", P = new Lr(C, Lr.ERR_NETWORK, r,
|
|
8731
|
-
P.event = R || null, t(P),
|
|
8732
|
-
},
|
|
8723
|
+
}, C), v = null;
|
|
8724
|
+
}
|
|
8725
|
+
"onloadend" in v ? v.onloadend = I : v.onreadystatechange = function() {
|
|
8726
|
+
!v || v.readyState !== 4 || v.status === 0 && !(v.responseURL && v.responseURL.indexOf("file:") === 0) || setTimeout(I);
|
|
8727
|
+
}, v.onabort = function() {
|
|
8728
|
+
v && (t(new Lr("Request aborted", Lr.ECONNABORTED, r, v)), v = null);
|
|
8729
|
+
}, v.onerror = function(R) {
|
|
8730
|
+
const C = R && R.message ? R.message : "Network Error", P = new Lr(C, Lr.ERR_NETWORK, r, v);
|
|
8731
|
+
P.event = R || null, t(P), v = null;
|
|
8732
|
+
}, v.ontimeout = function() {
|
|
8733
8733
|
let R = n.timeout ? "timeout of " + n.timeout + "ms exceeded" : "timeout exceeded";
|
|
8734
8734
|
const C = n.transitional || C5;
|
|
8735
8735
|
n.timeoutErrorMessage && (R = n.timeoutErrorMessage), t(new Lr(
|
|
8736
8736
|
R,
|
|
8737
8737
|
C.clarifyTimeoutError ? Lr.ETIMEDOUT : Lr.ECONNABORTED,
|
|
8738
8738
|
r,
|
|
8739
|
-
|
|
8740
|
-
)),
|
|
8741
|
-
}, i === void 0 && o.setContentType(null), "setRequestHeader" in
|
|
8742
|
-
|
|
8743
|
-
}), z.isUndefined(n.withCredentials) || (
|
|
8744
|
-
|
|
8739
|
+
v
|
|
8740
|
+
)), v = null;
|
|
8741
|
+
}, i === void 0 && o.setContentType(null), "setRequestHeader" in v && z.forEach(o.toJSON(), function(R, C) {
|
|
8742
|
+
v.setRequestHeader(C, R);
|
|
8743
|
+
}), z.isUndefined(n.withCredentials) || (v.withCredentials = !!n.withCredentials), A && A !== "json" && (v.responseType = n.responseType), f && ([h, g] = os(f, !0), v.addEventListener("progress", h)), s && v.upload && ([c, d] = os(s), v.upload.addEventListener("progress", c), v.upload.addEventListener("loadend", d)), (n.cancelToken || n.signal) && (u = (N) => {
|
|
8744
|
+
v && (t(!N || N.type ? new F2(null, r, v) : N), v.abort(), v = null);
|
|
8745
8745
|
}, n.cancelToken && n.cancelToken.subscribe(u), n.signal && (n.signal.aborted ? u() : n.signal.addEventListener("abort", u)));
|
|
8746
8746
|
const _ = h_(n.url);
|
|
8747
8747
|
if (_ && de.protocols.indexOf(_) === -1) {
|
|
8748
8748
|
t(new Lr("Unsupported protocol " + _ + ":", Lr.ERR_BAD_REQUEST, r));
|
|
8749
8749
|
return;
|
|
8750
8750
|
}
|
|
8751
|
-
|
|
8751
|
+
v.send(i || null);
|
|
8752
8752
|
});
|
|
8753
8753
|
}, E_ = (r, e) => {
|
|
8754
8754
|
const { length: a } = r = r ? r.filter(Boolean) : [];
|
|
@@ -8863,11 +8863,11 @@ const x5 = (r) => {
|
|
|
8863
8863
|
stream: u && ((g) => g.body)
|
|
8864
8864
|
};
|
|
8865
8865
|
n && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((g) => {
|
|
8866
|
-
!c[g] && (c[g] = (b,
|
|
8866
|
+
!c[g] && (c[g] = (b, v) => {
|
|
8867
8867
|
let I = b && b[g];
|
|
8868
8868
|
if (I)
|
|
8869
8869
|
return I.call(b);
|
|
8870
|
-
throw new Lr(`Response type '${g}' is not supported`, Lr.ERR_NOT_SUPPORT,
|
|
8870
|
+
throw new Lr(`Response type '${g}' is not supported`, Lr.ERR_NOT_SUPPORT, v);
|
|
8871
8871
|
});
|
|
8872
8872
|
});
|
|
8873
8873
|
const h = async (g) => {
|
|
@@ -8885,13 +8885,13 @@ const x5 = (r) => {
|
|
|
8885
8885
|
if (z.isURLSearchParams(g) && (g = g + ""), z.isString(g))
|
|
8886
8886
|
return (await s(g)).byteLength;
|
|
8887
8887
|
}, d = async (g, b) => {
|
|
8888
|
-
const
|
|
8889
|
-
return
|
|
8888
|
+
const v = z.toFiniteNumber(g.getContentLength());
|
|
8889
|
+
return v ?? h(b);
|
|
8890
8890
|
};
|
|
8891
8891
|
return async (g) => {
|
|
8892
8892
|
let {
|
|
8893
8893
|
url: b,
|
|
8894
|
-
method:
|
|
8894
|
+
method: v,
|
|
8895
8895
|
data: I,
|
|
8896
8896
|
signal: _,
|
|
8897
8897
|
cancelToken: N,
|
|
@@ -8899,7 +8899,7 @@ const x5 = (r) => {
|
|
|
8899
8899
|
onDownloadProgress: C,
|
|
8900
8900
|
onUploadProgress: P,
|
|
8901
8901
|
responseType: V,
|
|
8902
|
-
headers:
|
|
8902
|
+
headers: q,
|
|
8903
8903
|
withCredentials: tr = "same-origin",
|
|
8904
8904
|
fetchOptions: X
|
|
8905
8905
|
} = x5(g), er = e || fetch;
|
|
@@ -8910,13 +8910,13 @@ const x5 = (r) => {
|
|
|
8910
8910
|
});
|
|
8911
8911
|
let J;
|
|
8912
8912
|
try {
|
|
8913
|
-
if (P && f &&
|
|
8913
|
+
if (P && f && v !== "get" && v !== "head" && (J = await d(q, I)) !== 0) {
|
|
8914
8914
|
let k = new a(b, {
|
|
8915
8915
|
method: "POST",
|
|
8916
8916
|
body: I,
|
|
8917
8917
|
duplex: "half"
|
|
8918
8918
|
}), E;
|
|
8919
|
-
if (z.isFormData(I) && (E = k.headers.get("content-type")) &&
|
|
8919
|
+
if (z.isFormData(I) && (E = k.headers.get("content-type")) && q.setContentType(E), k.body) {
|
|
8920
8920
|
const [x, B] = U4(
|
|
8921
8921
|
J,
|
|
8922
8922
|
os(Y4(P))
|
|
@@ -8928,39 +8928,39 @@ const x5 = (r) => {
|
|
|
8928
8928
|
const L = i && "credentials" in a.prototype, O = {
|
|
8929
8929
|
...X,
|
|
8930
8930
|
signal: Y,
|
|
8931
|
-
method:
|
|
8932
|
-
headers:
|
|
8931
|
+
method: v.toUpperCase(),
|
|
8932
|
+
headers: q.normalize().toJSON(),
|
|
8933
8933
|
body: I,
|
|
8934
8934
|
duplex: "half",
|
|
8935
8935
|
credentials: L ? tr : void 0
|
|
8936
8936
|
};
|
|
8937
8937
|
ar = i && new a(b, O);
|
|
8938
|
-
let
|
|
8938
|
+
let m = await (i ? er(ar, X) : er(b, O));
|
|
8939
8939
|
const w = u && (V === "stream" || V === "response");
|
|
8940
8940
|
if (u && (C || w && $)) {
|
|
8941
8941
|
const k = {};
|
|
8942
8942
|
["status", "statusText", "headers"].forEach((Z) => {
|
|
8943
|
-
k[Z] =
|
|
8943
|
+
k[Z] = m[Z];
|
|
8944
8944
|
});
|
|
8945
|
-
const E = z.toFiniteNumber(
|
|
8945
|
+
const E = z.toFiniteNumber(m.headers.get("content-length")), [x, B] = C && U4(
|
|
8946
8946
|
E,
|
|
8947
8947
|
os(Y4(C), !0)
|
|
8948
8948
|
) || [];
|
|
8949
|
-
|
|
8950
|
-
Q4(
|
|
8949
|
+
m = new t(
|
|
8950
|
+
Q4(m.body, J4, x, () => {
|
|
8951
8951
|
B && B(), $ && $();
|
|
8952
8952
|
}),
|
|
8953
8953
|
k
|
|
8954
8954
|
);
|
|
8955
8955
|
}
|
|
8956
8956
|
V = V || "text";
|
|
8957
|
-
let y = await c[z.findKey(c, V) || "text"](
|
|
8957
|
+
let y = await c[z.findKey(c, V) || "text"](m, g);
|
|
8958
8958
|
return !w && $ && $(), await new Promise((k, E) => {
|
|
8959
8959
|
B5(k, E, {
|
|
8960
8960
|
data: y,
|
|
8961
|
-
headers: $e.from(
|
|
8962
|
-
status:
|
|
8963
|
-
statusText:
|
|
8961
|
+
headers: $e.from(m.headers),
|
|
8962
|
+
status: m.status,
|
|
8963
|
+
statusText: m.statusText,
|
|
8964
8964
|
config: g,
|
|
8965
8965
|
request: ar
|
|
8966
8966
|
});
|
|
@@ -9195,8 +9195,8 @@ let Qn = class {
|
|
|
9195
9195
|
const g = A[c++], b = A[c++];
|
|
9196
9196
|
try {
|
|
9197
9197
|
d = g(d);
|
|
9198
|
-
} catch (
|
|
9199
|
-
b.call(this,
|
|
9198
|
+
} catch (v) {
|
|
9199
|
+
b.call(this, v);
|
|
9200
9200
|
break;
|
|
9201
9201
|
}
|
|
9202
9202
|
}
|
|
@@ -9705,8 +9705,8 @@ function X_(r) {
|
|
|
9705
9705
|
if (!i) {
|
|
9706
9706
|
const b = M5(t, a._names, g.values || a._formValues, !1, s.current);
|
|
9707
9707
|
if (f.current) {
|
|
9708
|
-
const
|
|
9709
|
-
kt(
|
|
9708
|
+
const v = f.current(b);
|
|
9709
|
+
kt(v, u.current) || (d(v), u.current = v);
|
|
9710
9710
|
} else
|
|
9711
9711
|
d(b);
|
|
9712
9712
|
}
|
|
@@ -9756,7 +9756,7 @@ function G5(r) {
|
|
|
9756
9756
|
name: a
|
|
9757
9757
|
},
|
|
9758
9758
|
type: As.CHANGE
|
|
9759
|
-
}), [a]),
|
|
9759
|
+
}), [a]), v = j.useCallback(() => d.current.onBlur({
|
|
9760
9760
|
target: {
|
|
9761
9761
|
value: hr(n._formValues, a),
|
|
9762
9762
|
name: a
|
|
@@ -9775,9 +9775,9 @@ function G5(r) {
|
|
|
9775
9775
|
value: f,
|
|
9776
9776
|
...Ue(t) || u.disabled ? { disabled: u.disabled || t } : {},
|
|
9777
9777
|
onChange: b,
|
|
9778
|
-
onBlur:
|
|
9778
|
+
onBlur: v,
|
|
9779
9779
|
ref: I
|
|
9780
|
-
}), [a, t, u.disabled, b,
|
|
9780
|
+
}), [a, t, u.disabled, b, v, I, f]);
|
|
9781
9781
|
return j.useEffect(() => {
|
|
9782
9782
|
const N = n._options.shouldUnregister || i, R = h.current;
|
|
9783
9783
|
R && R !== a && !A && n.unregister(R), n.register(a, {
|
|
@@ -9785,8 +9785,8 @@ function G5(r) {
|
|
|
9785
9785
|
...Ue(c.current.disabled) ? { disabled: c.current.disabled } : {}
|
|
9786
9786
|
});
|
|
9787
9787
|
const C = (P, V) => {
|
|
9788
|
-
const
|
|
9789
|
-
|
|
9788
|
+
const q = hr(n._fields, P);
|
|
9789
|
+
q && q._f && (q._f.mount = V);
|
|
9790
9790
|
};
|
|
9791
9791
|
if (C(a, !0), N) {
|
|
9792
9792
|
const P = q0(hr(n._options.defaultValues, a));
|
|
@@ -10003,12 +10003,12 @@ var yi = (r) => Q0(r) && !fs(r) ? r : {
|
|
|
10003
10003
|
value: r,
|
|
10004
10004
|
message: ""
|
|
10005
10005
|
}, dh = async (r, e, a, t, n, i) => {
|
|
10006
|
-
const { ref: o, refs: A, required: s, maxLength: f, minLength: u, min: c, max: h, pattern: d, validate: g, name: b, valueAsNumber:
|
|
10006
|
+
const { ref: o, refs: A, required: s, maxLength: f, minLength: u, min: c, max: h, pattern: d, validate: g, name: b, valueAsNumber: v, mount: I } = r._f, _ = hr(a, b);
|
|
10007
10007
|
if (!I || e.has(b))
|
|
10008
10008
|
return {};
|
|
10009
10009
|
const N = A ? A[0] : o, R = (Y) => {
|
|
10010
10010
|
n && N.reportValidity && (N.setCustomValidity(Ue(Y) ? "" : Y || ""), N.reportValidity());
|
|
10011
|
-
}, C = {}, P = bc(o), V = nA(o),
|
|
10011
|
+
}, C = {}, P = bc(o), V = nA(o), q = P || V, tr = (v || hc(o)) && V0(o.value) && V0(_) || ss(o) && o.value === "" || _ === "" || Array.isArray(_) && !_.length, X = X5.bind(null, b, t, C), er = (Y, ar, $, J = bt.maxLength, L = bt.minLength) => {
|
|
10012
10012
|
const O = Y ? ar : $;
|
|
10013
10013
|
C[b] = {
|
|
10014
10014
|
type: Y ? J : L,
|
|
@@ -10017,7 +10017,7 @@ var yi = (r) => Q0(r) && !fs(r) ? r : {
|
|
|
10017
10017
|
...X(Y ? J : L, O)
|
|
10018
10018
|
};
|
|
10019
10019
|
};
|
|
10020
|
-
if (i ? !Array.isArray(_) || !_.length : s && (!
|
|
10020
|
+
if (i ? !Array.isArray(_) || !_.length : s && (!q && (tr || ge(_)) || Ue(_) && !_ || V && !Y5(A).isValid || P && !Q5(A).isValid)) {
|
|
10021
10021
|
const { value: Y, message: ar } = He(s) ? { value: !!s, message: s } : yi(s);
|
|
10022
10022
|
if (Y && (C[b] = {
|
|
10023
10023
|
type: bt.required,
|
|
@@ -10034,8 +10034,8 @@ var yi = (r) => Q0(r) && !fs(r) ? r : {
|
|
|
10034
10034
|
const L = o.valueAsNumber || _ && +_;
|
|
10035
10035
|
ge($.value) || (Y = L > $.value), ge(J.value) || (ar = L < J.value);
|
|
10036
10036
|
} else {
|
|
10037
|
-
const L = o.valueAsDate || new Date(_), O = (y) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + y),
|
|
10038
|
-
He($.value) && _ && (Y =
|
|
10037
|
+
const L = o.valueAsDate || new Date(_), O = (y) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + y), m = o.type == "time", w = o.type == "week";
|
|
10038
|
+
He($.value) && _ && (Y = m ? O(_) > O($.value) : w ? _ > $.value : L > new Date($.value)), He(J.value) && _ && (ar = m ? O(_) < O(J.value) : w ? _ < J.value : L < new Date(J.value));
|
|
10039
10039
|
}
|
|
10040
10040
|
if ((Y || ar) && (er(!!Y, $.message, J.message, bt.max, bt.min), !t))
|
|
10041
10041
|
return R(C[b].message), C;
|
|
@@ -10142,7 +10142,7 @@ function nI(r = {}) {
|
|
|
10142
10142
|
isValid: G
|
|
10143
10143
|
});
|
|
10144
10144
|
}
|
|
10145
|
-
},
|
|
10145
|
+
}, v = (S, G) => {
|
|
10146
10146
|
!e.disabled && (u.isValidating || u.validatingFields || c.isValidating || c.validatingFields) && ((S || Array.from(A.mount)).forEach((Q) => {
|
|
10147
10147
|
Q && (G ? v0(a.validatingFields, Q, G) : j0(a.validatingFields, Q));
|
|
10148
10148
|
}), h.state.next({
|
|
@@ -10220,10 +10220,10 @@ function nI(r = {}) {
|
|
|
10220
10220
|
}, h.state.next(lr);
|
|
10221
10221
|
}
|
|
10222
10222
|
}, V = async (S) => {
|
|
10223
|
-
|
|
10223
|
+
v(S, !0);
|
|
10224
10224
|
const G = await e.resolver(i, e.context, Q_(S || A.mount, t, e.criteriaMode, e.shouldUseNativeValidation));
|
|
10225
|
-
return
|
|
10226
|
-
},
|
|
10225
|
+
return v(S), G;
|
|
10226
|
+
}, q = async (S) => {
|
|
10227
10227
|
const { errors: G } = await V(S);
|
|
10228
10228
|
if (S)
|
|
10229
10229
|
for (const Q of S) {
|
|
@@ -10242,9 +10242,9 @@ function nI(r = {}) {
|
|
|
10242
10242
|
const { _f: ir, ...lr } = Ar;
|
|
10243
10243
|
if (ir) {
|
|
10244
10244
|
const Tr = A.array.has(ir.name), zr = Ar._f && J_(Ar._f);
|
|
10245
|
-
zr && u.validatingFields &&
|
|
10245
|
+
zr && u.validatingFields && v([ir.name], !0);
|
|
10246
10246
|
const S0 = await dh(Ar, A.disabled, i, d, e.shouldUseNativeValidation && !G, Tr);
|
|
10247
|
-
if (zr && u.validatingFields &&
|
|
10247
|
+
if (zr && u.validatingFields && v([ir.name]), S0[ir.name] && (Q.valid = !1, G))
|
|
10248
10248
|
break;
|
|
10249
10249
|
!G && (hr(S0, ir.name) ? Tr ? aI(a.errors, S0, ir.name) : v0(a.errors, ir.name, S0[ir.name]) : j0(a.errors, ir.name));
|
|
10250
10250
|
}
|
|
@@ -10318,17 +10318,17 @@ function nI(r = {}) {
|
|
|
10318
10318
|
zr = be.error, Q = be.name, S0 = Ne(Ce);
|
|
10319
10319
|
}
|
|
10320
10320
|
} else
|
|
10321
|
-
|
|
10321
|
+
v([Q], !0), zr = (await dh(Ar, A.disabled, i, d, e.shouldUseNativeValidation))[Q], v([Q]), ir(oe), or && (zr ? S0 = !1 : (u.isValid || c.isValid) && (S0 = await tr(t, !0)));
|
|
10322
10322
|
or && (Ar._f.deps && (!Array.isArray(Ar._f.deps) || Ar._f.deps.length > 0) && w(Ar._f.deps), P(Q, S0, zr, he));
|
|
10323
10323
|
}
|
|
10324
|
-
},
|
|
10324
|
+
}, m = (S, G) => {
|
|
10325
10325
|
if (hr(a.errors, G) && S.focus)
|
|
10326
10326
|
return S.focus(), 1;
|
|
10327
10327
|
}, w = async (S, G = {}) => {
|
|
10328
10328
|
let Q, or;
|
|
10329
10329
|
const Ar = Ao(S);
|
|
10330
10330
|
if (e.resolver) {
|
|
10331
|
-
const ir = await
|
|
10331
|
+
const ir = await q(V0(S) ? S : Ar);
|
|
10332
10332
|
Q = Ne(ir), or = S ? !Ar.some((lr) => hr(ir, lr)) : Q;
|
|
10333
10333
|
} else S ? (or = (await Promise.all(Ar.map(async (ir) => {
|
|
10334
10334
|
const lr = hr(t, ir);
|
|
@@ -10338,7 +10338,7 @@ function nI(r = {}) {
|
|
|
10338
10338
|
...!He(S) || (u.isValid || c.isValid) && Q !== a.isValid ? {} : { name: S },
|
|
10339
10339
|
...e.resolver || !S ? { isValid: Q } : {},
|
|
10340
10340
|
errors: a.errors
|
|
10341
|
-
}), G.shouldFocus && !or && so(t,
|
|
10341
|
+
}), G.shouldFocus && !or && so(t, m, S ? Ar : A.mount), or;
|
|
10342
10342
|
}, y = (S, G) => {
|
|
10343
10343
|
let Q = {
|
|
10344
10344
|
...o.mount ? i : n
|
|
@@ -10443,7 +10443,7 @@ function nI(r = {}) {
|
|
|
10443
10443
|
Q = hr(t, S, {}), Q._f && (Q._f.mount = !1), (e.shouldUnregister || G.shouldUnregister) && !(D5(A.array, S) && o.action) && A.unMount.add(S);
|
|
10444
10444
|
}
|
|
10445
10445
|
};
|
|
10446
|
-
}, H = () => e.shouldFocusError && so(t,
|
|
10446
|
+
}, H = () => e.shouldFocusError && so(t, m, A.mount), rr = (S) => {
|
|
10447
10447
|
Ue(S) && (h.state.next({ disabled: S }), so(t, (G, Q) => {
|
|
10448
10448
|
const or = hr(t, Q);
|
|
10449
10449
|
or && (G.disabled = or._f.disabled || S, Array.isArray(or._f.refs) && or._f.refs.forEach((Ar) => {
|
|
@@ -10576,7 +10576,7 @@ function nI(r = {}) {
|
|
|
10576
10576
|
});
|
|
10577
10577
|
}),
|
|
10578
10578
|
_removeUnmounted: X,
|
|
10579
|
-
_disableForm:
|
|
10579
|
+
_disableForm: rr,
|
|
10580
10580
|
_subjects: h,
|
|
10581
10581
|
_proxyFormState: u,
|
|
10582
10582
|
get _fields() {
|
|
@@ -14623,8 +14623,8 @@ function SB(r, e, a) {
|
|
|
14623
14623
|
}
|
|
14624
14624
|
const FB = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, $B = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, WB = /^'([^]*?)'?$/, TB = /''/g, PB = /[a-zA-Z]/;
|
|
14625
14625
|
function ut(r, e, a) {
|
|
14626
|
-
var u, c, h, d, g, b,
|
|
14627
|
-
const t = iA(), n = (a == null ? void 0 : a.locale) ?? t.locale ?? im, i = (a == null ? void 0 : a.firstWeekContainsDate) ?? ((c = (u = a == null ? void 0 : a.locale) == null ? void 0 : u.options) == null ? void 0 : c.firstWeekContainsDate) ?? t.firstWeekContainsDate ?? ((d = (h = t.locale) == null ? void 0 : h.options) == null ? void 0 : d.firstWeekContainsDate) ?? 1, o = (a == null ? void 0 : a.weekStartsOn) ?? ((b = (g = a == null ? void 0 : a.locale) == null ? void 0 : g.options) == null ? void 0 : b.weekStartsOn) ?? t.weekStartsOn ?? ((I = (
|
|
14626
|
+
var u, c, h, d, g, b, v, I;
|
|
14627
|
+
const t = iA(), n = (a == null ? void 0 : a.locale) ?? t.locale ?? im, i = (a == null ? void 0 : a.firstWeekContainsDate) ?? ((c = (u = a == null ? void 0 : a.locale) == null ? void 0 : u.options) == null ? void 0 : c.firstWeekContainsDate) ?? t.firstWeekContainsDate ?? ((d = (h = t.locale) == null ? void 0 : h.options) == null ? void 0 : d.firstWeekContainsDate) ?? 1, o = (a == null ? void 0 : a.weekStartsOn) ?? ((b = (g = a == null ? void 0 : a.locale) == null ? void 0 : g.options) == null ? void 0 : b.weekStartsOn) ?? t.weekStartsOn ?? ((I = (v = t.locale) == null ? void 0 : v.options) == null ? void 0 : I.weekStartsOn) ?? 0, A = A0(r);
|
|
14628
14628
|
if (!GI(A))
|
|
14629
14629
|
throw new RangeError("Invalid time value");
|
|
14630
14630
|
let s = e.match($B).map((_) => {
|
|
@@ -14830,7 +14830,7 @@ var Wh;
|
|
|
14830
14830
|
function HB() {
|
|
14831
14831
|
if (Wh) return c0;
|
|
14832
14832
|
Wh = 1;
|
|
14833
|
-
var r = typeof Symbol == "function" && Symbol.for, e = r ? Symbol.for("react.element") : 60103, a = r ? Symbol.for("react.portal") : 60106, t = r ? Symbol.for("react.fragment") : 60107, n = r ? Symbol.for("react.strict_mode") : 60108, i = r ? Symbol.for("react.profiler") : 60114, o = r ? Symbol.for("react.provider") : 60109, A = r ? Symbol.for("react.context") : 60110, s = r ? Symbol.for("react.async_mode") : 60111, f = r ? Symbol.for("react.concurrent_mode") : 60111, u = r ? Symbol.for("react.forward_ref") : 60112, c = r ? Symbol.for("react.suspense") : 60113, h = r ? Symbol.for("react.suspense_list") : 60120, d = r ? Symbol.for("react.memo") : 60115, g = r ? Symbol.for("react.lazy") : 60116, b = r ? Symbol.for("react.block") : 60121,
|
|
14833
|
+
var r = typeof Symbol == "function" && Symbol.for, e = r ? Symbol.for("react.element") : 60103, a = r ? Symbol.for("react.portal") : 60106, t = r ? Symbol.for("react.fragment") : 60107, n = r ? Symbol.for("react.strict_mode") : 60108, i = r ? Symbol.for("react.profiler") : 60114, o = r ? Symbol.for("react.provider") : 60109, A = r ? Symbol.for("react.context") : 60110, s = r ? Symbol.for("react.async_mode") : 60111, f = r ? Symbol.for("react.concurrent_mode") : 60111, u = r ? Symbol.for("react.forward_ref") : 60112, c = r ? Symbol.for("react.suspense") : 60113, h = r ? Symbol.for("react.suspense_list") : 60120, d = r ? Symbol.for("react.memo") : 60115, g = r ? Symbol.for("react.lazy") : 60116, b = r ? Symbol.for("react.block") : 60121, v = r ? Symbol.for("react.fundamental") : 60117, I = r ? Symbol.for("react.responder") : 60118, _ = r ? Symbol.for("react.scope") : 60119;
|
|
14834
14834
|
function N(C) {
|
|
14835
14835
|
if (typeof C == "object" && C !== null) {
|
|
14836
14836
|
var P = C.$$typeof;
|
|
@@ -14889,7 +14889,7 @@ function HB() {
|
|
|
14889
14889
|
}, c0.isSuspense = function(C) {
|
|
14890
14890
|
return N(C) === c;
|
|
14891
14891
|
}, c0.isValidElementType = function(C) {
|
|
14892
|
-
return typeof C == "string" || typeof C == "function" || C === t || C === f || C === i || C === n || C === c || C === h || typeof C == "object" && C !== null && (C.$$typeof === g || C.$$typeof === d || C.$$typeof === o || C.$$typeof === A || C.$$typeof === u || C.$$typeof ===
|
|
14892
|
+
return typeof C == "string" || typeof C == "function" || C === t || C === f || C === i || C === n || C === c || C === h || typeof C == "object" && C !== null && (C.$$typeof === g || C.$$typeof === d || C.$$typeof === o || C.$$typeof === A || C.$$typeof === u || C.$$typeof === v || C.$$typeof === I || C.$$typeof === _ || C.$$typeof === b);
|
|
14893
14893
|
}, c0.typeOf = N, c0;
|
|
14894
14894
|
}
|
|
14895
14895
|
var d0 = {};
|
|
@@ -14904,10 +14904,10 @@ var d0 = {};
|
|
|
14904
14904
|
var Th;
|
|
14905
14905
|
function QB() {
|
|
14906
14906
|
return Th || (Th = 1, process.env.NODE_ENV !== "production" && function() {
|
|
14907
|
-
var r = typeof Symbol == "function" && Symbol.for, e = r ? Symbol.for("react.element") : 60103, a = r ? Symbol.for("react.portal") : 60106, t = r ? Symbol.for("react.fragment") : 60107, n = r ? Symbol.for("react.strict_mode") : 60108, i = r ? Symbol.for("react.profiler") : 60114, o = r ? Symbol.for("react.provider") : 60109, A = r ? Symbol.for("react.context") : 60110, s = r ? Symbol.for("react.async_mode") : 60111, f = r ? Symbol.for("react.concurrent_mode") : 60111, u = r ? Symbol.for("react.forward_ref") : 60112, c = r ? Symbol.for("react.suspense") : 60113, h = r ? Symbol.for("react.suspense_list") : 60120, d = r ? Symbol.for("react.memo") : 60115, g = r ? Symbol.for("react.lazy") : 60116, b = r ? Symbol.for("react.block") : 60121,
|
|
14907
|
+
var r = typeof Symbol == "function" && Symbol.for, e = r ? Symbol.for("react.element") : 60103, a = r ? Symbol.for("react.portal") : 60106, t = r ? Symbol.for("react.fragment") : 60107, n = r ? Symbol.for("react.strict_mode") : 60108, i = r ? Symbol.for("react.profiler") : 60114, o = r ? Symbol.for("react.provider") : 60109, A = r ? Symbol.for("react.context") : 60110, s = r ? Symbol.for("react.async_mode") : 60111, f = r ? Symbol.for("react.concurrent_mode") : 60111, u = r ? Symbol.for("react.forward_ref") : 60112, c = r ? Symbol.for("react.suspense") : 60113, h = r ? Symbol.for("react.suspense_list") : 60120, d = r ? Symbol.for("react.memo") : 60115, g = r ? Symbol.for("react.lazy") : 60116, b = r ? Symbol.for("react.block") : 60121, v = r ? Symbol.for("react.fundamental") : 60117, I = r ? Symbol.for("react.responder") : 60118, _ = r ? Symbol.for("react.scope") : 60119;
|
|
14908
14908
|
function N(T) {
|
|
14909
14909
|
return typeof T == "string" || typeof T == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
14910
|
-
T === t || T === f || T === i || T === n || T === c || T === h || typeof T == "object" && T !== null && (T.$$typeof === g || T.$$typeof === d || T.$$typeof === o || T.$$typeof === A || T.$$typeof === u || T.$$typeof ===
|
|
14910
|
+
T === t || T === f || T === i || T === n || T === c || T === h || typeof T == "object" && T !== null && (T.$$typeof === g || T.$$typeof === d || T.$$typeof === o || T.$$typeof === A || T.$$typeof === u || T.$$typeof === v || T.$$typeof === I || T.$$typeof === _ || T.$$typeof === b);
|
|
14911
14911
|
}
|
|
14912
14912
|
function R(T) {
|
|
14913
14913
|
if (typeof T == "object" && T !== null) {
|
|
@@ -14941,9 +14941,9 @@ function QB() {
|
|
|
14941
14941
|
}
|
|
14942
14942
|
}
|
|
14943
14943
|
}
|
|
14944
|
-
var C = s, P = f, V = A,
|
|
14944
|
+
var C = s, P = f, V = A, q = o, tr = e, X = u, er = t, Y = g, ar = d, $ = a, J = i, L = n, O = c, m = !1;
|
|
14945
14945
|
function w(T) {
|
|
14946
|
-
return
|
|
14946
|
+
return m || (m = !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.")), y(T) || R(T) === s;
|
|
14947
14947
|
}
|
|
14948
14948
|
function y(T) {
|
|
14949
14949
|
return R(T) === f;
|
|
@@ -14978,10 +14978,10 @@ function QB() {
|
|
|
14978
14978
|
function H(T) {
|
|
14979
14979
|
return R(T) === n;
|
|
14980
14980
|
}
|
|
14981
|
-
function
|
|
14981
|
+
function rr(T) {
|
|
14982
14982
|
return R(T) === c;
|
|
14983
14983
|
}
|
|
14984
|
-
d0.AsyncMode = C, d0.ConcurrentMode = P, d0.ContextConsumer = V, d0.ContextProvider =
|
|
14984
|
+
d0.AsyncMode = C, d0.ConcurrentMode = P, d0.ContextConsumer = V, d0.ContextProvider = q, d0.Element = tr, d0.ForwardRef = X, d0.Fragment = er, d0.Lazy = Y, d0.Memo = ar, d0.Portal = $, d0.Profiler = J, d0.StrictMode = L, d0.Suspense = O, d0.isAsyncMode = w, d0.isConcurrentMode = y, d0.isContextConsumer = k, d0.isContextProvider = E, d0.isElement = x, d0.isForwardRef = B, d0.isFragment = Z, d0.isLazy = W, d0.isMemo = F, d0.isPortal = U, d0.isProfiler = K, d0.isStrictMode = H, d0.isSuspense = rr, d0.isValidElementType = N, d0.typeOf = R;
|
|
14985
14985
|
}()), d0;
|
|
14986
14986
|
}
|
|
14987
14987
|
var Ph;
|
|
@@ -15138,7 +15138,7 @@ function KB() {
|
|
|
15138
15138
|
elementType: C(),
|
|
15139
15139
|
instanceOf: P,
|
|
15140
15140
|
node: X(),
|
|
15141
|
-
objectOf:
|
|
15141
|
+
objectOf: q,
|
|
15142
15142
|
oneOf: V,
|
|
15143
15143
|
oneOfType: tr,
|
|
15144
15144
|
shape: Y,
|
|
@@ -15151,11 +15151,11 @@ function KB() {
|
|
|
15151
15151
|
this.message = y, this.data = k && typeof k == "object" ? k : {}, this.stack = "";
|
|
15152
15152
|
}
|
|
15153
15153
|
b.prototype = Error.prototype;
|
|
15154
|
-
function
|
|
15154
|
+
function v(y) {
|
|
15155
15155
|
if (process.env.NODE_ENV !== "production")
|
|
15156
15156
|
var k = {}, E = 0;
|
|
15157
|
-
function x(Z, W, F, U, K, H,
|
|
15158
|
-
if (U = U || h, H = H || F,
|
|
15157
|
+
function x(Z, W, F, U, K, H, rr) {
|
|
15158
|
+
if (U = U || h, H = H || F, rr !== a) {
|
|
15159
15159
|
if (s) {
|
|
15160
15160
|
var T = new Error(
|
|
15161
15161
|
"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"
|
|
@@ -15186,10 +15186,10 @@ function KB() {
|
|
|
15186
15186
|
}
|
|
15187
15187
|
return null;
|
|
15188
15188
|
}
|
|
15189
|
-
return
|
|
15189
|
+
return v(k);
|
|
15190
15190
|
}
|
|
15191
15191
|
function _() {
|
|
15192
|
-
return
|
|
15192
|
+
return v(o);
|
|
15193
15193
|
}
|
|
15194
15194
|
function N(y) {
|
|
15195
15195
|
function k(E, x, B, Z, W) {
|
|
@@ -15207,7 +15207,7 @@ function KB() {
|
|
|
15207
15207
|
}
|
|
15208
15208
|
return null;
|
|
15209
15209
|
}
|
|
15210
|
-
return
|
|
15210
|
+
return v(k);
|
|
15211
15211
|
}
|
|
15212
15212
|
function R() {
|
|
15213
15213
|
function y(k, E, x, B, Z) {
|
|
@@ -15218,7 +15218,7 @@ function KB() {
|
|
|
15218
15218
|
}
|
|
15219
15219
|
return null;
|
|
15220
15220
|
}
|
|
15221
|
-
return
|
|
15221
|
+
return v(y);
|
|
15222
15222
|
}
|
|
15223
15223
|
function C() {
|
|
15224
15224
|
function y(k, E, x, B, Z) {
|
|
@@ -15229,7 +15229,7 @@ function KB() {
|
|
|
15229
15229
|
}
|
|
15230
15230
|
return null;
|
|
15231
15231
|
}
|
|
15232
|
-
return
|
|
15232
|
+
return v(y);
|
|
15233
15233
|
}
|
|
15234
15234
|
function P(y) {
|
|
15235
15235
|
function k(E, x, B, Z, W) {
|
|
@@ -15239,7 +15239,7 @@ function KB() {
|
|
|
15239
15239
|
}
|
|
15240
15240
|
return null;
|
|
15241
15241
|
}
|
|
15242
|
-
return
|
|
15242
|
+
return v(k);
|
|
15243
15243
|
}
|
|
15244
15244
|
function V(y) {
|
|
15245
15245
|
if (!Array.isArray(y))
|
|
@@ -15250,15 +15250,15 @@ function KB() {
|
|
|
15250
15250
|
for (var F = E[x], U = 0; U < y.length; U++)
|
|
15251
15251
|
if (g(F, y[U]))
|
|
15252
15252
|
return null;
|
|
15253
|
-
var K = JSON.stringify(y, function(
|
|
15253
|
+
var K = JSON.stringify(y, function(rr, T) {
|
|
15254
15254
|
var nr = O(T);
|
|
15255
15255
|
return nr === "symbol" ? String(T) : T;
|
|
15256
15256
|
});
|
|
15257
15257
|
return new b("Invalid " + Z + " `" + W + "` of value `" + String(F) + "` " + ("supplied to `" + B + "`, expected one of " + K + "."));
|
|
15258
15258
|
}
|
|
15259
|
-
return
|
|
15259
|
+
return v(k);
|
|
15260
15260
|
}
|
|
15261
|
-
function
|
|
15261
|
+
function q(y) {
|
|
15262
15262
|
function k(E, x, B, Z, W) {
|
|
15263
15263
|
if (typeof y != "function")
|
|
15264
15264
|
return new b("Property `" + W + "` of component `" + B + "` has invalid PropType notation inside objectOf.");
|
|
@@ -15273,7 +15273,7 @@ function KB() {
|
|
|
15273
15273
|
}
|
|
15274
15274
|
return null;
|
|
15275
15275
|
}
|
|
15276
|
-
return
|
|
15276
|
+
return v(k);
|
|
15277
15277
|
}
|
|
15278
15278
|
function tr(y) {
|
|
15279
15279
|
if (!Array.isArray(y))
|
|
@@ -15282,12 +15282,12 @@ function KB() {
|
|
|
15282
15282
|
var E = y[k];
|
|
15283
15283
|
if (typeof E != "function")
|
|
15284
15284
|
return i(
|
|
15285
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " +
|
|
15285
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + m(E) + " at index " + k + "."
|
|
15286
15286
|
), o;
|
|
15287
15287
|
}
|
|
15288
15288
|
function x(B, Z, W, F, U) {
|
|
15289
15289
|
for (var K = [], H = 0; H < y.length; H++) {
|
|
15290
|
-
var
|
|
15290
|
+
var rr = y[H], T = rr(B, Z, W, F, U, a);
|
|
15291
15291
|
if (T == null)
|
|
15292
15292
|
return null;
|
|
15293
15293
|
T.data && t(T.data, "expectedType") && K.push(T.data.expectedType);
|
|
@@ -15295,13 +15295,13 @@ function KB() {
|
|
|
15295
15295
|
var nr = K.length > 0 ? ", expected one of type [" + K.join(", ") + "]" : "";
|
|
15296
15296
|
return new b("Invalid " + F + " `" + U + "` supplied to " + ("`" + W + "`" + nr + "."));
|
|
15297
15297
|
}
|
|
15298
|
-
return
|
|
15298
|
+
return v(x);
|
|
15299
15299
|
}
|
|
15300
15300
|
function X() {
|
|
15301
15301
|
function y(k, E, x, B, Z) {
|
|
15302
15302
|
return $(k[E]) ? null : new b("Invalid " + B + " `" + Z + "` supplied to " + ("`" + x + "`, expected a ReactNode."));
|
|
15303
15303
|
}
|
|
15304
|
-
return
|
|
15304
|
+
return v(y);
|
|
15305
15305
|
}
|
|
15306
15306
|
function er(y, k, E, x, B) {
|
|
15307
15307
|
return new b(
|
|
@@ -15317,13 +15317,13 @@ function KB() {
|
|
|
15317
15317
|
var H = y[K];
|
|
15318
15318
|
if (typeof H != "function")
|
|
15319
15319
|
return er(B, Z, W, K, O(H));
|
|
15320
|
-
var
|
|
15321
|
-
if (
|
|
15322
|
-
return
|
|
15320
|
+
var rr = H(F, K, B, Z, W + "." + K, a);
|
|
15321
|
+
if (rr)
|
|
15322
|
+
return rr;
|
|
15323
15323
|
}
|
|
15324
15324
|
return null;
|
|
15325
15325
|
}
|
|
15326
|
-
return
|
|
15326
|
+
return v(k);
|
|
15327
15327
|
}
|
|
15328
15328
|
function ar(y) {
|
|
15329
15329
|
function k(E, x, B, Z, W) {
|
|
@@ -15332,21 +15332,21 @@ function KB() {
|
|
|
15332
15332
|
return new b("Invalid " + Z + " `" + W + "` of type `" + U + "` " + ("supplied to `" + B + "`, expected `object`."));
|
|
15333
15333
|
var K = e({}, E[x], y);
|
|
15334
15334
|
for (var H in K) {
|
|
15335
|
-
var
|
|
15336
|
-
if (t(y, H) && typeof
|
|
15337
|
-
return er(B, Z, W, H, O(
|
|
15338
|
-
if (!
|
|
15335
|
+
var rr = y[H];
|
|
15336
|
+
if (t(y, H) && typeof rr != "function")
|
|
15337
|
+
return er(B, Z, W, H, O(rr));
|
|
15338
|
+
if (!rr)
|
|
15339
15339
|
return new b(
|
|
15340
15340
|
"Invalid " + Z + " `" + W + "` key `" + H + "` supplied to `" + B + "`.\nBad object: " + JSON.stringify(E[x], null, " ") + `
|
|
15341
15341
|
Valid keys: ` + JSON.stringify(Object.keys(y), null, " ")
|
|
15342
15342
|
);
|
|
15343
|
-
var T =
|
|
15343
|
+
var T = rr(F, H, B, Z, W + "." + H, a);
|
|
15344
15344
|
if (T)
|
|
15345
15345
|
return T;
|
|
15346
15346
|
}
|
|
15347
15347
|
return null;
|
|
15348
15348
|
}
|
|
15349
|
-
return
|
|
15349
|
+
return v(k);
|
|
15350
15350
|
}
|
|
15351
15351
|
function $(y) {
|
|
15352
15352
|
switch (typeof y) {
|
|
@@ -15400,7 +15400,7 @@ Valid keys: ` + JSON.stringify(Object.keys(y), null, " ")
|
|
|
15400
15400
|
}
|
|
15401
15401
|
return k;
|
|
15402
15402
|
}
|
|
15403
|
-
function
|
|
15403
|
+
function m(y) {
|
|
15404
15404
|
var k = O(y);
|
|
15405
15405
|
switch (k) {
|
|
15406
15406
|
case "array":
|
|
@@ -15765,13 +15765,13 @@ function _N(r, e) {
|
|
|
15765
15765
|
return a;
|
|
15766
15766
|
}
|
|
15767
15767
|
function IN(r) {
|
|
15768
|
-
var e = r.ref, a = r.parse, t = r.format, n = r.value, i = r.defaultValue, o = r.controlled, A = o === void 0 ? !0 : o, s = r.onChange, f = r.onKeyDown, u = CN(r, kN), c = Ze(), h = U0(function(
|
|
15769
|
-
c.current =
|
|
15770
|
-
}, [e]), d = U0(function(
|
|
15771
|
-
return pN(
|
|
15772
|
-
}, [c, a, t, s]), g = U0(function(
|
|
15773
|
-
if (f && f(
|
|
15774
|
-
return yN(
|
|
15768
|
+
var e = r.ref, a = r.parse, t = r.format, n = r.value, i = r.defaultValue, o = r.controlled, A = o === void 0 ? !0 : o, s = r.onChange, f = r.onKeyDown, u = CN(r, kN), c = Ze(), h = U0(function(v) {
|
|
15769
|
+
c.current = v, e && (typeof e == "function" ? e(v) : e.current = v);
|
|
15770
|
+
}, [e]), d = U0(function(v) {
|
|
15771
|
+
return pN(v, c.current, a, t, s);
|
|
15772
|
+
}, [c, a, t, s]), g = U0(function(v) {
|
|
15773
|
+
if (f && f(v), !v.defaultPrevented)
|
|
15774
|
+
return yN(v, c.current, a, t, s);
|
|
15775
15775
|
}, [c, a, t, s, f]), b = ki(ki({}, u), {}, {
|
|
15776
15776
|
ref: h,
|
|
15777
15777
|
onChange: d,
|
|
@@ -16666,8 +16666,8 @@ var cx = ";ext=", Ei = function(e) {
|
|
|
16666
16666
|
return "([".concat(ye, "]{1,").concat(e, "})");
|
|
16667
16667
|
};
|
|
16668
16668
|
function xm(r) {
|
|
16669
|
-
var e = "20", a = "15", t = "9", n = "6", i = "[ \\t,]*", o = "[:\\..]?[ \\t,-]*", A = "#?", s = "(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)", f = "(?:[xx##~~]|int|int)", u = "[- ]+", c = "[ \\t]*", h = "(?:,{2}|;)", d = cx + Ei(e), g = i + s + o + Ei(e) + A, b = i + f + o + Ei(t) + A,
|
|
16670
|
-
return d + "|" + g + "|" + b + "|" +
|
|
16669
|
+
var e = "20", a = "15", t = "9", n = "6", i = "[ \\t,]*", o = "[:\\..]?[ \\t,-]*", A = "#?", s = "(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)", f = "(?:[xx##~~]|int|int)", u = "[- ]+", c = "[ \\t]*", h = "(?:,{2}|;)", d = cx + Ei(e), g = i + s + o + Ei(e) + A, b = i + f + o + Ei(t) + A, v = u + Ei(n) + "#", I = c + h + o + Ei(a) + A, _ = c + "(?:,)+" + o + Ei(t) + A;
|
|
16670
|
+
return d + "|" + g + "|" + b + "|" + v + "|" + I + "|" + _;
|
|
16671
16671
|
}
|
|
16672
16672
|
var dx = "[" + ye + "]{" + Ic + "}", hx = "[" + af + "]{0,1}(?:[" + xa + "]*[" + ye + "]){3,}[" + xa + ye + "]*", bx = new RegExp("^[" + af + "]{0,1}(?:[" + xa + "]*[" + ye + "]){1,2}$", "i"), mx = hx + // Phone number extensions
|
|
16673
16673
|
"(?:" + xm() + ")?", vx = new RegExp(
|
|
@@ -18355,8 +18355,8 @@ var Y1 = "9", vZ = 15, gZ = XA(Y1, vZ), pZ = /[- ]/, yZ = function() {
|
|
|
18355
18355
|
for (var b = o.length; b > 0; )
|
|
18356
18356
|
h = h.replace(/\d/, ya), b--;
|
|
18357
18357
|
}
|
|
18358
|
-
var
|
|
18359
|
-
return d || (A ?
|
|
18358
|
+
var v = f.replace(new RegExp(s), h).replace(new RegExp(Y1, "g"), ya);
|
|
18359
|
+
return d || (A ? v = XA(ya, A.length) + " " + v : o && (v = XA(ya, o.length) + this.getSeparatorAfterNationalPrefix(a) + v)), i && (v = Im(v)), v;
|
|
18360
18360
|
}
|
|
18361
18361
|
}
|
|
18362
18362
|
}, {
|
|
@@ -19066,10 +19066,10 @@ function oS(r) {
|
|
|
19066
19066
|
inputFormat: o,
|
|
19067
19067
|
country: i,
|
|
19068
19068
|
metadata: s
|
|
19069
|
-
}), b = d.input(g + h),
|
|
19070
|
-
return g && (b = H1(b, g),
|
|
19069
|
+
}), b = d.input(g + h), v = d.getTemplate();
|
|
19070
|
+
return g && (b = H1(b, g), v && (v = H1(v, g))), {
|
|
19071
19071
|
text: b,
|
|
19072
|
-
template:
|
|
19072
|
+
template: v
|
|
19073
19073
|
};
|
|
19074
19074
|
}, [i, s]), c = Dm({
|
|
19075
19075
|
onKeyDown: n,
|
|
@@ -19167,7 +19167,7 @@ function lS(r) {
|
|
|
19167
19167
|
N.indexOf(I.target.value) === 0 && (_ = _.slice(0, -1));
|
|
19168
19168
|
}
|
|
19169
19169
|
i(_);
|
|
19170
|
-
}, [g, n, i, A, u]),
|
|
19170
|
+
}, [g, n, i, A, u]), v = Dm({
|
|
19171
19171
|
onKeyDown: o,
|
|
19172
19172
|
inputFormat: s
|
|
19173
19173
|
});
|
|
@@ -19175,7 +19175,7 @@ function lS(r) {
|
|
|
19175
19175
|
ref: t,
|
|
19176
19176
|
value: xb(g, n, A, u),
|
|
19177
19177
|
onChange: b,
|
|
19178
|
-
onKeyDown:
|
|
19178
|
+
onKeyDown: v
|
|
19179
19179
|
}));
|
|
19180
19180
|
}
|
|
19181
19181
|
return e = /* @__PURE__ */ j.forwardRef(e), e.propTypes = {
|
|
@@ -19857,8 +19857,8 @@ function YS(r, e) {
|
|
|
19857
19857
|
}
|
|
19858
19858
|
}
|
|
19859
19859
|
f === !1 && t && r && r[0] === "+" && (r = $b(r, t, h)), r && t && u && (r = LS(r, t, h)), r && r[0] !== "+" && (!t || f) && (r = "+" + r), !r && a && a[0] === "+" && (f ? t = void 0 : t = n), r === "+" && a && a[0] === "+" && a.length > 1 && (t = void 0);
|
|
19860
|
-
var
|
|
19861
|
-
return r && (r[0] === "+" && (r === "+" || t && It(t, h).indexOf(r) === 0) ?
|
|
19860
|
+
var v;
|
|
19861
|
+
return r && (r[0] === "+" && (r === "+" || t && It(t, h).indexOf(r) === 0) ? v = void 0 : v = Fi(r, t, h)), v && (t = Km(v, {
|
|
19862
19862
|
country: t,
|
|
19863
19863
|
countries: s,
|
|
19864
19864
|
defaultCountry: n,
|
|
@@ -19867,13 +19867,13 @@ function YS(r, e) {
|
|
|
19867
19867
|
// Instead, it's explicitly checked a bit later in the code.
|
|
19868
19868
|
required: !1,
|
|
19869
19869
|
metadata: h
|
|
19870
|
-
}), f === !1 && t && r && r[0] === "+" && (r = $b(r, t, h),
|
|
19870
|
+
}), f === !1 && t && r && r[0] === "+" && (r = $b(r, t, h), v = Fi(r, t, h))), !t && o && (t = n || A()), {
|
|
19871
19871
|
// `phoneDigits` returned here are a "normalized" version of the original `phoneDigits`.
|
|
19872
19872
|
// The returned `phoneDigits` shouldn't be used anywhere except for passing it as
|
|
19873
19873
|
// `prevPhoneDigits` parameter to this same function on next input change event.
|
|
19874
19874
|
phoneDigits: r,
|
|
19875
19875
|
country: t,
|
|
19876
|
-
value:
|
|
19876
|
+
value: v
|
|
19877
19877
|
};
|
|
19878
19878
|
}
|
|
19879
19879
|
function $b(r, e, a) {
|
|
@@ -19975,7 +19975,7 @@ function qS(r, e) {
|
|
|
19975
19975
|
function rF(r, e, a) {
|
|
19976
19976
|
var t = r.metadata, n = r.countries, i = r.defaultCountry, o = r.value, A = r.reset, s = r.international, f = r.displayInitialValueAsLocalNumber, u = r.initialValueFormat, c = e.defaultCountry, h = e.value, d = e.reset;
|
|
19977
19977
|
a.country;
|
|
19978
|
-
var g = a.value, b = a.hasUserSelectedACountry,
|
|
19978
|
+
var g = a.value, b = a.hasUserSelectedACountry, v = a.latestCountrySelectedByUser, I = function(er) {
|
|
19979
19979
|
return rv(EA(EA({}, er), {}, {
|
|
19980
19980
|
international: s,
|
|
19981
19981
|
useNationalFormat: f || u === "national",
|
|
@@ -20032,20 +20032,20 @@ function rF(r, e, a) {
|
|
|
20032
20032
|
metadata: t
|
|
20033
20033
|
}), P || i && o.indexOf(It(i, t)) === 0 && (P = i));
|
|
20034
20034
|
}
|
|
20035
|
-
var
|
|
20035
|
+
var q;
|
|
20036
20036
|
if (o) {
|
|
20037
|
-
if (
|
|
20038
|
-
var tr = P ?
|
|
20039
|
-
tr ? P || (P =
|
|
20037
|
+
if (v) {
|
|
20038
|
+
var tr = P ? v === P : Pi(o, v, t);
|
|
20039
|
+
tr ? P || (P = v) : q = {
|
|
20040
20040
|
latestCountrySelectedByUser: void 0
|
|
20041
20041
|
};
|
|
20042
20042
|
}
|
|
20043
20043
|
} else
|
|
20044
|
-
|
|
20044
|
+
q = {
|
|
20045
20045
|
latestCountrySelectedByUser: void 0,
|
|
20046
20046
|
hasUserSelectedACountry: void 0
|
|
20047
20047
|
};
|
|
20048
|
-
return EA(EA({},
|
|
20048
|
+
return EA(EA({}, q), {}, {
|
|
20049
20049
|
phoneDigits: I({
|
|
20050
20050
|
phoneNumber: C,
|
|
20051
20051
|
value: o,
|
|
@@ -20189,31 +20189,31 @@ function uF(r, e) {
|
|
|
20189
20189
|
var lF = /* @__PURE__ */ function(r) {
|
|
20190
20190
|
function e(a) {
|
|
20191
20191
|
var t;
|
|
20192
|
-
nF(this, e), t = oF(this, e, [a]), pa(t, "setInputRef", function(
|
|
20193
|
-
DS([t.props.inputRef, t.inputRef],
|
|
20194
|
-
}), pa(t, "isCountrySupportedWithError", function(
|
|
20192
|
+
nF(this, e), t = oF(this, e, [a]), pa(t, "setInputRef", function(v) {
|
|
20193
|
+
DS([t.props.inputRef, t.inputRef], v);
|
|
20194
|
+
}), pa(t, "isCountrySupportedWithError", function(v) {
|
|
20195
20195
|
var I = t.props.metadata;
|
|
20196
|
-
return nf(
|
|
20197
|
-
}), pa(t, "onCountryChange", function(
|
|
20198
|
-
var I = t.props, _ = I.international, N = I.metadata, R = I.onChange, C = I.focusInputOnCountrySelection, P = t.state, V = P.phoneDigits,
|
|
20199
|
-
prevCountry:
|
|
20200
|
-
newCountry:
|
|
20196
|
+
return nf(v, I);
|
|
20197
|
+
}), pa(t, "onCountryChange", function(v) {
|
|
20198
|
+
var I = t.props, _ = I.international, N = I.metadata, R = I.onChange, C = I.focusInputOnCountrySelection, P = t.state, V = P.phoneDigits, q = P.country, tr = jS(V, {
|
|
20199
|
+
prevCountry: q,
|
|
20200
|
+
newCountry: v,
|
|
20201
20201
|
metadata: N,
|
|
20202
20202
|
// Convert the phone number to "national" format
|
|
20203
20203
|
// when the user changes the selected country by hand.
|
|
20204
20204
|
useNationalFormat: !_
|
|
20205
|
-
}), X = Fi(tr,
|
|
20205
|
+
}), X = Fi(tr, v, N);
|
|
20206
20206
|
C && t.inputRef.current.focus(), t.setState({
|
|
20207
|
-
country:
|
|
20208
|
-
latestCountrySelectedByUser:
|
|
20207
|
+
country: v,
|
|
20208
|
+
latestCountrySelectedByUser: v,
|
|
20209
20209
|
hasUserSelectedACountry: !0,
|
|
20210
20210
|
phoneDigits: tr,
|
|
20211
20211
|
value: X
|
|
20212
20212
|
}, function() {
|
|
20213
20213
|
R(X);
|
|
20214
20214
|
});
|
|
20215
|
-
}), pa(t, "onChange", function(
|
|
20216
|
-
var I = t.props, _ = I.defaultCountry, N = I.onChange, R = I.addInternationalOption, C = I.international, P = I.limitMaxLength, V = I.countryCallingCodeEditable,
|
|
20215
|
+
}), pa(t, "onChange", function(v) {
|
|
20216
|
+
var I = t.props, _ = I.defaultCountry, N = I.onChange, R = I.addInternationalOption, C = I.international, P = I.limitMaxLength, V = I.countryCallingCodeEditable, q = I.metadata, tr = t.state, X = tr.countries, er = tr.phoneDigits, Y = tr.country, ar = tr.latestCountrySelectedByUser, $ = YS(v, {
|
|
20217
20217
|
prevPhoneDigits: er,
|
|
20218
20218
|
country: Y,
|
|
20219
20219
|
countryRequired: !R,
|
|
@@ -20228,14 +20228,14 @@ var lF = /* @__PURE__ */ function(r) {
|
|
|
20228
20228
|
international: C,
|
|
20229
20229
|
limitMaxLength: P,
|
|
20230
20230
|
countryCallingCodeEditable: V,
|
|
20231
|
-
metadata:
|
|
20232
|
-
}), J = $.phoneDigits, L = $.country, O = $.value,
|
|
20231
|
+
metadata: q
|
|
20232
|
+
}), J = $.phoneDigits, L = $.country, O = $.value, m = {
|
|
20233
20233
|
phoneDigits: J,
|
|
20234
20234
|
value: O,
|
|
20235
20235
|
country: L
|
|
20236
20236
|
};
|
|
20237
|
-
ar && O && !Pi(O, ar,
|
|
20238
|
-
|
|
20237
|
+
ar && O && !Pi(O, ar, q) && (m.latestCountrySelectedByUser = void 0), V === !1 && !O && J === t.state.phoneDigits && (m.forceRerender = {}), t.setState(
|
|
20238
|
+
m,
|
|
20239
20239
|
// Update the new `value` property.
|
|
20240
20240
|
// Doing it after the `state` has been updated
|
|
20241
20241
|
// because `onChange()` will trigger `getDerivedStateFromProps()`
|
|
@@ -20252,26 +20252,26 @@ var lF = /* @__PURE__ */ function(r) {
|
|
|
20252
20252
|
return t.setState({
|
|
20253
20253
|
isFocused: !1
|
|
20254
20254
|
});
|
|
20255
|
-
}), pa(t, "onFocus", function(
|
|
20255
|
+
}), pa(t, "onFocus", function(v) {
|
|
20256
20256
|
t._onFocus();
|
|
20257
20257
|
var I = t.props.onFocus;
|
|
20258
|
-
I && I(
|
|
20259
|
-
}), pa(t, "onBlur", function(
|
|
20258
|
+
I && I(v);
|
|
20259
|
+
}), pa(t, "onBlur", function(v) {
|
|
20260
20260
|
var I = t.props.onBlur;
|
|
20261
|
-
t._onBlur(), I && I(
|
|
20262
|
-
}), pa(t, "onCountryFocus", function(
|
|
20261
|
+
t._onBlur(), I && I(v);
|
|
20262
|
+
}), pa(t, "onCountryFocus", function(v) {
|
|
20263
20263
|
t._onFocus();
|
|
20264
20264
|
var I = t.props.countrySelectProps;
|
|
20265
20265
|
if (I) {
|
|
20266
20266
|
var _ = I.onFocus;
|
|
20267
|
-
_ && _(
|
|
20267
|
+
_ && _(v);
|
|
20268
20268
|
}
|
|
20269
|
-
}), pa(t, "onCountryBlur", function(
|
|
20269
|
+
}), pa(t, "onCountryBlur", function(v) {
|
|
20270
20270
|
t._onBlur();
|
|
20271
20271
|
var I = t.props.countrySelectProps;
|
|
20272
20272
|
if (I) {
|
|
20273
20273
|
var _ = I.onBlur;
|
|
20274
|
-
_ && _(
|
|
20274
|
+
_ && _(v);
|
|
20275
20275
|
}
|
|
20276
20276
|
}), t.inputRef = /* @__PURE__ */ j.createRef();
|
|
20277
20277
|
var n = t.props, i = n.value;
|
|
@@ -20377,13 +20377,13 @@ var lF = /* @__PURE__ */ function(r) {
|
|
|
20377
20377
|
value: function() {
|
|
20378
20378
|
var t = this.props, n = t.name, i = t.disabled, o = t.readOnly, A = t.autoComplete, s = t.style, f = t.className;
|
|
20379
20379
|
t.inputRef;
|
|
20380
|
-
var u = t.inputComponent, c = t.numberInputProps, h = t.smartCaret, d = t.countrySelectComponent, g = t.countrySelectProps, b = t.containerComponent,
|
|
20380
|
+
var u = t.inputComponent, c = t.numberInputProps, h = t.smartCaret, d = t.countrySelectComponent, g = t.countrySelectProps, b = t.containerComponent, v = t.containerComponentProps;
|
|
20381
20381
|
t.defaultCountry, t.countries, t.countryOptionsOrder;
|
|
20382
20382
|
var I = t.labels;
|
|
20383
20383
|
t.flags, t.flagComponent, t.flagUrl, t.addInternationalOption, t.internationalIcon, t.displayInitialValueAsLocalNumber, t.initialValueFormat, t.onCountryChange, t.limitMaxLength, t.countryCallingCodeEditable, t.focusInputOnCountrySelection, t.reset;
|
|
20384
20384
|
var _ = t.metadata, N = t.international;
|
|
20385
20385
|
t.locales;
|
|
20386
|
-
var R = aF(t, eF), C = this.state, P = C.country, V = C.countries,
|
|
20386
|
+
var R = aF(t, eF), C = this.state, P = C.country, V = C.countries, q = C.phoneDigits, tr = C.isFocused, X = h ? AS : cS, er = this.getCountrySelectOptions({
|
|
20387
20387
|
countries: V
|
|
20388
20388
|
});
|
|
20389
20389
|
return /* @__PURE__ */ j.createElement(b, Oi({
|
|
@@ -20393,7 +20393,7 @@ var lF = /* @__PURE__ */ function(r) {
|
|
|
20393
20393
|
"PhoneInput--disabled": i,
|
|
20394
20394
|
"PhoneInput--readOnly": o
|
|
20395
20395
|
})
|
|
20396
|
-
},
|
|
20396
|
+
}, v), /* @__PURE__ */ j.createElement(d, Oi({
|
|
20397
20397
|
name: n ? "".concat(n, "Country") : void 0,
|
|
20398
20398
|
"aria-label": I.country
|
|
20399
20399
|
}, g, {
|
|
@@ -20416,7 +20416,7 @@ var lF = /* @__PURE__ */ function(r) {
|
|
|
20416
20416
|
name: n,
|
|
20417
20417
|
metadata: _,
|
|
20418
20418
|
country: P,
|
|
20419
|
-
value:
|
|
20419
|
+
value: q || "",
|
|
20420
20420
|
onChange: this.onChange,
|
|
20421
20421
|
onFocus: this.onFocus,
|
|
20422
20422
|
onBlur: this.onBlur,
|
|
@@ -21242,7 +21242,7 @@ var ku = "focusScope.autoFocusOnMount", Eu = "focusScope.autoFocusOnUnmount", Mb
|
|
|
21242
21242
|
if (d.paused || !A) return;
|
|
21243
21243
|
const R = N.target;
|
|
21244
21244
|
A.contains(R) ? c.current = R : Lt(c.current, { select: !0 });
|
|
21245
|
-
},
|
|
21245
|
+
}, v = function(N) {
|
|
21246
21246
|
if (d.paused || !A) return;
|
|
21247
21247
|
const R = N.relatedTarget;
|
|
21248
21248
|
R !== null && (A.contains(R) || Lt(c.current, { select: !0 }));
|
|
@@ -21251,10 +21251,10 @@ var ku = "focusScope.autoFocusOnMount", Eu = "focusScope.autoFocusOnUnmount", Mb
|
|
|
21251
21251
|
for (const C of N)
|
|
21252
21252
|
C.removedNodes.length > 0 && Lt(A);
|
|
21253
21253
|
};
|
|
21254
|
-
document.addEventListener("focusin", b), document.addEventListener("focusout",
|
|
21254
|
+
document.addEventListener("focusin", b), document.addEventListener("focusout", v);
|
|
21255
21255
|
const _ = new MutationObserver(I);
|
|
21256
21256
|
return A && _.observe(A, { childList: !0, subtree: !0 }), () => {
|
|
21257
|
-
document.removeEventListener("focusin", b), document.removeEventListener("focusout",
|
|
21257
|
+
document.removeEventListener("focusin", b), document.removeEventListener("focusout", v), _.disconnect();
|
|
21258
21258
|
};
|
|
21259
21259
|
}
|
|
21260
21260
|
}, [t, A, d.paused]), p.useEffect(() => {
|
|
@@ -21276,8 +21276,8 @@ var ku = "focusScope.autoFocusOnMount", Eu = "focusScope.autoFocusOnUnmount", Mb
|
|
|
21276
21276
|
const g = p.useCallback(
|
|
21277
21277
|
(b) => {
|
|
21278
21278
|
if (!a && !t || d.paused) return;
|
|
21279
|
-
const
|
|
21280
|
-
if (
|
|
21279
|
+
const v = b.key === "Tab" && !b.altKey && !b.ctrlKey && !b.metaKey, I = document.activeElement;
|
|
21280
|
+
if (v && I) {
|
|
21281
21281
|
const _ = b.currentTarget, [N, R] = wF(_);
|
|
21282
21282
|
N && R ? !b.shiftKey && I === R ? (b.preventDefault(), a && Lt(N, { select: !0 })) : b.shiftKey && I === N && (b.preventDefault(), a && Lt(R, { select: !0 })) : I === _ && b.preventDefault();
|
|
21283
21283
|
}
|
|
@@ -21378,8 +21378,8 @@ var IF = function(r) {
|
|
|
21378
21378
|
u(h);
|
|
21379
21379
|
else
|
|
21380
21380
|
try {
|
|
21381
|
-
var d = h.getAttribute(t), g = d !== null && d !== "false", b = (Ci.get(h) || 0) + 1,
|
|
21382
|
-
Ci.set(h, b), i.set(h,
|
|
21381
|
+
var d = h.getAttribute(t), g = d !== null && d !== "false", b = (Ci.get(h) || 0) + 1, v = (i.get(h) || 0) + 1;
|
|
21382
|
+
Ci.set(h, b), i.set(h, v), o.push(h), b === 1 && g && CA.set(h, !0), v === 1 && h.setAttribute(a, "true"), g || h.setAttribute(t, "true");
|
|
21383
21383
|
} catch (I) {
|
|
21384
21384
|
console.error("aria-hidden: cannot operate on ", h, I);
|
|
21385
21385
|
}
|
|
@@ -21546,11 +21546,11 @@ var cv = PF(), Iu = function() {
|
|
|
21546
21546
|
onScrollCapture: Iu,
|
|
21547
21547
|
onWheelCapture: Iu,
|
|
21548
21548
|
onTouchMoveCapture: Iu
|
|
21549
|
-
}), n = t[0], i = t[1], o = r.forwardProps, A = r.children, s = r.className, f = r.removeScrollBar, u = r.enabled, c = r.shards, h = r.sideCar, d = r.noRelative, g = r.noIsolation, b = r.inert,
|
|
21549
|
+
}), n = t[0], i = t[1], o = r.forwardProps, A = r.children, s = r.className, f = r.removeScrollBar, u = r.enabled, c = r.shards, h = r.sideCar, d = r.noRelative, g = r.noIsolation, b = r.inert, v = r.allowPinchZoom, I = r.as, _ = I === void 0 ? "div" : I, N = r.gapMode, R = uv(r, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), C = h, P = $F([a, e]), V = rt(rt({}, R), n);
|
|
21550
21550
|
return p.createElement(
|
|
21551
21551
|
p.Fragment,
|
|
21552
21552
|
null,
|
|
21553
|
-
u && p.createElement(C, { sideCar: cv, removeScrollBar: f, shards: c, noRelative: d, noIsolation: g, inert: b, setCallbacks: i, allowPinchZoom: !!
|
|
21553
|
+
u && p.createElement(C, { sideCar: cv, removeScrollBar: f, shards: c, noRelative: d, noIsolation: g, inert: b, setCallbacks: i, allowPinchZoom: !!v, lockRef: a, gapMode: N }),
|
|
21554
21554
|
o ? p.cloneElement(p.Children.only(A), rt(rt({}, V), { ref: P })) : p.createElement(_, rt({}, V, { className: s, ref: P }), A)
|
|
21555
21555
|
);
|
|
21556
21556
|
});
|
|
@@ -21753,7 +21753,7 @@ var _i = el ? { passive: !1 } : !1, KF = function(r) {
|
|
|
21753
21753
|
do {
|
|
21754
21754
|
if (!A)
|
|
21755
21755
|
break;
|
|
21756
|
-
var d = mv(r, A), g = d[0], b = d[1],
|
|
21756
|
+
var d = mv(r, A), g = d[0], b = d[1], v = d[2], I = b - v - i * g;
|
|
21757
21757
|
(g || I) && bv(r, A) && (c += I, h += g);
|
|
21758
21758
|
var _ = A.parentNode;
|
|
21759
21759
|
A = _ && _.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? _.host : _;
|
|
@@ -21785,49 +21785,49 @@ function s$(r) {
|
|
|
21785
21785
|
if (r.inert) {
|
|
21786
21786
|
document.body.classList.add("block-interactivity-".concat(n));
|
|
21787
21787
|
var b = xF([r.lockRef.current], (r.shards || []).map(Qb), !0).filter(Boolean);
|
|
21788
|
-
return b.forEach(function(
|
|
21789
|
-
return
|
|
21788
|
+
return b.forEach(function(v) {
|
|
21789
|
+
return v.classList.add("allow-interactivity-".concat(n));
|
|
21790
21790
|
}), function() {
|
|
21791
|
-
document.body.classList.remove("block-interactivity-".concat(n)), b.forEach(function(
|
|
21792
|
-
return
|
|
21791
|
+
document.body.classList.remove("block-interactivity-".concat(n)), b.forEach(function(v) {
|
|
21792
|
+
return v.classList.remove("allow-interactivity-".concat(n));
|
|
21793
21793
|
});
|
|
21794
21794
|
};
|
|
21795
21795
|
}
|
|
21796
21796
|
}, [r.inert, r.lockRef.current, r.shards]);
|
|
21797
|
-
var A = p.useCallback(function(b,
|
|
21797
|
+
var A = p.useCallback(function(b, v) {
|
|
21798
21798
|
if ("touches" in b && b.touches.length === 2 || b.type === "wheel" && b.ctrlKey)
|
|
21799
21799
|
return !o.current.allowPinchZoom;
|
|
21800
21800
|
var I = BA(b), _ = a.current, N = "deltaX" in b ? b.deltaX : _[0] - I[0], R = "deltaY" in b ? b.deltaY : _[1] - I[1], C, P = b.target, V = Math.abs(N) > Math.abs(R) ? "h" : "v";
|
|
21801
21801
|
if ("touches" in b && V === "h" && P.type === "range")
|
|
21802
21802
|
return !1;
|
|
21803
|
-
var
|
|
21804
|
-
if (!
|
|
21803
|
+
var q = Yb(V, P);
|
|
21804
|
+
if (!q)
|
|
21805
21805
|
return !0;
|
|
21806
|
-
if (
|
|
21806
|
+
if (q ? C = V : (C = V === "v" ? "h" : "v", q = Yb(V, P)), !q)
|
|
21807
21807
|
return !1;
|
|
21808
21808
|
if (!t.current && "changedTouches" in b && (N || R) && (t.current = C), !C)
|
|
21809
21809
|
return !0;
|
|
21810
21810
|
var tr = t.current || C;
|
|
21811
|
-
return n$(tr,
|
|
21811
|
+
return n$(tr, v, b, tr === "h" ? N : R);
|
|
21812
21812
|
}, []), s = p.useCallback(function(b) {
|
|
21813
|
-
var
|
|
21813
|
+
var v = b;
|
|
21814
21814
|
if (!(!Ii.length || Ii[Ii.length - 1] !== i)) {
|
|
21815
|
-
var I = "deltaY" in
|
|
21816
|
-
return C.name ===
|
|
21815
|
+
var I = "deltaY" in v ? Hb(v) : BA(v), _ = e.current.filter(function(C) {
|
|
21816
|
+
return C.name === v.type && (C.target === v.target || v.target === C.shadowParent) && i$(C.delta, I);
|
|
21817
21817
|
})[0];
|
|
21818
21818
|
if (_ && _.should) {
|
|
21819
|
-
|
|
21819
|
+
v.cancelable && v.preventDefault();
|
|
21820
21820
|
return;
|
|
21821
21821
|
}
|
|
21822
21822
|
if (!_) {
|
|
21823
21823
|
var N = (o.current.shards || []).map(Qb).filter(Boolean).filter(function(C) {
|
|
21824
|
-
return C.contains(
|
|
21825
|
-
}), R = N.length > 0 ? A(
|
|
21826
|
-
R &&
|
|
21824
|
+
return C.contains(v.target);
|
|
21825
|
+
}), R = N.length > 0 ? A(v, N[0]) : !o.current.noIsolation;
|
|
21826
|
+
R && v.cancelable && v.preventDefault();
|
|
21827
21827
|
}
|
|
21828
21828
|
}
|
|
21829
|
-
}, []), f = p.useCallback(function(b,
|
|
21830
|
-
var N = { name: b, delta:
|
|
21829
|
+
}, []), f = p.useCallback(function(b, v, I, _) {
|
|
21830
|
+
var N = { name: b, delta: v, target: I, should: _, shadowParent: f$(I) };
|
|
21831
21831
|
e.current.push(N), setTimeout(function() {
|
|
21832
21832
|
e.current = e.current.filter(function(R) {
|
|
21833
21833
|
return R !== N;
|
|
@@ -22281,12 +22281,12 @@ function L$(r) {
|
|
|
22281
22281
|
else
|
|
22282
22282
|
for (var h = We(/* @__PURE__ */ new Date()), d = 0; d <= 11; d++)
|
|
22283
22283
|
c.push(uu(h, d));
|
|
22284
|
-
var g = function(
|
|
22285
|
-
var I = Number(
|
|
22284
|
+
var g = function(v) {
|
|
22285
|
+
var I = Number(v.target.value), _ = uu(We(r.displayMonth), I);
|
|
22286
22286
|
r.onChange(_);
|
|
22287
22287
|
}, b = (e = f == null ? void 0 : f.Dropdown) !== null && e !== void 0 ? e : Zv;
|
|
22288
|
-
return l(b, { name: "months", "aria-label": u(), className: s.dropdown_month, style: i.dropdown_month, onChange: g, value: r.displayMonth.getMonth(), caption: A(r.displayMonth, { locale: o }), children: c.map(function(
|
|
22289
|
-
return l("option", { value:
|
|
22288
|
+
return l(b, { name: "months", "aria-label": u(), className: s.dropdown_month, style: i.dropdown_month, onChange: g, value: r.displayMonth.getMonth(), caption: A(r.displayMonth, { locale: o }), children: c.map(function(v) {
|
|
22289
|
+
return l("option", { value: v.getMonth(), children: A(v, { locale: o }) }, v.getMonth());
|
|
22290
22290
|
}) });
|
|
22291
22291
|
}
|
|
22292
22292
|
function U$(r) {
|
|
@@ -22297,11 +22297,11 @@ function U$(r) {
|
|
|
22297
22297
|
return l($0, {});
|
|
22298
22298
|
for (var d = n.getFullYear(), g = i.getFullYear(), b = d; b <= g; b++)
|
|
22299
22299
|
h.push($h(tm(/* @__PURE__ */ new Date()), b));
|
|
22300
|
-
var
|
|
22300
|
+
var v = function(_) {
|
|
22301
22301
|
var N = $h(We(a), Number(_.target.value));
|
|
22302
22302
|
r.onChange(N);
|
|
22303
22303
|
}, I = (e = f == null ? void 0 : f.Dropdown) !== null && e !== void 0 ? e : Zv;
|
|
22304
|
-
return l(I, { name: "years", "aria-label": c(), className: s.dropdown_year, style: A.dropdown_year, onChange:
|
|
22304
|
+
return l(I, { name: "years", "aria-label": c(), className: s.dropdown_year, style: A.dropdown_year, onChange: v, value: a.getFullYear(), caption: u(a, { locale: o }), children: h.map(function(_) {
|
|
22305
22305
|
return l("option", { value: _.getFullYear(), children: u(_, { locale: o }) }, _.getFullYear());
|
|
22306
22306
|
}) });
|
|
22307
22307
|
}
|
|
@@ -22407,8 +22407,8 @@ function aW(r) {
|
|
|
22407
22407
|
].join(" "), g = u(r.nextMonth, { locale: i }), b = [
|
|
22408
22408
|
o.nav_button,
|
|
22409
22409
|
o.nav_button_next
|
|
22410
|
-
].join(" "),
|
|
22411
|
-
return M("div", { className: o.nav, style: A.nav, children: [!r.hidePrevious && l(Es, { name: "previous-month", "aria-label": h, className: d, style: A.nav_button_previous, disabled: !r.previousMonth, onClick: r.onPreviousClick, children: n === "rtl" ? l(
|
|
22410
|
+
].join(" "), v = (e = c == null ? void 0 : c.IconRight) !== null && e !== void 0 ? e : eW, I = (a = c == null ? void 0 : c.IconLeft) !== null && a !== void 0 ? a : rW;
|
|
22411
|
+
return M("div", { className: o.nav, style: A.nav, children: [!r.hidePrevious && l(Es, { name: "previous-month", "aria-label": h, className: d, style: A.nav_button_previous, disabled: !r.previousMonth, onClick: r.onPreviousClick, children: n === "rtl" ? l(v, { className: o.nav_icon, style: A.nav_icon }) : l(I, { className: o.nav_icon, style: A.nav_icon }) }), !r.hideNext && l(Es, { name: "next-month", "aria-label": g, className: b, style: A.nav_button_next, disabled: !r.nextMonth, onClick: r.onNextClick, children: n === "rtl" ? l(I, { className: o.nav_icon, style: A.nav_icon }) : l(v, { className: o.nav_icon, style: A.nav_icon }) })] });
|
|
22412
22412
|
}
|
|
22413
22413
|
function zb(r) {
|
|
22414
22414
|
var e = _0().numberOfMonths, a = uA(), t = a.previousMonth, n = a.nextMonth, i = a.goToMonth, o = a.displayMonths, A = o.findIndex(function(g) {
|
|
@@ -22470,15 +22470,15 @@ function uW(r) {
|
|
|
22470
22470
|
if (!g) {
|
|
22471
22471
|
var b = !!(!u.selected && i && (t == null ? void 0 : t.length) === i);
|
|
22472
22472
|
if (!b) {
|
|
22473
|
-
var
|
|
22473
|
+
var v = t ? Nv([], t) : [];
|
|
22474
22474
|
if (u.selected) {
|
|
22475
|
-
var I =
|
|
22475
|
+
var I = v.findIndex(function(_) {
|
|
22476
22476
|
return Se(f, _);
|
|
22477
22477
|
});
|
|
22478
|
-
|
|
22478
|
+
v.splice(I, 1);
|
|
22479
22479
|
} else
|
|
22480
|
-
|
|
22481
|
-
(d = e.onSelect) === null || d === void 0 || d.call(e,
|
|
22480
|
+
v.push(f);
|
|
22481
|
+
(d = e.onSelect) === null || d === void 0 || d.call(e, v, f, u, c);
|
|
22482
22482
|
}
|
|
22483
22483
|
}
|
|
22484
22484
|
}, A = {
|
|
@@ -22525,8 +22525,8 @@ function cW(r) {
|
|
|
22525
22525
|
}
|
|
22526
22526
|
function dW(r) {
|
|
22527
22527
|
var e = r.initialProps, a = r.children, t = e.selected, n = t || {}, i = n.from, o = n.to, A = e.min, s = e.max, f = function(d, g, b) {
|
|
22528
|
-
var
|
|
22529
|
-
(
|
|
22528
|
+
var v, I;
|
|
22529
|
+
(v = e.onDayClick) === null || v === void 0 || v.call(e, d, g, b);
|
|
22530
22530
|
var _ = lW(d, t);
|
|
22531
22531
|
(I = e.onSelect) === null || I === void 0 || I.call(e, _, d, g, b);
|
|
22532
22532
|
}, u = {
|
|
@@ -22685,11 +22685,11 @@ function Wv(r, e) {
|
|
|
22685
22685
|
week: $1,
|
|
22686
22686
|
month: Fa,
|
|
22687
22687
|
year: am,
|
|
22688
|
-
startOfWeek: function(
|
|
22689
|
-
return n.ISOWeek ? oi(
|
|
22688
|
+
startOfWeek: function(v) {
|
|
22689
|
+
return n.ISOWeek ? oi(v) : ot(v, { locale: c, weekStartsOn: s });
|
|
22690
22690
|
},
|
|
22691
|
-
endOfWeek: function(
|
|
22692
|
-
return n.ISOWeek ? nm(
|
|
22691
|
+
endOfWeek: function(v) {
|
|
22692
|
+
return n.ISOWeek ? nm(v) : yc(v, { locale: c, weekStartsOn: s });
|
|
22693
22693
|
}
|
|
22694
22694
|
}, d = h[a](r, t === "after" ? 1 : -1);
|
|
22695
22695
|
t === "before" && f ? d = VI([f, d]) : t === "after" && u && (d = MI([u, d]));
|
|
@@ -22710,12 +22710,12 @@ var Tv = gn(void 0);
|
|
|
22710
22710
|
function SW(r) {
|
|
22711
22711
|
var e = uA(), a = $v(), t = n0(), n = t[0], i = t[1], o = n0(), A = o[0], s = o[1], f = RW(e.displayMonths, a), u = n ?? (A && e.isDateDisplayed(A)) ? A : f, c = function() {
|
|
22712
22712
|
s(n), i(void 0);
|
|
22713
|
-
}, h = function(
|
|
22714
|
-
i(
|
|
22715
|
-
}, d = _0(), g = function(
|
|
22713
|
+
}, h = function(v) {
|
|
22714
|
+
i(v);
|
|
22715
|
+
}, d = _0(), g = function(v, I) {
|
|
22716
22716
|
if (n) {
|
|
22717
22717
|
var _ = Wv(n, {
|
|
22718
|
-
moveBy:
|
|
22718
|
+
moveBy: v,
|
|
22719
22719
|
direction: I,
|
|
22720
22720
|
context: d,
|
|
22721
22721
|
modifiers: a
|
|
@@ -22801,44 +22801,44 @@ function Pv() {
|
|
|
22801
22801
|
return r;
|
|
22802
22802
|
}
|
|
22803
22803
|
function TW(r, e) {
|
|
22804
|
-
var a = _0(), t = Pv(), n = Tc(), i = Oc(), o = Vc(), A = o.focusDayAfter, s = o.focusDayBefore, f = o.focusWeekAfter, u = o.focusWeekBefore, c = o.blur, h = o.focus, d = o.focusMonthBefore, g = o.focusMonthAfter, b = o.focusYearBefore,
|
|
22805
|
-
var
|
|
22806
|
-
cf(a) ? (
|
|
22804
|
+
var a = _0(), t = Pv(), n = Tc(), i = Oc(), o = Vc(), A = o.focusDayAfter, s = o.focusDayBefore, f = o.focusWeekAfter, u = o.focusWeekBefore, c = o.blur, h = o.focus, d = o.focusMonthBefore, g = o.focusMonthAfter, b = o.focusYearBefore, v = o.focusYearAfter, I = o.focusStartOfWeek, _ = o.focusEndOfWeek, N = function(O) {
|
|
22805
|
+
var m, w, y, k;
|
|
22806
|
+
cf(a) ? (m = t.onDayClick) === null || m === void 0 || m.call(t, r, e, O) : sA(a) ? (w = n.onDayClick) === null || w === void 0 || w.call(n, r, e, O) : fA(a) ? (y = i.onDayClick) === null || y === void 0 || y.call(i, r, e, O) : (k = a.onDayClick) === null || k === void 0 || k.call(a, r, e, O);
|
|
22807
22807
|
}, R = function(O) {
|
|
22808
|
-
var
|
|
22809
|
-
h(r), (
|
|
22808
|
+
var m;
|
|
22809
|
+
h(r), (m = a.onDayFocus) === null || m === void 0 || m.call(a, r, e, O);
|
|
22810
22810
|
}, C = function(O) {
|
|
22811
|
-
var
|
|
22812
|
-
c(), (
|
|
22811
|
+
var m;
|
|
22812
|
+
c(), (m = a.onDayBlur) === null || m === void 0 || m.call(a, r, e, O);
|
|
22813
22813
|
}, P = function(O) {
|
|
22814
|
-
var
|
|
22815
|
-
(
|
|
22814
|
+
var m;
|
|
22815
|
+
(m = a.onDayMouseEnter) === null || m === void 0 || m.call(a, r, e, O);
|
|
22816
22816
|
}, V = function(O) {
|
|
22817
|
-
var
|
|
22818
|
-
(
|
|
22819
|
-
},
|
|
22820
|
-
var
|
|
22821
|
-
(
|
|
22817
|
+
var m;
|
|
22818
|
+
(m = a.onDayMouseLeave) === null || m === void 0 || m.call(a, r, e, O);
|
|
22819
|
+
}, q = function(O) {
|
|
22820
|
+
var m;
|
|
22821
|
+
(m = a.onDayPointerEnter) === null || m === void 0 || m.call(a, r, e, O);
|
|
22822
22822
|
}, tr = function(O) {
|
|
22823
|
-
var
|
|
22824
|
-
(
|
|
22823
|
+
var m;
|
|
22824
|
+
(m = a.onDayPointerLeave) === null || m === void 0 || m.call(a, r, e, O);
|
|
22825
22825
|
}, X = function(O) {
|
|
22826
|
-
var
|
|
22827
|
-
(
|
|
22826
|
+
var m;
|
|
22827
|
+
(m = a.onDayTouchCancel) === null || m === void 0 || m.call(a, r, e, O);
|
|
22828
22828
|
}, er = function(O) {
|
|
22829
|
-
var
|
|
22830
|
-
(
|
|
22829
|
+
var m;
|
|
22830
|
+
(m = a.onDayTouchEnd) === null || m === void 0 || m.call(a, r, e, O);
|
|
22831
22831
|
}, Y = function(O) {
|
|
22832
|
-
var
|
|
22833
|
-
(
|
|
22832
|
+
var m;
|
|
22833
|
+
(m = a.onDayTouchMove) === null || m === void 0 || m.call(a, r, e, O);
|
|
22834
22834
|
}, ar = function(O) {
|
|
22835
|
-
var
|
|
22836
|
-
(
|
|
22835
|
+
var m;
|
|
22836
|
+
(m = a.onDayTouchStart) === null || m === void 0 || m.call(a, r, e, O);
|
|
22837
22837
|
}, $ = function(O) {
|
|
22838
|
-
var
|
|
22839
|
-
(
|
|
22838
|
+
var m;
|
|
22839
|
+
(m = a.onDayKeyUp) === null || m === void 0 || m.call(a, r, e, O);
|
|
22840
22840
|
}, J = function(O) {
|
|
22841
|
-
var
|
|
22841
|
+
var m;
|
|
22842
22842
|
switch (O.key) {
|
|
22843
22843
|
case "ArrowLeft":
|
|
22844
22844
|
O.preventDefault(), O.stopPropagation(), a.dir === "rtl" ? A() : s();
|
|
@@ -22856,7 +22856,7 @@ function TW(r, e) {
|
|
|
22856
22856
|
O.preventDefault(), O.stopPropagation(), O.shiftKey ? b() : d();
|
|
22857
22857
|
break;
|
|
22858
22858
|
case "PageDown":
|
|
22859
|
-
O.preventDefault(), O.stopPropagation(), O.shiftKey ?
|
|
22859
|
+
O.preventDefault(), O.stopPropagation(), O.shiftKey ? v() : g();
|
|
22860
22860
|
break;
|
|
22861
22861
|
case "Home":
|
|
22862
22862
|
O.preventDefault(), O.stopPropagation(), I();
|
|
@@ -22865,7 +22865,7 @@ function TW(r, e) {
|
|
|
22865
22865
|
O.preventDefault(), O.stopPropagation(), _();
|
|
22866
22866
|
break;
|
|
22867
22867
|
}
|
|
22868
|
-
(
|
|
22868
|
+
(m = a.onDayKeyDown) === null || m === void 0 || m.call(a, r, e, O);
|
|
22869
22869
|
}, L = {
|
|
22870
22870
|
onClick: N,
|
|
22871
22871
|
onFocus: R,
|
|
@@ -22874,7 +22874,7 @@ function TW(r, e) {
|
|
|
22874
22874
|
onKeyUp: $,
|
|
22875
22875
|
onMouseEnter: P,
|
|
22876
22876
|
onMouseLeave: V,
|
|
22877
|
-
onPointerEnter:
|
|
22877
|
+
onPointerEnter: q,
|
|
22878
22878
|
onPointerLeave: tr,
|
|
22879
22879
|
onTouchCancel: X,
|
|
22880
22880
|
onTouchEnd: er,
|
|
@@ -22921,10 +22921,10 @@ function MW(r, e, a) {
|
|
|
22921
22921
|
c,
|
|
22922
22922
|
s.outside
|
|
22923
22923
|
]);
|
|
22924
|
-
var h = DW(o, s).join(" "), d = VW(o, s), g = !!(s.outside && !o.showOutsideDays || s.hidden), b = (i = (n = o.components) === null || n === void 0 ? void 0 : n.DayContent) !== null && i !== void 0 ? i : sW,
|
|
22924
|
+
var h = DW(o, s).join(" "), d = VW(o, s), g = !!(s.outside && !o.showOutsideDays || s.hidden), b = (i = (n = o.components) === null || n === void 0 ? void 0 : n.DayContent) !== null && i !== void 0 ? i : sW, v = l(b, { date: r, displayMonth: e, activeModifiers: s }), I = {
|
|
22925
22925
|
style: d,
|
|
22926
22926
|
className: h,
|
|
22927
|
-
children:
|
|
22927
|
+
children: v,
|
|
22928
22928
|
role: "gridcell"
|
|
22929
22929
|
}, _ = A.focusTarget && Se(A.focusTarget, r) && !s.outside, N = A.focusedDay && Se(A.focusedDay, r), R = Wr(Wr(Wr({}, I), (t = { disabled: s.disabled, role: "gridcell" }, t["aria-selected"] = s.selected, t.tabIndex = N || _ ? 0 : -1, t)), f), C = {
|
|
22930
22930
|
isButton: c,
|
|
@@ -22987,9 +22987,9 @@ function UW(r) {
|
|
|
22987
22987
|
locale: i,
|
|
22988
22988
|
weekStartsOn: c,
|
|
22989
22989
|
firstWeekContainsDate: h
|
|
22990
|
-
}), b = (e = u == null ? void 0 : u.Head) !== null && e !== void 0 ? e : AW,
|
|
22990
|
+
}), b = (e = u == null ? void 0 : u.Head) !== null && e !== void 0 ? e : AW, v = (a = u == null ? void 0 : u.Row) !== null && a !== void 0 ? a : jW, I = (t = u == null ? void 0 : u.Footer) !== null && t !== void 0 ? t : nW;
|
|
22991
22991
|
return M("table", { id: r.id, className: o.table, style: A.table, role: "grid", "aria-labelledby": r["aria-labelledby"], children: [!s && l(b, {}), l("tbody", { className: o.tbody, style: A.tbody, children: g.map(function(_) {
|
|
22992
|
-
return l(
|
|
22992
|
+
return l(v, { displayMonth: r.displayMonth, dates: _.dates, weekNumber: _.weekNumber }, _.weekNumber);
|
|
22993
22993
|
}) }), l(I, { displayMonth: r.displayMonth })] });
|
|
22994
22994
|
}
|
|
22995
22995
|
function YW() {
|
|
@@ -23010,8 +23010,8 @@ function JW(r) {
|
|
|
23010
23010
|
function zW(r) {
|
|
23011
23011
|
var e, a, t = _0(), n = t.dir, i = t.classNames, o = t.styles, A = t.components, s = uA().displayMonths, f = JW(t.id ? "".concat(t.id, "-").concat(r.displayIndex) : void 0), u = t.id ? "".concat(t.id, "-grid-").concat(r.displayIndex) : void 0, c = [i.month], h = o.month, d = r.displayIndex === 0, g = r.displayIndex === s.length - 1, b = !d && !g;
|
|
23012
23012
|
n === "rtl" && (e = [d, g], g = e[0], d = e[1]), d && (c.push(i.caption_start), h = Wr(Wr({}, h), o.caption_start)), g && (c.push(i.caption_end), h = Wr(Wr({}, h), o.caption_end)), b && (c.push(i.caption_between), h = Wr(Wr({}, h), o.caption_between));
|
|
23013
|
-
var
|
|
23014
|
-
return M("div", { className: c.join(" "), style: h, children: [l(
|
|
23013
|
+
var v = (a = A == null ? void 0 : A.Caption) !== null && a !== void 0 ? a : tW;
|
|
23014
|
+
return M("div", { className: c.join(" "), style: h, children: [l(v, { id: f, displayMonth: r.displayMonth, displayIndex: r.displayIndex }), l(UW, { id: u, "aria-labelledby": f, displayMonth: r.displayMonth })] }, r.displayIndex);
|
|
23015
23015
|
}
|
|
23016
23016
|
function KW(r) {
|
|
23017
23017
|
var e = _0(), a = e.classNames, t = e.styles;
|
|
@@ -23033,8 +23033,8 @@ function qW(r) {
|
|
|
23033
23033
|
var c = Wr(Wr({}, n.styles.root), n.style), h = Object.keys(t).filter(function(g) {
|
|
23034
23034
|
return g.startsWith("data-");
|
|
23035
23035
|
}).reduce(function(g, b) {
|
|
23036
|
-
var
|
|
23037
|
-
return Wr(Wr({}, g), (
|
|
23036
|
+
var v;
|
|
23037
|
+
return Wr(Wr({}, g), (v = {}, v[b] = t[b], v));
|
|
23038
23038
|
}, {}), d = (a = (e = t.components) === null || e === void 0 ? void 0 : e.Months) !== null && a !== void 0 ? a : KW;
|
|
23039
23039
|
return l("div", Wr({ className: u.join(" "), style: c, dir: n.dir, id: n.id, nonce: t.nonce, title: t.title, lang: t.lang }, h, { children: l(d, { children: o.displayMonths.map(function(g, b) {
|
|
23040
23040
|
return l(zW, { displayIndex: b, displayMonth: g }, b);
|
|
@@ -23078,7 +23078,7 @@ var iT = [" ", "Enter", "ArrowUp", "ArrowDown"], oT = [" ", "Enter"], Ai = "Sele
|
|
|
23078
23078
|
disabled: h,
|
|
23079
23079
|
required: d,
|
|
23080
23080
|
form: g
|
|
23081
|
-
} = r, b = bf(e), [
|
|
23081
|
+
} = r, b = bf(e), [v, I] = p.useState(null), [_, N] = p.useState(null), [R, C] = p.useState(!1), P = tT(f), [V, q] = ho({
|
|
23082
23082
|
prop: t,
|
|
23083
23083
|
defaultProp: n ?? !1,
|
|
23084
23084
|
onChange: i,
|
|
@@ -23088,13 +23088,13 @@ var iT = [" ", "Enter", "ArrowUp", "ArrowDown"], oT = [" ", "Enter"], Ai = "Sele
|
|
|
23088
23088
|
defaultProp: A,
|
|
23089
23089
|
onChange: s,
|
|
23090
23090
|
caller: Ai
|
|
23091
|
-
}), er = p.useRef(null), Y =
|
|
23091
|
+
}), er = p.useRef(null), Y = v ? g || !!v.closest("form") : !0, [ar, $] = p.useState(/* @__PURE__ */ new Set()), J = Array.from(ar).map((L) => L.props.value).join(";");
|
|
23092
23092
|
return /* @__PURE__ */ l(U8, { ...b, children: /* @__PURE__ */ M(
|
|
23093
23093
|
sT,
|
|
23094
23094
|
{
|
|
23095
23095
|
required: d,
|
|
23096
23096
|
scope: e,
|
|
23097
|
-
trigger:
|
|
23097
|
+
trigger: v,
|
|
23098
23098
|
onTriggerChange: I,
|
|
23099
23099
|
valueNode: _,
|
|
23100
23100
|
onValueNodeChange: N,
|
|
@@ -23104,7 +23104,7 @@ var iT = [" ", "Enter", "ArrowUp", "ArrowDown"], oT = [" ", "Enter"], Ai = "Sele
|
|
|
23104
23104
|
value: tr,
|
|
23105
23105
|
onValueChange: X,
|
|
23106
23106
|
open: V,
|
|
23107
|
-
onOpenChange:
|
|
23107
|
+
onOpenChange: q,
|
|
23108
23108
|
dir: P,
|
|
23109
23109
|
triggerPointerDownPosRef: er,
|
|
23110
23110
|
disabled: h,
|
|
@@ -23118,8 +23118,8 @@ var iT = [" ", "Enter", "ArrowUp", "ArrowDown"], oT = [" ", "Enter"], Ai = "Sele
|
|
|
23118
23118
|
}, []),
|
|
23119
23119
|
onNativeOptionRemove: p.useCallback((L) => {
|
|
23120
23120
|
$((O) => {
|
|
23121
|
-
const
|
|
23122
|
-
return
|
|
23121
|
+
const m = new Set(O);
|
|
23122
|
+
return m.delete(L), m;
|
|
23123
23123
|
});
|
|
23124
23124
|
}, []),
|
|
23125
23125
|
children: a
|
|
@@ -23152,7 +23152,7 @@ Ov.displayName = Ai;
|
|
|
23152
23152
|
var Dv = "SelectTrigger", Vv = p.forwardRef(
|
|
23153
23153
|
(r, e) => {
|
|
23154
23154
|
const { __scopeSelect: a, disabled: t = !1, ...n } = r, i = bf(a), o = En(Dv, a), A = o.disabled || t, s = k0(e, o.onTriggerChange), f = hf(a), u = p.useRef("touch"), [c, h, d] = ug((b) => {
|
|
23155
|
-
const
|
|
23155
|
+
const v = f().filter((N) => !N.disabled), I = v.find((N) => N.value === o.value), _ = lg(v, b, I);
|
|
23156
23156
|
_ !== void 0 && o.onValueChange(_.value);
|
|
23157
23157
|
}), g = (b) => {
|
|
23158
23158
|
A || (o.onOpenChange(!0), d()), b && (o.triggerPointerDownPosRef.current = {
|
|
@@ -23181,12 +23181,12 @@ var Dv = "SelectTrigger", Vv = p.forwardRef(
|
|
|
23181
23181
|
}),
|
|
23182
23182
|
onPointerDown: Pr(n.onPointerDown, (b) => {
|
|
23183
23183
|
u.current = b.pointerType;
|
|
23184
|
-
const
|
|
23185
|
-
|
|
23184
|
+
const v = b.target;
|
|
23185
|
+
v.hasPointerCapture(b.pointerId) && v.releasePointerCapture(b.pointerId), b.button === 0 && b.ctrlKey === !1 && b.pointerType === "mouse" && (g(b), b.preventDefault());
|
|
23186
23186
|
}),
|
|
23187
23187
|
onKeyDown: Pr(n.onKeyDown, (b) => {
|
|
23188
|
-
const
|
|
23189
|
-
!(b.ctrlKey || b.altKey || b.metaKey) && b.key.length === 1 && h(b.key), !(
|
|
23188
|
+
const v = c.current !== "";
|
|
23189
|
+
!(b.ctrlKey || b.altKey || b.metaKey) && b.key.length === 1 && h(b.key), !(v && b.key === " ") && iT.includes(b.key) && (g(), b.preventDefault());
|
|
23190
23190
|
})
|
|
23191
23191
|
}
|
|
23192
23192
|
) });
|
|
@@ -23254,10 +23254,10 @@ var wa = 10, [Uv, Cn] = W2(si), dT = "SelectContentImpl", hT = /* @__PURE__ */ q
|
|
|
23254
23254
|
collisionPadding: d,
|
|
23255
23255
|
sticky: g,
|
|
23256
23256
|
hideWhenDetached: b,
|
|
23257
|
-
avoidCollisions:
|
|
23257
|
+
avoidCollisions: v,
|
|
23258
23258
|
//
|
|
23259
23259
|
...I
|
|
23260
|
-
} = r, _ = En(si, a), [N, R] = p.useState(null), [C, P] = p.useState(null), V = k0(e, (F) => R(F)), [
|
|
23260
|
+
} = r, _ = En(si, a), [N, R] = p.useState(null), [C, P] = p.useState(null), V = k0(e, (F) => R(F)), [q, tr] = p.useState(null), [X, er] = p.useState(
|
|
23261
23261
|
null
|
|
23262
23262
|
), Y = hf(a), [ar, $] = p.useState(!1), J = p.useRef(!1);
|
|
23263
23263
|
p.useEffect(() => {
|
|
@@ -23265,43 +23265,43 @@ var wa = 10, [Uv, Cn] = W2(si), dT = "SelectContentImpl", hT = /* @__PURE__ */ q
|
|
|
23265
23265
|
}, [N]), Sc();
|
|
23266
23266
|
const L = p.useCallback(
|
|
23267
23267
|
(F) => {
|
|
23268
|
-
const [U, ...K] = Y().map((T) => T.ref.current), [H] = K.slice(-1),
|
|
23268
|
+
const [U, ...K] = Y().map((T) => T.ref.current), [H] = K.slice(-1), rr = document.activeElement;
|
|
23269
23269
|
for (const T of F)
|
|
23270
|
-
if (T ===
|
|
23270
|
+
if (T === rr || (T == null || T.scrollIntoView({ block: "nearest" }), T === U && C && (C.scrollTop = 0), T === H && C && (C.scrollTop = C.scrollHeight), T == null || T.focus(), document.activeElement !== rr)) return;
|
|
23271
23271
|
},
|
|
23272
23272
|
[Y, C]
|
|
23273
23273
|
), O = p.useCallback(
|
|
23274
|
-
() => L([
|
|
23275
|
-
[L,
|
|
23274
|
+
() => L([q, N]),
|
|
23275
|
+
[L, q, N]
|
|
23276
23276
|
);
|
|
23277
23277
|
p.useEffect(() => {
|
|
23278
23278
|
ar && O();
|
|
23279
23279
|
}, [ar, O]);
|
|
23280
|
-
const { onOpenChange:
|
|
23280
|
+
const { onOpenChange: m, triggerPointerDownPosRef: w } = _;
|
|
23281
23281
|
p.useEffect(() => {
|
|
23282
23282
|
if (N) {
|
|
23283
23283
|
let F = { x: 0, y: 0 };
|
|
23284
23284
|
const U = (H) => {
|
|
23285
|
-
var
|
|
23285
|
+
var rr, T;
|
|
23286
23286
|
F = {
|
|
23287
|
-
x: Math.abs(Math.round(H.pageX) - (((
|
|
23287
|
+
x: Math.abs(Math.round(H.pageX) - (((rr = w.current) == null ? void 0 : rr.x) ?? 0)),
|
|
23288
23288
|
y: Math.abs(Math.round(H.pageY) - (((T = w.current) == null ? void 0 : T.y) ?? 0))
|
|
23289
23289
|
};
|
|
23290
23290
|
}, K = (H) => {
|
|
23291
|
-
F.x <= 10 && F.y <= 10 ? H.preventDefault() : N.contains(H.target) ||
|
|
23291
|
+
F.x <= 10 && F.y <= 10 ? H.preventDefault() : N.contains(H.target) || m(!1), document.removeEventListener("pointermove", U), w.current = null;
|
|
23292
23292
|
};
|
|
23293
23293
|
return w.current !== null && (document.addEventListener("pointermove", U), document.addEventListener("pointerup", K, { capture: !0, once: !0 })), () => {
|
|
23294
23294
|
document.removeEventListener("pointermove", U), document.removeEventListener("pointerup", K, { capture: !0 });
|
|
23295
23295
|
};
|
|
23296
23296
|
}
|
|
23297
|
-
}, [N,
|
|
23298
|
-
const F = () =>
|
|
23297
|
+
}, [N, m, w]), p.useEffect(() => {
|
|
23298
|
+
const F = () => m(!1);
|
|
23299
23299
|
return window.addEventListener("blur", F), window.addEventListener("resize", F), () => {
|
|
23300
23300
|
window.removeEventListener("blur", F), window.removeEventListener("resize", F);
|
|
23301
23301
|
};
|
|
23302
|
-
}, [
|
|
23302
|
+
}, [m]);
|
|
23303
23303
|
const [y, k] = ug((F) => {
|
|
23304
|
-
const U = Y().filter((
|
|
23304
|
+
const U = Y().filter((rr) => !rr.disabled), K = U.find((rr) => rr.ref.current === document.activeElement), H = lg(U, F, K);
|
|
23305
23305
|
H && setTimeout(() => H.ref.current.focus());
|
|
23306
23306
|
}), E = p.useCallback(
|
|
23307
23307
|
(F, U, K) => {
|
|
@@ -23325,7 +23325,7 @@ var wa = 10, [Uv, Cn] = W2(si), dT = "SelectContentImpl", hT = /* @__PURE__ */ q
|
|
|
23325
23325
|
collisionPadding: d,
|
|
23326
23326
|
sticky: g,
|
|
23327
23327
|
hideWhenDetached: b,
|
|
23328
|
-
avoidCollisions:
|
|
23328
|
+
avoidCollisions: v
|
|
23329
23329
|
} : {};
|
|
23330
23330
|
return /* @__PURE__ */ l(
|
|
23331
23331
|
Uv,
|
|
@@ -23335,7 +23335,7 @@ var wa = 10, [Uv, Cn] = W2(si), dT = "SelectContentImpl", hT = /* @__PURE__ */ q
|
|
|
23335
23335
|
viewport: C,
|
|
23336
23336
|
onViewportChange: P,
|
|
23337
23337
|
itemRefCallback: E,
|
|
23338
|
-
selectedItem:
|
|
23338
|
+
selectedItem: q,
|
|
23339
23339
|
onItemLeave: x,
|
|
23340
23340
|
itemTextRefCallback: B,
|
|
23341
23341
|
focusSelectedItem: O,
|
|
@@ -23387,9 +23387,9 @@ var wa = 10, [Uv, Cn] = W2(si), dT = "SelectContentImpl", hT = /* @__PURE__ */ q
|
|
|
23387
23387
|
onKeyDown: Pr(I.onKeyDown, (F) => {
|
|
23388
23388
|
const U = F.ctrlKey || F.altKey || F.metaKey;
|
|
23389
23389
|
if (F.key === "Tab" && F.preventDefault(), !U && F.key.length === 1 && k(F.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(F.key)) {
|
|
23390
|
-
let H = Y().filter((
|
|
23390
|
+
let H = Y().filter((rr) => !rr.disabled).map((rr) => rr.ref.current);
|
|
23391
23391
|
if (["ArrowUp", "End"].includes(F.key) && (H = H.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(F.key)) {
|
|
23392
|
-
const
|
|
23392
|
+
const rr = F.target, T = H.indexOf(rr);
|
|
23393
23393
|
H = H.slice(T + 1);
|
|
23394
23394
|
}
|
|
23395
23395
|
setTimeout(() => L(H)), F.preventDefault();
|
|
@@ -23407,11 +23407,11 @@ var wa = 10, [Uv, Cn] = W2(si), dT = "SelectContentImpl", hT = /* @__PURE__ */ q
|
|
|
23407
23407
|
);
|
|
23408
23408
|
Yv.displayName = dT;
|
|
23409
23409
|
var bT = "SelectItemAlignedPosition", Hv = p.forwardRef((r, e) => {
|
|
23410
|
-
const { __scopeSelect: a, onPlaced: t, ...n } = r, i = En(si, a), o = Cn(si, a), [A, s] = p.useState(null), [f, u] = p.useState(null), c = k0(e, (V) => u(V)), h = hf(a), d = p.useRef(!1), g = p.useRef(!0), { viewport: b, selectedItem:
|
|
23411
|
-
if (i.trigger && i.valueNode && A && f && b &&
|
|
23412
|
-
const V = i.trigger.getBoundingClientRect(),
|
|
23410
|
+
const { __scopeSelect: a, onPlaced: t, ...n } = r, i = En(si, a), o = Cn(si, a), [A, s] = p.useState(null), [f, u] = p.useState(null), c = k0(e, (V) => u(V)), h = hf(a), d = p.useRef(!1), g = p.useRef(!0), { viewport: b, selectedItem: v, selectedItemText: I, focusSelectedItem: _ } = o, N = p.useCallback(() => {
|
|
23411
|
+
if (i.trigger && i.valueNode && A && f && b && v && I) {
|
|
23412
|
+
const V = i.trigger.getBoundingClientRect(), q = f.getBoundingClientRect(), tr = i.valueNode.getBoundingClientRect(), X = I.getBoundingClientRect();
|
|
23413
23413
|
if (i.dir !== "rtl") {
|
|
23414
|
-
const
|
|
23414
|
+
const rr = X.left - q.left, T = tr.left - rr, nr = V.left - T, pr = V.width + nr, Ir = Math.max(pr, q.width), Br = window.innerWidth - wa, wr = r3(T, [
|
|
23415
23415
|
wa,
|
|
23416
23416
|
// Prevents the content from going off the starting edge of the
|
|
23417
23417
|
// viewport. It may still go off the ending edge, but this can be
|
|
@@ -23422,29 +23422,29 @@ var bT = "SelectItemAlignedPosition", Hv = p.forwardRef((r, e) => {
|
|
|
23422
23422
|
]);
|
|
23423
23423
|
A.style.minWidth = pr + "px", A.style.left = wr + "px";
|
|
23424
23424
|
} else {
|
|
23425
|
-
const
|
|
23425
|
+
const rr = q.right - X.right, T = window.innerWidth - tr.right - rr, nr = window.innerWidth - V.right - T, pr = V.width + nr, Ir = Math.max(pr, q.width), Br = window.innerWidth - wa, wr = r3(T, [
|
|
23426
23426
|
wa,
|
|
23427
23427
|
Math.max(wa, Br - Ir)
|
|
23428
23428
|
]);
|
|
23429
23429
|
A.style.minWidth = pr + "px", A.style.right = wr + "px";
|
|
23430
23430
|
}
|
|
23431
|
-
const er = h(), Y = window.innerHeight - wa * 2, ar = b.scrollHeight, $ = window.getComputedStyle(f), J = parseInt($.borderTopWidth, 10), L = parseInt($.paddingTop, 10), O = parseInt($.borderBottomWidth, 10),
|
|
23431
|
+
const er = h(), Y = window.innerHeight - wa * 2, ar = b.scrollHeight, $ = window.getComputedStyle(f), J = parseInt($.borderTopWidth, 10), L = parseInt($.paddingTop, 10), O = parseInt($.borderBottomWidth, 10), m = parseInt($.paddingBottom, 10), w = J + L + ar + m + O, y = Math.min(v.offsetHeight * 5, w), k = window.getComputedStyle(b), E = parseInt(k.paddingTop, 10), x = parseInt(k.paddingBottom, 10), B = V.top + V.height / 2 - wa, Z = Y - B, W = v.offsetHeight / 2, F = v.offsetTop + W, U = J + L + F, K = w - U;
|
|
23432
23432
|
if (U <= B) {
|
|
23433
|
-
const
|
|
23433
|
+
const rr = er.length > 0 && v === er[er.length - 1].ref.current;
|
|
23434
23434
|
A.style.bottom = "0px";
|
|
23435
23435
|
const T = f.clientHeight - b.offsetTop - b.offsetHeight, nr = Math.max(
|
|
23436
23436
|
Z,
|
|
23437
23437
|
W + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
23438
|
-
(
|
|
23438
|
+
(rr ? x : 0) + T + O
|
|
23439
23439
|
), pr = U + nr;
|
|
23440
23440
|
A.style.height = pr + "px";
|
|
23441
23441
|
} else {
|
|
23442
|
-
const
|
|
23442
|
+
const rr = er.length > 0 && v === er[0].ref.current;
|
|
23443
23443
|
A.style.top = "0px";
|
|
23444
23444
|
const nr = Math.max(
|
|
23445
23445
|
B,
|
|
23446
23446
|
J + b.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
|
|
23447
|
-
(
|
|
23447
|
+
(rr ? E : 0) + W
|
|
23448
23448
|
) + K;
|
|
23449
23449
|
A.style.height = nr + "px", b.scrollTop = U - B + b.offsetTop;
|
|
23450
23450
|
}
|
|
@@ -23457,7 +23457,7 @@ var bT = "SelectItemAlignedPosition", Hv = p.forwardRef((r, e) => {
|
|
|
23457
23457
|
A,
|
|
23458
23458
|
f,
|
|
23459
23459
|
b,
|
|
23460
|
-
|
|
23460
|
+
v,
|
|
23461
23461
|
I,
|
|
23462
23462
|
i.dir,
|
|
23463
23463
|
t
|
|
@@ -23578,7 +23578,7 @@ var [vT, Gc] = W2(si, {}), tl = "SelectViewport", Qv = p.forwardRef(
|
|
|
23578
23578
|
if (h != null && h.current && c) {
|
|
23579
23579
|
const d = Math.abs(s.current - u.scrollTop);
|
|
23580
23580
|
if (d > 0) {
|
|
23581
|
-
const g = window.innerHeight - wa * 2, b = parseFloat(c.style.minHeight),
|
|
23581
|
+
const g = window.innerHeight - wa * 2, b = parseFloat(c.style.minHeight), v = parseFloat(c.style.height), I = Math.max(b, v);
|
|
23582
23582
|
if (I < g) {
|
|
23583
23583
|
const _ = I + d, N = Math.min(g, _), R = _ - N;
|
|
23584
23584
|
c.style.height = N + "px", c.style.bottom === "0px" && (u.scrollTop = R > 0 ? R : 0, c.style.justifyContent = "flex-end");
|
|
@@ -23621,7 +23621,7 @@ var Cs = "SelectItem", [wT, qv] = W2(Cs), rg = p.forwardRef(
|
|
|
23621
23621
|
var N;
|
|
23622
23622
|
return (N = s.itemRefCallback) == null ? void 0 : N.call(s, _, t, n);
|
|
23623
23623
|
}
|
|
23624
|
-
), b = Qe(),
|
|
23624
|
+
), b = Qe(), v = p.useRef("touch"), I = () => {
|
|
23625
23625
|
n || (A.onValueChange(t), A.onOpenChange(!1));
|
|
23626
23626
|
};
|
|
23627
23627
|
if (t === "")
|
|
@@ -23662,17 +23662,17 @@ var Cs = "SelectItem", [wT, qv] = W2(Cs), rg = p.forwardRef(
|
|
|
23662
23662
|
onFocus: Pr(o.onFocus, () => d(!0)),
|
|
23663
23663
|
onBlur: Pr(o.onBlur, () => d(!1)),
|
|
23664
23664
|
onClick: Pr(o.onClick, () => {
|
|
23665
|
-
|
|
23665
|
+
v.current !== "mouse" && I();
|
|
23666
23666
|
}),
|
|
23667
23667
|
onPointerUp: Pr(o.onPointerUp, () => {
|
|
23668
|
-
|
|
23668
|
+
v.current === "mouse" && I();
|
|
23669
23669
|
}),
|
|
23670
23670
|
onPointerDown: Pr(o.onPointerDown, (_) => {
|
|
23671
|
-
|
|
23671
|
+
v.current = _.pointerType;
|
|
23672
23672
|
}),
|
|
23673
23673
|
onPointerMove: Pr(o.onPointerMove, (_) => {
|
|
23674
23674
|
var N;
|
|
23675
|
-
|
|
23675
|
+
v.current = _.pointerType, n ? (N = s.onItemLeave) == null || N.call(s) : v.current === "mouse" && _.currentTarget.focus({ preventScroll: !0 });
|
|
23676
23676
|
}),
|
|
23677
23677
|
onPointerLeave: Pr(o.onPointerLeave, (_) => {
|
|
23678
23678
|
var N;
|
|
@@ -23704,8 +23704,8 @@ var to = "SelectItemText", eg = p.forwardRef(
|
|
|
23704
23704
|
), d = u == null ? void 0 : u.textContent, g = p.useMemo(
|
|
23705
23705
|
() => /* @__PURE__ */ l("option", { value: s.value, disabled: s.disabled, children: d }, s.value),
|
|
23706
23706
|
[s.disabled, s.value, d]
|
|
23707
|
-
), { onNativeOptionAdd: b, onNativeOptionRemove:
|
|
23708
|
-
return fe(() => (b(g), () =>
|
|
23707
|
+
), { onNativeOptionAdd: b, onNativeOptionRemove: v } = f;
|
|
23708
|
+
return fe(() => (b(g), () => v(g)), [b, v, g]), /* @__PURE__ */ M($0, { children: [
|
|
23709
23709
|
/* @__PURE__ */ l(Or.span, { id: s.textId, ...i, ref: h }),
|
|
23710
23710
|
s.isSelected && o.valueNode && !o.valueNodeHasChildren ? Ho.createPortal(i.children, o.valueNode) : null
|
|
23711
23711
|
] });
|
|
@@ -24270,7 +24270,7 @@ var ST = { exports: {} };
|
|
|
24270
24270
|
return { type: "throw", arg: E };
|
|
24271
24271
|
}
|
|
24272
24272
|
}
|
|
24273
|
-
var g = "suspendedStart", b = "suspendedYield",
|
|
24273
|
+
var g = "suspendedStart", b = "suspendedYield", v = "executing", I = "completed", _ = {};
|
|
24274
24274
|
function N() {
|
|
24275
24275
|
}
|
|
24276
24276
|
function R() {
|
|
@@ -24281,8 +24281,8 @@ var ST = { exports: {} };
|
|
|
24281
24281
|
c(P, s, function() {
|
|
24282
24282
|
return this;
|
|
24283
24283
|
});
|
|
24284
|
-
var V = Object.getPrototypeOf,
|
|
24285
|
-
|
|
24284
|
+
var V = Object.getPrototypeOf, q = V && V(V(O([])));
|
|
24285
|
+
q && q !== t && n.call(q, s) && (P = q);
|
|
24286
24286
|
var tr = C.prototype = N.prototype = Object.create(P);
|
|
24287
24287
|
R.prototype = C, i(tr, "constructor", { value: C, configurable: !0 }), i(
|
|
24288
24288
|
C,
|
|
@@ -24317,14 +24317,14 @@ var ST = { exports: {} };
|
|
|
24317
24317
|
F(U.arg);
|
|
24318
24318
|
else {
|
|
24319
24319
|
var K = U.arg, H = K.value;
|
|
24320
|
-
return H && typeof H == "object" && n.call(H, "__await") ? y.resolve(H.__await).then(function(
|
|
24321
|
-
k("next",
|
|
24322
|
-
}, function(
|
|
24323
|
-
k("throw",
|
|
24324
|
-
}) : y.resolve(H).then(function(
|
|
24325
|
-
K.value =
|
|
24326
|
-
}, function(
|
|
24327
|
-
return k("throw",
|
|
24320
|
+
return H && typeof H == "object" && n.call(H, "__await") ? y.resolve(H.__await).then(function(rr) {
|
|
24321
|
+
k("next", rr, W, F);
|
|
24322
|
+
}, function(rr) {
|
|
24323
|
+
k("throw", rr, W, F);
|
|
24324
|
+
}) : y.resolve(H).then(function(rr) {
|
|
24325
|
+
K.value = rr, W(K);
|
|
24326
|
+
}, function(rr) {
|
|
24327
|
+
return k("throw", rr, W, F);
|
|
24328
24328
|
});
|
|
24329
24329
|
}
|
|
24330
24330
|
}
|
|
@@ -24371,12 +24371,12 @@ var ST = { exports: {} };
|
|
|
24371
24371
|
function Y(w, y, k) {
|
|
24372
24372
|
var E = g;
|
|
24373
24373
|
return function(B, Z) {
|
|
24374
|
-
if (E ===
|
|
24374
|
+
if (E === v)
|
|
24375
24375
|
throw new Error("Generator is already running");
|
|
24376
24376
|
if (E === I) {
|
|
24377
24377
|
if (B === "throw")
|
|
24378
24378
|
throw Z;
|
|
24379
|
-
return
|
|
24379
|
+
return m();
|
|
24380
24380
|
}
|
|
24381
24381
|
for (k.method = B, k.arg = Z; ; ) {
|
|
24382
24382
|
var W = k.delegate;
|
|
@@ -24394,7 +24394,7 @@ var ST = { exports: {} };
|
|
|
24394
24394
|
throw E = I, k.arg;
|
|
24395
24395
|
k.dispatchException(k.arg);
|
|
24396
24396
|
} else k.method === "return" && k.abrupt("return", k.arg);
|
|
24397
|
-
E =
|
|
24397
|
+
E = v;
|
|
24398
24398
|
var U = d(w, y, k);
|
|
24399
24399
|
if (U.type === "normal") {
|
|
24400
24400
|
if (E = k.done ? I : b, U.arg === _)
|
|
@@ -24471,10 +24471,10 @@ var ST = { exports: {} };
|
|
|
24471
24471
|
return E.next = E;
|
|
24472
24472
|
}
|
|
24473
24473
|
}
|
|
24474
|
-
return { next:
|
|
24474
|
+
return { next: m };
|
|
24475
24475
|
}
|
|
24476
24476
|
a.values = O;
|
|
24477
|
-
function
|
|
24477
|
+
function m() {
|
|
24478
24478
|
return { value: o, done: !0 };
|
|
24479
24479
|
}
|
|
24480
24480
|
return L.prototype = {
|
|
@@ -24617,14 +24617,14 @@ var TT = () => {
|
|
|
24617
24617
|
}
|
|
24618
24618
|
}, A = (c, h) => new Promise((d, g) => {
|
|
24619
24619
|
const b = $T({ action: c, payload: h });
|
|
24620
|
-
t.push(async (
|
|
24621
|
-
t.shift(), a[
|
|
24620
|
+
t.push(async (v) => {
|
|
24621
|
+
t.shift(), a[v.id] = b;
|
|
24622
24622
|
try {
|
|
24623
|
-
d(await
|
|
24623
|
+
d(await v[c].apply(void 0, [...h, b.id]));
|
|
24624
24624
|
} catch (I) {
|
|
24625
24625
|
g(I);
|
|
24626
24626
|
} finally {
|
|
24627
|
-
delete a[
|
|
24627
|
+
delete a[v.id], o();
|
|
24628
24628
|
}
|
|
24629
24629
|
}), NA(`[${r}]: Add ${b.id} to JobQueue`), NA(`[${r}]: JobQueue length=${t.length}`), o();
|
|
24630
24630
|
});
|
|
@@ -24755,44 +24755,44 @@ var _g = async (r = "eng", e = Rn.LSTM_ONLY, a = {}, t = {}) => {
|
|
|
24755
24755
|
let u = e, c = t;
|
|
24756
24756
|
const h = [Rn.DEFAULT, Rn.LSTM_ONLY].includes(e) && !A.legacyCore;
|
|
24757
24757
|
let d, g;
|
|
24758
|
-
const b = new Promise((O,
|
|
24759
|
-
g = O, d =
|
|
24760
|
-
}),
|
|
24758
|
+
const b = new Promise((O, m) => {
|
|
24759
|
+
g = O, d = m;
|
|
24760
|
+
}), v = (O) => {
|
|
24761
24761
|
d(O.message);
|
|
24762
24762
|
};
|
|
24763
24763
|
let I = fP(A);
|
|
24764
|
-
I.onerror =
|
|
24765
|
-
const _ = ({ id: O, action:
|
|
24766
|
-
t3(`[${n}]: Start ${O}, action=${
|
|
24767
|
-
const E = `${
|
|
24764
|
+
I.onerror = v, i3 += 1;
|
|
24765
|
+
const _ = ({ id: O, action: m, payload: w }) => new Promise((y, k) => {
|
|
24766
|
+
t3(`[${n}]: Start ${O}, action=${m}`);
|
|
24767
|
+
const E = `${m}-${O}`;
|
|
24768
24768
|
s[E] = { resolve: y, reject: k }, cP(I, {
|
|
24769
24769
|
workerId: n,
|
|
24770
24770
|
jobId: O,
|
|
24771
|
-
action:
|
|
24771
|
+
action: m,
|
|
24772
24772
|
payload: w
|
|
24773
24773
|
});
|
|
24774
24774
|
}), N = () => console.warn("`load` is depreciated and should be removed from code (workers now come pre-loaded)"), R = (O) => _(Xa({
|
|
24775
24775
|
id: O,
|
|
24776
24776
|
action: "load",
|
|
24777
24777
|
payload: { options: { lstmOnly: h, corePath: A.corePath, logging: A.logging } }
|
|
24778
|
-
})), C = (O,
|
|
24778
|
+
})), C = (O, m, w) => _(Xa({
|
|
24779
24779
|
id: w,
|
|
24780
24780
|
action: "FS",
|
|
24781
|
-
payload: { method: "writeFile", args: [O,
|
|
24782
|
-
})), P = (O,
|
|
24783
|
-
id:
|
|
24781
|
+
payload: { method: "writeFile", args: [O, m] }
|
|
24782
|
+
})), P = (O, m) => _(Xa({
|
|
24783
|
+
id: m,
|
|
24784
24784
|
action: "FS",
|
|
24785
24785
|
payload: { method: "readFile", args: [O, { encoding: "utf8" }] }
|
|
24786
|
-
})), V = (O,
|
|
24787
|
-
id:
|
|
24786
|
+
})), V = (O, m) => _(Xa({
|
|
24787
|
+
id: m,
|
|
24788
24788
|
action: "FS",
|
|
24789
24789
|
payload: { method: "unlink", args: [O] }
|
|
24790
|
-
})),
|
|
24790
|
+
})), q = (O, m, w) => _(Xa({
|
|
24791
24791
|
id: w,
|
|
24792
24792
|
action: "FS",
|
|
24793
|
-
payload: { method: O, args:
|
|
24794
|
-
})), tr = (O,
|
|
24795
|
-
id:
|
|
24793
|
+
payload: { method: O, args: m }
|
|
24794
|
+
})), tr = (O, m) => _(Xa({
|
|
24795
|
+
id: m,
|
|
24796
24796
|
action: "loadLanguage",
|
|
24797
24797
|
payload: {
|
|
24798
24798
|
langs: O,
|
|
@@ -24805,52 +24805,52 @@ var _g = async (r = "eng", e = Rn.LSTM_ONLY, a = {}, t = {}) => {
|
|
|
24805
24805
|
lstmOnly: [Rn.DEFAULT, Rn.LSTM_ONLY].includes(u) && !A.legacyLang
|
|
24806
24806
|
}
|
|
24807
24807
|
}
|
|
24808
|
-
})), X = (O,
|
|
24808
|
+
})), X = (O, m, w, y) => _(Xa({
|
|
24809
24809
|
id: y,
|
|
24810
24810
|
action: "initialize",
|
|
24811
|
-
payload: { langs: O, oem:
|
|
24812
|
-
})), er = (O = "eng",
|
|
24813
|
-
if (h && [Rn.TESSERACT_ONLY, Rn.TESSERACT_LSTM_COMBINED].includes(
|
|
24814
|
-
const k =
|
|
24811
|
+
payload: { langs: O, oem: m, config: w }
|
|
24812
|
+
})), er = (O = "eng", m, w, y) => {
|
|
24813
|
+
if (h && [Rn.TESSERACT_ONLY, Rn.TESSERACT_LSTM_COMBINED].includes(m)) throw Error("Legacy model requested but code missing.");
|
|
24814
|
+
const k = m || u;
|
|
24815
24815
|
u = k;
|
|
24816
24816
|
const E = w || c;
|
|
24817
24817
|
c = E;
|
|
24818
24818
|
const B = (typeof O == "string" ? O.split("+") : O).filter((Z) => !f.includes(Z));
|
|
24819
24819
|
return f.push(...B), B.length > 0 ? tr(B, y).then(() => X(O, k, E, y)) : X(O, k, E, y);
|
|
24820
|
-
}, Y = (O = {},
|
|
24821
|
-
id:
|
|
24820
|
+
}, Y = (O = {}, m) => _(Xa({
|
|
24821
|
+
id: m,
|
|
24822
24822
|
action: "setParameters",
|
|
24823
24823
|
payload: { params: O }
|
|
24824
|
-
})), ar = async (O,
|
|
24824
|
+
})), ar = async (O, m = {}, w = {
|
|
24825
24825
|
text: !0
|
|
24826
24826
|
}, y) => _(Xa({
|
|
24827
24827
|
id: y,
|
|
24828
24828
|
action: "recognize",
|
|
24829
|
-
payload: { image: await n3(O), options:
|
|
24830
|
-
})), $ = async (O,
|
|
24829
|
+
payload: { image: await n3(O), options: m, output: w }
|
|
24830
|
+
})), $ = async (O, m) => {
|
|
24831
24831
|
if (h) throw Error("`worker.detect` requires Legacy model, which was not loaded.");
|
|
24832
24832
|
return _(Xa({
|
|
24833
|
-
id:
|
|
24833
|
+
id: m,
|
|
24834
24834
|
action: "detect",
|
|
24835
24835
|
payload: { image: await n3(O) }
|
|
24836
24836
|
}));
|
|
24837
24837
|
}, J = async () => (I !== null && (uP(I), I = null), Promise.resolve());
|
|
24838
24838
|
lP(I, ({
|
|
24839
24839
|
workerId: O,
|
|
24840
|
-
jobId:
|
|
24840
|
+
jobId: m,
|
|
24841
24841
|
status: w,
|
|
24842
24842
|
action: y,
|
|
24843
24843
|
data: k
|
|
24844
24844
|
}) => {
|
|
24845
|
-
const E = `${y}-${
|
|
24845
|
+
const E = `${y}-${m}`;
|
|
24846
24846
|
if (w === "resolve")
|
|
24847
|
-
t3(`[${O}]: Complete ${
|
|
24847
|
+
t3(`[${O}]: Complete ${m}`), s[E].resolve({ jobId: m, data: k }), delete s[E];
|
|
24848
24848
|
else if (w === "reject")
|
|
24849
24849
|
if (s[E].reject(k), delete s[E], y === "load" && d(k), o)
|
|
24850
24850
|
o(k);
|
|
24851
24851
|
else
|
|
24852
24852
|
throw Error(k);
|
|
24853
|
-
else w === "progress" && i({ ...k, userJobId:
|
|
24853
|
+
else w === "progress" && i({ ...k, userJobId: m });
|
|
24854
24854
|
});
|
|
24855
24855
|
const L = {
|
|
24856
24856
|
id: n,
|
|
@@ -24859,7 +24859,7 @@ var _g = async (r = "eng", e = Rn.LSTM_ONLY, a = {}, t = {}) => {
|
|
|
24859
24859
|
writeText: C,
|
|
24860
24860
|
readText: P,
|
|
24861
24861
|
removeFile: V,
|
|
24862
|
-
FS:
|
|
24862
|
+
FS: q,
|
|
24863
24863
|
reinitialize: er,
|
|
24864
24864
|
setParameters: Y,
|
|
24865
24865
|
recognize: ar,
|
|
@@ -25624,9 +25624,9 @@ function If(r, e, a, t, n) {
|
|
|
25624
25624
|
if (g === s - 1 && wf(f)) {
|
|
25625
25625
|
var u = e, c = a, h = o, d = n;
|
|
25626
25626
|
let b;
|
|
25627
|
-
for (let
|
|
25628
|
-
const I = ml(f[
|
|
25629
|
-
I != null && ((b ?? (b = {}))[
|
|
25627
|
+
for (let v in f) {
|
|
25628
|
+
const I = ml(f[v], u, c, h, d);
|
|
25629
|
+
I != null && ((b ?? (b = {}))[v] = I);
|
|
25630
25630
|
}
|
|
25631
25631
|
f = b;
|
|
25632
25632
|
} else f = ml(t[g], e, a, o, n);
|
|
@@ -25876,7 +25876,7 @@ function rp(r, e, a, t, n, i, o) {
|
|
|
25876
25876
|
var u = n, c = e;
|
|
25877
25877
|
const h = !!(2 & (f = fd(f, e)));
|
|
25878
25878
|
h && (c |= 2);
|
|
25879
|
-
let d = !h, g = !0, b = 0,
|
|
25879
|
+
let d = !h, g = !0, b = 0, v = 0;
|
|
25880
25880
|
for (; b < u.length; b++) {
|
|
25881
25881
|
const I = od(u[b], a, !1, c);
|
|
25882
25882
|
if (I instanceof a) {
|
|
@@ -25884,10 +25884,10 @@ function rp(r, e, a, t, n, i, o) {
|
|
|
25884
25884
|
const _ = !!(2 & (0 | I.u[Rr]));
|
|
25885
25885
|
d && (d = !_), g && (g = _);
|
|
25886
25886
|
}
|
|
25887
|
-
u[
|
|
25887
|
+
u[v++] = I;
|
|
25888
25888
|
}
|
|
25889
25889
|
}
|
|
25890
|
-
|
|
25890
|
+
v < b && (u.length = v), f |= 4, f = g ? 16 | f : -17 & f, Y0(u, f = d ? 8 | f : -9 & f), h && Object.freeze(u);
|
|
25891
25891
|
}
|
|
25892
25892
|
if (o && !(8 & f || !n.length && (s === 1 || s === 4 && 32 & f))) {
|
|
25893
25893
|
for (_t(f) && (n = Te(n), f = Nt(f, e), e = W0(r, e, t, n)), a = n, o = f, u = 0; u < a.length; u++) (f = a[u]) !== (c = Nf(f)) && (a[u] = c);
|
|
@@ -28787,39 +28787,39 @@ class KO {
|
|
|
28787
28787
|
}
|
|
28788
28788
|
}
|
|
28789
28789
|
const Xt = new KO(), qO = (r, e, a, t, n, i, o, A) => {
|
|
28790
|
-
const [s, f] = n0(null), [u, c] = n0(null), [h, d] = n0({ x: 0, y: 0, w: 320, h: 192 }), [g, b] = n0(!1), [
|
|
28790
|
+
const [s, f] = n0(null), [u, c] = n0(null), [h, d] = n0({ x: 0, y: 0, w: 320, h: 192 }), [g, b] = n0(!1), [v, I] = n0(!1), [_, N] = n0(!1), R = Ze(!1), C = Ze(`frameMask-${Math.random().toString(36).slice(2)}`), { toast: P } = Qo(), V = Ze(0), q = $s(() => u ? URL.createObjectURL(u) : null, [u]), tr = U0(() => {
|
|
28791
28791
|
const $ = a.current;
|
|
28792
28792
|
if (!$ || !$.videoWidth) return null;
|
|
28793
28793
|
const J = $.getBoundingClientRect(), L = $.videoWidth / $.videoHeight, O = J.width / J.height;
|
|
28794
28794
|
if (A) {
|
|
28795
|
-
let
|
|
28796
|
-
L > O ? (w = J.height,
|
|
28797
|
-
const E = $.videoWidth /
|
|
28795
|
+
let m, w, y = 0, k = 0;
|
|
28796
|
+
L > O ? (w = J.height, m = J.height * L, y = (m - J.width) / 2) : (m = J.width, w = J.width / L, k = (w - J.height) / 2);
|
|
28797
|
+
const E = $.videoWidth / m;
|
|
28798
28798
|
let x = (h.x + y) * E, B = (h.y + k) * E, Z = h.w * E, W = h.h * E;
|
|
28799
28799
|
if (r === "selfie") {
|
|
28800
28800
|
const Ir = Z * 0.2, Br = W * 0.2;
|
|
28801
28801
|
x = Math.max(0, x - Ir / 2), B = Math.max(0, B - Br / 2), Z = Math.min($.videoWidth - x, Z + Ir), W = Math.min($.videoHeight - B, W + Br);
|
|
28802
28802
|
}
|
|
28803
|
-
const F = Math.max(0, Math.round(x)), U = Math.max(0, Math.round(B)), K = Math.min($.videoWidth - F, Math.round(Z)), H = Math.min($.videoHeight - U, Math.round(W)),
|
|
28804
|
-
if (
|
|
28803
|
+
const F = Math.max(0, Math.round(x)), U = Math.max(0, Math.round(B)), K = Math.min($.videoWidth - F, Math.round(Z)), H = Math.min($.videoHeight - U, Math.round(W)), rr = K, T = H;
|
|
28804
|
+
if (rr <= 0 || T <= 0) return null;
|
|
28805
28805
|
const nr = document.createElement("canvas");
|
|
28806
|
-
nr.width =
|
|
28806
|
+
nr.width = rr, nr.height = T;
|
|
28807
28807
|
const pr = nr.getContext("2d", {
|
|
28808
28808
|
willReadFrequently: !1,
|
|
28809
28809
|
colorSpace: "srgb"
|
|
28810
28810
|
});
|
|
28811
|
-
return pr && (pr.imageSmoothingEnabled = !0, pr.imageSmoothingQuality = "high", r === "selfie" ? pr.filter = "contrast(1.1) brightness(1.02)" : pr.filter = "contrast(1.15) brightness(1.05) saturate(1.05)", pr.drawImage($, F, U, K, H, 0, 0,
|
|
28811
|
+
return pr && (pr.imageSmoothingEnabled = !0, pr.imageSmoothingQuality = "high", r === "selfie" ? pr.filter = "contrast(1.1) brightness(1.02)" : pr.filter = "contrast(1.15) brightness(1.05) saturate(1.05)", pr.drawImage($, F, U, K, H, 0, 0, rr, T)), nr;
|
|
28812
28812
|
} else {
|
|
28813
|
-
let
|
|
28814
|
-
L > O ? (
|
|
28815
|
-
const E = $.videoWidth /
|
|
28813
|
+
let m, w, y = 0, k = 0;
|
|
28814
|
+
L > O ? (m = J.width, w = J.width / L, k = (J.height - w) / 2) : (w = J.height, m = J.height * L, y = (J.width - m) / 2);
|
|
28815
|
+
const E = $.videoWidth / m, x = h.x - y, B = h.y - k, Z = Math.max(0, x), W = Math.max(0, B), F = Math.min(m, x + h.w) - Z, U = Math.min(w, B + h.h) - W;
|
|
28816
28816
|
if (F <= 0 || U <= 0) return null;
|
|
28817
|
-
let K = Z * E, H = W * E,
|
|
28817
|
+
let K = Z * E, H = W * E, rr = F * E, T = U * E;
|
|
28818
28818
|
if (r === "selfie") {
|
|
28819
|
-
const G =
|
|
28820
|
-
K = Math.max(0, K - G / 2), H = Math.max(0, H - Q / 2),
|
|
28819
|
+
const G = rr * 0.2, Q = T * 0.2;
|
|
28820
|
+
K = Math.max(0, K - G / 2), H = Math.max(0, H - Q / 2), rr = Math.min($.videoWidth - K, rr + G), T = Math.min($.videoHeight - H, T + Q);
|
|
28821
28821
|
}
|
|
28822
|
-
const nr = Math.max(0, Math.round(K)), pr = Math.max(0, Math.round(H)), Ir = Math.min($.videoWidth - nr, Math.round(
|
|
28822
|
+
const nr = Math.max(0, Math.round(K)), pr = Math.max(0, Math.round(H)), Ir = Math.min($.videoWidth - nr, Math.round(rr)), Br = Math.min($.videoHeight - pr, Math.round(T)), wr = Ir, Ur = Br;
|
|
28823
28823
|
if (wr <= 0 || Ur <= 0) return null;
|
|
28824
28824
|
const Yr = document.createElement("canvas");
|
|
28825
28825
|
Yr.width = wr, Yr.height = Ur;
|
|
@@ -28832,7 +28832,7 @@ const Xt = new KO(), qO = (r, e, a, t, n, i, o, A) => {
|
|
|
28832
28832
|
}, [h, a, r, A]), X = U0(() => {
|
|
28833
28833
|
const $ = a.current;
|
|
28834
28834
|
if (!$ || !$.videoWidth) return null;
|
|
28835
|
-
const J = $.getBoundingClientRect(), L = $.videoWidth / $.videoHeight, O = J.width / J.height,
|
|
28835
|
+
const J = $.getBoundingClientRect(), L = $.videoWidth / $.videoHeight, O = J.width / J.height, m = 50;
|
|
28836
28836
|
if (A) {
|
|
28837
28837
|
let w, y, k = 0, E = 0;
|
|
28838
28838
|
L > O ? (y = J.height, w = J.height * L, k = (w - J.width) / 2) : (w = J.width, y = J.width / L, E = (y - J.height) / 2);
|
|
@@ -28842,26 +28842,26 @@ const Xt = new KO(), qO = (r, e, a, t, n, i, o, A) => {
|
|
|
28842
28842
|
const pr = W * 0.2, Ir = F * 0.2;
|
|
28843
28843
|
B = Math.max(0, B - pr / 2), Z = Math.max(0, Z - Ir / 2), W = Math.min($.videoWidth - B, W + pr), F = Math.min($.videoHeight - Z, F + Ir);
|
|
28844
28844
|
}
|
|
28845
|
-
const K = Math.min(1, 640 / Math.max(W, F)), H = Math.max(
|
|
28846
|
-
T.width = H, T.height =
|
|
28845
|
+
const K = Math.min(1, 640 / Math.max(W, F)), H = Math.max(m, Math.round(W * K)), rr = Math.max(m, Math.round(F * K)), T = document.createElement("canvas");
|
|
28846
|
+
T.width = H, T.height = rr;
|
|
28847
28847
|
const nr = T.getContext("2d");
|
|
28848
|
-
return nr && (nr.imageSmoothingEnabled = !0, nr.imageSmoothingQuality = "high", nr.drawImage($, B, Z, W, F, 0, 0, H,
|
|
28848
|
+
return nr && (nr.imageSmoothingEnabled = !0, nr.imageSmoothingQuality = "high", nr.drawImage($, B, Z, W, F, 0, 0, H, rr)), T;
|
|
28849
28849
|
} else {
|
|
28850
28850
|
let w, y, k = 0, E = 0;
|
|
28851
28851
|
L > O ? (w = J.width, y = J.width / L, E = (J.height - y) / 2) : (y = J.height, w = J.height * L, k = (J.width - w) / 2);
|
|
28852
28852
|
const x = $.videoWidth / w, B = h.x - k, Z = h.y - E, W = Math.max(0, B), F = Math.max(0, Z), U = Math.min(w, B + h.w) - W, K = Math.min(y, Z + h.h) - F;
|
|
28853
28853
|
if (U <= 0 || K <= 0) return null;
|
|
28854
|
-
let H = W * x,
|
|
28854
|
+
let H = W * x, rr = F * x, T = U * x, nr = K * x;
|
|
28855
28855
|
if (r === "selfie") {
|
|
28856
28856
|
const S = T * 0.2, G = nr * 0.2;
|
|
28857
|
-
H = Math.max(0, H - S / 2),
|
|
28857
|
+
H = Math.max(0, H - S / 2), rr = Math.max(0, rr - G / 2), T = Math.min($.videoWidth - H, T + S), nr = Math.min($.videoHeight - rr, nr + G);
|
|
28858
28858
|
}
|
|
28859
|
-
if (T <
|
|
28859
|
+
if (T < m || nr < m)
|
|
28860
28860
|
return null;
|
|
28861
|
-
const Ir = Math.min(1, 640 / Math.max(T, nr)), Br = Math.max(
|
|
28861
|
+
const Ir = Math.min(1, 640 / Math.max(T, nr)), Br = Math.max(m, Math.round(T * Ir)), wr = Math.max(m, Math.round(nr * Ir)), Ur = document.createElement("canvas");
|
|
28862
28862
|
Ur.width = Br, Ur.height = wr;
|
|
28863
28863
|
const Yr = Ur.getContext("2d");
|
|
28864
|
-
return Yr && (Yr.imageSmoothingEnabled = !0, Yr.imageSmoothingQuality = "high", Yr.drawImage($, H,
|
|
28864
|
+
return Yr && (Yr.imageSmoothingEnabled = !0, Yr.imageSmoothingQuality = "high", Yr.drawImage($, H, rr, T, nr, 0, 0, Br, wr)), Ur;
|
|
28865
28865
|
}
|
|
28866
28866
|
}, [h, a, r, A]), er = U0(async () => {
|
|
28867
28867
|
if (R.current || V.current > 0) return;
|
|
@@ -28887,7 +28887,7 @@ const Xt = new KO(), qO = (r, e, a, t, n, i, o, A) => {
|
|
|
28887
28887
|
}, [r, o, X]), Y = U0(async () => {
|
|
28888
28888
|
const $ = tr();
|
|
28889
28889
|
if (!$) return;
|
|
28890
|
-
const J = await new Promise((O) => $.toBlob((
|
|
28890
|
+
const J = await new Promise((O) => $.toBlob((m) => O(m), "image/jpeg", 1)), L = new File([J], `${r}.jpg`, { type: "image/jpeg" });
|
|
28891
28891
|
c(L), s && (s.getTracks().forEach((O) => O.stop()), f(null));
|
|
28892
28892
|
}, [r, tr, s]);
|
|
28893
28893
|
Ae(() => {
|
|
@@ -28978,8 +28978,8 @@ const Xt = new KO(), qO = (r, e, a, t, n, i, o, A) => {
|
|
|
28978
28978
|
const J = async () => {
|
|
28979
28979
|
N(!0);
|
|
28980
28980
|
try {
|
|
28981
|
-
const
|
|
28982
|
-
|
|
28981
|
+
const m = document.createElement("canvas");
|
|
28982
|
+
m.width = 100, m.height = 100, await Xt.validateIdCard(m, o || "id");
|
|
28983
28983
|
} catch {
|
|
28984
28984
|
} finally {
|
|
28985
28985
|
N(!1);
|
|
@@ -29000,10 +29000,10 @@ const Xt = new KO(), qO = (r, e, a, t, n, i, o, A) => {
|
|
|
29000
29000
|
setPhoto: c,
|
|
29001
29001
|
hole: h,
|
|
29002
29002
|
maskId: C.current,
|
|
29003
|
-
photoUrl:
|
|
29003
|
+
photoUrl: q,
|
|
29004
29004
|
capturePhoto: Y,
|
|
29005
29005
|
isFrameValid: g,
|
|
29006
|
-
isFaceDetectorLoading:
|
|
29006
|
+
isFaceDetectorLoading: v,
|
|
29007
29007
|
isOCRLoading: _
|
|
29008
29008
|
};
|
|
29009
29009
|
}, Uu = 768;
|
|
@@ -29033,7 +29033,7 @@ const eD = {
|
|
|
29033
29033
|
const s = Ze(null), f = Ze(null), u = Ze(null), c = Ze(null), h = Ze(null), d = rD(), {
|
|
29034
29034
|
stream: g,
|
|
29035
29035
|
photo: b,
|
|
29036
|
-
setPhoto:
|
|
29036
|
+
setPhoto: v,
|
|
29037
29037
|
hole: I,
|
|
29038
29038
|
maskId: _,
|
|
29039
29039
|
photoUrl: N,
|
|
@@ -29041,24 +29041,24 @@ const eD = {
|
|
|
29041
29041
|
isFrameValid: C,
|
|
29042
29042
|
isFaceDetectorLoading: P,
|
|
29043
29043
|
isOCRLoading: V
|
|
29044
|
-
} = qO(r, o, s, u, c, h, A, d), [
|
|
29044
|
+
} = qO(r, o, s, u, c, h, A, d), [q, tr] = n0(!1), [X, er] = n0(!1), Y = !!g, $ = !Y || r === "selfie" && P || (r === "id-front" || r === "id-back") && V;
|
|
29045
29045
|
Ae(() => {
|
|
29046
29046
|
f.current && g && f.current.srcObject !== g && (f.current.srcObject = g);
|
|
29047
29047
|
}, [g]);
|
|
29048
29048
|
const J = () => {
|
|
29049
|
-
|
|
29049
|
+
v(null), t();
|
|
29050
29050
|
}, L = () => {
|
|
29051
|
-
|
|
29051
|
+
v(null), e();
|
|
29052
29052
|
}, O = async () => {
|
|
29053
29053
|
if (b) {
|
|
29054
29054
|
er(!0);
|
|
29055
29055
|
try {
|
|
29056
29056
|
await a(b);
|
|
29057
29057
|
} finally {
|
|
29058
|
-
er(!1),
|
|
29058
|
+
er(!1), v(null);
|
|
29059
29059
|
}
|
|
29060
29060
|
}
|
|
29061
|
-
},
|
|
29061
|
+
}, m = async () => {
|
|
29062
29062
|
tr(!0), await R(), tr(!1);
|
|
29063
29063
|
}, w = I.x + I.w / 2, y = I.y + I.h / 2, k = Math.max(I.w, I.h) / 2, E = () => {
|
|
29064
29064
|
const x = eD[r] || "Photo";
|
|
@@ -29136,7 +29136,7 @@ const eD = {
|
|
|
29136
29136
|
]
|
|
29137
29137
|
}
|
|
29138
29138
|
),
|
|
29139
|
-
|
|
29139
|
+
q && /* @__PURE__ */ l(
|
|
29140
29140
|
"div",
|
|
29141
29141
|
{
|
|
29142
29142
|
className: `absolute inset-0 flex items-center justify-center bg-black/50 ${o === "circular" ? "rounded-full" : "rounded-none"}`,
|
|
@@ -29147,10 +29147,10 @@ const eD = {
|
|
|
29147
29147
|
/* @__PURE__ */ l(
|
|
29148
29148
|
p0,
|
|
29149
29149
|
{
|
|
29150
|
-
onClick:
|
|
29150
|
+
onClick: m,
|
|
29151
29151
|
size: "lg",
|
|
29152
29152
|
className: "w-16 h-16 rounded-full bg-white hover:bg-gray-100 border-4 border-gray-600 p-0",
|
|
29153
|
-
disabled: $ ||
|
|
29153
|
+
disabled: $ || q || !C,
|
|
29154
29154
|
children: /* @__PURE__ */ l("div", { className: "w-8 h-8 rounded-full bg-white" })
|
|
29155
29155
|
}
|
|
29156
29156
|
)
|
|
@@ -29220,17 +29220,17 @@ const eD = {
|
|
|
29220
29220
|
] })
|
|
29221
29221
|
}
|
|
29222
29222
|
) }),
|
|
29223
|
-
|
|
29223
|
+
q && /* @__PURE__ */ l("div", { className: "absolute inset-0 flex items-center justify-center bg-black/50", children: /* @__PURE__ */ l(Ut, { className: "animate-spin h-10 w-10 text-white" }) })
|
|
29224
29224
|
] }) }) }),
|
|
29225
29225
|
/* @__PURE__ */ M("div", { className: "relative flex justify-center pb-6 pt-3", children: [
|
|
29226
29226
|
/* @__PURE__ */ l("div", { className: "absolute inset-0 bg-[rgba(17,24,39,0.7)]" }),
|
|
29227
29227
|
/* @__PURE__ */ l("div", { className: "relative z-10 flex justify-center", children: /* @__PURE__ */ l(
|
|
29228
29228
|
p0,
|
|
29229
29229
|
{
|
|
29230
|
-
onClick:
|
|
29230
|
+
onClick: m,
|
|
29231
29231
|
size: "lg",
|
|
29232
29232
|
className: "w-16 h-16 rounded-full bg-white hover:bg-gray-100 border-4 border-gray-600 p-0",
|
|
29233
|
-
disabled: $ ||
|
|
29233
|
+
disabled: $ || q || !C,
|
|
29234
29234
|
children: /* @__PURE__ */ l("div", { className: "w-8 h-8 rounded-full bg-white" })
|
|
29235
29235
|
}
|
|
29236
29236
|
) })
|
|
@@ -29266,14 +29266,14 @@ const eD = {
|
|
|
29266
29266
|
const [i, o] = n0(r !== "" && !a.some((b) => b.value === r)), [A, s] = n0(null), f = Ze(null), u = 255, c = (b) => {
|
|
29267
29267
|
b === "other" ? (o(!0), e(""), s(null)) : (o(!1), e(b), s(null));
|
|
29268
29268
|
}, h = (b) => {
|
|
29269
|
-
const
|
|
29270
|
-
|
|
29269
|
+
const v = b.target.value;
|
|
29270
|
+
v.length <= u ? (e(v), s(null)) : s(`Input cannot exceed ${u} characters.`);
|
|
29271
29271
|
}, d = (b) => {
|
|
29272
29272
|
r.length > u && (b.preventDefault(), s(`Input cannot exceed ${u} characters.`));
|
|
29273
29273
|
}, g = () => {
|
|
29274
|
-
var
|
|
29274
|
+
var v;
|
|
29275
29275
|
o(!1);
|
|
29276
|
-
const b = ((
|
|
29276
|
+
const b = ((v = a.find((I) => I.value !== "other")) == null ? void 0 : v.value) || "";
|
|
29277
29277
|
e(b), s(null);
|
|
29278
29278
|
};
|
|
29279
29279
|
return Ae(() => {
|
|
@@ -29605,7 +29605,7 @@ const eD = {
|
|
|
29605
29605
|
userId: i,
|
|
29606
29606
|
fullName: o
|
|
29607
29607
|
}) => {
|
|
29608
|
-
const { toast: A } = Qo(), { data: s, isLoading: f } = W5(r, e), [u, c] = n0(!0), [h, d] = n0("landing"), [g, b] = n0(null), [
|
|
29608
|
+
const { toast: A } = Qo(), { data: s, isLoading: f } = W5(r, e), [u, c] = n0(!0), [h, d] = n0("landing"), [g, b] = n0(null), [v, I] = n0({
|
|
29609
29609
|
full_name: o || "",
|
|
29610
29610
|
email: n || "",
|
|
29611
29611
|
phone: "",
|
|
@@ -29633,7 +29633,7 @@ const eD = {
|
|
|
29633
29633
|
)) });
|
|
29634
29634
|
if (Ae(() => {
|
|
29635
29635
|
(async () => {
|
|
29636
|
-
var er, Y, ar, $, J, L, O,
|
|
29636
|
+
var er, Y, ar, $, J, L, O, m, w, y;
|
|
29637
29637
|
if (!i || !r || !e || !s) {
|
|
29638
29638
|
c(!1);
|
|
29639
29639
|
return;
|
|
@@ -29668,9 +29668,9 @@ const eD = {
|
|
|
29668
29668
|
address_country: ((J = E.personal_address) == null ? void 0 : J.address_country) || "",
|
|
29669
29669
|
state: ((L = E.personal_address) == null ? void 0 : L.state) || ""
|
|
29670
29670
|
});
|
|
29671
|
-
const B = !!((O = E.full_name) != null && O.trim()), Z = !!((
|
|
29671
|
+
const B = !!((O = E.full_name) != null && O.trim()), Z = !!((m = E.phone) != null && m.trim()), W = !!((w = E.email) != null && w.trim()), F = !!E.birth, U = !!E.document_type, K = !!E.id_photo, H = E.document_type === "passport" ? !0 : !!E.id_photo_back, rr = !!E.selfie_photo, T = !!((y = E.personal_address) != null && y.street);
|
|
29672
29672
|
let nr = "landing";
|
|
29673
|
-
!B || !Z || !W || !F ? nr = "name" : U ? K ? H ?
|
|
29673
|
+
!B || !Z || !W || !F ? nr = "name" : U ? K ? H ? rr ? T ? nr = "verify" : nr = "address" : nr = "pre-selfie" : nr = "id-back" : nr = "id-front" : nr = "document-selection", d(nr);
|
|
29674
29674
|
} catch (k) {
|
|
29675
29675
|
console.error("Resume failed", k);
|
|
29676
29676
|
} finally {
|
|
@@ -29678,7 +29678,7 @@ const eD = {
|
|
|
29678
29678
|
}
|
|
29679
29679
|
})();
|
|
29680
29680
|
}, [r, e, i, n, s]), u || f) return /* @__PURE__ */ l(Iy, {});
|
|
29681
|
-
const
|
|
29681
|
+
const q = {
|
|
29682
29682
|
apiEndpoint: r,
|
|
29683
29683
|
apiKey: e,
|
|
29684
29684
|
id: g,
|
|
@@ -29692,10 +29692,10 @@ const eD = {
|
|
|
29692
29692
|
return /* @__PURE__ */ l(
|
|
29693
29693
|
ZT,
|
|
29694
29694
|
{
|
|
29695
|
-
fullName:
|
|
29696
|
-
email:
|
|
29697
|
-
phone:
|
|
29698
|
-
birth:
|
|
29695
|
+
fullName: v.full_name,
|
|
29696
|
+
email: v.email,
|
|
29697
|
+
phone: v.phone,
|
|
29698
|
+
birth: v.birth || void 0,
|
|
29699
29699
|
renderProgress: V,
|
|
29700
29700
|
onContinue: async ({ fullName: X, email: er, phone: Y, birth: ar }) => {
|
|
29701
29701
|
let $ = g;
|
|
@@ -29707,7 +29707,7 @@ const eD = {
|
|
|
29707
29707
|
"personal_details",
|
|
29708
29708
|
{ full_name: X, email: er, phone: Y, birth: ar.toISOString().split("T")[0] },
|
|
29709
29709
|
{},
|
|
29710
|
-
{ ...
|
|
29710
|
+
{ ...q, id: $ }
|
|
29711
29711
|
) && (I((L) => ({ ...L, full_name: X, email: er, phone: Y, birth: ar })), d("document-selection"));
|
|
29712
29712
|
}
|
|
29713
29713
|
}
|
|
@@ -29724,7 +29724,7 @@ const eD = {
|
|
|
29724
29724
|
"personal_details",
|
|
29725
29725
|
{ document_type: er, id_photo: null, id_photo_back: null },
|
|
29726
29726
|
{},
|
|
29727
|
-
|
|
29727
|
+
q
|
|
29728
29728
|
);
|
|
29729
29729
|
},
|
|
29730
29730
|
onContinue: () => d("id-front"),
|
|
@@ -29748,7 +29748,7 @@ const eD = {
|
|
|
29748
29748
|
"personal_details",
|
|
29749
29749
|
{ document_type: er },
|
|
29750
29750
|
{ id_photo: X },
|
|
29751
|
-
|
|
29751
|
+
q
|
|
29752
29752
|
) ? d(_ === "passport" ? "pre-selfie" : "id-back") : A({
|
|
29753
29753
|
title: "Upload Failed",
|
|
29754
29754
|
description: "Please check your internet connection",
|
|
@@ -29769,7 +29769,7 @@ const eD = {
|
|
|
29769
29769
|
currentStep: h,
|
|
29770
29770
|
onRetake: () => I((X) => ({ ...X, id_photo_back: null })),
|
|
29771
29771
|
onConfirm: async (X) => {
|
|
29772
|
-
I((Y) => ({ ...Y, id_photo_back: X })), await le("personal_details", {}, { id_photo_back: X },
|
|
29772
|
+
I((Y) => ({ ...Y, id_photo_back: X })), await le("personal_details", {}, { id_photo_back: X }, q) ? d("pre-selfie") : A({
|
|
29773
29773
|
title: "Upload Failed",
|
|
29774
29774
|
description: "Please check your internet connection",
|
|
29775
29775
|
variant: "destructive"
|
|
@@ -29796,7 +29796,7 @@ const eD = {
|
|
|
29796
29796
|
currentStep: h,
|
|
29797
29797
|
onRetake: () => I((X) => ({ ...X, selfie_photo: null })),
|
|
29798
29798
|
onConfirm: async (X) => {
|
|
29799
|
-
I((Y) => ({ ...Y, selfie_photo: X })), await le("personal_details", {}, { selfie_photo: X },
|
|
29799
|
+
I((Y) => ({ ...Y, selfie_photo: X })), await le("personal_details", {}, { selfie_photo: X }, q) ? d("address") : A({
|
|
29800
29800
|
title: "Upload Failed",
|
|
29801
29801
|
description: "Please check your internet connection",
|
|
29802
29802
|
variant: "destructive"
|
|
@@ -29814,7 +29814,7 @@ const eD = {
|
|
|
29814
29814
|
renderProgress: V,
|
|
29815
29815
|
onDataChange: (X) => C((er) => ({ ...er, ...X })),
|
|
29816
29816
|
onContinue: async (X) => {
|
|
29817
|
-
await le("personal_address", X, {},
|
|
29817
|
+
await le("personal_address", X, {}, q) && d("verify");
|
|
29818
29818
|
},
|
|
29819
29819
|
onBack: () => d("selfie")
|
|
29820
29820
|
}
|
|
@@ -29823,9 +29823,9 @@ const eD = {
|
|
|
29823
29823
|
return /* @__PURE__ */ l(
|
|
29824
29824
|
nD,
|
|
29825
29825
|
{
|
|
29826
|
-
fullName:
|
|
29827
|
-
email:
|
|
29828
|
-
phone:
|
|
29826
|
+
fullName: v.full_name,
|
|
29827
|
+
email: v.email,
|
|
29828
|
+
phone: v.phone,
|
|
29829
29829
|
onComplete: () => d("processing"),
|
|
29830
29830
|
onStartOver: () => d("landing")
|
|
29831
29831
|
}
|
|
@@ -29842,12 +29842,12 @@ const eD = {
|
|
|
29842
29842
|
{ headers: { "X-API-Key": e } }
|
|
29843
29843
|
);
|
|
29844
29844
|
const X = {
|
|
29845
|
-
full_name:
|
|
29846
|
-
email:
|
|
29847
|
-
birth:
|
|
29848
|
-
selfie_photo:
|
|
29849
|
-
id_photo:
|
|
29850
|
-
id_photo_back:
|
|
29845
|
+
full_name: v.full_name || "",
|
|
29846
|
+
email: v.email || "",
|
|
29847
|
+
birth: v.birth,
|
|
29848
|
+
selfie_photo: v.selfie_photo,
|
|
29849
|
+
id_photo: v.id_photo,
|
|
29850
|
+
id_photo_back: v.id_photo_back ?? void 0,
|
|
29851
29851
|
personal_address: R
|
|
29852
29852
|
};
|
|
29853
29853
|
a(g, X), d("done");
|
|
@@ -29901,24 +29901,24 @@ var By = { exports: {} };
|
|
|
29901
29901
|
return V.isValid();
|
|
29902
29902
|
}
|
|
29903
29903
|
function s() {
|
|
29904
|
-
var
|
|
29905
|
-
return V.isValid(
|
|
29904
|
+
var m = { getUserMedia: !0 };
|
|
29905
|
+
return V.isValid(m);
|
|
29906
29906
|
}
|
|
29907
|
-
function f(
|
|
29907
|
+
function f(m) {
|
|
29908
29908
|
var w = !1;
|
|
29909
|
-
if (C.isArray(
|
|
29910
|
-
if (C.each(
|
|
29909
|
+
if (C.isArray(m) && m.length) {
|
|
29910
|
+
if (C.each(m, function(y, k) {
|
|
29911
29911
|
C.isSupported.videoCodecs[k] && (w = !0);
|
|
29912
29912
|
}), !w)
|
|
29913
29913
|
return !1;
|
|
29914
|
-
} else if (C.isString(
|
|
29914
|
+
} else if (C.isString(m) && m.length && !C.isSupported.videoCodecs[m])
|
|
29915
29915
|
return !1;
|
|
29916
29916
|
return V.isValid({ getUserMedia: !0 });
|
|
29917
29917
|
}
|
|
29918
29918
|
function u() {
|
|
29919
|
-
function
|
|
29919
|
+
function m(Fr, sr, Nr) {
|
|
29920
29920
|
var cr, Er;
|
|
29921
|
-
for (K = Fr, H = sr,
|
|
29921
|
+
for (K = Fr, H = sr, rr = Nr, T = new Array(nr), cr = 0; nr > cr; cr++)
|
|
29922
29922
|
T[cr] = new Array(4), Er = T[cr], Er[0] = Er[1] = Er[2] = (cr << S + 8) / nr | 0, Ma[cr] = or / nr | 0, ma[cr] = 0;
|
|
29923
29923
|
}
|
|
29924
29924
|
function w() {
|
|
@@ -29946,7 +29946,7 @@ var By = { exports: {} };
|
|
|
29946
29946
|
}
|
|
29947
29947
|
function k() {
|
|
29948
29948
|
var Fr, sr, Nr, cr, Er, dr, vr, Jr, qr, l0, va, F0, _e, n4;
|
|
29949
|
-
for (Ur > H && (
|
|
29949
|
+
for (Ur > H && (rr = 1), U = 30 + (rr - 1) / 3, F0 = K, _e = 0, n4 = H, va = H / (3 * rr), l0 = va / G | 0, Jr = he, dr = N0, vr = dr >> S0, 1 >= vr && (vr = 0), Fr = 0; vr > Fr; Fr++)
|
|
29950
29950
|
dt[Fr] = Jr * ((vr * vr - Fr * Fr) * Ce / (vr * vr));
|
|
29951
29951
|
for (qr = Ur > H ? 3 : H % pr !== 0 ? 3 * pr : H % Ir !== 0 ? 3 * Ir : H % Br !== 0 ? 3 * Br : 3 * wr, Fr = 0; va > Fr; )
|
|
29952
29952
|
if (Nr = (255 & F0[_e + 0]) << S, cr = (255 & F0[_e + 1]) << S, Er = (255 & F0[_e + 2]) << S, sr = F(Nr, cr, Er), W(Jr, sr, Nr, cr, Er), vr !== 0 && Z(vr, sr, Nr, cr, Er), _e += qr, _e >= n4 && (_e -= H), Fr++, l0 === 0 && (l0 = 1), Fr % l0 === 0)
|
|
@@ -29996,15 +29996,15 @@ var By = { exports: {} };
|
|
|
29996
29996
|
_e = T[cr], Er = _e[0] - Fr, 0 > Er && (Er = -Er), dr = _e[1] - sr, 0 > dr && (dr = -dr), Er += dr, dr = _e[2] - Nr, 0 > dr && (dr = -dr), Er += dr, va > Er && (va = Er, qr = cr), vr = Er - (ma[cr] >> Q - S), F0 > vr && (F0 = vr, l0 = cr), Jr = Ma[cr] >> ir, Ma[cr] -= Jr, ma[cr] += Jr << Ar;
|
|
29997
29997
|
return Ma[qr] += lr, ma[qr] -= Tr, l0;
|
|
29998
29998
|
}
|
|
29999
|
-
var U, K, H,
|
|
30000
|
-
|
|
29999
|
+
var U, K, H, rr, T, nr = 256, pr = 499, Ir = 491, Br = 487, wr = 503, Ur = 3 * wr, Yr = nr - 1, S = 4, G = 100, Q = 16, or = 1 << Q, Ar = 10, ir = 10, lr = or >> ir, Tr = or << Ar - ir, zr = nr >> 3, S0 = 6, oe = 1 << S0, N0 = zr * oe, na = 30, Ve = 10, he = 1 << Ve, ct = 8, Ce = 1 << ct, Nn = Ve + ct, be = 1 << Nn, ia = [], ma = [], Ma = [], dt = [];
|
|
30000
|
+
m.apply(this, arguments);
|
|
30001
30001
|
var ue = {};
|
|
30002
30002
|
return ue.map = E, ue.process = x, ue;
|
|
30003
30003
|
}
|
|
30004
30004
|
function c() {
|
|
30005
|
-
var
|
|
30005
|
+
var m = this;
|
|
30006
30006
|
try {
|
|
30007
|
-
|
|
30007
|
+
m.onmessage = function(y) {
|
|
30008
30008
|
var k, E = y.data || {};
|
|
30009
30009
|
E.gifshot && (k = w.run(E), postMessage(k));
|
|
30010
30010
|
};
|
|
@@ -30022,9 +30022,9 @@ var By = { exports: {} };
|
|
|
30022
30022
|
}
|
|
30023
30023
|
return k;
|
|
30024
30024
|
}, processFrameWithQuantizer: function(y, k, E, x) {
|
|
30025
|
-
for (var B = this.dataToRGB(y, k, E), Z = new u(B, B.length, x), W = Z.process(), F = new Uint32Array(this.componentizedPaletteToArray(W)), U = k * E, K = new Uint8Array(U), H = 0,
|
|
30025
|
+
for (var B = this.dataToRGB(y, k, E), Z = new u(B, B.length, x), W = Z.process(), F = new Uint32Array(this.componentizedPaletteToArray(W)), U = k * E, K = new Uint8Array(U), H = 0, rr = 0; U > rr; rr++) {
|
|
30026
30026
|
var T = B[H++], nr = B[H++], pr = B[H++];
|
|
30027
|
-
K[
|
|
30027
|
+
K[rr] = Z.map(T, nr, pr);
|
|
30028
30028
|
}
|
|
30029
30029
|
return { pixels: K, palette: F };
|
|
30030
30030
|
}, run: function(y) {
|
|
@@ -30034,50 +30034,50 @@ var By = { exports: {} };
|
|
|
30034
30034
|
} };
|
|
30035
30035
|
return w;
|
|
30036
30036
|
}
|
|
30037
|
-
function h(
|
|
30037
|
+
function h(m, w, y, k) {
|
|
30038
30038
|
function E(H) {
|
|
30039
|
-
var
|
|
30040
|
-
if (2 >
|
|
30039
|
+
var rr = H.length;
|
|
30040
|
+
if (2 > rr || rr > 256 || rr & rr - 1)
|
|
30041
30041
|
throw "Invalid code/color length, must be power of 2 and 2 .. 256.";
|
|
30042
|
-
return
|
|
30042
|
+
return rr;
|
|
30043
30043
|
}
|
|
30044
|
-
function x(H,
|
|
30044
|
+
function x(H, rr, T, nr) {
|
|
30045
30045
|
function pr(N0) {
|
|
30046
30046
|
for (; Q >= N0; )
|
|
30047
|
-
H[
|
|
30047
|
+
H[rr++] = 255 & or, or >>= 8, Q -= 8, rr === Br + 256 && (H[Br] = 255, Br = rr++);
|
|
30048
30048
|
}
|
|
30049
30049
|
function Ir(N0) {
|
|
30050
30050
|
or |= N0 << Q, Q += G, pr(8);
|
|
30051
30051
|
}
|
|
30052
|
-
H[
|
|
30053
|
-
var Br =
|
|
30052
|
+
H[rr++] = T;
|
|
30053
|
+
var Br = rr++, wr = 1 << T, Ur = wr - 1, Yr = wr + 1, S = Yr + 1, G = T + 1, Q = 0, or = 0, Ar = nr[0] & Ur, ir = {};
|
|
30054
30054
|
Ir(wr);
|
|
30055
30055
|
for (var lr = 1, Tr = nr.length; Tr > lr; ++lr) {
|
|
30056
30056
|
var zr = nr[lr] & Ur, S0 = Ar << 8 | zr, oe = ir[S0];
|
|
30057
30057
|
if (oe === i) {
|
|
30058
30058
|
for (or |= Ar << Q, Q += G; Q >= 8; )
|
|
30059
|
-
H[
|
|
30059
|
+
H[rr++] = 255 & or, or >>= 8, Q -= 8, rr === Br + 256 && (H[Br] = 255, Br = rr++);
|
|
30060
30060
|
S === 4096 ? (Ir(wr), S = Yr + 1, G = T + 1, ir = {}) : (S >= 1 << G && ++G, ir[S0] = S++), Ar = zr;
|
|
30061
30061
|
} else
|
|
30062
30062
|
Ar = oe;
|
|
30063
30063
|
}
|
|
30064
|
-
return Ir(Ar), Ir(Yr), pr(1), Br + 1 ===
|
|
30064
|
+
return Ir(Ar), Ir(Yr), pr(1), Br + 1 === rr ? H[Br] = 0 : (H[Br] = rr - Br - 1, H[rr++] = 0), rr;
|
|
30065
30065
|
}
|
|
30066
30066
|
var B = 0;
|
|
30067
30067
|
k = k === i ? {} : k;
|
|
30068
30068
|
var Z = k.loop === i ? null : k.loop, W = k.palette === i ? null : k.palette;
|
|
30069
30069
|
if (0 >= w || 0 >= y || w > 65535 || y > 65535)
|
|
30070
30070
|
throw "Width/Height invalid.";
|
|
30071
|
-
|
|
30071
|
+
m[B++] = 71, m[B++] = 73, m[B++] = 70, m[B++] = 56, m[B++] = 57, m[B++] = 97;
|
|
30072
30072
|
var F = 0, U = 0;
|
|
30073
|
-
if (
|
|
30073
|
+
if (m[B++] = 255 & w, m[B++] = w >> 8 & 255, m[B++] = 255 & y, m[B++] = y >> 8 & 255, m[B++] = (W !== null ? 128 : 0) | F, m[B++] = U, m[B++] = 0, Z !== null) {
|
|
30074
30074
|
if (0 > Z || Z > 65535)
|
|
30075
30075
|
throw "Loop count invalid.";
|
|
30076
|
-
|
|
30076
|
+
m[B++] = 33, m[B++] = 255, m[B++] = 11, m[B++] = 78, m[B++] = 69, m[B++] = 84, m[B++] = 83, m[B++] = 67, m[B++] = 65, m[B++] = 80, m[B++] = 69, m[B++] = 50, m[B++] = 46, m[B++] = 48, m[B++] = 3, m[B++] = 1, m[B++] = 255 & Z, m[B++] = Z >> 8 & 255, m[B++] = 0;
|
|
30077
30077
|
}
|
|
30078
30078
|
var K = !1;
|
|
30079
|
-
this.addFrame = function(H,
|
|
30080
|
-
if (K === !0 && (--B, K = !1), Ir = Ir === i ? {} : Ir, 0 > H || 0 >
|
|
30079
|
+
this.addFrame = function(H, rr, T, nr, pr, Ir) {
|
|
30080
|
+
if (K === !0 && (--B, K = !1), Ir = Ir === i ? {} : Ir, 0 > H || 0 > rr || H > 65535 || rr > 65535)
|
|
30081
30081
|
throw "x/y invalid.";
|
|
30082
30082
|
if (0 >= T || 0 >= nr || T > 65535 || nr > 65535)
|
|
30083
30083
|
throw "Width/Height invalid.";
|
|
@@ -30095,51 +30095,51 @@ var By = { exports: {} };
|
|
|
30095
30095
|
var Q = !1, or = 0;
|
|
30096
30096
|
if (Ir.transparent !== i && Ir.transparent !== null && (Q = !0, or = Ir.transparent, 0 > or || or >= Ur))
|
|
30097
30097
|
throw "Transparent color index.";
|
|
30098
|
-
if ((G !== 0 || Q || S !== 0) && (
|
|
30098
|
+
if ((G !== 0 || Q || S !== 0) && (m[B++] = 33, m[B++] = 249, m[B++] = 4, m[B++] = G << 2 | (Q === !0 ? 1 : 0), m[B++] = 255 & S, m[B++] = S >> 8 & 255, m[B++] = or, m[B++] = 0), m[B++] = 44, m[B++] = 255 & H, m[B++] = H >> 8 & 255, m[B++] = 255 & rr, m[B++] = rr >> 8 & 255, m[B++] = 255 & T, m[B++] = T >> 8 & 255, m[B++] = 255 & nr, m[B++] = nr >> 8 & 255, m[B++] = Br === !0 ? 128 | Yr - 1 : 0, Br === !0)
|
|
30099
30099
|
for (var Ar = 0, ir = wr.length; ir > Ar; ++Ar) {
|
|
30100
30100
|
var lr = wr[Ar];
|
|
30101
|
-
|
|
30101
|
+
m[B++] = lr >> 16 & 255, m[B++] = lr >> 8 & 255, m[B++] = 255 & lr;
|
|
30102
30102
|
}
|
|
30103
|
-
B = x(
|
|
30103
|
+
B = x(m, B, 2 > Yr ? 2 : Yr, pr);
|
|
30104
30104
|
}, this.end = function() {
|
|
30105
|
-
return K === !1 && (
|
|
30105
|
+
return K === !1 && (m[B++] = 59, K = !0), B;
|
|
30106
30106
|
};
|
|
30107
30107
|
}
|
|
30108
|
-
function d(
|
|
30109
|
-
|
|
30108
|
+
function d(m, w) {
|
|
30109
|
+
m.getBase64GIF(function(y) {
|
|
30110
30110
|
w({ error: !1, errorCode: "", errorMsg: "", image: y });
|
|
30111
30111
|
});
|
|
30112
30112
|
}
|
|
30113
30113
|
function g() {
|
|
30114
|
-
function
|
|
30115
|
-
C.each(W, function(H,
|
|
30116
|
-
|
|
30114
|
+
function m() {
|
|
30115
|
+
C.each(W, function(H, rr) {
|
|
30116
|
+
rr && (rr.text ? K.addFrame(rr.img, E, rr.text) : K.addFrame(rr, E));
|
|
30117
30117
|
}), d(K, y);
|
|
30118
30118
|
}
|
|
30119
30119
|
var w = arguments.length > 0 && arguments[0] !== i ? arguments[0] : {}, y = w.callback, k = w.images, E = w.options, x = w.imagesLength, B = { getUserMedia: !0, "window.URL": !0 }, Z = V.validate(B), W = [], F = 0, U = void 0, K = void 0;
|
|
30120
|
-
return Z.error ? y(Z) : (K = new ar(E), C.each(k, function(H,
|
|
30121
|
-
var T =
|
|
30122
|
-
|
|
30123
|
-
|
|
30120
|
+
return Z.error ? y(Z) : (K = new ar(E), C.each(k, function(H, rr) {
|
|
30121
|
+
var T = rr;
|
|
30122
|
+
rr.src && (T = T.src), C.isElement(T) ? (E.crossOrigin && (T.crossOrigin = E.crossOrigin), W[H] = T, F += 1, F === x && m()) : C.isString(T) && (U = new Image(), E.crossOrigin && (U.crossOrigin = E.crossOrigin), function(nr) {
|
|
30123
|
+
rr.text && (nr.text = rr.text), nr.onerror = function() {
|
|
30124
30124
|
var pr = void 0;
|
|
30125
30125
|
return --x, x === 0 ? (pr = {}, pr.error = "None of the requested images was capable of being retrieved", y(pr)) : void 0;
|
|
30126
30126
|
}, nr.onload = function() {
|
|
30127
|
-
W[H] =
|
|
30127
|
+
W[H] = rr.text ? { img: nr, text: nr.text } : nr, F += 1, F === x && m(), C.removeElement(nr);
|
|
30128
30128
|
}, nr.src = T;
|
|
30129
30129
|
}(U), C.setCSSAttr(U, { position: "fixed", opacity: "0" }), t.body.appendChild(U));
|
|
30130
30130
|
}), void 0);
|
|
30131
30131
|
}
|
|
30132
|
-
function b(
|
|
30133
|
-
|
|
30132
|
+
function b(m) {
|
|
30133
|
+
m = C.isObject(m) ? m : {}, L.stopVideoStreaming(m);
|
|
30134
30134
|
}
|
|
30135
|
-
function m
|
|
30136
|
-
var y =
|
|
30137
|
-
y.crop = K, y.videoElement = W, y.videoWidth = F, y.videoHeight = U, y.cameraStream = Z, C.isElement(W) && (W.width = x + K.width, W.height = B + K.height, y.webcamVideoElement || (C.setCSSAttr(W, { position: "fixed", opacity: "0" }), t.body.appendChild(W)), W.play(), J.getGIF(y, function(
|
|
30138
|
-
k && k.length || E && E.length || b(
|
|
30135
|
+
function v(m, w) {
|
|
30136
|
+
var y = m.options || {}, k = y.images, E = y.video, x = Number(y.gifWidth), B = Number(y.gifHeight), Z = (Number(y.numFrames), m.cameraStream), W = m.videoElement, F = m.videoWidth, U = m.videoHeight, K = J.getCropDimensions({ videoWidth: F, videoHeight: U, gifHeight: B, gifWidth: x }), H = w;
|
|
30137
|
+
y.crop = K, y.videoElement = W, y.videoWidth = F, y.videoHeight = U, y.cameraStream = Z, C.isElement(W) && (W.width = x + K.width, W.height = B + K.height, y.webcamVideoElement || (C.setCSSAttr(W, { position: "fixed", opacity: "0" }), t.body.appendChild(W)), W.play(), J.getGIF(y, function(rr) {
|
|
30138
|
+
k && k.length || E && E.length || b(rr), H(rr);
|
|
30139
30139
|
}));
|
|
30140
30140
|
}
|
|
30141
30141
|
function I() {
|
|
30142
|
-
var
|
|
30142
|
+
var m = arguments.length > 0 && arguments[0] !== i ? arguments[0] : {}, w = m.callback, y = m.existingVideo, k = m.options, E = { getUserMedia: !0, "window.URL": !0 }, x = V.validate(E), B = void 0, Z = void 0;
|
|
30143
30143
|
if (x.error)
|
|
30144
30144
|
return w(x);
|
|
30145
30145
|
if (C.isElement(y) && y.src) {
|
|
@@ -30150,63 +30150,63 @@ var By = { exports: {} };
|
|
|
30150
30150
|
return B = F instanceof Blob ? F.type.substr(F.type.lastIndexOf("/") + 1, F.length) : F.substr(F.lastIndexOf(".") + 1, F.length), C.isSupported.videoCodecs[B] ? (y = F, !1) : void 0;
|
|
30151
30151
|
});
|
|
30152
30152
|
L.startStreaming({ completed: function(W) {
|
|
30153
|
-
W.options = k || {},
|
|
30153
|
+
W.options = k || {}, v(W, w);
|
|
30154
30154
|
}, existingVideo: y, crossOrigin: k.crossOrigin, options: k });
|
|
30155
30155
|
}
|
|
30156
30156
|
function _() {
|
|
30157
|
-
var
|
|
30157
|
+
var m = arguments.length > 0 && arguments[0] !== i ? arguments[0] : {}, w = m.callback, y = m.lastCameraStream, k = m.options, E = m.webcamVideoElement;
|
|
30158
30158
|
return A() ? k.savedRenderingContexts.length ? (J.getGIF(k, function(x) {
|
|
30159
30159
|
w(x);
|
|
30160
30160
|
}), void 0) : (L.startVideoStreaming(function() {
|
|
30161
30161
|
var x = arguments.length > 0 && arguments[0] !== i ? arguments[0] : {};
|
|
30162
|
-
x.options = k || {},
|
|
30162
|
+
x.options = k || {}, v(x, w);
|
|
30163
30163
|
}, { lastCameraStream: y, callback: w, webcamVideoElement: E, crossOrigin: k.crossOrigin }), void 0) : w(V.validate());
|
|
30164
30164
|
}
|
|
30165
|
-
function N(
|
|
30166
|
-
if (w = C.isFunction(
|
|
30167
|
-
var y = C.mergeOptions(X,
|
|
30165
|
+
function N(m, w) {
|
|
30166
|
+
if (w = C.isFunction(m) ? m : w, m = C.isObject(m) ? m : {}, C.isFunction(w)) {
|
|
30167
|
+
var y = C.mergeOptions(X, m) || {}, k = m.cameraStream, E = y.images, x = E ? E.length : 0, B = y.video, Z = y.webcamVideoElement;
|
|
30168
30168
|
y = C.mergeOptions(y, { gifWidth: Math.floor(y.gifWidth), gifHeight: Math.floor(y.gifHeight) }), x ? g({ images: E, imagesLength: x, callback: w, options: y }) : B ? I({ existingVideo: B, callback: w, options: y }) : _({ lastCameraStream: k, callback: w, webcamVideoElement: Z, options: y });
|
|
30169
30169
|
}
|
|
30170
30170
|
}
|
|
30171
|
-
function R(
|
|
30172
|
-
if (w = C.isFunction(
|
|
30173
|
-
var y = C.mergeOptions(X,
|
|
30171
|
+
function R(m, w) {
|
|
30172
|
+
if (w = C.isFunction(m) ? m : w, m = C.isObject(m) ? m : {}, C.isFunction(w)) {
|
|
30173
|
+
var y = C.mergeOptions(X, m), k = C.mergeOptions(y, { interval: 0.1, numFrames: 1, gifWidth: Math.floor(y.gifWidth), gifHeight: Math.floor(y.gifHeight) });
|
|
30174
30174
|
N(k, w);
|
|
30175
30175
|
}
|
|
30176
30176
|
}
|
|
30177
30177
|
var C = { URL: a.URL || a.webkitURL || a.mozURL || a.msURL, getUserMedia: function() {
|
|
30178
|
-
var
|
|
30179
|
-
return
|
|
30180
|
-
}(), requestAnimFrame: a.requestAnimationFrame || a.webkitRequestAnimationFrame || a.mozRequestAnimationFrame || a.oRequestAnimationFrame || a.msRequestAnimationFrame, requestTimeout: function(
|
|
30181
|
-
if (
|
|
30182
|
-
return setTimeout(
|
|
30178
|
+
var m = n.getUserMedia || n.webkitGetUserMedia || n.mozGetUserMedia || n.msGetUserMedia;
|
|
30179
|
+
return m && m.bind(n);
|
|
30180
|
+
}(), requestAnimFrame: a.requestAnimationFrame || a.webkitRequestAnimationFrame || a.mozRequestAnimationFrame || a.oRequestAnimationFrame || a.msRequestAnimationFrame, requestTimeout: function(m, w) {
|
|
30181
|
+
if (m = m || C.noop, w = w || 0, !C.requestAnimFrame)
|
|
30182
|
+
return setTimeout(m, w);
|
|
30183
30183
|
var y = (/* @__PURE__ */ new Date()).getTime(), k = new Object(), E = C.requestAnimFrame, x = function B() {
|
|
30184
30184
|
var Z = (/* @__PURE__ */ new Date()).getTime(), W = Z - y;
|
|
30185
|
-
W >= w ?
|
|
30185
|
+
W >= w ? m.call() : k.value = E(B);
|
|
30186
30186
|
};
|
|
30187
30187
|
return k.value = E(x), k;
|
|
30188
30188
|
}, Blob: a.Blob || a.BlobBuilder || a.WebKitBlobBuilder || a.MozBlobBuilder || a.MSBlobBuilder, btoa: function() {
|
|
30189
|
-
var
|
|
30189
|
+
var m = a.btoa || function(w) {
|
|
30190
30190
|
for (var y = "", k = 0, E = w.length, x = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", B = void 0, Z = void 0, W = void 0, F = void 0, U = void 0, K = void 0, H = void 0; E > k; )
|
|
30191
30191
|
B = w.charCodeAt(k++), Z = w.charCodeAt(k++), W = w.charCodeAt(k++), F = B >> 2, U = (3 & B) << 4 | Z >> 4, K = (15 & Z) << 2 | W >> 6, H = 63 & W, isNaN(Z) ? K = H = 64 : isNaN(W) && (H = 64), y = y + x.charAt(F) + x.charAt(U) + x.charAt(K) + x.charAt(H);
|
|
30192
30192
|
return y;
|
|
30193
30193
|
};
|
|
30194
|
-
return
|
|
30195
|
-
}(), isObject: function(
|
|
30196
|
-
return
|
|
30197
|
-
}, isEmptyObject: function(
|
|
30198
|
-
return C.isObject(
|
|
30199
|
-
}, isArray: function(
|
|
30200
|
-
return
|
|
30201
|
-
}, isFunction: function(
|
|
30202
|
-
return
|
|
30203
|
-
}, isElement: function(
|
|
30204
|
-
return
|
|
30205
|
-
}, isString: function(
|
|
30206
|
-
return typeof
|
|
30194
|
+
return m ? m.bind(a) : C.noop;
|
|
30195
|
+
}(), isObject: function(m) {
|
|
30196
|
+
return m && Object.prototype.toString.call(m) === "[object Object]";
|
|
30197
|
+
}, isEmptyObject: function(m) {
|
|
30198
|
+
return C.isObject(m) && !Object.keys(m).length;
|
|
30199
|
+
}, isArray: function(m) {
|
|
30200
|
+
return m && Array.isArray(m);
|
|
30201
|
+
}, isFunction: function(m) {
|
|
30202
|
+
return m && typeof m == "function";
|
|
30203
|
+
}, isElement: function(m) {
|
|
30204
|
+
return m && m.nodeType === 1;
|
|
30205
|
+
}, isString: function(m) {
|
|
30206
|
+
return typeof m == "string" || Object.prototype.toString.call(m) === "[object String]";
|
|
30207
30207
|
}, isSupported: { canvas: function() {
|
|
30208
|
-
var
|
|
30209
|
-
return
|
|
30208
|
+
var m = t.createElement("canvas");
|
|
30209
|
+
return m && m.getContext && m.getContext("2d");
|
|
30210
30210
|
}, webworkers: function() {
|
|
30211
30211
|
return a.Worker;
|
|
30212
30212
|
}, blob: function() {
|
|
@@ -30216,152 +30216,152 @@ var By = { exports: {} };
|
|
|
30216
30216
|
}, Uint32Array: function() {
|
|
30217
30217
|
return a.Uint32Array;
|
|
30218
30218
|
}, videoCodecs: function() {
|
|
30219
|
-
var
|
|
30219
|
+
var m = t.createElement("video"), w = { mp4: !1, h264: !1, ogv: !1, ogg: !1, webm: !1 };
|
|
30220
30220
|
try {
|
|
30221
|
-
|
|
30221
|
+
m && m.canPlayType && (w.mp4 = m.canPlayType('video/mp4; codecs="mp4v.20.8"') !== "", w.h264 = (m.canPlayType('video/mp4; codecs="avc1.42E01E"') || m.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"')) !== "", w.ogv = m.canPlayType('video/ogg; codecs="theora"') !== "", w.ogg = m.canPlayType('video/ogg; codecs="theora"') !== "", w.webm = m.canPlayType('video/webm; codecs="vp8, vorbis"') !== -1);
|
|
30222
30222
|
} catch {
|
|
30223
30223
|
}
|
|
30224
30224
|
return w;
|
|
30225
30225
|
}() }, noop: function() {
|
|
30226
|
-
}, each: function(
|
|
30226
|
+
}, each: function(m, w) {
|
|
30227
30227
|
var y = void 0, k = void 0;
|
|
30228
|
-
if (C.isArray(
|
|
30229
|
-
for (y = -1, k =
|
|
30228
|
+
if (C.isArray(m))
|
|
30229
|
+
for (y = -1, k = m.length; ++y < k && w(y, m[y]) !== !1; )
|
|
30230
30230
|
;
|
|
30231
|
-
else if (C.isObject(
|
|
30232
|
-
for (y in
|
|
30233
|
-
if (
|
|
30231
|
+
else if (C.isObject(m)) {
|
|
30232
|
+
for (y in m)
|
|
30233
|
+
if (m.hasOwnProperty(y) && w(y, m[y]) === !1)
|
|
30234
30234
|
break;
|
|
30235
30235
|
}
|
|
30236
|
-
}, mergeOptions: function(
|
|
30237
|
-
if (C.isObject(
|
|
30236
|
+
}, mergeOptions: function(m, w) {
|
|
30237
|
+
if (C.isObject(m) && C.isObject(w) && Object.keys) {
|
|
30238
30238
|
var y = {};
|
|
30239
|
-
return C.each(
|
|
30240
|
-
y[k] =
|
|
30239
|
+
return C.each(m, function(k) {
|
|
30240
|
+
y[k] = m[k];
|
|
30241
30241
|
}), C.each(w, function(k) {
|
|
30242
30242
|
var E = w[k];
|
|
30243
|
-
y[k] = C.isObject(E) &&
|
|
30243
|
+
y[k] = C.isObject(E) && m[k] ? C.mergeOptions(m[k], E) : E;
|
|
30244
30244
|
}), y;
|
|
30245
30245
|
}
|
|
30246
|
-
}, setCSSAttr: function(
|
|
30247
|
-
C.isElement(
|
|
30248
|
-
|
|
30246
|
+
}, setCSSAttr: function(m, w, y) {
|
|
30247
|
+
C.isElement(m) && (C.isString(w) && C.isString(y) ? m.style[w] = y : C.isObject(w) && C.each(w, function(k, E) {
|
|
30248
|
+
m.style[k] = E;
|
|
30249
30249
|
}));
|
|
30250
|
-
}, removeElement: function(
|
|
30251
|
-
C.isElement(
|
|
30252
|
-
}, createWebWorker: function(
|
|
30253
|
-
if (!C.isString(
|
|
30250
|
+
}, removeElement: function(m) {
|
|
30251
|
+
C.isElement(m) && m.parentNode && m.parentNode.removeChild(m);
|
|
30252
|
+
}, createWebWorker: function(m) {
|
|
30253
|
+
if (!C.isString(m))
|
|
30254
30254
|
return {};
|
|
30255
30255
|
try {
|
|
30256
|
-
var w = new C.Blob([
|
|
30256
|
+
var w = new C.Blob([m], { type: "text/javascript" }), y = C.URL.createObjectURL(w), k = new Worker(y);
|
|
30257
30257
|
return { objectUrl: y, worker: k };
|
|
30258
30258
|
} catch (E) {
|
|
30259
30259
|
return "" + E;
|
|
30260
30260
|
}
|
|
30261
|
-
}, getExtension: function(
|
|
30262
|
-
return
|
|
30261
|
+
}, getExtension: function(m) {
|
|
30262
|
+
return m.substr(m.lastIndexOf(".") + 1, m.length);
|
|
30263
30263
|
}, getFontSize: function() {
|
|
30264
|
-
var
|
|
30265
|
-
if (!t.body ||
|
|
30266
|
-
return
|
|
30267
|
-
var w =
|
|
30264
|
+
var m = arguments.length > 0 && arguments[0] !== i ? arguments[0] : {};
|
|
30265
|
+
if (!t.body || m.resizeFont === !1)
|
|
30266
|
+
return m.fontSize;
|
|
30267
|
+
var w = m.text, y = m.gifWidth, k = parseInt(m.fontSize, 10), E = parseInt(m.minFontSize, 10), x = t.createElement("div"), B = t.createElement("span");
|
|
30268
30268
|
for (x.setAttribute("width", y), x.appendChild(B), B.innerHTML = w, B.style.fontSize = k + "px", B.style.textIndent = "-9999px", B.style.visibility = "hidden", t.body.appendChild(B); B.offsetWidth > y && k >= E; )
|
|
30269
30269
|
B.style.fontSize = --k + "px";
|
|
30270
30270
|
return t.body.removeChild(B), k + "px";
|
|
30271
|
-
}, webWorkerError: !1 }, P = Object.freeze({ default: C }), V = { validate: function(
|
|
30272
|
-
|
|
30271
|
+
}, webWorkerError: !1 }, P = Object.freeze({ default: C }), V = { validate: function(m) {
|
|
30272
|
+
m = C.isObject(m) ? m : {};
|
|
30273
30273
|
var w = {};
|
|
30274
30274
|
return C.each(V.validators, function(y, k) {
|
|
30275
30275
|
var E = k.errorCode;
|
|
30276
|
-
return
|
|
30276
|
+
return m[E] || k.condition ? void 0 : (w = k, w.error = !0, !1);
|
|
30277
30277
|
}), delete w.condition, w;
|
|
30278
30278
|
}, isValid: function(w) {
|
|
30279
30279
|
var y = V.validate(w), k = y.error !== !0;
|
|
30280
30280
|
return k;
|
|
30281
|
-
}, validators: [{ condition: C.isFunction(C.getUserMedia), errorCode: "getUserMedia", errorMsg: "The getUserMedia API is not supported in your browser" }, { condition: C.isSupported.canvas(), errorCode: "canvas", errorMsg: "Canvas elements are not supported in your browser" }, { condition: C.isSupported.webworkers(), errorCode: "webworkers", errorMsg: "The Web Workers API is not supported in your browser" }, { condition: C.isFunction(C.URL), errorCode: "window.URL", errorMsg: "The window.URL API is not supported in your browser" }, { condition: C.isSupported.blob(), errorCode: "window.Blob", errorMsg: "The window.Blob File API is not supported in your browser" }, { condition: C.isSupported.Uint8Array(), errorCode: "window.Uint8Array", errorMsg: "The window.Uint8Array function constructor is not supported in your browser" }, { condition: C.isSupported.Uint32Array(), errorCode: "window.Uint32Array", errorMsg: "The window.Uint32Array function constructor is not supported in your browser" }], messages: { videoCodecs: { errorCode: "videocodec", errorMsg: "The video codec you are trying to use is not supported in your browser" } } },
|
|
30281
|
+
}, validators: [{ condition: C.isFunction(C.getUserMedia), errorCode: "getUserMedia", errorMsg: "The getUserMedia API is not supported in your browser" }, { condition: C.isSupported.canvas(), errorCode: "canvas", errorMsg: "Canvas elements are not supported in your browser" }, { condition: C.isSupported.webworkers(), errorCode: "webworkers", errorMsg: "The Web Workers API is not supported in your browser" }, { condition: C.isFunction(C.URL), errorCode: "window.URL", errorMsg: "The window.URL API is not supported in your browser" }, { condition: C.isSupported.blob(), errorCode: "window.Blob", errorMsg: "The window.Blob File API is not supported in your browser" }, { condition: C.isSupported.Uint8Array(), errorCode: "window.Uint8Array", errorMsg: "The window.Uint8Array function constructor is not supported in your browser" }, { condition: C.isSupported.Uint32Array(), errorCode: "window.Uint32Array", errorMsg: "The window.Uint32Array function constructor is not supported in your browser" }], messages: { videoCodecs: { errorCode: "videocodec", errorMsg: "The video codec you are trying to use is not supported in your browser" } } }, q = Object.freeze({ default: V }), tr = function() {
|
|
30282
30282
|
}, X = { sampleInterval: 10, numWorkers: 2, filter: "", gifWidth: 200, gifHeight: 200, interval: 0.1, numFrames: 10, frameDuration: 1, keepCameraOn: !1, images: [], video: null, webcamVideoElement: null, cameraStream: null, text: "", fontWeight: "normal", fontSize: "16px", minFontSize: "10px", resizeFont: !1, fontFamily: "sans-serif", fontColor: "#ffffff", textAlign: "center", textBaseline: "bottom", textXCoordinate: null, textYCoordinate: null, progressCallback: tr, completeCallback: tr, saveRenderingContexts: !1, savedRenderingContexts: [], showFrameText: !0, crossOrigin: "Anonymous", waterMark: null, waterMarkHeight: null, waterMarkWidth: null, waterMarkXCoordinate: 1, waterMarkYCoordinate: 1 }, er = Object.freeze({ default: X }), Y = function() {
|
|
30283
|
-
}, ar = function(
|
|
30284
|
-
this.canvas = null, this.ctx = null, this.repeat = 0, this.frames = [], this.numRenderedFrames = 0, this.onRenderCompleteCallback = Y, this.onRenderProgressCallback = Y, this.workers = [], this.availableWorkers = [], this.generatingGIF = !1, this.options =
|
|
30283
|
+
}, ar = function(m) {
|
|
30284
|
+
this.canvas = null, this.ctx = null, this.repeat = 0, this.frames = [], this.numRenderedFrames = 0, this.onRenderCompleteCallback = Y, this.onRenderProgressCallback = Y, this.workers = [], this.availableWorkers = [], this.generatingGIF = !1, this.options = m, this.initializeWebWorkers(m);
|
|
30285
30285
|
};
|
|
30286
|
-
ar.prototype = { workerMethods: c(), initializeWebWorkers: function(
|
|
30286
|
+
ar.prototype = { workerMethods: c(), initializeWebWorkers: function(m) {
|
|
30287
30287
|
var w = this, y = u.toString() + "(" + c.toString() + "());", k = void 0, E = void 0, x = void 0, B = void 0, Z = -1, W = "";
|
|
30288
|
-
for (B =
|
|
30288
|
+
for (B = m.numWorkers; ++Z < B; )
|
|
30289
30289
|
k = C.createWebWorker(y), C.isObject(k) ? (E = k.objectUrl, x = k.worker, w.workers.push({ worker: x, objectUrl: E }), w.availableWorkers.push(x)) : (W = k, C.webWorkerError = !!k);
|
|
30290
|
-
this.workerError = W, this.canvas = t.createElement("canvas"), this.canvas.width =
|
|
30290
|
+
this.workerError = W, this.canvas = t.createElement("canvas"), this.canvas.width = m.gifWidth, this.canvas.height = m.gifHeight, this.ctx = this.canvas.getContext("2d"), this.frames = [];
|
|
30291
30291
|
}, getWorker: function() {
|
|
30292
30292
|
return this.availableWorkers.pop();
|
|
30293
|
-
}, freeWorker: function(
|
|
30294
|
-
this.availableWorkers.push(
|
|
30293
|
+
}, freeWorker: function(m) {
|
|
30294
|
+
this.availableWorkers.push(m);
|
|
30295
30295
|
}, byteMap: function() {
|
|
30296
|
-
for (var
|
|
30297
|
-
|
|
30298
|
-
return
|
|
30299
|
-
}(), bufferToString: function(
|
|
30300
|
-
for (var w =
|
|
30301
|
-
y += this.byteMap[
|
|
30296
|
+
for (var m = [], w = 0; 256 > w; w++)
|
|
30297
|
+
m[w] = String.fromCharCode(w);
|
|
30298
|
+
return m;
|
|
30299
|
+
}(), bufferToString: function(m) {
|
|
30300
|
+
for (var w = m.length, y = "", k = -1; ++k < w; )
|
|
30301
|
+
y += this.byteMap[m[k]];
|
|
30302
30302
|
return y;
|
|
30303
|
-
}, onFrameFinished: function(
|
|
30303
|
+
}, onFrameFinished: function(m) {
|
|
30304
30304
|
var w = this, y = w.frames, k = w.options, E = !!(k.images || []).length, x = y.every(function(B) {
|
|
30305
30305
|
return !B.beingProcessed && B.done;
|
|
30306
30306
|
});
|
|
30307
|
-
w.numRenderedFrames++, E &&
|
|
30307
|
+
w.numRenderedFrames++, E && m(w.numRenderedFrames / y.length), w.onRenderProgressCallback(0.75 * w.numRenderedFrames / y.length), x ? w.generatingGIF || w.generateGIF(y, w.onRenderCompleteCallback) : C.requestTimeout(function() {
|
|
30308
30308
|
w.processNextFrame();
|
|
30309
30309
|
}, 1);
|
|
30310
|
-
}, processFrame: function(
|
|
30310
|
+
}, processFrame: function(m) {
|
|
30311
30311
|
var w = this, y = (this.options, this.options), k = y.progressCallback, E = y.sampleInterval, x = this.frames, B = void 0, Z = void 0, W = function() {
|
|
30312
30312
|
var F = arguments.length > 0 && arguments[0] !== i ? arguments[0] : {}, U = F.data;
|
|
30313
30313
|
delete B.data, B.pixels = Array.prototype.slice.call(U.pixels), B.palette = Array.prototype.slice.call(U.palette), B.done = !0, B.beingProcessed = !1, w.freeWorker(Z), w.onFrameFinished(k);
|
|
30314
30314
|
};
|
|
30315
|
-
return B = x[
|
|
30316
|
-
}, startRendering: function(
|
|
30317
|
-
this.onRenderCompleteCallback =
|
|
30315
|
+
return B = x[m], B.beingProcessed || B.done ? (this.onFrameFinished(), void 0) : (B.sampleInterval = E, B.beingProcessed = !0, B.gifshot = !0, Z = this.getWorker(), Z ? (Z.onmessage = W, Z.postMessage(B)) : W({ data: w.workerMethods.run(B) }), void 0);
|
|
30316
|
+
}, startRendering: function(m) {
|
|
30317
|
+
this.onRenderCompleteCallback = m;
|
|
30318
30318
|
for (var w = 0; w < this.options.numWorkers && w < this.frames.length; w++)
|
|
30319
30319
|
this.processFrame(w);
|
|
30320
30320
|
}, processNextFrame: function() {
|
|
30321
|
-
for (var
|
|
30321
|
+
for (var m = -1, w = 0; w < this.frames.length; w++) {
|
|
30322
30322
|
var y = this.frames[w];
|
|
30323
30323
|
if (!y.done && !y.beingProcessed) {
|
|
30324
|
-
|
|
30324
|
+
m = w;
|
|
30325
30325
|
break;
|
|
30326
30326
|
}
|
|
30327
30327
|
}
|
|
30328
|
-
|
|
30329
|
-
}, generateGIF: function(
|
|
30330
|
-
var y = [], k = { loop: this.repeat }, E = this.options, x = E.interval, B = E.frameDuration, Z = E.images, W = !!Z.length, F = E.gifHeight, U = E.gifWidth, K = new h(y, U, F, k), H = this.onRenderProgressCallback,
|
|
30331
|
-
this.generatingGIF = !0, C.each(
|
|
30328
|
+
m >= 0 && this.processFrame(m);
|
|
30329
|
+
}, generateGIF: function(m, w) {
|
|
30330
|
+
var y = [], k = { loop: this.repeat }, E = this.options, x = E.interval, B = E.frameDuration, Z = E.images, W = !!Z.length, F = E.gifHeight, U = E.gifWidth, K = new h(y, U, F, k), H = this.onRenderProgressCallback, rr = W ? 100 * x : 0, T = void 0, nr = void 0;
|
|
30331
|
+
this.generatingGIF = !0, C.each(m, function(pr, Ir) {
|
|
30332
30332
|
var Br = Ir.palette;
|
|
30333
|
-
H(0.75 + 0.25 * Ir.position * 1 /
|
|
30333
|
+
H(0.75 + 0.25 * Ir.position * 1 / m.length);
|
|
30334
30334
|
for (var wr = 0; B > wr; wr++)
|
|
30335
|
-
K.addFrame(0, 0, U, F, Ir.pixels, { palette: Br, delay:
|
|
30335
|
+
K.addFrame(0, 0, U, F, Ir.pixels, { palette: Br, delay: rr });
|
|
30336
30336
|
}), K.end(), H(1), this.frames = [], this.generatingGIF = !1, C.isFunction(w) && (T = this.bufferToString(y), nr = "data:image/gif;base64," + C.btoa(T), w(nr));
|
|
30337
|
-
}, setRepeat: function(
|
|
30338
|
-
this.repeat =
|
|
30339
|
-
}, addFrame: function(
|
|
30337
|
+
}, setRepeat: function(m) {
|
|
30338
|
+
this.repeat = m;
|
|
30339
|
+
}, addFrame: function(m, w, y) {
|
|
30340
30340
|
w = C.isObject(w) ? w : {};
|
|
30341
|
-
var k = this, E = k.ctx, x = k.options, B = x.gifWidth, Z = x.gifHeight, W = C.getFontSize(w), F = w, U = F.filter, K = F.fontColor, H = F.fontFamily,
|
|
30341
|
+
var k = this, E = k.ctx, x = k.options, B = x.gifWidth, Z = x.gifHeight, W = C.getFontSize(w), F = w, U = F.filter, K = F.fontColor, H = F.fontFamily, rr = F.fontWeight, T = (F.gifHeight, F.gifWidth, F.text), nr = F.textAlign, pr = F.textBaseline, Ir = F.waterMark, Br = F.waterMarkHeight, wr = F.waterMarkWidth, Ur = F.waterMarkXCoordinate, Yr = F.waterMarkYCoordinate, S = w.textXCoordinate ? w.textXCoordinate : nr === "left" ? 1 : nr === "right" ? B : B / 2, G = w.textYCoordinate ? w.textYCoordinate : pr === "top" ? 1 : pr === "center" ? Z / 2 : Z, Q = rr + " " + W + " " + H, or = y && w.showFrameText ? y : T, Ar = void 0;
|
|
30342
30342
|
try {
|
|
30343
|
-
E.filter = U, E.drawImage(
|
|
30343
|
+
E.filter = U, E.drawImage(m, 0, 0, B, Z), or && (E.font = Q, E.fillStyle = K, E.textAlign = nr, E.textBaseline = pr, E.fillText(or, S, G)), Ir && E.drawImage(Ir, Ur, Yr, wr, Br), Ar = E.getImageData(0, 0, B, Z), k.addFrameImageData(Ar);
|
|
30344
30344
|
} catch (ir) {
|
|
30345
30345
|
return "" + ir;
|
|
30346
30346
|
}
|
|
30347
30347
|
}, addFrameImageData: function() {
|
|
30348
|
-
var
|
|
30349
|
-
this.frames.push({ data: y, width:
|
|
30350
|
-
}, onRenderProgress: function(
|
|
30351
|
-
this.onRenderProgressCallback =
|
|
30348
|
+
var m = arguments.length > 0 && arguments[0] !== i ? arguments[0] : {}, w = this.frames, y = m.data;
|
|
30349
|
+
this.frames.push({ data: y, width: m.width, height: m.height, palette: null, dithering: null, done: !1, beingProcessed: !1, position: w.length });
|
|
30350
|
+
}, onRenderProgress: function(m) {
|
|
30351
|
+
this.onRenderProgressCallback = m;
|
|
30352
30352
|
}, isRendering: function() {
|
|
30353
30353
|
return this.generatingGIF;
|
|
30354
|
-
}, getBase64GIF: function(
|
|
30354
|
+
}, getBase64GIF: function(m) {
|
|
30355
30355
|
var w = this, y = function(k) {
|
|
30356
30356
|
w.destroyWorkers(), C.requestTimeout(function() {
|
|
30357
|
-
|
|
30357
|
+
m(k);
|
|
30358
30358
|
}, 0);
|
|
30359
30359
|
};
|
|
30360
30360
|
w.startRendering(y);
|
|
30361
30361
|
}, destroyWorkers: function() {
|
|
30362
30362
|
if (!this.workerError) {
|
|
30363
|
-
var
|
|
30364
|
-
C.each(
|
|
30363
|
+
var m = this.workers;
|
|
30364
|
+
C.each(m, function(w, y) {
|
|
30365
30365
|
var k = y.worker, E = y.objectUrl;
|
|
30366
30366
|
k.terminate(), C.URL.revokeObjectURL(E);
|
|
30367
30367
|
});
|
|
@@ -30369,9 +30369,9 @@ var By = { exports: {} };
|
|
|
30369
30369
|
} };
|
|
30370
30370
|
var $ = function() {
|
|
30371
30371
|
}, J = { getGIF: function() {
|
|
30372
|
-
var
|
|
30372
|
+
var m = arguments.length > 0 && arguments[0] !== i ? arguments[0] : {}, w = arguments[1];
|
|
30373
30373
|
w = C.isFunction(w) ? w : $;
|
|
30374
|
-
var y = t.createElement("canvas"), k = void 0, E =
|
|
30374
|
+
var y = t.createElement("canvas"), k = void 0, E = m.images, x = !!E.length, B = m.cameraStream, Z = m.crop, W = m.filter, F = m.fontColor, U = m.fontFamily, K = m.fontWeight, H = m.keepCameraOn, rr = (m.numWorkers, m.progressCallback), T = m.saveRenderingContexts, nr = m.savedRenderingContexts, pr = m.text, Ir = m.textAlign, Br = m.textBaseline, wr = m.videoElement, Ur = m.videoHeight, Yr = m.videoWidth, S = m.webcamVideoElement, G = m.waterMark, Q = m.waterMarkHeight, or = m.waterMarkWidth, Ar = m.waterMarkXCoordinate, ir = m.waterMarkYCoordinate, lr = Number(m.gifWidth), Tr = Number(m.gifHeight), zr = Number(m.interval), S0 = (Number(m.sampleInterval), x ? 0 : 1e3 * zr), oe = [], N0 = nr.length ? nr.length : m.numFrames, na = N0, Ve = new ar(m), he = C.getFontSize(m), ct = m.textXCoordinate ? m.textXCoordinate : Ir === "left" ? 1 : Ir === "right" ? lr : lr / 2, Ce = m.textYCoordinate ? m.textYCoordinate : Br === "top" ? 1 : Br === "center" ? Tr / 2 : Tr, Nn = K + " " + he + " " + U, be = Z ? Math.floor(Z.scaledWidth / 2) : 0, ia = Z ? Yr - Z.scaledWidth : 0, ma = Z ? Math.floor(Z.scaledHeight / 2) : 0, Ma = Z ? Ur - Z.scaledHeight : 0, dt = function ue() {
|
|
30375
30375
|
function Fr() {
|
|
30376
30376
|
try {
|
|
30377
30377
|
ia > Yr && (ia = Yr), Ma > Ur && (Ma = Ur), 0 > be && (be = 0), 0 > ma && (ma = 0), k.filter = W, k.drawImage(wr, be, ma, ia, Ma, 0, 0, lr, Tr), sr();
|
|
@@ -30383,7 +30383,7 @@ var By = { exports: {} };
|
|
|
30383
30383
|
}
|
|
30384
30384
|
function sr() {
|
|
30385
30385
|
var cr = void 0;
|
|
30386
|
-
T && oe.push(k.getImageData(0, 0, lr, Tr)), G && k.drawImage(G, Ar, ir, or, Q), pr && (k.font = Nn, k.fillStyle = F, k.textAlign = Ir, k.textBaseline = Br, k.fillText(pr, ct, Ce)), cr = k.getImageData(0, 0, lr, Tr), Ve.addFrameImageData(cr), na = Nr,
|
|
30386
|
+
T && oe.push(k.getImageData(0, 0, lr, Tr)), G && k.drawImage(G, Ar, ir, or, Q), pr && (k.font = Nn, k.fillStyle = F, k.textAlign = Ir, k.textBaseline = Br, k.fillText(pr, ct, Ce)), cr = k.getImageData(0, 0, lr, Tr), Ve.addFrameImageData(cr), na = Nr, rr((N0 - na) / N0), Nr > 0 && C.requestTimeout(ue, S0), na || Ve.getBase64GIF(function(Er) {
|
|
30387
30387
|
w({ error: !1, errorCode: "", errorMsg: "", image: Er, cameraStream: B, videoElement: wr, webcamVideoElement: S, savedRenderingContexts: oe, keepCameraOn: H });
|
|
30388
30388
|
});
|
|
30389
30389
|
}
|
|
@@ -30394,18 +30394,18 @@ var By = { exports: {} };
|
|
|
30394
30394
|
return nr.length || wr.currentTime !== 0 ? (dt(), void 0) : (C.requestTimeout(ue, 100), void 0);
|
|
30395
30395
|
}();
|
|
30396
30396
|
}, getCropDimensions: function() {
|
|
30397
|
-
var
|
|
30397
|
+
var m = arguments.length > 0 && arguments[0] !== i ? arguments[0] : {}, w = m.videoWidth, y = m.videoHeight, k = m.gifWidth, E = m.gifHeight, x = { width: 0, height: 0, scaledWidth: 0, scaledHeight: 0 };
|
|
30398
30398
|
return w > y ? (x.width = Math.round(w * (E / y)) - k, x.scaledWidth = Math.round(x.width * (y / E))) : (x.height = Math.round(y * (k / w)) - E, x.scaledHeight = Math.round(x.height * (w / k))), x;
|
|
30399
|
-
} }, L = { loadedData: !1, defaultVideoDimensions: { width: 640, height: 480 }, findVideoSize: function
|
|
30400
|
-
|
|
30399
|
+
} }, L = { loadedData: !1, defaultVideoDimensions: { width: 640, height: 480 }, findVideoSize: function m(w) {
|
|
30400
|
+
m.attempts = m.attempts || 0;
|
|
30401
30401
|
var y = w.cameraStream, k = w.completedCallback, E = w.videoElement;
|
|
30402
|
-
E && (E.videoWidth > 0 && E.videoHeight > 0 ? (E.removeEventListener("loadeddata", L.findVideoSize), k({ videoElement: E, cameraStream: y, videoWidth: E.videoWidth, videoHeight: E.videoHeight })) :
|
|
30402
|
+
E && (E.videoWidth > 0 && E.videoHeight > 0 ? (E.removeEventListener("loadeddata", L.findVideoSize), k({ videoElement: E, cameraStream: y, videoWidth: E.videoWidth, videoHeight: E.videoHeight })) : m.attempts < 10 ? (m.attempts += 1, C.requestTimeout(function() {
|
|
30403
30403
|
L.findVideoSize(w);
|
|
30404
30404
|
}, 400)) : k({ videoElement: E, cameraStream: y, videoWidth: L.defaultVideoDimensions.width, videoHeight: L.defaultVideoDimensions.height }));
|
|
30405
|
-
}, onStreamingTimeout: function(
|
|
30406
|
-
C.isFunction(
|
|
30407
|
-
}, stream: function(
|
|
30408
|
-
var w = C.isArray(
|
|
30405
|
+
}, onStreamingTimeout: function(m) {
|
|
30406
|
+
C.isFunction(m) && m({ error: !0, errorCode: "getUserMedia", errorMsg: "There was an issue with the getUserMedia API - Timed out while trying to start streaming", image: null, cameraStream: {} });
|
|
30407
|
+
}, stream: function(m) {
|
|
30408
|
+
var w = C.isArray(m.existingVideo) ? m.existingVideo[0] : m.existingVideo, y = m.cameraStream, k = m.completedCallback, E = m.streamedCallback, x = m.videoElement;
|
|
30409
30409
|
if (C.isFunction(E) && E(), w) {
|
|
30410
30410
|
if (C.isString(w))
|
|
30411
30411
|
x.src = w, x.innerHTML = '<source src="' + w + '" type="video/' + C.getExtension(w) + '" />';
|
|
@@ -30427,14 +30427,14 @@ var By = { exports: {} };
|
|
|
30427
30427
|
x.play(), C.requestTimeout(function B() {
|
|
30428
30428
|
B.count = B.count || 0, L.loadedData === !0 ? (L.findVideoSize({ videoElement: x, cameraStream: y, completedCallback: k }), L.loadedData = !1) : (B.count += 1, B.count > 10 ? L.findVideoSize({ videoElement: x, cameraStream: y, completedCallback: k }) : B());
|
|
30429
30429
|
}, 0);
|
|
30430
|
-
}, startStreaming: function(
|
|
30431
|
-
var w = C.isFunction(
|
|
30430
|
+
}, startStreaming: function(m) {
|
|
30431
|
+
var w = C.isFunction(m.error) ? m.error : C.noop, y = C.isFunction(m.streamed) ? m.streamed : C.noop, k = C.isFunction(m.completed) ? m.completed : C.noop, E = m.crossOrigin, x = m.existingVideo, B = m.lastCameraStream, Z = m.options, W = m.webcamVideoElement, F = C.isElement(x) ? x : W || t.createElement("video");
|
|
30432
30432
|
E && (F.crossOrigin = Z.crossOrigin), F.autoplay = !0, F.loop = !0, F.muted = !0, F.addEventListener("loadeddata", function() {
|
|
30433
30433
|
L.loadedData = !0, Z.offset && (F.currentTime = Z.offset);
|
|
30434
30434
|
}), x ? L.stream({ videoElement: F, existingVideo: x, completedCallback: k }) : B ? L.stream({ videoElement: F, cameraStream: B, streamedCallback: y, completedCallback: k }) : C.getUserMedia({ video: !0 }, function(U) {
|
|
30435
30435
|
L.stream({ videoElement: F, cameraStream: U, streamedCallback: y, completedCallback: k });
|
|
30436
30436
|
}, w);
|
|
30437
|
-
}, startVideoStreaming: function(
|
|
30437
|
+
}, startVideoStreaming: function(m) {
|
|
30438
30438
|
var w = arguments.length > 1 && arguments[1] !== i ? arguments[1] : {}, y = w.timeout !== i ? w.timeout : 0, k = w.callback, E = w.webcamVideoElement, x = void 0;
|
|
30439
30439
|
y > 0 && (x = C.requestTimeout(function() {
|
|
30440
30440
|
L.onStreamingTimeout(k);
|
|
@@ -30444,13 +30444,13 @@ var By = { exports: {} };
|
|
|
30444
30444
|
clearTimeout(x);
|
|
30445
30445
|
}, completed: function() {
|
|
30446
30446
|
var B = arguments.length > 0 && arguments[0] !== i ? arguments[0] : {}, Z = B.cameraStream, W = B.videoElement, F = B.videoHeight, U = B.videoWidth;
|
|
30447
|
-
|
|
30447
|
+
m({ cameraStream: Z, videoElement: W, videoHeight: F, videoWidth: U });
|
|
30448
30448
|
}, lastCameraStream: w.lastCameraStream, webcamVideoElement: E, crossOrigin: w.crossOrigin, options: w });
|
|
30449
|
-
}, stopVideoStreaming: function(
|
|
30450
|
-
|
|
30451
|
-
var w =
|
|
30449
|
+
}, stopVideoStreaming: function(m) {
|
|
30450
|
+
m = C.isObject(m) ? m : {};
|
|
30451
|
+
var w = m, y = w.keepCameraOn, k = w.videoElement, E = w.webcamVideoElement, x = m.cameraStream || {}, B = x.getTracks ? x.getTracks() || [] : [], Z = !!B.length, W = B[0];
|
|
30452
30452
|
!y && Z && C.isFunction(W.stop) && W.stop(), C.isElement(k) && !E && (k.pause(), C.isFunction(C.URL.revokeObjectURL) && !C.webWorkerError && k.src && C.URL.revokeObjectURL(k.src), C.removeElement(k));
|
|
30453
|
-
} }, O = { utils: P, error:
|
|
30453
|
+
} }, O = { utils: P, error: q, defaultOptions: er, createGIF: N, takeSnapShot: R, stopVideoStreaming: b, isSupported: o, isWebCamGIFSupported: A, isExistingVideoGIFSupported: f, isExistingImagesGIFSupported: s, VERSION: "0.4.5" };
|
|
30454
30454
|
r.exports = O;
|
|
30455
30455
|
})(typeof window < "u" ? window : {}, typeof document < "u" ? document : { createElement: function() {
|
|
30456
30456
|
} }, typeof window < "u" ? window.navigator : {}), function(a, t) {
|
|
@@ -30560,8 +30560,8 @@ onmessage = (message) => {
|
|
|
30560
30560
|
var b = g.getContext("2d");
|
|
30561
30561
|
if (!b)
|
|
30562
30562
|
return d("ERR_CANVAS Error on converting imagedata to blob: Could not get canvas context");
|
|
30563
|
-
b.putImageData(f, 0, 0), g.toBlob(function(
|
|
30564
|
-
return
|
|
30563
|
+
b.putImageData(f, 0, 0), g.toBlob(function(v) {
|
|
30564
|
+
return v ? h(v) : d("ERR_CANVAS Error on converting imagedata to blob: Could not get blob from canvas");
|
|
30565
30565
|
}, u, c);
|
|
30566
30566
|
});
|
|
30567
30567
|
},
|
|
@@ -30634,8 +30634,8 @@ onmessage = (message) => {
|
|
|
30634
30634
|
var d = s.multiple;
|
|
30635
30635
|
return d === void 0 && (d = void 0), new Promise(function(g, b) {
|
|
30636
30636
|
f instanceof Blob || i.error("ERR_USER library only accepts BLOBs as input"), typeof d != "boolean" && i.error('ERR_USER "multiple" parameter should be of type "boolean"'), typeof c != "number" && i.error('ERR_USER "quality" parameter should be of type "number"'), typeof h != "number" && i.error('ERR_USER "gifInterval" parameter should be of type "number"');
|
|
30637
|
-
var
|
|
30638
|
-
|
|
30637
|
+
var v = new FileReader();
|
|
30638
|
+
v.onload = function(I) {
|
|
30639
30639
|
var _ = 0, N = 0, R = I.target.result, C = i.otherImageType(R);
|
|
30640
30640
|
if (C)
|
|
30641
30641
|
return b(i.error("ERR_USER Image is already browser readable: " + C));
|
|
@@ -30666,7 +30666,7 @@ onmessage = (message) => {
|
|
|
30666
30666
|
}).catch(function(P) {
|
|
30667
30667
|
b(i.error(P));
|
|
30668
30668
|
});
|
|
30669
|
-
},
|
|
30669
|
+
}, v.readAsArrayBuffer(f);
|
|
30670
30670
|
});
|
|
30671
30671
|
}
|
|
30672
30672
|
return A;
|
|
@@ -30714,10 +30714,10 @@ const co = I2(
|
|
|
30714
30714
|
onHeicConversionStart: d,
|
|
30715
30715
|
isSubmitting: g,
|
|
30716
30716
|
isFormatHintVisible: b = !0,
|
|
30717
|
-
placeholder:
|
|
30717
|
+
placeholder: v = i ? "Select files" : "Select file",
|
|
30718
30718
|
...I
|
|
30719
30719
|
}, _) => {
|
|
30720
|
-
const [N, R] = n0([]), [C, P] = n0(!1), { toast: V } = Qo(),
|
|
30720
|
+
const [N, R] = n0([]), [C, P] = n0(!1), { toast: V } = Qo(), q = Ze(0), tr = Ze(null), X = c || `file-field-${r.toLowerCase().replace(/\s+/g, "-")}`, er = async (k) => {
|
|
30721
30721
|
try {
|
|
30722
30722
|
const E = await uD(k), x = E;
|
|
30723
30723
|
x.preview = URL.createObjectURL(E), R((B) => {
|
|
@@ -30770,19 +30770,19 @@ const co = I2(
|
|
|
30770
30770
|
},
|
|
30771
30771
|
[N, o, n, A, h, i]
|
|
30772
30772
|
), $ = U0((k) => {
|
|
30773
|
-
k.preventDefault(),
|
|
30773
|
+
k.preventDefault(), q.current += 1, q.current === 1 && P(!0);
|
|
30774
30774
|
}, []), J = U0((k) => {
|
|
30775
|
-
k.preventDefault(),
|
|
30775
|
+
k.preventDefault(), q.current -= 1, q.current <= 0 && (P(!1), q.current = 0);
|
|
30776
30776
|
}, []), L = U0((k) => {
|
|
30777
30777
|
k.preventDefault();
|
|
30778
30778
|
}, []), O = U0(
|
|
30779
30779
|
(k) => {
|
|
30780
|
-
if (k.preventDefault(), P(!1),
|
|
30780
|
+
if (k.preventDefault(), P(!1), q.current = 0, s) return;
|
|
30781
30781
|
const E = k.dataTransfer.files, x = i && N.length > 0;
|
|
30782
30782
|
ar(E, x);
|
|
30783
30783
|
},
|
|
30784
30784
|
[s, ar, i, N.length]
|
|
30785
|
-
),
|
|
30785
|
+
), m = U0(() => {
|
|
30786
30786
|
var k;
|
|
30787
30787
|
s || (k = tr.current) == null || k.click();
|
|
30788
30788
|
}, [s]), w = U0(() => {
|
|
@@ -30843,11 +30843,11 @@ const co = I2(
|
|
|
30843
30843
|
onDragLeave: J,
|
|
30844
30844
|
onDragOver: L,
|
|
30845
30845
|
onDrop: O,
|
|
30846
|
-
onClick: N.length === 0 ?
|
|
30846
|
+
onClick: N.length === 0 ? m : void 0,
|
|
30847
30847
|
children: N.length === 0 ? /* @__PURE__ */ M("div", { className: "text-center", children: [
|
|
30848
30848
|
/* @__PURE__ */ l(d4, { className: "mx-auto mb-2 h-8 w-8 text-gray-400" }),
|
|
30849
30849
|
/* @__PURE__ */ M("div", { className: "text-sm text-gray-600", children: [
|
|
30850
|
-
/* @__PURE__ */ l("span", { className: "hover:text-primary/80 font-medium text-primary", children:
|
|
30850
|
+
/* @__PURE__ */ l("span", { className: "hover:text-primary/80 font-medium text-primary", children: v }),
|
|
30851
30851
|
" or drag here"
|
|
30852
30852
|
] }),
|
|
30853
30853
|
(n || o) && /* @__PURE__ */ M("div", { className: "mt-1 text-xs text-gray-500", children: [
|
|
@@ -31395,7 +31395,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${e.do
|
|
|
31395
31395
|
let a = Si(() => {
|
|
31396
31396
|
var E, x;
|
|
31397
31397
|
return { search: "", value: (x = (E = r.value) != null ? E : r.defaultValue) != null ? x : "", selectedItemId: void 0, filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
|
|
31398
|
-
}), t = Si(() => /* @__PURE__ */ new Set()), n = Si(() => /* @__PURE__ */ new Map()), i = Si(() => /* @__PURE__ */ new Map()), o = Si(() => /* @__PURE__ */ new Set()), A = Ky(r), { label: s, children: f, value: u, onValueChange: c, filter: h, shouldFilter: d, loop: g, disablePointerSelection: b = !1, vimBindings:
|
|
31398
|
+
}), t = Si(() => /* @__PURE__ */ new Set()), n = Si(() => /* @__PURE__ */ new Map()), i = Si(() => /* @__PURE__ */ new Map()), o = Si(() => /* @__PURE__ */ new Set()), A = Ky(r), { label: s, children: f, value: u, onValueChange: c, filter: h, shouldFilter: d, loop: g, disablePointerSelection: b = !1, vimBindings: v = !0, ...I } = r, _ = Qe(), N = Qe(), R = Qe(), C = p.useRef(null), P = rV();
|
|
31399
31399
|
di(() => {
|
|
31400
31400
|
if (u !== void 0) {
|
|
31401
31401
|
let E = u.trim();
|
|
@@ -31426,7 +31426,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${e.do
|
|
|
31426
31426
|
}
|
|
31427
31427
|
}, emit: () => {
|
|
31428
31428
|
o.current.forEach((E) => E());
|
|
31429
|
-
} }), []),
|
|
31429
|
+
} }), []), q = p.useMemo(() => ({ value: (E, x, B) => {
|
|
31430
31430
|
var Z;
|
|
31431
31431
|
x !== ((Z = i.current.get(E)) == null ? void 0 : Z.value) && (i.current.set(E, { value: x, keywords: B }), a.current.filtered.items.set(E, tr(x, B)), P(2, () => {
|
|
31432
31432
|
X(), V.emit();
|
|
@@ -31515,15 +31515,15 @@ For more information, see https://radix-ui.com/primitives/docs/components/${e.do
|
|
|
31515
31515
|
let B = $(), Z = J(), W = Z.findIndex((U) => U === B), F = Z[W + E];
|
|
31516
31516
|
(x = A.current) != null && x.loop && (F = W + E < 0 ? Z[Z.length - 1] : W + E === Z.length ? Z[0] : Z[W + E]), F && V.setState("value", F.getAttribute(Zi));
|
|
31517
31517
|
}
|
|
31518
|
-
function
|
|
31518
|
+
function m(E) {
|
|
31519
31519
|
let x = $(), B = x == null ? void 0 : x.closest(ro), Z;
|
|
31520
31520
|
for (; B && !Z; ) B = E > 0 ? KD(B, ro) : qD(B, ro), Z = B == null ? void 0 : B.querySelector(y6);
|
|
31521
31521
|
Z ? V.setState("value", Z.getAttribute(Zi)) : O(E);
|
|
31522
31522
|
}
|
|
31523
31523
|
let w = () => L(J().length - 1), y = (E) => {
|
|
31524
|
-
E.preventDefault(), E.metaKey ? w() : E.altKey ?
|
|
31524
|
+
E.preventDefault(), E.metaKey ? w() : E.altKey ? m(1) : O(1);
|
|
31525
31525
|
}, k = (E) => {
|
|
31526
|
-
E.preventDefault(), E.metaKey ? L(0) : E.altKey ?
|
|
31526
|
+
E.preventDefault(), E.metaKey ? L(0) : E.altKey ? m(-1) : O(-1);
|
|
31527
31527
|
};
|
|
31528
31528
|
return p.createElement(Or.div, { ref: e, tabIndex: -1, ...I, "cmdk-root": "", onKeyDown: (E) => {
|
|
31529
31529
|
var x;
|
|
@@ -31532,7 +31532,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${e.do
|
|
|
31532
31532
|
if (!(E.defaultPrevented || B)) switch (E.key) {
|
|
31533
31533
|
case "n":
|
|
31534
31534
|
case "j": {
|
|
31535
|
-
|
|
31535
|
+
v && E.ctrlKey && y(E);
|
|
31536
31536
|
break;
|
|
31537
31537
|
}
|
|
31538
31538
|
case "ArrowDown": {
|
|
@@ -31541,7 +31541,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${e.do
|
|
|
31541
31541
|
}
|
|
31542
31542
|
case "p":
|
|
31543
31543
|
case "k": {
|
|
31544
|
-
|
|
31544
|
+
v && E.ctrlKey && k(E);
|
|
31545
31545
|
break;
|
|
31546
31546
|
}
|
|
31547
31547
|
case "ArrowUp": {
|
|
@@ -31565,7 +31565,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${e.do
|
|
|
31565
31565
|
}
|
|
31566
31566
|
}
|
|
31567
31567
|
}
|
|
31568
|
-
} }, p.createElement("label", { "cmdk-label": "", htmlFor:
|
|
31568
|
+
} }, p.createElement("label", { "cmdk-label": "", htmlFor: q.inputId, id: q.labelId, style: aV }, s), Hf(r, (E) => p.createElement(Qy.Provider, { value: V }, p.createElement(Hy.Provider, { value: q }, E))));
|
|
31569
31569
|
}), jD = p.forwardRef((r, e) => {
|
|
31570
31570
|
var a, t;
|
|
31571
31571
|
let n = Qe(), i = p.useRef(null), o = p.useContext(Jy), A = hA(), s = Ky(r), f = (t = (a = s.current) == null ? void 0 : a.forceMount) != null ? t : o == null ? void 0 : o.forceMount;
|
|
@@ -31585,8 +31585,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/${e.do
|
|
|
31585
31585
|
c.setState("value", u.current, !0);
|
|
31586
31586
|
}
|
|
31587
31587
|
if (!d) return null;
|
|
31588
|
-
let { disabled:
|
|
31589
|
-
return p.createElement(Or.div, { ref: Kn(i, e), ...C, id: n, "cmdk-item": "", role: "option", "aria-disabled": !!
|
|
31588
|
+
let { disabled: v, value: I, onSelect: _, forceMount: N, keywords: R, ...C } = r;
|
|
31589
|
+
return p.createElement(Or.div, { ref: Kn(i, e), ...C, id: n, "cmdk-item": "", role: "option", "aria-disabled": !!v, "aria-selected": !!h, "data-disabled": !!v, "data-selected": !!h, onPointerMove: v || A.getDisablePointerSelection() ? void 0 : b, onClick: v ? void 0 : g }, r.children);
|
|
31590
31590
|
}), LD = p.forwardRef((r, e) => {
|
|
31591
31591
|
let { heading: a, children: t, forceMount: n, ...i } = r, o = Qe(), A = p.useRef(null), s = p.useRef(null), f = Qe(), u = hA(), c = vn((d) => n || u.filter() === !1 ? !0 : d.search ? d.filtered.groups.has(o) : !0);
|
|
31592
31592
|
di(() => u.group(o), []), qy(o, A, [r.value, r.heading, s]);
|
|
@@ -31844,8 +31844,12 @@ const sV = async (r, e) => {
|
|
|
31844
31844
|
className: o,
|
|
31845
31845
|
"data-testid": A
|
|
31846
31846
|
}, s) => {
|
|
31847
|
-
const [f, u] = p.useState(!1), { data:
|
|
31848
|
-
e(
|
|
31847
|
+
const [f, u] = p.useState(!1), c = p.useRef(null), { data: h = [], isLoading: d, isError: g } = fV(a, t), b = h.find((_) => _.code === r), v = (_) => {
|
|
31848
|
+
e(_), u(!1);
|
|
31849
|
+
}, I = (_) => {
|
|
31850
|
+
var R;
|
|
31851
|
+
const N = _.target;
|
|
31852
|
+
(R = c.current) != null && R.contains(N) && _.preventDefault();
|
|
31849
31853
|
};
|
|
31850
31854
|
return /* @__PURE__ */ M(uf, { open: f, onOpenChange: u, children: [
|
|
31851
31855
|
/* @__PURE__ */ l(lf, { asChild: !0, children: /* @__PURE__ */ M(
|
|
@@ -31855,55 +31859,66 @@ const sV = async (r, e) => {
|
|
|
31855
31859
|
variant: "outline",
|
|
31856
31860
|
role: "combobox",
|
|
31857
31861
|
"aria-expanded": f,
|
|
31858
|
-
disabled: i ||
|
|
31862
|
+
disabled: i || d,
|
|
31859
31863
|
"data-testid": A,
|
|
31860
31864
|
className: Zr("h-10 w-full justify-between font-normal", !r && "text-muted-foreground", o),
|
|
31861
31865
|
children: [
|
|
31862
|
-
|
|
31866
|
+
d ? /* @__PURE__ */ M($0, { children: [
|
|
31863
31867
|
/* @__PURE__ */ l(Ut, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
31864
31868
|
"Loading codes..."
|
|
31865
|
-
] }) :
|
|
31866
|
-
|
|
31869
|
+
] }) : g ? /* @__PURE__ */ l("span", { className: "text-destructive", children: "Failed to load codes" }) : b ? /* @__PURE__ */ M("span", { className: "truncate", children: [
|
|
31870
|
+
b.code,
|
|
31867
31871
|
" - ",
|
|
31868
|
-
|
|
31872
|
+
b.description
|
|
31869
31873
|
] }) : n,
|
|
31870
31874
|
/* @__PURE__ */ l(gw, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
|
|
31871
31875
|
]
|
|
31872
31876
|
}
|
|
31873
31877
|
) }),
|
|
31874
|
-
/* @__PURE__ */ l(
|
|
31875
|
-
|
|
31878
|
+
/* @__PURE__ */ l(
|
|
31879
|
+
AA,
|
|
31876
31880
|
{
|
|
31877
|
-
|
|
31878
|
-
|
|
31879
|
-
|
|
31880
|
-
|
|
31881
|
-
|
|
31882
|
-
children:
|
|
31883
|
-
|
|
31884
|
-
|
|
31885
|
-
|
|
31886
|
-
|
|
31887
|
-
|
|
31888
|
-
|
|
31889
|
-
|
|
31890
|
-
|
|
31891
|
-
|
|
31892
|
-
|
|
31893
|
-
|
|
31894
|
-
|
|
31895
|
-
|
|
31896
|
-
|
|
31897
|
-
|
|
31898
|
-
|
|
31899
|
-
|
|
31900
|
-
|
|
31901
|
-
|
|
31902
|
-
|
|
31903
|
-
|
|
31904
|
-
|
|
31881
|
+
ref: c,
|
|
31882
|
+
className: "z-[100] w-[var(--radix-popover-trigger-width)] p-0",
|
|
31883
|
+
align: "start",
|
|
31884
|
+
onPointerDownOutside: I,
|
|
31885
|
+
onInteractOutside: I,
|
|
31886
|
+
children: /* @__PURE__ */ M(
|
|
31887
|
+
e9,
|
|
31888
|
+
{
|
|
31889
|
+
className: "flex max-h-[360px] flex-col overflow-hidden",
|
|
31890
|
+
shouldFilter: !0,
|
|
31891
|
+
filter: (_, N) => {
|
|
31892
|
+
const R = N.toLowerCase().trim(), C = " ", P = _.indexOf(C), V = P >= 0 ? _.slice(0, P) : _, q = P >= 0 ? _.slice(P + C.length) : "";
|
|
31893
|
+
return V.toLowerCase().includes(R) || q.toLowerCase().includes(R) ? 1 : 0;
|
|
31894
|
+
},
|
|
31895
|
+
children: [
|
|
31896
|
+
/* @__PURE__ */ l(a9, { placeholder: "Search by code or description..." }),
|
|
31897
|
+
/* @__PURE__ */ M(t9, { className: "min-h-0 flex-1 overflow-y-auto overflow-x-hidden", children: [
|
|
31898
|
+
/* @__PURE__ */ l(n9, { children: "No MCC code found." }),
|
|
31899
|
+
/* @__PURE__ */ l(i9, { children: h.map((_) => /* @__PURE__ */ M(
|
|
31900
|
+
o9,
|
|
31901
|
+
{
|
|
31902
|
+
value: `${_.code} ${_.description}`,
|
|
31903
|
+
onSelect: () => v(_.code),
|
|
31904
|
+
className: "flex items-center gap-2",
|
|
31905
|
+
children: [
|
|
31906
|
+
/* @__PURE__ */ l("span", { className: "flex h-4 w-4 shrink-0 items-center justify-center", children: /* @__PURE__ */ l(bo, { className: Zr("h-4 w-4", r === _.code ? "opacity-100" : "opacity-0") }) }),
|
|
31907
|
+
/* @__PURE__ */ M("span", { className: "min-w-0 flex-1 truncate", children: [
|
|
31908
|
+
_.code,
|
|
31909
|
+
" — ",
|
|
31910
|
+
_.description
|
|
31911
|
+
] })
|
|
31912
|
+
]
|
|
31913
|
+
},
|
|
31914
|
+
_.code
|
|
31915
|
+
)) })
|
|
31916
|
+
] })
|
|
31917
|
+
]
|
|
31918
|
+
}
|
|
31919
|
+
)
|
|
31905
31920
|
}
|
|
31906
|
-
)
|
|
31921
|
+
)
|
|
31907
31922
|
] });
|
|
31908
31923
|
}
|
|
31909
31924
|
);
|
|
@@ -32743,15 +32758,15 @@ const ZV = async ({
|
|
|
32743
32758
|
setCurrentStep: c,
|
|
32744
32759
|
toast: h
|
|
32745
32760
|
}) => {
|
|
32746
|
-
var C, P, V,
|
|
32761
|
+
var C, P, V, q, tr;
|
|
32747
32762
|
if (!r)
|
|
32748
32763
|
return h({ title: "Error", description: "KYB ID missing.", variant: "destructive" }), !1;
|
|
32749
32764
|
const d = (X) => {
|
|
32750
32765
|
if (!X) return !1;
|
|
32751
32766
|
const er = Object.entries(X);
|
|
32752
32767
|
return er.length === 0 || er.length === 1 && er[0][0] === "document_type" ? !1 : er.some(([Y, ar]) => !(ar == null || typeof ar == "string" && ar.trim() === ""));
|
|
32753
|
-
}, g = !!((C = t.full_name) != null && C.trim()), b = !!((P = t.title) != null && P.trim()),
|
|
32754
|
-
if (!g || !b || !
|
|
32768
|
+
}, g = !!((C = t.full_name) != null && C.trim()), b = !!((P = t.title) != null && P.trim()), v = !!t.birth, I = !!((V = t.phone_number) != null && V.trim()), _ = !!t.id_photo, N = n === "passport" ? !0 : !!t.id_photo_back, R = !!t.selfie_photo;
|
|
32769
|
+
if (!g || !b || !v || !I)
|
|
32755
32770
|
return h({ title: "Incomplete", description: "Personal details missing.", variant: "destructive" }), c("personal-details"), !1;
|
|
32756
32771
|
if (!n)
|
|
32757
32772
|
return h({ title: "Incomplete", description: "Document type not selected.", variant: "destructive" }), c("document-selection"), !1;
|
|
@@ -32776,7 +32791,7 @@ const ZV = async ({
|
|
|
32776
32791
|
} catch (X) {
|
|
32777
32792
|
return console.error("Failed to update KYB status:", X), h({
|
|
32778
32793
|
title: "Submission Failed",
|
|
32779
|
-
description: ((tr = (
|
|
32794
|
+
description: ((tr = (q = X.response) == null ? void 0 : q.data) == null ? void 0 : tr.message) || "Could not submit KYB.",
|
|
32780
32795
|
variant: "destructive"
|
|
32781
32796
|
}), !1;
|
|
32782
32797
|
}
|
|
@@ -32801,7 +32816,7 @@ const ZV = async ({
|
|
|
32801
32816
|
hideQuestionary: A = !1,
|
|
32802
32817
|
companyDocumentsTypes: s
|
|
32803
32818
|
}) => {
|
|
32804
|
-
const [f, u] = n0("landing"), { toast: c } = Qo(), { data: h, isLoading: d } = W5(r, e), [g, b] = n0(!0), [
|
|
32819
|
+
const [f, u] = n0("landing"), { toast: c } = Qo(), { data: h, isLoading: d } = W5(r, e), [g, b] = n0(!0), [v, I] = n0(null), [_, N] = n0({
|
|
32805
32820
|
full_name: "",
|
|
32806
32821
|
email: n || "",
|
|
32807
32822
|
title: "",
|
|
@@ -32819,7 +32834,7 @@ const ZV = async ({
|
|
|
32819
32834
|
tax_identity_number: "",
|
|
32820
32835
|
corporate_type: "",
|
|
32821
32836
|
date_of_establishment: null
|
|
32822
|
-
}), [
|
|
32837
|
+
}), [q, tr] = n0({
|
|
32823
32838
|
street: "",
|
|
32824
32839
|
number: "",
|
|
32825
32840
|
postal_code: "",
|
|
@@ -32873,15 +32888,15 @@ const ZV = async ({
|
|
|
32873
32888
|
}
|
|
32874
32889
|
b(!0);
|
|
32875
32890
|
try {
|
|
32876
|
-
const { data:
|
|
32891
|
+
const { data: rr } = await y0.get(`${r}/api/kyb/resume`, {
|
|
32877
32892
|
params: { app_user_id: i },
|
|
32878
32893
|
headers: { "X-API-Key": e }
|
|
32879
32894
|
});
|
|
32880
|
-
if (!
|
|
32895
|
+
if (!rr.success || !rr.data) {
|
|
32881
32896
|
b(!1);
|
|
32882
32897
|
return;
|
|
32883
32898
|
}
|
|
32884
|
-
const T =
|
|
32899
|
+
const T = rr.data;
|
|
32885
32900
|
I(T._id);
|
|
32886
32901
|
const nr = (wr) => {
|
|
32887
32902
|
if (!wr) return !0;
|
|
@@ -32913,14 +32928,14 @@ const ZV = async ({
|
|
|
32913
32928
|
id_photo_back: T.personal_details.id_photo_back || null,
|
|
32914
32929
|
document_type: T.personal_details.document_type || ""
|
|
32915
32930
|
}), T.business_information && V({ ...T.business_information }), T.business_address && tr({ ...T.business_address }), T.company_activity && er({ ...T.company_activity }), T.company_documents && ar({ ...T.company_documents }), T.questionary && J({ ...T.questionary });
|
|
32916
|
-
} catch (
|
|
32917
|
-
console.error("Failed to resume KYB:",
|
|
32931
|
+
} catch (rr) {
|
|
32932
|
+
console.error("Failed to resume KYB:", rr), c({ title: "Resume Failed", description: "Starting fresh.", variant: "destructive" });
|
|
32918
32933
|
} finally {
|
|
32919
32934
|
b(!1);
|
|
32920
32935
|
}
|
|
32921
32936
|
})();
|
|
32922
32937
|
}, [r, e, i, n, c, h]);
|
|
32923
|
-
const O = () => f === "landing" || f === "processing" || f === "done" ? -1 : L.indexOf(f),
|
|
32938
|
+
const O = () => f === "landing" || f === "processing" || f === "done" ? -1 : L.indexOf(f), m = () => {
|
|
32924
32939
|
const B = O();
|
|
32925
32940
|
return B === -1 ? 0 : (B + 1) / L.length * 100;
|
|
32926
32941
|
};
|
|
@@ -32938,13 +32953,13 @@ const ZV = async ({
|
|
|
32938
32953
|
L.length
|
|
32939
32954
|
] }),
|
|
32940
32955
|
/* @__PURE__ */ M("span", { children: [
|
|
32941
|
-
Math.round(
|
|
32956
|
+
Math.round(m()),
|
|
32942
32957
|
"%"
|
|
32943
32958
|
] })
|
|
32944
32959
|
] }),
|
|
32945
|
-
/* @__PURE__ */ l(d9, { value:
|
|
32960
|
+
/* @__PURE__ */ l(d9, { value: m(), className: "h-2" })
|
|
32946
32961
|
] });
|
|
32947
|
-
}, y = { apiEndpoint: r, apiKey: e, id:
|
|
32962
|
+
}, y = { apiEndpoint: r, apiKey: e, id: v, flow: "kyb" }, k = !o, E = !A && (h == null ? void 0 : h.enable_business_questionnaire) !== !1;
|
|
32948
32963
|
return /* @__PURE__ */ l("div", { className: "w-[430px]", children: (() => {
|
|
32949
32964
|
var B;
|
|
32950
32965
|
switch (f) {
|
|
@@ -32964,7 +32979,7 @@ const ZV = async ({
|
|
|
32964
32979
|
data: _,
|
|
32965
32980
|
onDataChange: (Z) => N((W) => ({ ...W, ...Z })),
|
|
32966
32981
|
onContinue: async (Z) => {
|
|
32967
|
-
let W =
|
|
32982
|
+
let W = v;
|
|
32968
32983
|
if (!W)
|
|
32969
32984
|
try {
|
|
32970
32985
|
const K = await y0.post(
|
|
@@ -33096,7 +33111,7 @@ const ZV = async ({
|
|
|
33096
33111
|
return /* @__PURE__ */ l(
|
|
33097
33112
|
Ey,
|
|
33098
33113
|
{
|
|
33099
|
-
data:
|
|
33114
|
+
data: q,
|
|
33100
33115
|
isBusinessAddress: !0,
|
|
33101
33116
|
onDataChange: (Z) => tr((W) => ({ ...W, ...Z })),
|
|
33102
33117
|
onContinue: async (Z) => {
|
|
@@ -33209,23 +33224,23 @@ const ZV = async ({
|
|
|
33209
33224
|
{
|
|
33210
33225
|
onComplete: async () => {
|
|
33211
33226
|
await ZV({
|
|
33212
|
-
kybId:
|
|
33227
|
+
kybId: v,
|
|
33213
33228
|
apiEndpoint: r,
|
|
33214
33229
|
apiKey: e,
|
|
33215
33230
|
personalDetails: _,
|
|
33216
33231
|
selectedDocumentType: R,
|
|
33217
33232
|
businessInformation: P,
|
|
33218
|
-
businessAddress:
|
|
33233
|
+
businessAddress: q,
|
|
33219
33234
|
companyActivity: X,
|
|
33220
33235
|
questionary: $,
|
|
33221
33236
|
companyDocuments: Y,
|
|
33222
33237
|
settingsData: h,
|
|
33223
33238
|
setCurrentStep: u,
|
|
33224
33239
|
toast: c
|
|
33225
|
-
}) &&
|
|
33240
|
+
}) && v && (a(v, {
|
|
33226
33241
|
personal_details: _,
|
|
33227
33242
|
business_information: P,
|
|
33228
|
-
business_address:
|
|
33243
|
+
business_address: q,
|
|
33229
33244
|
company_activity: X,
|
|
33230
33245
|
company_documents: Y,
|
|
33231
33246
|
questionary: $
|