@techlabi/kycrazy-ui-kit 0.49.0-beta.0 → 0.49.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +433 -433
- package/dist/index.umd.js +13 -13
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -340,11 +340,11 @@ var yy = "DismissableLayer", _1 = "dismissableLayer.update", wy = "dismissableLa
|
|
|
340
340
|
onDismiss: A,
|
|
341
341
|
...f
|
|
342
342
|
} = r, s = C.useContext(f6), [u, c] = C.useState(null), h = (u == null ? void 0 : u.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, d] = C.useState({}), p = R0(e, (O) => c(O)), b = Array.from(s.layers), [m] = [...s.layersWithOutsidePointerEventsDisabled].slice(-1), _ = b.indexOf(m), E = u ? b.indexOf(u) : -1, B = s.layersWithOutsidePointerEventsDisabled.size > 0, x = E >= _, k = Cy((O) => {
|
|
343
|
-
const L = O.target,
|
|
344
|
-
!x ||
|
|
343
|
+
const L = O.target, z = [...s.branches].some((V) => V.contains(L));
|
|
344
|
+
!x || z || (n == null || n(O), o == null || o(O), O.defaultPrevented || A == null || A());
|
|
345
345
|
}, h), $ = _y((O) => {
|
|
346
346
|
const L = O.target;
|
|
347
|
-
[...s.branches].some((
|
|
347
|
+
[...s.branches].some((V) => V.contains(L)) || (i == null || i(O), o == null || o(O), O.defaultPrevented || A == null || A());
|
|
348
348
|
}, h);
|
|
349
349
|
return gy((O) => {
|
|
350
350
|
E === s.layers.size - 1 && (t == null || t(O), !O.defaultPrevented && A && (O.preventDefault(), A()));
|
|
@@ -672,13 +672,13 @@ var h6 = "ToastViewport", Dy = ["F8"], B1 = "toast.viewportPause", I1 = "toast.v
|
|
|
672
672
|
var k, $, O;
|
|
673
673
|
const B = E.altKey || E.ctrlKey || E.metaKey;
|
|
674
674
|
if (E.key === "Tab" && !B) {
|
|
675
|
-
const L = document.activeElement,
|
|
676
|
-
if (E.target === m &&
|
|
675
|
+
const L = document.activeElement, z = E.shiftKey;
|
|
676
|
+
if (E.target === m && z) {
|
|
677
677
|
(k = s.current) == null || k.focus();
|
|
678
678
|
return;
|
|
679
679
|
}
|
|
680
|
-
const j = b({ tabbingDirection:
|
|
681
|
-
xs(j.slice(rr + 1)) ? E.preventDefault() :
|
|
680
|
+
const j = b({ tabbingDirection: z ? "backwards" : "forwards" }), rr = j.findIndex((Y) => Y === L);
|
|
681
|
+
xs(j.slice(rr + 1)) ? E.preventDefault() : z ? ($ = s.current) == null || $.focus() : (O = u.current) == null || O.focus();
|
|
682
682
|
}
|
|
683
683
|
};
|
|
684
684
|
return m.addEventListener("keydown", _), () => m.removeEventListener("keydown", _);
|
|
@@ -798,7 +798,7 @@ var [Ly, Uy] = c6(To, {
|
|
|
798
798
|
onSwipeCancel: h,
|
|
799
799
|
onSwipeEnd: d,
|
|
800
800
|
...p
|
|
801
|
-
} = r, b = yf(To, a), [m, _] = C.useState(null), E = R0(e, (Y) => _(Y)), B = C.useRef(null), x = C.useRef(null), k = n || b.duration, $ = C.useRef(0), O = C.useRef(k), L = C.useRef(0), { onToastAdd:
|
|
801
|
+
} = r, b = yf(To, a), [m, _] = C.useState(null), E = R0(e, (Y) => _(Y)), B = C.useRef(null), x = C.useRef(null), k = n || b.duration, $ = C.useRef(0), O = C.useRef(k), L = C.useRef(0), { onToastAdd: z, onToastRemove: V } = b, K = _a(() => {
|
|
802
802
|
var or;
|
|
803
803
|
(m == null ? void 0 : m.contains(document.activeElement)) && ((or = b.viewport) == null || or.focus()), o();
|
|
804
804
|
}), j = C.useCallback(
|
|
@@ -822,7 +822,7 @@ var [Ly, Uy] = c6(To, {
|
|
|
822
822
|
}
|
|
823
823
|
}, [b.viewport, k, f, s, j]), C.useEffect(() => {
|
|
824
824
|
i && !b.isClosePausedRef.current && j(k);
|
|
825
|
-
}, [i, k, b.isClosePausedRef, j]), C.useEffect(() => (
|
|
825
|
+
}, [i, k, b.isClosePausedRef, j]), C.useEffect(() => (z(), () => V()), [z, V]);
|
|
826
826
|
const rr = C.useMemo(() => m ? C6(m) : null, [m]);
|
|
827
827
|
return b.viewport ? /* @__PURE__ */ X(q0, { children: [
|
|
828
828
|
rr && /* @__PURE__ */ l(
|
|
@@ -1541,7 +1541,7 @@ const C0 = (r) => {
|
|
|
1541
1541
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
1542
1542
|
x9.test(r) && !R9.test(r)
|
|
1543
1543
|
), G6 = () => !1, M9 = (r) => Z9.test(r), G9 = (r) => F9.test(r), X9 = () => {
|
|
1544
|
-
const r = C0("colors"), e = C0("spacing"), a = C0("blur"), t = C0("brightness"), n = C0("borderColor"), i = C0("borderRadius"), o = C0("borderSpacing"), A = C0("borderWidth"), f = C0("contrast"), s = C0("grayscale"), u = C0("hueRotate"), c = C0("invert"), h = C0("gap"), d = C0("gradientColorStops"), p = C0("gradientColorStopPositions"), b = C0("inset"), m = C0("margin"), _ = C0("opacity"), E = C0("padding"), B = C0("saturate"), x = C0("scale"), k = C0("sepia"), $ = C0("skew"), O = C0("space"), L = C0("translate"),
|
|
1544
|
+
const r = C0("colors"), e = C0("spacing"), a = C0("blur"), t = C0("brightness"), n = C0("borderColor"), i = C0("borderRadius"), o = C0("borderSpacing"), A = C0("borderWidth"), f = C0("contrast"), s = C0("grayscale"), u = C0("hueRotate"), c = C0("invert"), h = C0("gap"), d = C0("gradientColorStops"), p = C0("gradientColorStopPositions"), b = C0("inset"), m = C0("margin"), _ = C0("opacity"), E = C0("padding"), B = C0("saturate"), x = C0("scale"), k = C0("sepia"), $ = C0("skew"), O = C0("space"), L = C0("translate"), z = () => ["auto", "contain", "none"], V = () => ["auto", "hidden", "clip", "visible", "scroll"], K = () => ["auto", Dr, e], j = () => [Dr, e], rr = () => ["", it, Wt], Y = () => ["auto", wi, Dr], or = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], Q = () => ["solid", "dashed", "dotted", "double", "none"], P = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], v = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], w = () => ["", "0", Dr], g = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], y = () => [wi, Dr];
|
|
1545
1545
|
return {
|
|
1546
1546
|
cacheSize: 500,
|
|
1547
1547
|
separator: ":",
|
|
@@ -1671,42 +1671,42 @@ const C0 = (r) => {
|
|
|
1671
1671
|
* @see https://tailwindcss.com/docs/overflow
|
|
1672
1672
|
*/
|
|
1673
1673
|
overflow: [{
|
|
1674
|
-
overflow:
|
|
1674
|
+
overflow: V()
|
|
1675
1675
|
}],
|
|
1676
1676
|
/**
|
|
1677
1677
|
* Overflow X
|
|
1678
1678
|
* @see https://tailwindcss.com/docs/overflow
|
|
1679
1679
|
*/
|
|
1680
1680
|
"overflow-x": [{
|
|
1681
|
-
"overflow-x":
|
|
1681
|
+
"overflow-x": V()
|
|
1682
1682
|
}],
|
|
1683
1683
|
/**
|
|
1684
1684
|
* Overflow Y
|
|
1685
1685
|
* @see https://tailwindcss.com/docs/overflow
|
|
1686
1686
|
*/
|
|
1687
1687
|
"overflow-y": [{
|
|
1688
|
-
"overflow-y":
|
|
1688
|
+
"overflow-y": V()
|
|
1689
1689
|
}],
|
|
1690
1690
|
/**
|
|
1691
1691
|
* Overscroll Behavior
|
|
1692
1692
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
1693
1693
|
*/
|
|
1694
1694
|
overscroll: [{
|
|
1695
|
-
overscroll:
|
|
1695
|
+
overscroll: z()
|
|
1696
1696
|
}],
|
|
1697
1697
|
/**
|
|
1698
1698
|
* Overscroll Behavior X
|
|
1699
1699
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
1700
1700
|
*/
|
|
1701
1701
|
"overscroll-x": [{
|
|
1702
|
-
"overscroll-x":
|
|
1702
|
+
"overscroll-x": z()
|
|
1703
1703
|
}],
|
|
1704
1704
|
/**
|
|
1705
1705
|
* Overscroll Behavior Y
|
|
1706
1706
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
1707
1707
|
*/
|
|
1708
1708
|
"overscroll-y": [{
|
|
1709
|
-
"overscroll-y":
|
|
1709
|
+
"overscroll-y": z()
|
|
1710
1710
|
}],
|
|
1711
1711
|
/**
|
|
1712
1712
|
* Position
|
|
@@ -3771,14 +3771,14 @@ function ww(r) {
|
|
|
3771
3771
|
}
|
|
3772
3772
|
var kw = (r) => {
|
|
3773
3773
|
var e, a, t, n, i, o, A, f, s, u, c;
|
|
3774
|
-
let { invert: h, toast: d, unstyled: p, interacting: b, setHeights: m, visibleToasts: _, heights: E, index: B, toasts: x, expanded: k, removeToast: $, defaultRichColors: O, closeButton: L, style:
|
|
3774
|
+
let { invert: h, toast: d, unstyled: p, interacting: b, setHeights: m, visibleToasts: _, heights: E, index: B, toasts: x, expanded: k, removeToast: $, defaultRichColors: O, closeButton: L, style: z, cancelButtonStyle: V, actionButtonStyle: K, className: j = "", descriptionClassName: rr = "", duration: Y, position: or, gap: Q, loadingIcon: P, expandByDefault: v, classNames: w, icons: g, closeButtonAriaLabel: y = "Close toast", pauseWhenPageIsHidden: N } = r, [R, I] = G.useState(null), [F, D] = G.useState(null), [S, J] = G.useState(!1), [ar, q] = G.useState(!1), [er, T] = G.useState(!1), [fr, Zr] = G.useState(!1), [Tr, Fr] = G.useState(!1), [Ir, o0] = G.useState(0), [u0, Z] = G.useState(0), M = G.useRef(d.duration || Y || Dd), U = G.useRef(null), nr = G.useRef(null), ir = B === 0, tr = B + 1 <= _, lr = d.type, Wr = d.dismissible !== !1, Xr = d.className || "", F0 = d.descriptionClassName || "", ne = G.useMemo(() => E.findIndex((Ar) => Ar.toastId === d.id) || 0, [E, d.id]), B0 = G.useMemo(() => {
|
|
3775
3775
|
var Ar;
|
|
3776
3776
|
return (Ar = d.closeButton) != null ? Ar : L;
|
|
3777
3777
|
}, [d.closeButton, L]), aa = G.useMemo(() => d.duration || Y || Dd, [d.duration, Y]), Oe = G.useRef(0), de = G.useRef(0), tt = G.useRef(0), Ce = G.useRef(null), [yn, he] = or.split("-"), ta = G.useMemo(() => E.reduce((Ar, Cr, cr) => cr >= ne ? Ar : Ar + Cr.height, 0), [E, ne]), ha = ow(), Ta = d.invert || h, nt = lr === "loading";
|
|
3778
3778
|
de.current = G.useMemo(() => ne * Q + ta, [ne, ta]), G.useEffect(() => {
|
|
3779
3779
|
M.current = aa;
|
|
3780
3780
|
}, [aa]), G.useEffect(() => {
|
|
3781
|
-
|
|
3781
|
+
J(!0);
|
|
3782
3782
|
}, []), G.useEffect(() => {
|
|
3783
3783
|
let Ar = nr.current;
|
|
3784
3784
|
if (Ar) {
|
|
@@ -3817,7 +3817,7 @@ var kw = (r) => {
|
|
|
3817
3817
|
var Ar, Cr, cr;
|
|
3818
3818
|
return g != null && g.loading ? G.createElement("div", { className: ma(w == null ? void 0 : w.loader, (Ar = d == null ? void 0 : d.classNames) == null ? void 0 : Ar.loader, "sonner-loader"), "data-visible": lr === "loading" }, g.loading) : P ? G.createElement("div", { className: ma(w == null ? void 0 : w.loader, (Cr = d == null ? void 0 : d.classNames) == null ? void 0 : Cr.loader, "sonner-loader"), "data-visible": lr === "loading" }, P) : G.createElement(rw, { className: ma(w == null ? void 0 : w.loader, (cr = d == null ? void 0 : d.classNames) == null ? void 0 : cr.loader), visible: lr === "loading" });
|
|
3819
3819
|
}
|
|
3820
|
-
return G.createElement("li", { tabIndex: 0, ref: nr, className: ma(j, Xr, 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 : O, "data-styled": !(d.jsx || d.unstyled || p), "data-mounted": S, "data-promise": !!d.promise, "data-swiped": Tr, "data-removed": ar, "data-visible": tr, "data-y-position": yn, "data-x-position": he, "data-index": B, "data-front": ir, "data-swiping": er, "data-dismissible": Wr, "data-type": lr, "data-invert": Ta, "data-swipe-out": fr, "data-swipe-direction": F, "data-expanded": !!(k || v && S), style: { "--index": B, "--toasts-before": B, "--z-index": x.length - B, "--offset": `${ar ? Ir : de.current}px`, "--initial-height": v ? "auto" : `${u0}px`, ...
|
|
3820
|
+
return G.createElement("li", { tabIndex: 0, ref: nr, className: ma(j, Xr, 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 : O, "data-styled": !(d.jsx || d.unstyled || p), "data-mounted": S, "data-promise": !!d.promise, "data-swiped": Tr, "data-removed": ar, "data-visible": tr, "data-y-position": yn, "data-x-position": he, "data-index": B, "data-front": ir, "data-swiping": er, "data-dismissible": Wr, "data-type": lr, "data-invert": Ta, "data-swipe-out": fr, "data-swipe-direction": F, "data-expanded": !!(k || v && S), style: { "--index": B, "--toasts-before": B, "--z-index": x.length - B, "--offset": `${ar ? Ir : de.current}px`, "--initial-height": v ? "auto" : `${u0}px`, ...z, ...d.style }, onDragEnd: () => {
|
|
3821
3821
|
T(!1), I(null), Ce.current = null;
|
|
3822
3822
|
}, onPointerDown: (Ar) => {
|
|
3823
3823
|
nt || !Wr || (U.current = /* @__PURE__ */ new Date(), o0(de.current), Ar.target.setPointerCapture(Ar.pointerId), Ar.target.tagName !== "BUTTON" && (T(!0), Ce.current = { x: Ar.clientX, y: Ar.clientY }));
|
|
@@ -3827,7 +3827,7 @@ var kw = (r) => {
|
|
|
3827
3827
|
Ce.current = null;
|
|
3828
3828
|
let dr = Number(((Ar = nr.current) == null ? void 0 : Ar.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), vr = Number(((Cr = nr.current) == null ? void 0 : Cr.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), Gr = (/* @__PURE__ */ new Date()).getTime() - ((cr = U.current) == null ? void 0 : cr.getTime()), Hr = R === "x" ? dr : vr, l0 = Math.abs(Hr) / Gr;
|
|
3829
3829
|
if (Math.abs(Hr) >= gw || l0 > 0.11) {
|
|
3830
|
-
o0(de.current), (wr = d.onDismiss) == null || wr.call(d, d),
|
|
3830
|
+
o0(de.current), (wr = d.onDismiss) == null || wr.call(d, d), D(R === "x" ? dr > 0 ? "right" : "left" : vr > 0 ? "down" : "up"), se(), Zr(!0), Fr(!1);
|
|
3831
3831
|
return;
|
|
3832
3832
|
}
|
|
3833
3833
|
T(!1), I(null);
|
|
@@ -3842,7 +3842,7 @@ var kw = (r) => {
|
|
|
3842
3842
|
} : () => {
|
|
3843
3843
|
var Ar;
|
|
3844
3844
|
se(), (Ar = d.onDismiss) == null || Ar.call(d, d);
|
|
3845
|
-
}, className: ma(w == null ? void 0 : w.closeButton, (n = d == null ? void 0 : d.classNames) == null ? void 0 : n.closeButton) }, (i = g == null ? void 0 : g.close) != null ? i : iw) : null, d.jsx || Bs(d.title) ? d.jsx ? d.jsx : typeof d.title == "function" ? d.title() : d.title : G.createElement(G.Fragment, null, lr || d.icon || d.promise ? G.createElement("div", { "data-icon": "", className: ma(w == null ? void 0 : w.icon, (o = d == null ? void 0 : d.classNames) == null ? void 0 : o.icon) }, d.promise || d.type === "loading" && !d.icon ? d.icon || xr() : null, d.type !== "loading" ? d.icon || (g == null ? void 0 : g[lr]) || K9(lr) : null) : null, G.createElement("div", { "data-content": "", className: ma(w == null ? void 0 : w.content, (A = d == null ? void 0 : d.classNames) == null ? void 0 : A.content) }, G.createElement("div", { "data-title": "", className: ma(w == null ? void 0 : w.title, (f = d == null ? void 0 : d.classNames) == null ? void 0 : f.title) }, typeof d.title == "function" ? d.title() : d.title), d.description ? G.createElement("div", { "data-description": "", className: ma(rr, F0, w == null ? void 0 : w.description, (s = d == null ? void 0 : d.classNames) == null ? void 0 : s.description) }, typeof d.description == "function" ? d.description() : d.description) : null), Bs(d.cancel) ? d.cancel : d.cancel && rA(d.cancel) ? G.createElement("button", { "data-button": !0, "data-cancel": !0, style: d.cancelButtonStyle ||
|
|
3845
|
+
}, className: ma(w == null ? void 0 : w.closeButton, (n = d == null ? void 0 : d.classNames) == null ? void 0 : n.closeButton) }, (i = g == null ? void 0 : g.close) != null ? i : iw) : null, d.jsx || Bs(d.title) ? d.jsx ? d.jsx : typeof d.title == "function" ? d.title() : d.title : G.createElement(G.Fragment, null, lr || d.icon || d.promise ? G.createElement("div", { "data-icon": "", className: ma(w == null ? void 0 : w.icon, (o = d == null ? void 0 : d.classNames) == null ? void 0 : o.icon) }, d.promise || d.type === "loading" && !d.icon ? d.icon || xr() : null, d.type !== "loading" ? d.icon || (g == null ? void 0 : g[lr]) || K9(lr) : null) : null, G.createElement("div", { "data-content": "", className: ma(w == null ? void 0 : w.content, (A = d == null ? void 0 : d.classNames) == null ? void 0 : A.content) }, G.createElement("div", { "data-title": "", className: ma(w == null ? void 0 : w.title, (f = d == null ? void 0 : d.classNames) == null ? void 0 : f.title) }, typeof d.title == "function" ? d.title() : d.title), d.description ? G.createElement("div", { "data-description": "", className: ma(rr, F0, w == null ? void 0 : w.description, (s = d == null ? void 0 : d.classNames) == null ? void 0 : s.description) }, typeof d.description == "function" ? d.description() : d.description) : null), Bs(d.cancel) ? d.cancel : d.cancel && rA(d.cancel) ? G.createElement("button", { "data-button": !0, "data-cancel": !0, style: d.cancelButtonStyle || V, onClick: (Ar) => {
|
|
3846
3846
|
var Cr, cr;
|
|
3847
3847
|
rA(d.cancel) && Wr && ((cr = (Cr = d.cancel).onClick) == null || cr.call(Cr, Ar), se());
|
|
3848
3848
|
}, className: ma(w == null ? void 0 : w.cancelButton, (u = d == null ? void 0 : d.classNames) == null ? void 0 : u.cancelButton) }, d.cancel.label) : null, Bs(d.action) ? d.action : d.action && rA(d.action) ? G.createElement("button", { "data-button": !0, "data-action": !0, style: d.actionButtonStyle || K, onClick: (Ar) => {
|
|
@@ -3870,7 +3870,7 @@ function Ew(r, e) {
|
|
|
3870
3870
|
}), a;
|
|
3871
3871
|
}
|
|
3872
3872
|
var Cw = d2(function(r, e) {
|
|
3873
|
-
let { invert: a, position: t = "bottom-right", hotkey: n = ["altKey", "KeyT"], expand: i, closeButton: o, className: A, offset: f, mobileOffset: s, theme: u = "light", richColors: c, duration: h, style: d, visibleToasts: p = hw, toastOptions: b, dir: m = Md(), gap: _ = pw, loadingIcon: E, icons: B, containerAriaLabel: x = "Notifications", pauseWhenPageIsHidden: k } = r, [$, O] = G.useState([]), L = G.useMemo(() => Array.from(new Set([t].concat($.filter((N) => N.position).map((N) => N.position)))), [$, t]), [
|
|
3873
|
+
let { invert: a, position: t = "bottom-right", hotkey: n = ["altKey", "KeyT"], expand: i, closeButton: o, className: A, offset: f, mobileOffset: s, theme: u = "light", richColors: c, duration: h, style: d, visibleToasts: p = hw, toastOptions: b, dir: m = Md(), gap: _ = pw, loadingIcon: E, icons: B, containerAriaLabel: x = "Notifications", pauseWhenPageIsHidden: k } = r, [$, O] = G.useState([]), L = G.useMemo(() => Array.from(new Set([t].concat($.filter((N) => N.position).map((N) => N.position)))), [$, t]), [z, V] = G.useState([]), [K, j] = G.useState(!1), [rr, Y] = G.useState(!1), [or, Q] = G.useState(u !== "system" ? u : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), P = G.useRef(null), v = n.join("+").replace(/Key/g, "").replace(/Digit/g, ""), w = G.useRef(null), g = G.useRef(!1), y = G.useCallback((N) => {
|
|
3874
3874
|
O((R) => {
|
|
3875
3875
|
var I;
|
|
3876
3876
|
return (I = R.find((F) => F.id === N.id)) != null && I.delete || xe.dismiss(N.id), R.filter(({ id: F }) => F !== N.id);
|
|
@@ -3914,7 +3914,7 @@ var Cw = d2(function(r, e) {
|
|
|
3914
3914
|
}, [$]), G.useEffect(() => {
|
|
3915
3915
|
let N = (R) => {
|
|
3916
3916
|
var I, F;
|
|
3917
|
-
n.every((
|
|
3917
|
+
n.every((D) => R[D] || R.code === D) && (j(!0), (I = P.current) == null || I.focus()), R.code === "Escape" && (document.activeElement === P.current || (F = P.current) != null && F.contains(document.activeElement)) && j(!1);
|
|
3918
3918
|
};
|
|
3919
3919
|
return document.addEventListener("keydown", N), () => document.removeEventListener("keydown", N);
|
|
3920
3920
|
}, [n]), G.useEffect(() => {
|
|
@@ -3923,8 +3923,8 @@ var Cw = d2(function(r, e) {
|
|
|
3923
3923
|
};
|
|
3924
3924
|
}, [P.current]), G.createElement("section", { ref: e, "aria-label": `${x} ${v}`, tabIndex: -1, "aria-live": "polite", "aria-relevant": "additions text", "aria-atomic": "false", suppressHydrationWarning: !0 }, L.map((N, R) => {
|
|
3925
3925
|
var I;
|
|
3926
|
-
let [F,
|
|
3927
|
-
return $.length ? G.createElement("ol", { key: N, dir: m === "auto" ? Md() : m, tabIndex: -1, ref: P, className: A, "data-sonner-toaster": !0, "data-theme": or, "data-y-position": F, "data-lifted": K && $.length > 1 && !i, "data-x-position":
|
|
3926
|
+
let [F, D] = N.split("-");
|
|
3927
|
+
return $.length ? G.createElement("ol", { key: N, dir: m === "auto" ? Md() : m, tabIndex: -1, ref: P, className: A, "data-sonner-toaster": !0, "data-theme": or, "data-y-position": F, "data-lifted": K && $.length > 1 && !i, "data-x-position": D, style: { "--front-toast-height": `${((I = z[0]) == null ? void 0 : I.height) || 0}px`, "--width": `${vw}px`, "--gap": `${_}px`, ...d, ...Ew(f, s) }, onBlur: (S) => {
|
|
3928
3928
|
g.current && !S.currentTarget.contains(S.relatedTarget) && (g.current = !1, w.current && (w.current.focus({ preventScroll: !0 }), w.current = null));
|
|
3929
3929
|
}, onFocus: (S) => {
|
|
3930
3930
|
S.target instanceof HTMLElement && S.target.dataset.dismissible === "false" || g.current || (g.current = !0, w.current = S.relatedTarget);
|
|
@@ -3932,9 +3932,9 @@ var Cw = d2(function(r, e) {
|
|
|
3932
3932
|
rr || j(!1);
|
|
3933
3933
|
}, onDragEnd: () => j(!1), onPointerDown: (S) => {
|
|
3934
3934
|
S.target instanceof HTMLElement && S.target.dataset.dismissible === "false" || Y(!0);
|
|
3935
|
-
}, onPointerUp: () => Y(!1) }, $.filter((S) => !S.position && R === 0 || S.position === N).map((S,
|
|
3935
|
+
}, onPointerUp: () => Y(!1) }, $.filter((S) => !S.position && R === 0 || S.position === N).map((S, J) => {
|
|
3936
3936
|
var ar, q;
|
|
3937
|
-
return G.createElement(kw, { key: S.id, icons: B, index:
|
|
3937
|
+
return G.createElement(kw, { key: S.id, icons: B, index: J, toast: S, defaultRichColors: c, duration: (ar = b == null ? void 0 : b.duration) != null ? ar : h, className: b == null ? void 0 : b.className, descriptionClassName: b == null ? void 0 : b.descriptionClassName, invert: a, visibleToasts: p, closeButton: (q = b == null ? void 0 : b.closeButton) != null ? q : o, interacting: rr, position: N, 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: y, toasts: $.filter((er) => er.position == S.position), heights: z.filter((er) => er.position == S.position), setHeights: V, expandByDefault: i, gap: _, loadingIcon: E, expanded: K, pauseWhenPageIsHidden: k, swipeDirections: r.swipeDirections });
|
|
3938
3938
|
})) : null;
|
|
3939
3939
|
}));
|
|
3940
3940
|
});
|
|
@@ -4249,7 +4249,7 @@ const Dw = (r) => ({
|
|
|
4249
4249
|
}, d = vl(n), p = ml(d), b = await o.getDimensions(s), m = d === "y", _ = m ? "top" : "left", E = m ? "bottom" : "right", B = m ? "clientHeight" : "clientWidth", x = i.reference[p] + i.reference[d] - h[d] - i.floating[p], k = h[d] - i.reference[d], $ = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(s));
|
|
4250
4250
|
let O = $ ? $[B] : 0;
|
|
4251
4251
|
(!O || !await (o.isElement == null ? void 0 : o.isElement($))) && (O = A.floating[B] || i.floating[p]);
|
|
4252
|
-
const L = x / 2 - k / 2,
|
|
4252
|
+
const L = x / 2 - k / 2, z = O / 2 - b[p] / 2 - 1, V = on(c[_], z), K = on(c[E], z), j = V, rr = O - b[p] - K, Y = O / 2 - b[p] / 2 + L, or = F1(j, Y, rr), Q = !f.arrow && b2(n) != null && Y !== or && i.reference[p] / 2 - (Y < j ? V : K) - b[p] / 2 < 0, P = Q ? Y < j ? Y - j : Y - rr : 0;
|
|
4253
4253
|
return {
|
|
4254
4254
|
[d]: h[d] + P,
|
|
4255
4255
|
data: {
|
|
@@ -4288,36 +4288,36 @@ const Dw = (r) => ({
|
|
|
4288
4288
|
return {};
|
|
4289
4289
|
const _ = _t(n), E = Ya(A), B = _t(A) === A, x = await (f.isRTL == null ? void 0 : f.isRTL(s.floating)), k = h || (B || !b ? [OA(A)] : Sw(A)), $ = p !== "none";
|
|
4290
4290
|
!h && $ && k.push(...Pw(A, b, p, x));
|
|
4291
|
-
const O = [A, ...k], L = await K2(e, m),
|
|
4292
|
-
let
|
|
4293
|
-
if (u &&
|
|
4291
|
+
const O = [A, ...k], L = await K2(e, m), z = [];
|
|
4292
|
+
let V = ((t = i.flip) == null ? void 0 : t.overflows) || [];
|
|
4293
|
+
if (u && z.push(L[_]), c) {
|
|
4294
4294
|
const Y = Fw(n, o, x);
|
|
4295
|
-
|
|
4295
|
+
z.push(L[Y[0]], L[Y[1]]);
|
|
4296
4296
|
}
|
|
4297
|
-
if (
|
|
4297
|
+
if (V = [...V, {
|
|
4298
4298
|
placement: n,
|
|
4299
|
-
overflows:
|
|
4300
|
-
}], !
|
|
4299
|
+
overflows: z
|
|
4300
|
+
}], !z.every((Y) => Y <= 0)) {
|
|
4301
4301
|
var K, j;
|
|
4302
4302
|
const Y = (((K = i.flip) == null ? void 0 : K.index) || 0) + 1, or = O[Y];
|
|
4303
4303
|
if (or && (!(c === "alignment" ? E !== Ya(or) : !1) || // We leave the current main axis only if every placement on that axis
|
|
4304
4304
|
// overflows the main axis.
|
|
4305
|
-
|
|
4305
|
+
V.every((v) => Ya(v.placement) === E ? v.overflows[0] > 0 : !0)))
|
|
4306
4306
|
return {
|
|
4307
4307
|
data: {
|
|
4308
4308
|
index: Y,
|
|
4309
|
-
overflows:
|
|
4309
|
+
overflows: V
|
|
4310
4310
|
},
|
|
4311
4311
|
reset: {
|
|
4312
4312
|
placement: or
|
|
4313
4313
|
}
|
|
4314
4314
|
};
|
|
4315
|
-
let Q = (j =
|
|
4315
|
+
let Q = (j = V.filter((P) => P.overflows[0] <= 0).sort((P, v) => P.overflows[1] - v.overflows[1])[0]) == null ? void 0 : j.placement;
|
|
4316
4316
|
if (!Q)
|
|
4317
4317
|
switch (d) {
|
|
4318
4318
|
case "bestFit": {
|
|
4319
4319
|
var rr;
|
|
4320
|
-
const P = (rr =
|
|
4320
|
+
const P = (rr = V.filter((v) => {
|
|
4321
4321
|
if ($) {
|
|
4322
4322
|
const w = Ya(v.placement);
|
|
4323
4323
|
return w === E || // Create a bias to the `y` side axis due to horizontal
|
|
@@ -4568,16 +4568,16 @@ const jw = function(r) {
|
|
|
4568
4568
|
const E = b - u.top - u.bottom, B = p - u.left - u.right, x = on(b - u[m], E), k = on(p - u[_], B), $ = !e.middlewareData.shift;
|
|
4569
4569
|
let O = x, L = k;
|
|
4570
4570
|
if ((a = e.middlewareData.shift) != null && a.enabled.x && (L = B), (t = e.middlewareData.shift) != null && t.enabled.y && (O = E), $ && !h) {
|
|
4571
|
-
const
|
|
4572
|
-
d ? L = p - 2 * (
|
|
4571
|
+
const V = Le(u.left, 0), K = Le(u.right, 0), j = Le(u.top, 0), rr = Le(u.bottom, 0);
|
|
4572
|
+
d ? L = p - 2 * (V !== 0 || K !== 0 ? V + K : Le(u.left, u.right)) : O = b - 2 * (j !== 0 || rr !== 0 ? j + rr : Le(u.top, u.bottom));
|
|
4573
4573
|
}
|
|
4574
4574
|
await f({
|
|
4575
4575
|
...e,
|
|
4576
4576
|
availableWidth: L,
|
|
4577
4577
|
availableHeight: O
|
|
4578
4578
|
});
|
|
4579
|
-
const
|
|
4580
|
-
return p !==
|
|
4579
|
+
const z = await o.getDimensions(A.floating);
|
|
4580
|
+
return p !== z.width || b !== z.height ? {
|
|
4581
4581
|
reset: {
|
|
4582
4582
|
rects: !0
|
|
4583
4583
|
}
|
|
@@ -5157,7 +5157,7 @@ function xk(r) {
|
|
|
5157
5157
|
v !== $.current && ($.current = v, b(v));
|
|
5158
5158
|
}, []), B = C.useCallback((v) => {
|
|
5159
5159
|
v !== O.current && (O.current = v, _(v));
|
|
5160
|
-
}, []), x = i || p, k = o || m, $ = C.useRef(null), O = C.useRef(null), L = C.useRef(u),
|
|
5160
|
+
}, []), x = i || p, k = o || m, $ = C.useRef(null), O = C.useRef(null), L = C.useRef(u), z = f != null, V = Fs(f), K = Fs(n), j = Fs(s), rr = C.useCallback(() => {
|
|
5161
5161
|
if (!$.current || !O.current)
|
|
5162
5162
|
return;
|
|
5163
5163
|
const v = {
|
|
@@ -5190,11 +5190,11 @@ function xk(r) {
|
|
|
5190
5190
|
Y.current = !1;
|
|
5191
5191
|
}), []), pA(() => {
|
|
5192
5192
|
if (x && ($.current = x), k && (O.current = k), x && k) {
|
|
5193
|
-
if (
|
|
5194
|
-
return
|
|
5193
|
+
if (V.current)
|
|
5194
|
+
return V.current(x, k, rr);
|
|
5195
5195
|
rr();
|
|
5196
5196
|
}
|
|
5197
|
-
}, [x, k, rr,
|
|
5197
|
+
}, [x, k, rr, V, z]);
|
|
5198
5198
|
const or = C.useMemo(() => ({
|
|
5199
5199
|
reference: $,
|
|
5200
5200
|
floating: O,
|
|
@@ -5331,7 +5331,7 @@ var u8 = "PopperAnchor", l8 = C.forwardRef(
|
|
|
5331
5331
|
l8.displayName = u8;
|
|
5332
5332
|
var kl = "PopperContent", [Gk, Xk] = A8(kl), c8 = C.forwardRef(
|
|
5333
5333
|
(r, e) => {
|
|
5334
|
-
var S,
|
|
5334
|
+
var S, J, ar, q, er, T;
|
|
5335
5335
|
const {
|
|
5336
5336
|
__scopePopper: a,
|
|
5337
5337
|
side: t = "bottom",
|
|
@@ -5347,15 +5347,15 @@ var kl = "PopperContent", [Gk, Xk] = A8(kl), c8 = C.forwardRef(
|
|
|
5347
5347
|
updatePositionStrategy: d = "optimized",
|
|
5348
5348
|
onPlaced: p,
|
|
5349
5349
|
...b
|
|
5350
|
-
} = r, m = f8(kl, a), [_, E] = C.useState(null), B = R0(e, (fr) => E(fr)), [x, k] = C.useState(null), $ = Dk(x), O = ($ == null ? void 0 : $.width) ?? 0, L = ($ == null ? void 0 : $.height) ?? 0,
|
|
5351
|
-
padding:
|
|
5350
|
+
} = r, m = f8(kl, a), [_, E] = C.useState(null), B = R0(e, (fr) => E(fr)), [x, k] = C.useState(null), $ = Dk(x), O = ($ == null ? void 0 : $.width) ?? 0, L = ($ == null ? void 0 : $.height) ?? 0, z = t + (i !== "center" ? "-" + i : ""), V = typeof u == "number" ? u : { top: 0, right: 0, bottom: 0, left: 0, ...u }, K = Array.isArray(s) ? s : [s], j = K.length > 0, rr = {
|
|
5351
|
+
padding: V,
|
|
5352
5352
|
boundary: K.filter(Lk),
|
|
5353
5353
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
5354
5354
|
altBoundary: j
|
|
5355
5355
|
}, { refs: Y, floatingStyles: or, placement: Q, isPositioned: P, middlewareData: v } = xk({
|
|
5356
5356
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
5357
5357
|
strategy: "fixed",
|
|
5358
|
-
placement:
|
|
5358
|
+
placement: z,
|
|
5359
5359
|
whileElementsMounted: (...fr) => gk(...fr, {
|
|
5360
5360
|
animationFrame: d === "always"
|
|
5361
5361
|
}),
|
|
@@ -5386,9 +5386,9 @@ var kl = "PopperContent", [Gk, Xk] = A8(kl), c8 = C.forwardRef(
|
|
|
5386
5386
|
oe(() => {
|
|
5387
5387
|
P && (y == null || y());
|
|
5388
5388
|
}, [P, y]);
|
|
5389
|
-
const N = (S = v.arrow) == null ? void 0 : S.x, R = (
|
|
5389
|
+
const N = (S = v.arrow) == null ? void 0 : S.x, R = (J = v.arrow) == null ? void 0 : J.y, I = ((ar = v.arrow) == null ? void 0 : ar.centerOffset) !== 0, [F, D] = C.useState();
|
|
5390
5390
|
return oe(() => {
|
|
5391
|
-
_ &&
|
|
5391
|
+
_ && D(window.getComputedStyle(_).zIndex);
|
|
5392
5392
|
}, [_]), /* @__PURE__ */ l(
|
|
5393
5393
|
"div",
|
|
5394
5394
|
{
|
|
@@ -6660,11 +6660,11 @@ var Ie, Kr, Io, be, $n, Ti, ht, Ht, No, $i, Pi, Pn, On, Qt, Oi, m0, D2, X1, j1,
|
|
|
6660
6660
|
}).then(() => (this.updateResult(), W(this, be)));
|
|
6661
6661
|
}
|
|
6662
6662
|
createResult(e, a) {
|
|
6663
|
-
var
|
|
6663
|
+
var z;
|
|
6664
6664
|
const t = W(this, Kr), n = this.options, i = W(this, be), o = W(this, $n), A = W(this, Ti), s = e !== t ? e.state : W(this, Io), { state: u } = e;
|
|
6665
6665
|
let c = { ...u }, h = !1, d;
|
|
6666
6666
|
if (a._optimisticResults) {
|
|
6667
|
-
const
|
|
6667
|
+
const V = this.hasListeners(), K = !V && i4(e, a), j = V && o4(e, t, a, n);
|
|
6668
6668
|
(K || j) && (c = {
|
|
6669
6669
|
...c,
|
|
6670
6670
|
...R8(u.data, e.options)
|
|
@@ -6674,13 +6674,13 @@ var Ie, Kr, Io, be, $n, Ti, ht, Ht, No, $i, Pi, Pn, On, Qt, Oi, m0, D2, X1, j1,
|
|
|
6674
6674
|
d = c.data;
|
|
6675
6675
|
let _ = !1;
|
|
6676
6676
|
if (a.placeholderData !== void 0 && d === void 0 && m === "pending") {
|
|
6677
|
-
let
|
|
6678
|
-
i != null && i.isPlaceholderData && a.placeholderData === (A == null ? void 0 : A.placeholderData) ? (
|
|
6679
|
-
(
|
|
6677
|
+
let V;
|
|
6678
|
+
i != null && i.isPlaceholderData && a.placeholderData === (A == null ? void 0 : A.placeholderData) ? (V = i.data, _ = !0) : V = typeof a.placeholderData == "function" ? a.placeholderData(
|
|
6679
|
+
(z = W(this, Pi)) == null ? void 0 : z.state.data,
|
|
6680
6680
|
W(this, Pi)
|
|
6681
|
-
) : a.placeholderData,
|
|
6681
|
+
) : a.placeholderData, V !== void 0 && (m = "success", d = D1(
|
|
6682
6682
|
i == null ? void 0 : i.data,
|
|
6683
|
-
|
|
6683
|
+
V,
|
|
6684
6684
|
a
|
|
6685
6685
|
), h = !0);
|
|
6686
6686
|
}
|
|
@@ -6690,8 +6690,8 @@ var Ie, Kr, Io, be, $n, Ti, ht, Ht, No, $i, Pi, Pn, On, Qt, Oi, m0, D2, X1, j1,
|
|
|
6690
6690
|
else
|
|
6691
6691
|
try {
|
|
6692
6692
|
br(this, No, a.select), d = a.select(d), d = D1(i == null ? void 0 : i.data, d, a), br(this, $i, d), br(this, Ht, null);
|
|
6693
|
-
} catch (
|
|
6694
|
-
br(this, Ht,
|
|
6693
|
+
} catch (V) {
|
|
6694
|
+
br(this, Ht, V);
|
|
6695
6695
|
}
|
|
6696
6696
|
W(this, Ht) && (p = W(this, Ht), d = W(this, $i), b = Date.now(), m = "error");
|
|
6697
6697
|
const E = c.fetchStatus === "fetching", B = m === "pending", x = m === "error", k = B && E, $ = d !== void 0, L = {
|
|
@@ -6723,15 +6723,15 @@ var Ie, Kr, Io, be, $n, Ti, ht, Ht, No, $i, Pi, Pn, On, Qt, Oi, m0, D2, X1, j1,
|
|
|
6723
6723
|
isEnabled: Aa(a.enabled, e) !== !1
|
|
6724
6724
|
};
|
|
6725
6725
|
if (this.options.experimental_prefetchInRender) {
|
|
6726
|
-
const
|
|
6726
|
+
const V = (rr) => {
|
|
6727
6727
|
L.status === "error" ? rr.reject(L.error) : L.data !== void 0 && rr.resolve(L.data);
|
|
6728
6728
|
}, K = () => {
|
|
6729
6729
|
const rr = br(this, ht, L.promise = M1());
|
|
6730
|
-
|
|
6730
|
+
V(rr);
|
|
6731
6731
|
}, j = W(this, ht);
|
|
6732
6732
|
switch (j.status) {
|
|
6733
6733
|
case "pending":
|
|
6734
|
-
e.queryHash === t.queryHash &&
|
|
6734
|
+
e.queryHash === t.queryHash && V(j);
|
|
6735
6735
|
break;
|
|
6736
6736
|
case "fulfilled":
|
|
6737
6737
|
(L.status === "error" || L.data !== j.value) && K();
|
|
@@ -6865,10 +6865,10 @@ function A4(r) {
|
|
|
6865
6865
|
meta: e.options.meta
|
|
6866
6866
|
};
|
|
6867
6867
|
return m(K), K;
|
|
6868
|
-
})(), L = await _(O), { maxPages:
|
|
6868
|
+
})(), L = await _(O), { maxPages: z } = e.options, V = k ? g7 : p7;
|
|
6869
6869
|
return {
|
|
6870
|
-
pages:
|
|
6871
|
-
pageParams:
|
|
6870
|
+
pages: V(B.pages, L, z),
|
|
6871
|
+
pageParams: V(B.pageParams, x, z)
|
|
6872
6872
|
};
|
|
6873
6873
|
};
|
|
6874
6874
|
if (n && i.length) {
|
|
@@ -6957,7 +6957,7 @@ var xo, Ga, me, Vn, Xa, Ot, zb, Z7 = (zb = class extends x8 {
|
|
|
6957
6957
|
this.execute(this.state.variables);
|
|
6958
6958
|
}
|
|
6959
6959
|
async execute(e) {
|
|
6960
|
-
var o, A, f, s, u, c, h, d, p, b, m, _, E, B, x, k, $, O, L,
|
|
6960
|
+
var o, A, f, s, u, c, h, d, p, b, m, _, E, B, x, k, $, O, L, z;
|
|
6961
6961
|
const a = () => {
|
|
6962
6962
|
zr(this, Xa, Ot).call(this, { type: "continue" });
|
|
6963
6963
|
}, t = {
|
|
@@ -6967,8 +6967,8 @@ var xo, Ga, me, Vn, Xa, Ot, zb, Z7 = (zb = class extends x8 {
|
|
|
6967
6967
|
};
|
|
6968
6968
|
br(this, Vn, N8({
|
|
6969
6969
|
fn: () => this.options.mutationFn ? this.options.mutationFn(e, t) : Promise.reject(new Error("No mutationFn found")),
|
|
6970
|
-
onFail: (
|
|
6971
|
-
zr(this, Xa, Ot).call(this, { type: "failed", failureCount:
|
|
6970
|
+
onFail: (V, K) => {
|
|
6971
|
+
zr(this, Xa, Ot).call(this, { type: "failed", failureCount: V, error: K });
|
|
6972
6972
|
},
|
|
6973
6973
|
onPause: () => {
|
|
6974
6974
|
zr(this, Xa, Ot).call(this, { type: "pause" });
|
|
@@ -7002,23 +7002,23 @@ var xo, Ga, me, Vn, Xa, Ot, zb, Z7 = (zb = class extends x8 {
|
|
|
7002
7002
|
isPaused: i
|
|
7003
7003
|
});
|
|
7004
7004
|
}
|
|
7005
|
-
const
|
|
7005
|
+
const V = await W(this, Vn).start();
|
|
7006
7006
|
return await ((c = (u = W(this, me).config).onSuccess) == null ? void 0 : c.call(
|
|
7007
7007
|
u,
|
|
7008
|
-
|
|
7008
|
+
V,
|
|
7009
7009
|
e,
|
|
7010
7010
|
this.state.context,
|
|
7011
7011
|
this,
|
|
7012
7012
|
t
|
|
7013
7013
|
)), await ((d = (h = this.options).onSuccess) == null ? void 0 : d.call(
|
|
7014
7014
|
h,
|
|
7015
|
-
|
|
7015
|
+
V,
|
|
7016
7016
|
e,
|
|
7017
7017
|
this.state.context,
|
|
7018
7018
|
t
|
|
7019
7019
|
)), await ((b = (p = W(this, me).config).onSettled) == null ? void 0 : b.call(
|
|
7020
7020
|
p,
|
|
7021
|
-
|
|
7021
|
+
V,
|
|
7022
7022
|
null,
|
|
7023
7023
|
this.state.variables,
|
|
7024
7024
|
this.state.context,
|
|
@@ -7026,45 +7026,45 @@ var xo, Ga, me, Vn, Xa, Ot, zb, Z7 = (zb = class extends x8 {
|
|
|
7026
7026
|
t
|
|
7027
7027
|
)), await ((_ = (m = this.options).onSettled) == null ? void 0 : _.call(
|
|
7028
7028
|
m,
|
|
7029
|
-
|
|
7029
|
+
V,
|
|
7030
7030
|
null,
|
|
7031
7031
|
e,
|
|
7032
7032
|
this.state.context,
|
|
7033
7033
|
t
|
|
7034
|
-
)), zr(this, Xa, Ot).call(this, { type: "success", data:
|
|
7035
|
-
} catch (
|
|
7034
|
+
)), zr(this, Xa, Ot).call(this, { type: "success", data: V }), V;
|
|
7035
|
+
} catch (V) {
|
|
7036
7036
|
try {
|
|
7037
7037
|
throw await ((B = (E = W(this, me).config).onError) == null ? void 0 : B.call(
|
|
7038
7038
|
E,
|
|
7039
|
-
|
|
7039
|
+
V,
|
|
7040
7040
|
e,
|
|
7041
7041
|
this.state.context,
|
|
7042
7042
|
this,
|
|
7043
7043
|
t
|
|
7044
7044
|
)), await ((k = (x = this.options).onError) == null ? void 0 : k.call(
|
|
7045
7045
|
x,
|
|
7046
|
-
|
|
7046
|
+
V,
|
|
7047
7047
|
e,
|
|
7048
7048
|
this.state.context,
|
|
7049
7049
|
t
|
|
7050
7050
|
)), await ((O = ($ = W(this, me).config).onSettled) == null ? void 0 : O.call(
|
|
7051
7051
|
$,
|
|
7052
7052
|
void 0,
|
|
7053
|
-
|
|
7053
|
+
V,
|
|
7054
7054
|
this.state.variables,
|
|
7055
7055
|
this.state.context,
|
|
7056
7056
|
this,
|
|
7057
7057
|
t
|
|
7058
|
-
)), await ((
|
|
7058
|
+
)), await ((z = (L = this.options).onSettled) == null ? void 0 : z.call(
|
|
7059
7059
|
L,
|
|
7060
7060
|
void 0,
|
|
7061
|
-
|
|
7061
|
+
V,
|
|
7062
7062
|
e,
|
|
7063
7063
|
this.state.context,
|
|
7064
7064
|
t
|
|
7065
|
-
)),
|
|
7065
|
+
)), V;
|
|
7066
7066
|
} finally {
|
|
7067
|
-
zr(this, Xa, Ot).call(this, { type: "error", error:
|
|
7067
|
+
zr(this, Xa, Ot).call(this, { type: "error", error: V });
|
|
7068
7068
|
}
|
|
7069
7069
|
} finally {
|
|
7070
7070
|
W(this, me).runNext(this);
|
|
@@ -8866,8 +8866,8 @@ const K8 = (r) => {
|
|
|
8866
8866
|
onUploadProgress: $,
|
|
8867
8867
|
responseType: O,
|
|
8868
8868
|
headers: L,
|
|
8869
|
-
withCredentials:
|
|
8870
|
-
fetchOptions:
|
|
8869
|
+
withCredentials: z = "same-origin",
|
|
8870
|
+
fetchOptions: V
|
|
8871
8871
|
} = K8(p), K = e || fetch;
|
|
8872
8872
|
O = O ? (O + "").toLowerCase() : "text";
|
|
8873
8873
|
let j = cC([E, B && B.toAbortSignal()], x), rr = null;
|
|
@@ -8890,18 +8890,18 @@ const K8 = (r) => {
|
|
|
8890
8890
|
_ = p4(y.body, g4, R, I);
|
|
8891
8891
|
}
|
|
8892
8892
|
}
|
|
8893
|
-
H.isString(
|
|
8893
|
+
H.isString(z) || (z = z ? "include" : "omit");
|
|
8894
8894
|
const Q = i && "credentials" in a.prototype, P = {
|
|
8895
|
-
...
|
|
8895
|
+
...V,
|
|
8896
8896
|
signal: j,
|
|
8897
8897
|
method: m.toUpperCase(),
|
|
8898
8898
|
headers: L.normalize().toJSON(),
|
|
8899
8899
|
body: _,
|
|
8900
8900
|
duplex: "half",
|
|
8901
|
-
credentials: Q ?
|
|
8901
|
+
credentials: Q ? z : void 0
|
|
8902
8902
|
};
|
|
8903
8903
|
rr = i && new a(b, P);
|
|
8904
|
-
let v = await (i ? K(rr,
|
|
8904
|
+
let v = await (i ? K(rr, V) : K(b, P));
|
|
8905
8905
|
const w = u && (O === "stream" || O === "response");
|
|
8906
8906
|
if (u && (k || w && Y)) {
|
|
8907
8907
|
const y = {};
|
|
@@ -9974,26 +9974,26 @@ var fi = (r) => Y0(r) && !UA(r) ? r : {
|
|
|
9974
9974
|
return {};
|
|
9975
9975
|
const B = A ? A[0] : o, x = (j) => {
|
|
9976
9976
|
n && B.reportValidity && (B.setCustomValidity(je(j) ? "" : j || ""), B.reportValidity());
|
|
9977
|
-
}, k = {}, $ = Dl(o), O = Go(o), L = $ || O,
|
|
9977
|
+
}, k = {}, $ = Dl(o), O = Go(o), L = $ || O, z = (m || Vl(o)) && V0(o.value) && V0(E) || LA(o) && o.value === "" || E === "" || Array.isArray(E) && !E.length, V = c5.bind(null, b, t, k), K = (j, rr, Y, or = ot.maxLength, Q = ot.minLength) => {
|
|
9978
9978
|
const P = j ? rr : Y;
|
|
9979
9979
|
k[b] = {
|
|
9980
9980
|
type: j ? or : Q,
|
|
9981
9981
|
message: P,
|
|
9982
9982
|
ref: o,
|
|
9983
|
-
...
|
|
9983
|
+
...V(j ? or : Q, P)
|
|
9984
9984
|
};
|
|
9985
9985
|
};
|
|
9986
|
-
if (i ? !Array.isArray(E) || !E.length : f && (!L && (
|
|
9986
|
+
if (i ? !Array.isArray(E) || !E.length : f && (!L && (z || ve(E)) || je(E) && !E || O && !m5(A).isValid || $ && !p5(A).isValid)) {
|
|
9987
9987
|
const { value: j, message: rr } = Ue(f) ? { value: !!f, message: f } : fi(f);
|
|
9988
9988
|
if (j && (k[b] = {
|
|
9989
9989
|
type: ot.required,
|
|
9990
9990
|
message: rr,
|
|
9991
9991
|
ref: B,
|
|
9992
|
-
...
|
|
9992
|
+
...V(ot.required, rr)
|
|
9993
9993
|
}, !t))
|
|
9994
9994
|
return x(rr), k;
|
|
9995
9995
|
}
|
|
9996
|
-
if (!
|
|
9996
|
+
if (!z && (!ve(c) || !ve(h))) {
|
|
9997
9997
|
let j, rr;
|
|
9998
9998
|
const Y = fi(h), or = fi(c);
|
|
9999
9999
|
if (!ve(E) && !isNaN(E)) {
|
|
@@ -10006,18 +10006,18 @@ var fi = (r) => Y0(r) && !UA(r) ? r : {
|
|
|
10006
10006
|
if ((j || rr) && (K(!!j, Y.message, or.message, ot.max, ot.min), !t))
|
|
10007
10007
|
return x(k[b].message), k;
|
|
10008
10008
|
}
|
|
10009
|
-
if ((s || u) && !
|
|
10009
|
+
if ((s || u) && !z && (Ue(E) || i && Array.isArray(E))) {
|
|
10010
10010
|
const j = fi(s), rr = fi(u), Y = !ve(j.value) && E.length > +j.value, or = !ve(rr.value) && E.length < +rr.value;
|
|
10011
10011
|
if ((Y || or) && (K(Y, j.message, rr.message), !t))
|
|
10012
10012
|
return x(k[b].message), k;
|
|
10013
10013
|
}
|
|
10014
|
-
if (d && !
|
|
10014
|
+
if (d && !z && Ue(E)) {
|
|
10015
10015
|
const { value: j, message: rr } = fi(d);
|
|
10016
10016
|
if (UA(j) && !E.match(j) && (k[b] = {
|
|
10017
10017
|
type: ot.pattern,
|
|
10018
10018
|
message: rr,
|
|
10019
10019
|
ref: o,
|
|
10020
|
-
...
|
|
10020
|
+
...V(ot.pattern, rr)
|
|
10021
10021
|
}, !t))
|
|
10022
10022
|
return x(rr), k;
|
|
10023
10023
|
}
|
|
@@ -10026,7 +10026,7 @@ var fi = (r) => Y0(r) && !UA(r) ? r : {
|
|
|
10026
10026
|
const j = await p(E, a), rr = T4(j, B);
|
|
10027
10027
|
if (rr && (k[b] = {
|
|
10028
10028
|
...rr,
|
|
10029
|
-
...
|
|
10029
|
+
...V(ot.validate, rr.message)
|
|
10030
10030
|
}, !t))
|
|
10031
10031
|
return x(rr.message), k;
|
|
10032
10032
|
} else if (Y0(p)) {
|
|
@@ -10037,7 +10037,7 @@ var fi = (r) => Y0(r) && !UA(r) ? r : {
|
|
|
10037
10037
|
const Y = T4(await p[rr](E, a), B, rr);
|
|
10038
10038
|
Y && (j = {
|
|
10039
10039
|
...Y,
|
|
10040
|
-
...
|
|
10040
|
+
...V(rr, Y.message)
|
|
10041
10041
|
}, x(Y.message), t && (k[b] = j));
|
|
10042
10042
|
}
|
|
10043
10043
|
if (!Ne(j) && (k[b] = {
|
|
@@ -10103,7 +10103,7 @@ function YC(r = {}) {
|
|
|
10103
10103
|
clearTimeout(s), s = setTimeout(Z, M);
|
|
10104
10104
|
}, b = async (Z) => {
|
|
10105
10105
|
if (!e.disabled && (u.isValid || c.isValid || Z)) {
|
|
10106
|
-
const M = e.resolver ? Ne((await O()).errors) : await
|
|
10106
|
+
const M = e.resolver ? Ne((await O()).errors) : await z(t, !0);
|
|
10107
10107
|
M !== a.isValid && h.state.next({
|
|
10108
10108
|
isValid: M
|
|
10109
10109
|
});
|
|
@@ -10199,7 +10199,7 @@ function YC(r = {}) {
|
|
|
10199
10199
|
else
|
|
10200
10200
|
a.errors = M;
|
|
10201
10201
|
return M;
|
|
10202
|
-
},
|
|
10202
|
+
}, z = async (Z, M, U = {
|
|
10203
10203
|
valid: !0
|
|
10204
10204
|
}) => {
|
|
10205
10205
|
for (const nr in Z) {
|
|
@@ -10214,11 +10214,11 @@ function YC(r = {}) {
|
|
|
10214
10214
|
break;
|
|
10215
10215
|
!M && (hr(F0, tr.name) ? Wr ? LC(a.errors, F0, tr.name) : v0(a.errors, tr.name, F0[tr.name]) : G0(a.errors, tr.name));
|
|
10216
10216
|
}
|
|
10217
|
-
!Ne(lr) && await
|
|
10217
|
+
!Ne(lr) && await z(lr, M, U);
|
|
10218
10218
|
}
|
|
10219
10219
|
}
|
|
10220
10220
|
return U.valid;
|
|
10221
|
-
},
|
|
10221
|
+
}, V = () => {
|
|
10222
10222
|
for (const Z of A.unMount) {
|
|
10223
10223
|
const M = hr(t, Z);
|
|
10224
10224
|
M && (M._f.refs ? M._f.refs.every((U) => !$s(U)) : !$s(M._f.ref)) && S(Z);
|
|
@@ -10284,7 +10284,7 @@ function YC(r = {}) {
|
|
|
10284
10284
|
Xr = he.error, U = he.name, F0 = Ne(Ce);
|
|
10285
10285
|
}
|
|
10286
10286
|
} else
|
|
10287
|
-
m([U], !0), Xr = (await $4(ir, A.disabled, i, d, e.shouldUseNativeValidation))[U], m([U]), tr(ne), nr && (Xr ? F0 = !1 : (u.isValid || c.isValid) && (F0 = await
|
|
10287
|
+
m([U], !0), Xr = (await $4(ir, A.disabled, i, d, e.shouldUseNativeValidation))[U], m([U]), tr(ne), nr && (Xr ? F0 = !1 : (u.isValid || c.isValid) && (F0 = await z(t, !0)));
|
|
10288
10288
|
nr && (ir._f.deps && (!Array.isArray(ir._f.deps) || ir._f.deps.length > 0) && w(ir._f.deps), $(U, F0, Xr, de));
|
|
10289
10289
|
}
|
|
10290
10290
|
}, v = (Z, M) => {
|
|
@@ -10298,8 +10298,8 @@ function YC(r = {}) {
|
|
|
10298
10298
|
U = Ne(tr), nr = Z ? !ir.some((lr) => hr(tr, lr)) : U;
|
|
10299
10299
|
} else Z ? (nr = (await Promise.all(ir.map(async (tr) => {
|
|
10300
10300
|
const lr = hr(t, tr);
|
|
10301
|
-
return await
|
|
10302
|
-
}))).every(Boolean), !(!nr && !a.isValid) && b()) : nr = U = await
|
|
10301
|
+
return await z(lr && lr._f ? { [tr]: lr } : lr);
|
|
10302
|
+
}))).every(Boolean), !(!nr && !a.isValid) && b()) : nr = U = await z(t);
|
|
10303
10303
|
return h.state.next({
|
|
10304
10304
|
...!Ue(Z) || (u.isValid || c.isValid) && U !== a.isValid ? {} : { name: Z },
|
|
10305
10305
|
...e.resolver || !Z ? { isValid: U } : {},
|
|
@@ -10342,7 +10342,7 @@ function YC(r = {}) {
|
|
|
10342
10342
|
defaultValues: n
|
|
10343
10343
|
});
|
|
10344
10344
|
}
|
|
10345
|
-
}).unsubscribe,
|
|
10345
|
+
}).unsubscribe, D = (Z) => (o.mount = !0, c = {
|
|
10346
10346
|
...c,
|
|
10347
10347
|
...Z.formState
|
|
10348
10348
|
}, F({
|
|
@@ -10357,7 +10357,7 @@ function YC(r = {}) {
|
|
|
10357
10357
|
...a,
|
|
10358
10358
|
...M.keepDirty ? { isDirty: K() } : {}
|
|
10359
10359
|
}), !M.keepIsValid && b();
|
|
10360
|
-
},
|
|
10360
|
+
}, J = ({ disabled: Z, name: M }) => {
|
|
10361
10361
|
(je(Z) && o.mount || Z || A.disabled.has(M)) && (Z ? A.disabled.add(M) : A.disabled.delete(M));
|
|
10362
10362
|
}, ar = (Z, M = {}) => {
|
|
10363
10363
|
let U = hr(t, Z);
|
|
@@ -10370,7 +10370,7 @@ function YC(r = {}) {
|
|
|
10370
10370
|
mount: !0,
|
|
10371
10371
|
...M
|
|
10372
10372
|
}
|
|
10373
|
-
}), A.mount.add(Z), U ?
|
|
10373
|
+
}), A.mount.add(Z), U ? J({
|
|
10374
10374
|
disabled: je(M.disabled) ? M.disabled : e.disabled,
|
|
10375
10375
|
name: Z
|
|
10376
10376
|
}) : x(Z, !0, M.value), {
|
|
@@ -10426,7 +10426,7 @@ function YC(r = {}) {
|
|
|
10426
10426
|
const { errors: tr, values: lr } = await O();
|
|
10427
10427
|
a.errors = tr, ir = J0(lr);
|
|
10428
10428
|
} else
|
|
10429
|
-
await
|
|
10429
|
+
await z(t);
|
|
10430
10430
|
if (A.disabled.size)
|
|
10431
10431
|
for (const tr of A.disabled)
|
|
10432
10432
|
G0(ir, tr);
|
|
@@ -10532,7 +10532,7 @@ function YC(r = {}) {
|
|
|
10532
10532
|
_getDirty: K,
|
|
10533
10533
|
_setValid: b,
|
|
10534
10534
|
_setFieldArray: _,
|
|
10535
|
-
_setDisabledField:
|
|
10535
|
+
_setDisabledField: J,
|
|
10536
10536
|
_setErrors: B,
|
|
10537
10537
|
_getFieldArray: rr,
|
|
10538
10538
|
_reset: Zr,
|
|
@@ -10541,7 +10541,7 @@ function YC(r = {}) {
|
|
|
10541
10541
|
isLoading: !1
|
|
10542
10542
|
});
|
|
10543
10543
|
}),
|
|
10544
|
-
_removeUnmounted:
|
|
10544
|
+
_removeUnmounted: V,
|
|
10545
10545
|
_disableForm: er,
|
|
10546
10546
|
_subjects: h,
|
|
10547
10547
|
_proxyFormState: u,
|
|
@@ -10579,7 +10579,7 @@ function YC(r = {}) {
|
|
|
10579
10579
|
};
|
|
10580
10580
|
}
|
|
10581
10581
|
},
|
|
10582
|
-
subscribe:
|
|
10582
|
+
subscribe: D,
|
|
10583
10583
|
trigger: w,
|
|
10584
10584
|
register: ar,
|
|
10585
10585
|
handleSubmit: T,
|
|
@@ -13615,7 +13615,7 @@ function S_() {
|
|
|
13615
13615
|
}
|
|
13616
13616
|
}
|
|
13617
13617
|
}
|
|
13618
|
-
var k = f, $ = s, O = A, L = o,
|
|
13618
|
+
var k = f, $ = s, O = A, L = o, z = e, V = u, K = t, j = p, rr = d, Y = a, or = i, Q = n, P = c, v = !1;
|
|
13619
13619
|
function w(T) {
|
|
13620
13620
|
return v || (v = !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.")), g(T) || x(T) === f;
|
|
13621
13621
|
}
|
|
@@ -13637,13 +13637,13 @@ function S_() {
|
|
|
13637
13637
|
function F(T) {
|
|
13638
13638
|
return x(T) === t;
|
|
13639
13639
|
}
|
|
13640
|
-
function
|
|
13640
|
+
function D(T) {
|
|
13641
13641
|
return x(T) === p;
|
|
13642
13642
|
}
|
|
13643
13643
|
function S(T) {
|
|
13644
13644
|
return x(T) === d;
|
|
13645
13645
|
}
|
|
13646
|
-
function
|
|
13646
|
+
function J(T) {
|
|
13647
13647
|
return x(T) === a;
|
|
13648
13648
|
}
|
|
13649
13649
|
function ar(T) {
|
|
@@ -13655,7 +13655,7 @@ function S_() {
|
|
|
13655
13655
|
function er(T) {
|
|
13656
13656
|
return x(T) === c;
|
|
13657
13657
|
}
|
|
13658
|
-
d0.AsyncMode = k, d0.ConcurrentMode = $, d0.ContextConsumer = O, d0.ContextProvider = L, d0.Element =
|
|
13658
|
+
d0.AsyncMode = k, d0.ConcurrentMode = $, d0.ContextConsumer = O, d0.ContextProvider = L, d0.Element = z, d0.ForwardRef = V, d0.Fragment = K, d0.Lazy = j, d0.Memo = rr, d0.Portal = Y, d0.Profiler = or, d0.StrictMode = Q, d0.Suspense = P, d0.isAsyncMode = w, d0.isConcurrentMode = g, d0.isContextConsumer = y, d0.isContextProvider = N, d0.isElement = R, d0.isForwardRef = I, d0.isFragment = F, d0.isLazy = D, d0.isMemo = S, d0.isPortal = J, d0.isProfiler = ar, d0.isStrictMode = q, d0.isSuspense = er, d0.isValidElementType = B, d0.typeOf = x;
|
|
13659
13659
|
}()), d0;
|
|
13660
13660
|
}
|
|
13661
13661
|
var rh;
|
|
@@ -13811,10 +13811,10 @@ function $_() {
|
|
|
13811
13811
|
element: x(),
|
|
13812
13812
|
elementType: k(),
|
|
13813
13813
|
instanceOf: $,
|
|
13814
|
-
node:
|
|
13814
|
+
node: V(),
|
|
13815
13815
|
objectOf: L,
|
|
13816
13816
|
oneOf: O,
|
|
13817
|
-
oneOfType:
|
|
13817
|
+
oneOfType: z,
|
|
13818
13818
|
shape: j,
|
|
13819
13819
|
exact: rr
|
|
13820
13820
|
};
|
|
@@ -13828,33 +13828,33 @@ function $_() {
|
|
|
13828
13828
|
function m(g) {
|
|
13829
13829
|
if (process.env.NODE_ENV !== "production")
|
|
13830
13830
|
var y = {}, N = 0;
|
|
13831
|
-
function R(F,
|
|
13832
|
-
if (
|
|
13831
|
+
function R(F, D, S, J, ar, q, er) {
|
|
13832
|
+
if (J = J || h, q = q || S, er !== a) {
|
|
13833
13833
|
if (f) {
|
|
13834
13834
|
var T = new Error(
|
|
13835
13835
|
"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"
|
|
13836
13836
|
);
|
|
13837
13837
|
throw T.name = "Invariant Violation", T;
|
|
13838
13838
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
13839
|
-
var fr =
|
|
13839
|
+
var fr = J + ":" + S;
|
|
13840
13840
|
!y[fr] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
13841
13841
|
N < 3 && (i(
|
|
13842
|
-
"You are manually calling a React.PropTypes validation function for the `" + q + "` prop on `" +
|
|
13842
|
+
"You are manually calling a React.PropTypes validation function for the `" + q + "` prop on `" + J + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
13843
13843
|
), y[fr] = !0, N++);
|
|
13844
13844
|
}
|
|
13845
13845
|
}
|
|
13846
|
-
return
|
|
13846
|
+
return D[S] == null ? F ? D[S] === null ? new b("The " + ar + " `" + q + "` is marked as required " + ("in `" + J + "`, but its value is `null`.")) : new b("The " + ar + " `" + q + "` is marked as required in " + ("`" + J + "`, but its value is `undefined`.")) : null : g(D, S, J, ar, q);
|
|
13847
13847
|
}
|
|
13848
13848
|
var I = R.bind(null, !1);
|
|
13849
13849
|
return I.isRequired = R.bind(null, !0), I;
|
|
13850
13850
|
}
|
|
13851
13851
|
function _(g) {
|
|
13852
|
-
function y(N, R, I, F,
|
|
13853
|
-
var
|
|
13852
|
+
function y(N, R, I, F, D, S) {
|
|
13853
|
+
var J = N[R], ar = Q(J);
|
|
13854
13854
|
if (ar !== g) {
|
|
13855
|
-
var q = P(
|
|
13855
|
+
var q = P(J);
|
|
13856
13856
|
return new b(
|
|
13857
|
-
"Invalid " + F + " `" +
|
|
13857
|
+
"Invalid " + F + " `" + D + "` of type " + ("`" + q + "` supplied to `" + I + "`, expected ") + ("`" + g + "`."),
|
|
13858
13858
|
{ expectedType: g }
|
|
13859
13859
|
);
|
|
13860
13860
|
}
|
|
@@ -13866,16 +13866,16 @@ function $_() {
|
|
|
13866
13866
|
return m(o);
|
|
13867
13867
|
}
|
|
13868
13868
|
function B(g) {
|
|
13869
|
-
function y(N, R, I, F,
|
|
13869
|
+
function y(N, R, I, F, D) {
|
|
13870
13870
|
if (typeof g != "function")
|
|
13871
|
-
return new b("Property `" +
|
|
13871
|
+
return new b("Property `" + D + "` of component `" + I + "` has invalid PropType notation inside arrayOf.");
|
|
13872
13872
|
var S = N[R];
|
|
13873
13873
|
if (!Array.isArray(S)) {
|
|
13874
|
-
var
|
|
13875
|
-
return new b("Invalid " + F + " `" +
|
|
13874
|
+
var J = Q(S);
|
|
13875
|
+
return new b("Invalid " + F + " `" + D + "` of type " + ("`" + J + "` supplied to `" + I + "`, expected an array."));
|
|
13876
13876
|
}
|
|
13877
13877
|
for (var ar = 0; ar < S.length; ar++) {
|
|
13878
|
-
var q = g(S, ar, I, F,
|
|
13878
|
+
var q = g(S, ar, I, F, D + "[" + ar + "]", a);
|
|
13879
13879
|
if (q instanceof Error)
|
|
13880
13880
|
return q;
|
|
13881
13881
|
}
|
|
@@ -13885,9 +13885,9 @@ function $_() {
|
|
|
13885
13885
|
}
|
|
13886
13886
|
function x() {
|
|
13887
13887
|
function g(y, N, R, I, F) {
|
|
13888
|
-
var
|
|
13889
|
-
if (!A(
|
|
13890
|
-
var S = Q(
|
|
13888
|
+
var D = y[N];
|
|
13889
|
+
if (!A(D)) {
|
|
13890
|
+
var S = Q(D);
|
|
13891
13891
|
return new b("Invalid " + I + " `" + F + "` of type " + ("`" + S + "` supplied to `" + R + "`, expected a single ReactElement."));
|
|
13892
13892
|
}
|
|
13893
13893
|
return null;
|
|
@@ -13896,9 +13896,9 @@ function $_() {
|
|
|
13896
13896
|
}
|
|
13897
13897
|
function k() {
|
|
13898
13898
|
function g(y, N, R, I, F) {
|
|
13899
|
-
var
|
|
13900
|
-
if (!r.isValidElementType(
|
|
13901
|
-
var S = Q(
|
|
13899
|
+
var D = y[N];
|
|
13900
|
+
if (!r.isValidElementType(D)) {
|
|
13901
|
+
var S = Q(D);
|
|
13902
13902
|
return new b("Invalid " + I + " `" + F + "` of type " + ("`" + S + "` supplied to `" + R + "`, expected a single ReactElement type."));
|
|
13903
13903
|
}
|
|
13904
13904
|
return null;
|
|
@@ -13906,10 +13906,10 @@ function $_() {
|
|
|
13906
13906
|
return m(g);
|
|
13907
13907
|
}
|
|
13908
13908
|
function $(g) {
|
|
13909
|
-
function y(N, R, I, F,
|
|
13909
|
+
function y(N, R, I, F, D) {
|
|
13910
13910
|
if (!(N[R] instanceof g)) {
|
|
13911
|
-
var S = g.name || h,
|
|
13912
|
-
return new b("Invalid " + F + " `" +
|
|
13911
|
+
var S = g.name || h, J = w(N[R]);
|
|
13912
|
+
return new b("Invalid " + F + " `" + D + "` of type " + ("`" + J + "` supplied to `" + I + "`, expected ") + ("instance of `" + S + "`."));
|
|
13913
13913
|
}
|
|
13914
13914
|
return null;
|
|
13915
13915
|
}
|
|
@@ -13920,28 +13920,28 @@ function $_() {
|
|
|
13920
13920
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? i(
|
|
13921
13921
|
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
13922
13922
|
) : i("Invalid argument supplied to oneOf, expected an array.")), o;
|
|
13923
|
-
function y(N, R, I, F,
|
|
13924
|
-
for (var S = N[R],
|
|
13925
|
-
if (p(S, g[
|
|
13923
|
+
function y(N, R, I, F, D) {
|
|
13924
|
+
for (var S = N[R], J = 0; J < g.length; J++)
|
|
13925
|
+
if (p(S, g[J]))
|
|
13926
13926
|
return null;
|
|
13927
13927
|
var ar = JSON.stringify(g, function(er, T) {
|
|
13928
13928
|
var fr = P(T);
|
|
13929
13929
|
return fr === "symbol" ? String(T) : T;
|
|
13930
13930
|
});
|
|
13931
|
-
return new b("Invalid " + F + " `" +
|
|
13931
|
+
return new b("Invalid " + F + " `" + D + "` of value `" + String(S) + "` " + ("supplied to `" + I + "`, expected one of " + ar + "."));
|
|
13932
13932
|
}
|
|
13933
13933
|
return m(y);
|
|
13934
13934
|
}
|
|
13935
13935
|
function L(g) {
|
|
13936
|
-
function y(N, R, I, F,
|
|
13936
|
+
function y(N, R, I, F, D) {
|
|
13937
13937
|
if (typeof g != "function")
|
|
13938
|
-
return new b("Property `" +
|
|
13939
|
-
var S = N[R],
|
|
13940
|
-
if (
|
|
13941
|
-
return new b("Invalid " + F + " `" +
|
|
13938
|
+
return new b("Property `" + D + "` of component `" + I + "` has invalid PropType notation inside objectOf.");
|
|
13939
|
+
var S = N[R], J = Q(S);
|
|
13940
|
+
if (J !== "object")
|
|
13941
|
+
return new b("Invalid " + F + " `" + D + "` of type " + ("`" + J + "` supplied to `" + I + "`, expected an object."));
|
|
13942
13942
|
for (var ar in S)
|
|
13943
13943
|
if (t(S, ar)) {
|
|
13944
|
-
var q = g(S, ar, I, F,
|
|
13944
|
+
var q = g(S, ar, I, F, D + "." + ar, a);
|
|
13945
13945
|
if (q instanceof Error)
|
|
13946
13946
|
return q;
|
|
13947
13947
|
}
|
|
@@ -13949,7 +13949,7 @@ function $_() {
|
|
|
13949
13949
|
}
|
|
13950
13950
|
return m(y);
|
|
13951
13951
|
}
|
|
13952
|
-
function
|
|
13952
|
+
function z(g) {
|
|
13953
13953
|
if (!Array.isArray(g))
|
|
13954
13954
|
return process.env.NODE_ENV !== "production" && i("Invalid argument supplied to oneOfType, expected an instance of array."), o;
|
|
13955
13955
|
for (var y = 0; y < g.length; y++) {
|
|
@@ -13959,19 +13959,19 @@ function $_() {
|
|
|
13959
13959
|
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + v(N) + " at index " + y + "."
|
|
13960
13960
|
), o;
|
|
13961
13961
|
}
|
|
13962
|
-
function R(I, F,
|
|
13962
|
+
function R(I, F, D, S, J) {
|
|
13963
13963
|
for (var ar = [], q = 0; q < g.length; q++) {
|
|
13964
|
-
var er = g[q], T = er(I, F,
|
|
13964
|
+
var er = g[q], T = er(I, F, D, S, J, a);
|
|
13965
13965
|
if (T == null)
|
|
13966
13966
|
return null;
|
|
13967
13967
|
T.data && t(T.data, "expectedType") && ar.push(T.data.expectedType);
|
|
13968
13968
|
}
|
|
13969
13969
|
var fr = ar.length > 0 ? ", expected one of type [" + ar.join(", ") + "]" : "";
|
|
13970
|
-
return new b("Invalid " + S + " `" +
|
|
13970
|
+
return new b("Invalid " + S + " `" + J + "` supplied to " + ("`" + D + "`" + fr + "."));
|
|
13971
13971
|
}
|
|
13972
13972
|
return m(R);
|
|
13973
13973
|
}
|
|
13974
|
-
function
|
|
13974
|
+
function V() {
|
|
13975
13975
|
function g(y, N, R, I, F) {
|
|
13976
13976
|
return Y(y[N]) ? null : new b("Invalid " + I + " `" + F + "` supplied to " + ("`" + R + "`, expected a ReactNode."));
|
|
13977
13977
|
}
|
|
@@ -13983,15 +13983,15 @@ function $_() {
|
|
|
13983
13983
|
);
|
|
13984
13984
|
}
|
|
13985
13985
|
function j(g) {
|
|
13986
|
-
function y(N, R, I, F,
|
|
13987
|
-
var S = N[R],
|
|
13988
|
-
if (
|
|
13989
|
-
return new b("Invalid " + F + " `" +
|
|
13986
|
+
function y(N, R, I, F, D) {
|
|
13987
|
+
var S = N[R], J = Q(S);
|
|
13988
|
+
if (J !== "object")
|
|
13989
|
+
return new b("Invalid " + F + " `" + D + "` of type `" + J + "` " + ("supplied to `" + I + "`, expected `object`."));
|
|
13990
13990
|
for (var ar in g) {
|
|
13991
13991
|
var q = g[ar];
|
|
13992
13992
|
if (typeof q != "function")
|
|
13993
|
-
return K(I, F,
|
|
13994
|
-
var er = q(S, ar, I, F,
|
|
13993
|
+
return K(I, F, D, ar, P(q));
|
|
13994
|
+
var er = q(S, ar, I, F, D + "." + ar, a);
|
|
13995
13995
|
if (er)
|
|
13996
13996
|
return er;
|
|
13997
13997
|
}
|
|
@@ -14000,21 +14000,21 @@ function $_() {
|
|
|
14000
14000
|
return m(y);
|
|
14001
14001
|
}
|
|
14002
14002
|
function rr(g) {
|
|
14003
|
-
function y(N, R, I, F,
|
|
14004
|
-
var S = N[R],
|
|
14005
|
-
if (
|
|
14006
|
-
return new b("Invalid " + F + " `" +
|
|
14003
|
+
function y(N, R, I, F, D) {
|
|
14004
|
+
var S = N[R], J = Q(S);
|
|
14005
|
+
if (J !== "object")
|
|
14006
|
+
return new b("Invalid " + F + " `" + D + "` of type `" + J + "` " + ("supplied to `" + I + "`, expected `object`."));
|
|
14007
14007
|
var ar = e({}, N[R], g);
|
|
14008
14008
|
for (var q in ar) {
|
|
14009
14009
|
var er = g[q];
|
|
14010
14010
|
if (t(g, q) && typeof er != "function")
|
|
14011
|
-
return K(I, F,
|
|
14011
|
+
return K(I, F, D, q, P(er));
|
|
14012
14012
|
if (!er)
|
|
14013
14013
|
return new b(
|
|
14014
|
-
"Invalid " + F + " `" +
|
|
14014
|
+
"Invalid " + F + " `" + D + "` key `" + q + "` supplied to `" + I + "`.\nBad object: " + JSON.stringify(N[R], null, " ") + `
|
|
14015
14015
|
Valid keys: ` + JSON.stringify(Object.keys(g), null, " ")
|
|
14016
14016
|
);
|
|
14017
|
-
var T = er(S, q, I, F,
|
|
14017
|
+
var T = er(S, q, I, F, D + "." + q, a);
|
|
14018
14018
|
if (T)
|
|
14019
14019
|
return T;
|
|
14020
14020
|
}
|
|
@@ -18709,8 +18709,8 @@ function OR(r, e, a) {
|
|
|
18709
18709
|
var L;
|
|
18710
18710
|
if (o) {
|
|
18711
18711
|
if (m) {
|
|
18712
|
-
var
|
|
18713
|
-
|
|
18712
|
+
var z = $ ? m === $ : Ei(o, m, t);
|
|
18713
|
+
z ? $ || ($ = m) : L = {
|
|
18714
18714
|
latestCountrySelectedByUser: void 0
|
|
18715
18715
|
};
|
|
18716
18716
|
}
|
|
@@ -18869,25 +18869,25 @@ var QR = /* @__PURE__ */ function(r) {
|
|
|
18869
18869
|
var _ = t.props.metadata;
|
|
18870
18870
|
return Gf(m, _);
|
|
18871
18871
|
}), va(t, "onCountryChange", function(m) {
|
|
18872
|
-
var _ = t.props, E = _.international, B = _.metadata, x = _.onChange, k = _.focusInputOnCountrySelection, $ = t.state, O = $.phoneDigits, L = $.country,
|
|
18872
|
+
var _ = t.props, E = _.international, B = _.metadata, x = _.onChange, k = _.focusInputOnCountrySelection, $ = t.state, O = $.phoneDigits, L = $.country, z = NR(O, {
|
|
18873
18873
|
prevCountry: L,
|
|
18874
18874
|
newCountry: m,
|
|
18875
18875
|
metadata: B,
|
|
18876
18876
|
// Convert the phone number to "national" format
|
|
18877
18877
|
// when the user changes the selected country by hand.
|
|
18878
18878
|
useNationalFormat: !E
|
|
18879
|
-
}),
|
|
18879
|
+
}), V = gi(z, m, B);
|
|
18880
18880
|
k && t.inputRef.current.focus(), t.setState({
|
|
18881
18881
|
country: m,
|
|
18882
18882
|
latestCountrySelectedByUser: m,
|
|
18883
18883
|
hasUserSelectedACountry: !0,
|
|
18884
|
-
phoneDigits:
|
|
18885
|
-
value:
|
|
18884
|
+
phoneDigits: z,
|
|
18885
|
+
value: V
|
|
18886
18886
|
}, function() {
|
|
18887
|
-
x(
|
|
18887
|
+
x(V);
|
|
18888
18888
|
});
|
|
18889
18889
|
}), va(t, "onChange", function(m) {
|
|
18890
|
-
var _ = t.props, E = _.defaultCountry, B = _.onChange, x = _.addInternationalOption, k = _.international, $ = _.limitMaxLength, O = _.countryCallingCodeEditable, L = _.metadata,
|
|
18890
|
+
var _ = t.props, E = _.defaultCountry, B = _.onChange, x = _.addInternationalOption, k = _.international, $ = _.limitMaxLength, O = _.countryCallingCodeEditable, L = _.metadata, z = t.state, V = z.countries, K = z.phoneDigits, j = z.country, rr = z.latestCountrySelectedByUser, Y = ZR(m, {
|
|
18891
18891
|
prevPhoneDigits: K,
|
|
18892
18892
|
country: j,
|
|
18893
18893
|
countryRequired: !x,
|
|
@@ -18895,10 +18895,10 @@ var QR = /* @__PURE__ */ function(r) {
|
|
|
18895
18895
|
latestCountrySelectedByUser: rr,
|
|
18896
18896
|
getAnyCountry: function() {
|
|
18897
18897
|
return t.getFirstSupportedCountry({
|
|
18898
|
-
countries:
|
|
18898
|
+
countries: V
|
|
18899
18899
|
});
|
|
18900
18900
|
},
|
|
18901
|
-
countries:
|
|
18901
|
+
countries: V,
|
|
18902
18902
|
international: k,
|
|
18903
18903
|
limitMaxLength: $,
|
|
18904
18904
|
countryCallingCodeEditable: O,
|
|
@@ -19057,13 +19057,13 @@ var QR = /* @__PURE__ */ function(r) {
|
|
|
19057
19057
|
t.flags, t.flagComponent, t.flagUrl, t.addInternationalOption, t.internationalIcon, t.displayInitialValueAsLocalNumber, t.initialValueFormat, t.onCountryChange, t.limitMaxLength, t.countryCallingCodeEditable, t.focusInputOnCountrySelection, t.reset;
|
|
19058
19058
|
var E = t.metadata, B = t.international;
|
|
19059
19059
|
t.locales;
|
|
19060
|
-
var x = DR(t, VR), k = this.state, $ = k.country, O = k.countries, L = k.phoneDigits,
|
|
19060
|
+
var x = DR(t, VR), k = this.state, $ = k.country, O = k.countries, L = k.phoneDigits, z = k.isFocused, V = h ? Lx : Jx, K = this.getCountrySelectOptions({
|
|
19061
19061
|
countries: O
|
|
19062
19062
|
});
|
|
19063
19063
|
return /* @__PURE__ */ G.createElement(b, Ci({
|
|
19064
19064
|
style: f,
|
|
19065
19065
|
className: KA(s, "PhoneInput", {
|
|
19066
|
-
"PhoneInput--focus":
|
|
19066
|
+
"PhoneInput--focus": z,
|
|
19067
19067
|
"PhoneInput--disabled": i,
|
|
19068
19068
|
"PhoneInput--readOnly": o
|
|
19069
19069
|
})
|
|
@@ -19079,7 +19079,7 @@ var QR = /* @__PURE__ */ function(r) {
|
|
|
19079
19079
|
disabled: i || p && p.disabled,
|
|
19080
19080
|
readOnly: o || p && p.readOnly,
|
|
19081
19081
|
iconComponent: this.CountryIcon
|
|
19082
|
-
})), /* @__PURE__ */ G.createElement(
|
|
19082
|
+
})), /* @__PURE__ */ G.createElement(V, Ci({
|
|
19083
19083
|
ref: this.setInputRef,
|
|
19084
19084
|
type: "tel",
|
|
19085
19085
|
autoComplete: A
|
|
@@ -20079,8 +20079,8 @@ var oZ = { exports: {} };
|
|
|
20079
20079
|
});
|
|
20080
20080
|
var O = Object.getPrototypeOf, L = O && O(O(P([])));
|
|
20081
20081
|
L && L !== t && n.call(L, f) && ($ = L);
|
|
20082
|
-
var
|
|
20083
|
-
x.prototype = k, i(
|
|
20082
|
+
var z = k.prototype = B.prototype = Object.create($);
|
|
20083
|
+
x.prototype = k, i(z, "constructor", { value: k, configurable: !0 }), i(
|
|
20084
20084
|
k,
|
|
20085
20085
|
"constructor",
|
|
20086
20086
|
{ value: x, configurable: !0 }
|
|
@@ -20089,7 +20089,7 @@ var oZ = { exports: {} };
|
|
|
20089
20089
|
u,
|
|
20090
20090
|
"GeneratorFunction"
|
|
20091
20091
|
);
|
|
20092
|
-
function
|
|
20092
|
+
function V(w) {
|
|
20093
20093
|
["next", "throw", "return"].forEach(function(g) {
|
|
20094
20094
|
c(w, g, function(y) {
|
|
20095
20095
|
return this._invoke(g, y);
|
|
@@ -20102,33 +20102,33 @@ var oZ = { exports: {} };
|
|
|
20102
20102
|
// do is to check its .name property.
|
|
20103
20103
|
(g.displayName || g.name) === "GeneratorFunction" : !1;
|
|
20104
20104
|
}, a.mark = function(w) {
|
|
20105
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(w, k) : (w.__proto__ = k, c(w, u, "GeneratorFunction")), w.prototype = Object.create(
|
|
20105
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(w, k) : (w.__proto__ = k, c(w, u, "GeneratorFunction")), w.prototype = Object.create(z), w;
|
|
20106
20106
|
}, a.awrap = function(w) {
|
|
20107
20107
|
return { __await: w };
|
|
20108
20108
|
};
|
|
20109
20109
|
function K(w, g) {
|
|
20110
|
-
function y(I, F,
|
|
20111
|
-
var
|
|
20112
|
-
if (
|
|
20113
|
-
S(
|
|
20110
|
+
function y(I, F, D, S) {
|
|
20111
|
+
var J = d(w[I], w, F);
|
|
20112
|
+
if (J.type === "throw")
|
|
20113
|
+
S(J.arg);
|
|
20114
20114
|
else {
|
|
20115
|
-
var ar =
|
|
20115
|
+
var ar = J.arg, q = ar.value;
|
|
20116
20116
|
return q && typeof q == "object" && n.call(q, "__await") ? g.resolve(q.__await).then(function(er) {
|
|
20117
|
-
y("next", er,
|
|
20117
|
+
y("next", er, D, S);
|
|
20118
20118
|
}, function(er) {
|
|
20119
|
-
y("throw", er,
|
|
20119
|
+
y("throw", er, D, S);
|
|
20120
20120
|
}) : g.resolve(q).then(function(er) {
|
|
20121
|
-
ar.value = er,
|
|
20121
|
+
ar.value = er, D(ar);
|
|
20122
20122
|
}, function(er) {
|
|
20123
|
-
return y("throw", er,
|
|
20123
|
+
return y("throw", er, D, S);
|
|
20124
20124
|
});
|
|
20125
20125
|
}
|
|
20126
20126
|
}
|
|
20127
20127
|
var N;
|
|
20128
20128
|
function R(I, F) {
|
|
20129
|
-
function
|
|
20130
|
-
return new g(function(S,
|
|
20131
|
-
y(I, F, S,
|
|
20129
|
+
function D() {
|
|
20130
|
+
return new g(function(S, J) {
|
|
20131
|
+
y(I, F, S, J);
|
|
20132
20132
|
});
|
|
20133
20133
|
}
|
|
20134
20134
|
return N = // If enqueue has been called before, then we want to wait until
|
|
@@ -20144,15 +20144,15 @@ var oZ = { exports: {} };
|
|
|
20144
20144
|
// async functions in terms of async generators, it is especially
|
|
20145
20145
|
// important to get this right, even though it requires care.
|
|
20146
20146
|
N ? N.then(
|
|
20147
|
-
|
|
20147
|
+
D,
|
|
20148
20148
|
// Avoid propagating failures to Promises returned by later
|
|
20149
20149
|
// invocations of the iterator.
|
|
20150
|
-
|
|
20151
|
-
) :
|
|
20150
|
+
D
|
|
20151
|
+
) : D();
|
|
20152
20152
|
}
|
|
20153
20153
|
i(this, "_invoke", { value: R });
|
|
20154
20154
|
}
|
|
20155
|
-
|
|
20155
|
+
V(K.prototype), c(K.prototype, s, function() {
|
|
20156
20156
|
return this;
|
|
20157
20157
|
}), a.AsyncIterator = K, a.async = function(w, g, y, N, R) {
|
|
20158
20158
|
R === void 0 && (R = Promise);
|
|
@@ -20175,9 +20175,9 @@ var oZ = { exports: {} };
|
|
|
20175
20175
|
return v();
|
|
20176
20176
|
}
|
|
20177
20177
|
for (y.method = I, y.arg = F; ; ) {
|
|
20178
|
-
var
|
|
20179
|
-
if (
|
|
20180
|
-
var S = rr(
|
|
20178
|
+
var D = y.delegate;
|
|
20179
|
+
if (D) {
|
|
20180
|
+
var S = rr(D, y);
|
|
20181
20181
|
if (S) {
|
|
20182
20182
|
if (S === E) continue;
|
|
20183
20183
|
return S;
|
|
@@ -20191,15 +20191,15 @@ var oZ = { exports: {} };
|
|
|
20191
20191
|
y.dispatchException(y.arg);
|
|
20192
20192
|
} else y.method === "return" && y.abrupt("return", y.arg);
|
|
20193
20193
|
N = m;
|
|
20194
|
-
var
|
|
20195
|
-
if (
|
|
20196
|
-
if (N = y.done ? _ : b,
|
|
20194
|
+
var J = d(w, g, y);
|
|
20195
|
+
if (J.type === "normal") {
|
|
20196
|
+
if (N = y.done ? _ : b, J.arg === E)
|
|
20197
20197
|
continue;
|
|
20198
20198
|
return {
|
|
20199
|
-
value:
|
|
20199
|
+
value: J.arg,
|
|
20200
20200
|
done: y.done
|
|
20201
20201
|
};
|
|
20202
|
-
} else
|
|
20202
|
+
} else J.type === "throw" && (N = _, y.method = "throw", y.arg = J.arg);
|
|
20203
20203
|
}
|
|
20204
20204
|
};
|
|
20205
20205
|
}
|
|
@@ -20221,9 +20221,9 @@ var oZ = { exports: {} };
|
|
|
20221
20221
|
return I;
|
|
20222
20222
|
return g.delegate = null, E;
|
|
20223
20223
|
}
|
|
20224
|
-
|
|
20224
|
+
V(z), c(z, u, "Generator"), c(z, f, function() {
|
|
20225
20225
|
return this;
|
|
20226
|
-
}), c(
|
|
20226
|
+
}), c(z, "toString", function() {
|
|
20227
20227
|
return "[object Generator]";
|
|
20228
20228
|
});
|
|
20229
20229
|
function Y(w) {
|
|
@@ -20291,16 +20291,16 @@ var oZ = { exports: {} };
|
|
|
20291
20291
|
if (this.done)
|
|
20292
20292
|
throw w;
|
|
20293
20293
|
var g = this;
|
|
20294
|
-
function y(S,
|
|
20295
|
-
return I.type = "throw", I.arg = w, g.next = S,
|
|
20294
|
+
function y(S, J) {
|
|
20295
|
+
return I.type = "throw", I.arg = w, g.next = S, J && (g.method = "next", g.arg = o), !!J;
|
|
20296
20296
|
}
|
|
20297
20297
|
for (var N = this.tryEntries.length - 1; N >= 0; --N) {
|
|
20298
20298
|
var R = this.tryEntries[N], I = R.completion;
|
|
20299
20299
|
if (R.tryLoc === "root")
|
|
20300
20300
|
return y("end");
|
|
20301
20301
|
if (R.tryLoc <= this.prev) {
|
|
20302
|
-
var F = n.call(R, "catchLoc"),
|
|
20303
|
-
if (F &&
|
|
20302
|
+
var F = n.call(R, "catchLoc"), D = n.call(R, "finallyLoc");
|
|
20303
|
+
if (F && D) {
|
|
20304
20304
|
if (this.prev < R.catchLoc)
|
|
20305
20305
|
return y(R.catchLoc, !0);
|
|
20306
20306
|
if (this.prev < R.finallyLoc)
|
|
@@ -20308,7 +20308,7 @@ var oZ = { exports: {} };
|
|
|
20308
20308
|
} else if (F) {
|
|
20309
20309
|
if (this.prev < R.catchLoc)
|
|
20310
20310
|
return y(R.catchLoc, !0);
|
|
20311
|
-
} else if (
|
|
20311
|
+
} else if (D) {
|
|
20312
20312
|
if (this.prev < R.finallyLoc)
|
|
20313
20313
|
return y(R.finallyLoc);
|
|
20314
20314
|
} else
|
|
@@ -20587,7 +20587,7 @@ var Cm = async (r = "eng", e = wn.LSTM_ONLY, a = {}, t = {}) => {
|
|
|
20587
20587
|
id: w,
|
|
20588
20588
|
action: "FS",
|
|
20589
20589
|
payload: { method: P, args: v }
|
|
20590
|
-
})),
|
|
20590
|
+
})), z = (P, v) => E(Pa({
|
|
20591
20591
|
id: v,
|
|
20592
20592
|
action: "loadLanguage",
|
|
20593
20593
|
payload: {
|
|
@@ -20601,7 +20601,7 @@ var Cm = async (r = "eng", e = wn.LSTM_ONLY, a = {}, t = {}) => {
|
|
|
20601
20601
|
lstmOnly: [wn.DEFAULT, wn.LSTM_ONLY].includes(u) && !A.legacyLang
|
|
20602
20602
|
}
|
|
20603
20603
|
}
|
|
20604
|
-
})),
|
|
20604
|
+
})), V = (P, v, w, g) => E(Pa({
|
|
20605
20605
|
id: g,
|
|
20606
20606
|
action: "initialize",
|
|
20607
20607
|
payload: { langs: P, oem: v, config: w }
|
|
@@ -20612,7 +20612,7 @@ var Cm = async (r = "eng", e = wn.LSTM_ONLY, a = {}, t = {}) => {
|
|
|
20612
20612
|
const N = w || c;
|
|
20613
20613
|
c = N;
|
|
20614
20614
|
const I = (typeof P == "string" ? P.split("+") : P).filter((F) => !s.includes(F));
|
|
20615
|
-
return s.push(...I), I.length > 0 ?
|
|
20615
|
+
return s.push(...I), I.length > 0 ? z(I, g).then(() => V(P, y, N, g)) : V(P, y, N, g);
|
|
20616
20616
|
}, j = (P = {}, v) => E(Pa({
|
|
20617
20617
|
id: v,
|
|
20618
20618
|
action: "setParameters",
|
|
@@ -20662,7 +20662,7 @@ var Cm = async (r = "eng", e = wn.LSTM_ONLY, a = {}, t = {}) => {
|
|
|
20662
20662
|
detect: Y,
|
|
20663
20663
|
terminate: or
|
|
20664
20664
|
};
|
|
20665
|
-
return x().then(() =>
|
|
20665
|
+
return x().then(() => z(r)).then(() => V(r, e, t)).then(() => p(Q)).catch(() => {
|
|
20666
20666
|
}), b;
|
|
20667
20667
|
};
|
|
20668
20668
|
const _m = Cm, MZ = async (r, e, a) => {
|
|
@@ -24570,15 +24570,15 @@ const vb = new BS(), IS = (r, e, a, t, n, i, o) => {
|
|
|
24570
24570
|
if (!(!a.current || b.current)) {
|
|
24571
24571
|
b.current = !0;
|
|
24572
24572
|
try {
|
|
24573
|
-
const L = a.current,
|
|
24574
|
-
if (!
|
|
24575
|
-
const K = L.getBoundingClientRect(), j =
|
|
24573
|
+
const L = a.current, z = L.videoWidth, V = L.videoHeight;
|
|
24574
|
+
if (!z || !V) return;
|
|
24575
|
+
const K = L.getBoundingClientRect(), j = z / K.width, rr = V / K.height;
|
|
24576
24576
|
let Y = c.x * j, or = c.y * rr, Q = c.w * j, P = c.h * rr;
|
|
24577
24577
|
const v = 800, w = Q > v ? v / Q : 1, g = Q * w, y = P * w, N = document.createElement("canvas");
|
|
24578
24578
|
N.width = g, N.height = y, N.getContext("2d").drawImage(L, Y, or, Q, P, 0, 0, g, y);
|
|
24579
24579
|
const I = await new Promise((S) => N.toBlob(S, "image/jpeg")), F = new File([I], "frame.jpg", { type: "image/jpeg" });
|
|
24580
|
-
let
|
|
24581
|
-
r === "selfie" ?
|
|
24580
|
+
let D;
|
|
24581
|
+
r === "selfie" ? D = await vb.validateFace(F) : D = await vb.validateIdCard(F, o), p(D.passed), D.passed && (E.current = 1500);
|
|
24582
24582
|
} catch {
|
|
24583
24583
|
p(!1);
|
|
24584
24584
|
} finally {
|
|
@@ -24589,12 +24589,12 @@ const vb = new BS(), IS = (r, e, a, t, n, i, o) => {
|
|
|
24589
24589
|
ge(() => {
|
|
24590
24590
|
if (!A || !a.current) return;
|
|
24591
24591
|
let L;
|
|
24592
|
-
const
|
|
24593
|
-
let
|
|
24592
|
+
const z = 500;
|
|
24593
|
+
let V = 0;
|
|
24594
24594
|
const K = (j) => {
|
|
24595
|
-
if (L = requestAnimationFrame(K), !(j -
|
|
24596
|
-
if (
|
|
24597
|
-
E.current -=
|
|
24595
|
+
if (L = requestAnimationFrame(K), !(j - V < z)) {
|
|
24596
|
+
if (V = j, E.current > 0) {
|
|
24597
|
+
E.current -= z;
|
|
24598
24598
|
return;
|
|
24599
24599
|
}
|
|
24600
24600
|
x();
|
|
@@ -24639,28 +24639,28 @@ const vb = new BS(), IS = (r, e, a, t, n, i, o) => {
|
|
|
24639
24639
|
A && (A.getTracks().forEach((L) => L.stop()), f(null));
|
|
24640
24640
|
}, [A]), O = z0(async () => {
|
|
24641
24641
|
if (!a.current || !t.current) return;
|
|
24642
|
-
const L = a.current,
|
|
24643
|
-
if (!
|
|
24642
|
+
const L = a.current, z = t.current, V = z.getContext("2d");
|
|
24643
|
+
if (!V) return;
|
|
24644
24644
|
const K = L.videoWidth, j = L.videoHeight;
|
|
24645
|
-
|
|
24646
|
-
const rr = await new Promise((or, Q) =>
|
|
24645
|
+
z.width = K, z.height = j, V.drawImage(L, 0, 0, K, j);
|
|
24646
|
+
const rr = await new Promise((or, Q) => z.toBlob((P) => P ? or(P) : Q(), "image/jpeg")), Y = new File([rr], `${r}-${Date.now()}.jpg`, { type: "image/jpeg" });
|
|
24647
24647
|
u(Y), $();
|
|
24648
24648
|
}, [r, $]);
|
|
24649
24649
|
return ge(() => (!s && !A && k(), () => $()), [s, A, k, $]), ge(() => {
|
|
24650
24650
|
if (!n.current || !i.current) return;
|
|
24651
24651
|
const L = () => {
|
|
24652
|
-
const
|
|
24652
|
+
const V = n.current.getBoundingClientRect(), K = i.current.getBoundingClientRect();
|
|
24653
24653
|
h({
|
|
24654
|
-
x: Math.round(K.left -
|
|
24655
|
-
y: Math.round(K.top -
|
|
24654
|
+
x: Math.round(K.left - V.left),
|
|
24655
|
+
y: Math.round(K.top - V.top),
|
|
24656
24656
|
w: Math.round(K.width),
|
|
24657
24657
|
h: Math.round(K.height)
|
|
24658
24658
|
});
|
|
24659
24659
|
};
|
|
24660
24660
|
L();
|
|
24661
|
-
const
|
|
24662
|
-
return
|
|
24663
|
-
|
|
24661
|
+
const z = new ResizeObserver(L);
|
|
24662
|
+
return z.observe(i.current), z.observe(n.current), window.addEventListener("resize", L), window.addEventListener("scroll", L, !0), () => {
|
|
24663
|
+
z.disconnect(), window.removeEventListener("resize", L), window.removeEventListener("scroll", L, !0);
|
|
24664
24664
|
};
|
|
24665
24665
|
}, [e, A]), {
|
|
24666
24666
|
stream: A,
|
|
@@ -24704,7 +24704,7 @@ const xS = {
|
|
|
24704
24704
|
u,
|
|
24705
24705
|
c,
|
|
24706
24706
|
A
|
|
24707
|
-
), [k, $] = e0(!1), [O, L] = e0(!1),
|
|
24707
|
+
), [k, $] = e0(!1), [O, L] = e0(!1), z = !!d, V = () => {
|
|
24708
24708
|
b(null), t();
|
|
24709
24709
|
}, K = () => {
|
|
24710
24710
|
b(null), e();
|
|
@@ -24727,7 +24727,7 @@ const xS = {
|
|
|
24727
24727
|
{
|
|
24728
24728
|
title: `Review ${v}`,
|
|
24729
24729
|
subTitle: "Make sure the information is seen clearly, with no blur or glare.",
|
|
24730
|
-
onBack:
|
|
24730
|
+
onBack: V
|
|
24731
24731
|
}
|
|
24732
24732
|
),
|
|
24733
24733
|
/* @__PURE__ */ l("div", { className: "mb-8", children: /* @__PURE__ */ l("div", { className: "relative", children: E && /* @__PURE__ */ l(
|
|
@@ -24748,7 +24748,7 @@ const xS = {
|
|
|
24748
24748
|
] }) });
|
|
24749
24749
|
};
|
|
24750
24750
|
return p ? P() : /* @__PURE__ */ X(Ae, { className: "relative w-full max-w-md mx-auto bg-gray-900 border-gray-900 overflow-hidden", children: [
|
|
24751
|
-
|
|
24751
|
+
z && /* @__PURE__ */ l(
|
|
24752
24752
|
"video",
|
|
24753
24753
|
{
|
|
24754
24754
|
ref: f,
|
|
@@ -24769,13 +24769,13 @@ const xS = {
|
|
|
24769
24769
|
/* @__PURE__ */ l("canvas", { ref: s, className: "hidden" }),
|
|
24770
24770
|
/* @__PURE__ */ X(fe, { className: "relative z-10 text-white flex flex-col h-full", children: [
|
|
24771
24771
|
/* @__PURE__ */ X("div", { className: "flex items-center p-6", children: [
|
|
24772
|
-
/* @__PURE__ */ l(x0, { variant: "ghost", size: "sm", onClick:
|
|
24772
|
+
/* @__PURE__ */ l(x0, { variant: "ghost", size: "sm", onClick: V, className: "text-white hover:bg-gray-600", children: /* @__PURE__ */ l(S6, { className: "h-6 w-6" }) }),
|
|
24773
24773
|
/* @__PURE__ */ l("h1", { className: "text-xl font-semibold ml-4", children: n })
|
|
24774
24774
|
] }),
|
|
24775
24775
|
/* @__PURE__ */ l("div", { className: "px-6 mb-8", children: /* @__PURE__ */ l("p", { className: "text-gray-300 text-center", children: i }) }),
|
|
24776
24776
|
/* @__PURE__ */ X("div", { className: "flex-1 flex flex-col items-center justify-center px-6", children: [
|
|
24777
24777
|
/* @__PURE__ */ X("div", { className: "relative mb-16", children: [
|
|
24778
|
-
|
|
24778
|
+
z ? /* @__PURE__ */ l(
|
|
24779
24779
|
"div",
|
|
24780
24780
|
{
|
|
24781
24781
|
ref: c,
|
|
@@ -24808,7 +24808,7 @@ const xS = {
|
|
|
24808
24808
|
onClick: rr,
|
|
24809
24809
|
size: "lg",
|
|
24810
24810
|
className: "w-16 h-16 rounded-full bg-white hover:bg-gray-100 border-4 border-gray-600 p-0",
|
|
24811
|
-
disabled: !
|
|
24811
|
+
disabled: !z || k || !x,
|
|
24812
24812
|
children: /* @__PURE__ */ l("div", { className: "w-8 h-8 rounded-full bg-white" })
|
|
24813
24813
|
}
|
|
24814
24814
|
)
|
|
@@ -25452,8 +25452,8 @@ function kW(r) {
|
|
|
25452
25452
|
return !1;
|
|
25453
25453
|
if (!t.current && "changedTouches" in b && (B || x) && (t.current = k), !k)
|
|
25454
25454
|
return !0;
|
|
25455
|
-
var
|
|
25456
|
-
return pW(
|
|
25455
|
+
var z = t.current || k;
|
|
25456
|
+
return pW(z, m, b, z === "h" ? B : x);
|
|
25457
25457
|
}, []), f = C.useCallback(function(b) {
|
|
25458
25458
|
var m = b;
|
|
25459
25459
|
if (!(!bi.length || bi[bi.length - 1] !== i)) {
|
|
@@ -25538,7 +25538,7 @@ var _W = [" ", "Enter", "ArrowUp", "ArrowDown"], BW = [" ", "Enter"], Kn = "Sele
|
|
|
25538
25538
|
defaultProp: n ?? !1,
|
|
25539
25539
|
onChange: i,
|
|
25540
25540
|
caller: Kn
|
|
25541
|
-
}), [
|
|
25541
|
+
}), [z, V] = WA({
|
|
25542
25542
|
prop: o,
|
|
25543
25543
|
defaultProp: A,
|
|
25544
25544
|
onChange: f,
|
|
@@ -25556,8 +25556,8 @@ var _W = [" ", "Enter", "ArrowUp", "ArrowDown"], BW = [" ", "Enter"], Kn = "Sele
|
|
|
25556
25556
|
valueNodeHasChildren: x,
|
|
25557
25557
|
onValueNodeHasChildrenChange: k,
|
|
25558
25558
|
contentId: wf(),
|
|
25559
|
-
value:
|
|
25560
|
-
onValueChange:
|
|
25559
|
+
value: z,
|
|
25560
|
+
onValueChange: V,
|
|
25561
25561
|
open: O,
|
|
25562
25562
|
onOpenChange: L,
|
|
25563
25563
|
dir: $,
|
|
@@ -25588,12 +25588,12 @@ var _W = [" ", "Enter", "ArrowUp", "ArrowDown"], BW = [" ", "Enter"], Kn = "Sele
|
|
|
25588
25588
|
tabIndex: -1,
|
|
25589
25589
|
name: u,
|
|
25590
25590
|
autoComplete: c,
|
|
25591
|
-
value:
|
|
25592
|
-
onChange: (Q) =>
|
|
25591
|
+
value: z,
|
|
25592
|
+
onChange: (Q) => V(Q.target.value),
|
|
25593
25593
|
disabled: h,
|
|
25594
25594
|
form: p,
|
|
25595
25595
|
children: [
|
|
25596
|
-
|
|
25596
|
+
z === void 0 ? /* @__PURE__ */ l("option", { value: "" }) : null,
|
|
25597
25597
|
Array.from(rr)
|
|
25598
25598
|
]
|
|
25599
25599
|
},
|
|
@@ -25712,7 +25712,7 @@ var ga = 10, [Mp, pn] = Z2(qn), SW = "SelectContentImpl", WW = /* @__PURE__ */ X
|
|
|
25712
25712
|
avoidCollisions: m,
|
|
25713
25713
|
//
|
|
25714
25714
|
..._
|
|
25715
|
-
} = r, E = vn(qn, a), [B, x] = C.useState(null), [k, $] = C.useState(null), O = R0(e, (S) => x(S)), [L,
|
|
25715
|
+
} = r, E = vn(qn, a), [B, x] = C.useState(null), [k, $] = C.useState(null), O = R0(e, (S) => x(S)), [L, z] = C.useState(null), [V, K] = C.useState(
|
|
25716
25716
|
null
|
|
25717
25717
|
), j = ws(a), [rr, Y] = C.useState(!1), or = C.useRef(!1);
|
|
25718
25718
|
C.useEffect(() => {
|
|
@@ -25720,9 +25720,9 @@ var ga = 10, [Mp, pn] = Z2(qn), SW = "SelectContentImpl", WW = /* @__PURE__ */ X
|
|
|
25720
25720
|
}, [B]), kp();
|
|
25721
25721
|
const Q = C.useCallback(
|
|
25722
25722
|
(S) => {
|
|
25723
|
-
const [
|
|
25723
|
+
const [J, ...ar] = j().map((T) => T.ref.current), [q] = ar.slice(-1), er = document.activeElement;
|
|
25724
25724
|
for (const T of S)
|
|
25725
|
-
if (T === er || (T == null || T.scrollIntoView({ block: "nearest" }), T ===
|
|
25725
|
+
if (T === er || (T == null || T.scrollIntoView({ block: "nearest" }), T === J && k && (k.scrollTop = 0), T === q && k && (k.scrollTop = k.scrollHeight), T == null || T.focus(), document.activeElement !== er)) return;
|
|
25726
25726
|
},
|
|
25727
25727
|
[j, k]
|
|
25728
25728
|
), P = C.useCallback(
|
|
@@ -25736,17 +25736,17 @@ var ga = 10, [Mp, pn] = Z2(qn), SW = "SelectContentImpl", WW = /* @__PURE__ */ X
|
|
|
25736
25736
|
C.useEffect(() => {
|
|
25737
25737
|
if (B) {
|
|
25738
25738
|
let S = { x: 0, y: 0 };
|
|
25739
|
-
const
|
|
25739
|
+
const J = (q) => {
|
|
25740
25740
|
var er, T;
|
|
25741
25741
|
S = {
|
|
25742
25742
|
x: Math.abs(Math.round(q.pageX) - (((er = w.current) == null ? void 0 : er.x) ?? 0)),
|
|
25743
25743
|
y: Math.abs(Math.round(q.pageY) - (((T = w.current) == null ? void 0 : T.y) ?? 0))
|
|
25744
25744
|
};
|
|
25745
25745
|
}, ar = (q) => {
|
|
25746
|
-
S.x <= 10 && S.y <= 10 ? q.preventDefault() : B.contains(q.target) || v(!1), document.removeEventListener("pointermove",
|
|
25746
|
+
S.x <= 10 && S.y <= 10 ? q.preventDefault() : B.contains(q.target) || v(!1), document.removeEventListener("pointermove", J), w.current = null;
|
|
25747
25747
|
};
|
|
25748
|
-
return w.current !== null && (document.addEventListener("pointermove",
|
|
25749
|
-
document.removeEventListener("pointermove",
|
|
25748
|
+
return w.current !== null && (document.addEventListener("pointermove", J), document.addEventListener("pointerup", ar, { capture: !0, once: !0 })), () => {
|
|
25749
|
+
document.removeEventListener("pointermove", J), document.removeEventListener("pointerup", ar, { capture: !0 });
|
|
25750
25750
|
};
|
|
25751
25751
|
}
|
|
25752
25752
|
}, [B, v, w]), C.useEffect(() => {
|
|
@@ -25756,21 +25756,21 @@ var ga = 10, [Mp, pn] = Z2(qn), SW = "SelectContentImpl", WW = /* @__PURE__ */ X
|
|
|
25756
25756
|
};
|
|
25757
25757
|
}, [v]);
|
|
25758
25758
|
const [g, y] = ig((S) => {
|
|
25759
|
-
const
|
|
25759
|
+
const J = j().filter((er) => !er.disabled), ar = J.find((er) => er.ref.current === document.activeElement), q = og(J, S, ar);
|
|
25760
25760
|
q && setTimeout(() => q.ref.current.focus());
|
|
25761
25761
|
}), N = C.useCallback(
|
|
25762
|
-
(S,
|
|
25762
|
+
(S, J, ar) => {
|
|
25763
25763
|
const q = !or.current && !ar;
|
|
25764
|
-
(E.value !== void 0 && E.value ===
|
|
25764
|
+
(E.value !== void 0 && E.value === J || q) && (z(S), q && (or.current = !0));
|
|
25765
25765
|
},
|
|
25766
25766
|
[E.value]
|
|
25767
25767
|
), R = C.useCallback(() => B == null ? void 0 : B.focus(), [B]), I = C.useCallback(
|
|
25768
|
-
(S,
|
|
25768
|
+
(S, J, ar) => {
|
|
25769
25769
|
const q = !or.current && !ar;
|
|
25770
|
-
(E.value !== void 0 && E.value ===
|
|
25770
|
+
(E.value !== void 0 && E.value === J || q) && K(S);
|
|
25771
25771
|
},
|
|
25772
25772
|
[E.value]
|
|
25773
|
-
), F = t === "popper" ? Ku : Xp,
|
|
25773
|
+
), F = t === "popper" ? Ku : Xp, D = F === Ku ? {
|
|
25774
25774
|
side: A,
|
|
25775
25775
|
sideOffset: f,
|
|
25776
25776
|
align: s,
|
|
@@ -25794,7 +25794,7 @@ var ga = 10, [Mp, pn] = Z2(qn), SW = "SelectContentImpl", WW = /* @__PURE__ */ X
|
|
|
25794
25794
|
onItemLeave: R,
|
|
25795
25795
|
itemTextRefCallback: I,
|
|
25796
25796
|
focusSelectedItem: P,
|
|
25797
|
-
selectedItemText:
|
|
25797
|
+
selectedItemText: V,
|
|
25798
25798
|
position: t,
|
|
25799
25799
|
isPositioned: rr,
|
|
25800
25800
|
searchRef: g,
|
|
@@ -25807,8 +25807,8 @@ var ga = 10, [Mp, pn] = Z2(qn), SW = "SelectContentImpl", WW = /* @__PURE__ */ X
|
|
|
25807
25807
|
S.preventDefault();
|
|
25808
25808
|
},
|
|
25809
25809
|
onUnmountAutoFocus: Mr(n, (S) => {
|
|
25810
|
-
var
|
|
25811
|
-
(
|
|
25810
|
+
var J;
|
|
25811
|
+
(J = E.trigger) == null || J.focus({ preventScroll: !0 }), S.preventDefault();
|
|
25812
25812
|
}),
|
|
25813
25813
|
children: /* @__PURE__ */ l(
|
|
25814
25814
|
So,
|
|
@@ -25828,7 +25828,7 @@ var ga = 10, [Mp, pn] = Z2(qn), SW = "SelectContentImpl", WW = /* @__PURE__ */ X
|
|
|
25828
25828
|
dir: E.dir,
|
|
25829
25829
|
onContextMenu: (S) => S.preventDefault(),
|
|
25830
25830
|
..._,
|
|
25831
|
-
...
|
|
25831
|
+
...D,
|
|
25832
25832
|
onPlaced: () => Y(!0),
|
|
25833
25833
|
ref: O,
|
|
25834
25834
|
style: {
|
|
@@ -25840,8 +25840,8 @@ var ga = 10, [Mp, pn] = Z2(qn), SW = "SelectContentImpl", WW = /* @__PURE__ */ X
|
|
|
25840
25840
|
..._.style
|
|
25841
25841
|
},
|
|
25842
25842
|
onKeyDown: Mr(_.onKeyDown, (S) => {
|
|
25843
|
-
const
|
|
25844
|
-
if (S.key === "Tab" && S.preventDefault(), !
|
|
25843
|
+
const J = S.ctrlKey || S.altKey || S.metaKey;
|
|
25844
|
+
if (S.key === "Tab" && S.preventDefault(), !J && S.key.length === 1 && y(S.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(S.key)) {
|
|
25845
25845
|
let q = j().filter((er) => !er.disabled).map((er) => er.ref.current);
|
|
25846
25846
|
if (["ArrowUp", "End"].includes(S.key) && (q = q.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(S.key)) {
|
|
25847
25847
|
const er = S.target, T = q.indexOf(er);
|
|
@@ -25864,9 +25864,9 @@ Gp.displayName = SW;
|
|
|
25864
25864
|
var TW = "SelectItemAlignedPosition", Xp = C.forwardRef((r, e) => {
|
|
25865
25865
|
const { __scopeSelect: a, onPlaced: t, ...n } = r, i = vn(qn, a), o = pn(qn, a), [A, f] = C.useState(null), [s, u] = C.useState(null), c = R0(e, (O) => u(O)), h = ws(a), d = C.useRef(!1), p = C.useRef(!0), { viewport: b, selectedItem: m, selectedItemText: _, focusSelectedItem: E } = o, B = C.useCallback(() => {
|
|
25866
25866
|
if (i.trigger && i.valueNode && A && s && b && m && _) {
|
|
25867
|
-
const O = i.trigger.getBoundingClientRect(), L = s.getBoundingClientRect(),
|
|
25867
|
+
const O = i.trigger.getBoundingClientRect(), L = s.getBoundingClientRect(), z = i.valueNode.getBoundingClientRect(), V = _.getBoundingClientRect();
|
|
25868
25868
|
if (i.dir !== "rtl") {
|
|
25869
|
-
const er =
|
|
25869
|
+
const er = V.left - L.left, T = z.left - er, fr = O.left - T, Zr = O.width + fr, Tr = Math.max(Zr, L.width), Fr = window.innerWidth - ga, Ir = pb(T, [
|
|
25870
25870
|
ga,
|
|
25871
25871
|
// Prevents the content from going off the starting edge of the
|
|
25872
25872
|
// viewport. It may still go off the ending edge, but this can be
|
|
@@ -25877,21 +25877,21 @@ var TW = "SelectItemAlignedPosition", Xp = C.forwardRef((r, e) => {
|
|
|
25877
25877
|
]);
|
|
25878
25878
|
A.style.minWidth = Zr + "px", A.style.left = Ir + "px";
|
|
25879
25879
|
} else {
|
|
25880
|
-
const er = L.right -
|
|
25880
|
+
const er = L.right - V.right, T = window.innerWidth - z.right - er, fr = window.innerWidth - O.right - T, Zr = O.width + fr, Tr = Math.max(Zr, L.width), Fr = window.innerWidth - ga, Ir = pb(T, [
|
|
25881
25881
|
ga,
|
|
25882
25882
|
Math.max(ga, Fr - Tr)
|
|
25883
25883
|
]);
|
|
25884
25884
|
A.style.minWidth = Zr + "px", A.style.right = Ir + "px";
|
|
25885
25885
|
}
|
|
25886
|
-
const K = h(), j = window.innerHeight - ga * 2, rr = b.scrollHeight, Y = window.getComputedStyle(s), or = parseInt(Y.borderTopWidth, 10), Q = parseInt(Y.paddingTop, 10), P = parseInt(Y.borderBottomWidth, 10), v = parseInt(Y.paddingBottom, 10), w = or + Q + rr + v + P, g = Math.min(m.offsetHeight * 5, w), y = window.getComputedStyle(b), N = parseInt(y.paddingTop, 10), R = parseInt(y.paddingBottom, 10), I = O.top + O.height / 2 - ga, F = j - I,
|
|
25887
|
-
if (
|
|
25886
|
+
const K = h(), j = window.innerHeight - ga * 2, rr = b.scrollHeight, Y = window.getComputedStyle(s), or = parseInt(Y.borderTopWidth, 10), Q = parseInt(Y.paddingTop, 10), P = parseInt(Y.borderBottomWidth, 10), v = parseInt(Y.paddingBottom, 10), w = or + Q + rr + v + P, g = Math.min(m.offsetHeight * 5, w), y = window.getComputedStyle(b), N = parseInt(y.paddingTop, 10), R = parseInt(y.paddingBottom, 10), I = O.top + O.height / 2 - ga, F = j - I, D = m.offsetHeight / 2, S = m.offsetTop + D, J = or + Q + S, ar = w - J;
|
|
25887
|
+
if (J <= I) {
|
|
25888
25888
|
const er = K.length > 0 && m === K[K.length - 1].ref.current;
|
|
25889
25889
|
A.style.bottom = "0px";
|
|
25890
25890
|
const T = s.clientHeight - b.offsetTop - b.offsetHeight, fr = Math.max(
|
|
25891
25891
|
F,
|
|
25892
|
-
|
|
25892
|
+
D + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
25893
25893
|
(er ? R : 0) + T + P
|
|
25894
|
-
), Zr =
|
|
25894
|
+
), Zr = J + fr;
|
|
25895
25895
|
A.style.height = Zr + "px";
|
|
25896
25896
|
} else {
|
|
25897
25897
|
const er = K.length > 0 && m === K[0].ref.current;
|
|
@@ -25899,9 +25899,9 @@ var TW = "SelectItemAlignedPosition", Xp = C.forwardRef((r, e) => {
|
|
|
25899
25899
|
const fr = Math.max(
|
|
25900
25900
|
I,
|
|
25901
25901
|
or + b.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
|
|
25902
|
-
(er ? N : 0) +
|
|
25902
|
+
(er ? N : 0) + D
|
|
25903
25903
|
) + ar;
|
|
25904
|
-
A.style.height = fr + "px", b.scrollTop =
|
|
25904
|
+
A.style.height = fr + "px", b.scrollTop = J - I + b.offsetTop;
|
|
25905
25905
|
}
|
|
25906
25906
|
A.style.margin = `${ga}px 0`, A.style.minHeight = g + "px", A.style.maxHeight = j + "px", t == null || t(), requestAnimationFrame(() => d.current = !0);
|
|
25907
25907
|
}
|
|
@@ -26678,14 +26678,14 @@ const Ri = ({ value: r, onValueChange: e, options: a, placeholder: t, name: n })
|
|
|
26678
26678
|
address_country: "",
|
|
26679
26679
|
state: ""
|
|
26680
26680
|
}), $ = vf(() => {
|
|
26681
|
-
const
|
|
26682
|
-
return f != null && f.hide_name_step ||
|
|
26683
|
-
}, [f]), O = () => /* @__PURE__ */ l("div", { className: "flex justify-center space-x-2", children: $.map((
|
|
26681
|
+
const V = [];
|
|
26682
|
+
return f != null && f.hide_name_step || V.push("name"), f != null && f.hide_document_selection_step || V.push("document-selection"), V.push("id-front", "id-back", "pre-selfie", "selfie", "address"), V;
|
|
26683
|
+
}, [f]), O = () => /* @__PURE__ */ l("div", { className: "flex justify-center space-x-2", children: $.map((V, K) => /* @__PURE__ */ l(
|
|
26684
26684
|
"div",
|
|
26685
26685
|
{
|
|
26686
26686
|
className: `w-3 h-3 rounded-full ${$.indexOf(h) >= K ? "bg-primary" : "bg-muted"}`
|
|
26687
26687
|
},
|
|
26688
|
-
|
|
26688
|
+
V
|
|
26689
26689
|
)) });
|
|
26690
26690
|
if (ge(() => {
|
|
26691
26691
|
(async () => {
|
|
@@ -26723,9 +26723,9 @@ const Ri = ({ value: r, onValueChange: e, options: a, placeholder: t, name: n })
|
|
|
26723
26723
|
address_country: ((or = N.personal_address) == null ? void 0 : or.address_country) || "",
|
|
26724
26724
|
state: ((Q = N.personal_address) == null ? void 0 : Q.state) || ""
|
|
26725
26725
|
});
|
|
26726
|
-
const I = !!((P = N.full_name) != null && P.trim()), F = !!((v = N.phone) != null && v.trim()),
|
|
26726
|
+
const I = !!((P = N.full_name) != null && P.trim()), F = !!((v = N.phone) != null && v.trim()), D = !!((w = N.email) != null && w.trim()), S = !!N.document_type, J = !!N.id_photo, ar = N.document_type === "passport" ? !0 : !!N.id_photo_back, q = !!N.selfie_photo, er = !!((g = N.personal_address) != null && g.street);
|
|
26727
26727
|
let T = "landing";
|
|
26728
|
-
!I || !F || !
|
|
26728
|
+
!I || !F || !D ? T = "name" : S ? J ? ar ? q ? er ? T = "verify" : T = "address" : T = "pre-selfie" : T = "id-back" : T = "id-front" : T = "document-selection", d(T);
|
|
26729
26729
|
} catch (y) {
|
|
26730
26730
|
console.error("Resume failed", y);
|
|
26731
26731
|
} finally {
|
|
@@ -26751,7 +26751,7 @@ const Ri = ({ value: r, onValueChange: e, options: a, placeholder: t, name: n })
|
|
|
26751
26751
|
email: m.email,
|
|
26752
26752
|
phone: m.phone,
|
|
26753
26753
|
renderProgress: O,
|
|
26754
|
-
onContinue: async ({ fullName:
|
|
26754
|
+
onContinue: async ({ fullName: V, email: K, phone: j }) => {
|
|
26755
26755
|
let rr = p;
|
|
26756
26756
|
rr || (rr = (await y0.post(
|
|
26757
26757
|
`${r}/api/kyc`,
|
|
@@ -26759,10 +26759,10 @@ const Ri = ({ value: r, onValueChange: e, options: a, placeholder: t, name: n })
|
|
|
26759
26759
|
{ headers: { "X-API-Key": e } }
|
|
26760
26760
|
)).data.id, b(rr)), await ue(
|
|
26761
26761
|
"personal_details",
|
|
26762
|
-
{ full_name:
|
|
26762
|
+
{ full_name: V, email: K, phone: j },
|
|
26763
26763
|
{},
|
|
26764
26764
|
{ ...L, id: rr }
|
|
26765
|
-
) && (_((or) => ({ ...or, full_name:
|
|
26765
|
+
) && (_((or) => ({ ...or, full_name: V, email: K, phone: j })), d("document-selection"));
|
|
26766
26766
|
}
|
|
26767
26767
|
}
|
|
26768
26768
|
);
|
|
@@ -26771,9 +26771,9 @@ const Ri = ({ value: r, onValueChange: e, options: a, placeholder: t, name: n })
|
|
|
26771
26771
|
wm,
|
|
26772
26772
|
{
|
|
26773
26773
|
selectedDocumentType: E,
|
|
26774
|
-
onDocumentTypeChange: async (
|
|
26775
|
-
B(
|
|
26776
|
-
const K = xb[
|
|
26774
|
+
onDocumentTypeChange: async (V) => {
|
|
26775
|
+
B(V);
|
|
26776
|
+
const K = xb[V];
|
|
26777
26777
|
await ue(
|
|
26778
26778
|
"personal_details",
|
|
26779
26779
|
{ document_type: K, id_photo: null, id_photo_back: null },
|
|
@@ -26795,13 +26795,13 @@ const Ri = ({ value: r, onValueChange: e, options: a, placeholder: t, name: n })
|
|
|
26795
26795
|
frameType: "rectangular",
|
|
26796
26796
|
documentTypeId: E,
|
|
26797
26797
|
currentStep: h,
|
|
26798
|
-
onRetake: () => _((
|
|
26799
|
-
onConfirm: async (
|
|
26798
|
+
onRetake: () => _((V) => ({ ...V, id_photo: null })),
|
|
26799
|
+
onConfirm: async (V) => {
|
|
26800
26800
|
const K = xb[E];
|
|
26801
|
-
_((rr) => ({ ...rr, id_photo:
|
|
26801
|
+
_((rr) => ({ ...rr, id_photo: V, document_type: K })), await ue(
|
|
26802
26802
|
"personal_details",
|
|
26803
26803
|
{ document_type: K },
|
|
26804
|
-
{ id_photo:
|
|
26804
|
+
{ id_photo: V },
|
|
26805
26805
|
L
|
|
26806
26806
|
) ? d(E === "passport" ? "pre-selfie" : "id-back") : A({
|
|
26807
26807
|
title: "Upload Failed",
|
|
@@ -26821,9 +26821,9 @@ const Ri = ({ value: r, onValueChange: e, options: a, placeholder: t, name: n })
|
|
|
26821
26821
|
frameType: "rectangular",
|
|
26822
26822
|
documentTypeId: E,
|
|
26823
26823
|
currentStep: h,
|
|
26824
|
-
onRetake: () => _((
|
|
26825
|
-
onConfirm: async (
|
|
26826
|
-
_((j) => ({ ...j, id_photo_back:
|
|
26824
|
+
onRetake: () => _((V) => ({ ...V, id_photo_back: null })),
|
|
26825
|
+
onConfirm: async (V) => {
|
|
26826
|
+
_((j) => ({ ...j, id_photo_back: V })), await ue("personal_details", {}, { id_photo_back: V }, L) ? d("pre-selfie") : A({
|
|
26827
26827
|
title: "Upload Failed",
|
|
26828
26828
|
description: "Please check your internet connection",
|
|
26829
26829
|
variant: "destructive"
|
|
@@ -26848,9 +26848,9 @@ const Ri = ({ value: r, onValueChange: e, options: a, placeholder: t, name: n })
|
|
|
26848
26848
|
description: "Place your face inside the frame.",
|
|
26849
26849
|
frameType: "circular",
|
|
26850
26850
|
currentStep: h,
|
|
26851
|
-
onRetake: () => _((
|
|
26852
|
-
onConfirm: async (
|
|
26853
|
-
_((j) => ({ ...j, selfie_photo:
|
|
26851
|
+
onRetake: () => _((V) => ({ ...V, selfie_photo: null })),
|
|
26852
|
+
onConfirm: async (V) => {
|
|
26853
|
+
_((j) => ({ ...j, selfie_photo: V })), await ue("personal_details", {}, { selfie_photo: V }, L) ? d("address") : A({
|
|
26854
26854
|
title: "Upload Failed",
|
|
26855
26855
|
description: "Please check your internet connection",
|
|
26856
26856
|
variant: "destructive"
|
|
@@ -26866,9 +26866,9 @@ const Ri = ({ value: r, onValueChange: e, options: a, placeholder: t, name: n })
|
|
|
26866
26866
|
data: x,
|
|
26867
26867
|
isBusinessAddress: !1,
|
|
26868
26868
|
renderProgress: O,
|
|
26869
|
-
onDataChange: (
|
|
26870
|
-
onContinue: async (
|
|
26871
|
-
await ue("personal_address",
|
|
26869
|
+
onDataChange: (V) => k((K) => ({ ...K, ...V })),
|
|
26870
|
+
onContinue: async (V) => {
|
|
26871
|
+
await ue("personal_address", V, {}, L) && d("verify");
|
|
26872
26872
|
},
|
|
26873
26873
|
onBack: () => d("selfie")
|
|
26874
26874
|
}
|
|
@@ -26895,7 +26895,7 @@ const Ri = ({ value: r, onValueChange: e, options: a, placeholder: t, name: n })
|
|
|
26895
26895
|
{ status: "pending" },
|
|
26896
26896
|
{ headers: { "X-API-Key": e } }
|
|
26897
26897
|
);
|
|
26898
|
-
const
|
|
26898
|
+
const V = {
|
|
26899
26899
|
full_name: m.full_name || "",
|
|
26900
26900
|
email: m.email || "",
|
|
26901
26901
|
selfie_photo: m.selfie_photo,
|
|
@@ -26903,7 +26903,7 @@ const Ri = ({ value: r, onValueChange: e, options: a, placeholder: t, name: n })
|
|
|
26903
26903
|
id_photo_back: m.id_photo_back ?? void 0,
|
|
26904
26904
|
personal_address: x
|
|
26905
26905
|
};
|
|
26906
|
-
a(p,
|
|
26906
|
+
a(p, V), d("done");
|
|
26907
26907
|
}
|
|
26908
26908
|
}
|
|
26909
26909
|
);
|
|
@@ -26999,11 +26999,11 @@ var pg = { exports: {} };
|
|
|
26999
26999
|
}
|
|
27000
27000
|
function y() {
|
|
27001
27001
|
var xr, Ar, Cr, cr, wr, dr, vr, Gr, Hr, l0, ba, S0, _e, Bd;
|
|
27002
|
-
for (o0 > q && (er = 1),
|
|
27002
|
+
for (o0 > q && (er = 1), J = 30 + (er - 1) / 3, S0 = ar, _e = 0, Bd = q, ba = q / (3 * er), l0 = ba / M | 0, Gr = de, dr = B0, vr = dr >> F0, 1 >= vr && (vr = 0), xr = 0; vr > xr; xr++)
|
|
27003
27003
|
nt[xr] = Gr * ((vr * vr - xr * xr) * Ce / (vr * vr));
|
|
27004
27004
|
for (Hr = o0 > q ? 3 : q % Zr !== 0 ? 3 * Zr : q % Tr !== 0 ? 3 * Tr : q % Fr !== 0 ? 3 * Fr : 3 * Ir, xr = 0; ba > xr; )
|
|
27005
|
-
if (Cr = (255 & S0[_e + 0]) << Z, cr = (255 & S0[_e + 1]) << Z, wr = (255 & S0[_e + 2]) << Z, Ar = S(Cr, cr, wr),
|
|
27006
|
-
for (Gr -= Gr /
|
|
27005
|
+
if (Cr = (255 & S0[_e + 0]) << Z, cr = (255 & S0[_e + 1]) << Z, wr = (255 & S0[_e + 2]) << Z, Ar = S(Cr, cr, wr), D(Gr, Ar, Cr, cr, wr), vr !== 0 && F(vr, Ar, Cr, cr, wr), _e += Hr, _e >= Bd && (_e -= q), xr++, l0 === 0 && (l0 = 1), xr % l0 === 0)
|
|
27006
|
+
for (Gr -= Gr / J, dr -= dr / aa, vr = dr >> F0, 1 >= vr && (vr = 0), Ar = 0; vr > Ar; Ar++)
|
|
27007
27007
|
nt[Ar] = Gr * ((vr * vr - Ar * Ar) * Ce / (vr * vr));
|
|
27008
27008
|
}
|
|
27009
27009
|
function N(xr, Ar, Cr) {
|
|
@@ -27039,7 +27039,7 @@ var pg = { exports: {} };
|
|
|
27039
27039
|
}
|
|
27040
27040
|
}
|
|
27041
27041
|
}
|
|
27042
|
-
function
|
|
27042
|
+
function D(xr, Ar, Cr, cr, wr) {
|
|
27043
27043
|
var dr = T[Ar], vr = xr / de;
|
|
27044
27044
|
dr[0] -= vr * (dr[0] - Cr) | 0, dr[1] -= vr * (dr[1] - cr) | 0, dr[2] -= vr * (dr[2] - wr) | 0;
|
|
27045
27045
|
}
|
|
@@ -27049,7 +27049,7 @@ var pg = { exports: {} };
|
|
|
27049
27049
|
_e = T[cr], wr = _e[0] - xr, 0 > wr && (wr = -wr), dr = _e[1] - Ar, 0 > dr && (dr = -dr), wr += dr, dr = _e[2] - Cr, 0 > dr && (dr = -dr), wr += dr, ba > wr && (ba = wr, Hr = cr), vr = wr - (ha[cr] >> U - Z), S0 > vr && (S0 = vr, l0 = cr), Gr = Ta[cr] >> tr, Ta[cr] -= Gr, ha[cr] += Gr << ir;
|
|
27050
27050
|
return Ta[Hr] += lr, ha[Hr] -= Wr, l0;
|
|
27051
27051
|
}
|
|
27052
|
-
var
|
|
27052
|
+
var J, ar, q, er, T, fr = 256, Zr = 499, Tr = 491, Fr = 487, Ir = 503, o0 = 3 * Ir, u0 = fr - 1, Z = 4, M = 100, U = 16, nr = 1 << U, ir = 10, tr = 10, lr = nr >> tr, Wr = nr << ir - tr, Xr = fr >> 3, F0 = 6, ne = 1 << F0, B0 = Xr * ne, aa = 30, Oe = 10, de = 1 << Oe, tt = 8, Ce = 1 << tt, yn = Oe + tt, he = 1 << yn, ta = [], ha = [], Ta = [], nt = [];
|
|
27053
27053
|
v.apply(this, arguments);
|
|
27054
27054
|
var se = {};
|
|
27055
27055
|
return se.map = N, se.process = R, se;
|
|
@@ -27075,7 +27075,7 @@ var pg = { exports: {} };
|
|
|
27075
27075
|
}
|
|
27076
27076
|
return y;
|
|
27077
27077
|
}, processFrameWithQuantizer: function(g, y, N, R) {
|
|
27078
|
-
for (var I = this.dataToRGB(g, y, N), F = new u(I, I.length, R),
|
|
27078
|
+
for (var I = this.dataToRGB(g, y, N), F = new u(I, I.length, R), D = F.process(), S = new Uint32Array(this.componentizedPaletteToArray(D)), J = y * N, ar = new Uint8Array(J), q = 0, er = 0; J > er; er++) {
|
|
27079
27079
|
var T = I[q++], fr = I[q++], Zr = I[q++];
|
|
27080
27080
|
ar[er] = F.map(T, fr, Zr);
|
|
27081
27081
|
}
|
|
@@ -27118,12 +27118,12 @@ var pg = { exports: {} };
|
|
|
27118
27118
|
}
|
|
27119
27119
|
var I = 0;
|
|
27120
27120
|
y = y === i ? {} : y;
|
|
27121
|
-
var F = y.loop === i ? null : y.loop,
|
|
27121
|
+
var F = y.loop === i ? null : y.loop, D = y.palette === i ? null : y.palette;
|
|
27122
27122
|
if (0 >= w || 0 >= g || w > 65535 || g > 65535)
|
|
27123
27123
|
throw "Width/Height invalid.";
|
|
27124
27124
|
v[I++] = 71, v[I++] = 73, v[I++] = 70, v[I++] = 56, v[I++] = 57, v[I++] = 97;
|
|
27125
|
-
var S = 0,
|
|
27126
|
-
if (v[I++] = 255 & w, v[I++] = w >> 8 & 255, v[I++] = 255 & g, v[I++] = g >> 8 & 255, v[I++] = (
|
|
27125
|
+
var S = 0, J = 0;
|
|
27126
|
+
if (v[I++] = 255 & w, v[I++] = w >> 8 & 255, v[I++] = 255 & g, v[I++] = g >> 8 & 255, v[I++] = (D !== null ? 128 : 0) | S, v[I++] = J, v[I++] = 0, F !== null) {
|
|
27127
27127
|
if (0 > F || F > 65535)
|
|
27128
27128
|
throw "Loop count invalid.";
|
|
27129
27129
|
v[I++] = 33, v[I++] = 255, v[I++] = 11, v[I++] = 78, v[I++] = 69, v[I++] = 84, v[I++] = 83, v[I++] = 67, v[I++] = 65, v[I++] = 80, v[I++] = 69, v[I++] = 50, v[I++] = 46, v[I++] = 48, v[I++] = 3, v[I++] = 1, v[I++] = 255 & F, v[I++] = F >> 8 & 255, v[I++] = 0;
|
|
@@ -27137,7 +27137,7 @@ var pg = { exports: {} };
|
|
|
27137
27137
|
if (Zr.length < T * fr)
|
|
27138
27138
|
throw "Not enough pixels for the frame size.";
|
|
27139
27139
|
var Fr = !0, Ir = Tr.palette;
|
|
27140
|
-
if ((Ir === i || Ir === null) && (Fr = !1, Ir =
|
|
27140
|
+
if ((Ir === i || Ir === null) && (Fr = !1, Ir = D), Ir === i || Ir === null)
|
|
27141
27141
|
throw "Must supply either a local or global palette.";
|
|
27142
27142
|
for (var o0 = N(Ir), u0 = 0; o0 >>= 1; )
|
|
27143
27143
|
++u0;
|
|
@@ -27165,29 +27165,29 @@ var pg = { exports: {} };
|
|
|
27165
27165
|
}
|
|
27166
27166
|
function p() {
|
|
27167
27167
|
function v() {
|
|
27168
|
-
k.each(
|
|
27168
|
+
k.each(D, function(q, er) {
|
|
27169
27169
|
er && (er.text ? ar.addFrame(er.img, N, er.text) : ar.addFrame(er, N));
|
|
27170
27170
|
}), d(ar, g);
|
|
27171
27171
|
}
|
|
27172
|
-
var w = arguments.length > 0 && arguments[0] !== i ? arguments[0] : {}, g = w.callback, y = w.images, N = w.options, R = w.imagesLength, I = { getUserMedia: !0, "window.URL": !0 }, F = O.validate(I),
|
|
27172
|
+
var w = arguments.length > 0 && arguments[0] !== i ? arguments[0] : {}, g = w.callback, y = w.images, N = w.options, R = w.imagesLength, I = { getUserMedia: !0, "window.URL": !0 }, F = O.validate(I), D = [], S = 0, J = void 0, ar = void 0;
|
|
27173
27173
|
return F.error ? g(F) : (ar = new rr(N), k.each(y, function(q, er) {
|
|
27174
27174
|
var T = er;
|
|
27175
|
-
er.src && (T = T.src), k.isElement(T) ? (N.crossOrigin && (T.crossOrigin = N.crossOrigin),
|
|
27175
|
+
er.src && (T = T.src), k.isElement(T) ? (N.crossOrigin && (T.crossOrigin = N.crossOrigin), D[q] = T, S += 1, S === R && v()) : k.isString(T) && (J = new Image(), N.crossOrigin && (J.crossOrigin = N.crossOrigin), function(fr) {
|
|
27176
27176
|
er.text && (fr.text = er.text), fr.onerror = function() {
|
|
27177
27177
|
var Zr = void 0;
|
|
27178
27178
|
return --R, R === 0 ? (Zr = {}, Zr.error = "None of the requested images was capable of being retrieved", g(Zr)) : void 0;
|
|
27179
27179
|
}, fr.onload = function() {
|
|
27180
|
-
|
|
27180
|
+
D[q] = er.text ? { img: fr, text: fr.text } : fr, S += 1, S === R && v(), k.removeElement(fr);
|
|
27181
27181
|
}, fr.src = T;
|
|
27182
|
-
}(
|
|
27182
|
+
}(J), k.setCSSAttr(J, { position: "fixed", opacity: "0" }), t.body.appendChild(J));
|
|
27183
27183
|
}), void 0);
|
|
27184
27184
|
}
|
|
27185
27185
|
function b(v) {
|
|
27186
27186
|
v = k.isObject(v) ? v : {}, Q.stopVideoStreaming(v);
|
|
27187
27187
|
}
|
|
27188
27188
|
function m(v, w) {
|
|
27189
|
-
var g = v.options || {}, y = g.images, N = g.video, R = Number(g.gifWidth), I = Number(g.gifHeight), F = (Number(g.numFrames), v.cameraStream),
|
|
27190
|
-
g.crop = ar, g.videoElement =
|
|
27189
|
+
var g = v.options || {}, y = g.images, N = g.video, R = Number(g.gifWidth), I = Number(g.gifHeight), F = (Number(g.numFrames), v.cameraStream), D = v.videoElement, S = v.videoWidth, J = v.videoHeight, ar = or.getCropDimensions({ videoWidth: S, videoHeight: J, gifHeight: I, gifWidth: R }), q = w;
|
|
27190
|
+
g.crop = ar, g.videoElement = D, g.videoWidth = S, g.videoHeight = J, g.cameraStream = F, k.isElement(D) && (D.width = R + ar.width, D.height = I + ar.height, g.webcamVideoElement || (k.setCSSAttr(D, { position: "fixed", opacity: "0" }), t.body.appendChild(D)), D.play(), or.getGIF(g, function(er) {
|
|
27191
27191
|
y && y.length || N && N.length || b(er), q(er);
|
|
27192
27192
|
}));
|
|
27193
27193
|
}
|
|
@@ -27199,11 +27199,11 @@ var pg = { exports: {} };
|
|
|
27199
27199
|
if (F = g.src, I = k.getExtension(F), !k.isSupported.videoCodecs[I])
|
|
27200
27200
|
return w(O.messages.videoCodecs);
|
|
27201
27201
|
} else
|
|
27202
|
-
k.isArray(g) && k.each(g, function(
|
|
27202
|
+
k.isArray(g) && k.each(g, function(D, S) {
|
|
27203
27203
|
return I = S instanceof Blob ? S.type.substr(S.type.lastIndexOf("/") + 1, S.length) : S.substr(S.lastIndexOf(".") + 1, S.length), k.isSupported.videoCodecs[I] ? (g = S, !1) : void 0;
|
|
27204
27204
|
});
|
|
27205
|
-
Q.startStreaming({ completed: function(
|
|
27206
|
-
|
|
27205
|
+
Q.startStreaming({ completed: function(D) {
|
|
27206
|
+
D.options = y || {}, m(D, w);
|
|
27207
27207
|
}, existingVideo: g, crossOrigin: y.crossOrigin, options: y });
|
|
27208
27208
|
}
|
|
27209
27209
|
function E() {
|
|
@@ -27217,13 +27217,13 @@ var pg = { exports: {} };
|
|
|
27217
27217
|
}
|
|
27218
27218
|
function B(v, w) {
|
|
27219
27219
|
if (w = k.isFunction(v) ? v : w, v = k.isObject(v) ? v : {}, k.isFunction(w)) {
|
|
27220
|
-
var g = k.mergeOptions(
|
|
27220
|
+
var g = k.mergeOptions(V, v) || {}, y = v.cameraStream, N = g.images, R = N ? N.length : 0, I = g.video, F = g.webcamVideoElement;
|
|
27221
27221
|
g = k.mergeOptions(g, { gifWidth: Math.floor(g.gifWidth), gifHeight: Math.floor(g.gifHeight) }), R ? p({ images: N, imagesLength: R, callback: w, options: g }) : I ? _({ existingVideo: I, callback: w, options: g }) : E({ lastCameraStream: y, callback: w, webcamVideoElement: F, options: g });
|
|
27222
27222
|
}
|
|
27223
27223
|
}
|
|
27224
27224
|
function x(v, w) {
|
|
27225
27225
|
if (w = k.isFunction(v) ? v : w, v = k.isObject(v) ? v : {}, k.isFunction(w)) {
|
|
27226
|
-
var g = k.mergeOptions(
|
|
27226
|
+
var g = k.mergeOptions(V, v), y = k.mergeOptions(g, { interval: 0.1, numFrames: 1, gifWidth: Math.floor(g.gifWidth), gifHeight: Math.floor(g.gifHeight) });
|
|
27227
27227
|
B(y, w);
|
|
27228
27228
|
}
|
|
27229
27229
|
}
|
|
@@ -27234,14 +27234,14 @@ var pg = { exports: {} };
|
|
|
27234
27234
|
if (v = v || k.noop, w = w || 0, !k.requestAnimFrame)
|
|
27235
27235
|
return setTimeout(v, w);
|
|
27236
27236
|
var g = (/* @__PURE__ */ new Date()).getTime(), y = new Object(), N = k.requestAnimFrame, R = function I() {
|
|
27237
|
-
var F = (/* @__PURE__ */ new Date()).getTime(),
|
|
27238
|
-
|
|
27237
|
+
var F = (/* @__PURE__ */ new Date()).getTime(), D = F - g;
|
|
27238
|
+
D >= w ? v.call() : y.value = N(I);
|
|
27239
27239
|
};
|
|
27240
27240
|
return y.value = N(R), y;
|
|
27241
27241
|
}, Blob: a.Blob || a.BlobBuilder || a.WebKitBlobBuilder || a.MozBlobBuilder || a.MSBlobBuilder, btoa: function() {
|
|
27242
27242
|
var v = a.btoa || function(w) {
|
|
27243
|
-
for (var g = "", y = 0, N = w.length, R = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", I = void 0, F = void 0,
|
|
27244
|
-
I = w.charCodeAt(y++), F = w.charCodeAt(y++),
|
|
27243
|
+
for (var g = "", y = 0, N = w.length, R = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", I = void 0, F = void 0, D = void 0, S = void 0, J = void 0, ar = void 0, q = void 0; N > y; )
|
|
27244
|
+
I = w.charCodeAt(y++), F = w.charCodeAt(y++), D = w.charCodeAt(y++), S = I >> 2, J = (3 & I) << 4 | F >> 4, ar = (15 & F) << 2 | D >> 6, q = 63 & D, isNaN(F) ? ar = q = 64 : isNaN(D) && (q = 64), g = g + R.charAt(S) + R.charAt(J) + R.charAt(ar) + R.charAt(q);
|
|
27245
27245
|
return g;
|
|
27246
27246
|
};
|
|
27247
27247
|
return v ? v.bind(a) : k.noop;
|
|
@@ -27331,16 +27331,16 @@ var pg = { exports: {} };
|
|
|
27331
27331
|
}, isValid: function(w) {
|
|
27332
27332
|
var g = O.validate(w), y = g.error !== !0;
|
|
27333
27333
|
return y;
|
|
27334
|
-
}, validators: [{ condition: k.isFunction(k.getUserMedia), errorCode: "getUserMedia", errorMsg: "The getUserMedia API is not supported in your browser" }, { condition: k.isSupported.canvas(), errorCode: "canvas", errorMsg: "Canvas elements are not supported in your browser" }, { condition: k.isSupported.webworkers(), errorCode: "webworkers", errorMsg: "The Web Workers API is not supported in your browser" }, { condition: k.isFunction(k.URL), errorCode: "window.URL", errorMsg: "The window.URL API is not supported in your browser" }, { condition: k.isSupported.blob(), errorCode: "window.Blob", errorMsg: "The window.Blob File API is not supported in your browser" }, { condition: k.isSupported.Uint8Array(), errorCode: "window.Uint8Array", errorMsg: "The window.Uint8Array function constructor is not supported in your browser" }, { condition: k.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" } } }, L = Object.freeze({ default: O }),
|
|
27335
|
-
},
|
|
27334
|
+
}, validators: [{ condition: k.isFunction(k.getUserMedia), errorCode: "getUserMedia", errorMsg: "The getUserMedia API is not supported in your browser" }, { condition: k.isSupported.canvas(), errorCode: "canvas", errorMsg: "Canvas elements are not supported in your browser" }, { condition: k.isSupported.webworkers(), errorCode: "webworkers", errorMsg: "The Web Workers API is not supported in your browser" }, { condition: k.isFunction(k.URL), errorCode: "window.URL", errorMsg: "The window.URL API is not supported in your browser" }, { condition: k.isSupported.blob(), errorCode: "window.Blob", errorMsg: "The window.Blob File API is not supported in your browser" }, { condition: k.isSupported.Uint8Array(), errorCode: "window.Uint8Array", errorMsg: "The window.Uint8Array function constructor is not supported in your browser" }, { condition: k.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" } } }, L = Object.freeze({ default: O }), z = function() {
|
|
27335
|
+
}, V = { 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: z, completeCallback: z, saveRenderingContexts: !1, savedRenderingContexts: [], showFrameText: !0, crossOrigin: "Anonymous", waterMark: null, waterMarkHeight: null, waterMarkWidth: null, waterMarkXCoordinate: 1, waterMarkYCoordinate: 1 }, K = Object.freeze({ default: V }), j = function() {
|
|
27336
27336
|
}, rr = function(v) {
|
|
27337
27337
|
this.canvas = null, this.ctx = null, this.repeat = 0, this.frames = [], this.numRenderedFrames = 0, this.onRenderCompleteCallback = j, this.onRenderProgressCallback = j, this.workers = [], this.availableWorkers = [], this.generatingGIF = !1, this.options = v, this.initializeWebWorkers(v);
|
|
27338
27338
|
};
|
|
27339
27339
|
rr.prototype = { workerMethods: c(), initializeWebWorkers: function(v) {
|
|
27340
|
-
var w = this, g = u.toString() + "(" + c.toString() + "());", y = void 0, N = void 0, R = void 0, I = void 0, F = -1,
|
|
27340
|
+
var w = this, g = u.toString() + "(" + c.toString() + "());", y = void 0, N = void 0, R = void 0, I = void 0, F = -1, D = "";
|
|
27341
27341
|
for (I = v.numWorkers; ++F < I; )
|
|
27342
|
-
y = k.createWebWorker(g), k.isObject(y) ? (N = y.objectUrl, R = y.worker, w.workers.push({ worker: R, objectUrl: N }), w.availableWorkers.push(R)) : (
|
|
27343
|
-
this.workerError =
|
|
27342
|
+
y = k.createWebWorker(g), k.isObject(y) ? (N = y.objectUrl, R = y.worker, w.workers.push({ worker: R, objectUrl: N }), w.availableWorkers.push(R)) : (D = y, k.webWorkerError = !!y);
|
|
27343
|
+
this.workerError = D, this.canvas = t.createElement("canvas"), this.canvas.width = v.gifWidth, this.canvas.height = v.gifHeight, this.ctx = this.canvas.getContext("2d"), this.frames = [];
|
|
27344
27344
|
}, getWorker: function() {
|
|
27345
27345
|
return this.availableWorkers.pop();
|
|
27346
27346
|
}, freeWorker: function(v) {
|
|
@@ -27361,11 +27361,11 @@ var pg = { exports: {} };
|
|
|
27361
27361
|
w.processNextFrame();
|
|
27362
27362
|
}, 1);
|
|
27363
27363
|
}, processFrame: function(v) {
|
|
27364
|
-
var w = this, g = (this.options, this.options), y = g.progressCallback, N = g.sampleInterval, R = this.frames, I = void 0, F = void 0,
|
|
27365
|
-
var S = arguments.length > 0 && arguments[0] !== i ? arguments[0] : {},
|
|
27366
|
-
delete I.data, I.pixels = Array.prototype.slice.call(
|
|
27364
|
+
var w = this, g = (this.options, this.options), y = g.progressCallback, N = g.sampleInterval, R = this.frames, I = void 0, F = void 0, D = function() {
|
|
27365
|
+
var S = arguments.length > 0 && arguments[0] !== i ? arguments[0] : {}, J = S.data;
|
|
27366
|
+
delete I.data, I.pixels = Array.prototype.slice.call(J.pixels), I.palette = Array.prototype.slice.call(J.palette), I.done = !0, I.beingProcessed = !1, w.freeWorker(F), w.onFrameFinished(y);
|
|
27367
27367
|
};
|
|
27368
|
-
return I = R[v], I.beingProcessed || I.done ? (this.onFrameFinished(), void 0) : (I.sampleInterval = N, I.beingProcessed = !0, I.gifshot = !0, F = this.getWorker(), F ? (F.onmessage =
|
|
27368
|
+
return I = R[v], I.beingProcessed || I.done ? (this.onFrameFinished(), void 0) : (I.sampleInterval = N, I.beingProcessed = !0, I.gifshot = !0, F = this.getWorker(), F ? (F.onmessage = D, F.postMessage(I)) : D({ data: w.workerMethods.run(I) }), void 0);
|
|
27369
27369
|
}, startRendering: function(v) {
|
|
27370
27370
|
this.onRenderCompleteCallback = v;
|
|
27371
27371
|
for (var w = 0; w < this.options.numWorkers && w < this.frames.length; w++)
|
|
@@ -27380,20 +27380,20 @@ var pg = { exports: {} };
|
|
|
27380
27380
|
}
|
|
27381
27381
|
v >= 0 && this.processFrame(v);
|
|
27382
27382
|
}, generateGIF: function(v, w) {
|
|
27383
|
-
var g = [], y = { loop: this.repeat }, N = this.options, R = N.interval, I = N.frameDuration, F = N.images,
|
|
27383
|
+
var g = [], y = { loop: this.repeat }, N = this.options, R = N.interval, I = N.frameDuration, F = N.images, D = !!F.length, S = N.gifHeight, J = N.gifWidth, ar = new h(g, J, S, y), q = this.onRenderProgressCallback, er = D ? 100 * R : 0, T = void 0, fr = void 0;
|
|
27384
27384
|
this.generatingGIF = !0, k.each(v, function(Zr, Tr) {
|
|
27385
27385
|
var Fr = Tr.palette;
|
|
27386
27386
|
q(0.75 + 0.25 * Tr.position * 1 / v.length);
|
|
27387
27387
|
for (var Ir = 0; I > Ir; Ir++)
|
|
27388
|
-
ar.addFrame(0, 0,
|
|
27388
|
+
ar.addFrame(0, 0, J, S, Tr.pixels, { palette: Fr, delay: er });
|
|
27389
27389
|
}), ar.end(), q(1), this.frames = [], this.generatingGIF = !1, k.isFunction(w) && (T = this.bufferToString(g), fr = "data:image/gif;base64," + k.btoa(T), w(fr));
|
|
27390
27390
|
}, setRepeat: function(v) {
|
|
27391
27391
|
this.repeat = v;
|
|
27392
27392
|
}, addFrame: function(v, w, g) {
|
|
27393
27393
|
w = k.isObject(w) ? w : {};
|
|
27394
|
-
var y = this, N = y.ctx, R = y.options, I = R.gifWidth, F = R.gifHeight,
|
|
27394
|
+
var y = this, N = y.ctx, R = y.options, I = R.gifWidth, F = R.gifHeight, D = k.getFontSize(w), S = w, J = S.filter, ar = S.fontColor, q = S.fontFamily, er = S.fontWeight, T = (S.gifHeight, S.gifWidth, S.text), fr = S.textAlign, Zr = S.textBaseline, Tr = S.waterMark, Fr = S.waterMarkHeight, Ir = S.waterMarkWidth, o0 = S.waterMarkXCoordinate, u0 = S.waterMarkYCoordinate, Z = w.textXCoordinate ? w.textXCoordinate : fr === "left" ? 1 : fr === "right" ? I : I / 2, M = w.textYCoordinate ? w.textYCoordinate : Zr === "top" ? 1 : Zr === "center" ? F / 2 : F, U = er + " " + D + " " + q, nr = g && w.showFrameText ? g : T, ir = void 0;
|
|
27395
27395
|
try {
|
|
27396
|
-
N.filter =
|
|
27396
|
+
N.filter = J, N.drawImage(v, 0, 0, I, F), nr && (N.font = U, N.fillStyle = ar, N.textAlign = fr, N.textBaseline = Zr, N.fillText(nr, Z, M)), Tr && N.drawImage(Tr, o0, u0, Ir, Fr), ir = N.getImageData(0, 0, I, F), y.addFrameImageData(ir);
|
|
27397
27397
|
} catch (tr) {
|
|
27398
27398
|
return "" + tr;
|
|
27399
27399
|
}
|
|
@@ -27424,10 +27424,10 @@ var pg = { exports: {} };
|
|
|
27424
27424
|
}, or = { getGIF: function() {
|
|
27425
27425
|
var v = arguments.length > 0 && arguments[0] !== i ? arguments[0] : {}, w = arguments[1];
|
|
27426
27426
|
w = k.isFunction(w) ? w : Y;
|
|
27427
|
-
var g = t.createElement("canvas"), y = void 0, N = v.images, R = !!N.length, I = v.cameraStream, F = v.crop,
|
|
27427
|
+
var g = t.createElement("canvas"), y = void 0, N = v.images, R = !!N.length, I = v.cameraStream, F = v.crop, D = v.filter, S = v.fontColor, J = v.fontFamily, ar = v.fontWeight, q = v.keepCameraOn, er = (v.numWorkers, v.progressCallback), T = v.saveRenderingContexts, fr = v.savedRenderingContexts, Zr = v.text, Tr = v.textAlign, Fr = v.textBaseline, Ir = v.videoElement, o0 = v.videoHeight, u0 = v.videoWidth, Z = v.webcamVideoElement, M = v.waterMark, U = v.waterMarkHeight, nr = v.waterMarkWidth, ir = v.waterMarkXCoordinate, tr = v.waterMarkYCoordinate, lr = Number(v.gifWidth), Wr = Number(v.gifHeight), Xr = Number(v.interval), F0 = (Number(v.sampleInterval), R ? 0 : 1e3 * Xr), ne = [], B0 = fr.length ? fr.length : v.numFrames, aa = B0, Oe = new rr(v), de = k.getFontSize(v), tt = v.textXCoordinate ? v.textXCoordinate : Tr === "left" ? 1 : Tr === "right" ? lr : lr / 2, Ce = v.textYCoordinate ? v.textYCoordinate : Fr === "top" ? 1 : Fr === "center" ? Wr / 2 : Wr, yn = ar + " " + de + " " + J, he = F ? Math.floor(F.scaledWidth / 2) : 0, ta = F ? u0 - F.scaledWidth : 0, ha = F ? Math.floor(F.scaledHeight / 2) : 0, Ta = F ? o0 - F.scaledHeight : 0, nt = function se() {
|
|
27428
27428
|
function xr() {
|
|
27429
27429
|
try {
|
|
27430
|
-
ta > u0 && (ta = u0), Ta > o0 && (Ta = o0), 0 > he && (he = 0), 0 > ha && (ha = 0), y.filter =
|
|
27430
|
+
ta > u0 && (ta = u0), Ta > o0 && (Ta = o0), 0 > he && (he = 0), 0 > ha && (ha = 0), y.filter = D, y.drawImage(Ir, he, ha, ta, Ta, 0, 0, lr, Wr), Ar();
|
|
27431
27431
|
} catch (cr) {
|
|
27432
27432
|
if (cr.name !== "NS_ERROR_NOT_AVAILABLE")
|
|
27433
27433
|
throw cr;
|
|
@@ -27481,11 +27481,11 @@ var pg = { exports: {} };
|
|
|
27481
27481
|
I.count = I.count || 0, Q.loadedData === !0 ? (Q.findVideoSize({ videoElement: R, cameraStream: g, completedCallback: y }), Q.loadedData = !1) : (I.count += 1, I.count > 10 ? Q.findVideoSize({ videoElement: R, cameraStream: g, completedCallback: y }) : I());
|
|
27482
27482
|
}, 0);
|
|
27483
27483
|
}, startStreaming: function(v) {
|
|
27484
|
-
var w = k.isFunction(v.error) ? v.error : k.noop, g = k.isFunction(v.streamed) ? v.streamed : k.noop, y = k.isFunction(v.completed) ? v.completed : k.noop, N = v.crossOrigin, R = v.existingVideo, I = v.lastCameraStream, F = v.options,
|
|
27484
|
+
var w = k.isFunction(v.error) ? v.error : k.noop, g = k.isFunction(v.streamed) ? v.streamed : k.noop, y = k.isFunction(v.completed) ? v.completed : k.noop, N = v.crossOrigin, R = v.existingVideo, I = v.lastCameraStream, F = v.options, D = v.webcamVideoElement, S = k.isElement(R) ? R : D || t.createElement("video");
|
|
27485
27485
|
N && (S.crossOrigin = F.crossOrigin), S.autoplay = !0, S.loop = !0, S.muted = !0, S.addEventListener("loadeddata", function() {
|
|
27486
27486
|
Q.loadedData = !0, F.offset && (S.currentTime = F.offset);
|
|
27487
|
-
}), R ? Q.stream({ videoElement: S, existingVideo: R, completedCallback: y }) : I ? Q.stream({ videoElement: S, cameraStream: I, streamedCallback: g, completedCallback: y }) : k.getUserMedia({ video: !0 }, function(
|
|
27488
|
-
Q.stream({ videoElement: S, cameraStream:
|
|
27487
|
+
}), R ? Q.stream({ videoElement: S, existingVideo: R, completedCallback: y }) : I ? Q.stream({ videoElement: S, cameraStream: I, streamedCallback: g, completedCallback: y }) : k.getUserMedia({ video: !0 }, function(J) {
|
|
27488
|
+
Q.stream({ videoElement: S, cameraStream: J, streamedCallback: g, completedCallback: y });
|
|
27489
27489
|
}, w);
|
|
27490
27490
|
}, startVideoStreaming: function(v) {
|
|
27491
27491
|
var w = arguments.length > 1 && arguments[1] !== i ? arguments[1] : {}, g = w.timeout !== i ? w.timeout : 0, y = w.callback, N = w.webcamVideoElement, R = void 0;
|
|
@@ -27496,13 +27496,13 @@ var pg = { exports: {} };
|
|
|
27496
27496
|
}, streamed: function() {
|
|
27497
27497
|
clearTimeout(R);
|
|
27498
27498
|
}, completed: function() {
|
|
27499
|
-
var I = arguments.length > 0 && arguments[0] !== i ? arguments[0] : {}, F = I.cameraStream,
|
|
27500
|
-
v({ cameraStream: F, videoElement:
|
|
27499
|
+
var I = arguments.length > 0 && arguments[0] !== i ? arguments[0] : {}, F = I.cameraStream, D = I.videoElement, S = I.videoHeight, J = I.videoWidth;
|
|
27500
|
+
v({ cameraStream: F, videoElement: D, videoHeight: S, videoWidth: J });
|
|
27501
27501
|
}, lastCameraStream: w.lastCameraStream, webcamVideoElement: N, crossOrigin: w.crossOrigin, options: w });
|
|
27502
27502
|
}, stopVideoStreaming: function(v) {
|
|
27503
27503
|
v = k.isObject(v) ? v : {};
|
|
27504
|
-
var w = v, g = w.keepCameraOn, y = w.videoElement, N = w.webcamVideoElement, R = v.cameraStream || {}, I = R.getTracks ? R.getTracks() || [] : [], F = !!I.length,
|
|
27505
|
-
!g && F && k.isFunction(
|
|
27504
|
+
var w = v, g = w.keepCameraOn, y = w.videoElement, N = w.webcamVideoElement, R = v.cameraStream || {}, I = R.getTracks ? R.getTracks() || [] : [], F = !!I.length, D = I[0];
|
|
27505
|
+
!g && F && k.isFunction(D.stop) && D.stop(), k.isElement(y) && !N && (y.pause(), k.isFunction(k.URL.revokeObjectURL) && !k.webWorkerError && y.src && k.URL.revokeObjectURL(y.src), k.removeElement(y));
|
|
27506
27506
|
} }, P = { utils: $, error: L, defaultOptions: K, createGIF: B, takeSnapShot: x, stopVideoStreaming: b, isSupported: o, isWebCamGIFSupported: A, isExistingVideoGIFSupported: s, isExistingImagesGIFSupported: f, VERSION: "0.4.5" };
|
|
27507
27507
|
r.exports = P;
|
|
27508
27508
|
})(typeof window < "u" ? window : {}, typeof document < "u" ? document : { createElement: function() {
|
|
@@ -27770,14 +27770,14 @@ const z2 = d2(
|
|
|
27770
27770
|
placeholder: m = i ? "Select files" : "Select file",
|
|
27771
27771
|
..._
|
|
27772
27772
|
}, E) => {
|
|
27773
|
-
const [B, x] = e0([]), [k, $] = e0(!1), { toast: O } = Fo(), L = Ye(0),
|
|
27773
|
+
const [B, x] = e0([]), [k, $] = e0(!1), { toast: O } = Fo(), L = Ye(0), z = Ye(null), V = c || `file-field-${r.toLowerCase().replace(/\s+/g, "-")}`, K = async (y) => {
|
|
27774
27774
|
try {
|
|
27775
27775
|
const N = await rT(y), R = N;
|
|
27776
27776
|
R.preview = URL.createObjectURL(N), x((I) => {
|
|
27777
27777
|
if (!I.includes(y))
|
|
27778
27778
|
return URL.revokeObjectURL(R.preview), I;
|
|
27779
|
-
const
|
|
27780
|
-
return
|
|
27779
|
+
const D = [...I.filter((J) => J !== y), R], S = new DataTransfer();
|
|
27780
|
+
return D.forEach((J) => S.items.add(J)), h == null || h(S.files), D;
|
|
27781
27781
|
});
|
|
27782
27782
|
} catch (N) {
|
|
27783
27783
|
console.error("HEIC convert failed:", N), x([...B]);
|
|
@@ -27785,10 +27785,10 @@ const z2 = d2(
|
|
|
27785
27785
|
}, j = async (y) => {
|
|
27786
27786
|
const N = [], R = [];
|
|
27787
27787
|
for (const I of y) {
|
|
27788
|
-
const F = I.name.toLowerCase().endsWith(".heic") || I.name.toLowerCase().endsWith(".heif"),
|
|
27789
|
-
if (
|
|
27790
|
-
const
|
|
27791
|
-
R.push(
|
|
27788
|
+
const F = I.name.toLowerCase().endsWith(".heic") || I.name.toLowerCase().endsWith(".heif"), D = I.type.startsWith("image/"), S = I;
|
|
27789
|
+
if (D ? S.preview = URL.createObjectURL(I) : S.preview = void 0, N.push(S), F) {
|
|
27790
|
+
const J = K(S);
|
|
27791
|
+
R.push(J);
|
|
27792
27792
|
}
|
|
27793
27793
|
}
|
|
27794
27794
|
return R.forEach((I) => d == null ? void 0 : d(I)), N;
|
|
@@ -27811,15 +27811,15 @@ const z2 = d2(
|
|
|
27811
27811
|
});
|
|
27812
27812
|
return;
|
|
27813
27813
|
}
|
|
27814
|
-
const
|
|
27814
|
+
const D = await j(I), S = N ? [...B, ...D] : D;
|
|
27815
27815
|
x(S);
|
|
27816
27816
|
try {
|
|
27817
|
-
const
|
|
27818
|
-
S.forEach((ar) =>
|
|
27817
|
+
const J = new DataTransfer();
|
|
27818
|
+
S.forEach((ar) => J.items.add(ar)), h == null || h(J.files);
|
|
27819
27819
|
} catch {
|
|
27820
27820
|
h == null || h(S);
|
|
27821
27821
|
}
|
|
27822
|
-
|
|
27822
|
+
z.current && (z.current.value = "");
|
|
27823
27823
|
},
|
|
27824
27824
|
[B, o, n, A, h, i]
|
|
27825
27825
|
), Y = z0((y) => {
|
|
@@ -27837,15 +27837,15 @@ const z2 = d2(
|
|
|
27837
27837
|
[f, rr, i, B.length]
|
|
27838
27838
|
), v = z0(() => {
|
|
27839
27839
|
var y;
|
|
27840
|
-
f || (y =
|
|
27840
|
+
f || (y = z.current) == null || y.click();
|
|
27841
27841
|
}, [f]), w = z0(() => {
|
|
27842
27842
|
var y;
|
|
27843
|
-
f || (y =
|
|
27843
|
+
f || (y = z.current) == null || y.click();
|
|
27844
27844
|
}, [f]), g = z0(
|
|
27845
27845
|
(y) => {
|
|
27846
27846
|
const N = B.filter((R, I) => I !== y);
|
|
27847
27847
|
if (x(N), N.length === 0)
|
|
27848
|
-
h == null || h(null),
|
|
27848
|
+
h == null || h(null), z.current && (z.current.value = "");
|
|
27849
27849
|
else {
|
|
27850
27850
|
const R = new DataTransfer();
|
|
27851
27851
|
N.forEach((I) => R.items.add(I)), h == null || h(R.files);
|
|
@@ -27858,15 +27858,15 @@ const z2 = d2(
|
|
|
27858
27858
|
y.preview && URL.revokeObjectURL(y.preview);
|
|
27859
27859
|
});
|
|
27860
27860
|
}, [B]), /* @__PURE__ */ X("div", { className: Rb("space-y-2", s), children: [
|
|
27861
|
-
/* @__PURE__ */ X(Gl, { htmlFor:
|
|
27861
|
+
/* @__PURE__ */ X(Gl, { htmlFor: V, className: "font-medium text-gray-700", children: [
|
|
27862
27862
|
r,
|
|
27863
27863
|
t && /* @__PURE__ */ l("span", { className: "ml-1 text-red-500", children: "*" })
|
|
27864
27864
|
] }),
|
|
27865
27865
|
/* @__PURE__ */ l(
|
|
27866
27866
|
"input",
|
|
27867
27867
|
{
|
|
27868
|
-
ref:
|
|
27869
|
-
id:
|
|
27868
|
+
ref: z,
|
|
27869
|
+
id: V,
|
|
27870
27870
|
type: "file",
|
|
27871
27871
|
accept: n,
|
|
27872
27872
|
multiple: i,
|
|
@@ -27876,7 +27876,7 @@ const z2 = d2(
|
|
|
27876
27876
|
const N = i && B.length > 0;
|
|
27877
27877
|
rr(y.target.files, N);
|
|
27878
27878
|
},
|
|
27879
|
-
"aria-describedby": e ? `${
|
|
27879
|
+
"aria-describedby": e ? `${V}-error` : a ? `${V}-hint` : void 0,
|
|
27880
27880
|
..._
|
|
27881
27881
|
}
|
|
27882
27882
|
),
|
|
@@ -27957,7 +27957,7 @@ const z2 = d2(
|
|
|
27957
27957
|
] })
|
|
27958
27958
|
}
|
|
27959
27959
|
),
|
|
27960
|
-
e && /* @__PURE__ */ l("p", { id: `${
|
|
27960
|
+
e && /* @__PURE__ */ l("p", { id: `${V}-error`, role: "alert", className: "text-sm text-red-500", children: e })
|
|
27961
27961
|
] });
|
|
27962
27962
|
}
|
|
27963
27963
|
);
|
|
@@ -28048,7 +28048,7 @@ const ol = 5, tT = 10, FA = {
|
|
|
28048
28048
|
multiple: !0,
|
|
28049
28049
|
maxFiles: ol,
|
|
28050
28050
|
maxSize: tT * 1024 * 1024,
|
|
28051
|
-
accept: "
|
|
28051
|
+
accept: "image/*,application/pdf,.pdf",
|
|
28052
28052
|
placeholder: "Drop files here or click to upload",
|
|
28053
28053
|
hint: d.description,
|
|
28054
28054
|
error: p,
|
|
@@ -30461,10 +30461,10 @@ function jP(r, e) {
|
|
|
30461
30461
|
}, L = function(P) {
|
|
30462
30462
|
var v;
|
|
30463
30463
|
(v = a.onDayPointerEnter) === null || v === void 0 || v.call(a, r, e, P);
|
|
30464
|
-
},
|
|
30464
|
+
}, z = function(P) {
|
|
30465
30465
|
var v;
|
|
30466
30466
|
(v = a.onDayPointerLeave) === null || v === void 0 || v.call(a, r, e, P);
|
|
30467
|
-
},
|
|
30467
|
+
}, V = function(P) {
|
|
30468
30468
|
var v;
|
|
30469
30469
|
(v = a.onDayTouchCancel) === null || v === void 0 || v.call(a, r, e, P);
|
|
30470
30470
|
}, K = function(P) {
|
|
@@ -30517,8 +30517,8 @@ function jP(r, e) {
|
|
|
30517
30517
|
onMouseEnter: $,
|
|
30518
30518
|
onMouseLeave: O,
|
|
30519
30519
|
onPointerEnter: L,
|
|
30520
|
-
onPointerLeave:
|
|
30521
|
-
onTouchCancel:
|
|
30520
|
+
onPointerLeave: z,
|
|
30521
|
+
onTouchCancel: V,
|
|
30522
30522
|
onTouchEnd: K,
|
|
30523
30523
|
onTouchMove: j,
|
|
30524
30524
|
onTouchStart: rr
|
|
@@ -31326,7 +31326,7 @@ const cO = ii({
|
|
|
31326
31326
|
label: "Fulfillment Agreement",
|
|
31327
31327
|
placeholder: "Upload fulfillment agreement",
|
|
31328
31328
|
hint: "Upload fully executed fulfillment agreement with 3rd party",
|
|
31329
|
-
accept: "
|
|
31329
|
+
accept: "image/*,application/pdf,.pdf",
|
|
31330
31330
|
onFileSelect: (p) => h("fulfillment_agreement", p),
|
|
31331
31331
|
error: (d = i.formState.errors.fulfillment_agreement) == null ? void 0 : d.message,
|
|
31332
31332
|
isSubmitting: o,
|
|
@@ -31367,7 +31367,7 @@ const cO = ii({
|
|
|
31367
31367
|
label: "Fulfillment Agreement for Other Companies",
|
|
31368
31368
|
placeholder: "Upload fulfillment agreement",
|
|
31369
31369
|
hint: "Upload fully executed fulfillment agreement",
|
|
31370
|
-
accept: "
|
|
31370
|
+
accept: "image/*,application/pdf,.pdf",
|
|
31371
31371
|
onFileSelect: (p) => h("other_fulfillment_agreement", p),
|
|
31372
31372
|
error: (d = i.formState.errors.other_fulfillment_agreement) == null ? void 0 : d.message,
|
|
31373
31373
|
isSubmitting: o,
|
|
@@ -31442,7 +31442,7 @@ const cO = ii({
|
|
|
31442
31442
|
label: "Certificate of Analysis",
|
|
31443
31443
|
placeholder: "Upload COA document",
|
|
31444
31444
|
hint: "Upload the Certificate of Analysis document",
|
|
31445
|
-
accept: "
|
|
31445
|
+
accept: "image/*,application/pdf,.pdf",
|
|
31446
31446
|
onFileSelect: (p) => h("coa_document", p),
|
|
31447
31447
|
error: (d = i.formState.errors.coa_document) == null ? void 0 : d.message,
|
|
31448
31448
|
isSubmitting: o,
|
|
@@ -31625,12 +31625,12 @@ const FO = async ({
|
|
|
31625
31625
|
setCurrentStep: c,
|
|
31626
31626
|
toast: h
|
|
31627
31627
|
}) => {
|
|
31628
|
-
var k, $, O, L,
|
|
31628
|
+
var k, $, O, L, z;
|
|
31629
31629
|
if (!r)
|
|
31630
31630
|
return h({ title: "Error", description: "KYB ID missing.", variant: "destructive" }), !1;
|
|
31631
|
-
const d = (
|
|
31632
|
-
if (!
|
|
31633
|
-
const K = Object.entries(
|
|
31631
|
+
const d = (V) => {
|
|
31632
|
+
if (!V) return !1;
|
|
31633
|
+
const K = Object.entries(V);
|
|
31634
31634
|
return K.length === 0 || K.length === 1 && K[0][0] === "document_type" ? !1 : K.some(([j, rr]) => !(rr == null || typeof rr == "string" && rr.trim() === ""));
|
|
31635
31635
|
}, p = !!((k = t.full_name) != null && k.trim()), b = !!(($ = t.title) != null && $.trim()), m = !!t.birth, _ = !!((O = t.phone_number) != null && O.trim()), E = !!t.id_photo, B = n === "passport" ? !0 : !!t.id_photo_back, x = !!t.selfie_photo;
|
|
31636
31636
|
if (!p || !b || !m || !_)
|
|
@@ -31655,10 +31655,10 @@ const FO = async ({
|
|
|
31655
31655
|
{ status: "pending" },
|
|
31656
31656
|
{ headers: { "X-API-Key": a } }
|
|
31657
31657
|
), !0;
|
|
31658
|
-
} catch (
|
|
31659
|
-
return console.error("Failed to update KYB status:",
|
|
31658
|
+
} catch (V) {
|
|
31659
|
+
return console.error("Failed to update KYB status:", V), h({
|
|
31660
31660
|
title: "Submission Failed",
|
|
31661
|
-
description: ((
|
|
31661
|
+
description: ((z = (L = V.response) == null ? void 0 : L.data) == null ? void 0 : z.message) || "Could not submit KYB.",
|
|
31662
31662
|
variant: "destructive"
|
|
31663
31663
|
}), !1;
|
|
31664
31664
|
}
|
|
@@ -31700,14 +31700,14 @@ const FO = async ({
|
|
|
31700
31700
|
tax_identity_number: "",
|
|
31701
31701
|
corporate_type: "",
|
|
31702
31702
|
date_of_establishment: null
|
|
31703
|
-
}), [L,
|
|
31703
|
+
}), [L, z] = e0({
|
|
31704
31704
|
street: "",
|
|
31705
31705
|
number: "",
|
|
31706
31706
|
postal_code: "",
|
|
31707
31707
|
city: "",
|
|
31708
31708
|
address_country: "",
|
|
31709
31709
|
state: ""
|
|
31710
|
-
}), [
|
|
31710
|
+
}), [V, K] = e0({
|
|
31711
31711
|
industry: "",
|
|
31712
31712
|
business_model: "",
|
|
31713
31713
|
annual_sales_volume: "",
|
|
@@ -31747,7 +31747,7 @@ const FO = async ({
|
|
|
31747
31747
|
}, [o, A, h == null ? void 0 : h.enable_business_questionnaire]);
|
|
31748
31748
|
ge(() => {
|
|
31749
31749
|
(async () => {
|
|
31750
|
-
var F,
|
|
31750
|
+
var F, D, S, J, ar, q;
|
|
31751
31751
|
if (!i || !r || !e || !h) {
|
|
31752
31752
|
b(!1);
|
|
31753
31753
|
return;
|
|
@@ -31773,14 +31773,14 @@ const FO = async ({
|
|
|
31773
31773
|
if ((F = T.personal_details) != null && F.document_type) {
|
|
31774
31774
|
const Ir = T.personal_details.document_type;
|
|
31775
31775
|
Zr = jb[Ir] || "", k(Zr);
|
|
31776
|
-
} else if ((
|
|
31776
|
+
} else if ((D = T.personal_details) != null && D.id_photo) {
|
|
31777
31777
|
const Ir = Nu.find((o0) => T.personal_details.id_photo.includes(o0.id));
|
|
31778
31778
|
Ir && (Zr = Ir.id, k(Zr));
|
|
31779
31779
|
}
|
|
31780
31780
|
const Tr = !fr(T.personal_details) || !fr(T.business_information) || !fr(T.business_address) || !fr(T.company_activity) || !fr(T.questionary) || !fr(T.company_documents);
|
|
31781
31781
|
let Fr = "landing";
|
|
31782
31782
|
if (Tr) {
|
|
31783
|
-
const Ir = T.personal_details || {}, o0 = Ir.document_type ? jb[Ir.document_type] : Zr, u0 = !!((S = Ir.full_name) != null && S.trim()), Z = !!((
|
|
31783
|
+
const Ir = T.personal_details || {}, o0 = Ir.document_type ? jb[Ir.document_type] : Zr, u0 = !!((S = Ir.full_name) != null && S.trim()), Z = !!((J = Ir.email) != null && J.trim()), M = !!((ar = Ir.title) != null && ar.trim()), U = !!Ir.birth, nr = !!((q = Ir.phone_number) != null && q.trim()), ir = !!Ir.id_photo, tr = o0 === "passport" ? !0 : !!Ir.id_photo_back, lr = !!Ir.selfie_photo;
|
|
31784
31784
|
!u0 || !Z || !M || !U || !nr ? Fr = "personal-details" : o0 ? ir ? tr ? lr ? fr(T.business_information) ? Fr = "business-information" : fr(T.business_address) ? Fr = "business-address" : fr(T.company_activity) ? Fr = "company-activity" : h.enable_business_questionnaire && fr(T.questionary) ? Fr = "questionary" : fr(T.company_documents) ? Fr = "company-documents" : Fr = "processing" : Fr = "pre-selfie" : Fr = "id-back" : Fr = "id-front" : Fr = "document-selection";
|
|
31785
31785
|
}
|
|
31786
31786
|
u(Fr), T.personal_details && B({
|
|
@@ -31793,7 +31793,7 @@ const FO = async ({
|
|
|
31793
31793
|
id_photo: T.personal_details.id_photo || null,
|
|
31794
31794
|
id_photo_back: T.personal_details.id_photo_back || null,
|
|
31795
31795
|
document_type: T.personal_details.document_type || ""
|
|
31796
|
-
}), T.business_information && O({ ...T.business_information }), T.business_address &&
|
|
31796
|
+
}), T.business_information && O({ ...T.business_information }), T.business_address && z({ ...T.business_address }), T.company_activity && K({ ...T.company_activity }), T.company_documents && rr({ ...T.company_documents }), T.questionary && or({ ...T.questionary });
|
|
31797
31797
|
} catch (er) {
|
|
31798
31798
|
console.error("Failed to resume KYB:", er), c({ title: "Resume Failed", description: "Starting fresh.", variant: "destructive" });
|
|
31799
31799
|
} finally {
|
|
@@ -31843,10 +31843,10 @@ const FO = async ({
|
|
|
31843
31843
|
pO,
|
|
31844
31844
|
{
|
|
31845
31845
|
data: E,
|
|
31846
|
-
onDataChange: (F) => B((
|
|
31846
|
+
onDataChange: (F) => B((D) => ({ ...D, ...F })),
|
|
31847
31847
|
onContinue: async (F) => {
|
|
31848
|
-
let
|
|
31849
|
-
if (!
|
|
31848
|
+
let D = m;
|
|
31849
|
+
if (!D)
|
|
31850
31850
|
try {
|
|
31851
31851
|
const ar = await y0.post(
|
|
31852
31852
|
`${r}/api/kyb/`,
|
|
@@ -31861,7 +31861,7 @@ const FO = async ({
|
|
|
31861
31861
|
});
|
|
31862
31862
|
return;
|
|
31863
31863
|
}
|
|
31864
|
-
|
|
31864
|
+
D = ar.data.id, _(D);
|
|
31865
31865
|
} catch {
|
|
31866
31866
|
c({ title: "KYB Creation Failed", description: "Server error.", variant: "destructive" });
|
|
31867
31867
|
return;
|
|
@@ -31871,7 +31871,7 @@ const FO = async ({
|
|
|
31871
31871
|
"personal_details",
|
|
31872
31872
|
S,
|
|
31873
31873
|
{},
|
|
31874
|
-
{ apiEndpoint: r, apiKey: e, id:
|
|
31874
|
+
{ apiEndpoint: r, apiKey: e, id: D, flow: "kyb" }
|
|
31875
31875
|
) ? u("document-selection") : c({ title: "Save Failed", description: "Personal details not saved.", variant: "destructive" });
|
|
31876
31876
|
},
|
|
31877
31877
|
onBack: () => u("landing"),
|
|
@@ -31885,9 +31885,9 @@ const FO = async ({
|
|
|
31885
31885
|
selectedDocumentType: x,
|
|
31886
31886
|
onDocumentTypeChange: async (F) => {
|
|
31887
31887
|
k(F);
|
|
31888
|
-
const
|
|
31888
|
+
const D = Xb[F], S = {
|
|
31889
31889
|
...E,
|
|
31890
|
-
document_type:
|
|
31890
|
+
document_type: D,
|
|
31891
31891
|
id_photo: null,
|
|
31892
31892
|
id_photo_back: null
|
|
31893
31893
|
};
|
|
@@ -31909,9 +31909,9 @@ const FO = async ({
|
|
|
31909
31909
|
currentStep: s,
|
|
31910
31910
|
onRetake: () => B((F) => ({ ...F, id_photo: null })),
|
|
31911
31911
|
onConfirm: async (F) => {
|
|
31912
|
-
const
|
|
31912
|
+
const D = x ? Xb[x] : "", S = { ...E, id_photo: F, document_type: D };
|
|
31913
31913
|
B(S), await ue("personal_details", {
|
|
31914
|
-
document_type:
|
|
31914
|
+
document_type: D
|
|
31915
31915
|
}, { id_photo: F }, g) ? u(x === "passport" ? "pre-selfie" : "id-back") : c({ title: "Upload Failed", description: "ID front not saved.", variant: "destructive" });
|
|
31916
31916
|
},
|
|
31917
31917
|
onBack: () => u("document-selection")
|
|
@@ -31928,8 +31928,8 @@ const FO = async ({
|
|
|
31928
31928
|
currentStep: s,
|
|
31929
31929
|
onRetake: () => B((F) => ({ ...F, id_photo_back: null })),
|
|
31930
31930
|
onConfirm: async (F) => {
|
|
31931
|
-
const
|
|
31932
|
-
B(
|
|
31931
|
+
const D = { ...E, id_photo_back: F };
|
|
31932
|
+
B(D), await ue("personal_details", {}, { id_photo_back: F }, g) ? u("pre-selfie") : c({ title: "Upload Failed", description: "ID back not saved.", variant: "destructive" });
|
|
31933
31933
|
},
|
|
31934
31934
|
onBack: () => u("id-front")
|
|
31935
31935
|
}
|
|
@@ -31952,8 +31952,8 @@ const FO = async ({
|
|
|
31952
31952
|
currentStep: s,
|
|
31953
31953
|
onRetake: () => B((F) => ({ ...F, selfie_photo: null })),
|
|
31954
31954
|
onConfirm: async (F) => {
|
|
31955
|
-
const
|
|
31956
|
-
B(
|
|
31955
|
+
const D = { ...E, selfie_photo: F };
|
|
31956
|
+
B(D), await ue("personal_details", {}, { selfie_photo: F }, g) ? u("business-information") : c({ title: "Upload Failed", description: "Selfie not saved.", variant: "destructive" });
|
|
31957
31957
|
},
|
|
31958
31958
|
onBack: () => u("pre-selfie")
|
|
31959
31959
|
}
|
|
@@ -31963,7 +31963,7 @@ const FO = async ({
|
|
|
31963
31963
|
bO,
|
|
31964
31964
|
{
|
|
31965
31965
|
data: $,
|
|
31966
|
-
onDataChange: (F) => O((
|
|
31966
|
+
onDataChange: (F) => O((D) => ({ ...D, ...F })),
|
|
31967
31967
|
onContinue: async (F) => {
|
|
31968
31968
|
await ue("business_information", F, {}, g) ? u("business-address") : c({ title: "Save Failed", description: "Business info not saved.", variant: "destructive" });
|
|
31969
31969
|
},
|
|
@@ -31977,7 +31977,7 @@ const FO = async ({
|
|
|
31977
31977
|
{
|
|
31978
31978
|
data: L,
|
|
31979
31979
|
isBusinessAddress: !0,
|
|
31980
|
-
onDataChange: (F) =>
|
|
31980
|
+
onDataChange: (F) => z((D) => ({ ...D, ...F })),
|
|
31981
31981
|
onContinue: async (F) => {
|
|
31982
31982
|
if (!await ue("business_address", F, {}, g)) {
|
|
31983
31983
|
c({
|
|
@@ -31997,16 +31997,16 @@ const FO = async ({
|
|
|
31997
31997
|
return y ? /* @__PURE__ */ l(
|
|
31998
31998
|
uT,
|
|
31999
31999
|
{
|
|
32000
|
-
data:
|
|
32001
|
-
onDataChange: (F) => K((
|
|
32000
|
+
data: V,
|
|
32001
|
+
onDataChange: (F) => K((D) => ({ ...D, ...F })),
|
|
32002
32002
|
onContinue: async (F) => {
|
|
32003
|
-
const
|
|
32003
|
+
const D = {
|
|
32004
32004
|
industry: F.industry || "",
|
|
32005
32005
|
business_model: F.business_model || "",
|
|
32006
32006
|
annual_sales_volume: F.annual_sales_volume || "",
|
|
32007
32007
|
website_url: F.website_url || ""
|
|
32008
32008
|
};
|
|
32009
|
-
if (!await ue("company_activity",
|
|
32009
|
+
if (!await ue("company_activity", D, {}, g)) {
|
|
32010
32010
|
c({
|
|
32011
32011
|
title: "Save Failed",
|
|
32012
32012
|
description: "Activity not saved.",
|
|
@@ -32025,12 +32025,12 @@ const FO = async ({
|
|
|
32025
32025
|
CO,
|
|
32026
32026
|
{
|
|
32027
32027
|
data: Y,
|
|
32028
|
-
onDataChange: (F) => or((
|
|
32028
|
+
onDataChange: (F) => or((D) => ({ ...D, ...F })),
|
|
32029
32029
|
onContinue: async (F) => {
|
|
32030
|
-
const
|
|
32031
|
-
F.fulfillment_agreement instanceof File && (
|
|
32032
|
-
const { fulfillment_agreement: S, other_fulfillment_agreement:
|
|
32033
|
-
if (!await ue("questionary", q,
|
|
32030
|
+
const D = {};
|
|
32031
|
+
F.fulfillment_agreement instanceof File && (D.fulfillment_agreement = F.fulfillment_agreement), F.other_fulfillment_agreement instanceof File && (D.other_fulfillment_agreement = F.other_fulfillment_agreement), F.coa_document instanceof File && (D.coa_document = F.coa_document);
|
|
32032
|
+
const { fulfillment_agreement: S, other_fulfillment_agreement: J, coa_document: ar, ...q } = F;
|
|
32033
|
+
if (!await ue("questionary", q, D, g)) {
|
|
32034
32034
|
c({
|
|
32035
32035
|
title: "Save Failed",
|
|
32036
32036
|
description: "Questionnaire not saved.",
|
|
@@ -32051,19 +32051,19 @@ const FO = async ({
|
|
|
32051
32051
|
iT,
|
|
32052
32052
|
{
|
|
32053
32053
|
data: j,
|
|
32054
|
-
onDataChange: (F) => rr((
|
|
32054
|
+
onDataChange: (F) => rr((D) => ({ ...D, ...F })),
|
|
32055
32055
|
onContinue: async (F) => {
|
|
32056
|
-
const
|
|
32056
|
+
const D = {};
|
|
32057
32057
|
[
|
|
32058
32058
|
"bank_statement",
|
|
32059
32059
|
"company_structure",
|
|
32060
32060
|
"certificate_of_registration",
|
|
32061
32061
|
"void_cheque",
|
|
32062
32062
|
"business_license"
|
|
32063
|
-
].forEach((
|
|
32064
|
-
const ar = F[
|
|
32065
|
-
ar != null && ar.length && (
|
|
32066
|
-
}), await ue("company_documents", {},
|
|
32063
|
+
].forEach((J) => {
|
|
32064
|
+
const ar = F[J];
|
|
32065
|
+
ar != null && ar.length && (D[J] = ar.filter((q) => q instanceof File));
|
|
32066
|
+
}), await ue("company_documents", {}, D, g) ? u("processing") : c({
|
|
32067
32067
|
title: "Save Failed",
|
|
32068
32068
|
description: "Documents not saved.",
|
|
32069
32069
|
variant: "destructive"
|
|
@@ -32095,7 +32095,7 @@ const FO = async ({
|
|
|
32095
32095
|
selectedDocumentType: x,
|
|
32096
32096
|
businessInformation: $,
|
|
32097
32097
|
businessAddress: L,
|
|
32098
|
-
companyActivity:
|
|
32098
|
+
companyActivity: V,
|
|
32099
32099
|
questionary: Y,
|
|
32100
32100
|
companyDocuments: j,
|
|
32101
32101
|
settingsData: h,
|
|
@@ -32105,7 +32105,7 @@ const FO = async ({
|
|
|
32105
32105
|
personal_details: E,
|
|
32106
32106
|
business_information: $,
|
|
32107
32107
|
business_address: L,
|
|
32108
|
-
company_activity:
|
|
32108
|
+
company_activity: V,
|
|
32109
32109
|
company_documents: j,
|
|
32110
32110
|
questionary: Y
|
|
32111
32111
|
}), u("done"));
|