@paynext/sdk 0.0.127 → 0.0.128
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 +600 -642
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +18 -18
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
var
|
|
1
|
+
var kr = Object.defineProperty, Er = Object.defineProperties;
|
|
2
2
|
var xr = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var
|
|
3
|
+
var st = Object.getOwnPropertySymbols;
|
|
4
4
|
var yn = Object.prototype.hasOwnProperty, Cn = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var xt = (n, e, t) => e in n ?
|
|
5
|
+
var xt = (n, e, t) => e in n ? kr(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, y = (n, e) => {
|
|
6
6
|
for (var t in e || (e = {}))
|
|
7
7
|
yn.call(e, t) && xt(n, t, e[t]);
|
|
8
|
-
if (
|
|
9
|
-
for (var t of
|
|
8
|
+
if (st)
|
|
9
|
+
for (var t of st(e))
|
|
10
10
|
Cn.call(e, t) && xt(n, t, e[t]);
|
|
11
11
|
return n;
|
|
12
|
-
}, M = (n, e) =>
|
|
12
|
+
}, M = (n, e) => Er(n, xr(e));
|
|
13
13
|
var ae = (n, e) => {
|
|
14
14
|
var t = {};
|
|
15
15
|
for (var i in n)
|
|
16
16
|
yn.call(n, i) && e.indexOf(i) < 0 && (t[i] = n[i]);
|
|
17
|
-
if (n != null &&
|
|
18
|
-
for (var i of
|
|
17
|
+
if (n != null && st)
|
|
18
|
+
for (var i of st(n))
|
|
19
19
|
e.indexOf(i) < 0 && Cn.call(n, i) && (t[i] = n[i]);
|
|
20
20
|
return t;
|
|
21
21
|
};
|
|
22
22
|
var c = (n, e, t) => xt(n, typeof e != "symbol" ? e + "" : e, t);
|
|
23
|
-
var
|
|
23
|
+
var E = (n, e, t) => new Promise((i, r) => {
|
|
24
24
|
var a = (l) => {
|
|
25
25
|
try {
|
|
26
26
|
o(t.next(l));
|
|
@@ -44,7 +44,7 @@ class iu {
|
|
|
44
44
|
typeof window != "undefined" && (this.parent = e);
|
|
45
45
|
}
|
|
46
46
|
mount(e) {
|
|
47
|
-
return
|
|
47
|
+
return E(this, null, function* () {
|
|
48
48
|
if (!this.parent)
|
|
49
49
|
return;
|
|
50
50
|
if (!this.core) {
|
|
@@ -62,13 +62,13 @@ class iu {
|
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
64
|
unmount() {
|
|
65
|
-
return
|
|
65
|
+
return E(this, null, function* () {
|
|
66
66
|
!this.parent || !this.core || (this.parent.innerHTML = "", this.core.clearState());
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
var
|
|
71
|
-
const
|
|
70
|
+
var T = /* @__PURE__ */ ((n) => (n.PAYPAL = "PAYPAL", n.APPLE_PAY = "APPLEPAY", n.GOOGLE_PAY = "GPAY", n.CARD = "CARD", n.VENMO = "VENMO", n))(T || {}), Pt = /* @__PURE__ */ ((n) => (n.PENDING = "PENDING", n.FAILED = "FAILED", n.AUTHORIZED = "AUTHORIZED", n.SETTLING = "SETTLING", n.SETTLED = "SETTLED", n.DECLINED = "DECLINED", n.CANCELLED = "CANCELLED", n))(Pt || {}), Dt = /* @__PURE__ */ ((n) => (n.INSUFFICIENT_FUNDS = "insufficient_funds", n.AUTHENTICATION_REQUIRED = "authentication_required", n.CARD_ISSUER_DECLINE = "card_issuer_decline", n.GENERIC_DECLINE = "generic_decline", n.WITHDRAWAL_LIMIT_EXCEEDED = "withdrawal_limit_exceeded", n.DO_NOT_HONOR = "do_not_honor", n.EXPIRED_CARD = "expired_card", n.SUSPECTED_FRAUD = "suspected_fraud", n.INCORRECT_CVC = "incorrect_cvc", n.INVALID_CARD_NUMBER = "invalid_card_number", n.ISSUER_UNAVAILABLE = "issuer_unavailable", n.CARD_LOST_OR_STOLEN = "card_lost_or_stolen", n.CARD_DECLINED = "card_declined", n))(Dt || {});
|
|
71
|
+
const kn = {
|
|
72
72
|
appIds: {
|
|
73
73
|
develop: "app_00b96c0c3011",
|
|
74
74
|
staging: "app_00396c84ac2b",
|
|
@@ -83,26 +83,26 @@ const En = {
|
|
|
83
83
|
production: "https://api.paynext.com"
|
|
84
84
|
})[n], Tr = [
|
|
85
85
|
{
|
|
86
|
-
type:
|
|
86
|
+
type: T.PAYPAL,
|
|
87
87
|
order: 1,
|
|
88
88
|
is_active: !0
|
|
89
89
|
},
|
|
90
90
|
{
|
|
91
|
-
type:
|
|
91
|
+
type: T.APPLE_PAY,
|
|
92
92
|
order: 2,
|
|
93
93
|
is_active: !0
|
|
94
94
|
},
|
|
95
95
|
{
|
|
96
|
-
type:
|
|
96
|
+
type: T.GOOGLE_PAY,
|
|
97
97
|
order: 3,
|
|
98
98
|
is_active: !0
|
|
99
99
|
},
|
|
100
100
|
{
|
|
101
|
-
type:
|
|
101
|
+
type: T.CARD,
|
|
102
102
|
order: 4,
|
|
103
103
|
is_active: !0
|
|
104
104
|
}
|
|
105
|
-
],
|
|
105
|
+
], _r = (n) => n.googlePay ? T.GOOGLE_PAY : n.applePay ? T.APPLE_PAY : n.paypal ? T.PAYPAL : n.braintree ? T.VENMO : T.CARD, Ar = (n) => {
|
|
106
106
|
const e = n.card;
|
|
107
107
|
if (e)
|
|
108
108
|
return {
|
|
@@ -121,7 +121,7 @@ const En = {
|
|
|
121
121
|
last4: e.lastFourDigits,
|
|
122
122
|
number: e.number
|
|
123
123
|
};
|
|
124
|
-
},
|
|
124
|
+
}, Lr = (n) => {
|
|
125
125
|
var t;
|
|
126
126
|
const e = n.paypal;
|
|
127
127
|
if ((t = e == null ? void 0 : e.billing_agreement_token) != null && t.paypalId)
|
|
@@ -129,16 +129,16 @@ const En = {
|
|
|
129
129
|
billing_agreement_token: e.billing_agreement_token.paypalId
|
|
130
130
|
};
|
|
131
131
|
}, Vr = (n) => {
|
|
132
|
-
var t, i, r, a, s, o, l, u, d, h, m, p, g, b, v,
|
|
132
|
+
var t, i, r, a, s, o, l, u, d, h, m, p, g, b, v, k, L, w;
|
|
133
133
|
const e = n.googlePay;
|
|
134
134
|
if (e != null && e.token)
|
|
135
135
|
return {
|
|
136
136
|
cryptogram: e.cryptogram,
|
|
137
137
|
eci: e.eci,
|
|
138
138
|
exp_month: (i = (t = e.card) == null ? void 0 : t.expiry) != null && i.month || (a = (r = e.token) == null ? void 0 : r.expiry) != null && a.month ? Number(((o = (s = e.card) == null ? void 0 : s.expiry) == null ? void 0 : o.month) || ((u = (l = e.token) == null ? void 0 : l.expiry) == null ? void 0 : u.month)) : void 0,
|
|
139
|
-
exp_year: (h = (d = e.card) == null ? void 0 : d.expiry) != null && h.year || (p = (m = e.token) == null ? void 0 : m.expiry) != null && p.year ? Number(((b = (g = e.card) == null ? void 0 : g.expiry) == null ? void 0 : b.year) || ((
|
|
140
|
-
token: (
|
|
141
|
-
token_service_provider: (
|
|
139
|
+
exp_year: (h = (d = e.card) == null ? void 0 : d.expiry) != null && h.year || (p = (m = e.token) == null ? void 0 : m.expiry) != null && p.year ? Number(((b = (g = e.card) == null ? void 0 : g.expiry) == null ? void 0 : b.year) || ((k = (v = e.token) == null ? void 0 : v.expiry) == null ? void 0 : k.year)) : void 0,
|
|
140
|
+
token: (L = e.token) == null ? void 0 : L.number,
|
|
141
|
+
token_service_provider: (w = e.token) == null ? void 0 : w.tokenServiceProvider
|
|
142
142
|
};
|
|
143
143
|
}, Ir = (n) => {
|
|
144
144
|
var t, i, r, a, s, o;
|
|
@@ -158,7 +158,7 @@ const En = {
|
|
|
158
158
|
return {
|
|
159
159
|
payment_method_nonce: e.nonce
|
|
160
160
|
};
|
|
161
|
-
},
|
|
161
|
+
}, En = (n) => {
|
|
162
162
|
var i, r, a, s, o, l, u, d, h, m, p, g, b, v;
|
|
163
163
|
const { applePay: e, googlePay: t } = n;
|
|
164
164
|
if (!(!e && !t))
|
|
@@ -171,7 +171,7 @@ const En = {
|
|
|
171
171
|
state: ((b = e == null ? void 0 : e.billingContact) == null ? void 0 : b.administrativeArea) || ((v = t == null ? void 0 : t.billingAddress) == null ? void 0 : v.administrativeArea) || void 0
|
|
172
172
|
};
|
|
173
173
|
}, xn = (n) => {
|
|
174
|
-
var r, a, s, o, l, u, d, h, m, p, g, b, v,
|
|
174
|
+
var r, a, s, o, l, u, d, h, m, p, g, b, v, k, L, w, I, _, D, C, x, R, O;
|
|
175
175
|
const { card: e, googlePay: t, applePay: i } = n;
|
|
176
176
|
if (!(!e && !(t != null && t.card) && !(i != null && i.card)))
|
|
177
177
|
return {
|
|
@@ -185,10 +185,10 @@ const En = {
|
|
|
185
185
|
type: (e == null ? void 0 : e.type) || ((g = t == null ? void 0 : t.card) == null ? void 0 : g.segment) || ((b = i == null ? void 0 : i.card) == null ? void 0 : b.segment)
|
|
186
186
|
},
|
|
187
187
|
cvc: e == null ? void 0 : e.cvc,
|
|
188
|
-
exp_month: e != null && e.expMonth || (
|
|
189
|
-
exp_year: e != null && e.expYear || (
|
|
190
|
-
last4: (e == null ? void 0 : e.lastFourDigits) || ((x = t == null ? void 0 : t.card) == null ? void 0 : x.lastFour) || ((
|
|
191
|
-
number: (e == null ? void 0 : e.number) || ((
|
|
188
|
+
exp_month: e != null && e.expMonth || (k = (v = t == null ? void 0 : t.card) == null ? void 0 : v.expiry) != null && k.month ? Number((e == null ? void 0 : e.expMonth) || ((w = (L = t == null ? void 0 : t.card) == null ? void 0 : L.expiry) == null ? void 0 : w.month)) : void 0,
|
|
189
|
+
exp_year: e != null && e.expYear || (_ = (I = t == null ? void 0 : t.card) == null ? void 0 : I.expiry) != null && _.year ? Number((e == null ? void 0 : e.expYear) || ((C = (D = t == null ? void 0 : t.card) == null ? void 0 : D.expiry) == null ? void 0 : C.year)) : void 0,
|
|
190
|
+
last4: (e == null ? void 0 : e.lastFourDigits) || ((x = t == null ? void 0 : t.card) == null ? void 0 : x.lastFour) || ((R = i == null ? void 0 : i.card) == null ? void 0 : R.lastFour),
|
|
191
|
+
number: (e == null ? void 0 : e.number) || ((O = t == null ? void 0 : t.card) == null ? void 0 : O.number)
|
|
192
192
|
};
|
|
193
193
|
}, wn = (n) => {
|
|
194
194
|
var i, r;
|
|
@@ -196,45 +196,45 @@ const En = {
|
|
|
196
196
|
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;
|
|
197
197
|
}, Pr = (n) => {
|
|
198
198
|
var i, r, a, s, o, l, u, d;
|
|
199
|
-
const e =
|
|
199
|
+
const e = _r(n), t = {
|
|
200
200
|
client_session: n.clientSession,
|
|
201
201
|
three_ds_session_id: n.threeDsSessionId,
|
|
202
202
|
type: e
|
|
203
203
|
};
|
|
204
204
|
switch (e) {
|
|
205
|
-
case
|
|
205
|
+
case T.CARD:
|
|
206
206
|
return M(y({}, t), {
|
|
207
207
|
name: wn(n),
|
|
208
|
-
card:
|
|
208
|
+
card: Ar(n)
|
|
209
209
|
});
|
|
210
|
-
case
|
|
210
|
+
case T.PAYPAL:
|
|
211
211
|
return M(y({}, t), {
|
|
212
|
-
paypal:
|
|
212
|
+
paypal: Lr(n)
|
|
213
213
|
});
|
|
214
|
-
case
|
|
214
|
+
case T.GOOGLE_PAY:
|
|
215
215
|
return M(y({}, t), {
|
|
216
216
|
name: (r = (i = n.googlePay) == null ? void 0 : i.billingAddress) == null ? void 0 : r.name,
|
|
217
217
|
phone: (l = (o = (s = (a = n.googlePay) == null ? void 0 : a.billingAddress) == null ? void 0 : s.phoneNumber) == null ? void 0 : o.replace(/ /g, "")) == null ? void 0 : l.replace(/-/g, ""),
|
|
218
218
|
card: xn(n),
|
|
219
219
|
google_pay: Vr(n),
|
|
220
|
-
billing_address:
|
|
220
|
+
billing_address: En(n)
|
|
221
221
|
});
|
|
222
|
-
case
|
|
222
|
+
case T.APPLE_PAY:
|
|
223
223
|
return M(y({}, t), {
|
|
224
224
|
name: wn(n),
|
|
225
225
|
card: xn(n),
|
|
226
226
|
apple_pay: Ir(n),
|
|
227
227
|
phone: (d = (u = n.applePay) == null ? void 0 : u.shippingContact) == null ? void 0 : d.phoneNumber,
|
|
228
|
-
billing_address:
|
|
228
|
+
billing_address: En(n)
|
|
229
229
|
});
|
|
230
|
-
case
|
|
230
|
+
case T.VENMO:
|
|
231
231
|
return M(y({}, t), {
|
|
232
232
|
venmo: Mr(n)
|
|
233
233
|
});
|
|
234
234
|
default:
|
|
235
235
|
throw new Error(`Unsupported payment method: ${e}`);
|
|
236
236
|
}
|
|
237
|
-
}, Dr = (n, e, t) =>
|
|
237
|
+
}, Dr = (n, e, t) => E(void 0, null, function* () {
|
|
238
238
|
const i = `${Xt(e)}/payments/create`, r = new Headers();
|
|
239
239
|
r.append("Content-Type", "application/json"), r.append("X-API-Version", t);
|
|
240
240
|
const a = Pr(n);
|
|
@@ -243,14 +243,14 @@ const En = {
|
|
|
243
243
|
headers: r,
|
|
244
244
|
body: JSON.stringify(a)
|
|
245
245
|
})).json();
|
|
246
|
-
}),
|
|
246
|
+
}), Rr = (n, e, t) => E(void 0, null, function* () {
|
|
247
247
|
const i = `${Xt(e)}/payments/create/billing/agreement`, r = new Headers();
|
|
248
248
|
return r.append("Content-Type", "application/json"), r.append("X-API-Version", t), (yield (yield fetch(i, {
|
|
249
249
|
method: "POST",
|
|
250
250
|
headers: r,
|
|
251
251
|
body: JSON.stringify({ client_session: n })
|
|
252
252
|
})).json()).paypal_agreement_token_response.token_id || "";
|
|
253
|
-
}),
|
|
253
|
+
}), Or = (n, e, t) => E(void 0, null, function* () {
|
|
254
254
|
const i = new Headers();
|
|
255
255
|
i.append("X-API-Version", t);
|
|
256
256
|
const r = `${Xt(e)}/payments/config?client_session_id=${n}`, s = yield (yield fetch(r, { headers: i })).json();
|
|
@@ -265,7 +265,7 @@ let Nr = class {
|
|
|
265
265
|
this.ev = e;
|
|
266
266
|
}
|
|
267
267
|
init(u, d) {
|
|
268
|
-
return
|
|
268
|
+
return E(this, arguments, function* ({
|
|
269
269
|
transaction: e,
|
|
270
270
|
locale: t,
|
|
271
271
|
// supportedCardTypes,
|
|
@@ -289,9 +289,9 @@ let Nr = class {
|
|
|
289
289
|
allowedCardNetworks: ["visa", "masterCard"],
|
|
290
290
|
requestBillingAddress: !0,
|
|
291
291
|
requestPayerDetails: ["name", "email", "phone"],
|
|
292
|
-
process: (g, b) =>
|
|
292
|
+
process: (g, b) => E(this, [g, b], function* (m, { fail: p }) {
|
|
293
293
|
o == null || o({
|
|
294
|
-
paymentMethod:
|
|
294
|
+
paymentMethod: T.APPLE_PAY
|
|
295
295
|
});
|
|
296
296
|
try {
|
|
297
297
|
a == null || a(m);
|
|
@@ -305,7 +305,7 @@ let Nr = class {
|
|
|
305
305
|
});
|
|
306
306
|
}
|
|
307
307
|
render(e) {
|
|
308
|
-
return
|
|
308
|
+
return E(this, null, function* () {
|
|
309
309
|
var t;
|
|
310
310
|
if (!(!this.apple || !this.isAvailable)) {
|
|
311
311
|
e.innerHTML = "";
|
|
@@ -323,7 +323,7 @@ let Nr = class {
|
|
|
323
323
|
this.ev = e;
|
|
324
324
|
}
|
|
325
325
|
init(u, d) {
|
|
326
|
-
return
|
|
326
|
+
return E(this, arguments, function* ({ transaction: e, locale: t, onReady: i, onError: r, onSuccess: a, onCancel: s, onPaymentAttempt: o }, l) {
|
|
327
327
|
const h = this.ev.transactions.create(e);
|
|
328
328
|
this.google = this.ev.ui.googlePay(h, M(y({
|
|
329
329
|
locale: t,
|
|
@@ -340,9 +340,9 @@ let Nr = class {
|
|
|
340
340
|
allowedAuthMethods: ["PAN_ONLY", "CRYPTOGRAM_3DS"],
|
|
341
341
|
// ToDo: Temporary we have only Visa and Master card
|
|
342
342
|
allowedCardNetworks: ["VISA", "MASTERCARD"],
|
|
343
|
-
process: (g, b) =>
|
|
343
|
+
process: (g, b) => E(this, [g, b], function* (m, { fail: p }) {
|
|
344
344
|
o == null || o({
|
|
345
|
-
paymentMethod:
|
|
345
|
+
paymentMethod: T.GOOGLE_PAY
|
|
346
346
|
});
|
|
347
347
|
try {
|
|
348
348
|
a == null || a(m);
|
|
@@ -356,12 +356,12 @@ let Nr = class {
|
|
|
356
356
|
});
|
|
357
357
|
}
|
|
358
358
|
render(e) {
|
|
359
|
-
return
|
|
359
|
+
return E(this, null, function* () {
|
|
360
360
|
this.google && (e.innerHTML = "", this.google.mount(e));
|
|
361
361
|
});
|
|
362
362
|
}
|
|
363
363
|
};
|
|
364
|
-
class
|
|
364
|
+
class q {
|
|
365
365
|
constructor() {
|
|
366
366
|
c(this, "listeners", []);
|
|
367
367
|
}
|
|
@@ -385,12 +385,12 @@ class Fr {
|
|
|
385
385
|
this.ev = e;
|
|
386
386
|
}
|
|
387
387
|
init(a) {
|
|
388
|
-
return
|
|
388
|
+
return E(this, arguments, function* ({ threeDsId: e, onReady: t, onSuccess: i, onError: r }) {
|
|
389
389
|
this.threeDs = this.ev.ui.threeDSecure(e), this.threeDs.on("ready", () => t == null ? void 0 : t()), this.threeDs.on("success", () => i == null ? void 0 : i()), this.threeDs.on("failure", () => r == null ? void 0 : r()), this.threeDs.on("error", () => r == null ? void 0 : r());
|
|
390
390
|
});
|
|
391
391
|
}
|
|
392
392
|
render(e) {
|
|
393
|
-
return
|
|
393
|
+
return E(this, null, function* () {
|
|
394
394
|
this.threeDs && this.threeDs.mount(e);
|
|
395
395
|
});
|
|
396
396
|
}
|
|
@@ -403,7 +403,7 @@ class jr {
|
|
|
403
403
|
c(this, "google", null);
|
|
404
404
|
c(this, "threeDs", null);
|
|
405
405
|
c(this, "events", {
|
|
406
|
-
ready: new
|
|
406
|
+
ready: new q()
|
|
407
407
|
});
|
|
408
408
|
}
|
|
409
409
|
// is should load
|
|
@@ -413,7 +413,7 @@ class jr {
|
|
|
413
413
|
}
|
|
414
414
|
// preload evervault
|
|
415
415
|
preloadEvervault(e) {
|
|
416
|
-
return
|
|
416
|
+
return E(this, null, function* () {
|
|
417
417
|
if (!this.isShouldLoad(e)) return;
|
|
418
418
|
if (typeof window == "undefined")
|
|
419
419
|
throw new Error("Evervault can only be initialized in browser environment");
|
|
@@ -424,27 +424,27 @@ class jr {
|
|
|
424
424
|
}
|
|
425
425
|
// init ev
|
|
426
426
|
initEv(e) {
|
|
427
|
-
return
|
|
427
|
+
return E(this, null, function* () {
|
|
428
428
|
this.ev || (yield this.preloadEvervault(e)), this.apple = new Nr(this.ev), this.google = new Sr(this.ev), this.events.ready.emit(), this.isReady = !0;
|
|
429
429
|
});
|
|
430
430
|
}
|
|
431
431
|
// init three ds
|
|
432
432
|
initThreeDs(e) {
|
|
433
|
-
return
|
|
433
|
+
return E(this, null, function* () {
|
|
434
434
|
if (!this.ev) throw new Error("Evervault should be init before using Three DS Secure");
|
|
435
435
|
this.threeDs = new Fr(this.ev), yield this.threeDs.init(e), yield this.threeDs.render();
|
|
436
436
|
});
|
|
437
437
|
}
|
|
438
438
|
// init apple
|
|
439
439
|
initApple(e, t) {
|
|
440
|
-
return
|
|
440
|
+
return E(this, null, function* () {
|
|
441
441
|
if (!this.apple) throw new Error("Evervault should be init before using Apple Pay");
|
|
442
442
|
yield this.apple.init(e, t);
|
|
443
443
|
});
|
|
444
444
|
}
|
|
445
445
|
// init google
|
|
446
446
|
initGoogle(e, t) {
|
|
447
|
-
return
|
|
447
|
+
return E(this, null, function* () {
|
|
448
448
|
if (!this.google) throw new Error("Evervault should be init before using Google Pay");
|
|
449
449
|
yield this.google.init(e, t);
|
|
450
450
|
});
|
|
@@ -460,14 +460,14 @@ class jr {
|
|
|
460
460
|
}
|
|
461
461
|
// render apple
|
|
462
462
|
renderApple(e) {
|
|
463
|
-
return
|
|
463
|
+
return E(this, null, function* () {
|
|
464
464
|
var t;
|
|
465
465
|
return (t = this.apple) == null ? void 0 : t.render(e);
|
|
466
466
|
});
|
|
467
467
|
}
|
|
468
468
|
// render google
|
|
469
469
|
renderGoogle(e) {
|
|
470
|
-
return
|
|
470
|
+
return E(this, null, function* () {
|
|
471
471
|
var t;
|
|
472
472
|
return (t = this.google) == null ? void 0 : t.render(e);
|
|
473
473
|
});
|
|
@@ -503,7 +503,7 @@ function Tn(n, e, t, i) {
|
|
|
503
503
|
var r;
|
|
504
504
|
return typeof e == "number" ? e : e.startsWith("-") || e.startsWith("+") ? Math.max(0, n + parseFloat(e)) : e === "<" ? t : (r = i.get(e)) != null ? r : n;
|
|
505
505
|
}
|
|
506
|
-
const
|
|
506
|
+
const tt = (n, e, t) => n + (e - n) * t, $r = (n, e, t) => {
|
|
507
507
|
const i = e - n;
|
|
508
508
|
return ((t - n) % i + i) % i + n;
|
|
509
509
|
}, mi = (n) => Array.isArray(n) && typeof n[0] != "number";
|
|
@@ -523,16 +523,16 @@ function qr(n, e, t) {
|
|
|
523
523
|
r.at > e && r.at < t && (gi(n, r), i--);
|
|
524
524
|
}
|
|
525
525
|
}
|
|
526
|
-
function
|
|
526
|
+
function Hr(n, e, t, i, r, a) {
|
|
527
527
|
qr(n, r, a);
|
|
528
528
|
for (let s = 0; s < e.length; s++)
|
|
529
529
|
n.push({
|
|
530
530
|
value: e[s],
|
|
531
|
-
at:
|
|
531
|
+
at: tt(r, a, i[s]),
|
|
532
532
|
easing: fi(t, s)
|
|
533
533
|
});
|
|
534
534
|
}
|
|
535
|
-
function
|
|
535
|
+
function Gr(n, e) {
|
|
536
536
|
for (let t = 0; t < n.length; t++)
|
|
537
537
|
n[t] = n[t] / (e + 1);
|
|
538
538
|
}
|
|
@@ -547,7 +547,7 @@ function bi(n, e) {
|
|
|
547
547
|
const t = n[n.length - 1];
|
|
548
548
|
for (let i = 1; i <= e; i++) {
|
|
549
549
|
const r = /* @__PURE__ */ en(0, e, i);
|
|
550
|
-
n.push(
|
|
550
|
+
n.push(tt(t, 1, r));
|
|
551
551
|
}
|
|
552
552
|
}
|
|
553
553
|
function vi(n) {
|
|
@@ -557,28 +557,28 @@ function vi(n) {
|
|
|
557
557
|
function tn(n) {
|
|
558
558
|
return typeof n == "function" && "applyToOptions" in n;
|
|
559
559
|
}
|
|
560
|
-
const
|
|
560
|
+
const pt = 2e4;
|
|
561
561
|
function nn(n) {
|
|
562
562
|
let e = 0;
|
|
563
563
|
const t = 50;
|
|
564
564
|
let i = n.next(e);
|
|
565
|
-
for (; !i.done && e <
|
|
565
|
+
for (; !i.done && e < pt; )
|
|
566
566
|
e += t, i = n.next(e);
|
|
567
|
-
return e >=
|
|
567
|
+
return e >= pt ? 1 / 0 : e;
|
|
568
568
|
}
|
|
569
569
|
const se = /* @__NO_SIDE_EFFECTS__ */ (n) => n * 1e3, le = /* @__NO_SIDE_EFFECTS__ */ (n) => n / 1e3;
|
|
570
570
|
function yi(n, e = 100, t) {
|
|
571
|
-
const i = t(M(y({}, n), { keyframes: [0, e] })), r = Math.min(nn(i),
|
|
571
|
+
const i = t(M(y({}, n), { keyframes: [0, e] })), r = Math.min(nn(i), pt);
|
|
572
572
|
return {
|
|
573
573
|
type: "keyframes",
|
|
574
574
|
ease: (a) => i.next(r * a).value / e,
|
|
575
575
|
duration: /* @__PURE__ */ le(r)
|
|
576
576
|
};
|
|
577
577
|
}
|
|
578
|
-
let
|
|
578
|
+
let nt = () => {
|
|
579
579
|
}, ce = () => {
|
|
580
580
|
};
|
|
581
|
-
process.env.NODE_ENV !== "production" && (
|
|
581
|
+
process.env.NODE_ENV !== "production" && (nt = (n, e) => {
|
|
582
582
|
!n && typeof console != "undefined" && console.warn(e);
|
|
583
583
|
}, ce = (n, e) => {
|
|
584
584
|
if (!n)
|
|
@@ -598,83 +598,83 @@ function Zr(n, a = {}, i, r) {
|
|
|
598
598
|
h.set(v.name, Tn(p, v.at, m, h));
|
|
599
599
|
continue;
|
|
600
600
|
}
|
|
601
|
-
let [
|
|
602
|
-
|
|
601
|
+
let [k, L, w = {}] = v;
|
|
602
|
+
w.at !== void 0 && (p = Tn(p, w.at, m, h));
|
|
603
603
|
let I = 0;
|
|
604
|
-
const
|
|
605
|
-
const
|
|
604
|
+
const _ = (D, C, x, R = 0, O = 0) => {
|
|
605
|
+
const K = Jr(D), Ae = C, { delay: Te = 0, times: te = vi(K), type: fe = "keyframes", repeat: he, repeatType: kt, repeatDelay: Et = 0 } = Ae, at = ae(Ae, ["delay", "times", "type", "repeat", "repeatType", "repeatDelay"]);
|
|
606
606
|
let { ease: ne = e.ease || "easeOut", duration: f } = C;
|
|
607
|
-
const P = typeof Te == "function" ? Te(
|
|
608
|
-
if (N <= 2 &&
|
|
607
|
+
const P = typeof Te == "function" ? Te(R, O) : Te, N = K.length, H = tn(fe) ? fe : r == null ? void 0 : r[fe];
|
|
608
|
+
if (N <= 2 && H) {
|
|
609
609
|
let z = 100;
|
|
610
|
-
if (N === 2 && ea(
|
|
611
|
-
const ge =
|
|
610
|
+
if (N === 2 && ea(K)) {
|
|
611
|
+
const ge = K[1] - K[0];
|
|
612
612
|
z = Math.abs(ge);
|
|
613
613
|
}
|
|
614
|
-
const re = y({},
|
|
614
|
+
const re = y({}, at);
|
|
615
615
|
f !== void 0 && (re.duration = /* @__PURE__ */ se(f));
|
|
616
|
-
const pe = yi(re, z,
|
|
616
|
+
const pe = yi(re, z, H);
|
|
617
617
|
ne = pe.ease, f = pe.duration;
|
|
618
618
|
}
|
|
619
619
|
f != null || (f = o);
|
|
620
620
|
const ie = p + P;
|
|
621
621
|
te.length === 1 && te[0] === 0 && (te[1] = 1);
|
|
622
|
-
const X = te.length -
|
|
623
|
-
if (X > 0 && bi(te, X),
|
|
622
|
+
const X = te.length - K.length;
|
|
623
|
+
if (X > 0 && bi(te, X), K.length === 1 && K.unshift(null), he) {
|
|
624
624
|
ce(he < Wr, "Repeat count too high, must be less than 20"), f = zr(f, he);
|
|
625
|
-
const z = [...
|
|
625
|
+
const z = [...K], re = [...te];
|
|
626
626
|
ne = Array.isArray(ne) ? [...ne] : [ne];
|
|
627
627
|
const pe = [...ne];
|
|
628
628
|
for (let ge = 0; ge < he; ge++) {
|
|
629
|
-
|
|
629
|
+
K.push(...z);
|
|
630
630
|
for (let je = 0; je < z.length; je++)
|
|
631
631
|
te.push(re[je] + (ge + 1)), ne.push(je === 0 ? "linear" : fi(pe, je - 1));
|
|
632
632
|
}
|
|
633
|
-
|
|
633
|
+
Gr(te, he);
|
|
634
634
|
}
|
|
635
|
-
const
|
|
636
|
-
|
|
635
|
+
const _e = ie + f;
|
|
636
|
+
Hr(x, K, ne, te, ie, _e), I = Math.max(P + f, I), g = Math.max(_e, g);
|
|
637
637
|
};
|
|
638
|
-
if (J(
|
|
639
|
-
const D =
|
|
640
|
-
|
|
638
|
+
if (J(k)) {
|
|
639
|
+
const D = _n(k, u);
|
|
640
|
+
_(L, w, An("default", D));
|
|
641
641
|
} else {
|
|
642
|
-
const D = pi(
|
|
642
|
+
const D = pi(k, L, i, d), C = D.length;
|
|
643
643
|
for (let x = 0; x < C; x++) {
|
|
644
|
-
|
|
645
|
-
const
|
|
646
|
-
for (const
|
|
647
|
-
|
|
644
|
+
L = L, w = w;
|
|
645
|
+
const R = D[x], O = _n(R, u);
|
|
646
|
+
for (const K in L)
|
|
647
|
+
_(L[K], Xr(w, K), An(K, O), x, C);
|
|
648
648
|
}
|
|
649
649
|
}
|
|
650
650
|
m = p, p += I;
|
|
651
651
|
}
|
|
652
652
|
return u.forEach((b, v) => {
|
|
653
|
-
for (const
|
|
654
|
-
const
|
|
655
|
-
|
|
656
|
-
const
|
|
657
|
-
for (let C = 0; C <
|
|
658
|
-
const { at: x, value:
|
|
659
|
-
|
|
660
|
-
}
|
|
661
|
-
I[0] !== 0 && (I.unshift(0),
|
|
653
|
+
for (const k in b) {
|
|
654
|
+
const L = b[k];
|
|
655
|
+
L.sort(Yr);
|
|
656
|
+
const w = [], I = [], _ = [];
|
|
657
|
+
for (let C = 0; C < L.length; C++) {
|
|
658
|
+
const { at: x, value: R, easing: O } = L[C];
|
|
659
|
+
w.push(R), I.push(/* @__PURE__ */ en(0, g, x)), _.push(O || "easeOut");
|
|
660
|
+
}
|
|
661
|
+
I[0] !== 0 && (I.unshift(0), w.unshift(w[0]), _.unshift(Ur)), I[I.length - 1] !== 1 && (I.push(1), w.push(null)), l.has(v) || l.set(v, {
|
|
662
662
|
keyframes: {},
|
|
663
663
|
transition: {}
|
|
664
664
|
});
|
|
665
665
|
const D = l.get(v);
|
|
666
|
-
D.keyframes[
|
|
666
|
+
D.keyframes[k] = w, D.transition[k] = y(M(y({}, e), {
|
|
667
667
|
duration: g,
|
|
668
|
-
ease:
|
|
668
|
+
ease: _,
|
|
669
669
|
times: I
|
|
670
670
|
}), t);
|
|
671
671
|
}
|
|
672
672
|
}), l;
|
|
673
673
|
}
|
|
674
|
-
function
|
|
674
|
+
function _n(n, e) {
|
|
675
675
|
return !e.has(n) && e.set(n, {}), e.get(n);
|
|
676
676
|
}
|
|
677
|
-
function
|
|
677
|
+
function An(n, e) {
|
|
678
678
|
return e[n] || (e[n] = []), e[n];
|
|
679
679
|
}
|
|
680
680
|
function Jr(n) {
|
|
@@ -683,8 +683,8 @@ function Jr(n) {
|
|
|
683
683
|
function Xr(n, e) {
|
|
684
684
|
return n && n[e] ? y(y({}, n), n[e]) : y({}, n);
|
|
685
685
|
}
|
|
686
|
-
const Qr = (n) => typeof n == "number", ea = (n) => n.every(Qr),
|
|
687
|
-
function
|
|
686
|
+
const Qr = (n) => typeof n == "number", ea = (n) => n.every(Qr), Ze = /* @__PURE__ */ new WeakMap(), ta = (n) => Array.isArray(n);
|
|
687
|
+
function Ln(n) {
|
|
688
688
|
const e = [{}, {}];
|
|
689
689
|
return n == null || n.values.forEach((t, i) => {
|
|
690
690
|
e[0][i] = t.get(), e[1][i] = t.getVelocity();
|
|
@@ -692,11 +692,11 @@ function _n(n) {
|
|
|
692
692
|
}
|
|
693
693
|
function Ci(n, e, t, i) {
|
|
694
694
|
if (typeof e == "function") {
|
|
695
|
-
const [r, a] =
|
|
695
|
+
const [r, a] = Ln(i);
|
|
696
696
|
e = e(t !== void 0 ? t : n.custom, r, a);
|
|
697
697
|
}
|
|
698
698
|
if (typeof e == "string" && (e = n.variants && n.variants[e]), typeof e == "function") {
|
|
699
|
-
const [r, a] =
|
|
699
|
+
const [r, a] = Ln(i);
|
|
700
700
|
e = e(t !== void 0 ? t : n.custom, r, a);
|
|
701
701
|
}
|
|
702
702
|
return e;
|
|
@@ -705,7 +705,7 @@ function na(n, e, t) {
|
|
|
705
705
|
const i = n.getProps();
|
|
706
706
|
return Ci(i, e, i.custom, n);
|
|
707
707
|
}
|
|
708
|
-
const
|
|
708
|
+
const ot = [
|
|
709
709
|
"setup",
|
|
710
710
|
// Compute
|
|
711
711
|
"read",
|
|
@@ -768,35 +768,35 @@ function aa(n, e) {
|
|
|
768
768
|
delta: 0,
|
|
769
769
|
timestamp: 0,
|
|
770
770
|
isProcessing: !1
|
|
771
|
-
}, a = () => t = !0, s =
|
|
772
|
-
const
|
|
773
|
-
t = !1, de.useManualTiming || (r.delta = i ? 1e3 / 60 : Math.max(Math.min(
|
|
771
|
+
}, a = () => t = !0, s = ot.reduce((w, I) => (w[I] = ia(a), w), {}), { setup: o, read: l, resolveKeyframes: u, preUpdate: d, update: h, preRender: m, render: p, postRender: g } = s, b = () => {
|
|
772
|
+
const w = de.useManualTiming ? r.timestamp : performance.now();
|
|
773
|
+
t = !1, de.useManualTiming || (r.delta = i ? 1e3 / 60 : Math.max(Math.min(w - r.timestamp, ra), 1)), r.timestamp = w, r.isProcessing = !0, o.process(r), l.process(r), u.process(r), d.process(r), h.process(r), m.process(r), p.process(r), g.process(r), r.isProcessing = !1, t && e && (i = !1, n(b));
|
|
774
774
|
}, v = () => {
|
|
775
775
|
t = !0, i = !0, r.isProcessing || n(b);
|
|
776
776
|
};
|
|
777
|
-
return { schedule:
|
|
778
|
-
const
|
|
779
|
-
return
|
|
780
|
-
}, {}), cancel: (
|
|
781
|
-
for (let I = 0; I <
|
|
782
|
-
s[
|
|
777
|
+
return { schedule: ot.reduce((w, I) => {
|
|
778
|
+
const _ = s[I];
|
|
779
|
+
return w[I] = (D, C = !1, x = !1) => (t || v(), _.schedule(D, C, x)), w;
|
|
780
|
+
}, {}), cancel: (w) => {
|
|
781
|
+
for (let I = 0; I < ot.length; I++)
|
|
782
|
+
s[ot[I]].cancel(w);
|
|
783
783
|
}, state: r, steps: s };
|
|
784
784
|
}
|
|
785
|
-
const De = /* @__NO_SIDE_EFFECTS__ */ (n) => n, { schedule: ue, cancel:
|
|
786
|
-
let
|
|
785
|
+
const De = /* @__NO_SIDE_EFFECTS__ */ (n) => n, { schedule: ue, cancel: Rt, state: mt } = /* @__PURE__ */ aa(typeof requestAnimationFrame != "undefined" ? requestAnimationFrame : De, !0);
|
|
786
|
+
let ht;
|
|
787
787
|
function sa() {
|
|
788
|
-
|
|
788
|
+
ht = void 0;
|
|
789
789
|
}
|
|
790
790
|
const ee = {
|
|
791
|
-
now: () => (
|
|
791
|
+
now: () => (ht === void 0 && ee.set(mt.isProcessing || de.useManualTiming ? mt.timestamp : performance.now()), ht),
|
|
792
792
|
set: (n) => {
|
|
793
|
-
|
|
793
|
+
ht = n, queueMicrotask(sa);
|
|
794
794
|
}
|
|
795
795
|
}, Vn = /* @__PURE__ */ new Set();
|
|
796
|
-
function
|
|
796
|
+
function ki(n, e, t) {
|
|
797
797
|
n || Vn.has(e) || (console.warn(e), Vn.add(e));
|
|
798
798
|
}
|
|
799
|
-
class
|
|
799
|
+
class Ei {
|
|
800
800
|
constructor() {
|
|
801
801
|
this.subscriptions = [];
|
|
802
802
|
}
|
|
@@ -889,10 +889,10 @@ class la {
|
|
|
889
889
|
* @deprecated
|
|
890
890
|
*/
|
|
891
891
|
onChange(e) {
|
|
892
|
-
return process.env.NODE_ENV !== "production" &&
|
|
892
|
+
return process.env.NODE_ENV !== "production" && ki(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", e);
|
|
893
893
|
}
|
|
894
894
|
on(e, t) {
|
|
895
|
-
this.events[e] || (this.events[e] = new
|
|
895
|
+
this.events[e] || (this.events[e] = new Ei());
|
|
896
896
|
const i = this.events[e].add(t);
|
|
897
897
|
return e === "change" ? () => {
|
|
898
898
|
i(), ue.read(() => {
|
|
@@ -1028,11 +1028,11 @@ class la {
|
|
|
1028
1028
|
(e = this.dependents) == null || e.clear(), (t = this.events.destroy) == null || t.notify(), this.clearListeners(), this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
|
|
1029
1029
|
}
|
|
1030
1030
|
}
|
|
1031
|
-
function
|
|
1031
|
+
function Je(n, e) {
|
|
1032
1032
|
return new la(n, e);
|
|
1033
1033
|
}
|
|
1034
1034
|
function ca(n, e, t) {
|
|
1035
|
-
n.hasValue(e) ? n.getValue(e).set(t) : n.addValue(e,
|
|
1035
|
+
n.hasValue(e) ? n.getValue(e).set(t) : n.addValue(e, Je(t));
|
|
1036
1036
|
}
|
|
1037
1037
|
function da(n) {
|
|
1038
1038
|
return ta(n) ? n[n.length - 1] || 0 : n;
|
|
@@ -1066,7 +1066,7 @@ function va(n, { repeat: e, repeatType: t = "loop" }, i) {
|
|
|
1066
1066
|
const r = n.filter(ba), a = e && t !== "loop" && e % 2 === 1 ? 0 : r.length - 1;
|
|
1067
1067
|
return r[a];
|
|
1068
1068
|
}
|
|
1069
|
-
const
|
|
1069
|
+
const Re = [
|
|
1070
1070
|
"transformPerspective",
|
|
1071
1071
|
"x",
|
|
1072
1072
|
"y",
|
|
@@ -1084,7 +1084,7 @@ const Oe = [
|
|
|
1084
1084
|
"skew",
|
|
1085
1085
|
"skewX",
|
|
1086
1086
|
"skewY"
|
|
1087
|
-
],
|
|
1087
|
+
], Oe = new Set(Re), ya = {
|
|
1088
1088
|
type: "spring",
|
|
1089
1089
|
stiffness: 500,
|
|
1090
1090
|
damping: 25,
|
|
@@ -1094,14 +1094,14 @@ const Oe = [
|
|
|
1094
1094
|
stiffness: 550,
|
|
1095
1095
|
damping: n === 0 ? 2 * Math.sqrt(550) : 30,
|
|
1096
1096
|
restSpeed: 10
|
|
1097
|
-
}),
|
|
1097
|
+
}), ka = {
|
|
1098
1098
|
type: "keyframes",
|
|
1099
1099
|
duration: 0.8
|
|
1100
|
-
},
|
|
1100
|
+
}, Ea = {
|
|
1101
1101
|
type: "keyframes",
|
|
1102
1102
|
ease: [0.25, 0.1, 0.35, 1],
|
|
1103
1103
|
duration: 0.3
|
|
1104
|
-
}, xa = (n, { keyframes: e }) => e.length > 2 ?
|
|
1104
|
+
}, xa = (n, { keyframes: e }) => e.length > 2 ? ka : Oe.has(n) ? n.startsWith("scale") ? Ca(e[1]) : ya : Ea;
|
|
1105
1105
|
function wa(h) {
|
|
1106
1106
|
var m = h, { when: n, delay: e, delayChildren: t, staggerChildren: i, staggerDirection: r, repeat: a, repeatType: s, repeatDelay: o, from: l, elapsed: u } = m, d = ae(m, ["when", "delay", "delayChildren", "staggerChildren", "staggerDirection", "repeat", "repeatType", "repeatDelay", "from", "elapsed"]);
|
|
1107
1107
|
return !!Object.keys(d).length;
|
|
@@ -1110,19 +1110,19 @@ function wi(n, e) {
|
|
|
1110
1110
|
var t, i;
|
|
1111
1111
|
return (i = (t = n == null ? void 0 : n[e]) != null ? t : n == null ? void 0 : n.default) != null ? i : n;
|
|
1112
1112
|
}
|
|
1113
|
-
const Ti = (n) => (e) => typeof e == "string" && e.startsWith(n),
|
|
1113
|
+
const Ti = (n) => (e) => typeof e == "string" && e.startsWith(n), _i = /* @__PURE__ */ Ti("--"), Ta = /* @__PURE__ */ Ti("var(--"), an = (n) => Ta(n) ? _a.test(n.split("/*")[0].trim()) : !1, _a = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, xe = (n, e, t) => t > e ? e : t < n ? n : t, Ne = {
|
|
1114
1114
|
test: (n) => typeof n == "number",
|
|
1115
1115
|
parse: parseFloat,
|
|
1116
1116
|
transform: (n) => n
|
|
1117
|
-
},
|
|
1117
|
+
}, Xe = M(y({}, Ne), {
|
|
1118
1118
|
transform: (n) => xe(0, 1, n)
|
|
1119
|
-
}),
|
|
1119
|
+
}), lt = M(y({}, Ne), {
|
|
1120
1120
|
default: 1
|
|
1121
1121
|
}), We = (n) => Math.round(n * 1e5) / 1e5, sn = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
|
|
1122
|
-
function
|
|
1122
|
+
function Aa(n) {
|
|
1123
1123
|
return n == null;
|
|
1124
1124
|
}
|
|
1125
|
-
const
|
|
1125
|
+
const La = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, on = (n, e) => (t) => !!(typeof t == "string" && La.test(t) && t.startsWith(n) || e && !Aa(t) && Object.prototype.hasOwnProperty.call(t, e)), Ai = (n, e, t) => (i) => {
|
|
1126
1126
|
if (typeof i != "string")
|
|
1127
1127
|
return i;
|
|
1128
1128
|
const [r, a, s, o] = i.match(sn);
|
|
@@ -1136,8 +1136,8 @@ const _a = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s
|
|
|
1136
1136
|
transform: (n) => Math.round(Va(n))
|
|
1137
1137
|
}), ye = {
|
|
1138
1138
|
test: /* @__PURE__ */ on("rgb", "red"),
|
|
1139
|
-
parse: /* @__PURE__ */
|
|
1140
|
-
transform: ({ red: n, green: e, blue: t, alpha: i = 1 }) => "rgba(" + wt.transform(n) + ", " + wt.transform(e) + ", " + wt.transform(t) + ", " + We(
|
|
1139
|
+
parse: /* @__PURE__ */ Ai("red", "green", "blue"),
|
|
1140
|
+
transform: ({ red: n, green: e, blue: t, alpha: i = 1 }) => "rgba(" + wt.transform(n) + ", " + wt.transform(e) + ", " + wt.transform(t) + ", " + We(Xe.transform(i)) + ")"
|
|
1141
1141
|
};
|
|
1142
1142
|
function Ia(n) {
|
|
1143
1143
|
let e = "", t = "", i = "", r = "";
|
|
@@ -1148,52 +1148,52 @@ function Ia(n) {
|
|
|
1148
1148
|
alpha: r ? parseInt(r, 16) / 255 : 1
|
|
1149
1149
|
};
|
|
1150
1150
|
}
|
|
1151
|
-
const
|
|
1151
|
+
const Ot = {
|
|
1152
1152
|
test: /* @__PURE__ */ on("#"),
|
|
1153
1153
|
parse: Ia,
|
|
1154
1154
|
transform: ye.transform
|
|
1155
|
-
},
|
|
1155
|
+
}, it = /* @__NO_SIDE_EFFECTS__ */ (n) => ({
|
|
1156
1156
|
test: (e) => typeof e == "string" && e.endsWith(n) && e.split(" ").length === 1,
|
|
1157
1157
|
parse: parseFloat,
|
|
1158
1158
|
transform: (e) => `${e}${n}`
|
|
1159
|
-
}), me = /* @__PURE__ */
|
|
1159
|
+
}), me = /* @__PURE__ */ it("deg"), Me = /* @__PURE__ */ it("%"), V = /* @__PURE__ */ it("px"), Ma = /* @__PURE__ */ it("vh"), Pa = /* @__PURE__ */ it("vw"), Mn = M(y({}, Me), {
|
|
1160
1160
|
parse: (n) => Me.parse(n) / 100,
|
|
1161
1161
|
transform: (n) => Me.transform(n * 100)
|
|
1162
1162
|
}), Ve = {
|
|
1163
1163
|
test: /* @__PURE__ */ on("hsl", "hue"),
|
|
1164
|
-
parse: /* @__PURE__ */
|
|
1165
|
-
transform: ({ hue: n, saturation: e, lightness: t, alpha: i = 1 }) => "hsla(" + Math.round(n) + ", " + Me.transform(We(e)) + ", " + Me.transform(We(t)) + ", " + We(
|
|
1164
|
+
parse: /* @__PURE__ */ Ai("hue", "saturation", "lightness"),
|
|
1165
|
+
transform: ({ hue: n, saturation: e, lightness: t, alpha: i = 1 }) => "hsla(" + Math.round(n) + ", " + Me.transform(We(e)) + ", " + Me.transform(We(t)) + ", " + We(Xe.transform(i)) + ")"
|
|
1166
1166
|
}, U = {
|
|
1167
|
-
test: (n) => ye.test(n) ||
|
|
1168
|
-
parse: (n) => ye.test(n) ? ye.parse(n) : Ve.test(n) ? Ve.parse(n) :
|
|
1167
|
+
test: (n) => ye.test(n) || Ot.test(n) || Ve.test(n),
|
|
1168
|
+
parse: (n) => ye.test(n) ? ye.parse(n) : Ve.test(n) ? Ve.parse(n) : Ot.parse(n),
|
|
1169
1169
|
transform: (n) => typeof n == "string" ? n : n.hasOwnProperty("red") ? ye.transform(n) : Ve.transform(n)
|
|
1170
1170
|
}, Da = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
|
|
1171
|
-
function
|
|
1171
|
+
function Ra(n) {
|
|
1172
1172
|
var e, t;
|
|
1173
1173
|
return isNaN(n) && typeof n == "string" && (((e = n.match(sn)) == null ? void 0 : e.length) || 0) + (((t = n.match(Da)) == null ? void 0 : t.length) || 0) > 0;
|
|
1174
1174
|
}
|
|
1175
|
-
const
|
|
1176
|
-
function
|
|
1175
|
+
const Li = "number", Vi = "color", Oa = "var", Na = "var(", Pn = "${}", Sa = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;
|
|
1176
|
+
function Qe(n) {
|
|
1177
1177
|
const e = n.toString(), t = [], i = {
|
|
1178
1178
|
color: [],
|
|
1179
1179
|
number: [],
|
|
1180
1180
|
var: []
|
|
1181
1181
|
}, r = [];
|
|
1182
1182
|
let a = 0;
|
|
1183
|
-
const o = e.replace(Sa, (l) => (U.test(l) ? (i.color.push(a), r.push(Vi), t.push(U.parse(l))) : l.startsWith(Na) ? (i.var.push(a), r.push(
|
|
1183
|
+
const o = e.replace(Sa, (l) => (U.test(l) ? (i.color.push(a), r.push(Vi), t.push(U.parse(l))) : l.startsWith(Na) ? (i.var.push(a), r.push(Oa), t.push(l)) : (i.number.push(a), r.push(Li), t.push(parseFloat(l))), ++a, Pn)).split(Pn);
|
|
1184
1184
|
return { values: t, split: o, indexes: i, types: r };
|
|
1185
1185
|
}
|
|
1186
1186
|
function Ii(n) {
|
|
1187
|
-
return
|
|
1187
|
+
return Qe(n).values;
|
|
1188
1188
|
}
|
|
1189
1189
|
function Mi(n) {
|
|
1190
|
-
const { split: e, types: t } =
|
|
1190
|
+
const { split: e, types: t } = Qe(n), i = e.length;
|
|
1191
1191
|
return (r) => {
|
|
1192
1192
|
let a = "";
|
|
1193
1193
|
for (let s = 0; s < i; s++)
|
|
1194
1194
|
if (a += e[s], r[s] !== void 0) {
|
|
1195
1195
|
const o = t[s];
|
|
1196
|
-
o ===
|
|
1196
|
+
o === Li ? a += We(r[s]) : o === Vi ? a += U.transform(r[s]) : a += r[s];
|
|
1197
1197
|
}
|
|
1198
1198
|
return a;
|
|
1199
1199
|
};
|
|
@@ -1204,7 +1204,7 @@ function ja(n) {
|
|
|
1204
1204
|
return Mi(n)(e.map(Fa));
|
|
1205
1205
|
}
|
|
1206
1206
|
const Se = {
|
|
1207
|
-
test:
|
|
1207
|
+
test: Ra,
|
|
1208
1208
|
parse: Ii,
|
|
1209
1209
|
createTransformer: Mi,
|
|
1210
1210
|
getAnimatableNone: ja
|
|
@@ -1228,36 +1228,36 @@ function Ba({ hue: n, saturation: e, lightness: t, alpha: i }) {
|
|
|
1228
1228
|
alpha: i
|
|
1229
1229
|
};
|
|
1230
1230
|
}
|
|
1231
|
-
function
|
|
1231
|
+
function ft(n, e) {
|
|
1232
1232
|
return (t) => t > 0 ? e : n;
|
|
1233
1233
|
}
|
|
1234
|
-
const
|
|
1234
|
+
const _t = (n, e, t) => {
|
|
1235
1235
|
const i = n * n, r = t * (e * e - i) + i;
|
|
1236
1236
|
return r < 0 ? 0 : Math.sqrt(r);
|
|
1237
|
-
}, za = [
|
|
1237
|
+
}, za = [Ot, ye, Ve], $a = (n) => za.find((e) => e.test(n));
|
|
1238
1238
|
function Dn(n) {
|
|
1239
1239
|
const e = $a(n);
|
|
1240
|
-
if (
|
|
1240
|
+
if (nt(!!e, `'${n}' is not an animatable color. Use the equivalent color code instead.`), !e)
|
|
1241
1241
|
return !1;
|
|
1242
1242
|
let t = e.parse(n);
|
|
1243
1243
|
return e === Ve && (t = Ba(t)), t;
|
|
1244
1244
|
}
|
|
1245
|
-
const
|
|
1245
|
+
const Rn = (n, e) => {
|
|
1246
1246
|
const t = Dn(n), i = Dn(e);
|
|
1247
1247
|
if (!t || !i)
|
|
1248
|
-
return
|
|
1248
|
+
return ft(n, e);
|
|
1249
1249
|
const r = y({}, t);
|
|
1250
|
-
return (a) => (r.red =
|
|
1250
|
+
return (a) => (r.red = _t(t.red, i.red, a), r.green = _t(t.green, i.green, a), r.blue = _t(t.blue, i.blue, a), r.alpha = tt(t.alpha, i.alpha, a), ye.transform(r));
|
|
1251
1251
|
}, Nt = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
1252
1252
|
function Ka(n, e) {
|
|
1253
1253
|
return Nt.has(n) ? (t) => t <= 0 ? n : e : (t) => t >= 1 ? e : n;
|
|
1254
1254
|
}
|
|
1255
1255
|
const qa = (n, e) => (t) => e(n(t)), ln = (...n) => n.reduce(qa);
|
|
1256
|
-
function
|
|
1257
|
-
return (t) =>
|
|
1256
|
+
function Ha(n, e) {
|
|
1257
|
+
return (t) => tt(n, e, t);
|
|
1258
1258
|
}
|
|
1259
1259
|
function cn(n) {
|
|
1260
|
-
return typeof n == "number" ?
|
|
1260
|
+
return typeof n == "number" ? Ha : typeof n == "string" ? an(n) ? ft : U.test(n) ? Rn : Ua : Array.isArray(n) ? Pi : typeof n == "object" ? U.test(n) ? Rn : Ga : ft;
|
|
1261
1261
|
}
|
|
1262
1262
|
function Pi(n, e) {
|
|
1263
1263
|
const t = [...n], i = t.length, r = n.map((a, s) => cn(a)(a, e[s]));
|
|
@@ -1267,7 +1267,7 @@ function Pi(n, e) {
|
|
|
1267
1267
|
return t;
|
|
1268
1268
|
};
|
|
1269
1269
|
}
|
|
1270
|
-
function
|
|
1270
|
+
function Ga(n, e) {
|
|
1271
1271
|
const t = y(y({}, n), e), i = {};
|
|
1272
1272
|
for (const r in t)
|
|
1273
1273
|
n[r] !== void 0 && e[r] !== void 0 && (i[r] = cn(n[r])(n[r], e[r]));
|
|
@@ -1287,31 +1287,31 @@ function Ya(n, e) {
|
|
|
1287
1287
|
return t;
|
|
1288
1288
|
}
|
|
1289
1289
|
const Ua = (n, e) => {
|
|
1290
|
-
const t = Se.createTransformer(e), i =
|
|
1291
|
-
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 ? Ka(n, e) : ln(Pi(Ya(i, r), r.values), t) : (
|
|
1290
|
+
const t = Se.createTransformer(e), i = Qe(n), r = Qe(e);
|
|
1291
|
+
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 ? Ka(n, e) : ln(Pi(Ya(i, r), r.values), t) : (nt(!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.`), ft(n, e));
|
|
1292
1292
|
};
|
|
1293
1293
|
function Di(n, e, t) {
|
|
1294
|
-
return typeof n == "number" && typeof e == "number" && typeof t == "number" ?
|
|
1294
|
+
return typeof n == "number" && typeof e == "number" && typeof t == "number" ? tt(n, e, t) : cn(n)(n, e);
|
|
1295
1295
|
}
|
|
1296
1296
|
const Wa = (n) => {
|
|
1297
1297
|
const e = ({ timestamp: t }) => n(t);
|
|
1298
1298
|
return {
|
|
1299
1299
|
start: (t = !0) => ue.update(e, t),
|
|
1300
|
-
stop: () =>
|
|
1300
|
+
stop: () => Rt(e),
|
|
1301
1301
|
/**
|
|
1302
1302
|
* If we're processing this frame we can use the
|
|
1303
1303
|
* framelocked timestamp to keep things in sync.
|
|
1304
1304
|
*/
|
|
1305
|
-
now: () =>
|
|
1305
|
+
now: () => mt.isProcessing ? mt.timestamp : ee.now()
|
|
1306
1306
|
};
|
|
1307
|
-
},
|
|
1307
|
+
}, Ri = (n, e, t = 10) => {
|
|
1308
1308
|
let i = "";
|
|
1309
1309
|
const r = Math.max(Math.round(e / t), 2);
|
|
1310
1310
|
for (let a = 0; a < r; a++)
|
|
1311
1311
|
i += n(a / (r - 1)) + ", ";
|
|
1312
1312
|
return `linear(${i.substring(0, i.length - 2)})`;
|
|
1313
1313
|
}, Za = 5;
|
|
1314
|
-
function
|
|
1314
|
+
function Oi(n, e, t) {
|
|
1315
1315
|
const i = Math.max(e - Za, 0);
|
|
1316
1316
|
return xi(t - n(i), e - i);
|
|
1317
1317
|
}
|
|
@@ -1343,20 +1343,20 @@ const B = {
|
|
|
1343
1343
|
// in seconds
|
|
1344
1344
|
minDamping: 0.05,
|
|
1345
1345
|
maxDamping: 1
|
|
1346
|
-
},
|
|
1346
|
+
}, At = 1e-3;
|
|
1347
1347
|
function Ja({ duration: n = B.duration, bounce: e = B.bounce, velocity: t = B.velocity, mass: i = B.mass }) {
|
|
1348
1348
|
let r, a;
|
|
1349
|
-
|
|
1349
|
+
nt(n <= /* @__PURE__ */ se(B.maxDuration), "Spring duration must be 10 seconds or less");
|
|
1350
1350
|
let s = 1 - e;
|
|
1351
1351
|
s = xe(B.minDamping, B.maxDamping, s), n = xe(B.minDuration, B.maxDuration, /* @__PURE__ */ le(n)), s < 1 ? (r = (u) => {
|
|
1352
1352
|
const d = u * s, h = d * n, m = d - t, p = St(u, s), g = Math.exp(-h);
|
|
1353
|
-
return
|
|
1353
|
+
return At - m / p * g;
|
|
1354
1354
|
}, a = (u) => {
|
|
1355
1355
|
const h = u * s * n, m = h * t + t, p = Math.pow(s, 2) * Math.pow(u, 2) * n, g = Math.exp(-h), b = St(Math.pow(u, 2), s);
|
|
1356
|
-
return (-r(u) +
|
|
1356
|
+
return (-r(u) + At > 0 ? -1 : 1) * ((m - p) * g) / b;
|
|
1357
1357
|
}) : (r = (u) => {
|
|
1358
1358
|
const d = Math.exp(-u * n), h = (u - t) * n + 1;
|
|
1359
|
-
return -
|
|
1359
|
+
return -At + d * h;
|
|
1360
1360
|
}, a = (u) => {
|
|
1361
1361
|
const d = Math.exp(-u * n), h = (t - u) * (n * n);
|
|
1362
1362
|
return d * h;
|
|
@@ -1388,7 +1388,7 @@ function St(n, e) {
|
|
|
1388
1388
|
return n * Math.sqrt(1 - e * e);
|
|
1389
1389
|
}
|
|
1390
1390
|
const es = ["duration", "bounce"], ts = ["stiffness", "damping", "mass"];
|
|
1391
|
-
function
|
|
1391
|
+
function On(n, e) {
|
|
1392
1392
|
return e.some((t) => n[t] !== void 0);
|
|
1393
1393
|
}
|
|
1394
1394
|
function ns(n) {
|
|
@@ -1399,7 +1399,7 @@ function ns(n) {
|
|
|
1399
1399
|
mass: B.mass,
|
|
1400
1400
|
isResolvedFromDuration: !1
|
|
1401
1401
|
}, n);
|
|
1402
|
-
if (!
|
|
1402
|
+
if (!On(n, ts) && On(n, es))
|
|
1403
1403
|
if (n.visualDuration) {
|
|
1404
1404
|
const t = n.visualDuration, i = 2 * Math.PI / (t * 1.2), r = i * i, a = 2 * xe(0.05, 1, 1 - (n.bounce || 0)) * Math.sqrt(r);
|
|
1405
1405
|
e = M(y({}, e), {
|
|
@@ -1415,7 +1415,7 @@ function ns(n) {
|
|
|
1415
1415
|
}
|
|
1416
1416
|
return e;
|
|
1417
1417
|
}
|
|
1418
|
-
function
|
|
1418
|
+
function et(n = B.visualDuration, e = B.bounce) {
|
|
1419
1419
|
const t = typeof n != "object" ? {
|
|
1420
1420
|
visualDuration: n,
|
|
1421
1421
|
keyframes: [0, 1],
|
|
@@ -1424,49 +1424,49 @@ function tt(n = B.visualDuration, e = B.bounce) {
|
|
|
1424
1424
|
let { restSpeed: i, restDelta: r } = t;
|
|
1425
1425
|
const a = t.keyframes[0], s = t.keyframes[t.keyframes.length - 1], o = { done: !1, value: a }, { stiffness: l, damping: u, mass: d, duration: h, velocity: m, isResolvedFromDuration: p } = ns(M(y({}, t), {
|
|
1426
1426
|
velocity: -/* @__PURE__ */ le(t.velocity || 0)
|
|
1427
|
-
})), g = m || 0, b = u / (2 * Math.sqrt(l * d)), v = s - a,
|
|
1428
|
-
i || (i =
|
|
1429
|
-
let
|
|
1427
|
+
})), g = m || 0, b = u / (2 * Math.sqrt(l * d)), v = s - a, k = /* @__PURE__ */ le(Math.sqrt(l / d)), L = Math.abs(v) < 5;
|
|
1428
|
+
i || (i = L ? B.restSpeed.granular : B.restSpeed.default), r || (r = L ? B.restDelta.granular : B.restDelta.default);
|
|
1429
|
+
let w;
|
|
1430
1430
|
if (b < 1) {
|
|
1431
|
-
const
|
|
1432
|
-
|
|
1433
|
-
const C = Math.exp(-b *
|
|
1434
|
-
return s - C * ((g + b *
|
|
1431
|
+
const _ = St(k, b);
|
|
1432
|
+
w = (D) => {
|
|
1433
|
+
const C = Math.exp(-b * k * D);
|
|
1434
|
+
return s - C * ((g + b * k * v) / _ * Math.sin(_ * D) + v * Math.cos(_ * D));
|
|
1435
1435
|
};
|
|
1436
1436
|
} else if (b === 1)
|
|
1437
|
-
|
|
1437
|
+
w = (_) => s - Math.exp(-k * _) * (v + (g + k * v) * _);
|
|
1438
1438
|
else {
|
|
1439
|
-
const
|
|
1440
|
-
|
|
1441
|
-
const C = Math.exp(-b *
|
|
1442
|
-
return s - C * ((g + b *
|
|
1439
|
+
const _ = k * Math.sqrt(b * b - 1);
|
|
1440
|
+
w = (D) => {
|
|
1441
|
+
const C = Math.exp(-b * k * D), x = Math.min(_ * D, 300);
|
|
1442
|
+
return s - C * ((g + b * k * v) * Math.sinh(x) + _ * v * Math.cosh(x)) / _;
|
|
1443
1443
|
};
|
|
1444
1444
|
}
|
|
1445
1445
|
const I = {
|
|
1446
1446
|
calculatedDuration: p && h || null,
|
|
1447
|
-
next: (
|
|
1448
|
-
const D =
|
|
1447
|
+
next: (_) => {
|
|
1448
|
+
const D = w(_);
|
|
1449
1449
|
if (p)
|
|
1450
|
-
o.done =
|
|
1450
|
+
o.done = _ >= h;
|
|
1451
1451
|
else {
|
|
1452
|
-
let C =
|
|
1453
|
-
b < 1 && (C =
|
|
1454
|
-
const x = Math.abs(C) <= i,
|
|
1455
|
-
o.done = x &&
|
|
1452
|
+
let C = _ === 0 ? g : 0;
|
|
1453
|
+
b < 1 && (C = _ === 0 ? /* @__PURE__ */ se(g) : Oi(w, _, D));
|
|
1454
|
+
const x = Math.abs(C) <= i, R = Math.abs(s - D) <= r;
|
|
1455
|
+
o.done = x && R;
|
|
1456
1456
|
}
|
|
1457
1457
|
return o.value = o.done ? s : D, o;
|
|
1458
1458
|
},
|
|
1459
1459
|
toString: () => {
|
|
1460
|
-
const
|
|
1461
|
-
return
|
|
1460
|
+
const _ = Math.min(nn(I), pt), D = Ri((C) => I.next(_ * C).value, _, 30);
|
|
1461
|
+
return _ + "ms " + D;
|
|
1462
1462
|
},
|
|
1463
1463
|
toTransition: () => {
|
|
1464
1464
|
}
|
|
1465
1465
|
};
|
|
1466
1466
|
return I;
|
|
1467
1467
|
}
|
|
1468
|
-
|
|
1469
|
-
const e = yi(n, 100,
|
|
1468
|
+
et.applyToOptions = (n) => {
|
|
1469
|
+
const e = yi(n, 100, et);
|
|
1470
1470
|
return n.ease = e.ease, n.duration = /* @__PURE__ */ se(e.duration), n.type = "keyframes", n;
|
|
1471
1471
|
};
|
|
1472
1472
|
function Ft({ keyframes: n, velocity: e = 0, power: t = 0.8, timeConstant: i = 325, bounceDamping: r = 10, bounceStiffness: a = 500, modifyTarget: s, min: o, max: l, restDelta: u = 0.5, restSpeed: d }) {
|
|
@@ -1475,17 +1475,17 @@ function Ft({ keyframes: n, velocity: e = 0, power: t = 0.8, timeConstant: i = 3
|
|
|
1475
1475
|
value: h
|
|
1476
1476
|
}, p = (x) => o !== void 0 && x < o || l !== void 0 && x > l, g = (x) => o === void 0 ? l : l === void 0 || Math.abs(o - x) < Math.abs(l - x) ? o : l;
|
|
1477
1477
|
let b = t * e;
|
|
1478
|
-
const v = h + b,
|
|
1479
|
-
|
|
1480
|
-
const
|
|
1481
|
-
const
|
|
1482
|
-
m.done = Math.abs(
|
|
1478
|
+
const v = h + b, k = s === void 0 ? v : s(v);
|
|
1479
|
+
k !== v && (b = k - h);
|
|
1480
|
+
const L = (x) => -b * Math.exp(-x / i), w = (x) => k + L(x), I = (x) => {
|
|
1481
|
+
const R = L(x), O = w(x);
|
|
1482
|
+
m.done = Math.abs(R) <= u, m.value = m.done ? k : O;
|
|
1483
1483
|
};
|
|
1484
|
-
let
|
|
1484
|
+
let _, D;
|
|
1485
1485
|
const C = (x) => {
|
|
1486
|
-
p(m.value) && (
|
|
1486
|
+
p(m.value) && (_ = x, D = et({
|
|
1487
1487
|
keyframes: [m.value, g(m.value)],
|
|
1488
|
-
velocity:
|
|
1488
|
+
velocity: Oi(w, x, m.value),
|
|
1489
1489
|
// TODO: This should be passing * 1000
|
|
1490
1490
|
damping: r,
|
|
1491
1491
|
stiffness: a,
|
|
@@ -1496,8 +1496,8 @@ function Ft({ keyframes: n, velocity: e = 0, power: t = 0.8, timeConstant: i = 3
|
|
|
1496
1496
|
return C(0), {
|
|
1497
1497
|
calculatedDuration: null,
|
|
1498
1498
|
next: (x) => {
|
|
1499
|
-
let
|
|
1500
|
-
return !D &&
|
|
1499
|
+
let R = !1;
|
|
1500
|
+
return !D && _ === void 0 && (R = !0, I(x), C(x)), _ !== void 0 && x >= _ ? D.next(x - _) : (!R && I(x), m);
|
|
1501
1501
|
}
|
|
1502
1502
|
};
|
|
1503
1503
|
}
|
|
@@ -1544,13 +1544,13 @@ function ls(n, e, t, i, r) {
|
|
|
1544
1544
|
while (Math.abs(a) > ss && ++o < os);
|
|
1545
1545
|
return s;
|
|
1546
1546
|
}
|
|
1547
|
-
function
|
|
1547
|
+
function rt(n, e, t, i) {
|
|
1548
1548
|
if (n === e && t === i)
|
|
1549
1549
|
return De;
|
|
1550
1550
|
const r = (a) => ls(a, 0, 1, n, t);
|
|
1551
1551
|
return (a) => a === 0 || a === 1 ? a : Ni(r(a), e, i);
|
|
1552
1552
|
}
|
|
1553
|
-
const cs = /* @__PURE__ */
|
|
1553
|
+
const cs = /* @__PURE__ */ rt(0.42, 0, 1, 1), ds = /* @__PURE__ */ rt(0, 0, 0.58, 1), Si = /* @__PURE__ */ rt(0.42, 0, 0.58, 1), Fi = (n) => (e) => e <= 0.5 ? n(2 * e) / 2 : (2 - n(2 * (1 - e))) / 2, ji = (n) => (e) => 1 - n(1 - e), Bi = /* @__PURE__ */ rt(0.33, 1.53, 0.69, 0.99), dn = /* @__PURE__ */ ji(Bi), zi = /* @__PURE__ */ Fi(dn), $i = (n) => (n *= 2) < 1 ? 0.5 * dn(n) : 0.5 * (2 - Math.pow(2, -10 * (n - 1))), un = (n) => 1 - Math.sin(Math.acos(n)), us = ji(un), Ki = Fi(un), qi = (n) => Array.isArray(n) && typeof n[0] == "number", Nn = {
|
|
1554
1554
|
linear: De,
|
|
1555
1555
|
easeIn: cs,
|
|
1556
1556
|
easeInOut: Si,
|
|
@@ -1566,7 +1566,7 @@ const cs = /* @__PURE__ */ at(0.42, 0, 1, 1), ds = /* @__PURE__ */ at(0, 0, 0.58
|
|
|
1566
1566
|
if (qi(n)) {
|
|
1567
1567
|
ce(n.length === 4, "Cubic bezier arrays must contain four numerical values.");
|
|
1568
1568
|
const [e, t, i, r] = n;
|
|
1569
|
-
return
|
|
1569
|
+
return rt(e, t, i, r);
|
|
1570
1570
|
} else if (hs(n))
|
|
1571
1571
|
return ce(Nn[n] !== void 0, `Invalid easing type '${n}'`), Nn[n];
|
|
1572
1572
|
return n;
|
|
@@ -1601,9 +1601,9 @@ const fs = {
|
|
|
1601
1601
|
inertia: Ft,
|
|
1602
1602
|
tween: Ie,
|
|
1603
1603
|
keyframes: Ie,
|
|
1604
|
-
spring:
|
|
1604
|
+
spring: et
|
|
1605
1605
|
};
|
|
1606
|
-
function
|
|
1606
|
+
function Hi(n) {
|
|
1607
1607
|
typeof n.type == "string" && (n.type = fs[n.type]);
|
|
1608
1608
|
}
|
|
1609
1609
|
class pn {
|
|
@@ -1641,7 +1641,7 @@ class mn extends pn {
|
|
|
1641
1641
|
}
|
|
1642
1642
|
initAnimation() {
|
|
1643
1643
|
const { options: e } = this;
|
|
1644
|
-
|
|
1644
|
+
Hi(e);
|
|
1645
1645
|
const { type: t = Ie, repeat: i = 0, repeatDelay: r = 0, repeatType: a, velocity: s = 0 } = e;
|
|
1646
1646
|
let { keyframes: o } = e;
|
|
1647
1647
|
const l = t || Ie;
|
|
@@ -1664,20 +1664,20 @@ class mn extends pn {
|
|
|
1664
1664
|
return i.next(0);
|
|
1665
1665
|
const { delay: u = 0, keyframes: d, repeat: h, repeatType: m, repeatDelay: p, type: g, onUpdate: b, finalKeyframe: v } = this.options;
|
|
1666
1666
|
this.speed > 0 ? this.startTime = Math.min(this.startTime, e) : this.speed < 0 && (this.startTime = Math.min(e - r / this.speed, this.startTime)), t ? this.currentTime = e : this.updateTime(e);
|
|
1667
|
-
const
|
|
1668
|
-
this.currentTime = Math.max(
|
|
1669
|
-
let
|
|
1667
|
+
const k = this.currentTime - u * (this.playbackSpeed >= 0 ? 1 : -1), L = this.playbackSpeed >= 0 ? k < 0 : k > r;
|
|
1668
|
+
this.currentTime = Math.max(k, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = r);
|
|
1669
|
+
let w = this.currentTime, I = i;
|
|
1670
1670
|
if (h) {
|
|
1671
1671
|
const x = Math.min(this.currentTime, r) / o;
|
|
1672
|
-
let
|
|
1673
|
-
!
|
|
1672
|
+
let R = Math.floor(x), O = x % 1;
|
|
1673
|
+
!O && x >= 1 && (O = 1), O === 1 && R--, R = Math.min(R, h + 1), !!(R % 2) && (m === "reverse" ? (O = 1 - O, p && (O -= p / o)) : m === "mirror" && (I = s)), w = xe(0, 1, O) * o;
|
|
1674
1674
|
}
|
|
1675
|
-
const
|
|
1676
|
-
a && (
|
|
1677
|
-
let { done: D } =
|
|
1678
|
-
!
|
|
1675
|
+
const _ = L ? { done: !1, value: d[0] } : I.next(w);
|
|
1676
|
+
a && (_.value = a(_.value));
|
|
1677
|
+
let { done: D } = _;
|
|
1678
|
+
!L && l !== null && (D = this.playbackSpeed >= 0 ? this.currentTime >= r : this.currentTime <= 0);
|
|
1679
1679
|
const C = this.holdTime === null && (this.state === "finished" || this.state === "running" && D);
|
|
1680
|
-
return C && g !== Ft && (
|
|
1680
|
+
return C && g !== Ft && (_.value = hn(d, this.options, v, this.speed)), b && b(_.value), C && this.finish(), _;
|
|
1681
1681
|
}
|
|
1682
1682
|
/**
|
|
1683
1683
|
* Allows the returned animation to be awaited or promise-chained. Currently
|
|
@@ -1797,17 +1797,17 @@ function $t(n, e) {
|
|
|
1797
1797
|
}
|
|
1798
1798
|
if (!r)
|
|
1799
1799
|
return zt(e);
|
|
1800
|
-
const a = i[e], s = r[1].split(",").map(
|
|
1800
|
+
const a = i[e], s = r[1].split(",").map(ks);
|
|
1801
1801
|
return typeof a == "function" ? a(s) : s[a];
|
|
1802
1802
|
}
|
|
1803
1803
|
const Cs = (n, e) => {
|
|
1804
1804
|
const { transform: t = "none" } = getComputedStyle(n);
|
|
1805
1805
|
return $t(t, e);
|
|
1806
1806
|
};
|
|
1807
|
-
function
|
|
1807
|
+
function ks(n) {
|
|
1808
1808
|
return parseFloat(n.trim());
|
|
1809
1809
|
}
|
|
1810
|
-
const zn = (n) => n === Ne || n === V,
|
|
1810
|
+
const zn = (n) => n === Ne || n === V, Es = /* @__PURE__ */ new Set(["x", "y", "z"]), xs = Re.filter((n) => !Es.has(n));
|
|
1811
1811
|
function ws(n) {
|
|
1812
1812
|
const e = [];
|
|
1813
1813
|
return xs.forEach((t) => {
|
|
@@ -1815,7 +1815,7 @@ function ws(n) {
|
|
|
1815
1815
|
i !== void 0 && (e.push([t, i.get()]), i.set(t.startsWith("scale") ? 1 : 0));
|
|
1816
1816
|
}), e;
|
|
1817
1817
|
}
|
|
1818
|
-
const
|
|
1818
|
+
const ke = {
|
|
1819
1819
|
// Dimensions
|
|
1820
1820
|
width: ({ x: n }, { paddingLeft: e = "0", paddingRight: t = "0" }) => n.max - n.min - parseFloat(e) - parseFloat(t),
|
|
1821
1821
|
height: ({ y: n }, { paddingTop: e = "0", paddingBottom: t = "0" }) => n.max - n.min - parseFloat(e) - parseFloat(t),
|
|
@@ -1827,13 +1827,13 @@ const Ee = {
|
|
|
1827
1827
|
x: (n, { transform: e }) => $t(e, "x"),
|
|
1828
1828
|
y: (n, { transform: e }) => $t(e, "y")
|
|
1829
1829
|
};
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
const
|
|
1833
|
-
let Kt = !1, qt = !1,
|
|
1834
|
-
function
|
|
1830
|
+
ke.translateX = ke.x;
|
|
1831
|
+
ke.translateY = ke.y;
|
|
1832
|
+
const Ee = /* @__PURE__ */ new Set();
|
|
1833
|
+
let Kt = !1, qt = !1, Ht = !1;
|
|
1834
|
+
function Gi() {
|
|
1835
1835
|
if (qt) {
|
|
1836
|
-
const n = Array.from(
|
|
1836
|
+
const n = Array.from(Ee).filter((i) => i.needsMeasurement), e = new Set(n.map((i) => i.element)), t = /* @__PURE__ */ new Map();
|
|
1837
1837
|
e.forEach((i) => {
|
|
1838
1838
|
const r = ws(i);
|
|
1839
1839
|
r.length && (t.set(i, r), i.render());
|
|
@@ -1848,22 +1848,22 @@ function Hi() {
|
|
|
1848
1848
|
i.suspendedScrollY !== void 0 && window.scrollTo(0, i.suspendedScrollY);
|
|
1849
1849
|
});
|
|
1850
1850
|
}
|
|
1851
|
-
qt = !1, Kt = !1,
|
|
1851
|
+
qt = !1, Kt = !1, Ee.forEach((n) => n.complete(Ht)), Ee.clear();
|
|
1852
1852
|
}
|
|
1853
1853
|
function Yi() {
|
|
1854
|
-
|
|
1854
|
+
Ee.forEach((n) => {
|
|
1855
1855
|
n.readKeyframes(), n.needsMeasurement && (qt = !0);
|
|
1856
1856
|
});
|
|
1857
1857
|
}
|
|
1858
1858
|
function Ts() {
|
|
1859
|
-
|
|
1859
|
+
Ht = !0, Yi(), Gi(), Ht = !1;
|
|
1860
1860
|
}
|
|
1861
1861
|
class fn {
|
|
1862
1862
|
constructor(e, t, i, r, a, s = !1) {
|
|
1863
1863
|
this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...e], this.onComplete = t, this.name = i, this.motionValue = r, this.element = a, this.isAsync = s;
|
|
1864
1864
|
}
|
|
1865
1865
|
scheduleResolve() {
|
|
1866
|
-
this.state = "scheduled", this.isAsync ? (
|
|
1866
|
+
this.state = "scheduled", this.isAsync ? (Ee.add(this), Kt || (Kt = !0, ue.read(Yi), ue.resolveKeyframes(Gi))) : (this.readKeyframes(), this.complete());
|
|
1867
1867
|
}
|
|
1868
1868
|
readKeyframes() {
|
|
1869
1869
|
const { unresolvedKeyframes: e, name: t, element: i, motionValue: r } = this;
|
|
@@ -1888,25 +1888,25 @@ class fn {
|
|
|
1888
1888
|
measureEndState() {
|
|
1889
1889
|
}
|
|
1890
1890
|
complete(e = !1) {
|
|
1891
|
-
this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, e),
|
|
1891
|
+
this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, e), Ee.delete(this);
|
|
1892
1892
|
}
|
|
1893
1893
|
cancel() {
|
|
1894
|
-
this.state === "scheduled" && (
|
|
1894
|
+
this.state === "scheduled" && (Ee.delete(this), this.state = "pending");
|
|
1895
1895
|
}
|
|
1896
1896
|
resume() {
|
|
1897
1897
|
this.state === "pending" && this.scheduleResolve();
|
|
1898
1898
|
}
|
|
1899
1899
|
}
|
|
1900
|
-
const
|
|
1901
|
-
function
|
|
1902
|
-
|
|
1900
|
+
const _s = (n) => n.startsWith("--");
|
|
1901
|
+
function As(n, e, t) {
|
|
1902
|
+
_s(e) ? n.style.setProperty(e, t) : n.style[e] = t;
|
|
1903
1903
|
}
|
|
1904
1904
|
// @__NO_SIDE_EFFECTS__
|
|
1905
1905
|
function gn(n) {
|
|
1906
1906
|
let e;
|
|
1907
1907
|
return () => (e === void 0 && (e = n()), e);
|
|
1908
1908
|
}
|
|
1909
|
-
const
|
|
1909
|
+
const Ls = /* @__PURE__ */ gn(() => window.ScrollTimeline !== void 0), Vs = {};
|
|
1910
1910
|
function Is(n, e) {
|
|
1911
1911
|
const t = /* @__PURE__ */ gn(n);
|
|
1912
1912
|
return () => {
|
|
@@ -1934,7 +1934,7 @@ const Ui = /* @__PURE__ */ Is(() => {
|
|
|
1934
1934
|
};
|
|
1935
1935
|
function Wi(n, e) {
|
|
1936
1936
|
if (n)
|
|
1937
|
-
return typeof n == "function" ? Ui() ?
|
|
1937
|
+
return typeof n == "function" ? Ui() ? Ri(n, e) : "ease-out" : qi(n) ? Ue(n) : Array.isArray(n) ? n.map((t) => Wi(t, e) || $n.easeOut) : $n[n];
|
|
1938
1938
|
}
|
|
1939
1939
|
function Ms(n, e, t, { delay: i = 0, duration: r = 300, repeat: a = 0, repeatType: s = "loop", ease: o = "easeOut", times: l } = {}, u = void 0) {
|
|
1940
1940
|
const d = {
|
|
@@ -1968,7 +1968,7 @@ class Ds extends pn {
|
|
|
1968
1968
|
this.animation = Ms(t, i, r, u, a), u.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
|
|
1969
1969
|
if (this.finishedTime = this.time, !a) {
|
|
1970
1970
|
const d = hn(r, this.options, o, this.speed);
|
|
1971
|
-
this.updateMotionValue ? this.updateMotionValue(d) :
|
|
1971
|
+
this.updateMotionValue ? this.updateMotionValue(d) : As(t, i, d), this.animation.cancel();
|
|
1972
1972
|
}
|
|
1973
1973
|
l == null || l(), this.notifyFinished();
|
|
1974
1974
|
};
|
|
@@ -2047,7 +2047,7 @@ class Ds extends pn {
|
|
|
2047
2047
|
*/
|
|
2048
2048
|
attachTimeline({ timeline: e, observe: t }) {
|
|
2049
2049
|
var i;
|
|
2050
|
-
return this.allowFlatten && ((i = this.animation.effect) == null || i.updateTiming({ easing: "linear" })), this.animation.onfinish = null, e &&
|
|
2050
|
+
return this.allowFlatten && ((i = this.animation.effect) == null || i.updateTiming({ easing: "linear" })), this.animation.onfinish = null, e && Ls() ? (this.animation.timeline = e, De) : t(this);
|
|
2051
2051
|
}
|
|
2052
2052
|
}
|
|
2053
2053
|
const Zi = {
|
|
@@ -2055,16 +2055,16 @@ const Zi = {
|
|
|
2055
2055
|
backInOut: zi,
|
|
2056
2056
|
circInOut: Ki
|
|
2057
2057
|
};
|
|
2058
|
-
function
|
|
2058
|
+
function Rs(n) {
|
|
2059
2059
|
return n in Zi;
|
|
2060
2060
|
}
|
|
2061
|
-
function
|
|
2062
|
-
typeof n.ease == "string" &&
|
|
2061
|
+
function Os(n) {
|
|
2062
|
+
typeof n.ease == "string" && Rs(n.ease) && (n.ease = Zi[n.ease]);
|
|
2063
2063
|
}
|
|
2064
2064
|
const Kn = 10;
|
|
2065
2065
|
class Ns extends Ds {
|
|
2066
2066
|
constructor(e) {
|
|
2067
|
-
|
|
2067
|
+
Os(e), Hi(e), super(e), e.startTime && (this.startTime = e.startTime), this.options = e;
|
|
2068
2068
|
}
|
|
2069
2069
|
/**
|
|
2070
2070
|
* WAAPI doesn't natively have any interruption capabilities.
|
|
@@ -2107,7 +2107,7 @@ function Fs(n, e, t, i) {
|
|
|
2107
2107
|
if (e === "display" || e === "visibility")
|
|
2108
2108
|
return !0;
|
|
2109
2109
|
const a = n[n.length - 1], s = qn(r, e), o = qn(a, e);
|
|
2110
|
-
return
|
|
2110
|
+
return nt(s === o, `You are trying to animate ${e} from "${r}" to "${a}". ${r} is not an animatable value - to enable this animation set ${r} to a value animatable to ${a} via the \`style\` property.`), !s || !o ? !1 : Ss(n) || (t === "spring" || tn(t)) && i;
|
|
2111
2111
|
}
|
|
2112
2112
|
function Ji(n) {
|
|
2113
2113
|
return typeof n == "object" && n !== null;
|
|
@@ -2141,8 +2141,8 @@ class qs extends pn {
|
|
|
2141
2141
|
var p = m, { autoplay: e = !0, delay: t = 0, type: i = "keyframes", repeat: r = 0, repeatDelay: a = 0, repeatType: s = "loop", keyframes: o, name: l, motionValue: u, element: d } = p, h = ae(p, ["autoplay", "delay", "type", "repeat", "repeatDelay", "repeatType", "keyframes", "name", "motionValue", "element"]);
|
|
2142
2142
|
var v;
|
|
2143
2143
|
super(), this.stop = () => {
|
|
2144
|
-
var
|
|
2145
|
-
this._animation && (this._animation.stop(), (
|
|
2144
|
+
var k, L;
|
|
2145
|
+
this._animation && (this._animation.stop(), (k = this.stopTimeline) == null || k.call(this)), (L = this.keyframeResolver) == null || L.cancel();
|
|
2146
2146
|
}, this.createdAt = ee.now();
|
|
2147
2147
|
const g = y({
|
|
2148
2148
|
autoplay: e,
|
|
@@ -2155,7 +2155,7 @@ class qs extends pn {
|
|
|
2155
2155
|
motionValue: u,
|
|
2156
2156
|
element: d
|
|
2157
2157
|
}, h), b = (d == null ? void 0 : d.KeyframeResolver) || fn;
|
|
2158
|
-
this.keyframeResolver = new b(o, (
|
|
2158
|
+
this.keyframeResolver = new b(o, (k, L, w) => this.onKeyframesResolved(k, L, g, !w), l, u, d), (v = this.keyframeResolver) == null || v.scheduleResolve();
|
|
2159
2159
|
}
|
|
2160
2160
|
onKeyframesResolved(e, t, i, r) {
|
|
2161
2161
|
this.keyframeResolver = void 0;
|
|
@@ -2259,37 +2259,37 @@ const Xi = (n, e, t, i = {}, r, a) => (s) => {
|
|
|
2259
2259
|
"left",
|
|
2260
2260
|
"right",
|
|
2261
2261
|
"bottom",
|
|
2262
|
-
...
|
|
2262
|
+
...Re
|
|
2263
2263
|
]);
|
|
2264
|
-
function
|
|
2264
|
+
function Hs({ protectedKeys: n, needsAnimating: e }, t) {
|
|
2265
2265
|
const i = n.hasOwnProperty(t) && e[t] !== !0;
|
|
2266
2266
|
return e[t] = !1, i;
|
|
2267
2267
|
}
|
|
2268
|
-
function
|
|
2268
|
+
function Gs(n, e, { delay: t = 0, transitionOverride: i, type: r } = {}) {
|
|
2269
2269
|
var h;
|
|
2270
2270
|
let d = e, { transition: a = n.getDefaultTransition(), transitionEnd: s } = d, o = ae(d, ["transition", "transitionEnd"]);
|
|
2271
2271
|
i && (a = i);
|
|
2272
2272
|
const l = [], u = r && n.animationState && n.animationState.getState()[r];
|
|
2273
2273
|
for (const m in o) {
|
|
2274
2274
|
const p = n.getValue(m, (h = n.latestValues[m]) != null ? h : null), g = o[m];
|
|
2275
|
-
if (g === void 0 || u &&
|
|
2275
|
+
if (g === void 0 || u && Hs(u, m))
|
|
2276
2276
|
continue;
|
|
2277
2277
|
const b = y({
|
|
2278
2278
|
delay: t
|
|
2279
2279
|
}, wi(a || {}, m)), v = p.get();
|
|
2280
2280
|
if (v !== void 0 && !p.isAnimating && !Array.isArray(g) && g === v && !b.velocity)
|
|
2281
2281
|
continue;
|
|
2282
|
-
let
|
|
2282
|
+
let k = !1;
|
|
2283
2283
|
if (window.MotionHandoffAnimation) {
|
|
2284
|
-
const
|
|
2285
|
-
if (
|
|
2286
|
-
const I = window.MotionHandoffAnimation(
|
|
2287
|
-
I !== null && (b.startTime = I,
|
|
2284
|
+
const w = ga(n);
|
|
2285
|
+
if (w) {
|
|
2286
|
+
const I = window.MotionHandoffAnimation(w, m, ue);
|
|
2287
|
+
I !== null && (b.startTime = I, k = !0);
|
|
2288
2288
|
}
|
|
2289
2289
|
}
|
|
2290
|
-
pa(n, m), p.start(Xi(m, p, g, n.shouldReduceMotion && Qi.has(m) ? { type: !1 } : b, n,
|
|
2291
|
-
const
|
|
2292
|
-
|
|
2290
|
+
pa(n, m), p.start(Xi(m, p, g, n.shouldReduceMotion && Qi.has(m) ? { type: !1 } : b, n, k));
|
|
2291
|
+
const L = p.animation;
|
|
2292
|
+
L && l.push(L);
|
|
2293
2293
|
}
|
|
2294
2294
|
return s && Promise.all(l).then(() => {
|
|
2295
2295
|
ue.update(() => {
|
|
@@ -2317,7 +2317,7 @@ function Us(n, e) {
|
|
|
2317
2317
|
function Ws(n, e) {
|
|
2318
2318
|
return Ys(Us(n.getBoundingClientRect(), e));
|
|
2319
2319
|
}
|
|
2320
|
-
const
|
|
2320
|
+
const Hn = {
|
|
2321
2321
|
animation: [
|
|
2322
2322
|
"animate",
|
|
2323
2323
|
"variants",
|
|
@@ -2336,14 +2336,14 @@ const Gn = {
|
|
|
2336
2336
|
pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"],
|
|
2337
2337
|
inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
|
|
2338
2338
|
layout: ["layout", "layoutId"]
|
|
2339
|
-
},
|
|
2340
|
-
for (const n in
|
|
2341
|
-
|
|
2342
|
-
isEnabled: (e) =>
|
|
2339
|
+
}, Gt = {};
|
|
2340
|
+
for (const n in Hn)
|
|
2341
|
+
Gt[n] = {
|
|
2342
|
+
isEnabled: (e) => Hn[n].some((t) => !!e[t])
|
|
2343
2343
|
};
|
|
2344
|
-
const
|
|
2345
|
-
x:
|
|
2346
|
-
y:
|
|
2344
|
+
const Gn = () => ({ min: 0, max: 0 }), bn = () => ({
|
|
2345
|
+
x: Gn(),
|
|
2346
|
+
y: Gn()
|
|
2347
2347
|
}), Zs = typeof window != "undefined", Yt = { current: null }, er = { current: !1 };
|
|
2348
2348
|
function Js() {
|
|
2349
2349
|
if (er.current = !0, !!Zs)
|
|
@@ -2380,14 +2380,14 @@ function io(n, e, t) {
|
|
|
2380
2380
|
if (J(r))
|
|
2381
2381
|
n.addValue(i, r);
|
|
2382
2382
|
else if (J(a))
|
|
2383
|
-
n.addValue(i,
|
|
2383
|
+
n.addValue(i, Je(r, { owner: n }));
|
|
2384
2384
|
else if (a !== r)
|
|
2385
2385
|
if (n.hasValue(i)) {
|
|
2386
2386
|
const s = n.getValue(i);
|
|
2387
2387
|
s.liveStyle === !0 ? s.jump(r) : s.hasAnimated || s.set(r);
|
|
2388
2388
|
} else {
|
|
2389
2389
|
const s = n.getStaticValue(i);
|
|
2390
|
-
n.addValue(i,
|
|
2390
|
+
n.addValue(i, Je(s !== void 0 ? s : r, { owner: n }));
|
|
2391
2391
|
}
|
|
2392
2392
|
}
|
|
2393
2393
|
for (const i in t)
|
|
@@ -2421,10 +2421,10 @@ const co = /\b([a-z-]*)\(.*?\)/gu, Ut = M(y({}, Se), {
|
|
|
2421
2421
|
rotateX: me,
|
|
2422
2422
|
rotateY: me,
|
|
2423
2423
|
rotateZ: me,
|
|
2424
|
-
scale:
|
|
2425
|
-
scaleX:
|
|
2426
|
-
scaleY:
|
|
2427
|
-
scaleZ:
|
|
2424
|
+
scale: lt,
|
|
2425
|
+
scaleX: lt,
|
|
2426
|
+
scaleY: lt,
|
|
2427
|
+
scaleZ: lt,
|
|
2428
2428
|
skew: me,
|
|
2429
2429
|
skewX: me,
|
|
2430
2430
|
skewY: me,
|
|
@@ -2437,7 +2437,7 @@ const co = /\b([a-z-]*)\(.*?\)/gu, Ut = M(y({}, Se), {
|
|
|
2437
2437
|
z: V,
|
|
2438
2438
|
perspective: V,
|
|
2439
2439
|
transformPerspective: V,
|
|
2440
|
-
opacity:
|
|
2440
|
+
opacity: Xe,
|
|
2441
2441
|
originX: Mn,
|
|
2442
2442
|
originY: Mn,
|
|
2443
2443
|
originZ: V
|
|
@@ -2480,8 +2480,8 @@ const co = /\b([a-z-]*)\(.*?\)/gu, Ut = M(y({}, Se), {
|
|
|
2480
2480
|
}, uo), {
|
|
2481
2481
|
zIndex: Un,
|
|
2482
2482
|
// SVG
|
|
2483
|
-
fillOpacity:
|
|
2484
|
-
strokeOpacity:
|
|
2483
|
+
fillOpacity: Xe,
|
|
2484
|
+
strokeOpacity: Xe,
|
|
2485
2485
|
numOctaves: Un
|
|
2486
2486
|
}), ho = M(y({}, vn), {
|
|
2487
2487
|
// Color props
|
|
@@ -2539,10 +2539,10 @@ class lr {
|
|
|
2539
2539
|
}
|
|
2540
2540
|
}
|
|
2541
2541
|
mount(e) {
|
|
2542
|
-
this.current = e,
|
|
2542
|
+
this.current = e, Ze.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((t, i) => this.bindToMotionValue(i, t)), er.current || Js(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : Yt.current, process.env.NODE_ENV !== "production" && ki(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected."), this.parent && this.parent.children.add(this), this.update(this.props, this.presenceContext);
|
|
2543
2543
|
}
|
|
2544
2544
|
unmount() {
|
|
2545
|
-
this.projection && this.projection.unmount(),
|
|
2545
|
+
this.projection && this.projection.unmount(), Rt(this.notifyUpdate), Rt(this.render), this.valueSubscriptions.forEach((e) => e()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
|
|
2546
2546
|
for (const e in this.events)
|
|
2547
2547
|
this.events[e].clear();
|
|
2548
2548
|
for (const e in this.features) {
|
|
@@ -2553,7 +2553,7 @@ class lr {
|
|
|
2553
2553
|
}
|
|
2554
2554
|
bindToMotionValue(e, t) {
|
|
2555
2555
|
this.valueSubscriptions.has(e) && this.valueSubscriptions.get(e)();
|
|
2556
|
-
const i =
|
|
2556
|
+
const i = Oe.has(e);
|
|
2557
2557
|
i && this.onBindTransform && this.onBindTransform();
|
|
2558
2558
|
const r = t.on("change", (o) => {
|
|
2559
2559
|
this.latestValues[e] = o, this.props.onUpdate && ue.preRender(this.notifyUpdate), i && this.projection && (this.projection.isTransformDirty = !0);
|
|
@@ -2568,8 +2568,8 @@ class lr {
|
|
|
2568
2568
|
}
|
|
2569
2569
|
updateFeatures() {
|
|
2570
2570
|
let e = "animation";
|
|
2571
|
-
for (e in
|
|
2572
|
-
const t =
|
|
2571
|
+
for (e in Gt) {
|
|
2572
|
+
const t = Gt[e];
|
|
2573
2573
|
if (!t)
|
|
2574
2574
|
continue;
|
|
2575
2575
|
const { isEnabled: i, Feature: r } = t;
|
|
@@ -2664,7 +2664,7 @@ class lr {
|
|
|
2664
2664
|
if (this.props.values && this.props.values[e])
|
|
2665
2665
|
return this.props.values[e];
|
|
2666
2666
|
let i = this.values.get(e);
|
|
2667
|
-
return i === void 0 && t !== void 0 && (i =
|
|
2667
|
+
return i === void 0 && t !== void 0 && (i = Je(t === null ? void 0 : t, { owner: this }), this.addValue(e, i)), i;
|
|
2668
2668
|
}
|
|
2669
2669
|
/**
|
|
2670
2670
|
* If we're trying to animate to a previously unencountered value,
|
|
@@ -2701,7 +2701,7 @@ class lr {
|
|
|
2701
2701
|
return r !== void 0 && !J(r) ? r : this.initialValues[e] !== void 0 && i === void 0 ? void 0 : this.baseTarget[e];
|
|
2702
2702
|
}
|
|
2703
2703
|
on(e, t) {
|
|
2704
|
-
return this.events[e] || (this.events[e] = new
|
|
2704
|
+
return this.events[e] || (this.events[e] = new Ei()), this.events[e].add(t);
|
|
2705
2705
|
}
|
|
2706
2706
|
notify(e, ...t) {
|
|
2707
2707
|
this.events[e] && this.events[e].notify(...t);
|
|
@@ -2739,7 +2739,7 @@ function vo(n, e, t) {
|
|
|
2739
2739
|
let i = 0, r;
|
|
2740
2740
|
for (; i < n.length && !r; ) {
|
|
2741
2741
|
const a = n[i];
|
|
2742
|
-
typeof a == "string" && !bo.has(a) &&
|
|
2742
|
+
typeof a == "string" && !bo.has(a) && Qe(a).values.length && (r = n[i]), i++;
|
|
2743
2743
|
}
|
|
2744
2744
|
if (r && t)
|
|
2745
2745
|
for (const a of e)
|
|
@@ -2770,7 +2770,7 @@ class yo extends fn {
|
|
|
2770
2770
|
const u = e[l];
|
|
2771
2771
|
typeof u == "string" && (e[l] = parseFloat(u));
|
|
2772
2772
|
}
|
|
2773
|
-
else
|
|
2773
|
+
else ke[i] && (this.needsMeasurement = !0);
|
|
2774
2774
|
}
|
|
2775
2775
|
resolveNoneKeyframes() {
|
|
2776
2776
|
const { unresolvedKeyframes: e, name: t } = this, i = [];
|
|
@@ -2782,7 +2782,7 @@ class yo extends fn {
|
|
|
2782
2782
|
const { element: e, unresolvedKeyframes: t, name: i } = this;
|
|
2783
2783
|
if (!e || !e.current)
|
|
2784
2784
|
return;
|
|
2785
|
-
i === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin =
|
|
2785
|
+
i === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = ke[i](e.measureViewportBox(), window.getComputedStyle(e.current)), t[0] = this.measuredOrigin;
|
|
2786
2786
|
const r = t[t.length - 1];
|
|
2787
2787
|
r !== void 0 && e.getValue(i, r).jump(r, !1);
|
|
2788
2788
|
}
|
|
@@ -2794,7 +2794,7 @@ class yo extends fn {
|
|
|
2794
2794
|
const r = e.getValue(t);
|
|
2795
2795
|
r && r.jump(this.measuredOrigin, !1);
|
|
2796
2796
|
const a = i.length - 1, s = i[a];
|
|
2797
|
-
i[a] =
|
|
2797
|
+
i[a] = ke[t](e.measureViewportBox(), window.getComputedStyle(e.current)), s !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = s), (o = this.removedTransforms) != null && o.length && this.removedTransforms.forEach(([l, u]) => {
|
|
2798
2798
|
e.getValue(l).set(u);
|
|
2799
2799
|
}), this.resolveNoneKeyframes();
|
|
2800
2800
|
}
|
|
@@ -2825,11 +2825,11 @@ const ur = (n, e) => e && typeof n == "number" ? e.transform(n) : n, Co = {
|
|
|
2825
2825
|
y: "translateY",
|
|
2826
2826
|
z: "translateZ",
|
|
2827
2827
|
transformPerspective: "perspective"
|
|
2828
|
-
},
|
|
2829
|
-
function
|
|
2828
|
+
}, ko = Re.length;
|
|
2829
|
+
function Eo(n, e, t) {
|
|
2830
2830
|
let i = "", r = !0;
|
|
2831
|
-
for (let a = 0; a <
|
|
2832
|
-
const s =
|
|
2831
|
+
for (let a = 0; a < ko; a++) {
|
|
2832
|
+
const s = Re[a], o = n[s];
|
|
2833
2833
|
if (o === void 0)
|
|
2834
2834
|
continue;
|
|
2835
2835
|
let l = !0;
|
|
@@ -2850,10 +2850,10 @@ function hr(n, e, t) {
|
|
|
2850
2850
|
let s = !1, o = !1;
|
|
2851
2851
|
for (const l in e) {
|
|
2852
2852
|
const u = e[l];
|
|
2853
|
-
if (
|
|
2853
|
+
if (Oe.has(l)) {
|
|
2854
2854
|
s = !0;
|
|
2855
2855
|
continue;
|
|
2856
|
-
} else if (
|
|
2856
|
+
} else if (_i(l)) {
|
|
2857
2857
|
r[l] = u;
|
|
2858
2858
|
continue;
|
|
2859
2859
|
} else {
|
|
@@ -2861,7 +2861,7 @@ function hr(n, e, t) {
|
|
|
2861
2861
|
l.startsWith("origin") ? (o = !0, a[l] = d) : i[l] = d;
|
|
2862
2862
|
}
|
|
2863
2863
|
}
|
|
2864
|
-
if (e.transform || (s || t ? i.transform =
|
|
2864
|
+
if (e.transform || (s || t ? i.transform = Eo(e, n.transform, t) : i.transform && (i.transform = "none")), o) {
|
|
2865
2865
|
const { originX: l = "50%", originY: u = "50%", originZ: d = 0 } = a;
|
|
2866
2866
|
i.transformOrigin = `${l} ${u} ${d}`;
|
|
2867
2867
|
}
|
|
@@ -2873,7 +2873,7 @@ function pr(n, { style: e, vars: t }, i, r) {
|
|
|
2873
2873
|
}
|
|
2874
2874
|
const xo = {};
|
|
2875
2875
|
function wo(n, { layout: e, layoutId: t }) {
|
|
2876
|
-
return
|
|
2876
|
+
return Oe.has(n) || n.startsWith("origin") || (e || t !== void 0) && (!!xo[n] || n === "opacity");
|
|
2877
2877
|
}
|
|
2878
2878
|
function mr(n, e, t) {
|
|
2879
2879
|
var a;
|
|
@@ -2885,16 +2885,16 @@ function mr(n, e, t) {
|
|
|
2885
2885
|
function To(n) {
|
|
2886
2886
|
return window.getComputedStyle(n);
|
|
2887
2887
|
}
|
|
2888
|
-
class
|
|
2888
|
+
class _o extends dr {
|
|
2889
2889
|
constructor() {
|
|
2890
2890
|
super(...arguments), this.type = "html", this.renderInstance = pr;
|
|
2891
2891
|
}
|
|
2892
2892
|
readValueFromInstance(e, t) {
|
|
2893
2893
|
var i;
|
|
2894
|
-
if (
|
|
2894
|
+
if (Oe.has(t))
|
|
2895
2895
|
return (i = this.projection) != null && i.isProjecting ? zt(t) : Cs(e, t);
|
|
2896
2896
|
{
|
|
2897
|
-
const r = To(e), a = (
|
|
2897
|
+
const r = To(e), a = (_i(t) ? r.getPropertyValue(t) : r[t]) || 0;
|
|
2898
2898
|
return typeof a == "string" ? a.trim() : a;
|
|
2899
2899
|
}
|
|
2900
2900
|
}
|
|
@@ -2908,15 +2908,15 @@ class Ao extends dr {
|
|
|
2908
2908
|
return mr(e, t, i);
|
|
2909
2909
|
}
|
|
2910
2910
|
}
|
|
2911
|
-
function
|
|
2911
|
+
function Ao(n, e) {
|
|
2912
2912
|
return n in e;
|
|
2913
2913
|
}
|
|
2914
|
-
class
|
|
2914
|
+
class Lo extends lr {
|
|
2915
2915
|
constructor() {
|
|
2916
2916
|
super(...arguments), this.type = "object";
|
|
2917
2917
|
}
|
|
2918
2918
|
readValueFromInstance(e, t) {
|
|
2919
|
-
if (
|
|
2919
|
+
if (Ao(t, e)) {
|
|
2920
2920
|
const i = e[t];
|
|
2921
2921
|
if (typeof i == "string" || typeof i == "number")
|
|
2922
2922
|
return i;
|
|
@@ -3004,16 +3004,16 @@ const fr = /* @__PURE__ */ new Set([
|
|
|
3004
3004
|
"textLength",
|
|
3005
3005
|
"lengthAdjust"
|
|
3006
3006
|
]), Do = (n) => typeof n == "string" && n.toLowerCase() === "svg";
|
|
3007
|
-
function
|
|
3007
|
+
function Ro(n, e, t, i) {
|
|
3008
3008
|
pr(n, e, void 0, i);
|
|
3009
3009
|
for (const r in e.attrs)
|
|
3010
3010
|
n.setAttribute(fr.has(r) ? r : rn(r), e.attrs[r]);
|
|
3011
3011
|
}
|
|
3012
|
-
function
|
|
3012
|
+
function Oo(n, e, t) {
|
|
3013
3013
|
const i = mr(n, e, t);
|
|
3014
3014
|
for (const r in n)
|
|
3015
3015
|
if (J(n[r]) || J(e[r])) {
|
|
3016
|
-
const a =
|
|
3016
|
+
const a = Re.indexOf(r) !== -1 ? "attr" + r.charAt(0).toUpperCase() + r.substring(1) : r;
|
|
3017
3017
|
i[a] = n[r];
|
|
3018
3018
|
}
|
|
3019
3019
|
return i;
|
|
@@ -3026,20 +3026,20 @@ class No extends dr {
|
|
|
3026
3026
|
return e[t];
|
|
3027
3027
|
}
|
|
3028
3028
|
readValueFromInstance(e, t) {
|
|
3029
|
-
if (
|
|
3029
|
+
if (Oe.has(t)) {
|
|
3030
3030
|
const i = sr(t);
|
|
3031
3031
|
return i && i.default || 0;
|
|
3032
3032
|
}
|
|
3033
3033
|
return t = fr.has(t) ? t : rn(t), e.getAttribute(t);
|
|
3034
3034
|
}
|
|
3035
3035
|
scrapeMotionValuesFromProps(e, t, i) {
|
|
3036
|
-
return
|
|
3036
|
+
return Oo(e, t, i);
|
|
3037
3037
|
}
|
|
3038
3038
|
build(e, t, i) {
|
|
3039
3039
|
Po(e, t, this.isSVGTag, i.transformTemplate, i.style);
|
|
3040
3040
|
}
|
|
3041
3041
|
renderInstance(e, t, i, r) {
|
|
3042
|
-
|
|
3042
|
+
Ro(e, t, i, r);
|
|
3043
3043
|
}
|
|
3044
3044
|
mount(e) {
|
|
3045
3045
|
this.isSVGTag = Do(e.tagName), super.mount(e);
|
|
@@ -3065,8 +3065,8 @@ function Fo(n) {
|
|
|
3065
3065
|
},
|
|
3066
3066
|
latestValues: {}
|
|
3067
3067
|
}
|
|
3068
|
-
}, t = gr(n) && !So(n) ? new No(e) : new
|
|
3069
|
-
t.mount(n),
|
|
3068
|
+
}, t = gr(n) && !So(n) ? new No(e) : new _o(e);
|
|
3069
|
+
t.mount(n), Ze.set(n, t);
|
|
3070
3070
|
}
|
|
3071
3071
|
function jo(n) {
|
|
3072
3072
|
const e = {
|
|
@@ -3078,11 +3078,11 @@ function jo(n) {
|
|
|
3078
3078
|
},
|
|
3079
3079
|
latestValues: {}
|
|
3080
3080
|
}
|
|
3081
|
-
}, t = new
|
|
3082
|
-
t.mount(n),
|
|
3081
|
+
}, t = new Lo(e);
|
|
3082
|
+
t.mount(n), Ze.set(n, t);
|
|
3083
3083
|
}
|
|
3084
3084
|
function Bo(n, e, t) {
|
|
3085
|
-
const i = J(n) ? n :
|
|
3085
|
+
const i = J(n) ? n : Je(n);
|
|
3086
3086
|
return i.start(Xi("", i, e, t)), i.animation;
|
|
3087
3087
|
}
|
|
3088
3088
|
function zo(n, e) {
|
|
@@ -3097,16 +3097,16 @@ function br(n, e, t, i) {
|
|
|
3097
3097
|
ce(!!s, "No valid elements provided.");
|
|
3098
3098
|
for (let o = 0; o < s; o++) {
|
|
3099
3099
|
const l = a[o], u = l instanceof Element ? Fo : jo;
|
|
3100
|
-
|
|
3101
|
-
const d =
|
|
3102
|
-
"delay" in h && typeof h.delay == "function" && (h.delay = h.delay(o, s)), r.push(...
|
|
3100
|
+
Ze.has(l) || u(l);
|
|
3101
|
+
const d = Ze.get(l), h = y({}, t);
|
|
3102
|
+
"delay" in h && typeof h.delay == "function" && (h.delay = h.delay(o, s)), r.push(...Gs(d, M(y({}, e), { transition: h }), {}));
|
|
3103
3103
|
}
|
|
3104
3104
|
}
|
|
3105
3105
|
return r;
|
|
3106
3106
|
}
|
|
3107
3107
|
function $o(n, e, t) {
|
|
3108
3108
|
const i = [];
|
|
3109
|
-
return Zr(n, e, t, { spring:
|
|
3109
|
+
return Zr(n, e, t, { spring: et }).forEach(({ keyframes: a, transition: s }, o) => {
|
|
3110
3110
|
i.push(...br(o, a, s));
|
|
3111
3111
|
}), i;
|
|
3112
3112
|
}
|
|
@@ -3181,17 +3181,17 @@ class qo extends Ko {
|
|
|
3181
3181
|
});
|
|
3182
3182
|
}
|
|
3183
3183
|
}
|
|
3184
|
-
function
|
|
3184
|
+
function Ho(n) {
|
|
3185
3185
|
return Array.isArray(n) && n.some(Array.isArray);
|
|
3186
3186
|
}
|
|
3187
|
-
function
|
|
3187
|
+
function Go(n) {
|
|
3188
3188
|
function e(t, i, r) {
|
|
3189
3189
|
let a = [];
|
|
3190
|
-
return
|
|
3190
|
+
return Ho(t) ? a = $o(t, i, n) : a = br(t, i, r, n), new qo(a);
|
|
3191
3191
|
}
|
|
3192
3192
|
return e;
|
|
3193
3193
|
}
|
|
3194
|
-
const
|
|
3194
|
+
const G = Go(), Yo = "_spinner_1lif3_1", Uo = "_spinnerContainer_1lif3_5", Wo = "_success_1lif3_9", Zo = "_successContainer_1lif3_14", Jo = "_container_1lif3_57", Xo = "_card_1lif3_66", Qo = "_warning_1lif3_75", el = "_svg_1lif3_83", tl = "_srOnly_1lif3_88", nl = "_backButton_1lif3_92", S = {
|
|
3195
3195
|
spinner: Yo,
|
|
3196
3196
|
spinnerContainer: Uo,
|
|
3197
3197
|
success: Wo,
|
|
@@ -3254,7 +3254,7 @@ const al = "_checkout_15zm1_1", sl = "_hidden_15zm1_8", ol = "_formInitial_15zm1
|
|
|
3254
3254
|
buttons: cl,
|
|
3255
3255
|
hidden: dl,
|
|
3256
3256
|
skeleton: ul
|
|
3257
|
-
}, hl = "_applePay_1wlwu_1", pl = "_hidden_1wlwu_13",
|
|
3257
|
+
}, hl = "_applePay_1wlwu_1", pl = "_hidden_1wlwu_13", Lt = {
|
|
3258
3258
|
applePay: hl,
|
|
3259
3259
|
hidden: pl
|
|
3260
3260
|
};
|
|
@@ -3525,15 +3525,15 @@ function vl() {
|
|
|
3525
3525
|
}
|
|
3526
3526
|
return qe.findBestMatch = e, qe;
|
|
3527
3527
|
}
|
|
3528
|
-
var
|
|
3528
|
+
var He, ii;
|
|
3529
3529
|
function yl() {
|
|
3530
|
-
if (ii) return
|
|
3530
|
+
if (ii) return He;
|
|
3531
3531
|
ii = 1;
|
|
3532
|
-
var n =
|
|
3532
|
+
var n = He && He.__assign || function() {
|
|
3533
3533
|
return n = Object.assign || function(g) {
|
|
3534
|
-
for (var b, v = 1,
|
|
3534
|
+
for (var b, v = 1, k = arguments.length; v < k; v++) {
|
|
3535
3535
|
b = arguments[v];
|
|
3536
|
-
for (var
|
|
3536
|
+
for (var L in b) Object.prototype.hasOwnProperty.call(b, L) && (g[L] = b[L]);
|
|
3537
3537
|
}
|
|
3538
3538
|
return g;
|
|
3539
3539
|
}, n.apply(this, arguments);
|
|
@@ -3585,9 +3585,9 @@ function yl() {
|
|
|
3585
3585
|
return b;
|
|
3586
3586
|
if (g.length === 0)
|
|
3587
3587
|
return h();
|
|
3588
|
-
u.forEach(function(
|
|
3589
|
-
var
|
|
3590
|
-
(0, t.addMatchingCardsToResults)(g,
|
|
3588
|
+
u.forEach(function(k) {
|
|
3589
|
+
var L = d(k);
|
|
3590
|
+
(0, t.addMatchingCardsToResults)(g, L, b);
|
|
3591
3591
|
});
|
|
3592
3592
|
var v = (0, r.findBestMatch)(b);
|
|
3593
3593
|
return v ? [v] : b;
|
|
@@ -3606,14 +3606,14 @@ function yl() {
|
|
|
3606
3606
|
throw new Error('"'.concat(g, "\" is not a recognized type. Use `addCard` instead.'"));
|
|
3607
3607
|
if (b.type && v.type !== b.type)
|
|
3608
3608
|
throw new Error("Cannot overwrite type parameter.");
|
|
3609
|
-
var
|
|
3610
|
-
|
|
3609
|
+
var k = (0, a.clone)(v);
|
|
3610
|
+
k = n(n({}, k), b), s[k.type] = k;
|
|
3611
3611
|
}, p.changeOrder = function(g, b) {
|
|
3612
3612
|
var v = m(g);
|
|
3613
3613
|
u.splice(v, 1), u.splice(b, 0, g);
|
|
3614
3614
|
}, p.resetModifications = function() {
|
|
3615
3615
|
u = (0, a.clone)(l), s = {};
|
|
3616
|
-
}, p.types = o,
|
|
3616
|
+
}, p.types = o, He = p, He;
|
|
3617
3617
|
}
|
|
3618
3618
|
var Pe = yl();
|
|
3619
3619
|
Pe.updateCard("visa", {
|
|
@@ -3629,10 +3629,10 @@ const Cl = (n, e) => {
|
|
|
3629
3629
|
o.push(i.slice(u, d));
|
|
3630
3630
|
}
|
|
3631
3631
|
return o.join(" ").slice(0, a);
|
|
3632
|
-
},
|
|
3632
|
+
}, kl = (n, e) => {
|
|
3633
3633
|
const t = Pe.getTypeInfo(e), i = (t == null ? void 0 : t.code.size) || 4;
|
|
3634
3634
|
return n.replace(/\D/g, "").slice(0, i);
|
|
3635
|
-
},
|
|
3635
|
+
}, El = (n) => {
|
|
3636
3636
|
const e = n.replace(/\D/g, "");
|
|
3637
3637
|
let t = e.slice(0, 2);
|
|
3638
3638
|
if (!t) return "";
|
|
@@ -3649,7 +3649,7 @@ const Cl = (n, e) => {
|
|
|
3649
3649
|
return e.length === 6 ? r = e.slice(4, 6) : r = e.slice(2, 4), `${t} / ${r}`;
|
|
3650
3650
|
};
|
|
3651
3651
|
var Y = /* @__PURE__ */ ((n) => (n.Invalid = "invalid", n.Empty = "empty", n.Incomplete = "incomplete", n.Unsupported = "unsupported", n.Expired = "expired", n))(Y || {}), we = /* @__PURE__ */ ((n) => (n.Visa = "visa", n.Mastercard = "mastercard", n))(we || {});
|
|
3652
|
-
const
|
|
3652
|
+
const gt = [
|
|
3653
3653
|
{ name: "Visa", type: "visa", pattern: /^4/, minLength: 16, maxLength: 16 },
|
|
3654
3654
|
{
|
|
3655
3655
|
name: "MasterCard",
|
|
@@ -3710,16 +3710,16 @@ const bt = [
|
|
|
3710
3710
|
}, Tl = (n) => {
|
|
3711
3711
|
var e, t;
|
|
3712
3712
|
return (t = (e = Fe.find((i) => i.name === "JCB")) == null ? void 0 : e.pattern.test(n)) != null ? t : !1;
|
|
3713
|
-
},
|
|
3713
|
+
}, _l = (n) => {
|
|
3714
3714
|
var e, t;
|
|
3715
3715
|
return (t = (e = Fe.find((i) => i.name === "Diners Club")) == null ? void 0 : e.pattern.test(n)) != null ? t : !1;
|
|
3716
|
-
},
|
|
3716
|
+
}, Al = (n) => {
|
|
3717
3717
|
var e, t;
|
|
3718
3718
|
return (t = (e = Fe.find((i) => i.name === "Union Pay")) == null ? void 0 : e.pattern.test(n)) != null ? t : !1;
|
|
3719
|
-
},
|
|
3719
|
+
}, Ll = (n) => {
|
|
3720
3720
|
var e, t;
|
|
3721
3721
|
return (t = (e = Fe.find((i) => i.name === "Maestro")) == null ? void 0 : e.pattern.test(n)) != null ? t : !1;
|
|
3722
|
-
}, Cr = (n) =>
|
|
3722
|
+
}, Cr = (n) => gt.find((e) => e.pattern.test(n)) || null, ri = (n) => gt.filter((e) => e.pattern.test(n)), Vl = (n) => {
|
|
3723
3723
|
let e = 0, t = !1;
|
|
3724
3724
|
for (let i = n.length - 1; i >= 0; i--) {
|
|
3725
3725
|
let r = parseInt(n[i]);
|
|
@@ -3732,7 +3732,7 @@ const bt = [
|
|
|
3732
3732
|
return { isValid: !1, cardType: null, error: Y.Empty };
|
|
3733
3733
|
if (!/^\d+$/.test(t))
|
|
3734
3734
|
return { isValid: !1, cardType: null, error: Y.Invalid };
|
|
3735
|
-
if (xl(t) || wl(t) || Tl(t) ||
|
|
3735
|
+
if (xl(t) || wl(t) || Tl(t) || _l(t) || Al(t) || Ll(t))
|
|
3736
3736
|
return { isValid: !1, cardType: null, error: Y.Unsupported };
|
|
3737
3737
|
const i = Cr(t);
|
|
3738
3738
|
if (i) {
|
|
@@ -3764,7 +3764,7 @@ const bt = [
|
|
|
3764
3764
|
}, Il = (n) => {
|
|
3765
3765
|
var e;
|
|
3766
3766
|
return n ? typeof n.amount != "number" ? (console.error("Transaction amount is missing or invalid for Google Pay"), null) : n.currency ? n.country ? n.merchant_id ? n.checkout_config && !((e = n.checkout_config) == null ? void 0 : e.find(
|
|
3767
|
-
({ is_active: i, type: r }) => i && r ===
|
|
3767
|
+
({ is_active: i, type: r }) => i && r === T.GOOGLE_PAY
|
|
3768
3768
|
)) ? null : {
|
|
3769
3769
|
amount: n.amount,
|
|
3770
3770
|
currency: n.currency,
|
|
@@ -3775,7 +3775,7 @@ const bt = [
|
|
|
3775
3775
|
}, Ml = (n) => {
|
|
3776
3776
|
var e, t;
|
|
3777
3777
|
return n ? typeof n.amount != "number" ? (console.error("Transaction amount is missing or invalid for Apple Pay"), null) : n.currency ? n.country ? n.merchant_id ? n.checkout_config && !((e = n.checkout_config) == null ? void 0 : e.find(
|
|
3778
|
-
({ is_active: r, type: a }) => r && a ===
|
|
3778
|
+
({ is_active: r, type: a }) => r && a === T.APPLE_PAY
|
|
3779
3779
|
)) ? null : {
|
|
3780
3780
|
amount: n.amount,
|
|
3781
3781
|
currency: n.currency,
|
|
@@ -3834,7 +3834,7 @@ const bt = [
|
|
|
3834
3834
|
tr: "tr-TR",
|
|
3835
3835
|
vi: "vi-VN",
|
|
3836
3836
|
zh: "zh-CN"
|
|
3837
|
-
})[n] || "en-US",
|
|
3837
|
+
})[n] || "en-US", Rl = (n) => ({
|
|
3838
3838
|
en: "en",
|
|
3839
3839
|
ar: "ar",
|
|
3840
3840
|
bg: "bg",
|
|
@@ -3866,7 +3866,7 @@ const bt = [
|
|
|
3866
3866
|
tr: "tr",
|
|
3867
3867
|
ua: "uk",
|
|
3868
3868
|
zh: "zh"
|
|
3869
|
-
})[n] || "en",
|
|
3869
|
+
})[n] || "en", Ol = (n) => ({
|
|
3870
3870
|
en: "en_US",
|
|
3871
3871
|
ar: "ar_EG",
|
|
3872
3872
|
cs: "cs_CZ",
|
|
@@ -3891,7 +3891,7 @@ const bt = [
|
|
|
3891
3891
|
zh: "zh_CN",
|
|
3892
3892
|
mt: "en_GB"
|
|
3893
3893
|
})[n] || "en_US";
|
|
3894
|
-
var
|
|
3894
|
+
var ct = { exports: {} }, Ge = {};
|
|
3895
3895
|
/**
|
|
3896
3896
|
* @license React
|
|
3897
3897
|
* react-jsx-runtime.production.js
|
|
@@ -3903,7 +3903,7 @@ var dt = { exports: {} }, He = {};
|
|
|
3903
3903
|
*/
|
|
3904
3904
|
var si;
|
|
3905
3905
|
function Nl() {
|
|
3906
|
-
if (si) return
|
|
3906
|
+
if (si) return Ge;
|
|
3907
3907
|
si = 1;
|
|
3908
3908
|
var n = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
3909
3909
|
function t(i, r, a) {
|
|
@@ -3921,7 +3921,7 @@ function Nl() {
|
|
|
3921
3921
|
props: a
|
|
3922
3922
|
};
|
|
3923
3923
|
}
|
|
3924
|
-
return
|
|
3924
|
+
return Ge.Fragment = e, Ge.jsx = t, Ge.jsxs = t, Ge;
|
|
3925
3925
|
}
|
|
3926
3926
|
var Ye = {};
|
|
3927
3927
|
/**
|
|
@@ -3939,20 +3939,20 @@ function Sl() {
|
|
|
3939
3939
|
function n(f) {
|
|
3940
3940
|
if (f == null) return null;
|
|
3941
3941
|
if (typeof f == "function")
|
|
3942
|
-
return f.$$typeof ===
|
|
3942
|
+
return f.$$typeof === O ? null : f.displayName || f.name || null;
|
|
3943
3943
|
if (typeof f == "string") return f;
|
|
3944
3944
|
switch (f) {
|
|
3945
3945
|
case b:
|
|
3946
3946
|
return "Fragment";
|
|
3947
|
-
case
|
|
3947
|
+
case k:
|
|
3948
3948
|
return "Profiler";
|
|
3949
3949
|
case v:
|
|
3950
3950
|
return "StrictMode";
|
|
3951
|
-
case
|
|
3951
|
+
case _:
|
|
3952
3952
|
return "Suspense";
|
|
3953
3953
|
case D:
|
|
3954
3954
|
return "SuspenseList";
|
|
3955
|
-
case
|
|
3955
|
+
case R:
|
|
3956
3956
|
return "Activity";
|
|
3957
3957
|
}
|
|
3958
3958
|
if (typeof f == "object")
|
|
@@ -3961,9 +3961,9 @@ function Sl() {
|
|
|
3961
3961
|
), f.$$typeof) {
|
|
3962
3962
|
case g:
|
|
3963
3963
|
return "Portal";
|
|
3964
|
-
case
|
|
3964
|
+
case w:
|
|
3965
3965
|
return (f.displayName || "Context") + ".Provider";
|
|
3966
|
-
case
|
|
3966
|
+
case L:
|
|
3967
3967
|
return (f._context.displayName || "Context") + ".Consumer";
|
|
3968
3968
|
case I:
|
|
3969
3969
|
var P = f.render;
|
|
@@ -3991,11 +3991,11 @@ function Sl() {
|
|
|
3991
3991
|
}
|
|
3992
3992
|
if (P) {
|
|
3993
3993
|
P = console;
|
|
3994
|
-
var N = P.error,
|
|
3994
|
+
var N = P.error, H = typeof Symbol == "function" && Symbol.toStringTag && f[Symbol.toStringTag] || f.constructor.name || "Object";
|
|
3995
3995
|
return N.call(
|
|
3996
3996
|
P,
|
|
3997
3997
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
3998
|
-
|
|
3998
|
+
H
|
|
3999
3999
|
), e(f);
|
|
4000
4000
|
}
|
|
4001
4001
|
}
|
|
@@ -4011,7 +4011,7 @@ function Sl() {
|
|
|
4011
4011
|
}
|
|
4012
4012
|
}
|
|
4013
4013
|
function r() {
|
|
4014
|
-
var f =
|
|
4014
|
+
var f = K.A;
|
|
4015
4015
|
return f === null ? null : f.getOwner();
|
|
4016
4016
|
}
|
|
4017
4017
|
function a() {
|
|
@@ -4038,11 +4038,11 @@ function Sl() {
|
|
|
4038
4038
|
}
|
|
4039
4039
|
function l() {
|
|
4040
4040
|
var f = n(this.type);
|
|
4041
|
-
return
|
|
4041
|
+
return kt[f] || (kt[f] = !0, console.error(
|
|
4042
4042
|
"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."
|
|
4043
4043
|
)), f = this.props.ref, f !== void 0 ? f : null;
|
|
4044
4044
|
}
|
|
4045
|
-
function u(f, P, N,
|
|
4045
|
+
function u(f, P, N, H, ie, X, _e, Ae) {
|
|
4046
4046
|
return N = X.ref, f = {
|
|
4047
4047
|
$$typeof: p,
|
|
4048
4048
|
type: f,
|
|
@@ -4066,21 +4066,21 @@ function Sl() {
|
|
|
4066
4066
|
configurable: !1,
|
|
4067
4067
|
enumerable: !1,
|
|
4068
4068
|
writable: !0,
|
|
4069
|
-
value:
|
|
4069
|
+
value: _e
|
|
4070
4070
|
}), Object.defineProperty(f, "_debugTask", {
|
|
4071
4071
|
configurable: !1,
|
|
4072
4072
|
enumerable: !1,
|
|
4073
4073
|
writable: !0,
|
|
4074
|
-
value:
|
|
4074
|
+
value: Ae
|
|
4075
4075
|
}), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
|
|
4076
4076
|
}
|
|
4077
|
-
function d(f, P, N,
|
|
4077
|
+
function d(f, P, N, H, ie, X, _e, Ae) {
|
|
4078
4078
|
var z = P.children;
|
|
4079
4079
|
if (z !== void 0)
|
|
4080
|
-
if (
|
|
4080
|
+
if (H)
|
|
4081
4081
|
if (te(z)) {
|
|
4082
|
-
for (
|
|
4083
|
-
h(z[
|
|
4082
|
+
for (H = 0; H < z.length; H++)
|
|
4083
|
+
h(z[H]);
|
|
4084
4084
|
Object.freeze && Object.freeze(z);
|
|
4085
4085
|
} else
|
|
4086
4086
|
console.error(
|
|
@@ -4092,18 +4092,18 @@ function Sl() {
|
|
|
4092
4092
|
var re = Object.keys(P).filter(function(ge) {
|
|
4093
4093
|
return ge !== "key";
|
|
4094
4094
|
});
|
|
4095
|
-
|
|
4095
|
+
H = 0 < re.length ? "{key: someKey, " + re.join(": ..., ") + ": ...}" : "{key: someKey}", ne[z + H] || (re = 0 < re.length ? "{" + re.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
4096
4096
|
`A props object containing a "key" prop is being spread into JSX:
|
|
4097
4097
|
let props = %s;
|
|
4098
4098
|
<%s {...props} />
|
|
4099
4099
|
React keys must be passed directly to JSX without using spread:
|
|
4100
4100
|
let props = %s;
|
|
4101
4101
|
<%s key={someKey} {...props} />`,
|
|
4102
|
-
|
|
4102
|
+
H,
|
|
4103
4103
|
z,
|
|
4104
4104
|
re,
|
|
4105
4105
|
z
|
|
4106
|
-
), ne[z +
|
|
4106
|
+
), ne[z + H] = !0);
|
|
4107
4107
|
}
|
|
4108
4108
|
if (z = null, N !== void 0 && (t(N), z = "" + N), s(P) && (t(P.key), z = "" + P.key), "key" in P) {
|
|
4109
4109
|
N = {};
|
|
@@ -4120,14 +4120,14 @@ React keys must be passed directly to JSX without using spread:
|
|
|
4120
4120
|
ie,
|
|
4121
4121
|
r(),
|
|
4122
4122
|
N,
|
|
4123
|
-
|
|
4124
|
-
|
|
4123
|
+
_e,
|
|
4124
|
+
Ae
|
|
4125
4125
|
);
|
|
4126
4126
|
}
|
|
4127
4127
|
function h(f) {
|
|
4128
4128
|
typeof f == "object" && f !== null && f.$$typeof === p && f._store && (f._store.validated = 1);
|
|
4129
4129
|
}
|
|
4130
|
-
var m = wr, p = Symbol.for("react.transitional.element"), g = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), v = Symbol.for("react.strict_mode"),
|
|
4130
|
+
var m = wr, p = Symbol.for("react.transitional.element"), g = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), v = Symbol.for("react.strict_mode"), k = Symbol.for("react.profiler"), L = Symbol.for("react.consumer"), w = Symbol.for("react.context"), I = Symbol.for("react.forward_ref"), _ = Symbol.for("react.suspense"), D = Symbol.for("react.suspense_list"), C = Symbol.for("react.memo"), x = Symbol.for("react.lazy"), R = Symbol.for("react.activity"), O = Symbol.for("react.client.reference"), K = 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() {
|
|
4131
4131
|
return null;
|
|
4132
4132
|
};
|
|
4133
4133
|
m = {
|
|
@@ -4135,40 +4135,40 @@ React keys must be passed directly to JSX without using spread:
|
|
|
4135
4135
|
return f();
|
|
4136
4136
|
}
|
|
4137
4137
|
};
|
|
4138
|
-
var he,
|
|
4138
|
+
var he, kt = {}, Et = m.react_stack_bottom_frame.bind(
|
|
4139
4139
|
m,
|
|
4140
4140
|
a
|
|
4141
|
-
)(),
|
|
4142
|
-
Ye.Fragment = b, Ye.jsx = function(f, P, N,
|
|
4143
|
-
var X = 1e4 >
|
|
4141
|
+
)(), at = fe(i(a)), ne = {};
|
|
4142
|
+
Ye.Fragment = b, Ye.jsx = function(f, P, N, H, ie) {
|
|
4143
|
+
var X = 1e4 > K.recentlyCreatedOwnerStacks++;
|
|
4144
4144
|
return d(
|
|
4145
4145
|
f,
|
|
4146
4146
|
P,
|
|
4147
4147
|
N,
|
|
4148
4148
|
!1,
|
|
4149
|
-
|
|
4149
|
+
H,
|
|
4150
4150
|
ie,
|
|
4151
|
-
X ? Error("react-stack-top-frame") :
|
|
4152
|
-
X ? fe(i(f)) :
|
|
4151
|
+
X ? Error("react-stack-top-frame") : Et,
|
|
4152
|
+
X ? fe(i(f)) : at
|
|
4153
4153
|
);
|
|
4154
|
-
}, Ye.jsxs = function(f, P, N,
|
|
4155
|
-
var X = 1e4 >
|
|
4154
|
+
}, Ye.jsxs = function(f, P, N, H, ie) {
|
|
4155
|
+
var X = 1e4 > K.recentlyCreatedOwnerStacks++;
|
|
4156
4156
|
return d(
|
|
4157
4157
|
f,
|
|
4158
4158
|
P,
|
|
4159
4159
|
N,
|
|
4160
4160
|
!0,
|
|
4161
|
-
|
|
4161
|
+
H,
|
|
4162
4162
|
ie,
|
|
4163
|
-
X ? Error("react-stack-top-frame") :
|
|
4164
|
-
X ? fe(i(f)) :
|
|
4163
|
+
X ? Error("react-stack-top-frame") : Et,
|
|
4164
|
+
X ? fe(i(f)) : at
|
|
4165
4165
|
);
|
|
4166
4166
|
};
|
|
4167
4167
|
}()), Ye;
|
|
4168
4168
|
}
|
|
4169
4169
|
var li;
|
|
4170
4170
|
function Fl() {
|
|
4171
|
-
return li || (li = 1, process.env.NODE_ENV === "production" ?
|
|
4171
|
+
return li || (li = 1, process.env.NODE_ENV === "production" ? ct.exports = Nl() : ct.exports = Sl()), ct.exports;
|
|
4172
4172
|
}
|
|
4173
4173
|
Fl();
|
|
4174
4174
|
const jl = [
|
|
@@ -4180,12 +4180,12 @@ const jl = [
|
|
|
4180
4180
|
we.Visa
|
|
4181
4181
|
// CardType.UnionPay,
|
|
4182
4182
|
// CardType.Maestro,
|
|
4183
|
-
],
|
|
4183
|
+
], bt = (n, e) => (console.error("Error: ", n), e.status.error);
|
|
4184
4184
|
class Bl {
|
|
4185
4185
|
constructor(e) {
|
|
4186
4186
|
c(this, "element");
|
|
4187
4187
|
c(this, "events", {
|
|
4188
|
-
ready: new
|
|
4188
|
+
ready: new q()
|
|
4189
4189
|
});
|
|
4190
4190
|
c(this, "ev");
|
|
4191
4191
|
c(this, "customButtonStyles");
|
|
@@ -4193,10 +4193,10 @@ class Bl {
|
|
|
4193
4193
|
c(this, "onPaymentAttempt");
|
|
4194
4194
|
this.config = e;
|
|
4195
4195
|
const t = this.config.state.styles.getState().ApplePayButton;
|
|
4196
|
-
this.onPaymentAttempt = this.config.state.checkout.getState().onCheckoutAttempt, this.ev = this.config.service.ev, this.customButtonStyles = t, this.element = document.createElement("div"), this.element.classList.add(
|
|
4196
|
+
this.onPaymentAttempt = this.config.state.checkout.getState().onCheckoutAttempt, this.ev = this.config.service.ev, this.customButtonStyles = t, this.element = document.createElement("div"), this.element.classList.add(Lt.applePay, Lt.hidden);
|
|
4197
4197
|
}
|
|
4198
4198
|
init(e) {
|
|
4199
|
-
return
|
|
4199
|
+
return E(this, null, function* () {
|
|
4200
4200
|
if (!this.config) return !1;
|
|
4201
4201
|
const t = this.config.state.transaction.getState(), i = this.config.state.translate.locale(), r = Ml(t);
|
|
4202
4202
|
if (!r)
|
|
@@ -4209,7 +4209,7 @@ class Bl {
|
|
|
4209
4209
|
return;
|
|
4210
4210
|
}
|
|
4211
4211
|
const o = this.config.state.translate.messages();
|
|
4212
|
-
s != null && s.toLowerCase().includes("cancelled") ? (l = e.onCancel) == null || l.call(e) : (
|
|
4212
|
+
s != null && s.toLowerCase().includes("cancelled") ? (l = e.onCancel) == null || l.call(e) : (bt(s, o), (u = e.onError) == null || u.call(e, s));
|
|
4213
4213
|
},
|
|
4214
4214
|
onSuccess: (s) => {
|
|
4215
4215
|
var o;
|
|
@@ -4224,7 +4224,7 @@ class Bl {
|
|
|
4224
4224
|
onPaymentAttempt: this.onPaymentAttempt
|
|
4225
4225
|
}),
|
|
4226
4226
|
this.customButtonStyles
|
|
4227
|
-
), this.ev.isAppleAvailable() ? (yield this.ev.renderApple(this.element), this.isInitialized = !0, this.element.classList.remove(
|
|
4227
|
+
), this.ev.isAppleAvailable() ? (yield this.ev.renderApple(this.element), this.isInitialized = !0, this.element.classList.remove(Lt.hidden), this.events.ready.emit(), !0) : !1;
|
|
4228
4228
|
});
|
|
4229
4229
|
}
|
|
4230
4230
|
addEventListener(e, t) {
|
|
@@ -4235,16 +4235,16 @@ class Bl {
|
|
|
4235
4235
|
}
|
|
4236
4236
|
}
|
|
4237
4237
|
const zl = [
|
|
4238
|
-
{ type:
|
|
4239
|
-
{ type:
|
|
4240
|
-
{ type:
|
|
4241
|
-
{ type:
|
|
4242
|
-
{ type:
|
|
4243
|
-
],
|
|
4238
|
+
{ type: T.PAYPAL, is_active: !1, order: 1 },
|
|
4239
|
+
{ type: T.APPLE_PAY, is_active: !1, order: 2 },
|
|
4240
|
+
{ type: T.GOOGLE_PAY, is_active: !1, order: 3 },
|
|
4241
|
+
{ type: T.VENMO, is_active: !1, order: 4 },
|
|
4242
|
+
{ type: T.CARD, is_active: !0, order: 5 }
|
|
4243
|
+
], Le = {
|
|
4244
4244
|
open: { y: 0, opacity: 1 },
|
|
4245
4245
|
close: { y: 100, opacity: 0 },
|
|
4246
4246
|
transition: { duration: 0.25, ease: "easeOut" }
|
|
4247
|
-
},
|
|
4247
|
+
}, dt = {
|
|
4248
4248
|
open: { y: 0, opacity: 1 },
|
|
4249
4249
|
close: { y: -100, opacity: 0 },
|
|
4250
4250
|
transition: { duration: 0.25, ease: "easeOut" }
|
|
@@ -4264,7 +4264,7 @@ class ql {
|
|
|
4264
4264
|
constructor(e) {
|
|
4265
4265
|
c(this, "element");
|
|
4266
4266
|
c(this, "events", {
|
|
4267
|
-
ready: new
|
|
4267
|
+
ready: new q()
|
|
4268
4268
|
});
|
|
4269
4269
|
c(this, "ev");
|
|
4270
4270
|
c(this, "customButtonStyles");
|
|
@@ -4273,7 +4273,7 @@ class ql {
|
|
|
4273
4273
|
this.config = e, this.ev = this.config.service.ev, this.customButtonStyles = this.config.state.styles.getState().GooglePayButton, this.onPaymentAttempt = this.config.state.checkout.getState().onCheckoutAttempt, this.element = document.createElement("div"), this.element.classList.add(It.googlePay, It.hidden);
|
|
4274
4274
|
}
|
|
4275
4275
|
init(e) {
|
|
4276
|
-
return
|
|
4276
|
+
return E(this, null, function* () {
|
|
4277
4277
|
if (!this.config) return !1;
|
|
4278
4278
|
const t = this.config.state.transaction.getState(), i = this.config.state.translate.locale(), r = Il(t);
|
|
4279
4279
|
if (!r)
|
|
@@ -4285,7 +4285,7 @@ class ql {
|
|
|
4285
4285
|
console.error("Google Pay error:", s);
|
|
4286
4286
|
return;
|
|
4287
4287
|
}
|
|
4288
|
-
|
|
4288
|
+
bt(s, this.config.state.translate.messages()), (o = e.onError) == null || o.call(e, s);
|
|
4289
4289
|
},
|
|
4290
4290
|
onSuccess: (s) => {
|
|
4291
4291
|
var o;
|
|
@@ -4295,7 +4295,7 @@ class ql {
|
|
|
4295
4295
|
return yield this.ev.initGoogle(
|
|
4296
4296
|
M(y({}, a), {
|
|
4297
4297
|
transaction: r,
|
|
4298
|
-
locale:
|
|
4298
|
+
locale: Rl(i || "en"),
|
|
4299
4299
|
onPaymentAttempt: this.onPaymentAttempt
|
|
4300
4300
|
}),
|
|
4301
4301
|
this.customButtonStyles
|
|
@@ -4309,33 +4309,31 @@ class ql {
|
|
|
4309
4309
|
return this.element;
|
|
4310
4310
|
}
|
|
4311
4311
|
}
|
|
4312
|
-
const
|
|
4313
|
-
paypal:
|
|
4314
|
-
hidden:
|
|
4312
|
+
const Hl = "_paypal_iyh6g_1", Gl = "_hidden_iyh6g_7", Mt = {
|
|
4313
|
+
paypal: Hl,
|
|
4314
|
+
hidden: Gl
|
|
4315
4315
|
};
|
|
4316
4316
|
class Yl {
|
|
4317
4317
|
constructor(e) {
|
|
4318
4318
|
c(this, "element");
|
|
4319
4319
|
c(this, "events", {
|
|
4320
|
-
ready: new
|
|
4321
|
-
onPaymentAttempt: new
|
|
4320
|
+
ready: new q(),
|
|
4321
|
+
onPaymentAttempt: new q()
|
|
4322
4322
|
});
|
|
4323
4323
|
c(this, "paypal");
|
|
4324
4324
|
c(this, "customButtonStyles");
|
|
4325
4325
|
c(this, "isInitialized", !1);
|
|
4326
|
-
c(this, "attemptEmitted", !1);
|
|
4327
|
-
c(this, "interceptOverlay");
|
|
4328
4326
|
this.config = e, this.paypal = this.config.service.paypal, this.customButtonStyles = this.config.state.styles.getState().PayPalButton, this.element = document.createElement("div"), this.element.classList.add(Mt.paypal, Mt.hidden);
|
|
4329
4327
|
}
|
|
4330
4328
|
// init
|
|
4331
4329
|
init(e) {
|
|
4332
|
-
return
|
|
4330
|
+
return E(this, null, function* () {
|
|
4333
4331
|
var s, o;
|
|
4334
4332
|
if (!this.config)
|
|
4335
4333
|
return !1;
|
|
4336
|
-
const t = this.config.state.transaction.getState(), i = this.config.state.checkout.getState(), r = () =>
|
|
4334
|
+
const t = this.config.state.transaction.getState(), i = this.config.state.checkout.getState(), r = () => E(this, null, function* () {
|
|
4337
4335
|
try {
|
|
4338
|
-
return yield
|
|
4336
|
+
return yield Rr(i.clientToken, i.environment, i.apiVersion);
|
|
4339
4337
|
} catch (l) {
|
|
4340
4338
|
throw l;
|
|
4341
4339
|
}
|
|
@@ -4349,7 +4347,7 @@ class Yl {
|
|
|
4349
4347
|
clientId: t.paypal_info.client_id,
|
|
4350
4348
|
environment: t.paypal_info.environment || "sandbox",
|
|
4351
4349
|
vault: !0,
|
|
4352
|
-
locale:
|
|
4350
|
+
locale: Ol(this.config.state.translate.locale()),
|
|
4353
4351
|
intent: "tokenize"
|
|
4354
4352
|
}), !this.paypal.isLoaded())
|
|
4355
4353
|
return !1;
|
|
@@ -4359,30 +4357,27 @@ class Yl {
|
|
|
4359
4357
|
const a = e ? M(y({}, e), {
|
|
4360
4358
|
onError: (l) => {
|
|
4361
4359
|
var d, h;
|
|
4362
|
-
if (
|
|
4360
|
+
if (!this.isInitialized) {
|
|
4363
4361
|
console.error("PayPal error:", l);
|
|
4364
4362
|
return;
|
|
4365
4363
|
}
|
|
4366
|
-
!this.isUserCancellationError(l) && l ? (d = e.onError) == null || d.call(e, l) : (h = e.onCancel) == null || h.call(e)
|
|
4364
|
+
!this.isUserCancellationError(l) && l ? (d = e.onError) == null || d.call(e, l) : (h = e.onCancel) == null || h.call(e);
|
|
4367
4365
|
},
|
|
4368
4366
|
onCancel: () => {
|
|
4369
4367
|
var l;
|
|
4370
|
-
|
|
4368
|
+
(l = e.onCancel) == null || l.call(e);
|
|
4371
4369
|
},
|
|
4372
4370
|
onSuccess: (l) => {
|
|
4373
4371
|
var u;
|
|
4374
|
-
(u = e.onSuccess) == null || u.call(e, l)
|
|
4372
|
+
(u = e.onSuccess) == null || u.call(e, l);
|
|
4375
4373
|
}
|
|
4376
4374
|
}) : void 0;
|
|
4377
4375
|
try {
|
|
4378
4376
|
yield this.paypal.render(this.element, M(y({}, a), {
|
|
4379
4377
|
createBillingAgreement: r,
|
|
4380
|
-
|
|
4381
|
-
this.emitAttemptOnce();
|
|
4382
|
-
},
|
|
4383
|
-
onApprove: (u) => k(this, [u], function* ({ billingToken: l }) {
|
|
4378
|
+
onApprove: (u) => E(this, [u], function* ({ billingToken: l }) {
|
|
4384
4379
|
var d;
|
|
4385
|
-
(d = a == null ? void 0 : a.onSuccess) == null || d.call(a, l || "");
|
|
4380
|
+
this.events.onPaymentAttempt.emit(T.PAYPAL), (d = a == null ? void 0 : a.onSuccess) == null || d.call(a, l || "");
|
|
4386
4381
|
}),
|
|
4387
4382
|
style: (o = this.customButtonStyles) == null ? void 0 : o.styles,
|
|
4388
4383
|
onCancel: () => {
|
|
@@ -4398,16 +4393,13 @@ class Yl {
|
|
|
4398
4393
|
} catch (l) {
|
|
4399
4394
|
return !1;
|
|
4400
4395
|
}
|
|
4401
|
-
return this.
|
|
4396
|
+
return this.element.classList.remove(Mt.hidden), this.isInitialized = !0, this.events.ready.emit(), !0;
|
|
4402
4397
|
});
|
|
4403
4398
|
}
|
|
4404
4399
|
// add event listener
|
|
4405
4400
|
addEventListener(e, t) {
|
|
4406
4401
|
return this.events[e].addListener(t);
|
|
4407
4402
|
}
|
|
4408
|
-
emitAttemptOnce() {
|
|
4409
|
-
this.attemptEmitted || (this.attemptEmitted = !0, this.events.onPaymentAttempt.emit(w.PAYPAL));
|
|
4410
|
-
}
|
|
4411
4403
|
isUserCancellationError(e) {
|
|
4412
4404
|
var r;
|
|
4413
4405
|
if (!e) return !1;
|
|
@@ -4422,24 +4414,6 @@ class Yl {
|
|
|
4422
4414
|
"popup close"
|
|
4423
4415
|
].some((a) => t.toLowerCase().includes(a));
|
|
4424
4416
|
}
|
|
4425
|
-
setupInterceptOverlay() {
|
|
4426
|
-
if (this.interceptOverlay) return;
|
|
4427
|
-
this.element.style.position = this.element.style.position || "relative";
|
|
4428
|
-
const e = document.createElement("div");
|
|
4429
|
-
e.style.position = "absolute", e.style.inset = "0", e.style.background = "transparent", e.style.zIndex = "2", e.style.pointerEvents = "auto";
|
|
4430
|
-
const t = () => {
|
|
4431
|
-
this.emitAttemptOnce(), e.style.pointerEvents = "none", setTimeout(() => {
|
|
4432
|
-
e.style.pointerEvents = "auto";
|
|
4433
|
-
}, 250);
|
|
4434
|
-
};
|
|
4435
|
-
e.addEventListener("pointerdown", t, { capture: !0 }), e.addEventListener(
|
|
4436
|
-
"keydown",
|
|
4437
|
-
(i) => {
|
|
4438
|
-
(i.key === "Enter" || i.key === " ") && t();
|
|
4439
|
-
},
|
|
4440
|
-
{ capture: !0 }
|
|
4441
|
-
), this.element.appendChild(e), this.interceptOverlay = e;
|
|
4442
|
-
}
|
|
4443
4417
|
// render
|
|
4444
4418
|
render() {
|
|
4445
4419
|
return this.element;
|
|
@@ -4492,7 +4466,7 @@ class Zl {
|
|
|
4492
4466
|
return this.element;
|
|
4493
4467
|
}
|
|
4494
4468
|
}
|
|
4495
|
-
const Jl = (n, e, t) => e.concat(n.filter((i) => e.every((r) => !t(i, r)))), Xl = "_container_10ziz_2", Ql = "_venmo_10ziz_8", ec = "_hidden_10ziz_35",
|
|
4469
|
+
const Jl = (n, e, t) => e.concat(n.filter((i) => e.every((r) => !t(i, r)))), Xl = "_container_10ziz_2", Ql = "_venmo_10ziz_8", ec = "_hidden_10ziz_35", ut = {
|
|
4496
4470
|
container: Xl,
|
|
4497
4471
|
venmo: Ql,
|
|
4498
4472
|
hidden: ec
|
|
@@ -4510,18 +4484,17 @@ class ic {
|
|
|
4510
4484
|
c(this, "container");
|
|
4511
4485
|
c(this, "venmoButton");
|
|
4512
4486
|
c(this, "events", {
|
|
4513
|
-
ready: new
|
|
4514
|
-
onPaymentAttempt: new K()
|
|
4487
|
+
ready: new q()
|
|
4515
4488
|
});
|
|
4516
4489
|
c(this, "braintree");
|
|
4517
4490
|
c(this, "isInitialized", !1);
|
|
4518
4491
|
this.config = e, this.braintree = this.config.service.braintree;
|
|
4519
4492
|
const t = this.config.state.styles.getState().BraintreeButton;
|
|
4520
|
-
this.container = document.createElement("div"), this.container.classList.add(
|
|
4493
|
+
this.container = document.createElement("div"), this.container.classList.add(ut.container), this.venmoButton = document.createElement("button"), this.venmoButton.classList.add(ut.venmo, ut.hidden), t != null && t.className && F(this.venmoButton, t.className), t != null && t.styles && Object.assign(this.venmoButton.style, t.styles), this.venmoButton.setAttribute("aria-label", "Venmo"), this.venmoButton.innerHTML = nc, this.container.append(this.venmoButton);
|
|
4521
4494
|
}
|
|
4522
4495
|
// init
|
|
4523
4496
|
init(e) {
|
|
4524
|
-
return
|
|
4497
|
+
return E(this, null, function* () {
|
|
4525
4498
|
var i;
|
|
4526
4499
|
if (!this.config) return !1;
|
|
4527
4500
|
const t = this.config.state.transaction.getState();
|
|
@@ -4533,7 +4506,7 @@ class ic {
|
|
|
4533
4506
|
}), yield this.braintree.createVenmo({
|
|
4534
4507
|
// ToDo: update before release
|
|
4535
4508
|
// deepLinkReturnUrl: checkout?.returnUrl,
|
|
4536
|
-
}), this.braintree.isBrowserSupported() ? (this.displayVenmoButton(e), this.braintree.hasTokenizationResult() ? (yield this.handleExistingTokenization(e), !1) : (this.venmoButton.classList.remove(
|
|
4509
|
+
}), this.braintree.isBrowserSupported() ? (this.displayVenmoButton(e), this.braintree.hasTokenizationResult() ? (yield this.handleExistingTokenization(e), !1) : (this.venmoButton.classList.remove(ut.hidden), this.isInitialized = !0, this.events.ready.emit(), !0)) : (this.handleVenmoError(new Error("Browser does not support Venmo")), !1);
|
|
4537
4510
|
} catch (r) {
|
|
4538
4511
|
return this.handleVenmoError(r), !1;
|
|
4539
4512
|
}
|
|
@@ -4541,8 +4514,8 @@ class ic {
|
|
|
4541
4514
|
}
|
|
4542
4515
|
// display venmo button
|
|
4543
4516
|
displayVenmoButton(e) {
|
|
4544
|
-
Object.assign(this.venmoButton.style, tc), this.venmoButton.addEventListener("click", () =>
|
|
4545
|
-
if (
|
|
4517
|
+
Object.assign(this.venmoButton.style, tc), this.venmoButton.addEventListener("click", () => E(this, null, function* () {
|
|
4518
|
+
if (!this.isProcessing) {
|
|
4546
4519
|
this.isProcessing = !0, this.venmoButton.disabled = !0;
|
|
4547
4520
|
try {
|
|
4548
4521
|
const t = yield this.braintree.tokenize();
|
|
@@ -4557,7 +4530,7 @@ class ic {
|
|
|
4557
4530
|
}
|
|
4558
4531
|
// handle existing tokenization results
|
|
4559
4532
|
handleExistingTokenization(e) {
|
|
4560
|
-
return
|
|
4533
|
+
return E(this, null, function* () {
|
|
4561
4534
|
try {
|
|
4562
4535
|
const t = yield this.braintree.tokenize();
|
|
4563
4536
|
this.handleVenmoSuccess(t, e);
|
|
@@ -4595,19 +4568,19 @@ class rc {
|
|
|
4595
4568
|
c(this, "card");
|
|
4596
4569
|
c(this, "braintree");
|
|
4597
4570
|
c(this, "events", {
|
|
4598
|
-
onFormLoaded: new
|
|
4599
|
-
ready: new
|
|
4600
|
-
open: new
|
|
4601
|
-
error: new
|
|
4602
|
-
cancel: new
|
|
4603
|
-
success: new
|
|
4604
|
-
onPaymentAttempt: new
|
|
4571
|
+
onFormLoaded: new q(),
|
|
4572
|
+
ready: new q(),
|
|
4573
|
+
open: new q(),
|
|
4574
|
+
error: new q(),
|
|
4575
|
+
cancel: new q(),
|
|
4576
|
+
success: new q(),
|
|
4577
|
+
onPaymentAttempt: new q()
|
|
4605
4578
|
});
|
|
4606
4579
|
this.config = e, this.buttons = document.createElement("div"), this.buttons.classList.add(be.buttons, be.hidden);
|
|
4607
4580
|
}
|
|
4608
4581
|
// init
|
|
4609
4582
|
init() {
|
|
4610
|
-
return
|
|
4583
|
+
return E(this, null, function* () {
|
|
4611
4584
|
this.config.service.ev.addEventListener("ready", () => {
|
|
4612
4585
|
this.initPaymentMethods().catch(console.error);
|
|
4613
4586
|
});
|
|
@@ -4615,7 +4588,7 @@ class rc {
|
|
|
4615
4588
|
}
|
|
4616
4589
|
// init apple
|
|
4617
4590
|
initApple(e) {
|
|
4618
|
-
return
|
|
4591
|
+
return E(this, null, function* () {
|
|
4619
4592
|
if (!this.applePay) {
|
|
4620
4593
|
e == null || e.remove();
|
|
4621
4594
|
return;
|
|
@@ -4624,27 +4597,17 @@ class rc {
|
|
|
4624
4597
|
try {
|
|
4625
4598
|
if (yield this.applePay.init({
|
|
4626
4599
|
onError: (i) => {
|
|
4627
|
-
this.events.error.emit(i), console.log("Apple Pay error:", i), e == null || e.remove(), this.attempted.delete(
|
|
4600
|
+
this.events.error.emit(i), console.log("Apple Pay error:", i), e == null || e.remove(), this.attempted.delete(T.APPLE_PAY);
|
|
4628
4601
|
},
|
|
4629
4602
|
onCancel: () => {
|
|
4630
|
-
this.events.cancel.emit(), this.attempted.delete(
|
|
4603
|
+
this.events.cancel.emit(), this.attempted.delete(T.APPLE_PAY);
|
|
4631
4604
|
},
|
|
4632
4605
|
onSuccess: (i) => {
|
|
4633
|
-
this.events.success.emit(M(y({}, i), { type: "apple" })), this.attempted.delete(
|
|
4606
|
+
this.events.success.emit(M(y({}, i), { type: "apple" })), this.attempted.delete(T.APPLE_PAY);
|
|
4634
4607
|
}
|
|
4635
4608
|
})) {
|
|
4636
4609
|
const i = this.applePay.render();
|
|
4637
4610
|
e == null || e.appendChild(i);
|
|
4638
|
-
const r = () => {
|
|
4639
|
-
this.attempted.has(w.APPLE_PAY) || (this.attempted.add(w.APPLE_PAY), this.events.onPaymentAttempt.emit(w.APPLE_PAY));
|
|
4640
|
-
};
|
|
4641
|
-
i.addEventListener("pointerdown", r, { capture: !0 }), i.addEventListener("click", r, { capture: !0 }), i.addEventListener(
|
|
4642
|
-
"keydown",
|
|
4643
|
-
(a) => {
|
|
4644
|
-
((a == null ? void 0 : a.key) === "Enter" || (a == null ? void 0 : a.key) === " ") && r();
|
|
4645
|
-
},
|
|
4646
|
-
{ capture: !0 }
|
|
4647
|
-
), i.addEventListener("focusin", r, { capture: !0 }), e == null || e.addEventListener("pointerdown", r, { capture: !0 }), e == null || e.addEventListener("click", r, { capture: !0 }), e == null || e.addEventListener("focusin", r, { capture: !0 });
|
|
4648
4611
|
} else
|
|
4649
4612
|
e == null || e.remove();
|
|
4650
4613
|
} catch (t) {
|
|
@@ -4654,7 +4617,7 @@ class rc {
|
|
|
4654
4617
|
}
|
|
4655
4618
|
// init google
|
|
4656
4619
|
initGoogle(e) {
|
|
4657
|
-
return
|
|
4620
|
+
return E(this, null, function* () {
|
|
4658
4621
|
if (!this.googlePay) {
|
|
4659
4622
|
e == null || e.remove();
|
|
4660
4623
|
return;
|
|
@@ -4663,19 +4626,19 @@ class rc {
|
|
|
4663
4626
|
try {
|
|
4664
4627
|
if (yield this.googlePay.init({
|
|
4665
4628
|
onError: (i) => {
|
|
4666
|
-
this.events.error.emit(i), e == null || e.remove(), this.attempted.delete(
|
|
4629
|
+
this.events.error.emit(i), e == null || e.remove(), this.attempted.delete(T.GOOGLE_PAY);
|
|
4667
4630
|
},
|
|
4668
4631
|
onCancel: () => {
|
|
4669
|
-
this.events.cancel.emit(), this.attempted.delete(
|
|
4632
|
+
this.events.cancel.emit(), this.attempted.delete(T.GOOGLE_PAY);
|
|
4670
4633
|
},
|
|
4671
4634
|
onSuccess: (i) => {
|
|
4672
|
-
this.events.success.emit(M(y({}, i), { type: "google" })), this.attempted.delete(
|
|
4635
|
+
this.events.success.emit(M(y({}, i), { type: "google" })), this.attempted.delete(T.GOOGLE_PAY);
|
|
4673
4636
|
}
|
|
4674
4637
|
})) {
|
|
4675
4638
|
const i = this.googlePay.render();
|
|
4676
4639
|
e == null || e.appendChild(i);
|
|
4677
4640
|
const r = () => {
|
|
4678
|
-
this.attempted.has(
|
|
4641
|
+
this.attempted.has(T.GOOGLE_PAY) || (this.attempted.add(T.GOOGLE_PAY), this.events.onPaymentAttempt.emit(T.GOOGLE_PAY));
|
|
4679
4642
|
};
|
|
4680
4643
|
i.addEventListener("pointerdown", r, { capture: !0 }), i.addEventListener("click", r, { capture: !0 }), i.addEventListener(
|
|
4681
4644
|
"keydown",
|
|
@@ -4693,7 +4656,7 @@ class rc {
|
|
|
4693
4656
|
}
|
|
4694
4657
|
// init paypal
|
|
4695
4658
|
initPayPal(e) {
|
|
4696
|
-
return
|
|
4659
|
+
return E(this, null, function* () {
|
|
4697
4660
|
if (!this.paypal) {
|
|
4698
4661
|
e == null || e.remove();
|
|
4699
4662
|
return;
|
|
@@ -4703,13 +4666,13 @@ class rc {
|
|
|
4703
4666
|
const t = this.paypal.render();
|
|
4704
4667
|
e == null || e.appendChild(t), (yield this.paypal.init({
|
|
4705
4668
|
onError: (r) => {
|
|
4706
|
-
this.events.error.emit(r), this.attempted.delete(
|
|
4669
|
+
this.events.error.emit(r), this.attempted.delete(T.PAYPAL);
|
|
4707
4670
|
},
|
|
4708
4671
|
onCancel: () => {
|
|
4709
|
-
this.events.cancel.emit(), this.attempted.delete(
|
|
4672
|
+
this.events.cancel.emit(), this.attempted.delete(T.PAYPAL);
|
|
4710
4673
|
},
|
|
4711
4674
|
onSuccess: (r) => {
|
|
4712
|
-
this.events.success.emit({ paypalId: r, type: "paypal" }), this.attempted.delete(
|
|
4675
|
+
this.events.success.emit({ paypalId: r, type: "paypal" }), this.attempted.delete(T.PAYPAL);
|
|
4713
4676
|
}
|
|
4714
4677
|
})) || e == null || e.remove();
|
|
4715
4678
|
} catch (t) {
|
|
@@ -4719,7 +4682,7 @@ class rc {
|
|
|
4719
4682
|
}
|
|
4720
4683
|
// init braintree
|
|
4721
4684
|
initBraintreeVenmo(e) {
|
|
4722
|
-
return
|
|
4685
|
+
return E(this, null, function* () {
|
|
4723
4686
|
if (!this.braintree) {
|
|
4724
4687
|
e == null || e.remove();
|
|
4725
4688
|
return;
|
|
@@ -4728,11 +4691,11 @@ class rc {
|
|
|
4728
4691
|
try {
|
|
4729
4692
|
if (yield this.braintree.init({
|
|
4730
4693
|
onError: (i) => {
|
|
4731
|
-
this.events.error.emit(i), e == null || e.remove();
|
|
4694
|
+
this.events.onPaymentAttempt.emit(T.VENMO), this.events.error.emit(i), e == null || e.remove();
|
|
4732
4695
|
},
|
|
4733
4696
|
onCancel: () => this.events.cancel.emit(),
|
|
4734
4697
|
onSuccess: (i) => {
|
|
4735
|
-
this.events.success.emit({ nonce: i == null ? void 0 : i.nonce, type: "venmo" });
|
|
4698
|
+
this.events.onPaymentAttempt.emit(T.VENMO), this.events.success.emit({ nonce: i == null ? void 0 : i.nonce, type: "venmo" });
|
|
4736
4699
|
}
|
|
4737
4700
|
})) {
|
|
4738
4701
|
const i = this.braintree.render();
|
|
@@ -4746,7 +4709,7 @@ class rc {
|
|
|
4746
4709
|
}
|
|
4747
4710
|
// init card
|
|
4748
4711
|
initCard(e) {
|
|
4749
|
-
return
|
|
4712
|
+
return E(this, null, function* () {
|
|
4750
4713
|
if (!this.card) {
|
|
4751
4714
|
e == null || e.remove();
|
|
4752
4715
|
return;
|
|
@@ -4756,10 +4719,10 @@ class rc {
|
|
|
4756
4719
|
}
|
|
4757
4720
|
// init payment methods
|
|
4758
4721
|
initPaymentMethods() {
|
|
4759
|
-
return
|
|
4722
|
+
return E(this, null, function* () {
|
|
4760
4723
|
const e = this.config.state.transaction.getState(), t = Jl(zl, (e == null ? void 0 : e.checkout_config) || [], (s, o) => s.type === o.type), i = this.config.state.checkout.getState();
|
|
4761
4724
|
let r = t.filter(({ is_active: s }) => s);
|
|
4762
|
-
(i == null ? void 0 : i.variant) === "default" && (r = r.filter(({ type: s }) => s !==
|
|
4725
|
+
(i == null ? void 0 : i.variant) === "default" && (r = r.filter(({ type: s }) => s !== T.CARD));
|
|
4763
4726
|
const a = this.initializeButtonInstances(r);
|
|
4764
4727
|
Promise.all(a).then(() => {
|
|
4765
4728
|
this.handleOnFormLoaded();
|
|
@@ -4768,14 +4731,14 @@ class rc {
|
|
|
4768
4731
|
}
|
|
4769
4732
|
// initialize button instances
|
|
4770
4733
|
initializeButtonInstances(e) {
|
|
4771
|
-
const t = e.map(({ type: h }) => h), i = t.includes(
|
|
4772
|
-
i && !this.applePay && (this.applePay = new Bl(this.config)), r && !this.googlePay && (this.googlePay = new ql(this.config)), a && !this.paypal && (this.paypal = new Yl(this.config), this.paypal.addEventListener("onPaymentAttempt", (h) => this.events.onPaymentAttempt.emit(h))), s && !this.braintree && (this.braintree = new ic(this.config)
|
|
4734
|
+
const t = e.map(({ type: h }) => h), i = t.includes(T.APPLE_PAY), r = t.includes(T.GOOGLE_PAY), a = t.includes(T.PAYPAL), s = t.includes(T.VENMO), o = t.includes(T.CARD);
|
|
4735
|
+
i && !this.applePay && (this.applePay = new Bl(this.config)), r && !this.googlePay && (this.googlePay = new ql(this.config)), a && !this.paypal && (this.paypal = new Yl(this.config), this.paypal.addEventListener("onPaymentAttempt", (h) => this.events.onPaymentAttempt.emit(h))), s && !this.braintree && (this.braintree = new ic(this.config)), o && !this.card && (this.card = new Zl(this.config), this.card.addEventListener(() => {
|
|
4773
4736
|
this.events.open.emit();
|
|
4774
4737
|
}));
|
|
4775
4738
|
const l = e.filter(({ type: h }) => {
|
|
4776
|
-
var b, v,
|
|
4777
|
-
const m = navigator, p = (
|
|
4778
|
-
return !(h ===
|
|
4739
|
+
var b, v, k, L, w, I;
|
|
4740
|
+
const m = navigator, p = (k = (v = (b = m == null ? void 0 : m.userAgentData) == null ? void 0 : b.platform) == null ? void 0 : v.toLowerCase()) == null ? void 0 : k.includes("android"), g = (I = (w = (L = m == null ? void 0 : m.userAgentData) == null ? void 0 : L.platform) == null ? void 0 : w.toLowerCase()) == null ? void 0 : I.includes("windows");
|
|
4741
|
+
return !(h === T.APPLE_PAY && (p || g));
|
|
4779
4742
|
}).sort((h, m) => h.order - m.order), u = /* @__PURE__ */ new Map();
|
|
4780
4743
|
for (const { type: h } of l) {
|
|
4781
4744
|
const m = document.createElement("div");
|
|
@@ -4783,15 +4746,15 @@ class rc {
|
|
|
4783
4746
|
}
|
|
4784
4747
|
return l.map(({ type: h }) => {
|
|
4785
4748
|
const m = u.get(h);
|
|
4786
|
-
if (h ===
|
|
4749
|
+
if (h === T.APPLE_PAY && this.applePay)
|
|
4787
4750
|
return this.initApple(m);
|
|
4788
|
-
if (h ===
|
|
4751
|
+
if (h === T.GOOGLE_PAY && this.googlePay)
|
|
4789
4752
|
return this.initGoogle(m);
|
|
4790
|
-
if (h ===
|
|
4753
|
+
if (h === T.PAYPAL && this.paypal)
|
|
4791
4754
|
return this.initPayPal(m);
|
|
4792
|
-
if (h ===
|
|
4755
|
+
if (h === T.VENMO && this.braintree)
|
|
4793
4756
|
return this.initBraintreeVenmo(m);
|
|
4794
|
-
if (h ===
|
|
4757
|
+
if (h === T.CARD && this.card)
|
|
4795
4758
|
return this.initCard(m);
|
|
4796
4759
|
throw new Error("Unknown button type");
|
|
4797
4760
|
});
|
|
@@ -4889,18 +4852,18 @@ const mc = "_cardForm_1uc4x_1", fc = "_hidden_1uc4x_6", gc = "_topOffset_1uc4x_1
|
|
|
4889
4852
|
cardForm: mc,
|
|
4890
4853
|
hidden: fc,
|
|
4891
4854
|
topOffset: gc
|
|
4892
|
-
}, bc = "_wrapper_1xw0g_1", vc = "_inputContainer_1xw0g_5", yc = "_disabled_1xw0g_23", Cc = "_input_1xw0g_5",
|
|
4855
|
+
}, bc = "_wrapper_1xw0g_1", vc = "_inputContainer_1xw0g_5", yc = "_disabled_1xw0g_23", Cc = "_input_1xw0g_5", kc = "_errorInput_1xw0g_18", Ec = "_label_1xw0g_56", xc = "_labelError_1xw0g_67", wc = "_disabledInput_1xw0g_75", Tc = "_hidden_1xw0g_82", $ = {
|
|
4893
4856
|
wrapper: bc,
|
|
4894
4857
|
inputContainer: vc,
|
|
4895
4858
|
disabled: yc,
|
|
4896
4859
|
input: Cc,
|
|
4897
|
-
errorInput:
|
|
4898
|
-
label:
|
|
4860
|
+
errorInput: kc,
|
|
4861
|
+
label: Ec,
|
|
4899
4862
|
labelError: xc,
|
|
4900
4863
|
disabledInput: wc,
|
|
4901
4864
|
hidden: Tc
|
|
4902
4865
|
};
|
|
4903
|
-
class
|
|
4866
|
+
class vt {
|
|
4904
4867
|
constructor() {
|
|
4905
4868
|
c(this, "template", `
|
|
4906
4869
|
<svg focusable='false' fill='#dc2626' color='#dc2626' height='12' viewBox='0 0 12 12' width='12'>
|
|
@@ -4921,7 +4884,7 @@ class yt {
|
|
|
4921
4884
|
return this.element;
|
|
4922
4885
|
}
|
|
4923
4886
|
}
|
|
4924
|
-
class
|
|
4887
|
+
class _c {
|
|
4925
4888
|
constructor(e, t) {
|
|
4926
4889
|
c(this, "id", "paynext-card-input-name");
|
|
4927
4890
|
c(this, "element");
|
|
@@ -4931,14 +4894,14 @@ class Ac {
|
|
|
4931
4894
|
c(this, "labelText", document.createElement("span"));
|
|
4932
4895
|
c(this, "labelError", document.createElement("span"));
|
|
4933
4896
|
c(this, "endContent", document.createElement("div"));
|
|
4934
|
-
c(this, "warning", new
|
|
4897
|
+
c(this, "warning", new vt());
|
|
4935
4898
|
c(this, "placeholderStyle", document.createElement("style"));
|
|
4936
4899
|
c(this, "isTouchSubmit", !1);
|
|
4937
4900
|
c(this, "isRequired", !1);
|
|
4938
4901
|
c(this, "isDisabled", !1);
|
|
4939
4902
|
c(this, "isChanged", !1);
|
|
4940
4903
|
c(this, "events", {
|
|
4941
|
-
change: new
|
|
4904
|
+
change: new q()
|
|
4942
4905
|
});
|
|
4943
4906
|
var r, a, s, o, l, u, d, h, m;
|
|
4944
4907
|
const i = e.messages();
|
|
@@ -4965,12 +4928,12 @@ class Ac {
|
|
|
4965
4928
|
}), this.render();
|
|
4966
4929
|
}
|
|
4967
4930
|
toggleLabelError(e) {
|
|
4968
|
-
return
|
|
4931
|
+
return E(this, null, function* () {
|
|
4969
4932
|
if (e) {
|
|
4970
|
-
this.inputContainer.classList.add($.errorInput), this.endContent.classList.remove($.hidden), this.labelError.classList.remove($.hidden), yield
|
|
4933
|
+
this.inputContainer.classList.add($.errorInput), this.endContent.classList.remove($.hidden), this.labelError.classList.remove($.hidden), yield G(this.labelError, W.open, W.transition);
|
|
4971
4934
|
return;
|
|
4972
4935
|
}
|
|
4973
|
-
this.inputContainer.classList.remove($.errorInput), this.endContent.classList.add($.hidden), yield
|
|
4936
|
+
this.inputContainer.classList.remove($.errorInput), this.endContent.classList.add($.hidden), yield G(this.labelError, W.close, W.transition), this.labelError.classList.add($.hidden);
|
|
4974
4937
|
});
|
|
4975
4938
|
}
|
|
4976
4939
|
addEventListener(e, t) {
|
|
@@ -4994,16 +4957,16 @@ class Ac {
|
|
|
4994
4957
|
return this.toggleLabelError(i), this.isDisabled ? (this.inputContainer.classList.add($.disabled), this.input.classList.add($.disabledInput)) : (this.inputContainer.classList.remove($.disabled), this.input.classList.remove($.disabledInput)), this.element;
|
|
4995
4958
|
}
|
|
4996
4959
|
}
|
|
4997
|
-
const
|
|
4998
|
-
wrapper:
|
|
4999
|
-
inputContainer:
|
|
4960
|
+
const Ac = "_wrapper_1xw0g_1", Lc = "_inputContainer_1xw0g_5", Vc = "_disabled_1xw0g_23", Ic = "_input_1xw0g_5", Mc = "_endContent_1xw0g_39", Pc = "_errorInput_1xw0g_18", Dc = "_error_1xw0g_18", Rc = "_label_1xw0g_56", Oc = "_labelError_1xw0g_67", Nc = "_disabledInput_1xw0g_75", Sc = "_hidden_1xw0g_82", j = {
|
|
4961
|
+
wrapper: Ac,
|
|
4962
|
+
inputContainer: Lc,
|
|
5000
4963
|
disabled: Vc,
|
|
5001
4964
|
input: Ic,
|
|
5002
4965
|
endContent: Mc,
|
|
5003
4966
|
errorInput: Pc,
|
|
5004
4967
|
error: Dc,
|
|
5005
|
-
label:
|
|
5006
|
-
labelError:
|
|
4968
|
+
label: Rc,
|
|
4969
|
+
labelError: Oc,
|
|
5007
4970
|
disabledInput: Nc,
|
|
5008
4971
|
hidden: Sc
|
|
5009
4972
|
};
|
|
@@ -5120,7 +5083,7 @@ class Bc {
|
|
|
5120
5083
|
class zc {
|
|
5121
5084
|
constructor(e, t) {
|
|
5122
5085
|
c(this, "id", "paynext-card-input-number");
|
|
5123
|
-
c(this, "initialCardTypes",
|
|
5086
|
+
c(this, "initialCardTypes", gt.map((e) => e.type));
|
|
5124
5087
|
c(this, "element");
|
|
5125
5088
|
c(this, "inputContainer", document.createElement("div"));
|
|
5126
5089
|
c(this, "input", document.createElement("input"));
|
|
@@ -5143,13 +5106,13 @@ class zc {
|
|
|
5143
5106
|
c(this, "isDisabled", !1);
|
|
5144
5107
|
c(this, "isChanged", !1);
|
|
5145
5108
|
c(this, "events", {
|
|
5146
|
-
change: new
|
|
5109
|
+
change: new q()
|
|
5147
5110
|
});
|
|
5148
5111
|
var r, a, s, o, l, u, d, h, m;
|
|
5149
5112
|
this.translate = e;
|
|
5150
5113
|
const i = e.messages();
|
|
5151
5114
|
if (this.element = document.createElement("div"), this.element.classList.add(j.wrapper), this.inputContainer.classList.add(j.inputContainer), (r = t == null ? void 0 : t.container) != null && r.className && F(this.inputContainer, t.container.className), (a = t == null ? void 0 : t.container) != null && a.styles && Object.assign(this.inputContainer.style, t.container.styles), this.input.setAttribute("id", this.id), this.input.setAttribute("autocomplete", "cc-number"), this.input.setAttribute("placeholder", "1234 1234 1234 1234"), this.input.setAttribute("inputmode", "numeric"), this.input.setAttribute("pattern", "[0-9]*"), this.input.setAttribute("enterkeyhint", "done"), this.input.classList.add(j.input), (s = t == null ? void 0 : t.field) != null && s.className && F(this.input, t.field.className), (o = t == null ? void 0 : t.field) != null && o.styles && Object.assign(this.input.style, t.field.styles), (l = t == null ? void 0 : t.placeholder) != null && l.styles && Object.keys(t.placeholder.styles).length) {
|
|
5152
|
-
const p = (v) => v.replace(/[A-Z]/g, (
|
|
5115
|
+
const p = (v) => v.replace(/[A-Z]/g, (k) => "-" + k.toLowerCase()), g = Object.entries(t.placeholder.styles).map(([v, k]) => `${p(v)}:${k} !important;`).join(""), b = `#${this.id}`;
|
|
5153
5116
|
this.placeholderStyle.textContent = `${b}::placeholder{${g}}
|
|
5154
5117
|
${b}::-webkit-input-placeholder{${g}}
|
|
5155
5118
|
${b}::-moz-placeholder{${g}}
|
|
@@ -5184,25 +5147,25 @@ ${b}::-ms-input-placeholder{${g}}
|
|
|
5184
5147
|
}), this.render();
|
|
5185
5148
|
}
|
|
5186
5149
|
toggleLabelError(e) {
|
|
5187
|
-
return
|
|
5150
|
+
return E(this, null, function* () {
|
|
5188
5151
|
if (e) {
|
|
5189
|
-
this.inputContainer.classList.add(j.errorInput), this.labelError.classList.remove(j.hidden), yield
|
|
5152
|
+
this.inputContainer.classList.add(j.errorInput), this.labelError.classList.remove(j.hidden), yield G(this.labelError, W.open, W.transition);
|
|
5190
5153
|
return;
|
|
5191
5154
|
}
|
|
5192
|
-
yield
|
|
5155
|
+
yield G(this.labelError, W.close, W.transition), this.labelError.classList.add(j.hidden);
|
|
5193
5156
|
});
|
|
5194
5157
|
}
|
|
5195
5158
|
toggleErrorMessage(e) {
|
|
5196
|
-
return
|
|
5159
|
+
return E(this, null, function* () {
|
|
5197
5160
|
if (e) {
|
|
5198
|
-
this.inputContainer.classList.add(j.errorInput), this.error.textContent = this.errorMessage, this.error.classList.remove(j.hidden), yield
|
|
5161
|
+
this.inputContainer.classList.add(j.errorInput), this.error.textContent = this.errorMessage, this.error.classList.remove(j.hidden), yield G(this.error, Q.open, Q.transition);
|
|
5199
5162
|
return;
|
|
5200
5163
|
}
|
|
5201
|
-
yield
|
|
5164
|
+
yield G(this.error, Q.close, Q.transition), this.error.classList.add(j.hidden);
|
|
5202
5165
|
});
|
|
5203
5166
|
}
|
|
5204
5167
|
getCardIcons() {
|
|
5205
|
-
return
|
|
5168
|
+
return gt.filter(({ type: e }) => this.supportedCardTypes.includes(e)).slice(0, 3).map(({ type: e }) => {
|
|
5206
5169
|
switch (e) {
|
|
5207
5170
|
case we.Visa:
|
|
5208
5171
|
return this.visa.render();
|
|
@@ -5237,12 +5200,12 @@ ${b}::-ms-input-placeholder{${g}}
|
|
|
5237
5200
|
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;
|
|
5238
5201
|
}
|
|
5239
5202
|
}
|
|
5240
|
-
const $c = "_inputContainer_41zd2_5", Kc = "_disabled_41zd2_23", qc = "_input_41zd2_5",
|
|
5203
|
+
const $c = "_inputContainer_41zd2_5", Kc = "_disabled_41zd2_23", qc = "_input_41zd2_5", Hc = "_endContent_41zd2_39", Gc = "_errorInput_41zd2_18", Yc = "_error_41zd2_18", Uc = "_label_41zd2_56", Wc = "_labelError_41zd2_67", Zc = "_disabledInput_41zd2_75", Jc = "_hidden_41zd2_82", Xc = "_securityContent_41zd2_86", A = {
|
|
5241
5204
|
inputContainer: $c,
|
|
5242
5205
|
disabled: Kc,
|
|
5243
5206
|
input: qc,
|
|
5244
|
-
endContent:
|
|
5245
|
-
errorInput:
|
|
5207
|
+
endContent: Hc,
|
|
5208
|
+
errorInput: Gc,
|
|
5246
5209
|
error: Yc,
|
|
5247
5210
|
label: Uc,
|
|
5248
5211
|
labelError: Wc,
|
|
@@ -5284,8 +5247,8 @@ class ed {
|
|
|
5284
5247
|
c(this, "cvcId", "paynext-card-input-cvc");
|
|
5285
5248
|
c(this, "expiryId", "paynext-card-input-expiry");
|
|
5286
5249
|
c(this, "element");
|
|
5287
|
-
c(this, "expiryWarning", new
|
|
5288
|
-
c(this, "cvcWarning", new
|
|
5250
|
+
c(this, "expiryWarning", new vt());
|
|
5251
|
+
c(this, "cvcWarning", new vt());
|
|
5289
5252
|
c(this, "cardCvc", new Qc());
|
|
5290
5253
|
c(this, "expiryInputContainer", document.createElement("div"));
|
|
5291
5254
|
c(this, "expiryInput", document.createElement("input"));
|
|
@@ -5312,19 +5275,19 @@ class ed {
|
|
|
5312
5275
|
c(this, "isCvcRequired", !1);
|
|
5313
5276
|
c(this, "isCvcChanged", !1);
|
|
5314
5277
|
c(this, "events", {
|
|
5315
|
-
expiryChange: new
|
|
5316
|
-
cvcChange: new
|
|
5278
|
+
expiryChange: new q(),
|
|
5279
|
+
cvcChange: new q()
|
|
5317
5280
|
});
|
|
5318
|
-
var s, o, l, u, d, h, m, p, g, b, v,
|
|
5281
|
+
var s, o, l, u, d, h, m, p, g, b, v, k, L, w, I, _, D;
|
|
5319
5282
|
this.translate = e;
|
|
5320
5283
|
const i = e.messages();
|
|
5321
|
-
this.element = document.createElement("div"), this.element.classList.add(
|
|
5284
|
+
this.element = document.createElement("div"), this.element.classList.add(A.securityContent), this.expiryInputContainer.classList.add(A.inputContainer), (s = t == null ? void 0 : t.container) != null && s.className && F(this.expiryInputContainer, t.container.className), (o = t == null ? void 0 : t.container) != null && o.styles && Object.assign(this.expiryInputContainer.style, t.container.styles), this.expiryInput.setAttribute("id", this.expiryId), this.expiryInput.setAttribute("autocomplete", "cc-exp"), this.expiryInput.setAttribute("placeholder", i.card.expiry.placeholder), this.expiryInput.setAttribute("inputmode", "numeric"), this.expiryInput.setAttribute("pattern", "[0-9]*"), this.expiryInput.setAttribute("enterkeyhint", "next"), this.expiryInput.classList.add(A.input), (l = t == null ? void 0 : t.field) != null && l.className && F(this.expiryInput, t.field.className), (u = t == null ? void 0 : t.field) != null && u.styles && Object.assign(this.expiryInput.style, t.field.styles), this.expiryEndContent.classList.add(A.endContent), this.expiryEndContent.appendChild(this.expiryWarning.render()), this.expiryInputContainer.append(this.expiryInput, this.expiryEndContent), this.expiryLabel.setAttribute("for", this.expiryId), this.expiryLabel.classList.add(A.label), (d = t == null ? void 0 : t.label) != null && d.className && F(this.expiryLabel, t.label.className), (h = t == null ? void 0 : t.label) != null && h.styles && Object.assign(this.expiryLabel.style, t.label.styles), this.expiryLabelText.contentEditable = "false", this.expiryLabelText.textContent = i.card.expiry.label, this.expiryLabelError.textContent = i.card.required, this.expiryLabelError.classList.add(A.labelError, A.hidden), this.expiryLabel.append(this.expiryLabelText, this.expiryLabelError), this.expiryError.classList.add(A.error, A.hidden), (m = t == null ? void 0 : t.error) != null && m.className && F(this.expiryError, t.error.className), (p = t == null ? void 0 : t.error) != null && p.styles && Object.assign(this.expiryError.style, t.error.styles);
|
|
5322
5285
|
const r = document.createElement("div");
|
|
5323
|
-
if (r.appendChild(this.expiryError), this.cvcInputContainer.classList.add(
|
|
5324
|
-
const C = (
|
|
5286
|
+
if (r.appendChild(this.expiryError), this.cvcInputContainer.classList.add(A.inputContainer), (g = t == null ? void 0 : t.container) != null && g.className && F(this.cvcInputContainer, t.container.className), (b = t == null ? void 0 : t.container) != null && b.styles && Object.assign(this.cvcInputContainer.style, t.container.styles), this.cvcInput.setAttribute("id", this.cvcId), this.cvcInput.setAttribute("autocomplete", "cc-csc"), this.cvcInput.setAttribute("placeholder", i.card.cvc.placeholder), this.cvcInput.setAttribute("inputmode", "numeric"), this.cvcInput.setAttribute("pattern", "[0-9]*"), this.cvcInput.setAttribute("enterkeyhint", "done"), this.cvcInput.classList.add(A.input), (v = t == null ? void 0 : t.field) != null && v.className && F(this.cvcInput, t.field.className), (k = t == null ? void 0 : t.field) != null && k.styles && Object.assign(this.cvcInput.style, t.field.styles), (L = t == null ? void 0 : t.placeholder) != null && L.styles && Object.keys(t.placeholder.styles).length) {
|
|
5287
|
+
const C = (R) => R.replace(/[A-Z]/g, (O) => "-" + O.toLowerCase()), x = Object.entries(t.placeholder.styles).map(([R, O]) => `${C(R)}:${O};`).join("");
|
|
5325
5288
|
this.placeholderStyle.textContent = `#${this.expiryId}::placeholder{${x}}#${this.cvcId}::placeholder{${x}}`, this.element.appendChild(this.placeholderStyle);
|
|
5326
5289
|
}
|
|
5327
|
-
this.cvcEndContent.classList.add(
|
|
5290
|
+
this.cvcEndContent.classList.add(A.endContent), this.cvcEndContent.appendChild(this.cardCvc.render()), this.cvcInputContainer.append(this.cvcInput, this.cvcEndContent), this.cvcLabel.setAttribute("for", this.cvcId), this.cvcLabel.classList.add(A.label), (w = t == null ? void 0 : t.label) != null && w.className && F(this.cvcLabel, t.label.className), (I = t == null ? void 0 : t.label) != null && I.styles && Object.assign(this.cvcLabel.style, t.label.styles), this.cvcLabelText.textContent = i.card.cvc.label, this.cvcLabelError.textContent = i.card.required, this.cvcLabelError.classList.add(A.labelError, A.hidden), (_ = t == null ? void 0 : t.error) != null && _.className && F(this.cvcLabel, t.error.className), (D = t == null ? void 0 : t.error) != null && D.styles && Object.assign(this.cvcLabelError.style, t.error.styles), this.cvcLabel.append(this.cvcLabelText, this.cvcLabelError), this.cvcError.classList.add(A.error, A.hidden);
|
|
5328
5291
|
const a = document.createElement("div");
|
|
5329
5292
|
a.appendChild(this.cvcError), this.element.append(
|
|
5330
5293
|
this.expiryLabel,
|
|
@@ -5335,24 +5298,24 @@ class ed {
|
|
|
5335
5298
|
a
|
|
5336
5299
|
), this.expiryInput.addEventListener("input", (C) => {
|
|
5337
5300
|
C.preventDefault();
|
|
5338
|
-
const
|
|
5339
|
-
this.handleExpiryChange(
|
|
5301
|
+
const R = this.expiryInput.value.replace(/\D/g, "");
|
|
5302
|
+
this.handleExpiryChange(R);
|
|
5340
5303
|
}), this.expiryInput.addEventListener("paste", (C) => {
|
|
5341
|
-
var
|
|
5304
|
+
var O;
|
|
5342
5305
|
C.preventDefault();
|
|
5343
|
-
const
|
|
5344
|
-
this.handleExpiryChange(
|
|
5306
|
+
const R = (((O = C.clipboardData) == null ? void 0 : O.getData("text")) || "").replace(/\D/g, "");
|
|
5307
|
+
this.handleExpiryChange(R);
|
|
5345
5308
|
}), this.expiryInput.addEventListener("keydown", (C) => {
|
|
5346
5309
|
this.isDisabled || ["Backspace", "Delete", "Tab", "ArrowLeft", "ArrowRight", "Home", "End"].includes(C.key) || C.ctrlKey || C.metaKey || /^\d$/.test(C.key) || C.preventDefault();
|
|
5347
5310
|
}), this.expiryInput.addEventListener("blur", () => this.validateExpiry(this.expiryInput.value)), this.cvcInput.addEventListener("input", (C) => {
|
|
5348
5311
|
C.preventDefault();
|
|
5349
|
-
const
|
|
5350
|
-
this.handleCvcChange(
|
|
5312
|
+
const R = this.cvcInput.value.replace(/\D/g, "");
|
|
5313
|
+
this.handleCvcChange(R);
|
|
5351
5314
|
}), this.cvcInput.addEventListener("paste", (C) => {
|
|
5352
|
-
var
|
|
5315
|
+
var O;
|
|
5353
5316
|
C.preventDefault();
|
|
5354
|
-
const
|
|
5355
|
-
this.handleCvcChange(
|
|
5317
|
+
const R = (((O = C.clipboardData) == null ? void 0 : O.getData("text")) || "").replace(/\D/g, "");
|
|
5318
|
+
this.handleCvcChange(R);
|
|
5356
5319
|
}), this.cvcInput.addEventListener("keydown", (C) => {
|
|
5357
5320
|
this.isDisabled || ["Backspace", "Delete", "Tab", "ArrowLeft", "ArrowRight", "Home", "End"].includes(C.key) || C.ctrlKey || C.metaKey || /^\d$/.test(C.key) || C.preventDefault();
|
|
5358
5321
|
}), this.cvcInput.addEventListener("blur", () => this.validateCvc(this.cvcInput.value)), this.translate.subscribe(({ messages: C }) => {
|
|
@@ -5370,28 +5333,28 @@ class ed {
|
|
|
5370
5333
|
handleCvcChange(e) {
|
|
5371
5334
|
if (this.isDisabled) return;
|
|
5372
5335
|
this.isCvcRequired = !1, this.cvcErrorMessage = "", this.isCvcChanged || (this.isCvcChanged = !0);
|
|
5373
|
-
const t =
|
|
5336
|
+
const t = kl(e, this.cardType || ""), i = Pe.getTypeInfo(this.cardType || "");
|
|
5374
5337
|
t.length === (i == null ? void 0 : i.code.size) && this.validateCvc(t), this.events.cvcChange.emit({
|
|
5375
5338
|
value: t,
|
|
5376
5339
|
isValid: this.cvcValidator(t) === null
|
|
5377
5340
|
}), this.cvcInput.value = t, this.render();
|
|
5378
5341
|
}
|
|
5379
5342
|
toggleCvcLabelError(e) {
|
|
5380
|
-
return
|
|
5343
|
+
return E(this, null, function* () {
|
|
5381
5344
|
if (e) {
|
|
5382
|
-
this.cvcInputContainer.classList.add(
|
|
5345
|
+
this.cvcInputContainer.classList.add(A.errorInput), this.cvcLabelError.classList.remove(A.hidden), yield G(this.cvcLabelError, W.open, W.transition);
|
|
5383
5346
|
return;
|
|
5384
5347
|
}
|
|
5385
|
-
yield
|
|
5348
|
+
yield G(this.cvcLabelError, W.close, W.transition), this.cvcLabelError.classList.add(A.hidden);
|
|
5386
5349
|
});
|
|
5387
5350
|
}
|
|
5388
5351
|
toggleCvcErrorMessage(e) {
|
|
5389
|
-
return
|
|
5352
|
+
return E(this, null, function* () {
|
|
5390
5353
|
if (e) {
|
|
5391
|
-
this.cvcInputContainer.classList.add(
|
|
5354
|
+
this.cvcInputContainer.classList.add(A.errorInput), this.cvcError.textContent = this.cvcErrorMessage, this.cvcError.classList.remove(A.hidden), yield G(this.cvcError, Q.open, Q.transition);
|
|
5392
5355
|
return;
|
|
5393
5356
|
}
|
|
5394
|
-
yield
|
|
5357
|
+
yield G(this.cvcError, Q.close, Q.transition), this.cvcError.classList.add(A.hidden);
|
|
5395
5358
|
});
|
|
5396
5359
|
}
|
|
5397
5360
|
expiryValidator(e) {
|
|
@@ -5420,7 +5383,7 @@ class ed {
|
|
|
5420
5383
|
handleExpiryChange(e) {
|
|
5421
5384
|
if (this.isDisabled) return;
|
|
5422
5385
|
this.isExpiryRequired = !1, this.expiryErrorMessage = "", this.isExpiryChanged || (this.isExpiryChanged = !0);
|
|
5423
|
-
const t =
|
|
5386
|
+
const t = El(e);
|
|
5424
5387
|
t.length === 7 && this.validateExpiry(t), this.events.expiryChange.emit({
|
|
5425
5388
|
value: t,
|
|
5426
5389
|
isValid: this.expiryValidator(t) === null
|
|
@@ -5428,22 +5391,22 @@ class ed {
|
|
|
5428
5391
|
}
|
|
5429
5392
|
// toggle expiry label error
|
|
5430
5393
|
toggleExpiryLabelError(e) {
|
|
5431
|
-
return
|
|
5394
|
+
return E(this, null, function* () {
|
|
5432
5395
|
if (e) {
|
|
5433
|
-
this.expiryInputContainer.classList.add(
|
|
5396
|
+
this.expiryInputContainer.classList.add(A.errorInput), this.expiryLabelError.classList.remove(A.hidden), yield G(this.expiryLabelError, W.open, W.transition);
|
|
5434
5397
|
return;
|
|
5435
5398
|
}
|
|
5436
|
-
yield
|
|
5399
|
+
yield G(this.expiryLabelError, W.close, W.transition), this.expiryLabelError.classList.add(A.hidden);
|
|
5437
5400
|
});
|
|
5438
5401
|
}
|
|
5439
5402
|
// toggle expiry error message
|
|
5440
5403
|
toggleExpiryErrorMessage(e) {
|
|
5441
|
-
return
|
|
5404
|
+
return E(this, null, function* () {
|
|
5442
5405
|
if (e) {
|
|
5443
|
-
this.expiryInputContainer.classList.add(
|
|
5406
|
+
this.expiryInputContainer.classList.add(A.errorInput), this.expiryError.textContent = this.expiryErrorMessage, this.expiryError.classList.remove(A.hidden), yield G(this.expiryError, Q.open, Q.transition);
|
|
5444
5407
|
return;
|
|
5445
5408
|
}
|
|
5446
|
-
yield
|
|
5409
|
+
yield G(this.expiryError, Q.close, Q.transition), this.expiryError.classList.add(A.hidden);
|
|
5447
5410
|
});
|
|
5448
5411
|
}
|
|
5449
5412
|
// add event listener
|
|
@@ -5452,7 +5415,7 @@ class ed {
|
|
|
5452
5415
|
}
|
|
5453
5416
|
// disable
|
|
5454
5417
|
disable(e) {
|
|
5455
|
-
e ? (this.expiryInput.setAttribute("disabled", "true"), this.expiryInput.classList.add(
|
|
5418
|
+
e ? (this.expiryInput.setAttribute("disabled", "true"), this.expiryInput.classList.add(A.disabledInput), this.expiryInputContainer.classList.add(A.disabled), this.cvcInput.setAttribute("disabled", "true"), this.cvcInput.classList.add(A.disabledInput), this.cvcInputContainer.classList.add(A.disabled)) : (this.expiryInput.removeAttribute("disabled"), this.expiryInput.classList.remove(A.disabledInput), this.expiryInputContainer.classList.remove(A.disabled), this.cvcInput.removeAttribute("disabled"), this.cvcInput.classList.remove(A.disabledInput), this.cvcInputContainer.classList.remove(A.disabled));
|
|
5456
5419
|
}
|
|
5457
5420
|
// touch submit
|
|
5458
5421
|
touchSubmit() {
|
|
@@ -5477,9 +5440,9 @@ class ed {
|
|
|
5477
5440
|
// render
|
|
5478
5441
|
render() {
|
|
5479
5442
|
const e = this.isTouchSubmit || this.isExpiryChanged, t = e && !this.isDisabled && this.isExpiryRequired, i = e && !this.isDisabled && !!this.expiryErrorMessage;
|
|
5480
|
-
this.toggleExpiryLabelError(t), this.toggleExpiryErrorMessage(i), !t && !i ? (this.expiryInputContainer.classList.remove(
|
|
5443
|
+
this.toggleExpiryLabelError(t), this.toggleExpiryErrorMessage(i), !t && !i ? (this.expiryInputContainer.classList.remove(A.errorInput), this.expiryEndContent.classList.add(A.hidden)) : this.expiryEndContent.classList.remove(A.hidden);
|
|
5481
5444
|
const r = this.isTouchSubmit || this.isCvcChanged, a = r && !this.isDisabled && this.isCvcRequired, s = r && !this.isDisabled && !!this.cvcErrorMessage;
|
|
5482
|
-
return this.toggleCvcLabelError(a), this.toggleCvcErrorMessage(s), !a && !s ? (this.cvcInputContainer.classList.remove(
|
|
5445
|
+
return this.toggleCvcLabelError(a), this.toggleCvcErrorMessage(s), !a && !s ? (this.cvcInputContainer.classList.remove(A.errorInput), this.cvcEndContent.innerHTML = "", this.cvcEndContent.appendChild(this.cardCvc.render())) : (this.cvcEndContent.innerHTML = "", this.cvcEndContent.appendChild(this.cvcWarning.render())), this.isDisabled ? (this.expiryInputContainer.classList.add(A.disabled), this.expiryInput.classList.add(A.disabledInput), this.cvcInputContainer.classList.add(A.disabled), this.cvcInput.classList.add(A.disabledInput)) : (this.expiryInputContainer.classList.remove(A.disabled), this.expiryInput.classList.remove(A.disabledInput), this.cvcInputContainer.classList.remove(A.disabled), this.cvcInput.classList.remove(A.disabledInput)), this.element;
|
|
5483
5446
|
}
|
|
5484
5447
|
}
|
|
5485
5448
|
class td {
|
|
@@ -5493,11 +5456,11 @@ class td {
|
|
|
5493
5456
|
c(this, "onPaymentAttempt");
|
|
5494
5457
|
c(this, "isBackVisible", !0);
|
|
5495
5458
|
c(this, "events", {
|
|
5496
|
-
submit: new
|
|
5497
|
-
close: new
|
|
5459
|
+
submit: new q(),
|
|
5460
|
+
close: new q()
|
|
5498
5461
|
});
|
|
5499
5462
|
const s = i.getState();
|
|
5500
|
-
this.element = document.createElement("form"), this.onPaymentAttempt = a, this.submit = new pc(e, s.SubmitButton), this.back = new lc(s.BackButton), this.number = new zc(e, s.Input), this.name = new
|
|
5463
|
+
this.element = document.createElement("form"), this.onPaymentAttempt = a, this.submit = new pc(e, s.SubmitButton), this.back = new lc(s.BackButton), this.number = new zc(e, s.Input), this.name = new _c(e, s.Input), this.cardSecurity = new ed(e, s.Input), this.element.classList.add(ve.cardForm), t && F(this.element, t);
|
|
5501
5464
|
const o = this.back.render();
|
|
5502
5465
|
r && (this.isBackVisible = !1, o.classList.add(ve.hidden), this.element.classList.add(ve.topOffset)), this.element.append(
|
|
5503
5466
|
o,
|
|
@@ -5512,7 +5475,7 @@ class td {
|
|
|
5512
5475
|
var p;
|
|
5513
5476
|
l.preventDefault();
|
|
5514
5477
|
const { cvc: u, expiry: d } = this.cardSecurity.value(), { value: h, cardType: m } = this.number.value();
|
|
5515
|
-
this.touchSubmit(), this.validate() && ((p = this.onPaymentAttempt) == null || p.call(this, { paymentMethod:
|
|
5478
|
+
this.touchSubmit(), this.validate() && ((p = this.onPaymentAttempt) == null || p.call(this, { paymentMethod: T.CARD }), this.events.submit.emit({
|
|
5516
5479
|
number: h,
|
|
5517
5480
|
expiry: d,
|
|
5518
5481
|
cvc: u,
|
|
@@ -5599,16 +5562,16 @@ class ad {
|
|
|
5599
5562
|
const sd = "_container_g3abj_1", od = "_title_g3abj_12", ui = {
|
|
5600
5563
|
container: sd,
|
|
5601
5564
|
title: od
|
|
5602
|
-
},
|
|
5565
|
+
}, yt = class yt {
|
|
5603
5566
|
constructor(e, t) {
|
|
5604
5567
|
c(this, "element");
|
|
5605
5568
|
c(this, "message", document.createElement("p"));
|
|
5606
|
-
c(this, "icon", new
|
|
5569
|
+
c(this, "icon", new vt());
|
|
5607
5570
|
c(this, "hasCustomMessage", !1);
|
|
5608
5571
|
c(this, "hasConfigMessage", !1);
|
|
5609
5572
|
this.translate = e, this.element = document.createElement("div"), this.element.classList.add(ui.container), this.message.classList.add(ui.title), t ? (this.message.textContent = t, this.hasCustomMessage = !0, this.hasConfigMessage = !0) : this.message.textContent = e.messages().status.error, this.element.append(this.icon.render(), this.message), this.translate.subscribe(({ messages: i }) => {
|
|
5610
5573
|
this.hasCustomMessage || (this.message.textContent = i.status.error);
|
|
5611
|
-
}),
|
|
5574
|
+
}), yt.instances.add(this);
|
|
5612
5575
|
}
|
|
5613
5576
|
// set message
|
|
5614
5577
|
setMessage(e) {
|
|
@@ -5630,18 +5593,13 @@ const sd = "_container_g3abj_1", od = "_title_g3abj_12", ui = {
|
|
|
5630
5593
|
show() {
|
|
5631
5594
|
this.element.style.display = "flex";
|
|
5632
5595
|
}
|
|
5633
|
-
// hide all alert instances across the checkout UI
|
|
5634
|
-
static hideAll() {
|
|
5635
|
-
for (const e of Ze.instances)
|
|
5636
|
-
e.element.style.display = "none";
|
|
5637
|
-
}
|
|
5638
5596
|
// render alert
|
|
5639
5597
|
render() {
|
|
5640
5598
|
return this.element;
|
|
5641
5599
|
}
|
|
5642
5600
|
};
|
|
5643
|
-
c(
|
|
5644
|
-
let Wt =
|
|
5601
|
+
c(yt, "instances", /* @__PURE__ */ new Set());
|
|
5602
|
+
let Wt = yt;
|
|
5645
5603
|
class ld {
|
|
5646
5604
|
constructor(e) {
|
|
5647
5605
|
c(this, "isLoading", !1);
|
|
@@ -5670,7 +5628,7 @@ class ld {
|
|
|
5670
5628
|
}
|
|
5671
5629
|
// init
|
|
5672
5630
|
init() {
|
|
5673
|
-
return
|
|
5631
|
+
return E(this, null, function* () {
|
|
5674
5632
|
this.buttons.addEventListener("onPaymentAttempt", (e) => {
|
|
5675
5633
|
var i;
|
|
5676
5634
|
const t = this.config.state.checkout.getState();
|
|
@@ -5678,7 +5636,7 @@ class ld {
|
|
|
5678
5636
|
}), this.buttons.addEventListener("onFormLoaded", () => {
|
|
5679
5637
|
const { onCheckoutLoaded: e } = this.config.state.checkout.getState();
|
|
5680
5638
|
!this.hasLoadedOnce && e && (this.hasLoadedOnce = !0, e({ success: !0 }));
|
|
5681
|
-
}), this.buttons.addEventListener("ready", () =>
|
|
5639
|
+
}), this.buttons.addEventListener("ready", () => E(this, null, function* () {
|
|
5682
5640
|
var t;
|
|
5683
5641
|
this.loader.setClassName(Z.hidden);
|
|
5684
5642
|
const { variant: e } = this.config.state.checkout.getState();
|
|
@@ -5689,23 +5647,23 @@ class ld {
|
|
|
5689
5647
|
{ duration: 250, easing: "ease-out", fill: "forwards" }
|
|
5690
5648
|
).finished) != null ? t : Promise.resolve(), this.checkout.style.height = ""), this.isFormOpen = !0;
|
|
5691
5649
|
}
|
|
5692
|
-
})), this.buttons.addEventListener("open", () =>
|
|
5650
|
+
})), this.buttons.addEventListener("open", () => E(this, null, function* () {
|
|
5693
5651
|
var r;
|
|
5694
5652
|
if (this.isLoading) return;
|
|
5695
5653
|
this.hideError();
|
|
5696
5654
|
const e = this.checkout.getBoundingClientRect().height;
|
|
5697
|
-
this.closedHeight = e, e < this.FORM_HEIGHT && (this.checkout.style.height = `${e}px`), yield
|
|
5655
|
+
this.closedHeight = e, e < this.FORM_HEIGHT && (this.checkout.style.height = `${e}px`), yield G(this.buttons.buttons, dt.close, dt.transition), this.buttons.buttons.classList.add(Z.hidden), this.form.element.classList.add(Z.formInitial), this.form.element.classList.remove(Z.hidden);
|
|
5698
5656
|
const t = e;
|
|
5699
5657
|
let i = null;
|
|
5700
5658
|
t < this.FORM_HEIGHT && (this.checkout.style.height = `${t}px`, i = (r = this.checkout.animate(
|
|
5701
5659
|
{ minHeight: [`${t}px`, `${this.FORM_HEIGHT}px`] },
|
|
5702
5660
|
{ duration: 250, easing: "ease-out", fill: "forwards" }
|
|
5703
5661
|
).finished) != null ? r : Promise.resolve()), yield Promise.all([
|
|
5704
|
-
|
|
5662
|
+
G(this.form.element, Le.open, Le.transition),
|
|
5705
5663
|
i != null ? i : Promise.resolve()
|
|
5706
5664
|
]), t < this.FORM_HEIGHT && (this.checkout.style.height = ""), this.isFormOpen = !0;
|
|
5707
5665
|
})), this.buttons.addEventListener("error", (e) => {
|
|
5708
|
-
const { onCheckoutFail: t, onCheckoutLoaded: i } = this.config.state.checkout.getState(), r = this.config.state.translate.messages(), a =
|
|
5666
|
+
const { onCheckoutFail: t, onCheckoutLoaded: i } = this.config.state.checkout.getState(), r = this.config.state.translate.messages(), a = bt(e, r);
|
|
5709
5667
|
this.showError(a);
|
|
5710
5668
|
const s = {
|
|
5711
5669
|
status: "failed",
|
|
@@ -5731,7 +5689,7 @@ class ld {
|
|
|
5731
5689
|
case "venmo":
|
|
5732
5690
|
return this.handleSuccess({ clientSession: t, braintree: { nonce: e } });
|
|
5733
5691
|
}
|
|
5734
|
-
}), this.form.addEventListener("close", () =>
|
|
5692
|
+
}), this.form.addEventListener("close", () => E(this, null, function* () {
|
|
5735
5693
|
var a, s;
|
|
5736
5694
|
if (this.isLoading) return;
|
|
5737
5695
|
this.hideError();
|
|
@@ -5740,18 +5698,18 @@ class ld {
|
|
|
5740
5698
|
this.closedHeight > 0 && e > this.closedHeight && (this.checkout.style.height = `${e}px`, t = (a = this.checkout.animate(
|
|
5741
5699
|
{ minHeight: [`${e}px`, `${this.closedHeight}px`] },
|
|
5742
5700
|
{ duration: 250, easing: "ease-out", fill: "forwards" }
|
|
5743
|
-
).finished) != null ? a : Promise.resolve()), yield
|
|
5701
|
+
).finished) != null ? a : Promise.resolve()), yield G(this.form.element, Le.close, Le.transition), this.form.element.classList.add(Z.hidden);
|
|
5744
5702
|
const { variant: r } = this.config.state.checkout.getState();
|
|
5745
5703
|
if (r !== "default") {
|
|
5746
5704
|
this.buttons.buttons.classList.add(Z.btnsInitial), this.buttons.buttons.classList.remove(Z.hidden);
|
|
5747
|
-
const o =
|
|
5705
|
+
const o = G(this.buttons.buttons, dt.open, dt.transition);
|
|
5748
5706
|
yield Promise.all([o, t != null ? t : Promise.resolve()]);
|
|
5749
5707
|
}
|
|
5750
5708
|
this.closedHeight > 0 && (t = (s = this.checkout.animate(
|
|
5751
5709
|
{ minHeight: [`${e}px`, `${this.closedHeight}px`] },
|
|
5752
5710
|
{ duration: 250, easing: "ease-out", fill: "forwards" }
|
|
5753
5711
|
).finished) != null ? s : Promise.resolve(), this.checkout.style.height = "auto"), this.isFormOpen = !1;
|
|
5754
|
-
})), this.form.addEventListener("submit", (e) =>
|
|
5712
|
+
})), this.form.addEventListener("submit", (e) => E(this, null, function* () {
|
|
5755
5713
|
if (this.isLoading || (this.form.touchSubmit(), this.hideError(), !this.form.validate())) return;
|
|
5756
5714
|
const i = e.number.replace(/\D/g, ""), r = this.config.state.checkout.getState(), a = this.config.service.ev.getEv(), [s, o] = yield Promise.all([a.encrypt(i), a.encrypt(e.cvc)]), [l, u] = e.expiry.split("/");
|
|
5757
5715
|
yield this.handleSuccess({
|
|
@@ -5764,7 +5722,7 @@ class ld {
|
|
|
5764
5722
|
cardBrand: e.cardBrand || "",
|
|
5765
5723
|
number: s,
|
|
5766
5724
|
cvc: o,
|
|
5767
|
-
type:
|
|
5725
|
+
type: T.CARD,
|
|
5768
5726
|
metadata: {
|
|
5769
5727
|
name: e.name,
|
|
5770
5728
|
userAgent: navigator == null ? void 0 : navigator.userAgent
|
|
@@ -5777,12 +5735,12 @@ class ld {
|
|
|
5777
5735
|
// handle error
|
|
5778
5736
|
handleError(e) {
|
|
5779
5737
|
var a;
|
|
5780
|
-
const t = this.config.state.checkout.getState(), i = this.config.state.translate.messages(), r =
|
|
5738
|
+
const t = this.config.state.checkout.getState(), i = this.config.state.translate.messages(), r = bt(e, i);
|
|
5781
5739
|
e && (this.showError(r), (a = t.onCheckoutFail) == null || a.call(t, e)), this.setLoading(!1);
|
|
5782
5740
|
}
|
|
5783
5741
|
// handle success
|
|
5784
5742
|
handleSuccess(e) {
|
|
5785
|
-
return
|
|
5743
|
+
return E(this, null, function* () {
|
|
5786
5744
|
var a, s;
|
|
5787
5745
|
if (this.isLoading) return;
|
|
5788
5746
|
this.hideError(), this.setLoading(!0);
|
|
@@ -5823,8 +5781,8 @@ class ld {
|
|
|
5823
5781
|
}
|
|
5824
5782
|
// show success
|
|
5825
5783
|
showSuccess() {
|
|
5826
|
-
return
|
|
5827
|
-
this.container.classList.add(Z.hidden), this.success.removeClassName(Z.hidden), yield
|
|
5784
|
+
return E(this, null, function* () {
|
|
5785
|
+
this.container.classList.add(Z.hidden), this.success.removeClassName(Z.hidden), yield G(this.success.element, Le.open, Le.transition);
|
|
5828
5786
|
});
|
|
5829
5787
|
}
|
|
5830
5788
|
// hide error
|
|
@@ -5874,10 +5832,10 @@ class cd {
|
|
|
5874
5832
|
}
|
|
5875
5833
|
// init
|
|
5876
5834
|
init() {
|
|
5877
|
-
return
|
|
5835
|
+
return E(this, null, function* () {
|
|
5878
5836
|
const { checkout: e, transaction: t, translate: i, styles: r } = this.config.state, { apiVersion: a } = e.getState();
|
|
5879
5837
|
e.subscribe(({ clientToken: s, environment: o, locale: l, translate: u, styles: d }) => {
|
|
5880
|
-
const h =
|
|
5838
|
+
const h = kn.teamId, m = kn.appIds[o];
|
|
5881
5839
|
this.config.service.ev.preloadEvervault({ teamId: h, appId: m }).finally(), l && i.locale() !== l && i.setLocale(l), u && i.overrides() !== u && i.setMessages(u), d && r.setState(d), t.updateTransaction(s, o, a).then((p) => {
|
|
5882
5840
|
if (!p)
|
|
5883
5841
|
throw new Error("Payment config not found");
|
|
@@ -5893,7 +5851,7 @@ class cd {
|
|
|
5893
5851
|
}
|
|
5894
5852
|
// mount
|
|
5895
5853
|
mount() {
|
|
5896
|
-
return
|
|
5854
|
+
return E(this, null, function* () {
|
|
5897
5855
|
return this.component || (this.component = new ld(this.config)), yield this.init(), yield this.component.init(), this.component.render();
|
|
5898
5856
|
});
|
|
5899
5857
|
}
|
|
@@ -5902,7 +5860,7 @@ class Ct {
|
|
|
5902
5860
|
constructor(e) {
|
|
5903
5861
|
c(this, "initialState");
|
|
5904
5862
|
c(this, "state");
|
|
5905
|
-
c(this, "observer", new
|
|
5863
|
+
c(this, "observer", new q());
|
|
5906
5864
|
this.initialState = e, this.state = e;
|
|
5907
5865
|
}
|
|
5908
5866
|
getState() {
|
|
@@ -5942,11 +5900,11 @@ class md extends Ct {
|
|
|
5942
5900
|
}
|
|
5943
5901
|
// update transaction
|
|
5944
5902
|
updateTransaction(t, i, r) {
|
|
5945
|
-
return
|
|
5903
|
+
return E(this, null, function* () {
|
|
5946
5904
|
if (this.clientToken === t) return this.getState();
|
|
5947
5905
|
this.clientToken = t;
|
|
5948
5906
|
try {
|
|
5949
|
-
const a = yield
|
|
5907
|
+
const a = yield Or(t, i, r);
|
|
5950
5908
|
return this.setState(a), a;
|
|
5951
5909
|
} catch (a) {
|
|
5952
5910
|
console.error("Failed to update transaction:", a);
|
|
@@ -6214,7 +6172,7 @@ const fd = {
|
|
|
6214
6172
|
error: "Η μέθοδος πληρωμής σας απορρίφθηκε. Αυτό μπορεί να οφείλεται σε ανεπαρκή κεφάλαια, ληγμένα στοιχεία πληρωμής ή περιορισμούς ασφαλείας. Παρακαλούμε ελέγξτε τα στοιχεία πληρωμής σας ή δοκιμάστε μια διαφορετική μέθοδο πληρωμής.",
|
|
6215
6173
|
invalidSession: "Η συνεδρία πληρωμής σας έχει λήξει. Παρακαλούμε ανανεώστε τη σελίδα για να συνεχίσετε."
|
|
6216
6174
|
}
|
|
6217
|
-
},
|
|
6175
|
+
}, kd = {
|
|
6218
6176
|
card: {
|
|
6219
6177
|
required: "REQUIRED",
|
|
6220
6178
|
number: {
|
|
@@ -6257,7 +6215,7 @@ const fd = {
|
|
|
6257
6215
|
error: "Your payment method was declined. This could be due to insufficient funds, expired payment details, or security restrictions. Please check your payment details or try a different payment method.",
|
|
6258
6216
|
invalidSession: "Your payment session has expired. Please refresh the page to continue."
|
|
6259
6217
|
}
|
|
6260
|
-
},
|
|
6218
|
+
}, Ed = {
|
|
6261
6219
|
card: {
|
|
6262
6220
|
required: "OBLIGATORIO",
|
|
6263
6221
|
number: {
|
|
@@ -6429,7 +6387,7 @@ const fd = {
|
|
|
6429
6387
|
error: "Ang iyong paraan ng pagbabayad ay tinanggihan. Maaaring dahil ito sa hindi sapat na pondo, nag-expire na mga detalye ng pagbabayad, o mga paghihigpit sa seguridad. Pakisuri ang iyong mga detalye ng pagbabayad o subukang ibang paraan ng pagbabayad.",
|
|
6430
6388
|
invalidSession: "Ang iyong sesyon ng pagbabayad ay nag-expire na. Paki-refresh ang pahina upang magpatuloy."
|
|
6431
6389
|
}
|
|
6432
|
-
},
|
|
6390
|
+
}, _d = {
|
|
6433
6391
|
card: {
|
|
6434
6392
|
required: "OBLIGATOIRE",
|
|
6435
6393
|
number: {
|
|
@@ -6472,7 +6430,7 @@ const fd = {
|
|
|
6472
6430
|
error: "Votre moyen de paiement a été refusé. Cela peut être dû à des fonds insuffisants, des détails de paiement expirés ou des restrictions de sécurité. Veuillez vérifier vos détails de paiement ou essayer un autre moyen de paiement.",
|
|
6473
6431
|
invalidSession: "Votre session de paiement a expiré. Veuillez actualiser la page pour continuer."
|
|
6474
6432
|
}
|
|
6475
|
-
},
|
|
6433
|
+
}, Ad = {
|
|
6476
6434
|
card: {
|
|
6477
6435
|
required: "POTREBNO",
|
|
6478
6436
|
number: {
|
|
@@ -6515,7 +6473,7 @@ const fd = {
|
|
|
6515
6473
|
error: "Vaš način plaćanja je odbijen. To može biti zbog nedovoljnih sredstava, isteklih podataka o plaćanju ili sigurnosnih ograničenja. Molimo provjerite svoje podatke o plaćanju ili pokušajte s drugim načinom plaćanja.",
|
|
6516
6474
|
invalidSession: "Vaša sesija plaćanja je istekla. Molimo osvježite stranicu za nastavak."
|
|
6517
6475
|
}
|
|
6518
|
-
},
|
|
6476
|
+
}, Ld = {
|
|
6519
6477
|
card: {
|
|
6520
6478
|
required: "KÖTELEZŐ",
|
|
6521
6479
|
number: {
|
|
@@ -6773,7 +6731,7 @@ const fd = {
|
|
|
6773
6731
|
error: "Jūsų mokėjimo būdas buvo atmestas. Tai gali būti dėl nepakankamų lėšų, pasibaigusios mokėjimo informacijos ar saugumo apribojimų. Patikrinkite savo mokėjimo informaciją arba bandykite kitą mokėjimo būdą.",
|
|
6774
6732
|
invalidSession: "Jūsų mokėjimo seansas baigėsi. Atnaujinkite puslapį, kad tęstumėte."
|
|
6775
6733
|
}
|
|
6776
|
-
},
|
|
6734
|
+
}, Rd = {
|
|
6777
6735
|
card: {
|
|
6778
6736
|
required: "OBLIGĀTI",
|
|
6779
6737
|
number: {
|
|
@@ -6816,7 +6774,7 @@ const fd = {
|
|
|
6816
6774
|
error: "Jūsu maksājuma metode tika noraidīta. Tas var būt nepietiekamu līdzekļu, novecojušas maksājumu informācijas vai drošības ierobežojumu dēļ. Lūdzu, pārbaudiet savu maksājumu informāciju vai mēģiniet citu maksājuma metodi.",
|
|
6817
6775
|
invalidSession: "Jūsu maksājuma sesija ir beigusies. Lūdzu, atsvaidziniet lapu, lai turpinātu."
|
|
6818
6776
|
}
|
|
6819
|
-
},
|
|
6777
|
+
}, Od = {
|
|
6820
6778
|
card: {
|
|
6821
6779
|
required: "DIPERLUKAN",
|
|
6822
6780
|
number: {
|
|
@@ -7246,7 +7204,7 @@ const fd = {
|
|
|
7246
7204
|
error: "Váš spôsob platby bol zamietnutý. Môže to byť kvôli nedostatočným prostriedkom, vypršaným platobným údajom alebo bezpečnostným obmedzeniam. Skontrolujte prosím svoje platobné údaje alebo skúste iný spôsob platby.",
|
|
7247
7205
|
invalidSession: "Vaša platobná relácia vypršala. Obnovte stránku pre pokračovanie."
|
|
7248
7206
|
}
|
|
7249
|
-
},
|
|
7207
|
+
}, Hd = {
|
|
7250
7208
|
card: {
|
|
7251
7209
|
required: "OBVEZNO",
|
|
7252
7210
|
number: {
|
|
@@ -7289,7 +7247,7 @@ const fd = {
|
|
|
7289
7247
|
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.",
|
|
7290
7248
|
invalidSession: "Vaša seja plačila je potekla. Osvežite stran za nadaljevanje."
|
|
7291
7249
|
}
|
|
7292
|
-
},
|
|
7250
|
+
}, Gd = {
|
|
7293
7251
|
card: {
|
|
7294
7252
|
required: "KRÄVS",
|
|
7295
7253
|
number: {
|
|
@@ -7506,26 +7464,26 @@ const fd = {
|
|
|
7506
7464
|
}
|
|
7507
7465
|
}, Zt = {
|
|
7508
7466
|
ar: fd,
|
|
7509
|
-
en:
|
|
7467
|
+
en: kd,
|
|
7510
7468
|
bg: gd,
|
|
7511
7469
|
cs: bd,
|
|
7512
7470
|
da: vd,
|
|
7513
7471
|
de: yd,
|
|
7514
7472
|
el: Cd,
|
|
7515
|
-
es:
|
|
7473
|
+
es: Ed,
|
|
7516
7474
|
et: xd,
|
|
7517
7475
|
fi: wd,
|
|
7518
7476
|
fil: Td,
|
|
7519
|
-
fr:
|
|
7520
|
-
hr:
|
|
7521
|
-
hu:
|
|
7477
|
+
fr: _d,
|
|
7478
|
+
hr: Ad,
|
|
7479
|
+
hu: Ld,
|
|
7522
7480
|
id: Vd,
|
|
7523
7481
|
it: Id,
|
|
7524
7482
|
ja: Md,
|
|
7525
7483
|
ko: Pd,
|
|
7526
7484
|
lt: Dd,
|
|
7527
|
-
lv:
|
|
7528
|
-
ms:
|
|
7485
|
+
lv: Rd,
|
|
7486
|
+
ms: Od,
|
|
7529
7487
|
ru: $d,
|
|
7530
7488
|
mt: Nd,
|
|
7531
7489
|
no: Sd,
|
|
@@ -7535,8 +7493,8 @@ const fd = {
|
|
|
7535
7493
|
ro: zd,
|
|
7536
7494
|
uk: Kd,
|
|
7537
7495
|
sk: qd,
|
|
7538
|
-
sl:
|
|
7539
|
-
sv:
|
|
7496
|
+
sl: Hd,
|
|
7497
|
+
sv: Gd,
|
|
7540
7498
|
th: Yd,
|
|
7541
7499
|
tr: Ud,
|
|
7542
7500
|
vi: Wd,
|
|
@@ -7613,7 +7571,7 @@ class Qd {
|
|
|
7613
7571
|
}
|
|
7614
7572
|
// init
|
|
7615
7573
|
init(e) {
|
|
7616
|
-
return
|
|
7574
|
+
return E(this, null, function* () {
|
|
7617
7575
|
if (typeof window == "undefined")
|
|
7618
7576
|
throw new Error("PayPal can only be initialized in browser environment");
|
|
7619
7577
|
try {
|
|
@@ -7630,7 +7588,7 @@ class Qd {
|
|
|
7630
7588
|
}
|
|
7631
7589
|
// render
|
|
7632
7590
|
render(e, t) {
|
|
7633
|
-
return
|
|
7591
|
+
return E(this, null, function* () {
|
|
7634
7592
|
var i, r;
|
|
7635
7593
|
if (!e.isConnected)
|
|
7636
7594
|
throw new Error("PayPal parent element must be connected to DOM before render()");
|
|
@@ -7655,7 +7613,7 @@ class eu {
|
|
|
7655
7613
|
}
|
|
7656
7614
|
// init
|
|
7657
7615
|
init(e) {
|
|
7658
|
-
return
|
|
7616
|
+
return E(this, null, function* () {
|
|
7659
7617
|
if (typeof window == "undefined")
|
|
7660
7618
|
throw new Error("Braintree can only be initialized in browser environment");
|
|
7661
7619
|
try {
|
|
@@ -7677,7 +7635,7 @@ class eu {
|
|
|
7677
7635
|
}
|
|
7678
7636
|
// create venmo instance
|
|
7679
7637
|
createVenmo(e) {
|
|
7680
|
-
return
|
|
7638
|
+
return E(this, null, function* () {
|
|
7681
7639
|
if (!this.client)
|
|
7682
7640
|
throw new Error("Braintree client must be initialized before creating Venmo instance");
|
|
7683
7641
|
try {
|
|
@@ -7706,7 +7664,7 @@ class eu {
|
|
|
7706
7664
|
}
|
|
7707
7665
|
// tokenize venmo payment
|
|
7708
7666
|
tokenize() {
|
|
7709
|
-
return
|
|
7667
|
+
return E(this, null, function* () {
|
|
7710
7668
|
if (!this.venmoInstance)
|
|
7711
7669
|
throw new Error("Venmo instance not initialized");
|
|
7712
7670
|
return new Promise((e, t) => {
|
|
@@ -7758,6 +7716,6 @@ class su {
|
|
|
7758
7716
|
export {
|
|
7759
7717
|
su as Core,
|
|
7760
7718
|
iu as PayNextCheckout,
|
|
7761
|
-
|
|
7719
|
+
T as PaymentMethod
|
|
7762
7720
|
};
|
|
7763
7721
|
//# sourceMappingURL=index.es.js.map
|