@paynext/sdk 0.0.114 → 0.0.116
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +155 -143
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +25 -25
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -187,7 +187,7 @@ const Xt = (n = "sandbox") => ({
|
|
|
187
187
|
const { applePay: e, card: t } = n;
|
|
188
188
|
return (i = e == null ? void 0 : e.billingContact) != null && i.givenName ? `${e.billingContact.givenName} ${e.billingContact.familyName || ""}`.trim() : (r = t == null ? void 0 : t.metadata) == null ? void 0 : r.name;
|
|
189
189
|
}, Mr = (n) => {
|
|
190
|
-
var i, r;
|
|
190
|
+
var i, r, s, a, o, l;
|
|
191
191
|
const e = Tr(n), t = {
|
|
192
192
|
client_session: n.clientSession,
|
|
193
193
|
three_ds_session_id: n.threeDsSessionId,
|
|
@@ -205,6 +205,8 @@ const Xt = (n = "sandbox") => ({
|
|
|
205
205
|
});
|
|
206
206
|
case x.GOOGLE_PAY:
|
|
207
207
|
return I(v({}, t), {
|
|
208
|
+
name: (r = (i = n.googlePay) == null ? void 0 : i.billingAddress) == null ? void 0 : r.name,
|
|
209
|
+
phone: (a = (s = n.googlePay) == null ? void 0 : s.billingAddress) == null ? void 0 : a.phoneNumber,
|
|
208
210
|
card: En(n),
|
|
209
211
|
google_pay: Lr(n),
|
|
210
212
|
billing_address: kn(n)
|
|
@@ -214,7 +216,7 @@ const Xt = (n = "sandbox") => ({
|
|
|
214
216
|
name: xn(n),
|
|
215
217
|
card: En(n),
|
|
216
218
|
apple_pay: Vr(n),
|
|
217
|
-
phone: (
|
|
219
|
+
phone: (l = (o = n.applePay) == null ? void 0 : o.shippingContact) == null ? void 0 : l.phoneNumber,
|
|
218
220
|
billing_address: kn(n)
|
|
219
221
|
});
|
|
220
222
|
case x.VENMO:
|
|
@@ -241,9 +243,9 @@ const Xt = (n = "sandbox") => ({
|
|
|
241
243
|
body: JSON.stringify({ client_session: n })
|
|
242
244
|
})).json()).paypal_agreement_token_response.token_id || "";
|
|
243
245
|
}), Rr = (n, e, t) => E(void 0, null, function* () {
|
|
244
|
-
const i =
|
|
245
|
-
|
|
246
|
-
const a = yield (yield fetch(
|
|
246
|
+
const i = new Headers();
|
|
247
|
+
i.append("X-API-Version", t);
|
|
248
|
+
const r = `${Xt(e)}/payments/config?client_session_id=${n}`, a = yield (yield fetch(r, { headers: i })).json();
|
|
247
249
|
return a.checkout_config || (a.checkout_config = wr), a;
|
|
248
250
|
});
|
|
249
251
|
let Or = class {
|
|
@@ -320,6 +322,8 @@ let Or = class {
|
|
|
320
322
|
phoneNumber: !0
|
|
321
323
|
}
|
|
322
324
|
}, l == null ? void 0 : l.styles), {
|
|
325
|
+
// ToDo: Remove this after testing or make as hard coded value
|
|
326
|
+
allowedAuthMethods: ["PAN_ONLY", "CRYPTOGRAM_3DS"],
|
|
323
327
|
// ToDo: Temporary we have only Visa and Master card
|
|
324
328
|
allowedCardNetworks: ["VISA", "MASTERCARD"],
|
|
325
329
|
process: (g, b) => E(this, [g, b], function* (m, { fail: p }) {
|
|
@@ -343,7 +347,7 @@ let Or = class {
|
|
|
343
347
|
});
|
|
344
348
|
}
|
|
345
349
|
};
|
|
346
|
-
class
|
|
350
|
+
class K {
|
|
347
351
|
constructor() {
|
|
348
352
|
c(this, "listeners", []);
|
|
349
353
|
}
|
|
@@ -385,7 +389,7 @@ class Fr {
|
|
|
385
389
|
c(this, "google", null);
|
|
386
390
|
c(this, "threeDs", null);
|
|
387
391
|
c(this, "events", {
|
|
388
|
-
ready: new
|
|
392
|
+
ready: new K()
|
|
389
393
|
});
|
|
390
394
|
}
|
|
391
395
|
// is should load
|
|
@@ -508,11 +512,11 @@ function qr(n, e, t, i, r, s) {
|
|
|
508
512
|
easing: mi(t, a)
|
|
509
513
|
});
|
|
510
514
|
}
|
|
511
|
-
function
|
|
515
|
+
function Gr(n, e) {
|
|
512
516
|
for (let t = 0; t < n.length; t++)
|
|
513
517
|
n[t] = n[t] / (e + 1);
|
|
514
518
|
}
|
|
515
|
-
function
|
|
519
|
+
function Hr(n, e) {
|
|
516
520
|
return n.at === e.at ? n.value === null ? 1 : e.value === null ? -1 : 0 : n.at - e.at;
|
|
517
521
|
}
|
|
518
522
|
const J = (n) => !!(n && n.getVelocity), en = /* @__NO_SIDE_EFFECTS__ */ (n, e, t) => {
|
|
@@ -578,38 +582,38 @@ function Wr(n, s = {}, i, r) {
|
|
|
578
582
|
_.at !== void 0 && (p = wn(p, _.at, m, h));
|
|
579
583
|
let M = 0;
|
|
580
584
|
const T = (D, C, w, R = 0, O = 0) => {
|
|
581
|
-
const
|
|
585
|
+
const q = Zr(D), _e = C, { delay: Te = 0, times: te = bi(q), type: fe = "keyframes", repeat: he, repeatType: kt, repeatDelay: Et = 0 } = _e, at = se(_e, ["delay", "times", "type", "repeat", "repeatType", "repeatDelay"]);
|
|
582
586
|
let { ease: ne = e.ease || "easeOut", duration: f } = C;
|
|
583
|
-
const P = typeof Te == "function" ? Te(R, O) : Te, N =
|
|
584
|
-
if (N <= 2 &&
|
|
587
|
+
const P = typeof Te == "function" ? Te(R, O) : Te, N = q.length, G = tn(fe) ? fe : r == null ? void 0 : r[fe];
|
|
588
|
+
if (N <= 2 && G) {
|
|
585
589
|
let z = 100;
|
|
586
|
-
if (N === 2 && Qr(
|
|
587
|
-
const ge =
|
|
590
|
+
if (N === 2 && Qr(q)) {
|
|
591
|
+
const ge = q[1] - q[0];
|
|
588
592
|
z = Math.abs(ge);
|
|
589
593
|
}
|
|
590
594
|
const re = v({}, at);
|
|
591
595
|
f !== void 0 && (re.duration = /* @__PURE__ */ ae(f));
|
|
592
|
-
const pe = vi(re, z,
|
|
596
|
+
const pe = vi(re, z, G);
|
|
593
597
|
ne = pe.ease, f = pe.duration;
|
|
594
598
|
}
|
|
595
599
|
f != null || (f = o);
|
|
596
600
|
const ie = p + P;
|
|
597
601
|
te.length === 1 && te[0] === 0 && (te[1] = 1);
|
|
598
|
-
const X = te.length -
|
|
599
|
-
if (X > 0 && gi(te, X),
|
|
602
|
+
const X = te.length - q.length;
|
|
603
|
+
if (X > 0 && gi(te, X), q.length === 1 && q.unshift(null), he) {
|
|
600
604
|
ce(he < Ur, "Repeat count too high, must be less than 20"), f = Br(f, he);
|
|
601
|
-
const z = [...
|
|
605
|
+
const z = [...q], re = [...te];
|
|
602
606
|
ne = Array.isArray(ne) ? [...ne] : [ne];
|
|
603
607
|
const pe = [...ne];
|
|
604
608
|
for (let ge = 0; ge < he; ge++) {
|
|
605
|
-
|
|
609
|
+
q.push(...z);
|
|
606
610
|
for (let je = 0; je < z.length; je++)
|
|
607
611
|
te.push(re[je] + (ge + 1)), ne.push(je === 0 ? "linear" : mi(pe, je - 1));
|
|
608
612
|
}
|
|
609
|
-
|
|
613
|
+
Gr(te, he);
|
|
610
614
|
}
|
|
611
615
|
const Ae = ie + f;
|
|
612
|
-
qr(w,
|
|
616
|
+
qr(w, q, ne, te, ie, Ae), M = Math.max(P + f, M), g = Math.max(Ae, g);
|
|
613
617
|
};
|
|
614
618
|
if (J(k)) {
|
|
615
619
|
const D = Tn(k, u);
|
|
@@ -619,8 +623,8 @@ function Wr(n, s = {}, i, r) {
|
|
|
619
623
|
for (let w = 0; w < C; w++) {
|
|
620
624
|
V = V, _ = _;
|
|
621
625
|
const R = D[w], O = Tn(R, u);
|
|
622
|
-
for (const
|
|
623
|
-
T(V[
|
|
626
|
+
for (const q in V)
|
|
627
|
+
T(V[q], Jr(_, q), An(q, O), w, C);
|
|
624
628
|
}
|
|
625
629
|
}
|
|
626
630
|
m = p, p += M;
|
|
@@ -628,7 +632,7 @@ function Wr(n, s = {}, i, r) {
|
|
|
628
632
|
return u.forEach((b, y) => {
|
|
629
633
|
for (const k in b) {
|
|
630
634
|
const V = b[k];
|
|
631
|
-
V.sort(
|
|
635
|
+
V.sort(Hr);
|
|
632
636
|
const _ = [], M = [], T = [];
|
|
633
637
|
for (let C = 0; C < V.length; C++) {
|
|
634
638
|
const { at: w, value: R, easing: O } = V[C];
|
|
@@ -1233,7 +1237,7 @@ function qs(n, e) {
|
|
|
1233
1237
|
return (t) => nt(n, e, t);
|
|
1234
1238
|
}
|
|
1235
1239
|
function cn(n) {
|
|
1236
|
-
return typeof n == "number" ? qs : typeof n == "string" ? sn(n) ? gt : U.test(n) ? Dn : Ys : Array.isArray(n) ? Mi : typeof n == "object" ? U.test(n) ? Dn :
|
|
1240
|
+
return typeof n == "number" ? qs : typeof n == "string" ? sn(n) ? gt : U.test(n) ? Dn : Ys : Array.isArray(n) ? Mi : typeof n == "object" ? U.test(n) ? Dn : Gs : gt;
|
|
1237
1241
|
}
|
|
1238
1242
|
function Mi(n, e) {
|
|
1239
1243
|
const t = [...n], i = t.length, r = n.map((s, a) => cn(s)(s, e[a]));
|
|
@@ -1243,7 +1247,7 @@ function Mi(n, e) {
|
|
|
1243
1247
|
return t;
|
|
1244
1248
|
};
|
|
1245
1249
|
}
|
|
1246
|
-
function
|
|
1250
|
+
function Gs(n, e) {
|
|
1247
1251
|
const t = v(v({}, n), e), i = {};
|
|
1248
1252
|
for (const r in t)
|
|
1249
1253
|
n[r] !== void 0 && e[r] !== void 0 && (i[r] = cn(n[r])(n[r], e[r]));
|
|
@@ -1253,7 +1257,7 @@ function Hs(n, e) {
|
|
|
1253
1257
|
return t;
|
|
1254
1258
|
};
|
|
1255
1259
|
}
|
|
1256
|
-
function
|
|
1260
|
+
function Hs(n, e) {
|
|
1257
1261
|
var r;
|
|
1258
1262
|
const t = [], i = { color: 0, var: 0, number: 0 };
|
|
1259
1263
|
for (let s = 0; s < e.values.length; s++) {
|
|
@@ -1264,7 +1268,7 @@ function Gs(n, e) {
|
|
|
1264
1268
|
}
|
|
1265
1269
|
const Ys = (n, e) => {
|
|
1266
1270
|
const t = Se.createTransformer(e), i = et(n), r = et(e);
|
|
1267
|
-
return i.indexes.var.length === r.indexes.var.length && i.indexes.color.length === r.indexes.color.length && i.indexes.number.length >= r.indexes.number.length ? Nt.has(n) && !r.values.length || Nt.has(e) && !i.values.length ? $s(n, e) : ln(Mi(
|
|
1271
|
+
return i.indexes.var.length === r.indexes.var.length && i.indexes.color.length === r.indexes.color.length && i.indexes.number.length >= r.indexes.number.length ? Nt.has(n) && !r.values.length || Nt.has(e) && !i.values.length ? $s(n, e) : ln(Mi(Hs(i, r), r.values), t) : (it(!0, `Complex values '${n}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`), gt(n, e));
|
|
1268
1272
|
};
|
|
1269
1273
|
function Pi(n, e, t) {
|
|
1270
1274
|
return typeof n == "number" && typeof e == "number" && typeof t == "number" ? nt(n, e, t) : cn(n)(n, e);
|
|
@@ -1806,8 +1810,8 @@ const ke = {
|
|
|
1806
1810
|
ke.translateX = ke.x;
|
|
1807
1811
|
ke.translateY = ke.y;
|
|
1808
1812
|
const Ee = /* @__PURE__ */ new Set();
|
|
1809
|
-
let Kt = !1, qt = !1,
|
|
1810
|
-
function
|
|
1813
|
+
let Kt = !1, qt = !1, Gt = !1;
|
|
1814
|
+
function Gi() {
|
|
1811
1815
|
if (qt) {
|
|
1812
1816
|
const n = Array.from(Ee).filter((i) => i.needsMeasurement), e = new Set(n.map((i) => i.element)), t = /* @__PURE__ */ new Map();
|
|
1813
1817
|
e.forEach((i) => {
|
|
@@ -1824,22 +1828,22 @@ function Hi() {
|
|
|
1824
1828
|
i.suspendedScrollY !== void 0 && window.scrollTo(0, i.suspendedScrollY);
|
|
1825
1829
|
});
|
|
1826
1830
|
}
|
|
1827
|
-
qt = !1, Kt = !1, Ee.forEach((n) => n.complete(
|
|
1831
|
+
qt = !1, Kt = !1, Ee.forEach((n) => n.complete(Gt)), Ee.clear();
|
|
1828
1832
|
}
|
|
1829
|
-
function
|
|
1833
|
+
function Hi() {
|
|
1830
1834
|
Ee.forEach((n) => {
|
|
1831
1835
|
n.readKeyframes(), n.needsMeasurement && (qt = !0);
|
|
1832
1836
|
});
|
|
1833
1837
|
}
|
|
1834
1838
|
function wa() {
|
|
1835
|
-
|
|
1839
|
+
Gt = !0, Hi(), Gi(), Gt = !1;
|
|
1836
1840
|
}
|
|
1837
1841
|
class fn {
|
|
1838
1842
|
constructor(e, t, i, r, s, a = !1) {
|
|
1839
1843
|
this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...e], this.onComplete = t, this.name = i, this.motionValue = r, this.element = s, this.isAsync = a;
|
|
1840
1844
|
}
|
|
1841
1845
|
scheduleResolve() {
|
|
1842
|
-
this.state = "scheduled", this.isAsync ? (Ee.add(this), Kt || (Kt = !0, ue.read(
|
|
1846
|
+
this.state = "scheduled", this.isAsync ? (Ee.add(this), Kt || (Kt = !0, ue.read(Hi), ue.resolveKeyframes(Gi))) : (this.readKeyframes(), this.complete());
|
|
1843
1847
|
}
|
|
1844
1848
|
readKeyframes() {
|
|
1845
1849
|
const { unresolvedKeyframes: e, name: t, element: i, motionValue: r } = this;
|
|
@@ -2241,7 +2245,7 @@ function qa({ protectedKeys: n, needsAnimating: e }, t) {
|
|
|
2241
2245
|
const i = n.hasOwnProperty(t) && e[t] !== !0;
|
|
2242
2246
|
return e[t] = !1, i;
|
|
2243
2247
|
}
|
|
2244
|
-
function
|
|
2248
|
+
function Ga(n, e, { delay: t = 0, transitionOverride: i, type: r } = {}) {
|
|
2245
2249
|
var h;
|
|
2246
2250
|
let d = e, { transition: s = n.getDefaultTransition(), transitionEnd: a } = d, o = se(d, ["transition", "transitionEnd"]);
|
|
2247
2251
|
i && (s = i);
|
|
@@ -2273,7 +2277,7 @@ function Ha(n, e, { delay: t = 0, transitionOverride: i, type: r } = {}) {
|
|
|
2273
2277
|
});
|
|
2274
2278
|
}), l;
|
|
2275
2279
|
}
|
|
2276
|
-
function
|
|
2280
|
+
function Ha({ top: n, left: e, right: t, bottom: i }) {
|
|
2277
2281
|
return {
|
|
2278
2282
|
x: { min: e, max: t },
|
|
2279
2283
|
y: { min: n, max: i }
|
|
@@ -2291,7 +2295,7 @@ function Ya(n, e) {
|
|
|
2291
2295
|
};
|
|
2292
2296
|
}
|
|
2293
2297
|
function Ua(n, e) {
|
|
2294
|
-
return
|
|
2298
|
+
return Ha(Ya(n.getBoundingClientRect(), e));
|
|
2295
2299
|
}
|
|
2296
2300
|
const qn = {
|
|
2297
2301
|
animation: [
|
|
@@ -2312,14 +2316,14 @@ const qn = {
|
|
|
2312
2316
|
pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"],
|
|
2313
2317
|
inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
|
|
2314
2318
|
layout: ["layout", "layoutId"]
|
|
2315
|
-
},
|
|
2319
|
+
}, Ht = {};
|
|
2316
2320
|
for (const n in qn)
|
|
2317
|
-
|
|
2321
|
+
Ht[n] = {
|
|
2318
2322
|
isEnabled: (e) => qn[n].some((t) => !!e[t])
|
|
2319
2323
|
};
|
|
2320
|
-
const
|
|
2321
|
-
x:
|
|
2322
|
-
y:
|
|
2324
|
+
const Gn = () => ({ min: 0, max: 0 }), bn = () => ({
|
|
2325
|
+
x: Gn(),
|
|
2326
|
+
y: Gn()
|
|
2323
2327
|
}), Wa = typeof window != "undefined", Yt = { current: null }, Qi = { current: !1 };
|
|
2324
2328
|
function Za() {
|
|
2325
2329
|
if (Qi.current = !0, !!Wa)
|
|
@@ -2373,7 +2377,7 @@ function no(n, e, t) {
|
|
|
2373
2377
|
const tr = (n) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n), nr = (n) => /^0[^.\s]+$/u.test(n), io = {
|
|
2374
2378
|
test: (n) => n === "auto",
|
|
2375
2379
|
parse: (n) => n
|
|
2376
|
-
}, ir = (n) => (e) => e.test(n), rr = [Ne, L, Me, me, Ms, Is, io],
|
|
2380
|
+
}, ir = (n) => (e) => e.test(n), rr = [Ne, L, Me, me, Ms, Is, io], Hn = (n) => rr.find(ir(n)), ro = [...rr, U, Se], so = (n) => ro.find(ir(n)), ao = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
|
|
2377
2381
|
function oo(n) {
|
|
2378
2382
|
const [e, t] = n.slice(0, -1).split("(");
|
|
2379
2383
|
if (e === "drop-shadow")
|
|
@@ -2544,8 +2548,8 @@ class or {
|
|
|
2544
2548
|
}
|
|
2545
2549
|
updateFeatures() {
|
|
2546
2550
|
let e = "animation";
|
|
2547
|
-
for (e in
|
|
2548
|
-
const t =
|
|
2551
|
+
for (e in Ht) {
|
|
2552
|
+
const t = Ht[e];
|
|
2549
2553
|
if (!t)
|
|
2550
2554
|
continue;
|
|
2551
2555
|
const { isEnabled: i, Feature: r } = t;
|
|
@@ -2739,7 +2743,7 @@ class vo extends fn {
|
|
|
2739
2743
|
}
|
|
2740
2744
|
if (this.resolveNoneKeyframes(), !Xi.has(i) || e.length !== 2)
|
|
2741
2745
|
return;
|
|
2742
|
-
const [r, s] = e, a =
|
|
2746
|
+
const [r, s] = e, a = Hn(r), o = Hn(s);
|
|
2743
2747
|
if (a !== o)
|
|
2744
2748
|
if (Bn(a) && Bn(o))
|
|
2745
2749
|
for (let l = 0; l < e.length; l++) {
|
|
@@ -3075,7 +3079,7 @@ function gr(n, e, t, i) {
|
|
|
3075
3079
|
const l = s[o], u = l instanceof Element ? So : Fo;
|
|
3076
3080
|
Je.has(l) || u(l);
|
|
3077
3081
|
const d = Je.get(l), h = v({}, t);
|
|
3078
|
-
"delay" in h && typeof h.delay == "function" && (h.delay = h.delay(o, a)), r.push(...
|
|
3082
|
+
"delay" in h && typeof h.delay == "function" && (h.delay = h.delay(o, a)), r.push(...Ga(d, I(v({}, e), { transition: h }), {}));
|
|
3079
3083
|
}
|
|
3080
3084
|
}
|
|
3081
3085
|
return r;
|
|
@@ -3160,15 +3164,15 @@ class Ko extends $o {
|
|
|
3160
3164
|
function qo(n) {
|
|
3161
3165
|
return Array.isArray(n) && n.some(Array.isArray);
|
|
3162
3166
|
}
|
|
3163
|
-
function
|
|
3167
|
+
function Go(n) {
|
|
3164
3168
|
function e(t, i, r) {
|
|
3165
3169
|
let s = [];
|
|
3166
3170
|
return qo(t) ? s = zo(t, i, n) : s = gr(t, i, r, n), new Ko(s);
|
|
3167
3171
|
}
|
|
3168
3172
|
return e;
|
|
3169
3173
|
}
|
|
3170
|
-
const
|
|
3171
|
-
spinner:
|
|
3174
|
+
const H = Go(), Ho = "_spinner_1lif3_1", Yo = "_spinnerContainer_1lif3_5", Uo = "_success_1lif3_9", Wo = "_successContainer_1lif3_14", Zo = "_container_1lif3_57", Jo = "_card_1lif3_66", Xo = "_warning_1lif3_75", Qo = "_svg_1lif3_83", el = "_srOnly_1lif3_88", tl = "_backButton_1lif3_92", S = {
|
|
3175
|
+
spinner: Ho,
|
|
3172
3176
|
spinnerContainer: Yo,
|
|
3173
3177
|
success: Uo,
|
|
3174
3178
|
successContainer: Wo,
|
|
@@ -3501,11 +3505,11 @@ function bl() {
|
|
|
3501
3505
|
}
|
|
3502
3506
|
return qe.findBestMatch = e, qe;
|
|
3503
3507
|
}
|
|
3504
|
-
var
|
|
3508
|
+
var Ge, ni;
|
|
3505
3509
|
function vl() {
|
|
3506
|
-
if (ni) return
|
|
3510
|
+
if (ni) return Ge;
|
|
3507
3511
|
ni = 1;
|
|
3508
|
-
var n =
|
|
3512
|
+
var n = Ge && Ge.__assign || function() {
|
|
3509
3513
|
return n = Object.assign || function(g) {
|
|
3510
3514
|
for (var b, y = 1, k = arguments.length; y < k; y++) {
|
|
3511
3515
|
b = arguments[y];
|
|
@@ -3589,7 +3593,7 @@ function vl() {
|
|
|
3589
3593
|
u.splice(y, 1), u.splice(b, 0, g);
|
|
3590
3594
|
}, p.resetModifications = function() {
|
|
3591
3595
|
u = (0, s.clone)(l), a = {};
|
|
3592
|
-
}, p.types = o,
|
|
3596
|
+
}, p.types = o, Ge = p, Ge;
|
|
3593
3597
|
}
|
|
3594
3598
|
var Pe = vl();
|
|
3595
3599
|
Pe.updateCard("visa", {
|
|
@@ -3867,7 +3871,7 @@ const bt = [
|
|
|
3867
3871
|
zh: "zh_CN",
|
|
3868
3872
|
mt: "en_GB"
|
|
3869
3873
|
})[n] || "en_US";
|
|
3870
|
-
var dt = { exports: {} },
|
|
3874
|
+
var dt = { exports: {} }, He = {};
|
|
3871
3875
|
/**
|
|
3872
3876
|
* @license React
|
|
3873
3877
|
* react-jsx-runtime.production.js
|
|
@@ -3879,7 +3883,7 @@ var dt = { exports: {} }, Ge = {};
|
|
|
3879
3883
|
*/
|
|
3880
3884
|
var si;
|
|
3881
3885
|
function Ol() {
|
|
3882
|
-
if (si) return
|
|
3886
|
+
if (si) return He;
|
|
3883
3887
|
si = 1;
|
|
3884
3888
|
var n = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
3885
3889
|
function t(i, r, s) {
|
|
@@ -3897,7 +3901,7 @@ function Ol() {
|
|
|
3897
3901
|
props: s
|
|
3898
3902
|
};
|
|
3899
3903
|
}
|
|
3900
|
-
return
|
|
3904
|
+
return He.Fragment = e, He.jsx = t, He.jsxs = t, He;
|
|
3901
3905
|
}
|
|
3902
3906
|
var Ye = {};
|
|
3903
3907
|
/**
|
|
@@ -3967,11 +3971,11 @@ function Nl() {
|
|
|
3967
3971
|
}
|
|
3968
3972
|
if (P) {
|
|
3969
3973
|
P = console;
|
|
3970
|
-
var N = P.error,
|
|
3974
|
+
var N = P.error, G = typeof Symbol == "function" && Symbol.toStringTag && f[Symbol.toStringTag] || f.constructor.name || "Object";
|
|
3971
3975
|
return N.call(
|
|
3972
3976
|
P,
|
|
3973
3977
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
3974
|
-
|
|
3978
|
+
G
|
|
3975
3979
|
), e(f);
|
|
3976
3980
|
}
|
|
3977
3981
|
}
|
|
@@ -3987,7 +3991,7 @@ function Nl() {
|
|
|
3987
3991
|
}
|
|
3988
3992
|
}
|
|
3989
3993
|
function r() {
|
|
3990
|
-
var f =
|
|
3994
|
+
var f = q.A;
|
|
3991
3995
|
return f === null ? null : f.getOwner();
|
|
3992
3996
|
}
|
|
3993
3997
|
function s() {
|
|
@@ -4018,7 +4022,7 @@ function Nl() {
|
|
|
4018
4022
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
4019
4023
|
)), f = this.props.ref, f !== void 0 ? f : null;
|
|
4020
4024
|
}
|
|
4021
|
-
function u(f, P, N,
|
|
4025
|
+
function u(f, P, N, G, ie, X, Ae, _e) {
|
|
4022
4026
|
return N = X.ref, f = {
|
|
4023
4027
|
$$typeof: p,
|
|
4024
4028
|
type: f,
|
|
@@ -4050,13 +4054,13 @@ function Nl() {
|
|
|
4050
4054
|
value: _e
|
|
4051
4055
|
}), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
|
|
4052
4056
|
}
|
|
4053
|
-
function d(f, P, N,
|
|
4057
|
+
function d(f, P, N, G, ie, X, Ae, _e) {
|
|
4054
4058
|
var z = P.children;
|
|
4055
4059
|
if (z !== void 0)
|
|
4056
|
-
if (
|
|
4060
|
+
if (G)
|
|
4057
4061
|
if (te(z)) {
|
|
4058
|
-
for (
|
|
4059
|
-
h(z[
|
|
4062
|
+
for (G = 0; G < z.length; G++)
|
|
4063
|
+
h(z[G]);
|
|
4060
4064
|
Object.freeze && Object.freeze(z);
|
|
4061
4065
|
} else
|
|
4062
4066
|
console.error(
|
|
@@ -4068,18 +4072,18 @@ function Nl() {
|
|
|
4068
4072
|
var re = Object.keys(P).filter(function(ge) {
|
|
4069
4073
|
return ge !== "key";
|
|
4070
4074
|
});
|
|
4071
|
-
|
|
4075
|
+
G = 0 < re.length ? "{key: someKey, " + re.join(": ..., ") + ": ...}" : "{key: someKey}", ne[z + G] || (re = 0 < re.length ? "{" + re.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
4072
4076
|
`A props object containing a "key" prop is being spread into JSX:
|
|
4073
4077
|
let props = %s;
|
|
4074
4078
|
<%s {...props} />
|
|
4075
4079
|
React keys must be passed directly to JSX without using spread:
|
|
4076
4080
|
let props = %s;
|
|
4077
4081
|
<%s key={someKey} {...props} />`,
|
|
4078
|
-
|
|
4082
|
+
G,
|
|
4079
4083
|
z,
|
|
4080
4084
|
re,
|
|
4081
4085
|
z
|
|
4082
|
-
), ne[z +
|
|
4086
|
+
), ne[z + G] = !0);
|
|
4083
4087
|
}
|
|
4084
4088
|
if (z = null, N !== void 0 && (t(N), z = "" + N), a(P) && (t(P.key), z = "" + P.key), "key" in P) {
|
|
4085
4089
|
N = {};
|
|
@@ -4103,7 +4107,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
4103
4107
|
function h(f) {
|
|
4104
4108
|
typeof f == "object" && f !== null && f.$$typeof === p && f._store && (f._store.validated = 1);
|
|
4105
4109
|
}
|
|
4106
|
-
var m = xr, p = Symbol.for("react.transitional.element"), g = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), k = Symbol.for("react.profiler"), V = Symbol.for("react.consumer"), _ = Symbol.for("react.context"), M = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), D = Symbol.for("react.suspense_list"), C = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), R = Symbol.for("react.activity"), O = Symbol.for("react.client.reference"),
|
|
4110
|
+
var m = xr, p = Symbol.for("react.transitional.element"), g = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), k = Symbol.for("react.profiler"), V = Symbol.for("react.consumer"), _ = Symbol.for("react.context"), M = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), D = Symbol.for("react.suspense_list"), C = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), R = Symbol.for("react.activity"), O = Symbol.for("react.client.reference"), q = m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Te = Object.prototype.hasOwnProperty, te = Array.isArray, fe = console.createTask ? console.createTask : function() {
|
|
4107
4111
|
return null;
|
|
4108
4112
|
};
|
|
4109
4113
|
m = {
|
|
@@ -4115,26 +4119,26 @@ React keys must be passed directly to JSX without using spread:
|
|
|
4115
4119
|
m,
|
|
4116
4120
|
s
|
|
4117
4121
|
)(), at = fe(i(s)), ne = {};
|
|
4118
|
-
Ye.Fragment = b, Ye.jsx = function(f, P, N,
|
|
4119
|
-
var X = 1e4 >
|
|
4122
|
+
Ye.Fragment = b, Ye.jsx = function(f, P, N, G, ie) {
|
|
4123
|
+
var X = 1e4 > q.recentlyCreatedOwnerStacks++;
|
|
4120
4124
|
return d(
|
|
4121
4125
|
f,
|
|
4122
4126
|
P,
|
|
4123
4127
|
N,
|
|
4124
4128
|
!1,
|
|
4125
|
-
|
|
4129
|
+
G,
|
|
4126
4130
|
ie,
|
|
4127
4131
|
X ? Error("react-stack-top-frame") : Et,
|
|
4128
4132
|
X ? fe(i(f)) : at
|
|
4129
4133
|
);
|
|
4130
|
-
}, Ye.jsxs = function(f, P, N,
|
|
4131
|
-
var X = 1e4 >
|
|
4134
|
+
}, Ye.jsxs = function(f, P, N, G, ie) {
|
|
4135
|
+
var X = 1e4 > q.recentlyCreatedOwnerStacks++;
|
|
4132
4136
|
return d(
|
|
4133
4137
|
f,
|
|
4134
4138
|
P,
|
|
4135
4139
|
N,
|
|
4136
4140
|
!0,
|
|
4137
|
-
|
|
4141
|
+
G,
|
|
4138
4142
|
ie,
|
|
4139
4143
|
X ? Error("react-stack-top-frame") : Et,
|
|
4140
4144
|
X ? fe(i(f)) : at
|
|
@@ -4161,7 +4165,7 @@ class jl {
|
|
|
4161
4165
|
constructor(e) {
|
|
4162
4166
|
c(this, "element");
|
|
4163
4167
|
c(this, "events", {
|
|
4164
|
-
ready: new
|
|
4168
|
+
ready: new K()
|
|
4165
4169
|
});
|
|
4166
4170
|
c(this, "ev");
|
|
4167
4171
|
c(this, "customButtonStyles");
|
|
@@ -4240,7 +4244,7 @@ class Kl {
|
|
|
4240
4244
|
constructor(e) {
|
|
4241
4245
|
c(this, "element");
|
|
4242
4246
|
c(this, "events", {
|
|
4243
|
-
ready: new
|
|
4247
|
+
ready: new K()
|
|
4244
4248
|
});
|
|
4245
4249
|
c(this, "ev");
|
|
4246
4250
|
c(this, "customButtonStyles");
|
|
@@ -4285,16 +4289,16 @@ class Kl {
|
|
|
4285
4289
|
return this.element;
|
|
4286
4290
|
}
|
|
4287
4291
|
}
|
|
4288
|
-
const ql = "_paypal_iyh6g_1",
|
|
4292
|
+
const ql = "_paypal_iyh6g_1", Gl = "_hidden_iyh6g_7", Mt = {
|
|
4289
4293
|
paypal: ql,
|
|
4290
|
-
hidden:
|
|
4294
|
+
hidden: Gl
|
|
4291
4295
|
};
|
|
4292
|
-
class
|
|
4296
|
+
class Hl {
|
|
4293
4297
|
constructor(e) {
|
|
4294
4298
|
c(this, "element");
|
|
4295
4299
|
c(this, "events", {
|
|
4296
|
-
ready: new
|
|
4297
|
-
onPaymentAttempt: new
|
|
4300
|
+
ready: new K(),
|
|
4301
|
+
onPaymentAttempt: new K()
|
|
4298
4302
|
});
|
|
4299
4303
|
c(this, "paypal");
|
|
4300
4304
|
c(this, "customButtonStyles");
|
|
@@ -4486,8 +4490,8 @@ class nc {
|
|
|
4486
4490
|
c(this, "container");
|
|
4487
4491
|
c(this, "venmoButton");
|
|
4488
4492
|
c(this, "events", {
|
|
4489
|
-
ready: new
|
|
4490
|
-
onPaymentAttempt: new
|
|
4493
|
+
ready: new K(),
|
|
4494
|
+
onPaymentAttempt: new K()
|
|
4491
4495
|
});
|
|
4492
4496
|
c(this, "braintree");
|
|
4493
4497
|
c(this, "isInitialized", !1);
|
|
@@ -4571,12 +4575,13 @@ class ic {
|
|
|
4571
4575
|
c(this, "card");
|
|
4572
4576
|
c(this, "braintree");
|
|
4573
4577
|
c(this, "events", {
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
|
|
4579
|
-
|
|
4578
|
+
onFormLoaded: new K(),
|
|
4579
|
+
ready: new K(),
|
|
4580
|
+
open: new K(),
|
|
4581
|
+
error: new K(),
|
|
4582
|
+
cancel: new K(),
|
|
4583
|
+
success: new K(),
|
|
4584
|
+
onPaymentAttempt: new K()
|
|
4580
4585
|
});
|
|
4581
4586
|
this.config = e, this.buttons = document.createElement("div"), this.buttons.classList.add(be.buttons, be.hidden);
|
|
4582
4587
|
}
|
|
@@ -4740,13 +4745,15 @@ class ic {
|
|
|
4740
4745
|
let r = t.filter(({ is_active: a }) => a);
|
|
4741
4746
|
(i == null ? void 0 : i.variant) === "default" && (r = r.filter(({ type: a }) => a !== x.CARD));
|
|
4742
4747
|
const s = this.initializeButtonInstances(r);
|
|
4743
|
-
Promise.
|
|
4748
|
+
Promise.all(s).then(() => {
|
|
4749
|
+
this.handleOnFormLoaded();
|
|
4750
|
+
}), this.handleReady();
|
|
4744
4751
|
});
|
|
4745
4752
|
}
|
|
4746
4753
|
// initialize button instances
|
|
4747
4754
|
initializeButtonInstances(e) {
|
|
4748
4755
|
const t = e.map(({ type: h }) => h), i = t.includes(x.APPLE_PAY), r = t.includes(x.GOOGLE_PAY), s = t.includes(x.PAYPAL), a = t.includes(x.VENMO), o = t.includes(x.CARD);
|
|
4749
|
-
i && !this.applePay && (this.applePay = new jl(this.config)), r && !this.googlePay && (this.googlePay = new Kl(this.config)), s && !this.paypal && (this.paypal = new
|
|
4756
|
+
i && !this.applePay && (this.applePay = new jl(this.config)), r && !this.googlePay && (this.googlePay = new Kl(this.config)), s && !this.paypal && (this.paypal = new Hl(this.config), this.paypal.addEventListener("onPaymentAttempt", (h) => this.events.onPaymentAttempt.emit(h))), a && !this.braintree && (this.braintree = new nc(this.config), this.braintree.addEventListener("onPaymentAttempt", (h) => this.events.onPaymentAttempt.emit(h))), o && !this.card && (this.card = new Wl(this.config), this.card.addEventListener(() => {
|
|
4750
4757
|
this.events.open.emit();
|
|
4751
4758
|
}));
|
|
4752
4759
|
const l = e.sort((h, m) => h.order - m.order), u = /* @__PURE__ */ new Map();
|
|
@@ -4773,6 +4780,10 @@ class ic {
|
|
|
4773
4780
|
handleReady() {
|
|
4774
4781
|
this.events.ready.emit();
|
|
4775
4782
|
}
|
|
4783
|
+
// handle on form loaded
|
|
4784
|
+
handleOnFormLoaded() {
|
|
4785
|
+
this.events.onFormLoaded.emit();
|
|
4786
|
+
}
|
|
4776
4787
|
// add event listener
|
|
4777
4788
|
addEventListener(e, t) {
|
|
4778
4789
|
return this.events[e].addListener(t);
|
|
@@ -4907,7 +4918,7 @@ class Tc {
|
|
|
4907
4918
|
c(this, "isDisabled", !1);
|
|
4908
4919
|
c(this, "isChanged", !1);
|
|
4909
4920
|
c(this, "events", {
|
|
4910
|
-
change: new
|
|
4921
|
+
change: new K()
|
|
4911
4922
|
});
|
|
4912
4923
|
var r, s, a, o, l, u, d, h, m;
|
|
4913
4924
|
const i = e.messages();
|
|
@@ -4936,10 +4947,10 @@ class Tc {
|
|
|
4936
4947
|
toggleLabelError(e) {
|
|
4937
4948
|
return E(this, null, function* () {
|
|
4938
4949
|
if (e) {
|
|
4939
|
-
this.inputContainer.classList.add($.errorInput), this.endContent.classList.remove($.hidden), this.labelError.classList.remove($.hidden), yield
|
|
4950
|
+
this.inputContainer.classList.add($.errorInput), this.endContent.classList.remove($.hidden), this.labelError.classList.remove($.hidden), yield H(this.labelError, W.open, W.transition);
|
|
4940
4951
|
return;
|
|
4941
4952
|
}
|
|
4942
|
-
this.inputContainer.classList.remove($.errorInput), this.endContent.classList.add($.hidden), yield
|
|
4953
|
+
this.inputContainer.classList.remove($.errorInput), this.endContent.classList.add($.hidden), yield H(this.labelError, W.close, W.transition), this.labelError.classList.add($.hidden);
|
|
4943
4954
|
});
|
|
4944
4955
|
}
|
|
4945
4956
|
addEventListener(e, t) {
|
|
@@ -5112,7 +5123,7 @@ class Bc {
|
|
|
5112
5123
|
c(this, "isDisabled", !1);
|
|
5113
5124
|
c(this, "isChanged", !1);
|
|
5114
5125
|
c(this, "events", {
|
|
5115
|
-
change: new
|
|
5126
|
+
change: new K()
|
|
5116
5127
|
});
|
|
5117
5128
|
var r, s, a, o, l, u, d, h, m;
|
|
5118
5129
|
this.translate = e;
|
|
@@ -5155,19 +5166,19 @@ ${b}::-ms-input-placeholder{${g}}
|
|
|
5155
5166
|
toggleLabelError(e) {
|
|
5156
5167
|
return E(this, null, function* () {
|
|
5157
5168
|
if (e) {
|
|
5158
|
-
this.inputContainer.classList.add(j.errorInput), this.labelError.classList.remove(j.hidden), yield
|
|
5169
|
+
this.inputContainer.classList.add(j.errorInput), this.labelError.classList.remove(j.hidden), yield H(this.labelError, W.open, W.transition);
|
|
5159
5170
|
return;
|
|
5160
5171
|
}
|
|
5161
|
-
yield
|
|
5172
|
+
yield H(this.labelError, W.close, W.transition), this.labelError.classList.add(j.hidden);
|
|
5162
5173
|
});
|
|
5163
5174
|
}
|
|
5164
5175
|
toggleErrorMessage(e) {
|
|
5165
5176
|
return E(this, null, function* () {
|
|
5166
5177
|
if (e) {
|
|
5167
|
-
this.inputContainer.classList.add(j.errorInput), this.error.textContent = this.errorMessage, this.error.classList.remove(j.hidden), yield
|
|
5178
|
+
this.inputContainer.classList.add(j.errorInput), this.error.textContent = this.errorMessage, this.error.classList.remove(j.hidden), yield H(this.error, Q.open, Q.transition);
|
|
5168
5179
|
return;
|
|
5169
5180
|
}
|
|
5170
|
-
yield
|
|
5181
|
+
yield H(this.error, Q.close, Q.transition), this.error.classList.add(j.hidden);
|
|
5171
5182
|
});
|
|
5172
5183
|
}
|
|
5173
5184
|
getCardIcons() {
|
|
@@ -5206,13 +5217,13 @@ ${b}::-ms-input-placeholder{${g}}
|
|
|
5206
5217
|
return this.toggleLabelError(t), this.toggleErrorMessage(i), !t && !i ? (this.inputContainer.classList.remove(j.errorInput), this.endContent.innerHTML = "", this.endContent.append(...this.getCardIcons())) : (this.endContent.innerHTML = "", this.endContent.appendChild(this.unknownCard.render())), this.isDisabled ? (this.inputContainer.classList.add(j.disabled), this.input.classList.add(j.disabledInput)) : (this.inputContainer.classList.remove(j.disabled), this.input.classList.remove(j.disabledInput)), this.element;
|
|
5207
5218
|
}
|
|
5208
5219
|
}
|
|
5209
|
-
const zc = "_inputContainer_41zd2_5", $c = "_disabled_41zd2_23", Kc = "_input_41zd2_5", qc = "_endContent_41zd2_39",
|
|
5220
|
+
const zc = "_inputContainer_41zd2_5", $c = "_disabled_41zd2_23", Kc = "_input_41zd2_5", qc = "_endContent_41zd2_39", Gc = "_errorInput_41zd2_18", Hc = "_error_41zd2_18", Yc = "_label_41zd2_56", Uc = "_labelError_41zd2_67", Wc = "_disabledInput_41zd2_75", Zc = "_hidden_41zd2_82", Jc = "_securityContent_41zd2_86", A = {
|
|
5210
5221
|
inputContainer: zc,
|
|
5211
5222
|
disabled: $c,
|
|
5212
5223
|
input: Kc,
|
|
5213
5224
|
endContent: qc,
|
|
5214
|
-
errorInput:
|
|
5215
|
-
error:
|
|
5225
|
+
errorInput: Gc,
|
|
5226
|
+
error: Hc,
|
|
5216
5227
|
label: Yc,
|
|
5217
5228
|
labelError: Uc,
|
|
5218
5229
|
disabledInput: Wc,
|
|
@@ -5281,8 +5292,8 @@ class Qc {
|
|
|
5281
5292
|
c(this, "isCvcRequired", !1);
|
|
5282
5293
|
c(this, "isCvcChanged", !1);
|
|
5283
5294
|
c(this, "events", {
|
|
5284
|
-
expiryChange: new
|
|
5285
|
-
cvcChange: new
|
|
5295
|
+
expiryChange: new K(),
|
|
5296
|
+
cvcChange: new K()
|
|
5286
5297
|
});
|
|
5287
5298
|
var a, o, l, u, d, h, m, p, g, b, y, k, V, _, M, T, D;
|
|
5288
5299
|
this.translate = e;
|
|
@@ -5348,19 +5359,19 @@ class Qc {
|
|
|
5348
5359
|
toggleCvcLabelError(e) {
|
|
5349
5360
|
return E(this, null, function* () {
|
|
5350
5361
|
if (e) {
|
|
5351
|
-
this.cvcInputContainer.classList.add(A.errorInput), this.cvcLabelError.classList.remove(A.hidden), yield
|
|
5362
|
+
this.cvcInputContainer.classList.add(A.errorInput), this.cvcLabelError.classList.remove(A.hidden), yield H(this.cvcLabelError, W.open, W.transition);
|
|
5352
5363
|
return;
|
|
5353
5364
|
}
|
|
5354
|
-
yield
|
|
5365
|
+
yield H(this.cvcLabelError, W.close, W.transition), this.cvcLabelError.classList.add(A.hidden);
|
|
5355
5366
|
});
|
|
5356
5367
|
}
|
|
5357
5368
|
toggleCvcErrorMessage(e) {
|
|
5358
5369
|
return E(this, null, function* () {
|
|
5359
5370
|
if (e) {
|
|
5360
|
-
this.cvcInputContainer.classList.add(A.errorInput), this.cvcError.textContent = this.cvcErrorMessage, this.cvcError.classList.remove(A.hidden), yield
|
|
5371
|
+
this.cvcInputContainer.classList.add(A.errorInput), this.cvcError.textContent = this.cvcErrorMessage, this.cvcError.classList.remove(A.hidden), yield H(this.cvcError, Q.open, Q.transition);
|
|
5361
5372
|
return;
|
|
5362
5373
|
}
|
|
5363
|
-
yield
|
|
5374
|
+
yield H(this.cvcError, Q.close, Q.transition), this.cvcError.classList.add(A.hidden);
|
|
5364
5375
|
});
|
|
5365
5376
|
}
|
|
5366
5377
|
expiryValidator(e) {
|
|
@@ -5399,20 +5410,20 @@ class Qc {
|
|
|
5399
5410
|
toggleExpiryLabelError(e) {
|
|
5400
5411
|
return E(this, null, function* () {
|
|
5401
5412
|
if (e) {
|
|
5402
|
-
this.expiryInputContainer.classList.add(A.errorInput), this.expiryLabelError.classList.remove(A.hidden), yield
|
|
5413
|
+
this.expiryInputContainer.classList.add(A.errorInput), this.expiryLabelError.classList.remove(A.hidden), yield H(this.expiryLabelError, W.open, W.transition);
|
|
5403
5414
|
return;
|
|
5404
5415
|
}
|
|
5405
|
-
yield
|
|
5416
|
+
yield H(this.expiryLabelError, W.close, W.transition), this.expiryLabelError.classList.add(A.hidden);
|
|
5406
5417
|
});
|
|
5407
5418
|
}
|
|
5408
5419
|
// toggle expiry error message
|
|
5409
5420
|
toggleExpiryErrorMessage(e) {
|
|
5410
5421
|
return E(this, null, function* () {
|
|
5411
5422
|
if (e) {
|
|
5412
|
-
this.expiryInputContainer.classList.add(A.errorInput), this.expiryError.textContent = this.expiryErrorMessage, this.expiryError.classList.remove(A.hidden), yield
|
|
5423
|
+
this.expiryInputContainer.classList.add(A.errorInput), this.expiryError.textContent = this.expiryErrorMessage, this.expiryError.classList.remove(A.hidden), yield H(this.expiryError, Q.open, Q.transition);
|
|
5413
5424
|
return;
|
|
5414
5425
|
}
|
|
5415
|
-
yield
|
|
5426
|
+
yield H(this.expiryError, Q.close, Q.transition), this.expiryError.classList.add(A.hidden);
|
|
5416
5427
|
});
|
|
5417
5428
|
}
|
|
5418
5429
|
// add event listener
|
|
@@ -5462,8 +5473,8 @@ class ed {
|
|
|
5462
5473
|
c(this, "onPaymentAttempt");
|
|
5463
5474
|
c(this, "isBackVisible", !0);
|
|
5464
5475
|
c(this, "events", {
|
|
5465
|
-
submit: new
|
|
5466
|
-
close: new
|
|
5476
|
+
submit: new K(),
|
|
5477
|
+
close: new K()
|
|
5467
5478
|
});
|
|
5468
5479
|
const a = i.getState();
|
|
5469
5480
|
this.element = document.createElement("form"), this.onPaymentAttempt = s, this.submit = new hc(e, a.SubmitButton), this.back = new oc(a.BackButton), this.number = new Bc(e, a.Input), this.name = new Tc(e, a.Input), this.cardSecurity = new Qc(e, a.Input), this.element.classList.add(ve.cardForm), t && F(this.element, t);
|
|
@@ -5644,31 +5655,33 @@ class od {
|
|
|
5644
5655
|
var i;
|
|
5645
5656
|
const t = this.config.state.checkout.getState();
|
|
5646
5657
|
(i = t.onCheckoutAttempt) == null || i.call(t, { paymentMethod: e }), this.hideError();
|
|
5658
|
+
}), this.buttons.addEventListener("onFormLoaded", () => {
|
|
5659
|
+
const { onCheckoutLoaded: e } = this.config.state.checkout.getState();
|
|
5660
|
+
!this.hasLoadedOnce && e && (this.hasLoadedOnce = !0, e({ success: !0 }));
|
|
5647
5661
|
}), this.buttons.addEventListener("ready", () => E(this, null, function* () {
|
|
5648
|
-
var
|
|
5662
|
+
var t;
|
|
5649
5663
|
this.loader.setClassName(Z.hidden);
|
|
5650
|
-
const { variant: e
|
|
5664
|
+
const { variant: e } = this.config.state.checkout.getState();
|
|
5651
5665
|
if (this.form.setDefaultVariant(e === "default"), this.buttons.showButton(), e === "default") {
|
|
5652
|
-
const
|
|
5653
|
-
|
|
5654
|
-
{ minHeight: [`${
|
|
5666
|
+
const i = this.checkout.getBoundingClientRect().height;
|
|
5667
|
+
i < this.FORM_HEIGHT && (this.checkout.style.height = `${i}px`), this.form.element.classList.remove(Z.hidden), i < this.FORM_HEIGHT && (yield (t = this.checkout.animate(
|
|
5668
|
+
{ minHeight: [`${i}px`, `${this.FORM_HEIGHT}px`] },
|
|
5655
5669
|
{ duration: 250, easing: "ease-out", fill: "forwards" }
|
|
5656
|
-
).finished) != null ?
|
|
5670
|
+
).finished) != null ? t : Promise.resolve(), this.checkout.style.height = ""), this.isFormOpen = !0;
|
|
5657
5671
|
}
|
|
5658
|
-
!this.hasLoadedOnce && t && (this.hasLoadedOnce = !0, t({ success: !0 }));
|
|
5659
5672
|
})), this.buttons.addEventListener("open", () => E(this, null, function* () {
|
|
5660
5673
|
var r;
|
|
5661
5674
|
if (this.isLoading) return;
|
|
5662
5675
|
this.hideError();
|
|
5663
5676
|
const e = this.checkout.getBoundingClientRect().height;
|
|
5664
|
-
this.closedHeight = e, e < this.FORM_HEIGHT && (this.checkout.style.height = `${e}px`), yield
|
|
5677
|
+
this.closedHeight = e, e < this.FORM_HEIGHT && (this.checkout.style.height = `${e}px`), yield H(this.buttons.buttons, ut.close, ut.transition), this.buttons.buttons.classList.add(Z.hidden), this.form.element.classList.add(Z.formInitial), this.form.element.classList.remove(Z.hidden);
|
|
5665
5678
|
const t = e;
|
|
5666
5679
|
let i = null;
|
|
5667
5680
|
t < this.FORM_HEIGHT && (this.checkout.style.height = `${t}px`, i = (r = this.checkout.animate(
|
|
5668
5681
|
{ minHeight: [`${t}px`, `${this.FORM_HEIGHT}px`] },
|
|
5669
5682
|
{ duration: 250, easing: "ease-out", fill: "forwards" }
|
|
5670
5683
|
).finished) != null ? r : Promise.resolve()), yield Promise.all([
|
|
5671
|
-
|
|
5684
|
+
H(this.form.element, Le.open, Le.transition),
|
|
5672
5685
|
i != null ? i : Promise.resolve()
|
|
5673
5686
|
]), t < this.FORM_HEIGHT && (this.checkout.style.height = ""), this.isFormOpen = !0;
|
|
5674
5687
|
})), this.buttons.addEventListener("error", (e) => {
|
|
@@ -5707,11 +5720,11 @@ class od {
|
|
|
5707
5720
|
this.closedHeight > 0 && e > this.closedHeight && (this.checkout.style.height = `${e}px`, t = (s = this.checkout.animate(
|
|
5708
5721
|
{ minHeight: [`${e}px`, `${this.closedHeight}px`] },
|
|
5709
5722
|
{ duration: 250, easing: "ease-out", fill: "forwards" }
|
|
5710
|
-
).finished) != null ? s : Promise.resolve()), yield
|
|
5723
|
+
).finished) != null ? s : Promise.resolve()), yield H(this.form.element, Le.close, Le.transition), this.form.element.classList.add(Z.hidden);
|
|
5711
5724
|
const { variant: r } = this.config.state.checkout.getState();
|
|
5712
5725
|
if (r !== "default") {
|
|
5713
5726
|
this.buttons.buttons.classList.add(Z.btnsInitial), this.buttons.buttons.classList.remove(Z.hidden);
|
|
5714
|
-
const o =
|
|
5727
|
+
const o = H(this.buttons.buttons, ut.open, ut.transition);
|
|
5715
5728
|
yield Promise.all([o, t != null ? t : Promise.resolve()]);
|
|
5716
5729
|
}
|
|
5717
5730
|
this.closedHeight > 0 && (t = (a = this.checkout.animate(
|
|
@@ -5791,7 +5804,7 @@ class od {
|
|
|
5791
5804
|
// show success
|
|
5792
5805
|
showSuccess() {
|
|
5793
5806
|
return E(this, null, function* () {
|
|
5794
|
-
this.container.classList.add(Z.hidden), this.success.removeClassName(Z.hidden), yield
|
|
5807
|
+
this.container.classList.add(Z.hidden), this.success.removeClassName(Z.hidden), yield H(this.success.element, Le.open, Le.transition);
|
|
5795
5808
|
});
|
|
5796
5809
|
}
|
|
5797
5810
|
// hide error
|
|
@@ -5844,17 +5857,16 @@ class ld {
|
|
|
5844
5857
|
return E(this, null, function* () {
|
|
5845
5858
|
const { checkout: e, transaction: t, translate: i, styles: r } = this.config.state, { apiVersion: s } = e.getState();
|
|
5846
5859
|
e.subscribe(({ clientToken: a, environment: o, locale: l, translate: u, styles: d }) => {
|
|
5847
|
-
|
|
5848
|
-
|
|
5849
|
-
|
|
5850
|
-
|
|
5851
|
-
|
|
5852
|
-
|
|
5853
|
-
|
|
5854
|
-
|
|
5855
|
-
|
|
5856
|
-
|
|
5857
|
-
this.component.showError(p);
|
|
5860
|
+
const h = {
|
|
5861
|
+
develop: "app_00b96c0c3011",
|
|
5862
|
+
staging: "app_00396c84ac2b",
|
|
5863
|
+
sandbox: "app_03b1ea2b6dfa",
|
|
5864
|
+
production: "app_409cf462b6cc"
|
|
5865
|
+
}, m = "team_f20c9e679d47", p = h[o];
|
|
5866
|
+
this.config.service.ev.initEv({ teamId: m, appId: p }), l && i.locale() !== l && i.setLocale(l), u && i.overrides() !== u && i.setMessages(u), d && r.setState(d), t.updateTransaction(a, o, s).catch((g) => {
|
|
5867
|
+
if (console.error(g), this.component) {
|
|
5868
|
+
const b = i.messages(), y = g.name === "INVALID_SESSION" ? b.status.invalidSession : g.message;
|
|
5869
|
+
this.component.showError(y);
|
|
5858
5870
|
}
|
|
5859
5871
|
});
|
|
5860
5872
|
});
|
|
@@ -5871,7 +5883,7 @@ class Ct {
|
|
|
5871
5883
|
constructor(e) {
|
|
5872
5884
|
c(this, "initialState");
|
|
5873
5885
|
c(this, "state");
|
|
5874
|
-
c(this, "observer", new
|
|
5886
|
+
c(this, "observer", new K());
|
|
5875
5887
|
this.initialState = e, this.state = e;
|
|
5876
5888
|
}
|
|
5877
5889
|
getState() {
|
|
@@ -7258,7 +7270,7 @@ const md = {
|
|
|
7258
7270
|
error: "Vaš način plačila je bil zavrnjen. To je lahko zaradi nezadostnih sredstev, poteklih podatkov o plačilu ali varnostnih omejitev. Preverite svoje podatke o plačilu ali poskusite drug način plačila.",
|
|
7259
7271
|
invalidSession: "Vaša seja plačila je potekla. Osvežite stran za nadaljevanje."
|
|
7260
7272
|
}
|
|
7261
|
-
},
|
|
7273
|
+
}, Gd = {
|
|
7262
7274
|
card: {
|
|
7263
7275
|
required: "KRÄVS",
|
|
7264
7276
|
number: {
|
|
@@ -7301,7 +7313,7 @@ const md = {
|
|
|
7301
7313
|
error: "Din betalningsmetod avvisades. Detta kan bero på otillräckliga medel, utgångna betalningsuppgifter eller säkerhetsbegränsningar. Vänligen kontrollera dina betalningsuppgifter eller prova en annan betalningsmetod.",
|
|
7302
7314
|
invalidSession: "Din betalningssession har löpt ut. Vänligen uppdatera sidan för att fortsätta."
|
|
7303
7315
|
}
|
|
7304
|
-
},
|
|
7316
|
+
}, Hd = {
|
|
7305
7317
|
card: {
|
|
7306
7318
|
required: "จำเป็น",
|
|
7307
7319
|
number: {
|
|
@@ -7505,8 +7517,8 @@ const md = {
|
|
|
7505
7517
|
uk: $d,
|
|
7506
7518
|
sk: Kd,
|
|
7507
7519
|
sl: qd,
|
|
7508
|
-
sv:
|
|
7509
|
-
th:
|
|
7520
|
+
sv: Gd,
|
|
7521
|
+
th: Hd,
|
|
7510
7522
|
tr: Yd,
|
|
7511
7523
|
vi: Ud,
|
|
7512
7524
|
zh: Wd
|