mainstack-payments 0.4.2 → 0.4.4
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as S, jsxs as W, Fragment as dn } from "react/jsx-runtime";
|
|
2
|
-
import { Colors as
|
|
2
|
+
import { Colors as qt, CancelFilledIcon as au, Input as Ta, CountrySelect as G0, Button as pn, LockIcon as W0, customSnackbar as At, SnackbarType as Tt, GooglePayIcon as H0, PhoneNumberInput as K0, InfoIcon as rc, Paragraph as Y0, NotificationsFilledIcon as Ff, ClickTooltip as Mf, CloseIcon as q0, Loader as Z0, MainstackProvider as X0, CustomSnackbarContainer as J0 } from "mainstack-design-system";
|
|
3
3
|
import * as R from "react";
|
|
4
|
-
import xe, { forwardRef as on, useContext as Ve, createContext as
|
|
4
|
+
import xe, { forwardRef as on, useContext as Ve, createContext as Jt, useLayoutEffect as ni, useEffect as he, useState as ie, useRef as Te, useMemo as rt, useCallback as ue, useReducer as Q0, useInsertionEffect as nd, createElement as Sg, useId as Wa, cloneElement as eS, Children as tS, isValidElement as xg, memo as nS, useSyncExternalStore as rS, PureComponent as aS, useImperativeHandle as oS } from "react";
|
|
5
5
|
import { createPortal as wg } from "react-dom";
|
|
6
6
|
import iS from "axios";
|
|
7
7
|
function sS(e) {
|
|
@@ -1702,7 +1702,7 @@ function xn(e = {}) {
|
|
|
1702
1702
|
providerName: a = "Provider",
|
|
1703
1703
|
errorMessage: o,
|
|
1704
1704
|
defaultValue: i
|
|
1705
|
-
} = e, s =
|
|
1705
|
+
} = e, s = Jt(i);
|
|
1706
1706
|
s.displayName = t;
|
|
1707
1707
|
function l() {
|
|
1708
1708
|
var c;
|
|
@@ -1807,7 +1807,7 @@ function zg() {
|
|
|
1807
1807
|
);
|
|
1808
1808
|
return e;
|
|
1809
1809
|
}
|
|
1810
|
-
var pd =
|
|
1810
|
+
var pd = Jt({});
|
|
1811
1811
|
pd.displayName = "ColorModeContext";
|
|
1812
1812
|
function hd() {
|
|
1813
1813
|
const e = Ve(pd);
|
|
@@ -2953,7 +2953,7 @@ var Gg = {
|
|
|
2953
2953
|
outline: { transform: ye.outline },
|
|
2954
2954
|
outlineOffset: !0,
|
|
2955
2955
|
outlineColor: x.colors("outlineColor")
|
|
2956
|
-
},
|
|
2956
|
+
}, Kt = {
|
|
2957
2957
|
width: x.sizesT("width"),
|
|
2958
2958
|
inlineSize: x.sizesT("inlineSize"),
|
|
2959
2959
|
height: x.sizes("height"),
|
|
@@ -2998,16 +2998,16 @@ var Gg = {
|
|
|
2998
2998
|
visibility: !0,
|
|
2999
2999
|
isolation: !0
|
|
3000
3000
|
};
|
|
3001
|
-
Object.assign(
|
|
3002
|
-
w:
|
|
3003
|
-
h:
|
|
3004
|
-
minW:
|
|
3005
|
-
maxW:
|
|
3006
|
-
minH:
|
|
3007
|
-
maxH:
|
|
3008
|
-
overscroll:
|
|
3009
|
-
overscrollX:
|
|
3010
|
-
overscrollY:
|
|
3001
|
+
Object.assign(Kt, {
|
|
3002
|
+
w: Kt.width,
|
|
3003
|
+
h: Kt.height,
|
|
3004
|
+
minW: Kt.minWidth,
|
|
3005
|
+
maxW: Kt.maxWidth,
|
|
3006
|
+
minH: Kt.minHeight,
|
|
3007
|
+
maxH: Kt.maxHeight,
|
|
3008
|
+
overscroll: Kt.overscrollBehavior,
|
|
3009
|
+
overscrollX: Kt.overscrollBehaviorX,
|
|
3010
|
+
overscrollY: Kt.overscrollBehaviorY
|
|
3011
3011
|
});
|
|
3012
3012
|
var t1 = {
|
|
3013
3013
|
listStyleType: !0,
|
|
@@ -3895,7 +3895,7 @@ var vd = mn(
|
|
|
3895
3895
|
we,
|
|
3896
3896
|
Jx,
|
|
3897
3897
|
Ks,
|
|
3898
|
-
|
|
3898
|
+
Kt,
|
|
3899
3899
|
Qx,
|
|
3900
3900
|
l1,
|
|
3901
3901
|
e1,
|
|
@@ -3911,7 +3911,7 @@ var vd = mn(
|
|
|
3911
3911
|
t1,
|
|
3912
3912
|
d1
|
|
3913
3913
|
);
|
|
3914
|
-
Object.assign({}, je,
|
|
3914
|
+
Object.assign({}, je, Kt, Ks, Gg, Ao);
|
|
3915
3915
|
var N1 = [...Object.keys(vd), ...Yg], B1 = { ...vd, ...yl }, j1 = (e) => e in B1, L1 = (e) => (t) => {
|
|
3916
3916
|
if (!t.__breakpoints)
|
|
3917
3917
|
return e;
|
|
@@ -6448,7 +6448,7 @@ var { definePartsStyle: Os, defineMultiStyleConfig: IC } = Ne(kw.keys), _o = J("
|
|
|
6448
6448
|
body: xt(JA, e),
|
|
6449
6449
|
footer: QA
|
|
6450
6450
|
}));
|
|
6451
|
-
function
|
|
6451
|
+
function Qt(e) {
|
|
6452
6452
|
return gu(e === "full" ? {
|
|
6453
6453
|
dialog: {
|
|
6454
6454
|
maxW: "100vw",
|
|
@@ -6461,17 +6461,17 @@ function Jt(e) {
|
|
|
6461
6461
|
});
|
|
6462
6462
|
}
|
|
6463
6463
|
var tT = {
|
|
6464
|
-
xs:
|
|
6465
|
-
sm:
|
|
6466
|
-
md:
|
|
6467
|
-
lg:
|
|
6468
|
-
xl:
|
|
6469
|
-
"2xl":
|
|
6470
|
-
"3xl":
|
|
6471
|
-
"4xl":
|
|
6472
|
-
"5xl":
|
|
6473
|
-
"6xl":
|
|
6474
|
-
full:
|
|
6464
|
+
xs: Qt("xs"),
|
|
6465
|
+
sm: Qt("sm"),
|
|
6466
|
+
md: Qt("md"),
|
|
6467
|
+
lg: Qt("lg"),
|
|
6468
|
+
xl: Qt("xl"),
|
|
6469
|
+
"2xl": Qt("2xl"),
|
|
6470
|
+
"3xl": Qt("3xl"),
|
|
6471
|
+
"4xl": Qt("4xl"),
|
|
6472
|
+
"5xl": Qt("5xl"),
|
|
6473
|
+
"6xl": Qt("6xl"),
|
|
6474
|
+
full: Qt("full")
|
|
6475
6475
|
}, nT = HA({
|
|
6476
6476
|
baseStyle: eT,
|
|
6477
6477
|
sizes: tT,
|
|
@@ -7924,7 +7924,7 @@ function G_(e = {}) {
|
|
|
7924
7924
|
strict: t = !0,
|
|
7925
7925
|
errorMessage: n = "useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",
|
|
7926
7926
|
name: r
|
|
7927
|
-
} = e, a =
|
|
7927
|
+
} = e, a = Jt(void 0);
|
|
7928
7928
|
a.displayName = r;
|
|
7929
7929
|
function o() {
|
|
7930
7930
|
var i;
|
|
@@ -7968,7 +7968,7 @@ function K_() {
|
|
|
7968
7968
|
}
|
|
7969
7969
|
);
|
|
7970
7970
|
}
|
|
7971
|
-
var Cd =
|
|
7971
|
+
var Cd = Jt({
|
|
7972
7972
|
getDocument() {
|
|
7973
7973
|
return document;
|
|
7974
7974
|
},
|
|
@@ -8101,11 +8101,11 @@ function Hp(e, t) {
|
|
|
8101
8101
|
n.current = !1;
|
|
8102
8102
|
}), []);
|
|
8103
8103
|
}
|
|
8104
|
-
const xl =
|
|
8104
|
+
const xl = Jt({
|
|
8105
8105
|
transformPagePoint: (e) => e,
|
|
8106
8106
|
isStatic: !1,
|
|
8107
8107
|
reducedMotion: "never"
|
|
8108
|
-
}), wl =
|
|
8108
|
+
}), wl = Jt({}), li = Jt(null), El = typeof document < "u", Cl = El ? ni : he, vv = Jt({ strict: !1 }), Ad = (e) => e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(), tP = "framerAppearId", yv = "data-" + Ad(tP);
|
|
8109
8109
|
function nP(e, t, n, r) {
|
|
8110
8110
|
const { visualElement: a } = Ve(wl), o = Ve(vv), i = Ve(li), s = Ve(xl).reducedMotion, l = Te();
|
|
8111
8111
|
r = r || o.renderer, !l.current && r && (l.current = r(e, {
|
|
@@ -8212,7 +8212,7 @@ function iP(e) {
|
|
|
8212
8212
|
...e[t]
|
|
8213
8213
|
};
|
|
8214
8214
|
}
|
|
8215
|
-
const _d =
|
|
8215
|
+
const _d = Jt({}), Sv = Jt({}), sP = Symbol.for("motionComponentSymbol");
|
|
8216
8216
|
function lP({ preloadedFeatures: e, createVisualElement: t, useRender: n, useVisualState: r, Component: a }) {
|
|
8217
8217
|
e && iP(e);
|
|
8218
8218
|
function o(s, l) {
|
|
@@ -9074,10 +9074,10 @@ function Pl(e, t, n) {
|
|
|
9074
9074
|
const r = e.getProps();
|
|
9075
9075
|
return Id(r, t, n !== void 0 ? n : r.custom, n2(e), r2(e));
|
|
9076
9076
|
}
|
|
9077
|
-
let fi = Ze,
|
|
9077
|
+
let fi = Ze, Xt = Ze;
|
|
9078
9078
|
process.env.NODE_ENV !== "production" && (fi = (e, t) => {
|
|
9079
9079
|
!e && typeof console < "u" && console.warn(t);
|
|
9080
|
-
},
|
|
9080
|
+
}, Xt = (e, t) => {
|
|
9081
9081
|
if (!e)
|
|
9082
9082
|
throw new Error(t);
|
|
9083
9083
|
});
|
|
@@ -9147,11 +9147,11 @@ const u2 = pi(0.42, 0, 1, 1), d2 = pi(0, 0, 0.58, 1), Wv = pi(0.42, 0, 0.58, 1),
|
|
|
9147
9147
|
anticipate: m2
|
|
9148
9148
|
}, rh = (e) => {
|
|
9149
9149
|
if (Array.isArray(e)) {
|
|
9150
|
-
|
|
9150
|
+
Xt(e.length === 4, "Cubic bezier arrays must contain four numerical values.");
|
|
9151
9151
|
const [t, n, r, a] = e;
|
|
9152
9152
|
return pi(t, n, r, a);
|
|
9153
9153
|
} else if (typeof e == "string")
|
|
9154
|
-
return
|
|
9154
|
+
return Xt(nh[e] !== void 0, `Invalid easing type '${e}'`), nh[e];
|
|
9155
9155
|
return e;
|
|
9156
9156
|
}, jd = (e, t) => (n) => !!(ui(n) && yP.test(n) && n.startsWith(e) || t && Object.prototype.hasOwnProperty.call(n, t)), Zv = (e, t, n) => (r) => {
|
|
9157
9157
|
if (!ui(r))
|
|
@@ -9218,7 +9218,7 @@ const _c = (e, t, n) => {
|
|
|
9218
9218
|
}, b2 = [Su, Cr, ba], S2 = (e) => b2.find((t) => t.test(e));
|
|
9219
9219
|
function ah(e) {
|
|
9220
9220
|
const t = S2(e);
|
|
9221
|
-
|
|
9221
|
+
Xt(!!t, `'${e}' is not an animatable color. Use the equivalent color code instead.`);
|
|
9222
9222
|
let n = t.parse(e);
|
|
9223
9223
|
return t === ba && (n = y2(n)), n;
|
|
9224
9224
|
}
|
|
@@ -9327,7 +9327,7 @@ function T2(e, t, n) {
|
|
|
9327
9327
|
}
|
|
9328
9328
|
function sy(e, t, { clamp: n = !0, ease: r, mixer: a } = {}) {
|
|
9329
9329
|
const o = e.length;
|
|
9330
|
-
if (
|
|
9330
|
+
if (Xt(o === t.length, "Both input and output ranges must be the same length"), o === 1)
|
|
9331
9331
|
return () => t[0];
|
|
9332
9332
|
e[0] > e[o - 1] && (e = [...e].reverse(), t = [...t].reverse());
|
|
9333
9333
|
const i = T2(t, r, a), s = i.length, l = (c) => {
|
|
@@ -9556,7 +9556,7 @@ function qo({ autoplay: e = !0, delay: t = 0, driver: n = z2, keyframes: r, type
|
|
|
9556
9556
|
let w;
|
|
9557
9557
|
const E = V2[a] || nl;
|
|
9558
9558
|
let _;
|
|
9559
|
-
E !== nl && typeof r[0] != "number" && (process.env.NODE_ENV !== "production" &&
|
|
9559
|
+
E !== nl && typeof r[0] != "number" && (process.env.NODE_ENV !== "production" && Xt(r.length === 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${r}`), _ = sy([0, 100], r, {
|
|
9560
9560
|
clamp: !1
|
|
9561
9561
|
}), r = [0, 100]);
|
|
9562
9562
|
const C = E({ ...f, keyframes: r });
|
|
@@ -10581,7 +10581,7 @@ const xh = () => ({
|
|
|
10581
10581
|
x: wh(),
|
|
10582
10582
|
y: wh()
|
|
10583
10583
|
});
|
|
10584
|
-
function
|
|
10584
|
+
function Yt(e) {
|
|
10585
10585
|
return [e("x"), e("y")];
|
|
10586
10586
|
}
|
|
10587
10587
|
function by({ top: e, left: t, right: n, bottom: r }) {
|
|
@@ -10685,7 +10685,7 @@ class X$ {
|
|
|
10685
10685
|
const { drag: f, dragPropagation: p, onDragStart: m } = this.getProps();
|
|
10686
10686
|
if (f && !p && (this.openGlobalLock && this.openGlobalLock(), this.openGlobalLock = Dv(f), !this.openGlobalLock))
|
|
10687
10687
|
return;
|
|
10688
|
-
this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0),
|
|
10688
|
+
this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), Yt((v) => {
|
|
10689
10689
|
let y = this.getAxisMotionValue(v).get() || 0;
|
|
10690
10690
|
if (yn.test(y)) {
|
|
10691
10691
|
const { projection: w } = this.visualElement;
|
|
@@ -10708,7 +10708,7 @@ class X$ {
|
|
|
10708
10708
|
return;
|
|
10709
10709
|
}
|
|
10710
10710
|
this.updateAxis("x", d.point, v), this.updateAxis("y", d.point, v), this.visualElement.render(), h && h(u, d);
|
|
10711
|
-
}, s = (u, d) => this.stop(u, d), l = () =>
|
|
10711
|
+
}, s = (u, d) => this.stop(u, d), l = () => Yt((u) => {
|
|
10712
10712
|
var d;
|
|
10713
10713
|
return this.getAnimationState(u) === "paused" && ((d = this.getAxisMotionValue(u).animation) === null || d === void 0 ? void 0 : d.play());
|
|
10714
10714
|
}), { dragSnapToOrigin: c } = this.getProps();
|
|
@@ -10751,7 +10751,7 @@ class X$ {
|
|
|
10751
10751
|
resolveConstraints() {
|
|
10752
10752
|
var t;
|
|
10753
10753
|
const { dragConstraints: n, dragElastic: r } = this.getProps(), a = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(!1) : (t = this.visualElement.projection) === null || t === void 0 ? void 0 : t.layout, o = this.constraints;
|
|
10754
|
-
n && ya(n) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : n && a ? this.constraints = j$(a.layoutBox, n) : this.constraints = !1, this.elastic = U$(r), o !== this.constraints && a && this.constraints && !this.hasMutatedConstraints &&
|
|
10754
|
+
n && ya(n) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : n && a ? this.constraints = j$(a.layoutBox, n) : this.constraints = !1, this.elastic = U$(r), o !== this.constraints && a && this.constraints && !this.hasMutatedConstraints && Yt((i) => {
|
|
10755
10755
|
this.getAxisMotionValue(i) && (this.constraints[i] = V$(a.layoutBox[i], this.constraints[i]));
|
|
10756
10756
|
});
|
|
10757
10757
|
}
|
|
@@ -10760,7 +10760,7 @@ class X$ {
|
|
|
10760
10760
|
if (!t || !ya(t))
|
|
10761
10761
|
return !1;
|
|
10762
10762
|
const r = t.current;
|
|
10763
|
-
|
|
10763
|
+
Xt(r !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");
|
|
10764
10764
|
const { projection: a } = this.visualElement;
|
|
10765
10765
|
if (!a || !a.layout)
|
|
10766
10766
|
return !1;
|
|
@@ -10773,7 +10773,7 @@ class X$ {
|
|
|
10773
10773
|
return i;
|
|
10774
10774
|
}
|
|
10775
10775
|
startAnimation(t) {
|
|
10776
|
-
const { drag: n, dragMomentum: r, dragElastic: a, dragTransition: o, dragSnapToOrigin: i, onDragTransitionEnd: s } = this.getProps(), l = this.constraints || {}, c =
|
|
10776
|
+
const { drag: n, dragMomentum: r, dragElastic: a, dragTransition: o, dragSnapToOrigin: i, onDragTransitionEnd: s } = this.getProps(), l = this.constraints || {}, c = Yt((u) => {
|
|
10777
10777
|
if (!ps(u, n, this.currentDirection))
|
|
10778
10778
|
return;
|
|
10779
10779
|
let d = l && l[u] || {};
|
|
@@ -10798,10 +10798,10 @@ class X$ {
|
|
|
10798
10798
|
return r.start(Vd(t, r, 0, n));
|
|
10799
10799
|
}
|
|
10800
10800
|
stopAnimation() {
|
|
10801
|
-
|
|
10801
|
+
Yt((t) => this.getAxisMotionValue(t).stop());
|
|
10802
10802
|
}
|
|
10803
10803
|
pauseAnimation() {
|
|
10804
|
-
|
|
10804
|
+
Yt((t) => {
|
|
10805
10805
|
var n;
|
|
10806
10806
|
return (n = this.getAxisMotionValue(t).animation) === null || n === void 0 ? void 0 : n.pause();
|
|
10807
10807
|
});
|
|
@@ -10821,7 +10821,7 @@ class X$ {
|
|
|
10821
10821
|
return a || this.visualElement.getValue(t, (r.initial ? r.initial[t] : void 0) || 0);
|
|
10822
10822
|
}
|
|
10823
10823
|
snapToCursor(t) {
|
|
10824
|
-
|
|
10824
|
+
Yt((n) => {
|
|
10825
10825
|
const { drag: r } = this.getProps();
|
|
10826
10826
|
if (!ps(n, r, this.currentDirection))
|
|
10827
10827
|
return;
|
|
@@ -10845,7 +10845,7 @@ class X$ {
|
|
|
10845
10845
|
return;
|
|
10846
10846
|
this.stopAnimation();
|
|
10847
10847
|
const a = { x: 0, y: 0 };
|
|
10848
|
-
|
|
10848
|
+
Yt((i) => {
|
|
10849
10849
|
const s = this.getAxisMotionValue(i);
|
|
10850
10850
|
if (s) {
|
|
10851
10851
|
const l = s.get();
|
|
@@ -10853,7 +10853,7 @@ class X$ {
|
|
|
10853
10853
|
}
|
|
10854
10854
|
});
|
|
10855
10855
|
const { transformTemplate: o } = this.visualElement.getProps();
|
|
10856
|
-
this.visualElement.current.style.transform = o ? o({}, "") : "none", r.root && r.root.updateScroll(), r.updateLayout(), this.resolveConstraints(),
|
|
10856
|
+
this.visualElement.current.style.transform = o ? o({}, "") : "none", r.root && r.root.updateScroll(), r.updateLayout(), this.resolveConstraints(), Yt((i) => {
|
|
10857
10857
|
if (!ps(i, t, null))
|
|
10858
10858
|
return;
|
|
10859
10859
|
const s = this.getAxisMotionValue(i), { min: l, max: c } = this.constraints[i];
|
|
@@ -10873,7 +10873,7 @@ class X$ {
|
|
|
10873
10873
|
}, { projection: a } = this.visualElement, o = a.addEventListener("measure", r);
|
|
10874
10874
|
a && !a.layout && (a.root && a.root.updateScroll(), a.updateLayout()), r();
|
|
10875
10875
|
const i = Pn(window, "resize", () => this.scalePositionWithinConstraints()), s = a.addEventListener("didUpdate", ({ delta: l, hasLayoutChanged: c }) => {
|
|
10876
|
-
this.isDragging && c && (
|
|
10876
|
+
this.isDragging && c && (Yt((u) => {
|
|
10877
10877
|
const d = this.getAxisMotionValue(u);
|
|
10878
10878
|
d && (this.originPoint[u] += l[u].translate, d.set(d.get() + l[u].translate));
|
|
10879
10879
|
}), this.visualElement.render());
|
|
@@ -11669,10 +11669,10 @@ function CF(e) {
|
|
|
11669
11669
|
const n = ((t = e.resumeFrom) === null || t === void 0 ? void 0 : t.snapshot) || e.snapshot;
|
|
11670
11670
|
if (e.isLead() && e.layout && n && e.hasListeners("didUpdate")) {
|
|
11671
11671
|
const { layoutBox: r, measuredBox: a } = e.layout, { animationType: o } = e.options, i = n.source !== e.layout.source;
|
|
11672
|
-
o === "size" ?
|
|
11672
|
+
o === "size" ? Yt((d) => {
|
|
11673
11673
|
const f = i ? n.measuredBox[d] : n.layoutBox[d], p = Nt(f);
|
|
11674
11674
|
f.min = r[d].min, f.max = f.min + p;
|
|
11675
|
-
}) : Fy(o, n.layoutBox, r) &&
|
|
11675
|
+
}) : Fy(o, n.layoutBox, r) && Yt((d) => {
|
|
11676
11676
|
const f = i ? n.measuredBox[d] : n.layoutBox[d], p = Nt(r[d]);
|
|
11677
11677
|
f.max = f.min + p, e.relativeTarget && !e.currentAnimation && (e.isProjectionDirty = !0, e.relativeTarget[d].max = e.relativeTarget[d].min + p);
|
|
11678
11678
|
});
|
|
@@ -11811,7 +11811,7 @@ function zF(e) {
|
|
|
11811
11811
|
}
|
|
11812
11812
|
const VF = 4;
|
|
11813
11813
|
function Pu(e, t, n = 1) {
|
|
11814
|
-
|
|
11814
|
+
Xt(n <= VF, `Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);
|
|
11815
11815
|
const [r, a] = zF(e);
|
|
11816
11816
|
if (!r)
|
|
11817
11817
|
return;
|
|
@@ -11911,7 +11911,7 @@ const qF = (e, t, n) => {
|
|
|
11911
11911
|
const m = f.length, h = f[0] === null ? 1 : 0;
|
|
11912
11912
|
u = f[h], d = co(u);
|
|
11913
11913
|
for (let v = h; v < m && f[v] !== null; v++)
|
|
11914
|
-
p ?
|
|
11914
|
+
p ? Xt(co(f[v]) === p, "All keyframes must be of the same type") : (p = co(f[v]), Xt(p === d || hs(d) && hs(p), "Keyframes must be of the same dimension as the current value"));
|
|
11915
11915
|
} else
|
|
11916
11916
|
p = co(f);
|
|
11917
11917
|
if (d !== p)
|
|
@@ -12022,7 +12022,7 @@ class rM {
|
|
|
12022
12022
|
let i, s;
|
|
12023
12023
|
if (process.env.NODE_ENV !== "production" && a && r) {
|
|
12024
12024
|
const l = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
|
|
12025
|
-
n.ignoreStrict ? fi(!1, l) :
|
|
12025
|
+
n.ignoreStrict ? fi(!1, l) : Xt(!1, l);
|
|
12026
12026
|
}
|
|
12027
12027
|
for (let l = 0; l < tM; l++) {
|
|
12028
12028
|
const c = Iy[l], { isEnabled: u, Feature: d, ProjectionNode: f, MeasureLayout: p } = Ko[c];
|
|
@@ -12409,7 +12409,7 @@ function gM(e) {
|
|
|
12409
12409
|
}), t;
|
|
12410
12410
|
}
|
|
12411
12411
|
const zr = ({ children: e, custom: t, initial: n = !0, onExitComplete: r, exitBeforeEnter: a, presenceAffectsLayout: o = !0, mode: i = "sync" }) => {
|
|
12412
|
-
|
|
12412
|
+
Xt(!a, "Replace exitBeforeEnter with mode='wait'");
|
|
12413
12413
|
const s = Ve(_d).forceRender || uM()[0], l = Ny(), c = gM(e);
|
|
12414
12414
|
let u = c;
|
|
12415
12415
|
const d = Te(/* @__PURE__ */ new Map()).current, f = Te(u), p = Te(/* @__PURE__ */ new Map()).current, m = Te(!0);
|
|
@@ -14264,7 +14264,7 @@ var ab = Xd({}, function(e) {
|
|
|
14264
14264
|
}), ob = Xd(), pR = Xd(), hR = nb({
|
|
14265
14265
|
async: !0,
|
|
14266
14266
|
ssr: typeof document < "u"
|
|
14267
|
-
}), mR = /* @__PURE__ */
|
|
14267
|
+
}), mR = /* @__PURE__ */ Jt(void 0), gR = [], ib = /* @__PURE__ */ R.forwardRef(function(t, n) {
|
|
14268
14268
|
var r, a = R.useState(), o = a[0], i = a[1], s = R.useRef(), l = R.useRef(!1), c = R.useRef(null), u = R.useState({}), d = u[1], f = t.children, p = t.disabled, m = p === void 0 ? !1 : p, h = t.noFocusGuards, v = h === void 0 ? !1 : h, y = t.persistentFocus, w = y === void 0 ? !1 : y, E = t.crossFrame, _ = E === void 0 ? !0 : E, C = t.autoFocus, M = C === void 0 ? !0 : C, P = t.allowTextSelection, j = t.group, D = t.className, le = t.whiteList, Q = t.hasPositiveIndices, ce = t.shards, de = ce === void 0 ? gR : ce, Y = t.as, fe = Y === void 0 ? "div" : Y, se = t.lockProps, pe = se === void 0 ? {} : se, me = t.sideCar, Fe = t.returnFocus, $ = Fe === void 0 ? !1 : Fe, F = t.focusOptions, U = t.onActivation, B = t.onDeactivation, K = R.useState({}), ee = K[0], H = R.useCallback(function(st) {
|
|
14269
14269
|
var Bt = st.captureFocusRestore;
|
|
14270
14270
|
if (!c.current) {
|
|
@@ -17515,7 +17515,7 @@ function M0(e, t) {
|
|
|
17515
17515
|
a = r[o], !(t.indexOf(a) >= 0) && (n[a] = e[a]);
|
|
17516
17516
|
return n;
|
|
17517
17517
|
}
|
|
17518
|
-
var Dl = /* @__PURE__ */
|
|
17518
|
+
var Dl = /* @__PURE__ */ Jt(void 0);
|
|
17519
17519
|
Dl.displayName = "FormikContext";
|
|
17520
17520
|
var Vj = Dl.Provider;
|
|
17521
17521
|
Dl.Consumer;
|
|
@@ -17523,7 +17523,7 @@ function Uj() {
|
|
|
17523
17523
|
var e = Ve(Dl);
|
|
17524
17524
|
return e || (process.env.NODE_ENV !== "production" ? Ca(!1, "Formik context is undefined, please verify you are calling useFormikContext() as child of a <Formik> component.") : Ca(!1)), e;
|
|
17525
17525
|
}
|
|
17526
|
-
var
|
|
17526
|
+
var en = function(t) {
|
|
17527
17527
|
return typeof t == "function";
|
|
17528
17528
|
}, Nl = function(t) {
|
|
17529
17529
|
return t !== null && typeof t == "object";
|
|
@@ -17532,7 +17532,7 @@ var Qt = function(t) {
|
|
|
17532
17532
|
}, Qc = function(t) {
|
|
17533
17533
|
return Object.prototype.toString.call(t) === "[object String]";
|
|
17534
17534
|
}, eu = function(t) {
|
|
17535
|
-
return Nl(t) &&
|
|
17535
|
+
return Nl(t) && en(t.then);
|
|
17536
17536
|
};
|
|
17537
17537
|
function Wj(e) {
|
|
17538
17538
|
if (e = e || (typeof document < "u" ? document : void 0), typeof e > "u")
|
|
@@ -17667,7 +17667,7 @@ function Kj(e) {
|
|
|
17667
17667
|
}) : z(ne);
|
|
17668
17668
|
});
|
|
17669
17669
|
}, [f.validate]), D = ue(function(k, O) {
|
|
17670
|
-
var z = f.validationSchema, G =
|
|
17670
|
+
var z = f.validationSchema, G = en(z) ? z(O) : z, ne = O && G.validateAt ? G.validateAt(O, k) : qj(k, G);
|
|
17671
17671
|
return new Promise(function(ge, Be) {
|
|
17672
17672
|
ne.then(function() {
|
|
17673
17673
|
ge(mr);
|
|
@@ -17681,7 +17681,7 @@ function Kj(e) {
|
|
|
17681
17681
|
});
|
|
17682
17682
|
}, []), Q = ue(function(k) {
|
|
17683
17683
|
var O = Object.keys(w.current).filter(function(G) {
|
|
17684
|
-
return
|
|
17684
|
+
return en(w.current[G].validate);
|
|
17685
17685
|
}), z = O.length > 0 ? O.map(function(G) {
|
|
17686
17686
|
return le(G, Ot(k, G));
|
|
17687
17687
|
}) : [Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];
|
|
@@ -17756,7 +17756,7 @@ function Kj(e) {
|
|
|
17756
17756
|
}));
|
|
17757
17757
|
}, [c, f.initialStatus, f.initialTouched]);
|
|
17758
17758
|
var fe = Gt(function(k) {
|
|
17759
|
-
if (w.current[k] &&
|
|
17759
|
+
if (w.current[k] && en(w.current[k].validate)) {
|
|
17760
17760
|
var O = Ot(M.values, k), z = w.current[k].validate(O);
|
|
17761
17761
|
return eu(z) ? (P({
|
|
17762
17762
|
type: "SET_ISVALIDATING",
|
|
@@ -17820,7 +17820,7 @@ function Kj(e) {
|
|
|
17820
17820
|
payload: k
|
|
17821
17821
|
});
|
|
17822
17822
|
}, []), $ = Gt(function(k, O) {
|
|
17823
|
-
var z =
|
|
17823
|
+
var z = en(k) ? k(M.values) : k;
|
|
17824
17824
|
P({
|
|
17825
17825
|
type: "SET_VALUES",
|
|
17826
17826
|
payload: z
|
|
@@ -17888,7 +17888,7 @@ function Kj(e) {
|
|
|
17888
17888
|
};
|
|
17889
17889
|
H(k);
|
|
17890
17890
|
}), oe = ue(function(k) {
|
|
17891
|
-
|
|
17891
|
+
en(k) ? P({
|
|
17892
17892
|
type: "SET_FORMIK_STATE",
|
|
17893
17893
|
payload: k
|
|
17894
17894
|
}) : P({
|
|
@@ -17936,7 +17936,7 @@ function Kj(e) {
|
|
|
17936
17936
|
throw k;
|
|
17937
17937
|
});
|
|
17938
17938
|
}), N = Gt(function(k) {
|
|
17939
|
-
if (k && k.preventDefault &&
|
|
17939
|
+
if (k && k.preventDefault && en(k.preventDefault) && k.preventDefault(), k && k.stopPropagation && en(k.stopPropagation) && k.stopPropagation(), process.env.NODE_ENV !== "production" && typeof document < "u") {
|
|
17940
17940
|
var O = Wj();
|
|
17941
17941
|
O !== null && O instanceof HTMLButtonElement && (O.attributes && O.attributes.getNamedItem("type") || (process.env.NODE_ENV !== "production" ? Ca(!1, 'You submitted a Formik form using a button with an unspecified `type` attribute. Most browsers default button elements to `type="submit"`. If this is not a submit button, please add `type="button"`.') : Ca(!1)));
|
|
17942
17942
|
}
|
|
@@ -17960,7 +17960,7 @@ function Kj(e) {
|
|
|
17960
17960
|
}, $t = Gt(function() {
|
|
17961
17961
|
return u(M.values, Me);
|
|
17962
17962
|
}), et = Gt(function(k) {
|
|
17963
|
-
k && k.preventDefault &&
|
|
17963
|
+
k && k.preventDefault && en(k.preventDefault) && k.preventDefault(), k && k.stopPropagation && en(k.stopPropagation) && k.stopPropagation(), Y();
|
|
17964
17964
|
}), In = ue(function(k) {
|
|
17965
17965
|
return {
|
|
17966
17966
|
value: Ot(M.values, k),
|
|
@@ -17997,7 +17997,7 @@ function Kj(e) {
|
|
|
17997
17997
|
}, [te, K, M.values]), wt = rt(function() {
|
|
17998
17998
|
return !Sr(p.current, M.values);
|
|
17999
17999
|
}, [p.current, M.values]), qe = rt(function() {
|
|
18000
|
-
return typeof s < "u" ? wt ? M.errors && Object.keys(M.errors).length === 0 : s !== !1 &&
|
|
18000
|
+
return typeof s < "u" ? wt ? M.errors && Object.keys(M.errors).length === 0 : s !== !1 && en(s) ? s(f) : s : M.errors && Object.keys(M.errors).length === 0;
|
|
18001
18001
|
}, [s, wt, M.errors, f]), vt = lt({}, M, {
|
|
18002
18002
|
initialValues: p.current,
|
|
18003
18003
|
initialErrors: m.current,
|
|
@@ -19669,7 +19669,7 @@ class U0 extends Sn {
|
|
|
19669
19669
|
}
|
|
19670
19670
|
}
|
|
19671
19671
|
td.prototype = U0.prototype;
|
|
19672
|
-
const
|
|
19672
|
+
const Zt = [
|
|
19673
19673
|
{
|
|
19674
19674
|
name: "Afghanistan",
|
|
19675
19675
|
alpha2Code: "AF",
|
|
@@ -21457,7 +21457,7 @@ const vg = /* @__PURE__ */ new Map([
|
|
|
21457
21457
|
lineHeight: "120%",
|
|
21458
21458
|
fontWeight: 600,
|
|
21459
21459
|
letterSpacing: { md: "-0.4px", base: "-0.2px" },
|
|
21460
|
-
color: !r.values.cardHolderName && !o ? "#888F95" : `${
|
|
21460
|
+
color: !r.values.cardHolderName && !o ? "#888F95" : `${qt.black300}`,
|
|
21461
21461
|
children: "Pay with Card"
|
|
21462
21462
|
}
|
|
21463
21463
|
),
|
|
@@ -21490,7 +21490,7 @@ const vg = /* @__PURE__ */ new Map([
|
|
|
21490
21490
|
cf,
|
|
21491
21491
|
{
|
|
21492
21492
|
border: "1px solid",
|
|
21493
|
-
borderColor:
|
|
21493
|
+
borderColor: qt.gray50,
|
|
21494
21494
|
borderRadius: "12px",
|
|
21495
21495
|
p: "1px",
|
|
21496
21496
|
gridTemplateColumns: "repeat(2, 1fr)",
|
|
@@ -21499,7 +21499,7 @@ const vg = /* @__PURE__ */ new Map([
|
|
|
21499
21499
|
Oa,
|
|
21500
21500
|
{
|
|
21501
21501
|
borderBottom: "1px solid",
|
|
21502
|
-
borderColor:
|
|
21502
|
+
borderColor: qt.gray50,
|
|
21503
21503
|
colSpan: 2,
|
|
21504
21504
|
children: /* @__PURE__ */ S(
|
|
21505
21505
|
ut,
|
|
@@ -21529,7 +21529,7 @@ const vg = /* @__PURE__ */ new Map([
|
|
|
21529
21529
|
)
|
|
21530
21530
|
}
|
|
21531
21531
|
),
|
|
21532
|
-
/* @__PURE__ */ S(Oa, { borderRight: "1px solid", borderColor:
|
|
21532
|
+
/* @__PURE__ */ S(Oa, { borderRight: "1px solid", borderColor: qt.gray50, children: /* @__PURE__ */ S(
|
|
21533
21533
|
ut,
|
|
21534
21534
|
{
|
|
21535
21535
|
bg: "#fff",
|
|
@@ -21635,11 +21635,11 @@ const vg = /* @__PURE__ */ new Map([
|
|
|
21635
21635
|
onChange: (Y) => {
|
|
21636
21636
|
var fe, se;
|
|
21637
21637
|
j(Y.target.value), r.setFieldValue("zipCode", Y.target.value), de(
|
|
21638
|
-
(fe =
|
|
21638
|
+
(fe = Zt == null ? void 0 : Zt.find(
|
|
21639
21639
|
(pe) => pe.name === r.values.country
|
|
21640
21640
|
)) != null && fe.alpha2Code ? ez(
|
|
21641
21641
|
Y.target.value,
|
|
21642
|
-
((se =
|
|
21642
|
+
((se = Zt == null ? void 0 : Zt.find(
|
|
21643
21643
|
(pe) => pe.name === r.values.country
|
|
21644
21644
|
)) == null ? void 0 : se.alpha2Code) ?? ""
|
|
21645
21645
|
) : !1
|
|
@@ -25745,7 +25745,7 @@ const vg = /* @__PURE__ */ new Map([
|
|
|
25745
25745
|
)[0]) == null ? void 0 : a.currency.code;
|
|
25746
25746
|
}
|
|
25747
25747
|
});
|
|
25748
|
-
var
|
|
25748
|
+
var Ht = /* @__PURE__ */ ((e) => (e.GHS = "GHS", e.NGN = "NGN", e.UGX = "UGX", e.USD = "USD", e.GBP = "GBP", e))(Ht || {});
|
|
25749
25749
|
const oz = "Payment Completed", iz = ({
|
|
25750
25750
|
src: e,
|
|
25751
25751
|
isOpen: t,
|
|
@@ -25991,14 +25991,15 @@ const oz = "Payment Completed", iz = ({
|
|
|
25991
25991
|
formik: r,
|
|
25992
25992
|
checkForErrors: a,
|
|
25993
25993
|
onPaymentComplete: o,
|
|
25994
|
-
Request: i
|
|
25994
|
+
Request: i,
|
|
25995
|
+
stripeCountry: s
|
|
25995
25996
|
}) => {
|
|
25996
|
-
const
|
|
25997
|
+
const l = Qb(), c = Xb(), [u, d] = ie(null), [f, p] = ie(null), [m, h] = ie(!1);
|
|
25997
25998
|
return ie(""), he(() => {
|
|
25998
|
-
if (
|
|
25999
|
-
t.email = r.values.email, t.name = r.values.fullname;
|
|
26000
|
-
const
|
|
26001
|
-
country:
|
|
25999
|
+
if (l && n > 0) {
|
|
26000
|
+
console.log("stripe details:", l), t.email = r.values.email, t.name = r.values.fullname;
|
|
26001
|
+
const v = l == null ? void 0 : l.paymentRequest({
|
|
26002
|
+
country: s,
|
|
26002
26003
|
currency: e == null ? void 0 : e.toLowerCase(),
|
|
26003
26004
|
total: {
|
|
26004
26005
|
label: t == null ? void 0 : t.productName,
|
|
@@ -26007,70 +26008,70 @@ const oz = "Payment Completed", iz = ({
|
|
|
26007
26008
|
requestPayerName: !0,
|
|
26008
26009
|
requestPayerEmail: !0
|
|
26009
26010
|
});
|
|
26010
|
-
|
|
26011
|
-
|
|
26012
|
-
}),
|
|
26013
|
-
const
|
|
26011
|
+
v.canMakePayment().then((y) => {
|
|
26012
|
+
y && (d(v), p(y));
|
|
26013
|
+
}), v.on("paymentmethod", async (y) => {
|
|
26014
|
+
const w = Zu();
|
|
26014
26015
|
try {
|
|
26015
26016
|
await i.post("payments/init", {
|
|
26016
26017
|
amount: n,
|
|
26017
26018
|
currency: e,
|
|
26018
26019
|
metadata: {
|
|
26019
26020
|
...t,
|
|
26020
|
-
reference:
|
|
26021
|
+
reference: w
|
|
26021
26022
|
},
|
|
26022
|
-
reference:
|
|
26023
|
+
reference: w
|
|
26023
26024
|
});
|
|
26024
|
-
} catch (
|
|
26025
|
-
|
|
26026
|
-
(
|
|
26025
|
+
} catch (M) {
|
|
26026
|
+
y.complete("fail"), At(
|
|
26027
|
+
(M == null ? void 0 : M.message) ?? "We couldn't initialize your payment",
|
|
26027
26028
|
Tt.error
|
|
26028
26029
|
);
|
|
26029
26030
|
return;
|
|
26030
26031
|
}
|
|
26031
|
-
const { client_secret:
|
|
26032
|
+
const { client_secret: E } = await i.post(
|
|
26032
26033
|
"/payments/wallets/intent",
|
|
26033
26034
|
{
|
|
26034
26035
|
amount: n,
|
|
26035
26036
|
currency: e,
|
|
26036
26037
|
metadata: {
|
|
26037
26038
|
...t,
|
|
26038
|
-
reference:
|
|
26039
|
+
reference: w
|
|
26039
26040
|
}
|
|
26040
26041
|
}
|
|
26041
|
-
).then((
|
|
26042
|
-
|
|
26042
|
+
).then((M) => M.data), { paymentIntent: _, error: C } = await l.confirmCardPayment(
|
|
26043
|
+
E,
|
|
26043
26044
|
{
|
|
26044
|
-
payment_method:
|
|
26045
|
+
payment_method: y.paymentMethod.id
|
|
26045
26046
|
},
|
|
26046
26047
|
{ handleActions: !1 }
|
|
26047
26048
|
);
|
|
26048
|
-
if (
|
|
26049
|
-
|
|
26050
|
-
(
|
|
26049
|
+
if (C)
|
|
26050
|
+
y.complete("fail"), At(
|
|
26051
|
+
(C == null ? void 0 : C.message) ?? "We couldn't process your payment",
|
|
26051
26052
|
Tt.error
|
|
26052
26053
|
);
|
|
26053
26054
|
else {
|
|
26054
|
-
if (
|
|
26055
|
-
const { error:
|
|
26056
|
-
|
|
26055
|
+
if (y.complete("success"), _.status === "requires_action") {
|
|
26056
|
+
const { error: M } = await l.confirmCardPayment(E);
|
|
26057
|
+
M ? At(
|
|
26057
26058
|
"Payment failed, please add a new payment method",
|
|
26058
26059
|
Tt.error
|
|
26059
|
-
) : (
|
|
26060
|
+
) : (h(!0), setTimeout(() => {
|
|
26060
26061
|
o({
|
|
26061
26062
|
fullname: r.values.fullname,
|
|
26062
26063
|
email: r.values.email,
|
|
26063
|
-
reference:
|
|
26064
|
+
reference: w,
|
|
26064
26065
|
amount: n,
|
|
26065
26066
|
currency: e
|
|
26066
26067
|
});
|
|
26067
26068
|
}, 3e3));
|
|
26068
26069
|
}
|
|
26069
|
-
At("Payment was successful", Tt.success),
|
|
26070
|
+
At("Payment was successful", Tt.success), h(!0), setTimeout(() => {
|
|
26070
26071
|
o({
|
|
26071
26072
|
fullname: r.values.fullname,
|
|
26072
26073
|
email: r.values.email,
|
|
26073
|
-
reference:
|
|
26074
|
+
reference: w,
|
|
26074
26075
|
amount: n,
|
|
26075
26076
|
currency: e
|
|
26076
26077
|
});
|
|
@@ -26078,8 +26079,8 @@ const oz = "Payment Completed", iz = ({
|
|
|
26078
26079
|
}
|
|
26079
26080
|
});
|
|
26080
26081
|
}
|
|
26081
|
-
}, [
|
|
26082
|
-
(
|
|
26082
|
+
}, [l, c, r.values.email, r.values.fullname, n]), /* @__PURE__ */ S(dn, { children: u && f !== null && /* @__PURE__ */ W(Xe, { width: "100%", gap: "16px", children: [
|
|
26083
|
+
(f == null ? void 0 : f.applePay) && /* @__PURE__ */ S(
|
|
26083
26084
|
pn,
|
|
26084
26085
|
{
|
|
26085
26086
|
size: "medium",
|
|
@@ -26088,11 +26089,11 @@ const oz = "Payment Completed", iz = ({
|
|
|
26088
26089
|
width: "100%",
|
|
26089
26090
|
fontFamily: "sans-serif",
|
|
26090
26091
|
onClick: async () => {
|
|
26091
|
-
await a() ||
|
|
26092
|
+
await a() || u == null || u.show();
|
|
26092
26093
|
}
|
|
26093
26094
|
}
|
|
26094
26095
|
),
|
|
26095
|
-
(
|
|
26096
|
+
(f == null ? void 0 : f.googlePay) && /* @__PURE__ */ S(
|
|
26096
26097
|
pn,
|
|
26097
26098
|
{
|
|
26098
26099
|
size: "medium",
|
|
@@ -26103,11 +26104,11 @@ const oz = "Payment Completed", iz = ({
|
|
|
26103
26104
|
icontype: "leading",
|
|
26104
26105
|
fontSize: "1.125rem",
|
|
26105
26106
|
onClick: async () => {
|
|
26106
|
-
await a() ||
|
|
26107
|
+
await a() || u == null || u.show();
|
|
26107
26108
|
},
|
|
26108
26109
|
fontFamily: "inherit",
|
|
26109
|
-
isLoading:
|
|
26110
|
-
disabled:
|
|
26110
|
+
isLoading: m,
|
|
26111
|
+
disabled: m
|
|
26111
26112
|
}
|
|
26112
26113
|
)
|
|
26113
26114
|
] }) });
|
|
@@ -26252,7 +26253,7 @@ const bz = on(
|
|
|
26252
26253
|
},
|
|
26253
26254
|
{
|
|
26254
26255
|
onSuccess: () => {
|
|
26255
|
-
(d ===
|
|
26256
|
+
(d === Ht.NGN && vt("paystack") || d === Ht.GHS && vt("startbutton")) && yt(
|
|
26256
26257
|
{
|
|
26257
26258
|
amount: Lt,
|
|
26258
26259
|
currency: d,
|
|
@@ -26302,19 +26303,19 @@ const bz = on(
|
|
|
26302
26303
|
slug: v,
|
|
26303
26304
|
apply_tranche_fee: le,
|
|
26304
26305
|
ip: ce ? Q : "",
|
|
26305
|
-
country: ce ? (ea =
|
|
26306
|
+
country: ce ? (ea = Zt == null ? void 0 : Zt.find((V) => V.name === I.values.country)) == null ? void 0 : ea.alpha2Code : "",
|
|
26306
26307
|
postal_code: ce ? zl : "",
|
|
26307
26308
|
product_id: (Ci = e == null ? void 0 : e.metadata) == null ? void 0 : Ci.product_id
|
|
26308
26309
|
},
|
|
26309
26310
|
me
|
|
26310
|
-
), qa = (Ai = (Za = (dr = Z == null ? void 0 : Z.payload) == null ? void 0 : dr.tax_calculation) == null ? void 0 : Za.breakdown[0]) == null ? void 0 : Ai.state, sr = ((Ti =
|
|
26311
|
+
), qa = (Ai = (Za = (dr = Z == null ? void 0 : Z.payload) == null ? void 0 : dr.tax_calculation) == null ? void 0 : Za.breakdown[0]) == null ? void 0 : Ai.state, sr = ((Ti = Zt == null ? void 0 : Zt.find(
|
|
26311
26312
|
(V) => {
|
|
26312
26313
|
var He, g, b;
|
|
26313
26314
|
return V.alpha2Code === ((b = (g = (He = Z == null ? void 0 : Z.payload) == null ? void 0 : He.tax_calculation) == null ? void 0 : g.breakdown[0]) == null ? void 0 : b.country);
|
|
26314
26315
|
}
|
|
26315
|
-
)) == null ? void 0 : Ti.name) ?? (I.values.country !== "" ? I.values.country : (ki = e.metadata) == null ? void 0 : ki.country), Vl = (Pi = (_i = (Xa = Z == null ? void 0 : Z.payload) == null ? void 0 : Xa.tax_calculation) == null ? void 0 : _i.breakdown[0]) == null ? void 0 : Pi.percentage_decimal, Et = ((Fi = ($i = Z == null ? void 0 : Z.payload) == null ? void 0 : $i.tax_calculation) == null ? void 0 : Fi.local_tax) ?? 0, Ul = ((Ri = (Mi = Z == null ? void 0 : Z.payload) == null ? void 0 : Mi.tax_calculation) == null ? void 0 : Ri.dollar_tax) ?? 0, Gl = ((Oi = Z == null ? void 0 : Z.payload) == null ? void 0 : Oi.local_amount) ?? 0, lr = ((Ii = Z == null ? void 0 : Z.payload) == null ? void 0 : Ii.local_transaction_fee) ?? 0, cr = ((Di = Z == null ? void 0 : Z.payload) == null ? void 0 : Di.local_international_card_fee) ?? 0, bi = ((Ni = Z == null ? void 0 : Z.payload) == null ? void 0 : Ni.dollar_international_card_fee) ?? 0, dt = parseFloat(Gl) + parseFloat(lr) + parseFloat(Et) + (d !==
|
|
26316
|
+
)) == null ? void 0 : Ti.name) ?? (I.values.country !== "" ? I.values.country : (ki = e.metadata) == null ? void 0 : ki.country), Vl = (Pi = (_i = (Xa = Z == null ? void 0 : Z.payload) == null ? void 0 : Xa.tax_calculation) == null ? void 0 : _i.breakdown[0]) == null ? void 0 : Pi.percentage_decimal, Et = ((Fi = ($i = Z == null ? void 0 : Z.payload) == null ? void 0 : $i.tax_calculation) == null ? void 0 : Fi.local_tax) ?? 0, Ul = ((Ri = (Mi = Z == null ? void 0 : Z.payload) == null ? void 0 : Mi.tax_calculation) == null ? void 0 : Ri.dollar_tax) ?? 0, Gl = ((Oi = Z == null ? void 0 : Z.payload) == null ? void 0 : Oi.local_amount) ?? 0, lr = ((Ii = Z == null ? void 0 : Z.payload) == null ? void 0 : Ii.local_transaction_fee) ?? 0, cr = ((Di = Z == null ? void 0 : Z.payload) == null ? void 0 : Di.local_international_card_fee) ?? 0, bi = ((Ni = Z == null ? void 0 : Z.payload) == null ? void 0 : Ni.dollar_international_card_fee) ?? 0, dt = parseFloat(Gl) + parseFloat(lr) + parseFloat(Et) + (d !== Ht.NGN && (I.values.country !== "" || (ne == null ? void 0 : ne.currency) !== d) && G((fr = I == null ? void 0 : I.values) == null ? void 0 : fr.country) !== d ? Number(cr) : 0), Jr = I.values.country !== "" ? G((ta = I == null ? void 0 : I.values) == null ? void 0 : ta.country) !== d : (ne == null ? void 0 : ne.currency) !== d, Lt = rt(() => {
|
|
26316
26317
|
var V;
|
|
26317
|
-
return d ===
|
|
26318
|
+
return d === Ht.UGX ? Math.ceil(dt) * 100 : Math.round(
|
|
26318
26319
|
dt * ((V = Z == null ? void 0 : Z.payload) != null && V.is_zero_decimal_currency ? 1 : 100)
|
|
26319
26320
|
);
|
|
26320
26321
|
}, [
|
|
@@ -26390,11 +26391,11 @@ const bz = on(
|
|
|
26390
26391
|
}, [et, I]);
|
|
26391
26392
|
const Si = rt(() => {
|
|
26392
26393
|
let V = "";
|
|
26393
|
-
return d ===
|
|
26394
|
+
return d === Ht.GBP ? V = D : V = j, console.log("stripe key:", V), lD(V);
|
|
26394
26395
|
}, [d, j, D]);
|
|
26395
26396
|
he(() => {
|
|
26396
26397
|
// isFree
|
|
26397
|
-
d !==
|
|
26398
|
+
d !== Ht.NGN && d !== Ht.GHS ? K(!0) : K(!1);
|
|
26398
26399
|
}, [d]);
|
|
26399
26400
|
const Zl = async () => {
|
|
26400
26401
|
const V = Zu();
|
|
@@ -26556,11 +26557,11 @@ const bz = on(
|
|
|
26556
26557
|
}
|
|
26557
26558
|
),
|
|
26558
26559
|
!!((ra = I == null ? void 0 : I.errors) != null && ra.phone) && /* @__PURE__ */ W(Xe, { alignItems: "center", gap: "6px", mt: "4px", children: [
|
|
26559
|
-
/* @__PURE__ */ S(rc, { color:
|
|
26560
|
+
/* @__PURE__ */ S(rc, { color: qt.red500 }),
|
|
26560
26561
|
/* @__PURE__ */ S(
|
|
26561
26562
|
Y0,
|
|
26562
26563
|
{
|
|
26563
|
-
color:
|
|
26564
|
+
color: qt.red500,
|
|
26564
26565
|
size: "xxs",
|
|
26565
26566
|
fontFamily: "inherit",
|
|
26566
26567
|
children: (aa = I == null ? void 0 : I.errors) == null ? void 0 : aa.phone
|
|
@@ -26572,7 +26573,7 @@ const bz = on(
|
|
|
26572
26573
|
] }),
|
|
26573
26574
|
vt("wallet") && /* @__PURE__ */ W(dn, { children: [
|
|
26574
26575
|
" ",
|
|
26575
|
-
E && ee && d !==
|
|
26576
|
+
E && ee && d !== Ht.NGN && d !== Ht.GHS && /* @__PURE__ */ S(
|
|
26576
26577
|
zu,
|
|
26577
26578
|
{
|
|
26578
26579
|
stripe: Si,
|
|
@@ -26586,6 +26587,7 @@ const bz = on(
|
|
|
26586
26587
|
{
|
|
26587
26588
|
metadata: Ft,
|
|
26588
26589
|
currency: d,
|
|
26590
|
+
stripeCountry: d === Ht.GBP ? "GB" : "US",
|
|
26589
26591
|
amount: Lt,
|
|
26590
26592
|
formik: I,
|
|
26591
26593
|
checkForErrors: async () => {
|
|
@@ -26721,13 +26723,13 @@ const bz = on(
|
|
|
26721
26723
|
p: { base: "16px", lg: "24px" },
|
|
26722
26724
|
borderRadius: "16px",
|
|
26723
26725
|
boxShadow: "0px 2px 6px 0px rgba(45, 59, 67, 0.06), 0px 2px 4px 0px rgba(45, 59, 67, 0.05)",
|
|
26724
|
-
border: `1px solid ${
|
|
26726
|
+
border: `1px solid ${qt.gray50}`,
|
|
26725
26727
|
children: [
|
|
26726
26728
|
/* @__PURE__ */ W(
|
|
26727
26729
|
ut,
|
|
26728
26730
|
{
|
|
26729
26731
|
p: "16px",
|
|
26730
|
-
bg:
|
|
26732
|
+
bg: qt.gray50,
|
|
26731
26733
|
borderRadius: "12px",
|
|
26732
26734
|
textAlign: "center",
|
|
26733
26735
|
children: [
|
|
@@ -26754,7 +26756,7 @@ const bz = on(
|
|
|
26754
26756
|
Je,
|
|
26755
26757
|
{
|
|
26756
26758
|
fontSize: "14px",
|
|
26757
|
-
color:
|
|
26759
|
+
color: qt.gray400,
|
|
26758
26760
|
lineHeight: "16px",
|
|
26759
26761
|
fontWeight: 400,
|
|
26760
26762
|
children: "Apply discount code"
|
|
@@ -26837,7 +26839,7 @@ const bz = on(
|
|
|
26837
26839
|
}
|
|
26838
26840
|
)
|
|
26839
26841
|
] }),
|
|
26840
|
-
d !==
|
|
26842
|
+
d !== Ht.NGN && (I.values.country !== "" || (ne == null ? void 0 : ne.currency) !== d) && G((ia = I == null ? void 0 : I.values) == null ? void 0 : ia.country) !== d && /* @__PURE__ */ W(Xe, { width: "100%", justifyContent: "space-between", children: [
|
|
26841
26843
|
/* @__PURE__ */ W(Xe, { alignItems: "center", children: [
|
|
26842
26844
|
/* @__PURE__ */ S(
|
|
26843
26845
|
Je,
|
|
@@ -26937,13 +26939,13 @@ const bz = on(
|
|
|
26937
26939
|
alignItems: "center",
|
|
26938
26940
|
gap: "2px",
|
|
26939
26941
|
borderRadius: "100px",
|
|
26940
|
-
backgroundColor:
|
|
26942
|
+
backgroundColor: qt.gray50,
|
|
26941
26943
|
children: [
|
|
26942
26944
|
/* @__PURE__ */ W(
|
|
26943
26945
|
Je,
|
|
26944
26946
|
{
|
|
26945
26947
|
fontSize: "13px",
|
|
26946
|
-
color:
|
|
26948
|
+
color: qt.black300,
|
|
26947
26949
|
fontWeight: 400,
|
|
26948
26950
|
lineHeight: "20px",
|
|
26949
26951
|
children: [
|
|
@@ -26969,7 +26971,7 @@ const bz = on(
|
|
|
26969
26971
|
Je,
|
|
26970
26972
|
{
|
|
26971
26973
|
fontSize: "14px",
|
|
26972
|
-
color:
|
|
26974
|
+
color: qt.green600,
|
|
26973
26975
|
fontWeight: 400,
|
|
26974
26976
|
lineHeight: "22px",
|
|
26975
26977
|
children: [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @format */
|
|
2
|
-
declare const WalletPay: ({ currency, metadata, amount, formik, checkForErrors, onPaymentComplete, Request, }: {
|
|
2
|
+
declare const WalletPay: ({ currency, metadata, amount, formik, checkForErrors, onPaymentComplete, Request, stripeCountry, }: {
|
|
3
3
|
currency: string;
|
|
4
4
|
amount: number;
|
|
5
5
|
metadata?: any;
|
|
@@ -7,5 +7,6 @@ declare const WalletPay: ({ currency, metadata, amount, formik, checkForErrors,
|
|
|
7
7
|
checkForErrors: () => Promise<boolean>;
|
|
8
8
|
onPaymentComplete: (payload: object) => void;
|
|
9
9
|
Request: any;
|
|
10
|
+
stripeCountry: string;
|
|
10
11
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
export default WalletPay;
|