@paynext/sdk 0.0.46 → 0.0.48
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/README.md +3 -1
- package/dist/index.d.ts +7 -3
- package/dist/index.es.js +933 -929
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +22 -22
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Ra = Object.defineProperty, Sa = Object.defineProperties;
|
|
2
|
+
var ka = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var ht = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var It = (n, e, t) => e in n ?
|
|
4
|
+
var Nr = Object.prototype.hasOwnProperty, xr = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var It = (n, e, t) => e in n ? Ra(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, Q = (n, e) => {
|
|
6
6
|
for (var t in e || (e = {}))
|
|
7
|
-
|
|
7
|
+
Nr.call(e, t) && It(n, t, e[t]);
|
|
8
8
|
if (ht)
|
|
9
9
|
for (var t of ht(e))
|
|
10
|
-
|
|
10
|
+
xr.call(e, t) && It(n, t, e[t]);
|
|
11
11
|
return n;
|
|
12
|
-
}, te = (n, e) =>
|
|
12
|
+
}, te = (n, e) => Sa(n, ka(e));
|
|
13
13
|
var ge = (n, e) => {
|
|
14
14
|
var t = {};
|
|
15
15
|
for (var r in n)
|
|
16
|
-
|
|
16
|
+
Nr.call(n, r) && e.indexOf(r) < 0 && (t[r] = n[r]);
|
|
17
17
|
if (n != null && ht)
|
|
18
18
|
for (var r of ht(n))
|
|
19
|
-
e.indexOf(r) < 0 &&
|
|
19
|
+
e.indexOf(r) < 0 && xr.call(n, r) && (t[r] = n[r]);
|
|
20
20
|
return t;
|
|
21
21
|
};
|
|
22
22
|
var b = (n, e, t) => It(n, typeof e != "symbol" ? e + "" : e, t);
|
|
@@ -37,7 +37,7 @@ var j = (n, e, t) => new Promise((r, i) => {
|
|
|
37
37
|
o((t = t.apply(n, e)).next());
|
|
38
38
|
});
|
|
39
39
|
let mt = null;
|
|
40
|
-
function
|
|
40
|
+
function Ma() {
|
|
41
41
|
return j(this, null, function* () {
|
|
42
42
|
return mt || (mt = new Promise((n, e) => {
|
|
43
43
|
const t = document.createElement("script");
|
|
@@ -51,27 +51,27 @@ function ka() {
|
|
|
51
51
|
}), mt);
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function yi() {
|
|
55
55
|
return j(this, null, function* () {
|
|
56
56
|
if (window.Evervault)
|
|
57
57
|
return window.Evervault;
|
|
58
58
|
try {
|
|
59
|
-
return yield
|
|
59
|
+
return yield Ma(), window.Evervault;
|
|
60
60
|
} catch (n) {
|
|
61
61
|
throw new Error("Failed to load Evervault.js");
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function Da(n, e, t) {
|
|
66
66
|
return j(this, null, function* () {
|
|
67
|
-
const r = yield
|
|
67
|
+
const r = yield yi();
|
|
68
68
|
return new r(n, e, t);
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
71
|
Promise.resolve().then(() => {
|
|
72
|
-
|
|
72
|
+
yi();
|
|
73
73
|
});
|
|
74
|
-
let
|
|
74
|
+
let Va = class {
|
|
75
75
|
constructor(e) {
|
|
76
76
|
b(this, "apple", null);
|
|
77
77
|
b(this, "isAvailable", !1);
|
|
@@ -111,7 +111,7 @@ let Da = class {
|
|
|
111
111
|
!this.apple || !this.isAvailable || (e.innerHTML = "", yield this.apple.mount(e), (t = this.onReady) == null || t.call(this));
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
|
-
},
|
|
114
|
+
}, Fa = class {
|
|
115
115
|
constructor(e) {
|
|
116
116
|
b(this, "google", null);
|
|
117
117
|
this.ev = e;
|
|
@@ -165,7 +165,7 @@ class ce {
|
|
|
165
165
|
this.listeners = [];
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
|
-
class
|
|
168
|
+
class Ua {
|
|
169
169
|
constructor(e) {
|
|
170
170
|
b(this, "threeDs", null);
|
|
171
171
|
this.ev = e;
|
|
@@ -181,7 +181,7 @@ class Fa {
|
|
|
181
181
|
});
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
|
-
class
|
|
184
|
+
class Ba {
|
|
185
185
|
constructor() {
|
|
186
186
|
b(this, "isReady", !1);
|
|
187
187
|
b(this, "ev", null);
|
|
@@ -200,14 +200,14 @@ class Ua {
|
|
|
200
200
|
// init ev
|
|
201
201
|
initEv(e) {
|
|
202
202
|
return j(this, null, function* () {
|
|
203
|
-
this.isShouldLoad(e) && (this.isReady = !1, this.ev = yield
|
|
203
|
+
this.isShouldLoad(e) && (this.isReady = !1, this.ev = yield Da(e.teamId, e.appId), this.apple = new Va(this.ev), this.google = new Fa(this.ev), this.events.ready.emit(), this.isReady = !0);
|
|
204
204
|
});
|
|
205
205
|
}
|
|
206
206
|
// init three ds
|
|
207
207
|
initThreeDs(e) {
|
|
208
208
|
return j(this, null, function* () {
|
|
209
209
|
if (!this.ev) throw new Error("Evervault should be init before using Three DS Secure");
|
|
210
|
-
this.threeDs = new
|
|
210
|
+
this.threeDs = new Ua(this.ev), yield this.threeDs.init(e), yield this.threeDs.render();
|
|
211
211
|
});
|
|
212
212
|
}
|
|
213
213
|
// init apple
|
|
@@ -257,7 +257,7 @@ class Ua {
|
|
|
257
257
|
function tn(n) {
|
|
258
258
|
return typeof n == "object" && !Array.isArray(n);
|
|
259
259
|
}
|
|
260
|
-
function
|
|
260
|
+
function za(n, e, t) {
|
|
261
261
|
var r;
|
|
262
262
|
if (n instanceof EventTarget)
|
|
263
263
|
return [n];
|
|
@@ -268,66 +268,66 @@ function Ba(n, e, t) {
|
|
|
268
268
|
}
|
|
269
269
|
return Array.from(n);
|
|
270
270
|
}
|
|
271
|
-
function
|
|
272
|
-
return typeof n == "string" && tn(e) ?
|
|
271
|
+
function bi(n, e, t, r) {
|
|
272
|
+
return typeof n == "string" && tn(e) ? za(n, t, r) : n instanceof NodeList ? Array.from(n) : Array.isArray(n) ? n : [n];
|
|
273
273
|
}
|
|
274
|
-
function
|
|
274
|
+
function ja(n, e, t) {
|
|
275
275
|
return n * (e + 1);
|
|
276
276
|
}
|
|
277
|
-
function
|
|
277
|
+
function Lr(n, e, t, r) {
|
|
278
278
|
var i;
|
|
279
279
|
return typeof e == "number" ? e : e.startsWith("-") || e.startsWith("+") ? Math.max(0, n + parseFloat(e)) : e === "<" ? t : (i = r.get(e)) != null ? i : n;
|
|
280
280
|
}
|
|
281
|
-
const ct = (n, e, t) => n + (e - n) * t,
|
|
281
|
+
const ct = (n, e, t) => n + (e - n) * t, Ka = (n, e, t) => {
|
|
282
282
|
const r = e - n;
|
|
283
283
|
return ((t - n) % r + r) % r + n;
|
|
284
|
-
},
|
|
285
|
-
function
|
|
286
|
-
return
|
|
284
|
+
}, Ei = (n) => Array.isArray(n) && typeof n[0] != "number";
|
|
285
|
+
function _i(n, e) {
|
|
286
|
+
return Ei(n) ? n[Ka(0, n.length, e)] : n;
|
|
287
287
|
}
|
|
288
|
-
function
|
|
288
|
+
function qa(n, e) {
|
|
289
289
|
n.indexOf(e) === -1 && n.push(e);
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function Ci(n, e) {
|
|
292
292
|
const t = n.indexOf(e);
|
|
293
293
|
t > -1 && n.splice(t, 1);
|
|
294
294
|
}
|
|
295
|
-
function
|
|
295
|
+
function Ha(n, e, t) {
|
|
296
296
|
for (let r = 0; r < n.length; r++) {
|
|
297
297
|
const i = n[r];
|
|
298
|
-
i.at > e && i.at < t && (
|
|
298
|
+
i.at > e && i.at < t && (Ci(n, i), r--);
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
|
-
function
|
|
302
|
-
|
|
301
|
+
function Wa(n, e, t, r, i, a) {
|
|
302
|
+
Ha(n, i, a);
|
|
303
303
|
for (let s = 0; s < e.length; s++)
|
|
304
304
|
n.push({
|
|
305
305
|
value: e[s],
|
|
306
306
|
at: ct(i, a, r[s]),
|
|
307
|
-
easing:
|
|
307
|
+
easing: _i(t, s)
|
|
308
308
|
});
|
|
309
309
|
}
|
|
310
|
-
function
|
|
310
|
+
function Ga(n, e) {
|
|
311
311
|
for (let t = 0; t < n.length; t++)
|
|
312
312
|
n[t] = n[t] / (e + 1);
|
|
313
313
|
}
|
|
314
|
-
function
|
|
314
|
+
function Ya(n, e) {
|
|
315
315
|
return n.at === e.at ? n.value === null ? 1 : e.value === null ? -1 : 0 : n.at - e.at;
|
|
316
316
|
}
|
|
317
317
|
const he = (n) => !!(n && n.getVelocity), nn = /* @__NO_SIDE_EFFECTS__ */ (n, e, t) => {
|
|
318
318
|
const r = e - n;
|
|
319
319
|
return r === 0 ? 1 : (t - n) / r;
|
|
320
320
|
};
|
|
321
|
-
function
|
|
321
|
+
function Ai(n, e) {
|
|
322
322
|
const t = n[n.length - 1];
|
|
323
323
|
for (let r = 1; r <= e; r++) {
|
|
324
324
|
const i = /* @__PURE__ */ nn(0, e, r);
|
|
325
325
|
n.push(ct(t, 1, i));
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function wi(n) {
|
|
329
329
|
const e = [0];
|
|
330
|
-
return
|
|
330
|
+
return Ai(e, n.length - 1), e;
|
|
331
331
|
}
|
|
332
332
|
function rn(n) {
|
|
333
333
|
return typeof n == "function" && "applyToOptions" in n;
|
|
@@ -342,8 +342,8 @@ function an(n) {
|
|
|
342
342
|
return e >= _t ? 1 / 0 : e;
|
|
343
343
|
}
|
|
344
344
|
const ye = /* @__NO_SIDE_EFFECTS__ */ (n) => n * 1e3, Ee = /* @__NO_SIDE_EFFECTS__ */ (n) => n / 1e3;
|
|
345
|
-
function
|
|
346
|
-
const r = t(te(
|
|
345
|
+
function Ti(n, e = 100, t) {
|
|
346
|
+
const r = t(te(Q({}, n), { keyframes: [0, e] })), i = Math.min(an(r), _t);
|
|
347
347
|
return {
|
|
348
348
|
type: "keyframes",
|
|
349
349
|
ease: (a) => r.next(i * a).value / e,
|
|
@@ -359,8 +359,8 @@ process.env.NODE_ENV !== "production" && (ut = (n, e) => {
|
|
|
359
359
|
if (!n)
|
|
360
360
|
throw new Error(e);
|
|
361
361
|
});
|
|
362
|
-
const
|
|
363
|
-
function
|
|
362
|
+
const Qa = "easeInOut", $a = 20;
|
|
363
|
+
function Za(n, a = {}, r, i) {
|
|
364
364
|
var s = a, { defaultTransition: e = {} } = s, t = ge(s, ["defaultTransition"]);
|
|
365
365
|
const o = e.duration || 0.3, l = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), u = {}, d = /* @__PURE__ */ new Map();
|
|
366
366
|
let h = 0, p = 0, m = 0;
|
|
@@ -370,56 +370,56 @@ function $a(n, a = {}, r, i) {
|
|
|
370
370
|
d.set(v, p);
|
|
371
371
|
continue;
|
|
372
372
|
} else if (!Array.isArray(v)) {
|
|
373
|
-
d.set(v.name,
|
|
373
|
+
d.set(v.name, Lr(p, v.at, h, d));
|
|
374
374
|
continue;
|
|
375
375
|
}
|
|
376
376
|
let [y, w, T = {}] = v;
|
|
377
|
-
T.at !== void 0 && (p =
|
|
377
|
+
T.at !== void 0 && (p = Lr(p, T.at, h, d));
|
|
378
378
|
let x = 0;
|
|
379
379
|
const A = (I, L, k, B = 0, G = 0) => {
|
|
380
|
-
const q =
|
|
380
|
+
const q = Xa(I), V = L, { delay: M = 0, times: F = wi(q), type: K = "keyframes", repeat: J, repeatType: S, repeatDelay: W = 0 } = V, z = ge(V, ["delay", "times", "type", "repeat", "repeatType", "repeatDelay"]);
|
|
381
381
|
let { ease: g = e.ease || "easeOut", duration: E } = L;
|
|
382
382
|
const R = typeof M == "function" ? M(B, G) : M, U = q.length, _ = rn(K) ? K : i == null ? void 0 : i[K];
|
|
383
383
|
if (U <= 2 && _) {
|
|
384
384
|
let N = 100;
|
|
385
|
-
if (U === 2 &&
|
|
385
|
+
if (U === 2 && ts(q)) {
|
|
386
386
|
const re = q[1] - q[0];
|
|
387
387
|
N = Math.abs(re);
|
|
388
388
|
}
|
|
389
|
-
const H =
|
|
389
|
+
const H = Q({}, z);
|
|
390
390
|
E !== void 0 && (H.duration = /* @__PURE__ */ ye(E));
|
|
391
|
-
const X =
|
|
391
|
+
const X = Ti(H, N, _);
|
|
392
392
|
g = X.ease, E = X.duration;
|
|
393
393
|
}
|
|
394
394
|
E != null || (E = o);
|
|
395
395
|
const O = p + R;
|
|
396
396
|
F.length === 1 && F[0] === 0 && (F[1] = 1);
|
|
397
397
|
const C = F.length - q.length;
|
|
398
|
-
if (C > 0 &&
|
|
399
|
-
_e(J <
|
|
398
|
+
if (C > 0 && Ai(F, C), q.length === 1 && q.unshift(null), J) {
|
|
399
|
+
_e(J < $a, "Repeat count too high, must be less than 20"), E = ja(E, J);
|
|
400
400
|
const N = [...q], H = [...F];
|
|
401
401
|
g = Array.isArray(g) ? [...g] : [g];
|
|
402
402
|
const X = [...g];
|
|
403
403
|
for (let re = 0; re < J; re++) {
|
|
404
404
|
q.push(...N);
|
|
405
405
|
for (let D = 0; D < N.length; D++)
|
|
406
|
-
F.push(H[D] + (re + 1)), g.push(D === 0 ? "linear" :
|
|
406
|
+
F.push(H[D] + (re + 1)), g.push(D === 0 ? "linear" : _i(X, D - 1));
|
|
407
407
|
}
|
|
408
|
-
|
|
408
|
+
Ga(F, J);
|
|
409
409
|
}
|
|
410
410
|
const P = O + E;
|
|
411
|
-
|
|
411
|
+
Wa(k, q, g, F, O, P), x = Math.max(R + E, x), m = Math.max(P, m);
|
|
412
412
|
};
|
|
413
413
|
if (he(y)) {
|
|
414
|
-
const I =
|
|
415
|
-
A(w, T,
|
|
414
|
+
const I = Pr(y, c);
|
|
415
|
+
A(w, T, Rr("default", I));
|
|
416
416
|
} else {
|
|
417
|
-
const I =
|
|
417
|
+
const I = bi(y, w, r, u), L = I.length;
|
|
418
418
|
for (let k = 0; k < L; k++) {
|
|
419
419
|
w = w, T = T;
|
|
420
|
-
const B = I[k], G =
|
|
420
|
+
const B = I[k], G = Pr(B, c);
|
|
421
421
|
for (const q in w)
|
|
422
|
-
A(w[q],
|
|
422
|
+
A(w[q], Ja(T, q), Rr(q, G), k, L);
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
425
|
h = p, p += x;
|
|
@@ -427,18 +427,18 @@ function $a(n, a = {}, r, i) {
|
|
|
427
427
|
return c.forEach((f, v) => {
|
|
428
428
|
for (const y in f) {
|
|
429
429
|
const w = f[y];
|
|
430
|
-
w.sort(
|
|
430
|
+
w.sort(Ya);
|
|
431
431
|
const T = [], x = [], A = [];
|
|
432
432
|
for (let L = 0; L < w.length; L++) {
|
|
433
433
|
const { at: k, value: B, easing: G } = w[L];
|
|
434
434
|
T.push(B), x.push(/* @__PURE__ */ nn(0, m, k)), A.push(G || "easeOut");
|
|
435
435
|
}
|
|
436
|
-
x[0] !== 0 && (x.unshift(0), T.unshift(T[0]), A.unshift(
|
|
436
|
+
x[0] !== 0 && (x.unshift(0), T.unshift(T[0]), A.unshift(Qa)), x[x.length - 1] !== 1 && (x.push(1), T.push(null)), l.has(v) || l.set(v, {
|
|
437
437
|
keyframes: {},
|
|
438
438
|
transition: {}
|
|
439
439
|
});
|
|
440
440
|
const I = l.get(v);
|
|
441
|
-
I.keyframes[y] = T, I.transition[y] =
|
|
441
|
+
I.keyframes[y] = T, I.transition[y] = Q(te(Q({}, e), {
|
|
442
442
|
duration: m,
|
|
443
443
|
ease: A,
|
|
444
444
|
times: x
|
|
@@ -446,39 +446,39 @@ function $a(n, a = {}, r, i) {
|
|
|
446
446
|
}
|
|
447
447
|
}), l;
|
|
448
448
|
}
|
|
449
|
-
function
|
|
449
|
+
function Pr(n, e) {
|
|
450
450
|
return !e.has(n) && e.set(n, {}), e.get(n);
|
|
451
451
|
}
|
|
452
|
-
function
|
|
452
|
+
function Rr(n, e) {
|
|
453
453
|
return e[n] || (e[n] = []), e[n];
|
|
454
454
|
}
|
|
455
|
-
function
|
|
455
|
+
function Xa(n) {
|
|
456
456
|
return Array.isArray(n) ? n : [n];
|
|
457
457
|
}
|
|
458
|
-
function
|
|
459
|
-
return n && n[e] ?
|
|
458
|
+
function Ja(n, e) {
|
|
459
|
+
return n && n[e] ? Q(Q({}, n), n[e]) : Q({}, n);
|
|
460
460
|
}
|
|
461
|
-
const
|
|
462
|
-
function
|
|
461
|
+
const es = (n) => typeof n == "number", ts = (n) => n.every(es), it = /* @__PURE__ */ new WeakMap(), ns = (n) => Array.isArray(n);
|
|
462
|
+
function Sr(n) {
|
|
463
463
|
const e = [{}, {}];
|
|
464
464
|
return n == null || n.values.forEach((t, r) => {
|
|
465
465
|
e[0][r] = t.get(), e[1][r] = t.getVelocity();
|
|
466
466
|
}), e;
|
|
467
467
|
}
|
|
468
|
-
function
|
|
468
|
+
function Ii(n, e, t, r) {
|
|
469
469
|
if (typeof e == "function") {
|
|
470
|
-
const [i, a] =
|
|
470
|
+
const [i, a] = Sr(r);
|
|
471
471
|
e = e(t !== void 0 ? t : n.custom, i, a);
|
|
472
472
|
}
|
|
473
473
|
if (typeof e == "string" && (e = n.variants && n.variants[e]), typeof e == "function") {
|
|
474
|
-
const [i, a] =
|
|
474
|
+
const [i, a] = Sr(r);
|
|
475
475
|
e = e(t !== void 0 ? t : n.custom, i, a);
|
|
476
476
|
}
|
|
477
477
|
return e;
|
|
478
478
|
}
|
|
479
|
-
function
|
|
479
|
+
function rs(n, e, t) {
|
|
480
480
|
const r = n.getProps();
|
|
481
|
-
return
|
|
481
|
+
return Ii(r, e, r.custom, n);
|
|
482
482
|
}
|
|
483
483
|
const ft = [
|
|
484
484
|
"setup",
|
|
@@ -498,7 +498,7 @@ const ft = [
|
|
|
498
498
|
"postRender"
|
|
499
499
|
// Compute
|
|
500
500
|
];
|
|
501
|
-
function
|
|
501
|
+
function is(n, e) {
|
|
502
502
|
let t = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = !1, a = !1;
|
|
503
503
|
const s = /* @__PURE__ */ new WeakSet();
|
|
504
504
|
let o = {
|
|
@@ -536,16 +536,16 @@ function rs(n, e) {
|
|
|
536
536
|
};
|
|
537
537
|
return c;
|
|
538
538
|
}
|
|
539
|
-
const Ce = {},
|
|
540
|
-
function
|
|
539
|
+
const Ce = {}, as = 40;
|
|
540
|
+
function ss(n, e) {
|
|
541
541
|
let t = !1, r = !0;
|
|
542
542
|
const i = {
|
|
543
543
|
delta: 0,
|
|
544
544
|
timestamp: 0,
|
|
545
545
|
isProcessing: !1
|
|
546
|
-
}, a = () => t = !0, s = ft.reduce((T, x) => (T[x] =
|
|
546
|
+
}, a = () => t = !0, s = ft.reduce((T, x) => (T[x] = is(a), T), {}), { setup: o, read: l, resolveKeyframes: c, preUpdate: u, update: d, preRender: h, render: p, postRender: m } = s, f = () => {
|
|
547
547
|
const T = Ce.useManualTiming ? i.timestamp : performance.now();
|
|
548
|
-
t = !1, Ce.useManualTiming || (i.delta = r ? 1e3 / 60 : Math.max(Math.min(T - i.timestamp,
|
|
548
|
+
t = !1, Ce.useManualTiming || (i.delta = r ? 1e3 / 60 : Math.max(Math.min(T - i.timestamp, as), 1)), i.timestamp = T, i.isProcessing = !0, o.process(i), l.process(i), c.process(i), u.process(i), d.process(i), h.process(i), p.process(i), m.process(i), i.isProcessing = !1, t && e && (r = !1, n(f));
|
|
549
549
|
}, v = () => {
|
|
550
550
|
t = !0, r = !0, i.isProcessing || n(f);
|
|
551
551
|
};
|
|
@@ -557,26 +557,26 @@ function as(n, e) {
|
|
|
557
557
|
s[ft[x]].cancel(T);
|
|
558
558
|
}, state: i, steps: s };
|
|
559
559
|
}
|
|
560
|
-
const De = /* @__NO_SIDE_EFFECTS__ */ (n) => n, { schedule: Ae, cancel: Ft, state: Ct } = /* @__PURE__ */
|
|
560
|
+
const De = /* @__NO_SIDE_EFFECTS__ */ (n) => n, { schedule: Ae, cancel: Ft, state: Ct } = /* @__PURE__ */ ss(typeof requestAnimationFrame != "undefined" ? requestAnimationFrame : De, !0);
|
|
561
561
|
let Et;
|
|
562
|
-
function
|
|
562
|
+
function os() {
|
|
563
563
|
Et = void 0;
|
|
564
564
|
}
|
|
565
565
|
const ve = {
|
|
566
566
|
now: () => (Et === void 0 && ve.set(Ct.isProcessing || Ce.useManualTiming ? Ct.timestamp : performance.now()), Et),
|
|
567
567
|
set: (n) => {
|
|
568
|
-
Et = n, queueMicrotask(
|
|
568
|
+
Et = n, queueMicrotask(os);
|
|
569
569
|
}
|
|
570
|
-
},
|
|
571
|
-
function
|
|
572
|
-
n ||
|
|
570
|
+
}, kr = /* @__PURE__ */ new Set();
|
|
571
|
+
function Oi(n, e, t) {
|
|
572
|
+
n || kr.has(e) || (console.warn(e), kr.add(e));
|
|
573
573
|
}
|
|
574
|
-
class
|
|
574
|
+
class Ni {
|
|
575
575
|
constructor() {
|
|
576
576
|
this.subscriptions = [];
|
|
577
577
|
}
|
|
578
578
|
add(e) {
|
|
579
|
-
return
|
|
579
|
+
return qa(this.subscriptions, e), () => Ci(this.subscriptions, e);
|
|
580
580
|
}
|
|
581
581
|
notify(e, t, r) {
|
|
582
582
|
const i = this.subscriptions.length;
|
|
@@ -596,11 +596,11 @@ class Oi {
|
|
|
596
596
|
this.subscriptions.length = 0;
|
|
597
597
|
}
|
|
598
598
|
}
|
|
599
|
-
function
|
|
599
|
+
function xi(n, e) {
|
|
600
600
|
return e ? n * (1e3 / e) : 0;
|
|
601
601
|
}
|
|
602
|
-
const
|
|
603
|
-
class
|
|
602
|
+
const Mr = 30, ls = (n) => !isNaN(parseFloat(n));
|
|
603
|
+
class cs {
|
|
604
604
|
/**
|
|
605
605
|
* @param init - The initiating value
|
|
606
606
|
* @param config - Optional configuration options
|
|
@@ -618,7 +618,7 @@ class ls {
|
|
|
618
618
|
}, this.hasAnimated = !1, this.setCurrent(e), this.owner = t.owner;
|
|
619
619
|
}
|
|
620
620
|
setCurrent(e) {
|
|
621
|
-
this.current = e, this.updatedAt = ve.now(), this.canTrackVelocity === null && e !== void 0 && (this.canTrackVelocity =
|
|
621
|
+
this.current = e, this.updatedAt = ve.now(), this.canTrackVelocity === null && e !== void 0 && (this.canTrackVelocity = ls(this.current));
|
|
622
622
|
}
|
|
623
623
|
setPrevFrameValue(e = this.current) {
|
|
624
624
|
this.prevFrameValue = e, this.prevUpdatedAt = this.updatedAt;
|
|
@@ -664,10 +664,10 @@ class ls {
|
|
|
664
664
|
* @deprecated
|
|
665
665
|
*/
|
|
666
666
|
onChange(e) {
|
|
667
|
-
return process.env.NODE_ENV !== "production" &&
|
|
667
|
+
return process.env.NODE_ENV !== "production" && Oi(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", e);
|
|
668
668
|
}
|
|
669
669
|
on(e, t) {
|
|
670
|
-
this.events[e] || (this.events[e] = new
|
|
670
|
+
this.events[e] || (this.events[e] = new Ni());
|
|
671
671
|
const r = this.events[e].add(t);
|
|
672
672
|
return e === "change" ? () => {
|
|
673
673
|
r(), Ae.read(() => {
|
|
@@ -748,10 +748,10 @@ class ls {
|
|
|
748
748
|
*/
|
|
749
749
|
getVelocity() {
|
|
750
750
|
const e = ve.now();
|
|
751
|
-
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt >
|
|
751
|
+
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt > Mr)
|
|
752
752
|
return 0;
|
|
753
|
-
const t = Math.min(this.updatedAt - this.prevUpdatedAt,
|
|
754
|
-
return
|
|
753
|
+
const t = Math.min(this.updatedAt - this.prevUpdatedAt, Mr);
|
|
754
|
+
return xi(parseFloat(this.current) - parseFloat(this.prevFrameValue), t);
|
|
755
755
|
}
|
|
756
756
|
/**
|
|
757
757
|
* Registers a new animation to control this `MotionValue`. Only one
|
|
@@ -804,41 +804,41 @@ class ls {
|
|
|
804
804
|
}
|
|
805
805
|
}
|
|
806
806
|
function at(n, e) {
|
|
807
|
-
return new
|
|
807
|
+
return new cs(n, e);
|
|
808
808
|
}
|
|
809
|
-
function
|
|
809
|
+
function us(n, e, t) {
|
|
810
810
|
n.hasValue(e) ? n.getValue(e).set(t) : n.addValue(e, at(t));
|
|
811
811
|
}
|
|
812
|
-
function
|
|
813
|
-
return
|
|
812
|
+
function ds(n) {
|
|
813
|
+
return ns(n) ? n[n.length - 1] || 0 : n;
|
|
814
814
|
}
|
|
815
|
-
function
|
|
816
|
-
let s =
|
|
817
|
-
a =
|
|
815
|
+
function ps(n, e) {
|
|
816
|
+
let s = rs(n, e) || {}, { transitionEnd: r = {}, transition: i = {} } = s, a = ge(s, ["transitionEnd", "transition"]);
|
|
817
|
+
a = Q(Q({}, a), r);
|
|
818
818
|
for (const o in a) {
|
|
819
|
-
const l =
|
|
820
|
-
|
|
819
|
+
const l = ds(a[o]);
|
|
820
|
+
us(n, o, l);
|
|
821
821
|
}
|
|
822
822
|
}
|
|
823
|
-
function
|
|
823
|
+
function hs(n) {
|
|
824
824
|
return !!(he(n) && n.add);
|
|
825
825
|
}
|
|
826
|
-
function
|
|
826
|
+
function ms(n, e) {
|
|
827
827
|
const t = n.getValue("willChange");
|
|
828
|
-
if (
|
|
828
|
+
if (hs(t))
|
|
829
829
|
return t.add(e);
|
|
830
830
|
if (!t && Ce.WillChange) {
|
|
831
831
|
const r = new Ce.WillChange("auto");
|
|
832
832
|
n.addValue("willChange", r), r.add(e);
|
|
833
833
|
}
|
|
834
834
|
}
|
|
835
|
-
const sn = (n) => n.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(),
|
|
836
|
-
function
|
|
837
|
-
return n.props[
|
|
835
|
+
const sn = (n) => n.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), fs = "framerAppearId", vs = "data-" + sn(fs);
|
|
836
|
+
function gs(n) {
|
|
837
|
+
return n.props[vs];
|
|
838
838
|
}
|
|
839
|
-
const
|
|
840
|
-
function
|
|
841
|
-
const i = n.filter(
|
|
839
|
+
const ys = (n) => n !== null;
|
|
840
|
+
function bs(n, { repeat: e, repeatType: t = "loop" }, r) {
|
|
841
|
+
const i = n.filter(ys), a = e && t !== "loop" && e % 2 === 1 ? 0 : i.length - 1;
|
|
842
842
|
return i[a];
|
|
843
843
|
}
|
|
844
844
|
const Ve = [
|
|
@@ -859,45 +859,45 @@ const Ve = [
|
|
|
859
859
|
"skew",
|
|
860
860
|
"skewX",
|
|
861
861
|
"skewY"
|
|
862
|
-
], Fe = new Set(Ve),
|
|
862
|
+
], Fe = new Set(Ve), Es = {
|
|
863
863
|
type: "spring",
|
|
864
864
|
stiffness: 500,
|
|
865
865
|
damping: 25,
|
|
866
866
|
restSpeed: 10
|
|
867
|
-
},
|
|
867
|
+
}, _s = (n) => ({
|
|
868
868
|
type: "spring",
|
|
869
869
|
stiffness: 550,
|
|
870
870
|
damping: n === 0 ? 2 * Math.sqrt(550) : 30,
|
|
871
871
|
restSpeed: 10
|
|
872
|
-
}),
|
|
872
|
+
}), Cs = {
|
|
873
873
|
type: "keyframes",
|
|
874
874
|
duration: 0.8
|
|
875
|
-
},
|
|
875
|
+
}, As = {
|
|
876
876
|
type: "keyframes",
|
|
877
877
|
ease: [0.25, 0.1, 0.35, 1],
|
|
878
878
|
duration: 0.3
|
|
879
|
-
},
|
|
880
|
-
function
|
|
879
|
+
}, ws = (n, { keyframes: e }) => e.length > 2 ? Cs : Fe.has(n) ? n.startsWith("scale") ? _s(e[1]) : Es : As;
|
|
880
|
+
function Ts(d) {
|
|
881
881
|
var h = d, { when: n, delay: e, delayChildren: t, staggerChildren: r, staggerDirection: i, repeat: a, repeatType: s, repeatDelay: o, from: l, elapsed: c } = h, u = ge(h, ["when", "delay", "delayChildren", "staggerChildren", "staggerDirection", "repeat", "repeatType", "repeatDelay", "from", "elapsed"]);
|
|
882
882
|
return !!Object.keys(u).length;
|
|
883
883
|
}
|
|
884
|
-
function
|
|
884
|
+
function Li(n, e) {
|
|
885
885
|
var t, r;
|
|
886
886
|
return (r = (t = n == null ? void 0 : n[e]) != null ? t : n == null ? void 0 : n.default) != null ? r : n;
|
|
887
887
|
}
|
|
888
|
-
const
|
|
888
|
+
const Pi = (n) => (e) => typeof e == "string" && e.startsWith(n), Ri = /* @__PURE__ */ Pi("--"), Is = /* @__PURE__ */ Pi("var(--"), on = (n) => Is(n) ? Os.test(n.split("/*")[0].trim()) : !1, Os = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, Le = (n, e, t) => t > e ? e : t < n ? n : t, Ue = {
|
|
889
889
|
test: (n) => typeof n == "number",
|
|
890
890
|
parse: parseFloat,
|
|
891
891
|
transform: (n) => n
|
|
892
|
-
}, st = te(
|
|
892
|
+
}, st = te(Q({}, Ue), {
|
|
893
893
|
transform: (n) => Le(0, 1, n)
|
|
894
|
-
}), vt = te(
|
|
894
|
+
}), vt = te(Q({}, Ue), {
|
|
895
895
|
default: 1
|
|
896
896
|
}), rt = (n) => Math.round(n * 1e5) / 1e5, ln = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
|
|
897
|
-
function
|
|
897
|
+
function Ns(n) {
|
|
898
898
|
return n == null;
|
|
899
899
|
}
|
|
900
|
-
const
|
|
900
|
+
const xs = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, cn = (n, e) => (t) => !!(typeof t == "string" && xs.test(t) && t.startsWith(n) || e && !Ns(t) && Object.prototype.hasOwnProperty.call(t, e)), Si = (n, e, t) => (r) => {
|
|
901
901
|
if (typeof r != "string")
|
|
902
902
|
return r;
|
|
903
903
|
const [i, a, s, o] = r.match(ln);
|
|
@@ -907,14 +907,14 @@ const Ns = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s
|
|
|
907
907
|
[t]: parseFloat(s),
|
|
908
908
|
alpha: o !== void 0 ? parseFloat(o) : 1
|
|
909
909
|
};
|
|
910
|
-
},
|
|
911
|
-
transform: (n) => Math.round(
|
|
910
|
+
}, Ls = (n) => Le(0, 255, n), Ot = te(Q({}, Ue), {
|
|
911
|
+
transform: (n) => Math.round(Ls(n))
|
|
912
912
|
}), Ie = {
|
|
913
913
|
test: /* @__PURE__ */ cn("rgb", "red"),
|
|
914
|
-
parse: /* @__PURE__ */
|
|
914
|
+
parse: /* @__PURE__ */ Si("red", "green", "blue"),
|
|
915
915
|
transform: ({ red: n, green: e, blue: t, alpha: r = 1 }) => "rgba(" + Ot.transform(n) + ", " + Ot.transform(e) + ", " + Ot.transform(t) + ", " + rt(st.transform(r)) + ")"
|
|
916
916
|
};
|
|
917
|
-
function
|
|
917
|
+
function Ps(n) {
|
|
918
918
|
let e = "", t = "", r = "", i = "";
|
|
919
919
|
return n.length > 5 ? (e = n.substring(1, 3), t = n.substring(3, 5), r = n.substring(5, 7), i = n.substring(7, 9)) : (e = n.substring(1, 2), t = n.substring(2, 3), r = n.substring(3, 4), i = n.substring(4, 5), e += e, t += t, r += r, i += i), {
|
|
920
920
|
red: parseInt(e, 16),
|
|
@@ -925,29 +925,29 @@ function Ls(n) {
|
|
|
925
925
|
}
|
|
926
926
|
const Ut = {
|
|
927
927
|
test: /* @__PURE__ */ cn("#"),
|
|
928
|
-
parse:
|
|
928
|
+
parse: Ps,
|
|
929
929
|
transform: Ie.transform
|
|
930
930
|
}, dt = /* @__NO_SIDE_EFFECTS__ */ (n) => ({
|
|
931
931
|
test: (e) => typeof e == "string" && e.endsWith(n) && e.split(" ").length === 1,
|
|
932
932
|
parse: parseFloat,
|
|
933
933
|
transform: (e) => `${e}${n}`
|
|
934
|
-
}), we = /* @__PURE__ */ dt("deg"), ke = /* @__PURE__ */ dt("%"),
|
|
934
|
+
}), we = /* @__PURE__ */ dt("deg"), ke = /* @__PURE__ */ dt("%"), $ = /* @__PURE__ */ dt("px"), Rs = /* @__PURE__ */ dt("vh"), Ss = /* @__PURE__ */ dt("vw"), Dr = te(Q({}, ke), {
|
|
935
935
|
parse: (n) => ke.parse(n) / 100,
|
|
936
936
|
transform: (n) => ke.transform(n * 100)
|
|
937
937
|
}), Re = {
|
|
938
938
|
test: /* @__PURE__ */ cn("hsl", "hue"),
|
|
939
|
-
parse: /* @__PURE__ */
|
|
939
|
+
parse: /* @__PURE__ */ Si("hue", "saturation", "lightness"),
|
|
940
940
|
transform: ({ hue: n, saturation: e, lightness: t, alpha: r = 1 }) => "hsla(" + Math.round(n) + ", " + ke.transform(rt(e)) + ", " + ke.transform(rt(t)) + ", " + rt(st.transform(r)) + ")"
|
|
941
941
|
}, ue = {
|
|
942
942
|
test: (n) => Ie.test(n) || Ut.test(n) || Re.test(n),
|
|
943
943
|
parse: (n) => Ie.test(n) ? Ie.parse(n) : Re.test(n) ? Re.parse(n) : Ut.parse(n),
|
|
944
944
|
transform: (n) => typeof n == "string" ? n : n.hasOwnProperty("red") ? Ie.transform(n) : Re.transform(n)
|
|
945
|
-
},
|
|
946
|
-
function
|
|
945
|
+
}, ks = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
|
|
946
|
+
function Ms(n) {
|
|
947
947
|
var e, t;
|
|
948
|
-
return isNaN(n) && typeof n == "string" && (((e = n.match(ln)) == null ? void 0 : e.length) || 0) + (((t = n.match(
|
|
948
|
+
return isNaN(n) && typeof n == "string" && (((e = n.match(ln)) == null ? void 0 : e.length) || 0) + (((t = n.match(ks)) == null ? void 0 : t.length) || 0) > 0;
|
|
949
949
|
}
|
|
950
|
-
const
|
|
950
|
+
const ki = "number", Mi = "color", Ds = "var", Vs = "var(", Vr = "${}", Fs = /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;
|
|
951
951
|
function ot(n) {
|
|
952
952
|
const e = n.toString(), t = [], r = {
|
|
953
953
|
color: [],
|
|
@@ -955,39 +955,39 @@ function ot(n) {
|
|
|
955
955
|
var: []
|
|
956
956
|
}, i = [];
|
|
957
957
|
let a = 0;
|
|
958
|
-
const o = e.replace(
|
|
958
|
+
const o = e.replace(Fs, (l) => (ue.test(l) ? (r.color.push(a), i.push(Mi), t.push(ue.parse(l))) : l.startsWith(Vs) ? (r.var.push(a), i.push(Ds), t.push(l)) : (r.number.push(a), i.push(ki), t.push(parseFloat(l))), ++a, Vr)).split(Vr);
|
|
959
959
|
return { values: t, split: o, indexes: r, types: i };
|
|
960
960
|
}
|
|
961
|
-
function
|
|
961
|
+
function Di(n) {
|
|
962
962
|
return ot(n).values;
|
|
963
963
|
}
|
|
964
|
-
function
|
|
964
|
+
function Vi(n) {
|
|
965
965
|
const { split: e, types: t } = ot(n), r = e.length;
|
|
966
966
|
return (i) => {
|
|
967
967
|
let a = "";
|
|
968
968
|
for (let s = 0; s < r; s++)
|
|
969
969
|
if (a += e[s], i[s] !== void 0) {
|
|
970
970
|
const o = t[s];
|
|
971
|
-
o ===
|
|
971
|
+
o === ki ? a += rt(i[s]) : o === Mi ? a += ue.transform(i[s]) : a += i[s];
|
|
972
972
|
}
|
|
973
973
|
return a;
|
|
974
974
|
};
|
|
975
975
|
}
|
|
976
|
-
const
|
|
977
|
-
function
|
|
978
|
-
const e =
|
|
979
|
-
return
|
|
976
|
+
const Us = (n) => typeof n == "number" ? 0 : n;
|
|
977
|
+
function Bs(n) {
|
|
978
|
+
const e = Di(n);
|
|
979
|
+
return Vi(n)(e.map(Us));
|
|
980
980
|
}
|
|
981
981
|
const Be = {
|
|
982
|
-
test:
|
|
983
|
-
parse:
|
|
984
|
-
createTransformer:
|
|
985
|
-
getAnimatableNone:
|
|
982
|
+
test: Ms,
|
|
983
|
+
parse: Di,
|
|
984
|
+
createTransformer: Vi,
|
|
985
|
+
getAnimatableNone: Bs
|
|
986
986
|
};
|
|
987
987
|
function Nt(n, e, t) {
|
|
988
988
|
return t < 0 && (t += 1), t > 1 && (t -= 1), t < 1 / 6 ? n + (e - n) * 6 * t : t < 1 / 2 ? e : t < 2 / 3 ? n + (e - n) * (2 / 3 - t) * 6 : n;
|
|
989
989
|
}
|
|
990
|
-
function
|
|
990
|
+
function zs({ hue: n, saturation: e, lightness: t, alpha: r }) {
|
|
991
991
|
n /= 360, e /= 100, t /= 100;
|
|
992
992
|
let i = 0, a = 0, s = 0;
|
|
993
993
|
if (!e)
|
|
@@ -1009,32 +1009,32 @@ function At(n, e) {
|
|
|
1009
1009
|
const xt = (n, e, t) => {
|
|
1010
1010
|
const r = n * n, i = t * (e * e - r) + r;
|
|
1011
1011
|
return i < 0 ? 0 : Math.sqrt(i);
|
|
1012
|
-
},
|
|
1013
|
-
function
|
|
1014
|
-
const e =
|
|
1012
|
+
}, js = [Ut, Ie, Re], Ks = (n) => js.find((e) => e.test(n));
|
|
1013
|
+
function Fr(n) {
|
|
1014
|
+
const e = Ks(n);
|
|
1015
1015
|
if (ut(!!e, `'${n}' is not an animatable color. Use the equivalent color code instead.`), !e)
|
|
1016
1016
|
return !1;
|
|
1017
1017
|
let t = e.parse(n);
|
|
1018
|
-
return e === Re && (t =
|
|
1018
|
+
return e === Re && (t = zs(t)), t;
|
|
1019
1019
|
}
|
|
1020
|
-
const
|
|
1021
|
-
const t =
|
|
1020
|
+
const Ur = (n, e) => {
|
|
1021
|
+
const t = Fr(n), r = Fr(e);
|
|
1022
1022
|
if (!t || !r)
|
|
1023
1023
|
return At(n, e);
|
|
1024
|
-
const i =
|
|
1024
|
+
const i = Q({}, t);
|
|
1025
1025
|
return (a) => (i.red = xt(t.red, r.red, a), i.green = xt(t.green, r.green, a), i.blue = xt(t.blue, r.blue, a), i.alpha = ct(t.alpha, r.alpha, a), Ie.transform(i));
|
|
1026
1026
|
}, Bt = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
1027
|
-
function
|
|
1027
|
+
function qs(n, e) {
|
|
1028
1028
|
return Bt.has(n) ? (t) => t <= 0 ? n : e : (t) => t >= 1 ? e : n;
|
|
1029
1029
|
}
|
|
1030
|
-
const
|
|
1031
|
-
function
|
|
1030
|
+
const Hs = (n, e) => (t) => e(n(t)), un = (...n) => n.reduce(Hs);
|
|
1031
|
+
function Ws(n, e) {
|
|
1032
1032
|
return (t) => ct(n, e, t);
|
|
1033
1033
|
}
|
|
1034
1034
|
function dn(n) {
|
|
1035
|
-
return typeof n == "number" ?
|
|
1035
|
+
return typeof n == "number" ? Ws : typeof n == "string" ? on(n) ? At : ue.test(n) ? Ur : Qs : Array.isArray(n) ? Fi : typeof n == "object" ? ue.test(n) ? Ur : Gs : At;
|
|
1036
1036
|
}
|
|
1037
|
-
function
|
|
1037
|
+
function Fi(n, e) {
|
|
1038
1038
|
const t = [...n], r = t.length, i = n.map((a, s) => dn(a)(a, e[s]));
|
|
1039
1039
|
return (a) => {
|
|
1040
1040
|
for (let s = 0; s < r; s++)
|
|
@@ -1042,8 +1042,8 @@ function Vi(n, e) {
|
|
|
1042
1042
|
return t;
|
|
1043
1043
|
};
|
|
1044
1044
|
}
|
|
1045
|
-
function
|
|
1046
|
-
const t =
|
|
1045
|
+
function Gs(n, e) {
|
|
1046
|
+
const t = Q(Q({}, n), e), r = {};
|
|
1047
1047
|
for (const i in t)
|
|
1048
1048
|
n[i] !== void 0 && e[i] !== void 0 && (r[i] = dn(n[i])(n[i], e[i]));
|
|
1049
1049
|
return (i) => {
|
|
@@ -1052,7 +1052,7 @@ function Ws(n, e) {
|
|
|
1052
1052
|
return t;
|
|
1053
1053
|
};
|
|
1054
1054
|
}
|
|
1055
|
-
function
|
|
1055
|
+
function Ys(n, e) {
|
|
1056
1056
|
var i;
|
|
1057
1057
|
const t = [], r = { color: 0, var: 0, number: 0 };
|
|
1058
1058
|
for (let a = 0; a < e.values.length; a++) {
|
|
@@ -1061,14 +1061,14 @@ function Gs(n, e) {
|
|
|
1061
1061
|
}
|
|
1062
1062
|
return t;
|
|
1063
1063
|
}
|
|
1064
|
-
const
|
|
1064
|
+
const Qs = (n, e) => {
|
|
1065
1065
|
const t = Be.createTransformer(e), r = ot(n), i = ot(e);
|
|
1066
|
-
return r.indexes.var.length === i.indexes.var.length && r.indexes.color.length === i.indexes.color.length && r.indexes.number.length >= i.indexes.number.length ? Bt.has(n) && !i.values.length || Bt.has(e) && !r.values.length ?
|
|
1066
|
+
return r.indexes.var.length === i.indexes.var.length && r.indexes.color.length === i.indexes.color.length && r.indexes.number.length >= i.indexes.number.length ? Bt.has(n) && !i.values.length || Bt.has(e) && !r.values.length ? qs(n, e) : un(Fi(Ys(r, i), i.values), t) : (ut(!0, `Complex values '${n}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`), At(n, e));
|
|
1067
1067
|
};
|
|
1068
|
-
function
|
|
1068
|
+
function Ui(n, e, t) {
|
|
1069
1069
|
return typeof n == "number" && typeof e == "number" && typeof t == "number" ? ct(n, e, t) : dn(n)(n, e);
|
|
1070
1070
|
}
|
|
1071
|
-
const
|
|
1071
|
+
const $s = (n) => {
|
|
1072
1072
|
const e = ({ timestamp: t }) => n(t);
|
|
1073
1073
|
return {
|
|
1074
1074
|
start: (t = !0) => Ae.update(e, t),
|
|
@@ -1079,16 +1079,16 @@ const Qs = (n) => {
|
|
|
1079
1079
|
*/
|
|
1080
1080
|
now: () => Ct.isProcessing ? Ct.timestamp : ve.now()
|
|
1081
1081
|
};
|
|
1082
|
-
},
|
|
1082
|
+
}, Bi = (n, e, t = 10) => {
|
|
1083
1083
|
let r = "";
|
|
1084
1084
|
const i = Math.max(Math.round(e / t), 2);
|
|
1085
1085
|
for (let a = 0; a < i; a++)
|
|
1086
1086
|
r += n(a / (i - 1)) + ", ";
|
|
1087
1087
|
return `linear(${r.substring(0, r.length - 2)})`;
|
|
1088
|
-
},
|
|
1089
|
-
function
|
|
1090
|
-
const r = Math.max(e -
|
|
1091
|
-
return
|
|
1088
|
+
}, Zs = 5;
|
|
1089
|
+
function zi(n, e, t) {
|
|
1090
|
+
const r = Math.max(e - Zs, 0);
|
|
1091
|
+
return xi(t - n(r), e - r);
|
|
1092
1092
|
}
|
|
1093
1093
|
const ie = {
|
|
1094
1094
|
// Default spring physics
|
|
@@ -1118,17 +1118,17 @@ const ie = {
|
|
|
1118
1118
|
// in seconds
|
|
1119
1119
|
minDamping: 0.05,
|
|
1120
1120
|
maxDamping: 1
|
|
1121
|
-
},
|
|
1122
|
-
function
|
|
1121
|
+
}, Br = 1e-3;
|
|
1122
|
+
function Xs({ duration: n = ie.duration, bounce: e = ie.bounce, velocity: t = ie.velocity, mass: r = ie.mass }) {
|
|
1123
1123
|
let i, a;
|
|
1124
1124
|
ut(n <= /* @__PURE__ */ ye(ie.maxDuration), "Spring duration must be 10 seconds or less");
|
|
1125
1125
|
let s = 1 - e;
|
|
1126
1126
|
s = Le(ie.minDamping, ie.maxDamping, s), n = Le(ie.minDuration, ie.maxDuration, /* @__PURE__ */ Ee(n)), s < 1 ? (i = (c) => {
|
|
1127
1127
|
const u = c * s, d = u * n, h = u - t, p = zt(c, s), m = Math.exp(-d);
|
|
1128
|
-
return
|
|
1128
|
+
return Br - h / p * m;
|
|
1129
1129
|
}, a = (c) => {
|
|
1130
1130
|
const d = c * s * n, h = d * t + t, p = Math.pow(s, 2) * Math.pow(c, 2) * n, m = Math.exp(-d), f = zt(Math.pow(c, 2), s);
|
|
1131
|
-
return (-i(c) +
|
|
1131
|
+
return (-i(c) + Br > 0 ? -1 : 1) * ((h - p) * m) / f;
|
|
1132
1132
|
}) : (i = (c) => {
|
|
1133
1133
|
const u = Math.exp(-c * n), d = (c - t) * n + 1;
|
|
1134
1134
|
return -1e-3 + u * d;
|
|
@@ -1136,7 +1136,7 @@ function Zs({ duration: n = ie.duration, bounce: e = ie.bounce, velocity: t = ie
|
|
|
1136
1136
|
const u = Math.exp(-c * n), d = (t - c) * (n * n);
|
|
1137
1137
|
return u * d;
|
|
1138
1138
|
});
|
|
1139
|
-
const o = 5 / n, l =
|
|
1139
|
+
const o = 5 / n, l = eo(i, a, o);
|
|
1140
1140
|
if (n = /* @__PURE__ */ ye(n), isNaN(l))
|
|
1141
1141
|
return {
|
|
1142
1142
|
stiffness: ie.stiffness,
|
|
@@ -1152,39 +1152,39 @@ function Zs({ duration: n = ie.duration, bounce: e = ie.bounce, velocity: t = ie
|
|
|
1152
1152
|
};
|
|
1153
1153
|
}
|
|
1154
1154
|
}
|
|
1155
|
-
const
|
|
1156
|
-
function
|
|
1155
|
+
const Js = 12;
|
|
1156
|
+
function eo(n, e, t) {
|
|
1157
1157
|
let r = t;
|
|
1158
|
-
for (let i = 1; i <
|
|
1158
|
+
for (let i = 1; i < Js; i++)
|
|
1159
1159
|
r = r - n(r) / e(r);
|
|
1160
1160
|
return r;
|
|
1161
1161
|
}
|
|
1162
1162
|
function zt(n, e) {
|
|
1163
1163
|
return n * Math.sqrt(1 - e * e);
|
|
1164
1164
|
}
|
|
1165
|
-
const
|
|
1166
|
-
function
|
|
1165
|
+
const to = ["duration", "bounce"], no = ["stiffness", "damping", "mass"];
|
|
1166
|
+
function zr(n, e) {
|
|
1167
1167
|
return e.some((t) => n[t] !== void 0);
|
|
1168
1168
|
}
|
|
1169
|
-
function
|
|
1170
|
-
let e =
|
|
1169
|
+
function ro(n) {
|
|
1170
|
+
let e = Q({
|
|
1171
1171
|
velocity: ie.velocity,
|
|
1172
1172
|
stiffness: ie.stiffness,
|
|
1173
1173
|
damping: ie.damping,
|
|
1174
1174
|
mass: ie.mass,
|
|
1175
1175
|
isResolvedFromDuration: !1
|
|
1176
1176
|
}, n);
|
|
1177
|
-
if (!
|
|
1177
|
+
if (!zr(n, no) && zr(n, to))
|
|
1178
1178
|
if (n.visualDuration) {
|
|
1179
1179
|
const t = n.visualDuration, r = 2 * Math.PI / (t * 1.2), i = r * r, a = 2 * Le(0.05, 1, 1 - (n.bounce || 0)) * Math.sqrt(i);
|
|
1180
|
-
e = te(
|
|
1180
|
+
e = te(Q({}, e), {
|
|
1181
1181
|
mass: ie.mass,
|
|
1182
1182
|
stiffness: i,
|
|
1183
1183
|
damping: a
|
|
1184
1184
|
});
|
|
1185
1185
|
} else {
|
|
1186
|
-
const t =
|
|
1187
|
-
e = te(
|
|
1186
|
+
const t = Xs(n);
|
|
1187
|
+
e = te(Q(Q({}, e), t), {
|
|
1188
1188
|
mass: ie.mass
|
|
1189
1189
|
}), e.isResolvedFromDuration = !0;
|
|
1190
1190
|
}
|
|
@@ -1197,7 +1197,7 @@ function lt(n = ie.visualDuration, e = ie.bounce) {
|
|
|
1197
1197
|
bounce: e
|
|
1198
1198
|
} : n;
|
|
1199
1199
|
let { restSpeed: r, restDelta: i } = t;
|
|
1200
|
-
const a = t.keyframes[0], s = t.keyframes[t.keyframes.length - 1], o = { done: !1, value: a }, { stiffness: l, damping: c, mass: u, duration: d, velocity: h, isResolvedFromDuration: p } =
|
|
1200
|
+
const a = t.keyframes[0], s = t.keyframes[t.keyframes.length - 1], o = { done: !1, value: a }, { stiffness: l, damping: c, mass: u, duration: d, velocity: h, isResolvedFromDuration: p } = ro(te(Q({}, t), {
|
|
1201
1201
|
velocity: -/* @__PURE__ */ Ee(t.velocity || 0)
|
|
1202
1202
|
})), m = h || 0, f = c / (2 * Math.sqrt(l * u)), v = s - a, y = /* @__PURE__ */ Ee(Math.sqrt(l / u)), w = Math.abs(v) < 5;
|
|
1203
1203
|
r || (r = w ? ie.restSpeed.granular : ie.restSpeed.default), i || (i = w ? ie.restDelta.granular : ie.restDelta.default);
|
|
@@ -1225,14 +1225,14 @@ function lt(n = ie.visualDuration, e = ie.bounce) {
|
|
|
1225
1225
|
o.done = A >= d;
|
|
1226
1226
|
else {
|
|
1227
1227
|
let L = A === 0 ? m : 0;
|
|
1228
|
-
f < 1 && (L = A === 0 ? /* @__PURE__ */ ye(m) :
|
|
1228
|
+
f < 1 && (L = A === 0 ? /* @__PURE__ */ ye(m) : zi(T, A, I));
|
|
1229
1229
|
const k = Math.abs(L) <= r, B = Math.abs(s - I) <= i;
|
|
1230
1230
|
o.done = k && B;
|
|
1231
1231
|
}
|
|
1232
1232
|
return o.value = o.done ? s : I, o;
|
|
1233
1233
|
},
|
|
1234
1234
|
toString: () => {
|
|
1235
|
-
const A = Math.min(an(x), _t), I =
|
|
1235
|
+
const A = Math.min(an(x), _t), I = Bi((L) => x.next(A * L).value, A, 30);
|
|
1236
1236
|
return A + "ms " + I;
|
|
1237
1237
|
},
|
|
1238
1238
|
toTransition: () => {
|
|
@@ -1241,7 +1241,7 @@ function lt(n = ie.visualDuration, e = ie.bounce) {
|
|
|
1241
1241
|
return x;
|
|
1242
1242
|
}
|
|
1243
1243
|
lt.applyToOptions = (n) => {
|
|
1244
|
-
const e =
|
|
1244
|
+
const e = Ti(n, 100, lt);
|
|
1245
1245
|
return n.ease = e.ease, n.duration = /* @__PURE__ */ ye(e.duration), n.type = "keyframes", n;
|
|
1246
1246
|
};
|
|
1247
1247
|
function jt({ keyframes: n, velocity: e = 0, power: t = 0.8, timeConstant: r = 325, bounceDamping: i = 10, bounceStiffness: a = 500, modifyTarget: s, min: o, max: l, restDelta: c = 0.5, restSpeed: u }) {
|
|
@@ -1260,7 +1260,7 @@ function jt({ keyframes: n, velocity: e = 0, power: t = 0.8, timeConstant: r = 3
|
|
|
1260
1260
|
const L = (k) => {
|
|
1261
1261
|
p(h.value) && (A = k, I = lt({
|
|
1262
1262
|
keyframes: [h.value, m(h.value)],
|
|
1263
|
-
velocity:
|
|
1263
|
+
velocity: zi(T, k, h.value),
|
|
1264
1264
|
// TODO: This should be passing * 1000
|
|
1265
1265
|
damping: i,
|
|
1266
1266
|
stiffness: a,
|
|
@@ -1276,8 +1276,8 @@ function jt({ keyframes: n, velocity: e = 0, power: t = 0.8, timeConstant: r = 3
|
|
|
1276
1276
|
}
|
|
1277
1277
|
};
|
|
1278
1278
|
}
|
|
1279
|
-
function
|
|
1280
|
-
const r = [], i = t || Ce.mix ||
|
|
1279
|
+
function io(n, e, t) {
|
|
1280
|
+
const r = [], i = t || Ce.mix || Ui, a = n.length - 1;
|
|
1281
1281
|
for (let s = 0; s < a; s++) {
|
|
1282
1282
|
let o = i(n[s], n[s + 1]);
|
|
1283
1283
|
if (e) {
|
|
@@ -1288,7 +1288,7 @@ function ro(n, e, t) {
|
|
|
1288
1288
|
}
|
|
1289
1289
|
return r;
|
|
1290
1290
|
}
|
|
1291
|
-
function
|
|
1291
|
+
function ao(n, e, { clamp: t = !0, ease: r, mixer: i } = {}) {
|
|
1292
1292
|
const a = n.length;
|
|
1293
1293
|
if (_e(a === e.length, "Both input and output ranges must be the same length"), a === 1)
|
|
1294
1294
|
return () => e[0];
|
|
@@ -1296,7 +1296,7 @@ function io(n, e, { clamp: t = !0, ease: r, mixer: i } = {}) {
|
|
|
1296
1296
|
return () => e[1];
|
|
1297
1297
|
const s = n[0] === n[1];
|
|
1298
1298
|
n[0] > n[a - 1] && (n = [...n].reverse(), e = [...e].reverse());
|
|
1299
|
-
const o =
|
|
1299
|
+
const o = io(e, r, i), l = o.length, c = (u) => {
|
|
1300
1300
|
if (s && u < n[0])
|
|
1301
1301
|
return e[0];
|
|
1302
1302
|
let d = 0;
|
|
@@ -1308,78 +1308,78 @@ function io(n, e, { clamp: t = !0, ease: r, mixer: i } = {}) {
|
|
|
1308
1308
|
};
|
|
1309
1309
|
return t ? (u) => c(Le(n[0], n[a - 1], u)) : c;
|
|
1310
1310
|
}
|
|
1311
|
-
function
|
|
1311
|
+
function so(n, e) {
|
|
1312
1312
|
return n.map((t) => t * e);
|
|
1313
1313
|
}
|
|
1314
|
-
const
|
|
1315
|
-
function
|
|
1314
|
+
const ji = (n, e, t) => (((1 - 3 * t + 3 * e) * n + (3 * t - 6 * e)) * n + 3 * e) * n, oo = 1e-7, lo = 12;
|
|
1315
|
+
function co(n, e, t, r, i) {
|
|
1316
1316
|
let a, s, o = 0;
|
|
1317
1317
|
do
|
|
1318
|
-
s = e + (t - e) / 2, a =
|
|
1319
|
-
while (Math.abs(a) >
|
|
1318
|
+
s = e + (t - e) / 2, a = ji(s, r, i) - n, a > 0 ? t = s : e = s;
|
|
1319
|
+
while (Math.abs(a) > oo && ++o < lo);
|
|
1320
1320
|
return s;
|
|
1321
1321
|
}
|
|
1322
1322
|
function pt(n, e, t, r) {
|
|
1323
1323
|
if (n === e && t === r)
|
|
1324
1324
|
return De;
|
|
1325
|
-
const i = (a) =>
|
|
1326
|
-
return (a) => a === 0 || a === 1 ? a :
|
|
1325
|
+
const i = (a) => co(a, 0, 1, n, t);
|
|
1326
|
+
return (a) => a === 0 || a === 1 ? a : ji(i(a), e, r);
|
|
1327
1327
|
}
|
|
1328
|
-
const
|
|
1328
|
+
const uo = /* @__PURE__ */ pt(0.42, 0, 1, 1), po = /* @__PURE__ */ pt(0, 0, 0.58, 1), Ki = /* @__PURE__ */ pt(0.42, 0, 0.58, 1), qi = (n) => (e) => e <= 0.5 ? n(2 * e) / 2 : (2 - n(2 * (1 - e))) / 2, Hi = (n) => (e) => 1 - n(1 - e), Wi = /* @__PURE__ */ pt(0.33, 1.53, 0.69, 0.99), pn = /* @__PURE__ */ Hi(Wi), Gi = /* @__PURE__ */ qi(pn), Yi = (n) => (n *= 2) < 1 ? 0.5 * pn(n) : 0.5 * (2 - Math.pow(2, -10 * (n - 1))), hn = (n) => 1 - Math.sin(Math.acos(n)), ho = Hi(hn), Qi = qi(hn), $i = (n) => Array.isArray(n) && typeof n[0] == "number", jr = {
|
|
1329
1329
|
linear: De,
|
|
1330
|
-
easeIn:
|
|
1331
|
-
easeInOut:
|
|
1332
|
-
easeOut:
|
|
1330
|
+
easeIn: uo,
|
|
1331
|
+
easeInOut: Ki,
|
|
1332
|
+
easeOut: po,
|
|
1333
1333
|
circIn: hn,
|
|
1334
|
-
circInOut:
|
|
1335
|
-
circOut:
|
|
1334
|
+
circInOut: Qi,
|
|
1335
|
+
circOut: ho,
|
|
1336
1336
|
backIn: pn,
|
|
1337
|
-
backInOut:
|
|
1338
|
-
backOut:
|
|
1339
|
-
anticipate:
|
|
1340
|
-
},
|
|
1341
|
-
if (
|
|
1337
|
+
backInOut: Gi,
|
|
1338
|
+
backOut: Wi,
|
|
1339
|
+
anticipate: Yi
|
|
1340
|
+
}, mo = (n) => typeof n == "string", Kr = (n) => {
|
|
1341
|
+
if ($i(n)) {
|
|
1342
1342
|
_e(n.length === 4, "Cubic bezier arrays must contain four numerical values.");
|
|
1343
1343
|
const [e, t, r, i] = n;
|
|
1344
1344
|
return pt(e, t, r, i);
|
|
1345
|
-
} else if (
|
|
1346
|
-
return _e(
|
|
1345
|
+
} else if (mo(n))
|
|
1346
|
+
return _e(jr[n] !== void 0, `Invalid easing type '${n}'`), jr[n];
|
|
1347
1347
|
return n;
|
|
1348
1348
|
};
|
|
1349
|
-
function
|
|
1350
|
-
return n.map(() => e ||
|
|
1349
|
+
function fo(n, e) {
|
|
1350
|
+
return n.map(() => e || Ki).splice(0, n.length - 1);
|
|
1351
1351
|
}
|
|
1352
1352
|
function Se({ duration: n = 300, keyframes: e, times: t, ease: r = "easeInOut" }) {
|
|
1353
|
-
const i =
|
|
1353
|
+
const i = Ei(r) ? r.map(Kr) : Kr(r), a = {
|
|
1354
1354
|
done: !1,
|
|
1355
1355
|
value: e[0]
|
|
1356
|
-
}, s =
|
|
1356
|
+
}, s = so(
|
|
1357
1357
|
// Only use the provided offsets if they're the correct length
|
|
1358
1358
|
// TODO Maybe we should warn here if there's a length mismatch
|
|
1359
|
-
t && t.length === e.length ? t :
|
|
1359
|
+
t && t.length === e.length ? t : wi(e),
|
|
1360
1360
|
n
|
|
1361
|
-
), o =
|
|
1362
|
-
ease: Array.isArray(i) ? i :
|
|
1361
|
+
), o = ao(s, e, {
|
|
1362
|
+
ease: Array.isArray(i) ? i : fo(e, i)
|
|
1363
1363
|
});
|
|
1364
1364
|
return {
|
|
1365
1365
|
calculatedDuration: n,
|
|
1366
1366
|
next: (l) => (a.value = o(l), a.done = l >= n, a)
|
|
1367
1367
|
};
|
|
1368
1368
|
}
|
|
1369
|
-
const
|
|
1369
|
+
const vo = (n) => n !== null;
|
|
1370
1370
|
function mn(n, { repeat: e, repeatType: t = "loop" }, r, i = 1) {
|
|
1371
|
-
const a = n.filter(
|
|
1371
|
+
const a = n.filter(vo), o = i < 0 || e && t !== "loop" && e % 2 === 1 ? 0 : a.length - 1;
|
|
1372
1372
|
return !o || r === void 0 ? a[o] : r;
|
|
1373
1373
|
}
|
|
1374
|
-
const
|
|
1374
|
+
const go = {
|
|
1375
1375
|
decay: jt,
|
|
1376
1376
|
inertia: jt,
|
|
1377
1377
|
tween: Se,
|
|
1378
1378
|
keyframes: Se,
|
|
1379
1379
|
spring: lt
|
|
1380
1380
|
};
|
|
1381
|
-
function
|
|
1382
|
-
typeof n.type == "string" && (n.type =
|
|
1381
|
+
function Zi(n) {
|
|
1382
|
+
typeof n.type == "string" && (n.type = go[n.type]);
|
|
1383
1383
|
}
|
|
1384
1384
|
class fn {
|
|
1385
1385
|
constructor() {
|
|
@@ -1405,7 +1405,7 @@ class fn {
|
|
|
1405
1405
|
return this.finished.then(e, t);
|
|
1406
1406
|
}
|
|
1407
1407
|
}
|
|
1408
|
-
const
|
|
1408
|
+
const yo = (n) => n / 100;
|
|
1409
1409
|
class vn extends fn {
|
|
1410
1410
|
constructor(e) {
|
|
1411
1411
|
super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.stop = () => {
|
|
@@ -1416,13 +1416,13 @@ class vn extends fn {
|
|
|
1416
1416
|
}
|
|
1417
1417
|
initAnimation() {
|
|
1418
1418
|
const { options: e } = this;
|
|
1419
|
-
|
|
1419
|
+
Zi(e);
|
|
1420
1420
|
const { type: t = Se, repeat: r = 0, repeatDelay: i = 0, repeatType: a, velocity: s = 0 } = e;
|
|
1421
1421
|
let { keyframes: o } = e;
|
|
1422
1422
|
const l = t || Se;
|
|
1423
|
-
process.env.NODE_ENV !== "production" && l !== Se && _e(o.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`), l !== Se && typeof o[0] != "number" && (this.mixKeyframes = un(
|
|
1424
|
-
const c = l(te(
|
|
1425
|
-
a === "mirror" && (this.mirroredGenerator = l(te(
|
|
1423
|
+
process.env.NODE_ENV !== "production" && l !== Se && _e(o.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`), l !== Se && typeof o[0] != "number" && (this.mixKeyframes = un(yo, Ui(o[0], o[1])), o = [0, 100]);
|
|
1424
|
+
const c = l(te(Q({}, e), { keyframes: o }));
|
|
1425
|
+
a === "mirror" && (this.mirroredGenerator = l(te(Q({}, e), {
|
|
1426
1426
|
keyframes: [...o].reverse(),
|
|
1427
1427
|
velocity: -s
|
|
1428
1428
|
}))), c.calculatedDuration === null && (c.calculatedDuration = an(c));
|
|
@@ -1484,7 +1484,7 @@ class vn extends fn {
|
|
|
1484
1484
|
var i, a;
|
|
1485
1485
|
if (this.isStopped)
|
|
1486
1486
|
return;
|
|
1487
|
-
const { driver: e =
|
|
1487
|
+
const { driver: e = $s, startTime: t } = this.options;
|
|
1488
1488
|
this.driver || (this.driver = e((s) => this.tick(s))), (a = (i = this.options).onPlay) == null || a.call(i);
|
|
1489
1489
|
const r = this.driver.now();
|
|
1490
1490
|
this.state === "finished" ? (this.updateFinished(), this.startTime = r) : this.holdTime !== null ? this.startTime = r - this.holdTime : this.startTime || (this.startTime = t != null ? t : r), this.state === "finished" && this.speed < 0 && (this.startTime += this.calculatedDuration), this.holdTime = null, this.state = "running", this.driver.start();
|
|
@@ -1517,7 +1517,7 @@ class vn extends fn {
|
|
|
1517
1517
|
return this.options.allowFlatten && (this.options.type = "keyframes", this.options.ease = "linear", this.initAnimation()), (t = this.driver) == null || t.stop(), e.observe(this);
|
|
1518
1518
|
}
|
|
1519
1519
|
}
|
|
1520
|
-
function
|
|
1520
|
+
function bo(n) {
|
|
1521
1521
|
var e;
|
|
1522
1522
|
for (let t = 1; t < n.length; t++)
|
|
1523
1523
|
(e = n[t]) != null || (n[t] = n[t - 1]);
|
|
@@ -1525,7 +1525,7 @@ function yo(n) {
|
|
|
1525
1525
|
const Oe = (n) => n * 180 / Math.PI, Kt = (n) => {
|
|
1526
1526
|
const e = Oe(Math.atan2(n[1], n[0]));
|
|
1527
1527
|
return qt(e);
|
|
1528
|
-
},
|
|
1528
|
+
}, Eo = {
|
|
1529
1529
|
x: 4,
|
|
1530
1530
|
y: 5,
|
|
1531
1531
|
translateX: 4,
|
|
@@ -1538,20 +1538,20 @@ const Oe = (n) => n * 180 / Math.PI, Kt = (n) => {
|
|
|
1538
1538
|
skewX: (n) => Oe(Math.atan(n[1])),
|
|
1539
1539
|
skewY: (n) => Oe(Math.atan(n[2])),
|
|
1540
1540
|
skew: (n) => (Math.abs(n[1]) + Math.abs(n[2])) / 2
|
|
1541
|
-
}, qt = (n) => (n = n % 360, n < 0 && (n += 360), n),
|
|
1541
|
+
}, qt = (n) => (n = n % 360, n < 0 && (n += 360), n), qr = Kt, Hr = (n) => Math.sqrt(n[0] * n[0] + n[1] * n[1]), Wr = (n) => Math.sqrt(n[4] * n[4] + n[5] * n[5]), _o = {
|
|
1542
1542
|
x: 12,
|
|
1543
1543
|
y: 13,
|
|
1544
1544
|
z: 14,
|
|
1545
1545
|
translateX: 12,
|
|
1546
1546
|
translateY: 13,
|
|
1547
1547
|
translateZ: 14,
|
|
1548
|
-
scaleX:
|
|
1549
|
-
scaleY:
|
|
1550
|
-
scale: (n) => (
|
|
1548
|
+
scaleX: Hr,
|
|
1549
|
+
scaleY: Wr,
|
|
1550
|
+
scale: (n) => (Hr(n) + Wr(n)) / 2,
|
|
1551
1551
|
rotateX: (n) => qt(Oe(Math.atan2(n[6], n[5]))),
|
|
1552
1552
|
rotateY: (n) => qt(Oe(Math.atan2(-n[2], n[0]))),
|
|
1553
|
-
rotateZ:
|
|
1554
|
-
rotate:
|
|
1553
|
+
rotateZ: qr,
|
|
1554
|
+
rotate: qr,
|
|
1555
1555
|
skewX: (n) => Oe(Math.atan(n[4])),
|
|
1556
1556
|
skewY: (n) => Oe(Math.atan(n[1])),
|
|
1557
1557
|
skew: (n) => (Math.abs(n[1]) + Math.abs(n[4])) / 2
|
|
@@ -1565,27 +1565,27 @@ function Wt(n, e) {
|
|
|
1565
1565
|
const t = n.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
|
|
1566
1566
|
let r, i;
|
|
1567
1567
|
if (t)
|
|
1568
|
-
r =
|
|
1568
|
+
r = _o, i = t;
|
|
1569
1569
|
else {
|
|
1570
1570
|
const o = n.match(/^matrix\(([-\d.e\s,]+)\)$/u);
|
|
1571
|
-
r =
|
|
1571
|
+
r = Eo, i = o;
|
|
1572
1572
|
}
|
|
1573
1573
|
if (!i)
|
|
1574
1574
|
return Ht(e);
|
|
1575
|
-
const a = r[e], s = i[1].split(",").map(
|
|
1575
|
+
const a = r[e], s = i[1].split(",").map(Ao);
|
|
1576
1576
|
return typeof a == "function" ? a(s) : s[a];
|
|
1577
1577
|
}
|
|
1578
|
-
const
|
|
1578
|
+
const Co = (n, e) => {
|
|
1579
1579
|
const { transform: t = "none" } = getComputedStyle(n);
|
|
1580
1580
|
return Wt(t, e);
|
|
1581
1581
|
};
|
|
1582
|
-
function
|
|
1582
|
+
function Ao(n) {
|
|
1583
1583
|
return parseFloat(n.trim());
|
|
1584
1584
|
}
|
|
1585
|
-
const
|
|
1586
|
-
function
|
|
1585
|
+
const Gr = (n) => n === Ue || n === $, wo = /* @__PURE__ */ new Set(["x", "y", "z"]), To = Ve.filter((n) => !wo.has(n));
|
|
1586
|
+
function Io(n) {
|
|
1587
1587
|
const e = [];
|
|
1588
|
-
return
|
|
1588
|
+
return To.forEach((t) => {
|
|
1589
1589
|
const r = n.getValue(t);
|
|
1590
1590
|
r !== void 0 && (e.push([t, r.get()]), r.set(t.startsWith("scale") ? 1 : 0));
|
|
1591
1591
|
}), e;
|
|
@@ -1606,11 +1606,11 @@ Ne.translateX = Ne.x;
|
|
|
1606
1606
|
Ne.translateY = Ne.y;
|
|
1607
1607
|
const xe = /* @__PURE__ */ new Set();
|
|
1608
1608
|
let Gt = !1, Yt = !1, Qt = !1;
|
|
1609
|
-
function
|
|
1609
|
+
function Xi() {
|
|
1610
1610
|
if (Yt) {
|
|
1611
1611
|
const n = Array.from(xe).filter((r) => r.needsMeasurement), e = new Set(n.map((r) => r.element)), t = /* @__PURE__ */ new Map();
|
|
1612
1612
|
e.forEach((r) => {
|
|
1613
|
-
const i =
|
|
1613
|
+
const i = Io(r);
|
|
1614
1614
|
i.length && (t.set(r, i), r.render());
|
|
1615
1615
|
}), n.forEach((r) => r.measureInitialState()), e.forEach((r) => {
|
|
1616
1616
|
r.render();
|
|
@@ -1625,20 +1625,20 @@ function Zi() {
|
|
|
1625
1625
|
}
|
|
1626
1626
|
Yt = !1, Gt = !1, xe.forEach((n) => n.complete(Qt)), xe.clear();
|
|
1627
1627
|
}
|
|
1628
|
-
function
|
|
1628
|
+
function Ji() {
|
|
1629
1629
|
xe.forEach((n) => {
|
|
1630
1630
|
n.readKeyframes(), n.needsMeasurement && (Yt = !0);
|
|
1631
1631
|
});
|
|
1632
1632
|
}
|
|
1633
|
-
function
|
|
1634
|
-
Qt = !0,
|
|
1633
|
+
function Oo() {
|
|
1634
|
+
Qt = !0, Ji(), Xi(), Qt = !1;
|
|
1635
1635
|
}
|
|
1636
1636
|
class gn {
|
|
1637
1637
|
constructor(e, t, r, i, a, s = !1) {
|
|
1638
1638
|
this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...e], this.onComplete = t, this.name = r, this.motionValue = i, this.element = a, this.isAsync = s;
|
|
1639
1639
|
}
|
|
1640
1640
|
scheduleResolve() {
|
|
1641
|
-
this.state = "scheduled", this.isAsync ? (xe.add(this), Gt || (Gt = !0, Ae.read(
|
|
1641
|
+
this.state = "scheduled", this.isAsync ? (xe.add(this), Gt || (Gt = !0, Ae.read(Ji), Ae.resolveKeyframes(Xi))) : (this.readKeyframes(), this.complete());
|
|
1642
1642
|
}
|
|
1643
1643
|
readKeyframes() {
|
|
1644
1644
|
const { unresolvedKeyframes: e, name: t, element: r, motionValue: i } = this;
|
|
@@ -1652,7 +1652,7 @@ class gn {
|
|
|
1652
1652
|
}
|
|
1653
1653
|
e[0] === void 0 && (e[0] = s), i && a === void 0 && i.set(e[0]);
|
|
1654
1654
|
}
|
|
1655
|
-
|
|
1655
|
+
bo(e);
|
|
1656
1656
|
}
|
|
1657
1657
|
setFinalKeyframe() {
|
|
1658
1658
|
}
|
|
@@ -1672,31 +1672,31 @@ class gn {
|
|
|
1672
1672
|
this.state === "pending" && this.scheduleResolve();
|
|
1673
1673
|
}
|
|
1674
1674
|
}
|
|
1675
|
-
const
|
|
1676
|
-
function
|
|
1677
|
-
|
|
1675
|
+
const No = (n) => n.startsWith("--");
|
|
1676
|
+
function xo(n, e, t) {
|
|
1677
|
+
No(e) ? n.style.setProperty(e, t) : n.style[e] = t;
|
|
1678
1678
|
}
|
|
1679
1679
|
// @__NO_SIDE_EFFECTS__
|
|
1680
1680
|
function yn(n) {
|
|
1681
1681
|
let e;
|
|
1682
1682
|
return () => (e === void 0 && (e = n()), e);
|
|
1683
1683
|
}
|
|
1684
|
-
const
|
|
1685
|
-
function
|
|
1684
|
+
const Lo = /* @__PURE__ */ yn(() => window.ScrollTimeline !== void 0), Po = {};
|
|
1685
|
+
function Ro(n, e) {
|
|
1686
1686
|
const t = /* @__PURE__ */ yn(n);
|
|
1687
1687
|
return () => {
|
|
1688
1688
|
var r;
|
|
1689
|
-
return (r =
|
|
1689
|
+
return (r = Po[e]) != null ? r : t();
|
|
1690
1690
|
};
|
|
1691
1691
|
}
|
|
1692
|
-
const
|
|
1692
|
+
const ea = /* @__PURE__ */ Ro(() => {
|
|
1693
1693
|
try {
|
|
1694
1694
|
document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
|
|
1695
1695
|
} catch (n) {
|
|
1696
1696
|
return !1;
|
|
1697
1697
|
}
|
|
1698
1698
|
return !0;
|
|
1699
|
-
}, "linearEasing"), nt = ([n, e, t, r]) => `cubic-bezier(${n}, ${e}, ${t}, ${r})`,
|
|
1699
|
+
}, "linearEasing"), nt = ([n, e, t, r]) => `cubic-bezier(${n}, ${e}, ${t}, ${r})`, Yr = {
|
|
1700
1700
|
linear: "linear",
|
|
1701
1701
|
ease: "ease",
|
|
1702
1702
|
easeIn: "ease-in",
|
|
@@ -1707,16 +1707,16 @@ const Ji = /* @__PURE__ */ Po(() => {
|
|
|
1707
1707
|
backIn: /* @__PURE__ */ nt([0.31, 0.01, 0.66, -0.59]),
|
|
1708
1708
|
backOut: /* @__PURE__ */ nt([0.33, 1.53, 0.69, 0.99])
|
|
1709
1709
|
};
|
|
1710
|
-
function
|
|
1710
|
+
function ta(n, e) {
|
|
1711
1711
|
if (n)
|
|
1712
|
-
return typeof n == "function" ?
|
|
1712
|
+
return typeof n == "function" ? ea() ? Bi(n, e) : "ease-out" : $i(n) ? nt(n) : Array.isArray(n) ? n.map((t) => ta(t, e) || Yr.easeOut) : Yr[n];
|
|
1713
1713
|
}
|
|
1714
|
-
function
|
|
1714
|
+
function So(n, e, t, { delay: r = 0, duration: i = 300, repeat: a = 0, repeatType: s = "loop", ease: o = "easeOut", times: l } = {}, c = void 0) {
|
|
1715
1715
|
const u = {
|
|
1716
1716
|
[e]: t
|
|
1717
1717
|
};
|
|
1718
1718
|
l && (u.offset = l);
|
|
1719
|
-
const d =
|
|
1719
|
+
const d = ta(o, i);
|
|
1720
1720
|
Array.isArray(d) && (u.easing = d);
|
|
1721
1721
|
const h = {
|
|
1722
1722
|
delay: r,
|
|
@@ -1728,22 +1728,22 @@ function Ro(n, e, t, { delay: r = 0, duration: i = 300, repeat: a = 0, repeatTyp
|
|
|
1728
1728
|
};
|
|
1729
1729
|
return c && (h.pseudoElement = c), n.animate(u, h);
|
|
1730
1730
|
}
|
|
1731
|
-
function
|
|
1731
|
+
function ko(t) {
|
|
1732
1732
|
var r = t, { type: n } = r, e = ge(r, ["type"]);
|
|
1733
1733
|
var i, a;
|
|
1734
|
-
return rn(n) &&
|
|
1734
|
+
return rn(n) && ea() ? n.applyToOptions(e) : ((i = e.duration) != null || (e.duration = 300), (a = e.ease) != null || (e.ease = "easeOut"), e);
|
|
1735
1735
|
}
|
|
1736
|
-
class
|
|
1736
|
+
class Mo extends fn {
|
|
1737
1737
|
constructor(e) {
|
|
1738
1738
|
if (super(), this.finishedTime = null, this.isStopped = !1, !e)
|
|
1739
1739
|
return;
|
|
1740
1740
|
const { element: t, name: r, keyframes: i, pseudoElement: a, allowFlatten: s = !1, finalKeyframe: o, onComplete: l } = e;
|
|
1741
1741
|
this.isPseudoElement = !!a, this.allowFlatten = s, this.options = e, _e(typeof e.type != "string", `animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);
|
|
1742
|
-
const c =
|
|
1743
|
-
this.animation =
|
|
1742
|
+
const c = ko(e);
|
|
1743
|
+
this.animation = So(t, r, i, c, a), c.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
|
|
1744
1744
|
if (this.finishedTime = this.time, !a) {
|
|
1745
1745
|
const u = mn(i, this.options, o, this.speed);
|
|
1746
|
-
this.updateMotionValue ? this.updateMotionValue(u) :
|
|
1746
|
+
this.updateMotionValue ? this.updateMotionValue(u) : xo(t, r, u), this.animation.cancel();
|
|
1747
1747
|
}
|
|
1748
1748
|
l == null || l(), this.notifyFinished();
|
|
1749
1749
|
};
|
|
@@ -1822,24 +1822,24 @@ class ko extends fn {
|
|
|
1822
1822
|
*/
|
|
1823
1823
|
attachTimeline({ timeline: e, observe: t }) {
|
|
1824
1824
|
var r;
|
|
1825
|
-
return this.allowFlatten && ((r = this.animation.effect) == null || r.updateTiming({ easing: "linear" })), this.animation.onfinish = null, e &&
|
|
1825
|
+
return this.allowFlatten && ((r = this.animation.effect) == null || r.updateTiming({ easing: "linear" })), this.animation.onfinish = null, e && Lo() ? (this.animation.timeline = e, De) : t(this);
|
|
1826
1826
|
}
|
|
1827
1827
|
}
|
|
1828
|
-
const
|
|
1829
|
-
anticipate:
|
|
1830
|
-
backInOut:
|
|
1831
|
-
circInOut:
|
|
1828
|
+
const na = {
|
|
1829
|
+
anticipate: Yi,
|
|
1830
|
+
backInOut: Gi,
|
|
1831
|
+
circInOut: Qi
|
|
1832
1832
|
};
|
|
1833
|
-
function Mo(n) {
|
|
1834
|
-
return n in ta;
|
|
1835
|
-
}
|
|
1836
1833
|
function Do(n) {
|
|
1837
|
-
|
|
1834
|
+
return n in na;
|
|
1835
|
+
}
|
|
1836
|
+
function Vo(n) {
|
|
1837
|
+
typeof n.ease == "string" && Do(n.ease) && (n.ease = na[n.ease]);
|
|
1838
1838
|
}
|
|
1839
|
-
const
|
|
1840
|
-
class
|
|
1839
|
+
const Qr = 10;
|
|
1840
|
+
class Fo extends Mo {
|
|
1841
1841
|
constructor(e) {
|
|
1842
|
-
|
|
1842
|
+
Vo(e), Zi(e), super(e), e.startTime && (this.startTime = e.startTime), this.options = e;
|
|
1843
1843
|
}
|
|
1844
1844
|
/**
|
|
1845
1845
|
* WAAPI doesn't natively have any interruption capabilities.
|
|
@@ -1858,16 +1858,16 @@ class Vo extends ko {
|
|
|
1858
1858
|
t.set(e);
|
|
1859
1859
|
return;
|
|
1860
1860
|
}
|
|
1861
|
-
const o = new vn(te(
|
|
1861
|
+
const o = new vn(te(Q({}, s), {
|
|
1862
1862
|
autoplay: !1
|
|
1863
1863
|
})), l = /* @__PURE__ */ ye((u = this.finishedTime) != null ? u : this.time);
|
|
1864
|
-
t.setWithVelocity(o.sample(l -
|
|
1864
|
+
t.setWithVelocity(o.sample(l - Qr).value, o.sample(l).value, Qr), o.stop();
|
|
1865
1865
|
}
|
|
1866
1866
|
}
|
|
1867
|
-
const
|
|
1867
|
+
const $r = (n, e) => e === "zIndex" ? !1 : !!(typeof n == "number" || Array.isArray(n) || typeof n == "string" && // It's animatable if we have a string
|
|
1868
1868
|
(Be.test(n) || n === "0") && // And it contains numbers and/or colors
|
|
1869
1869
|
!n.startsWith("url("));
|
|
1870
|
-
function
|
|
1870
|
+
function Uo(n) {
|
|
1871
1871
|
const e = n[0];
|
|
1872
1872
|
if (n.length === 1)
|
|
1873
1873
|
return !0;
|
|
@@ -1875,43 +1875,43 @@ function Fo(n) {
|
|
|
1875
1875
|
if (n[t] !== e)
|
|
1876
1876
|
return !0;
|
|
1877
1877
|
}
|
|
1878
|
-
function
|
|
1878
|
+
function Bo(n, e, t, r) {
|
|
1879
1879
|
const i = n[0];
|
|
1880
1880
|
if (i === null)
|
|
1881
1881
|
return !1;
|
|
1882
1882
|
if (e === "display" || e === "visibility")
|
|
1883
1883
|
return !0;
|
|
1884
|
-
const a = n[n.length - 1], s =
|
|
1885
|
-
return ut(s === o, `You are trying to animate ${e} from "${i}" to "${a}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${a} via the \`style\` property.`), !s || !o ? !1 :
|
|
1884
|
+
const a = n[n.length - 1], s = $r(i, e), o = $r(a, e);
|
|
1885
|
+
return ut(s === o, `You are trying to animate ${e} from "${i}" to "${a}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${a} via the \`style\` property.`), !s || !o ? !1 : Uo(n) || (t === "spring" || rn(t)) && r;
|
|
1886
1886
|
}
|
|
1887
|
-
function
|
|
1887
|
+
function ra(n) {
|
|
1888
1888
|
return typeof n == "object" && n !== null;
|
|
1889
1889
|
}
|
|
1890
|
-
function
|
|
1891
|
-
return
|
|
1890
|
+
function zo(n) {
|
|
1891
|
+
return ra(n) && "offsetHeight" in n;
|
|
1892
1892
|
}
|
|
1893
|
-
const
|
|
1893
|
+
const jo = /* @__PURE__ */ new Set([
|
|
1894
1894
|
"opacity",
|
|
1895
1895
|
"clipPath",
|
|
1896
1896
|
"filter",
|
|
1897
1897
|
"transform"
|
|
1898
1898
|
// TODO: Could be re-enabled now we have support for linear() easing
|
|
1899
1899
|
// "background-color"
|
|
1900
|
-
]),
|
|
1901
|
-
function
|
|
1900
|
+
]), Ko = /* @__PURE__ */ yn(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
|
|
1901
|
+
function qo(n) {
|
|
1902
1902
|
var c;
|
|
1903
1903
|
const { motionValue: e, name: t, repeatDelay: r, repeatType: i, damping: a, type: s } = n;
|
|
1904
|
-
if (!
|
|
1904
|
+
if (!zo((c = e == null ? void 0 : e.owner) == null ? void 0 : c.current))
|
|
1905
1905
|
return !1;
|
|
1906
1906
|
const { onUpdate: o, transformTemplate: l } = e.owner.getProps();
|
|
1907
|
-
return
|
|
1907
|
+
return Ko() && t && jo.has(t) && (t !== "transform" || !l) && /**
|
|
1908
1908
|
* If we're outputting values to onUpdate then we can't use WAAPI as there's
|
|
1909
1909
|
* no way to read the value from WAAPI every frame.
|
|
1910
1910
|
*/
|
|
1911
1911
|
!o && !r && i !== "mirror" && a !== 0 && s !== "inertia";
|
|
1912
1912
|
}
|
|
1913
|
-
const
|
|
1914
|
-
class
|
|
1913
|
+
const Ho = 40;
|
|
1914
|
+
class Wo extends fn {
|
|
1915
1915
|
constructor(h) {
|
|
1916
1916
|
var p = h, { autoplay: e = !0, delay: t = 0, type: r = "keyframes", repeat: i = 0, repeatDelay: a = 0, repeatType: s = "loop", keyframes: o, name: l, motionValue: c, element: u } = p, d = ge(p, ["autoplay", "delay", "type", "repeat", "repeatDelay", "repeatType", "keyframes", "name", "motionValue", "element"]);
|
|
1917
1917
|
var v;
|
|
@@ -1919,7 +1919,7 @@ class Ho extends fn {
|
|
|
1919
1919
|
var y, w;
|
|
1920
1920
|
this._animation && (this._animation.stop(), (y = this.stopTimeline) == null || y.call(this)), (w = this.keyframeResolver) == null || w.cancel();
|
|
1921
1921
|
}, this.createdAt = ve.now();
|
|
1922
|
-
const m =
|
|
1922
|
+
const m = Q({
|
|
1923
1923
|
autoplay: e,
|
|
1924
1924
|
delay: t,
|
|
1925
1925
|
type: r,
|
|
@@ -1935,13 +1935,13 @@ class Ho extends fn {
|
|
|
1935
1935
|
onKeyframesResolved(e, t, r, i) {
|
|
1936
1936
|
this.keyframeResolver = void 0;
|
|
1937
1937
|
const { name: a, type: s, velocity: o, delay: l, isHandoff: c, onUpdate: u } = r;
|
|
1938
|
-
this.resolvedAt = ve.now(),
|
|
1939
|
-
const d = i ? this.resolvedAt ? this.resolvedAt - this.createdAt >
|
|
1938
|
+
this.resolvedAt = ve.now(), Bo(e, a, s, o) || ((Ce.instantAnimations || !l) && (u == null || u(mn(e, r, t))), e[0] = e[e.length - 1], r.duration = 0, r.repeat = 0);
|
|
1939
|
+
const d = i ? this.resolvedAt ? this.resolvedAt - this.createdAt > Ho ? this.resolvedAt : this.createdAt : this.createdAt : void 0, h = te(Q({
|
|
1940
1940
|
startTime: d,
|
|
1941
1941
|
finalKeyframe: t
|
|
1942
1942
|
}, r), {
|
|
1943
1943
|
keyframes: e
|
|
1944
|
-
}), p = !c &&
|
|
1944
|
+
}), p = !c && qo(h) ? new Fo(te(Q({}, h), {
|
|
1945
1945
|
element: h.motionValue.owner.current
|
|
1946
1946
|
})) : new vn(h);
|
|
1947
1947
|
p.finished.then(() => this.notifyFinished()).catch(De), this.pendingTimeline && (this.stopTimeline = p.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = p;
|
|
@@ -1955,7 +1955,7 @@ class Ho extends fn {
|
|
|
1955
1955
|
}
|
|
1956
1956
|
get animation() {
|
|
1957
1957
|
var e;
|
|
1958
|
-
return this._animation || ((e = this.keyframeResolver) == null || e.resume(),
|
|
1958
|
+
return this._animation || ((e = this.keyframeResolver) == null || e.resume(), Oo()), this._animation;
|
|
1959
1959
|
}
|
|
1960
1960
|
get duration() {
|
|
1961
1961
|
return this.animation.duration;
|
|
@@ -1995,11 +1995,11 @@ class Ho extends fn {
|
|
|
1995
1995
|
this._animation && this.animation.cancel(), (e = this.keyframeResolver) == null || e.cancel();
|
|
1996
1996
|
}
|
|
1997
1997
|
}
|
|
1998
|
-
const
|
|
1999
|
-
const o =
|
|
1998
|
+
const ia = (n, e, t, r = {}, i, a) => (s) => {
|
|
1999
|
+
const o = Li(r, n) || {}, l = o.delay || r.delay || 0;
|
|
2000
2000
|
let { elapsed: c = 0 } = r;
|
|
2001
2001
|
c = c - /* @__PURE__ */ ye(l);
|
|
2002
|
-
const u = te(
|
|
2002
|
+
const u = te(Q({
|
|
2003
2003
|
keyframes: Array.isArray(t) ? t : [null, t],
|
|
2004
2004
|
ease: "easeOut",
|
|
2005
2005
|
velocity: e.getVelocity()
|
|
@@ -2015,10 +2015,10 @@ const ra = (n, e, t, r = {}, i, a) => (s) => {
|
|
|
2015
2015
|
motionValue: e,
|
|
2016
2016
|
element: a ? void 0 : i
|
|
2017
2017
|
});
|
|
2018
|
-
|
|
2018
|
+
Ts(o) || Object.assign(u, ws(n, u)), u.duration && (u.duration = /* @__PURE__ */ ye(u.duration)), u.repeatDelay && (u.repeatDelay = /* @__PURE__ */ ye(u.repeatDelay)), u.from !== void 0 && (u.keyframes[0] = u.from);
|
|
2019
2019
|
let d = !1;
|
|
2020
2020
|
if ((u.type === !1 || u.duration === 0 && !u.repeatDelay) && (u.duration = 0, u.delay === 0 && (d = !0)), (Ce.instantAnimations || Ce.skipAnimations) && (d = !0, u.duration = 0, u.delay = 0), u.allowFlatten = !o.type && !o.ease, d && !a && e.get() !== void 0) {
|
|
2021
|
-
const h =
|
|
2021
|
+
const h = bs(u.keyframes, o);
|
|
2022
2022
|
if (h !== void 0) {
|
|
2023
2023
|
Ae.update(() => {
|
|
2024
2024
|
u.onUpdate(h), u.onComplete();
|
|
@@ -2026,8 +2026,8 @@ const ra = (n, e, t, r = {}, i, a) => (s) => {
|
|
|
2026
2026
|
return;
|
|
2027
2027
|
}
|
|
2028
2028
|
}
|
|
2029
|
-
return o.isSync ? new vn(u) : new
|
|
2030
|
-
},
|
|
2029
|
+
return o.isSync ? new vn(u) : new Wo(u);
|
|
2030
|
+
}, aa = /* @__PURE__ */ new Set([
|
|
2031
2031
|
"width",
|
|
2032
2032
|
"height",
|
|
2033
2033
|
"top",
|
|
@@ -2036,49 +2036,49 @@ const ra = (n, e, t, r = {}, i, a) => (s) => {
|
|
|
2036
2036
|
"bottom",
|
|
2037
2037
|
...Ve
|
|
2038
2038
|
]);
|
|
2039
|
-
function
|
|
2039
|
+
function Go({ protectedKeys: n, needsAnimating: e }, t) {
|
|
2040
2040
|
const r = n.hasOwnProperty(t) && e[t] !== !0;
|
|
2041
2041
|
return e[t] = !1, r;
|
|
2042
2042
|
}
|
|
2043
|
-
function
|
|
2043
|
+
function Yo(n, e, { delay: t = 0, transitionOverride: r, type: i } = {}) {
|
|
2044
2044
|
var d;
|
|
2045
2045
|
let u = e, { transition: a = n.getDefaultTransition(), transitionEnd: s } = u, o = ge(u, ["transition", "transitionEnd"]);
|
|
2046
2046
|
r && (a = r);
|
|
2047
2047
|
const l = [], c = i && n.animationState && n.animationState.getState()[i];
|
|
2048
2048
|
for (const h in o) {
|
|
2049
2049
|
const p = n.getValue(h, (d = n.latestValues[h]) != null ? d : null), m = o[h];
|
|
2050
|
-
if (m === void 0 || c &&
|
|
2050
|
+
if (m === void 0 || c && Go(c, h))
|
|
2051
2051
|
continue;
|
|
2052
|
-
const f =
|
|
2052
|
+
const f = Q({
|
|
2053
2053
|
delay: t
|
|
2054
|
-
},
|
|
2054
|
+
}, Li(a || {}, h)), v = p.get();
|
|
2055
2055
|
if (v !== void 0 && !p.isAnimating && !Array.isArray(m) && m === v && !f.velocity)
|
|
2056
2056
|
continue;
|
|
2057
2057
|
let y = !1;
|
|
2058
2058
|
if (window.MotionHandoffAnimation) {
|
|
2059
|
-
const T =
|
|
2059
|
+
const T = gs(n);
|
|
2060
2060
|
if (T) {
|
|
2061
2061
|
const x = window.MotionHandoffAnimation(T, h, Ae);
|
|
2062
2062
|
x !== null && (f.startTime = x, y = !0);
|
|
2063
2063
|
}
|
|
2064
2064
|
}
|
|
2065
|
-
|
|
2065
|
+
ms(n, h), p.start(ia(h, p, m, n.shouldReduceMotion && aa.has(h) ? { type: !1 } : f, n, y));
|
|
2066
2066
|
const w = p.animation;
|
|
2067
2067
|
w && l.push(w);
|
|
2068
2068
|
}
|
|
2069
2069
|
return s && Promise.all(l).then(() => {
|
|
2070
2070
|
Ae.update(() => {
|
|
2071
|
-
s &&
|
|
2071
|
+
s && ps(n, s);
|
|
2072
2072
|
});
|
|
2073
2073
|
}), l;
|
|
2074
2074
|
}
|
|
2075
|
-
function
|
|
2075
|
+
function Qo({ top: n, left: e, right: t, bottom: r }) {
|
|
2076
2076
|
return {
|
|
2077
2077
|
x: { min: e, max: t },
|
|
2078
2078
|
y: { min: n, max: r }
|
|
2079
2079
|
};
|
|
2080
2080
|
}
|
|
2081
|
-
function
|
|
2081
|
+
function $o(n, e) {
|
|
2082
2082
|
if (!e)
|
|
2083
2083
|
return n;
|
|
2084
2084
|
const t = e({ x: n.left, y: n.top }), r = e({ x: n.right, y: n.bottom });
|
|
@@ -2089,10 +2089,10 @@ function Qo(n, e) {
|
|
|
2089
2089
|
right: r.x
|
|
2090
2090
|
};
|
|
2091
2091
|
}
|
|
2092
|
-
function
|
|
2093
|
-
return
|
|
2092
|
+
function Zo(n, e) {
|
|
2093
|
+
return Qo($o(n.getBoundingClientRect(), e));
|
|
2094
2094
|
}
|
|
2095
|
-
const
|
|
2095
|
+
const Zr = {
|
|
2096
2096
|
animation: [
|
|
2097
2097
|
"animate",
|
|
2098
2098
|
"variants",
|
|
@@ -2112,29 +2112,29 @@ const $r = {
|
|
|
2112
2112
|
inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
|
|
2113
2113
|
layout: ["layout", "layoutId"]
|
|
2114
2114
|
}, $t = {};
|
|
2115
|
-
for (const n in
|
|
2115
|
+
for (const n in Zr)
|
|
2116
2116
|
$t[n] = {
|
|
2117
|
-
isEnabled: (e) =>
|
|
2117
|
+
isEnabled: (e) => Zr[n].some((t) => !!e[t])
|
|
2118
2118
|
};
|
|
2119
|
-
const
|
|
2120
|
-
x:
|
|
2121
|
-
y:
|
|
2122
|
-
}),
|
|
2123
|
-
function
|
|
2124
|
-
if (
|
|
2119
|
+
const Xr = () => ({ min: 0, max: 0 }), bn = () => ({
|
|
2120
|
+
x: Xr(),
|
|
2121
|
+
y: Xr()
|
|
2122
|
+
}), Xo = typeof window != "undefined", Zt = { current: null }, sa = { current: !1 };
|
|
2123
|
+
function Jo() {
|
|
2124
|
+
if (sa.current = !0, !!Xo)
|
|
2125
2125
|
if (window.matchMedia) {
|
|
2126
2126
|
const n = window.matchMedia("(prefers-reduced-motion)"), e = () => Zt.current = n.matches;
|
|
2127
2127
|
n.addListener(e), e();
|
|
2128
2128
|
} else
|
|
2129
2129
|
Zt.current = !1;
|
|
2130
2130
|
}
|
|
2131
|
-
function
|
|
2131
|
+
function el(n) {
|
|
2132
2132
|
return n !== null && typeof n == "object" && typeof n.start == "function";
|
|
2133
2133
|
}
|
|
2134
|
-
function
|
|
2134
|
+
function tl(n) {
|
|
2135
2135
|
return typeof n == "string" || Array.isArray(n);
|
|
2136
2136
|
}
|
|
2137
|
-
const
|
|
2137
|
+
const nl = [
|
|
2138
2138
|
"animate",
|
|
2139
2139
|
"whileInView",
|
|
2140
2140
|
"whileFocus",
|
|
@@ -2142,14 +2142,14 @@ const tl = [
|
|
|
2142
2142
|
"whileTap",
|
|
2143
2143
|
"whileDrag",
|
|
2144
2144
|
"exit"
|
|
2145
|
-
],
|
|
2146
|
-
function
|
|
2147
|
-
return
|
|
2145
|
+
], rl = ["initial", ...nl];
|
|
2146
|
+
function oa(n) {
|
|
2147
|
+
return el(n.animate) || rl.some((e) => tl(n[e]));
|
|
2148
2148
|
}
|
|
2149
|
-
function
|
|
2150
|
-
return !!(
|
|
2149
|
+
function il(n) {
|
|
2150
|
+
return !!(oa(n) || n.variants);
|
|
2151
2151
|
}
|
|
2152
|
-
function
|
|
2152
|
+
function al(n, e, t) {
|
|
2153
2153
|
for (const r in e) {
|
|
2154
2154
|
const i = e[r], a = t[r];
|
|
2155
2155
|
if (he(i))
|
|
@@ -2169,11 +2169,11 @@ function il(n, e, t) {
|
|
|
2169
2169
|
e[r] === void 0 && n.removeValue(r);
|
|
2170
2170
|
return e;
|
|
2171
2171
|
}
|
|
2172
|
-
const
|
|
2172
|
+
const la = (n) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n), ca = (n) => /^0[^.\s]+$/u.test(n), sl = {
|
|
2173
2173
|
test: (n) => n === "auto",
|
|
2174
2174
|
parse: (n) => n
|
|
2175
|
-
},
|
|
2176
|
-
function
|
|
2175
|
+
}, ua = (n) => (e) => e.test(n), da = [Ue, $, ke, we, Ss, Rs, sl], Jr = (n) => da.find(ua(n)), ol = [...da, ue, Be], ll = (n) => ol.find(ua(n)), cl = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
|
|
2176
|
+
function ul(n) {
|
|
2177
2177
|
const [e, t] = n.slice(0, -1).split("(");
|
|
2178
2178
|
if (e === "drop-shadow")
|
|
2179
2179
|
return n;
|
|
@@ -2181,17 +2181,17 @@ function cl(n) {
|
|
|
2181
2181
|
if (!r)
|
|
2182
2182
|
return n;
|
|
2183
2183
|
const i = t.replace(r, "");
|
|
2184
|
-
let a =
|
|
2184
|
+
let a = cl.has(e) ? 1 : 0;
|
|
2185
2185
|
return r !== t && (a *= 100), e + "(" + a + i + ")";
|
|
2186
2186
|
}
|
|
2187
|
-
const
|
|
2187
|
+
const dl = /\b([a-z-]*)\(.*?\)/gu, Xt = te(Q({}, Be), {
|
|
2188
2188
|
getAnimatableNone: (n) => {
|
|
2189
|
-
const e = n.match(
|
|
2190
|
-
return e ? e.map(
|
|
2189
|
+
const e = n.match(dl);
|
|
2190
|
+
return e ? e.map(ul).join(" ") : n;
|
|
2191
2191
|
}
|
|
2192
|
-
}),
|
|
2192
|
+
}), ei = te(Q({}, Ue), {
|
|
2193
2193
|
transform: Math.round
|
|
2194
|
-
}),
|
|
2194
|
+
}), pl = {
|
|
2195
2195
|
rotate: we,
|
|
2196
2196
|
rotateX: we,
|
|
2197
2197
|
rotateY: we,
|
|
@@ -2203,62 +2203,62 @@ const ul = /\b([a-z-]*)\(.*?\)/gu, Xt = te($({}, Be), {
|
|
|
2203
2203
|
skew: we,
|
|
2204
2204
|
skewX: we,
|
|
2205
2205
|
skewY: we,
|
|
2206
|
-
distance:
|
|
2207
|
-
translateX:
|
|
2208
|
-
translateY:
|
|
2209
|
-
translateZ:
|
|
2210
|
-
x:
|
|
2211
|
-
y:
|
|
2212
|
-
z:
|
|
2213
|
-
perspective:
|
|
2214
|
-
transformPerspective:
|
|
2206
|
+
distance: $,
|
|
2207
|
+
translateX: $,
|
|
2208
|
+
translateY: $,
|
|
2209
|
+
translateZ: $,
|
|
2210
|
+
x: $,
|
|
2211
|
+
y: $,
|
|
2212
|
+
z: $,
|
|
2213
|
+
perspective: $,
|
|
2214
|
+
transformPerspective: $,
|
|
2215
2215
|
opacity: st,
|
|
2216
|
-
originX:
|
|
2217
|
-
originY:
|
|
2218
|
-
originZ:
|
|
2219
|
-
}, En = te(
|
|
2216
|
+
originX: Dr,
|
|
2217
|
+
originY: Dr,
|
|
2218
|
+
originZ: $
|
|
2219
|
+
}, En = te(Q({
|
|
2220
2220
|
// Border props
|
|
2221
|
-
borderWidth:
|
|
2222
|
-
borderTopWidth:
|
|
2223
|
-
borderRightWidth:
|
|
2224
|
-
borderBottomWidth:
|
|
2225
|
-
borderLeftWidth:
|
|
2226
|
-
borderRadius:
|
|
2227
|
-
radius:
|
|
2228
|
-
borderTopLeftRadius:
|
|
2229
|
-
borderTopRightRadius:
|
|
2230
|
-
borderBottomRightRadius:
|
|
2231
|
-
borderBottomLeftRadius:
|
|
2221
|
+
borderWidth: $,
|
|
2222
|
+
borderTopWidth: $,
|
|
2223
|
+
borderRightWidth: $,
|
|
2224
|
+
borderBottomWidth: $,
|
|
2225
|
+
borderLeftWidth: $,
|
|
2226
|
+
borderRadius: $,
|
|
2227
|
+
radius: $,
|
|
2228
|
+
borderTopLeftRadius: $,
|
|
2229
|
+
borderTopRightRadius: $,
|
|
2230
|
+
borderBottomRightRadius: $,
|
|
2231
|
+
borderBottomLeftRadius: $,
|
|
2232
2232
|
// Positioning props
|
|
2233
|
-
width:
|
|
2234
|
-
maxWidth:
|
|
2235
|
-
height:
|
|
2236
|
-
maxHeight:
|
|
2237
|
-
top:
|
|
2238
|
-
right:
|
|
2239
|
-
bottom:
|
|
2240
|
-
left:
|
|
2233
|
+
width: $,
|
|
2234
|
+
maxWidth: $,
|
|
2235
|
+
height: $,
|
|
2236
|
+
maxHeight: $,
|
|
2237
|
+
top: $,
|
|
2238
|
+
right: $,
|
|
2239
|
+
bottom: $,
|
|
2240
|
+
left: $,
|
|
2241
2241
|
// Spacing props
|
|
2242
|
-
padding:
|
|
2243
|
-
paddingTop:
|
|
2244
|
-
paddingRight:
|
|
2245
|
-
paddingBottom:
|
|
2246
|
-
paddingLeft:
|
|
2247
|
-
margin:
|
|
2248
|
-
marginTop:
|
|
2249
|
-
marginRight:
|
|
2250
|
-
marginBottom:
|
|
2251
|
-
marginLeft:
|
|
2242
|
+
padding: $,
|
|
2243
|
+
paddingTop: $,
|
|
2244
|
+
paddingRight: $,
|
|
2245
|
+
paddingBottom: $,
|
|
2246
|
+
paddingLeft: $,
|
|
2247
|
+
margin: $,
|
|
2248
|
+
marginTop: $,
|
|
2249
|
+
marginRight: $,
|
|
2250
|
+
marginBottom: $,
|
|
2251
|
+
marginLeft: $,
|
|
2252
2252
|
// Misc
|
|
2253
|
-
backgroundPositionX:
|
|
2254
|
-
backgroundPositionY:
|
|
2255
|
-
},
|
|
2256
|
-
zIndex:
|
|
2253
|
+
backgroundPositionX: $,
|
|
2254
|
+
backgroundPositionY: $
|
|
2255
|
+
}, pl), {
|
|
2256
|
+
zIndex: ei,
|
|
2257
2257
|
// SVG
|
|
2258
2258
|
fillOpacity: st,
|
|
2259
2259
|
strokeOpacity: st,
|
|
2260
|
-
numOctaves:
|
|
2261
|
-
}),
|
|
2260
|
+
numOctaves: ei
|
|
2261
|
+
}), hl = te(Q({}, En), {
|
|
2262
2262
|
// Color props
|
|
2263
2263
|
color: ue,
|
|
2264
2264
|
backgroundColor: ue,
|
|
@@ -2273,12 +2273,12 @@ const ul = /\b([a-z-]*)\(.*?\)/gu, Xt = te($({}, Be), {
|
|
|
2273
2273
|
borderLeftColor: ue,
|
|
2274
2274
|
filter: Xt,
|
|
2275
2275
|
WebkitFilter: Xt
|
|
2276
|
-
}),
|
|
2277
|
-
function
|
|
2278
|
-
let t =
|
|
2276
|
+
}), pa = (n) => hl[n];
|
|
2277
|
+
function ha(n, e) {
|
|
2278
|
+
let t = pa(n);
|
|
2279
2279
|
return t !== Xt && (t = Be), t.getAnimatableNone ? t.getAnimatableNone(e) : void 0;
|
|
2280
2280
|
}
|
|
2281
|
-
const
|
|
2281
|
+
const ti = [
|
|
2282
2282
|
"AnimationStart",
|
|
2283
2283
|
"AnimationComplete",
|
|
2284
2284
|
"Update",
|
|
@@ -2287,7 +2287,7 @@ const ei = [
|
|
|
2287
2287
|
"LayoutAnimationStart",
|
|
2288
2288
|
"LayoutAnimationComplete"
|
|
2289
2289
|
];
|
|
2290
|
-
class
|
|
2290
|
+
class ma {
|
|
2291
2291
|
/**
|
|
2292
2292
|
* This method takes React props and returns found MotionValues. For example, HTML
|
|
2293
2293
|
* MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
|
|
@@ -2306,7 +2306,7 @@ class ha {
|
|
|
2306
2306
|
this.renderScheduledAt < p && (this.renderScheduledAt = p, Ae.render(this.render, !1, !0));
|
|
2307
2307
|
};
|
|
2308
2308
|
const { latestValues: l, renderState: c } = s;
|
|
2309
|
-
this.latestValues = l, this.baseTarget =
|
|
2309
|
+
this.latestValues = l, this.baseTarget = Q({}, l), this.initialValues = t.initial ? Q({}, l) : {}, this.renderState = c, this.parent = e, this.props = t, this.presenceContext = r, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = i, this.options = o, this.blockInitialAnimation = !!a, this.isControllingVariants = oa(t), this.isVariantNode = il(t), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
|
|
2310
2310
|
const h = this.scrapeMotionValuesFromProps(t, {}, this), { willChange: u } = h, d = ge(h, ["willChange"]);
|
|
2311
2311
|
for (const p in d) {
|
|
2312
2312
|
const m = d[p];
|
|
@@ -2314,7 +2314,7 @@ class ha {
|
|
|
2314
2314
|
}
|
|
2315
2315
|
}
|
|
2316
2316
|
mount(e) {
|
|
2317
|
-
this.current = e, it.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, r) => this.bindToMotionValue(r, t)),
|
|
2317
|
+
this.current = e, it.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, r) => this.bindToMotionValue(r, t)), sa.current || Jo(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : Zt.current, process.env.NODE_ENV !== "production" && Oi(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);
|
|
2318
2318
|
}
|
|
2319
2319
|
unmount() {
|
|
2320
2320
|
this.projection && this.projection.unmount(), Ft(this.notifyUpdate), Ft(this.render), this.valueSubscriptions.forEach((e) => e()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
|
|
@@ -2377,13 +2377,13 @@ class ha {
|
|
|
2377
2377
|
*/
|
|
2378
2378
|
update(e, t) {
|
|
2379
2379
|
(e.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = e, this.prevPresenceContext = this.presenceContext, this.presenceContext = t;
|
|
2380
|
-
for (let r = 0; r <
|
|
2381
|
-
const i =
|
|
2380
|
+
for (let r = 0; r < ti.length; r++) {
|
|
2381
|
+
const i = ti[r];
|
|
2382
2382
|
this.propEventSubscriptions[i] && (this.propEventSubscriptions[i](), delete this.propEventSubscriptions[i]);
|
|
2383
2383
|
const a = "on" + i, s = e[a];
|
|
2384
2384
|
s && (this.propEventSubscriptions[i] = this.on(i, s));
|
|
2385
2385
|
}
|
|
2386
|
-
this.prevMotionValues =
|
|
2386
|
+
this.prevMotionValues = al(this, this.scrapeMotionValuesFromProps(e, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
|
|
2387
2387
|
}
|
|
2388
2388
|
getProps() {
|
|
2389
2389
|
return this.props;
|
|
@@ -2449,7 +2449,7 @@ class ha {
|
|
|
2449
2449
|
readValue(e, t) {
|
|
2450
2450
|
var i;
|
|
2451
2451
|
let r = this.latestValues[e] !== void 0 || !this.current ? this.latestValues[e] : (i = this.getBaseTargetFromProps(this.props, e)) != null ? i : this.readValueFromInstance(this.current, e, this.options);
|
|
2452
|
-
return r != null && (typeof r == "string" && (
|
|
2452
|
+
return r != null && (typeof r == "string" && (la(r) || ca(r)) ? r = parseFloat(r) : !ll(r) && Be.test(t) && (r = ha(e, t)), this.setBaseTarget(e, he(r) ? r.get() : r)), he(r) ? r.get() : r;
|
|
2453
2453
|
}
|
|
2454
2454
|
/**
|
|
2455
2455
|
* Set the base target to later animate back to. This is currently
|
|
@@ -2467,7 +2467,7 @@ class ha {
|
|
|
2467
2467
|
const { initial: t } = this.props;
|
|
2468
2468
|
let r;
|
|
2469
2469
|
if (typeof t == "string" || typeof t == "object") {
|
|
2470
|
-
const s =
|
|
2470
|
+
const s = Ii(this.props, t, (a = this.presenceContext) == null ? void 0 : a.custom);
|
|
2471
2471
|
s && (r = s[e]);
|
|
2472
2472
|
}
|
|
2473
2473
|
if (t && r !== void 0)
|
|
@@ -2476,51 +2476,51 @@ class ha {
|
|
|
2476
2476
|
return i !== void 0 && !he(i) ? i : this.initialValues[e] !== void 0 && r === void 0 ? void 0 : this.baseTarget[e];
|
|
2477
2477
|
}
|
|
2478
2478
|
on(e, t) {
|
|
2479
|
-
return this.events[e] || (this.events[e] = new
|
|
2479
|
+
return this.events[e] || (this.events[e] = new Ni()), this.events[e].add(t);
|
|
2480
2480
|
}
|
|
2481
2481
|
notify(e, ...t) {
|
|
2482
2482
|
this.events[e] && this.events[e].notify(...t);
|
|
2483
2483
|
}
|
|
2484
2484
|
}
|
|
2485
|
-
const
|
|
2485
|
+
const ml = (
|
|
2486
2486
|
// eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
|
|
2487
2487
|
/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
|
|
2488
2488
|
);
|
|
2489
|
-
function
|
|
2490
|
-
const e =
|
|
2489
|
+
function fl(n) {
|
|
2490
|
+
const e = ml.exec(n);
|
|
2491
2491
|
if (!e)
|
|
2492
2492
|
return [,];
|
|
2493
2493
|
const [, t, r, i] = e;
|
|
2494
2494
|
return [`--${t != null ? t : r}`, i];
|
|
2495
2495
|
}
|
|
2496
|
-
const
|
|
2497
|
-
function
|
|
2498
|
-
_e(t <=
|
|
2499
|
-
const [r, i] =
|
|
2496
|
+
const vl = 4;
|
|
2497
|
+
function fa(n, e, t = 1) {
|
|
2498
|
+
_e(t <= vl, `Max CSS variable fallback depth detected in property "${n}". This may indicate a circular fallback dependency.`);
|
|
2499
|
+
const [r, i] = fl(n);
|
|
2500
2500
|
if (!r)
|
|
2501
2501
|
return;
|
|
2502
2502
|
const a = window.getComputedStyle(e).getPropertyValue(r);
|
|
2503
2503
|
if (a) {
|
|
2504
2504
|
const s = a.trim();
|
|
2505
|
-
return
|
|
2505
|
+
return la(s) ? parseFloat(s) : s;
|
|
2506
2506
|
}
|
|
2507
|
-
return on(i) ?
|
|
2507
|
+
return on(i) ? fa(i, e, t + 1) : i;
|
|
2508
2508
|
}
|
|
2509
|
-
function
|
|
2510
|
-
return typeof n == "number" ? n === 0 : n !== null ? n === "none" || n === "0" ||
|
|
2509
|
+
function gl(n) {
|
|
2510
|
+
return typeof n == "number" ? n === 0 : n !== null ? n === "none" || n === "0" || ca(n) : !0;
|
|
2511
2511
|
}
|
|
2512
|
-
const
|
|
2513
|
-
function
|
|
2512
|
+
const yl = /* @__PURE__ */ new Set(["auto", "none", "0"]);
|
|
2513
|
+
function bl(n, e, t) {
|
|
2514
2514
|
let r = 0, i;
|
|
2515
2515
|
for (; r < n.length && !i; ) {
|
|
2516
2516
|
const a = n[r];
|
|
2517
|
-
typeof a == "string" && !
|
|
2517
|
+
typeof a == "string" && !yl.has(a) && ot(a).values.length && (i = n[r]), r++;
|
|
2518
2518
|
}
|
|
2519
2519
|
if (i && t)
|
|
2520
2520
|
for (const a of e)
|
|
2521
|
-
n[a] =
|
|
2521
|
+
n[a] = ha(t, i);
|
|
2522
2522
|
}
|
|
2523
|
-
class
|
|
2523
|
+
class El extends gn {
|
|
2524
2524
|
constructor(e, t, r, i, a) {
|
|
2525
2525
|
super(e, t, r, i, a, !0);
|
|
2526
2526
|
}
|
|
@@ -2532,15 +2532,15 @@ class bl extends gn {
|
|
|
2532
2532
|
for (let l = 0; l < e.length; l++) {
|
|
2533
2533
|
let c = e[l];
|
|
2534
2534
|
if (typeof c == "string" && (c = c.trim(), on(c))) {
|
|
2535
|
-
const u =
|
|
2535
|
+
const u = fa(c, t.current);
|
|
2536
2536
|
u !== void 0 && (e[l] = u), l === e.length - 1 && (this.finalKeyframe = c);
|
|
2537
2537
|
}
|
|
2538
2538
|
}
|
|
2539
|
-
if (this.resolveNoneKeyframes(), !
|
|
2539
|
+
if (this.resolveNoneKeyframes(), !aa.has(r) || e.length !== 2)
|
|
2540
2540
|
return;
|
|
2541
|
-
const [i, a] = e, s =
|
|
2541
|
+
const [i, a] = e, s = Jr(i), o = Jr(a);
|
|
2542
2542
|
if (s !== o)
|
|
2543
|
-
if (
|
|
2543
|
+
if (Gr(s) && Gr(o))
|
|
2544
2544
|
for (let l = 0; l < e.length; l++) {
|
|
2545
2545
|
const c = e[l];
|
|
2546
2546
|
typeof c == "string" && (e[l] = parseFloat(c));
|
|
@@ -2550,8 +2550,8 @@ class bl extends gn {
|
|
|
2550
2550
|
resolveNoneKeyframes() {
|
|
2551
2551
|
const { unresolvedKeyframes: e, name: t } = this, r = [];
|
|
2552
2552
|
for (let i = 0; i < e.length; i++)
|
|
2553
|
-
(e[i] === null ||
|
|
2554
|
-
r.length &&
|
|
2553
|
+
(e[i] === null || gl(e[i])) && r.push(i);
|
|
2554
|
+
r.length && bl(e, r, t);
|
|
2555
2555
|
}
|
|
2556
2556
|
measureInitialState() {
|
|
2557
2557
|
const { element: e, unresolvedKeyframes: t, name: r } = this;
|
|
@@ -2574,9 +2574,9 @@ class bl extends gn {
|
|
|
2574
2574
|
}), this.resolveNoneKeyframes();
|
|
2575
2575
|
}
|
|
2576
2576
|
}
|
|
2577
|
-
class
|
|
2577
|
+
class va extends ma {
|
|
2578
2578
|
constructor() {
|
|
2579
|
-
super(...arguments), this.KeyframeResolver =
|
|
2579
|
+
super(...arguments), this.KeyframeResolver = El;
|
|
2580
2580
|
}
|
|
2581
2581
|
sortInstanceNodePosition(e, t) {
|
|
2582
2582
|
return e.compareDocumentPosition(t) & 2 ? 1 : -1;
|
|
@@ -2595,24 +2595,24 @@ class fa extends ha {
|
|
|
2595
2595
|
}));
|
|
2596
2596
|
}
|
|
2597
2597
|
}
|
|
2598
|
-
const
|
|
2598
|
+
const ga = (n, e) => e && typeof n == "number" ? e.transform(n) : n, _l = {
|
|
2599
2599
|
x: "translateX",
|
|
2600
2600
|
y: "translateY",
|
|
2601
2601
|
z: "translateZ",
|
|
2602
2602
|
transformPerspective: "perspective"
|
|
2603
|
-
},
|
|
2604
|
-
function
|
|
2603
|
+
}, Cl = Ve.length;
|
|
2604
|
+
function Al(n, e, t) {
|
|
2605
2605
|
let r = "", i = !0;
|
|
2606
|
-
for (let a = 0; a <
|
|
2606
|
+
for (let a = 0; a < Cl; a++) {
|
|
2607
2607
|
const s = Ve[a], o = n[s];
|
|
2608
2608
|
if (o === void 0)
|
|
2609
2609
|
continue;
|
|
2610
2610
|
let l = !0;
|
|
2611
2611
|
if (typeof o == "number" ? l = o === (s.startsWith("scale") ? 1 : 0) : l = parseFloat(o) === 0, !l || t) {
|
|
2612
|
-
const c =
|
|
2612
|
+
const c = ga(o, En[s]);
|
|
2613
2613
|
if (!l) {
|
|
2614
2614
|
i = !1;
|
|
2615
|
-
const u =
|
|
2615
|
+
const u = _l[s] || s;
|
|
2616
2616
|
r += `${u}(${c}) `;
|
|
2617
2617
|
}
|
|
2618
2618
|
t && (e[s] = c);
|
|
@@ -2620,7 +2620,7 @@ function Cl(n, e, t) {
|
|
|
2620
2620
|
}
|
|
2621
2621
|
return r = r.trim(), t ? r = t(e, i ? "" : r) : i && (r = "none"), r;
|
|
2622
2622
|
}
|
|
2623
|
-
function
|
|
2623
|
+
function ya(n, e, t) {
|
|
2624
2624
|
const { style: r, vars: i, transformOrigin: a } = n;
|
|
2625
2625
|
let s = !1, o = !1;
|
|
2626
2626
|
for (const l in e) {
|
|
@@ -2628,70 +2628,70 @@ function ga(n, e, t) {
|
|
|
2628
2628
|
if (Fe.has(l)) {
|
|
2629
2629
|
s = !0;
|
|
2630
2630
|
continue;
|
|
2631
|
-
} else if (
|
|
2631
|
+
} else if (Ri(l)) {
|
|
2632
2632
|
i[l] = c;
|
|
2633
2633
|
continue;
|
|
2634
2634
|
} else {
|
|
2635
|
-
const u =
|
|
2635
|
+
const u = ga(c, En[l]);
|
|
2636
2636
|
l.startsWith("origin") ? (o = !0, a[l] = u) : r[l] = u;
|
|
2637
2637
|
}
|
|
2638
2638
|
}
|
|
2639
|
-
if (e.transform || (s || t ? r.transform =
|
|
2639
|
+
if (e.transform || (s || t ? r.transform = Al(e, n.transform, t) : r.transform && (r.transform = "none")), o) {
|
|
2640
2640
|
const { originX: l = "50%", originY: c = "50%", originZ: u = 0 } = a;
|
|
2641
2641
|
r.transformOrigin = `${l} ${c} ${u}`;
|
|
2642
2642
|
}
|
|
2643
2643
|
}
|
|
2644
|
-
function
|
|
2644
|
+
function ba(n, { style: e, vars: t }, r, i) {
|
|
2645
2645
|
Object.assign(n.style, e, i && i.getProjectionStyles(r));
|
|
2646
2646
|
for (const a in t)
|
|
2647
2647
|
n.style.setProperty(a, t[a]);
|
|
2648
2648
|
}
|
|
2649
|
-
const
|
|
2650
|
-
function
|
|
2651
|
-
return Fe.has(n) || n.startsWith("origin") || (e || t !== void 0) && (!!
|
|
2649
|
+
const wl = {};
|
|
2650
|
+
function Tl(n, { layout: e, layoutId: t }) {
|
|
2651
|
+
return Fe.has(n) || n.startsWith("origin") || (e || t !== void 0) && (!!wl[n] || n === "opacity");
|
|
2652
2652
|
}
|
|
2653
|
-
function
|
|
2653
|
+
function Ea(n, e, t) {
|
|
2654
2654
|
var a;
|
|
2655
2655
|
const { style: r } = n, i = {};
|
|
2656
2656
|
for (const s in r)
|
|
2657
|
-
(he(r[s]) || e.style && he(e.style[s]) ||
|
|
2657
|
+
(he(r[s]) || e.style && he(e.style[s]) || Tl(s, n) || ((a = t == null ? void 0 : t.getValue(s)) == null ? void 0 : a.liveStyle) !== void 0) && (i[s] = r[s]);
|
|
2658
2658
|
return i;
|
|
2659
2659
|
}
|
|
2660
|
-
function
|
|
2660
|
+
function Il(n) {
|
|
2661
2661
|
return window.getComputedStyle(n);
|
|
2662
2662
|
}
|
|
2663
|
-
class
|
|
2663
|
+
class Ol extends va {
|
|
2664
2664
|
constructor() {
|
|
2665
|
-
super(...arguments), this.type = "html", this.renderInstance =
|
|
2665
|
+
super(...arguments), this.type = "html", this.renderInstance = ba;
|
|
2666
2666
|
}
|
|
2667
2667
|
readValueFromInstance(e, t) {
|
|
2668
2668
|
var r;
|
|
2669
2669
|
if (Fe.has(t))
|
|
2670
|
-
return (r = this.projection) != null && r.isProjecting ? Ht(t) :
|
|
2670
|
+
return (r = this.projection) != null && r.isProjecting ? Ht(t) : Co(e, t);
|
|
2671
2671
|
{
|
|
2672
|
-
const i =
|
|
2672
|
+
const i = Il(e), a = (Ri(t) ? i.getPropertyValue(t) : i[t]) || 0;
|
|
2673
2673
|
return typeof a == "string" ? a.trim() : a;
|
|
2674
2674
|
}
|
|
2675
2675
|
}
|
|
2676
2676
|
measureInstanceViewportBox(e, { transformPagePoint: t }) {
|
|
2677
|
-
return
|
|
2677
|
+
return Zo(e, t);
|
|
2678
2678
|
}
|
|
2679
2679
|
build(e, t, r) {
|
|
2680
|
-
|
|
2680
|
+
ya(e, t, r.transformTemplate);
|
|
2681
2681
|
}
|
|
2682
2682
|
scrapeMotionValuesFromProps(e, t, r) {
|
|
2683
|
-
return
|
|
2683
|
+
return Ea(e, t, r);
|
|
2684
2684
|
}
|
|
2685
2685
|
}
|
|
2686
|
-
function
|
|
2686
|
+
function Nl(n, e) {
|
|
2687
2687
|
return n in e;
|
|
2688
2688
|
}
|
|
2689
|
-
class
|
|
2689
|
+
class xl extends ma {
|
|
2690
2690
|
constructor() {
|
|
2691
2691
|
super(...arguments), this.type = "object";
|
|
2692
2692
|
}
|
|
2693
2693
|
readValueFromInstance(e, t) {
|
|
2694
|
-
if (
|
|
2694
|
+
if (Nl(t, e)) {
|
|
2695
2695
|
const r = e[t];
|
|
2696
2696
|
if (typeof r == "string" || typeof r == "number")
|
|
2697
2697
|
return r;
|
|
@@ -2715,21 +2715,21 @@ class Nl extends ha {
|
|
|
2715
2715
|
return 0;
|
|
2716
2716
|
}
|
|
2717
2717
|
}
|
|
2718
|
-
const
|
|
2718
|
+
const Ll = {
|
|
2719
2719
|
offset: "stroke-dashoffset",
|
|
2720
2720
|
array: "stroke-dasharray"
|
|
2721
|
-
},
|
|
2721
|
+
}, Pl = {
|
|
2722
2722
|
offset: "strokeDashoffset",
|
|
2723
2723
|
array: "strokeDasharray"
|
|
2724
2724
|
};
|
|
2725
|
-
function
|
|
2725
|
+
function Rl(n, e, t = 1, r = 0, i = !0) {
|
|
2726
2726
|
n.pathLength = 1;
|
|
2727
|
-
const a = i ?
|
|
2728
|
-
n[a.offset] =
|
|
2729
|
-
const s =
|
|
2727
|
+
const a = i ? Ll : Pl;
|
|
2728
|
+
n[a.offset] = $.transform(-r);
|
|
2729
|
+
const s = $.transform(e), o = $.transform(t);
|
|
2730
2730
|
n[a.array] = `${s} ${o}`;
|
|
2731
2731
|
}
|
|
2732
|
-
function
|
|
2732
|
+
function Sl(n, d, l, c, u) {
|
|
2733
2733
|
var h = d, {
|
|
2734
2734
|
attrX: e,
|
|
2735
2735
|
attrY: t,
|
|
@@ -2746,15 +2746,15 @@ function Rl(n, d, l, c, u) {
|
|
|
2746
2746
|
"pathOffset"
|
|
2747
2747
|
]);
|
|
2748
2748
|
var f, v;
|
|
2749
|
-
if (
|
|
2749
|
+
if (ya(n, o, c), l) {
|
|
2750
2750
|
n.style.viewBox && (n.attrs.viewBox = n.style.viewBox);
|
|
2751
2751
|
return;
|
|
2752
2752
|
}
|
|
2753
2753
|
n.attrs = n.style, n.style = {};
|
|
2754
2754
|
const { attrs: p, style: m } = n;
|
|
2755
|
-
p.transform && (m.transform = p.transform, delete p.transform), (m.transform || p.transformOrigin) && (m.transformOrigin = (f = p.transformOrigin) != null ? f : "50% 50%", delete p.transformOrigin), m.transform && (m.transformBox = (v = u == null ? void 0 : u.transformBox) != null ? v : "fill-box", delete p.transformBox), e !== void 0 && (p.x = e), t !== void 0 && (p.y = t), r !== void 0 && (p.scale = r), i !== void 0 &&
|
|
2755
|
+
p.transform && (m.transform = p.transform, delete p.transform), (m.transform || p.transformOrigin) && (m.transformOrigin = (f = p.transformOrigin) != null ? f : "50% 50%", delete p.transformOrigin), m.transform && (m.transformBox = (v = u == null ? void 0 : u.transformBox) != null ? v : "fill-box", delete p.transformBox), e !== void 0 && (p.x = e), t !== void 0 && (p.y = t), r !== void 0 && (p.scale = r), i !== void 0 && Rl(p, i, a, s, !1);
|
|
2756
2756
|
}
|
|
2757
|
-
const
|
|
2757
|
+
const _a = /* @__PURE__ */ new Set([
|
|
2758
2758
|
"baseFrequency",
|
|
2759
2759
|
"diffuseConstant",
|
|
2760
2760
|
"kernelMatrix",
|
|
@@ -2778,14 +2778,14 @@ const Ea = /* @__PURE__ */ new Set([
|
|
|
2778
2778
|
"startOffset",
|
|
2779
2779
|
"textLength",
|
|
2780
2780
|
"lengthAdjust"
|
|
2781
|
-
]),
|
|
2782
|
-
function
|
|
2783
|
-
|
|
2781
|
+
]), kl = (n) => typeof n == "string" && n.toLowerCase() === "svg";
|
|
2782
|
+
function Ml(n, e, t, r) {
|
|
2783
|
+
ba(n, e, void 0, r);
|
|
2784
2784
|
for (const i in e.attrs)
|
|
2785
|
-
n.setAttribute(
|
|
2785
|
+
n.setAttribute(_a.has(i) ? i : sn(i), e.attrs[i]);
|
|
2786
2786
|
}
|
|
2787
|
-
function
|
|
2788
|
-
const r =
|
|
2787
|
+
function Dl(n, e, t) {
|
|
2788
|
+
const r = Ea(n, e, t);
|
|
2789
2789
|
for (const i in n)
|
|
2790
2790
|
if (he(n[i]) || he(e[i])) {
|
|
2791
2791
|
const a = Ve.indexOf(i) !== -1 ? "attr" + i.charAt(0).toUpperCase() + i.substring(1) : i;
|
|
@@ -2793,7 +2793,7 @@ function Ml(n, e, t) {
|
|
|
2793
2793
|
}
|
|
2794
2794
|
return r;
|
|
2795
2795
|
}
|
|
2796
|
-
class
|
|
2796
|
+
class Vl extends va {
|
|
2797
2797
|
constructor() {
|
|
2798
2798
|
super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = bn;
|
|
2799
2799
|
}
|
|
@@ -2802,31 +2802,31 @@ class Dl extends fa {
|
|
|
2802
2802
|
}
|
|
2803
2803
|
readValueFromInstance(e, t) {
|
|
2804
2804
|
if (Fe.has(t)) {
|
|
2805
|
-
const r =
|
|
2805
|
+
const r = pa(t);
|
|
2806
2806
|
return r && r.default || 0;
|
|
2807
2807
|
}
|
|
2808
|
-
return t =
|
|
2808
|
+
return t = _a.has(t) ? t : sn(t), e.getAttribute(t);
|
|
2809
2809
|
}
|
|
2810
2810
|
scrapeMotionValuesFromProps(e, t, r) {
|
|
2811
|
-
return
|
|
2811
|
+
return Dl(e, t, r);
|
|
2812
2812
|
}
|
|
2813
2813
|
build(e, t, r) {
|
|
2814
|
-
|
|
2814
|
+
Sl(e, t, this.isSVGTag, r.transformTemplate, r.style);
|
|
2815
2815
|
}
|
|
2816
2816
|
renderInstance(e, t, r, i) {
|
|
2817
|
-
|
|
2817
|
+
Ml(e, t, r, i);
|
|
2818
2818
|
}
|
|
2819
2819
|
mount(e) {
|
|
2820
|
-
this.isSVGTag =
|
|
2820
|
+
this.isSVGTag = kl(e.tagName), super.mount(e);
|
|
2821
2821
|
}
|
|
2822
2822
|
}
|
|
2823
|
-
function
|
|
2824
|
-
return
|
|
2825
|
-
}
|
|
2826
|
-
function Vl(n) {
|
|
2827
|
-
return _a(n) && n.tagName === "svg";
|
|
2823
|
+
function Ca(n) {
|
|
2824
|
+
return ra(n) && "ownerSVGElement" in n;
|
|
2828
2825
|
}
|
|
2829
2826
|
function Fl(n) {
|
|
2827
|
+
return Ca(n) && n.tagName === "svg";
|
|
2828
|
+
}
|
|
2829
|
+
function Ul(n) {
|
|
2830
2830
|
const e = {
|
|
2831
2831
|
presenceContext: null,
|
|
2832
2832
|
props: {},
|
|
@@ -2840,10 +2840,10 @@ function Fl(n) {
|
|
|
2840
2840
|
},
|
|
2841
2841
|
latestValues: {}
|
|
2842
2842
|
}
|
|
2843
|
-
}, t =
|
|
2843
|
+
}, t = Ca(n) && !Fl(n) ? new Vl(e) : new Ol(e);
|
|
2844
2844
|
t.mount(n), it.set(n, t);
|
|
2845
2845
|
}
|
|
2846
|
-
function
|
|
2846
|
+
function Bl(n) {
|
|
2847
2847
|
const e = {
|
|
2848
2848
|
presenceContext: null,
|
|
2849
2849
|
props: {},
|
|
@@ -2853,39 +2853,39 @@ function Ul(n) {
|
|
|
2853
2853
|
},
|
|
2854
2854
|
latestValues: {}
|
|
2855
2855
|
}
|
|
2856
|
-
}, t = new
|
|
2856
|
+
}, t = new xl(e);
|
|
2857
2857
|
t.mount(n), it.set(n, t);
|
|
2858
2858
|
}
|
|
2859
|
-
function
|
|
2859
|
+
function zl(n, e, t) {
|
|
2860
2860
|
const r = he(n) ? n : at(n);
|
|
2861
|
-
return r.start(
|
|
2861
|
+
return r.start(ia("", r, e, t)), r.animation;
|
|
2862
2862
|
}
|
|
2863
|
-
function
|
|
2863
|
+
function jl(n, e) {
|
|
2864
2864
|
return he(n) || typeof n == "number" || typeof n == "string" && !tn(e);
|
|
2865
2865
|
}
|
|
2866
|
-
function
|
|
2866
|
+
function Aa(n, e, t, r) {
|
|
2867
2867
|
const i = [];
|
|
2868
|
-
if (
|
|
2869
|
-
i.push(
|
|
2868
|
+
if (jl(n, e))
|
|
2869
|
+
i.push(zl(n, tn(e) && e.default || e, t && (t.default || t)));
|
|
2870
2870
|
else {
|
|
2871
|
-
const a =
|
|
2871
|
+
const a = bi(n, e, r), s = a.length;
|
|
2872
2872
|
_e(!!s, "No valid elements provided.");
|
|
2873
2873
|
for (let o = 0; o < s; o++) {
|
|
2874
|
-
const l = a[o], c = l instanceof Element ?
|
|
2874
|
+
const l = a[o], c = l instanceof Element ? Ul : Bl;
|
|
2875
2875
|
it.has(l) || c(l);
|
|
2876
|
-
const u = it.get(l), d =
|
|
2877
|
-
"delay" in d && typeof d.delay == "function" && (d.delay = d.delay(o, s)), i.push(...
|
|
2876
|
+
const u = it.get(l), d = Q({}, t);
|
|
2877
|
+
"delay" in d && typeof d.delay == "function" && (d.delay = d.delay(o, s)), i.push(...Yo(u, te(Q({}, e), { transition: d }), {}));
|
|
2878
2878
|
}
|
|
2879
2879
|
}
|
|
2880
2880
|
return i;
|
|
2881
2881
|
}
|
|
2882
|
-
function
|
|
2882
|
+
function Kl(n, e, t) {
|
|
2883
2883
|
const r = [];
|
|
2884
|
-
return
|
|
2885
|
-
r.push(...
|
|
2884
|
+
return Za(n, e, t, { spring: lt }).forEach(({ keyframes: a, transition: s }, o) => {
|
|
2885
|
+
r.push(...Aa(o, a, s));
|
|
2886
2886
|
}), r;
|
|
2887
2887
|
}
|
|
2888
|
-
class
|
|
2888
|
+
class ql {
|
|
2889
2889
|
constructor(e) {
|
|
2890
2890
|
this.stop = () => this.runAll("stop"), this.animations = e.filter(Boolean);
|
|
2891
2891
|
}
|
|
@@ -2950,34 +2950,34 @@ class Kl {
|
|
|
2950
2950
|
this.runAll("complete");
|
|
2951
2951
|
}
|
|
2952
2952
|
}
|
|
2953
|
-
class
|
|
2953
|
+
class Hl extends ql {
|
|
2954
2954
|
then(e, t) {
|
|
2955
2955
|
return this.finished.finally(e).then(() => {
|
|
2956
2956
|
});
|
|
2957
2957
|
}
|
|
2958
2958
|
}
|
|
2959
|
-
function
|
|
2959
|
+
function Wl(n) {
|
|
2960
2960
|
return Array.isArray(n) && n.some(Array.isArray);
|
|
2961
2961
|
}
|
|
2962
|
-
function
|
|
2962
|
+
function Gl(n) {
|
|
2963
2963
|
function e(t, r, i) {
|
|
2964
2964
|
let a = [];
|
|
2965
|
-
return
|
|
2965
|
+
return Wl(t) ? a = Kl(t, r, n) : a = Aa(t, r, i, n), new Hl(a);
|
|
2966
2966
|
}
|
|
2967
2967
|
return e;
|
|
2968
2968
|
}
|
|
2969
|
-
const se =
|
|
2970
|
-
spinner:
|
|
2971
|
-
spinnerContainer:
|
|
2972
|
-
success:
|
|
2973
|
-
successContainer:
|
|
2974
|
-
container:
|
|
2975
|
-
card:
|
|
2976
|
-
warning:
|
|
2977
|
-
svg:
|
|
2978
|
-
srOnly:
|
|
2969
|
+
const se = Gl(), Yl = "_spinner_1waxg_1", Ql = "_spinnerContainer_1waxg_5", $l = "_success_1waxg_9", Zl = "_successContainer_1waxg_13", Xl = "_container_1waxg_17", Jl = "_card_1waxg_26", ec = "_warning_1waxg_35", tc = "_svg_1waxg_43", nc = "_srOnly_1waxg_48", Z = {
|
|
2970
|
+
spinner: Yl,
|
|
2971
|
+
spinnerContainer: Ql,
|
|
2972
|
+
success: $l,
|
|
2973
|
+
successContainer: Zl,
|
|
2974
|
+
container: Xl,
|
|
2975
|
+
card: Jl,
|
|
2976
|
+
warning: ec,
|
|
2977
|
+
svg: tc,
|
|
2978
|
+
srOnly: nc
|
|
2979
2979
|
};
|
|
2980
|
-
class
|
|
2980
|
+
class wa {
|
|
2981
2981
|
constructor() {
|
|
2982
2982
|
b(this, "template", `
|
|
2983
2983
|
<svg aria-hidden="true" class="${Z.spinner}" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -2999,34 +2999,34 @@ class Aa {
|
|
|
2999
2999
|
return this.spinner;
|
|
3000
3000
|
}
|
|
3001
3001
|
}
|
|
3002
|
-
const
|
|
3003
|
-
loader:
|
|
3002
|
+
const rc = "_loader_nwq3e_1", ni = {
|
|
3003
|
+
loader: rc
|
|
3004
3004
|
};
|
|
3005
|
-
class
|
|
3005
|
+
class ic {
|
|
3006
3006
|
constructor() {
|
|
3007
3007
|
b(this, "loader");
|
|
3008
|
-
this.loader = document.createElement("div"), this.loader.classList.add(
|
|
3008
|
+
this.loader = document.createElement("div"), this.loader.classList.add(ni.loader), this.loader.appendChild(new wa().render());
|
|
3009
3009
|
}
|
|
3010
3010
|
setClassName(e) {
|
|
3011
|
-
e ? this.loader.classList.add(e) : this.loader.className =
|
|
3011
|
+
e ? this.loader.classList.add(e) : this.loader.className = ni.loader;
|
|
3012
3012
|
}
|
|
3013
3013
|
render() {
|
|
3014
3014
|
return this.loader;
|
|
3015
3015
|
}
|
|
3016
3016
|
}
|
|
3017
|
-
const
|
|
3018
|
-
checkout:
|
|
3019
|
-
hidden:
|
|
3020
|
-
formInitial:
|
|
3021
|
-
btnsInitial:
|
|
3022
|
-
},
|
|
3023
|
-
buttons:
|
|
3024
|
-
hidden:
|
|
3025
|
-
},
|
|
3026
|
-
applePay:
|
|
3027
|
-
hidden:
|
|
3017
|
+
const ac = "_checkout_5sq3n_1", sc = "_hidden_5sq3n_7", oc = "_formInitial_5sq3n_11", lc = "_btnsInitial_5sq3n_16", le = {
|
|
3018
|
+
checkout: ac,
|
|
3019
|
+
hidden: sc,
|
|
3020
|
+
formInitial: oc,
|
|
3021
|
+
btnsInitial: lc
|
|
3022
|
+
}, cc = "_buttons_1i8cu_1", uc = "_hidden_1i8cu_5", Lt = {
|
|
3023
|
+
buttons: cc,
|
|
3024
|
+
hidden: uc
|
|
3025
|
+
}, dc = "_applePay_1m9xd_1", pc = "_hidden_1m9xd_22", Pt = {
|
|
3026
|
+
applePay: dc,
|
|
3027
|
+
hidden: pc
|
|
3028
3028
|
};
|
|
3029
|
-
class
|
|
3029
|
+
class hc {
|
|
3030
3030
|
constructor(e) {
|
|
3031
3031
|
b(this, "element");
|
|
3032
3032
|
b(this, "events", {
|
|
@@ -3046,7 +3046,7 @@ class pc {
|
|
|
3046
3046
|
return this.element;
|
|
3047
3047
|
}
|
|
3048
3048
|
}
|
|
3049
|
-
const
|
|
3049
|
+
const mc = [
|
|
3050
3050
|
{ type: "paypal", is_active: !0, order: 1 },
|
|
3051
3051
|
{ type: "apple-pay", is_active: !0, order: 2 },
|
|
3052
3052
|
{ type: "google-pay", is_active: !0, order: 3 },
|
|
@@ -3068,13 +3068,13 @@ const hc = [
|
|
|
3068
3068
|
close: { y: -15, opacity: 0, height: 0 },
|
|
3069
3069
|
transition: { duration: 0.5, type: "spring", bounce: 0 }
|
|
3070
3070
|
};
|
|
3071
|
-
function
|
|
3071
|
+
function Ta(n) {
|
|
3072
3072
|
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
3073
3073
|
}
|
|
3074
|
-
var Rt,
|
|
3075
|
-
function
|
|
3076
|
-
if (
|
|
3077
|
-
|
|
3074
|
+
var Rt, ri;
|
|
3075
|
+
function fc() {
|
|
3076
|
+
if (ri) return Rt;
|
|
3077
|
+
ri = 1;
|
|
3078
3078
|
var n = {
|
|
3079
3079
|
visa: {
|
|
3080
3080
|
niceType: "Visa",
|
|
@@ -3269,19 +3269,19 @@ function mc() {
|
|
|
3269
3269
|
};
|
|
3270
3270
|
return Rt = n, Rt;
|
|
3271
3271
|
}
|
|
3272
|
-
var $e = {}, Ze = {},
|
|
3273
|
-
function
|
|
3274
|
-
if (
|
|
3275
|
-
|
|
3272
|
+
var $e = {}, Ze = {}, ii;
|
|
3273
|
+
function Ia() {
|
|
3274
|
+
if (ii) return Ze;
|
|
3275
|
+
ii = 1, Object.defineProperty(Ze, "__esModule", { value: !0 }), Ze.clone = void 0;
|
|
3276
3276
|
function n(e) {
|
|
3277
3277
|
return e ? JSON.parse(JSON.stringify(e)) : null;
|
|
3278
3278
|
}
|
|
3279
3279
|
return Ze.clone = n, Ze;
|
|
3280
3280
|
}
|
|
3281
|
-
var Xe = {},
|
|
3282
|
-
function
|
|
3283
|
-
if (
|
|
3284
|
-
|
|
3281
|
+
var Xe = {}, ai;
|
|
3282
|
+
function vc() {
|
|
3283
|
+
if (ai) return Xe;
|
|
3284
|
+
ai = 1, Object.defineProperty(Xe, "__esModule", { value: !0 }), Xe.matches = void 0;
|
|
3285
3285
|
function n(r, i, a) {
|
|
3286
3286
|
var s = String(i).length, o = r.substr(0, s), l = parseInt(o, 10);
|
|
3287
3287
|
return i = parseInt(String(i).substr(0, o.length), 10), a = parseInt(String(a).substr(0, o.length), 10), l >= i && l <= a;
|
|
@@ -3294,11 +3294,11 @@ function fc() {
|
|
|
3294
3294
|
}
|
|
3295
3295
|
return Xe.matches = t, Xe;
|
|
3296
3296
|
}
|
|
3297
|
-
var
|
|
3298
|
-
function
|
|
3299
|
-
if (
|
|
3300
|
-
|
|
3301
|
-
var n =
|
|
3297
|
+
var si;
|
|
3298
|
+
function gc() {
|
|
3299
|
+
if (si) return $e;
|
|
3300
|
+
si = 1, Object.defineProperty($e, "__esModule", { value: !0 }), $e.addMatchingCardsToResults = void 0;
|
|
3301
|
+
var n = Ia(), e = vc();
|
|
3302
3302
|
function t(r, i, a) {
|
|
3303
3303
|
var s, o;
|
|
3304
3304
|
for (s = 0; s < i.patterns.length; s++) {
|
|
@@ -3312,19 +3312,19 @@ function vc() {
|
|
|
3312
3312
|
}
|
|
3313
3313
|
return $e.addMatchingCardsToResults = t, $e;
|
|
3314
3314
|
}
|
|
3315
|
-
var Je = {},
|
|
3316
|
-
function
|
|
3317
|
-
if (
|
|
3318
|
-
|
|
3315
|
+
var Je = {}, oi;
|
|
3316
|
+
function yc() {
|
|
3317
|
+
if (oi) return Je;
|
|
3318
|
+
oi = 1, Object.defineProperty(Je, "__esModule", { value: !0 }), Je.isValidInputType = void 0;
|
|
3319
3319
|
function n(e) {
|
|
3320
3320
|
return typeof e == "string" || e instanceof String;
|
|
3321
3321
|
}
|
|
3322
3322
|
return Je.isValidInputType = n, Je;
|
|
3323
3323
|
}
|
|
3324
|
-
var et = {},
|
|
3325
|
-
function
|
|
3326
|
-
if (
|
|
3327
|
-
|
|
3324
|
+
var et = {}, li;
|
|
3325
|
+
function bc() {
|
|
3326
|
+
if (li) return et;
|
|
3327
|
+
li = 1, Object.defineProperty(et, "__esModule", { value: !0 }), et.findBestMatch = void 0;
|
|
3328
3328
|
function n(t) {
|
|
3329
3329
|
var r = t.filter(function(i) {
|
|
3330
3330
|
return i.matchStrength;
|
|
@@ -3338,10 +3338,10 @@ function yc() {
|
|
|
3338
3338
|
}
|
|
3339
3339
|
return et.findBestMatch = e, et;
|
|
3340
3340
|
}
|
|
3341
|
-
var tt,
|
|
3342
|
-
function
|
|
3343
|
-
if (
|
|
3344
|
-
|
|
3341
|
+
var tt, ci;
|
|
3342
|
+
function Ec() {
|
|
3343
|
+
if (ci) return tt;
|
|
3344
|
+
ci = 1;
|
|
3345
3345
|
var n = tt && tt.__assign || function() {
|
|
3346
3346
|
return n = Object.assign || function(m) {
|
|
3347
3347
|
for (var f, v = 1, y = arguments.length; v < y; v++) {
|
|
@@ -3350,7 +3350,7 @@ function bc() {
|
|
|
3350
3350
|
}
|
|
3351
3351
|
return m;
|
|
3352
3352
|
}, n.apply(this, arguments);
|
|
3353
|
-
}, e =
|
|
3353
|
+
}, e = fc(), t = gc(), r = yc(), i = bc(), a = Ia(), s = {}, o = {
|
|
3354
3354
|
VISA: "visa",
|
|
3355
3355
|
MASTERCARD: "mastercard",
|
|
3356
3356
|
AMERICAN_EXPRESS: "american-express",
|
|
@@ -3428,24 +3428,24 @@ function bc() {
|
|
|
3428
3428
|
c = (0, a.clone)(l), s = {};
|
|
3429
3429
|
}, p.types = o, tt = p, tt;
|
|
3430
3430
|
}
|
|
3431
|
-
var Me =
|
|
3431
|
+
var Me = Ec();
|
|
3432
3432
|
Me.updateCard("visa", {
|
|
3433
3433
|
lengths: [16]
|
|
3434
3434
|
});
|
|
3435
3435
|
Me.updateCard("unionpay", {
|
|
3436
3436
|
gaps: [4, 8, 12, 16]
|
|
3437
3437
|
});
|
|
3438
|
-
const
|
|
3438
|
+
const _c = (n, e) => {
|
|
3439
3439
|
const t = Me.getTypeInfo(e), r = n.replace(/\D/g, ""), i = (t == null ? void 0 : t.gaps) || [4, 8, 12], a = t ? Math.max(...t.lengths) + i.length : 19, s = [0].concat(i, r.length), o = [];
|
|
3440
3440
|
for (let l = 0; s[l] < r.length; l++) {
|
|
3441
3441
|
const c = s[l], u = Math.min(s[l + 1], r.length);
|
|
3442
3442
|
o.push(r.slice(c, u));
|
|
3443
3443
|
}
|
|
3444
3444
|
return o.join(" ").slice(0, a);
|
|
3445
|
-
},
|
|
3445
|
+
}, Cc = (n, e) => {
|
|
3446
3446
|
const t = Me.getTypeInfo(e), r = (t == null ? void 0 : t.code.size) || 4;
|
|
3447
3447
|
return n.replace(/\D/g, "").slice(0, r);
|
|
3448
|
-
},
|
|
3448
|
+
}, Ac = (n, e) => {
|
|
3449
3449
|
const t = n.replace(/\D/g, "");
|
|
3450
3450
|
let r = t.slice(0, 2);
|
|
3451
3451
|
if (!r) return "";
|
|
@@ -3509,20 +3509,20 @@ const wt = [
|
|
|
3509
3509
|
minLength: 12,
|
|
3510
3510
|
maxLength: 19
|
|
3511
3511
|
}
|
|
3512
|
-
],
|
|
3512
|
+
], Oa = (n) => wt.find((e) => e.pattern.test(n)) || null, ui = (n) => wt.filter((e) => e.pattern.test(n)), wc = (n) => {
|
|
3513
3513
|
let e = 0, t = !1;
|
|
3514
3514
|
for (let r = n.length - 1; r >= 0; r--) {
|
|
3515
3515
|
let i = parseInt(n[r]);
|
|
3516
3516
|
t && (i *= 2, i > 9 && (i -= 9)), e += i, t = !t;
|
|
3517
3517
|
}
|
|
3518
3518
|
return e % 10 === 0;
|
|
3519
|
-
},
|
|
3519
|
+
}, di = (n, e) => {
|
|
3520
3520
|
const t = n.replace(/\D/g, "");
|
|
3521
3521
|
if (!t)
|
|
3522
3522
|
return { isValid: !1, cardType: null, error: oe.Empty };
|
|
3523
3523
|
if (!/^\d+$/.test(t))
|
|
3524
3524
|
return { isValid: !1, cardType: null, error: oe.Invalid };
|
|
3525
|
-
const r =
|
|
3525
|
+
const r = Oa(t);
|
|
3526
3526
|
if (r) {
|
|
3527
3527
|
if (t.length < r.minLength || t.length > r.maxLength)
|
|
3528
3528
|
return {
|
|
@@ -3540,7 +3540,7 @@ const wt = [
|
|
|
3540
3540
|
isValid: !1,
|
|
3541
3541
|
cardType: r.name,
|
|
3542
3542
|
error: "unsupported"
|
|
3543
|
-
} :
|
|
3543
|
+
} : wc(t) ? {
|
|
3544
3544
|
isValid: !0,
|
|
3545
3545
|
cardType: (r == null ? void 0 : r.name) || null,
|
|
3546
3546
|
error: null
|
|
@@ -3549,7 +3549,7 @@ const wt = [
|
|
|
3549
3549
|
cardType: (r == null ? void 0 : r.name) || null,
|
|
3550
3550
|
error: oe.Invalid
|
|
3551
3551
|
};
|
|
3552
|
-
},
|
|
3552
|
+
}, Tc = (n) => {
|
|
3553
3553
|
var e;
|
|
3554
3554
|
return !n || typeof n.amount != "number" || !n.currency || !n.country || !n.merchant_id || n.checkout_config && !((e = n.checkout_config) == null ? void 0 : e.find(
|
|
3555
3555
|
({ is_active: r, type: i }) => r && i === "google-pay"
|
|
@@ -3560,7 +3560,7 @@ const wt = [
|
|
|
3560
3560
|
merchantId: n.merchant_id,
|
|
3561
3561
|
lineItems: []
|
|
3562
3562
|
};
|
|
3563
|
-
},
|
|
3563
|
+
}, Ic = (n) => {
|
|
3564
3564
|
var e, t;
|
|
3565
3565
|
return !n || typeof n.amount != "number" || !n.currency || !n.country || !n.merchant_id || n.checkout_config && !((e = n.checkout_config) == null ? void 0 : e.find(
|
|
3566
3566
|
({ is_active: i, type: a }) => i && a === "apple-pay"
|
|
@@ -3571,7 +3571,7 @@ const wt = [
|
|
|
3571
3571
|
merchantId: n.merchant_id,
|
|
3572
3572
|
lineItems: ((t = n.apple_pay_info) == null ? void 0 : t.line_items) || []
|
|
3573
3573
|
};
|
|
3574
|
-
},
|
|
3574
|
+
}, Oc = (n = []) => n.reduce((e, t) => {
|
|
3575
3575
|
switch (t) {
|
|
3576
3576
|
case pe.Visa:
|
|
3577
3577
|
return e.push("visa"), e;
|
|
@@ -3588,11 +3588,11 @@ const wt = [
|
|
|
3588
3588
|
default:
|
|
3589
3589
|
return e;
|
|
3590
3590
|
}
|
|
3591
|
-
}, []),
|
|
3592
|
-
googlePay:
|
|
3593
|
-
hidden:
|
|
3591
|
+
}, []), Nc = "_googlePay_1j5ka_1", xc = "_hidden_1j5ka_17", St = {
|
|
3592
|
+
googlePay: Nc,
|
|
3593
|
+
hidden: xc
|
|
3594
3594
|
};
|
|
3595
|
-
class
|
|
3595
|
+
class Lc {
|
|
3596
3596
|
constructor(e) {
|
|
3597
3597
|
b(this, "element");
|
|
3598
3598
|
b(this, "events", {
|
|
@@ -3612,11 +3612,11 @@ class xc {
|
|
|
3612
3612
|
return this.element;
|
|
3613
3613
|
}
|
|
3614
3614
|
}
|
|
3615
|
-
const
|
|
3616
|
-
paypal:
|
|
3617
|
-
hidden:
|
|
3615
|
+
const Pc = "_paypal_1al9c_1", Rc = "_hidden_1al9c_8", kt = {
|
|
3616
|
+
paypal: Pc,
|
|
3617
|
+
hidden: Rc
|
|
3618
3618
|
};
|
|
3619
|
-
class
|
|
3619
|
+
class Sc {
|
|
3620
3620
|
constructor(e) {
|
|
3621
3621
|
b(this, "element");
|
|
3622
3622
|
b(this, "events", {
|
|
@@ -3630,7 +3630,7 @@ class Rc {
|
|
|
3630
3630
|
e && (yield this.paypal.init({
|
|
3631
3631
|
clientId: e.clientId,
|
|
3632
3632
|
vault: !0
|
|
3633
|
-
}), yield this.paypal.render(this.element, te(
|
|
3633
|
+
}), yield this.paypal.render(this.element, te(Q({}, e), {
|
|
3634
3634
|
onApprove: (r) => j(this, [r], function* ({ billingToken: t }) {
|
|
3635
3635
|
var i;
|
|
3636
3636
|
(i = e.onSuccess) == null || i.call(e, t || "");
|
|
@@ -3649,7 +3649,7 @@ class Rc {
|
|
|
3649
3649
|
return this.element;
|
|
3650
3650
|
}
|
|
3651
3651
|
}
|
|
3652
|
-
const
|
|
3652
|
+
const kc = (n) => ({
|
|
3653
3653
|
ar: "ar-AB",
|
|
3654
3654
|
en: "en-GB",
|
|
3655
3655
|
cs: "cs-CZ",
|
|
@@ -3678,7 +3678,7 @@ const Sc = (n) => ({
|
|
|
3678
3678
|
tr: "tr-TR",
|
|
3679
3679
|
vi: "vi-VN",
|
|
3680
3680
|
zh: "zh-CN"
|
|
3681
|
-
})[n] || "en-US",
|
|
3681
|
+
})[n] || "en-US", Mc = (n) => ({
|
|
3682
3682
|
en: "en",
|
|
3683
3683
|
ar: "ar",
|
|
3684
3684
|
cs: "cs",
|
|
@@ -3703,7 +3703,7 @@ const Sc = (n) => ({
|
|
|
3703
3703
|
tr: "tr",
|
|
3704
3704
|
zh: "zh"
|
|
3705
3705
|
})[n] || "en";
|
|
3706
|
-
class
|
|
3706
|
+
class Dc {
|
|
3707
3707
|
constructor() {
|
|
3708
3708
|
b(this, "template", `
|
|
3709
3709
|
<svg
|
|
@@ -3728,14 +3728,14 @@ class Mc {
|
|
|
3728
3728
|
return this.element;
|
|
3729
3729
|
}
|
|
3730
3730
|
}
|
|
3731
|
-
const
|
|
3732
|
-
button:
|
|
3733
|
-
press:
|
|
3731
|
+
const Vc = "_button_1br9w_1", Fc = "_press_1br9w_21", yt = {
|
|
3732
|
+
button: Vc,
|
|
3733
|
+
press: Fc
|
|
3734
3734
|
};
|
|
3735
|
-
class
|
|
3735
|
+
class Uc {
|
|
3736
3736
|
constructor(e) {
|
|
3737
3737
|
b(this, "element");
|
|
3738
|
-
b(this, "icon", new
|
|
3738
|
+
b(this, "icon", new Dc());
|
|
3739
3739
|
this.element = document.createElement("button"), this.element.classList.add(yt.button);
|
|
3740
3740
|
const t = document.createElement("span");
|
|
3741
3741
|
t.textContent = e.getState().messages.card.compact.button, this.element.append(this.icon.render(), t), this.element.addEventListener("mousedown", () => this.element.classList.add(yt.press)), this.element.addEventListener("mouseup", () => this.element.classList.remove(yt.press)), this.element.addEventListener("mouseout", () => this.element.classList.remove(yt.press)), e.subscribe(({ messages: r }) => {
|
|
@@ -3749,11 +3749,11 @@ class Fc {
|
|
|
3749
3749
|
return this.element;
|
|
3750
3750
|
}
|
|
3751
3751
|
}
|
|
3752
|
-
const
|
|
3753
|
-
develop: "https://api-dev.paynext.com
|
|
3754
|
-
sandbox: "https://api-sandbox.paynext.com
|
|
3755
|
-
production: "https://api.paynext.com
|
|
3756
|
-
})[n],
|
|
3752
|
+
const Bc = (n, e, t) => e.concat(n.filter((r) => e.every((i) => !t(r, i)))), _n = (n = "sandbox") => ({
|
|
3753
|
+
develop: "https://api-dev.paynext.com",
|
|
3754
|
+
sandbox: "https://api-sandbox.paynext.com",
|
|
3755
|
+
production: "https://api.paynext.com"
|
|
3756
|
+
})[n], zc = [
|
|
3757
3757
|
{
|
|
3758
3758
|
type: "paypal",
|
|
3759
3759
|
order: 1,
|
|
@@ -3774,86 +3774,87 @@ const Uc = (n, e, t) => e.concat(n.filter((r) => e.every((i) => !t(r, i)))), _n
|
|
|
3774
3774
|
order: 4,
|
|
3775
3775
|
is_active: !0
|
|
3776
3776
|
}
|
|
3777
|
-
],
|
|
3778
|
-
var
|
|
3779
|
-
const
|
|
3780
|
-
return
|
|
3777
|
+
], jc = (n, e, t) => j(void 0, null, function* () {
|
|
3778
|
+
var o, l, c, u, d, h, p, m, f, v, y, w, T, x, A, I, L, k, B, G, q, M, F, K, J, S, W, z, g, E, R, U, _, O, C, P, V, N, H, X, re, D, ee, me, ze, je, Ke, qe, He, We, Ge, Ye, Qe, An, wn, Tn, In, On, Nn, xn, Ln, Pn, Rn, Sn, kn, Mn, Dn, Vn, Fn, Un, Bn, zn, jn, Kn, qn, Hn, Wn, Gn, Yn, Qn, $n, Zn, Xn, Jn, er, tr, nr, rr, ir, ar, sr, or, lr, cr, ur, dr, pr, hr, mr, fr, vr, gr, yr, br, Er, _r, Cr, Ar, wr, Tr, Ir, Or;
|
|
3779
|
+
const r = `${_n(e)}/payments/create`, i = new Headers();
|
|
3780
|
+
return i.append("Content-Type", "application/json"), i.append("X-API-Version", t), yield (yield fetch(r, {
|
|
3781
3781
|
method: "POST",
|
|
3782
|
-
headers:
|
|
3782
|
+
headers: i,
|
|
3783
3783
|
body: JSON.stringify({
|
|
3784
3784
|
client_session: n.clientSession,
|
|
3785
3785
|
three_ds_session_id: n.threeDsSessionId,
|
|
3786
3786
|
type: n.googlePay ? "GPAY" : n.applePay ? "APPLEPAY" : n.paypal ? "PAYPAL" : "CARD",
|
|
3787
|
-
name: (
|
|
3788
|
-
phone: (
|
|
3787
|
+
name: (l = (o = n.applePay) == null ? void 0 : o.billingContact) != null && l.givenName ? ((h = (d = n.applePay) == null ? void 0 : d.billingContact) == null ? void 0 : h.givenName) + " " + ((m = (p = n.applePay) == null ? void 0 : p.billingContact) == null ? void 0 : m.familyName) : (u = (c = n.card) == null ? void 0 : c.metadata) == null ? void 0 : u.name,
|
|
3788
|
+
phone: (v = (f = n.applePay) == null ? void 0 : f.shippingContact) == null ? void 0 : v.phoneNumber,
|
|
3789
3789
|
billing_address: n.applePay || n.googlePay ? {
|
|
3790
|
-
city: ((
|
|
3791
|
-
country: ((
|
|
3792
|
-
line1: ((
|
|
3793
|
-
line2: ((
|
|
3794
|
-
postal_code: ((
|
|
3795
|
-
state: ((
|
|
3790
|
+
city: ((w = (y = n.applePay) == null ? void 0 : y.billingContact) == null ? void 0 : w.locality) || ((x = (T = n == null ? void 0 : n.googlePay) == null ? void 0 : T.billingAddress) == null ? void 0 : x.locality) || void 0,
|
|
3791
|
+
country: ((I = (A = n.applePay) == null ? void 0 : A.billingContact) == null ? void 0 : I.countryCode) || ((k = (L = n == null ? void 0 : n.googlePay) == null ? void 0 : L.billingAddress) == null ? void 0 : k.countryCode) || void 0,
|
|
3792
|
+
line1: ((q = (G = (B = n.applePay) == null ? void 0 : B.billingContact) == null ? void 0 : G.addressLines) == null ? void 0 : q.at(0)) || ((F = (M = n == null ? void 0 : n.googlePay) == null ? void 0 : M.billingAddress) == null ? void 0 : F.address1) || void 0,
|
|
3793
|
+
line2: ((S = (J = (K = n.applePay) == null ? void 0 : K.billingContact) == null ? void 0 : J.addressLines) == null ? void 0 : S.at(1)) || ((z = (W = n == null ? void 0 : n.googlePay) == null ? void 0 : W.billingAddress) == null ? void 0 : z.address2) || void 0,
|
|
3794
|
+
postal_code: ((E = (g = n.applePay) == null ? void 0 : g.billingContact) == null ? void 0 : E.postalCode) || ((U = (R = n == null ? void 0 : n.googlePay) == null ? void 0 : R.billingAddress) == null ? void 0 : U.postalCode) || void 0,
|
|
3795
|
+
state: ((O = (_ = n.applePay) == null ? void 0 : _.billingContact) == null ? void 0 : O.administrativeArea) || ((P = (C = n == null ? void 0 : n.googlePay) == null ? void 0 : C.billingAddress) == null ? void 0 : P.administrativeArea) || void 0
|
|
3796
3796
|
} : void 0,
|
|
3797
|
-
card: n.card || (
|
|
3798
|
-
bin: (
|
|
3797
|
+
card: n.card || (V = n.googlePay) != null && V.card || (N = n.applePay) != null && N.card ? {
|
|
3798
|
+
bin: (H = n.card) == null ? void 0 : H.firstSixDigits,
|
|
3799
3799
|
bin_data: {
|
|
3800
|
-
brand: ((
|
|
3801
|
-
country: ((
|
|
3802
|
-
currency_code: ((
|
|
3803
|
-
funding: ((
|
|
3804
|
-
issuer: ((
|
|
3805
|
-
type: ((
|
|
3800
|
+
brand: ((X = n.card) == null ? void 0 : X.cardBrand) || ((D = (re = n.googlePay) == null ? void 0 : re.card) == null ? void 0 : D.brand) || ((me = (ee = n.applePay) == null ? void 0 : ee.card) == null ? void 0 : me.brand),
|
|
3801
|
+
country: ((ze = n.card) == null ? void 0 : ze.country) || ((Ke = (je = n.googlePay) == null ? void 0 : je.card) == null ? void 0 : Ke.country) || ((He = (qe = n.applePay) == null ? void 0 : qe.card) == null ? void 0 : He.country),
|
|
3802
|
+
currency_code: ((We = n.card) == null ? void 0 : We.currency) || ((Ye = (Ge = n.googlePay) == null ? void 0 : Ge.card) == null ? void 0 : Ye.currency) || ((An = (Qe = n.applePay) == null ? void 0 : Qe.card) == null ? void 0 : An.currency),
|
|
3803
|
+
funding: ((wn = n.card) == null ? void 0 : wn.funding) || ((In = (Tn = n.googlePay) == null ? void 0 : Tn.card) == null ? void 0 : In.funding) || ((Nn = (On = n.applePay) == null ? void 0 : On.card) == null ? void 0 : Nn.funding),
|
|
3804
|
+
issuer: ((xn = n.card) == null ? void 0 : xn.issuer) || ((Pn = (Ln = n.googlePay) == null ? void 0 : Ln.card) == null ? void 0 : Pn.issuer) || ((Sn = (Rn = n.applePay) == null ? void 0 : Rn.card) == null ? void 0 : Sn.issuer),
|
|
3805
|
+
type: ((kn = n.card) == null ? void 0 : kn.type) || ((Dn = (Mn = n.googlePay) == null ? void 0 : Mn.card) == null ? void 0 : Dn.segment) || ((Fn = (Vn = n.applePay) == null ? void 0 : Vn.card) == null ? void 0 : Fn.segment)
|
|
3806
3806
|
},
|
|
3807
|
-
cvc: (
|
|
3808
|
-
exp_month: (
|
|
3809
|
-
exp_year: (
|
|
3810
|
-
last4: ((
|
|
3811
|
-
number: ((
|
|
3807
|
+
cvc: (Un = n.card) == null ? void 0 : Un.cvc,
|
|
3808
|
+
exp_month: (Bn = n.card) != null && Bn.expMonth || (jn = (zn = n.googlePay) == null ? void 0 : zn.card) != null && jn.expiry.month ? Number(((Kn = n.card) == null ? void 0 : Kn.expMonth) || ((Hn = (qn = n.googlePay) == null ? void 0 : qn.card) == null ? void 0 : Hn.expiry.month)) : void 0,
|
|
3809
|
+
exp_year: (Wn = n.card) != null && Wn.expYear || (Yn = (Gn = n.googlePay) == null ? void 0 : Gn.card) != null && Yn.expiry.year ? Number(((Qn = n.card) == null ? void 0 : Qn.expYear) || ((Zn = ($n = n.googlePay) == null ? void 0 : $n.card) == null ? void 0 : Zn.expiry.year)) : void 0,
|
|
3810
|
+
last4: ((Xn = n.card) == null ? void 0 : Xn.lastFourDigits) || ((er = (Jn = n.googlePay) == null ? void 0 : Jn.card) == null ? void 0 : er.lastFour) || ((nr = (tr = n.applePay) == null ? void 0 : tr.card) == null ? void 0 : nr.lastFour),
|
|
3811
|
+
number: ((rr = n.card) == null ? void 0 : rr.number) || ((ar = (ir = n.googlePay) == null ? void 0 : ir.card) == null ? void 0 : ar.number)
|
|
3812
3812
|
} : void 0,
|
|
3813
|
-
paypal: (
|
|
3813
|
+
paypal: (sr = n.paypal) != null && sr.billing_agreement_token.paypalId ? { billing_agreement_token: (or = n.paypal) == null ? void 0 : or.billing_agreement_token.paypalId } : void 0,
|
|
3814
3814
|
google_pay: n.googlePay && n.googlePay.token ? {
|
|
3815
3815
|
cryptogram: n.googlePay.cryptogram,
|
|
3816
3816
|
eci: n.googlePay.eci,
|
|
3817
|
-
exp_month: (
|
|
3818
|
-
exp_year: (
|
|
3819
|
-
token: (
|
|
3820
|
-
token_service_provider: (
|
|
3817
|
+
exp_month: (cr = (lr = n.googlePay) == null ? void 0 : lr.card) != null && cr.expiry.month || (ur = n.googlePay) != null && ur.token.expiry.month ? Number(n.googlePay.card.expiry.month || n.googlePay.token.expiry.month) : void 0,
|
|
3818
|
+
exp_year: (pr = (dr = n.googlePay) == null ? void 0 : dr.card) != null && pr.expiry.year || (hr = n.googlePay) != null && hr.token.expiry.year ? Number(n.googlePay.card.expiry.year || n.googlePay.token.expiry.year) : void 0,
|
|
3819
|
+
token: (fr = (mr = n.googlePay) == null ? void 0 : mr.token) == null ? void 0 : fr.number,
|
|
3820
|
+
token_service_provider: (gr = (vr = n.googlePay) == null ? void 0 : vr.token) == null ? void 0 : gr.tokenServiceProvider
|
|
3821
3821
|
} : void 0,
|
|
3822
3822
|
apple_pay: n.applePay ? {
|
|
3823
3823
|
cryptogram: n.applePay.cryptogram,
|
|
3824
3824
|
eci: n.applePay.eci,
|
|
3825
|
-
exp_month: (
|
|
3826
|
-
exp_year: (
|
|
3827
|
-
token: (
|
|
3828
|
-
token_service_provider: (
|
|
3825
|
+
exp_month: (Er = (br = (yr = n.applePay) == null ? void 0 : yr.networkToken) == null ? void 0 : br.expiry) != null && Er.month ? Number(n.applePay.networkToken.expiry.month) : void 0,
|
|
3826
|
+
exp_year: (Ar = (Cr = (_r = n.applePay) == null ? void 0 : _r.networkToken) == null ? void 0 : Cr.expiry) != null && Ar.year ? Number(n.applePay.networkToken.expiry.year) : void 0,
|
|
3827
|
+
token: (Tr = (wr = n.applePay) == null ? void 0 : wr.networkToken) == null ? void 0 : Tr.number,
|
|
3828
|
+
token_service_provider: (Or = (Ir = n.applePay) == null ? void 0 : Ir.networkToken) == null ? void 0 : Or.tokenServiceProvider
|
|
3829
3829
|
} : void 0,
|
|
3830
|
-
// ToDo: add braintree
|
|
3831
3830
|
braintree: n.braintree ? {
|
|
3832
3831
|
payment_method_nonce: n.braintree.nonce
|
|
3833
3832
|
} : void 0
|
|
3834
3833
|
})
|
|
3835
3834
|
})).json();
|
|
3836
|
-
}),
|
|
3837
|
-
const
|
|
3838
|
-
return
|
|
3835
|
+
}), Kc = (n, e, t) => j(void 0, null, function* () {
|
|
3836
|
+
const r = `${_n(e)}/payments/create/billing/agreement`, i = new Headers();
|
|
3837
|
+
return i.append("Content-Type", "application/json"), i.append("X-API-Version", t), (yield (yield fetch(r, {
|
|
3839
3838
|
method: "POST",
|
|
3840
|
-
headers:
|
|
3839
|
+
headers: i,
|
|
3841
3840
|
body: JSON.stringify({ client_session: n })
|
|
3842
3841
|
})).json()).paypal_agreement_token_response.token_id || "";
|
|
3843
|
-
}),
|
|
3844
|
-
const
|
|
3845
|
-
|
|
3842
|
+
}), qc = (n, e, t) => j(void 0, null, function* () {
|
|
3843
|
+
const r = `${_n(e)}/payments/config?client_session_id=${n}`, i = new Headers();
|
|
3844
|
+
i.append("X-API-Version", t);
|
|
3845
|
+
const s = yield (yield fetch(r, { headers: i })).json();
|
|
3846
|
+
return s.checkout_config || (s.checkout_config = zc), s;
|
|
3846
3847
|
});
|
|
3847
|
-
var
|
|
3848
|
-
const
|
|
3849
|
-
venmo:
|
|
3850
|
-
hidden:
|
|
3851
|
-
},
|
|
3848
|
+
var Na = /* @__PURE__ */ ((n) => (n.Card = "CARD", n))(Na || {});
|
|
3849
|
+
const Hc = "_venmo_10t25_1", Wc = "_hidden_10t25_17", Mt = {
|
|
3850
|
+
venmo: Hc,
|
|
3851
|
+
hidden: Wc
|
|
3852
|
+
}, Gc = {
|
|
3852
3853
|
display: "block",
|
|
3853
3854
|
height: 40,
|
|
3854
3855
|
borderRadius: 12
|
|
3855
3856
|
};
|
|
3856
|
-
class
|
|
3857
|
+
class Yc {
|
|
3857
3858
|
constructor(e) {
|
|
3858
3859
|
b(this, "isProcessing", !1);
|
|
3859
3860
|
b(this, "element");
|
|
@@ -3871,7 +3872,10 @@ class Gc {
|
|
|
3871
3872
|
try {
|
|
3872
3873
|
if (yield this.braintree.init({
|
|
3873
3874
|
authorization: e.authorization
|
|
3874
|
-
}), yield this.braintree.createVenmo(
|
|
3875
|
+
}), yield this.braintree.createVenmo({
|
|
3876
|
+
// ToDo: change to production url
|
|
3877
|
+
deepLinkReturnUrl: "https://payment-staging.paynext.com"
|
|
3878
|
+
}), !this.braintree.isBrowserSupported()) {
|
|
3875
3879
|
console.log("Browser does not support Venmo"), this.handleVenmoError(new Error("Browser does not support Venmo"));
|
|
3876
3880
|
return;
|
|
3877
3881
|
}
|
|
@@ -3888,7 +3892,7 @@ class Gc {
|
|
|
3888
3892
|
}
|
|
3889
3893
|
// display venmo button
|
|
3890
3894
|
displayVenmoButton(e) {
|
|
3891
|
-
Object.assign(this.venmoButton.style,
|
|
3895
|
+
Object.assign(this.venmoButton.style, Gc), this.venmoButton.addEventListener("click", () => j(this, null, function* () {
|
|
3892
3896
|
if (!this.isProcessing) {
|
|
3893
3897
|
this.isProcessing = !0, this.venmoButton.disabled = !0;
|
|
3894
3898
|
try {
|
|
@@ -3932,7 +3936,7 @@ class Gc {
|
|
|
3932
3936
|
return this.element;
|
|
3933
3937
|
}
|
|
3934
3938
|
}
|
|
3935
|
-
class
|
|
3939
|
+
class Qc {
|
|
3936
3940
|
constructor(e) {
|
|
3937
3941
|
b(this, "isAppleReady", !0);
|
|
3938
3942
|
b(this, "isGoogleReady", !0);
|
|
@@ -3951,7 +3955,7 @@ class Yc {
|
|
|
3951
3955
|
cancel: new ce(),
|
|
3952
3956
|
success: new ce()
|
|
3953
3957
|
});
|
|
3954
|
-
this.config = e, this.applePay = new
|
|
3958
|
+
this.config = e, this.applePay = new hc(e.service.ev), this.paypal = new Sc(e.service.paypal), this.googlePay = new Lc(e.service.ev), this.braintree = new Yc(e.service.braintree), this.card = new Uc(e.state.translate), this.buttons = document.createElement("div"), this.buttons.classList.add(Lt.buttons, Lt.hidden);
|
|
3955
3959
|
}
|
|
3956
3960
|
// init
|
|
3957
3961
|
init() {
|
|
@@ -3969,17 +3973,17 @@ class Yc {
|
|
|
3969
3973
|
initApple() {
|
|
3970
3974
|
return j(this, null, function* () {
|
|
3971
3975
|
this.isAppleReady = !1, this.buttons.appendChild(this.applePay.render());
|
|
3972
|
-
const e = this.config.state.transaction.getState(), { locale: t, supportedCardTypes: r } = this.config.state.checkout.getState(), i =
|
|
3976
|
+
const e = this.config.state.transaction.getState(), { locale: t, supportedCardTypes: r } = this.config.state.checkout.getState(), i = Ic(e);
|
|
3973
3977
|
try {
|
|
3974
3978
|
if (!i)
|
|
3975
3979
|
return;
|
|
3976
3980
|
yield this.applePay.init({
|
|
3977
3981
|
transaction: i,
|
|
3978
|
-
supportedCardTypes:
|
|
3979
|
-
locale:
|
|
3982
|
+
supportedCardTypes: Oc(r),
|
|
3983
|
+
locale: kc(t || "en"),
|
|
3980
3984
|
onError: () => this.events.error.emit(),
|
|
3981
3985
|
onCancel: () => this.events.cancel.emit(),
|
|
3982
|
-
onSuccess: (a) => this.events.success.emit(te(
|
|
3986
|
+
onSuccess: (a) => this.events.success.emit(te(Q({}, a), { type: "apple" }))
|
|
3983
3987
|
});
|
|
3984
3988
|
} catch (a) {
|
|
3985
3989
|
console.error(a);
|
|
@@ -3992,16 +3996,16 @@ class Yc {
|
|
|
3992
3996
|
initGoogle() {
|
|
3993
3997
|
return j(this, null, function* () {
|
|
3994
3998
|
this.isGoogleReady = !1, this.buttons.appendChild(this.googlePay.render());
|
|
3995
|
-
const e = this.config.state.transaction.getState(), { locale: t } = this.config.state.checkout.getState(), r =
|
|
3999
|
+
const e = this.config.state.transaction.getState(), { locale: t } = this.config.state.checkout.getState(), r = Tc(e);
|
|
3996
4000
|
try {
|
|
3997
4001
|
if (!r)
|
|
3998
4002
|
return;
|
|
3999
4003
|
yield this.googlePay.init({
|
|
4000
4004
|
transaction: r,
|
|
4001
|
-
locale:
|
|
4005
|
+
locale: Mc(t || "en"),
|
|
4002
4006
|
onError: () => this.events.error.emit(),
|
|
4003
4007
|
onCancel: () => this.events.cancel.emit(),
|
|
4004
|
-
onSuccess: (i) => this.events.success.emit(te(
|
|
4008
|
+
onSuccess: (i) => this.events.success.emit(te(Q({}, i), { type: "google" }))
|
|
4005
4009
|
});
|
|
4006
4010
|
} catch (i) {
|
|
4007
4011
|
console.error(i);
|
|
@@ -4016,7 +4020,7 @@ class Yc {
|
|
|
4016
4020
|
var i, a;
|
|
4017
4021
|
this.isPayPalReady = !1, this.buttons.appendChild(this.paypal.render());
|
|
4018
4022
|
const e = this.config.state.transaction.getState(), t = this.config.state.checkout.getState(), r = () => j(this, null, function* () {
|
|
4019
|
-
return yield
|
|
4023
|
+
return yield Kc(t.clientToken, t.environment, t.apiVersion);
|
|
4020
4024
|
});
|
|
4021
4025
|
try {
|
|
4022
4026
|
if (!e)
|
|
@@ -4051,7 +4055,7 @@ class Yc {
|
|
|
4051
4055
|
authorization: ((t = e == null ? void 0 : e.brain_tree_info) == null ? void 0 : t.client_token) || "",
|
|
4052
4056
|
onError: () => this.events.error.emit(),
|
|
4053
4057
|
onCancel: () => this.events.cancel.emit(),
|
|
4054
|
-
onSuccess: (r) => this.events.success.emit({ nonce: r.nonce, type: "
|
|
4058
|
+
onSuccess: (r) => this.events.success.emit({ nonce: r.nonce, type: "venmo" })
|
|
4055
4059
|
});
|
|
4056
4060
|
} catch (r) {
|
|
4057
4061
|
console.error(r);
|
|
@@ -4069,7 +4073,7 @@ class Yc {
|
|
|
4069
4073
|
// init payment methods
|
|
4070
4074
|
initPaymentMethods() {
|
|
4071
4075
|
return j(this, null, function* () {
|
|
4072
|
-
const e = this.config.state.transaction.getState(), r =
|
|
4076
|
+
const e = this.config.state.transaction.getState(), r = Bc(mc, (e == null ? void 0 : e.checkout_config) || [], (i, a) => i.type === a.type).filter(({ is_active: i }) => i).sort((i, a) => i.order - a.order).map(({ type: i }) => {
|
|
4073
4077
|
switch (i) {
|
|
4074
4078
|
case "apple-pay":
|
|
4075
4079
|
return this.initApple();
|
|
@@ -4077,7 +4081,7 @@ class Yc {
|
|
|
4077
4081
|
return this.initGoogle();
|
|
4078
4082
|
case "paypal":
|
|
4079
4083
|
return this.initPayPal();
|
|
4080
|
-
case "
|
|
4084
|
+
case "venmo":
|
|
4081
4085
|
return this.initBraintreeVenmo();
|
|
4082
4086
|
case "card":
|
|
4083
4087
|
return this.initCard();
|
|
@@ -4105,7 +4109,7 @@ class Yc {
|
|
|
4105
4109
|
return this.buttons;
|
|
4106
4110
|
}
|
|
4107
4111
|
}
|
|
4108
|
-
class
|
|
4112
|
+
class $c {
|
|
4109
4113
|
constructor() {
|
|
4110
4114
|
b(this, "template", `
|
|
4111
4115
|
<svg
|
|
@@ -4131,14 +4135,14 @@ class Qc {
|
|
|
4131
4135
|
return this.element;
|
|
4132
4136
|
}
|
|
4133
4137
|
}
|
|
4134
|
-
const
|
|
4135
|
-
button:
|
|
4138
|
+
const Zc = "_button_125my_1", Xc = {
|
|
4139
|
+
button: Zc
|
|
4136
4140
|
};
|
|
4137
|
-
class
|
|
4141
|
+
class Jc {
|
|
4138
4142
|
constructor() {
|
|
4139
4143
|
b(this, "element");
|
|
4140
|
-
b(this, "icon", new
|
|
4141
|
-
this.element = document.createElement("div"), this.element.classList.add(
|
|
4144
|
+
b(this, "icon", new $c());
|
|
4145
|
+
this.element = document.createElement("div"), this.element.classList.add(Xc.button), this.element.appendChild(this.icon.render());
|
|
4142
4146
|
}
|
|
4143
4147
|
addEventListener(e) {
|
|
4144
4148
|
return this.element.addEventListener("click", e);
|
|
@@ -4147,17 +4151,17 @@ class Xc {
|
|
|
4147
4151
|
return this.element;
|
|
4148
4152
|
}
|
|
4149
4153
|
}
|
|
4150
|
-
const
|
|
4151
|
-
button:
|
|
4152
|
-
disabled:
|
|
4153
|
-
press:
|
|
4154
|
-
hidden:
|
|
4155
|
-
spinner:
|
|
4154
|
+
const eu = "_button_rx9be_1", tu = "_disabled_rx9be_17", nu = "_press_rx9be_22", ru = "_hidden_rx9be_26", iu = "_spinner_rx9be_30", be = {
|
|
4155
|
+
button: eu,
|
|
4156
|
+
disabled: tu,
|
|
4157
|
+
press: nu,
|
|
4158
|
+
hidden: ru,
|
|
4159
|
+
spinner: iu
|
|
4156
4160
|
};
|
|
4157
|
-
class
|
|
4161
|
+
class au {
|
|
4158
4162
|
constructor(e) {
|
|
4159
4163
|
b(this, "element");
|
|
4160
|
-
b(this, "spinner", new
|
|
4164
|
+
b(this, "spinner", new wa());
|
|
4161
4165
|
b(this, "message", document.createElement("span"));
|
|
4162
4166
|
this.element = document.createElement("button"), this.element.classList.add(be.button), this.spinner.addClass(be.spinner), this.spinner.addClass(be.hidden), this.message.textContent = e.messages().card.pay.button, this.element.append(this.spinner.render(), this.message), this.element.addEventListener("mousedown", () => this.element.classList.add(be.press)), this.element.addEventListener("mouseup", () => this.element.classList.remove(be.press)), this.element.addEventListener("mouseout", () => this.element.classList.remove(be.press)), e.subscribe((t) => {
|
|
4163
4167
|
this.message.textContent = t.messages.card.pay.button;
|
|
@@ -4173,19 +4177,19 @@ class iu {
|
|
|
4173
4177
|
return this.element;
|
|
4174
4178
|
}
|
|
4175
4179
|
}
|
|
4176
|
-
const
|
|
4177
|
-
cardForm:
|
|
4178
|
-
hidden:
|
|
4179
|
-
},
|
|
4180
|
-
wrapper:
|
|
4181
|
-
inputContainer:
|
|
4182
|
-
input:
|
|
4183
|
-
errorInput:
|
|
4184
|
-
label:
|
|
4185
|
-
labelError:
|
|
4186
|
-
disabled:
|
|
4187
|
-
disabledInput:
|
|
4188
|
-
hidden:
|
|
4180
|
+
const su = "_cardForm_isqbi_1", ou = "_hidden_isqbi_5", bt = {
|
|
4181
|
+
cardForm: su,
|
|
4182
|
+
hidden: ou
|
|
4183
|
+
}, lu = "_wrapper_4knhb_1", cu = "_inputContainer_4knhb_5", uu = "_input_4knhb_5", du = "_errorInput_4knhb_24", pu = "_label_4knhb_28", hu = "_labelError_4knhb_32", mu = "_disabled_4knhb_36", fu = "_disabledInput_4knhb_40", vu = "_hidden_4knhb_47", ae = {
|
|
4184
|
+
wrapper: lu,
|
|
4185
|
+
inputContainer: cu,
|
|
4186
|
+
input: uu,
|
|
4187
|
+
errorInput: du,
|
|
4188
|
+
label: pu,
|
|
4189
|
+
labelError: hu,
|
|
4190
|
+
disabled: mu,
|
|
4191
|
+
disabledInput: fu,
|
|
4192
|
+
hidden: vu
|
|
4189
4193
|
};
|
|
4190
4194
|
class Cn {
|
|
4191
4195
|
constructor() {
|
|
@@ -4208,7 +4212,7 @@ class Cn {
|
|
|
4208
4212
|
return this.element;
|
|
4209
4213
|
}
|
|
4210
4214
|
}
|
|
4211
|
-
class
|
|
4215
|
+
class gu {
|
|
4212
4216
|
constructor(e) {
|
|
4213
4217
|
b(this, "id", "paynext-card-input-name");
|
|
4214
4218
|
b(this, "element");
|
|
@@ -4270,20 +4274,20 @@ class vu {
|
|
|
4270
4274
|
return this.toggleLabelError(r), this.isDisabled ? (this.inputContainer.classList.add(ae.disabled), this.input.classList.add(ae.disabledInput)) : (this.inputContainer.classList.remove(ae.disabled), this.input.classList.remove(ae.disabledInput)), this.element;
|
|
4271
4275
|
}
|
|
4272
4276
|
}
|
|
4273
|
-
const
|
|
4274
|
-
wrapper:
|
|
4275
|
-
inputContainer:
|
|
4276
|
-
input:
|
|
4277
|
-
endContent:
|
|
4278
|
-
errorInput:
|
|
4279
|
-
error:
|
|
4280
|
-
label:
|
|
4281
|
-
labelError:
|
|
4282
|
-
disabled:
|
|
4283
|
-
disabledInput:
|
|
4284
|
-
hidden:
|
|
4277
|
+
const yu = "_wrapper_j8wuo_1", bu = "_inputContainer_j8wuo_5", Eu = "_input_j8wuo_5", _u = "_endContent_j8wuo_20", Cu = "_errorInput_j8wuo_24", Au = "_error_j8wuo_24", wu = "_label_j8wuo_32", Tu = "_labelError_j8wuo_36", Iu = "_disabled_j8wuo_40", Ou = "_disabledInput_j8wuo_44", Nu = "_hidden_j8wuo_51", ne = {
|
|
4278
|
+
wrapper: yu,
|
|
4279
|
+
inputContainer: bu,
|
|
4280
|
+
input: Eu,
|
|
4281
|
+
endContent: _u,
|
|
4282
|
+
errorInput: Cu,
|
|
4283
|
+
error: Au,
|
|
4284
|
+
label: wu,
|
|
4285
|
+
labelError: Tu,
|
|
4286
|
+
disabled: Iu,
|
|
4287
|
+
disabledInput: Ou,
|
|
4288
|
+
hidden: Nu
|
|
4285
4289
|
};
|
|
4286
|
-
class
|
|
4290
|
+
class xu {
|
|
4287
4291
|
constructor() {
|
|
4288
4292
|
b(this, "template", `
|
|
4289
4293
|
<svg
|
|
@@ -4321,7 +4325,7 @@ class Nu {
|
|
|
4321
4325
|
return this.element;
|
|
4322
4326
|
}
|
|
4323
4327
|
}
|
|
4324
|
-
class
|
|
4328
|
+
class Lu {
|
|
4325
4329
|
constructor() {
|
|
4326
4330
|
b(this, "template", `
|
|
4327
4331
|
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16' class='${Z.svg}'>
|
|
@@ -4358,7 +4362,7 @@ class xu {
|
|
|
4358
4362
|
return this.element;
|
|
4359
4363
|
}
|
|
4360
4364
|
}
|
|
4361
|
-
class
|
|
4365
|
+
class Pu {
|
|
4362
4366
|
constructor() {
|
|
4363
4367
|
b(this, "template", `
|
|
4364
4368
|
<svg
|
|
@@ -4408,7 +4412,7 @@ class Lu {
|
|
|
4408
4412
|
return this.element;
|
|
4409
4413
|
}
|
|
4410
4414
|
}
|
|
4411
|
-
class
|
|
4415
|
+
class Ru {
|
|
4412
4416
|
constructor() {
|
|
4413
4417
|
b(this, "template", `
|
|
4414
4418
|
<svg
|
|
@@ -4463,7 +4467,7 @@ class Pu {
|
|
|
4463
4467
|
return this.element;
|
|
4464
4468
|
}
|
|
4465
4469
|
}
|
|
4466
|
-
class
|
|
4470
|
+
class Su {
|
|
4467
4471
|
constructor() {
|
|
4468
4472
|
b(this, "template", `
|
|
4469
4473
|
<svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 23 16' width='23' class='${Z.svg}'>
|
|
@@ -4503,7 +4507,7 @@ class Ru {
|
|
|
4503
4507
|
return this.element;
|
|
4504
4508
|
}
|
|
4505
4509
|
}
|
|
4506
|
-
class
|
|
4510
|
+
class ku {
|
|
4507
4511
|
constructor() {
|
|
4508
4512
|
b(this, "template", `
|
|
4509
4513
|
<svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 24 16' width='24' class='${Z.svg}'>
|
|
@@ -4526,7 +4530,7 @@ class Su {
|
|
|
4526
4530
|
return this.element;
|
|
4527
4531
|
}
|
|
4528
4532
|
}
|
|
4529
|
-
class
|
|
4533
|
+
class Mu {
|
|
4530
4534
|
constructor() {
|
|
4531
4535
|
b(this, "template", `
|
|
4532
4536
|
<svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 24 16' width='24' class='${Z.svg}'>
|
|
@@ -4558,7 +4562,7 @@ class ku {
|
|
|
4558
4562
|
return this.element;
|
|
4559
4563
|
}
|
|
4560
4564
|
}
|
|
4561
|
-
class
|
|
4565
|
+
class Du {
|
|
4562
4566
|
constructor() {
|
|
4563
4567
|
b(this, "template", `
|
|
4564
4568
|
<svg
|
|
@@ -4607,7 +4611,7 @@ class Mu {
|
|
|
4607
4611
|
return this.element;
|
|
4608
4612
|
}
|
|
4609
4613
|
}
|
|
4610
|
-
class
|
|
4614
|
+
class Vu {
|
|
4611
4615
|
constructor(e) {
|
|
4612
4616
|
b(this, "id", "paynext-card-input-number");
|
|
4613
4617
|
b(this, "initialCardTypes", wt.map((e) => e.type));
|
|
@@ -4619,14 +4623,14 @@ class Du {
|
|
|
4619
4623
|
b(this, "labelError", document.createElement("span"));
|
|
4620
4624
|
b(this, "endContent", document.createElement("div"));
|
|
4621
4625
|
b(this, "error", document.createElement("p"));
|
|
4622
|
-
b(this, "unknownCard", new
|
|
4623
|
-
b(this, "amex", new
|
|
4624
|
-
b(this, "dinerClub", new
|
|
4625
|
-
b(this, "discover", new
|
|
4626
|
-
b(this, "jcb", new
|
|
4627
|
-
b(this, "masterCard", new
|
|
4628
|
-
b(this, "unionPay", new
|
|
4629
|
-
b(this, "visa", new
|
|
4626
|
+
b(this, "unknownCard", new xu());
|
|
4627
|
+
b(this, "amex", new Lu());
|
|
4628
|
+
b(this, "dinerClub", new Pu());
|
|
4629
|
+
b(this, "discover", new Ru());
|
|
4630
|
+
b(this, "jcb", new Su());
|
|
4631
|
+
b(this, "masterCard", new ku());
|
|
4632
|
+
b(this, "unionPay", new Mu());
|
|
4633
|
+
b(this, "visa", new Du());
|
|
4630
4634
|
b(this, "supportedCardTypes", this.initialCardTypes);
|
|
4631
4635
|
b(this, "isTouchSubmit", !1);
|
|
4632
4636
|
b(this, "errorMessage", "");
|
|
@@ -4650,12 +4654,12 @@ class Du {
|
|
|
4650
4654
|
handleChange(e) {
|
|
4651
4655
|
if (this.isDisabled) return;
|
|
4652
4656
|
this.isRequired = !1, this.errorMessage = "", this.isChanged || (this.isChanged = !0);
|
|
4653
|
-
const t =
|
|
4657
|
+
const t = ui(e).map((a) => a.type), r = Oa(e), i = _c(e, (r == null ? void 0 : r.type) || "");
|
|
4654
4658
|
i.replace(/\D/g, "").length === ((r == null ? void 0 : r.maxLength) || 16) && this.validate(i), this.supportedCardTypes = t.length ? t : this.initialCardTypes, this.input.value = i, this.events.change.emit({
|
|
4655
4659
|
card: i,
|
|
4656
4660
|
cardType: r == null ? void 0 : r.type,
|
|
4657
4661
|
cardTypes: t,
|
|
4658
|
-
isValid:
|
|
4662
|
+
isValid: di(e, this.supportedCardTypes).isValid
|
|
4659
4663
|
}), this.render();
|
|
4660
4664
|
}
|
|
4661
4665
|
toggleLabelError(e) {
|
|
@@ -4710,11 +4714,11 @@ class Du {
|
|
|
4710
4714
|
var e;
|
|
4711
4715
|
return {
|
|
4712
4716
|
value: this.input.value,
|
|
4713
|
-
cardType: ((e =
|
|
4717
|
+
cardType: ((e = ui(this.input.value)[0]) == null ? void 0 : e.type) || ""
|
|
4714
4718
|
};
|
|
4715
4719
|
}
|
|
4716
4720
|
validate(e) {
|
|
4717
|
-
const t = this.translate.messages(), { isValid: r, error: i } =
|
|
4721
|
+
const t = this.translate.messages(), { isValid: r, error: i } = di(e, this.supportedCardTypes);
|
|
4718
4722
|
return r ? (this.isRequired = !1, this.errorMessage = "", this.render(), r) : (i === oe.Empty ? (this.errorMessage = "", this.isRequired = !0) : i === oe.Unsupported ? (this.errorMessage = t.card.number.error.unsupported, this.isRequired = !1) : (this.errorMessage = i === oe.Incomplete ? t.card.number.error.incomplete : t.card.number.error.invalid, this.isRequired = !1), this.render(), r);
|
|
4719
4723
|
}
|
|
4720
4724
|
render() {
|
|
@@ -4722,20 +4726,20 @@ class Du {
|
|
|
4722
4726
|
return this.toggleLabelError(t), this.toggleErrorMessage(r), !t && !r ? (this.inputContainer.classList.remove(ne.errorInput), this.endContent.innerHTML = "", this.endContent.append(...this.getCardIcons())) : (this.endContent.innerHTML = "", this.endContent.appendChild(this.unknownCard.render())), this.isDisabled ? (this.inputContainer.classList.add(ne.disabled), this.input.classList.add(ne.disabledInput)) : (this.inputContainer.classList.remove(ne.disabled), this.input.classList.remove(ne.disabledInput)), this.element;
|
|
4723
4727
|
}
|
|
4724
4728
|
}
|
|
4725
|
-
const
|
|
4726
|
-
inputContainer:
|
|
4727
|
-
input:
|
|
4728
|
-
endContent:
|
|
4729
|
-
errorInput:
|
|
4730
|
-
error:
|
|
4731
|
-
label:
|
|
4732
|
-
labelError:
|
|
4733
|
-
disabled:
|
|
4734
|
-
disabledInput:
|
|
4735
|
-
hidden:
|
|
4736
|
-
securityContent:
|
|
4729
|
+
const Fu = "_inputContainer_1xdj3_5", Uu = "_input_1xdj3_5", Bu = "_endContent_1xdj3_20", zu = "_errorInput_1xdj3_24", ju = "_error_1xdj3_24", Ku = "_label_1xdj3_32", qu = "_labelError_1xdj3_36", Hu = "_disabled_1xdj3_40", Wu = "_disabledInput_1xdj3_44", Gu = "_hidden_1xdj3_51", Yu = "_securityContent_1xdj3_55", Y = {
|
|
4730
|
+
inputContainer: Fu,
|
|
4731
|
+
input: Uu,
|
|
4732
|
+
endContent: Bu,
|
|
4733
|
+
errorInput: zu,
|
|
4734
|
+
error: ju,
|
|
4735
|
+
label: Ku,
|
|
4736
|
+
labelError: qu,
|
|
4737
|
+
disabled: Hu,
|
|
4738
|
+
disabledInput: Wu,
|
|
4739
|
+
hidden: Gu,
|
|
4740
|
+
securityContent: Yu
|
|
4737
4741
|
};
|
|
4738
|
-
class
|
|
4742
|
+
class Qu {
|
|
4739
4743
|
constructor() {
|
|
4740
4744
|
b(this, "template", `
|
|
4741
4745
|
<svg class='${Z.svg}' focusable='false' viewBox='0 0 32 21' role='img' aria-label='CVC'>
|
|
@@ -4764,13 +4768,13 @@ class Yu {
|
|
|
4764
4768
|
return this.element;
|
|
4765
4769
|
}
|
|
4766
4770
|
}
|
|
4767
|
-
class
|
|
4771
|
+
class $u {
|
|
4768
4772
|
constructor(e) {
|
|
4769
4773
|
b(this, "cvcId", "paynext-card-input-cvc");
|
|
4770
4774
|
b(this, "expiryId", "paynext-card-input-expiry");
|
|
4771
4775
|
b(this, "element");
|
|
4772
4776
|
b(this, "warning", new Cn());
|
|
4773
|
-
b(this, "cardCvc", new
|
|
4777
|
+
b(this, "cardCvc", new Qu());
|
|
4774
4778
|
b(this, "expiryInputContainer", document.createElement("div"));
|
|
4775
4779
|
b(this, "expiryInput", document.createElement("input"));
|
|
4776
4780
|
b(this, "expiryLabel", document.createElement("label"));
|
|
@@ -4846,7 +4850,7 @@ class Qu {
|
|
|
4846
4850
|
handleCvcChange(e) {
|
|
4847
4851
|
if (this.isDisabled) return;
|
|
4848
4852
|
this.isCvcRequired = !1, this.cvcErrorMessage = "", this.isCvcChanged || (this.isCvcChanged = !0);
|
|
4849
|
-
const t =
|
|
4853
|
+
const t = Cc(e, this.cardType || ""), r = Me.getTypeInfo(this.cardType || "");
|
|
4850
4854
|
t.length === (r == null ? void 0 : r.code.size) && this.validateCvc(t), this.events.cvcChange.emit({
|
|
4851
4855
|
value: t,
|
|
4852
4856
|
isValid: this.cvcValidator(t) === null
|
|
@@ -4893,7 +4897,7 @@ class Qu {
|
|
|
4893
4897
|
handleExpiryChange(e) {
|
|
4894
4898
|
if (this.isDisabled) return;
|
|
4895
4899
|
this.isExpiryRequired = !1, this.expiryErrorMessage = "", this.isExpiryChanged || (this.isExpiryChanged = !0);
|
|
4896
|
-
const t =
|
|
4900
|
+
const t = Ac(e, this.expiryPrevValue);
|
|
4897
4901
|
t.length === 7 && this.validateExpiry(t), this.events.expiryChange.emit({
|
|
4898
4902
|
value: t,
|
|
4899
4903
|
isValid: this.expiryValidator(t) === null
|
|
@@ -4946,16 +4950,16 @@ class Qu {
|
|
|
4946
4950
|
return this.toggleCvcLabelError(a), this.toggleCvcErrorMessage(s), !a && !s ? (this.cvcInputContainer.classList.remove(Y.errorInput), this.cvcEndContent.innerHTML = "", this.cvcEndContent.appendChild(this.cardCvc.render())) : (this.cvcEndContent.innerHTML = "", this.cvcEndContent.appendChild(this.warning.render())), this.isDisabled ? (this.expiryInputContainer.classList.add(Y.disabled), this.expiryInput.classList.add(Y.disabledInput), this.cvcInputContainer.classList.add(Y.disabled), this.cvcInput.classList.add(Y.disabledInput)) : (this.expiryInputContainer.classList.remove(Y.disabled), this.expiryInput.classList.remove(Y.disabledInput), this.cvcInputContainer.classList.remove(Y.disabled), this.cvcInput.classList.remove(Y.disabledInput)), this.element;
|
|
4947
4951
|
}
|
|
4948
4952
|
}
|
|
4949
|
-
const
|
|
4950
|
-
container:
|
|
4951
|
-
title:
|
|
4953
|
+
const Zu = "_container_94v1h_1", Xu = "_title_94v1h_10", pi = {
|
|
4954
|
+
container: Zu,
|
|
4955
|
+
title: Xu
|
|
4952
4956
|
};
|
|
4953
|
-
class
|
|
4957
|
+
class xa {
|
|
4954
4958
|
constructor(e) {
|
|
4955
4959
|
b(this, "element");
|
|
4956
4960
|
b(this, "message", document.createElement("p"));
|
|
4957
4961
|
b(this, "icon", new Cn());
|
|
4958
|
-
this.translate = e, this.element = document.createElement("div"), this.element.classList.add(
|
|
4962
|
+
this.translate = e, this.element = document.createElement("div"), this.element.classList.add(pi.container), this.message.classList.add(pi.title), this.message.textContent = e.messages().status.error, this.element.append(this.icon.render(), this.message), this.translate.subscribe(({ messages: t }) => {
|
|
4959
4963
|
this.message.textContent = t.status.success;
|
|
4960
4964
|
});
|
|
4961
4965
|
}
|
|
@@ -4969,7 +4973,7 @@ class Na {
|
|
|
4969
4973
|
return this.element;
|
|
4970
4974
|
}
|
|
4971
4975
|
}
|
|
4972
|
-
class
|
|
4976
|
+
class Ju {
|
|
4973
4977
|
constructor(e, t) {
|
|
4974
4978
|
b(this, "element");
|
|
4975
4979
|
b(this, "error");
|
|
@@ -4982,7 +4986,7 @@ class Xu {
|
|
|
4982
4986
|
submit: new ce(),
|
|
4983
4987
|
close: new ce()
|
|
4984
4988
|
});
|
|
4985
|
-
this.element = document.createElement("form"), this.error = new
|
|
4989
|
+
this.element = document.createElement("form"), this.error = new xa(e), this.submit = new au(e), this.back = new Jc(), this.number = new Vu(e), this.name = new gu(e), this.cardSecurity = new $u(e), this.error.addClassName(bt.hidden), this.element.classList.add(bt.cardForm, t || ""), this.element.append(
|
|
4986
4990
|
this.back.render(),
|
|
4987
4991
|
this.number.render(),
|
|
4988
4992
|
this.cardSecurity.render(),
|
|
@@ -5024,7 +5028,7 @@ class Xu {
|
|
|
5024
5028
|
return this.element;
|
|
5025
5029
|
}
|
|
5026
5030
|
}
|
|
5027
|
-
class
|
|
5031
|
+
class ed {
|
|
5028
5032
|
constructor() {
|
|
5029
5033
|
b(this, "template", `
|
|
5030
5034
|
<svg
|
|
@@ -5051,16 +5055,16 @@ class Ju {
|
|
|
5051
5055
|
return this.element;
|
|
5052
5056
|
}
|
|
5053
5057
|
}
|
|
5054
|
-
const
|
|
5055
|
-
container:
|
|
5056
|
-
title:
|
|
5058
|
+
const td = "_container_hoha1_1", nd = "_title_hoha1_5", hi = {
|
|
5059
|
+
container: td,
|
|
5060
|
+
title: nd
|
|
5057
5061
|
};
|
|
5058
|
-
class
|
|
5062
|
+
class rd {
|
|
5059
5063
|
constructor(e) {
|
|
5060
5064
|
b(this, "element");
|
|
5061
5065
|
b(this, "message", document.createElement("p"));
|
|
5062
|
-
b(this, "icon", new
|
|
5063
|
-
this.translate = e, this.element = document.createElement("div"), this.element.classList.add(
|
|
5066
|
+
b(this, "icon", new ed());
|
|
5067
|
+
this.translate = e, this.element = document.createElement("div"), this.element.classList.add(hi.container), this.message.classList.add(hi.title), this.message.textContent = e.messages().status.success, this.element.append(this.icon.render(), this.message), this.translate.subscribe(({ messages: t }) => {
|
|
5064
5068
|
this.message.textContent = t.status.success;
|
|
5065
5069
|
});
|
|
5066
5070
|
}
|
|
@@ -5074,18 +5078,18 @@ class nd {
|
|
|
5074
5078
|
return this.element;
|
|
5075
5079
|
}
|
|
5076
5080
|
}
|
|
5077
|
-
class
|
|
5081
|
+
class id {
|
|
5078
5082
|
constructor(e) {
|
|
5079
5083
|
b(this, "isLoading", !1);
|
|
5080
5084
|
b(this, "isFormOpen", !1);
|
|
5081
5085
|
b(this, "checkout");
|
|
5082
5086
|
b(this, "container", document.createElement("div"));
|
|
5083
|
-
b(this, "loader", new
|
|
5087
|
+
b(this, "loader", new ic());
|
|
5084
5088
|
b(this, "error");
|
|
5085
5089
|
b(this, "success");
|
|
5086
5090
|
b(this, "buttons");
|
|
5087
5091
|
b(this, "form");
|
|
5088
|
-
this.config = e, this.buttons = new
|
|
5092
|
+
this.config = e, this.buttons = new Qc(e), this.form = new Ju(e.state.translate, le.hidden), this.error = new xa(e.state.translate), this.success = new rd(e.state.translate), this.error.addClassName(le.hidden), this.success.addClassName(le.hidden), this.container.append(this.loader.render(), this.buttons.render(), this.form.render()), this.checkout = document.createElement("div"), this.checkout.classList.add(le.checkout), this.checkout.append(this.container, this.error.render(), this.success.render());
|
|
5089
5093
|
}
|
|
5090
5094
|
// init
|
|
5091
5095
|
init() {
|
|
@@ -5106,9 +5110,9 @@ class rd {
|
|
|
5106
5110
|
return this.handleSuccess({ clientSession: t, googlePay: e });
|
|
5107
5111
|
case "paypal":
|
|
5108
5112
|
return this.handleSuccess({ clientSession: t, paypal: { billing_agreement_token: e } });
|
|
5109
|
-
// TODO: add braintree
|
|
5110
|
-
case "
|
|
5111
|
-
return console.log("-----
|
|
5113
|
+
// TODO: add braintree venmo
|
|
5114
|
+
case "venmo":
|
|
5115
|
+
return console.log("----- venmo success data", e), this.handleSuccess({ clientSession: t, braintree: { nonce: e } });
|
|
5112
5116
|
}
|
|
5113
5117
|
}), this.form.addEventListener("close", () => j(this, null, function* () {
|
|
5114
5118
|
this.isLoading || (this.hideError(), yield se(this.form.element, Pe.close, Pe.transition), this.form.element.classList.add(le.hidden), this.buttons.buttons.classList.add(le.btnsInitial), this.buttons.buttons.classList.remove(le.hidden), yield se(this.buttons.buttons, gt.open, gt.transition), this.isFormOpen = !1);
|
|
@@ -5125,7 +5129,7 @@ class rd {
|
|
|
5125
5129
|
cardBrand: e.cardBrand || "",
|
|
5126
5130
|
number: s,
|
|
5127
5131
|
cvc: o,
|
|
5128
|
-
type:
|
|
5132
|
+
type: Na.Card,
|
|
5129
5133
|
metadata: {
|
|
5130
5134
|
name: e.name,
|
|
5131
5135
|
userAgent: navigator == null ? void 0 : navigator.userAgent
|
|
@@ -5149,14 +5153,14 @@ class rd {
|
|
|
5149
5153
|
this.hideError(), this.setLoading(!0);
|
|
5150
5154
|
const t = this.config.state.checkout.getState(), r = this.config.state.translate.messages();
|
|
5151
5155
|
try {
|
|
5152
|
-
const a = yield
|
|
5156
|
+
const a = yield jc(e, t.environment, t.apiVersion);
|
|
5153
5157
|
if (a.error)
|
|
5154
5158
|
throw new Error(r.status.error);
|
|
5155
5159
|
if (a.three_ds_session_id) {
|
|
5156
5160
|
yield this.config.service.ev.initThreeDs({
|
|
5157
5161
|
threeDsId: a.three_ds_session_id,
|
|
5158
5162
|
onSuccess: () => {
|
|
5159
|
-
this.setLoading(!1), this.handleSuccess(te(
|
|
5163
|
+
this.setLoading(!1), this.handleSuccess(te(Q({}, e), { threeDsSessionId: a.three_ds_session_id }));
|
|
5160
5164
|
},
|
|
5161
5165
|
onError: () => {
|
|
5162
5166
|
this.handleError("Three DS Error");
|
|
@@ -5193,22 +5197,22 @@ class rd {
|
|
|
5193
5197
|
return this.checkout;
|
|
5194
5198
|
}
|
|
5195
5199
|
}
|
|
5196
|
-
class
|
|
5200
|
+
class ad {
|
|
5197
5201
|
constructor(e) {
|
|
5198
5202
|
b(this, "component");
|
|
5199
|
-
this.config = e, this.component = new
|
|
5203
|
+
this.config = e, this.component = new id(e);
|
|
5200
5204
|
}
|
|
5201
5205
|
// init
|
|
5202
5206
|
init() {
|
|
5203
5207
|
return j(this, null, function* () {
|
|
5204
|
-
const { checkout: e, transaction: t, translate: r, styles: i } = this.config.state;
|
|
5205
|
-
e.subscribe(({ clientToken:
|
|
5206
|
-
|
|
5207
|
-
var
|
|
5208
|
-
if (
|
|
5208
|
+
const { checkout: e, transaction: t, translate: r, styles: i } = this.config.state, { apiVersion: a } = e.getState();
|
|
5209
|
+
e.subscribe(({ clientToken: s, environment: o, locale: l, translate: c, styles: u }) => {
|
|
5210
|
+
l && r.locale() !== l && r.setLocale(l), c && r.overrides() !== c && r.setMessages(c), u && i.setState(u), t.updateTransaction(s, o, a).then((d) => {
|
|
5211
|
+
var h, p;
|
|
5212
|
+
if (d)
|
|
5209
5213
|
return this.config.service.ev.initEv({
|
|
5210
|
-
teamId: (
|
|
5211
|
-
appId: (
|
|
5214
|
+
teamId: (h = d.evervault) == null ? void 0 : h.team_id,
|
|
5215
|
+
appId: (p = d.evervault) == null ? void 0 : p.app_id
|
|
5212
5216
|
});
|
|
5213
5217
|
}).catch(console.error);
|
|
5214
5218
|
});
|
|
@@ -5241,37 +5245,38 @@ class Tt {
|
|
|
5241
5245
|
return this.observer.addListener(e);
|
|
5242
5246
|
}
|
|
5243
5247
|
}
|
|
5244
|
-
const
|
|
5248
|
+
const sd = {
|
|
5245
5249
|
clientToken: "",
|
|
5246
|
-
environment: "sandbox"
|
|
5250
|
+
environment: "sandbox",
|
|
5251
|
+
apiVersion: "1.0.0"
|
|
5247
5252
|
};
|
|
5248
|
-
class
|
|
5253
|
+
class od extends Tt {
|
|
5249
5254
|
constructor(e) {
|
|
5250
|
-
super(
|
|
5255
|
+
super(Q(Q({}, sd), e));
|
|
5251
5256
|
}
|
|
5252
5257
|
}
|
|
5253
|
-
const
|
|
5254
|
-
class
|
|
5258
|
+
const ld = {};
|
|
5259
|
+
class cd extends Tt {
|
|
5255
5260
|
constructor(e) {
|
|
5256
|
-
super(e ||
|
|
5261
|
+
super(e || ld);
|
|
5257
5262
|
}
|
|
5258
5263
|
}
|
|
5259
|
-
class
|
|
5264
|
+
class ud extends Tt {
|
|
5260
5265
|
constructor(t) {
|
|
5261
5266
|
super(t || null);
|
|
5262
5267
|
b(this, "clientToken", "");
|
|
5263
5268
|
}
|
|
5264
5269
|
// update transaction
|
|
5265
|
-
updateTransaction(t, r
|
|
5270
|
+
updateTransaction(t, r, i) {
|
|
5266
5271
|
return j(this, null, function* () {
|
|
5267
5272
|
if (this.clientToken === t) return this.getState();
|
|
5268
5273
|
this.clientToken = t;
|
|
5269
|
-
const
|
|
5270
|
-
return this.setState(
|
|
5274
|
+
const a = yield qc(t, r, i);
|
|
5275
|
+
return this.setState(a), a;
|
|
5271
5276
|
});
|
|
5272
5277
|
}
|
|
5273
5278
|
}
|
|
5274
|
-
const
|
|
5279
|
+
const dd = {
|
|
5275
5280
|
card: {
|
|
5276
5281
|
title: "طريقة الدفع",
|
|
5277
5282
|
number: {
|
|
@@ -5321,7 +5326,7 @@ const ud = {
|
|
|
5321
5326
|
success: "تمت عملية الدفع الخاصة بك بنجاح!",
|
|
5322
5327
|
error: "لم نتمكن من التحقق من طريقة الدفع الخاصة بك. يرجى اختيار طريقة دفع أخرى وإعادة المحاولة."
|
|
5323
5328
|
}
|
|
5324
|
-
},
|
|
5329
|
+
}, pd = {
|
|
5325
5330
|
card: {
|
|
5326
5331
|
title: "Метод на плащане",
|
|
5327
5332
|
number: {
|
|
@@ -5371,7 +5376,7 @@ const ud = {
|
|
|
5371
5376
|
success: "Успех",
|
|
5372
5377
|
error: "Не можем да удостоверим автентичността на вашия метод на плащане. Моля, изберете друг метод на плащане и опитайте отново."
|
|
5373
5378
|
}
|
|
5374
|
-
},
|
|
5379
|
+
}, hd = {
|
|
5375
5380
|
card: {
|
|
5376
5381
|
title: "Způsob platby",
|
|
5377
5382
|
number: {
|
|
@@ -5421,7 +5426,7 @@ const ud = {
|
|
|
5421
5426
|
success: "Úspěch",
|
|
5422
5427
|
error: "Váš způsob platby se nám nedaří ověřit. Zvolte prosím jiný způsob platby a zkuste to znovu."
|
|
5423
5428
|
}
|
|
5424
|
-
},
|
|
5429
|
+
}, md = {
|
|
5425
5430
|
card: {
|
|
5426
5431
|
title: "Betalingsmetode",
|
|
5427
5432
|
number: {
|
|
@@ -5471,7 +5476,7 @@ const ud = {
|
|
|
5471
5476
|
success: "Succes",
|
|
5472
5477
|
error: "Vi kan ikke godkende din betalingsmetode. Vælg venligst en anden betalingsmetode og prøv igen."
|
|
5473
5478
|
}
|
|
5474
|
-
},
|
|
5479
|
+
}, fd = {
|
|
5475
5480
|
card: {
|
|
5476
5481
|
title: "Zahlungsmethode",
|
|
5477
5482
|
number: {
|
|
@@ -5521,7 +5526,7 @@ const ud = {
|
|
|
5521
5526
|
success: "Erfolg",
|
|
5522
5527
|
error: "Wir können Ihre Zahlungsmethode nicht authentifizieren. Bitte wählen Sie eine andere Zahlungsmethode und versuchen Sie es erneut."
|
|
5523
5528
|
}
|
|
5524
|
-
},
|
|
5529
|
+
}, vd = {
|
|
5525
5530
|
card: {
|
|
5526
5531
|
title: "Μέθοδος πληρωμής",
|
|
5527
5532
|
number: {
|
|
@@ -5571,7 +5576,7 @@ const ud = {
|
|
|
5571
5576
|
success: "Επιτυχία",
|
|
5572
5577
|
error: "Δεν μπορούμε να πιστοποιήσουμε τη μέθοδο πληρωμής σας. Παρακαλούμε επιλέξτε μια διαφορετική μέθοδο πληρωμής και προσπαθήστε ξανά."
|
|
5573
5578
|
}
|
|
5574
|
-
},
|
|
5579
|
+
}, gd = {
|
|
5575
5580
|
card: {
|
|
5576
5581
|
title: "Payment method",
|
|
5577
5582
|
number: {
|
|
@@ -5621,7 +5626,7 @@ const ud = {
|
|
|
5621
5626
|
success: "Your payment was successful!",
|
|
5622
5627
|
error: "We are unable to authenticate your payment method. Please choose a different payment method and try again."
|
|
5623
5628
|
}
|
|
5624
|
-
},
|
|
5629
|
+
}, yd = {
|
|
5625
5630
|
card: {
|
|
5626
5631
|
title: "Método de pago",
|
|
5627
5632
|
number: {
|
|
@@ -5671,7 +5676,7 @@ const ud = {
|
|
|
5671
5676
|
success: "Éxito",
|
|
5672
5677
|
error: "No podemos autenticar su método de pago. Elija otro método de pago e inténtelo de nuevo."
|
|
5673
5678
|
}
|
|
5674
|
-
},
|
|
5679
|
+
}, bd = {
|
|
5675
5680
|
card: {
|
|
5676
5681
|
title: "Makseviis",
|
|
5677
5682
|
number: {
|
|
@@ -5721,7 +5726,7 @@ const ud = {
|
|
|
5721
5726
|
success: "Edu",
|
|
5722
5727
|
error: "Me ei suuda teie makseviisi autentida. Palun valige teine makseviis ja proovige uuesti."
|
|
5723
5728
|
}
|
|
5724
|
-
},
|
|
5729
|
+
}, Ed = {
|
|
5725
5730
|
card: {
|
|
5726
5731
|
title: "Maksutapa",
|
|
5727
5732
|
number: {
|
|
@@ -5771,7 +5776,7 @@ const ud = {
|
|
|
5771
5776
|
success: "Menestys",
|
|
5772
5777
|
error: "Emme pysty todentamaan maksutapaasi. Valitse toinen maksutapa ja yritä uudelleen."
|
|
5773
5778
|
}
|
|
5774
|
-
},
|
|
5779
|
+
}, _d = {
|
|
5775
5780
|
card: {
|
|
5776
5781
|
title: "Paraan ng pagbabayad",
|
|
5777
5782
|
number: {
|
|
@@ -5821,7 +5826,7 @@ const ud = {
|
|
|
5821
5826
|
success: "Tagumpay",
|
|
5822
5827
|
error: "Hindi namin ma-authenticate ang iyong paraan ng pagbabayad. Mangyaring pumili ng ibang paraan ng pagbabayad at subukang muli."
|
|
5823
5828
|
}
|
|
5824
|
-
},
|
|
5829
|
+
}, Cd = {
|
|
5825
5830
|
card: {
|
|
5826
5831
|
title: "Moyen de paiement",
|
|
5827
5832
|
number: {
|
|
@@ -5871,7 +5876,7 @@ const ud = {
|
|
|
5871
5876
|
success: "Succès",
|
|
5872
5877
|
error: "Nous ne sommes pas en mesure d'authentifier votre méthode de paiement. Veuillez choisir un autre mode de paiement et réessayer."
|
|
5873
5878
|
}
|
|
5874
|
-
},
|
|
5879
|
+
}, Ad = {
|
|
5875
5880
|
card: {
|
|
5876
5881
|
title: "Način plaćanja",
|
|
5877
5882
|
number: {
|
|
@@ -5921,7 +5926,7 @@ const ud = {
|
|
|
5921
5926
|
success: "Uspjeh",
|
|
5922
5927
|
error: "Ne možemo provjeriti autentičnost vašeg načina plaćanja. Odaberite drugi način plaćanja i pokušajte ponovno."
|
|
5923
5928
|
}
|
|
5924
|
-
},
|
|
5929
|
+
}, wd = {
|
|
5925
5930
|
card: {
|
|
5926
5931
|
title: "Fizetési mód",
|
|
5927
5932
|
number: {
|
|
@@ -5971,7 +5976,7 @@ const ud = {
|
|
|
5971
5976
|
success: "Siker",
|
|
5972
5977
|
error: "Nem tudjuk hitelesíteni a fizetési módját. Kérjük, válasszon másik fizetési módot, és próbálja meg újra."
|
|
5973
5978
|
}
|
|
5974
|
-
},
|
|
5979
|
+
}, Td = {
|
|
5975
5980
|
card: {
|
|
5976
5981
|
title: "Metode pembayaran",
|
|
5977
5982
|
number: {
|
|
@@ -6021,7 +6026,7 @@ const ud = {
|
|
|
6021
6026
|
success: "Sukses",
|
|
6022
6027
|
error: "Kami tidak dapat mengautentikasi metode pembayaran Anda. Silakan pilih metode pembayaran lain dan coba lagi."
|
|
6023
6028
|
}
|
|
6024
|
-
},
|
|
6029
|
+
}, Id = {
|
|
6025
6030
|
card: {
|
|
6026
6031
|
title: "Modalità di pagamento",
|
|
6027
6032
|
number: {
|
|
@@ -6071,7 +6076,7 @@ const ud = {
|
|
|
6071
6076
|
success: "Il successo",
|
|
6072
6077
|
error: "Non siamo in grado di autenticare il suo metodo di pagamento. Scegliere un altro metodo di pagamento e riprovare."
|
|
6073
6078
|
}
|
|
6074
|
-
},
|
|
6079
|
+
}, Od = {
|
|
6075
6080
|
card: {
|
|
6076
6081
|
title: "支払い方法",
|
|
6077
6082
|
number: {
|
|
@@ -6121,7 +6126,7 @@ const ud = {
|
|
|
6121
6126
|
success: "成功",
|
|
6122
6127
|
error: "お客様のお支払い方法を認証できません。別のお支払い方法を選択し、再度お試しください。"
|
|
6123
6128
|
}
|
|
6124
|
-
},
|
|
6129
|
+
}, Nd = {
|
|
6125
6130
|
card: {
|
|
6126
6131
|
title: "결제 방식",
|
|
6127
6132
|
number: {
|
|
@@ -6171,7 +6176,7 @@ const ud = {
|
|
|
6171
6176
|
success: "성공",
|
|
6172
6177
|
error: "결제 방법을 인증할 수 없습니다. 다른 결제 방법을 선택하고 다시 시도해 주세요."
|
|
6173
6178
|
}
|
|
6174
|
-
},
|
|
6179
|
+
}, xd = {
|
|
6175
6180
|
card: {
|
|
6176
6181
|
title: "Mokėjimo būdas",
|
|
6177
6182
|
number: {
|
|
@@ -6221,7 +6226,7 @@ const ud = {
|
|
|
6221
6226
|
success: "Sėkmė",
|
|
6222
6227
|
error: "Negalime patvirtinti jūsų mokėjimo būdo. Pasirinkite kitą mokėjimo būdą ir bandykite dar kartą."
|
|
6223
6228
|
}
|
|
6224
|
-
},
|
|
6229
|
+
}, Ld = {
|
|
6225
6230
|
card: {
|
|
6226
6231
|
title: "Maksājumu veids",
|
|
6227
6232
|
number: {
|
|
@@ -6271,7 +6276,7 @@ const ud = {
|
|
|
6271
6276
|
success: "Panākumi",
|
|
6272
6277
|
error: "Mēs nevaram pārbaudīt jūsu maksājuma metodes autentiskumu. Lūdzu, izvēlieties citu maksājumu metodi un mēģiniet vēlreiz."
|
|
6273
6278
|
}
|
|
6274
|
-
},
|
|
6279
|
+
}, Pd = {
|
|
6275
6280
|
card: {
|
|
6276
6281
|
title: "Kaedah pembayaran",
|
|
6277
6282
|
number: {
|
|
@@ -6321,7 +6326,7 @@ const ud = {
|
|
|
6321
6326
|
success: "Kejayaan",
|
|
6322
6327
|
error: "Kami tidak dapat mengesahkan kaedah pembayaran anda. Sila pilih kaedah pembayaran lain dan cuba lagi."
|
|
6323
6328
|
}
|
|
6324
|
-
},
|
|
6329
|
+
}, Rd = {
|
|
6325
6330
|
card: {
|
|
6326
6331
|
title: "Metodu tal-ħlas",
|
|
6327
6332
|
number: {
|
|
@@ -6371,7 +6376,7 @@ const ud = {
|
|
|
6371
6376
|
success: "Suċċess",
|
|
6372
6377
|
error: "Aħna ma nistgħux jawtentikaw il-metodu tal-ħlas tiegħek. Jekk jogħġbok agħżel metodu ta' ħlas differenti u erġa' pprova."
|
|
6373
6378
|
}
|
|
6374
|
-
},
|
|
6379
|
+
}, Sd = {
|
|
6375
6380
|
card: {
|
|
6376
6381
|
title: "Betalingsmetode",
|
|
6377
6382
|
number: {
|
|
@@ -6421,7 +6426,7 @@ const ud = {
|
|
|
6421
6426
|
success: "Suksess",
|
|
6422
6427
|
error: "Vi kan ikke godkjenne betalingsmåten din. Vennligst velg en annen betalingsmetode og prøv på nytt."
|
|
6423
6428
|
}
|
|
6424
|
-
},
|
|
6429
|
+
}, kd = {
|
|
6425
6430
|
card: {
|
|
6426
6431
|
title: "Betaalmethode",
|
|
6427
6432
|
number: {
|
|
@@ -6471,7 +6476,7 @@ const ud = {
|
|
|
6471
6476
|
success: "Succes",
|
|
6472
6477
|
error: "We kunnen je betaalmethode niet verifiëren. Kies een andere betaalmethode en probeer het opnieuw."
|
|
6473
6478
|
}
|
|
6474
|
-
},
|
|
6479
|
+
}, Md = {
|
|
6475
6480
|
card: {
|
|
6476
6481
|
title: "Metoda płatności",
|
|
6477
6482
|
number: {
|
|
@@ -6521,7 +6526,7 @@ const ud = {
|
|
|
6521
6526
|
success: "Sukces",
|
|
6522
6527
|
error: "Nie możemy uwierzytelnić metody płatności. Wybierz inną metodę płatności i spróbuj ponownie."
|
|
6523
6528
|
}
|
|
6524
|
-
},
|
|
6529
|
+
}, Dd = {
|
|
6525
6530
|
card: {
|
|
6526
6531
|
title: "Forma de pagamento",
|
|
6527
6532
|
number: {
|
|
@@ -6571,7 +6576,7 @@ const ud = {
|
|
|
6571
6576
|
success: "Sucesso",
|
|
6572
6577
|
error: "Não foi possível autenticar o seu método de pagamento. Selecione outro método de pagamento e tente novamente."
|
|
6573
6578
|
}
|
|
6574
|
-
},
|
|
6579
|
+
}, Vd = {
|
|
6575
6580
|
card: {
|
|
6576
6581
|
title: "Metoda de plată",
|
|
6577
6582
|
number: {
|
|
@@ -6621,7 +6626,7 @@ const ud = {
|
|
|
6621
6626
|
success: "Succes",
|
|
6622
6627
|
error: "Nu putem să vă autentificăm metoda de plată. Vă rugăm să alegeți o altă metodă de plată și să încercați din nou."
|
|
6623
6628
|
}
|
|
6624
|
-
},
|
|
6629
|
+
}, Fd = {
|
|
6625
6630
|
card: {
|
|
6626
6631
|
title: "Метод оплаты",
|
|
6627
6632
|
number: {
|
|
@@ -6671,7 +6676,7 @@ const ud = {
|
|
|
6671
6676
|
success: "Успех",
|
|
6672
6677
|
error: "Мы не можем проверить подлинность вашего способа оплаты. Пожалуйста, выберите другой способ оплаты и повторите попытку."
|
|
6673
6678
|
}
|
|
6674
|
-
},
|
|
6679
|
+
}, Ud = {
|
|
6675
6680
|
card: {
|
|
6676
6681
|
title: "Spôsob platby",
|
|
6677
6682
|
number: {
|
|
@@ -6721,7 +6726,7 @@ const ud = {
|
|
|
6721
6726
|
success: "Úspech",
|
|
6722
6727
|
error: "Nemôžeme overiť váš spôsob platby. Vyberte si iný spôsob platby a skúste to znova."
|
|
6723
6728
|
}
|
|
6724
|
-
},
|
|
6729
|
+
}, Bd = {
|
|
6725
6730
|
card: {
|
|
6726
6731
|
title: "Način plačila",
|
|
6727
6732
|
number: {
|
|
@@ -6771,7 +6776,7 @@ const ud = {
|
|
|
6771
6776
|
success: "Uspeh",
|
|
6772
6777
|
error: "Vašega načina plačila ne moremo preveriti. Izberite drug način plačila in poskusite znova."
|
|
6773
6778
|
}
|
|
6774
|
-
},
|
|
6779
|
+
}, zd = {
|
|
6775
6780
|
card: {
|
|
6776
6781
|
title: "Betalningsmetod",
|
|
6777
6782
|
number: {
|
|
@@ -6821,7 +6826,7 @@ const ud = {
|
|
|
6821
6826
|
success: "Framgång",
|
|
6822
6827
|
error: "Vi kan inte verifiera din betalningsmetod. Vänligen välj en annan betalningsmetod och försök igen."
|
|
6823
6828
|
}
|
|
6824
|
-
},
|
|
6829
|
+
}, jd = {
|
|
6825
6830
|
card: {
|
|
6826
6831
|
title: "วิธีการชำระเงิน",
|
|
6827
6832
|
number: {
|
|
@@ -6871,7 +6876,7 @@ const ud = {
|
|
|
6871
6876
|
success: "ความสำเร็จ",
|
|
6872
6877
|
error: "เราไม่สามารถตรวจสอบวิธีการชำระเงินของคุณได้ โปรดเลือกวิธีการชำระเงินอื่นแล้วลองอีกครั้ง"
|
|
6873
6878
|
}
|
|
6874
|
-
},
|
|
6879
|
+
}, Kd = {
|
|
6875
6880
|
card: {
|
|
6876
6881
|
title: "Ödeme yöntemi",
|
|
6877
6882
|
number: {
|
|
@@ -6921,7 +6926,7 @@ const ud = {
|
|
|
6921
6926
|
success: "Başarı",
|
|
6922
6927
|
error: "Ödeme yönteminizi doğrulayamıyoruz. Lütfen farklı bir ödeme yöntemi seçin ve tekrar deneyin."
|
|
6923
6928
|
}
|
|
6924
|
-
},
|
|
6929
|
+
}, qd = {
|
|
6925
6930
|
card: {
|
|
6926
6931
|
title: "Phương thức thanh toán",
|
|
6927
6932
|
number: {
|
|
@@ -6971,7 +6976,7 @@ const ud = {
|
|
|
6971
6976
|
success: "Thành công",
|
|
6972
6977
|
error: "Chúng tôi không thể xác thực phương thức thanh toán của bạn. Vui lòng chọn phương thức thanh toán khác và thử lại."
|
|
6973
6978
|
}
|
|
6974
|
-
},
|
|
6979
|
+
}, Hd = {
|
|
6975
6980
|
card: {
|
|
6976
6981
|
title: "支付方式",
|
|
6977
6982
|
number: {
|
|
@@ -7022,45 +7027,45 @@ const ud = {
|
|
|
7022
7027
|
error: "我们无法验证您的付款方式。请选择其他付款方式并重试。"
|
|
7023
7028
|
}
|
|
7024
7029
|
}, Jt = {
|
|
7025
|
-
ar:
|
|
7026
|
-
en:
|
|
7027
|
-
bg:
|
|
7028
|
-
cs:
|
|
7029
|
-
da:
|
|
7030
|
-
de:
|
|
7031
|
-
el:
|
|
7032
|
-
es:
|
|
7033
|
-
et:
|
|
7034
|
-
fi:
|
|
7035
|
-
fil:
|
|
7036
|
-
fr:
|
|
7037
|
-
hr:
|
|
7038
|
-
hu:
|
|
7039
|
-
id:
|
|
7040
|
-
it:
|
|
7041
|
-
ja:
|
|
7042
|
-
ko:
|
|
7043
|
-
lt:
|
|
7044
|
-
lv:
|
|
7045
|
-
ms:
|
|
7046
|
-
ru:
|
|
7047
|
-
mt:
|
|
7048
|
-
nb:
|
|
7049
|
-
nl:
|
|
7050
|
-
pl:
|
|
7051
|
-
pt:
|
|
7052
|
-
ro:
|
|
7053
|
-
sk:
|
|
7054
|
-
sl:
|
|
7055
|
-
sv:
|
|
7056
|
-
th:
|
|
7057
|
-
tr:
|
|
7058
|
-
vi:
|
|
7059
|
-
zh:
|
|
7030
|
+
ar: dd,
|
|
7031
|
+
en: gd,
|
|
7032
|
+
bg: pd,
|
|
7033
|
+
cs: hd,
|
|
7034
|
+
da: md,
|
|
7035
|
+
de: fd,
|
|
7036
|
+
el: vd,
|
|
7037
|
+
es: yd,
|
|
7038
|
+
et: bd,
|
|
7039
|
+
fi: Ed,
|
|
7040
|
+
fil: _d,
|
|
7041
|
+
fr: Cd,
|
|
7042
|
+
hr: Ad,
|
|
7043
|
+
hu: wd,
|
|
7044
|
+
id: Td,
|
|
7045
|
+
it: Id,
|
|
7046
|
+
ja: Od,
|
|
7047
|
+
ko: Nd,
|
|
7048
|
+
lt: xd,
|
|
7049
|
+
lv: Ld,
|
|
7050
|
+
ms: Pd,
|
|
7051
|
+
ru: Fd,
|
|
7052
|
+
mt: Rd,
|
|
7053
|
+
nb: Sd,
|
|
7054
|
+
nl: kd,
|
|
7055
|
+
pl: Md,
|
|
7056
|
+
pt: Dd,
|
|
7057
|
+
ro: Vd,
|
|
7058
|
+
sk: Ud,
|
|
7059
|
+
sl: Bd,
|
|
7060
|
+
sv: zd,
|
|
7061
|
+
th: jd,
|
|
7062
|
+
tr: Kd,
|
|
7063
|
+
vi: qd,
|
|
7064
|
+
zh: Hd
|
|
7060
7065
|
}, en = () => {
|
|
7061
7066
|
const n = navigator == null ? void 0 : navigator.language.split("-")[0];
|
|
7062
7067
|
return Jt[n] || Jt.en;
|
|
7063
|
-
},
|
|
7068
|
+
}, mi = (n, e = {}) => {
|
|
7064
7069
|
var r, i, a, s, o, l, c, u, d, h, p, m, f, v, y, w, T, x, A, I, L, k, B, G, q, M, F, K, J, S, W, z, g, E, R, U, _, O, C, P, V, N, H, X, re, D, ee, me, ze, je, Ke, qe, He, We, Ge, Ye, Qe;
|
|
7065
7070
|
if (!n) return en();
|
|
7066
7071
|
const t = Jt[n] || en();
|
|
@@ -7116,7 +7121,7 @@ const ud = {
|
|
|
7116
7121
|
}
|
|
7117
7122
|
};
|
|
7118
7123
|
};
|
|
7119
|
-
class
|
|
7124
|
+
class Wd extends Tt {
|
|
7120
7125
|
constructor() {
|
|
7121
7126
|
super({
|
|
7122
7127
|
messages: en(),
|
|
@@ -7124,11 +7129,11 @@ class Hd extends Tt {
|
|
|
7124
7129
|
});
|
|
7125
7130
|
}
|
|
7126
7131
|
setMessages(e) {
|
|
7127
|
-
const t = this.locale(), r =
|
|
7132
|
+
const t = this.locale(), r = mi(t, e);
|
|
7128
7133
|
this.setState({ locale: t, messages: r, overrides: e });
|
|
7129
7134
|
}
|
|
7130
7135
|
setLocale(e) {
|
|
7131
|
-
const t = this.overrides(), r =
|
|
7136
|
+
const t = this.overrides(), r = mi(e, t);
|
|
7132
7137
|
this.setState({ locale: e, messages: r, overrides: t });
|
|
7133
7138
|
}
|
|
7134
7139
|
overrides() {
|
|
@@ -7163,7 +7168,7 @@ class Hd extends Tt {
|
|
|
7163
7168
|
* See the License for the specific language governing permissions and
|
|
7164
7169
|
* limitations under the License.
|
|
7165
7170
|
*/
|
|
7166
|
-
function
|
|
7171
|
+
function Gd(n, e) {
|
|
7167
7172
|
var t = {};
|
|
7168
7173
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && e.indexOf(r) < 0 && (t[r] = n[r]);
|
|
7169
7174
|
if (n != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -7171,11 +7176,11 @@ function Wd(n, e) {
|
|
|
7171
7176
|
e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(n, r[i]) && (t[r[i]] = n[r[i]]);
|
|
7172
7177
|
return t;
|
|
7173
7178
|
}
|
|
7174
|
-
function
|
|
7179
|
+
function Yd(n, e) {
|
|
7175
7180
|
var t = document.querySelector('script[src="'.concat(n, '"]'));
|
|
7176
7181
|
if (t === null)
|
|
7177
7182
|
return null;
|
|
7178
|
-
var r =
|
|
7183
|
+
var r = La(n, e), i = t.cloneNode();
|
|
7179
7184
|
if (delete i.dataset.uidAuto, Object.keys(i.dataset).length !== Object.keys(r.dataset).length)
|
|
7180
7185
|
return null;
|
|
7181
7186
|
var a = !0;
|
|
@@ -7183,63 +7188,63 @@ function Gd(n, e) {
|
|
|
7183
7188
|
i.dataset[s] !== r.dataset[s] && (a = !1);
|
|
7184
7189
|
}), a ? t : null;
|
|
7185
7190
|
}
|
|
7186
|
-
function
|
|
7187
|
-
var e = n.url, t = n.attributes, r = n.onSuccess, i = n.onError, a =
|
|
7191
|
+
function Qd(n) {
|
|
7192
|
+
var e = n.url, t = n.attributes, r = n.onSuccess, i = n.onError, a = La(e, t);
|
|
7188
7193
|
a.onerror = i, a.onload = r, document.head.insertBefore(a, document.head.firstElementChild);
|
|
7189
7194
|
}
|
|
7190
|
-
function
|
|
7191
|
-
var e = n.sdkBaseUrl, t = n.environment, r =
|
|
7195
|
+
function $d(n) {
|
|
7196
|
+
var e = n.sdkBaseUrl, t = n.environment, r = Gd(n, ["sdkBaseUrl", "environment"]), i = e || Jd(t), a = r, s = Object.keys(a).filter(function(c) {
|
|
7192
7197
|
return typeof a[c] != "undefined" && a[c] !== null && a[c] !== "";
|
|
7193
7198
|
}).reduce(function(c, u) {
|
|
7194
7199
|
var d = a[u].toString();
|
|
7195
|
-
return u =
|
|
7200
|
+
return u = Zd(u), u.substring(0, 4) === "data" || u === "crossorigin" ? c.attributes[u] = d : c.queryParams[u] = d, c;
|
|
7196
7201
|
}, {
|
|
7197
7202
|
queryParams: {},
|
|
7198
7203
|
attributes: {}
|
|
7199
7204
|
}), o = s.queryParams, l = s.attributes;
|
|
7200
7205
|
return o["merchant-id"] && o["merchant-id"].indexOf(",") !== -1 && (l["data-merchant-id"] = o["merchant-id"], o["merchant-id"] = "*"), {
|
|
7201
|
-
url: "".concat(i, "?").concat(
|
|
7206
|
+
url: "".concat(i, "?").concat(Xd(o)),
|
|
7202
7207
|
attributes: l
|
|
7203
7208
|
};
|
|
7204
7209
|
}
|
|
7205
|
-
function
|
|
7210
|
+
function Zd(n) {
|
|
7206
7211
|
var e = function(t, r) {
|
|
7207
7212
|
return (r ? "-" : "") + t.toLowerCase();
|
|
7208
7213
|
};
|
|
7209
7214
|
return n.replace(/[A-Z]+(?![a-z])|[A-Z]/g, e);
|
|
7210
7215
|
}
|
|
7211
|
-
function
|
|
7216
|
+
function Xd(n) {
|
|
7212
7217
|
var e = "";
|
|
7213
7218
|
return Object.keys(n).forEach(function(t) {
|
|
7214
7219
|
e.length !== 0 && (e += "&"), e += t + "=" + n[t];
|
|
7215
7220
|
}), e;
|
|
7216
7221
|
}
|
|
7217
|
-
function
|
|
7222
|
+
function Jd(n) {
|
|
7218
7223
|
return n === "sandbox" ? "https://www.sandbox.paypal.com/sdk/js" : "https://www.paypal.com/sdk/js";
|
|
7219
7224
|
}
|
|
7220
|
-
function
|
|
7225
|
+
function La(n, e) {
|
|
7221
7226
|
e === void 0 && (e = {});
|
|
7222
7227
|
var t = document.createElement("script");
|
|
7223
7228
|
return t.src = n, Object.keys(e).forEach(function(r) {
|
|
7224
7229
|
t.setAttribute(r, e[r]), r === "data-csp-nonce" && t.setAttribute("nonce", e["data-csp-nonce"]);
|
|
7225
7230
|
}), t;
|
|
7226
7231
|
}
|
|
7227
|
-
function
|
|
7228
|
-
if (e === void 0 && (e = Promise),
|
|
7232
|
+
function ep(n, e) {
|
|
7233
|
+
if (e === void 0 && (e = Promise), Pa(n, e), typeof document == "undefined")
|
|
7229
7234
|
return e.resolve(null);
|
|
7230
|
-
var t =
|
|
7231
|
-
return i["data-js-sdk-library"] || (i["data-js-sdk-library"] = "paypal-js"),
|
|
7235
|
+
var t = $d(n), r = t.url, i = t.attributes, a = i["data-namespace"] || "paypal", s = fi(a);
|
|
7236
|
+
return i["data-js-sdk-library"] || (i["data-js-sdk-library"] = "paypal-js"), Yd(r, i) && s ? e.resolve(s) : tp({
|
|
7232
7237
|
url: r,
|
|
7233
7238
|
attributes: i
|
|
7234
7239
|
}, e).then(function() {
|
|
7235
|
-
var o =
|
|
7240
|
+
var o = fi(a);
|
|
7236
7241
|
if (o)
|
|
7237
7242
|
return o;
|
|
7238
7243
|
throw new Error("The window.".concat(a, " global variable is not available."));
|
|
7239
7244
|
});
|
|
7240
7245
|
}
|
|
7241
|
-
function
|
|
7242
|
-
e === void 0 && (e = Promise),
|
|
7246
|
+
function tp(n, e) {
|
|
7247
|
+
e === void 0 && (e = Promise), Pa(n, e);
|
|
7243
7248
|
var t = n.url, r = n.attributes;
|
|
7244
7249
|
if (typeof t != "string" || t.length === 0)
|
|
7245
7250
|
throw new Error("Invalid url.");
|
|
@@ -7248,7 +7253,7 @@ function ep(n, e) {
|
|
|
7248
7253
|
return new e(function(i, a) {
|
|
7249
7254
|
if (typeof document == "undefined")
|
|
7250
7255
|
return i();
|
|
7251
|
-
|
|
7256
|
+
Qd({
|
|
7252
7257
|
url: t,
|
|
7253
7258
|
attributes: r,
|
|
7254
7259
|
onSuccess: function() {
|
|
@@ -7261,10 +7266,10 @@ function ep(n, e) {
|
|
|
7261
7266
|
});
|
|
7262
7267
|
});
|
|
7263
7268
|
}
|
|
7264
|
-
function
|
|
7269
|
+
function fi(n) {
|
|
7265
7270
|
return window[n];
|
|
7266
7271
|
}
|
|
7267
|
-
function
|
|
7272
|
+
function Pa(n, e) {
|
|
7268
7273
|
if (typeof n != "object" || n === null)
|
|
7269
7274
|
throw new Error("Expected an options object.");
|
|
7270
7275
|
var t = n.environment;
|
|
@@ -7273,13 +7278,13 @@ function La(n, e) {
|
|
|
7273
7278
|
if (typeof e != "undefined" && typeof e != "function")
|
|
7274
7279
|
throw new Error("Expected PromisePonyfill to be a function.");
|
|
7275
7280
|
}
|
|
7276
|
-
const
|
|
7281
|
+
const np = {
|
|
7277
7282
|
layout: "vertical",
|
|
7278
7283
|
tagline: !1,
|
|
7279
7284
|
height: 40,
|
|
7280
7285
|
borderRadius: 12
|
|
7281
7286
|
};
|
|
7282
|
-
class
|
|
7287
|
+
class rp {
|
|
7283
7288
|
constructor() {
|
|
7284
7289
|
b(this, "paypal", null);
|
|
7285
7290
|
}
|
|
@@ -7287,7 +7292,7 @@ class np {
|
|
|
7287
7292
|
init(e) {
|
|
7288
7293
|
return j(this, null, function* () {
|
|
7289
7294
|
try {
|
|
7290
|
-
this.paypal = yield
|
|
7295
|
+
this.paypal = yield ep(e);
|
|
7291
7296
|
} catch (t) {
|
|
7292
7297
|
console.error("failed to load the PayPal JS SDK script", t);
|
|
7293
7298
|
}
|
|
@@ -7297,9 +7302,9 @@ class np {
|
|
|
7297
7302
|
render(e, t) {
|
|
7298
7303
|
return j(this, null, function* () {
|
|
7299
7304
|
var r, i;
|
|
7300
|
-
this.paypal && (yield (i = (r = this.paypal).Buttons) == null ? void 0 : i.call(r,
|
|
7305
|
+
this.paypal && (yield (i = (r = this.paypal).Buttons) == null ? void 0 : i.call(r, Q({
|
|
7301
7306
|
fundingSource: "paypal",
|
|
7302
|
-
style:
|
|
7307
|
+
style: np
|
|
7303
7308
|
}, t)).render(e));
|
|
7304
7309
|
});
|
|
7305
7310
|
}
|
|
@@ -7307,9 +7312,9 @@ class np {
|
|
|
7307
7312
|
function Te(n) {
|
|
7308
7313
|
throw new Error('Could not dynamically require "' + n + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
7309
7314
|
}
|
|
7310
|
-
var Dt = { exports: {} },
|
|
7311
|
-
function
|
|
7312
|
-
return
|
|
7315
|
+
var Dt = { exports: {} }, vi;
|
|
7316
|
+
function ip() {
|
|
7317
|
+
return vi || (vi = 1, function(n, e) {
|
|
7313
7318
|
(function(t) {
|
|
7314
7319
|
n.exports = t();
|
|
7315
7320
|
})(function() {
|
|
@@ -8982,11 +8987,11 @@ function rp() {
|
|
|
8982
8987
|
});
|
|
8983
8988
|
}(Dt)), Dt.exports;
|
|
8984
8989
|
}
|
|
8985
|
-
var
|
|
8986
|
-
const
|
|
8987
|
-
var Vt = { exports: {} },
|
|
8988
|
-
function
|
|
8989
|
-
return
|
|
8990
|
+
var ap = ip();
|
|
8991
|
+
const sp = /* @__PURE__ */ Ta(ap);
|
|
8992
|
+
var Vt = { exports: {} }, gi;
|
|
8993
|
+
function op() {
|
|
8994
|
+
return gi || (gi = 1, function(n, e) {
|
|
8990
8995
|
(function(t) {
|
|
8991
8996
|
n.exports = t();
|
|
8992
8997
|
})(function() {
|
|
@@ -11878,9 +11883,9 @@ function sp() {
|
|
|
11878
11883
|
});
|
|
11879
11884
|
}(Vt)), Vt.exports;
|
|
11880
11885
|
}
|
|
11881
|
-
var
|
|
11882
|
-
const
|
|
11883
|
-
class
|
|
11886
|
+
var lp = op();
|
|
11887
|
+
const cp = /* @__PURE__ */ Ta(lp);
|
|
11888
|
+
class up {
|
|
11884
11889
|
constructor() {
|
|
11885
11890
|
b(this, "client", null);
|
|
11886
11891
|
b(this, "venmoInstance", null);
|
|
@@ -11889,7 +11894,7 @@ class cp {
|
|
|
11889
11894
|
init(e) {
|
|
11890
11895
|
return j(this, null, function* () {
|
|
11891
11896
|
try {
|
|
11892
|
-
this.client = yield
|
|
11897
|
+
this.client = yield sp.create({ authorization: e.authorization });
|
|
11893
11898
|
} catch (t) {
|
|
11894
11899
|
throw console.error("Failed to initialize Braintree client:", t), t;
|
|
11895
11900
|
}
|
|
@@ -11901,7 +11906,7 @@ class cp {
|
|
|
11901
11906
|
if (!this.client)
|
|
11902
11907
|
throw new Error("Braintree client must be initialized before creating Venmo instance");
|
|
11903
11908
|
try {
|
|
11904
|
-
return this.venmoInstance = yield
|
|
11909
|
+
return this.venmoInstance = yield cp.create(Q({
|
|
11905
11910
|
client: this.client,
|
|
11906
11911
|
allowDesktop: !0,
|
|
11907
11912
|
mobileWebFallBack: !0,
|
|
@@ -11936,20 +11941,19 @@ class cp {
|
|
|
11936
11941
|
});
|
|
11937
11942
|
}
|
|
11938
11943
|
}
|
|
11939
|
-
class
|
|
11944
|
+
class dp {
|
|
11940
11945
|
constructor() {
|
|
11941
|
-
b(this, "ev", new
|
|
11942
|
-
b(this, "paypal", new
|
|
11943
|
-
b(this, "braintree", new
|
|
11946
|
+
b(this, "ev", new Ba());
|
|
11947
|
+
b(this, "paypal", new rp());
|
|
11948
|
+
b(this, "braintree", new up());
|
|
11944
11949
|
b(this, "state", {
|
|
11945
|
-
translate: new
|
|
11946
|
-
checkout: new
|
|
11947
|
-
transaction: new
|
|
11948
|
-
styles: new
|
|
11950
|
+
translate: new Wd(),
|
|
11951
|
+
checkout: new od(),
|
|
11952
|
+
transaction: new ud(),
|
|
11953
|
+
styles: new cd()
|
|
11949
11954
|
});
|
|
11950
|
-
b(this, "checkout", new
|
|
11955
|
+
b(this, "checkout", new ad({
|
|
11951
11956
|
state: this.state,
|
|
11952
|
-
// ToDo: add braintree
|
|
11953
11957
|
service: { ev: this.ev, paypal: this.paypal, braintree: this.braintree }
|
|
11954
11958
|
}));
|
|
11955
11959
|
}
|
|
@@ -11957,10 +11961,10 @@ class up {
|
|
|
11957
11961
|
Object.values(this.state).forEach((e) => e.clearState());
|
|
11958
11962
|
}
|
|
11959
11963
|
}
|
|
11960
|
-
class
|
|
11964
|
+
class fp {
|
|
11961
11965
|
constructor(e) {
|
|
11962
11966
|
b(this, "parent");
|
|
11963
|
-
b(this, "core", new
|
|
11967
|
+
b(this, "core", new dp());
|
|
11964
11968
|
this.parent = e;
|
|
11965
11969
|
}
|
|
11966
11970
|
mount(e) {
|
|
@@ -11976,7 +11980,7 @@ class mp {
|
|
|
11976
11980
|
}
|
|
11977
11981
|
}
|
|
11978
11982
|
export {
|
|
11979
|
-
|
|
11980
|
-
|
|
11983
|
+
dp as Core,
|
|
11984
|
+
fp as PayNextCheckout
|
|
11981
11985
|
};
|
|
11982
11986
|
//# sourceMappingURL=index.es.js.map
|