moyasar-payment-form 2.2.6 → 2.2.8

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/moyasar.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * name: moyasar-payment-form
3
- * version: v2.2.6
3
+ * version: v2.2.8
4
4
  * description: Moyasar payment form utilities
5
5
  * author: Jan Jagieła - Railwaymen Team
6
6
  * homepage: https://docs.moyasar.com
@@ -9,14 +9,14 @@ var Se = Object.defineProperty, Pe = Object.defineProperties;
9
9
  var Xe = Object.getOwnPropertyDescriptors;
10
10
  var DA = Object.getOwnPropertySymbols;
11
11
  var ft = Object.prototype.hasOwnProperty, dt = Object.prototype.propertyIsEnumerable;
12
- var mt = Math.pow, pt = (A, t, e) => t in A ? Se(A, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : A[t] = e, S = (A, t) => {
12
+ var mt = Math.pow, pt = (A, t, e) => t in A ? Se(A, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : A[t] = e, B = (A, t) => {
13
13
  for (var e in t || (t = {}))
14
14
  ft.call(t, e) && pt(A, e, t[e]);
15
15
  if (DA)
16
16
  for (var e of DA(t))
17
17
  dt.call(t, e) && pt(A, e, t[e]);
18
18
  return A;
19
- }, X = (A, t) => Pe(A, Xe(t));
19
+ }, Q = (A, t) => Pe(A, Xe(t));
20
20
  var MA = (A, t) => {
21
21
  var e = {};
22
22
  for (var n in A)
@@ -42,7 +42,7 @@ var K = (A, t, e) => new Promise((n, r) => {
42
42
  }, l = (i) => i.done ? n(i.value) : Promise.resolve(i.value).then(a, o);
43
43
  l((e = e.apply(A, t)).next());
44
44
  });
45
- var UA, B, Yt, rA, vt, Zt, Kt, Ht, nt, xA, VA, Rt, gA = {}, jt = [], Qe = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, yA = Array.isArray;
45
+ var UA, S, Yt, rA, vt, Zt, Kt, Ht, nt, xA, VA, Rt, gA = {}, jt = [], Qe = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, yA = Array.isArray;
46
46
  function tA(A, t) {
47
47
  for (var e in t) A[e] = t[e];
48
48
  return A;
@@ -58,7 +58,7 @@ function YA(A, t, e) {
58
58
  }
59
59
  function XA(A, t, e, n, r) {
60
60
  var a = { type: A, props: t, key: e, ref: n, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: r == null ? ++Yt : r, __i: -1, __u: 0 };
61
- return r == null && B.vnode != null && B.vnode(a), a;
61
+ return r == null && S.vnode != null && S.vnode(a), a;
62
62
  }
63
63
  function $(A) {
64
64
  return A.children;
@@ -82,10 +82,10 @@ function Ft(A) {
82
82
  }
83
83
  }
84
84
  function ZA(A) {
85
- (!A.__d && (A.__d = !0) && rA.push(A) && !LA.__r++ || vt != B.debounceRendering) && ((vt = B.debounceRendering) || Zt)(LA);
85
+ (!A.__d && (A.__d = !0) && rA.push(A) && !LA.__r++ || vt != S.debounceRendering) && ((vt = S.debounceRendering) || Zt)(LA);
86
86
  }
87
87
  function LA() {
88
- for (var A, t, e, n, r, a, o, l = 1; rA.length; ) rA.length > l && rA.sort(Kt), A = rA.shift(), l = rA.length, A.__d && (e = void 0, r = (n = (t = A).__v).__e, a = [], o = [], t.__P && ((e = tA({}, n)).__v = n.__v + 1, B.vnode && B.vnode(e), at(t.__P, e, n, t.__n, t.__P.namespaceURI, 32 & n.__u ? [r] : null, a, r == null ? iA(n) : r, !!(32 & n.__u), o), e.__v = n.__v, e.__.__k[e.__i] = e, te(a, e, o), e.__e != r && Ft(e)));
88
+ for (var A, t, e, n, r, a, o, l = 1; rA.length; ) rA.length > l && rA.sort(Kt), A = rA.shift(), l = rA.length, A.__d && (e = void 0, r = (n = (t = A).__v).__e, a = [], o = [], t.__P && ((e = tA({}, n)).__v = n.__v + 1, S.vnode && S.vnode(e), at(t.__P, e, n, t.__n, t.__P.namespaceURI, 32 & n.__u ? [r] : null, a, r == null ? iA(n) : r, !!(32 & n.__u), o), e.__v = n.__v, e.__.__k[e.__i] = e, te(a, e, o), e.__e != r && Ft(e)));
89
89
  LA.__r = 0;
90
90
  }
91
91
  function $t(A, t, e, n, r, a, o, l, i, s, u) {
@@ -158,20 +158,20 @@ function ht(A) {
158
158
  var e = this.l[t.type + A];
159
159
  if (t.t == null) t.t = nt++;
160
160
  else if (t.t < e.u) return;
161
- return e(B.event ? B.event(t) : t);
161
+ return e(S.event ? S.event(t) : t);
162
162
  }
163
163
  };
164
164
  }
165
165
  function at(A, t, e, n, r, a, o, l, i, s) {
166
- var u, c, m, f, w, y, v, d, g, D, b, h, C, P, O, L, k, Q = t.type;
166
+ var u, c, m, f, w, y, v, d, g, D, b, h, C, P, O, L, k, X = t.type;
167
167
  if (t.constructor != null) return null;
168
- 128 & e.__u && (i = !!(32 & e.__u), a = [l = t.__e = e.__e]), (u = B.__b) && u(t);
169
- A: if (typeof Q == "function") try {
170
- if (d = t.props, g = "prototype" in Q && Q.prototype.render, D = (u = Q.contextType) && n[u.__c], b = u ? D ? D.props.value : u.__ : n, e.__c ? v = (c = t.__c = e.__c).__ = c.__E : (g ? t.__c = c = new Q(d, b) : (t.__c = c = new F(d, b), c.constructor = Q, c.render = Ie), D && D.sub(c), c.props = d, c.state || (c.state = {}), c.context = b, c.__n = n, m = c.__d = !0, c.__h = [], c._sb = []), g && c.__s == null && (c.__s = c.state), g && Q.getDerivedStateFromProps != null && (c.__s == c.state && (c.__s = tA({}, c.__s)), tA(c.__s, Q.getDerivedStateFromProps(d, c.__s))), f = c.props, w = c.state, c.__v = t, m) g && Q.getDerivedStateFromProps == null && c.componentWillMount != null && c.componentWillMount(), g && c.componentDidMount != null && c.__h.push(c.componentDidMount);
168
+ 128 & e.__u && (i = !!(32 & e.__u), a = [l = t.__e = e.__e]), (u = S.__b) && u(t);
169
+ A: if (typeof X == "function") try {
170
+ if (d = t.props, g = "prototype" in X && X.prototype.render, D = (u = X.contextType) && n[u.__c], b = u ? D ? D.props.value : u.__ : n, e.__c ? v = (c = t.__c = e.__c).__ = c.__E : (g ? t.__c = c = new X(d, b) : (t.__c = c = new F(d, b), c.constructor = X, c.render = Ie), D && D.sub(c), c.props = d, c.state || (c.state = {}), c.context = b, c.__n = n, m = c.__d = !0, c.__h = [], c._sb = []), g && c.__s == null && (c.__s = c.state), g && X.getDerivedStateFromProps != null && (c.__s == c.state && (c.__s = tA({}, c.__s)), tA(c.__s, X.getDerivedStateFromProps(d, c.__s))), f = c.props, w = c.state, c.__v = t, m) g && X.getDerivedStateFromProps == null && c.componentWillMount != null && c.componentWillMount(), g && c.componentDidMount != null && c.__h.push(c.componentDidMount);
171
171
  else {
172
- if (g && Q.getDerivedStateFromProps == null && d !== f && c.componentWillReceiveProps != null && c.componentWillReceiveProps(d, b), !c.__e && c.shouldComponentUpdate != null && c.shouldComponentUpdate(d, c.__s, b) === !1 || t.__v == e.__v) {
173
- for (t.__v != e.__v && (c.props = d, c.state = c.__s, c.__d = !1), t.__e = e.__e, t.__k = e.__k, t.__k.some(function(J) {
174
- J && (J.__ = t);
172
+ if (g && X.getDerivedStateFromProps == null && d !== f && c.componentWillReceiveProps != null && c.componentWillReceiveProps(d, b), !c.__e && c.shouldComponentUpdate != null && c.shouldComponentUpdate(d, c.__s, b) === !1 || t.__v == e.__v) {
173
+ for (t.__v != e.__v && (c.props = d, c.state = c.__s, c.__d = !1), t.__e = e.__e, t.__k = e.__k, t.__k.some(function(_) {
174
+ _ && (_.__ = t);
175
175
  }), h = 0; h < c._sb.length; h++) c.__h.push(c._sb[h]);
176
176
  c._sb = [], c.__h.length && o.push(c);
177
177
  break A;
@@ -180,33 +180,33 @@ function at(A, t, e, n, r, a, o, l, i, s) {
180
180
  c.componentDidUpdate(f, w, y);
181
181
  });
182
182
  }
183
- if (c.context = b, c.props = d, c.__P = A, c.__e = !1, C = B.__r, P = 0, g) {
183
+ if (c.context = b, c.props = d, c.__P = A, c.__e = !1, C = S.__r, P = 0, g) {
184
184
  for (c.state = c.__s, c.__d = !1, C && C(t), u = c.render(c.props, c.state, c.context), O = 0; O < c._sb.length; O++) c.__h.push(c._sb[O]);
185
185
  c._sb = [];
186
186
  } else do
187
187
  c.__d = !1, C && C(t), u = c.render(c.props, c.state, c.context), c.state = c.__s;
188
188
  while (c.__d && ++P < 25);
189
189
  c.state = c.__s, c.getChildContext != null && (n = tA(tA({}, n), c.getChildContext())), g && !m && c.getSnapshotBeforeUpdate != null && (y = c.getSnapshotBeforeUpdate(f, w)), L = u, u != null && u.type === $ && u.key == null && (L = ee(u.props.children)), l = $t(A, yA(L) ? L : [L], t, e, n, r, a, o, l, i, s), c.base = t.__e, t.__u &= -161, c.__h.length && o.push(c), v && (c.__E = c.__ = null);
190
- } catch (J) {
191
- if (t.__v = null, i || a != null) if (J.then) {
190
+ } catch (_) {
191
+ if (t.__v = null, i || a != null) if (_.then) {
192
192
  for (t.__u |= i ? 160 : 128; l && l.nodeType == 8 && l.nextSibling; ) l = l.nextSibling;
193
193
  a[a.indexOf(l)] = null, t.__e = l;
194
194
  } else for (k = a.length; k--; ) rt(a[k]);
195
195
  else t.__e = e.__e, t.__k = e.__k;
196
- B.__e(J, t, e);
196
+ S.__e(_, t, e);
197
197
  }
198
198
  else a == null && t.__v == e.__v ? (t.__k = e.__k, t.__e = e.__e) : l = t.__e = Ne(e.__e, t, e, n, r, a, o, i, s);
199
- return (u = B.diffed) && u(t), 128 & t.__u ? void 0 : l;
199
+ return (u = S.diffed) && u(t), 128 & t.__u ? void 0 : l;
200
200
  }
201
201
  function te(A, t, e) {
202
202
  for (var n = 0; n < e.length; n++) ot(e[n], e[++n], e[++n]);
203
- B.__c && B.__c(t, A), A.some(function(r) {
203
+ S.__c && S.__c(t, A), A.some(function(r) {
204
204
  try {
205
205
  A = r.__h, r.__h = [], A.some(function(a) {
206
206
  a.call(r);
207
207
  });
208
208
  } catch (a) {
209
- B.__e(a, r.__v);
209
+ S.__e(a, r.__v);
210
210
  }
211
211
  });
212
212
  }
@@ -223,7 +223,7 @@ function Ne(A, t, e, n, r, a, o, l, i) {
223
223
  }
224
224
  if (A == null) {
225
225
  if (g == null) return document.createTextNode(d);
226
- A = document.createElementNS(r, g, d.is && d), l && (B.__m && B.__m(t, a), l = !1), a = null;
226
+ A = document.createElementNS(r, g, d.is && d), l && (S.__m && S.__m(t, a), l = !1), a = null;
227
227
  }
228
228
  if (g == null) v === d || l && A.data == d || (A.data = d);
229
229
  else {
@@ -249,16 +249,16 @@ function ot(A, t, e) {
249
249
  n && A.__u(), n && t == null || (A.__u = A(t));
250
250
  } else A.current = t;
251
251
  } catch (r) {
252
- B.__e(r, e);
252
+ S.__e(r, e);
253
253
  }
254
254
  }
255
255
  function ne(A, t, e) {
256
256
  var n, r;
257
- if (B.unmount && B.unmount(A), (n = A.ref) && (n.current && n.current != A.__e || ot(n, null, t)), (n = A.__c) != null) {
257
+ if (S.unmount && S.unmount(A), (n = A.ref) && (n.current && n.current != A.__e || ot(n, null, t)), (n = A.__c) != null) {
258
258
  if (n.componentWillUnmount) try {
259
259
  n.componentWillUnmount();
260
260
  } catch (a) {
261
- B.__e(a, t);
261
+ S.__e(a, t);
262
262
  }
263
263
  n.base = n.__P = null;
264
264
  }
@@ -270,7 +270,7 @@ function Ie(A, t, e) {
270
270
  }
271
271
  function yt(A, t, e) {
272
272
  var n, r, a, o;
273
- t == document && (t = document.documentElement), B.__ && B.__(A, t), r = (n = !1) ? null : t.__k, a = [], o = [], at(t, A = t.__k = YA($, null, [A]), r || gA, gA, t.namespaceURI, r ? null : t.firstChild ? UA.call(t.childNodes) : null, a, r ? r.__e : t.firstChild, n, o), te(a, A, o);
273
+ t == document && (t = document.documentElement), S.__ && S.__(A, t), r = (n = !1) ? null : t.__k, a = [], o = [], at(t, A = t.__k = YA($, null, [A]), r || gA, gA, t.namespaceURI, r ? null : t.firstChild ? UA.call(t.childNodes) : null, a, r ? r.__e : t.firstChild, n, o), te(a, A, o);
274
274
  }
275
275
  function lt(A) {
276
276
  function t(e) {
@@ -295,7 +295,7 @@ function lt(A) {
295
295
  return e.children(n);
296
296
  }).contextType = t, t;
297
297
  }
298
- UA = jt.slice, B = { __e: function(A, t, e, n) {
298
+ UA = jt.slice, S = { __e: function(A, t, e, n) {
299
299
  for (var r, a, o; t = t.__; ) if ((r = t.__c) && !r.__) try {
300
300
  if ((a = r.constructor) && a.getDerivedStateFromError != null && (r.setState(a.getDerivedStateFromError(A)), o = r.__d), r.componentDidCatch != null && (r.componentDidCatch(A, n || {}), o = r.__d), o) return r.__E = r;
301
301
  } catch (l) {
@@ -317,12 +317,12 @@ function p(A, t, e, n, r, a) {
317
317
  if ("ref" in i) for (l in i = {}, t) l == "ref" ? o = t[l] : i[l] = t[l];
318
318
  var s = { type: A, props: i, key: e, ref: o, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --Oe, __i: -1, __u: 0, __source: r, __self: a };
319
319
  if (typeof A == "function" && (o = A.defaultProps)) for (l in o) i[l] === void 0 && (i[l] = o[l]);
320
- return B.vnode && B.vnode(s), s;
320
+ return S.vnode && S.vnode(s), s;
321
321
  }
322
- const st = "2.2.6", x = lt({});
323
- var cA, I, WA, wt, hA = 0, re = [], z = B, bt = z.__b, Ct = z.__r, Dt = z.diffed, Mt = z.__c, kt = z.unmount, Bt = z.__;
322
+ const st = "2.2.8", x = lt({});
323
+ var cA, I, WA, wt, hA = 0, re = [], G = S, bt = G.__b, Ct = G.__r, Dt = G.diffed, Mt = G.__c, kt = G.unmount, Bt = G.__;
324
324
  function _A(A, t) {
325
- z.__h && z.__h(I, A, hA || t), hA = 0;
325
+ G.__h && G.__h(I, A, hA || t), hA = 0;
326
326
  var e = I.__H || (I.__H = { __: [], __h: [] });
327
327
  return A >= e.__.length && e.__.push({}), e.__[A];
328
328
  }
@@ -365,7 +365,7 @@ function Ue(A, t, e) {
365
365
  }
366
366
  function V(A, t) {
367
367
  var e = _A(cA++, 3);
368
- !z.__s && oe(e.__H, t) && (e.__ = A, e.u = t, I.__H.__h.push(e));
368
+ !G.__s && oe(e.__H, t) && (e.__ = A, e.u = t, I.__H.__h.push(e));
369
369
  }
370
370
  function j(A) {
371
371
  return hA = 5, oA(function() {
@@ -389,26 +389,26 @@ function _e() {
389
389
  for (var A; A = re.shift(); ) if (A.__P && A.__H) try {
390
390
  A.__H.__h.forEach(QA), A.__H.__h.forEach(KA), A.__H.__h = [];
391
391
  } catch (t) {
392
- A.__H.__h = [], z.__e(t, A.__v);
392
+ A.__H.__h = [], G.__e(t, A.__v);
393
393
  }
394
394
  }
395
- z.__b = function(A) {
395
+ G.__b = function(A) {
396
396
  I = null, bt && bt(A);
397
- }, z.__ = function(A, t) {
397
+ }, G.__ = function(A, t) {
398
398
  A && t.__k && t.__k.__m && (A.__m = t.__k.__m), Bt && Bt(A, t);
399
- }, z.__r = function(A) {
399
+ }, G.__r = function(A) {
400
400
  Ct && Ct(A), cA = 0;
401
401
  var t = (I = A.__c).__H;
402
402
  t && (WA === I ? (t.__h = [], I.__h = [], t.__.forEach(function(e) {
403
403
  e.__N && (e.__ = e.__N), e.u = e.__N = void 0;
404
404
  })) : (t.__h.forEach(QA), t.__h.forEach(KA), t.__h = [], cA = 0)), WA = I;
405
- }, z.diffed = function(A) {
405
+ }, G.diffed = function(A) {
406
406
  Dt && Dt(A);
407
407
  var t = A.__c;
408
- t && t.__H && (t.__H.__h.length && (re.push(t) !== 1 && wt === z.requestAnimationFrame || ((wt = z.requestAnimationFrame) || ze)(_e)), t.__H.__.forEach(function(e) {
408
+ t && t.__H && (t.__H.__h.length && (re.push(t) !== 1 && wt === G.requestAnimationFrame || ((wt = G.requestAnimationFrame) || ze)(_e)), t.__H.__.forEach(function(e) {
409
409
  e.u && (e.__H = e.u), e.u = void 0;
410
410
  })), WA = I = null;
411
- }, z.__c = function(A, t) {
411
+ }, G.__c = function(A, t) {
412
412
  t.some(function(e) {
413
413
  try {
414
414
  e.__h.forEach(QA), e.__h = e.__h.filter(function(n) {
@@ -417,10 +417,10 @@ z.__b = function(A) {
417
417
  } catch (n) {
418
418
  t.some(function(r) {
419
419
  r.__h && (r.__h = []);
420
- }), t = [], z.__e(n, e.__v);
420
+ }), t = [], G.__e(n, e.__v);
421
421
  }
422
422
  }), Mt && Mt(A, t);
423
- }, z.unmount = function(A) {
423
+ }, G.unmount = function(A) {
424
424
  kt && kt(A);
425
425
  var t, e = A.__c;
426
426
  e && e.__H && (e.__H.__.forEach(function(n) {
@@ -429,7 +429,7 @@ z.__b = function(A) {
429
429
  } catch (r) {
430
430
  t = r;
431
431
  }
432
- }), e.__H = void 0, t && z.__e(t, e.__v));
432
+ }), e.__H = void 0, t && G.__e(t, e.__v));
433
433
  };
434
434
  var St = typeof requestAnimationFrame == "function";
435
435
  function ze(A) {
@@ -749,7 +749,7 @@ const nA = (...A) => Ve(A), HA = (A) => {
749
749
  }
750
750
  return /* @__PURE__ */ p(
751
751
  "button",
752
- X(S({}, s), {
752
+ Q(B({}, s), {
753
753
  type: e,
754
754
  disabled: u || a,
755
755
  onClick: r,
@@ -857,7 +857,7 @@ const nA = (...A) => Ve(A), HA = (A) => {
857
857
  const i = A, { name: t, placeholder: e, type: n = "text", onBlur: r, disabled: a } = i, o = MA(i, ["name", "placeholder", "type", "onBlur", "disabled"]), { isProcessing: l } = U(x);
858
858
  return /* @__PURE__ */ p(
859
859
  "input",
860
- X(S({}, o), {
860
+ Q(B({}, o), {
861
861
  dir: "ltr",
862
862
  id: t,
863
863
  name: t,
@@ -892,18 +892,18 @@ function Xt(A, t) {
892
892
  (Xt.prototype = new F()).isPureReactComponent = !0, Xt.prototype.shouldComponentUpdate = function(A, t) {
893
893
  return Pt(this.props, A) || Pt(this.state, t);
894
894
  };
895
- var Qt = B.__b;
896
- B.__b = function(A) {
895
+ var Qt = S.__b;
896
+ S.__b = function(A) {
897
897
  A.type && A.type.__f && A.ref && (A.props.ref = A.ref, A.ref = null), Qt && Qt(A);
898
898
  };
899
- var Re = B.__e;
900
- B.__e = function(A, t, e, n) {
899
+ var Re = S.__e;
900
+ S.__e = function(A, t, e, n) {
901
901
  if (A.then) {
902
902
  for (var r, a = t; a = a.__; ) if ((r = a.__c) && r.__c) return t.__e == null && (t.__e = e.__e, t.__k = e.__k), r.__c(A, t);
903
903
  }
904
904
  Re(A, t, e, n);
905
905
  };
906
- var Tt = B.unmount;
906
+ var Tt = S.unmount;
907
907
  function ce(A, t, e) {
908
908
  return A && (A.__c && A.__c.__H && (A.__c.__H.__.forEach(function(n) {
909
909
  typeof n.__c == "function" && n.__c();
@@ -926,7 +926,7 @@ function pe(A) {
926
926
  function BA() {
927
927
  this.i = null, this.l = null;
928
928
  }
929
- B.unmount = function(A) {
929
+ S.unmount = function(A) {
930
930
  var t = A.__c;
931
931
  t && t.__R && t.__R(), t && 32 & A.__u && (A.type = null), Tt && Tt(A);
932
932
  }, (qA.prototype = new F()).__c = function(A, t) {
@@ -997,7 +997,7 @@ F.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveP
997
997
  Object.defineProperty(this, A, { configurable: !0, writable: !0, value: t });
998
998
  } });
999
999
  });
1000
- var Nt = B.event;
1000
+ var Nt = S.event;
1001
1001
  function nn() {
1002
1002
  }
1003
1003
  function rn() {
@@ -1006,13 +1006,13 @@ function rn() {
1006
1006
  function an() {
1007
1007
  return this.defaultPrevented;
1008
1008
  }
1009
- B.event = function(A) {
1009
+ S.event = function(A) {
1010
1010
  return Nt && (A = Nt(A)), A.persist = nn, A.isPropagationStopped = rn, A.isDefaultPrevented = an, A.nativeEvent = A;
1011
1011
  };
1012
1012
  var on = { enumerable: !1, configurable: !0, get: function() {
1013
1013
  return this.class;
1014
- } }, It = B.vnode;
1015
- B.vnode = function(A) {
1014
+ } }, It = S.vnode;
1015
+ S.vnode = function(A) {
1016
1016
  typeof A.type == "string" && function(t) {
1017
1017
  var e = t.props, n = t.type, r = {}, a = n.indexOf("-") === -1;
1018
1018
  for (var o in e) {
@@ -1029,12 +1029,12 @@ B.vnode = function(A) {
1029
1029
  })), e.class && !e.className ? (r.class = e.class, Object.defineProperty(r, "className", on)) : (e.className && !e.class || e.class && e.className) && (r.class = r.className = e.className), t.props = r;
1030
1030
  }(A), A.$$typeof = je, It && It(A);
1031
1031
  };
1032
- var Ot = B.__r;
1033
- B.__r = function(A) {
1032
+ var Ot = S.__r;
1033
+ S.__r = function(A) {
1034
1034
  Ot && Ot(A), A.__c;
1035
1035
  };
1036
- var Ut = B.diffed;
1037
- B.diffed = function(A) {
1036
+ var Ut = S.diffed;
1037
+ S.diffed = function(A) {
1038
1038
  Ut && Ut(A);
1039
1039
  var t = A.props, e = A.__e;
1040
1040
  e != null && A.type === "textarea" && "value" in t && t.value !== e.value && (e.value = t.value == null ? "" : t.value);
@@ -1052,42 +1052,42 @@ function fA(A, t, e, n) {
1052
1052
  };
1053
1053
  }, []);
1054
1054
  var h = oA(function() {
1055
- var C = function(_) {
1056
- var G = s.current, AA = u.current;
1057
- return s.current = u.current = null, o.current = _, l.current = l.current || _, c.current = m.current.apply(AA, G);
1058
- }, P = function(_, G) {
1059
- y && cancelAnimationFrame(i.current), i.current = y ? requestAnimationFrame(_) : setTimeout(_, G);
1060
- }, O = function(_) {
1055
+ var C = function(z) {
1056
+ var E = s.current, AA = u.current;
1057
+ return s.current = u.current = null, o.current = z, l.current = l.current || z, c.current = m.current.apply(AA, E);
1058
+ }, P = function(z, E) {
1059
+ y && cancelAnimationFrame(i.current), i.current = y ? requestAnimationFrame(z) : setTimeout(z, E);
1060
+ }, O = function(z) {
1061
1061
  if (!f.current) return !1;
1062
- var G = _ - a.current;
1063
- return !a.current || G >= t || G < 0 || g && _ - o.current >= b;
1064
- }, L = function(_) {
1065
- return i.current = null, d && s.current ? C(_) : (s.current = u.current = null, c.current);
1066
- }, k = function _() {
1067
- var G = Date.now();
1068
- if (v && l.current === o.current && Q(), O(G)) return L(G);
1062
+ var E = z - a.current;
1063
+ return !a.current || E >= t || E < 0 || g && z - o.current >= b;
1064
+ }, L = function(z) {
1065
+ return i.current = null, d && s.current ? C(z) : (s.current = u.current = null, c.current);
1066
+ }, k = function z() {
1067
+ var E = Date.now();
1068
+ if (v && l.current === o.current && X(), O(E)) return L(E);
1069
1069
  if (f.current) {
1070
- var AA = t - (G - a.current), lA = g ? Math.min(AA, b - (G - o.current)) : AA;
1071
- P(_, lA);
1070
+ var AA = t - (E - a.current), lA = g ? Math.min(AA, b - (E - o.current)) : AA;
1071
+ P(z, lA);
1072
1072
  }
1073
- }, Q = function() {
1074
- }, J = function() {
1073
+ }, X = function() {
1074
+ }, _ = function() {
1075
1075
  if (w || D) {
1076
- var _ = Date.now(), G = O(_);
1077
- if (s.current = [].slice.call(arguments), u.current = r, a.current = _, G) {
1076
+ var z = Date.now(), E = O(z);
1077
+ if (s.current = [].slice.call(arguments), u.current = r, a.current = z, E) {
1078
1078
  if (!i.current && f.current) return o.current = a.current, P(k, t), v ? C(a.current) : c.current;
1079
1079
  if (g) return P(k, t), C(a.current);
1080
1080
  }
1081
1081
  return i.current || P(k, t), c.current;
1082
1082
  }
1083
1083
  };
1084
- return J.cancel = function() {
1084
+ return _.cancel = function() {
1085
1085
  i.current && (y ? cancelAnimationFrame(i.current) : clearTimeout(i.current)), o.current = 0, s.current = a.current = u.current = i.current = null;
1086
- }, J.isPending = function() {
1086
+ }, _.isPending = function() {
1087
1087
  return !!i.current;
1088
- }, J.flush = function() {
1088
+ }, _.flush = function() {
1089
1089
  return i.current ? L(Date.now()) : c.current;
1090
- }, J;
1090
+ }, _;
1091
1091
  }, [v, g, t, b, d, y, w, D, n]);
1092
1092
  return h;
1093
1093
  }
@@ -1123,9 +1123,9 @@ class un {
1123
1123
  constructor(t = {}) {
1124
1124
  var n;
1125
1125
  vA(this, "opts", {}), vA(this, "memo", /* @__PURE__ */ new Map());
1126
- const e = S({}, t);
1126
+ const e = B({}, t);
1127
1127
  if (e.tokens != null) {
1128
- e.tokens = e.tokensReplace ? S({}, e.tokens) : S(S({}, _t), e.tokens);
1128
+ e.tokens = e.tokensReplace ? B({}, e.tokens) : B(B({}, _t), e.tokens);
1129
1129
  for (const r of Object.values(e.tokens))
1130
1130
  typeof r.pattern == "string" && (r.pattern = new RegExp(r.pattern));
1131
1131
  } else
@@ -1192,7 +1192,7 @@ class un {
1192
1192
  }
1193
1193
  }
1194
1194
  const fe = (A) => JSON.parse(A.replaceAll("'", '"')), pn = (A, t = {}) => {
1195
- const e = S({}, t);
1195
+ const e = B({}, t);
1196
1196
  A.dataset.maska != null && A.dataset.maska !== "" && (e.mask = fn(A.dataset.maska)), A.dataset.maskaEager != null && (e.eager = SA(A.dataset.maskaEager)), A.dataset.maskaReversed != null && (e.reversed = SA(A.dataset.maskaReversed)), A.dataset.maskaTokensReplace != null && (e.tokensReplace = SA(A.dataset.maskaTokensReplace)), A.dataset.maskaTokens != null && (e.tokens = dn(A.dataset.maskaTokens));
1197
1197
  const n = {};
1198
1198
  return A.dataset.maskaNumberLocale != null && (n.locale = A.dataset.maskaNumberLocale), A.dataset.maskaNumberFraction != null && (n.fraction = parseInt(A.dataset.maskaNumberFraction)), A.dataset.maskaNumberUnsigned != null && (n.unsigned = SA(A.dataset.maskaNumberUnsigned)), (A.dataset.maskaNumber != null || Object.values(n).length > 0) && (e.number = n), e;
@@ -1222,7 +1222,7 @@ class zA {
1222
1222
  }), this.options = e, this.eventAbortController = new AbortController(), this.init(this.getInputs(t));
1223
1223
  }
1224
1224
  update(t = {}) {
1225
- this.options = S({}, t), this.init(Array.from(this.items.keys()));
1225
+ this.options = B({}, t), this.init(Array.from(this.items.keys()));
1226
1226
  }
1227
1227
  updateValue(t) {
1228
1228
  var e;
@@ -1380,7 +1380,7 @@ const yn = () => {
1380
1380
  on_failure: w,
1381
1381
  setFormSettings: y
1382
1382
  } = U(x), v = (h) => {
1383
- y && (e(h), y((C) => X(S({}, C), {
1383
+ y && (e(h), y((C) => Q(B({}, C), {
1384
1384
  isProcessing: h
1385
1385
  })));
1386
1386
  }, d = {
@@ -1391,7 +1391,7 @@ const yn = () => {
1391
1391
  };
1392
1392
  n && (d.given_id = n), i && Object.keys(i).length > 0 && (d.metadata = i), s && (d.invoice_id = s.toLowerCase()), m !== void 0 && (d.apply_coupon = m), f && (d.splits = f);
1393
1393
  const g = (h) => K(void 0, null, function* () {
1394
- if (y && (y((C) => X(S({}, C), {
1394
+ if (y && (y((C) => Q(B({}, C), {
1395
1395
  apiError: `${A("error." + h.type)}, ${h.message}`
1396
1396
  })), w))
1397
1397
  try {
@@ -1400,7 +1400,7 @@ const yn = () => {
1400
1400
  console.error("An error happened when firing failure callback"), console.error(C);
1401
1401
  }
1402
1402
  }), D = () => {
1403
- y && y((h) => X(S({}, h), { apiError: "" }));
1403
+ y && y((h) => Q(B({}, h), { apiError: "" }));
1404
1404
  };
1405
1405
  return {
1406
1406
  processing: t,
@@ -1418,12 +1418,12 @@ const yn = () => {
1418
1418
  "Content-Type": "application/json",
1419
1419
  "X-Moyasar-Form-Version": u
1420
1420
  },
1421
- body: JSON.stringify(S(S(S({}, d), C), h))
1421
+ body: JSON.stringify(B(B(B({}, d), C), h))
1422
1422
  });
1423
1423
  if (!k.ok) {
1424
1424
  if (typeof k == "object") {
1425
- const Q = yield k.json();
1426
- if (console.error("fetch error:", Q), !de(Q)) {
1425
+ const X = yield k.json();
1426
+ if (console.error("fetch error:", X), !de(X)) {
1427
1427
  yield g({
1428
1428
  type: "api_error",
1429
1429
  message: `Error code: ${k.status}`,
@@ -1431,7 +1431,7 @@ const yn = () => {
1431
1431
  });
1432
1432
  return;
1433
1433
  }
1434
- return yield g(Q), Q;
1434
+ return yield g(X), X;
1435
1435
  }
1436
1436
  return yield Promise.reject(k);
1437
1437
  }
@@ -1440,8 +1440,8 @@ const yn = () => {
1440
1440
  if (w)
1441
1441
  try {
1442
1442
  yield w(k);
1443
- } catch (Q) {
1444
- console.error("An error happened when firing failure callback"), console.error(Q);
1443
+ } catch (X) {
1444
+ console.error("An error happened when firing failure callback"), console.error(X);
1445
1445
  }
1446
1446
  console.error(k);
1447
1447
  } finally {
@@ -1492,7 +1492,7 @@ const yn = () => {
1492
1492
  if (typeof a == "boolean")
1493
1493
  return a;
1494
1494
  if (typeof a == "object")
1495
- return r(a), a;
1495
+ return r(a), e && a !== null && Object.keys(a).length > 0 && e((o) => B(B({}, o), a)), a;
1496
1496
  throw new Error(`Invalid on_initiating handler result: ${a}`);
1497
1497
  }), Et = (A, t, e) => K(void 0, null, function* () {
1498
1498
  var r;
@@ -1521,7 +1521,7 @@ const yn = () => {
1521
1521
  updatedPaymentConfig: P,
1522
1522
  data: g,
1523
1523
  path: D
1524
- });
1524
+ }), X = typeof P == "object" && P !== null && "callback_url" in P && typeof P.callback_url == "string" ? P.callback_url : t;
1525
1525
  if (de(k)) {
1526
1526
  c(!1);
1527
1527
  return;
@@ -1529,13 +1529,13 @@ const yn = () => {
1529
1529
  k && (r && C && (yield Cn({
1530
1530
  payment: k,
1531
1531
  on_completed: r
1532
- }).catch((Q) => {
1533
- console.error(Q);
1532
+ }).catch((_) => {
1533
+ console.error(_);
1534
1534
  })), b && k.status !== "failed" && b(k), ["paid", "authorized"].includes(k.status) && (f(!0), setTimeout(() => {
1535
- Et(t, k, n).catch(() => {
1535
+ Et(X, k, n).catch(() => {
1536
1536
  });
1537
1537
  }, 100)), k.status === "failed" && (h && h(k), setTimeout(() => {
1538
- Et(t, k, n).catch(() => {
1538
+ Et(X, k, n).catch(() => {
1539
1539
  });
1540
1540
  }, 100))), c(!1);
1541
1541
  });
@@ -1594,26 +1594,26 @@ const yn = () => {
1594
1594
  loading: v,
1595
1595
  error: d,
1596
1596
  setError: g
1597
- } = wA({ defaultError: c }), [D, b] = N(""), [h, C] = N(""), [P, O] = N(""), L = (E) => {
1598
- const T = /^05[503649187][0-9]{7}$/.test(q(E));
1599
- return g((Z) => X(S({}, Z), {
1597
+ } = wA({ defaultError: c }), [D, b] = N(""), [h, C] = N(""), [P, O] = N(""), L = (J) => {
1598
+ const T = /^05[503649187][0-9]{7}$/.test(q(J));
1599
+ return g((Z) => Q(B({}, Z), {
1600
1600
  phone: T ? "" : "error.invalid_mobile"
1601
1601
  })), T;
1602
- }, k = (E) => {
1603
- const T = /^[0-9]{4,}$/.test(q(E));
1604
- return g((Z) => X(S({}, Z), {
1602
+ }, k = (J) => {
1603
+ const T = /^[0-9]{4,}$/.test(q(J));
1604
+ return g((Z) => Q(B({}, Z), {
1605
1605
  otp: T ? "" : "error.invalid_otp"
1606
1606
  })), T;
1607
- }, Q = (E) => {
1608
- const { value: T, name: Z } = E.target, eA = T.trim();
1607
+ }, X = (J) => {
1608
+ const { value: T, name: Z } = J.target, eA = T.trim();
1609
1609
  if (u(!1), !eA) {
1610
1610
  u(!eA);
1611
1611
  return;
1612
1612
  }
1613
1613
  Z === "mysr-stc-mobile" && L(eA), Z === "mysr-stc-otp" && k(eA);
1614
- }, J = () => {
1614
+ }, _ = () => {
1615
1615
  if (!L(D)) return;
1616
- function E(T) {
1616
+ function J(T) {
1617
1617
  const { transaction_url: Z } = T.source;
1618
1618
  O(Z), i((/* @__PURE__ */ new Date()).getTime() + 5 * 60 * 1e3);
1619
1619
  }
@@ -1624,16 +1624,16 @@ const yn = () => {
1624
1624
  mobile: q(D)
1625
1625
  }
1626
1626
  },
1627
- onSuccess: E,
1627
+ onSuccess: J,
1628
1628
  initPayment: !0
1629
1629
  }).catch((T) => {
1630
1630
  console.error(T);
1631
1631
  });
1632
- }, _ = () => {
1632
+ }, z = () => {
1633
1633
  if (!l || !k(h)) return;
1634
- function E(T) {
1634
+ function J(T) {
1635
1635
  var Z;
1636
- T.status === "failed" && ((Z = T.source) == null ? void 0 : Z.message) === "Invalid OTP" && (g((eA) => X(S({}, eA), {
1636
+ T.status === "failed" && ((Z = T.source) == null ? void 0 : Z.message) === "Invalid OTP" && (g((eA) => Q(B({}, eA), {
1637
1637
  otp: "error.invalid_otp"
1638
1638
  })), C(""), i(null));
1639
1639
  }
@@ -1642,21 +1642,21 @@ const yn = () => {
1642
1642
  otp_value: q(h)
1643
1643
  },
1644
1644
  path: P,
1645
- onFailed: E
1645
+ onFailed: J
1646
1646
  }).catch((T) => {
1647
1647
  console.error(T);
1648
1648
  });
1649
- }, G = (E) => {
1650
- if (E.preventDefault(), g(c), !l) {
1651
- J();
1649
+ }, E = (J) => {
1650
+ if (J.preventDefault(), g(c), !l) {
1651
+ _();
1652
1652
  return;
1653
1653
  }
1654
- _();
1655
- }, AA = (E) => {
1656
- E > 0 || (g((T) => X(S({}, T), {
1654
+ z();
1655
+ }, AA = (J) => {
1656
+ J > 0 || (g((T) => Q(B({}, T), {
1657
1657
  otp: "error.otp_time_out"
1658
1658
  })), C(""), i(null));
1659
- }, lA = oA(() => d.phone || l && d.otp && d.otp !== "error.otp_time_out" ? !0 : s || v, [d, s, v]), dA = (E) => a((T) => X(S({}, T), { showForm: E })), [sA, mA] = N(!1), CA = () => {
1659
+ }, lA = oA(() => d.phone || l && d.otp && d.otp !== "error.otp_time_out" ? !0 : s || v, [d, s, v]), dA = (J) => a((T) => Q(B({}, T), { showForm: J })), [sA, mA] = N(!1), CA = () => {
1660
1660
  mA(!0);
1661
1661
  }, JA = () => {
1662
1662
  sA && (b(""), C(""), g(c), dA(!1), mA(!1), u(!1));
@@ -1667,7 +1667,7 @@ const yn = () => {
1667
1667
  value: {
1668
1668
  err: d,
1669
1669
  setErr: g,
1670
- handleBlur: Q
1670
+ handleBlur: X
1671
1671
  },
1672
1672
  children: /* @__PURE__ */ p($, { children: [
1673
1673
  /* @__PURE__ */ p(HA, { variant: "stc", onClick: () => dA(!0), children: /* @__PURE__ */ p(
@@ -1705,7 +1705,7 @@ const yn = () => {
1705
1705
  /* @__PURE__ */ p("img", { alt: "", src: hn, class: "h-5" }),
1706
1706
  /* @__PURE__ */ p("button", { onClick: CA, class: "ms-auto", children: "Cancel" })
1707
1707
  ] }),
1708
- /* @__PURE__ */ p("form", { class: "flex flex-col gap-4", onSubmit: G, children: [
1708
+ /* @__PURE__ */ p("form", { class: "flex flex-col gap-4", onSubmit: E, children: [
1709
1709
  /* @__PURE__ */ p("div", { class: "space-y-2", children: [
1710
1710
  /* @__PURE__ */ p("div", { class: "flex items-end justify-between text-xs font-medium", children: [
1711
1711
  l ? /* @__PURE__ */ p("label", { for: "mysr-stc-mobile", children: A("form.otp") }) : /* @__PURE__ */ p("label", { for: "mysr-stc-otp", children: A("form.mobile") }),
@@ -1746,7 +1746,7 @@ const yn = () => {
1746
1746
  }
1747
1747
  )
1748
1748
  ] }),
1749
- /* @__PURE__ */ p("p", { class: "flex flex-col gap-2 text-xs font-medium text-error empty:hidden", children: Object.entries(d).map(([E, T]) => /* @__PURE__ */ p("span", { class: "empty:hidden", children: A(T) }, E)) })
1749
+ /* @__PURE__ */ p("p", { class: "flex flex-col gap-2 text-xs font-medium text-error empty:hidden", children: Object.entries(d).map(([J, T]) => /* @__PURE__ */ p("span", { class: "empty:hidden", children: A(T) }, J)) })
1750
1750
  ]
1751
1751
  }
1752
1752
  ) })
@@ -1773,7 +1773,9 @@ const yn = () => {
1773
1773
  const f = (n == null ? void 0 : n.label) || (r == null ? void 0 : r.label), y = {
1774
1774
  countryCode: (n == null ? void 0 : n.country) || (r == null ? void 0 : r.country),
1775
1775
  currencyCode: a,
1776
- supportedNetworks: o,
1776
+ supportedNetworks: o.map(
1777
+ (d) => ({ mastercard: "masterCard", unionpay: "chinaUnionPay" })[d] || d
1778
+ ),
1777
1779
  merchantCapabilities: n.merchant_capabilities,
1778
1780
  total: {
1779
1781
  label: f,
@@ -1796,7 +1798,7 @@ const yn = () => {
1796
1798
  }).then((b) => b.ok ? b : Promise.reject(b)).then((b) => b.json()).then((b) => {
1797
1799
  v.completeMerchantValidation(b);
1798
1800
  }).catch((b) => {
1799
- if (console.error("Apple Pay error:", b), s((h) => X(S({}, h), {
1801
+ if (console.error("Apple Pay error:", b), s((h) => Q(B({}, h), {
1800
1802
  apiError: A("error.applePay")
1801
1803
  })), u)
1802
1804
  try {
@@ -1918,7 +1920,7 @@ const yn = () => {
1918
1920
  status: "ERRED",
1919
1921
  provider: "Moyasar"
1920
1922
  });
1921
- } catch (Q) {
1923
+ } catch (X) {
1922
1924
  }
1923
1925
  console.error("Samsung Pay error: ", k);
1924
1926
  }
@@ -1993,7 +1995,7 @@ const yn = () => {
1993
1995
  }, d = Object.assign({}, y);
1994
1996
  d.allowedPaymentMethods = [v];
1995
1997
  const g = () => K(void 0, null, function* () {
1996
- const { country: C, label: P, merchant_id: O } = e, L = P || (n == null ? void 0 : n.label), k = C || (n == null ? void 0 : n.country), Q = X(S({}, y), {
1998
+ const { country: C, label: P, merchant_id: O } = e, L = P || (n == null ? void 0 : n.label), k = C || (n == null ? void 0 : n.country), X = Q(B({}, y), {
1997
1999
  allowedPaymentMethods: [h],
1998
2000
  merchantInfo: {
1999
2001
  merchantId: O,
@@ -2007,18 +2009,18 @@ const yn = () => {
2007
2009
  }
2008
2010
  });
2009
2011
  try {
2010
- const J = yield c.loadPaymentData(Q);
2012
+ const _ = yield c.loadPaymentData(X);
2011
2013
  u({
2012
2014
  initPayment: !0,
2013
2015
  data: {
2014
2016
  source: {
2015
2017
  type: "googlepay",
2016
- token: J.paymentMethodData.tokenizationData.token
2018
+ token: _.paymentMethodData.tokenizationData.token
2017
2019
  }
2018
2020
  }
2019
2021
  });
2020
- } catch (J) {
2021
- console.error(J);
2022
+ } catch (_) {
2023
+ console.error(_);
2022
2024
  }
2023
2025
  }), D = () => {
2024
2026
  const C = c.createButton({
@@ -2040,11 +2042,11 @@ const yn = () => {
2040
2042
  tokenizationSpecification: b
2041
2043
  });
2042
2044
  try {
2043
- (yield c.isReadyToPay(d)).result ? D() : l((P) => X(S({}, P), {
2045
+ (yield c.isReadyToPay(d)).result ? D() : l((P) => Q(B({}, P), {
2044
2046
  apiError: "Cannot initialize Google Pay"
2045
2047
  }));
2046
2048
  } catch (C) {
2047
- l((P) => X(S({}, P), {
2049
+ l((P) => Q(B({}, P), {
2048
2050
  apiError: "Cannot initialize Google Pay"
2049
2051
  })), console.error("Google Pay Error: ", C);
2050
2052
  }
@@ -2298,14 +2300,14 @@ const yn = () => {
2298
2300
  return;
2299
2301
  }
2300
2302
  if (!f) {
2301
- n((y) => X(S({}, y), { name: "validation.should_be_english_letters_only" }));
2303
+ n((y) => Q(B({}, y), { name: "validation.should_be_english_letters_only" }));
2302
2304
  return;
2303
2305
  }
2304
2306
  if (!w) {
2305
- n((y) => X(S({}, y), { name: "validation.first_and_last_name_required" }));
2307
+ n((y) => Q(B({}, y), { name: "validation.first_and_last_name_required" }));
2306
2308
  return;
2307
2309
  }
2308
- o(!1), n((y) => X(S({}, y), { name: "" }));
2310
+ o(!1), n((y) => Q(B({}, y), { name: "" }));
2309
2311
  }, i = (u) => {
2310
2312
  const c = u.target, { value: m } = c;
2311
2313
  t(m);
@@ -2530,19 +2532,19 @@ const yn = () => {
2530
2532
  }
2531
2533
  if (g === "mysr-cc-csc") {
2532
2534
  const { msg: b } = ge(D, c);
2533
- l((h) => X(S({}, h), {
2535
+ l((h) => Q(B({}, h), {
2534
2536
  csc: b
2535
2537
  }));
2536
2538
  }
2537
2539
  if (g === "mysr-cc-exp") {
2538
2540
  const { isValidExpFormat: b, isValidYear: h, inValidMonth: C } = Ce(D);
2539
- l((P) => X(S({}, P), {
2541
+ l((P) => Q(B({}, P), {
2540
2542
  exp_month: C ? "" : "error.invalid_month",
2541
2543
  exp_year: h ? "" : "error.invalid_year",
2542
2544
  exp: b ? "" : "error.invalid_date"
2543
2545
  }));
2544
2546
  }
2545
- g === "mysr-cc-number" && l((b) => X(S({}, b), {
2547
+ g === "mysr-cc-number" && l((b) => Q(B({}, b), {
2546
2548
  cc: c === "" ? "error.unsupported_cc_type" : f(D) ? "" : "error.invalid_cc_number"
2547
2549
  }));
2548
2550
  };
@@ -2599,20 +2601,20 @@ const yn = () => {
2599
2601
  error: O,
2600
2602
  setError: L
2601
2603
  } = wA({ defaultError: g });
2602
- return /* @__PURE__ */ p("form", { class: "space-y-6", onSubmit: (J) => {
2603
- J.preventDefault();
2604
- const { isValid: _ } = ve(i), G = q(u), AA = q(w), lA = q(m), dA = v(G), sA = d(G, dA), { isValid: mA } = ge(lA, dA), { isValid: CA } = Ce(AA);
2605
- if (!_ || !sA || !mA || !CA) {
2606
- const R = S({}, g);
2607
- _ || (R.name = A("error.invalid_name")), sA || (R.cc = A("error.invalid_cc_number")), mA || (R.csc = A("error.invalid_csc")), CA || (R.exp = A("error.invalid_date")), L(R);
2604
+ return /* @__PURE__ */ p("form", { class: "space-y-6", onSubmit: (_) => {
2605
+ _.preventDefault();
2606
+ const { isValid: z } = ve(i), E = q(u), AA = q(w), lA = q(m), dA = v(E), sA = d(E, dA), { isValid: mA } = ge(lA, dA), { isValid: CA } = Ce(AA);
2607
+ if (!z || !sA || !mA || !CA) {
2608
+ const R = B({}, g);
2609
+ z || (R.name = A("error.invalid_name")), sA || (R.cc = A("error.invalid_cc_number")), mA || (R.csc = A("error.invalid_csc")), CA || (R.exp = A("error.invalid_date")), L(R);
2608
2610
  return;
2609
2611
  }
2610
- const [JA, E] = AA.split("/"), T = {
2612
+ const [JA, J] = AA.split("/"), T = {
2611
2613
  type: "creditcard",
2612
2614
  name: i,
2613
- number: G,
2615
+ number: E,
2614
2616
  month: JA,
2615
- year: E,
2617
+ year: J,
2616
2618
  cvc: lA
2617
2619
  };
2618
2620
  n != null && n.manual && (T.manual = !0), n != null && n.save_card && (T.save_card = !0), r && (T.statement_descriptor = r);
@@ -3372,7 +3374,7 @@ function xt(A, t) {
3372
3374
  return ["SAR", "AED"].includes(t) && (r = r.replace(t, "").trim()), r;
3373
3375
  }
3374
3376
  function dr({ config: A }) {
3375
- const { amount: t, currency: e, language: n, translations: r, publishable_api_key: a } = A, o = document.documentElement.dir === "rtl" || n === "ar", l = uA[e] || uA.default, i = et(t, e), s = xt(t, e), [u, c] = N(X(S({
3377
+ const { amount: t, currency: e, language: n, translations: r, publishable_api_key: a } = A, o = document.documentElement.dir === "rtl" || n === "ar", l = uA[e] || uA.default, i = et(t, e), s = xt(t, e), [u, c] = N(Q(B({
3376
3378
  version: st
3377
3379
  }, A), {
3378
3380
  translations: qe(r),
@@ -3384,7 +3386,7 @@ function dr({ config: A }) {
3384
3386
  isTestMode: (a == null ? void 0 : a.startsWith("pk_test")) || location.protocol === "http:"
3385
3387
  }));
3386
3388
  pr(c), V(() => {
3387
- c((w) => X(S({}, w), {
3389
+ c((w) => Q(B({}, w), {
3388
3390
  amount: u.amount,
3389
3391
  formattedAmount: xt(u.amount, u.currency),
3390
3392
  decimalAmount: et(u.amount, u.currency).toFixed(l).toString()
@@ -3407,18 +3409,18 @@ function dr({ config: A }) {
3407
3409
  };
3408
3410
  !window.SamsungPay && A.samsung_pay && w(
3409
3411
  "https://img.mpay.samsung.com/gsmpi/sdk/samsungpay_web_sdk.js",
3410
- () => f((d) => X(S({}, d), { samsung: !0 }))
3412
+ () => f((d) => Q(B({}, d), { samsung: !0 }))
3411
3413
  ), !((v = (y = window.google) == null ? void 0 : y.payments) != null && v.api) && A.google_pay && w(
3412
3414
  "https://pay.google.com/gp/p/js/pay.js",
3413
- () => f((d) => X(S({}, d), { google: !0 }))
3415
+ () => f((d) => Q(B({}, d), { google: !0 }))
3414
3416
  ), A.apple_pay && w(
3415
3417
  "https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js",
3416
- () => f((d) => X(S({}, d), { apple: !0 }))
3418
+ () => f((d) => Q(B({}, d), { apple: !0 }))
3417
3419
  );
3418
3420
  }, []), /* @__PURE__ */ p(
3419
3421
  x.Provider,
3420
3422
  {
3421
- value: X(S({}, u), {
3423
+ value: Q(B({}, u), {
3422
3424
  setFormSettings: c,
3423
3425
  scriptsLoaded: m
3424
3426
  }),
@@ -3533,7 +3535,7 @@ let Dr = (A = 21) => {
3533
3535
  return t;
3534
3536
  };
3535
3537
  const Mr = (A) => {
3536
- const t = S({}, A);
3538
+ const t = B({}, A);
3537
3539
  return "show_footer" in A || (t.show_footer = !0), A.base_url || (t.base_url = "https://api.moyasar.com"), A.payment_button_type || (t.payment_button_type = "pay"), A.language || (t.language = document.documentElement.lang || "en"), A.methods || (t.methods = Xn), A.supported_networks || (t.supported_networks = RA.filter((e) => e !== "amex")), !A.fixed_width && A.fixed_width !== !1 && (t.fixed_width = !0), A.apple_pay && (A.apple_pay.version || (t.apple_pay.version = 6), A.apple_pay.merchant_capabilities || (t.apple_pay.merchant_capabilities = jA.filter(
3538
3540
  (e) => e !== "supportsEMV"
3539
3541
  )), A.apple_pay.supported_countries || (t.apple_pay.supported_countries = ["SA"])), A.samsung_pay && (A.samsung_pay.version || (t.samsung_pay.version = 2), A.samsung_pay.environment || (t.samsung_pay.environment = "PRODUCTION")), A.google_pay && (A.google_pay.environment || (t.google_pay.environment = "PRODUCTION"), A.google_pay.auth_methods || (t.google_pay.auth_methods = ["PAN_ONLY", "CRYPTOGRAM_3DS"]), A.google_pay.gateway_merchant_id || (t.google_pay.gateway_merchant_id = Dr(36))), t;
@@ -3544,7 +3546,7 @@ class Br {
3544
3546
  br(e);
3545
3547
  }
3546
3548
  static setAmount(t) {
3547
- tt ? tt((e) => X(S({}, e), { amount: t })) : console.warn("Form not yet initialized.");
3549
+ tt ? tt((e) => Q(B({}, e), { amount: t })) : console.warn("Form not yet initialized.");
3548
3550
  }
3549
3551
  }
3550
3552
  export {