@paynext/sdk 0.0.45 → 0.0.47
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/assets/index.css +1 -1
- package/dist/index.d.ts +1 -3
- package/dist/index.es.js +271 -277
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +19 -19
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -2,12 +2,12 @@ var Pa = Object.defineProperty, Ra = Object.defineProperties;
|
|
|
2
2
|
var Sa = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var ht = Object.getOwnPropertySymbols;
|
|
4
4
|
var Or = Object.prototype.hasOwnProperty, Nr = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var
|
|
5
|
+
var It = (n, e, t) => e in n ? Pa(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, $ = (n, e) => {
|
|
6
6
|
for (var t in e || (e = {}))
|
|
7
|
-
Or.call(e, t) &&
|
|
7
|
+
Or.call(e, t) && It(n, t, e[t]);
|
|
8
8
|
if (ht)
|
|
9
9
|
for (var t of ht(e))
|
|
10
|
-
Nr.call(e, t) &&
|
|
10
|
+
Nr.call(e, t) && It(n, t, e[t]);
|
|
11
11
|
return n;
|
|
12
12
|
}, te = (n, e) => Ra(n, Sa(e));
|
|
13
13
|
var ge = (n, e) => {
|
|
@@ -19,7 +19,7 @@ var ge = (n, e) => {
|
|
|
19
19
|
e.indexOf(r) < 0 && Nr.call(n, r) && (t[r] = n[r]);
|
|
20
20
|
return t;
|
|
21
21
|
};
|
|
22
|
-
var b = (n, e, t) =>
|
|
22
|
+
var b = (n, e, t) => It(n, typeof e != "symbol" ? e + "" : e, t);
|
|
23
23
|
var j = (n, e, t) => new Promise((r, i) => {
|
|
24
24
|
var a = (l) => {
|
|
25
25
|
try {
|
|
@@ -332,18 +332,18 @@ function Ai(n) {
|
|
|
332
332
|
function rn(n) {
|
|
333
333
|
return typeof n == "function" && "applyToOptions" in n;
|
|
334
334
|
}
|
|
335
|
-
const
|
|
335
|
+
const _t = 2e4;
|
|
336
336
|
function an(n) {
|
|
337
337
|
let e = 0;
|
|
338
338
|
const t = 50;
|
|
339
339
|
let r = n.next(e);
|
|
340
|
-
for (; !r.done && e <
|
|
340
|
+
for (; !r.done && e < _t; )
|
|
341
341
|
e += t, r = n.next(e);
|
|
342
|
-
return e >=
|
|
342
|
+
return e >= _t ? 1 / 0 : e;
|
|
343
343
|
}
|
|
344
344
|
const ye = /* @__NO_SIDE_EFFECTS__ */ (n) => n * 1e3, Ee = /* @__NO_SIDE_EFFECTS__ */ (n) => n / 1e3;
|
|
345
345
|
function wi(n, e = 100, t) {
|
|
346
|
-
const r = t(te($({}, n), { keyframes: [0, e] })), i = Math.min(an(r),
|
|
346
|
+
const r = t(te($({}, n), { keyframes: [0, e] })), i = Math.min(an(r), _t);
|
|
347
347
|
return {
|
|
348
348
|
type: "keyframes",
|
|
349
349
|
ease: (a) => r.next(i * a).value / e,
|
|
@@ -557,15 +557,15 @@ function as(n, e) {
|
|
|
557
557
|
s[ft[x]].cancel(T);
|
|
558
558
|
}, state: i, steps: s };
|
|
559
559
|
}
|
|
560
|
-
const De = /* @__NO_SIDE_EFFECTS__ */ (n) => n, { schedule: Ae, cancel: Ft, state:
|
|
561
|
-
let
|
|
560
|
+
const De = /* @__NO_SIDE_EFFECTS__ */ (n) => n, { schedule: Ae, cancel: Ft, state: Ct } = /* @__PURE__ */ as(typeof requestAnimationFrame != "undefined" ? requestAnimationFrame : De, !0);
|
|
561
|
+
let Et;
|
|
562
562
|
function ss() {
|
|
563
|
-
|
|
563
|
+
Et = void 0;
|
|
564
564
|
}
|
|
565
565
|
const ve = {
|
|
566
|
-
now: () => (
|
|
566
|
+
now: () => (Et === void 0 && ve.set(Ct.isProcessing || Ce.useManualTiming ? Ct.timestamp : performance.now()), Et),
|
|
567
567
|
set: (n) => {
|
|
568
|
-
|
|
568
|
+
Et = n, queueMicrotask(ss);
|
|
569
569
|
}
|
|
570
570
|
}, Sr = /* @__PURE__ */ new Set();
|
|
571
571
|
function Ii(n, e, t) {
|
|
@@ -907,12 +907,12 @@ const Ns = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s
|
|
|
907
907
|
[t]: parseFloat(s),
|
|
908
908
|
alpha: o !== void 0 ? parseFloat(o) : 1
|
|
909
909
|
};
|
|
910
|
-
}, xs = (n) => Le(0, 255, n),
|
|
910
|
+
}, xs = (n) => Le(0, 255, n), Ot = te($({}, Ue), {
|
|
911
911
|
transform: (n) => Math.round(xs(n))
|
|
912
912
|
}), Ie = {
|
|
913
913
|
test: /* @__PURE__ */ cn("rgb", "red"),
|
|
914
914
|
parse: /* @__PURE__ */ Ri("red", "green", "blue"),
|
|
915
|
-
transform: ({ red: n, green: e, blue: t, alpha: r = 1 }) => "rgba(" +
|
|
915
|
+
transform: ({ red: n, green: e, blue: t, alpha: r = 1 }) => "rgba(" + Ot.transform(n) + ", " + Ot.transform(e) + ", " + Ot.transform(t) + ", " + rt(st.transform(r)) + ")"
|
|
916
916
|
};
|
|
917
917
|
function Ls(n) {
|
|
918
918
|
let e = "", t = "", r = "", i = "";
|
|
@@ -984,7 +984,7 @@ const Be = {
|
|
|
984
984
|
createTransformer: Di,
|
|
985
985
|
getAnimatableNone: Us
|
|
986
986
|
};
|
|
987
|
-
function
|
|
987
|
+
function Nt(n, e, t) {
|
|
988
988
|
return t < 0 && (t += 1), t > 1 && (t -= 1), t < 1 / 6 ? n + (e - n) * 6 * t : t < 1 / 2 ? e : t < 2 / 3 ? n + (e - n) * (2 / 3 - t) * 6 : n;
|
|
989
989
|
}
|
|
990
990
|
function Bs({ hue: n, saturation: e, lightness: t, alpha: r }) {
|
|
@@ -994,7 +994,7 @@ function Bs({ hue: n, saturation: e, lightness: t, alpha: r }) {
|
|
|
994
994
|
i = a = s = t;
|
|
995
995
|
else {
|
|
996
996
|
const o = t < 0.5 ? t * (1 + e) : t + e - t * e, l = 2 * t - o;
|
|
997
|
-
i =
|
|
997
|
+
i = Nt(l, o, n + 1 / 3), a = Nt(l, o, n), s = Nt(l, o, n - 1 / 3);
|
|
998
998
|
}
|
|
999
999
|
return {
|
|
1000
1000
|
red: Math.round(i * 255),
|
|
@@ -1003,10 +1003,10 @@ function Bs({ hue: n, saturation: e, lightness: t, alpha: r }) {
|
|
|
1003
1003
|
alpha: r
|
|
1004
1004
|
};
|
|
1005
1005
|
}
|
|
1006
|
-
function
|
|
1006
|
+
function At(n, e) {
|
|
1007
1007
|
return (t) => t > 0 ? e : n;
|
|
1008
1008
|
}
|
|
1009
|
-
const
|
|
1009
|
+
const xt = (n, e, t) => {
|
|
1010
1010
|
const r = n * n, i = t * (e * e - r) + r;
|
|
1011
1011
|
return i < 0 ? 0 : Math.sqrt(i);
|
|
1012
1012
|
}, zs = [Ut, Ie, Re], js = (n) => zs.find((e) => e.test(n));
|
|
@@ -1020,9 +1020,9 @@ function Vr(n) {
|
|
|
1020
1020
|
const Fr = (n, e) => {
|
|
1021
1021
|
const t = Vr(n), r = Vr(e);
|
|
1022
1022
|
if (!t || !r)
|
|
1023
|
-
return
|
|
1023
|
+
return At(n, e);
|
|
1024
1024
|
const i = $({}, t);
|
|
1025
|
-
return (a) => (i.red =
|
|
1025
|
+
return (a) => (i.red = xt(t.red, r.red, a), i.green = xt(t.green, r.green, a), i.blue = xt(t.blue, r.blue, a), i.alpha = ct(t.alpha, r.alpha, a), Ie.transform(i));
|
|
1026
1026
|
}, Bt = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
1027
1027
|
function Ks(n, e) {
|
|
1028
1028
|
return Bt.has(n) ? (t) => t <= 0 ? n : e : (t) => t >= 1 ? e : n;
|
|
@@ -1032,7 +1032,7 @@ function Hs(n, e) {
|
|
|
1032
1032
|
return (t) => ct(n, e, t);
|
|
1033
1033
|
}
|
|
1034
1034
|
function dn(n) {
|
|
1035
|
-
return typeof n == "number" ? Hs : typeof n == "string" ? on(n) ?
|
|
1035
|
+
return typeof n == "number" ? Hs : typeof n == "string" ? on(n) ? At : ue.test(n) ? Fr : Ys : Array.isArray(n) ? Vi : typeof n == "object" ? ue.test(n) ? Fr : Ws : At;
|
|
1036
1036
|
}
|
|
1037
1037
|
function Vi(n, e) {
|
|
1038
1038
|
const t = [...n], r = t.length, i = n.map((a, s) => dn(a)(a, e[s]));
|
|
@@ -1063,7 +1063,7 @@ function Gs(n, e) {
|
|
|
1063
1063
|
}
|
|
1064
1064
|
const Ys = (n, e) => {
|
|
1065
1065
|
const t = Be.createTransformer(e), r = ot(n), i = ot(e);
|
|
1066
|
-
return r.indexes.var.length === i.indexes.var.length && r.indexes.color.length === i.indexes.color.length && r.indexes.number.length >= i.indexes.number.length ? Bt.has(n) && !i.values.length || Bt.has(e) && !r.values.length ? Ks(n, e) : un(Vi(Gs(r, i), i.values), t) : (ut(!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.`),
|
|
1066
|
+
return r.indexes.var.length === i.indexes.var.length && r.indexes.color.length === i.indexes.color.length && r.indexes.number.length >= i.indexes.number.length ? Bt.has(n) && !i.values.length || Bt.has(e) && !r.values.length ? Ks(n, e) : un(Vi(Gs(r, i), i.values), t) : (ut(!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.`), At(n, e));
|
|
1067
1067
|
};
|
|
1068
1068
|
function Fi(n, e, t) {
|
|
1069
1069
|
return typeof n == "number" && typeof e == "number" && typeof t == "number" ? ct(n, e, t) : dn(n)(n, e);
|
|
@@ -1077,7 +1077,7 @@ const Qs = (n) => {
|
|
|
1077
1077
|
* If we're processing this frame we can use the
|
|
1078
1078
|
* framelocked timestamp to keep things in sync.
|
|
1079
1079
|
*/
|
|
1080
|
-
now: () =>
|
|
1080
|
+
now: () => Ct.isProcessing ? Ct.timestamp : ve.now()
|
|
1081
1081
|
};
|
|
1082
1082
|
}, Ui = (n, e, t = 10) => {
|
|
1083
1083
|
let r = "";
|
|
@@ -1232,7 +1232,7 @@ function lt(n = ie.visualDuration, e = ie.bounce) {
|
|
|
1232
1232
|
return o.value = o.done ? s : I, o;
|
|
1233
1233
|
},
|
|
1234
1234
|
toString: () => {
|
|
1235
|
-
const A = Math.min(an(x),
|
|
1235
|
+
const A = Math.min(an(x), _t), I = Ui((L) => x.next(A * L).value, A, 30);
|
|
1236
1236
|
return A + "ms " + I;
|
|
1237
1237
|
},
|
|
1238
1238
|
toTransition: () => {
|
|
@@ -3019,10 +3019,10 @@ const ic = "_checkout_5sq3n_1", ac = "_hidden_5sq3n_7", sc = "_formInitial_5sq3n
|
|
|
3019
3019
|
hidden: ac,
|
|
3020
3020
|
formInitial: sc,
|
|
3021
3021
|
btnsInitial: oc
|
|
3022
|
-
}, lc = "_buttons_1i8cu_1", cc = "_hidden_1i8cu_5",
|
|
3022
|
+
}, lc = "_buttons_1i8cu_1", cc = "_hidden_1i8cu_5", Lt = {
|
|
3023
3023
|
buttons: lc,
|
|
3024
3024
|
hidden: cc
|
|
3025
|
-
}, uc = "_applePay_1m9xd_1", dc = "_hidden_1m9xd_22",
|
|
3025
|
+
}, uc = "_applePay_1m9xd_1", dc = "_hidden_1m9xd_22", Pt = {
|
|
3026
3026
|
applePay: uc,
|
|
3027
3027
|
hidden: dc
|
|
3028
3028
|
};
|
|
@@ -3032,11 +3032,11 @@ class pc {
|
|
|
3032
3032
|
b(this, "events", {
|
|
3033
3033
|
ready: new ce()
|
|
3034
3034
|
});
|
|
3035
|
-
this.ev = e, this.element = document.createElement("div"), this.element.classList.add(
|
|
3035
|
+
this.ev = e, this.element = document.createElement("div"), this.element.classList.add(Pt.applePay, Pt.hidden);
|
|
3036
3036
|
}
|
|
3037
3037
|
init(e) {
|
|
3038
3038
|
return j(this, null, function* () {
|
|
3039
|
-
e && (yield this.ev.initApple(e), this.ev.isAppleAvailable() && (yield this.ev.renderApple(this.element), this.element.classList.remove(
|
|
3039
|
+
e && (yield this.ev.initApple(e), this.ev.isAppleAvailable() && (yield this.ev.renderApple(this.element), this.element.classList.remove(Pt.hidden), this.events.ready.emit()));
|
|
3040
3040
|
});
|
|
3041
3041
|
}
|
|
3042
3042
|
addEventListener(e, t) {
|
|
@@ -3071,9 +3071,9 @@ const hc = [
|
|
|
3071
3071
|
function wa(n) {
|
|
3072
3072
|
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
3073
3073
|
}
|
|
3074
|
-
var
|
|
3074
|
+
var Rt, ni;
|
|
3075
3075
|
function mc() {
|
|
3076
|
-
if (ni) return
|
|
3076
|
+
if (ni) return Rt;
|
|
3077
3077
|
ni = 1;
|
|
3078
3078
|
var n = {
|
|
3079
3079
|
visa: {
|
|
@@ -3267,7 +3267,7 @@ function mc() {
|
|
|
3267
3267
|
}
|
|
3268
3268
|
}
|
|
3269
3269
|
};
|
|
3270
|
-
return
|
|
3270
|
+
return Rt = n, Rt;
|
|
3271
3271
|
}
|
|
3272
3272
|
var $e = {}, Ze = {}, ri;
|
|
3273
3273
|
function Ta() {
|
|
@@ -3464,7 +3464,7 @@ const Ec = (n, e) => {
|
|
|
3464
3464
|
return `${r} / ${a}`;
|
|
3465
3465
|
};
|
|
3466
3466
|
var oe = /* @__PURE__ */ ((n) => (n.Invalid = "invalid", n.Empty = "empty", n.Incomplete = "incomplete", n.Unsupported = "unsupported", n.Expired = "expired", n))(oe || {}), pe = /* @__PURE__ */ ((n) => (n.Visa = "visa", n.Mastercard = "mastercard", n.AmericanExpress = "american-express", n.Discover = "discover", n.JCB = "jcb", n.DinersClub = "diners-club", n.UnionPay = "unionpay", n.Maestro = "maestro", n))(pe || {});
|
|
3467
|
-
const
|
|
3467
|
+
const wt = [
|
|
3468
3468
|
{ name: "Visa", type: "visa", pattern: /^4/, minLength: 16, maxLength: 16 },
|
|
3469
3469
|
{
|
|
3470
3470
|
name: "MasterCard",
|
|
@@ -3509,7 +3509,7 @@ const Tt = [
|
|
|
3509
3509
|
minLength: 12,
|
|
3510
3510
|
maxLength: 19
|
|
3511
3511
|
}
|
|
3512
|
-
], Ia = (n) =>
|
|
3512
|
+
], Ia = (n) => wt.find((e) => e.pattern.test(n)) || null, ci = (n) => wt.filter((e) => e.pattern.test(n)), Ac = (n) => {
|
|
3513
3513
|
let e = 0, t = !1;
|
|
3514
3514
|
for (let r = n.length - 1; r >= 0; r--) {
|
|
3515
3515
|
let i = parseInt(n[r]);
|
|
@@ -3588,7 +3588,7 @@ const Tt = [
|
|
|
3588
3588
|
default:
|
|
3589
3589
|
return e;
|
|
3590
3590
|
}
|
|
3591
|
-
}, []), Oc = "_googlePay_1j5ka_1", Nc = "_hidden_1j5ka_17",
|
|
3591
|
+
}, []), Oc = "_googlePay_1j5ka_1", Nc = "_hidden_1j5ka_17", St = {
|
|
3592
3592
|
googlePay: Oc,
|
|
3593
3593
|
hidden: Nc
|
|
3594
3594
|
};
|
|
@@ -3598,11 +3598,11 @@ class xc {
|
|
|
3598
3598
|
b(this, "events", {
|
|
3599
3599
|
ready: new ce()
|
|
3600
3600
|
});
|
|
3601
|
-
this.ev = e, this.element = document.createElement("div"), this.element.classList.add(
|
|
3601
|
+
this.ev = e, this.element = document.createElement("div"), this.element.classList.add(St.googlePay, St.hidden);
|
|
3602
3602
|
}
|
|
3603
3603
|
init(e) {
|
|
3604
3604
|
return j(this, null, function* () {
|
|
3605
|
-
e && (yield this.ev.initGoogle(e), yield this.ev.renderGoogle(this.element), this.element.classList.remove(
|
|
3605
|
+
e && (yield this.ev.initGoogle(e), yield this.ev.renderGoogle(this.element), this.element.classList.remove(St.hidden), this.events.ready.emit());
|
|
3606
3606
|
});
|
|
3607
3607
|
}
|
|
3608
3608
|
addEventListener(e, t) {
|
|
@@ -3612,7 +3612,7 @@ class xc {
|
|
|
3612
3612
|
return this.element;
|
|
3613
3613
|
}
|
|
3614
3614
|
}
|
|
3615
|
-
const Lc = "_paypal_1al9c_1", Pc = "_hidden_1al9c_8",
|
|
3615
|
+
const Lc = "_paypal_1al9c_1", Pc = "_hidden_1al9c_8", kt = {
|
|
3616
3616
|
paypal: Lc,
|
|
3617
3617
|
hidden: Pc
|
|
3618
3618
|
};
|
|
@@ -3622,7 +3622,7 @@ class Rc {
|
|
|
3622
3622
|
b(this, "events", {
|
|
3623
3623
|
ready: new ce()
|
|
3624
3624
|
});
|
|
3625
|
-
this.paypal = e, this.element = document.createElement("div"), this.element.classList.add(
|
|
3625
|
+
this.paypal = e, this.element = document.createElement("div"), this.element.classList.add(kt.paypal, kt.hidden);
|
|
3626
3626
|
}
|
|
3627
3627
|
// init
|
|
3628
3628
|
init(e) {
|
|
@@ -3637,7 +3637,7 @@ class Rc {
|
|
|
3637
3637
|
}),
|
|
3638
3638
|
onCancel: e.onCancel,
|
|
3639
3639
|
onError: e.onError
|
|
3640
|
-
})), this.element.classList.remove(
|
|
3640
|
+
})), this.element.classList.remove(kt.hidden), this.events.ready.emit());
|
|
3641
3641
|
});
|
|
3642
3642
|
}
|
|
3643
3643
|
// add event listener
|
|
@@ -3827,7 +3827,6 @@ const Uc = (n, e, t) => e.concat(n.filter((r) => e.every((i) => !t(r, i)))), _n
|
|
|
3827
3827
|
token: (wr = (Ar = n.applePay) == null ? void 0 : Ar.networkToken) == null ? void 0 : wr.number,
|
|
3828
3828
|
token_service_provider: (Ir = (Tr = n.applePay) == null ? void 0 : Tr.networkToken) == null ? void 0 : Ir.tokenServiceProvider
|
|
3829
3829
|
} : void 0,
|
|
3830
|
-
// ToDo: add braintree
|
|
3831
3830
|
braintree: n.braintree ? {
|
|
3832
3831
|
payment_method_nonce: n.braintree.nonce
|
|
3833
3832
|
} : void 0
|
|
@@ -3845,11 +3844,15 @@ const Uc = (n, e, t) => e.concat(n.filter((r) => e.every((i) => !t(r, i)))), _n
|
|
|
3845
3844
|
return i.checkout_config || (i.checkout_config = Bc), i;
|
|
3846
3845
|
});
|
|
3847
3846
|
var Oa = /* @__PURE__ */ ((n) => (n.Card = "CARD", n))(Oa || {});
|
|
3848
|
-
const qc = "
|
|
3847
|
+
const qc = "_venmo_10t25_1", Hc = "_hidden_10t25_17", Mt = {
|
|
3849
3848
|
venmo: qc,
|
|
3850
3849
|
hidden: Hc
|
|
3850
|
+
}, Wc = {
|
|
3851
|
+
display: "block",
|
|
3852
|
+
height: 40,
|
|
3853
|
+
borderRadius: 12
|
|
3851
3854
|
};
|
|
3852
|
-
class
|
|
3855
|
+
class Gc {
|
|
3853
3856
|
constructor(e) {
|
|
3854
3857
|
b(this, "isProcessing", !1);
|
|
3855
3858
|
b(this, "element");
|
|
@@ -3857,13 +3860,13 @@ class Wc {
|
|
|
3857
3860
|
b(this, "events", {
|
|
3858
3861
|
ready: new ce()
|
|
3859
3862
|
});
|
|
3860
|
-
this.braintree = e, this.element = document.createElement("div"), this.
|
|
3863
|
+
this.braintree = e, this.element = document.createElement("div"), this.venmoButton = document.createElement("button"), this.venmoButton.classList.add(Mt.venmo, Mt.hidden), this.venmoButton.textContent = "Venmo", this.element.appendChild(this.venmoButton);
|
|
3861
3864
|
}
|
|
3862
3865
|
// init
|
|
3863
3866
|
init(e) {
|
|
3864
3867
|
return j(this, null, function* () {
|
|
3865
3868
|
if (e) {
|
|
3866
|
-
console.log("Initializing Braintree with config:", e);
|
|
3869
|
+
console.log("Initializing Braintree Venmo with config:", e);
|
|
3867
3870
|
try {
|
|
3868
3871
|
if (yield this.braintree.init({
|
|
3869
3872
|
authorization: e.authorization
|
|
@@ -3875,7 +3878,7 @@ class Wc {
|
|
|
3875
3878
|
yield this.handleExistingTokenization(e);
|
|
3876
3879
|
return;
|
|
3877
3880
|
}
|
|
3878
|
-
this.element.classList.remove(
|
|
3881
|
+
this.element.classList.remove(Mt.hidden), this.events.ready.emit();
|
|
3879
3882
|
} catch (t) {
|
|
3880
3883
|
console.error("Error initializing Venmo:", t), this.handleVenmoError(t);
|
|
3881
3884
|
}
|
|
@@ -3884,7 +3887,7 @@ class Wc {
|
|
|
3884
3887
|
}
|
|
3885
3888
|
// display venmo button
|
|
3886
3889
|
displayVenmoButton(e) {
|
|
3887
|
-
this.venmoButton.style
|
|
3890
|
+
Object.assign(this.venmoButton.style, Wc), this.venmoButton.addEventListener("click", () => j(this, null, function* () {
|
|
3888
3891
|
if (!this.isProcessing) {
|
|
3889
3892
|
this.isProcessing = !0, this.venmoButton.disabled = !0;
|
|
3890
3893
|
try {
|
|
@@ -3928,7 +3931,7 @@ class Wc {
|
|
|
3928
3931
|
return this.element;
|
|
3929
3932
|
}
|
|
3930
3933
|
}
|
|
3931
|
-
class
|
|
3934
|
+
class Yc {
|
|
3932
3935
|
constructor(e) {
|
|
3933
3936
|
b(this, "isAppleReady", !0);
|
|
3934
3937
|
b(this, "isGoogleReady", !0);
|
|
@@ -3947,7 +3950,7 @@ class Gc {
|
|
|
3947
3950
|
cancel: new ce(),
|
|
3948
3951
|
success: new ce()
|
|
3949
3952
|
});
|
|
3950
|
-
this.config = e, this.applePay = new pc(e.service.ev), this.paypal = new Rc(e.service.paypal), this.googlePay = new xc(e.service.ev), this.braintree = new
|
|
3953
|
+
this.config = e, this.applePay = new pc(e.service.ev), this.paypal = new Rc(e.service.paypal), this.googlePay = new xc(e.service.ev), this.braintree = new Gc(e.service.braintree), this.card = new Fc(e.state.translate), this.buttons = document.createElement("div"), this.buttons.classList.add(Lt.buttons, Lt.hidden);
|
|
3951
3954
|
}
|
|
3952
3955
|
// init
|
|
3953
3956
|
init() {
|
|
@@ -4047,7 +4050,7 @@ class Gc {
|
|
|
4047
4050
|
authorization: ((t = e == null ? void 0 : e.brain_tree_info) == null ? void 0 : t.client_token) || "",
|
|
4048
4051
|
onError: () => this.events.error.emit(),
|
|
4049
4052
|
onCancel: () => this.events.cancel.emit(),
|
|
4050
|
-
onSuccess: (r) => this.events.success.emit({ nonce: r.nonce, type: "
|
|
4053
|
+
onSuccess: (r) => this.events.success.emit({ nonce: r.nonce, type: "venmo" })
|
|
4051
4054
|
});
|
|
4052
4055
|
} catch (r) {
|
|
4053
4056
|
console.error(r);
|
|
@@ -4073,7 +4076,7 @@ class Gc {
|
|
|
4073
4076
|
return this.initGoogle();
|
|
4074
4077
|
case "paypal":
|
|
4075
4078
|
return this.initPayPal();
|
|
4076
|
-
case "
|
|
4079
|
+
case "venmo":
|
|
4077
4080
|
return this.initBraintreeVenmo();
|
|
4078
4081
|
case "card":
|
|
4079
4082
|
return this.initCard();
|
|
@@ -4094,14 +4097,14 @@ class Gc {
|
|
|
4094
4097
|
}
|
|
4095
4098
|
// show button
|
|
4096
4099
|
showButton() {
|
|
4097
|
-
this.buttons.classList.remove(
|
|
4100
|
+
this.buttons.classList.remove(Lt.hidden);
|
|
4098
4101
|
}
|
|
4099
4102
|
// render
|
|
4100
4103
|
render() {
|
|
4101
4104
|
return this.buttons;
|
|
4102
4105
|
}
|
|
4103
4106
|
}
|
|
4104
|
-
class
|
|
4107
|
+
class Qc {
|
|
4105
4108
|
constructor() {
|
|
4106
4109
|
b(this, "template", `
|
|
4107
4110
|
<svg
|
|
@@ -4127,14 +4130,14 @@ class Yc {
|
|
|
4127
4130
|
return this.element;
|
|
4128
4131
|
}
|
|
4129
4132
|
}
|
|
4130
|
-
const
|
|
4131
|
-
button:
|
|
4133
|
+
const $c = "_button_125my_1", Zc = {
|
|
4134
|
+
button: $c
|
|
4132
4135
|
};
|
|
4133
|
-
class
|
|
4136
|
+
class Xc {
|
|
4134
4137
|
constructor() {
|
|
4135
4138
|
b(this, "element");
|
|
4136
|
-
b(this, "icon", new
|
|
4137
|
-
this.element = document.createElement("div"), this.element.classList.add(
|
|
4139
|
+
b(this, "icon", new Qc());
|
|
4140
|
+
this.element = document.createElement("div"), this.element.classList.add(Zc.button), this.element.appendChild(this.icon.render());
|
|
4138
4141
|
}
|
|
4139
4142
|
addEventListener(e) {
|
|
4140
4143
|
return this.element.addEventListener("click", e);
|
|
@@ -4143,14 +4146,14 @@ class Zc {
|
|
|
4143
4146
|
return this.element;
|
|
4144
4147
|
}
|
|
4145
4148
|
}
|
|
4146
|
-
const
|
|
4147
|
-
button:
|
|
4148
|
-
disabled:
|
|
4149
|
-
press:
|
|
4150
|
-
hidden:
|
|
4151
|
-
spinner:
|
|
4149
|
+
const Jc = "_button_rx9be_1", eu = "_disabled_rx9be_17", tu = "_press_rx9be_22", nu = "_hidden_rx9be_26", ru = "_spinner_rx9be_30", be = {
|
|
4150
|
+
button: Jc,
|
|
4151
|
+
disabled: eu,
|
|
4152
|
+
press: tu,
|
|
4153
|
+
hidden: nu,
|
|
4154
|
+
spinner: ru
|
|
4152
4155
|
};
|
|
4153
|
-
class
|
|
4156
|
+
class iu {
|
|
4154
4157
|
constructor(e) {
|
|
4155
4158
|
b(this, "element");
|
|
4156
4159
|
b(this, "spinner", new Aa());
|
|
@@ -4169,19 +4172,19 @@ class ru {
|
|
|
4169
4172
|
return this.element;
|
|
4170
4173
|
}
|
|
4171
4174
|
}
|
|
4172
|
-
const
|
|
4173
|
-
cardForm:
|
|
4174
|
-
hidden:
|
|
4175
|
-
},
|
|
4176
|
-
wrapper:
|
|
4177
|
-
inputContainer:
|
|
4178
|
-
input:
|
|
4179
|
-
errorInput:
|
|
4180
|
-
label:
|
|
4181
|
-
labelError:
|
|
4182
|
-
disabled:
|
|
4183
|
-
disabledInput:
|
|
4184
|
-
hidden:
|
|
4175
|
+
const au = "_cardForm_isqbi_1", su = "_hidden_isqbi_5", bt = {
|
|
4176
|
+
cardForm: au,
|
|
4177
|
+
hidden: su
|
|
4178
|
+
}, ou = "_wrapper_4knhb_1", lu = "_inputContainer_4knhb_5", cu = "_input_4knhb_5", uu = "_errorInput_4knhb_24", du = "_label_4knhb_28", pu = "_labelError_4knhb_32", hu = "_disabled_4knhb_36", mu = "_disabledInput_4knhb_40", fu = "_hidden_4knhb_47", ae = {
|
|
4179
|
+
wrapper: ou,
|
|
4180
|
+
inputContainer: lu,
|
|
4181
|
+
input: cu,
|
|
4182
|
+
errorInput: uu,
|
|
4183
|
+
label: du,
|
|
4184
|
+
labelError: pu,
|
|
4185
|
+
disabled: hu,
|
|
4186
|
+
disabledInput: mu,
|
|
4187
|
+
hidden: fu
|
|
4185
4188
|
};
|
|
4186
4189
|
class Cn {
|
|
4187
4190
|
constructor() {
|
|
@@ -4204,7 +4207,7 @@ class Cn {
|
|
|
4204
4207
|
return this.element;
|
|
4205
4208
|
}
|
|
4206
4209
|
}
|
|
4207
|
-
class
|
|
4210
|
+
class vu {
|
|
4208
4211
|
constructor(e) {
|
|
4209
4212
|
b(this, "id", "paynext-card-input-name");
|
|
4210
4213
|
b(this, "element");
|
|
@@ -4266,20 +4269,20 @@ class fu {
|
|
|
4266
4269
|
return this.toggleLabelError(r), this.isDisabled ? (this.inputContainer.classList.add(ae.disabled), this.input.classList.add(ae.disabledInput)) : (this.inputContainer.classList.remove(ae.disabled), this.input.classList.remove(ae.disabledInput)), this.element;
|
|
4267
4270
|
}
|
|
4268
4271
|
}
|
|
4269
|
-
const
|
|
4270
|
-
wrapper:
|
|
4271
|
-
inputContainer:
|
|
4272
|
-
input:
|
|
4273
|
-
endContent:
|
|
4274
|
-
errorInput:
|
|
4275
|
-
error:
|
|
4276
|
-
label:
|
|
4277
|
-
labelError:
|
|
4278
|
-
disabled:
|
|
4279
|
-
disabledInput:
|
|
4280
|
-
hidden:
|
|
4272
|
+
const gu = "_wrapper_j8wuo_1", yu = "_inputContainer_j8wuo_5", bu = "_input_j8wuo_5", Eu = "_endContent_j8wuo_20", _u = "_errorInput_j8wuo_24", Cu = "_error_j8wuo_24", Au = "_label_j8wuo_32", wu = "_labelError_j8wuo_36", Tu = "_disabled_j8wuo_40", Iu = "_disabledInput_j8wuo_44", Ou = "_hidden_j8wuo_51", ne = {
|
|
4273
|
+
wrapper: gu,
|
|
4274
|
+
inputContainer: yu,
|
|
4275
|
+
input: bu,
|
|
4276
|
+
endContent: Eu,
|
|
4277
|
+
errorInput: _u,
|
|
4278
|
+
error: Cu,
|
|
4279
|
+
label: Au,
|
|
4280
|
+
labelError: wu,
|
|
4281
|
+
disabled: Tu,
|
|
4282
|
+
disabledInput: Iu,
|
|
4283
|
+
hidden: Ou
|
|
4281
4284
|
};
|
|
4282
|
-
class
|
|
4285
|
+
class Nu {
|
|
4283
4286
|
constructor() {
|
|
4284
4287
|
b(this, "template", `
|
|
4285
4288
|
<svg
|
|
@@ -4317,7 +4320,7 @@ class Ou {
|
|
|
4317
4320
|
return this.element;
|
|
4318
4321
|
}
|
|
4319
4322
|
}
|
|
4320
|
-
class
|
|
4323
|
+
class xu {
|
|
4321
4324
|
constructor() {
|
|
4322
4325
|
b(this, "template", `
|
|
4323
4326
|
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16' class='${Z.svg}'>
|
|
@@ -4354,7 +4357,7 @@ class Nu {
|
|
|
4354
4357
|
return this.element;
|
|
4355
4358
|
}
|
|
4356
4359
|
}
|
|
4357
|
-
class
|
|
4360
|
+
class Lu {
|
|
4358
4361
|
constructor() {
|
|
4359
4362
|
b(this, "template", `
|
|
4360
4363
|
<svg
|
|
@@ -4404,7 +4407,7 @@ class xu {
|
|
|
4404
4407
|
return this.element;
|
|
4405
4408
|
}
|
|
4406
4409
|
}
|
|
4407
|
-
class
|
|
4410
|
+
class Pu {
|
|
4408
4411
|
constructor() {
|
|
4409
4412
|
b(this, "template", `
|
|
4410
4413
|
<svg
|
|
@@ -4459,7 +4462,7 @@ class Lu {
|
|
|
4459
4462
|
return this.element;
|
|
4460
4463
|
}
|
|
4461
4464
|
}
|
|
4462
|
-
class
|
|
4465
|
+
class Ru {
|
|
4463
4466
|
constructor() {
|
|
4464
4467
|
b(this, "template", `
|
|
4465
4468
|
<svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 23 16' width='23' class='${Z.svg}'>
|
|
@@ -4499,7 +4502,7 @@ class Pu {
|
|
|
4499
4502
|
return this.element;
|
|
4500
4503
|
}
|
|
4501
4504
|
}
|
|
4502
|
-
class
|
|
4505
|
+
class Su {
|
|
4503
4506
|
constructor() {
|
|
4504
4507
|
b(this, "template", `
|
|
4505
4508
|
<svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 24 16' width='24' class='${Z.svg}'>
|
|
@@ -4522,7 +4525,7 @@ class Ru {
|
|
|
4522
4525
|
return this.element;
|
|
4523
4526
|
}
|
|
4524
4527
|
}
|
|
4525
|
-
class
|
|
4528
|
+
class ku {
|
|
4526
4529
|
constructor() {
|
|
4527
4530
|
b(this, "template", `
|
|
4528
4531
|
<svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 24 16' width='24' class='${Z.svg}'>
|
|
@@ -4554,7 +4557,7 @@ class Su {
|
|
|
4554
4557
|
return this.element;
|
|
4555
4558
|
}
|
|
4556
4559
|
}
|
|
4557
|
-
class
|
|
4560
|
+
class Mu {
|
|
4558
4561
|
constructor() {
|
|
4559
4562
|
b(this, "template", `
|
|
4560
4563
|
<svg
|
|
@@ -4603,10 +4606,10 @@ class ku {
|
|
|
4603
4606
|
return this.element;
|
|
4604
4607
|
}
|
|
4605
4608
|
}
|
|
4606
|
-
class
|
|
4609
|
+
class Du {
|
|
4607
4610
|
constructor(e) {
|
|
4608
4611
|
b(this, "id", "paynext-card-input-number");
|
|
4609
|
-
b(this, "initialCardTypes",
|
|
4612
|
+
b(this, "initialCardTypes", wt.map((e) => e.type));
|
|
4610
4613
|
b(this, "element");
|
|
4611
4614
|
b(this, "inputContainer", document.createElement("div"));
|
|
4612
4615
|
b(this, "input", document.createElement("input"));
|
|
@@ -4615,14 +4618,14 @@ class Mu {
|
|
|
4615
4618
|
b(this, "labelError", document.createElement("span"));
|
|
4616
4619
|
b(this, "endContent", document.createElement("div"));
|
|
4617
4620
|
b(this, "error", document.createElement("p"));
|
|
4618
|
-
b(this, "unknownCard", new
|
|
4619
|
-
b(this, "amex", new
|
|
4620
|
-
b(this, "dinerClub", new
|
|
4621
|
-
b(this, "discover", new
|
|
4622
|
-
b(this, "jcb", new
|
|
4623
|
-
b(this, "masterCard", new
|
|
4624
|
-
b(this, "unionPay", new
|
|
4625
|
-
b(this, "visa", new
|
|
4621
|
+
b(this, "unknownCard", new Nu());
|
|
4622
|
+
b(this, "amex", new xu());
|
|
4623
|
+
b(this, "dinerClub", new Lu());
|
|
4624
|
+
b(this, "discover", new Pu());
|
|
4625
|
+
b(this, "jcb", new Ru());
|
|
4626
|
+
b(this, "masterCard", new Su());
|
|
4627
|
+
b(this, "unionPay", new ku());
|
|
4628
|
+
b(this, "visa", new Mu());
|
|
4626
4629
|
b(this, "supportedCardTypes", this.initialCardTypes);
|
|
4627
4630
|
b(this, "isTouchSubmit", !1);
|
|
4628
4631
|
b(this, "errorMessage", "");
|
|
@@ -4673,7 +4676,7 @@ class Mu {
|
|
|
4673
4676
|
});
|
|
4674
4677
|
}
|
|
4675
4678
|
getCardIcons() {
|
|
4676
|
-
return
|
|
4679
|
+
return wt.filter(({ type: e }) => this.supportedCardTypes.includes(e)).slice(0, 3).map(({ type: e }) => {
|
|
4677
4680
|
switch (e) {
|
|
4678
4681
|
case pe.Visa:
|
|
4679
4682
|
return this.visa.render();
|
|
@@ -4718,20 +4721,20 @@ class Mu {
|
|
|
4718
4721
|
return this.toggleLabelError(t), this.toggleErrorMessage(r), !t && !r ? (this.inputContainer.classList.remove(ne.errorInput), this.endContent.innerHTML = "", this.endContent.append(...this.getCardIcons())) : (this.endContent.innerHTML = "", this.endContent.appendChild(this.unknownCard.render())), this.isDisabled ? (this.inputContainer.classList.add(ne.disabled), this.input.classList.add(ne.disabledInput)) : (this.inputContainer.classList.remove(ne.disabled), this.input.classList.remove(ne.disabledInput)), this.element;
|
|
4719
4722
|
}
|
|
4720
4723
|
}
|
|
4721
|
-
const
|
|
4722
|
-
inputContainer:
|
|
4723
|
-
input:
|
|
4724
|
-
endContent:
|
|
4725
|
-
errorInput:
|
|
4726
|
-
error:
|
|
4727
|
-
label:
|
|
4728
|
-
labelError:
|
|
4729
|
-
disabled:
|
|
4730
|
-
disabledInput:
|
|
4731
|
-
hidden:
|
|
4732
|
-
securityContent:
|
|
4724
|
+
const Vu = "_inputContainer_1xdj3_5", Fu = "_input_1xdj3_5", Uu = "_endContent_1xdj3_20", Bu = "_errorInput_1xdj3_24", zu = "_error_1xdj3_24", ju = "_label_1xdj3_32", Ku = "_labelError_1xdj3_36", qu = "_disabled_1xdj3_40", Hu = "_disabledInput_1xdj3_44", Wu = "_hidden_1xdj3_51", Gu = "_securityContent_1xdj3_55", Y = {
|
|
4725
|
+
inputContainer: Vu,
|
|
4726
|
+
input: Fu,
|
|
4727
|
+
endContent: Uu,
|
|
4728
|
+
errorInput: Bu,
|
|
4729
|
+
error: zu,
|
|
4730
|
+
label: ju,
|
|
4731
|
+
labelError: Ku,
|
|
4732
|
+
disabled: qu,
|
|
4733
|
+
disabledInput: Hu,
|
|
4734
|
+
hidden: Wu,
|
|
4735
|
+
securityContent: Gu
|
|
4733
4736
|
};
|
|
4734
|
-
class
|
|
4737
|
+
class Yu {
|
|
4735
4738
|
constructor() {
|
|
4736
4739
|
b(this, "template", `
|
|
4737
4740
|
<svg class='${Z.svg}' focusable='false' viewBox='0 0 32 21' role='img' aria-label='CVC'>
|
|
@@ -4760,13 +4763,13 @@ class Gu {
|
|
|
4760
4763
|
return this.element;
|
|
4761
4764
|
}
|
|
4762
4765
|
}
|
|
4763
|
-
class
|
|
4766
|
+
class Qu {
|
|
4764
4767
|
constructor(e) {
|
|
4765
4768
|
b(this, "cvcId", "paynext-card-input-cvc");
|
|
4766
4769
|
b(this, "expiryId", "paynext-card-input-expiry");
|
|
4767
4770
|
b(this, "element");
|
|
4768
4771
|
b(this, "warning", new Cn());
|
|
4769
|
-
b(this, "cardCvc", new
|
|
4772
|
+
b(this, "cardCvc", new Yu());
|
|
4770
4773
|
b(this, "expiryInputContainer", document.createElement("div"));
|
|
4771
4774
|
b(this, "expiryInput", document.createElement("input"));
|
|
4772
4775
|
b(this, "expiryLabel", document.createElement("label"));
|
|
@@ -4942,9 +4945,9 @@ class Yu {
|
|
|
4942
4945
|
return this.toggleCvcLabelError(a), this.toggleCvcErrorMessage(s), !a && !s ? (this.cvcInputContainer.classList.remove(Y.errorInput), this.cvcEndContent.innerHTML = "", this.cvcEndContent.appendChild(this.cardCvc.render())) : (this.cvcEndContent.innerHTML = "", this.cvcEndContent.appendChild(this.warning.render())), this.isDisabled ? (this.expiryInputContainer.classList.add(Y.disabled), this.expiryInput.classList.add(Y.disabledInput), this.cvcInputContainer.classList.add(Y.disabled), this.cvcInput.classList.add(Y.disabledInput)) : (this.expiryInputContainer.classList.remove(Y.disabled), this.expiryInput.classList.remove(Y.disabledInput), this.cvcInputContainer.classList.remove(Y.disabled), this.cvcInput.classList.remove(Y.disabledInput)), this.element;
|
|
4943
4946
|
}
|
|
4944
4947
|
}
|
|
4945
|
-
const
|
|
4946
|
-
container:
|
|
4947
|
-
title:
|
|
4948
|
+
const $u = "_container_94v1h_1", Zu = "_title_94v1h_10", di = {
|
|
4949
|
+
container: $u,
|
|
4950
|
+
title: Zu
|
|
4948
4951
|
};
|
|
4949
4952
|
class Na {
|
|
4950
4953
|
constructor(e) {
|
|
@@ -4965,7 +4968,7 @@ class Na {
|
|
|
4965
4968
|
return this.element;
|
|
4966
4969
|
}
|
|
4967
4970
|
}
|
|
4968
|
-
class
|
|
4971
|
+
class Xu {
|
|
4969
4972
|
constructor(e, t) {
|
|
4970
4973
|
b(this, "element");
|
|
4971
4974
|
b(this, "error");
|
|
@@ -4978,7 +4981,7 @@ class Zu {
|
|
|
4978
4981
|
submit: new ce(),
|
|
4979
4982
|
close: new ce()
|
|
4980
4983
|
});
|
|
4981
|
-
this.element = document.createElement("form"), this.error = new Na(e), this.submit = new
|
|
4984
|
+
this.element = document.createElement("form"), this.error = new Na(e), this.submit = new iu(e), this.back = new Xc(), this.number = new Du(e), this.name = new vu(e), this.cardSecurity = new Qu(e), this.error.addClassName(bt.hidden), this.element.classList.add(bt.cardForm, t || ""), this.element.append(
|
|
4982
4985
|
this.back.render(),
|
|
4983
4986
|
this.number.render(),
|
|
4984
4987
|
this.cardSecurity.render(),
|
|
@@ -5011,16 +5014,16 @@ class Zu {
|
|
|
5011
5014
|
return e && t && r;
|
|
5012
5015
|
}
|
|
5013
5016
|
showError() {
|
|
5014
|
-
this.error.removeClassName(
|
|
5017
|
+
this.error.removeClassName(bt.hidden);
|
|
5015
5018
|
}
|
|
5016
5019
|
hideError() {
|
|
5017
|
-
this.error.addClassName(
|
|
5020
|
+
this.error.addClassName(bt.hidden);
|
|
5018
5021
|
}
|
|
5019
5022
|
render() {
|
|
5020
5023
|
return this.element;
|
|
5021
5024
|
}
|
|
5022
5025
|
}
|
|
5023
|
-
class
|
|
5026
|
+
class Ju {
|
|
5024
5027
|
constructor() {
|
|
5025
5028
|
b(this, "template", `
|
|
5026
5029
|
<svg
|
|
@@ -5047,15 +5050,15 @@ class Xu {
|
|
|
5047
5050
|
return this.element;
|
|
5048
5051
|
}
|
|
5049
5052
|
}
|
|
5050
|
-
const
|
|
5051
|
-
container:
|
|
5052
|
-
title:
|
|
5053
|
+
const ed = "_container_hoha1_1", td = "_title_hoha1_5", pi = {
|
|
5054
|
+
container: ed,
|
|
5055
|
+
title: td
|
|
5053
5056
|
};
|
|
5054
|
-
class
|
|
5057
|
+
class nd {
|
|
5055
5058
|
constructor(e) {
|
|
5056
5059
|
b(this, "element");
|
|
5057
5060
|
b(this, "message", document.createElement("p"));
|
|
5058
|
-
b(this, "icon", new
|
|
5061
|
+
b(this, "icon", new Ju());
|
|
5059
5062
|
this.translate = e, this.element = document.createElement("div"), this.element.classList.add(pi.container), this.message.classList.add(pi.title), this.message.textContent = e.messages().status.success, this.element.append(this.icon.render(), this.message), this.translate.subscribe(({ messages: t }) => {
|
|
5060
5063
|
this.message.textContent = t.status.success;
|
|
5061
5064
|
});
|
|
@@ -5070,7 +5073,7 @@ class td {
|
|
|
5070
5073
|
return this.element;
|
|
5071
5074
|
}
|
|
5072
5075
|
}
|
|
5073
|
-
class
|
|
5076
|
+
class rd {
|
|
5074
5077
|
constructor(e) {
|
|
5075
5078
|
b(this, "isLoading", !1);
|
|
5076
5079
|
b(this, "isFormOpen", !1);
|
|
@@ -5081,7 +5084,7 @@ class nd {
|
|
|
5081
5084
|
b(this, "success");
|
|
5082
5085
|
b(this, "buttons");
|
|
5083
5086
|
b(this, "form");
|
|
5084
|
-
this.config = e, this.buttons = new
|
|
5087
|
+
this.config = e, this.buttons = new Yc(e), this.form = new Xu(e.state.translate, le.hidden), this.error = new Na(e.state.translate), this.success = new nd(e.state.translate), this.error.addClassName(le.hidden), this.success.addClassName(le.hidden), this.container.append(this.loader.render(), this.buttons.render(), this.form.render()), this.checkout = document.createElement("div"), this.checkout.classList.add(le.checkout), this.checkout.append(this.container, this.error.render(), this.success.render());
|
|
5085
5088
|
}
|
|
5086
5089
|
// init
|
|
5087
5090
|
init() {
|
|
@@ -5103,8 +5106,8 @@ class nd {
|
|
|
5103
5106
|
case "paypal":
|
|
5104
5107
|
return this.handleSuccess({ clientSession: t, paypal: { billing_agreement_token: e } });
|
|
5105
5108
|
// TODO: add braintree
|
|
5106
|
-
case "
|
|
5107
|
-
return console.log("-----
|
|
5109
|
+
case "venmo":
|
|
5110
|
+
return console.log("----- venmo success data", e), this.handleSuccess({ clientSession: t, braintree: { nonce: e } });
|
|
5108
5111
|
}
|
|
5109
5112
|
}), this.form.addEventListener("close", () => j(this, null, function* () {
|
|
5110
5113
|
this.isLoading || (this.hideError(), yield se(this.form.element, Pe.close, Pe.transition), this.form.element.classList.add(le.hidden), this.buttons.buttons.classList.add(le.btnsInitial), this.buttons.buttons.classList.remove(le.hidden), yield se(this.buttons.buttons, gt.open, gt.transition), this.isFormOpen = !1);
|
|
@@ -5162,7 +5165,7 @@ class nd {
|
|
|
5162
5165
|
}
|
|
5163
5166
|
this.showSuccess(), (i = t.onCheckoutComplete) == null || i.call(t, a), this.setLoading(!1);
|
|
5164
5167
|
} catch (a) {
|
|
5165
|
-
|
|
5168
|
+
this.handleError(a);
|
|
5166
5169
|
}
|
|
5167
5170
|
});
|
|
5168
5171
|
}
|
|
@@ -5189,10 +5192,10 @@ class nd {
|
|
|
5189
5192
|
return this.checkout;
|
|
5190
5193
|
}
|
|
5191
5194
|
}
|
|
5192
|
-
class
|
|
5195
|
+
class id {
|
|
5193
5196
|
constructor(e) {
|
|
5194
5197
|
b(this, "component");
|
|
5195
|
-
this.config = e, this.component = new
|
|
5198
|
+
this.config = e, this.component = new rd(e);
|
|
5196
5199
|
}
|
|
5197
5200
|
// init
|
|
5198
5201
|
init() {
|
|
@@ -5217,7 +5220,7 @@ class rd {
|
|
|
5217
5220
|
});
|
|
5218
5221
|
}
|
|
5219
5222
|
}
|
|
5220
|
-
class
|
|
5223
|
+
class Tt {
|
|
5221
5224
|
constructor(e) {
|
|
5222
5225
|
b(this, "initialState");
|
|
5223
5226
|
b(this, "state");
|
|
@@ -5237,22 +5240,22 @@ class It {
|
|
|
5237
5240
|
return this.observer.addListener(e);
|
|
5238
5241
|
}
|
|
5239
5242
|
}
|
|
5240
|
-
const
|
|
5243
|
+
const ad = {
|
|
5241
5244
|
clientToken: "",
|
|
5242
5245
|
environment: "sandbox"
|
|
5243
5246
|
};
|
|
5244
|
-
class
|
|
5247
|
+
class sd extends Tt {
|
|
5245
5248
|
constructor(e) {
|
|
5246
|
-
super(e ||
|
|
5249
|
+
super(e || ad);
|
|
5247
5250
|
}
|
|
5248
5251
|
}
|
|
5249
|
-
const
|
|
5250
|
-
class
|
|
5252
|
+
const od = {};
|
|
5253
|
+
class ld extends Tt {
|
|
5251
5254
|
constructor(e) {
|
|
5252
|
-
super(e ||
|
|
5255
|
+
super(e || od);
|
|
5253
5256
|
}
|
|
5254
5257
|
}
|
|
5255
|
-
class
|
|
5258
|
+
class cd extends Tt {
|
|
5256
5259
|
constructor(t) {
|
|
5257
5260
|
super(t || null);
|
|
5258
5261
|
b(this, "clientToken", "");
|
|
@@ -5267,7 +5270,7 @@ class ld extends It {
|
|
|
5267
5270
|
});
|
|
5268
5271
|
}
|
|
5269
5272
|
}
|
|
5270
|
-
const
|
|
5273
|
+
const ud = {
|
|
5271
5274
|
card: {
|
|
5272
5275
|
title: "طريقة الدفع",
|
|
5273
5276
|
number: {
|
|
@@ -5317,7 +5320,7 @@ const cd = {
|
|
|
5317
5320
|
success: "تمت عملية الدفع الخاصة بك بنجاح!",
|
|
5318
5321
|
error: "لم نتمكن من التحقق من طريقة الدفع الخاصة بك. يرجى اختيار طريقة دفع أخرى وإعادة المحاولة."
|
|
5319
5322
|
}
|
|
5320
|
-
},
|
|
5323
|
+
}, dd = {
|
|
5321
5324
|
card: {
|
|
5322
5325
|
title: "Метод на плащане",
|
|
5323
5326
|
number: {
|
|
@@ -5367,7 +5370,7 @@ const cd = {
|
|
|
5367
5370
|
success: "Успех",
|
|
5368
5371
|
error: "Не можем да удостоверим автентичността на вашия метод на плащане. Моля, изберете друг метод на плащане и опитайте отново."
|
|
5369
5372
|
}
|
|
5370
|
-
},
|
|
5373
|
+
}, pd = {
|
|
5371
5374
|
card: {
|
|
5372
5375
|
title: "Způsob platby",
|
|
5373
5376
|
number: {
|
|
@@ -5417,7 +5420,7 @@ const cd = {
|
|
|
5417
5420
|
success: "Úspěch",
|
|
5418
5421
|
error: "Váš způsob platby se nám nedaří ověřit. Zvolte prosím jiný způsob platby a zkuste to znovu."
|
|
5419
5422
|
}
|
|
5420
|
-
},
|
|
5423
|
+
}, hd = {
|
|
5421
5424
|
card: {
|
|
5422
5425
|
title: "Betalingsmetode",
|
|
5423
5426
|
number: {
|
|
@@ -5467,7 +5470,7 @@ const cd = {
|
|
|
5467
5470
|
success: "Succes",
|
|
5468
5471
|
error: "Vi kan ikke godkende din betalingsmetode. Vælg venligst en anden betalingsmetode og prøv igen."
|
|
5469
5472
|
}
|
|
5470
|
-
},
|
|
5473
|
+
}, md = {
|
|
5471
5474
|
card: {
|
|
5472
5475
|
title: "Zahlungsmethode",
|
|
5473
5476
|
number: {
|
|
@@ -5517,7 +5520,7 @@ const cd = {
|
|
|
5517
5520
|
success: "Erfolg",
|
|
5518
5521
|
error: "Wir können Ihre Zahlungsmethode nicht authentifizieren. Bitte wählen Sie eine andere Zahlungsmethode und versuchen Sie es erneut."
|
|
5519
5522
|
}
|
|
5520
|
-
},
|
|
5523
|
+
}, fd = {
|
|
5521
5524
|
card: {
|
|
5522
5525
|
title: "Μέθοδος πληρωμής",
|
|
5523
5526
|
number: {
|
|
@@ -5567,7 +5570,7 @@ const cd = {
|
|
|
5567
5570
|
success: "Επιτυχία",
|
|
5568
5571
|
error: "Δεν μπορούμε να πιστοποιήσουμε τη μέθοδο πληρωμής σας. Παρακαλούμε επιλέξτε μια διαφορετική μέθοδο πληρωμής και προσπαθήστε ξανά."
|
|
5569
5572
|
}
|
|
5570
|
-
},
|
|
5573
|
+
}, vd = {
|
|
5571
5574
|
card: {
|
|
5572
5575
|
title: "Payment method",
|
|
5573
5576
|
number: {
|
|
@@ -5617,7 +5620,7 @@ const cd = {
|
|
|
5617
5620
|
success: "Your payment was successful!",
|
|
5618
5621
|
error: "We are unable to authenticate your payment method. Please choose a different payment method and try again."
|
|
5619
5622
|
}
|
|
5620
|
-
},
|
|
5623
|
+
}, gd = {
|
|
5621
5624
|
card: {
|
|
5622
5625
|
title: "Método de pago",
|
|
5623
5626
|
number: {
|
|
@@ -5667,7 +5670,7 @@ const cd = {
|
|
|
5667
5670
|
success: "Éxito",
|
|
5668
5671
|
error: "No podemos autenticar su método de pago. Elija otro método de pago e inténtelo de nuevo."
|
|
5669
5672
|
}
|
|
5670
|
-
},
|
|
5673
|
+
}, yd = {
|
|
5671
5674
|
card: {
|
|
5672
5675
|
title: "Makseviis",
|
|
5673
5676
|
number: {
|
|
@@ -5717,7 +5720,7 @@ const cd = {
|
|
|
5717
5720
|
success: "Edu",
|
|
5718
5721
|
error: "Me ei suuda teie makseviisi autentida. Palun valige teine makseviis ja proovige uuesti."
|
|
5719
5722
|
}
|
|
5720
|
-
},
|
|
5723
|
+
}, bd = {
|
|
5721
5724
|
card: {
|
|
5722
5725
|
title: "Maksutapa",
|
|
5723
5726
|
number: {
|
|
@@ -5767,7 +5770,7 @@ const cd = {
|
|
|
5767
5770
|
success: "Menestys",
|
|
5768
5771
|
error: "Emme pysty todentamaan maksutapaasi. Valitse toinen maksutapa ja yritä uudelleen."
|
|
5769
5772
|
}
|
|
5770
|
-
},
|
|
5773
|
+
}, Ed = {
|
|
5771
5774
|
card: {
|
|
5772
5775
|
title: "Paraan ng pagbabayad",
|
|
5773
5776
|
number: {
|
|
@@ -5817,7 +5820,7 @@ const cd = {
|
|
|
5817
5820
|
success: "Tagumpay",
|
|
5818
5821
|
error: "Hindi namin ma-authenticate ang iyong paraan ng pagbabayad. Mangyaring pumili ng ibang paraan ng pagbabayad at subukang muli."
|
|
5819
5822
|
}
|
|
5820
|
-
},
|
|
5823
|
+
}, _d = {
|
|
5821
5824
|
card: {
|
|
5822
5825
|
title: "Moyen de paiement",
|
|
5823
5826
|
number: {
|
|
@@ -5867,7 +5870,7 @@ const cd = {
|
|
|
5867
5870
|
success: "Succès",
|
|
5868
5871
|
error: "Nous ne sommes pas en mesure d'authentifier votre méthode de paiement. Veuillez choisir un autre mode de paiement et réessayer."
|
|
5869
5872
|
}
|
|
5870
|
-
},
|
|
5873
|
+
}, Cd = {
|
|
5871
5874
|
card: {
|
|
5872
5875
|
title: "Način plaćanja",
|
|
5873
5876
|
number: {
|
|
@@ -5917,7 +5920,7 @@ const cd = {
|
|
|
5917
5920
|
success: "Uspjeh",
|
|
5918
5921
|
error: "Ne možemo provjeriti autentičnost vašeg načina plaćanja. Odaberite drugi način plaćanja i pokušajte ponovno."
|
|
5919
5922
|
}
|
|
5920
|
-
},
|
|
5923
|
+
}, Ad = {
|
|
5921
5924
|
card: {
|
|
5922
5925
|
title: "Fizetési mód",
|
|
5923
5926
|
number: {
|
|
@@ -5967,7 +5970,7 @@ const cd = {
|
|
|
5967
5970
|
success: "Siker",
|
|
5968
5971
|
error: "Nem tudjuk hitelesíteni a fizetési módját. Kérjük, válasszon másik fizetési módot, és próbálja meg újra."
|
|
5969
5972
|
}
|
|
5970
|
-
},
|
|
5973
|
+
}, wd = {
|
|
5971
5974
|
card: {
|
|
5972
5975
|
title: "Metode pembayaran",
|
|
5973
5976
|
number: {
|
|
@@ -6017,7 +6020,7 @@ const cd = {
|
|
|
6017
6020
|
success: "Sukses",
|
|
6018
6021
|
error: "Kami tidak dapat mengautentikasi metode pembayaran Anda. Silakan pilih metode pembayaran lain dan coba lagi."
|
|
6019
6022
|
}
|
|
6020
|
-
},
|
|
6023
|
+
}, Td = {
|
|
6021
6024
|
card: {
|
|
6022
6025
|
title: "Modalità di pagamento",
|
|
6023
6026
|
number: {
|
|
@@ -6067,7 +6070,7 @@ const cd = {
|
|
|
6067
6070
|
success: "Il successo",
|
|
6068
6071
|
error: "Non siamo in grado di autenticare il suo metodo di pagamento. Scegliere un altro metodo di pagamento e riprovare."
|
|
6069
6072
|
}
|
|
6070
|
-
},
|
|
6073
|
+
}, Id = {
|
|
6071
6074
|
card: {
|
|
6072
6075
|
title: "支払い方法",
|
|
6073
6076
|
number: {
|
|
@@ -6117,7 +6120,7 @@ const cd = {
|
|
|
6117
6120
|
success: "成功",
|
|
6118
6121
|
error: "お客様のお支払い方法を認証できません。別のお支払い方法を選択し、再度お試しください。"
|
|
6119
6122
|
}
|
|
6120
|
-
},
|
|
6123
|
+
}, Od = {
|
|
6121
6124
|
card: {
|
|
6122
6125
|
title: "결제 방식",
|
|
6123
6126
|
number: {
|
|
@@ -6167,7 +6170,7 @@ const cd = {
|
|
|
6167
6170
|
success: "성공",
|
|
6168
6171
|
error: "결제 방법을 인증할 수 없습니다. 다른 결제 방법을 선택하고 다시 시도해 주세요."
|
|
6169
6172
|
}
|
|
6170
|
-
},
|
|
6173
|
+
}, Nd = {
|
|
6171
6174
|
card: {
|
|
6172
6175
|
title: "Mokėjimo būdas",
|
|
6173
6176
|
number: {
|
|
@@ -6217,7 +6220,7 @@ const cd = {
|
|
|
6217
6220
|
success: "Sėkmė",
|
|
6218
6221
|
error: "Negalime patvirtinti jūsų mokėjimo būdo. Pasirinkite kitą mokėjimo būdą ir bandykite dar kartą."
|
|
6219
6222
|
}
|
|
6220
|
-
},
|
|
6223
|
+
}, xd = {
|
|
6221
6224
|
card: {
|
|
6222
6225
|
title: "Maksājumu veids",
|
|
6223
6226
|
number: {
|
|
@@ -6267,7 +6270,7 @@ const cd = {
|
|
|
6267
6270
|
success: "Panākumi",
|
|
6268
6271
|
error: "Mēs nevaram pārbaudīt jūsu maksājuma metodes autentiskumu. Lūdzu, izvēlieties citu maksājumu metodi un mēģiniet vēlreiz."
|
|
6269
6272
|
}
|
|
6270
|
-
},
|
|
6273
|
+
}, Ld = {
|
|
6271
6274
|
card: {
|
|
6272
6275
|
title: "Kaedah pembayaran",
|
|
6273
6276
|
number: {
|
|
@@ -6317,7 +6320,7 @@ const cd = {
|
|
|
6317
6320
|
success: "Kejayaan",
|
|
6318
6321
|
error: "Kami tidak dapat mengesahkan kaedah pembayaran anda. Sila pilih kaedah pembayaran lain dan cuba lagi."
|
|
6319
6322
|
}
|
|
6320
|
-
},
|
|
6323
|
+
}, Pd = {
|
|
6321
6324
|
card: {
|
|
6322
6325
|
title: "Metodu tal-ħlas",
|
|
6323
6326
|
number: {
|
|
@@ -6367,7 +6370,7 @@ const cd = {
|
|
|
6367
6370
|
success: "Suċċess",
|
|
6368
6371
|
error: "Aħna ma nistgħux jawtentikaw il-metodu tal-ħlas tiegħek. Jekk jogħġbok agħżel metodu ta' ħlas differenti u erġa' pprova."
|
|
6369
6372
|
}
|
|
6370
|
-
},
|
|
6373
|
+
}, Rd = {
|
|
6371
6374
|
card: {
|
|
6372
6375
|
title: "Betalingsmetode",
|
|
6373
6376
|
number: {
|
|
@@ -6417,7 +6420,7 @@ const cd = {
|
|
|
6417
6420
|
success: "Suksess",
|
|
6418
6421
|
error: "Vi kan ikke godkjenne betalingsmåten din. Vennligst velg en annen betalingsmetode og prøv på nytt."
|
|
6419
6422
|
}
|
|
6420
|
-
},
|
|
6423
|
+
}, Sd = {
|
|
6421
6424
|
card: {
|
|
6422
6425
|
title: "Betaalmethode",
|
|
6423
6426
|
number: {
|
|
@@ -6467,7 +6470,7 @@ const cd = {
|
|
|
6467
6470
|
success: "Succes",
|
|
6468
6471
|
error: "We kunnen je betaalmethode niet verifiëren. Kies een andere betaalmethode en probeer het opnieuw."
|
|
6469
6472
|
}
|
|
6470
|
-
},
|
|
6473
|
+
}, kd = {
|
|
6471
6474
|
card: {
|
|
6472
6475
|
title: "Metoda płatności",
|
|
6473
6476
|
number: {
|
|
@@ -6517,7 +6520,7 @@ const cd = {
|
|
|
6517
6520
|
success: "Sukces",
|
|
6518
6521
|
error: "Nie możemy uwierzytelnić metody płatności. Wybierz inną metodę płatności i spróbuj ponownie."
|
|
6519
6522
|
}
|
|
6520
|
-
},
|
|
6523
|
+
}, Md = {
|
|
6521
6524
|
card: {
|
|
6522
6525
|
title: "Forma de pagamento",
|
|
6523
6526
|
number: {
|
|
@@ -6567,7 +6570,7 @@ const cd = {
|
|
|
6567
6570
|
success: "Sucesso",
|
|
6568
6571
|
error: "Não foi possível autenticar o seu método de pagamento. Selecione outro método de pagamento e tente novamente."
|
|
6569
6572
|
}
|
|
6570
|
-
},
|
|
6573
|
+
}, Dd = {
|
|
6571
6574
|
card: {
|
|
6572
6575
|
title: "Metoda de plată",
|
|
6573
6576
|
number: {
|
|
@@ -6617,7 +6620,7 @@ const cd = {
|
|
|
6617
6620
|
success: "Succes",
|
|
6618
6621
|
error: "Nu putem să vă autentificăm metoda de plată. Vă rugăm să alegeți o altă metodă de plată și să încercați din nou."
|
|
6619
6622
|
}
|
|
6620
|
-
},
|
|
6623
|
+
}, Vd = {
|
|
6621
6624
|
card: {
|
|
6622
6625
|
title: "Метод оплаты",
|
|
6623
6626
|
number: {
|
|
@@ -6667,7 +6670,7 @@ const cd = {
|
|
|
6667
6670
|
success: "Успех",
|
|
6668
6671
|
error: "Мы не можем проверить подлинность вашего способа оплаты. Пожалуйста, выберите другой способ оплаты и повторите попытку."
|
|
6669
6672
|
}
|
|
6670
|
-
},
|
|
6673
|
+
}, Fd = {
|
|
6671
6674
|
card: {
|
|
6672
6675
|
title: "Spôsob platby",
|
|
6673
6676
|
number: {
|
|
@@ -6717,7 +6720,7 @@ const cd = {
|
|
|
6717
6720
|
success: "Úspech",
|
|
6718
6721
|
error: "Nemôžeme overiť váš spôsob platby. Vyberte si iný spôsob platby a skúste to znova."
|
|
6719
6722
|
}
|
|
6720
|
-
},
|
|
6723
|
+
}, Ud = {
|
|
6721
6724
|
card: {
|
|
6722
6725
|
title: "Način plačila",
|
|
6723
6726
|
number: {
|
|
@@ -6767,7 +6770,7 @@ const cd = {
|
|
|
6767
6770
|
success: "Uspeh",
|
|
6768
6771
|
error: "Vašega načina plačila ne moremo preveriti. Izberite drug način plačila in poskusite znova."
|
|
6769
6772
|
}
|
|
6770
|
-
},
|
|
6773
|
+
}, Bd = {
|
|
6771
6774
|
card: {
|
|
6772
6775
|
title: "Betalningsmetod",
|
|
6773
6776
|
number: {
|
|
@@ -6817,7 +6820,7 @@ const cd = {
|
|
|
6817
6820
|
success: "Framgång",
|
|
6818
6821
|
error: "Vi kan inte verifiera din betalningsmetod. Vänligen välj en annan betalningsmetod och försök igen."
|
|
6819
6822
|
}
|
|
6820
|
-
},
|
|
6823
|
+
}, zd = {
|
|
6821
6824
|
card: {
|
|
6822
6825
|
title: "วิธีการชำระเงิน",
|
|
6823
6826
|
number: {
|
|
@@ -6867,7 +6870,7 @@ const cd = {
|
|
|
6867
6870
|
success: "ความสำเร็จ",
|
|
6868
6871
|
error: "เราไม่สามารถตรวจสอบวิธีการชำระเงินของคุณได้ โปรดเลือกวิธีการชำระเงินอื่นแล้วลองอีกครั้ง"
|
|
6869
6872
|
}
|
|
6870
|
-
},
|
|
6873
|
+
}, jd = {
|
|
6871
6874
|
card: {
|
|
6872
6875
|
title: "Ödeme yöntemi",
|
|
6873
6876
|
number: {
|
|
@@ -6917,7 +6920,7 @@ const cd = {
|
|
|
6917
6920
|
success: "Başarı",
|
|
6918
6921
|
error: "Ödeme yönteminizi doğrulayamıyoruz. Lütfen farklı bir ödeme yöntemi seçin ve tekrar deneyin."
|
|
6919
6922
|
}
|
|
6920
|
-
},
|
|
6923
|
+
}, Kd = {
|
|
6921
6924
|
card: {
|
|
6922
6925
|
title: "Phương thức thanh toán",
|
|
6923
6926
|
number: {
|
|
@@ -6967,7 +6970,7 @@ const cd = {
|
|
|
6967
6970
|
success: "Thành công",
|
|
6968
6971
|
error: "Chúng tôi không thể xác thực phương thức thanh toán của bạn. Vui lòng chọn phương thức thanh toán khác và thử lại."
|
|
6969
6972
|
}
|
|
6970
|
-
},
|
|
6973
|
+
}, qd = {
|
|
6971
6974
|
card: {
|
|
6972
6975
|
title: "支付方式",
|
|
6973
6976
|
number: {
|
|
@@ -7018,41 +7021,41 @@ const cd = {
|
|
|
7018
7021
|
error: "我们无法验证您的付款方式。请选择其他付款方式并重试。"
|
|
7019
7022
|
}
|
|
7020
7023
|
}, Jt = {
|
|
7021
|
-
ar:
|
|
7022
|
-
en:
|
|
7023
|
-
bg:
|
|
7024
|
-
cs:
|
|
7025
|
-
da:
|
|
7026
|
-
de:
|
|
7027
|
-
el:
|
|
7028
|
-
es:
|
|
7029
|
-
et:
|
|
7030
|
-
fi:
|
|
7031
|
-
fil:
|
|
7032
|
-
fr:
|
|
7033
|
-
hr:
|
|
7034
|
-
hu:
|
|
7035
|
-
id:
|
|
7036
|
-
it:
|
|
7037
|
-
ja:
|
|
7038
|
-
ko:
|
|
7039
|
-
lt:
|
|
7040
|
-
lv:
|
|
7041
|
-
ms:
|
|
7042
|
-
ru:
|
|
7043
|
-
mt:
|
|
7044
|
-
nb:
|
|
7045
|
-
nl:
|
|
7046
|
-
pl:
|
|
7047
|
-
pt:
|
|
7048
|
-
ro:
|
|
7049
|
-
sk:
|
|
7050
|
-
sl:
|
|
7051
|
-
sv:
|
|
7052
|
-
th:
|
|
7053
|
-
tr:
|
|
7054
|
-
vi:
|
|
7055
|
-
zh:
|
|
7024
|
+
ar: ud,
|
|
7025
|
+
en: vd,
|
|
7026
|
+
bg: dd,
|
|
7027
|
+
cs: pd,
|
|
7028
|
+
da: hd,
|
|
7029
|
+
de: md,
|
|
7030
|
+
el: fd,
|
|
7031
|
+
es: gd,
|
|
7032
|
+
et: yd,
|
|
7033
|
+
fi: bd,
|
|
7034
|
+
fil: Ed,
|
|
7035
|
+
fr: _d,
|
|
7036
|
+
hr: Cd,
|
|
7037
|
+
hu: Ad,
|
|
7038
|
+
id: wd,
|
|
7039
|
+
it: Td,
|
|
7040
|
+
ja: Id,
|
|
7041
|
+
ko: Od,
|
|
7042
|
+
lt: Nd,
|
|
7043
|
+
lv: xd,
|
|
7044
|
+
ms: Ld,
|
|
7045
|
+
ru: Vd,
|
|
7046
|
+
mt: Pd,
|
|
7047
|
+
nb: Rd,
|
|
7048
|
+
nl: Sd,
|
|
7049
|
+
pl: kd,
|
|
7050
|
+
pt: Md,
|
|
7051
|
+
ro: Dd,
|
|
7052
|
+
sk: Fd,
|
|
7053
|
+
sl: Ud,
|
|
7054
|
+
sv: Bd,
|
|
7055
|
+
th: zd,
|
|
7056
|
+
tr: jd,
|
|
7057
|
+
vi: Kd,
|
|
7058
|
+
zh: qd
|
|
7056
7059
|
}, en = () => {
|
|
7057
7060
|
const n = navigator == null ? void 0 : navigator.language.split("-")[0];
|
|
7058
7061
|
return Jt[n] || Jt.en;
|
|
@@ -7112,7 +7115,7 @@ const cd = {
|
|
|
7112
7115
|
}
|
|
7113
7116
|
};
|
|
7114
7117
|
};
|
|
7115
|
-
class
|
|
7118
|
+
class Hd extends Tt {
|
|
7116
7119
|
constructor() {
|
|
7117
7120
|
super({
|
|
7118
7121
|
messages: en(),
|
|
@@ -7159,7 +7162,7 @@ class qd extends It {
|
|
|
7159
7162
|
* See the License for the specific language governing permissions and
|
|
7160
7163
|
* limitations under the License.
|
|
7161
7164
|
*/
|
|
7162
|
-
function
|
|
7165
|
+
function Wd(n, e) {
|
|
7163
7166
|
var t = {};
|
|
7164
7167
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && e.indexOf(r) < 0 && (t[r] = n[r]);
|
|
7165
7168
|
if (n != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -7167,7 +7170,7 @@ function Hd(n, e) {
|
|
|
7167
7170
|
e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(n, r[i]) && (t[r[i]] = n[r[i]]);
|
|
7168
7171
|
return t;
|
|
7169
7172
|
}
|
|
7170
|
-
function
|
|
7173
|
+
function Gd(n, e) {
|
|
7171
7174
|
var t = document.querySelector('script[src="'.concat(n, '"]'));
|
|
7172
7175
|
if (t === null)
|
|
7173
7176
|
return null;
|
|
@@ -7179,38 +7182,38 @@ function Wd(n, e) {
|
|
|
7179
7182
|
i.dataset[s] !== r.dataset[s] && (a = !1);
|
|
7180
7183
|
}), a ? t : null;
|
|
7181
7184
|
}
|
|
7182
|
-
function
|
|
7185
|
+
function Yd(n) {
|
|
7183
7186
|
var e = n.url, t = n.attributes, r = n.onSuccess, i = n.onError, a = xa(e, t);
|
|
7184
7187
|
a.onerror = i, a.onload = r, document.head.insertBefore(a, document.head.firstElementChild);
|
|
7185
7188
|
}
|
|
7186
|
-
function
|
|
7187
|
-
var e = n.sdkBaseUrl, t = n.environment, r =
|
|
7189
|
+
function Qd(n) {
|
|
7190
|
+
var e = n.sdkBaseUrl, t = n.environment, r = Wd(n, ["sdkBaseUrl", "environment"]), i = e || Xd(t), a = r, s = Object.keys(a).filter(function(c) {
|
|
7188
7191
|
return typeof a[c] != "undefined" && a[c] !== null && a[c] !== "";
|
|
7189
7192
|
}).reduce(function(c, u) {
|
|
7190
7193
|
var d = a[u].toString();
|
|
7191
|
-
return u =
|
|
7194
|
+
return u = $d(u), u.substring(0, 4) === "data" || u === "crossorigin" ? c.attributes[u] = d : c.queryParams[u] = d, c;
|
|
7192
7195
|
}, {
|
|
7193
7196
|
queryParams: {},
|
|
7194
7197
|
attributes: {}
|
|
7195
7198
|
}), o = s.queryParams, l = s.attributes;
|
|
7196
7199
|
return o["merchant-id"] && o["merchant-id"].indexOf(",") !== -1 && (l["data-merchant-id"] = o["merchant-id"], o["merchant-id"] = "*"), {
|
|
7197
|
-
url: "".concat(i, "?").concat(
|
|
7200
|
+
url: "".concat(i, "?").concat(Zd(o)),
|
|
7198
7201
|
attributes: l
|
|
7199
7202
|
};
|
|
7200
7203
|
}
|
|
7201
|
-
function
|
|
7204
|
+
function $d(n) {
|
|
7202
7205
|
var e = function(t, r) {
|
|
7203
7206
|
return (r ? "-" : "") + t.toLowerCase();
|
|
7204
7207
|
};
|
|
7205
7208
|
return n.replace(/[A-Z]+(?![a-z])|[A-Z]/g, e);
|
|
7206
7209
|
}
|
|
7207
|
-
function
|
|
7210
|
+
function Zd(n) {
|
|
7208
7211
|
var e = "";
|
|
7209
7212
|
return Object.keys(n).forEach(function(t) {
|
|
7210
7213
|
e.length !== 0 && (e += "&"), e += t + "=" + n[t];
|
|
7211
7214
|
}), e;
|
|
7212
7215
|
}
|
|
7213
|
-
function
|
|
7216
|
+
function Xd(n) {
|
|
7214
7217
|
return n === "sandbox" ? "https://www.sandbox.paypal.com/sdk/js" : "https://www.paypal.com/sdk/js";
|
|
7215
7218
|
}
|
|
7216
7219
|
function xa(n, e) {
|
|
@@ -7220,11 +7223,11 @@ function xa(n, e) {
|
|
|
7220
7223
|
t.setAttribute(r, e[r]), r === "data-csp-nonce" && t.setAttribute("nonce", e["data-csp-nonce"]);
|
|
7221
7224
|
}), t;
|
|
7222
7225
|
}
|
|
7223
|
-
function
|
|
7226
|
+
function Jd(n, e) {
|
|
7224
7227
|
if (e === void 0 && (e = Promise), La(n, e), typeof document == "undefined")
|
|
7225
7228
|
return e.resolve(null);
|
|
7226
|
-
var t =
|
|
7227
|
-
return i["data-js-sdk-library"] || (i["data-js-sdk-library"] = "paypal-js"),
|
|
7229
|
+
var t = Qd(n), r = t.url, i = t.attributes, a = i["data-namespace"] || "paypal", s = mi(a);
|
|
7230
|
+
return i["data-js-sdk-library"] || (i["data-js-sdk-library"] = "paypal-js"), Gd(r, i) && s ? e.resolve(s) : ep({
|
|
7228
7231
|
url: r,
|
|
7229
7232
|
attributes: i
|
|
7230
7233
|
}, e).then(function() {
|
|
@@ -7234,7 +7237,7 @@ function Xd(n, e) {
|
|
|
7234
7237
|
throw new Error("The window.".concat(a, " global variable is not available."));
|
|
7235
7238
|
});
|
|
7236
7239
|
}
|
|
7237
|
-
function
|
|
7240
|
+
function ep(n, e) {
|
|
7238
7241
|
e === void 0 && (e = Promise), La(n, e);
|
|
7239
7242
|
var t = n.url, r = n.attributes;
|
|
7240
7243
|
if (typeof t != "string" || t.length === 0)
|
|
@@ -7244,7 +7247,7 @@ function Jd(n, e) {
|
|
|
7244
7247
|
return new e(function(i, a) {
|
|
7245
7248
|
if (typeof document == "undefined")
|
|
7246
7249
|
return i();
|
|
7247
|
-
|
|
7250
|
+
Yd({
|
|
7248
7251
|
url: t,
|
|
7249
7252
|
attributes: r,
|
|
7250
7253
|
onSuccess: function() {
|
|
@@ -7269,13 +7272,13 @@ function La(n, e) {
|
|
|
7269
7272
|
if (typeof e != "undefined" && typeof e != "function")
|
|
7270
7273
|
throw new Error("Expected PromisePonyfill to be a function.");
|
|
7271
7274
|
}
|
|
7272
|
-
const
|
|
7275
|
+
const tp = {
|
|
7273
7276
|
layout: "vertical",
|
|
7274
7277
|
tagline: !1,
|
|
7275
7278
|
height: 40,
|
|
7276
7279
|
borderRadius: 12
|
|
7277
7280
|
};
|
|
7278
|
-
class
|
|
7281
|
+
class np {
|
|
7279
7282
|
constructor() {
|
|
7280
7283
|
b(this, "paypal", null);
|
|
7281
7284
|
}
|
|
@@ -7283,7 +7286,7 @@ class tp {
|
|
|
7283
7286
|
init(e) {
|
|
7284
7287
|
return j(this, null, function* () {
|
|
7285
7288
|
try {
|
|
7286
|
-
this.paypal = yield
|
|
7289
|
+
this.paypal = yield Jd(e);
|
|
7287
7290
|
} catch (t) {
|
|
7288
7291
|
console.error("failed to load the PayPal JS SDK script", t);
|
|
7289
7292
|
}
|
|
@@ -7295,7 +7298,7 @@ class tp {
|
|
|
7295
7298
|
var r, i;
|
|
7296
7299
|
this.paypal && (yield (i = (r = this.paypal).Buttons) == null ? void 0 : i.call(r, $({
|
|
7297
7300
|
fundingSource: "paypal",
|
|
7298
|
-
style:
|
|
7301
|
+
style: tp
|
|
7299
7302
|
}, t)).render(e));
|
|
7300
7303
|
});
|
|
7301
7304
|
}
|
|
@@ -7304,7 +7307,7 @@ function Te(n) {
|
|
|
7304
7307
|
throw new Error('Could not dynamically require "' + n + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
7305
7308
|
}
|
|
7306
7309
|
var Dt = { exports: {} }, fi;
|
|
7307
|
-
function
|
|
7310
|
+
function rp() {
|
|
7308
7311
|
return fi || (fi = 1, function(n, e) {
|
|
7309
7312
|
(function(t) {
|
|
7310
7313
|
n.exports = t();
|
|
@@ -8978,10 +8981,10 @@ function np() {
|
|
|
8978
8981
|
});
|
|
8979
8982
|
}(Dt)), Dt.exports;
|
|
8980
8983
|
}
|
|
8981
|
-
var
|
|
8982
|
-
const
|
|
8984
|
+
var ip = rp();
|
|
8985
|
+
const ap = /* @__PURE__ */ wa(ip);
|
|
8983
8986
|
var Vt = { exports: {} }, vi;
|
|
8984
|
-
function
|
|
8987
|
+
function sp() {
|
|
8985
8988
|
return vi || (vi = 1, function(n, e) {
|
|
8986
8989
|
(function(t) {
|
|
8987
8990
|
n.exports = t();
|
|
@@ -11874,9 +11877,9 @@ function ap() {
|
|
|
11874
11877
|
});
|
|
11875
11878
|
}(Vt)), Vt.exports;
|
|
11876
11879
|
}
|
|
11877
|
-
var
|
|
11878
|
-
const
|
|
11879
|
-
class
|
|
11880
|
+
var op = sp();
|
|
11881
|
+
const lp = /* @__PURE__ */ wa(op);
|
|
11882
|
+
class cp {
|
|
11880
11883
|
constructor() {
|
|
11881
11884
|
b(this, "client", null);
|
|
11882
11885
|
b(this, "venmoInstance", null);
|
|
@@ -11885,7 +11888,7 @@ class lp {
|
|
|
11885
11888
|
init(e) {
|
|
11886
11889
|
return j(this, null, function* () {
|
|
11887
11890
|
try {
|
|
11888
|
-
this.client = yield
|
|
11891
|
+
this.client = yield ap.create({ authorization: e.authorization });
|
|
11889
11892
|
} catch (t) {
|
|
11890
11893
|
throw console.error("Failed to initialize Braintree client:", t), t;
|
|
11891
11894
|
}
|
|
@@ -11897,14 +11900,13 @@ class lp {
|
|
|
11897
11900
|
if (!this.client)
|
|
11898
11901
|
throw new Error("Braintree client must be initialized before creating Venmo instance");
|
|
11899
11902
|
try {
|
|
11900
|
-
|
|
11903
|
+
return this.venmoInstance = yield lp.create($({
|
|
11901
11904
|
client: this.client,
|
|
11902
11905
|
allowDesktop: !0,
|
|
11906
|
+
mobileWebFallBack: !0,
|
|
11903
11907
|
allowDesktopWebLogin: !0,
|
|
11904
|
-
paymentMethodUsage: "multi_use"
|
|
11905
|
-
|
|
11906
|
-
}, e);
|
|
11907
|
-
return this.venmoInstance = yield op.create(t), this.venmoInstance;
|
|
11908
|
+
paymentMethodUsage: "multi_use"
|
|
11909
|
+
}, e)), this.venmoInstance;
|
|
11908
11910
|
} catch (t) {
|
|
11909
11911
|
throw console.error("Failed to create Venmo instance:", t), t;
|
|
11910
11912
|
}
|
|
@@ -11926,33 +11928,25 @@ class lp {
|
|
|
11926
11928
|
if (!this.venmoInstance)
|
|
11927
11929
|
throw new Error("Venmo instance not initialized");
|
|
11928
11930
|
return new Promise((e, t) => {
|
|
11929
|
-
this.venmoInstance.tokenize(
|
|
11931
|
+
this.venmoInstance.tokenize(void 0, (r, i) => {
|
|
11930
11932
|
r ? t(r) : e(i);
|
|
11931
11933
|
});
|
|
11932
11934
|
});
|
|
11933
11935
|
});
|
|
11934
11936
|
}
|
|
11935
|
-
// get client instance
|
|
11936
|
-
getClient() {
|
|
11937
|
-
return this.client;
|
|
11938
|
-
}
|
|
11939
|
-
// get venmo instance
|
|
11940
|
-
getVenmoInstance() {
|
|
11941
|
-
return this.venmoInstance;
|
|
11942
|
-
}
|
|
11943
11937
|
}
|
|
11944
|
-
class
|
|
11938
|
+
class up {
|
|
11945
11939
|
constructor() {
|
|
11946
11940
|
b(this, "ev", new Ua());
|
|
11947
|
-
b(this, "paypal", new
|
|
11948
|
-
b(this, "braintree", new
|
|
11941
|
+
b(this, "paypal", new np());
|
|
11942
|
+
b(this, "braintree", new cp());
|
|
11949
11943
|
b(this, "state", {
|
|
11950
|
-
translate: new
|
|
11951
|
-
checkout: new
|
|
11952
|
-
transaction: new
|
|
11953
|
-
styles: new
|
|
11944
|
+
translate: new Hd(),
|
|
11945
|
+
checkout: new sd(),
|
|
11946
|
+
transaction: new cd(),
|
|
11947
|
+
styles: new ld()
|
|
11954
11948
|
});
|
|
11955
|
-
b(this, "checkout", new
|
|
11949
|
+
b(this, "checkout", new id({
|
|
11956
11950
|
state: this.state,
|
|
11957
11951
|
// ToDo: add braintree
|
|
11958
11952
|
service: { ev: this.ev, paypal: this.paypal, braintree: this.braintree }
|
|
@@ -11962,10 +11956,10 @@ class cp {
|
|
|
11962
11956
|
Object.values(this.state).forEach((e) => e.clearState());
|
|
11963
11957
|
}
|
|
11964
11958
|
}
|
|
11965
|
-
class
|
|
11959
|
+
class mp {
|
|
11966
11960
|
constructor(e) {
|
|
11967
11961
|
b(this, "parent");
|
|
11968
|
-
b(this, "core", new
|
|
11962
|
+
b(this, "core", new up());
|
|
11969
11963
|
this.parent = e;
|
|
11970
11964
|
}
|
|
11971
11965
|
mount(e) {
|
|
@@ -11981,7 +11975,7 @@ class hp {
|
|
|
11981
11975
|
}
|
|
11982
11976
|
}
|
|
11983
11977
|
export {
|
|
11984
|
-
|
|
11985
|
-
|
|
11978
|
+
up as Core,
|
|
11979
|
+
mp as PayNextCheckout
|
|
11986
11980
|
};
|
|
11987
11981
|
//# sourceMappingURL=index.es.js.map
|