@paynext/sdk 0.0.54 → 0.0.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,25 +1,25 @@
1
- var xi = Object.defineProperty, Pi = Object.defineProperties;
2
- var Ri = Object.getOwnPropertyDescriptors;
1
+ var ki = Object.defineProperty, Mi = Object.defineProperties;
2
+ var Si = Object.getOwnPropertyDescriptors;
3
3
  var at = Object.getOwnPropertySymbols;
4
- var wn = Object.prototype.hasOwnProperty, Tn = Object.prototype.propertyIsEnumerable;
5
- var yt = (n, t, e) => t in n ? xi(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, j = (n, t) => {
4
+ var On = Object.prototype.hasOwnProperty, Nn = Object.prototype.propertyIsEnumerable;
5
+ var bt = (n, t, e) => t in n ? ki(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, j = (n, t) => {
6
6
  for (var e in t || (t = {}))
7
- wn.call(t, e) && yt(n, e, t[e]);
7
+ On.call(t, e) && bt(n, e, t[e]);
8
8
  if (at)
9
9
  for (var e of at(t))
10
- Tn.call(t, e) && yt(n, e, t[e]);
10
+ Nn.call(t, e) && bt(n, e, t[e]);
11
11
  return n;
12
- }, J = (n, t) => Pi(n, Ri(t));
12
+ }, X = (n, t) => Mi(n, Si(t));
13
13
  var ge = (n, t) => {
14
14
  var e = {};
15
15
  for (var r in n)
16
- wn.call(n, r) && t.indexOf(r) < 0 && (e[r] = n[r]);
16
+ On.call(n, r) && t.indexOf(r) < 0 && (e[r] = n[r]);
17
17
  if (n != null && at)
18
18
  for (var r of at(n))
19
- t.indexOf(r) < 0 && Tn.call(n, r) && (e[r] = n[r]);
19
+ t.indexOf(r) < 0 && Nn.call(n, r) && (e[r] = n[r]);
20
20
  return e;
21
21
  };
22
- var b = (n, t, e) => yt(n, typeof t != "symbol" ? t + "" : t, e);
22
+ var b = (n, t, e) => bt(n, typeof t != "symbol" ? t + "" : t, e);
23
23
  var z = (n, t, e) => new Promise((r, i) => {
24
24
  var a = (l) => {
25
25
  try {
@@ -37,7 +37,7 @@ var z = (n, t, e) => new Promise((r, i) => {
37
37
  o((e = e.apply(n, t)).next());
38
38
  });
39
39
  let st = null;
40
- function ki() {
40
+ function Di() {
41
41
  return z(this, null, function* () {
42
42
  return st || (st = new Promise((n, t) => {
43
43
  const e = document.createElement("script");
@@ -51,27 +51,27 @@ function ki() {
51
51
  }), st);
52
52
  });
53
53
  }
54
- function gr() {
54
+ function Er() {
55
55
  return z(this, null, function* () {
56
56
  if (window.Evervault)
57
57
  return window.Evervault;
58
58
  try {
59
- return yield ki(), window.Evervault;
59
+ return yield Di(), window.Evervault;
60
60
  } catch (n) {
61
61
  throw new Error("Failed to load Evervault.js");
62
62
  }
63
63
  });
64
64
  }
65
- function Mi(n, t, e) {
65
+ function Vi(n, t, e) {
66
66
  return z(this, null, function* () {
67
- const r = yield gr();
67
+ const r = yield Er();
68
68
  return new r(n, t, e);
69
69
  });
70
70
  }
71
71
  Promise.resolve().then(() => {
72
- gr();
72
+ Er();
73
73
  });
74
- let Si = class {
74
+ let Fi = class {
75
75
  constructor(t) {
76
76
  b(this, "apple", null);
77
77
  b(this, "isAvailable", !1);
@@ -81,7 +81,7 @@ let Si = class {
81
81
  init(c, d) {
82
82
  return z(this, arguments, function* ({ transaction: t, locale: e, supportedCardTypes: r, onReady: i, onError: a, onSuccess: s, onCancel: o }, l) {
83
83
  const u = this.ev.transactions.create(t);
84
- this.apple = this.ev.ui.applePay(u, J(j({
84
+ this.apple = this.ev.ui.applePay(u, X(j({
85
85
  locale: e,
86
86
  borderRadius: 12,
87
87
  size: {
@@ -112,7 +112,7 @@ let Si = class {
112
112
  !this.apple || !this.isAvailable || (t.innerHTML = "", yield this.apple.mount(t), (e = this.onReady) == null || e.call(this));
113
113
  });
114
114
  }
115
- }, Di = class {
115
+ }, Ui = class {
116
116
  constructor(t) {
117
117
  b(this, "google", null);
118
118
  this.ev = t;
@@ -120,7 +120,7 @@ let Si = class {
120
120
  init(l, c) {
121
121
  return z(this, arguments, function* ({ transaction: t, locale: e, onReady: r, onError: i, onSuccess: a, onCancel: s }, o) {
122
122
  const d = this.ev.transactions.create(t);
123
- this.google = this.ev.ui.googlePay(d, J(j({
123
+ this.google = this.ev.ui.googlePay(d, X(j({
124
124
  locale: e,
125
125
  size: {
126
126
  width: "100%",
@@ -167,7 +167,7 @@ class de {
167
167
  this.listeners = [];
168
168
  }
169
169
  }
170
- class Vi {
170
+ class Bi {
171
171
  constructor(t) {
172
172
  b(this, "threeDs", null);
173
173
  this.ev = t;
@@ -183,7 +183,7 @@ class Vi {
183
183
  });
184
184
  }
185
185
  }
186
- class Fi {
186
+ class ji {
187
187
  constructor() {
188
188
  b(this, "isReady", !1);
189
189
  b(this, "ev", null);
@@ -202,14 +202,14 @@ class Fi {
202
202
  // init ev
203
203
  initEv(t) {
204
204
  return z(this, null, function* () {
205
- this.isShouldLoad(t) && (this.isReady = !1, this.ev = yield Mi(t.teamId, t.appId), this.apple = new Si(this.ev), this.google = new Di(this.ev), this.events.ready.emit(), this.isReady = !0);
205
+ this.isShouldLoad(t) && (this.isReady = !1, this.ev = yield Vi(t.teamId, t.appId), this.apple = new Fi(this.ev), this.google = new Ui(this.ev), this.events.ready.emit(), this.isReady = !0);
206
206
  });
207
207
  }
208
208
  // init three ds
209
209
  initThreeDs(t) {
210
210
  return z(this, null, function* () {
211
211
  if (!this.ev) throw new Error("Evervault should be init before using Three DS Secure");
212
- this.threeDs = new Vi(this.ev), yield this.threeDs.init(t), yield this.threeDs.render();
212
+ this.threeDs = new Bi(this.ev), yield this.threeDs.init(t), yield this.threeDs.render();
213
213
  });
214
214
  }
215
215
  // init apple
@@ -256,10 +256,10 @@ class Fi {
256
256
  return this.ev;
257
257
  }
258
258
  }
259
- function Gt(n) {
259
+ function Yt(n) {
260
260
  return typeof n == "object" && !Array.isArray(n);
261
261
  }
262
- function Ui(n, t, e) {
262
+ function zi(n, t, e) {
263
263
  var r;
264
264
  if (n instanceof EventTarget)
265
265
  return [n];
@@ -270,72 +270,72 @@ function Ui(n, t, e) {
270
270
  }
271
271
  return Array.from(n);
272
272
  }
273
- function yr(n, t, e, r) {
274
- return typeof n == "string" && Gt(t) ? Ui(n, e, r) : n instanceof NodeList ? Array.from(n) : Array.isArray(n) ? n : [n];
273
+ function _r(n, t, e, r) {
274
+ return typeof n == "string" && Yt(t) ? zi(n, e, r) : n instanceof NodeList ? Array.from(n) : Array.isArray(n) ? n : [n];
275
275
  }
276
- function Bi(n, t, e) {
276
+ function Ki(n, t, e) {
277
277
  return n * (t + 1);
278
278
  }
279
- function In(n, t, e, r) {
279
+ function Ln(n, t, e, r) {
280
280
  var i;
281
281
  return typeof t == "number" ? t : t.startsWith("-") || t.startsWith("+") ? Math.max(0, n + parseFloat(t)) : t === "<" ? e : (i = r.get(t)) != null ? i : n;
282
282
  }
283
- const tt = (n, t, e) => n + (t - n) * e, ji = (n, t, e) => {
283
+ const tt = (n, t, e) => n + (t - n) * e, qi = (n, t, e) => {
284
284
  const r = t - n;
285
285
  return ((e - n) % r + r) % r + n;
286
- }, br = (n) => Array.isArray(n) && typeof n[0] != "number";
287
- function Er(n, t) {
288
- return br(n) ? n[ji(0, n.length, t)] : n;
286
+ }, Cr = (n) => Array.isArray(n) && typeof n[0] != "number";
287
+ function Ar(n, t) {
288
+ return Cr(n) ? n[qi(0, n.length, t)] : n;
289
289
  }
290
- function zi(n, t) {
290
+ function Hi(n, t) {
291
291
  n.indexOf(t) === -1 && n.push(t);
292
292
  }
293
- function _r(n, t) {
293
+ function wr(n, t) {
294
294
  const e = n.indexOf(t);
295
295
  e > -1 && n.splice(e, 1);
296
296
  }
297
- function Ki(n, t, e) {
297
+ function Wi(n, t, e) {
298
298
  for (let r = 0; r < n.length; r++) {
299
299
  const i = n[r];
300
- i.at > t && i.at < e && (_r(n, i), r--);
300
+ i.at > t && i.at < e && (wr(n, i), r--);
301
301
  }
302
302
  }
303
- function qi(n, t, e, r, i, a) {
304
- Ki(n, i, a);
303
+ function Gi(n, t, e, r, i, a) {
304
+ Wi(n, i, a);
305
305
  for (let s = 0; s < t.length; s++)
306
306
  n.push({
307
307
  value: t[s],
308
308
  at: tt(i, a, r[s]),
309
- easing: Er(e, s)
309
+ easing: Ar(e, s)
310
310
  });
311
311
  }
312
- function Hi(n, t) {
312
+ function Yi(n, t) {
313
313
  for (let e = 0; e < n.length; e++)
314
314
  n[e] = n[e] / (t + 1);
315
315
  }
316
- function Wi(n, t) {
316
+ function $i(n, t) {
317
317
  return n.at === t.at ? n.value === null ? 1 : t.value === null ? -1 : 0 : n.at - t.at;
318
318
  }
319
- const me = (n) => !!(n && n.getVelocity), Yt = /* @__NO_SIDE_EFFECTS__ */ (n, t, e) => {
319
+ const me = (n) => !!(n && n.getVelocity), $t = /* @__NO_SIDE_EFFECTS__ */ (n, t, e) => {
320
320
  const r = t - n;
321
321
  return r === 0 ? 1 : (e - n) / r;
322
322
  };
323
- function Cr(n, t) {
323
+ function Tr(n, t) {
324
324
  const e = n[n.length - 1];
325
325
  for (let r = 1; r <= t; r++) {
326
- const i = /* @__PURE__ */ Yt(0, t, r);
326
+ const i = /* @__PURE__ */ $t(0, t, r);
327
327
  n.push(tt(e, 1, i));
328
328
  }
329
329
  }
330
- function Ar(n) {
330
+ function Ir(n) {
331
331
  const t = [0];
332
- return Cr(t, n.length - 1), t;
332
+ return Tr(t, n.length - 1), t;
333
333
  }
334
- function $t(n) {
334
+ function Qt(n) {
335
335
  return typeof n == "function" && "applyToOptions" in n;
336
336
  }
337
337
  const ht = 2e4;
338
- function Qt(n) {
338
+ function Zt(n) {
339
339
  let t = 0;
340
340
  const e = 50;
341
341
  let r = n.next(t);
@@ -344,8 +344,8 @@ function Qt(n) {
344
344
  return t >= ht ? 1 / 0 : t;
345
345
  }
346
346
  const ye = /* @__NO_SIDE_EFFECTS__ */ (n) => n * 1e3, _e = /* @__NO_SIDE_EFFECTS__ */ (n) => n / 1e3;
347
- function wr(n, t = 100, e) {
348
- const r = e(J(j({}, n), { keyframes: [0, t] })), i = Math.min(Qt(r), ht);
347
+ function Or(n, t = 100, e) {
348
+ const r = e(X(j({}, n), { keyframes: [0, t] })), i = Math.min(Zt(r), ht);
349
349
  return {
350
350
  type: "keyframes",
351
351
  ease: (a) => r.next(i * a).value / t,
@@ -361,8 +361,8 @@ process.env.NODE_ENV !== "production" && (nt = (n, t) => {
361
361
  if (!n)
362
362
  throw new Error(t);
363
363
  });
364
- const Gi = "easeInOut", Yi = 20;
365
- function $i(n, a = {}, r, i) {
364
+ const Qi = "easeInOut", Zi = 20;
365
+ function Xi(n, a = {}, r, i) {
366
366
  var s = a, { defaultTransition: t = {} } = s, e = ge(s, ["defaultTransition"]);
367
367
  const o = t.duration || 0.3, l = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), d = {}, u = /* @__PURE__ */ new Map();
368
368
  let h = 0, p = 0, m = 0;
@@ -372,56 +372,56 @@ function $i(n, a = {}, r, i) {
372
372
  u.set(v, p);
373
373
  continue;
374
374
  } else if (!Array.isArray(v)) {
375
- u.set(v.name, In(p, v.at, h, u));
375
+ u.set(v.name, Ln(p, v.at, h, u));
376
376
  continue;
377
377
  }
378
378
  let [y, w, T = {}] = v;
379
- T.at !== void 0 && (p = In(p, T.at, h, u));
379
+ T.at !== void 0 && (p = Ln(p, T.at, h, u));
380
380
  let x = 0;
381
381
  const C = (I, O, R, U = 0, H = 0) => {
382
- const W = Qi(I), V = O, { delay: S = 0, times: F = Ar(W), type: q = "keyframes", repeat: ee, repeatType: M, repeatDelay: Y = 0 } = V, K = ge(V, ["delay", "times", "type", "repeat", "repeatType", "repeatDelay"]);
382
+ const W = Ji(I), V = O, { delay: S = 0, times: F = Ir(W), type: q = "keyframes", repeat: ee, repeatType: M, repeatDelay: Y = 0 } = V, K = ge(V, ["delay", "times", "type", "repeat", "repeatType", "repeatDelay"]);
383
383
  let { ease: g = t.ease || "easeOut", duration: E } = O;
384
- const k = typeof S == "function" ? S(U, H) : S, B = W.length, _ = $t(q) ? q : i == null ? void 0 : i[q];
384
+ const k = typeof S == "function" ? S(U, H) : S, B = W.length, _ = Qt(q) ? q : i == null ? void 0 : i[q];
385
385
  if (B <= 2 && _) {
386
386
  let L = 100;
387
- if (B === 2 && Ji(W)) {
387
+ if (B === 2 && na(W)) {
388
388
  const se = W[1] - W[0];
389
389
  L = Math.abs(se);
390
390
  }
391
391
  const G = j({}, K);
392
392
  E !== void 0 && (G.duration = /* @__PURE__ */ ye(E));
393
- const X = wr(G, L, _);
394
- g = X.ease, E = X.duration;
393
+ const J = Or(G, L, _);
394
+ g = J.ease, E = J.duration;
395
395
  }
396
396
  E != null || (E = o);
397
397
  const N = p + k;
398
398
  F.length === 1 && F[0] === 0 && (F[1] = 1);
399
399
  const A = F.length - W.length;
400
- if (A > 0 && Cr(F, A), W.length === 1 && W.unshift(null), ee) {
401
- Ce(ee < Yi, "Repeat count too high, must be less than 20"), E = Bi(E, ee);
400
+ if (A > 0 && Tr(F, A), W.length === 1 && W.unshift(null), ee) {
401
+ Ce(ee < Zi, "Repeat count too high, must be less than 20"), E = Ki(E, ee);
402
402
  const L = [...W], G = [...F];
403
403
  g = Array.isArray(g) ? [...g] : [g];
404
- const X = [...g];
404
+ const J = [...g];
405
405
  for (let se = 0; se < ee; se++) {
406
406
  W.push(...L);
407
407
  for (let D = 0; D < L.length; D++)
408
- F.push(G[D] + (se + 1)), g.push(D === 0 ? "linear" : Er(X, D - 1));
408
+ F.push(G[D] + (se + 1)), g.push(D === 0 ? "linear" : Ar(J, D - 1));
409
409
  }
410
- Hi(F, ee);
410
+ Yi(F, ee);
411
411
  }
412
412
  const P = N + E;
413
- qi(R, W, g, F, N, P), x = Math.max(k + E, x), m = Math.max(P, m);
413
+ Gi(R, W, g, F, N, P), x = Math.max(k + E, x), m = Math.max(P, m);
414
414
  };
415
415
  if (me(y)) {
416
- const I = On(y, c);
417
- C(w, T, Nn("default", I));
416
+ const I = xn(y, c);
417
+ C(w, T, Pn("default", I));
418
418
  } else {
419
- const I = yr(y, w, r, d), O = I.length;
419
+ const I = _r(y, w, r, d), O = I.length;
420
420
  for (let R = 0; R < O; R++) {
421
421
  w = w, T = T;
422
- const U = I[R], H = On(U, c);
422
+ const U = I[R], H = xn(U, c);
423
423
  for (const W in w)
424
- C(w[W], Zi(T, W), Nn(W, H), R, O);
424
+ C(w[W], ea(T, W), Pn(W, H), R, O);
425
425
  }
426
426
  }
427
427
  h = p, p += x;
@@ -429,18 +429,18 @@ function $i(n, a = {}, r, i) {
429
429
  return c.forEach((f, v) => {
430
430
  for (const y in f) {
431
431
  const w = f[y];
432
- w.sort(Wi);
432
+ w.sort($i);
433
433
  const T = [], x = [], C = [];
434
434
  for (let O = 0; O < w.length; O++) {
435
435
  const { at: R, value: U, easing: H } = w[O];
436
- T.push(U), x.push(/* @__PURE__ */ Yt(0, m, R)), C.push(H || "easeOut");
436
+ T.push(U), x.push(/* @__PURE__ */ $t(0, m, R)), C.push(H || "easeOut");
437
437
  }
438
- x[0] !== 0 && (x.unshift(0), T.unshift(T[0]), C.unshift(Gi)), x[x.length - 1] !== 1 && (x.push(1), T.push(null)), l.has(v) || l.set(v, {
438
+ x[0] !== 0 && (x.unshift(0), T.unshift(T[0]), C.unshift(Qi)), x[x.length - 1] !== 1 && (x.push(1), T.push(null)), l.has(v) || l.set(v, {
439
439
  keyframes: {},
440
440
  transition: {}
441
441
  });
442
442
  const I = l.get(v);
443
- I.keyframes[y] = T, I.transition[y] = j(J(j({}, t), {
443
+ I.keyframes[y] = T, I.transition[y] = j(X(j({}, t), {
444
444
  duration: m,
445
445
  ease: C,
446
446
  times: x
@@ -448,39 +448,39 @@ function $i(n, a = {}, r, i) {
448
448
  }
449
449
  }), l;
450
450
  }
451
- function On(n, t) {
451
+ function xn(n, t) {
452
452
  return !t.has(n) && t.set(n, {}), t.get(n);
453
453
  }
454
- function Nn(n, t) {
454
+ function Pn(n, t) {
455
455
  return t[n] || (t[n] = []), t[n];
456
456
  }
457
- function Qi(n) {
457
+ function Ji(n) {
458
458
  return Array.isArray(n) ? n : [n];
459
459
  }
460
- function Zi(n, t) {
460
+ function ea(n, t) {
461
461
  return n && n[t] ? j(j({}, n), n[t]) : j({}, n);
462
462
  }
463
- const Xi = (n) => typeof n == "number", Ji = (n) => n.every(Xi), Qe = /* @__PURE__ */ new WeakMap(), ea = (n) => Array.isArray(n);
464
- function Ln(n) {
463
+ const ta = (n) => typeof n == "number", na = (n) => n.every(ta), Qe = /* @__PURE__ */ new WeakMap(), ra = (n) => Array.isArray(n);
464
+ function Rn(n) {
465
465
  const t = [{}, {}];
466
466
  return n == null || n.values.forEach((e, r) => {
467
467
  t[0][r] = e.get(), t[1][r] = e.getVelocity();
468
468
  }), t;
469
469
  }
470
- function Tr(n, t, e, r) {
470
+ function Nr(n, t, e, r) {
471
471
  if (typeof t == "function") {
472
- const [i, a] = Ln(r);
472
+ const [i, a] = Rn(r);
473
473
  t = t(e !== void 0 ? e : n.custom, i, a);
474
474
  }
475
475
  if (typeof t == "string" && (t = n.variants && n.variants[t]), typeof t == "function") {
476
- const [i, a] = Ln(r);
476
+ const [i, a] = Rn(r);
477
477
  t = t(e !== void 0 ? e : n.custom, i, a);
478
478
  }
479
479
  return t;
480
480
  }
481
- function ta(n, t, e) {
481
+ function ia(n, t, e) {
482
482
  const r = n.getProps();
483
- return Tr(r, t, r.custom, n);
483
+ return Nr(r, t, r.custom, n);
484
484
  }
485
485
  const ot = [
486
486
  "setup",
@@ -500,7 +500,7 @@ const ot = [
500
500
  "postRender"
501
501
  // Compute
502
502
  ];
503
- function na(n, t) {
503
+ function aa(n, t) {
504
504
  let e = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = !1, a = !1;
505
505
  const s = /* @__PURE__ */ new WeakSet();
506
506
  let o = {
@@ -538,16 +538,16 @@ function na(n, t) {
538
538
  };
539
539
  return c;
540
540
  }
541
- const Ae = {}, ra = 40;
542
- function ia(n, t) {
541
+ const Ae = {}, sa = 40;
542
+ function oa(n, t) {
543
543
  let e = !1, r = !0;
544
544
  const i = {
545
545
  delta: 0,
546
546
  timestamp: 0,
547
547
  isProcessing: !1
548
- }, a = () => e = !0, s = ot.reduce((T, x) => (T[x] = na(a), T), {}), { setup: o, read: l, resolveKeyframes: c, preUpdate: d, update: u, preRender: h, render: p, postRender: m } = s, f = () => {
548
+ }, a = () => e = !0, s = ot.reduce((T, x) => (T[x] = aa(a), T), {}), { setup: o, read: l, resolveKeyframes: c, preUpdate: d, update: u, preRender: h, render: p, postRender: m } = s, f = () => {
549
549
  const T = Ae.useManualTiming ? i.timestamp : performance.now();
550
- e = !1, Ae.useManualTiming || (i.delta = r ? 1e3 / 60 : Math.max(Math.min(T - i.timestamp, ra), 1)), i.timestamp = T, i.isProcessing = !0, o.process(i), l.process(i), c.process(i), d.process(i), u.process(i), h.process(i), p.process(i), m.process(i), i.isProcessing = !1, e && t && (r = !1, n(f));
550
+ e = !1, Ae.useManualTiming || (i.delta = r ? 1e3 / 60 : Math.max(Math.min(T - i.timestamp, sa), 1)), i.timestamp = T, i.isProcessing = !0, o.process(i), l.process(i), c.process(i), d.process(i), u.process(i), h.process(i), p.process(i), m.process(i), i.isProcessing = !1, e && t && (r = !1, n(f));
551
551
  }, v = () => {
552
552
  e = !0, r = !0, i.isProcessing || n(f);
553
553
  };
@@ -559,26 +559,26 @@ function ia(n, t) {
559
559
  s[ot[x]].cancel(T);
560
560
  }, state: i, steps: s };
561
561
  }
562
- const Ve = /* @__NO_SIDE_EFFECTS__ */ (n) => n, { schedule: we, cancel: xt, state: mt } = /* @__PURE__ */ ia(typeof requestAnimationFrame != "undefined" ? requestAnimationFrame : Ve, !0);
562
+ const Ve = /* @__NO_SIDE_EFFECTS__ */ (n) => n, { schedule: we, cancel: Pt, state: mt } = /* @__PURE__ */ oa(typeof requestAnimationFrame != "undefined" ? requestAnimationFrame : Ve, !0);
563
563
  let pt;
564
- function aa() {
564
+ function la() {
565
565
  pt = void 0;
566
566
  }
567
567
  const ve = {
568
568
  now: () => (pt === void 0 && ve.set(mt.isProcessing || Ae.useManualTiming ? mt.timestamp : performance.now()), pt),
569
569
  set: (n) => {
570
- pt = n, queueMicrotask(aa);
570
+ pt = n, queueMicrotask(la);
571
571
  }
572
- }, xn = /* @__PURE__ */ new Set();
573
- function Ir(n, t, e) {
574
- n || xn.has(t) || (console.warn(t), xn.add(t));
572
+ }, kn = /* @__PURE__ */ new Set();
573
+ function Lr(n, t, e) {
574
+ n || kn.has(t) || (console.warn(t), kn.add(t));
575
575
  }
576
- class Or {
576
+ class xr {
577
577
  constructor() {
578
578
  this.subscriptions = [];
579
579
  }
580
580
  add(t) {
581
- return zi(this.subscriptions, t), () => _r(this.subscriptions, t);
581
+ return Hi(this.subscriptions, t), () => wr(this.subscriptions, t);
582
582
  }
583
583
  notify(t, e, r) {
584
584
  const i = this.subscriptions.length;
@@ -598,11 +598,11 @@ class Or {
598
598
  this.subscriptions.length = 0;
599
599
  }
600
600
  }
601
- function Nr(n, t) {
601
+ function Pr(n, t) {
602
602
  return t ? n * (1e3 / t) : 0;
603
603
  }
604
- const Pn = 30, sa = (n) => !isNaN(parseFloat(n));
605
- class oa {
604
+ const Mn = 30, ca = (n) => !isNaN(parseFloat(n));
605
+ class da {
606
606
  /**
607
607
  * @param init - The initiating value
608
608
  * @param config - Optional configuration options
@@ -620,7 +620,7 @@ class oa {
620
620
  }, this.hasAnimated = !1, this.setCurrent(t), this.owner = e.owner;
621
621
  }
622
622
  setCurrent(t) {
623
- this.current = t, this.updatedAt = ve.now(), this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity = sa(this.current));
623
+ this.current = t, this.updatedAt = ve.now(), this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity = ca(this.current));
624
624
  }
625
625
  setPrevFrameValue(t = this.current) {
626
626
  this.prevFrameValue = t, this.prevUpdatedAt = this.updatedAt;
@@ -666,10 +666,10 @@ class oa {
666
666
  * @deprecated
667
667
  */
668
668
  onChange(t) {
669
- return process.env.NODE_ENV !== "production" && Ir(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", t);
669
+ return process.env.NODE_ENV !== "production" && Lr(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", t);
670
670
  }
671
671
  on(t, e) {
672
- this.events[t] || (this.events[t] = new Or());
672
+ this.events[t] || (this.events[t] = new xr());
673
673
  const r = this.events[t].add(e);
674
674
  return t === "change" ? () => {
675
675
  r(), we.read(() => {
@@ -750,10 +750,10 @@ class oa {
750
750
  */
751
751
  getVelocity() {
752
752
  const t = ve.now();
753
- if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt > Pn)
753
+ if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt > Mn)
754
754
  return 0;
755
- const e = Math.min(this.updatedAt - this.prevUpdatedAt, Pn);
756
- return Nr(parseFloat(this.current) - parseFloat(this.prevFrameValue), e);
755
+ const e = Math.min(this.updatedAt - this.prevUpdatedAt, Mn);
756
+ return Pr(parseFloat(this.current) - parseFloat(this.prevFrameValue), e);
757
757
  }
758
758
  /**
759
759
  * Registers a new animation to control this `MotionValue`. Only one
@@ -806,41 +806,41 @@ class oa {
806
806
  }
807
807
  }
808
808
  function Ze(n, t) {
809
- return new oa(n, t);
809
+ return new da(n, t);
810
810
  }
811
- function la(n, t, e) {
811
+ function ua(n, t, e) {
812
812
  n.hasValue(t) ? n.getValue(t).set(e) : n.addValue(t, Ze(e));
813
813
  }
814
- function ca(n) {
815
- return ea(n) ? n[n.length - 1] || 0 : n;
814
+ function pa(n) {
815
+ return ra(n) ? n[n.length - 1] || 0 : n;
816
816
  }
817
- function da(n, t) {
818
- let s = ta(n, t) || {}, { transitionEnd: r = {}, transition: i = {} } = s, a = ge(s, ["transitionEnd", "transition"]);
817
+ function ha(n, t) {
818
+ let s = ia(n, t) || {}, { transitionEnd: r = {}, transition: i = {} } = s, a = ge(s, ["transitionEnd", "transition"]);
819
819
  a = j(j({}, a), r);
820
820
  for (const o in a) {
821
- const l = ca(a[o]);
822
- la(n, o, l);
821
+ const l = pa(a[o]);
822
+ ua(n, o, l);
823
823
  }
824
824
  }
825
- function ua(n) {
825
+ function ma(n) {
826
826
  return !!(me(n) && n.add);
827
827
  }
828
- function pa(n, t) {
828
+ function fa(n, t) {
829
829
  const e = n.getValue("willChange");
830
- if (ua(e))
830
+ if (ma(e))
831
831
  return e.add(t);
832
832
  if (!e && Ae.WillChange) {
833
833
  const r = new Ae.WillChange("auto");
834
834
  n.addValue("willChange", r), r.add(t);
835
835
  }
836
836
  }
837
- const Zt = (n) => n.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), ha = "framerAppearId", ma = "data-" + Zt(ha);
838
- function fa(n) {
839
- return n.props[ma];
837
+ const Xt = (n) => n.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), va = "framerAppearId", ga = "data-" + Xt(va);
838
+ function ya(n) {
839
+ return n.props[ga];
840
840
  }
841
- const va = (n) => n !== null;
842
- function ga(n, { repeat: t, repeatType: e = "loop" }, r) {
843
- const i = n.filter(va), a = t && e !== "loop" && t % 2 === 1 ? 0 : i.length - 1;
841
+ const ba = (n) => n !== null;
842
+ function Ea(n, { repeat: t, repeatType: e = "loop" }, r) {
843
+ const i = n.filter(ba), a = t && e !== "loop" && t % 2 === 1 ? 0 : i.length - 1;
844
844
  return i[a];
845
845
  }
846
846
  const Fe = [
@@ -861,62 +861,62 @@ const Fe = [
861
861
  "skew",
862
862
  "skewX",
863
863
  "skewY"
864
- ], Ue = new Set(Fe), ya = {
864
+ ], Ue = new Set(Fe), _a = {
865
865
  type: "spring",
866
866
  stiffness: 500,
867
867
  damping: 25,
868
868
  restSpeed: 10
869
- }, ba = (n) => ({
869
+ }, Ca = (n) => ({
870
870
  type: "spring",
871
871
  stiffness: 550,
872
872
  damping: n === 0 ? 2 * Math.sqrt(550) : 30,
873
873
  restSpeed: 10
874
- }), Ea = {
874
+ }), Aa = {
875
875
  type: "keyframes",
876
876
  duration: 0.8
877
- }, _a = {
877
+ }, wa = {
878
878
  type: "keyframes",
879
879
  ease: [0.25, 0.1, 0.35, 1],
880
880
  duration: 0.3
881
- }, Ca = (n, { keyframes: t }) => t.length > 2 ? Ea : Ue.has(n) ? n.startsWith("scale") ? ba(t[1]) : ya : _a;
882
- function Aa(u) {
881
+ }, Ta = (n, { keyframes: t }) => t.length > 2 ? Aa : Ue.has(n) ? n.startsWith("scale") ? Ca(t[1]) : _a : wa;
882
+ function Ia(u) {
883
883
  var h = u, { when: n, delay: t, delayChildren: e, staggerChildren: r, staggerDirection: i, repeat: a, repeatType: s, repeatDelay: o, from: l, elapsed: c } = h, d = ge(h, ["when", "delay", "delayChildren", "staggerChildren", "staggerDirection", "repeat", "repeatType", "repeatDelay", "from", "elapsed"]);
884
884
  return !!Object.keys(d).length;
885
885
  }
886
- function Lr(n, t) {
886
+ function Rr(n, t) {
887
887
  var e, r;
888
888
  return (r = (e = n == null ? void 0 : n[t]) != null ? e : n == null ? void 0 : n.default) != null ? r : n;
889
889
  }
890
- const xr = (n) => (t) => typeof t == "string" && t.startsWith(n), Pr = /* @__PURE__ */ xr("--"), wa = /* @__PURE__ */ xr("var(--"), Xt = (n) => wa(n) ? Ta.test(n.split("/*")[0].trim()) : !1, Ta = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, Pe = (n, t, e) => e > t ? t : e < n ? n : e, Be = {
890
+ const kr = (n) => (t) => typeof t == "string" && t.startsWith(n), Mr = /* @__PURE__ */ kr("--"), Oa = /* @__PURE__ */ kr("var(--"), Jt = (n) => Oa(n) ? Na.test(n.split("/*")[0].trim()) : !1, Na = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, Pe = (n, t, e) => e > t ? t : e < n ? n : e, Be = {
891
891
  test: (n) => typeof n == "number",
892
892
  parse: parseFloat,
893
893
  transform: (n) => n
894
- }, Xe = J(j({}, Be), {
894
+ }, Xe = X(j({}, Be), {
895
895
  transform: (n) => Pe(0, 1, n)
896
- }), lt = J(j({}, Be), {
896
+ }), lt = X(j({}, Be), {
897
897
  default: 1
898
- }), $e = (n) => Math.round(n * 1e5) / 1e5, Jt = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
899
- function Ia(n) {
898
+ }), $e = (n) => Math.round(n * 1e5) / 1e5, en = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
899
+ function La(n) {
900
900
  return n == null;
901
901
  }
902
- const Oa = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, en = (n, t) => (e) => !!(typeof e == "string" && Oa.test(e) && e.startsWith(n) || t && !Ia(e) && Object.prototype.hasOwnProperty.call(e, t)), Rr = (n, t, e) => (r) => {
902
+ const xa = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, tn = (n, t) => (e) => !!(typeof e == "string" && xa.test(e) && e.startsWith(n) || t && !La(e) && Object.prototype.hasOwnProperty.call(e, t)), Sr = (n, t, e) => (r) => {
903
903
  if (typeof r != "string")
904
904
  return r;
905
- const [i, a, s, o] = r.match(Jt);
905
+ const [i, a, s, o] = r.match(en);
906
906
  return {
907
907
  [n]: parseFloat(i),
908
908
  [t]: parseFloat(a),
909
909
  [e]: parseFloat(s),
910
910
  alpha: o !== void 0 ? parseFloat(o) : 1
911
911
  };
912
- }, Na = (n) => Pe(0, 255, n), bt = J(j({}, Be), {
913
- transform: (n) => Math.round(Na(n))
912
+ }, Pa = (n) => Pe(0, 255, n), Et = X(j({}, Be), {
913
+ transform: (n) => Math.round(Pa(n))
914
914
  }), Oe = {
915
- test: /* @__PURE__ */ en("rgb", "red"),
916
- parse: /* @__PURE__ */ Rr("red", "green", "blue"),
917
- transform: ({ red: n, green: t, blue: e, alpha: r = 1 }) => "rgba(" + bt.transform(n) + ", " + bt.transform(t) + ", " + bt.transform(e) + ", " + $e(Xe.transform(r)) + ")"
915
+ test: /* @__PURE__ */ tn("rgb", "red"),
916
+ parse: /* @__PURE__ */ Sr("red", "green", "blue"),
917
+ transform: ({ red: n, green: t, blue: e, alpha: r = 1 }) => "rgba(" + Et.transform(n) + ", " + Et.transform(t) + ", " + Et.transform(e) + ", " + $e(Xe.transform(r)) + ")"
918
918
  };
919
- function La(n) {
919
+ function Ra(n) {
920
920
  let t = "", e = "", r = "", i = "";
921
921
  return n.length > 5 ? (t = n.substring(1, 3), e = n.substring(3, 5), r = n.substring(5, 7), i = n.substring(7, 9)) : (t = n.substring(1, 2), e = n.substring(2, 3), r = n.substring(3, 4), i = n.substring(4, 5), t += t, e += e, r += r, i += i), {
922
922
  red: parseInt(t, 16),
@@ -925,31 +925,31 @@ function La(n) {
925
925
  alpha: i ? parseInt(i, 16) / 255 : 1
926
926
  };
927
927
  }
928
- const Pt = {
929
- test: /* @__PURE__ */ en("#"),
930
- parse: La,
928
+ const Rt = {
929
+ test: /* @__PURE__ */ tn("#"),
930
+ parse: Ra,
931
931
  transform: Oe.transform
932
932
  }, rt = /* @__NO_SIDE_EFFECTS__ */ (n) => ({
933
933
  test: (t) => typeof t == "string" && t.endsWith(n) && t.split(" ").length === 1,
934
934
  parse: parseFloat,
935
935
  transform: (t) => `${t}${n}`
936
- }), Te = /* @__PURE__ */ rt("deg"), Se = /* @__PURE__ */ rt("%"), Q = /* @__PURE__ */ rt("px"), xa = /* @__PURE__ */ rt("vh"), Pa = /* @__PURE__ */ rt("vw"), Rn = J(j({}, Se), {
936
+ }), Te = /* @__PURE__ */ rt("deg"), Se = /* @__PURE__ */ rt("%"), Q = /* @__PURE__ */ rt("px"), ka = /* @__PURE__ */ rt("vh"), Ma = /* @__PURE__ */ rt("vw"), Sn = X(j({}, Se), {
937
937
  parse: (n) => Se.parse(n) / 100,
938
938
  transform: (n) => Se.transform(n * 100)
939
939
  }), ke = {
940
- test: /* @__PURE__ */ en("hsl", "hue"),
941
- parse: /* @__PURE__ */ Rr("hue", "saturation", "lightness"),
940
+ test: /* @__PURE__ */ tn("hsl", "hue"),
941
+ parse: /* @__PURE__ */ Sr("hue", "saturation", "lightness"),
942
942
  transform: ({ hue: n, saturation: t, lightness: e, alpha: r = 1 }) => "hsla(" + Math.round(n) + ", " + Se.transform($e(t)) + ", " + Se.transform($e(e)) + ", " + $e(Xe.transform(r)) + ")"
943
943
  }, ue = {
944
- test: (n) => Oe.test(n) || Pt.test(n) || ke.test(n),
945
- parse: (n) => Oe.test(n) ? Oe.parse(n) : ke.test(n) ? ke.parse(n) : Pt.parse(n),
944
+ test: (n) => Oe.test(n) || Rt.test(n) || ke.test(n),
945
+ parse: (n) => Oe.test(n) ? Oe.parse(n) : ke.test(n) ? ke.parse(n) : Rt.parse(n),
946
946
  transform: (n) => typeof n == "string" ? n : n.hasOwnProperty("red") ? Oe.transform(n) : ke.transform(n)
947
- }, Ra = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
948
- function ka(n) {
947
+ }, Sa = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
948
+ function Da(n) {
949
949
  var t, e;
950
- return isNaN(n) && typeof n == "string" && (((t = n.match(Jt)) == null ? void 0 : t.length) || 0) + (((e = n.match(Ra)) == null ? void 0 : e.length) || 0) > 0;
950
+ return isNaN(n) && typeof n == "string" && (((t = n.match(en)) == null ? void 0 : t.length) || 0) + (((e = n.match(Sa)) == null ? void 0 : e.length) || 0) > 0;
951
951
  }
952
- const kr = "number", Mr = "color", Ma = "var", Sa = "var(", kn = "${}", Da = /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;
952
+ const Dr = "number", Vr = "color", Va = "var", Fa = "var(", Dn = "${}", Ua = /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;
953
953
  function Je(n) {
954
954
  const t = n.toString(), e = [], r = {
955
955
  color: [],
@@ -957,46 +957,46 @@ function Je(n) {
957
957
  var: []
958
958
  }, i = [];
959
959
  let a = 0;
960
- const o = t.replace(Da, (l) => (ue.test(l) ? (r.color.push(a), i.push(Mr), e.push(ue.parse(l))) : l.startsWith(Sa) ? (r.var.push(a), i.push(Ma), e.push(l)) : (r.number.push(a), i.push(kr), e.push(parseFloat(l))), ++a, kn)).split(kn);
960
+ const o = t.replace(Ua, (l) => (ue.test(l) ? (r.color.push(a), i.push(Vr), e.push(ue.parse(l))) : l.startsWith(Fa) ? (r.var.push(a), i.push(Va), e.push(l)) : (r.number.push(a), i.push(Dr), e.push(parseFloat(l))), ++a, Dn)).split(Dn);
961
961
  return { values: e, split: o, indexes: r, types: i };
962
962
  }
963
- function Sr(n) {
963
+ function Fr(n) {
964
964
  return Je(n).values;
965
965
  }
966
- function Dr(n) {
966
+ function Ur(n) {
967
967
  const { split: t, types: e } = Je(n), r = t.length;
968
968
  return (i) => {
969
969
  let a = "";
970
970
  for (let s = 0; s < r; s++)
971
971
  if (a += t[s], i[s] !== void 0) {
972
972
  const o = e[s];
973
- o === kr ? a += $e(i[s]) : o === Mr ? a += ue.transform(i[s]) : a += i[s];
973
+ o === Dr ? a += $e(i[s]) : o === Vr ? a += ue.transform(i[s]) : a += i[s];
974
974
  }
975
975
  return a;
976
976
  };
977
977
  }
978
- const Va = (n) => typeof n == "number" ? 0 : n;
979
- function Fa(n) {
980
- const t = Sr(n);
981
- return Dr(n)(t.map(Va));
978
+ const Ba = (n) => typeof n == "number" ? 0 : n;
979
+ function ja(n) {
980
+ const t = Fr(n);
981
+ return Ur(n)(t.map(Ba));
982
982
  }
983
983
  const je = {
984
- test: ka,
985
- parse: Sr,
986
- createTransformer: Dr,
987
- getAnimatableNone: Fa
984
+ test: Da,
985
+ parse: Fr,
986
+ createTransformer: Ur,
987
+ getAnimatableNone: ja
988
988
  };
989
- function Et(n, t, e) {
989
+ function _t(n, t, e) {
990
990
  return e < 0 && (e += 1), e > 1 && (e -= 1), e < 1 / 6 ? n + (t - n) * 6 * e : e < 1 / 2 ? t : e < 2 / 3 ? n + (t - n) * (2 / 3 - e) * 6 : n;
991
991
  }
992
- function Ua({ hue: n, saturation: t, lightness: e, alpha: r }) {
992
+ function za({ hue: n, saturation: t, lightness: e, alpha: r }) {
993
993
  n /= 360, t /= 100, e /= 100;
994
994
  let i = 0, a = 0, s = 0;
995
995
  if (!t)
996
996
  i = a = s = e;
997
997
  else {
998
998
  const o = e < 0.5 ? e * (1 + t) : e + t - e * t, l = 2 * e - o;
999
- i = Et(l, o, n + 1 / 3), a = Et(l, o, n), s = Et(l, o, n - 1 / 3);
999
+ i = _t(l, o, n + 1 / 3), a = _t(l, o, n), s = _t(l, o, n - 1 / 3);
1000
1000
  }
1001
1001
  return {
1002
1002
  red: Math.round(i * 255),
@@ -1008,53 +1008,53 @@ function Ua({ hue: n, saturation: t, lightness: e, alpha: r }) {
1008
1008
  function ft(n, t) {
1009
1009
  return (e) => e > 0 ? t : n;
1010
1010
  }
1011
- const _t = (n, t, e) => {
1011
+ const Ct = (n, t, e) => {
1012
1012
  const r = n * n, i = e * (t * t - r) + r;
1013
1013
  return i < 0 ? 0 : Math.sqrt(i);
1014
- }, Ba = [Pt, Oe, ke], ja = (n) => Ba.find((t) => t.test(n));
1015
- function Mn(n) {
1016
- const t = ja(n);
1014
+ }, Ka = [Rt, Oe, ke], qa = (n) => Ka.find((t) => t.test(n));
1015
+ function Vn(n) {
1016
+ const t = qa(n);
1017
1017
  if (nt(!!t, `'${n}' is not an animatable color. Use the equivalent color code instead.`), !t)
1018
1018
  return !1;
1019
1019
  let e = t.parse(n);
1020
- return t === ke && (e = Ua(e)), e;
1020
+ return t === ke && (e = za(e)), e;
1021
1021
  }
1022
- const Sn = (n, t) => {
1023
- const e = Mn(n), r = Mn(t);
1022
+ const Fn = (n, t) => {
1023
+ const e = Vn(n), r = Vn(t);
1024
1024
  if (!e || !r)
1025
1025
  return ft(n, t);
1026
1026
  const i = j({}, e);
1027
- return (a) => (i.red = _t(e.red, r.red, a), i.green = _t(e.green, r.green, a), i.blue = _t(e.blue, r.blue, a), i.alpha = tt(e.alpha, r.alpha, a), Oe.transform(i));
1028
- }, Rt = /* @__PURE__ */ new Set(["none", "hidden"]);
1029
- function za(n, t) {
1030
- return Rt.has(n) ? (e) => e <= 0 ? n : t : (e) => e >= 1 ? t : n;
1027
+ return (a) => (i.red = Ct(e.red, r.red, a), i.green = Ct(e.green, r.green, a), i.blue = Ct(e.blue, r.blue, a), i.alpha = tt(e.alpha, r.alpha, a), Oe.transform(i));
1028
+ }, kt = /* @__PURE__ */ new Set(["none", "hidden"]);
1029
+ function Ha(n, t) {
1030
+ return kt.has(n) ? (e) => e <= 0 ? n : t : (e) => e >= 1 ? t : n;
1031
1031
  }
1032
- const Ka = (n, t) => (e) => t(n(e)), tn = (...n) => n.reduce(Ka);
1033
- function qa(n, t) {
1032
+ const Wa = (n, t) => (e) => t(n(e)), nn = (...n) => n.reduce(Wa);
1033
+ function Ga(n, t) {
1034
1034
  return (e) => tt(n, t, e);
1035
1035
  }
1036
- function nn(n) {
1037
- return typeof n == "number" ? qa : typeof n == "string" ? Xt(n) ? ft : ue.test(n) ? Sn : Ga : Array.isArray(n) ? Vr : typeof n == "object" ? ue.test(n) ? Sn : Ha : ft;
1036
+ function rn(n) {
1037
+ return typeof n == "number" ? Ga : typeof n == "string" ? Jt(n) ? ft : ue.test(n) ? Fn : Qa : Array.isArray(n) ? Br : typeof n == "object" ? ue.test(n) ? Fn : Ya : ft;
1038
1038
  }
1039
- function Vr(n, t) {
1040
- const e = [...n], r = e.length, i = n.map((a, s) => nn(a)(a, t[s]));
1039
+ function Br(n, t) {
1040
+ const e = [...n], r = e.length, i = n.map((a, s) => rn(a)(a, t[s]));
1041
1041
  return (a) => {
1042
1042
  for (let s = 0; s < r; s++)
1043
1043
  e[s] = i[s](a);
1044
1044
  return e;
1045
1045
  };
1046
1046
  }
1047
- function Ha(n, t) {
1047
+ function Ya(n, t) {
1048
1048
  const e = j(j({}, n), t), r = {};
1049
1049
  for (const i in e)
1050
- n[i] !== void 0 && t[i] !== void 0 && (r[i] = nn(n[i])(n[i], t[i]));
1050
+ n[i] !== void 0 && t[i] !== void 0 && (r[i] = rn(n[i])(n[i], t[i]));
1051
1051
  return (i) => {
1052
1052
  for (const a in r)
1053
1053
  e[a] = r[a](i);
1054
1054
  return e;
1055
1055
  };
1056
1056
  }
1057
- function Wa(n, t) {
1057
+ function $a(n, t) {
1058
1058
  var i;
1059
1059
  const e = [], r = { color: 0, var: 0, number: 0 };
1060
1060
  for (let a = 0; a < t.values.length; a++) {
@@ -1063,34 +1063,34 @@ function Wa(n, t) {
1063
1063
  }
1064
1064
  return e;
1065
1065
  }
1066
- const Ga = (n, t) => {
1066
+ const Qa = (n, t) => {
1067
1067
  const e = je.createTransformer(t), r = Je(n), i = Je(t);
1068
- 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 ? Rt.has(n) && !i.values.length || Rt.has(t) && !r.values.length ? za(n, t) : tn(Vr(Wa(r, i), i.values), e) : (nt(!0, `Complex values '${n}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`), ft(n, t));
1068
+ 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 ? kt.has(n) && !i.values.length || kt.has(t) && !r.values.length ? Ha(n, t) : nn(Br($a(r, i), i.values), e) : (nt(!0, `Complex values '${n}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`), ft(n, t));
1069
1069
  };
1070
- function Fr(n, t, e) {
1071
- return typeof n == "number" && typeof t == "number" && typeof e == "number" ? tt(n, t, e) : nn(n)(n, t);
1070
+ function jr(n, t, e) {
1071
+ return typeof n == "number" && typeof t == "number" && typeof e == "number" ? tt(n, t, e) : rn(n)(n, t);
1072
1072
  }
1073
- const Ya = (n) => {
1073
+ const Za = (n) => {
1074
1074
  const t = ({ timestamp: e }) => n(e);
1075
1075
  return {
1076
1076
  start: (e = !0) => we.update(t, e),
1077
- stop: () => xt(t),
1077
+ stop: () => Pt(t),
1078
1078
  /**
1079
1079
  * If we're processing this frame we can use the
1080
1080
  * framelocked timestamp to keep things in sync.
1081
1081
  */
1082
1082
  now: () => mt.isProcessing ? mt.timestamp : ve.now()
1083
1083
  };
1084
- }, Ur = (n, t, e = 10) => {
1084
+ }, zr = (n, t, e = 10) => {
1085
1085
  let r = "";
1086
1086
  const i = Math.max(Math.round(t / e), 2);
1087
1087
  for (let a = 0; a < i; a++)
1088
1088
  r += n(a / (i - 1)) + ", ";
1089
1089
  return `linear(${r.substring(0, r.length - 2)})`;
1090
- }, $a = 5;
1091
- function Br(n, t, e) {
1092
- const r = Math.max(t - $a, 0);
1093
- return Nr(e - n(r), t - r);
1090
+ }, Xa = 5;
1091
+ function Kr(n, t, e) {
1092
+ const r = Math.max(t - Xa, 0);
1093
+ return Pr(e - n(r), t - r);
1094
1094
  }
1095
1095
  const ie = {
1096
1096
  // Default spring physics
@@ -1120,17 +1120,17 @@ const ie = {
1120
1120
  // in seconds
1121
1121
  minDamping: 0.05,
1122
1122
  maxDamping: 1
1123
- }, Dn = 1e-3;
1124
- function Qa({ duration: n = ie.duration, bounce: t = ie.bounce, velocity: e = ie.velocity, mass: r = ie.mass }) {
1123
+ }, Un = 1e-3;
1124
+ function Ja({ duration: n = ie.duration, bounce: t = ie.bounce, velocity: e = ie.velocity, mass: r = ie.mass }) {
1125
1125
  let i, a;
1126
1126
  nt(n <= /* @__PURE__ */ ye(ie.maxDuration), "Spring duration must be 10 seconds or less");
1127
1127
  let s = 1 - t;
1128
1128
  s = Pe(ie.minDamping, ie.maxDamping, s), n = Pe(ie.minDuration, ie.maxDuration, /* @__PURE__ */ _e(n)), s < 1 ? (i = (c) => {
1129
- const d = c * s, u = d * n, h = d - e, p = kt(c, s), m = Math.exp(-u);
1130
- return Dn - h / p * m;
1129
+ const d = c * s, u = d * n, h = d - e, p = Mt(c, s), m = Math.exp(-u);
1130
+ return Un - h / p * m;
1131
1131
  }, a = (c) => {
1132
- const u = c * s * n, h = u * e + e, p = Math.pow(s, 2) * Math.pow(c, 2) * n, m = Math.exp(-u), f = kt(Math.pow(c, 2), s);
1133
- return (-i(c) + Dn > 0 ? -1 : 1) * ((h - p) * m) / f;
1132
+ const u = c * s * n, h = u * e + e, p = Math.pow(s, 2) * Math.pow(c, 2) * n, m = Math.exp(-u), f = Mt(Math.pow(c, 2), s);
1133
+ return (-i(c) + Un > 0 ? -1 : 1) * ((h - p) * m) / f;
1134
1134
  }) : (i = (c) => {
1135
1135
  const d = Math.exp(-c * n), u = (c - e) * n + 1;
1136
1136
  return -1e-3 + d * u;
@@ -1138,7 +1138,7 @@ function Qa({ duration: n = ie.duration, bounce: t = ie.bounce, velocity: e = ie
1138
1138
  const d = Math.exp(-c * n), u = (e - c) * (n * n);
1139
1139
  return d * u;
1140
1140
  });
1141
- const o = 5 / n, l = Xa(i, a, o);
1141
+ const o = 5 / n, l = ts(i, a, o);
1142
1142
  if (n = /* @__PURE__ */ ye(n), isNaN(l))
1143
1143
  return {
1144
1144
  stiffness: ie.stiffness,
@@ -1154,21 +1154,21 @@ function Qa({ duration: n = ie.duration, bounce: t = ie.bounce, velocity: e = ie
1154
1154
  };
1155
1155
  }
1156
1156
  }
1157
- const Za = 12;
1158
- function Xa(n, t, e) {
1157
+ const es = 12;
1158
+ function ts(n, t, e) {
1159
1159
  let r = e;
1160
- for (let i = 1; i < Za; i++)
1160
+ for (let i = 1; i < es; i++)
1161
1161
  r = r - n(r) / t(r);
1162
1162
  return r;
1163
1163
  }
1164
- function kt(n, t) {
1164
+ function Mt(n, t) {
1165
1165
  return n * Math.sqrt(1 - t * t);
1166
1166
  }
1167
- const Ja = ["duration", "bounce"], es = ["stiffness", "damping", "mass"];
1168
- function Vn(n, t) {
1167
+ const ns = ["duration", "bounce"], rs = ["stiffness", "damping", "mass"];
1168
+ function Bn(n, t) {
1169
1169
  return t.some((e) => n[e] !== void 0);
1170
1170
  }
1171
- function ts(n) {
1171
+ function is(n) {
1172
1172
  let t = j({
1173
1173
  velocity: ie.velocity,
1174
1174
  stiffness: ie.stiffness,
@@ -1176,17 +1176,17 @@ function ts(n) {
1176
1176
  mass: ie.mass,
1177
1177
  isResolvedFromDuration: !1
1178
1178
  }, n);
1179
- if (!Vn(n, es) && Vn(n, Ja))
1179
+ if (!Bn(n, rs) && Bn(n, ns))
1180
1180
  if (n.visualDuration) {
1181
1181
  const e = n.visualDuration, r = 2 * Math.PI / (e * 1.2), i = r * r, a = 2 * Pe(0.05, 1, 1 - (n.bounce || 0)) * Math.sqrt(i);
1182
- t = J(j({}, t), {
1182
+ t = X(j({}, t), {
1183
1183
  mass: ie.mass,
1184
1184
  stiffness: i,
1185
1185
  damping: a
1186
1186
  });
1187
1187
  } else {
1188
- const e = Qa(n);
1189
- t = J(j(j({}, t), e), {
1188
+ const e = Ja(n);
1189
+ t = X(j(j({}, t), e), {
1190
1190
  mass: ie.mass
1191
1191
  }), t.isResolvedFromDuration = !0;
1192
1192
  }
@@ -1199,13 +1199,13 @@ function et(n = ie.visualDuration, t = ie.bounce) {
1199
1199
  bounce: t
1200
1200
  } : n;
1201
1201
  let { restSpeed: r, restDelta: i } = e;
1202
- const a = e.keyframes[0], s = e.keyframes[e.keyframes.length - 1], o = { done: !1, value: a }, { stiffness: l, damping: c, mass: d, duration: u, velocity: h, isResolvedFromDuration: p } = ts(J(j({}, e), {
1202
+ const a = e.keyframes[0], s = e.keyframes[e.keyframes.length - 1], o = { done: !1, value: a }, { stiffness: l, damping: c, mass: d, duration: u, velocity: h, isResolvedFromDuration: p } = is(X(j({}, e), {
1203
1203
  velocity: -/* @__PURE__ */ _e(e.velocity || 0)
1204
1204
  })), m = h || 0, f = c / (2 * Math.sqrt(l * d)), v = s - a, y = /* @__PURE__ */ _e(Math.sqrt(l / d)), w = Math.abs(v) < 5;
1205
1205
  r || (r = w ? ie.restSpeed.granular : ie.restSpeed.default), i || (i = w ? ie.restDelta.granular : ie.restDelta.default);
1206
1206
  let T;
1207
1207
  if (f < 1) {
1208
- const C = kt(y, f);
1208
+ const C = Mt(y, f);
1209
1209
  T = (I) => {
1210
1210
  const O = Math.exp(-f * y * I);
1211
1211
  return s - O * ((m + f * y * v) / C * Math.sin(C * I) + v * Math.cos(C * I));
@@ -1227,14 +1227,14 @@ function et(n = ie.visualDuration, t = ie.bounce) {
1227
1227
  o.done = C >= u;
1228
1228
  else {
1229
1229
  let O = C === 0 ? m : 0;
1230
- f < 1 && (O = C === 0 ? /* @__PURE__ */ ye(m) : Br(T, C, I));
1230
+ f < 1 && (O = C === 0 ? /* @__PURE__ */ ye(m) : Kr(T, C, I));
1231
1231
  const R = Math.abs(O) <= r, U = Math.abs(s - I) <= i;
1232
1232
  o.done = R && U;
1233
1233
  }
1234
1234
  return o.value = o.done ? s : I, o;
1235
1235
  },
1236
1236
  toString: () => {
1237
- const C = Math.min(Qt(x), ht), I = Ur((O) => x.next(C * O).value, C, 30);
1237
+ const C = Math.min(Zt(x), ht), I = zr((O) => x.next(C * O).value, C, 30);
1238
1238
  return C + "ms " + I;
1239
1239
  },
1240
1240
  toTransition: () => {
@@ -1243,10 +1243,10 @@ function et(n = ie.visualDuration, t = ie.bounce) {
1243
1243
  return x;
1244
1244
  }
1245
1245
  et.applyToOptions = (n) => {
1246
- const t = wr(n, 100, et);
1246
+ const t = Or(n, 100, et);
1247
1247
  return n.ease = t.ease, n.duration = /* @__PURE__ */ ye(t.duration), n.type = "keyframes", n;
1248
1248
  };
1249
- function Mt({ keyframes: n, velocity: t = 0, power: e = 0.8, timeConstant: r = 325, bounceDamping: i = 10, bounceStiffness: a = 500, modifyTarget: s, min: o, max: l, restDelta: c = 0.5, restSpeed: d }) {
1249
+ function St({ keyframes: n, velocity: t = 0, power: e = 0.8, timeConstant: r = 325, bounceDamping: i = 10, bounceStiffness: a = 500, modifyTarget: s, min: o, max: l, restDelta: c = 0.5, restSpeed: d }) {
1250
1250
  const u = n[0], h = {
1251
1251
  done: !1,
1252
1252
  value: u
@@ -1262,7 +1262,7 @@ function Mt({ keyframes: n, velocity: t = 0, power: e = 0.8, timeConstant: r = 3
1262
1262
  const O = (R) => {
1263
1263
  p(h.value) && (C = R, I = et({
1264
1264
  keyframes: [h.value, m(h.value)],
1265
- velocity: Br(T, R, h.value),
1265
+ velocity: Kr(T, R, h.value),
1266
1266
  // TODO: This should be passing * 1000
1267
1267
  damping: i,
1268
1268
  stiffness: a,
@@ -1278,19 +1278,19 @@ function Mt({ keyframes: n, velocity: t = 0, power: e = 0.8, timeConstant: r = 3
1278
1278
  }
1279
1279
  };
1280
1280
  }
1281
- function ns(n, t, e) {
1282
- const r = [], i = e || Ae.mix || Fr, a = n.length - 1;
1281
+ function as(n, t, e) {
1282
+ const r = [], i = e || Ae.mix || jr, a = n.length - 1;
1283
1283
  for (let s = 0; s < a; s++) {
1284
1284
  let o = i(n[s], n[s + 1]);
1285
1285
  if (t) {
1286
1286
  const l = Array.isArray(t) ? t[s] || Ve : t;
1287
- o = tn(l, o);
1287
+ o = nn(l, o);
1288
1288
  }
1289
1289
  r.push(o);
1290
1290
  }
1291
1291
  return r;
1292
1292
  }
1293
- function rs(n, t, { clamp: e = !0, ease: r, mixer: i } = {}) {
1293
+ function ss(n, t, { clamp: e = !0, ease: r, mixer: i } = {}) {
1294
1294
  const a = n.length;
1295
1295
  if (Ce(a === t.length, "Both input and output ranges must be the same length"), a === 1)
1296
1296
  return () => t[0];
@@ -1298,92 +1298,92 @@ function rs(n, t, { clamp: e = !0, ease: r, mixer: i } = {}) {
1298
1298
  return () => t[1];
1299
1299
  const s = n[0] === n[1];
1300
1300
  n[0] > n[a - 1] && (n = [...n].reverse(), t = [...t].reverse());
1301
- const o = ns(t, r, i), l = o.length, c = (d) => {
1301
+ const o = as(t, r, i), l = o.length, c = (d) => {
1302
1302
  if (s && d < n[0])
1303
1303
  return t[0];
1304
1304
  let u = 0;
1305
1305
  if (l > 1)
1306
1306
  for (; u < n.length - 2 && !(d < n[u + 1]); u++)
1307
1307
  ;
1308
- const h = /* @__PURE__ */ Yt(n[u], n[u + 1], d);
1308
+ const h = /* @__PURE__ */ $t(n[u], n[u + 1], d);
1309
1309
  return o[u](h);
1310
1310
  };
1311
1311
  return e ? (d) => c(Pe(n[0], n[a - 1], d)) : c;
1312
1312
  }
1313
- function is(n, t) {
1313
+ function os(n, t) {
1314
1314
  return n.map((e) => e * t);
1315
1315
  }
1316
- const jr = (n, t, e) => (((1 - 3 * e + 3 * t) * n + (3 * e - 6 * t)) * n + 3 * t) * n, as = 1e-7, ss = 12;
1317
- function os(n, t, e, r, i) {
1316
+ const qr = (n, t, e) => (((1 - 3 * e + 3 * t) * n + (3 * e - 6 * t)) * n + 3 * t) * n, ls = 1e-7, cs = 12;
1317
+ function ds(n, t, e, r, i) {
1318
1318
  let a, s, o = 0;
1319
1319
  do
1320
- s = t + (e - t) / 2, a = jr(s, r, i) - n, a > 0 ? e = s : t = s;
1321
- while (Math.abs(a) > as && ++o < ss);
1320
+ s = t + (e - t) / 2, a = qr(s, r, i) - n, a > 0 ? e = s : t = s;
1321
+ while (Math.abs(a) > ls && ++o < cs);
1322
1322
  return s;
1323
1323
  }
1324
1324
  function it(n, t, e, r) {
1325
1325
  if (n === t && e === r)
1326
1326
  return Ve;
1327
- const i = (a) => os(a, 0, 1, n, e);
1328
- return (a) => a === 0 || a === 1 ? a : jr(i(a), t, r);
1327
+ const i = (a) => ds(a, 0, 1, n, e);
1328
+ return (a) => a === 0 || a === 1 ? a : qr(i(a), t, r);
1329
1329
  }
1330
- const ls = /* @__PURE__ */ it(0.42, 0, 1, 1), cs = /* @__PURE__ */ it(0, 0, 0.58, 1), zr = /* @__PURE__ */ it(0.42, 0, 0.58, 1), Kr = (n) => (t) => t <= 0.5 ? n(2 * t) / 2 : (2 - n(2 * (1 - t))) / 2, qr = (n) => (t) => 1 - n(1 - t), Hr = /* @__PURE__ */ it(0.33, 1.53, 0.69, 0.99), rn = /* @__PURE__ */ qr(Hr), Wr = /* @__PURE__ */ Kr(rn), Gr = (n) => (n *= 2) < 1 ? 0.5 * rn(n) : 0.5 * (2 - Math.pow(2, -10 * (n - 1))), an = (n) => 1 - Math.sin(Math.acos(n)), ds = qr(an), Yr = Kr(an), $r = (n) => Array.isArray(n) && typeof n[0] == "number", Fn = {
1330
+ const us = /* @__PURE__ */ it(0.42, 0, 1, 1), ps = /* @__PURE__ */ it(0, 0, 0.58, 1), Hr = /* @__PURE__ */ it(0.42, 0, 0.58, 1), Wr = (n) => (t) => t <= 0.5 ? n(2 * t) / 2 : (2 - n(2 * (1 - t))) / 2, Gr = (n) => (t) => 1 - n(1 - t), Yr = /* @__PURE__ */ it(0.33, 1.53, 0.69, 0.99), an = /* @__PURE__ */ Gr(Yr), $r = /* @__PURE__ */ Wr(an), Qr = (n) => (n *= 2) < 1 ? 0.5 * an(n) : 0.5 * (2 - Math.pow(2, -10 * (n - 1))), sn = (n) => 1 - Math.sin(Math.acos(n)), hs = Gr(sn), Zr = Wr(sn), Xr = (n) => Array.isArray(n) && typeof n[0] == "number", jn = {
1331
1331
  linear: Ve,
1332
- easeIn: ls,
1333
- easeInOut: zr,
1334
- easeOut: cs,
1335
- circIn: an,
1336
- circInOut: Yr,
1337
- circOut: ds,
1338
- backIn: rn,
1339
- backInOut: Wr,
1340
- backOut: Hr,
1341
- anticipate: Gr
1342
- }, us = (n) => typeof n == "string", Un = (n) => {
1343
- if ($r(n)) {
1332
+ easeIn: us,
1333
+ easeInOut: Hr,
1334
+ easeOut: ps,
1335
+ circIn: sn,
1336
+ circInOut: Zr,
1337
+ circOut: hs,
1338
+ backIn: an,
1339
+ backInOut: $r,
1340
+ backOut: Yr,
1341
+ anticipate: Qr
1342
+ }, ms = (n) => typeof n == "string", zn = (n) => {
1343
+ if (Xr(n)) {
1344
1344
  Ce(n.length === 4, "Cubic bezier arrays must contain four numerical values.");
1345
1345
  const [t, e, r, i] = n;
1346
1346
  return it(t, e, r, i);
1347
- } else if (us(n))
1348
- return Ce(Fn[n] !== void 0, `Invalid easing type '${n}'`), Fn[n];
1347
+ } else if (ms(n))
1348
+ return Ce(jn[n] !== void 0, `Invalid easing type '${n}'`), jn[n];
1349
1349
  return n;
1350
1350
  };
1351
- function ps(n, t) {
1352
- return n.map(() => t || zr).splice(0, n.length - 1);
1351
+ function fs(n, t) {
1352
+ return n.map(() => t || Hr).splice(0, n.length - 1);
1353
1353
  }
1354
1354
  function Me({ duration: n = 300, keyframes: t, times: e, ease: r = "easeInOut" }) {
1355
- const i = br(r) ? r.map(Un) : Un(r), a = {
1355
+ const i = Cr(r) ? r.map(zn) : zn(r), a = {
1356
1356
  done: !1,
1357
1357
  value: t[0]
1358
- }, s = is(
1358
+ }, s = os(
1359
1359
  // Only use the provided offsets if they're the correct length
1360
1360
  // TODO Maybe we should warn here if there's a length mismatch
1361
- e && e.length === t.length ? e : Ar(t),
1361
+ e && e.length === t.length ? e : Ir(t),
1362
1362
  n
1363
- ), o = rs(s, t, {
1364
- ease: Array.isArray(i) ? i : ps(t, i)
1363
+ ), o = ss(s, t, {
1364
+ ease: Array.isArray(i) ? i : fs(t, i)
1365
1365
  });
1366
1366
  return {
1367
1367
  calculatedDuration: n,
1368
1368
  next: (l) => (a.value = o(l), a.done = l >= n, a)
1369
1369
  };
1370
1370
  }
1371
- const hs = (n) => n !== null;
1372
- function sn(n, { repeat: t, repeatType: e = "loop" }, r, i = 1) {
1373
- const a = n.filter(hs), o = i < 0 || t && e !== "loop" && t % 2 === 1 ? 0 : a.length - 1;
1371
+ const vs = (n) => n !== null;
1372
+ function on(n, { repeat: t, repeatType: e = "loop" }, r, i = 1) {
1373
+ const a = n.filter(vs), o = i < 0 || t && e !== "loop" && t % 2 === 1 ? 0 : a.length - 1;
1374
1374
  return !o || r === void 0 ? a[o] : r;
1375
1375
  }
1376
- const ms = {
1377
- decay: Mt,
1378
- inertia: Mt,
1376
+ const gs = {
1377
+ decay: St,
1378
+ inertia: St,
1379
1379
  tween: Me,
1380
1380
  keyframes: Me,
1381
1381
  spring: et
1382
1382
  };
1383
- function Qr(n) {
1384
- typeof n.type == "string" && (n.type = ms[n.type]);
1383
+ function Jr(n) {
1384
+ typeof n.type == "string" && (n.type = gs[n.type]);
1385
1385
  }
1386
- class on {
1386
+ class ln {
1387
1387
  constructor() {
1388
1388
  this.updateFinished();
1389
1389
  }
@@ -1407,8 +1407,8 @@ class on {
1407
1407
  return this.finished.then(t, e);
1408
1408
  }
1409
1409
  }
1410
- const fs = (n) => n / 100;
1411
- class ln extends on {
1410
+ const ys = (n) => n / 100;
1411
+ class cn extends ln {
1412
1412
  constructor(t) {
1413
1413
  super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.stop = () => {
1414
1414
  var r, i;
@@ -1418,16 +1418,16 @@ class ln extends on {
1418
1418
  }
1419
1419
  initAnimation() {
1420
1420
  const { options: t } = this;
1421
- Qr(t);
1421
+ Jr(t);
1422
1422
  const { type: e = Me, repeat: r = 0, repeatDelay: i = 0, repeatType: a, velocity: s = 0 } = t;
1423
1423
  let { keyframes: o } = t;
1424
1424
  const l = e || Me;
1425
- process.env.NODE_ENV !== "production" && l !== Me && Ce(o.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`), l !== Me && typeof o[0] != "number" && (this.mixKeyframes = tn(fs, Fr(o[0], o[1])), o = [0, 100]);
1426
- const c = l(J(j({}, t), { keyframes: o }));
1427
- a === "mirror" && (this.mirroredGenerator = l(J(j({}, t), {
1425
+ process.env.NODE_ENV !== "production" && l !== Me && Ce(o.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`), l !== Me && typeof o[0] != "number" && (this.mixKeyframes = nn(ys, jr(o[0], o[1])), o = [0, 100]);
1426
+ const c = l(X(j({}, t), { keyframes: o }));
1427
+ a === "mirror" && (this.mirroredGenerator = l(X(j({}, t), {
1428
1428
  keyframes: [...o].reverse(),
1429
1429
  velocity: -s
1430
- }))), c.calculatedDuration === null && (c.calculatedDuration = Qt(c));
1430
+ }))), c.calculatedDuration === null && (c.calculatedDuration = Zt(c));
1431
1431
  const { calculatedDuration: d } = c;
1432
1432
  this.calculatedDuration = d, this.resolvedDuration = d + i, this.totalDuration = this.resolvedDuration * (r + 1) - i, this.generator = c;
1433
1433
  }
@@ -1454,7 +1454,7 @@ class ln extends on {
1454
1454
  let { done: I } = C;
1455
1455
  !w && l !== null && (I = this.playbackSpeed >= 0 ? this.currentTime >= i : this.currentTime <= 0);
1456
1456
  const O = this.holdTime === null && (this.state === "finished" || this.state === "running" && I);
1457
- return O && m !== Mt && (C.value = sn(d, this.options, v, this.speed)), f && f(C.value), O && this.finish(), C;
1457
+ return O && m !== St && (C.value = on(d, this.options, v, this.speed)), f && f(C.value), O && this.finish(), C;
1458
1458
  }
1459
1459
  /**
1460
1460
  * Allows the returned animation to be awaited or promise-chained. Currently
@@ -1486,7 +1486,7 @@ class ln extends on {
1486
1486
  var i, a;
1487
1487
  if (this.isStopped)
1488
1488
  return;
1489
- const { driver: t = Ya, startTime: e } = this.options;
1489
+ const { driver: t = Za, startTime: e } = this.options;
1490
1490
  this.driver || (this.driver = t((s) => this.tick(s))), (a = (i = this.options).onPlay) == null || a.call(i);
1491
1491
  const r = this.driver.now();
1492
1492
  this.state === "finished" ? (this.updateFinished(), this.startTime = r) : this.holdTime !== null ? this.startTime = r - this.holdTime : this.startTime || (this.startTime = e != null ? e : r), this.state === "finished" && this.speed < 0 && (this.startTime += this.calculatedDuration), this.holdTime = null, this.state = "running", this.driver.start();
@@ -1519,15 +1519,15 @@ class ln extends on {
1519
1519
  return this.options.allowFlatten && (this.options.type = "keyframes", this.options.ease = "linear", this.initAnimation()), (e = this.driver) == null || e.stop(), t.observe(this);
1520
1520
  }
1521
1521
  }
1522
- function vs(n) {
1522
+ function bs(n) {
1523
1523
  var t;
1524
1524
  for (let e = 1; e < n.length; e++)
1525
1525
  (t = n[e]) != null || (n[e] = n[e - 1]);
1526
1526
  }
1527
- const Ne = (n) => n * 180 / Math.PI, St = (n) => {
1527
+ const Ne = (n) => n * 180 / Math.PI, Dt = (n) => {
1528
1528
  const t = Ne(Math.atan2(n[1], n[0]));
1529
- return Dt(t);
1530
- }, gs = {
1529
+ return Vt(t);
1530
+ }, Es = {
1531
1531
  x: 4,
1532
1532
  y: 5,
1533
1533
  translateX: 4,
@@ -1535,59 +1535,59 @@ const Ne = (n) => n * 180 / Math.PI, St = (n) => {
1535
1535
  scaleX: 0,
1536
1536
  scaleY: 3,
1537
1537
  scale: (n) => (Math.abs(n[0]) + Math.abs(n[3])) / 2,
1538
- rotate: St,
1539
- rotateZ: St,
1538
+ rotate: Dt,
1539
+ rotateZ: Dt,
1540
1540
  skewX: (n) => Ne(Math.atan(n[1])),
1541
1541
  skewY: (n) => Ne(Math.atan(n[2])),
1542
1542
  skew: (n) => (Math.abs(n[1]) + Math.abs(n[2])) / 2
1543
- }, Dt = (n) => (n = n % 360, n < 0 && (n += 360), n), Bn = St, jn = (n) => Math.sqrt(n[0] * n[0] + n[1] * n[1]), zn = (n) => Math.sqrt(n[4] * n[4] + n[5] * n[5]), ys = {
1543
+ }, Vt = (n) => (n = n % 360, n < 0 && (n += 360), n), Kn = Dt, qn = (n) => Math.sqrt(n[0] * n[0] + n[1] * n[1]), Hn = (n) => Math.sqrt(n[4] * n[4] + n[5] * n[5]), _s = {
1544
1544
  x: 12,
1545
1545
  y: 13,
1546
1546
  z: 14,
1547
1547
  translateX: 12,
1548
1548
  translateY: 13,
1549
1549
  translateZ: 14,
1550
- scaleX: jn,
1551
- scaleY: zn,
1552
- scale: (n) => (jn(n) + zn(n)) / 2,
1553
- rotateX: (n) => Dt(Ne(Math.atan2(n[6], n[5]))),
1554
- rotateY: (n) => Dt(Ne(Math.atan2(-n[2], n[0]))),
1555
- rotateZ: Bn,
1556
- rotate: Bn,
1550
+ scaleX: qn,
1551
+ scaleY: Hn,
1552
+ scale: (n) => (qn(n) + Hn(n)) / 2,
1553
+ rotateX: (n) => Vt(Ne(Math.atan2(n[6], n[5]))),
1554
+ rotateY: (n) => Vt(Ne(Math.atan2(-n[2], n[0]))),
1555
+ rotateZ: Kn,
1556
+ rotate: Kn,
1557
1557
  skewX: (n) => Ne(Math.atan(n[4])),
1558
1558
  skewY: (n) => Ne(Math.atan(n[1])),
1559
1559
  skew: (n) => (Math.abs(n[1]) + Math.abs(n[4])) / 2
1560
1560
  };
1561
- function Vt(n) {
1561
+ function Ft(n) {
1562
1562
  return n.includes("scale") ? 1 : 0;
1563
1563
  }
1564
- function Ft(n, t) {
1564
+ function Ut(n, t) {
1565
1565
  if (!n || n === "none")
1566
- return Vt(t);
1566
+ return Ft(t);
1567
1567
  const e = n.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
1568
1568
  let r, i;
1569
1569
  if (e)
1570
- r = ys, i = e;
1570
+ r = _s, i = e;
1571
1571
  else {
1572
1572
  const o = n.match(/^matrix\(([-\d.e\s,]+)\)$/u);
1573
- r = gs, i = o;
1573
+ r = Es, i = o;
1574
1574
  }
1575
1575
  if (!i)
1576
- return Vt(t);
1577
- const a = r[t], s = i[1].split(",").map(Es);
1576
+ return Ft(t);
1577
+ const a = r[t], s = i[1].split(",").map(As);
1578
1578
  return typeof a == "function" ? a(s) : s[a];
1579
1579
  }
1580
- const bs = (n, t) => {
1580
+ const Cs = (n, t) => {
1581
1581
  const { transform: e = "none" } = getComputedStyle(n);
1582
- return Ft(e, t);
1582
+ return Ut(e, t);
1583
1583
  };
1584
- function Es(n) {
1584
+ function As(n) {
1585
1585
  return parseFloat(n.trim());
1586
1586
  }
1587
- const Kn = (n) => n === Be || n === Q, _s = /* @__PURE__ */ new Set(["x", "y", "z"]), Cs = Fe.filter((n) => !_s.has(n));
1588
- function As(n) {
1587
+ const Wn = (n) => n === Be || n === Q, ws = /* @__PURE__ */ new Set(["x", "y", "z"]), Ts = Fe.filter((n) => !ws.has(n));
1588
+ function Is(n) {
1589
1589
  const t = [];
1590
- return Cs.forEach((e) => {
1590
+ return Ts.forEach((e) => {
1591
1591
  const r = n.getValue(e);
1592
1592
  r !== void 0 && (t.push([e, r.get()]), r.set(e.startsWith("scale") ? 1 : 0));
1593
1593
  }), t;
@@ -1601,18 +1601,18 @@ const Le = {
1601
1601
  bottom: ({ y: n }, { top: t }) => parseFloat(t) + (n.max - n.min),
1602
1602
  right: ({ x: n }, { left: t }) => parseFloat(t) + (n.max - n.min),
1603
1603
  // Transform
1604
- x: (n, { transform: t }) => Ft(t, "x"),
1605
- y: (n, { transform: t }) => Ft(t, "y")
1604
+ x: (n, { transform: t }) => Ut(t, "x"),
1605
+ y: (n, { transform: t }) => Ut(t, "y")
1606
1606
  };
1607
1607
  Le.translateX = Le.x;
1608
1608
  Le.translateY = Le.y;
1609
1609
  const xe = /* @__PURE__ */ new Set();
1610
- let Ut = !1, Bt = !1, jt = !1;
1611
- function Zr() {
1612
- if (Bt) {
1610
+ let Bt = !1, jt = !1, zt = !1;
1611
+ function ei() {
1612
+ if (jt) {
1613
1613
  const n = Array.from(xe).filter((r) => r.needsMeasurement), t = new Set(n.map((r) => r.element)), e = /* @__PURE__ */ new Map();
1614
1614
  t.forEach((r) => {
1615
- const i = As(r);
1615
+ const i = Is(r);
1616
1616
  i.length && (e.set(r, i), r.render());
1617
1617
  }), n.forEach((r) => r.measureInitialState()), t.forEach((r) => {
1618
1618
  r.render();
@@ -1625,22 +1625,22 @@ function Zr() {
1625
1625
  r.suspendedScrollY !== void 0 && window.scrollTo(0, r.suspendedScrollY);
1626
1626
  });
1627
1627
  }
1628
- Bt = !1, Ut = !1, xe.forEach((n) => n.complete(jt)), xe.clear();
1628
+ jt = !1, Bt = !1, xe.forEach((n) => n.complete(zt)), xe.clear();
1629
1629
  }
1630
- function Xr() {
1630
+ function ti() {
1631
1631
  xe.forEach((n) => {
1632
- n.readKeyframes(), n.needsMeasurement && (Bt = !0);
1632
+ n.readKeyframes(), n.needsMeasurement && (jt = !0);
1633
1633
  });
1634
1634
  }
1635
- function ws() {
1636
- jt = !0, Xr(), Zr(), jt = !1;
1635
+ function Os() {
1636
+ zt = !0, ti(), ei(), zt = !1;
1637
1637
  }
1638
- class cn {
1638
+ class dn {
1639
1639
  constructor(t, e, r, i, a, s = !1) {
1640
1640
  this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...t], this.onComplete = e, this.name = r, this.motionValue = i, this.element = a, this.isAsync = s;
1641
1641
  }
1642
1642
  scheduleResolve() {
1643
- this.state = "scheduled", this.isAsync ? (xe.add(this), Ut || (Ut = !0, we.read(Xr), we.resolveKeyframes(Zr))) : (this.readKeyframes(), this.complete());
1643
+ this.state = "scheduled", this.isAsync ? (xe.add(this), Bt || (Bt = !0, we.read(ti), we.resolveKeyframes(ei))) : (this.readKeyframes(), this.complete());
1644
1644
  }
1645
1645
  readKeyframes() {
1646
1646
  const { unresolvedKeyframes: t, name: e, element: r, motionValue: i } = this;
@@ -1654,7 +1654,7 @@ class cn {
1654
1654
  }
1655
1655
  t[0] === void 0 && (t[0] = s), i && a === void 0 && i.set(t[0]);
1656
1656
  }
1657
- vs(t);
1657
+ bs(t);
1658
1658
  }
1659
1659
  setFinalKeyframe() {
1660
1660
  }
@@ -1674,31 +1674,31 @@ class cn {
1674
1674
  this.state === "pending" && this.scheduleResolve();
1675
1675
  }
1676
1676
  }
1677
- const Ts = (n) => n.startsWith("--");
1678
- function Is(n, t, e) {
1679
- Ts(t) ? n.style.setProperty(t, e) : n.style[t] = e;
1677
+ const Ns = (n) => n.startsWith("--");
1678
+ function Ls(n, t, e) {
1679
+ Ns(t) ? n.style.setProperty(t, e) : n.style[t] = e;
1680
1680
  }
1681
1681
  // @__NO_SIDE_EFFECTS__
1682
- function dn(n) {
1682
+ function un(n) {
1683
1683
  let t;
1684
1684
  return () => (t === void 0 && (t = n()), t);
1685
1685
  }
1686
- const Os = /* @__PURE__ */ dn(() => window.ScrollTimeline !== void 0), Ns = {};
1687
- function Ls(n, t) {
1688
- const e = /* @__PURE__ */ dn(n);
1686
+ const xs = /* @__PURE__ */ un(() => window.ScrollTimeline !== void 0), Ps = {};
1687
+ function Rs(n, t) {
1688
+ const e = /* @__PURE__ */ un(n);
1689
1689
  return () => {
1690
1690
  var r;
1691
- return (r = Ns[t]) != null ? r : e();
1691
+ return (r = Ps[t]) != null ? r : e();
1692
1692
  };
1693
1693
  }
1694
- const Jr = /* @__PURE__ */ Ls(() => {
1694
+ const ni = /* @__PURE__ */ Rs(() => {
1695
1695
  try {
1696
1696
  document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
1697
1697
  } catch (n) {
1698
1698
  return !1;
1699
1699
  }
1700
1700
  return !0;
1701
- }, "linearEasing"), Ye = ([n, t, e, r]) => `cubic-bezier(${n}, ${t}, ${e}, ${r})`, qn = {
1701
+ }, "linearEasing"), Ye = ([n, t, e, r]) => `cubic-bezier(${n}, ${t}, ${e}, ${r})`, Gn = {
1702
1702
  linear: "linear",
1703
1703
  ease: "ease",
1704
1704
  easeIn: "ease-in",
@@ -1709,16 +1709,16 @@ const Jr = /* @__PURE__ */ Ls(() => {
1709
1709
  backIn: /* @__PURE__ */ Ye([0.31, 0.01, 0.66, -0.59]),
1710
1710
  backOut: /* @__PURE__ */ Ye([0.33, 1.53, 0.69, 0.99])
1711
1711
  };
1712
- function ei(n, t) {
1712
+ function ri(n, t) {
1713
1713
  if (n)
1714
- return typeof n == "function" ? Jr() ? Ur(n, t) : "ease-out" : $r(n) ? Ye(n) : Array.isArray(n) ? n.map((e) => ei(e, t) || qn.easeOut) : qn[n];
1714
+ return typeof n == "function" ? ni() ? zr(n, t) : "ease-out" : Xr(n) ? Ye(n) : Array.isArray(n) ? n.map((e) => ri(e, t) || Gn.easeOut) : Gn[n];
1715
1715
  }
1716
- function xs(n, t, e, { delay: r = 0, duration: i = 300, repeat: a = 0, repeatType: s = "loop", ease: o = "easeOut", times: l } = {}, c = void 0) {
1716
+ function ks(n, t, e, { delay: r = 0, duration: i = 300, repeat: a = 0, repeatType: s = "loop", ease: o = "easeOut", times: l } = {}, c = void 0) {
1717
1717
  const d = {
1718
1718
  [t]: e
1719
1719
  };
1720
1720
  l && (d.offset = l);
1721
- const u = ei(o, i);
1721
+ const u = ri(o, i);
1722
1722
  Array.isArray(u) && (d.easing = u);
1723
1723
  const h = {
1724
1724
  delay: r,
@@ -1730,22 +1730,22 @@ function xs(n, t, e, { delay: r = 0, duration: i = 300, repeat: a = 0, repeatTyp
1730
1730
  };
1731
1731
  return c && (h.pseudoElement = c), n.animate(d, h);
1732
1732
  }
1733
- function Ps(e) {
1733
+ function Ms(e) {
1734
1734
  var r = e, { type: n } = r, t = ge(r, ["type"]);
1735
1735
  var i, a;
1736
- return $t(n) && Jr() ? n.applyToOptions(t) : ((i = t.duration) != null || (t.duration = 300), (a = t.ease) != null || (t.ease = "easeOut"), t);
1736
+ return Qt(n) && ni() ? n.applyToOptions(t) : ((i = t.duration) != null || (t.duration = 300), (a = t.ease) != null || (t.ease = "easeOut"), t);
1737
1737
  }
1738
- class Rs extends on {
1738
+ class Ss extends ln {
1739
1739
  constructor(t) {
1740
1740
  if (super(), this.finishedTime = null, this.isStopped = !1, !t)
1741
1741
  return;
1742
1742
  const { element: e, name: r, keyframes: i, pseudoElement: a, allowFlatten: s = !1, finalKeyframe: o, onComplete: l } = t;
1743
1743
  this.isPseudoElement = !!a, this.allowFlatten = s, this.options = t, Ce(typeof t.type != "string", `animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);
1744
- const c = Ps(t);
1745
- this.animation = xs(e, r, i, c, a), c.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
1744
+ const c = Ms(t);
1745
+ this.animation = ks(e, r, i, c, a), c.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
1746
1746
  if (this.finishedTime = this.time, !a) {
1747
- const d = sn(i, this.options, o, this.speed);
1748
- this.updateMotionValue ? this.updateMotionValue(d) : Is(e, r, d), this.animation.cancel();
1747
+ const d = on(i, this.options, o, this.speed);
1748
+ this.updateMotionValue ? this.updateMotionValue(d) : Ls(e, r, d), this.animation.cancel();
1749
1749
  }
1750
1750
  l == null || l(), this.notifyFinished();
1751
1751
  };
@@ -1824,24 +1824,24 @@ class Rs extends on {
1824
1824
  */
1825
1825
  attachTimeline({ timeline: t, observe: e }) {
1826
1826
  var r;
1827
- return this.allowFlatten && ((r = this.animation.effect) == null || r.updateTiming({ easing: "linear" })), this.animation.onfinish = null, t && Os() ? (this.animation.timeline = t, Ve) : e(this);
1827
+ return this.allowFlatten && ((r = this.animation.effect) == null || r.updateTiming({ easing: "linear" })), this.animation.onfinish = null, t && xs() ? (this.animation.timeline = t, Ve) : e(this);
1828
1828
  }
1829
1829
  }
1830
- const ti = {
1831
- anticipate: Gr,
1832
- backInOut: Wr,
1833
- circInOut: Yr
1830
+ const ii = {
1831
+ anticipate: Qr,
1832
+ backInOut: $r,
1833
+ circInOut: Zr
1834
1834
  };
1835
- function ks(n) {
1836
- return n in ti;
1835
+ function Ds(n) {
1836
+ return n in ii;
1837
1837
  }
1838
- function Ms(n) {
1839
- typeof n.ease == "string" && ks(n.ease) && (n.ease = ti[n.ease]);
1838
+ function Vs(n) {
1839
+ typeof n.ease == "string" && Ds(n.ease) && (n.ease = ii[n.ease]);
1840
1840
  }
1841
- const Hn = 10;
1842
- class Ss extends Rs {
1841
+ const Yn = 10;
1842
+ class Fs extends Ss {
1843
1843
  constructor(t) {
1844
- Ms(t), Qr(t), super(t), t.startTime && (this.startTime = t.startTime), this.options = t;
1844
+ Vs(t), Jr(t), super(t), t.startTime && (this.startTime = t.startTime), this.options = t;
1845
1845
  }
1846
1846
  /**
1847
1847
  * WAAPI doesn't natively have any interruption capabilities.
@@ -1860,16 +1860,16 @@ class Ss extends Rs {
1860
1860
  e.set(t);
1861
1861
  return;
1862
1862
  }
1863
- const o = new ln(J(j({}, s), {
1863
+ const o = new cn(X(j({}, s), {
1864
1864
  autoplay: !1
1865
1865
  })), l = /* @__PURE__ */ ye((d = this.finishedTime) != null ? d : this.time);
1866
- e.setWithVelocity(o.sample(l - Hn).value, o.sample(l).value, Hn), o.stop();
1866
+ e.setWithVelocity(o.sample(l - Yn).value, o.sample(l).value, Yn), o.stop();
1867
1867
  }
1868
1868
  }
1869
- const Wn = (n, t) => t === "zIndex" ? !1 : !!(typeof n == "number" || Array.isArray(n) || typeof n == "string" && // It's animatable if we have a string
1869
+ const $n = (n, t) => t === "zIndex" ? !1 : !!(typeof n == "number" || Array.isArray(n) || typeof n == "string" && // It's animatable if we have a string
1870
1870
  (je.test(n) || n === "0") && // And it contains numbers and/or colors
1871
1871
  !n.startsWith("url("));
1872
- function Ds(n) {
1872
+ function Us(n) {
1873
1873
  const t = n[0];
1874
1874
  if (n.length === 1)
1875
1875
  return !0;
@@ -1877,43 +1877,43 @@ function Ds(n) {
1877
1877
  if (n[e] !== t)
1878
1878
  return !0;
1879
1879
  }
1880
- function Vs(n, t, e, r) {
1880
+ function Bs(n, t, e, r) {
1881
1881
  const i = n[0];
1882
1882
  if (i === null)
1883
1883
  return !1;
1884
1884
  if (t === "display" || t === "visibility")
1885
1885
  return !0;
1886
- const a = n[n.length - 1], s = Wn(i, t), o = Wn(a, t);
1887
- return nt(s === o, `You are trying to animate ${t} 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 : Ds(n) || (e === "spring" || $t(e)) && r;
1886
+ const a = n[n.length - 1], s = $n(i, t), o = $n(a, t);
1887
+ return nt(s === o, `You are trying to animate ${t} 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 : Us(n) || (e === "spring" || Qt(e)) && r;
1888
1888
  }
1889
- function ni(n) {
1889
+ function ai(n) {
1890
1890
  return typeof n == "object" && n !== null;
1891
1891
  }
1892
- function Fs(n) {
1893
- return ni(n) && "offsetHeight" in n;
1892
+ function js(n) {
1893
+ return ai(n) && "offsetHeight" in n;
1894
1894
  }
1895
- const Us = /* @__PURE__ */ new Set([
1895
+ const zs = /* @__PURE__ */ new Set([
1896
1896
  "opacity",
1897
1897
  "clipPath",
1898
1898
  "filter",
1899
1899
  "transform"
1900
1900
  // TODO: Could be re-enabled now we have support for linear() easing
1901
1901
  // "background-color"
1902
- ]), Bs = /* @__PURE__ */ dn(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
1903
- function js(n) {
1902
+ ]), Ks = /* @__PURE__ */ un(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
1903
+ function qs(n) {
1904
1904
  var c;
1905
1905
  const { motionValue: t, name: e, repeatDelay: r, repeatType: i, damping: a, type: s } = n;
1906
- if (!Fs((c = t == null ? void 0 : t.owner) == null ? void 0 : c.current))
1906
+ if (!js((c = t == null ? void 0 : t.owner) == null ? void 0 : c.current))
1907
1907
  return !1;
1908
1908
  const { onUpdate: o, transformTemplate: l } = t.owner.getProps();
1909
- return Bs() && e && Us.has(e) && (e !== "transform" || !l) && /**
1909
+ return Ks() && e && zs.has(e) && (e !== "transform" || !l) && /**
1910
1910
  * If we're outputting values to onUpdate then we can't use WAAPI as there's
1911
1911
  * no way to read the value from WAAPI every frame.
1912
1912
  */
1913
1913
  !o && !r && i !== "mirror" && a !== 0 && s !== "inertia";
1914
1914
  }
1915
- const zs = 40;
1916
- class Ks extends on {
1915
+ const Hs = 40;
1916
+ class Ws extends ln {
1917
1917
  constructor(h) {
1918
1918
  var p = h, { autoplay: t = !0, delay: e = 0, type: r = "keyframes", repeat: i = 0, repeatDelay: a = 0, repeatType: s = "loop", keyframes: o, name: l, motionValue: c, element: d } = p, u = ge(p, ["autoplay", "delay", "type", "repeat", "repeatDelay", "repeatType", "keyframes", "name", "motionValue", "element"]);
1919
1919
  var v;
@@ -1931,21 +1931,21 @@ class Ks extends on {
1931
1931
  name: l,
1932
1932
  motionValue: c,
1933
1933
  element: d
1934
- }, u), f = (d == null ? void 0 : d.KeyframeResolver) || cn;
1934
+ }, u), f = (d == null ? void 0 : d.KeyframeResolver) || dn;
1935
1935
  this.keyframeResolver = new f(o, (y, w, T) => this.onKeyframesResolved(y, w, m, !T), l, c, d), (v = this.keyframeResolver) == null || v.scheduleResolve();
1936
1936
  }
1937
1937
  onKeyframesResolved(t, e, r, i) {
1938
1938
  this.keyframeResolver = void 0;
1939
1939
  const { name: a, type: s, velocity: o, delay: l, isHandoff: c, onUpdate: d } = r;
1940
- this.resolvedAt = ve.now(), Vs(t, a, s, o) || ((Ae.instantAnimations || !l) && (d == null || d(sn(t, r, e))), t[0] = t[t.length - 1], r.duration = 0, r.repeat = 0);
1941
- const u = i ? this.resolvedAt ? this.resolvedAt - this.createdAt > zs ? this.resolvedAt : this.createdAt : this.createdAt : void 0, h = J(j({
1940
+ this.resolvedAt = ve.now(), Bs(t, a, s, o) || ((Ae.instantAnimations || !l) && (d == null || d(on(t, r, e))), t[0] = t[t.length - 1], r.duration = 0, r.repeat = 0);
1941
+ const u = i ? this.resolvedAt ? this.resolvedAt - this.createdAt > Hs ? this.resolvedAt : this.createdAt : this.createdAt : void 0, h = X(j({
1942
1942
  startTime: u,
1943
1943
  finalKeyframe: e
1944
1944
  }, r), {
1945
1945
  keyframes: t
1946
- }), p = !c && js(h) ? new Ss(J(j({}, h), {
1946
+ }), p = !c && qs(h) ? new Fs(X(j({}, h), {
1947
1947
  element: h.motionValue.owner.current
1948
- })) : new ln(h);
1948
+ })) : new cn(h);
1949
1949
  p.finished.then(() => this.notifyFinished()).catch(Ve), this.pendingTimeline && (this.stopTimeline = p.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = p;
1950
1950
  }
1951
1951
  get finished() {
@@ -1957,7 +1957,7 @@ class Ks extends on {
1957
1957
  }
1958
1958
  get animation() {
1959
1959
  var t;
1960
- return this._animation || ((t = this.keyframeResolver) == null || t.resume(), ws()), this._animation;
1960
+ return this._animation || ((t = this.keyframeResolver) == null || t.resume(), Os()), this._animation;
1961
1961
  }
1962
1962
  get duration() {
1963
1963
  return this.animation.duration;
@@ -1997,11 +1997,11 @@ class Ks extends on {
1997
1997
  this._animation && this.animation.cancel(), (t = this.keyframeResolver) == null || t.cancel();
1998
1998
  }
1999
1999
  }
2000
- const ri = (n, t, e, r = {}, i, a) => (s) => {
2001
- const o = Lr(r, n) || {}, l = o.delay || r.delay || 0;
2000
+ const si = (n, t, e, r = {}, i, a) => (s) => {
2001
+ const o = Rr(r, n) || {}, l = o.delay || r.delay || 0;
2002
2002
  let { elapsed: c = 0 } = r;
2003
2003
  c = c - /* @__PURE__ */ ye(l);
2004
- const d = J(j({
2004
+ const d = X(j({
2005
2005
  keyframes: Array.isArray(e) ? e : [null, e],
2006
2006
  ease: "easeOut",
2007
2007
  velocity: t.getVelocity()
@@ -2017,10 +2017,10 @@ const ri = (n, t, e, r = {}, i, a) => (s) => {
2017
2017
  motionValue: t,
2018
2018
  element: a ? void 0 : i
2019
2019
  });
2020
- Aa(o) || Object.assign(d, Ca(n, d)), d.duration && (d.duration = /* @__PURE__ */ ye(d.duration)), d.repeatDelay && (d.repeatDelay = /* @__PURE__ */ ye(d.repeatDelay)), d.from !== void 0 && (d.keyframes[0] = d.from);
2020
+ Ia(o) || Object.assign(d, Ta(n, d)), d.duration && (d.duration = /* @__PURE__ */ ye(d.duration)), d.repeatDelay && (d.repeatDelay = /* @__PURE__ */ ye(d.repeatDelay)), d.from !== void 0 && (d.keyframes[0] = d.from);
2021
2021
  let u = !1;
2022
2022
  if ((d.type === !1 || d.duration === 0 && !d.repeatDelay) && (d.duration = 0, d.delay === 0 && (u = !0)), (Ae.instantAnimations || Ae.skipAnimations) && (u = !0, d.duration = 0, d.delay = 0), d.allowFlatten = !o.type && !o.ease, u && !a && t.get() !== void 0) {
2023
- const h = ga(d.keyframes, o);
2023
+ const h = Ea(d.keyframes, o);
2024
2024
  if (h !== void 0) {
2025
2025
  we.update(() => {
2026
2026
  d.onUpdate(h), d.onComplete();
@@ -2028,8 +2028,8 @@ const ri = (n, t, e, r = {}, i, a) => (s) => {
2028
2028
  return;
2029
2029
  }
2030
2030
  }
2031
- return o.isSync ? new ln(d) : new Ks(d);
2032
- }, ii = /* @__PURE__ */ new Set([
2031
+ return o.isSync ? new cn(d) : new Ws(d);
2032
+ }, oi = /* @__PURE__ */ new Set([
2033
2033
  "width",
2034
2034
  "height",
2035
2035
  "top",
@@ -2038,49 +2038,49 @@ const ri = (n, t, e, r = {}, i, a) => (s) => {
2038
2038
  "bottom",
2039
2039
  ...Fe
2040
2040
  ]);
2041
- function qs({ protectedKeys: n, needsAnimating: t }, e) {
2041
+ function Gs({ protectedKeys: n, needsAnimating: t }, e) {
2042
2042
  const r = n.hasOwnProperty(e) && t[e] !== !0;
2043
2043
  return t[e] = !1, r;
2044
2044
  }
2045
- function Hs(n, t, { delay: e = 0, transitionOverride: r, type: i } = {}) {
2045
+ function Ys(n, t, { delay: e = 0, transitionOverride: r, type: i } = {}) {
2046
2046
  var u;
2047
2047
  let d = t, { transition: a = n.getDefaultTransition(), transitionEnd: s } = d, o = ge(d, ["transition", "transitionEnd"]);
2048
2048
  r && (a = r);
2049
2049
  const l = [], c = i && n.animationState && n.animationState.getState()[i];
2050
2050
  for (const h in o) {
2051
2051
  const p = n.getValue(h, (u = n.latestValues[h]) != null ? u : null), m = o[h];
2052
- if (m === void 0 || c && qs(c, h))
2052
+ if (m === void 0 || c && Gs(c, h))
2053
2053
  continue;
2054
2054
  const f = j({
2055
2055
  delay: e
2056
- }, Lr(a || {}, h)), v = p.get();
2056
+ }, Rr(a || {}, h)), v = p.get();
2057
2057
  if (v !== void 0 && !p.isAnimating && !Array.isArray(m) && m === v && !f.velocity)
2058
2058
  continue;
2059
2059
  let y = !1;
2060
2060
  if (window.MotionHandoffAnimation) {
2061
- const T = fa(n);
2061
+ const T = ya(n);
2062
2062
  if (T) {
2063
2063
  const x = window.MotionHandoffAnimation(T, h, we);
2064
2064
  x !== null && (f.startTime = x, y = !0);
2065
2065
  }
2066
2066
  }
2067
- pa(n, h), p.start(ri(h, p, m, n.shouldReduceMotion && ii.has(h) ? { type: !1 } : f, n, y));
2067
+ fa(n, h), p.start(si(h, p, m, n.shouldReduceMotion && oi.has(h) ? { type: !1 } : f, n, y));
2068
2068
  const w = p.animation;
2069
2069
  w && l.push(w);
2070
2070
  }
2071
2071
  return s && Promise.all(l).then(() => {
2072
2072
  we.update(() => {
2073
- s && da(n, s);
2073
+ s && ha(n, s);
2074
2074
  });
2075
2075
  }), l;
2076
2076
  }
2077
- function Ws({ top: n, left: t, right: e, bottom: r }) {
2077
+ function $s({ top: n, left: t, right: e, bottom: r }) {
2078
2078
  return {
2079
2079
  x: { min: t, max: e },
2080
2080
  y: { min: n, max: r }
2081
2081
  };
2082
2082
  }
2083
- function Gs(n, t) {
2083
+ function Qs(n, t) {
2084
2084
  if (!t)
2085
2085
  return n;
2086
2086
  const e = t({ x: n.left, y: n.top }), r = t({ x: n.right, y: n.bottom });
@@ -2091,10 +2091,10 @@ function Gs(n, t) {
2091
2091
  right: r.x
2092
2092
  };
2093
2093
  }
2094
- function Ys(n, t) {
2095
- return Ws(Gs(n.getBoundingClientRect(), t));
2094
+ function Zs(n, t) {
2095
+ return $s(Qs(n.getBoundingClientRect(), t));
2096
2096
  }
2097
- const Gn = {
2097
+ const Qn = {
2098
2098
  animation: [
2099
2099
  "animate",
2100
2100
  "variants",
@@ -2113,30 +2113,30 @@ const Gn = {
2113
2113
  pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"],
2114
2114
  inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
2115
2115
  layout: ["layout", "layoutId"]
2116
- }, zt = {};
2117
- for (const n in Gn)
2118
- zt[n] = {
2119
- isEnabled: (t) => Gn[n].some((e) => !!t[e])
2116
+ }, Kt = {};
2117
+ for (const n in Qn)
2118
+ Kt[n] = {
2119
+ isEnabled: (t) => Qn[n].some((e) => !!t[e])
2120
2120
  };
2121
- const Yn = () => ({ min: 0, max: 0 }), un = () => ({
2122
- x: Yn(),
2123
- y: Yn()
2124
- }), $s = typeof window != "undefined", Kt = { current: null }, ai = { current: !1 };
2125
- function Qs() {
2126
- if (ai.current = !0, !!$s)
2121
+ const Zn = () => ({ min: 0, max: 0 }), pn = () => ({
2122
+ x: Zn(),
2123
+ y: Zn()
2124
+ }), Xs = typeof window != "undefined", qt = { current: null }, li = { current: !1 };
2125
+ function Js() {
2126
+ if (li.current = !0, !!Xs)
2127
2127
  if (window.matchMedia) {
2128
- const n = window.matchMedia("(prefers-reduced-motion)"), t = () => Kt.current = n.matches;
2128
+ const n = window.matchMedia("(prefers-reduced-motion)"), t = () => qt.current = n.matches;
2129
2129
  n.addListener(t), t();
2130
2130
  } else
2131
- Kt.current = !1;
2131
+ qt.current = !1;
2132
2132
  }
2133
- function Zs(n) {
2133
+ function eo(n) {
2134
2134
  return n !== null && typeof n == "object" && typeof n.start == "function";
2135
2135
  }
2136
- function Xs(n) {
2136
+ function to(n) {
2137
2137
  return typeof n == "string" || Array.isArray(n);
2138
2138
  }
2139
- const Js = [
2139
+ const no = [
2140
2140
  "animate",
2141
2141
  "whileInView",
2142
2142
  "whileFocus",
@@ -2144,14 +2144,14 @@ const Js = [
2144
2144
  "whileTap",
2145
2145
  "whileDrag",
2146
2146
  "exit"
2147
- ], eo = ["initial", ...Js];
2148
- function si(n) {
2149
- return Zs(n.animate) || eo.some((t) => Xs(n[t]));
2147
+ ], ro = ["initial", ...no];
2148
+ function ci(n) {
2149
+ return eo(n.animate) || ro.some((t) => to(n[t]));
2150
2150
  }
2151
- function to(n) {
2152
- return !!(si(n) || n.variants);
2151
+ function io(n) {
2152
+ return !!(ci(n) || n.variants);
2153
2153
  }
2154
- function no(n, t, e) {
2154
+ function ao(n, t, e) {
2155
2155
  for (const r in t) {
2156
2156
  const i = t[r], a = e[r];
2157
2157
  if (me(i))
@@ -2171,29 +2171,29 @@ function no(n, t, e) {
2171
2171
  t[r] === void 0 && n.removeValue(r);
2172
2172
  return t;
2173
2173
  }
2174
- const oi = (n) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n), li = (n) => /^0[^.\s]+$/u.test(n), ro = {
2174
+ const di = (n) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n), ui = (n) => /^0[^.\s]+$/u.test(n), so = {
2175
2175
  test: (n) => n === "auto",
2176
2176
  parse: (n) => n
2177
- }, ci = (n) => (t) => t.test(n), di = [Be, Q, Se, Te, Pa, xa, ro], $n = (n) => di.find(ci(n)), io = [...di, ue, je], ao = (n) => io.find(ci(n)), so = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
2178
- function oo(n) {
2177
+ }, pi = (n) => (t) => t.test(n), hi = [Be, Q, Se, Te, Ma, ka, so], Xn = (n) => hi.find(pi(n)), oo = [...hi, ue, je], lo = (n) => oo.find(pi(n)), co = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
2178
+ function uo(n) {
2179
2179
  const [t, e] = n.slice(0, -1).split("(");
2180
2180
  if (t === "drop-shadow")
2181
2181
  return n;
2182
- const [r] = e.match(Jt) || [];
2182
+ const [r] = e.match(en) || [];
2183
2183
  if (!r)
2184
2184
  return n;
2185
2185
  const i = e.replace(r, "");
2186
- let a = so.has(t) ? 1 : 0;
2186
+ let a = co.has(t) ? 1 : 0;
2187
2187
  return r !== e && (a *= 100), t + "(" + a + i + ")";
2188
2188
  }
2189
- const lo = /\b([a-z-]*)\(.*?\)/gu, qt = J(j({}, je), {
2189
+ const po = /\b([a-z-]*)\(.*?\)/gu, Ht = X(j({}, je), {
2190
2190
  getAnimatableNone: (n) => {
2191
- const t = n.match(lo);
2192
- return t ? t.map(oo).join(" ") : n;
2191
+ const t = n.match(po);
2192
+ return t ? t.map(uo).join(" ") : n;
2193
2193
  }
2194
- }), Qn = J(j({}, Be), {
2194
+ }), Jn = X(j({}, Be), {
2195
2195
  transform: Math.round
2196
- }), co = {
2196
+ }), ho = {
2197
2197
  rotate: Te,
2198
2198
  rotateX: Te,
2199
2199
  rotateY: Te,
@@ -2215,10 +2215,10 @@ const lo = /\b([a-z-]*)\(.*?\)/gu, qt = J(j({}, je), {
2215
2215
  perspective: Q,
2216
2216
  transformPerspective: Q,
2217
2217
  opacity: Xe,
2218
- originX: Rn,
2219
- originY: Rn,
2218
+ originX: Sn,
2219
+ originY: Sn,
2220
2220
  originZ: Q
2221
- }, pn = J(j({
2221
+ }, hn = X(j({
2222
2222
  // Border props
2223
2223
  borderWidth: Q,
2224
2224
  borderTopWidth: Q,
@@ -2254,13 +2254,13 @@ const lo = /\b([a-z-]*)\(.*?\)/gu, qt = J(j({}, je), {
2254
2254
  // Misc
2255
2255
  backgroundPositionX: Q,
2256
2256
  backgroundPositionY: Q
2257
- }, co), {
2258
- zIndex: Qn,
2257
+ }, ho), {
2258
+ zIndex: Jn,
2259
2259
  // SVG
2260
2260
  fillOpacity: Xe,
2261
2261
  strokeOpacity: Xe,
2262
- numOctaves: Qn
2263
- }), uo = J(j({}, pn), {
2262
+ numOctaves: Jn
2263
+ }), mo = X(j({}, hn), {
2264
2264
  // Color props
2265
2265
  color: ue,
2266
2266
  backgroundColor: ue,
@@ -2273,14 +2273,14 @@ const lo = /\b([a-z-]*)\(.*?\)/gu, qt = J(j({}, je), {
2273
2273
  borderRightColor: ue,
2274
2274
  borderBottomColor: ue,
2275
2275
  borderLeftColor: ue,
2276
- filter: qt,
2277
- WebkitFilter: qt
2278
- }), ui = (n) => uo[n];
2279
- function pi(n, t) {
2280
- let e = ui(n);
2281
- return e !== qt && (e = je), e.getAnimatableNone ? e.getAnimatableNone(t) : void 0;
2282
- }
2283
- const Zn = [
2276
+ filter: Ht,
2277
+ WebkitFilter: Ht
2278
+ }), mi = (n) => mo[n];
2279
+ function fi(n, t) {
2280
+ let e = mi(n);
2281
+ return e !== Ht && (e = je), e.getAnimatableNone ? e.getAnimatableNone(t) : void 0;
2282
+ }
2283
+ const er = [
2284
2284
  "AnimationStart",
2285
2285
  "AnimationComplete",
2286
2286
  "Update",
@@ -2289,7 +2289,7 @@ const Zn = [
2289
2289
  "LayoutAnimationStart",
2290
2290
  "LayoutAnimationComplete"
2291
2291
  ];
2292
- class hi {
2292
+ class vi {
2293
2293
  /**
2294
2294
  * This method takes React props and returns found MotionValues. For example, HTML
2295
2295
  * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
@@ -2301,14 +2301,14 @@ class hi {
2301
2301
  return {};
2302
2302
  }
2303
2303
  constructor({ parent: t, props: e, presenceContext: r, reducedMotionConfig: i, blockInitialAnimation: a, visualState: s }, o = {}) {
2304
- this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = cn, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
2304
+ this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = dn, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
2305
2305
  this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
2306
2306
  }, this.renderScheduledAt = 0, this.scheduleRender = () => {
2307
2307
  const p = ve.now();
2308
2308
  this.renderScheduledAt < p && (this.renderScheduledAt = p, we.render(this.render, !1, !0));
2309
2309
  };
2310
2310
  const { latestValues: l, renderState: c } = s;
2311
- this.latestValues = l, this.baseTarget = j({}, l), this.initialValues = e.initial ? j({}, l) : {}, this.renderState = c, this.parent = t, this.props = e, this.presenceContext = r, this.depth = t ? t.depth + 1 : 0, this.reducedMotionConfig = i, this.options = o, this.blockInitialAnimation = !!a, this.isControllingVariants = si(e), this.isVariantNode = to(e), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(t && t.current);
2311
+ this.latestValues = l, this.baseTarget = j({}, l), this.initialValues = e.initial ? j({}, l) : {}, this.renderState = c, this.parent = t, this.props = e, this.presenceContext = r, this.depth = t ? t.depth + 1 : 0, this.reducedMotionConfig = i, this.options = o, this.blockInitialAnimation = !!a, this.isControllingVariants = ci(e), this.isVariantNode = io(e), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(t && t.current);
2312
2312
  const h = this.scrapeMotionValuesFromProps(e, {}, this), { willChange: d } = h, u = ge(h, ["willChange"]);
2313
2313
  for (const p in u) {
2314
2314
  const m = u[p];
@@ -2316,10 +2316,10 @@ class hi {
2316
2316
  }
2317
2317
  }
2318
2318
  mount(t) {
2319
- this.current = t, Qe.set(t, this), this.projection && !this.projection.instance && this.projection.mount(t), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((e, r) => this.bindToMotionValue(r, e)), ai.current || Qs(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : Kt.current, process.env.NODE_ENV !== "production" && Ir(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);
2319
+ this.current = t, Qe.set(t, this), this.projection && !this.projection.instance && this.projection.mount(t), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((e, r) => this.bindToMotionValue(r, e)), li.current || Js(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : qt.current, process.env.NODE_ENV !== "production" && Lr(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);
2320
2320
  }
2321
2321
  unmount() {
2322
- this.projection && this.projection.unmount(), xt(this.notifyUpdate), xt(this.render), this.valueSubscriptions.forEach((t) => t()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
2322
+ this.projection && this.projection.unmount(), Pt(this.notifyUpdate), Pt(this.render), this.valueSubscriptions.forEach((t) => t()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
2323
2323
  for (const t in this.events)
2324
2324
  this.events[t].clear();
2325
2325
  for (const t in this.features) {
@@ -2345,8 +2345,8 @@ class hi {
2345
2345
  }
2346
2346
  updateFeatures() {
2347
2347
  let t = "animation";
2348
- for (t in zt) {
2349
- const e = zt[t];
2348
+ for (t in Kt) {
2349
+ const e = Kt[t];
2350
2350
  if (!e)
2351
2351
  continue;
2352
2352
  const { isEnabled: r, Feature: i } = e;
@@ -2365,7 +2365,7 @@ class hi {
2365
2365
  * removed with a re-render to work.
2366
2366
  */
2367
2367
  measureViewportBox() {
2368
- return this.current ? this.measureInstanceViewportBox(this.current, this.props) : un();
2368
+ return this.current ? this.measureInstanceViewportBox(this.current, this.props) : pn();
2369
2369
  }
2370
2370
  getStaticValue(t) {
2371
2371
  return this.latestValues[t];
@@ -2379,13 +2379,13 @@ class hi {
2379
2379
  */
2380
2380
  update(t, e) {
2381
2381
  (t.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = t, this.prevPresenceContext = this.presenceContext, this.presenceContext = e;
2382
- for (let r = 0; r < Zn.length; r++) {
2383
- const i = Zn[r];
2382
+ for (let r = 0; r < er.length; r++) {
2383
+ const i = er[r];
2384
2384
  this.propEventSubscriptions[i] && (this.propEventSubscriptions[i](), delete this.propEventSubscriptions[i]);
2385
2385
  const a = "on" + i, s = t[a];
2386
2386
  s && (this.propEventSubscriptions[i] = this.on(i, s));
2387
2387
  }
2388
- this.prevMotionValues = no(this, this.scrapeMotionValuesFromProps(t, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
2388
+ this.prevMotionValues = ao(this, this.scrapeMotionValuesFromProps(t, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
2389
2389
  }
2390
2390
  getProps() {
2391
2391
  return this.props;
@@ -2451,7 +2451,7 @@ class hi {
2451
2451
  readValue(t, e) {
2452
2452
  var i;
2453
2453
  let r = this.latestValues[t] !== void 0 || !this.current ? this.latestValues[t] : (i = this.getBaseTargetFromProps(this.props, t)) != null ? i : this.readValueFromInstance(this.current, t, this.options);
2454
- return r != null && (typeof r == "string" && (oi(r) || li(r)) ? r = parseFloat(r) : !ao(r) && je.test(e) && (r = pi(t, e)), this.setBaseTarget(t, me(r) ? r.get() : r)), me(r) ? r.get() : r;
2454
+ return r != null && (typeof r == "string" && (di(r) || ui(r)) ? r = parseFloat(r) : !lo(r) && je.test(e) && (r = fi(t, e)), this.setBaseTarget(t, me(r) ? r.get() : r)), me(r) ? r.get() : r;
2455
2455
  }
2456
2456
  /**
2457
2457
  * Set the base target to later animate back to. This is currently
@@ -2469,7 +2469,7 @@ class hi {
2469
2469
  const { initial: e } = this.props;
2470
2470
  let r;
2471
2471
  if (typeof e == "string" || typeof e == "object") {
2472
- const s = Tr(this.props, e, (a = this.presenceContext) == null ? void 0 : a.custom);
2472
+ const s = Nr(this.props, e, (a = this.presenceContext) == null ? void 0 : a.custom);
2473
2473
  s && (r = s[t]);
2474
2474
  }
2475
2475
  if (e && r !== void 0)
@@ -2478,51 +2478,51 @@ class hi {
2478
2478
  return i !== void 0 && !me(i) ? i : this.initialValues[t] !== void 0 && r === void 0 ? void 0 : this.baseTarget[t];
2479
2479
  }
2480
2480
  on(t, e) {
2481
- return this.events[t] || (this.events[t] = new Or()), this.events[t].add(e);
2481
+ return this.events[t] || (this.events[t] = new xr()), this.events[t].add(e);
2482
2482
  }
2483
2483
  notify(t, ...e) {
2484
2484
  this.events[t] && this.events[t].notify(...e);
2485
2485
  }
2486
2486
  }
2487
- const po = (
2487
+ const fo = (
2488
2488
  // eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
2489
2489
  /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
2490
2490
  );
2491
- function ho(n) {
2492
- const t = po.exec(n);
2491
+ function vo(n) {
2492
+ const t = fo.exec(n);
2493
2493
  if (!t)
2494
2494
  return [,];
2495
2495
  const [, e, r, i] = t;
2496
2496
  return [`--${e != null ? e : r}`, i];
2497
2497
  }
2498
- const mo = 4;
2499
- function mi(n, t, e = 1) {
2500
- Ce(e <= mo, `Max CSS variable fallback depth detected in property "${n}". This may indicate a circular fallback dependency.`);
2501
- const [r, i] = ho(n);
2498
+ const go = 4;
2499
+ function gi(n, t, e = 1) {
2500
+ Ce(e <= go, `Max CSS variable fallback depth detected in property "${n}". This may indicate a circular fallback dependency.`);
2501
+ const [r, i] = vo(n);
2502
2502
  if (!r)
2503
2503
  return;
2504
2504
  const a = window.getComputedStyle(t).getPropertyValue(r);
2505
2505
  if (a) {
2506
2506
  const s = a.trim();
2507
- return oi(s) ? parseFloat(s) : s;
2507
+ return di(s) ? parseFloat(s) : s;
2508
2508
  }
2509
- return Xt(i) ? mi(i, t, e + 1) : i;
2509
+ return Jt(i) ? gi(i, t, e + 1) : i;
2510
2510
  }
2511
- function fo(n) {
2512
- return typeof n == "number" ? n === 0 : n !== null ? n === "none" || n === "0" || li(n) : !0;
2511
+ function yo(n) {
2512
+ return typeof n == "number" ? n === 0 : n !== null ? n === "none" || n === "0" || ui(n) : !0;
2513
2513
  }
2514
- const vo = /* @__PURE__ */ new Set(["auto", "none", "0"]);
2515
- function go(n, t, e) {
2514
+ const bo = /* @__PURE__ */ new Set(["auto", "none", "0"]);
2515
+ function Eo(n, t, e) {
2516
2516
  let r = 0, i;
2517
2517
  for (; r < n.length && !i; ) {
2518
2518
  const a = n[r];
2519
- typeof a == "string" && !vo.has(a) && Je(a).values.length && (i = n[r]), r++;
2519
+ typeof a == "string" && !bo.has(a) && Je(a).values.length && (i = n[r]), r++;
2520
2520
  }
2521
2521
  if (i && e)
2522
2522
  for (const a of t)
2523
- n[a] = pi(e, i);
2523
+ n[a] = fi(e, i);
2524
2524
  }
2525
- class yo extends cn {
2525
+ class _o extends dn {
2526
2526
  constructor(t, e, r, i, a) {
2527
2527
  super(t, e, r, i, a, !0);
2528
2528
  }
@@ -2533,16 +2533,16 @@ class yo extends cn {
2533
2533
  super.readKeyframes();
2534
2534
  for (let l = 0; l < t.length; l++) {
2535
2535
  let c = t[l];
2536
- if (typeof c == "string" && (c = c.trim(), Xt(c))) {
2537
- const d = mi(c, e.current);
2536
+ if (typeof c == "string" && (c = c.trim(), Jt(c))) {
2537
+ const d = gi(c, e.current);
2538
2538
  d !== void 0 && (t[l] = d), l === t.length - 1 && (this.finalKeyframe = c);
2539
2539
  }
2540
2540
  }
2541
- if (this.resolveNoneKeyframes(), !ii.has(r) || t.length !== 2)
2541
+ if (this.resolveNoneKeyframes(), !oi.has(r) || t.length !== 2)
2542
2542
  return;
2543
- const [i, a] = t, s = $n(i), o = $n(a);
2543
+ const [i, a] = t, s = Xn(i), o = Xn(a);
2544
2544
  if (s !== o)
2545
- if (Kn(s) && Kn(o))
2545
+ if (Wn(s) && Wn(o))
2546
2546
  for (let l = 0; l < t.length; l++) {
2547
2547
  const c = t[l];
2548
2548
  typeof c == "string" && (t[l] = parseFloat(c));
@@ -2552,8 +2552,8 @@ class yo extends cn {
2552
2552
  resolveNoneKeyframes() {
2553
2553
  const { unresolvedKeyframes: t, name: e } = this, r = [];
2554
2554
  for (let i = 0; i < t.length; i++)
2555
- (t[i] === null || fo(t[i])) && r.push(i);
2556
- r.length && go(t, r, e);
2555
+ (t[i] === null || yo(t[i])) && r.push(i);
2556
+ r.length && Eo(t, r, e);
2557
2557
  }
2558
2558
  measureInitialState() {
2559
2559
  const { element: t, unresolvedKeyframes: e, name: r } = this;
@@ -2576,9 +2576,9 @@ class yo extends cn {
2576
2576
  }), this.resolveNoneKeyframes();
2577
2577
  }
2578
2578
  }
2579
- class fi extends hi {
2579
+ class yi extends vi {
2580
2580
  constructor() {
2581
- super(...arguments), this.KeyframeResolver = yo;
2581
+ super(...arguments), this.KeyframeResolver = _o;
2582
2582
  }
2583
2583
  sortInstanceNodePosition(t, e) {
2584
2584
  return t.compareDocumentPosition(e) & 2 ? 1 : -1;
@@ -2597,24 +2597,24 @@ class fi extends hi {
2597
2597
  }));
2598
2598
  }
2599
2599
  }
2600
- const vi = (n, t) => t && typeof n == "number" ? t.transform(n) : n, bo = {
2600
+ const bi = (n, t) => t && typeof n == "number" ? t.transform(n) : n, Co = {
2601
2601
  x: "translateX",
2602
2602
  y: "translateY",
2603
2603
  z: "translateZ",
2604
2604
  transformPerspective: "perspective"
2605
- }, Eo = Fe.length;
2606
- function _o(n, t, e) {
2605
+ }, Ao = Fe.length;
2606
+ function wo(n, t, e) {
2607
2607
  let r = "", i = !0;
2608
- for (let a = 0; a < Eo; a++) {
2608
+ for (let a = 0; a < Ao; a++) {
2609
2609
  const s = Fe[a], o = n[s];
2610
2610
  if (o === void 0)
2611
2611
  continue;
2612
2612
  let l = !0;
2613
2613
  if (typeof o == "number" ? l = o === (s.startsWith("scale") ? 1 : 0) : l = parseFloat(o) === 0, !l || e) {
2614
- const c = vi(o, pn[s]);
2614
+ const c = bi(o, hn[s]);
2615
2615
  if (!l) {
2616
2616
  i = !1;
2617
- const d = bo[s] || s;
2617
+ const d = Co[s] || s;
2618
2618
  r += `${d}(${c}) `;
2619
2619
  }
2620
2620
  e && (t[s] = c);
@@ -2622,7 +2622,7 @@ function _o(n, t, e) {
2622
2622
  }
2623
2623
  return r = r.trim(), e ? r = e(t, i ? "" : r) : i && (r = "none"), r;
2624
2624
  }
2625
- function gi(n, t, e) {
2625
+ function Ei(n, t, e) {
2626
2626
  const { style: r, vars: i, transformOrigin: a } = n;
2627
2627
  let s = !1, o = !1;
2628
2628
  for (const l in t) {
@@ -2630,70 +2630,70 @@ function gi(n, t, e) {
2630
2630
  if (Ue.has(l)) {
2631
2631
  s = !0;
2632
2632
  continue;
2633
- } else if (Pr(l)) {
2633
+ } else if (Mr(l)) {
2634
2634
  i[l] = c;
2635
2635
  continue;
2636
2636
  } else {
2637
- const d = vi(c, pn[l]);
2637
+ const d = bi(c, hn[l]);
2638
2638
  l.startsWith("origin") ? (o = !0, a[l] = d) : r[l] = d;
2639
2639
  }
2640
2640
  }
2641
- if (t.transform || (s || e ? r.transform = _o(t, n.transform, e) : r.transform && (r.transform = "none")), o) {
2641
+ if (t.transform || (s || e ? r.transform = wo(t, n.transform, e) : r.transform && (r.transform = "none")), o) {
2642
2642
  const { originX: l = "50%", originY: c = "50%", originZ: d = 0 } = a;
2643
2643
  r.transformOrigin = `${l} ${c} ${d}`;
2644
2644
  }
2645
2645
  }
2646
- function yi(n, { style: t, vars: e }, r, i) {
2646
+ function _i(n, { style: t, vars: e }, r, i) {
2647
2647
  Object.assign(n.style, t, i && i.getProjectionStyles(r));
2648
2648
  for (const a in e)
2649
2649
  n.style.setProperty(a, e[a]);
2650
2650
  }
2651
- const Co = {};
2652
- function Ao(n, { layout: t, layoutId: e }) {
2653
- return Ue.has(n) || n.startsWith("origin") || (t || e !== void 0) && (!!Co[n] || n === "opacity");
2651
+ const To = {};
2652
+ function Io(n, { layout: t, layoutId: e }) {
2653
+ return Ue.has(n) || n.startsWith("origin") || (t || e !== void 0) && (!!To[n] || n === "opacity");
2654
2654
  }
2655
- function bi(n, t, e) {
2655
+ function Ci(n, t, e) {
2656
2656
  var a;
2657
2657
  const { style: r } = n, i = {};
2658
2658
  for (const s in r)
2659
- (me(r[s]) || t.style && me(t.style[s]) || Ao(s, n) || ((a = e == null ? void 0 : e.getValue(s)) == null ? void 0 : a.liveStyle) !== void 0) && (i[s] = r[s]);
2659
+ (me(r[s]) || t.style && me(t.style[s]) || Io(s, n) || ((a = e == null ? void 0 : e.getValue(s)) == null ? void 0 : a.liveStyle) !== void 0) && (i[s] = r[s]);
2660
2660
  return i;
2661
2661
  }
2662
- function wo(n) {
2662
+ function Oo(n) {
2663
2663
  return window.getComputedStyle(n);
2664
2664
  }
2665
- class To extends fi {
2665
+ class No extends yi {
2666
2666
  constructor() {
2667
- super(...arguments), this.type = "html", this.renderInstance = yi;
2667
+ super(...arguments), this.type = "html", this.renderInstance = _i;
2668
2668
  }
2669
2669
  readValueFromInstance(t, e) {
2670
2670
  var r;
2671
2671
  if (Ue.has(e))
2672
- return (r = this.projection) != null && r.isProjecting ? Vt(e) : bs(t, e);
2672
+ return (r = this.projection) != null && r.isProjecting ? Ft(e) : Cs(t, e);
2673
2673
  {
2674
- const i = wo(t), a = (Pr(e) ? i.getPropertyValue(e) : i[e]) || 0;
2674
+ const i = Oo(t), a = (Mr(e) ? i.getPropertyValue(e) : i[e]) || 0;
2675
2675
  return typeof a == "string" ? a.trim() : a;
2676
2676
  }
2677
2677
  }
2678
2678
  measureInstanceViewportBox(t, { transformPagePoint: e }) {
2679
- return Ys(t, e);
2679
+ return Zs(t, e);
2680
2680
  }
2681
2681
  build(t, e, r) {
2682
- gi(t, e, r.transformTemplate);
2682
+ Ei(t, e, r.transformTemplate);
2683
2683
  }
2684
2684
  scrapeMotionValuesFromProps(t, e, r) {
2685
- return bi(t, e, r);
2685
+ return Ci(t, e, r);
2686
2686
  }
2687
2687
  }
2688
- function Io(n, t) {
2688
+ function Lo(n, t) {
2689
2689
  return n in t;
2690
2690
  }
2691
- class Oo extends hi {
2691
+ class xo extends vi {
2692
2692
  constructor() {
2693
2693
  super(...arguments), this.type = "object";
2694
2694
  }
2695
2695
  readValueFromInstance(t, e) {
2696
- if (Io(e, t)) {
2696
+ if (Lo(e, t)) {
2697
2697
  const r = t[e];
2698
2698
  if (typeof r == "string" || typeof r == "number")
2699
2699
  return r;
@@ -2705,7 +2705,7 @@ class Oo extends hi {
2705
2705
  delete e.output[t];
2706
2706
  }
2707
2707
  measureInstanceViewportBox() {
2708
- return un();
2708
+ return pn();
2709
2709
  }
2710
2710
  build(t, e) {
2711
2711
  Object.assign(t.output, e);
@@ -2717,21 +2717,21 @@ class Oo extends hi {
2717
2717
  return 0;
2718
2718
  }
2719
2719
  }
2720
- const No = {
2720
+ const Po = {
2721
2721
  offset: "stroke-dashoffset",
2722
2722
  array: "stroke-dasharray"
2723
- }, Lo = {
2723
+ }, Ro = {
2724
2724
  offset: "strokeDashoffset",
2725
2725
  array: "strokeDasharray"
2726
2726
  };
2727
- function xo(n, t, e = 1, r = 0, i = !0) {
2727
+ function ko(n, t, e = 1, r = 0, i = !0) {
2728
2728
  n.pathLength = 1;
2729
- const a = i ? No : Lo;
2729
+ const a = i ? Po : Ro;
2730
2730
  n[a.offset] = Q.transform(-r);
2731
2731
  const s = Q.transform(t), o = Q.transform(e);
2732
2732
  n[a.array] = `${s} ${o}`;
2733
2733
  }
2734
- function Po(n, u, l, c, d) {
2734
+ function Mo(n, u, l, c, d) {
2735
2735
  var h = u, {
2736
2736
  attrX: t,
2737
2737
  attrY: e,
@@ -2748,15 +2748,15 @@ function Po(n, u, l, c, d) {
2748
2748
  "pathOffset"
2749
2749
  ]);
2750
2750
  var f, v;
2751
- if (gi(n, o, c), l) {
2751
+ if (Ei(n, o, c), l) {
2752
2752
  n.style.viewBox && (n.attrs.viewBox = n.style.viewBox);
2753
2753
  return;
2754
2754
  }
2755
2755
  n.attrs = n.style, n.style = {};
2756
2756
  const { attrs: p, style: m } = n;
2757
- 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 = d == null ? void 0 : d.transformBox) != null ? v : "fill-box", delete p.transformBox), t !== void 0 && (p.x = t), e !== void 0 && (p.y = e), r !== void 0 && (p.scale = r), i !== void 0 && xo(p, i, a, s, !1);
2757
+ 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 = d == null ? void 0 : d.transformBox) != null ? v : "fill-box", delete p.transformBox), t !== void 0 && (p.x = t), e !== void 0 && (p.y = e), r !== void 0 && (p.scale = r), i !== void 0 && ko(p, i, a, s, !1);
2758
2758
  }
2759
- const Ei = /* @__PURE__ */ new Set([
2759
+ const Ai = /* @__PURE__ */ new Set([
2760
2760
  "baseFrequency",
2761
2761
  "diffuseConstant",
2762
2762
  "kernelMatrix",
@@ -2780,14 +2780,14 @@ const Ei = /* @__PURE__ */ new Set([
2780
2780
  "startOffset",
2781
2781
  "textLength",
2782
2782
  "lengthAdjust"
2783
- ]), Ro = (n) => typeof n == "string" && n.toLowerCase() === "svg";
2784
- function ko(n, t, e, r) {
2785
- yi(n, t, void 0, r);
2783
+ ]), So = (n) => typeof n == "string" && n.toLowerCase() === "svg";
2784
+ function Do(n, t, e, r) {
2785
+ _i(n, t, void 0, r);
2786
2786
  for (const i in t.attrs)
2787
- n.setAttribute(Ei.has(i) ? i : Zt(i), t.attrs[i]);
2787
+ n.setAttribute(Ai.has(i) ? i : Xt(i), t.attrs[i]);
2788
2788
  }
2789
- function Mo(n, t, e) {
2790
- const r = bi(n, t, e);
2789
+ function Vo(n, t, e) {
2790
+ const r = Ci(n, t, e);
2791
2791
  for (const i in n)
2792
2792
  if (me(n[i]) || me(t[i])) {
2793
2793
  const a = Fe.indexOf(i) !== -1 ? "attr" + i.charAt(0).toUpperCase() + i.substring(1) : i;
@@ -2795,40 +2795,40 @@ function Mo(n, t, e) {
2795
2795
  }
2796
2796
  return r;
2797
2797
  }
2798
- class So extends fi {
2798
+ class Fo extends yi {
2799
2799
  constructor() {
2800
- super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = un;
2800
+ super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = pn;
2801
2801
  }
2802
2802
  getBaseTargetFromProps(t, e) {
2803
2803
  return t[e];
2804
2804
  }
2805
2805
  readValueFromInstance(t, e) {
2806
2806
  if (Ue.has(e)) {
2807
- const r = ui(e);
2807
+ const r = mi(e);
2808
2808
  return r && r.default || 0;
2809
2809
  }
2810
- return e = Ei.has(e) ? e : Zt(e), t.getAttribute(e);
2810
+ return e = Ai.has(e) ? e : Xt(e), t.getAttribute(e);
2811
2811
  }
2812
2812
  scrapeMotionValuesFromProps(t, e, r) {
2813
- return Mo(t, e, r);
2813
+ return Vo(t, e, r);
2814
2814
  }
2815
2815
  build(t, e, r) {
2816
- Po(t, e, this.isSVGTag, r.transformTemplate, r.style);
2816
+ Mo(t, e, this.isSVGTag, r.transformTemplate, r.style);
2817
2817
  }
2818
2818
  renderInstance(t, e, r, i) {
2819
- ko(t, e, r, i);
2819
+ Do(t, e, r, i);
2820
2820
  }
2821
2821
  mount(t) {
2822
- this.isSVGTag = Ro(t.tagName), super.mount(t);
2822
+ this.isSVGTag = So(t.tagName), super.mount(t);
2823
2823
  }
2824
2824
  }
2825
- function _i(n) {
2826
- return ni(n) && "ownerSVGElement" in n;
2825
+ function wi(n) {
2826
+ return ai(n) && "ownerSVGElement" in n;
2827
2827
  }
2828
- function Do(n) {
2829
- return _i(n) && n.tagName === "svg";
2828
+ function Uo(n) {
2829
+ return wi(n) && n.tagName === "svg";
2830
2830
  }
2831
- function Vo(n) {
2831
+ function Bo(n) {
2832
2832
  const t = {
2833
2833
  presenceContext: null,
2834
2834
  props: {},
@@ -2842,10 +2842,10 @@ function Vo(n) {
2842
2842
  },
2843
2843
  latestValues: {}
2844
2844
  }
2845
- }, e = _i(n) && !Do(n) ? new So(t) : new To(t);
2845
+ }, e = wi(n) && !Uo(n) ? new Fo(t) : new No(t);
2846
2846
  e.mount(n), Qe.set(n, e);
2847
2847
  }
2848
- function Fo(n) {
2848
+ function jo(n) {
2849
2849
  const t = {
2850
2850
  presenceContext: null,
2851
2851
  props: {},
@@ -2855,39 +2855,39 @@ function Fo(n) {
2855
2855
  },
2856
2856
  latestValues: {}
2857
2857
  }
2858
- }, e = new Oo(t);
2858
+ }, e = new xo(t);
2859
2859
  e.mount(n), Qe.set(n, e);
2860
2860
  }
2861
- function Uo(n, t, e) {
2861
+ function zo(n, t, e) {
2862
2862
  const r = me(n) ? n : Ze(n);
2863
- return r.start(ri("", r, t, e)), r.animation;
2863
+ return r.start(si("", r, t, e)), r.animation;
2864
2864
  }
2865
- function Bo(n, t) {
2866
- return me(n) || typeof n == "number" || typeof n == "string" && !Gt(t);
2865
+ function Ko(n, t) {
2866
+ return me(n) || typeof n == "number" || typeof n == "string" && !Yt(t);
2867
2867
  }
2868
- function Ci(n, t, e, r) {
2868
+ function Ti(n, t, e, r) {
2869
2869
  const i = [];
2870
- if (Bo(n, t))
2871
- i.push(Uo(n, Gt(t) && t.default || t, e && (e.default || e)));
2870
+ if (Ko(n, t))
2871
+ i.push(zo(n, Yt(t) && t.default || t, e && (e.default || e)));
2872
2872
  else {
2873
- const a = yr(n, t, r), s = a.length;
2873
+ const a = _r(n, t, r), s = a.length;
2874
2874
  Ce(!!s, "No valid elements provided.");
2875
2875
  for (let o = 0; o < s; o++) {
2876
- const l = a[o], c = l instanceof Element ? Vo : Fo;
2876
+ const l = a[o], c = l instanceof Element ? Bo : jo;
2877
2877
  Qe.has(l) || c(l);
2878
2878
  const d = Qe.get(l), u = j({}, e);
2879
- "delay" in u && typeof u.delay == "function" && (u.delay = u.delay(o, s)), i.push(...Hs(d, J(j({}, t), { transition: u }), {}));
2879
+ "delay" in u && typeof u.delay == "function" && (u.delay = u.delay(o, s)), i.push(...Ys(d, X(j({}, t), { transition: u }), {}));
2880
2880
  }
2881
2881
  }
2882
2882
  return i;
2883
2883
  }
2884
- function jo(n, t, e) {
2884
+ function qo(n, t, e) {
2885
2885
  const r = [];
2886
- return $i(n, t, e, { spring: et }).forEach(({ keyframes: a, transition: s }, o) => {
2887
- r.push(...Ci(o, a, s));
2886
+ return Xi(n, t, e, { spring: et }).forEach(({ keyframes: a, transition: s }, o) => {
2887
+ r.push(...Ti(o, a, s));
2888
2888
  }), r;
2889
2889
  }
2890
- class zo {
2890
+ class Ho {
2891
2891
  constructor(t) {
2892
2892
  this.stop = () => this.runAll("stop"), this.animations = t.filter(Boolean);
2893
2893
  }
@@ -2952,34 +2952,34 @@ class zo {
2952
2952
  this.runAll("complete");
2953
2953
  }
2954
2954
  }
2955
- class Ko extends zo {
2955
+ class Wo extends Ho {
2956
2956
  then(t, e) {
2957
2957
  return this.finished.finally(t).then(() => {
2958
2958
  });
2959
2959
  }
2960
2960
  }
2961
- function qo(n) {
2961
+ function Go(n) {
2962
2962
  return Array.isArray(n) && n.some(Array.isArray);
2963
2963
  }
2964
- function Ho(n) {
2964
+ function Yo(n) {
2965
2965
  function t(e, r, i) {
2966
2966
  let a = [];
2967
- return qo(e) ? a = jo(e, r, n) : a = Ci(e, r, i, n), new Ko(a);
2967
+ return Go(e) ? a = qo(e, r, n) : a = Ti(e, r, i, n), new Wo(a);
2968
2968
  }
2969
2969
  return t;
2970
2970
  }
2971
- const oe = Ho(), Wo = "_spinner_1waxg_1", Go = "_spinnerContainer_1waxg_5", Yo = "_success_1waxg_9", $o = "_successContainer_1waxg_13", Qo = "_container_1waxg_17", Zo = "_card_1waxg_26", Xo = "_warning_1waxg_35", Jo = "_svg_1waxg_43", el = "_srOnly_1waxg_48", Z = {
2972
- spinner: Wo,
2973
- spinnerContainer: Go,
2974
- success: Yo,
2975
- successContainer: $o,
2976
- container: Qo,
2977
- card: Zo,
2978
- warning: Xo,
2979
- svg: Jo,
2980
- srOnly: el
2971
+ const oe = Yo(), $o = "_spinner_1waxg_1", Qo = "_spinnerContainer_1waxg_5", Zo = "_success_1waxg_9", Xo = "_successContainer_1waxg_13", Jo = "_container_1waxg_17", el = "_card_1waxg_26", tl = "_warning_1waxg_35", nl = "_svg_1waxg_43", rl = "_srOnly_1waxg_48", Z = {
2972
+ spinner: $o,
2973
+ spinnerContainer: Qo,
2974
+ success: Zo,
2975
+ successContainer: Xo,
2976
+ container: Jo,
2977
+ card: el,
2978
+ warning: tl,
2979
+ svg: nl,
2980
+ srOnly: rl
2981
2981
  };
2982
- class Ai {
2982
+ class Ii {
2983
2983
  constructor() {
2984
2984
  b(this, "template", `
2985
2985
  <svg aria-hidden="true" class="${Z.spinner}" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -3001,40 +3001,40 @@ class Ai {
3001
3001
  return this.spinner;
3002
3002
  }
3003
3003
  }
3004
- const tl = "_loader_nwq3e_1", Xn = {
3005
- loader: tl
3004
+ const il = "_loader_nwq3e_1", tr = {
3005
+ loader: il
3006
3006
  };
3007
- class nl {
3007
+ class al {
3008
3008
  constructor() {
3009
3009
  b(this, "loader");
3010
- this.loader = document.createElement("div"), this.loader.classList.add(Xn.loader), this.loader.appendChild(new Ai().render());
3010
+ this.loader = document.createElement("div"), this.loader.classList.add(tr.loader), this.loader.appendChild(new Ii().render());
3011
3011
  }
3012
3012
  setClassName(t) {
3013
- t ? this.loader.classList.add(t) : this.loader.className = Xn.loader;
3013
+ t ? this.loader.classList.add(t) : this.loader.className = tr.loader;
3014
3014
  }
3015
3015
  render() {
3016
3016
  return this.loader;
3017
3017
  }
3018
3018
  }
3019
- const rl = "_checkout_5sq3n_1", il = "_hidden_5sq3n_7", al = "_formInitial_5sq3n_11", sl = "_btnsInitial_5sq3n_16", ce = {
3020
- checkout: rl,
3021
- hidden: il,
3022
- formInitial: al,
3023
- btnsInitial: sl
3024
- }, ol = "_buttons_1i8cu_1", ll = "_hidden_1i8cu_5", Ct = {
3025
- buttons: ol,
3026
- hidden: ll
3027
- }, cl = "_applePay_1y98r_1", dl = "_hidden_1y98r_22", At = {
3028
- applePay: cl,
3029
- hidden: dl
3019
+ const sl = "_checkout_5sq3n_1", ol = "_hidden_5sq3n_7", ll = "_formInitial_5sq3n_11", cl = "_btnsInitial_5sq3n_16", ce = {
3020
+ checkout: sl,
3021
+ hidden: ol,
3022
+ formInitial: ll,
3023
+ btnsInitial: cl
3024
+ }, dl = "_buttons_1i8cu_1", ul = "_hidden_1i8cu_5", At = {
3025
+ buttons: dl,
3026
+ hidden: ul
3027
+ }, pl = "_applePay_1g5vd_1", hl = "_hidden_1g5vd_24", wt = {
3028
+ applePay: pl,
3029
+ hidden: hl
3030
3030
  };
3031
- function wi(n) {
3031
+ function Oi(n) {
3032
3032
  return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
3033
3033
  }
3034
- var wt, Jn;
3035
- function ul() {
3036
- if (Jn) return wt;
3037
- Jn = 1;
3034
+ var Tt, nr;
3035
+ function ml() {
3036
+ if (nr) return Tt;
3037
+ nr = 1;
3038
3038
  var n = {
3039
3039
  visa: {
3040
3040
  niceType: "Visa",
@@ -3227,21 +3227,21 @@ function ul() {
3227
3227
  }
3228
3228
  }
3229
3229
  };
3230
- return wt = n, wt;
3230
+ return Tt = n, Tt;
3231
3231
  }
3232
- var ze = {}, Ke = {}, er;
3233
- function Ti() {
3234
- if (er) return Ke;
3235
- er = 1, Object.defineProperty(Ke, "__esModule", { value: !0 }), Ke.clone = void 0;
3232
+ var ze = {}, Ke = {}, rr;
3233
+ function Ni() {
3234
+ if (rr) return Ke;
3235
+ rr = 1, Object.defineProperty(Ke, "__esModule", { value: !0 }), Ke.clone = void 0;
3236
3236
  function n(t) {
3237
3237
  return t ? JSON.parse(JSON.stringify(t)) : null;
3238
3238
  }
3239
3239
  return Ke.clone = n, Ke;
3240
3240
  }
3241
- var qe = {}, tr;
3242
- function pl() {
3243
- if (tr) return qe;
3244
- tr = 1, Object.defineProperty(qe, "__esModule", { value: !0 }), qe.matches = void 0;
3241
+ var qe = {}, ir;
3242
+ function fl() {
3243
+ if (ir) return qe;
3244
+ ir = 1, Object.defineProperty(qe, "__esModule", { value: !0 }), qe.matches = void 0;
3245
3245
  function n(r, i, a) {
3246
3246
  var s = String(i).length, o = r.substr(0, s), l = parseInt(o, 10);
3247
3247
  return i = parseInt(String(i).substr(0, o.length), 10), a = parseInt(String(a).substr(0, o.length), 10), l >= i && l <= a;
@@ -3254,11 +3254,11 @@ function pl() {
3254
3254
  }
3255
3255
  return qe.matches = e, qe;
3256
3256
  }
3257
- var nr;
3258
- function hl() {
3259
- if (nr) return ze;
3260
- nr = 1, Object.defineProperty(ze, "__esModule", { value: !0 }), ze.addMatchingCardsToResults = void 0;
3261
- var n = Ti(), t = pl();
3257
+ var ar;
3258
+ function vl() {
3259
+ if (ar) return ze;
3260
+ ar = 1, Object.defineProperty(ze, "__esModule", { value: !0 }), ze.addMatchingCardsToResults = void 0;
3261
+ var n = Ni(), t = fl();
3262
3262
  function e(r, i, a) {
3263
3263
  var s, o;
3264
3264
  for (s = 0; s < i.patterns.length; s++) {
@@ -3272,19 +3272,19 @@ function hl() {
3272
3272
  }
3273
3273
  return ze.addMatchingCardsToResults = e, ze;
3274
3274
  }
3275
- var He = {}, rr;
3276
- function ml() {
3277
- if (rr) return He;
3278
- rr = 1, Object.defineProperty(He, "__esModule", { value: !0 }), He.isValidInputType = void 0;
3275
+ var He = {}, sr;
3276
+ function gl() {
3277
+ if (sr) return He;
3278
+ sr = 1, Object.defineProperty(He, "__esModule", { value: !0 }), He.isValidInputType = void 0;
3279
3279
  function n(t) {
3280
3280
  return typeof t == "string" || t instanceof String;
3281
3281
  }
3282
3282
  return He.isValidInputType = n, He;
3283
3283
  }
3284
- var We = {}, ir;
3285
- function fl() {
3286
- if (ir) return We;
3287
- ir = 1, Object.defineProperty(We, "__esModule", { value: !0 }), We.findBestMatch = void 0;
3284
+ var We = {}, or;
3285
+ function yl() {
3286
+ if (or) return We;
3287
+ or = 1, Object.defineProperty(We, "__esModule", { value: !0 }), We.findBestMatch = void 0;
3288
3288
  function n(e) {
3289
3289
  var r = e.filter(function(i) {
3290
3290
  return i.matchStrength;
@@ -3298,10 +3298,10 @@ function fl() {
3298
3298
  }
3299
3299
  return We.findBestMatch = t, We;
3300
3300
  }
3301
- var Ge, ar;
3302
- function vl() {
3303
- if (ar) return Ge;
3304
- ar = 1;
3301
+ var Ge, lr;
3302
+ function bl() {
3303
+ if (lr) return Ge;
3304
+ lr = 1;
3305
3305
  var n = Ge && Ge.__assign || function() {
3306
3306
  return n = Object.assign || function(m) {
3307
3307
  for (var f, v = 1, y = arguments.length; v < y; v++) {
@@ -3310,7 +3310,7 @@ function vl() {
3310
3310
  }
3311
3311
  return m;
3312
3312
  }, n.apply(this, arguments);
3313
- }, t = ul(), e = hl(), r = ml(), i = fl(), a = Ti(), s = {}, o = {
3313
+ }, t = ml(), e = vl(), r = gl(), i = yl(), a = Ni(), s = {}, o = {
3314
3314
  VISA: "visa",
3315
3315
  MASTERCARD: "mastercard",
3316
3316
  AMERICAN_EXPRESS: "american-express",
@@ -3388,24 +3388,24 @@ function vl() {
3388
3388
  c = (0, a.clone)(l), s = {};
3389
3389
  }, p.types = o, Ge = p, Ge;
3390
3390
  }
3391
- var De = vl();
3391
+ var De = bl();
3392
3392
  De.updateCard("visa", {
3393
3393
  lengths: [16]
3394
3394
  });
3395
3395
  De.updateCard("unionpay", {
3396
3396
  gaps: [4, 8, 12, 16]
3397
3397
  });
3398
- const gl = (n, t) => {
3398
+ const El = (n, t) => {
3399
3399
  const e = De.getTypeInfo(t), r = n.replace(/\D/g, ""), i = (e == null ? void 0 : e.gaps) || [4, 8, 12], a = e ? Math.max(...e.lengths) + i.length : 19, s = [0].concat(i, r.length), o = [];
3400
3400
  for (let l = 0; s[l] < r.length; l++) {
3401
3401
  const c = s[l], d = Math.min(s[l + 1], r.length);
3402
3402
  o.push(r.slice(c, d));
3403
3403
  }
3404
3404
  return o.join(" ").slice(0, a);
3405
- }, yl = (n, t) => {
3405
+ }, _l = (n, t) => {
3406
3406
  const e = De.getTypeInfo(t), r = (e == null ? void 0 : e.code.size) || 4;
3407
3407
  return n.replace(/\D/g, "").slice(0, r);
3408
- }, bl = (n, t) => {
3408
+ }, Cl = (n, t) => {
3409
3409
  const e = n.replace(/\D/g, "");
3410
3410
  let r = e.slice(0, 2);
3411
3411
  if (!r) return "";
@@ -3469,20 +3469,20 @@ const vt = [
3469
3469
  minLength: 12,
3470
3470
  maxLength: 19
3471
3471
  }
3472
- ], Ii = (n) => vt.find((t) => t.pattern.test(n)) || null, sr = (n) => vt.filter((t) => t.pattern.test(n)), El = (n) => {
3472
+ ], Li = (n) => vt.find((t) => t.pattern.test(n)) || null, cr = (n) => vt.filter((t) => t.pattern.test(n)), Al = (n) => {
3473
3473
  let t = 0, e = !1;
3474
3474
  for (let r = n.length - 1; r >= 0; r--) {
3475
3475
  let i = parseInt(n[r]);
3476
3476
  e && (i *= 2, i > 9 && (i -= 9)), t += i, e = !e;
3477
3477
  }
3478
3478
  return t % 10 === 0;
3479
- }, or = (n, t) => {
3479
+ }, dr = (n, t) => {
3480
3480
  const e = n.replace(/\D/g, "");
3481
3481
  if (!e)
3482
3482
  return { isValid: !1, cardType: null, error: le.Empty };
3483
3483
  if (!/^\d+$/.test(e))
3484
3484
  return { isValid: !1, cardType: null, error: le.Invalid };
3485
- const r = Ii(e);
3485
+ const r = Li(e);
3486
3486
  if (r) {
3487
3487
  if (e.length < r.minLength || e.length > r.maxLength)
3488
3488
  return {
@@ -3500,7 +3500,7 @@ const vt = [
3500
3500
  isValid: !1,
3501
3501
  cardType: r.name,
3502
3502
  error: "unsupported"
3503
- } : El(e) ? {
3503
+ } : Al(e) ? {
3504
3504
  isValid: !0,
3505
3505
  cardType: (r == null ? void 0 : r.name) || null,
3506
3506
  error: null
@@ -3509,7 +3509,7 @@ const vt = [
3509
3509
  cardType: (r == null ? void 0 : r.name) || null,
3510
3510
  error: le.Invalid
3511
3511
  };
3512
- }, _l = (n) => {
3512
+ }, wl = (n) => {
3513
3513
  var t;
3514
3514
  return !n || typeof n.amount != "number" || !n.currency || !n.country || !n.merchant_id || n.checkout_config && !((t = n.checkout_config) == null ? void 0 : t.find(
3515
3515
  ({ is_active: r, type: i }) => r && i === "google-pay"
@@ -3520,7 +3520,7 @@ const vt = [
3520
3520
  merchantId: n.merchant_id,
3521
3521
  lineItems: []
3522
3522
  };
3523
- }, Cl = (n) => {
3523
+ }, Tl = (n) => {
3524
3524
  var t, e;
3525
3525
  return !n || typeof n.amount != "number" || !n.currency || !n.country || !n.merchant_id || n.checkout_config && !((t = n.checkout_config) == null ? void 0 : t.find(
3526
3526
  ({ is_active: i, type: a }) => i && a === "apple-pay"
@@ -3531,7 +3531,7 @@ const vt = [
3531
3531
  merchantId: n.merchant_id,
3532
3532
  lineItems: ((e = n.apple_pay_info) == null ? void 0 : e.line_items) || []
3533
3533
  };
3534
- }, Al = (n = []) => n.reduce((t, e) => {
3534
+ }, Il = (n = []) => n.reduce((t, e) => {
3535
3535
  switch (e) {
3536
3536
  case he.Visa:
3537
3537
  return t.push("visa"), t;
@@ -3548,7 +3548,7 @@ const vt = [
3548
3548
  default:
3549
3549
  return t;
3550
3550
  }
3551
- }, []), wl = (n) => ({
3551
+ }, []), Ol = (n) => ({
3552
3552
  ar: "ar-AB",
3553
3553
  en: "en-GB",
3554
3554
  cs: "cs-CZ",
@@ -3567,17 +3567,19 @@ const vt = [
3567
3567
  ms: "ms-MY",
3568
3568
  ru: "ru-RU",
3569
3569
  nb: "nb-NO",
3570
+ no: "nb-NO",
3570
3571
  nl: "nl-NL",
3571
3572
  pl: "pl-PL",
3572
3573
  pt: "pt-PT",
3573
3574
  ro: "ro-RO",
3575
+ ua: "uk-UA",
3574
3576
  sk: "sk-SK",
3575
3577
  sv: "sv-SE",
3576
3578
  th: "th-TH",
3577
3579
  tr: "tr-TR",
3578
3580
  vi: "vi-VN",
3579
3581
  zh: "zh-CN"
3580
- })[n] || "en-US", Tl = (n) => ({
3582
+ })[n] || "en-US", Nl = (n) => ({
3581
3583
  en: "en",
3582
3584
  ar: "ar",
3583
3585
  cs: "cs",
@@ -3602,7 +3604,7 @@ const vt = [
3602
3604
  tr: "tr",
3603
3605
  zh: "zh"
3604
3606
  })[n] || "en";
3605
- class Il {
3607
+ class Ll {
3606
3608
  constructor(t) {
3607
3609
  b(this, "element");
3608
3610
  b(this, "events", {
@@ -3612,20 +3614,23 @@ class Il {
3612
3614
  b(this, "customButtonStyles");
3613
3615
  this.config = t;
3614
3616
  const e = this.config.state.styles.getState().ApplePayButton;
3615
- this.ev = this.config.service.ev, this.customButtonStyles = e, this.element = document.createElement("div"), this.element.classList.add(At.applePay, At.hidden);
3617
+ this.ev = this.config.service.ev, this.customButtonStyles = e, this.element = document.createElement("div"), this.element.classList.add(wt.applePay, wt.hidden);
3616
3618
  }
3617
3619
  init(t) {
3618
3620
  return z(this, null, function* () {
3619
3621
  if (!this.config) return;
3620
- const e = this.config.state.transaction.getState(), { locale: r, supportedCardTypes: i } = this.config.state.checkout.getState(), a = Cl(e);
3622
+ const e = this.config.state.transaction.getState();
3623
+ if (!e || Object.keys(e).length === 0)
3624
+ return;
3625
+ const { locale: r, supportedCardTypes: i } = this.config.state.checkout.getState(), a = Tl(e);
3621
3626
  a && (yield this.ev.initApple(
3622
- J(j({}, t), {
3627
+ X(j({}, t), {
3623
3628
  transaction: a,
3624
- supportedCardTypes: Al(i),
3625
- locale: wl(r || "en")
3629
+ supportedCardTypes: Il(i),
3630
+ locale: Ol(r || "en")
3626
3631
  }),
3627
3632
  this.customButtonStyles
3628
- ), this.ev.isAppleAvailable() && (yield this.ev.renderApple(this.element), this.element.classList.remove(At.hidden), this.events.ready.emit()));
3633
+ ), this.ev.isAppleAvailable() && (yield this.ev.renderApple(this.element), this.element.classList.remove(wt.hidden), this.events.ready.emit()));
3629
3634
  });
3630
3635
  }
3631
3636
  addEventListener(t, e) {
@@ -3636,12 +3641,12 @@ class Il {
3636
3641
  }
3637
3642
  }
3638
3643
  var te = /* @__PURE__ */ ((n) => (n.PAYPAL = "paypal", n.APPLE_PAY = "apple-pay", n.GOOGLE_PAY = "google-pay", n.CARD = "card", n.VENMO = "venmo", n))(te || {});
3639
- const hn = (n = "sandbox") => ({
3644
+ const mn = (n = "sandbox") => ({
3640
3645
  develop: "https://api-dev.paynext.com",
3641
3646
  sandbox: "https://api-sandbox.paynext.com",
3642
3647
  staging: "https://api-staging.paynext.com",
3643
3648
  production: "https://api.paynext.com"
3644
- })[n], Ol = [
3649
+ })[n], xl = [
3645
3650
  {
3646
3651
  type: te.PAYPAL,
3647
3652
  order: 1,
@@ -3662,14 +3667,14 @@ const hn = (n = "sandbox") => ({
3662
3667
  order: 4,
3663
3668
  is_active: !0
3664
3669
  }
3665
- ], Nl = {
3670
+ ], Pl = {
3666
3671
  [te.GOOGLE_PAY]: "GPAY",
3667
3672
  [te.APPLE_PAY]: "APPLEPAY",
3668
3673
  [te.PAYPAL]: "PAYPAL",
3669
3674
  [te.CARD]: "CARD",
3670
- [te.VENMO]: "BRAINTREE"
3675
+ [te.VENMO]: "VENMO"
3671
3676
  // Venmo uses Braintree
3672
- }, Ll = (n) => n.googlePay ? te.GOOGLE_PAY : n.applePay ? te.APPLE_PAY : n.paypal ? te.PAYPAL : n.braintree ? te.VENMO : te.CARD, xl = (n) => Nl[n], Pl = (n) => {
3677
+ }, Rl = (n) => n.googlePay ? te.GOOGLE_PAY : n.applePay ? te.APPLE_PAY : n.paypal ? te.PAYPAL : n.braintree ? te.VENMO : te.CARD, kl = (n) => Pl[n], Ml = (n) => {
3673
3678
  const t = n.card;
3674
3679
  if (t)
3675
3680
  return {
@@ -3688,14 +3693,14 @@ const hn = (n = "sandbox") => ({
3688
3693
  last4: t.lastFourDigits,
3689
3694
  number: t.number
3690
3695
  };
3691
- }, Rl = (n) => {
3696
+ }, Sl = (n) => {
3692
3697
  var e;
3693
3698
  const t = n.paypal;
3694
3699
  if ((e = t == null ? void 0 : t.billing_agreement_token) != null && e.paypalId)
3695
3700
  return {
3696
3701
  billing_agreement_token: t.billing_agreement_token.paypalId
3697
3702
  };
3698
- }, kl = (n) => {
3703
+ }, Dl = (n) => {
3699
3704
  var e, r;
3700
3705
  const t = n.googlePay;
3701
3706
  if (t != null && t.token)
@@ -3707,7 +3712,7 @@ const hn = (n = "sandbox") => ({
3707
3712
  token: t.token.number,
3708
3713
  token_service_provider: t.token.tokenServiceProvider
3709
3714
  };
3710
- }, Ml = (n) => {
3715
+ }, Vl = (n) => {
3711
3716
  var e, r, i, a, s, o;
3712
3717
  const t = n.applePay;
3713
3718
  if (t)
@@ -3719,13 +3724,13 @@ const hn = (n = "sandbox") => ({
3719
3724
  token: (s = t.networkToken) == null ? void 0 : s.number,
3720
3725
  token_service_provider: (o = t.networkToken) == null ? void 0 : o.tokenServiceProvider
3721
3726
  };
3722
- }, Sl = (n) => {
3727
+ }, Fl = (n) => {
3723
3728
  const t = n.braintree;
3724
3729
  if (t)
3725
3730
  return {
3726
3731
  payment_method_nonce: t.nonce
3727
3732
  };
3728
- }, lr = (n) => {
3733
+ }, ur = (n) => {
3729
3734
  var r, i, a, s, o, l, c, d, u, h, p, m, f, v;
3730
3735
  const { applePay: t, googlePay: e } = n;
3731
3736
  if (!(!t && !e))
@@ -3737,7 +3742,7 @@ const hn = (n = "sandbox") => ({
3737
3742
  postal_code: ((p = t == null ? void 0 : t.billingContact) == null ? void 0 : p.postalCode) || ((m = e == null ? void 0 : e.billingAddress) == null ? void 0 : m.postalCode) || void 0,
3738
3743
  state: ((f = t == null ? void 0 : t.billingContact) == null ? void 0 : f.administrativeArea) || ((v = e == null ? void 0 : e.billingAddress) == null ? void 0 : v.administrativeArea) || void 0
3739
3744
  };
3740
- }, cr = (n) => {
3745
+ }, pr = (n) => {
3741
3746
  var i, a, s, o, l, c, d, u, h, p, m, f, v, y, w, T, x, C, I;
3742
3747
  const { card: t, googlePay: e, applePay: r } = n;
3743
3748
  if (!(!t && !(e != null && e.card) && !(r != null && r.card)))
@@ -3757,70 +3762,70 @@ const hn = (n = "sandbox") => ({
3757
3762
  last4: (t == null ? void 0 : t.lastFourDigits) || ((x = e == null ? void 0 : e.card) == null ? void 0 : x.lastFour) || ((C = r == null ? void 0 : r.card) == null ? void 0 : C.lastFour),
3758
3763
  number: (t == null ? void 0 : t.number) || ((I = e == null ? void 0 : e.card) == null ? void 0 : I.number)
3759
3764
  };
3760
- }, dr = (n) => {
3765
+ }, hr = (n) => {
3761
3766
  var r, i;
3762
3767
  const { applePay: t, card: e } = n;
3763
3768
  return (r = t == null ? void 0 : t.billingContact) != null && r.givenName ? `${t.billingContact.givenName} ${t.billingContact.familyName || ""}`.trim() : (i = e == null ? void 0 : e.metadata) == null ? void 0 : i.name;
3764
- }, Dl = (n) => {
3769
+ }, Ul = (n) => {
3765
3770
  var i, a;
3766
- const t = Ll(n), e = xl(t), r = {
3771
+ const t = Rl(n), e = kl(t), r = {
3767
3772
  client_session: n.clientSession,
3768
3773
  three_ds_session_id: n.threeDsSessionId,
3769
3774
  type: e
3770
3775
  };
3771
3776
  switch (t) {
3772
3777
  case te.CARD:
3773
- return J(j({}, r), {
3774
- name: dr(n),
3775
- card: Pl(n)
3778
+ return X(j({}, r), {
3779
+ name: hr(n),
3780
+ card: Ml(n)
3776
3781
  });
3777
3782
  case te.PAYPAL:
3778
- return J(j({}, r), {
3779
- paypal: Rl(n)
3783
+ return X(j({}, r), {
3784
+ paypal: Sl(n)
3780
3785
  });
3781
3786
  case te.GOOGLE_PAY:
3782
- return J(j({}, r), {
3783
- card: cr(n),
3784
- google_pay: kl(n),
3785
- billing_address: lr(n)
3787
+ return X(j({}, r), {
3788
+ card: pr(n),
3789
+ google_pay: Dl(n),
3790
+ billing_address: ur(n)
3786
3791
  });
3787
3792
  case te.APPLE_PAY:
3788
- return J(j({}, r), {
3789
- name: dr(n),
3790
- card: cr(n),
3791
- apple_pay: Ml(n),
3793
+ return X(j({}, r), {
3794
+ name: hr(n),
3795
+ card: pr(n),
3796
+ apple_pay: Vl(n),
3792
3797
  phone: (a = (i = n.applePay) == null ? void 0 : i.shippingContact) == null ? void 0 : a.phoneNumber,
3793
- billing_address: lr(n)
3798
+ billing_address: ur(n)
3794
3799
  });
3795
3800
  case te.VENMO:
3796
- return J(j({}, r), {
3797
- braintree: Sl(n)
3801
+ return X(j({}, r), {
3802
+ venmo: Fl(n)
3798
3803
  });
3799
3804
  default:
3800
3805
  throw new Error(`Unsupported payment method: ${t}`);
3801
3806
  }
3802
- }, Vl = (n, t, e) => z(void 0, null, function* () {
3803
- const r = `${hn(t)}/internal/payments/create`, i = new Headers();
3804
- i.append("Content-Type", "application/json"), i.append("X-API-Version", e);
3805
- const a = Dl(n);
3806
- return yield (yield fetch(r, {
3807
+ }, Bl = (n, t, e, r) => z(void 0, null, function* () {
3808
+ const i = `${mn(t)}/internal/payments/create`, a = new Headers();
3809
+ a.append("Content-Type", "application/json"), a.append("X-API-Version", e);
3810
+ const s = Ul(n);
3811
+ return yield (yield fetch(i, {
3807
3812
  method: "POST",
3808
- headers: i,
3809
- body: JSON.stringify(a)
3813
+ headers: a,
3814
+ body: JSON.stringify(X(j({}, s), { use_workflows: r || void 0 }))
3810
3815
  })).json();
3811
- }), Fl = (n, t, e) => z(void 0, null, function* () {
3812
- const r = `${hn(t)}/internal/payments/create/billing/agreement`, i = new Headers();
3816
+ }), jl = (n, t, e) => z(void 0, null, function* () {
3817
+ const r = `${mn(t)}/internal/payments/create/billing/agreement`, i = new Headers();
3813
3818
  return i.append("Content-Type", "application/json"), i.append("X-API-Version", e), (yield (yield fetch(r, {
3814
3819
  method: "POST",
3815
3820
  headers: i,
3816
3821
  body: JSON.stringify({ client_session: n })
3817
3822
  })).json()).paypal_agreement_token_response.token_id || "";
3818
- }), Ul = (n, t, e) => z(void 0, null, function* () {
3819
- const r = `${hn(t)}/internal/payments/config?client_session_id=${n}`, i = new Headers();
3823
+ }), zl = (n, t, e) => z(void 0, null, function* () {
3824
+ const r = `${mn(t)}/internal/payments/config?client_session_id=${n}`, i = new Headers();
3820
3825
  i.append("X-API-Version", e);
3821
3826
  const s = yield (yield fetch(r, { headers: i })).json();
3822
- return s.checkout_config || (s.checkout_config = Ol), s;
3823
- }), Bl = [
3827
+ return s.checkout_config || (s.checkout_config = xl), s;
3828
+ }), Kl = [
3824
3829
  { type: te.PAYPAL, is_active: !0, order: 1 },
3825
3830
  { type: te.APPLE_PAY, is_active: !0, order: 2 },
3826
3831
  { type: te.GOOGLE_PAY, is_active: !0, order: 3 },
@@ -3842,11 +3847,11 @@ const hn = (n = "sandbox") => ({
3842
3847
  open: { y: 0, opacity: 1, height: "auto" },
3843
3848
  close: { y: -15, opacity: 0, height: 0 },
3844
3849
  transition: { duration: 0.5, type: "spring", bounce: 0 }
3845
- }, jl = "_googlePay_1xmjo_1", zl = "_hidden_1xmjo_17", Tt = {
3846
- googlePay: jl,
3847
- hidden: zl
3850
+ }, ql = "_googlePay_1xmjo_1", Hl = "_hidden_1xmjo_17", It = {
3851
+ googlePay: ql,
3852
+ hidden: Hl
3848
3853
  };
3849
- class Kl {
3854
+ class Wl {
3850
3855
  constructor(t) {
3851
3856
  b(this, "element");
3852
3857
  b(this, "events", {
@@ -3854,19 +3859,37 @@ class Kl {
3854
3859
  });
3855
3860
  b(this, "ev");
3856
3861
  b(this, "customButtonStyles");
3857
- this.config = t, this.ev = this.config.service.ev, this.customButtonStyles = this.config.state.styles.getState().GooglePayButton, this.element = document.createElement("div"), this.element.classList.add(Tt.googlePay, Tt.hidden);
3862
+ this.config = t, this.ev = this.config.service.ev, this.customButtonStyles = this.config.state.styles.getState().GooglePayButton, this.element = document.createElement("div"), this.element.classList.add(It.googlePay, It.hidden);
3863
+ }
3864
+ // detect iOS to disable Google Pay
3865
+ isIOS() {
3866
+ if (typeof navigator == "undefined") return !1;
3867
+ const t = navigator.userAgent || "";
3868
+ return /iPad|iPhone|iPod/.test(t) || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1;
3869
+ }
3870
+ isMacOS() {
3871
+ return typeof navigator == "undefined" ? !1 : navigator.platform.toLowerCase().includes("mac");
3872
+ }
3873
+ isSafari() {
3874
+ if (typeof navigator == "undefined") return !1;
3875
+ const t = navigator.userAgent || "";
3876
+ return t.includes("Safari") && !t.includes("Chrome") && !t.includes("CriOS") && !t.includes("FxiOS") && !t.includes("Edg") && !t.includes("OPR");
3858
3877
  }
3859
3878
  init(t) {
3860
3879
  return z(this, null, function* () {
3861
- if (!this.config) return;
3862
- const e = this.config.state.transaction.getState(), { locale: r } = this.config.state.checkout.getState(), i = _l(e);
3880
+ if (!this.config || this.isIOS() || this.isSafari() || this.isMacOS())
3881
+ return;
3882
+ const e = this.config.state.transaction.getState();
3883
+ if (!e || Object.keys(e).length === 0)
3884
+ return;
3885
+ const { locale: r } = this.config.state.checkout.getState(), i = wl(e);
3863
3886
  i && (yield this.ev.initGoogle(
3864
- J(j({}, t), {
3887
+ X(j({}, t), {
3865
3888
  transaction: i,
3866
- locale: Tl(r || "en")
3889
+ locale: Nl(r || "en")
3867
3890
  }),
3868
3891
  this.customButtonStyles
3869
- ), yield this.ev.renderGoogle(this.element), this.element.classList.remove(Tt.hidden), this.events.ready.emit());
3892
+ ), yield this.ev.renderGoogle(this.element), this.element.classList.remove(It.hidden), this.events.ready.emit());
3870
3893
  });
3871
3894
  }
3872
3895
  addEventListener(t, e) {
@@ -3876,11 +3899,11 @@ class Kl {
3876
3899
  return this.element;
3877
3900
  }
3878
3901
  }
3879
- const ql = "_paypal_7twkb_1", Hl = "_hidden_7twkb_8", It = {
3880
- paypal: ql,
3881
- hidden: Hl
3902
+ const Gl = "_paypal_2zo1j_1", Yl = "_hidden_2zo1j_10", Ot = {
3903
+ paypal: Gl,
3904
+ hidden: Yl
3882
3905
  };
3883
- class Wl {
3906
+ class $l {
3884
3907
  constructor(t) {
3885
3908
  b(this, "element");
3886
3909
  b(this, "events", {
@@ -3888,7 +3911,7 @@ class Wl {
3888
3911
  });
3889
3912
  b(this, "paypal");
3890
3913
  b(this, "customButtonStyles");
3891
- this.config = t, this.paypal = this.config.service.paypal, this.customButtonStyles = this.config.state.styles.getState().PayPalButton, this.element = document.createElement("div"), this.element.classList.add(It.paypal, It.hidden);
3914
+ this.config = t, this.paypal = this.config.service.paypal, this.customButtonStyles = this.config.state.styles.getState().PayPalButton, this.element = document.createElement("div"), this.element.classList.add(Ot.paypal, Ot.hidden);
3892
3915
  }
3893
3916
  // init
3894
3917
  init(t) {
@@ -3896,13 +3919,13 @@ class Wl {
3896
3919
  var a, s, o;
3897
3920
  if (!this.config) return;
3898
3921
  const e = this.config.state.transaction.getState(), r = this.config.state.checkout.getState(), i = () => z(this, null, function* () {
3899
- return yield Fl(r.clientToken, r.environment, r.apiVersion);
3922
+ return yield jl(r.clientToken, r.environment, r.apiVersion);
3900
3923
  });
3901
- e && (yield this.paypal.init({
3924
+ !e || Object.keys(e).length === 0 || (yield this.paypal.init({
3902
3925
  clientId: ((a = e == null ? void 0 : e.paypal_info) == null ? void 0 : a.client_id) || "",
3903
3926
  environment: ((s = e == null ? void 0 : e.paypal_info) == null ? void 0 : s.environment) || "sandbox",
3904
3927
  vault: !0
3905
- }), yield this.paypal.render(this.element, J(j({}, t), {
3928
+ }), yield this.paypal.render(this.element, X(j({}, t), {
3906
3929
  createBillingAgreement: i,
3907
3930
  onApprove: (c) => z(this, [c], function* ({ billingToken: l }) {
3908
3931
  var d;
@@ -3911,7 +3934,7 @@ class Wl {
3911
3934
  style: (o = this.customButtonStyles) == null ? void 0 : o.styles,
3912
3935
  onCancel: t == null ? void 0 : t.onCancel,
3913
3936
  onError: t == null ? void 0 : t.onError
3914
- })), this.element.classList.remove(It.hidden), this.events.ready.emit());
3937
+ })), this.element.classList.remove(Ot.hidden), this.events.ready.emit());
3915
3938
  });
3916
3939
  }
3917
3940
  // add event listener
@@ -3923,7 +3946,7 @@ class Wl {
3923
3946
  return this.element;
3924
3947
  }
3925
3948
  }
3926
- class Gl {
3949
+ class Ql {
3927
3950
  constructor() {
3928
3951
  b(this, "template", `
3929
3952
  <svg
@@ -3948,14 +3971,14 @@ class Gl {
3948
3971
  return this.element;
3949
3972
  }
3950
3973
  }
3951
- const Yl = "_button_1br9w_1", $l = "_press_1br9w_21", dt = {
3952
- button: Yl,
3953
- press: $l
3974
+ const Zl = "_button_1br9w_1", Xl = "_press_1br9w_21", dt = {
3975
+ button: Zl,
3976
+ press: Xl
3954
3977
  };
3955
- class Ql {
3978
+ class Jl {
3956
3979
  constructor(t) {
3957
3980
  b(this, "element");
3958
- b(this, "icon", new Gl());
3981
+ b(this, "icon", new Ql());
3959
3982
  this.config = t;
3960
3983
  const e = this.config.state.styles.getState().WalletButton, r = this.config.state.translate;
3961
3984
  this.element = document.createElement("button"), this.element.classList.add(dt.button), e != null && e.className && this.element.classList.add(e.className), e != null && e.styles && Object.assign(this.element.style, e.styles);
@@ -3971,15 +3994,18 @@ class Ql {
3971
3994
  return this.element;
3972
3995
  }
3973
3996
  }
3974
- const Zl = (n, t, e) => t.concat(n.filter((r) => t.every((i) => !e(r, i)))), Xl = "_venmo_10t25_1", Jl = "_hidden_10t25_17", Ot = {
3975
- venmo: Xl,
3976
- hidden: Jl
3977
- }, ec = {
3978
- display: "block",
3997
+ const ec = (n, t, e) => t.concat(n.filter((r) => t.every((i) => !e(r, i)))), tc = "_venmo_1ihvb_1", nc = "_hidden_1ihvb_26", Nt = {
3998
+ venmo: tc,
3999
+ hidden: nc
4000
+ }, rc = {
4001
+ display: "flex",
3979
4002
  height: 40,
3980
4003
  borderRadius: 12
3981
- };
3982
- class tc {
4004
+ }, ic = `<svg viewBox="2.3 484.3 611.9 117.80000000000001" xmlns="http://www.w3.org/2000/svg">
4005
+ <path d="M103.1 485.8c4.2 7 5.7 14 5.7 22.4 0 28-23.8 65.9-43.4 91.1H20.5L2.3 491.5l40.6-2.8 9.8 77.1c8.4-14 19.7-37.9 19.7-53.2 0-8.4-1.4-14-4.2-19.7zm51.8 47.7c7 0 25.2-2.8 25.2-14 0-5.7-2.8-7-7-7-8.3 0-18.2 8.4-18.2 21zm-1.3 21c0 12.7 7 18.2 16.8 18.2s19.7-2.8 32.2-8.4l-5.7 30.8c-8.4 4.2-22.4 7-36.4 7-33.5 0-46.2-21-46.2-46.2 0-33.5 19.7-68.6 60.2-68.6 22.4 0 35 12.7 35 30.8 1.5 26.6-35 36.4-55.9 36.4zM324.4 511c0 4.2 0 9.8-1.4 14l-11.2 74.2H274l11.2-68.6c0-1.4 1.4-5.7 1.4-7 0-5.7-2.8-5.7-7-5.7-5.7 0-9.8 2.8-12.7 4.2l-14 77.1H215l16.8-112.1h33.5v8.4c8.4-5.7 18.2-11.2 32.2-11.2 19.9 3 26.9 12.7 26.9 26.7zm113.4-12.5c11.2-8.4 21-12.7 35-12.7 19.7 0 26.7 9.8 26.7 25.2 0 4.2 0 9.8-1.4 14L487 599.3h-37.9l11.2-70v-5.7c0-5.7-2.8-7-7-7s-9.8 1.4-12.7 4.2L428 599.2h-37.9l11.2-70v-5.7c0-5.7-2.8-7-7-7-5.7 0-9.8 2.8-12.7 4.2L369 599h-37.9L348 487h32.2l1.4 9.8c7-5.7 18.2-11.2 32.2-11.2 11.4 1.7 19.7 5.9 24 12.9zM575 532.1c0-9.8-2.8-15.4-9.8-15.4-15.4 0-18.2 26.7-18.2 40.6 0 9.8 2.8 16.8 9.8 16.8 15.5-1.4 18.2-29.4 18.2-42zm-65.8 22.4c0-35 18.2-68.6 61.6-68.6 32.2 0 43.4 19.7 43.4 44.9 0 35-18.2 70-61.6 70-32.2 1.3-43.4-19.7-43.4-46.3z"
4006
+ fill="currentColor"/>
4007
+ </svg>`;
4008
+ class ac {
3983
4009
  constructor(t) {
3984
4010
  b(this, "isProcessing", !1);
3985
4011
  b(this, "venmoButton");
@@ -3989,7 +4015,7 @@ class tc {
3989
4015
  b(this, "braintree");
3990
4016
  this.config = t, this.braintree = this.config.service.braintree;
3991
4017
  const e = this.config.state.styles.getState().BraintreeButton;
3992
- this.venmoButton = document.createElement("button"), this.venmoButton.classList.add(Ot.venmo, Ot.hidden), e != null && e.className && this.venmoButton.classList.add(e.className), e != null && e.styles && Object.assign(this.venmoButton.style, e.styles), this.venmoButton.textContent = "Venmo";
4018
+ this.venmoButton = document.createElement("button"), this.venmoButton.classList.add(Nt.venmo, Nt.hidden), e != null && e.className && this.venmoButton.classList.add(e.className), e != null && e.styles && Object.assign(this.venmoButton.style, e.styles), this.venmoButton.setAttribute("aria-label", "Venmo"), this.venmoButton.innerHTML = ic;
3993
4019
  }
3994
4020
  // init
3995
4021
  init(t) {
@@ -3998,7 +4024,7 @@ class tc {
3998
4024
  if (!this.config) return;
3999
4025
  console.log("Initializing Braintree Venmo with config:", t);
4000
4026
  const e = this.config.state.transaction.getState();
4001
- if (console.log("----- init braintree venmo: ", e), !!e)
4027
+ if (console.log("----- init braintree venmo: ", e), !(!e || Object.keys(e).length === 0))
4002
4028
  try {
4003
4029
  if (yield this.braintree.init({
4004
4030
  authorization: ((r = e == null ? void 0 : e.brain_tree_info) == null ? void 0 : r.client_token) || ""
@@ -4013,7 +4039,7 @@ class tc {
4013
4039
  yield this.handleExistingTokenization(t);
4014
4040
  return;
4015
4041
  }
4016
- this.venmoButton.classList.remove(Ot.hidden), this.events.ready.emit();
4042
+ this.venmoButton.classList.remove(Nt.hidden), this.events.ready.emit();
4017
4043
  } catch (i) {
4018
4044
  console.error("Error initializing Venmo:", i), this.handleVenmoError(i);
4019
4045
  }
@@ -4021,7 +4047,7 @@ class tc {
4021
4047
  }
4022
4048
  // display venmo button
4023
4049
  displayVenmoButton(t) {
4024
- Object.assign(this.venmoButton.style, ec), this.venmoButton.addEventListener("click", () => z(this, null, function* () {
4050
+ Object.assign(this.venmoButton.style, rc), this.venmoButton.addEventListener("click", () => z(this, null, function* () {
4025
4051
  if (!this.isProcessing) {
4026
4052
  this.isProcessing = !0, this.venmoButton.disabled = !0;
4027
4053
  try {
@@ -4065,7 +4091,7 @@ class tc {
4065
4091
  return this.venmoButton;
4066
4092
  }
4067
4093
  }
4068
- class nc {
4094
+ class sc {
4069
4095
  constructor(t) {
4070
4096
  b(this, "isAppleReady", !0);
4071
4097
  b(this, "isGoogleReady", !0);
@@ -4084,7 +4110,7 @@ class nc {
4084
4110
  cancel: new de(),
4085
4111
  success: new de()
4086
4112
  });
4087
- this.config = t, this.applePay = new Il(t), this.paypal = new Wl(t), this.googlePay = new Kl(t), this.braintree = new tc(t), this.card = new Ql(t), this.buttons = document.createElement("div"), this.buttons.classList.add(Ct.buttons, Ct.hidden);
4113
+ this.config = t, this.applePay = new Ll(t), this.paypal = new $l(t), this.googlePay = new Wl(t), this.braintree = new ac(t), this.card = new Jl(t), this.buttons = document.createElement("div"), this.buttons.classList.add(At.buttons, At.hidden);
4088
4114
  }
4089
4115
  // init
4090
4116
  init() {
@@ -4106,7 +4132,7 @@ class nc {
4106
4132
  yield this.applePay.init({
4107
4133
  onError: () => this.events.error.emit(),
4108
4134
  onCancel: () => this.events.cancel.emit(),
4109
- onSuccess: (t) => this.events.success.emit(J(j({}, t), { type: "apple" }))
4135
+ onSuccess: (t) => this.events.success.emit(X(j({}, t), { type: "apple" }))
4110
4136
  });
4111
4137
  } catch (t) {
4112
4138
  console.error(t);
@@ -4123,7 +4149,7 @@ class nc {
4123
4149
  yield this.googlePay.init({
4124
4150
  onError: () => this.events.error.emit(),
4125
4151
  onCancel: () => this.events.cancel.emit(),
4126
- onSuccess: (t) => this.events.success.emit(J(j({}, t), { type: "google" }))
4152
+ onSuccess: (t) => this.events.success.emit(X(j({}, t), { type: "google" }))
4127
4153
  });
4128
4154
  } catch (t) {
4129
4155
  console.error(t);
@@ -4176,7 +4202,7 @@ class nc {
4176
4202
  // init payment methods
4177
4203
  initPaymentMethods() {
4178
4204
  return z(this, null, function* () {
4179
- const t = this.config.state.transaction.getState(), r = Zl(Bl, (t == null ? void 0 : t.checkout_config) || [], (i, a) => i.type === a.type).filter(({ is_active: i }) => i).sort((i, a) => i.order - a.order).map(({ type: i }) => {
4205
+ const t = this.config.state.transaction.getState(), r = ec(Kl, (t == null ? void 0 : t.checkout_config) || [], (i, a) => i.type === a.type).filter(({ is_active: i }) => i).sort((i, a) => i.order - a.order).map(({ type: i }) => {
4180
4206
  switch (i) {
4181
4207
  case te.APPLE_PAY:
4182
4208
  return this.initApple();
@@ -4205,14 +4231,14 @@ class nc {
4205
4231
  }
4206
4232
  // show button
4207
4233
  showButton() {
4208
- this.buttons.classList.remove(Ct.hidden);
4234
+ this.buttons.classList.remove(At.hidden);
4209
4235
  }
4210
4236
  // render
4211
4237
  render() {
4212
4238
  return this.buttons;
4213
4239
  }
4214
4240
  }
4215
- class rc {
4241
+ class oc {
4216
4242
  constructor() {
4217
4243
  b(this, "template", `
4218
4244
  <svg
@@ -4238,14 +4264,14 @@ class rc {
4238
4264
  return this.element;
4239
4265
  }
4240
4266
  }
4241
- const ic = "_button_125my_1", ac = {
4242
- button: ic
4267
+ const lc = "_button_125my_1", cc = {
4268
+ button: lc
4243
4269
  };
4244
- class sc {
4270
+ class dc {
4245
4271
  constructor() {
4246
4272
  b(this, "element");
4247
- b(this, "icon", new rc());
4248
- this.element = document.createElement("div"), this.element.classList.add(ac.button), this.element.appendChild(this.icon.render());
4273
+ b(this, "icon", new oc());
4274
+ this.element = document.createElement("div"), this.element.classList.add(cc.button), this.element.appendChild(this.icon.render());
4249
4275
  }
4250
4276
  addEventListener(t) {
4251
4277
  return this.element.addEventListener("click", t);
@@ -4254,17 +4280,17 @@ class sc {
4254
4280
  return this.element;
4255
4281
  }
4256
4282
  }
4257
- const oc = "_button_rx9be_1", lc = "_disabled_rx9be_17", cc = "_press_rx9be_22", dc = "_hidden_rx9be_26", uc = "_spinner_rx9be_30", Ee = {
4258
- button: oc,
4259
- disabled: lc,
4260
- press: cc,
4261
- hidden: dc,
4262
- spinner: uc
4283
+ const uc = "_button_rx9be_1", pc = "_disabled_rx9be_17", hc = "_press_rx9be_22", mc = "_hidden_rx9be_26", fc = "_spinner_rx9be_30", Ee = {
4284
+ button: uc,
4285
+ disabled: pc,
4286
+ press: hc,
4287
+ hidden: mc,
4288
+ spinner: fc
4263
4289
  };
4264
- class pc {
4290
+ class vc {
4265
4291
  constructor(t, e) {
4266
4292
  b(this, "element");
4267
- b(this, "spinner", new Ai());
4293
+ b(this, "spinner", new Ii());
4268
4294
  b(this, "message", document.createElement("span"));
4269
4295
  this.element = document.createElement("button"), this.element.classList.add(Ee.button), e != null && e.className && this.element.classList.add(e.className), e != null && e.styles && Object.assign(this.element.style, e.styles), this.spinner.addClass(Ee.spinner), this.spinner.addClass(Ee.hidden), this.message.textContent = t.messages().card.pay.button, this.element.append(this.spinner.render(), this.message), this.element.addEventListener("mousedown", () => this.element.classList.add(Ee.press)), this.element.addEventListener("mouseup", () => this.element.classList.remove(Ee.press)), this.element.addEventListener("mouseout", () => this.element.classList.remove(Ee.press)), t.subscribe((r) => {
4270
4296
  this.message.textContent = r.messages.card.pay.button;
@@ -4280,21 +4306,21 @@ class pc {
4280
4306
  return this.element;
4281
4307
  }
4282
4308
  }
4283
- const hc = "_cardForm_isqbi_1", mc = "_hidden_isqbi_5", ut = {
4284
- cardForm: hc,
4285
- hidden: mc
4286
- }, fc = "_wrapper_4knhb_1", vc = "_inputContainer_4knhb_5", gc = "_input_4knhb_5", yc = "_errorInput_4knhb_24", bc = "_label_4knhb_28", Ec = "_labelError_4knhb_32", _c = "_disabled_4knhb_36", Cc = "_disabledInput_4knhb_40", Ac = "_hidden_4knhb_47", ae = {
4287
- wrapper: fc,
4288
- inputContainer: vc,
4289
- input: gc,
4290
- errorInput: yc,
4291
- label: bc,
4292
- labelError: Ec,
4293
- disabled: _c,
4294
- disabledInput: Cc,
4295
- hidden: Ac
4309
+ const gc = "_cardForm_isqbi_1", yc = "_hidden_isqbi_5", ut = {
4310
+ cardForm: gc,
4311
+ hidden: yc
4312
+ }, bc = "_wrapper_4knhb_1", Ec = "_inputContainer_4knhb_5", _c = "_input_4knhb_5", Cc = "_errorInput_4knhb_24", Ac = "_label_4knhb_28", wc = "_labelError_4knhb_32", Tc = "_disabled_4knhb_36", Ic = "_disabledInput_4knhb_40", Oc = "_hidden_4knhb_47", ae = {
4313
+ wrapper: bc,
4314
+ inputContainer: Ec,
4315
+ input: _c,
4316
+ errorInput: Cc,
4317
+ label: Ac,
4318
+ labelError: wc,
4319
+ disabled: Tc,
4320
+ disabledInput: Ic,
4321
+ hidden: Oc
4296
4322
  };
4297
- class mn {
4323
+ class gt {
4298
4324
  constructor() {
4299
4325
  b(this, "template", `
4300
4326
  <svg focusable='false' fill='#dc2626' color='#dc2626' height='12' viewBox='0 0 12 12' width='12'>
@@ -4315,7 +4341,7 @@ class mn {
4315
4341
  return this.element;
4316
4342
  }
4317
4343
  }
4318
- class wc {
4344
+ class Nc {
4319
4345
  constructor(t, e) {
4320
4346
  b(this, "id", "paynext-card-input-name");
4321
4347
  b(this, "element");
@@ -4325,7 +4351,7 @@ class wc {
4325
4351
  b(this, "labelText", document.createElement("span"));
4326
4352
  b(this, "labelError", document.createElement("span"));
4327
4353
  b(this, "endContent", document.createElement("div"));
4328
- b(this, "warning", new mn());
4354
+ b(this, "warning", new gt());
4329
4355
  b(this, "placeholderStyle", document.createElement("style"));
4330
4356
  b(this, "isTouchSubmit", !1);
4331
4357
  b(this, "isRequired", !1);
@@ -4383,20 +4409,20 @@ class wc {
4383
4409
  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;
4384
4410
  }
4385
4411
  }
4386
- const Tc = "_wrapper_j8wuo_1", Ic = "_inputContainer_j8wuo_5", Oc = "_input_j8wuo_5", Nc = "_endContent_j8wuo_20", Lc = "_errorInput_j8wuo_24", xc = "_error_j8wuo_24", Pc = "_label_j8wuo_32", Rc = "_labelError_j8wuo_36", kc = "_disabled_j8wuo_40", Mc = "_disabledInput_j8wuo_44", Sc = "_hidden_j8wuo_51", re = {
4387
- wrapper: Tc,
4388
- inputContainer: Ic,
4389
- input: Oc,
4390
- endContent: Nc,
4391
- errorInput: Lc,
4392
- error: xc,
4393
- label: Pc,
4394
- labelError: Rc,
4395
- disabled: kc,
4396
- disabledInput: Mc,
4397
- hidden: Sc
4412
+ const Lc = "_wrapper_j8wuo_1", xc = "_inputContainer_j8wuo_5", Pc = "_input_j8wuo_5", Rc = "_endContent_j8wuo_20", kc = "_errorInput_j8wuo_24", Mc = "_error_j8wuo_24", Sc = "_label_j8wuo_32", Dc = "_labelError_j8wuo_36", Vc = "_disabled_j8wuo_40", Fc = "_disabledInput_j8wuo_44", Uc = "_hidden_j8wuo_51", re = {
4413
+ wrapper: Lc,
4414
+ inputContainer: xc,
4415
+ input: Pc,
4416
+ endContent: Rc,
4417
+ errorInput: kc,
4418
+ error: Mc,
4419
+ label: Sc,
4420
+ labelError: Dc,
4421
+ disabled: Vc,
4422
+ disabledInput: Fc,
4423
+ hidden: Uc
4398
4424
  };
4399
- class Dc {
4425
+ class Bc {
4400
4426
  constructor() {
4401
4427
  b(this, "template", `
4402
4428
  <svg
@@ -4434,7 +4460,7 @@ class Dc {
4434
4460
  return this.element;
4435
4461
  }
4436
4462
  }
4437
- class Vc {
4463
+ class jc {
4438
4464
  constructor() {
4439
4465
  b(this, "template", `
4440
4466
  <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16' class='${Z.svg}'>
@@ -4471,7 +4497,7 @@ class Vc {
4471
4497
  return this.element;
4472
4498
  }
4473
4499
  }
4474
- class Fc {
4500
+ class zc {
4475
4501
  constructor() {
4476
4502
  b(this, "template", `
4477
4503
  <svg
@@ -4521,7 +4547,7 @@ class Fc {
4521
4547
  return this.element;
4522
4548
  }
4523
4549
  }
4524
- class Uc {
4550
+ class Kc {
4525
4551
  constructor() {
4526
4552
  b(this, "template", `
4527
4553
  <svg
@@ -4576,7 +4602,7 @@ class Uc {
4576
4602
  return this.element;
4577
4603
  }
4578
4604
  }
4579
- class Bc {
4605
+ class qc {
4580
4606
  constructor() {
4581
4607
  b(this, "template", `
4582
4608
  <svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 23 16' width='23' class='${Z.svg}'>
@@ -4616,7 +4642,7 @@ class Bc {
4616
4642
  return this.element;
4617
4643
  }
4618
4644
  }
4619
- class jc {
4645
+ class Hc {
4620
4646
  constructor() {
4621
4647
  b(this, "template", `
4622
4648
  <svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 24 16' width='24' class='${Z.svg}'>
@@ -4639,7 +4665,7 @@ class jc {
4639
4665
  return this.element;
4640
4666
  }
4641
4667
  }
4642
- class zc {
4668
+ class Wc {
4643
4669
  constructor() {
4644
4670
  b(this, "template", `
4645
4671
  <svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 24 16' width='24' class='${Z.svg}'>
@@ -4671,7 +4697,7 @@ class zc {
4671
4697
  return this.element;
4672
4698
  }
4673
4699
  }
4674
- class Kc {
4700
+ class Gc {
4675
4701
  constructor() {
4676
4702
  b(this, "template", `
4677
4703
  <svg
@@ -4720,7 +4746,7 @@ class Kc {
4720
4746
  return this.element;
4721
4747
  }
4722
4748
  }
4723
- class qc {
4749
+ class Yc {
4724
4750
  constructor(t, e) {
4725
4751
  b(this, "id", "paynext-card-input-number");
4726
4752
  b(this, "initialCardTypes", vt.map((t) => t.type));
@@ -4732,14 +4758,14 @@ class qc {
4732
4758
  b(this, "labelError", document.createElement("span"));
4733
4759
  b(this, "endContent", document.createElement("div"));
4734
4760
  b(this, "error", document.createElement("p"));
4735
- b(this, "unknownCard", new Dc());
4736
- b(this, "amex", new Vc());
4737
- b(this, "dinerClub", new Fc());
4738
- b(this, "discover", new Uc());
4739
- b(this, "jcb", new Bc());
4740
- b(this, "masterCard", new jc());
4741
- b(this, "unionPay", new zc());
4742
- b(this, "visa", new Kc());
4761
+ b(this, "unknownCard", new Bc());
4762
+ b(this, "amex", new jc());
4763
+ b(this, "dinerClub", new zc());
4764
+ b(this, "discover", new Kc());
4765
+ b(this, "jcb", new qc());
4766
+ b(this, "masterCard", new Hc());
4767
+ b(this, "unionPay", new Wc());
4768
+ b(this, "visa", new Gc());
4743
4769
  b(this, "placeholderStyle", document.createElement("style"));
4744
4770
  b(this, "supportedCardTypes", this.initialCardTypes);
4745
4771
  b(this, "isTouchSubmit", !1);
@@ -4769,12 +4795,12 @@ class qc {
4769
4795
  handleChange(t) {
4770
4796
  if (this.isDisabled) return;
4771
4797
  this.isRequired = !1, this.errorMessage = "", this.isChanged || (this.isChanged = !0);
4772
- const e = sr(t).map((a) => a.type), r = Ii(t), i = gl(t, (r == null ? void 0 : r.type) || "");
4798
+ const e = cr(t).map((a) => a.type), r = Li(t), i = El(t, (r == null ? void 0 : r.type) || "");
4773
4799
  i.replace(/\D/g, "").length === ((r == null ? void 0 : r.maxLength) || 16) && this.validate(i), this.supportedCardTypes = e.length ? e : this.initialCardTypes, this.input.value = i, this.events.change.emit({
4774
4800
  card: i,
4775
4801
  cardType: r == null ? void 0 : r.type,
4776
4802
  cardTypes: e,
4777
- isValid: or(t, this.supportedCardTypes).isValid
4803
+ isValid: dr(t, this.supportedCardTypes).isValid
4778
4804
  }), this.render();
4779
4805
  }
4780
4806
  toggleLabelError(t) {
@@ -4829,11 +4855,11 @@ class qc {
4829
4855
  var t;
4830
4856
  return {
4831
4857
  value: this.input.value,
4832
- cardType: ((t = sr(this.input.value)[0]) == null ? void 0 : t.type) || ""
4858
+ cardType: ((t = cr(this.input.value)[0]) == null ? void 0 : t.type) || ""
4833
4859
  };
4834
4860
  }
4835
4861
  validate(t) {
4836
- const e = this.translate.messages(), { isValid: r, error: i } = or(t, this.supportedCardTypes);
4862
+ const e = this.translate.messages(), { isValid: r, error: i } = dr(t, this.supportedCardTypes);
4837
4863
  return r ? (this.isRequired = !1, this.errorMessage = "", this.render(), r) : (i === le.Empty ? (this.errorMessage = "", this.isRequired = !0) : i === le.Unsupported ? (this.errorMessage = e.card.number.error.unsupported, this.isRequired = !1) : (this.errorMessage = i === le.Incomplete ? e.card.number.error.incomplete : e.card.number.error.invalid, this.isRequired = !1), this.render(), r);
4838
4864
  }
4839
4865
  render() {
@@ -4841,20 +4867,20 @@ class qc {
4841
4867
  return this.toggleLabelError(e), this.toggleErrorMessage(r), !e && !r ? (this.inputContainer.classList.remove(re.errorInput), this.endContent.innerHTML = "", this.endContent.append(...this.getCardIcons())) : (this.endContent.innerHTML = "", this.endContent.appendChild(this.unknownCard.render())), this.isDisabled ? (this.inputContainer.classList.add(re.disabled), this.input.classList.add(re.disabledInput)) : (this.inputContainer.classList.remove(re.disabled), this.input.classList.remove(re.disabledInput)), this.element;
4842
4868
  }
4843
4869
  }
4844
- const Hc = "_inputContainer_1xdj3_5", Wc = "_input_1xdj3_5", Gc = "_endContent_1xdj3_20", Yc = "_errorInput_1xdj3_24", $c = "_error_1xdj3_24", Qc = "_label_1xdj3_32", Zc = "_labelError_1xdj3_36", Xc = "_disabled_1xdj3_40", Jc = "_disabledInput_1xdj3_44", ed = "_hidden_1xdj3_51", td = "_securityContent_1xdj3_55", $ = {
4845
- inputContainer: Hc,
4846
- input: Wc,
4847
- endContent: Gc,
4848
- errorInput: Yc,
4849
- error: $c,
4850
- label: Qc,
4851
- labelError: Zc,
4852
- disabled: Xc,
4853
- disabledInput: Jc,
4854
- hidden: ed,
4855
- securityContent: td
4870
+ const $c = "_inputContainer_1xdj3_5", Qc = "_input_1xdj3_5", Zc = "_endContent_1xdj3_20", Xc = "_errorInput_1xdj3_24", Jc = "_error_1xdj3_24", ed = "_label_1xdj3_32", td = "_labelError_1xdj3_36", nd = "_disabled_1xdj3_40", rd = "_disabledInput_1xdj3_44", id = "_hidden_1xdj3_51", ad = "_securityContent_1xdj3_55", $ = {
4871
+ inputContainer: $c,
4872
+ input: Qc,
4873
+ endContent: Zc,
4874
+ errorInput: Xc,
4875
+ error: Jc,
4876
+ label: ed,
4877
+ labelError: td,
4878
+ disabled: nd,
4879
+ disabledInput: rd,
4880
+ hidden: id,
4881
+ securityContent: ad
4856
4882
  };
4857
- class nd {
4883
+ class sd {
4858
4884
  constructor() {
4859
4885
  b(this, "template", `
4860
4886
  <svg class='${Z.svg}' focusable='false' viewBox='0 0 32 21' role='img' aria-label='CVC'>
@@ -4883,13 +4909,14 @@ class nd {
4883
4909
  return this.element;
4884
4910
  }
4885
4911
  }
4886
- class rd {
4912
+ class od {
4887
4913
  constructor(t, e) {
4888
4914
  b(this, "cvcId", "paynext-card-input-cvc");
4889
4915
  b(this, "expiryId", "paynext-card-input-expiry");
4890
4916
  b(this, "element");
4891
- b(this, "warning", new mn());
4892
- b(this, "cardCvc", new nd());
4917
+ b(this, "expiryWarning", new gt());
4918
+ b(this, "cvcWarning", new gt());
4919
+ b(this, "cardCvc", new sd());
4893
4920
  b(this, "expiryInputContainer", document.createElement("div"));
4894
4921
  b(this, "expiryInput", document.createElement("input"));
4895
4922
  b(this, "expiryLabel", document.createElement("label"));
@@ -4922,9 +4949,9 @@ class rd {
4922
4949
  var s, o, l, c, d, u, h, p, m, f, v, y, w, T, x, C, I;
4923
4950
  this.translate = t;
4924
4951
  const r = t.messages();
4925
- this.element = document.createElement("div"), this.element.classList.add($.securityContent), this.expiryInputContainer.classList.add($.inputContainer), (s = e == null ? void 0 : e.container) != null && s.className && this.expiryInputContainer.classList.add(e.container.className), (o = e == null ? void 0 : e.container) != null && o.styles && Object.assign(this.expiryInputContainer.style, e.container.styles), this.expiryInput.setAttribute("id", this.expiryId), this.expiryInput.setAttribute("auto-complete", "cc-expiry"), this.expiryInput.setAttribute("placeholder", r.card.expiry.placeholder), this.expiryInput.classList.add($.input), (l = e == null ? void 0 : e.field) != null && l.className && this.expiryInput.classList.add(e.field.className), (c = e == null ? void 0 : e.field) != null && c.styles && Object.assign(this.expiryInput.style, e.field.styles), this.expiryEndContent.classList.add($.endContent), this.expiryEndContent.appendChild(this.warning.render()), this.expiryInputContainer.append(this.expiryInput, this.expiryEndContent), this.expiryLabel.setAttribute("for", this.expiryId), this.expiryLabel.classList.add($.label), (d = e == null ? void 0 : e.label) != null && d.className && this.expiryLabel.classList.add(e.label.className), (u = e == null ? void 0 : e.label) != null && u.styles && Object.assign(this.expiryLabel.style, e.label.styles), this.expiryLabelText.textContent = r.card.expiry.label, this.expiryLabelError.textContent = r.card.expiry.error.required, this.expiryLabelError.classList.add($.labelError, $.hidden), this.expiryLabel.append(this.expiryLabelText, this.expiryLabelError), this.expiryError.classList.add($.error, $.hidden), (h = e == null ? void 0 : e.error) != null && h.className && this.expiryError.classList.add(e.error.className), (p = e == null ? void 0 : e.error) != null && p.styles && Object.assign(this.expiryError.style, e.error.styles);
4952
+ this.element = document.createElement("div"), this.element.classList.add($.securityContent), this.expiryInputContainer.classList.add($.inputContainer), (s = e == null ? void 0 : e.container) != null && s.className && this.expiryInputContainer.classList.add(e.container.className), (o = e == null ? void 0 : e.container) != null && o.styles && Object.assign(this.expiryInputContainer.style, e.container.styles), this.expiryInput.setAttribute("id", this.expiryId), this.expiryInput.setAttribute("auto-complete", "cc-expiry"), this.expiryInput.setAttribute("placeholder", r.card.expiry.placeholder), this.expiryInput.classList.add($.input), (l = e == null ? void 0 : e.field) != null && l.className && this.expiryInput.classList.add(e.field.className), (c = e == null ? void 0 : e.field) != null && c.styles && Object.assign(this.expiryInput.style, e.field.styles), this.expiryEndContent.classList.add($.endContent), this.expiryEndContent.appendChild(this.expiryWarning.render()), this.expiryInputContainer.append(this.expiryInput, this.expiryEndContent), this.expiryLabel.setAttribute("for", this.expiryId), this.expiryLabel.classList.add($.label), (d = e == null ? void 0 : e.label) != null && d.className && this.expiryLabel.classList.add(e.label.className), (u = e == null ? void 0 : e.label) != null && u.styles && Object.assign(this.expiryLabel.style, e.label.styles), this.expiryLabelText.textContent = r.card.expiry.label, this.expiryLabelError.textContent = r.card.expiry.error.required, this.expiryLabelError.classList.add($.labelError, $.hidden), this.expiryLabel.append(this.expiryLabelText, this.expiryLabelError), this.expiryError.classList.add($.error, $.hidden), (h = e == null ? void 0 : e.error) != null && h.className && this.expiryError.classList.add(e.error.className), (p = e == null ? void 0 : e.error) != null && p.styles && Object.assign(this.expiryError.style, e.error.styles);
4926
4953
  const i = document.createElement("div");
4927
- if (i.appendChild(this.cvcError), this.cvcInputContainer.classList.add($.inputContainer), (m = e == null ? void 0 : e.container) != null && m.className && this.cvcInputContainer.classList.add(e.container.className), (f = e == null ? void 0 : e.container) != null && f.styles && Object.assign(this.cvcInputContainer.style, e.container.styles), this.cvcInput.setAttribute("id", this.cvcId), this.cvcInput.setAttribute("auto-complete", "cc-cvc"), this.cvcInput.setAttribute("placeholder", r.card.cvc.placeholder), this.cvcInput.classList.add($.input), (v = e == null ? void 0 : e.field) != null && v.className && this.cvcInput.classList.add(e.field.className), (y = e == null ? void 0 : e.field) != null && y.styles && Object.assign(this.cvcInput.style, e.field.styles), (w = e == null ? void 0 : e.placeholder) != null && w.styles && Object.keys(e.placeholder.styles).length) {
4954
+ if (i.appendChild(this.expiryError), this.cvcInputContainer.classList.add($.inputContainer), (m = e == null ? void 0 : e.container) != null && m.className && this.cvcInputContainer.classList.add(e.container.className), (f = e == null ? void 0 : e.container) != null && f.styles && Object.assign(this.cvcInputContainer.style, e.container.styles), this.cvcInput.setAttribute("id", this.cvcId), this.cvcInput.setAttribute("auto-complete", "cc-cvc"), this.cvcInput.setAttribute("placeholder", r.card.cvc.placeholder), this.cvcInput.classList.add($.input), (v = e == null ? void 0 : e.field) != null && v.className && this.cvcInput.classList.add(e.field.className), (y = e == null ? void 0 : e.field) != null && y.styles && Object.assign(this.cvcInput.style, e.field.styles), (w = e == null ? void 0 : e.placeholder) != null && w.styles && Object.keys(e.placeholder.styles).length) {
4928
4955
  const O = (U) => U.replace(/[A-Z]/g, (H) => "-" + H.toLowerCase()), R = Object.entries(e.placeholder.styles).map(([U, H]) => `${O(U)}:${H};`).join("");
4929
4956
  this.placeholderStyle.textContent = `#${this.expiryId}::placeholder{${R}}#${this.cvcId}::placeholder{${R}}`, this.element.appendChild(this.placeholderStyle);
4930
4957
  }
@@ -4971,7 +4998,7 @@ class rd {
4971
4998
  handleCvcChange(t) {
4972
4999
  if (this.isDisabled) return;
4973
5000
  this.isCvcRequired = !1, this.cvcErrorMessage = "", this.isCvcChanged || (this.isCvcChanged = !0);
4974
- const e = yl(t, this.cardType || ""), r = De.getTypeInfo(this.cardType || "");
5001
+ const e = _l(t, this.cardType || ""), r = De.getTypeInfo(this.cardType || "");
4975
5002
  e.length === (r == null ? void 0 : r.code.size) && this.validateCvc(e), this.events.cvcChange.emit({
4976
5003
  value: e,
4977
5004
  isValid: this.cvcValidator(e) === null
@@ -5018,7 +5045,7 @@ class rd {
5018
5045
  handleExpiryChange(t) {
5019
5046
  if (this.isDisabled) return;
5020
5047
  this.isExpiryRequired = !1, this.expiryErrorMessage = "", this.isExpiryChanged || (this.isExpiryChanged = !0);
5021
- const e = bl(t, this.expiryPrevValue);
5048
+ const e = Cl(t, this.expiryPrevValue);
5022
5049
  e.length === 7 && this.validateExpiry(e), this.events.expiryChange.emit({
5023
5050
  value: e,
5024
5051
  isValid: this.expiryValidator(e) === null
@@ -5068,19 +5095,19 @@ class rd {
5068
5095
  const t = this.isTouchSubmit || this.isExpiryChanged, e = t && !this.isDisabled && this.isExpiryRequired, r = t && !this.isDisabled && !!this.expiryErrorMessage;
5069
5096
  this.toggleExpiryLabelError(e), this.toggleExpiryErrorMessage(r), !e && !r ? (this.expiryInputContainer.classList.remove($.errorInput), this.expiryEndContent.classList.add($.hidden)) : this.expiryEndContent.classList.remove($.hidden);
5070
5097
  const i = this.isTouchSubmit || this.isCvcChanged, a = i && !this.isDisabled && this.isCvcRequired, s = i && !this.isDisabled && !!this.cvcErrorMessage;
5071
- return this.toggleCvcLabelError(a), this.toggleCvcErrorMessage(s), !a && !s ? (this.cvcInputContainer.classList.remove($.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($.disabled), this.expiryInput.classList.add($.disabledInput), this.cvcInputContainer.classList.add($.disabled), this.cvcInput.classList.add($.disabledInput)) : (this.expiryInputContainer.classList.remove($.disabled), this.expiryInput.classList.remove($.disabledInput), this.cvcInputContainer.classList.remove($.disabled), this.cvcInput.classList.remove($.disabledInput)), this.element;
5098
+ return this.toggleCvcLabelError(a), this.toggleCvcErrorMessage(s), !a && !s ? (this.cvcInputContainer.classList.remove($.errorInput), this.cvcEndContent.innerHTML = "", this.cvcEndContent.appendChild(this.cardCvc.render())) : (this.cvcEndContent.innerHTML = "", this.cvcEndContent.appendChild(this.cvcWarning.render())), this.isDisabled ? (this.expiryInputContainer.classList.add($.disabled), this.expiryInput.classList.add($.disabledInput), this.cvcInputContainer.classList.add($.disabled), this.cvcInput.classList.add($.disabledInput)) : (this.expiryInputContainer.classList.remove($.disabled), this.expiryInput.classList.remove($.disabledInput), this.cvcInputContainer.classList.remove($.disabled), this.cvcInput.classList.remove($.disabledInput)), this.element;
5072
5099
  }
5073
5100
  }
5074
- const id = "_container_94v1h_1", ad = "_title_94v1h_10", ur = {
5075
- container: id,
5076
- title: ad
5101
+ const ld = "_container_94v1h_1", cd = "_title_94v1h_10", mr = {
5102
+ container: ld,
5103
+ title: cd
5077
5104
  };
5078
- class Oi {
5105
+ class xi {
5079
5106
  constructor(t) {
5080
5107
  b(this, "element");
5081
5108
  b(this, "message", document.createElement("p"));
5082
- b(this, "icon", new mn());
5083
- this.translate = t, this.element = document.createElement("div"), this.element.classList.add(ur.container), this.message.classList.add(ur.title), this.message.textContent = t.messages().status.error, this.element.append(this.icon.render(), this.message), this.translate.subscribe(({ messages: e }) => {
5109
+ b(this, "icon", new gt());
5110
+ this.translate = t, this.element = document.createElement("div"), this.element.classList.add(mr.container), this.message.classList.add(mr.title), this.message.textContent = t.messages().status.error, this.element.append(this.icon.render(), this.message), this.translate.subscribe(({ messages: e }) => {
5084
5111
  this.message.textContent = e.status.success;
5085
5112
  });
5086
5113
  }
@@ -5094,7 +5121,7 @@ class Oi {
5094
5121
  return this.element;
5095
5122
  }
5096
5123
  }
5097
- class sd {
5124
+ class dd {
5098
5125
  constructor({ translate: t, className: e, stylesState: r }) {
5099
5126
  b(this, "element");
5100
5127
  b(this, "error");
@@ -5108,7 +5135,7 @@ class sd {
5108
5135
  close: new de()
5109
5136
  });
5110
5137
  const i = r.getState();
5111
- this.element = document.createElement("form"), this.error = new Oi(t), this.submit = new pc(t, i.SubmitButton), this.back = new sc(), this.number = new qc(t, i.Input), this.name = new wc(t, i.Input), this.cardSecurity = new rd(t, i.Input), this.error.addClassName(ut.hidden), this.element.classList.add(ut.cardForm, e || ""), this.element.append(
5138
+ this.element = document.createElement("form"), this.error = new xi(t), this.submit = new vc(t, i.SubmitButton), this.back = new dc(), this.number = new Yc(t, i.Input), this.name = new Nc(t, i.Input), this.cardSecurity = new od(t, i.Input), this.error.addClassName(ut.hidden), this.element.classList.add(ut.cardForm, e || ""), this.element.append(
5112
5139
  this.back.render(),
5113
5140
  this.number.render(),
5114
5141
  this.cardSecurity.render(),
@@ -5150,7 +5177,7 @@ class sd {
5150
5177
  return this.element;
5151
5178
  }
5152
5179
  }
5153
- class od {
5180
+ class ud {
5154
5181
  constructor() {
5155
5182
  b(this, "template", `
5156
5183
  <svg
@@ -5177,16 +5204,16 @@ class od {
5177
5204
  return this.element;
5178
5205
  }
5179
5206
  }
5180
- const ld = "_container_hoha1_1", cd = "_title_hoha1_5", pr = {
5181
- container: ld,
5182
- title: cd
5207
+ const pd = "_container_hoha1_1", hd = "_title_hoha1_5", fr = {
5208
+ container: pd,
5209
+ title: hd
5183
5210
  };
5184
- class dd {
5211
+ class md {
5185
5212
  constructor(t) {
5186
5213
  b(this, "element");
5187
5214
  b(this, "message", document.createElement("p"));
5188
- b(this, "icon", new od());
5189
- this.translate = t, this.element = document.createElement("div"), this.element.classList.add(pr.container), this.message.classList.add(pr.title), this.message.textContent = t.messages().status.success, this.element.append(this.icon.render(), this.message), this.translate.subscribe(({ messages: e }) => {
5215
+ b(this, "icon", new ud());
5216
+ this.translate = t, this.element = document.createElement("div"), this.element.classList.add(fr.container), this.message.classList.add(fr.title), this.message.textContent = t.messages().status.success, this.element.append(this.icon.render(), this.message), this.translate.subscribe(({ messages: e }) => {
5190
5217
  this.message.textContent = e.status.success;
5191
5218
  });
5192
5219
  }
@@ -5200,22 +5227,22 @@ class dd {
5200
5227
  return this.element;
5201
5228
  }
5202
5229
  }
5203
- class ud {
5230
+ class fd {
5204
5231
  constructor(t) {
5205
5232
  b(this, "isLoading", !1);
5206
5233
  b(this, "isFormOpen", !1);
5207
5234
  b(this, "checkout");
5208
5235
  b(this, "container", document.createElement("div"));
5209
- b(this, "loader", new nl());
5236
+ b(this, "loader", new al());
5210
5237
  b(this, "error");
5211
5238
  b(this, "success");
5212
5239
  b(this, "buttons");
5213
5240
  b(this, "form");
5214
- this.config = t, this.buttons = new nc(t), this.form = new sd({
5241
+ this.config = t, this.buttons = new sc(t), this.form = new dd({
5215
5242
  translate: t.state.translate,
5216
5243
  className: ce.hidden,
5217
5244
  stylesState: t.state.styles
5218
- }), this.error = new Oi(t.state.translate), this.success = new dd(t.state.translate), this.error.addClassName(ce.hidden), this.success.addClassName(ce.hidden), this.container.append(this.loader.render(), this.buttons.render(), this.form.render()), this.checkout = document.createElement("div"), this.checkout.classList.add(ce.checkout), this.checkout.append(this.container, this.error.render(), this.success.render());
5245
+ }), this.error = new xi(t.state.translate), this.success = new md(t.state.translate), this.error.addClassName(ce.hidden), this.success.addClassName(ce.hidden), this.container.append(this.loader.render(), this.buttons.render(), this.form.render()), this.checkout = document.createElement("div"), this.checkout.classList.add(ce.checkout), this.checkout.append(this.container, this.error.render(), this.success.render());
5219
5246
  }
5220
5247
  // init
5221
5248
  init() {
@@ -5282,14 +5309,14 @@ class ud {
5282
5309
  this.hideError(), this.setLoading(!0);
5283
5310
  const e = this.config.state.checkout.getState(), r = this.config.state.translate.messages();
5284
5311
  try {
5285
- const a = yield Vl(t, e.environment, e.apiVersion);
5312
+ const a = yield Bl(t, e.environment, e.apiVersion, e.useWorkflows);
5286
5313
  if (a.error)
5287
5314
  throw new Error(r.status.error);
5288
5315
  if (a.three_ds_session_id) {
5289
5316
  yield this.config.service.ev.initThreeDs({
5290
5317
  threeDsId: a.three_ds_session_id,
5291
5318
  onSuccess: () => {
5292
- this.setLoading(!1), this.handleSuccess(J(j({}, t), { threeDsSessionId: a.three_ds_session_id }));
5319
+ this.setLoading(!1), this.handleSuccess(X(j({}, t), { threeDsSessionId: a.three_ds_session_id }));
5293
5320
  },
5294
5321
  onError: () => {
5295
5322
  this.handleError("Three DS Error");
@@ -5326,10 +5353,10 @@ class ud {
5326
5353
  return this.checkout;
5327
5354
  }
5328
5355
  }
5329
- class pd {
5356
+ class vd {
5330
5357
  constructor(t) {
5331
5358
  b(this, "component");
5332
- this.config = t, this.component = new ud(t);
5359
+ this.config = t, this.component = new fd(t);
5333
5360
  }
5334
5361
  // init
5335
5362
  init() {
@@ -5354,7 +5381,7 @@ class pd {
5354
5381
  });
5355
5382
  }
5356
5383
  }
5357
- class gt {
5384
+ class yt {
5358
5385
  constructor(t) {
5359
5386
  b(this, "initialState");
5360
5387
  b(this, "state");
@@ -5374,23 +5401,25 @@ class gt {
5374
5401
  return this.observer.addListener(t);
5375
5402
  }
5376
5403
  }
5377
- const hd = {
5404
+ const gd = {
5378
5405
  clientToken: "",
5379
5406
  environment: "sandbox",
5380
- apiVersion: "1.0.0"
5407
+ apiVersion: "1.0.0",
5408
+ // TODO: remove useWorkflows after testing
5409
+ useWorkflows: !1
5381
5410
  };
5382
- class md extends gt {
5411
+ class yd extends yt {
5383
5412
  constructor(t) {
5384
- super(j(j({}, hd), t));
5413
+ super(j(j({}, gd), t));
5385
5414
  }
5386
5415
  }
5387
- const fd = {};
5388
- class vd extends gt {
5416
+ const bd = {};
5417
+ class Ed extends yt {
5389
5418
  constructor(t) {
5390
- super(j(j({}, fd), t));
5419
+ super(j(j({}, bd), t));
5391
5420
  }
5392
5421
  }
5393
- class gd extends gt {
5422
+ class _d extends yt {
5394
5423
  constructor(e) {
5395
5424
  super(e || null);
5396
5425
  b(this, "clientToken", "");
@@ -5400,12 +5429,12 @@ class gd extends gt {
5400
5429
  return z(this, null, function* () {
5401
5430
  if (this.clientToken === e) return this.getState();
5402
5431
  this.clientToken = e;
5403
- const a = yield Ul(e, r, i);
5432
+ const a = yield zl(e, r, i);
5404
5433
  return this.setState(a), a;
5405
5434
  });
5406
5435
  }
5407
5436
  }
5408
- const yd = {
5437
+ const Cd = {
5409
5438
  card: {
5410
5439
  title: "طريقة الدفع",
5411
5440
  number: {
@@ -5455,7 +5484,7 @@ const yd = {
5455
5484
  success: "تمت عملية الدفع الخاصة بك بنجاح!",
5456
5485
  error: "لم نتمكن من التحقق من طريقة الدفع الخاصة بك. يرجى اختيار طريقة دفع أخرى وإعادة المحاولة."
5457
5486
  }
5458
- }, bd = {
5487
+ }, Ad = {
5459
5488
  card: {
5460
5489
  title: "Метод на плащане",
5461
5490
  number: {
@@ -5505,7 +5534,7 @@ const yd = {
5505
5534
  success: "Успех",
5506
5535
  error: "Не можем да удостоверим автентичността на вашия метод на плащане. Моля, изберете друг метод на плащане и опитайте отново."
5507
5536
  }
5508
- }, Ed = {
5537
+ }, wd = {
5509
5538
  card: {
5510
5539
  title: "Způsob platby",
5511
5540
  number: {
@@ -5555,7 +5584,7 @@ const yd = {
5555
5584
  success: "Úspěch",
5556
5585
  error: "Váš způsob platby se nám nedaří ověřit. Zvolte prosím jiný způsob platby a zkuste to znovu."
5557
5586
  }
5558
- }, _d = {
5587
+ }, Td = {
5559
5588
  card: {
5560
5589
  title: "Betalingsmetode",
5561
5590
  number: {
@@ -5605,7 +5634,7 @@ const yd = {
5605
5634
  success: "Succes",
5606
5635
  error: "Vi kan ikke godkende din betalingsmetode. Vælg venligst en anden betalingsmetode og prøv igen."
5607
5636
  }
5608
- }, Cd = {
5637
+ }, Id = {
5609
5638
  card: {
5610
5639
  title: "Zahlungsmethode",
5611
5640
  number: {
@@ -5655,7 +5684,7 @@ const yd = {
5655
5684
  success: "Erfolg",
5656
5685
  error: "Wir können Ihre Zahlungsmethode nicht authentifizieren. Bitte wählen Sie eine andere Zahlungsmethode und versuchen Sie es erneut."
5657
5686
  }
5658
- }, Ad = {
5687
+ }, Od = {
5659
5688
  card: {
5660
5689
  title: "Μέθοδος πληρωμής",
5661
5690
  number: {
@@ -5705,7 +5734,7 @@ const yd = {
5705
5734
  success: "Επιτυχία",
5706
5735
  error: "Δεν μπορούμε να πιστοποιήσουμε τη μέθοδο πληρωμής σας. Παρακαλούμε επιλέξτε μια διαφορετική μέθοδο πληρωμής και προσπαθήστε ξανά."
5707
5736
  }
5708
- }, wd = {
5737
+ }, Nd = {
5709
5738
  card: {
5710
5739
  title: "Payment method",
5711
5740
  number: {
@@ -5755,7 +5784,7 @@ const yd = {
5755
5784
  success: "Your payment was successful!",
5756
5785
  error: "We are unable to authenticate your payment method. Please choose a different payment method and try again."
5757
5786
  }
5758
- }, Td = {
5787
+ }, Ld = {
5759
5788
  card: {
5760
5789
  title: "Método de pago",
5761
5790
  number: {
@@ -5805,7 +5834,7 @@ const yd = {
5805
5834
  success: "Éxito",
5806
5835
  error: "No podemos autenticar su método de pago. Elija otro método de pago e inténtelo de nuevo."
5807
5836
  }
5808
- }, Id = {
5837
+ }, xd = {
5809
5838
  card: {
5810
5839
  title: "Makseviis",
5811
5840
  number: {
@@ -5855,7 +5884,7 @@ const yd = {
5855
5884
  success: "Edu",
5856
5885
  error: "Me ei suuda teie makseviisi autentida. Palun valige teine makseviis ja proovige uuesti."
5857
5886
  }
5858
- }, Od = {
5887
+ }, Pd = {
5859
5888
  card: {
5860
5889
  title: "Maksutapa",
5861
5890
  number: {
@@ -5905,7 +5934,7 @@ const yd = {
5905
5934
  success: "Menestys",
5906
5935
  error: "Emme pysty todentamaan maksutapaasi. Valitse toinen maksutapa ja yritä uudelleen."
5907
5936
  }
5908
- }, Nd = {
5937
+ }, Rd = {
5909
5938
  card: {
5910
5939
  title: "Paraan ng pagbabayad",
5911
5940
  number: {
@@ -5955,7 +5984,7 @@ const yd = {
5955
5984
  success: "Tagumpay",
5956
5985
  error: "Hindi namin ma-authenticate ang iyong paraan ng pagbabayad. Mangyaring pumili ng ibang paraan ng pagbabayad at subukang muli."
5957
5986
  }
5958
- }, Ld = {
5987
+ }, kd = {
5959
5988
  card: {
5960
5989
  title: "Moyen de paiement",
5961
5990
  number: {
@@ -6005,7 +6034,7 @@ const yd = {
6005
6034
  success: "Succès",
6006
6035
  error: "Nous ne sommes pas en mesure d'authentifier votre méthode de paiement. Veuillez choisir un autre mode de paiement et réessayer."
6007
6036
  }
6008
- }, xd = {
6037
+ }, Md = {
6009
6038
  card: {
6010
6039
  title: "Način plaćanja",
6011
6040
  number: {
@@ -6055,7 +6084,7 @@ const yd = {
6055
6084
  success: "Uspjeh",
6056
6085
  error: "Ne možemo provjeriti autentičnost vašeg načina plaćanja. Odaberite drugi način plaćanja i pokušajte ponovno."
6057
6086
  }
6058
- }, Pd = {
6087
+ }, Sd = {
6059
6088
  card: {
6060
6089
  title: "Fizetési mód",
6061
6090
  number: {
@@ -6105,7 +6134,7 @@ const yd = {
6105
6134
  success: "Siker",
6106
6135
  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."
6107
6136
  }
6108
- }, Rd = {
6137
+ }, Dd = {
6109
6138
  card: {
6110
6139
  title: "Metode pembayaran",
6111
6140
  number: {
@@ -6155,7 +6184,7 @@ const yd = {
6155
6184
  success: "Sukses",
6156
6185
  error: "Kami tidak dapat mengautentikasi metode pembayaran Anda. Silakan pilih metode pembayaran lain dan coba lagi."
6157
6186
  }
6158
- }, kd = {
6187
+ }, Vd = {
6159
6188
  card: {
6160
6189
  title: "Modalità di pagamento",
6161
6190
  number: {
@@ -6205,7 +6234,7 @@ const yd = {
6205
6234
  success: "Il successo",
6206
6235
  error: "Non siamo in grado di autenticare il suo metodo di pagamento. Scegliere un altro metodo di pagamento e riprovare."
6207
6236
  }
6208
- }, Md = {
6237
+ }, Fd = {
6209
6238
  card: {
6210
6239
  title: "支払い方法",
6211
6240
  number: {
@@ -6255,7 +6284,7 @@ const yd = {
6255
6284
  success: "成功",
6256
6285
  error: "お客様のお支払い方法を認証できません。別のお支払い方法を選択し、再度お試しください。"
6257
6286
  }
6258
- }, Sd = {
6287
+ }, Ud = {
6259
6288
  card: {
6260
6289
  title: "결제 방식",
6261
6290
  number: {
@@ -6305,7 +6334,7 @@ const yd = {
6305
6334
  success: "성공",
6306
6335
  error: "결제 방법을 인증할 수 없습니다. 다른 결제 방법을 선택하고 다시 시도해 주세요."
6307
6336
  }
6308
- }, Dd = {
6337
+ }, Bd = {
6309
6338
  card: {
6310
6339
  title: "Mokėjimo būdas",
6311
6340
  number: {
@@ -6355,7 +6384,7 @@ const yd = {
6355
6384
  success: "Sėkmė",
6356
6385
  error: "Negalime patvirtinti jūsų mokėjimo būdo. Pasirinkite kitą mokėjimo būdą ir bandykite dar kartą."
6357
6386
  }
6358
- }, Vd = {
6387
+ }, jd = {
6359
6388
  card: {
6360
6389
  title: "Maksājumu veids",
6361
6390
  number: {
@@ -6405,7 +6434,7 @@ const yd = {
6405
6434
  success: "Panākumi",
6406
6435
  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."
6407
6436
  }
6408
- }, Fd = {
6437
+ }, zd = {
6409
6438
  card: {
6410
6439
  title: "Kaedah pembayaran",
6411
6440
  number: {
@@ -6455,7 +6484,7 @@ const yd = {
6455
6484
  success: "Kejayaan",
6456
6485
  error: "Kami tidak dapat mengesahkan kaedah pembayaran anda. Sila pilih kaedah pembayaran lain dan cuba lagi."
6457
6486
  }
6458
- }, Ud = {
6487
+ }, Kd = {
6459
6488
  card: {
6460
6489
  title: "Metodu tal-ħlas",
6461
6490
  number: {
@@ -6505,7 +6534,57 @@ const yd = {
6505
6534
  success: "Suċċess",
6506
6535
  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."
6507
6536
  }
6508
- }, Bd = {
6537
+ }, qd = {
6538
+ card: {
6539
+ title: "Betalingsmetode",
6540
+ number: {
6541
+ label: "Kortnummer",
6542
+ error: {
6543
+ required: "PÅKREVD",
6544
+ invalid: "Kortnummeret er ugyldig",
6545
+ incomplete: "Kortnummeret er ufullstendig",
6546
+ unsupported: "Ikke støttet korttype"
6547
+ }
6548
+ },
6549
+ expiry: {
6550
+ label: "Utløpsdato",
6551
+ placeholder: "MM / ÅÅ",
6552
+ error: {
6553
+ required: "PÅKREVD",
6554
+ invalid: "Utløpsdatoen er ugyldig",
6555
+ incomplete: "Kortets utløpsdato er ufullstendig",
6556
+ expired: "Kortet har utløpt"
6557
+ }
6558
+ },
6559
+ cvc: {
6560
+ label: "Sikkerhetskode",
6561
+ placeholder: "CVC",
6562
+ error: {
6563
+ required: "PÅKREVD",
6564
+ incomplete: "Sikkerhetskoden er ufullstendig",
6565
+ invalid: "CVC-koden er ugyldig"
6566
+ }
6567
+ },
6568
+ name: {
6569
+ label: "Kortholders navn",
6570
+ placeholder: "Fullt navn",
6571
+ error: {
6572
+ required: "PÅKREVD",
6573
+ invalid: "Oppgi fullt navn"
6574
+ }
6575
+ },
6576
+ pay: {
6577
+ button: "Betal"
6578
+ },
6579
+ compact: {
6580
+ button: "Kort"
6581
+ }
6582
+ },
6583
+ status: {
6584
+ success: "Betalingen var vellykket!",
6585
+ error: "Vi kan ikke autentisere betalingsmetoden din. Velg en annen betalingsmetode og prøv igjen."
6586
+ }
6587
+ }, Hd = {
6509
6588
  card: {
6510
6589
  title: "Betalingsmetode",
6511
6590
  number: {
@@ -6555,7 +6634,7 @@ const yd = {
6555
6634
  success: "Suksess",
6556
6635
  error: "Vi kan ikke godkjenne betalingsmåten din. Vennligst velg en annen betalingsmetode og prøv på nytt."
6557
6636
  }
6558
- }, jd = {
6637
+ }, Wd = {
6559
6638
  card: {
6560
6639
  title: "Betaalmethode",
6561
6640
  number: {
@@ -6605,7 +6684,7 @@ const yd = {
6605
6684
  success: "Succes",
6606
6685
  error: "We kunnen je betaalmethode niet verifiëren. Kies een andere betaalmethode en probeer het opnieuw."
6607
6686
  }
6608
- }, zd = {
6687
+ }, Gd = {
6609
6688
  card: {
6610
6689
  title: "Metoda płatności",
6611
6690
  number: {
@@ -6655,7 +6734,7 @@ const yd = {
6655
6734
  success: "Sukces",
6656
6735
  error: "Nie możemy uwierzytelnić metody płatności. Wybierz inną metodę płatności i spróbuj ponownie."
6657
6736
  }
6658
- }, Kd = {
6737
+ }, Yd = {
6659
6738
  card: {
6660
6739
  title: "Forma de pagamento",
6661
6740
  number: {
@@ -6705,7 +6784,7 @@ const yd = {
6705
6784
  success: "Sucesso",
6706
6785
  error: "Não foi possível autenticar o seu método de pagamento. Selecione outro método de pagamento e tente novamente."
6707
6786
  }
6708
- }, qd = {
6787
+ }, $d = {
6709
6788
  card: {
6710
6789
  title: "Metoda de plată",
6711
6790
  number: {
@@ -6755,7 +6834,7 @@ const yd = {
6755
6834
  success: "Succes",
6756
6835
  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."
6757
6836
  }
6758
- }, Hd = {
6837
+ }, Qd = {
6759
6838
  card: {
6760
6839
  title: "Метод оплаты",
6761
6840
  number: {
@@ -6805,7 +6884,57 @@ const yd = {
6805
6884
  success: "Успех",
6806
6885
  error: "Мы не можем проверить подлинность вашего способа оплаты. Пожалуйста, выберите другой способ оплаты и повторите попытку."
6807
6886
  }
6808
- }, Wd = {
6887
+ }, Zd = {
6888
+ card: {
6889
+ title: "Спосіб оплати",
6890
+ number: {
6891
+ label: "Номер картки",
6892
+ error: {
6893
+ required: "ОБОВʼЯЗКОВО",
6894
+ invalid: "Невірний номер картки",
6895
+ incomplete: "Номер картки неповний",
6896
+ unsupported: "Непідтримуваний тип картки"
6897
+ }
6898
+ },
6899
+ expiry: {
6900
+ label: "Термін дії",
6901
+ placeholder: "ММ / РР",
6902
+ error: {
6903
+ required: "ОБОВʼЯЗКОВО",
6904
+ invalid: "Невірний термін дії картки",
6905
+ incomplete: "Термін дії картки вказано не повністю",
6906
+ expired: "Термін дії картки минув"
6907
+ }
6908
+ },
6909
+ cvc: {
6910
+ label: "Код безпеки",
6911
+ placeholder: "CVC",
6912
+ error: {
6913
+ required: "ОБОВʼЯЗКОВО",
6914
+ incomplete: "Код безпеки картки введено не повністю",
6915
+ invalid: "Невірний CVC-код картки"
6916
+ }
6917
+ },
6918
+ name: {
6919
+ label: "Імʼя власника картки",
6920
+ placeholder: "Повне імʼя",
6921
+ error: {
6922
+ required: "ОБОВʼЯЗКОВО",
6923
+ invalid: "Вкажіть своє повне імʼя"
6924
+ }
6925
+ },
6926
+ pay: {
6927
+ button: "Сплатити"
6928
+ },
6929
+ compact: {
6930
+ button: "Картка"
6931
+ }
6932
+ },
6933
+ status: {
6934
+ success: "Платіж успішний!",
6935
+ error: "Не вдалося підтвердити ваш спосіб оплати. Будь ласка, оберіть інший спосіб оплати та спробуйте ще раз."
6936
+ }
6937
+ }, Xd = {
6809
6938
  card: {
6810
6939
  title: "Spôsob platby",
6811
6940
  number: {
@@ -6855,7 +6984,7 @@ const yd = {
6855
6984
  success: "Úspech",
6856
6985
  error: "Nemôžeme overiť váš spôsob platby. Vyberte si iný spôsob platby a skúste to znova."
6857
6986
  }
6858
- }, Gd = {
6987
+ }, Jd = {
6859
6988
  card: {
6860
6989
  title: "Način plačila",
6861
6990
  number: {
@@ -6905,7 +7034,7 @@ const yd = {
6905
7034
  success: "Uspeh",
6906
7035
  error: "Vašega načina plačila ne moremo preveriti. Izberite drug način plačila in poskusite znova."
6907
7036
  }
6908
- }, Yd = {
7037
+ }, eu = {
6909
7038
  card: {
6910
7039
  title: "Betalningsmetod",
6911
7040
  number: {
@@ -6955,7 +7084,7 @@ const yd = {
6955
7084
  success: "Framgång",
6956
7085
  error: "Vi kan inte verifiera din betalningsmetod. Vänligen välj en annan betalningsmetod och försök igen."
6957
7086
  }
6958
- }, $d = {
7087
+ }, tu = {
6959
7088
  card: {
6960
7089
  title: "วิธีการชำระเงิน",
6961
7090
  number: {
@@ -7005,7 +7134,7 @@ const yd = {
7005
7134
  success: "ความสำเร็จ",
7006
7135
  error: "เราไม่สามารถตรวจสอบวิธีการชำระเงินของคุณได้ โปรดเลือกวิธีการชำระเงินอื่นแล้วลองอีกครั้ง"
7007
7136
  }
7008
- }, Qd = {
7137
+ }, nu = {
7009
7138
  card: {
7010
7139
  title: "Ödeme yöntemi",
7011
7140
  number: {
@@ -7055,7 +7184,7 @@ const yd = {
7055
7184
  success: "Başarı",
7056
7185
  error: "Ödeme yönteminizi doğrulayamıyoruz. Lütfen farklı bir ödeme yöntemi seçin ve tekrar deneyin."
7057
7186
  }
7058
- }, Zd = {
7187
+ }, ru = {
7059
7188
  card: {
7060
7189
  title: "Phương thức thanh toán",
7061
7190
  number: {
@@ -7105,7 +7234,7 @@ const yd = {
7105
7234
  success: "Thành công",
7106
7235
  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."
7107
7236
  }
7108
- }, Xd = {
7237
+ }, iu = {
7109
7238
  card: {
7110
7239
  title: "支付方式",
7111
7240
  number: {
@@ -7155,49 +7284,51 @@ const yd = {
7155
7284
  success: "成功",
7156
7285
  error: "我们无法验证您的付款方式。请选择其他付款方式并重试。"
7157
7286
  }
7158
- }, Ht = {
7159
- ar: yd,
7160
- en: wd,
7161
- bg: bd,
7162
- cs: Ed,
7163
- da: _d,
7164
- de: Cd,
7165
- el: Ad,
7166
- es: Td,
7167
- et: Id,
7168
- fi: Od,
7169
- fil: Nd,
7170
- fr: Ld,
7171
- hr: xd,
7172
- hu: Pd,
7173
- id: Rd,
7174
- it: kd,
7175
- ja: Md,
7176
- ko: Sd,
7177
- lt: Dd,
7178
- lv: Vd,
7179
- ms: Fd,
7180
- ru: Hd,
7181
- mt: Ud,
7182
- nb: Bd,
7183
- nl: jd,
7184
- pl: zd,
7185
- pt: Kd,
7186
- ro: qd,
7187
- sk: Wd,
7188
- sl: Gd,
7189
- sv: Yd,
7190
- th: $d,
7191
- tr: Qd,
7192
- vi: Zd,
7193
- zh: Xd
7194
- }, Wt = () => {
7287
+ }, Wt = {
7288
+ ar: Cd,
7289
+ en: Nd,
7290
+ bg: Ad,
7291
+ cs: wd,
7292
+ da: Td,
7293
+ de: Id,
7294
+ el: Od,
7295
+ es: Ld,
7296
+ et: xd,
7297
+ fi: Pd,
7298
+ fil: Rd,
7299
+ fr: kd,
7300
+ hr: Md,
7301
+ hu: Sd,
7302
+ id: Dd,
7303
+ it: Vd,
7304
+ ja: Fd,
7305
+ ko: Ud,
7306
+ lt: Bd,
7307
+ lv: jd,
7308
+ ms: zd,
7309
+ ru: Qd,
7310
+ mt: Kd,
7311
+ no: qd,
7312
+ nb: Hd,
7313
+ nl: Wd,
7314
+ pl: Gd,
7315
+ pt: Yd,
7316
+ ro: $d,
7317
+ ua: Zd,
7318
+ sk: Xd,
7319
+ sl: Jd,
7320
+ sv: eu,
7321
+ th: tu,
7322
+ tr: nu,
7323
+ vi: ru,
7324
+ zh: iu
7325
+ }, Gt = () => {
7195
7326
  const n = navigator == null ? void 0 : navigator.language.split("-")[0];
7196
- return Ht[n] || Ht.en;
7197
- }, hr = (n, t = {}) => {
7198
- var r, i, a, s, o, l, c, d, u, h, p, m, f, v, y, w, T, x, C, I, O, R, U, H, W, S, F, q, ee, M, Y, K, g, E, k, B, _, N, A, P, V, L, G, X, se, D, ne, be, fn, vn, gn, yn, bn, En, _n, Cn, An;
7199
- if (!n) return Wt();
7200
- const e = Ht[n] || Wt();
7327
+ return Wt[n] || Wt.en;
7328
+ }, vr = (n, t = {}) => {
7329
+ var r, i, a, s, o, l, c, d, u, h, p, m, f, v, y, w, T, x, C, I, O, R, U, H, W, S, F, q, ee, M, Y, K, g, E, k, B, _, N, A, P, V, L, G, J, se, D, ne, be, fn, vn, gn, yn, bn, En, _n, Cn, An, wn, Tn, In;
7330
+ if (!n) return Gt();
7331
+ const e = Wt[n] || Gt();
7201
7332
  return {
7202
7333
  card: {
7203
7334
  title: ((r = t == null ? void 0 : t.card) == null ? void 0 : r.title) || e.card.title,
@@ -7222,47 +7353,47 @@ const yd = {
7222
7353
  },
7223
7354
  cvc: {
7224
7355
  label: ((g = (K = t == null ? void 0 : t.card) == null ? void 0 : K.cvc) == null ? void 0 : g.label) || e.card.cvc.label,
7225
- placeholder: ((k = (E = t == null ? void 0 : t.card) == null ? void 0 : E.cvc) == null ? void 0 : k.label) || e.card.cvc.label,
7356
+ placeholder: ((k = (E = t == null ? void 0 : t.card) == null ? void 0 : E.cvc) == null ? void 0 : k.placeholder) || e.card.cvc.placeholder,
7226
7357
  error: {
7227
- required: ((_ = (B = t == null ? void 0 : t.card) == null ? void 0 : B.cvc) == null ? void 0 : _.label) || e.card.cvc.label,
7228
- incomplete: ((A = (N = t == null ? void 0 : t.card) == null ? void 0 : N.cvc) == null ? void 0 : A.label) || e.card.cvc.label,
7229
- invalid: ((V = (P = t == null ? void 0 : t.card) == null ? void 0 : P.cvc) == null ? void 0 : V.label) || e.card.cvc.label
7358
+ required: ((N = (_ = (B = t == null ? void 0 : t.card) == null ? void 0 : B.cvc) == null ? void 0 : _.error) == null ? void 0 : N.required) || e.card.cvc.error.required,
7359
+ incomplete: ((V = (P = (A = t == null ? void 0 : t.card) == null ? void 0 : A.cvc) == null ? void 0 : P.error) == null ? void 0 : V.incomplete) || e.card.cvc.error.incomplete,
7360
+ invalid: ((J = (G = (L = t == null ? void 0 : t.card) == null ? void 0 : L.cvc) == null ? void 0 : G.error) == null ? void 0 : J.invalid) || e.card.cvc.error.invalid
7230
7361
  }
7231
7362
  },
7232
7363
  name: {
7233
- label: ((G = (L = t == null ? void 0 : t.card) == null ? void 0 : L.name) == null ? void 0 : G.label) || e.card.name.label,
7234
- placeholder: ((se = (X = t == null ? void 0 : t.card) == null ? void 0 : X.name) == null ? void 0 : se.placeholder) || e.card.name.placeholder,
7364
+ label: ((D = (se = t == null ? void 0 : t.card) == null ? void 0 : se.name) == null ? void 0 : D.label) || e.card.name.label,
7365
+ placeholder: ((be = (ne = t == null ? void 0 : t.card) == null ? void 0 : ne.name) == null ? void 0 : be.placeholder) || e.card.name.placeholder,
7235
7366
  error: {
7236
- required: ((be = (ne = (D = t == null ? void 0 : t.card) == null ? void 0 : D.name) == null ? void 0 : ne.error) == null ? void 0 : be.required) || e.card.name.error.required,
7237
- invalid: ((gn = (vn = (fn = t == null ? void 0 : t.card) == null ? void 0 : fn.name) == null ? void 0 : vn.error) == null ? void 0 : gn.invalid) || e.card.name.error.invalid
7367
+ required: ((gn = (vn = (fn = t == null ? void 0 : t.card) == null ? void 0 : fn.name) == null ? void 0 : vn.error) == null ? void 0 : gn.required) || e.card.name.error.required,
7368
+ invalid: ((En = (bn = (yn = t == null ? void 0 : t.card) == null ? void 0 : yn.name) == null ? void 0 : bn.error) == null ? void 0 : En.invalid) || e.card.name.error.invalid
7238
7369
  }
7239
7370
  },
7240
7371
  pay: {
7241
- button: ((bn = (yn = t == null ? void 0 : t.card) == null ? void 0 : yn.pay) == null ? void 0 : bn.button) || e.card.pay.button
7372
+ button: ((Cn = (_n = t == null ? void 0 : t.card) == null ? void 0 : _n.pay) == null ? void 0 : Cn.button) || e.card.pay.button
7242
7373
  },
7243
7374
  compact: {
7244
- button: ((_n = (En = t == null ? void 0 : t.card) == null ? void 0 : En.compact) == null ? void 0 : _n.button) || e.card.compact.button
7375
+ button: ((wn = (An = t == null ? void 0 : t.card) == null ? void 0 : An.compact) == null ? void 0 : wn.button) || e.card.compact.button
7245
7376
  }
7246
7377
  },
7247
7378
  status: {
7248
- success: ((Cn = t == null ? void 0 : t.status) == null ? void 0 : Cn.success) || e.status.success,
7249
- error: ((An = t == null ? void 0 : t.status) == null ? void 0 : An.error) || e.status.error
7379
+ success: ((Tn = t == null ? void 0 : t.status) == null ? void 0 : Tn.success) || e.status.success,
7380
+ error: ((In = t == null ? void 0 : t.status) == null ? void 0 : In.error) || e.status.error
7250
7381
  }
7251
7382
  };
7252
7383
  };
7253
- class Jd extends gt {
7384
+ class au extends yt {
7254
7385
  constructor() {
7255
7386
  super({
7256
- messages: Wt(),
7387
+ messages: Gt(),
7257
7388
  locale: (navigator == null ? void 0 : navigator.language.split("-")[0]) || "en"
7258
7389
  });
7259
7390
  }
7260
7391
  setMessages(t) {
7261
- const e = this.locale(), r = hr(e, t);
7392
+ const e = this.locale(), r = vr(e, t);
7262
7393
  this.setState({ locale: e, messages: r, overrides: t });
7263
7394
  }
7264
7395
  setLocale(t) {
7265
- const e = this.overrides(), r = hr(t, e);
7396
+ const e = this.overrides(), r = vr(t, e);
7266
7397
  this.setState({ locale: t, messages: r, overrides: e });
7267
7398
  }
7268
7399
  overrides() {
@@ -7297,7 +7428,7 @@ class Jd extends gt {
7297
7428
  * See the License for the specific language governing permissions and
7298
7429
  * limitations under the License.
7299
7430
  */
7300
- function eu(n, t) {
7431
+ function su(n, t) {
7301
7432
  var e = {};
7302
7433
  for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && t.indexOf(r) < 0 && (e[r] = n[r]);
7303
7434
  if (n != null && typeof Object.getOwnPropertySymbols == "function")
@@ -7305,11 +7436,11 @@ function eu(n, t) {
7305
7436
  t.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(n, r[i]) && (e[r[i]] = n[r[i]]);
7306
7437
  return e;
7307
7438
  }
7308
- function tu(n, t) {
7439
+ function ou(n, t) {
7309
7440
  var e = document.querySelector('script[src="'.concat(n, '"]'));
7310
7441
  if (e === null)
7311
7442
  return null;
7312
- var r = Ni(n, t), i = e.cloneNode();
7443
+ var r = Pi(n, t), i = e.cloneNode();
7313
7444
  if (delete i.dataset.uidAuto, Object.keys(i.dataset).length !== Object.keys(r.dataset).length)
7314
7445
  return null;
7315
7446
  var a = !0;
@@ -7317,63 +7448,63 @@ function tu(n, t) {
7317
7448
  i.dataset[s] !== r.dataset[s] && (a = !1);
7318
7449
  }), a ? e : null;
7319
7450
  }
7320
- function nu(n) {
7321
- var t = n.url, e = n.attributes, r = n.onSuccess, i = n.onError, a = Ni(t, e);
7451
+ function lu(n) {
7452
+ var t = n.url, e = n.attributes, r = n.onSuccess, i = n.onError, a = Pi(t, e);
7322
7453
  a.onerror = i, a.onload = r, document.head.insertBefore(a, document.head.firstElementChild);
7323
7454
  }
7324
- function ru(n) {
7325
- var t = n.sdkBaseUrl, e = n.environment, r = eu(n, ["sdkBaseUrl", "environment"]), i = t || su(e), a = r, s = Object.keys(a).filter(function(c) {
7455
+ function cu(n) {
7456
+ var t = n.sdkBaseUrl, e = n.environment, r = su(n, ["sdkBaseUrl", "environment"]), i = t || pu(e), a = r, s = Object.keys(a).filter(function(c) {
7326
7457
  return typeof a[c] != "undefined" && a[c] !== null && a[c] !== "";
7327
7458
  }).reduce(function(c, d) {
7328
7459
  var u = a[d].toString();
7329
- return d = iu(d), d.substring(0, 4) === "data" || d === "crossorigin" ? c.attributes[d] = u : c.queryParams[d] = u, c;
7460
+ return d = du(d), d.substring(0, 4) === "data" || d === "crossorigin" ? c.attributes[d] = u : c.queryParams[d] = u, c;
7330
7461
  }, {
7331
7462
  queryParams: {},
7332
7463
  attributes: {}
7333
7464
  }), o = s.queryParams, l = s.attributes;
7334
7465
  return o["merchant-id"] && o["merchant-id"].indexOf(",") !== -1 && (l["data-merchant-id"] = o["merchant-id"], o["merchant-id"] = "*"), {
7335
- url: "".concat(i, "?").concat(au(o)),
7466
+ url: "".concat(i, "?").concat(uu(o)),
7336
7467
  attributes: l
7337
7468
  };
7338
7469
  }
7339
- function iu(n) {
7470
+ function du(n) {
7340
7471
  var t = function(e, r) {
7341
7472
  return (r ? "-" : "") + e.toLowerCase();
7342
7473
  };
7343
7474
  return n.replace(/[A-Z]+(?![a-z])|[A-Z]/g, t);
7344
7475
  }
7345
- function au(n) {
7476
+ function uu(n) {
7346
7477
  var t = "";
7347
7478
  return Object.keys(n).forEach(function(e) {
7348
7479
  t.length !== 0 && (t += "&"), t += e + "=" + n[e];
7349
7480
  }), t;
7350
7481
  }
7351
- function su(n) {
7482
+ function pu(n) {
7352
7483
  return n === "sandbox" ? "https://www.sandbox.paypal.com/sdk/js" : "https://www.paypal.com/sdk/js";
7353
7484
  }
7354
- function Ni(n, t) {
7485
+ function Pi(n, t) {
7355
7486
  t === void 0 && (t = {});
7356
7487
  var e = document.createElement("script");
7357
7488
  return e.src = n, Object.keys(t).forEach(function(r) {
7358
7489
  e.setAttribute(r, t[r]), r === "data-csp-nonce" && e.setAttribute("nonce", t["data-csp-nonce"]);
7359
7490
  }), e;
7360
7491
  }
7361
- function ou(n, t) {
7362
- if (t === void 0 && (t = Promise), Li(n, t), typeof document == "undefined")
7492
+ function hu(n, t) {
7493
+ if (t === void 0 && (t = Promise), Ri(n, t), typeof document == "undefined")
7363
7494
  return t.resolve(null);
7364
- var e = ru(n), r = e.url, i = e.attributes, a = i["data-namespace"] || "paypal", s = mr(a);
7365
- return i["data-js-sdk-library"] || (i["data-js-sdk-library"] = "paypal-js"), tu(r, i) && s ? t.resolve(s) : lu({
7495
+ var e = cu(n), r = e.url, i = e.attributes, a = i["data-namespace"] || "paypal", s = gr(a);
7496
+ return i["data-js-sdk-library"] || (i["data-js-sdk-library"] = "paypal-js"), ou(r, i) && s ? t.resolve(s) : mu({
7366
7497
  url: r,
7367
7498
  attributes: i
7368
7499
  }, t).then(function() {
7369
- var o = mr(a);
7500
+ var o = gr(a);
7370
7501
  if (o)
7371
7502
  return o;
7372
7503
  throw new Error("The window.".concat(a, " global variable is not available."));
7373
7504
  });
7374
7505
  }
7375
- function lu(n, t) {
7376
- t === void 0 && (t = Promise), Li(n, t);
7506
+ function mu(n, t) {
7507
+ t === void 0 && (t = Promise), Ri(n, t);
7377
7508
  var e = n.url, r = n.attributes;
7378
7509
  if (typeof e != "string" || e.length === 0)
7379
7510
  throw new Error("Invalid url.");
@@ -7382,7 +7513,7 @@ function lu(n, t) {
7382
7513
  return new t(function(i, a) {
7383
7514
  if (typeof document == "undefined")
7384
7515
  return i();
7385
- nu({
7516
+ lu({
7386
7517
  url: e,
7387
7518
  attributes: r,
7388
7519
  onSuccess: function() {
@@ -7395,10 +7526,10 @@ function lu(n, t) {
7395
7526
  });
7396
7527
  });
7397
7528
  }
7398
- function mr(n) {
7529
+ function gr(n) {
7399
7530
  return window[n];
7400
7531
  }
7401
- function Li(n, t) {
7532
+ function Ri(n, t) {
7402
7533
  if (typeof n != "object" || n === null)
7403
7534
  throw new Error("Expected an options object.");
7404
7535
  var e = n.environment;
@@ -7407,13 +7538,13 @@ function Li(n, t) {
7407
7538
  if (typeof t != "undefined" && typeof t != "function")
7408
7539
  throw new Error("Expected PromisePonyfill to be a function.");
7409
7540
  }
7410
- const cu = {
7541
+ const fu = {
7411
7542
  layout: "vertical",
7412
7543
  tagline: !1,
7413
7544
  height: 40,
7414
7545
  borderRadius: 12
7415
7546
  };
7416
- class du {
7547
+ class vu {
7417
7548
  constructor() {
7418
7549
  b(this, "paypal", null);
7419
7550
  }
@@ -7421,7 +7552,7 @@ class du {
7421
7552
  init(t) {
7422
7553
  return z(this, null, function* () {
7423
7554
  try {
7424
- this.paypal = yield ou(t);
7555
+ this.paypal = yield hu(t);
7425
7556
  } catch (e) {
7426
7557
  console.error("failed to load the PayPal JS SDK script", e);
7427
7558
  }
@@ -7432,8 +7563,8 @@ class du {
7432
7563
  return z(this, null, function* () {
7433
7564
  var r, i;
7434
7565
  if (this.paypal) {
7435
- const a = j(j({}, cu), (e == null ? void 0 : e.style) || {});
7436
- yield (i = (r = this.paypal).Buttons) == null ? void 0 : i.call(r, J(j({
7566
+ const a = j(j({}, fu), (e == null ? void 0 : e.style) || {});
7567
+ yield (i = (r = this.paypal).Buttons) == null ? void 0 : i.call(r, X(j({
7437
7568
  fundingSource: "paypal"
7438
7569
  }, e), {
7439
7570
  style: a
@@ -7445,9 +7576,9 @@ class du {
7445
7576
  function Ie(n) {
7446
7577
  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.');
7447
7578
  }
7448
- var Nt = { exports: {} }, fr;
7449
- function uu() {
7450
- return fr || (fr = 1, function(n, t) {
7579
+ var Lt = { exports: {} }, yr;
7580
+ function gu() {
7581
+ return yr || (yr = 1, function(n, t) {
7451
7582
  (function(e) {
7452
7583
  n.exports = e();
7453
7584
  })(function() {
@@ -7591,7 +7722,7 @@ function uu() {
7591
7722
  });
7592
7723
  }
7593
7724
  return new (A || (A = Promise))(function(L, G) {
7594
- function X(ne) {
7725
+ function J(ne) {
7595
7726
  try {
7596
7727
  D(P.next(ne));
7597
7728
  } catch (be) {
@@ -7606,7 +7737,7 @@ function uu() {
7606
7737
  }
7607
7738
  }
7608
7739
  function D(ne) {
7609
- ne.done ? L(ne.value) : V(ne.value).then(X, se);
7740
+ ne.done ? L(ne.value) : V(ne.value).then(J, se);
7610
7741
  }
7611
7742
  D((P = P.apply(_, [])).next());
7612
7743
  });
@@ -7616,10 +7747,10 @@ function uu() {
7616
7747
  if (L[0] & 1) throw L[1];
7617
7748
  return L[1];
7618
7749
  }, trys: [], ops: [] }, P, V, L, G;
7619
- return G = { next: X(0), throw: X(1), return: X(2) }, typeof Symbol == "function" && (G[Symbol.iterator] = function() {
7750
+ return G = { next: J(0), throw: J(1), return: J(2) }, typeof Symbol == "function" && (G[Symbol.iterator] = function() {
7620
7751
  return this;
7621
7752
  }), G;
7622
- function X(D) {
7753
+ function J(D) {
7623
7754
  return function(ne) {
7624
7755
  return se([D, ne]);
7625
7756
  };
@@ -7679,13 +7810,13 @@ function uu() {
7679
7810
  var P = document.createElement("script"), V = _.dataAttributes || {}, L = _.container || document.head;
7680
7811
  return P.src = _.src, P.id = _.id || "", P.async = !0, _.type && P.setAttribute("type", "".concat(_.type)), _.crossorigin && P.setAttribute("crossorigin", "".concat(_.crossorigin)), Object.keys(V).forEach(function(G) {
7681
7812
  P.setAttribute("data-".concat(G), "".concat(V[G]));
7682
- }), N = new Promise(function(G, X) {
7813
+ }), N = new Promise(function(G, J) {
7683
7814
  P.addEventListener("load", function() {
7684
7815
  G(P);
7685
7816
  }), P.addEventListener("error", function() {
7686
- X(new Error("".concat(_.src, " failed to load.")));
7817
+ J(new Error("".concat(_.src, " failed to load.")));
7687
7818
  }), P.addEventListener("abort", function() {
7688
- X(new Error("".concat(_.src, " has aborted.")));
7819
+ J(new Error("".concat(_.src, " has aborted.")));
7689
7820
  }), L.appendChild(P);
7690
7821
  }), c[A] = N, N;
7691
7822
  }
@@ -7725,7 +7856,7 @@ function uu() {
7725
7856
  var P, V;
7726
7857
  return A === void 0 && (A = !0), s(this, void 0, void 0, function() {
7727
7858
  var L, G;
7728
- return o(this, function(X) {
7859
+ return o(this, function(J) {
7729
7860
  if (L = W(), L && L[_.module]) {
7730
7861
  if (N && ((P = L[_.module]) === null || P === void 0 ? void 0 : P.VERSION) !== N)
7731
7862
  throw G = (V = L[_.module]) === null || V === void 0 ? void 0 : V.VERSION, new Error("".concat(_.module, " already loaded with version ").concat(G, " cannot load version ").concat(N));
@@ -7951,7 +8082,7 @@ function uu() {
7951
8082
  A.url = N + M.endpoint, A.sendAnalyticsEvent = function(V) {
7952
8083
  w.sendEvent(K, V);
7953
8084
  }, K._request(A, function(V, L, G) {
7954
- var X, se;
8085
+ var J, se;
7955
8086
  if (se = q(G, V), se) {
7956
8087
  k(se);
7957
8088
  return;
@@ -7966,10 +8097,10 @@ function uu() {
7966
8097
  );
7967
8098
  return;
7968
8099
  }
7969
- X = y({ _httpStatus: G }, L), P && X.creditCards && X.creditCards.length > 0 && (K._findOrCreateFraudnetJSON(X.creditCards[0].nonce), R.loadScript({
8100
+ J = y({ _httpStatus: G }, L), P && J.creditCards && J.creditCards.length > 0 && (K._findOrCreateFraudnetJSON(J.creditCards[0].nonce), R.loadScript({
7970
8101
  src: W,
7971
8102
  forceScriptReload: !0
7972
- })), E(X);
8103
+ })), E(J);
7973
8104
  });
7974
8105
  });
7975
8106
  if (typeof Y == "function") {
@@ -9118,13 +9249,13 @@ function uu() {
9118
9249
  };
9119
9250
  }, {}] }, {}, [13])(13);
9120
9251
  });
9121
- }(Nt)), Nt.exports;
9252
+ }(Lt)), Lt.exports;
9122
9253
  }
9123
- var pu = uu();
9124
- const hu = /* @__PURE__ */ wi(pu);
9125
- var Lt = { exports: {} }, vr;
9126
- function mu() {
9127
- return vr || (vr = 1, function(n, t) {
9254
+ var yu = gu();
9255
+ const bu = /* @__PURE__ */ Oi(yu);
9256
+ var xt = { exports: {} }, br;
9257
+ function Eu() {
9258
+ return br || (br = 1, function(n, t) {
9128
9259
  (function(e) {
9129
9260
  n.exports = e();
9130
9261
  })(function() {
@@ -9488,7 +9619,7 @@ function mu() {
9488
9619
  });
9489
9620
  }
9490
9621
  return new (A || (A = Promise))(function(L, G) {
9491
- function X(ne) {
9622
+ function J(ne) {
9492
9623
  try {
9493
9624
  D(P.next(ne));
9494
9625
  } catch (be) {
@@ -9503,7 +9634,7 @@ function mu() {
9503
9634
  }
9504
9635
  }
9505
9636
  function D(ne) {
9506
- ne.done ? L(ne.value) : V(ne.value).then(X, se);
9637
+ ne.done ? L(ne.value) : V(ne.value).then(J, se);
9507
9638
  }
9508
9639
  D((P = P.apply(_, [])).next());
9509
9640
  });
@@ -9513,10 +9644,10 @@ function mu() {
9513
9644
  if (L[0] & 1) throw L[1];
9514
9645
  return L[1];
9515
9646
  }, trys: [], ops: [] }, P, V, L, G;
9516
- return G = { next: X(0), throw: X(1), return: X(2) }, typeof Symbol == "function" && (G[Symbol.iterator] = function() {
9647
+ return G = { next: J(0), throw: J(1), return: J(2) }, typeof Symbol == "function" && (G[Symbol.iterator] = function() {
9517
9648
  return this;
9518
9649
  }), G;
9519
- function X(D) {
9650
+ function J(D) {
9520
9651
  return function(ne) {
9521
9652
  return se([D, ne]);
9522
9653
  };
@@ -9576,13 +9707,13 @@ function mu() {
9576
9707
  var P = document.createElement("script"), V = _.dataAttributes || {}, L = _.container || document.head;
9577
9708
  return P.src = _.src, P.id = _.id || "", P.async = !0, _.type && P.setAttribute("type", "".concat(_.type)), _.crossorigin && P.setAttribute("crossorigin", "".concat(_.crossorigin)), Object.keys(V).forEach(function(G) {
9578
9709
  P.setAttribute("data-".concat(G), "".concat(V[G]));
9579
- }), N = new Promise(function(G, X) {
9710
+ }), N = new Promise(function(G, J) {
9580
9711
  P.addEventListener("load", function() {
9581
9712
  G(P);
9582
9713
  }), P.addEventListener("error", function() {
9583
- X(new Error("".concat(_.src, " failed to load.")));
9714
+ J(new Error("".concat(_.src, " failed to load.")));
9584
9715
  }), P.addEventListener("abort", function() {
9585
- X(new Error("".concat(_.src, " has aborted.")));
9716
+ J(new Error("".concat(_.src, " has aborted.")));
9586
9717
  }), L.appendChild(P);
9587
9718
  }), c[A] = N, N;
9588
9719
  }
@@ -9622,7 +9753,7 @@ function mu() {
9622
9753
  var P, V;
9623
9754
  return A === void 0 && (A = !0), s(this, void 0, void 0, function() {
9624
9755
  var L, G;
9625
- return o(this, function(X) {
9756
+ return o(this, function(J) {
9626
9757
  if (L = W(), L && L[_.module]) {
9627
9758
  if (N && ((P = L[_.module]) === null || P === void 0 ? void 0 : P.VERSION) !== N)
9628
9759
  throw G = (V = L[_.module]) === null || V === void 0 ? void 0 : V.VERSION, new Error("".concat(_.module, " already loaded with version ").concat(G, " cannot load version ").concat(N));
@@ -11532,10 +11663,10 @@ function mu() {
11532
11663
  });
11533
11664
  }
11534
11665
  return B.then(function(L) {
11535
- var G = new Date(L.expiresAt) - new Date(L.createdAt), X = G * 0.6666;
11666
+ var G = new Date(L.expiresAt) - new Date(L.createdAt), J = G * 0.6666;
11536
11667
  clearTimeout(k._refreshPaymentContextTimeout), k._refreshPaymentContextTimeout = setTimeout(function() {
11537
11668
  k._tokenizationInProgress || k._createVenmoPaymentContext(g, !0);
11538
- }, X), !(E && k._tokenizationInProgress) && (k._venmoPaymentContextStatus = L.status, k._venmoPaymentContextId = L.id);
11669
+ }, J), !(E && k._tokenizationInProgress) && (k._venmoPaymentContextStatus = L.status, k._venmoPaymentContextId = L.id);
11539
11670
  });
11540
11671
  }, S.prototype._popupBridgeIsInstalled = function() {
11541
11672
  return window.popupBridge && typeof window.popupBridge.open == "function";
@@ -12014,11 +12145,11 @@ function mu() {
12014
12145
  r.exports = f.wrapPrototype(S);
12015
12146
  }, { "../lib/analytics": 55, "../lib/assign": 57, "../lib/braintree-error": 59, "../lib/convert-methods-to-error": 61, "../lib/in-iframe": 78, "../lib/is-verified-domain": 79, "../lib/methods": 81, "../lib/querystring": 82, "../lib/snake-case-to-camel-case": 83, "../lib/url-params": 84, "./external/": 87, "./external/queries": 88, "./shared/browser-detection": 91, "./shared/constants": 92, "./shared/errors": 93, "./shared/get-venmo-url": 95, "./shared/supports-venmo": 96, "./shared/web-login-backdrop": 97, "@braintree/extended-promise": 26, "@braintree/wrap-promise": 35 }] }, {}, [90])(90);
12016
12147
  });
12017
- }(Lt)), Lt.exports;
12148
+ }(xt)), xt.exports;
12018
12149
  }
12019
- var fu = mu();
12020
- const vu = /* @__PURE__ */ wi(fu);
12021
- class gu {
12150
+ var _u = Eu();
12151
+ const Cu = /* @__PURE__ */ Oi(_u);
12152
+ class Au {
12022
12153
  constructor() {
12023
12154
  b(this, "client", null);
12024
12155
  b(this, "venmoInstance", null);
@@ -12027,7 +12158,7 @@ class gu {
12027
12158
  init(t) {
12028
12159
  return z(this, null, function* () {
12029
12160
  try {
12030
- this.client = yield hu.create({ authorization: t.authorization });
12161
+ this.client = yield bu.create({ authorization: t.authorization });
12031
12162
  } catch (e) {
12032
12163
  throw console.error("Failed to initialize Braintree client:", e), e;
12033
12164
  }
@@ -12039,7 +12170,7 @@ class gu {
12039
12170
  if (!this.client)
12040
12171
  throw new Error("Braintree client must be initialized before creating Venmo instance");
12041
12172
  try {
12042
- return this.venmoInstance = yield vu.create(j({
12173
+ return this.venmoInstance = yield Cu.create(j({
12043
12174
  client: this.client,
12044
12175
  allowDesktop: !0,
12045
12176
  mobileWebFallBack: !0,
@@ -12074,18 +12205,18 @@ class gu {
12074
12205
  });
12075
12206
  }
12076
12207
  }
12077
- class yu {
12208
+ class wu {
12078
12209
  constructor() {
12079
- b(this, "ev", new Fi());
12080
- b(this, "paypal", new du());
12081
- b(this, "braintree", new gu());
12210
+ b(this, "ev", new ji());
12211
+ b(this, "paypal", new vu());
12212
+ b(this, "braintree", new Au());
12082
12213
  b(this, "state", {
12083
- translate: new Jd(),
12084
- checkout: new md(),
12085
- transaction: new gd(),
12086
- styles: new vd()
12214
+ translate: new au(),
12215
+ checkout: new yd(),
12216
+ transaction: new _d(),
12217
+ styles: new Ed()
12087
12218
  });
12088
- b(this, "checkout", new pd({
12219
+ b(this, "checkout", new vd({
12089
12220
  state: this.state,
12090
12221
  service: { ev: this.ev, paypal: this.paypal, braintree: this.braintree }
12091
12222
  }));
@@ -12094,10 +12225,10 @@ class yu {
12094
12225
  Object.values(this.state).forEach((t) => t.clearState());
12095
12226
  }
12096
12227
  }
12097
- class Cu {
12228
+ class Nu {
12098
12229
  constructor(t) {
12099
12230
  b(this, "parent");
12100
- b(this, "core", new yu());
12231
+ b(this, "core", new wu());
12101
12232
  this.parent = t;
12102
12233
  }
12103
12234
  mount(t) {
@@ -12113,7 +12244,7 @@ class Cu {
12113
12244
  }
12114
12245
  }
12115
12246
  export {
12116
- yu as Core,
12117
- Cu as PayNextCheckout
12247
+ wu as Core,
12248
+ Nu as PayNextCheckout
12118
12249
  };
12119
12250
  //# sourceMappingURL=index.es.js.map