mainstack-payments 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import { jsx as b, jsxs as X, Fragment as kn } from "react/jsx-runtime";
2
2
  import { Colors as Jt, CancelFilledIcon as xc, Input as da, CountrySelect as L0, Button as dn, LockIcon as z0, customSnackbar as Gt, SnackbarType as Wt, GooglePayIcon as V0, NotificationsFilledIcon as ef, ExpandMoreIcon as U0, ClickTooltip as tf, InfoIcon as nf, CloseIcon as G0, Loader as W0, MainstackProvider as H0 } from "mainstack-design-system";
3
3
  import * as R from "react";
4
- import Se, { forwardRef as rn, useContext as We, createContext as Kt, useLayoutEffect as Rs, useEffect as ye, useState as le, useRef as _e, useMemo as st, useCallback as ue, useReducer as K0, useInsertionEffect as Hm, createElement as Km, useId as Fa, cloneElement as q0, Children as Y0, isValidElement as qm, memo as Z0, useSyncExternalStore as X0, PureComponent as J0, useImperativeHandle as Q0 } from "react";
4
+ import Se, { forwardRef as rn, useContext as We, createContext as Kt, useLayoutEffect as Rs, useEffect as ve, useState as le, useRef as _e, useMemo as st, useCallback as ue, useReducer as K0, useInsertionEffect as Hm, createElement as Km, useId as Fa, cloneElement as q0, Children as Y0, isValidElement as qm, memo as Z0, useSyncExternalStore as X0, PureComponent as J0, useImperativeHandle as Q0 } from "react";
5
5
  import { createPortal as Ym } from "react-dom";
6
6
  import rf from "axios";
7
7
  function eS(e) {
@@ -740,16 +740,16 @@ var df;
740
740
  function IS() {
741
741
  return df || (df = 1, process.env.NODE_ENV !== "production" && function() {
742
742
  var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, o = e ? Symbol.for("react.profiler") : 60114, i = e ? Symbol.for("react.provider") : 60109, s = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111, c = e ? Symbol.for("react.concurrent_mode") : 60111, u = e ? Symbol.for("react.forward_ref") : 60112, d = e ? Symbol.for("react.suspense") : 60113, f = e ? Symbol.for("react.suspense_list") : 60120, h = e ? Symbol.for("react.memo") : 60115, m = e ? Symbol.for("react.lazy") : 60116, p = e ? Symbol.for("react.block") : 60121, v = e ? Symbol.for("react.fundamental") : 60117, y = e ? Symbol.for("react.responder") : 60118, w = e ? Symbol.for("react.scope") : 60119;
743
- function E(D) {
744
- return typeof D == "string" || typeof D == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
745
- D === r || D === c || D === o || D === a || D === d || D === f || typeof D == "object" && D !== null && (D.$$typeof === m || D.$$typeof === h || D.$$typeof === i || D.$$typeof === s || D.$$typeof === u || D.$$typeof === v || D.$$typeof === y || D.$$typeof === w || D.$$typeof === p);
743
+ function E(N) {
744
+ return typeof N == "string" || typeof N == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
745
+ N === r || N === c || N === o || N === a || N === d || N === f || typeof N == "object" && N !== null && (N.$$typeof === m || N.$$typeof === h || N.$$typeof === i || N.$$typeof === s || N.$$typeof === u || N.$$typeof === v || N.$$typeof === y || N.$$typeof === w || N.$$typeof === p);
746
746
  }
747
- function P(D) {
748
- if (typeof D == "object" && D !== null) {
749
- var Je = D.$$typeof;
747
+ function P(N) {
748
+ if (typeof N == "object" && N !== null) {
749
+ var Je = N.$$typeof;
750
750
  switch (Je) {
751
751
  case t:
752
- var St = D.type;
752
+ var St = N.type;
753
753
  switch (St) {
754
754
  case l:
755
755
  case c:
@@ -777,44 +777,44 @@ function IS() {
777
777
  }
778
778
  }
779
779
  var C = l, M = c, _ = s, j = i, I = t, Q = u, Z = r, ce = m, de = h, H = n, oe = o, ne = a, fe = d, xe = !1;
780
- function Fe(D) {
781
- return xe || (xe = !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.")), $(D) || P(D) === l;
780
+ function Fe(N) {
781
+ return xe || (xe = !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.")), $(N) || P(N) === l;
782
782
  }
783
- function $(D) {
784
- return P(D) === c;
783
+ function $(N) {
784
+ return P(N) === c;
785
785
  }
786
- function F(D) {
787
- return P(D) === s;
786
+ function F(N) {
787
+ return P(N) === s;
788
788
  }
789
- function G(D) {
790
- return P(D) === i;
789
+ function G(N) {
790
+ return P(N) === i;
791
791
  }
792
- function B(D) {
793
- return typeof D == "object" && D !== null && D.$$typeof === t;
792
+ function B(N) {
793
+ return typeof N == "object" && N !== null && N.$$typeof === t;
794
794
  }
795
- function U(D) {
796
- return P(D) === u;
795
+ function U(N) {
796
+ return P(N) === u;
797
797
  }
798
- function ee(D) {
799
- return P(D) === r;
798
+ function ee(N) {
799
+ return P(N) === r;
800
800
  }
801
- function z(D) {
802
- return P(D) === m;
801
+ function z(N) {
802
+ return P(N) === m;
803
803
  }
804
- function J(D) {
805
- return P(D) === h;
804
+ function J(N) {
805
+ return P(N) === h;
806
806
  }
807
- function re(D) {
808
- return P(D) === n;
807
+ function re(N) {
808
+ return P(N) === n;
809
809
  }
810
- function ie(D) {
811
- return P(D) === o;
810
+ function ie(N) {
811
+ return P(N) === o;
812
812
  }
813
- function K(D) {
814
- return P(D) === a;
813
+ function K(N) {
814
+ return P(N) === a;
815
815
  }
816
- function be(D) {
817
- return P(D) === d;
816
+ function be(N) {
817
+ return P(N) === d;
818
818
  }
819
819
  Pe.AsyncMode = C, Pe.ConcurrentMode = M, Pe.ContextConsumer = _, Pe.ContextProvider = j, Pe.Element = I, Pe.ForwardRef = Q, Pe.Fragment = Z, Pe.Lazy = ce, Pe.Memo = de, Pe.Portal = H, Pe.Profiler = oe, Pe.StrictMode = ne, Pe.Suspense = fe, Pe.isAsyncMode = Fe, Pe.isConcurrentMode = $, Pe.isContextConsumer = F, Pe.isContextProvider = G, Pe.isElement = B, Pe.isForwardRef = U, Pe.isFragment = ee, Pe.isLazy = z, Pe.isMemo = J, Pe.isPortal = re, Pe.isProfiler = ie, Pe.isStrictMode = K, Pe.isSuspense = be, Pe.isValidElementType = E, Pe.typeOf = P;
820
820
  }()), Pe;
@@ -1726,7 +1726,7 @@ function fg(e) {
1726
1726
  return /* @__PURE__ */ b(px, { value: { zIndex: n }, children: t });
1727
1727
  }
1728
1728
  fg.displayName = "PortalManager";
1729
- var So = globalThis != null && globalThis.document ? Rs : ye, [pg, mx] = yn({
1729
+ var So = globalThis != null && globalThis.document ? Rs : ve, [pg, mx] = yn({
1730
1730
  strict: !1,
1731
1731
  name: "PortalContext"
1732
1732
  }), ku = "chakra-portal", gx = ".chakra-portal", vx = (e) => /* @__PURE__ */ b(
@@ -1746,7 +1746,7 @@ var So = globalThis != null && globalThis.document ? Rs : ye, [pg, mx] = yn({
1746
1746
  }
1747
1747
  ), yx = (e) => {
1748
1748
  const { appendToParentPortal: t, children: n } = e, [r, a] = le(null), o = _e(null), [, i] = le({});
1749
- ye(() => i({}), []);
1749
+ ve(() => i({}), []);
1750
1750
  const s = mx(), l = hx();
1751
1751
  So(() => {
1752
1752
  if (!r)
@@ -1914,7 +1914,7 @@ function mg(e) {
1914
1914
  );
1915
1915
  So(() => {
1916
1916
  a === "system" && d(f());
1917
- }, []), ye(() => {
1917
+ }, []), ve(() => {
1918
1918
  const P = i.get();
1919
1919
  if (P) {
1920
1920
  y(P);
@@ -1929,7 +1929,7 @@ function mg(e) {
1929
1929
  const w = ue(() => {
1930
1930
  y(v === "dark" ? "light" : "dark");
1931
1931
  }, [v, y]);
1932
- ye(() => {
1932
+ ve(() => {
1933
1933
  if (r)
1934
1934
  return p(y);
1935
1935
  }, [r, p, y]);
@@ -1981,7 +1981,7 @@ ps.exports;
1981
1981
  return g || K && K.binding && K.binding("util");
1982
1982
  } catch {
1983
1983
  }
1984
- }(), D = be && be.isTypedArray;
1984
+ }(), N = be && be.isTypedArray;
1985
1985
  function Je(g, S, k) {
1986
1986
  switch (k.length) {
1987
1987
  case 0:
@@ -2018,13 +2018,13 @@ ps.exports;
2018
2018
  return g ? "Symbol(src)_1." + g : "";
2019
2019
  }(), W = dt.toString, ae = T.call(Object), he = RegExp(
2020
2020
  "^" + T.call(O).replace($, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
2021
- ), N = ie ? z.Buffer : void 0, ot = z.Symbol, qt = z.Uint8Array, Yt = N ? N.allocUnsafe : void 0, ir = ut(Object.getPrototypeOf, Object), It = Object.create, Bn = dt.propertyIsEnumerable, xt = Pt.splice, xn = ot ? ot.toStringTag : void 0, ft = function() {
2021
+ ), D = ie ? z.Buffer : void 0, ot = z.Symbol, qt = z.Uint8Array, Yt = D ? D.allocUnsafe : void 0, ir = ut(Object.getPrototypeOf, Object), It = Object.create, Bn = dt.propertyIsEnumerable, xt = Pt.splice, xn = ot ? ot.toStringTag : void 0, ft = function() {
2022
2022
  try {
2023
2023
  var g = hl(Object, "defineProperty");
2024
2024
  return g({}, "", {}), g;
2025
2025
  } catch {
2026
2026
  }
2027
- }(), sl = N ? N.isBuffer : void 0, Yo = Math.max, ll = Date.now, Zo = hl(z, "Map"), jn = hl(Object, "create"), cl = function() {
2027
+ }(), sl = D ? D.isBuffer : void 0, Yo = Math.max, ll = Date.now, Zo = hl(z, "Map"), jn = hl(Object, "create"), cl = function() {
2028
2028
  function g() {
2029
2029
  }
2030
2030
  return function(S) {
@@ -2155,11 +2155,11 @@ ps.exports;
2155
2155
  }
2156
2156
  Cn.prototype.clear = li, Cn.prototype.delete = ci, Cn.prototype.get = ui, Cn.prototype.has = di, Cn.prototype.set = fi;
2157
2157
  function pi(g, S) {
2158
- var k = vl(g), L = !k && gl(g), ve = !k && !L && qd(g), Me = !k && !L && !ve && Zd(g), ze = k || L || ve || Me, me = ze ? St(g.length, String) : [], Ve = me.length;
2158
+ var k = vl(g), L = !k && gl(g), ye = !k && !L && qd(g), Me = !k && !L && !ye && Zd(g), ze = k || L || ye || Me, me = ze ? St(g.length, String) : [], Ve = me.length;
2159
2159
  for (var Nt in g)
2160
2160
  (S || O.call(g, Nt)) && !(ze && // Safari 9 has enumerable `arguments.length` in strict mode.
2161
2161
  (Nt == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
2162
- ve && (Nt == "offset" || Nt == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
2162
+ ye && (Nt == "offset" || Nt == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
2163
2163
  Me && (Nt == "buffer" || Nt == "byteLength" || Nt == "byteOffset") || // Skip index properties.
2164
2164
  Hd(Nt, Ve))) && me.push(Nt);
2165
2165
  return me;
@@ -2209,17 +2209,17 @@ ps.exports;
2209
2209
  L == "constructor" && (S || !O.call(g, L)) || k.push(L);
2210
2210
  return k;
2211
2211
  }
2212
- function se(g, S, k, L, ve) {
2212
+ function se(g, S, k, L, ye) {
2213
2213
  g !== S && mi(S, function(Me, ze) {
2214
- if (ve || (ve = new Cn()), cr(Me))
2215
- Le(g, S, ze, k, se, L, ve);
2214
+ if (ye || (ye = new Cn()), cr(Me))
2215
+ Le(g, S, ze, k, se, L, ye);
2216
2216
  else {
2217
- var me = L ? L(ml(g, ze), Me, ze + "", g, S, ve) : void 0;
2217
+ var me = L ? L(ml(g, ze), Me, ze + "", g, S, ye) : void 0;
2218
2218
  me === void 0 && (me = Me), Ur(g, ze, me);
2219
2219
  }
2220
2220
  }, Xd);
2221
2221
  }
2222
- function Le(g, S, k, L, ve, Me, ze) {
2222
+ function Le(g, S, k, L, ye, Me, ze) {
2223
2223
  var me = ml(g, k), Ve = ml(S, k), Nt = ze.get(Ve);
2224
2224
  if (Nt) {
2225
2225
  Ur(g, k, Nt);
@@ -2230,7 +2230,7 @@ ps.exports;
2230
2230
  var Sl = vl(Ve), xl = !Sl && qd(Ve), Qd = !Sl && !xl && Zd(Ve);
2231
2231
  _t = Ve, Sl || xl || Qd ? vl(me) ? _t = me : O0(me) ? _t = b0(me) : xl ? (Na = !1, _t = qe(Ve, !0)) : Qd ? (Na = !1, _t = y0(Ve, !0)) : _t = [] : I0(Ve) || gl(Ve) ? (_t = me, gl(me) ? _t = D0(me) : (!cr(me) || bl(me)) && (_t = C0(Ve))) : Na = !1;
2232
2232
  }
2233
- Na && (ze.set(Ve, _t), ve(_t, Ve, L, Me, ze), ze.delete(Ve)), Ur(g, k, _t);
2233
+ Na && (ze.set(Ve, _t), ye(_t, Ve, L, Me, ze), ze.delete(Ve)), Ur(g, k, _t);
2234
2234
  }
2235
2235
  function wt(g, S) {
2236
2236
  return F0($0(g, S, Jd), g + "");
@@ -2264,18 +2264,18 @@ ps.exports;
2264
2264
  return S;
2265
2265
  }
2266
2266
  function S0(g, S, k, L) {
2267
- var ve = !k;
2267
+ var ye = !k;
2268
2268
  k || (k = {});
2269
2269
  for (var Me = -1, ze = S.length; ++Me < ze; ) {
2270
2270
  var me = S[Me], Ve = L ? L(k[me], g[me], me, k, g) : void 0;
2271
- Ve === void 0 && (Ve = g[me]), ve ? Gr(k, me, Ve) : hi(k, me, Ve);
2271
+ Ve === void 0 && (Ve = g[me]), ye ? Gr(k, me, Ve) : hi(k, me, Ve);
2272
2272
  }
2273
2273
  return k;
2274
2274
  }
2275
2275
  function x0(g) {
2276
2276
  return wt(function(S, k) {
2277
- var L = -1, ve = k.length, Me = ve > 1 ? k[ve - 1] : void 0, ze = ve > 2 ? k[2] : void 0;
2278
- for (Me = g.length > 3 && typeof Me == "function" ? (ve--, Me) : void 0, ze && A0(k[0], k[1], ze) && (Me = ve < 3 ? void 0 : Me, ve = 1), S = Object(S); ++L < ve; ) {
2277
+ var L = -1, ye = k.length, Me = ye > 1 ? k[ye - 1] : void 0, ze = ye > 2 ? k[2] : void 0;
2278
+ for (Me = g.length > 3 && typeof Me == "function" ? (ye--, Me) : void 0, ze && A0(k[0], k[1], ze) && (Me = ye < 3 ? void 0 : Me, ye = 1), S = Object(S); ++L < ye; ) {
2279
2279
  var me = k[L];
2280
2280
  me && g(S, me, L, Me);
2281
2281
  }
@@ -2284,8 +2284,8 @@ ps.exports;
2284
2284
  }
2285
2285
  function w0(g) {
2286
2286
  return function(S, k, L) {
2287
- for (var ve = -1, Me = Object(S), ze = L(S), me = ze.length; me--; ) {
2288
- var Ve = ze[g ? me : ++ve];
2287
+ for (var ye = -1, Me = Object(S), ze = L(S), me = ze.length; me--; ) {
2288
+ var Ve = ze[g ? me : ++ye];
2289
2289
  if (k(Me[Ve], Ve, Me) === !1)
2290
2290
  break;
2291
2291
  }
@@ -2307,8 +2307,8 @@ ps.exports;
2307
2307
  var L = !0;
2308
2308
  } catch {
2309
2309
  }
2310
- var ve = W.call(g);
2311
- return L && (S ? g[xn] = k : delete g[xn]), ve;
2310
+ var ye = W.call(g);
2311
+ return L && (S ? g[xn] = k : delete g[xn]), ye;
2312
2312
  }
2313
2313
  function C0(g) {
2314
2314
  return typeof g.constructor == "function" && !Kd(g) ? cl(ir(g)) : {};
@@ -2346,11 +2346,11 @@ ps.exports;
2346
2346
  }
2347
2347
  function $0(g, S, k) {
2348
2348
  return S = Yo(S === void 0 ? g.length - 1 : S, 0), function() {
2349
- for (var L = arguments, ve = -1, Me = Yo(L.length - S, 0), ze = Array(Me); ++ve < Me; )
2350
- ze[ve] = L[S + ve];
2351
- ve = -1;
2352
- for (var me = Array(S + 1); ++ve < S; )
2353
- me[ve] = L[ve];
2349
+ for (var L = arguments, ye = -1, Me = Yo(L.length - S, 0), ze = Array(Me); ++ye < Me; )
2350
+ ze[ye] = L[S + ye];
2351
+ ye = -1;
2352
+ for (var me = Array(S + 1); ++ye < S; )
2353
+ me[ye] = L[ye];
2354
2354
  return me[S] = k(ze), Je(g, this, me);
2355
2355
  };
2356
2356
  }
@@ -2362,8 +2362,8 @@ ps.exports;
2362
2362
  function M0(g) {
2363
2363
  var S = 0, k = 0;
2364
2364
  return function() {
2365
- var L = ll(), ve = o - (L - k);
2366
- if (k = L, ve > 0) {
2365
+ var L = ll(), ye = o - (L - k);
2366
+ if (k = L, ye > 0) {
2367
2367
  if (++S >= a)
2368
2368
  return arguments[0];
2369
2369
  } else
@@ -2424,7 +2424,7 @@ ps.exports;
2424
2424
  var k = O.call(S, "constructor") && S.constructor;
2425
2425
  return typeof k == "function" && k instanceof k && T.call(k) == ae;
2426
2426
  }
2427
- var Zd = D ? at(D) : yi;
2427
+ var Zd = N ? at(N) : yi;
2428
2428
  function D0(g) {
2429
2429
  return S0(g, Xd(g));
2430
2430
  }
@@ -8071,7 +8071,7 @@ function WP(e) {
8071
8071
  }
8072
8072
  function HP(e, t = []) {
8073
8073
  const n = _e(e);
8074
- return ye(() => {
8074
+ return ve(() => {
8075
8075
  n.current = e;
8076
8076
  }), ue((...r) => {
8077
8077
  var a;
@@ -8080,7 +8080,7 @@ function HP(e, t = []) {
8080
8080
  }
8081
8081
  function KP(e, t) {
8082
8082
  const n = HP(e);
8083
- ye(() => {
8083
+ ve(() => {
8084
8084
  if (t == null)
8085
8085
  return;
8086
8086
  let r = null;
@@ -8093,11 +8093,11 @@ function KP(e, t) {
8093
8093
  }
8094
8094
  function yp(e, t) {
8095
8095
  const n = _e(!1), r = _e(!1);
8096
- ye(() => {
8096
+ ve(() => {
8097
8097
  if (n.current && r.current)
8098
8098
  return e();
8099
8099
  r.current = !0;
8100
- }, t), ye(() => (n.current = !0, () => {
8100
+ }, t), ve(() => (n.current = !0, () => {
8101
8101
  n.current = !1;
8102
8102
  }), []);
8103
8103
  }
@@ -8105,7 +8105,7 @@ const Gg = Kt({
8105
8105
  transformPagePoint: (e) => e,
8106
8106
  isStatic: !1,
8107
8107
  reducedMotion: "never"
8108
- }), Gs = Kt({}), Lo = Kt(null), Ws = typeof document < "u", Lu = Ws ? Rs : ye, Wg = Kt({ strict: !1 }), zu = (e) => e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(), qP = "framerAppearId", Hg = "data-" + zu(qP);
8108
+ }), Gs = Kt({}), Lo = Kt(null), Ws = typeof document < "u", Lu = Ws ? Rs : ve, Wg = Kt({ strict: !1 }), zu = (e) => e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(), qP = "framerAppearId", Hg = "data-" + zu(qP);
8109
8109
  function YP(e, t, n, r) {
8110
8110
  const { visualElement: a } = We(Gs), o = We(Wg), i = We(Lo), s = We(Gg).reducedMotion, l = _e();
8111
8111
  r = r || o.renderer, !l.current && r && (l.current = r(e, {
@@ -8123,7 +8123,7 @@ function YP(e, t, n, r) {
8123
8123
  const u = _e(!!(n[Hg] && !window.HandoffComplete));
8124
8124
  return Lu(() => {
8125
8125
  c && (c.render(), u.current && c.animationState && c.animationState.animateChanges());
8126
- }), ye(() => {
8126
+ }), ve(() => {
8127
8127
  c && (c.updateFeatures(), !u.current && c.animationState && c.animationState.animateChanges(), u.current && (u.current = !1, window.HandoffComplete = !0));
8128
8128
  }), c;
8129
8129
  }
@@ -10953,7 +10953,7 @@ function Qv() {
10953
10953
  if (e === null)
10954
10954
  return [!0, null];
10955
10955
  const { isPresent: t, onExitComplete: n, register: r } = e, a = Fa();
10956
- return ye(() => r(a), []), !t && n ? [!1, () => n && n(a)] : [!0];
10956
+ return ve(() => r(a), []), !t && n ? [!1, () => n && n(a)] : [!0];
10957
10957
  }
10958
10958
  function q$() {
10959
10959
  return Y$(We(Lo));
@@ -12393,7 +12393,7 @@ function iM() {
12393
12393
  return /* @__PURE__ */ new Map();
12394
12394
  }
12395
12395
  function sM(e) {
12396
- return ye(() => () => e(), []);
12396
+ return ve(() => () => e(), []);
12397
12397
  }
12398
12398
  const hr = (e) => e.key || "";
12399
12399
  function lM(e, t) {
@@ -12506,7 +12506,7 @@ var uM = {
12506
12506
  const m = () => f(null), p = () => f(s), v = () => {
12507
12507
  h && a();
12508
12508
  };
12509
- ye(() => {
12509
+ ve(() => {
12510
12510
  h && o && a();
12511
12511
  }, [h, o, a]), KP(v, d);
12512
12512
  const y = st(
@@ -13150,7 +13150,7 @@ var Tr = {
13150
13150
  transitionEnd: u,
13151
13151
  ...d
13152
13152
  } = e, [f, h] = le(!1);
13153
- ye(() => {
13153
+ ve(() => {
13154
13154
  const w = setTimeout(() => {
13155
13155
  h(!0);
13156
13156
  });
@@ -13744,10 +13744,10 @@ function KM() {
13744
13744
  function B(ee, z, J, re, ie, K, be) {
13745
13745
  if (re = re || f, K = K || J, be !== n) {
13746
13746
  if (l) {
13747
- var D = new Error(
13747
+ var N = new Error(
13748
13748
  "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"
13749
13749
  );
13750
- throw D.name = "Invariant Violation", D;
13750
+ throw N.name = "Invariant Violation", N;
13751
13751
  } else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
13752
13752
  var Je = re + ":" + J;
13753
13753
  !F[Je] && // Avoid spamming the console because they are often not actionable except for lib authors
@@ -13837,9 +13837,9 @@ function KM() {
13837
13837
  for (var J = G[B], re = 0; re < $.length; re++)
13838
13838
  if (m(J, $[re]))
13839
13839
  return null;
13840
- var ie = JSON.stringify($, function(be, D) {
13841
- var Je = fe(D);
13842
- return Je === "symbol" ? String(D) : D;
13840
+ var ie = JSON.stringify($, function(be, N) {
13841
+ var Je = fe(N);
13842
+ return Je === "symbol" ? String(N) : N;
13843
13843
  });
13844
13844
  return new p("Invalid " + ee + " `" + z + "` of value `" + String(J) + "` " + ("supplied to `" + U + "`, expected one of " + ie + "."));
13845
13845
  }
@@ -13874,10 +13874,10 @@ function KM() {
13874
13874
  }
13875
13875
  function B(U, ee, z, J, re) {
13876
13876
  for (var ie = [], K = 0; K < $.length; K++) {
13877
- var be = $[K], D = be(U, ee, z, J, re, n);
13878
- if (D == null)
13877
+ var be = $[K], N = be(U, ee, z, J, re, n);
13878
+ if (N == null)
13879
13879
  return null;
13880
- D.data && r(D.data, "expectedType") && ie.push(D.data.expectedType);
13880
+ N.data && r(N.data, "expectedType") && ie.push(N.data.expectedType);
13881
13881
  }
13882
13882
  var Je = ie.length > 0 ? ", expected one of type [" + ie.join(", ") + "]" : "";
13883
13883
  return new p("Invalid " + J + " `" + re + "` supplied to " + ("`" + z + "`" + Je + "."));
@@ -13927,9 +13927,9 @@ function KM() {
13927
13927
  "Invalid " + ee + " `" + z + "` key `" + K + "` supplied to `" + U + "`.\nBad object: " + JSON.stringify(G[B], null, " ") + `
13928
13928
  Valid keys: ` + JSON.stringify(Object.keys($), null, " ")
13929
13929
  );
13930
- var D = be(J, K, U, ee, z + "." + K, n);
13931
- if (D)
13932
- return D;
13930
+ var N = be(J, K, U, ee, z + "." + K, n);
13931
+ if (N)
13932
+ return N;
13933
13933
  }
13934
13934
  return null;
13935
13935
  }
@@ -14260,7 +14260,7 @@ var My = pd({}, function(e) {
14260
14260
  process.env.NODE_ENV !== "production" && (typeof _ < "u" && console.warn("React-Focus-Lock: allowTextSelection is deprecated and enabled by default"), R.useEffect(function() {
14261
14261
  !s.current && typeof oe != "string" && console.error("FocusLock: could not obtain ref to internal node");
14262
14262
  }, []));
14263
- var D = $r((r = {}, r[Ay] = m && "disabled", r[Zc] = j, r), fe), Je = v !== !0, St = Je && v !== "tail", at = Ty([n, be]), pe = R.useMemo(function() {
14263
+ var N = $r((r = {}, r[Ay] = m && "disabled", r[Zc] = j, r), fe), Je = v !== !0, St = Je && v !== "tail", at = Ty([n, be]), pe = R.useMemo(function() {
14264
14264
  return {
14265
14265
  observed: s,
14266
14266
  shards: de,
@@ -14297,7 +14297,7 @@ var My = pd({}, function(e) {
14297
14297
  focusOptions: F
14298
14298
  }), /* @__PURE__ */ R.createElement(oe, $r({
14299
14299
  ref: at
14300
- }, D, {
14300
+ }, N, {
14301
14301
  className: I,
14302
14302
  onBlur: K,
14303
14303
  onFocus: ie
@@ -15090,7 +15090,7 @@ var Gh, CO = (Gh = Uh.default) != null ? Gh : Uh, rb = (e) => {
15090
15090
  );
15091
15091
  };
15092
15092
  rb.displayName = "FocusLock";
15093
- var AO = dP ? Rs : ye;
15093
+ var AO = dP ? Rs : ve;
15094
15094
  function Wh(e, t = []) {
15095
15095
  const n = _e(e);
15096
15096
  return AO(() => {
@@ -15282,7 +15282,7 @@ function Ad(e, t = {}) {
15282
15282
  media: c,
15283
15283
  matches: n ? !!i[u] : a().matchMedia(c).matches
15284
15284
  })));
15285
- return ye(() => {
15285
+ return ve(() => {
15286
15286
  const c = a();
15287
15287
  l(
15288
15288
  o.map((f) => ({
@@ -15347,7 +15347,7 @@ var RO = Object.defineProperty, OO = (e, t, n) => t in e ? RO(e, t, { enumerable
15347
15347
  }, tu = new DO();
15348
15348
  function ib(e, t) {
15349
15349
  const [n, r] = le(0);
15350
- return ye(() => {
15350
+ return ve(() => {
15351
15351
  const a = e.current;
15352
15352
  if (a) {
15353
15353
  if (t) {
@@ -15480,7 +15480,7 @@ function zO(e) {
15480
15480
  }
15481
15481
  function VO(e, t) {
15482
15482
  const n = e.current;
15483
- ye(() => {
15483
+ ve(() => {
15484
15484
  if (!(!e.current || !t))
15485
15485
  return LO(e.current);
15486
15486
  }, [t, e, n]);
@@ -15879,7 +15879,7 @@ function hb(e) {
15879
15879
  lockFocusAcrossFrames: u,
15880
15880
  isOpen: d
15881
15881
  } = tr(), [f, h] = Qv();
15882
- ye(() => {
15882
+ ve(() => {
15883
15883
  !f && h && setTimeout(h);
15884
15884
  }, [f, h]);
15885
15885
  const m = ib(r, d);
@@ -16052,7 +16052,7 @@ vb.displayName = "ModalFooter";
16052
16052
  var kd = Ue(
16053
16053
  (e, t) => {
16054
16054
  const { className: n, ...r } = e, { headerId: a, setHeaderMounted: o } = tr();
16055
- ye(() => (o(!0), () => o(!1)), [o]);
16055
+ ve(() => (o(!0), () => o(!1)), [o]);
16056
16056
  const i = Ke("chakra-modal__header", n), l = {
16057
16057
  flex: 0,
16058
16058
  ...Dr().header
@@ -16095,7 +16095,7 @@ var kI = $e(ar.div), Pd = Ue(
16095
16095
  Pd.displayName = "ModalOverlay";
16096
16096
  var _d = Ue((e, t) => {
16097
16097
  const { className: n, ...r } = e, { bodyId: a, setBodyMounted: o } = tr();
16098
- ye(() => (o(!0), () => o(!1)), [o]);
16098
+ ve(() => (o(!0), () => o(!1)), [o]);
16099
16099
  const i = Ke("chakra-modal__body", n), s = Dr();
16100
16100
  return /* @__PURE__ */ b(
16101
16101
  $e.div,
@@ -16566,7 +16566,7 @@ const $d = ({
16566
16566
  }
16567
16567
  return u;
16568
16568
  };
16569
- return ye(() => {
16569
+ return ve(() => {
16570
16570
  t && c();
16571
16571
  }, [...n]), {
16572
16572
  data: r,
@@ -17576,9 +17576,9 @@ function Nj(e) {
17576
17576
  validateOnMount: i,
17577
17577
  onSubmit: u
17578
17578
  }, d), h = _e(f.initialValues), m = _e(f.initialErrors || dr), p = _e(f.initialTouched || Gi), v = _e(f.initialStatus), y = _e(!1), w = _e({});
17579
- process.env.NODE_ENV !== "production" && ye(function() {
17579
+ process.env.NODE_ENV !== "production" && ve(function() {
17580
17580
  typeof s > "u" || (process.env.NODE_ENV !== "production" ? ca(!1, "isInitialValid has been deprecated and will be removed in future versions of Formik. Please use initialErrors or validateOnMount instead.") : ca(!1));
17581
- }, []), ye(function() {
17581
+ }, []), ve(function() {
17582
17582
  return y.current = !0, function() {
17583
17583
  y.current = !1;
17584
17584
  };
@@ -17607,11 +17607,11 @@ function Nj(e) {
17607
17607
  });
17608
17608
  }, [f.validate]), I = ue(function(T, O) {
17609
17609
  var V = f.validationSchema, W = Xt(V) ? V(O) : V, ae = O && W.validateAt ? W.validateAt(O, T) : jj(T, W);
17610
- return new Promise(function(he, N) {
17610
+ return new Promise(function(he, D) {
17611
17611
  ae.then(function() {
17612
17612
  he(dr);
17613
17613
  }, function(ot) {
17614
- ot.name === "ValidationError" ? he(Bj(ot)) : (process.env.NODE_ENV !== "production" && console.warn("Warning: An unhandled error was caught during validation in <Formik validationSchema />", ot), N(ot));
17614
+ ot.name === "ValidationError" ? he(Bj(ot)) : (process.env.NODE_ENV !== "production" && console.warn("Warning: An unhandled error was caught during validation in <Formik validationSchema />", ot), D(ot));
17615
17615
  });
17616
17616
  });
17617
17617
  }, [f.validationSchema]), Q = ue(function(T, O) {
@@ -17625,8 +17625,8 @@ function Nj(e) {
17625
17625
  return Q(W, Ft(T, W));
17626
17626
  }) : [Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];
17627
17627
  return Promise.all(V).then(function(W) {
17628
- return W.reduce(function(ae, he, N) {
17629
- return he === "DO_NOT_DELETE_YOU_WILL_BE_FIRED" || he && (ae = Pr(ae, O[N], he)), ae;
17628
+ return W.reduce(function(ae, he, D) {
17629
+ return he === "DO_NOT_DELETE_YOU_WILL_BE_FIRED" || he && (ae = Pr(ae, O[D], he)), ae;
17630
17630
  }, {});
17631
17631
  });
17632
17632
  }, [Q]), ce = ue(function(T) {
@@ -17650,7 +17650,7 @@ function Nj(e) {
17650
17650
  })), O;
17651
17651
  });
17652
17652
  });
17653
- ye(function() {
17653
+ ve(function() {
17654
17654
  i && y.current === !0 && gr(h.current, f.initialValues) && de(h.current);
17655
17655
  }, [i, de]);
17656
17656
  var H = ue(function(T) {
@@ -17671,24 +17671,24 @@ function Nj(e) {
17671
17671
  });
17672
17672
  };
17673
17673
  if (f.onReset) {
17674
- var N = f.onReset(M.values, Je);
17675
- yc(N) ? N.then(he) : he();
17674
+ var D = f.onReset(M.values, Je);
17675
+ yc(D) ? D.then(he) : he();
17676
17676
  } else
17677
17677
  he();
17678
17678
  }, [f.initialErrors, f.initialStatus, f.initialTouched, f.onReset]);
17679
- ye(function() {
17679
+ ve(function() {
17680
17680
  y.current === !0 && !gr(h.current, f.initialValues) && c && (h.current = f.initialValues, H(), i && de(h.current));
17681
- }, [c, f.initialValues, H, i, de]), ye(function() {
17681
+ }, [c, f.initialValues, H, i, de]), ve(function() {
17682
17682
  c && y.current === !0 && !gr(m.current, f.initialErrors) && (m.current = f.initialErrors || dr, _({
17683
17683
  type: "SET_ERRORS",
17684
17684
  payload: f.initialErrors || dr
17685
17685
  }));
17686
- }, [c, f.initialErrors]), ye(function() {
17686
+ }, [c, f.initialErrors]), ve(function() {
17687
17687
  c && y.current === !0 && !gr(p.current, f.initialTouched) && (p.current = f.initialTouched || Gi, _({
17688
17688
  type: "SET_TOUCHED",
17689
17689
  payload: f.initialTouched || Gi
17690
17690
  }));
17691
- }, [c, f.initialTouched]), ye(function() {
17691
+ }, [c, f.initialTouched]), ve(function() {
17692
17692
  c && y.current === !0 && !gr(v.current, f.initialStatus) && (v.current = f.initialStatus, _({
17693
17693
  type: "SET_STATUS",
17694
17694
  payload: f.initialStatus
@@ -17788,12 +17788,12 @@ function Nj(e) {
17788
17788
  var V = O, W = T, ae;
17789
17789
  if (!vc(T)) {
17790
17790
  T.persist && T.persist();
17791
- var he = T.target ? T.target : T.currentTarget, N = he.type, ot = he.name, qt = he.id, Yt = he.value, ir = he.checked, It = he.outerHTML, Bn = he.options, xt = he.multiple;
17791
+ var he = T.target ? T.target : T.currentTarget, D = he.type, ot = he.name, qt = he.id, Yt = he.value, ir = he.checked, It = he.outerHTML, Bn = he.options, xt = he.multiple;
17792
17792
  V = O || ot || qt, !V && process.env.NODE_ENV !== "production" && Im({
17793
17793
  htmlContent: It,
17794
17794
  documentationAnchorLink: "handlechange-e-reactchangeeventany--void",
17795
17795
  handlerName: "handleChange"
17796
- }), W = /number|range/.test(N) ? (ae = parseFloat(Yt), isNaN(ae) ? "" : ae) : /checkbox/.test(N) ? Vj(Ft(M.values, V), ir, Yt) : Bn && xt ? zj(Bn) : Yt;
17796
+ }), W = /number|range/.test(D) ? (ae = parseFloat(Yt), isNaN(ae) ? "" : ae) : /checkbox/.test(D) ? Vj(Ft(M.values, V), ir, Yt) : Bn && xt ? zj(Bn) : Yt;
17797
17797
  }
17798
17798
  V && G(V, W);
17799
17799
  }, [G, M.values]), U = Lt(function(T) {
@@ -17814,12 +17814,12 @@ function Nj(e) {
17814
17814
  return W ? de(M.values) : Promise.resolve();
17815
17815
  }), z = ue(function(T, O) {
17816
17816
  T.persist && T.persist();
17817
- var V = T.target, W = V.name, ae = V.id, he = V.outerHTML, N = O || W || ae;
17818
- !N && process.env.NODE_ENV !== "production" && Im({
17817
+ var V = T.target, W = V.name, ae = V.id, he = V.outerHTML, D = O || W || ae;
17818
+ !D && process.env.NODE_ENV !== "production" && Im({
17819
17819
  htmlContent: he,
17820
17820
  documentationAnchorLink: "handleblur-e-any--void",
17821
17821
  handlerName: "handleBlur"
17822
- }), ee(N, !0);
17822
+ }), ee(D, !0);
17823
17823
  }, [ee]), J = Lt(function(T) {
17824
17824
  if (vc(T))
17825
17825
  return function(O) {
@@ -17874,7 +17874,7 @@ function Nj(e) {
17874
17874
  }), O))
17875
17875
  throw T;
17876
17876
  });
17877
- }), D = Lt(function(T) {
17877
+ }), N = Lt(function(T) {
17878
17878
  if (T && T.preventDefault && Xt(T.preventDefault) && T.preventDefault(), T && T.stopPropagation && Xt(T.stopPropagation) && T.stopPropagation(), process.env.NODE_ENV !== "production" && typeof document < "u") {
17879
17879
  var O = Ij();
17880
17880
  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)));
@@ -17929,8 +17929,8 @@ function Nj(e) {
17929
17929
  onBlur: J
17930
17930
  };
17931
17931
  if (O) {
17932
- var he = T.type, N = T.value, ot = T.as, qt = T.multiple;
17933
- he === "checkbox" ? N === void 0 ? ae.checked = !!W : (ae.checked = !!(Array.isArray(W) && ~W.indexOf(N)), ae.value = N) : he === "radio" ? (ae.checked = W === N, ae.value = N) : ot === "select" && qt && (ae.value = ae.value || [], ae.multiple = !0);
17932
+ var he = T.type, D = T.value, ot = T.as, qt = T.multiple;
17933
+ he === "checkbox" ? D === void 0 ? ae.checked = !!W : (ae.checked = !!(Array.isArray(W) && ~W.indexOf(D)), ae.value = D) : he === "radio" ? (ae.checked = W === D, ae.value = D) : ot === "select" && qt && (ae.value = ae.value || [], ae.multiple = !0);
17934
17934
  }
17935
17935
  return ae;
17936
17936
  }, [J, U, M.values]), gt = st(function() {
@@ -17945,7 +17945,7 @@ function Nj(e) {
17945
17945
  handleBlur: J,
17946
17946
  handleChange: U,
17947
17947
  handleReset: at,
17948
- handleSubmit: D,
17948
+ handleSubmit: N,
17949
17949
  resetForm: H,
17950
17950
  setErrors: Fe,
17951
17951
  setFormikState: re,
@@ -18046,7 +18046,7 @@ function Vj(e, t, n) {
18046
18046
  return !!t;
18047
18047
  return t && n && !a ? r.concat(n) : a ? r.slice(0, o).concat(r.slice(o + 1)) : r;
18048
18048
  }
18049
- var Uj = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u" ? Rs : ye;
18049
+ var Uj = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u" ? Rs : ve;
18050
18050
  function Lt(e) {
18051
18051
  var t = _e(e);
18052
18052
  return Uj(function() {
@@ -25661,7 +25661,7 @@ const WL = "Payment Completed", HL = ({
25661
25661
  handleCloseModal: n
25662
25662
  }) => {
25663
25663
  const [r, a] = le(!1), o = _e(null), [i] = Ad("(max-width: 600px)");
25664
- return ye(() => {
25664
+ return ve(() => {
25665
25665
  const l = (c) => {
25666
25666
  c.data.type === WL && n();
25667
25667
  };
@@ -25903,7 +25903,7 @@ const WL = "Payment Completed", HL = ({
25903
25903
  Request: i
25904
25904
  }) => {
25905
25905
  const s = Tb(), l = Cb(), [c, u] = le(null), [d, f] = le(null), [h, m] = le(!1);
25906
- return ye(() => {
25906
+ return ve(() => {
25907
25907
  if (s && n > 0) {
25908
25908
  t.email = r.values.email, t.name = r.values.fullname;
25909
25909
  const p = s == null ? void 0 : s.paymentRequest({
@@ -26059,7 +26059,7 @@ const WL = "Payment Completed", HL = ({
26059
26059
  country: zt().required("Please select a country"),
26060
26060
  street: zt().required("Please enter your street address"),
26061
26061
  ...a
26062
- }), D = vu().shape({
26062
+ }), N = vu().shape({
26063
26063
  email: zt().matches(
26064
26064
  /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
26065
26065
  "Please enter a valid email"
@@ -26079,7 +26079,7 @@ const WL = "Payment Completed", HL = ({
26079
26079
  data: T,
26080
26080
  refetch: O,
26081
26081
  isLoading: V
26082
- } = tD($ == null ? void 0 : $.reference, Q), [W, ae] = le(!1), he = gt || an || V || W, N = Nj({
26082
+ } = tD($ == null ? void 0 : $.reference, Q), [W, ae] = le(!1), he = gt || an || V || W, D = Nj({
26083
26083
  initialValues: {
26084
26084
  email: (i == null ? void 0 : i.email) ?? "",
26085
26085
  fullname: (i == null ? void 0 : i.fullname) ?? "",
@@ -26095,8 +26095,8 @@ const WL = "Payment Completed", HL = ({
26095
26095
  isCard: !1,
26096
26096
  ...o
26097
26097
  },
26098
- enableReinitialize: !0,
26099
- validationSchema: G ? be : D,
26098
+ validationSchema: G ? be : N,
26099
+ validateOnChange: !1,
26100
26100
  onSubmit: (se, { setSubmitting: Le }) => {
26101
26101
  if (xt === 0) {
26102
26102
  c({
@@ -26148,12 +26148,14 @@ const WL = "Payment Completed", HL = ({
26148
26148
  );
26149
26149
  }
26150
26150
  });
26151
- Q0(u, () => ({
26151
+ ve(() => {
26152
+ D.setFieldValue("email", (i == null ? void 0 : i.email) ?? ""), D.setFieldValue("fullname", (i == null ? void 0 : i.fullname) ?? ""), D.setTouched({}, !1);
26153
+ }, [i]), Q0(u, () => ({
26152
26154
  updateCustomFormValues(se, Le) {
26153
- N.setFieldValue(se, Le);
26155
+ D.setFieldValue(se, Le);
26154
26156
  }
26155
26157
  }));
26156
- const ot = ((Xo = pe == null ? void 0 : pe.payload) == null ? void 0 : Xo.local_amount) ?? 0, qt = ((Dt = pe == null ? void 0 : pe.payload) == null ? void 0 : Dt.local_transaction_fee) ?? 0, Yt = ((Jo = pe == null ? void 0 : pe.payload) == null ? void 0 : Jo.local_international_card_fee) ?? 0, ir = ((Qo = pe == null ? void 0 : pe.payload) == null ? void 0 : Qo.dollar_international_card_fee) ?? 0, It = parseFloat(ot) + parseFloat(qt) + (f !== Wn.NGN && (N.values.country !== "" || (at == null ? void 0 : at.currency) !== f) && St((ei = N == null ? void 0 : N.values) == null ? void 0 : ei.country) !== f ? Number(Yt) : 0), Bn = N.values.country !== "" ? St((ti = N == null ? void 0 : N.values) == null ? void 0 : ti.country) !== f : (at == null ? void 0 : at.currency) !== f, xt = st(() => {
26158
+ const ot = ((Xo = pe == null ? void 0 : pe.payload) == null ? void 0 : Xo.local_amount) ?? 0, qt = ((Dt = pe == null ? void 0 : pe.payload) == null ? void 0 : Dt.local_transaction_fee) ?? 0, Yt = ((Jo = pe == null ? void 0 : pe.payload) == null ? void 0 : Jo.local_international_card_fee) ?? 0, ir = ((Qo = pe == null ? void 0 : pe.payload) == null ? void 0 : Qo.dollar_international_card_fee) ?? 0, It = parseFloat(ot) + parseFloat(qt) + (f !== Wn.NGN && (D.values.country !== "" || (at == null ? void 0 : at.currency) !== f) && St((ei = D == null ? void 0 : D.values) == null ? void 0 : ei.country) !== f ? Number(Yt) : 0), Bn = D.values.country !== "" ? St((ti = D == null ? void 0 : D.values) == null ? void 0 : ti.country) !== f : (at == null ? void 0 : at.currency) !== f, xt = st(() => {
26157
26159
  var se;
26158
26160
  return f === Wn.UGX ? Math.ceil(It) * 100 : Math.round(
26159
26161
  It * ((se = pe == null ? void 0 : pe.payload) != null && se.is_zero_decimal_currency ? 1 : 100)
@@ -26166,11 +26168,11 @@ const WL = "Payment Completed", HL = ({
26166
26168
  (Number((ni = pe == null ? void 0 : pe.payload) == null ? void 0 : ni.dollar_transaction_fee) + Number(Bn ? ir : 0)).toFixed(2)
26167
26169
  ), ft = {
26168
26170
  ...e.metadata,
26169
- phone_number: (En = N.values) == null ? void 0 : En.phone,
26171
+ phone_number: (En = D.values) == null ? void 0 : En.phone,
26170
26172
  reference: d,
26171
- email: N.values.email,
26172
- name: (ri = N.values) == null ? void 0 : ri.fullname,
26173
- country: (ai = N == null ? void 0 : N.values) == null ? void 0 : ai.country,
26173
+ email: D.values.email,
26174
+ name: (ri = D.values) == null ? void 0 : ri.fullname,
26175
+ country: (ai = D == null ? void 0 : D.values) == null ? void 0 : ai.country,
26174
26176
  actual_price: Number((oi = pe == null ? void 0 : pe.payload) == null ? void 0 : oi.dollar_amount),
26175
26177
  transaction_fee: xn,
26176
26178
  international_fee: Number(
@@ -26206,10 +26208,10 @@ const WL = "Payment Completed", HL = ({
26206
26208
  }, Zo = () => {
26207
26209
  ee("");
26208
26210
  };
26209
- ye(() => {
26211
+ ve(() => {
26210
26212
  const { amount: se } = z;
26211
26213
  se !== 0 && U !== "" && (Number(h) - se > 0 && Number(h) - se < 1 ? de(1) : de(h - se));
26212
- }, [z, N]);
26214
+ }, [z, D]);
26213
26215
  const jn = async () => {
26214
26216
  try {
26215
26217
  return await JI(
@@ -26219,21 +26221,21 @@ const WL = "Payment Completed", HL = ({
26219
26221
  Gt("Error loading payment gateway", Wt.error);
26220
26222
  }
26221
26223
  };
26222
- ye(() => {
26224
+ ve(() => {
26223
26225
  oe(
26224
26226
  // isFree
26225
26227
  f !== "NGN" && f !== "GHS"
26226
26228
  );
26227
26229
  }, [f]);
26228
26230
  const cl = async () => {
26229
- if (ae(!0), l && (await l(N.values)).terminate)
26231
+ if (ae(!0), l && (await l(D.values)).terminate)
26230
26232
  return;
26231
- const se = await N.validateForm();
26233
+ const se = await D.validateForm();
26232
26234
  if (Object.keys(se).length <= 0) {
26233
26235
  if (B(!0), xt === 0) {
26234
26236
  c({
26235
- fullname: N.values.fullname,
26236
- email: N.values.email,
26237
+ fullname: D.values.fullname,
26238
+ email: D.values.email,
26237
26239
  reference: d,
26238
26240
  amount: 0
26239
26241
  });
@@ -26270,8 +26272,8 @@ const WL = "Payment Completed", HL = ({
26270
26272
  }));
26271
26273
  const se = await O();
26272
26274
  se.isSuccess ? c({
26273
- fullname: N.values.fullname,
26274
- email: N.values.email,
26275
+ fullname: D.values.fullname,
26276
+ email: D.values.email,
26275
26277
  reference: $ == null ? void 0 : $.reference,
26276
26278
  ...se.data
26277
26279
  }) : Gt(`${se == null ? void 0 : se.error}`, Wt.error);
@@ -26287,7 +26289,7 @@ const WL = "Payment Completed", HL = ({
26287
26289
  mx: "auto",
26288
26290
  fontFamily: (p == null ? void 0 : p.font_family) ?? "inherit",
26289
26291
  children: [
26290
- /* @__PURE__ */ b(ba, { order: { base: "2", lg: "1" }, children: /* @__PURE__ */ b(Mj, { value: N, children: /* @__PURE__ */ X("form", { onSubmit: N.handleSubmit, children: [
26292
+ /* @__PURE__ */ b(ba, { order: { base: "2", lg: "1" }, children: /* @__PURE__ */ b(Mj, { value: D, children: /* @__PURE__ */ X("form", { onSubmit: D.handleSubmit, children: [
26291
26293
  /* @__PURE__ */ X(Qe, { flexDirection: "column", gap: "20px", pb: "40px", children: [
26292
26294
  qm(n) ? /* @__PURE__ */ b(kn, { children: n }) : /* @__PURE__ */ b(
26293
26295
  Pa,
@@ -26304,14 +26306,14 @@ const WL = "Payment Completed", HL = ({
26304
26306
  da,
26305
26307
  {
26306
26308
  id: "fullname",
26307
- label: "Your name *",
26309
+ label: "Your name",
26308
26310
  name: "fullname",
26309
- onChange: (se) => N.setFieldValue("fullname", se.target.value),
26310
- value: (si = N.values) == null ? void 0 : si.fullname,
26311
+ onChange: (se) => D.setFieldValue("fullname", se.target.value),
26312
+ value: (si = D.values) == null ? void 0 : si.fullname,
26311
26313
  placeholder: "name",
26312
26314
  type: "text",
26313
- error: !!((Cn = N == null ? void 0 : N.errors) != null && Cn.fullname),
26314
- errorMessage: (li = N == null ? void 0 : N.errors) == null ? void 0 : li.fullname,
26315
+ error: !!((Cn = D == null ? void 0 : D.errors) != null && Cn.fullname),
26316
+ errorMessage: (li = D == null ? void 0 : D.errors) == null ? void 0 : li.fullname,
26315
26317
  fontFamily: "inherit"
26316
26318
  }
26317
26319
  ),
@@ -26319,14 +26321,14 @@ const WL = "Payment Completed", HL = ({
26319
26321
  da,
26320
26322
  {
26321
26323
  id: "email",
26322
- label: "Email address *",
26324
+ label: "Email address",
26323
26325
  name: "email",
26324
- onChange: (se) => N.setFieldValue("email", se.target.value),
26325
- value: (ci = N.values) == null ? void 0 : ci.email,
26326
+ onChange: (se) => D.setFieldValue("email", se.target.value),
26327
+ value: (ci = D.values) == null ? void 0 : ci.email,
26326
26328
  placeholder: "email",
26327
26329
  type: "email",
26328
- error: !!((ui = N == null ? void 0 : N.errors) != null && ui.email),
26329
- errorMessage: (di = N == null ? void 0 : N.errors) == null ? void 0 : di.email,
26330
+ error: !!((ui = D == null ? void 0 : D.errors) != null && ui.email),
26331
+ errorMessage: (di = D == null ? void 0 : D.errors) == null ? void 0 : di.email,
26330
26332
  fontFamily: "inherit"
26331
26333
  }
26332
26334
  ),
@@ -26349,10 +26351,10 @@ const WL = "Payment Completed", HL = ({
26349
26351
  metadata: ft,
26350
26352
  currency: f,
26351
26353
  amount: xt,
26352
- formik: N,
26354
+ formik: D,
26353
26355
  checkForErrors: async () => {
26354
- l && await l(N.values);
26355
- const se = await N.validateForm();
26356
+ l && await l(D.values);
26357
+ const se = await D.validateForm();
26356
26358
  return Object.keys(se).length > 0;
26357
26359
  },
26358
26360
  onPaymentComplete: c,
@@ -26415,7 +26417,7 @@ const WL = "Payment Completed", HL = ({
26415
26417
  currency: f,
26416
26418
  amount: xt,
26417
26419
  discount_code: U,
26418
- formik: N,
26420
+ formik: D,
26419
26421
  isFree: xt === 0,
26420
26422
  showPayment: xe,
26421
26423
  onCancel: wn,
@@ -26459,12 +26461,14 @@ const WL = "Payment Completed", HL = ({
26459
26461
  isLoading: he,
26460
26462
  onClick: async (se) => {
26461
26463
  if (se.preventDefault(), ae(!0), l) {
26462
- const Le = await l(N.values);
26463
- if (Le != null && Le.terminate)
26464
+ const Le = await l(D.values);
26465
+ if (Le != null && Le.terminate) {
26466
+ ae(!1);
26464
26467
  return;
26465
- ae(!1), N.submitForm();
26468
+ }
26469
+ ae(!1), D.submitForm();
26466
26470
  } else
26467
- ae(!1), N.submitForm();
26471
+ ae(!1), D.submitForm();
26468
26472
  },
26469
26473
  _hover: {
26470
26474
  opacity: 0.8,
@@ -26582,7 +26586,7 @@ const WL = "Payment Completed", HL = ({
26582
26586
  }
26583
26587
  )
26584
26588
  ] }),
26585
- f !== Wn.NGN && (N.values.country !== "" || (at == null ? void 0 : at.currency) !== f) && St((Ur = N == null ? void 0 : N.values) == null ? void 0 : Ur.country) !== f && /* @__PURE__ */ X(Qe, { width: "100%", justifyContent: "space-between", children: [
26589
+ f !== Wn.NGN && (D.values.country !== "" || (at == null ? void 0 : at.currency) !== f) && St((Ur = D == null ? void 0 : D.values) == null ? void 0 : Ur.country) !== f && /* @__PURE__ */ X(Qe, { width: "100%", justifyContent: "space-between", children: [
26586
26590
  /* @__PURE__ */ X(Qe, { alignItems: "center", children: [
26587
26591
  /* @__PURE__ */ b(
26588
26592
  et,
@@ -26719,7 +26723,7 @@ const WL = "Payment Completed", HL = ({
26719
26723
  lineHeight: "22px",
26720
26724
  children: [
26721
26725
  "-",
26722
- N.values.currency,
26726
+ D.values.currency,
26723
26727
  " ",
26724
26728
  (yi = (gi = z.amount) == null ? void 0 : gi.toFixed(2)) == null ? void 0 : yi.replace(/\B(?=(\d{3})+(?!\d))/g, ",")
26725
26729
  ]
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mainstack-payments",
3
3
  "type": "module",
4
- "version": "0.1.3",
4
+ "version": "0.1.5",
5
5
  "main": "build/mainstack-payments.js",
6
6
  "types": "build/src/index.d.ts",
7
7
  "files": [