@paynext/sdk 0.0.41 → 0.0.43

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,22 +1,22 @@
1
- var ks = Object.defineProperty, Es = Object.defineProperties;
2
- var Ls = Object.getOwnPropertyDescriptors;
3
- var ht = Object.getOwnPropertySymbols;
4
- var wr = Object.prototype.hasOwnProperty, kr = Object.prototype.propertyIsEnumerable;
5
- var Lt = (t, e, n) => e in t ? ks(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, L = (t, e) => {
1
+ var Es = Object.defineProperty, Ls = Object.defineProperties;
2
+ var Ts = Object.getOwnPropertyDescriptors;
3
+ var pt = Object.getOwnPropertySymbols;
4
+ var kr = Object.prototype.hasOwnProperty, Er = Object.prototype.propertyIsEnumerable;
5
+ var Lt = (t, e, n) => e in t ? Es(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, L = (t, e) => {
6
6
  for (var n in e || (e = {}))
7
- wr.call(e, n) && Lt(t, n, e[n]);
8
- if (ht)
9
- for (var n of ht(e))
10
- kr.call(e, n) && Lt(t, n, e[n]);
7
+ kr.call(e, n) && Lt(t, n, e[n]);
8
+ if (pt)
9
+ for (var n of pt(e))
10
+ Er.call(e, n) && Lt(t, n, e[n]);
11
11
  return t;
12
- }, M = (t, e) => Es(t, Ls(e));
12
+ }, M = (t, e) => Ls(t, Ts(e));
13
13
  var te = (t, e) => {
14
14
  var n = {};
15
15
  for (var r in t)
16
- wr.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
17
- if (t != null && ht)
18
- for (var r of ht(t))
19
- e.indexOf(r) < 0 && kr.call(t, r) && (n[r] = t[r]);
16
+ kr.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
17
+ if (t != null && pt)
18
+ for (var r of pt(t))
19
+ e.indexOf(r) < 0 && Er.call(t, r) && (n[r] = t[r]);
20
20
  return n;
21
21
  };
22
22
  var l = (t, e, n) => Lt(t, typeof e != "symbol" ? e + "" : e, n);
@@ -36,42 +36,42 @@ var v = (t, e, n) => new Promise((r, i) => {
36
36
  }, o = (c) => c.done ? r(c.value) : Promise.resolve(c.value).then(s, a);
37
37
  o((n = n.apply(t, e)).next());
38
38
  });
39
- let pt = null;
40
- function Ts() {
39
+ let ht = null;
40
+ function As() {
41
41
  return v(this, null, function* () {
42
- return pt || (pt = new Promise((t, e) => {
42
+ return ht || (ht = new Promise((t, e) => {
43
43
  const n = document.createElement("script");
44
44
  if (n.src = "https://js.evervault.com/v2", n.onload = () => t(), n.onerror = () => {
45
- pt = null, e();
45
+ ht = null, e();
46
46
  }, !document.head)
47
47
  throw new Error(
48
48
  "Expected document.head not to be null. Evervault.js requires a <head> element."
49
49
  );
50
50
  document.head.appendChild(n);
51
- }), pt);
51
+ }), ht);
52
52
  });
53
53
  }
54
- function di() {
54
+ function ui() {
55
55
  return v(this, null, function* () {
56
56
  if (window.Evervault)
57
57
  return window.Evervault;
58
58
  try {
59
- return yield Ts(), window.Evervault;
59
+ return yield As(), window.Evervault;
60
60
  } catch (t) {
61
61
  throw new Error("Failed to load Evervault.js");
62
62
  }
63
63
  });
64
64
  }
65
- function As(t, e, n) {
65
+ function Vs(t, e, n) {
66
66
  return v(this, null, function* () {
67
- const r = yield di();
67
+ const r = yield ui();
68
68
  return new r(t, e, n);
69
69
  });
70
70
  }
71
71
  Promise.resolve().then(() => {
72
- di();
72
+ ui();
73
73
  });
74
- let Vs = class {
74
+ let Is = class {
75
75
  constructor(e) {
76
76
  l(this, "apple", null);
77
77
  l(this, "isAvailable", !1);
@@ -91,11 +91,11 @@ let Vs = class {
91
91
  allowedCardNetworks: r,
92
92
  requestBillingAddress: !0,
93
93
  requestPayerDetails: ["name", "email", "phone"],
94
- process: (f, p) => v(this, [f, p], function* (h, { fail: m }) {
94
+ process: (f, m) => v(this, [f, m], function* (p, { fail: h }) {
95
95
  try {
96
- a == null || a(h);
96
+ a == null || a(p);
97
97
  } catch (g) {
98
- console.error(g), m({
98
+ console.error(g), h({
99
99
  message: "Cannot pay with payment credentials"
100
100
  });
101
101
  }
@@ -111,7 +111,7 @@ let Vs = class {
111
111
  !this.apple || !this.isAvailable || (e.innerHTML = "", yield this.apple.mount(e), (n = this.onReady) == null || n.call(this));
112
112
  });
113
113
  }
114
- }, Is = class {
114
+ }, Ss = class {
115
115
  constructor(e) {
116
116
  l(this, "google", null);
117
117
  this.ev = e;
@@ -129,7 +129,7 @@ let Vs = class {
129
129
  billingAddress: {
130
130
  phoneNumber: !0
131
131
  },
132
- process: (h, m) => v(this, [h, m], function* (u, { fail: d }) {
132
+ process: (p, h) => v(this, [p, h], function* (u, { fail: d }) {
133
133
  try {
134
134
  s == null || s(u);
135
135
  } catch (f) {
@@ -165,7 +165,7 @@ class $ {
165
165
  this.listeners = [];
166
166
  }
167
167
  }
168
- class Ss {
168
+ class Ms {
169
169
  constructor(e) {
170
170
  l(this, "threeDs", null);
171
171
  this.ev = e;
@@ -181,7 +181,7 @@ class Ss {
181
181
  });
182
182
  }
183
183
  }
184
- class Ms {
184
+ class _s {
185
185
  constructor() {
186
186
  l(this, "isReady", !1);
187
187
  l(this, "ev", null);
@@ -200,14 +200,14 @@ class Ms {
200
200
  // init ev
201
201
  initEv(e) {
202
202
  return v(this, null, function* () {
203
- this.isShouldLoad(e) && (this.isReady = !1, this.ev = yield As(e.teamId, e.appId), this.apple = new Vs(this.ev), this.google = new Is(this.ev), this.events.ready.emit(), this.isReady = !0);
203
+ this.isShouldLoad(e) && (this.isReady = !1, this.ev = yield Vs(e.teamId, e.appId), this.apple = new Is(this.ev), this.google = new Ss(this.ev), this.events.ready.emit(), this.isReady = !0);
204
204
  });
205
205
  }
206
206
  // init three ds
207
207
  initThreeDs(e) {
208
208
  return v(this, null, function* () {
209
209
  if (!this.ev) throw new Error("Evervault should be init before using Three DS Secure");
210
- this.threeDs = new Ss(this.ev), yield this.threeDs.init(e), yield this.threeDs.render();
210
+ this.threeDs = new Ms(this.ev), yield this.threeDs.init(e), yield this.threeDs.render();
211
211
  });
212
212
  }
213
213
  // init apple
@@ -257,7 +257,7 @@ class Ms {
257
257
  function Jt(t) {
258
258
  return typeof t == "object" && !Array.isArray(t);
259
259
  }
260
- function _s(t, e, n) {
260
+ function Ps(t, e, n) {
261
261
  var r;
262
262
  if (t instanceof EventTarget)
263
263
  return [t];
@@ -268,66 +268,66 @@ function _s(t, e, n) {
268
268
  }
269
269
  return Array.from(t);
270
270
  }
271
- function ui(t, e, n, r) {
272
- return typeof t == "string" && Jt(e) ? _s(t, n, r) : t instanceof NodeList ? Array.from(t) : Array.isArray(t) ? t : [t];
271
+ function pi(t, e, n, r) {
272
+ return typeof t == "string" && Jt(e) ? Ps(t, n, r) : t instanceof NodeList ? Array.from(t) : Array.isArray(t) ? t : [t];
273
273
  }
274
- function Ps(t, e, n) {
274
+ function Ds(t, e, n) {
275
275
  return t * (e + 1);
276
276
  }
277
- function Er(t, e, n, r) {
277
+ function Lr(t, e, n, r) {
278
278
  var i;
279
279
  return typeof e == "number" ? e : e.startsWith("-") || e.startsWith("+") ? Math.max(0, t + parseFloat(e)) : e === "<" ? n : (i = r.get(e)) != null ? i : t;
280
280
  }
281
- const lt = (t, e, n) => t + (e - t) * n, Ds = (t, e, n) => {
281
+ const lt = (t, e, n) => t + (e - t) * n, Ns = (t, e, n) => {
282
282
  const r = e - t;
283
283
  return ((n - t) % r + r) % r + t;
284
284
  }, hi = (t) => Array.isArray(t) && typeof t[0] != "number";
285
- function pi(t, e) {
286
- return hi(t) ? t[Ds(0, t.length, e)] : t;
285
+ function mi(t, e) {
286
+ return hi(t) ? t[Ns(0, t.length, e)] : t;
287
287
  }
288
- function Ns(t, e) {
288
+ function Rs(t, e) {
289
289
  t.indexOf(e) === -1 && t.push(e);
290
290
  }
291
- function mi(t, e) {
291
+ function fi(t, e) {
292
292
  const n = t.indexOf(e);
293
293
  n > -1 && t.splice(n, 1);
294
294
  }
295
- function Rs(t, e, n) {
295
+ function Os(t, e, n) {
296
296
  for (let r = 0; r < t.length; r++) {
297
297
  const i = t[r];
298
- i.at > e && i.at < n && (mi(t, i), r--);
298
+ i.at > e && i.at < n && (fi(t, i), r--);
299
299
  }
300
300
  }
301
- function Os(t, e, n, r, i, s) {
302
- Rs(t, i, s);
301
+ function js(t, e, n, r, i, s) {
302
+ Os(t, i, s);
303
303
  for (let a = 0; a < e.length; a++)
304
304
  t.push({
305
305
  value: e[a],
306
306
  at: lt(i, s, r[a]),
307
- easing: pi(n, a)
307
+ easing: mi(n, a)
308
308
  });
309
309
  }
310
- function js(t, e) {
310
+ function qs(t, e) {
311
311
  for (let n = 0; n < t.length; n++)
312
312
  t[n] = t[n] / (e + 1);
313
313
  }
314
- function qs(t, e) {
314
+ function Ks(t, e) {
315
315
  return t.at === e.at ? t.value === null ? 1 : e.value === null ? -1 : 0 : t.at - e.at;
316
316
  }
317
317
  const H = (t) => !!(t && t.getVelocity), Xt = /* @__NO_SIDE_EFFECTS__ */ (t, e, n) => {
318
318
  const r = e - t;
319
319
  return r === 0 ? 1 : (n - t) / r;
320
320
  };
321
- function fi(t, e) {
321
+ function gi(t, e) {
322
322
  const n = t[t.length - 1];
323
323
  for (let r = 1; r <= e; r++) {
324
324
  const i = /* @__PURE__ */ Xt(0, e, r);
325
325
  t.push(lt(n, 1, i));
326
326
  }
327
327
  }
328
- function gi(t) {
328
+ function yi(t) {
329
329
  const e = [0];
330
- return fi(e, t.length - 1), e;
330
+ return gi(e, t.length - 1), e;
331
331
  }
332
332
  function Qt(t) {
333
333
  return typeof t == "function" && "applyToOptions" in t;
@@ -342,7 +342,7 @@ function en(t) {
342
342
  return e >= Ct ? 1 / 0 : e;
343
343
  }
344
344
  const ne = /* @__NO_SIDE_EFFECTS__ */ (t) => t * 1e3, le = /* @__NO_SIDE_EFFECTS__ */ (t) => t / 1e3;
345
- function yi(t, e = 100, n) {
345
+ function vi(t, e = 100, n) {
346
346
  const r = n(M(L({}, t), { keyframes: [0, e] })), i = Math.min(en(r), Ct);
347
347
  return {
348
348
  type: "keyframes",
@@ -359,126 +359,126 @@ process.env.NODE_ENV !== "production" && (ct = (t, e) => {
359
359
  if (!t)
360
360
  throw new Error(e);
361
361
  });
362
- const Ks = "easeInOut", Bs = 20;
363
- function Fs(t, s = {}, r, i) {
362
+ const Bs = "easeInOut", Fs = 20;
363
+ function zs(t, s = {}, r, i) {
364
364
  var a = s, { defaultTransition: e = {} } = a, n = te(a, ["defaultTransition"]);
365
- const o = e.duration || 0.3, c = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map(), d = {}, h = /* @__PURE__ */ new Map();
366
- let m = 0, f = 0, p = 0;
365
+ const o = e.duration || 0.3, c = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map(), d = {}, p = /* @__PURE__ */ new Map();
366
+ let h = 0, f = 0, m = 0;
367
367
  for (let g = 0; g < t.length; g++) {
368
368
  const y = t[g];
369
369
  if (typeof y == "string") {
370
- h.set(y, f);
370
+ p.set(y, f);
371
371
  continue;
372
372
  } else if (!Array.isArray(y)) {
373
- h.set(y.name, Er(f, y.at, m, h));
373
+ p.set(y.name, Lr(f, y.at, h, p));
374
374
  continue;
375
375
  }
376
376
  let [b, A, k = {}] = y;
377
- k.at !== void 0 && (f = Er(f, k.at, m, h));
377
+ k.at !== void 0 && (f = Lr(f, k.at, h, p));
378
378
  let V = 0;
379
379
  const C = (I, S, x, P = 0, R = 0) => {
380
- const N = zs(I), ve = S, { delay: ae = 0, times: G = gi(N), type: oe = "keyframes", repeat: J, repeatType: Te, repeatDelay: Ae = 0 } = ve, Ce = te(ve, ["delay", "times", "type", "repeat", "repeatType", "repeatDelay"]);
380
+ const N = $s(I), ve = S, { delay: ae = 0, times: G = yi(N), type: oe = "keyframes", repeat: J, repeatType: Te, repeatDelay: Ae = 0 } = ve, Ce = te(ve, ["delay", "times", "type", "repeat", "repeatType", "repeatDelay"]);
381
381
  let { ease: Z = e.ease || "easeOut", duration: K } = S;
382
- const he = typeof ae == "function" ? ae(P, R) : ae, pe = N.length, me = Qt(oe) ? oe : i == null ? void 0 : i[oe];
383
- if (pe <= 2 && me) {
382
+ const pe = typeof ae == "function" ? ae(P, R) : ae, he = N.length, me = Qt(oe) ? oe : i == null ? void 0 : i[oe];
383
+ if (he <= 2 && me) {
384
384
  let X = 100;
385
- if (pe === 2 && Us(N)) {
385
+ if (he === 2 && Hs(N)) {
386
386
  const Q = N[1] - N[0];
387
387
  X = Math.abs(Q);
388
388
  }
389
389
  const re = L({}, Ce);
390
390
  K !== void 0 && (re.duration = /* @__PURE__ */ ne(K));
391
- const ie = yi(re, X, me);
391
+ const ie = vi(re, X, me);
392
392
  Z = ie.ease, K = ie.duration;
393
393
  }
394
394
  K != null || (K = o);
395
- const fe = f + he;
395
+ const fe = f + pe;
396
396
  G.length === 1 && G[0] === 0 && (G[1] = 1);
397
397
  const ge = G.length - N.length;
398
- if (ge > 0 && fi(G, ge), N.length === 1 && N.unshift(null), J) {
399
- ce(J < Bs, "Repeat count too high, must be less than 20"), K = Ps(K, J);
398
+ if (ge > 0 && gi(G, ge), N.length === 1 && N.unshift(null), J) {
399
+ ce(J < Fs, "Repeat count too high, must be less than 20"), K = Ds(K, J);
400
400
  const X = [...N], re = [...G];
401
401
  Z = Array.isArray(Z) ? [...Z] : [Z];
402
402
  const ie = [...Z];
403
403
  for (let Q = 0; Q < J; Q++) {
404
404
  N.push(...X);
405
405
  for (let ee = 0; ee < X.length; ee++)
406
- G.push(re[ee] + (Q + 1)), Z.push(ee === 0 ? "linear" : pi(ie, ee - 1));
406
+ G.push(re[ee] + (Q + 1)), Z.push(ee === 0 ? "linear" : mi(ie, ee - 1));
407
407
  }
408
- js(G, J);
408
+ qs(G, J);
409
409
  }
410
410
  const ye = fe + K;
411
- Os(x, N, Z, G, fe, ye), V = Math.max(he + K, V), p = Math.max(ye, p);
411
+ js(x, N, Z, G, fe, ye), V = Math.max(pe + K, V), m = Math.max(ye, m);
412
412
  };
413
413
  if (H(b)) {
414
- const I = Lr(b, u);
415
- C(A, k, Tr("default", I));
414
+ const I = Tr(b, u);
415
+ C(A, k, Ar("default", I));
416
416
  } else {
417
- const I = ui(b, A, r, d), S = I.length;
417
+ const I = pi(b, A, r, d), S = I.length;
418
418
  for (let x = 0; x < S; x++) {
419
419
  A = A, k = k;
420
- const P = I[x], R = Lr(P, u);
420
+ const P = I[x], R = Tr(P, u);
421
421
  for (const N in A)
422
- C(A[N], $s(k, N), Tr(N, R), x, S);
422
+ C(A[N], Gs(k, N), Ar(N, R), x, S);
423
423
  }
424
424
  }
425
- m = f, f += V;
425
+ h = f, f += V;
426
426
  }
427
427
  return u.forEach((g, y) => {
428
428
  for (const b in g) {
429
429
  const A = g[b];
430
- A.sort(qs);
430
+ A.sort(Ks);
431
431
  const k = [], V = [], C = [];
432
432
  for (let S = 0; S < A.length; S++) {
433
433
  const { at: x, value: P, easing: R } = A[S];
434
- k.push(P), V.push(/* @__PURE__ */ Xt(0, p, x)), C.push(R || "easeOut");
434
+ k.push(P), V.push(/* @__PURE__ */ Xt(0, m, x)), C.push(R || "easeOut");
435
435
  }
436
- V[0] !== 0 && (V.unshift(0), k.unshift(k[0]), C.unshift(Ks)), V[V.length - 1] !== 1 && (V.push(1), k.push(null)), c.has(y) || c.set(y, {
436
+ V[0] !== 0 && (V.unshift(0), k.unshift(k[0]), C.unshift(Bs)), V[V.length - 1] !== 1 && (V.push(1), k.push(null)), c.has(y) || c.set(y, {
437
437
  keyframes: {},
438
438
  transition: {}
439
439
  });
440
440
  const I = c.get(y);
441
441
  I.keyframes[b] = k, I.transition[b] = L(M(L({}, e), {
442
- duration: p,
442
+ duration: m,
443
443
  ease: C,
444
444
  times: V
445
445
  }), n);
446
446
  }
447
447
  }), c;
448
448
  }
449
- function Lr(t, e) {
449
+ function Tr(t, e) {
450
450
  return !e.has(t) && e.set(t, {}), e.get(t);
451
451
  }
452
- function Tr(t, e) {
452
+ function Ar(t, e) {
453
453
  return e[t] || (e[t] = []), e[t];
454
454
  }
455
- function zs(t) {
455
+ function $s(t) {
456
456
  return Array.isArray(t) ? t : [t];
457
457
  }
458
- function $s(t, e) {
458
+ function Gs(t, e) {
459
459
  return t && t[e] ? L(L({}, t), t[e]) : L({}, t);
460
460
  }
461
- const Gs = (t) => typeof t == "number", Us = (t) => t.every(Gs), rt = /* @__PURE__ */ new WeakMap(), Hs = (t) => Array.isArray(t);
462
- function Ar(t) {
461
+ const Us = (t) => typeof t == "number", Hs = (t) => t.every(Us), rt = /* @__PURE__ */ new WeakMap(), Zs = (t) => Array.isArray(t);
462
+ function Vr(t) {
463
463
  const e = [{}, {}];
464
464
  return t == null || t.values.forEach((n, r) => {
465
465
  e[0][r] = n.get(), e[1][r] = n.getVelocity();
466
466
  }), e;
467
467
  }
468
- function vi(t, e, n, r) {
468
+ function bi(t, e, n, r) {
469
469
  if (typeof e == "function") {
470
- const [i, s] = Ar(r);
470
+ const [i, s] = Vr(r);
471
471
  e = e(n !== void 0 ? n : t.custom, i, s);
472
472
  }
473
473
  if (typeof e == "string" && (e = t.variants && t.variants[e]), typeof e == "function") {
474
- const [i, s] = Ar(r);
474
+ const [i, s] = Vr(r);
475
475
  e = e(n !== void 0 ? n : t.custom, i, s);
476
476
  }
477
477
  return e;
478
478
  }
479
- function Zs(t, e, n) {
479
+ function Ys(t, e, n) {
480
480
  const r = t.getProps();
481
- return vi(r, e, r.custom, t);
481
+ return bi(r, e, r.custom, t);
482
482
  }
483
483
  const mt = [
484
484
  "setup",
@@ -498,7 +498,7 @@ const mt = [
498
498
  "postRender"
499
499
  // Compute
500
500
  ];
501
- function Ys(t, e) {
501
+ function Ws(t, e) {
502
502
  let n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = !1, s = !1;
503
503
  const a = /* @__PURE__ */ new WeakSet();
504
504
  let o = {
@@ -513,9 +513,9 @@ function Ys(t, e) {
513
513
  /**
514
514
  * Schedule a process to run on the next frame.
515
515
  */
516
- schedule: (d, h = !1, m = !1) => {
517
- const p = m && i ? n : r;
518
- return h && a.add(d), p.has(d) || p.add(d), d;
516
+ schedule: (d, p = !1, h = !1) => {
517
+ const m = h && i ? n : r;
518
+ return p && a.add(d), m.has(d) || m.add(d), d;
519
519
  },
520
520
  /**
521
521
  * Cancel the provided callback from running on the next frame.
@@ -536,16 +536,16 @@ function Ys(t, e) {
536
536
  };
537
537
  return u;
538
538
  }
539
- const de = {}, Ws = 40;
540
- function Js(t, e) {
539
+ const de = {}, Js = 40;
540
+ function Xs(t, e) {
541
541
  let n = !1, r = !0;
542
542
  const i = {
543
543
  delta: 0,
544
544
  timestamp: 0,
545
545
  isProcessing: !1
546
- }, s = () => n = !0, a = mt.reduce((k, V) => (k[V] = Ys(s), k), {}), { setup: o, read: c, resolveKeyframes: u, preUpdate: d, update: h, preRender: m, render: f, postRender: p } = a, g = () => {
546
+ }, s = () => n = !0, a = mt.reduce((k, V) => (k[V] = Ws(s), k), {}), { setup: o, read: c, resolveKeyframes: u, preUpdate: d, update: p, preRender: h, render: f, postRender: m } = a, g = () => {
547
547
  const k = de.useManualTiming ? i.timestamp : performance.now();
548
- n = !1, de.useManualTiming || (i.delta = r ? 1e3 / 60 : Math.max(Math.min(k - i.timestamp, Ws), 1)), i.timestamp = k, i.isProcessing = !0, o.process(i), c.process(i), u.process(i), d.process(i), h.process(i), m.process(i), f.process(i), p.process(i), i.isProcessing = !1, n && e && (r = !1, t(g));
548
+ n = !1, de.useManualTiming || (i.delta = r ? 1e3 / 60 : Math.max(Math.min(k - i.timestamp, Js), 1)), i.timestamp = k, i.isProcessing = !0, o.process(i), c.process(i), u.process(i), d.process(i), p.process(i), h.process(i), f.process(i), m.process(i), i.isProcessing = !1, n && e && (r = !1, t(g));
549
549
  }, y = () => {
550
550
  n = !0, r = !0, i.isProcessing || t(g);
551
551
  };
@@ -557,26 +557,26 @@ function Js(t, e) {
557
557
  a[mt[V]].cancel(k);
558
558
  }, state: i, steps: a };
559
559
  }
560
- const Pe = /* @__NO_SIDE_EFFECTS__ */ (t) => t, { schedule: ue, cancel: Dt, state: xt } = /* @__PURE__ */ Js(typeof requestAnimationFrame != "undefined" ? requestAnimationFrame : Pe, !0);
560
+ const Pe = /* @__NO_SIDE_EFFECTS__ */ (t) => t, { schedule: ue, cancel: Dt, state: xt } = /* @__PURE__ */ Xs(typeof requestAnimationFrame != "undefined" ? requestAnimationFrame : Pe, !0);
561
561
  let bt;
562
- function Xs() {
562
+ function Qs() {
563
563
  bt = void 0;
564
564
  }
565
565
  const W = {
566
566
  now: () => (bt === void 0 && W.set(xt.isProcessing || de.useManualTiming ? xt.timestamp : performance.now()), bt),
567
567
  set: (t) => {
568
- bt = t, queueMicrotask(Xs);
568
+ bt = t, queueMicrotask(Qs);
569
569
  }
570
- }, Vr = /* @__PURE__ */ new Set();
571
- function bi(t, e, n) {
572
- t || Vr.has(e) || (console.warn(e), Vr.add(e));
570
+ }, Ir = /* @__PURE__ */ new Set();
571
+ function Ci(t, e, n) {
572
+ t || Ir.has(e) || (console.warn(e), Ir.add(e));
573
573
  }
574
- class Ci {
574
+ class xi {
575
575
  constructor() {
576
576
  this.subscriptions = [];
577
577
  }
578
578
  add(e) {
579
- return Ns(this.subscriptions, e), () => mi(this.subscriptions, e);
579
+ return Rs(this.subscriptions, e), () => fi(this.subscriptions, e);
580
580
  }
581
581
  notify(e, n, r) {
582
582
  const i = this.subscriptions.length;
@@ -596,11 +596,11 @@ class Ci {
596
596
  this.subscriptions.length = 0;
597
597
  }
598
598
  }
599
- function xi(t, e) {
599
+ function wi(t, e) {
600
600
  return e ? t * (1e3 / e) : 0;
601
601
  }
602
- const Ir = 30, Qs = (t) => !isNaN(parseFloat(t));
603
- class ea {
602
+ const Sr = 30, ea = (t) => !isNaN(parseFloat(t));
603
+ class ta {
604
604
  /**
605
605
  * @param init - The initiating value
606
606
  * @param config - Optional configuration options
@@ -618,7 +618,7 @@ class ea {
618
618
  }, this.hasAnimated = !1, this.setCurrent(e), this.owner = n.owner;
619
619
  }
620
620
  setCurrent(e) {
621
- this.current = e, this.updatedAt = W.now(), this.canTrackVelocity === null && e !== void 0 && (this.canTrackVelocity = Qs(this.current));
621
+ this.current = e, this.updatedAt = W.now(), this.canTrackVelocity === null && e !== void 0 && (this.canTrackVelocity = ea(this.current));
622
622
  }
623
623
  setPrevFrameValue(e = this.current) {
624
624
  this.prevFrameValue = e, this.prevUpdatedAt = this.updatedAt;
@@ -664,10 +664,10 @@ class ea {
664
664
  * @deprecated
665
665
  */
666
666
  onChange(e) {
667
- return process.env.NODE_ENV !== "production" && bi(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", e);
667
+ return process.env.NODE_ENV !== "production" && Ci(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", e);
668
668
  }
669
669
  on(e, n) {
670
- this.events[e] || (this.events[e] = new Ci());
670
+ this.events[e] || (this.events[e] = new xi());
671
671
  const r = this.events[e].add(n);
672
672
  return e === "change" ? () => {
673
673
  r(), ue.read(() => {
@@ -748,10 +748,10 @@ class ea {
748
748
  */
749
749
  getVelocity() {
750
750
  const e = W.now();
751
- if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt > Ir)
751
+ if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt > Sr)
752
752
  return 0;
753
- const n = Math.min(this.updatedAt - this.prevUpdatedAt, Ir);
754
- return xi(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
753
+ const n = Math.min(this.updatedAt - this.prevUpdatedAt, Sr);
754
+ return wi(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
755
755
  }
756
756
  /**
757
757
  * Registers a new animation to control this `MotionValue`. Only one
@@ -804,41 +804,41 @@ class ea {
804
804
  }
805
805
  }
806
806
  function it(t, e) {
807
- return new ea(t, e);
807
+ return new ta(t, e);
808
808
  }
809
- function ta(t, e, n) {
809
+ function na(t, e, n) {
810
810
  t.hasValue(e) ? t.getValue(e).set(n) : t.addValue(e, it(n));
811
811
  }
812
- function na(t) {
813
- return Hs(t) ? t[t.length - 1] || 0 : t;
812
+ function ra(t) {
813
+ return Zs(t) ? t[t.length - 1] || 0 : t;
814
814
  }
815
- function ra(t, e) {
816
- let a = Zs(t, e) || {}, { transitionEnd: r = {}, transition: i = {} } = a, s = te(a, ["transitionEnd", "transition"]);
815
+ function ia(t, e) {
816
+ let a = Ys(t, e) || {}, { transitionEnd: r = {}, transition: i = {} } = a, s = te(a, ["transitionEnd", "transition"]);
817
817
  s = L(L({}, s), r);
818
818
  for (const o in s) {
819
- const c = na(s[o]);
820
- ta(t, o, c);
819
+ const c = ra(s[o]);
820
+ na(t, o, c);
821
821
  }
822
822
  }
823
- function ia(t) {
823
+ function sa(t) {
824
824
  return !!(H(t) && t.add);
825
825
  }
826
- function sa(t, e) {
826
+ function aa(t, e) {
827
827
  const n = t.getValue("willChange");
828
- if (ia(n))
828
+ if (sa(n))
829
829
  return n.add(e);
830
830
  if (!n && de.WillChange) {
831
831
  const r = new de.WillChange("auto");
832
832
  t.addValue("willChange", r), r.add(e);
833
833
  }
834
834
  }
835
- const tn = (t) => t.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), aa = "framerAppearId", oa = "data-" + tn(aa);
836
- function la(t) {
837
- return t.props[oa];
835
+ const tn = (t) => t.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), oa = "framerAppearId", la = "data-" + tn(oa);
836
+ function ca(t) {
837
+ return t.props[la];
838
838
  }
839
- const ca = (t) => t !== null;
840
- function da(t, { repeat: e, repeatType: n = "loop" }, r) {
841
- const i = t.filter(ca), s = e && n !== "loop" && e % 2 === 1 ? 0 : i.length - 1;
839
+ const da = (t) => t !== null;
840
+ function ua(t, { repeat: e, repeatType: n = "loop" }, r) {
841
+ const i = t.filter(da), s = e && n !== "loop" && e % 2 === 1 ? 0 : i.length - 1;
842
842
  return i[s];
843
843
  }
844
844
  const De = [
@@ -859,7 +859,7 @@ const De = [
859
859
  "skew",
860
860
  "skewX",
861
861
  "skewY"
862
- ], Ne = new Set(De), ua = {
862
+ ], Ne = new Set(De), pa = {
863
863
  type: "spring",
864
864
  stiffness: 500,
865
865
  damping: 25,
@@ -869,23 +869,23 @@ const De = [
869
869
  stiffness: 550,
870
870
  damping: t === 0 ? 2 * Math.sqrt(550) : 30,
871
871
  restSpeed: 10
872
- }), pa = {
872
+ }), ma = {
873
873
  type: "keyframes",
874
874
  duration: 0.8
875
- }, ma = {
875
+ }, fa = {
876
876
  type: "keyframes",
877
877
  ease: [0.25, 0.1, 0.35, 1],
878
878
  duration: 0.3
879
- }, fa = (t, { keyframes: e }) => e.length > 2 ? pa : Ne.has(t) ? t.startsWith("scale") ? ha(e[1]) : ua : ma;
880
- function ga(h) {
881
- var m = h, { when: t, delay: e, delayChildren: n, staggerChildren: r, staggerDirection: i, repeat: s, repeatType: a, repeatDelay: o, from: c, elapsed: u } = m, d = te(m, ["when", "delay", "delayChildren", "staggerChildren", "staggerDirection", "repeat", "repeatType", "repeatDelay", "from", "elapsed"]);
879
+ }, ga = (t, { keyframes: e }) => e.length > 2 ? ma : Ne.has(t) ? t.startsWith("scale") ? ha(e[1]) : pa : fa;
880
+ function ya(p) {
881
+ var h = p, { when: t, delay: e, delayChildren: n, staggerChildren: r, staggerDirection: i, repeat: s, repeatType: a, repeatDelay: o, from: c, elapsed: u } = h, d = te(h, ["when", "delay", "delayChildren", "staggerChildren", "staggerDirection", "repeat", "repeatType", "repeatDelay", "from", "elapsed"]);
882
882
  return !!Object.keys(d).length;
883
883
  }
884
- function wi(t, e) {
884
+ function ki(t, e) {
885
885
  var n, r;
886
886
  return (r = (n = t == null ? void 0 : t[e]) != null ? n : t == null ? void 0 : t.default) != null ? r : t;
887
887
  }
888
- const ki = (t) => (e) => typeof e == "string" && e.startsWith(t), Ei = /* @__PURE__ */ ki("--"), ya = /* @__PURE__ */ ki("var(--"), nn = (t) => ya(t) ? va.test(t.split("/*")[0].trim()) : !1, va = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, Le = (t, e, n) => n > e ? e : n < t ? t : n, Re = {
888
+ const Ei = (t) => (e) => typeof e == "string" && e.startsWith(t), Li = /* @__PURE__ */ Ei("--"), va = /* @__PURE__ */ Ei("var(--"), nn = (t) => va(t) ? ba.test(t.split("/*")[0].trim()) : !1, ba = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, Le = (t, e, n) => n > e ? e : n < t ? t : n, Re = {
889
889
  test: (t) => typeof t == "number",
890
890
  parse: parseFloat,
891
891
  transform: (t) => t
@@ -894,10 +894,10 @@ const ki = (t) => (e) => typeof e == "string" && e.startsWith(t), Ei = /* @__PUR
894
894
  }), ft = M(L({}, Re), {
895
895
  default: 1
896
896
  }), nt = (t) => Math.round(t * 1e5) / 1e5, rn = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
897
- function ba(t) {
897
+ function Ca(t) {
898
898
  return t == null;
899
899
  }
900
- const Ca = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, sn = (t, e) => (n) => !!(typeof n == "string" && Ca.test(n) && n.startsWith(t) || e && !ba(n) && Object.prototype.hasOwnProperty.call(n, e)), Li = (t, e, n) => (r) => {
900
+ const xa = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, sn = (t, e) => (n) => !!(typeof n == "string" && xa.test(n) && n.startsWith(t) || e && !Ca(n) && Object.prototype.hasOwnProperty.call(n, e)), Ti = (t, e, n) => (r) => {
901
901
  if (typeof r != "string")
902
902
  return r;
903
903
  const [i, s, a, o] = r.match(rn);
@@ -907,14 +907,14 @@ const Ca = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s
907
907
  [n]: parseFloat(a),
908
908
  alpha: o !== void 0 ? parseFloat(o) : 1
909
909
  };
910
- }, xa = (t) => Le(0, 255, t), Tt = M(L({}, Re), {
911
- transform: (t) => Math.round(xa(t))
910
+ }, wa = (t) => Le(0, 255, t), Tt = M(L({}, Re), {
911
+ transform: (t) => Math.round(wa(t))
912
912
  }), xe = {
913
913
  test: /* @__PURE__ */ sn("rgb", "red"),
914
- parse: /* @__PURE__ */ Li("red", "green", "blue"),
914
+ parse: /* @__PURE__ */ Ti("red", "green", "blue"),
915
915
  transform: ({ red: t, green: e, blue: n, alpha: r = 1 }) => "rgba(" + Tt.transform(t) + ", " + Tt.transform(e) + ", " + Tt.transform(n) + ", " + nt(st.transform(r)) + ")"
916
916
  };
917
- function wa(t) {
917
+ function ka(t) {
918
918
  let e = "", n = "", r = "", i = "";
919
919
  return t.length > 5 ? (e = t.substring(1, 3), n = t.substring(3, 5), r = t.substring(5, 7), i = t.substring(7, 9)) : (e = t.substring(1, 2), n = t.substring(2, 3), r = t.substring(3, 4), i = t.substring(4, 5), e += e, n += n, r += r, i += i), {
920
920
  red: parseInt(e, 16),
@@ -925,29 +925,29 @@ function wa(t) {
925
925
  }
926
926
  const Nt = {
927
927
  test: /* @__PURE__ */ sn("#"),
928
- parse: wa,
928
+ parse: ka,
929
929
  transform: xe.transform
930
930
  }, dt = /* @__NO_SIDE_EFFECTS__ */ (t) => ({
931
931
  test: (e) => typeof e == "string" && e.endsWith(t) && e.split(" ").length === 1,
932
932
  parse: parseFloat,
933
933
  transform: (e) => `${e}${t}`
934
- }), be = /* @__PURE__ */ dt("deg"), Me = /* @__PURE__ */ dt("%"), E = /* @__PURE__ */ dt("px"), ka = /* @__PURE__ */ dt("vh"), Ea = /* @__PURE__ */ dt("vw"), Sr = M(L({}, Me), {
934
+ }), be = /* @__PURE__ */ dt("deg"), Me = /* @__PURE__ */ dt("%"), E = /* @__PURE__ */ dt("px"), Ea = /* @__PURE__ */ dt("vh"), La = /* @__PURE__ */ dt("vw"), Mr = M(L({}, Me), {
935
935
  parse: (t) => Me.parse(t) / 100,
936
936
  transform: (t) => Me.transform(t * 100)
937
937
  }), Ie = {
938
938
  test: /* @__PURE__ */ sn("hsl", "hue"),
939
- parse: /* @__PURE__ */ Li("hue", "saturation", "lightness"),
939
+ parse: /* @__PURE__ */ Ti("hue", "saturation", "lightness"),
940
940
  transform: ({ hue: t, saturation: e, lightness: n, alpha: r = 1 }) => "hsla(" + Math.round(t) + ", " + Me.transform(nt(e)) + ", " + Me.transform(nt(n)) + ", " + nt(st.transform(r)) + ")"
941
941
  }, F = {
942
942
  test: (t) => xe.test(t) || Nt.test(t) || Ie.test(t),
943
943
  parse: (t) => xe.test(t) ? xe.parse(t) : Ie.test(t) ? Ie.parse(t) : Nt.parse(t),
944
944
  transform: (t) => typeof t == "string" ? t : t.hasOwnProperty("red") ? xe.transform(t) : Ie.transform(t)
945
- }, La = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
946
- function Ta(t) {
945
+ }, Ta = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
946
+ function Aa(t) {
947
947
  var e, n;
948
- return isNaN(t) && typeof t == "string" && (((e = t.match(rn)) == null ? void 0 : e.length) || 0) + (((n = t.match(La)) == null ? void 0 : n.length) || 0) > 0;
948
+ return isNaN(t) && typeof t == "string" && (((e = t.match(rn)) == null ? void 0 : e.length) || 0) + (((n = t.match(Ta)) == null ? void 0 : n.length) || 0) > 0;
949
949
  }
950
- const Ti = "number", Ai = "color", Aa = "var", Va = "var(", Mr = "${}", Ia = /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;
950
+ const Ai = "number", Vi = "color", Va = "var", Ia = "var(", _r = "${}", Sa = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;
951
951
  function at(t) {
952
952
  const e = t.toString(), n = [], r = {
953
953
  color: [],
@@ -955,39 +955,39 @@ function at(t) {
955
955
  var: []
956
956
  }, i = [];
957
957
  let s = 0;
958
- const o = e.replace(Ia, (c) => (F.test(c) ? (r.color.push(s), i.push(Ai), n.push(F.parse(c))) : c.startsWith(Va) ? (r.var.push(s), i.push(Aa), n.push(c)) : (r.number.push(s), i.push(Ti), n.push(parseFloat(c))), ++s, Mr)).split(Mr);
958
+ const o = e.replace(Sa, (c) => (F.test(c) ? (r.color.push(s), i.push(Vi), n.push(F.parse(c))) : c.startsWith(Ia) ? (r.var.push(s), i.push(Va), n.push(c)) : (r.number.push(s), i.push(Ai), n.push(parseFloat(c))), ++s, _r)).split(_r);
959
959
  return { values: n, split: o, indexes: r, types: i };
960
960
  }
961
- function Vi(t) {
961
+ function Ii(t) {
962
962
  return at(t).values;
963
963
  }
964
- function Ii(t) {
964
+ function Si(t) {
965
965
  const { split: e, types: n } = at(t), r = e.length;
966
966
  return (i) => {
967
967
  let s = "";
968
968
  for (let a = 0; a < r; a++)
969
969
  if (s += e[a], i[a] !== void 0) {
970
970
  const o = n[a];
971
- o === Ti ? s += nt(i[a]) : o === Ai ? s += F.transform(i[a]) : s += i[a];
971
+ o === Ai ? s += nt(i[a]) : o === Vi ? s += F.transform(i[a]) : s += i[a];
972
972
  }
973
973
  return s;
974
974
  };
975
975
  }
976
- const Sa = (t) => typeof t == "number" ? 0 : t;
977
- function Ma(t) {
978
- const e = Vi(t);
979
- return Ii(t)(e.map(Sa));
976
+ const Ma = (t) => typeof t == "number" ? 0 : t;
977
+ function _a(t) {
978
+ const e = Ii(t);
979
+ return Si(t)(e.map(Ma));
980
980
  }
981
981
  const Oe = {
982
- test: Ta,
983
- parse: Vi,
984
- createTransformer: Ii,
985
- getAnimatableNone: Ma
982
+ test: Aa,
983
+ parse: Ii,
984
+ createTransformer: Si,
985
+ getAnimatableNone: _a
986
986
  };
987
987
  function At(t, e, n) {
988
988
  return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? t + (e - t) * 6 * n : n < 1 / 2 ? e : n < 2 / 3 ? t + (e - t) * (2 / 3 - n) * 6 : t;
989
989
  }
990
- function _a({ hue: t, saturation: e, lightness: n, alpha: r }) {
990
+ function Pa({ hue: t, saturation: e, lightness: n, alpha: r }) {
991
991
  t /= 360, e /= 100, n /= 100;
992
992
  let i = 0, s = 0, a = 0;
993
993
  if (!e)
@@ -1009,32 +1009,32 @@ function wt(t, e) {
1009
1009
  const Vt = (t, e, n) => {
1010
1010
  const r = t * t, i = n * (e * e - r) + r;
1011
1011
  return i < 0 ? 0 : Math.sqrt(i);
1012
- }, Pa = [Nt, xe, Ie], Da = (t) => Pa.find((e) => e.test(t));
1013
- function _r(t) {
1014
- const e = Da(t);
1012
+ }, Da = [Nt, xe, Ie], Na = (t) => Da.find((e) => e.test(t));
1013
+ function Pr(t) {
1014
+ const e = Na(t);
1015
1015
  if (ct(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`), !e)
1016
1016
  return !1;
1017
1017
  let n = e.parse(t);
1018
- return e === Ie && (n = _a(n)), n;
1018
+ return e === Ie && (n = Pa(n)), n;
1019
1019
  }
1020
- const Pr = (t, e) => {
1021
- const n = _r(t), r = _r(e);
1020
+ const Dr = (t, e) => {
1021
+ const n = Pr(t), r = Pr(e);
1022
1022
  if (!n || !r)
1023
1023
  return wt(t, e);
1024
1024
  const i = L({}, n);
1025
1025
  return (s) => (i.red = Vt(n.red, r.red, s), i.green = Vt(n.green, r.green, s), i.blue = Vt(n.blue, r.blue, s), i.alpha = lt(n.alpha, r.alpha, s), xe.transform(i));
1026
1026
  }, Rt = /* @__PURE__ */ new Set(["none", "hidden"]);
1027
- function Na(t, e) {
1027
+ function Ra(t, e) {
1028
1028
  return Rt.has(t) ? (n) => n <= 0 ? t : e : (n) => n >= 1 ? e : t;
1029
1029
  }
1030
- const Ra = (t, e) => (n) => e(t(n)), an = (...t) => t.reduce(Ra);
1031
- function Oa(t, e) {
1030
+ const Oa = (t, e) => (n) => e(t(n)), an = (...t) => t.reduce(Oa);
1031
+ function ja(t, e) {
1032
1032
  return (n) => lt(t, e, n);
1033
1033
  }
1034
1034
  function on(t) {
1035
- return typeof t == "number" ? Oa : typeof t == "string" ? nn(t) ? wt : F.test(t) ? Pr : Ka : Array.isArray(t) ? Si : typeof t == "object" ? F.test(t) ? Pr : ja : wt;
1035
+ return typeof t == "number" ? ja : typeof t == "string" ? nn(t) ? wt : F.test(t) ? Dr : Ba : Array.isArray(t) ? Mi : typeof t == "object" ? F.test(t) ? Dr : qa : wt;
1036
1036
  }
1037
- function Si(t, e) {
1037
+ function Mi(t, e) {
1038
1038
  const n = [...t], r = n.length, i = t.map((s, a) => on(s)(s, e[a]));
1039
1039
  return (s) => {
1040
1040
  for (let a = 0; a < r; a++)
@@ -1042,7 +1042,7 @@ function Si(t, e) {
1042
1042
  return n;
1043
1043
  };
1044
1044
  }
1045
- function ja(t, e) {
1045
+ function qa(t, e) {
1046
1046
  const n = L(L({}, t), e), r = {};
1047
1047
  for (const i in n)
1048
1048
  t[i] !== void 0 && e[i] !== void 0 && (r[i] = on(t[i])(t[i], e[i]));
@@ -1052,7 +1052,7 @@ function ja(t, e) {
1052
1052
  return n;
1053
1053
  };
1054
1054
  }
1055
- function qa(t, e) {
1055
+ function Ka(t, e) {
1056
1056
  var i;
1057
1057
  const n = [], r = { color: 0, var: 0, number: 0 };
1058
1058
  for (let s = 0; s < e.values.length; s++) {
@@ -1061,14 +1061,14 @@ function qa(t, e) {
1061
1061
  }
1062
1062
  return n;
1063
1063
  }
1064
- const Ka = (t, e) => {
1064
+ const Ba = (t, e) => {
1065
1065
  const n = Oe.createTransformer(e), r = at(t), i = at(e);
1066
- return r.indexes.var.length === i.indexes.var.length && r.indexes.color.length === i.indexes.color.length && r.indexes.number.length >= i.indexes.number.length ? Rt.has(t) && !i.values.length || Rt.has(e) && !r.values.length ? Na(t, e) : an(Si(qa(r, i), i.values), n) : (ct(!0, `Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`), wt(t, e));
1066
+ return r.indexes.var.length === i.indexes.var.length && r.indexes.color.length === i.indexes.color.length && r.indexes.number.length >= i.indexes.number.length ? Rt.has(t) && !i.values.length || Rt.has(e) && !r.values.length ? Ra(t, e) : an(Mi(Ka(r, i), i.values), n) : (ct(!0, `Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`), wt(t, e));
1067
1067
  };
1068
- function Mi(t, e, n) {
1068
+ function _i(t, e, n) {
1069
1069
  return typeof t == "number" && typeof e == "number" && typeof n == "number" ? lt(t, e, n) : on(t)(t, e);
1070
1070
  }
1071
- const Ba = (t) => {
1071
+ const Fa = (t) => {
1072
1072
  const e = ({ timestamp: n }) => t(n);
1073
1073
  return {
1074
1074
  start: (n = !0) => ue.update(e, n),
@@ -1079,16 +1079,16 @@ const Ba = (t) => {
1079
1079
  */
1080
1080
  now: () => xt.isProcessing ? xt.timestamp : W.now()
1081
1081
  };
1082
- }, _i = (t, e, n = 10) => {
1082
+ }, Pi = (t, e, n = 10) => {
1083
1083
  let r = "";
1084
1084
  const i = Math.max(Math.round(e / n), 2);
1085
1085
  for (let s = 0; s < i; s++)
1086
1086
  r += t(s / (i - 1)) + ", ";
1087
1087
  return `linear(${r.substring(0, r.length - 2)})`;
1088
- }, Fa = 5;
1089
- function Pi(t, e, n) {
1090
- const r = Math.max(e - Fa, 0);
1091
- return xi(n - t(r), e - r);
1088
+ }, za = 5;
1089
+ function Di(t, e, n) {
1090
+ const r = Math.max(e - za, 0);
1091
+ return wi(n - t(r), e - r);
1092
1092
  }
1093
1093
  const D = {
1094
1094
  // Default spring physics
@@ -1118,25 +1118,25 @@ const D = {
1118
1118
  // in seconds
1119
1119
  minDamping: 0.05,
1120
1120
  maxDamping: 1
1121
- }, Dr = 1e-3;
1122
- function za({ duration: t = D.duration, bounce: e = D.bounce, velocity: n = D.velocity, mass: r = D.mass }) {
1121
+ }, Nr = 1e-3;
1122
+ function $a({ duration: t = D.duration, bounce: e = D.bounce, velocity: n = D.velocity, mass: r = D.mass }) {
1123
1123
  let i, s;
1124
1124
  ct(t <= /* @__PURE__ */ ne(D.maxDuration), "Spring duration must be 10 seconds or less");
1125
1125
  let a = 1 - e;
1126
1126
  a = Le(D.minDamping, D.maxDamping, a), t = Le(D.minDuration, D.maxDuration, /* @__PURE__ */ le(t)), a < 1 ? (i = (u) => {
1127
- const d = u * a, h = d * t, m = d - n, f = Ot(u, a), p = Math.exp(-h);
1128
- return Dr - m / f * p;
1127
+ const d = u * a, p = d * t, h = d - n, f = Ot(u, a), m = Math.exp(-p);
1128
+ return Nr - h / f * m;
1129
1129
  }, s = (u) => {
1130
- const h = u * a * t, m = h * n + n, f = Math.pow(a, 2) * Math.pow(u, 2) * t, p = Math.exp(-h), g = Ot(Math.pow(u, 2), a);
1131
- return (-i(u) + Dr > 0 ? -1 : 1) * ((m - f) * p) / g;
1130
+ const p = u * a * t, h = p * n + n, f = Math.pow(a, 2) * Math.pow(u, 2) * t, m = Math.exp(-p), g = Ot(Math.pow(u, 2), a);
1131
+ return (-i(u) + Nr > 0 ? -1 : 1) * ((h - f) * m) / g;
1132
1132
  }) : (i = (u) => {
1133
- const d = Math.exp(-u * t), h = (u - n) * t + 1;
1134
- return -1e-3 + d * h;
1133
+ const d = Math.exp(-u * t), p = (u - n) * t + 1;
1134
+ return -1e-3 + d * p;
1135
1135
  }, s = (u) => {
1136
- const d = Math.exp(-u * t), h = (n - u) * (t * t);
1137
- return d * h;
1136
+ const d = Math.exp(-u * t), p = (n - u) * (t * t);
1137
+ return d * p;
1138
1138
  });
1139
- const o = 5 / t, c = Ga(i, s, o);
1139
+ const o = 5 / t, c = Ua(i, s, o);
1140
1140
  if (t = /* @__PURE__ */ ne(t), isNaN(c))
1141
1141
  return {
1142
1142
  stiffness: D.stiffness,
@@ -1152,21 +1152,21 @@ function za({ duration: t = D.duration, bounce: e = D.bounce, velocity: n = D.ve
1152
1152
  };
1153
1153
  }
1154
1154
  }
1155
- const $a = 12;
1156
- function Ga(t, e, n) {
1155
+ const Ga = 12;
1156
+ function Ua(t, e, n) {
1157
1157
  let r = n;
1158
- for (let i = 1; i < $a; i++)
1158
+ for (let i = 1; i < Ga; i++)
1159
1159
  r = r - t(r) / e(r);
1160
1160
  return r;
1161
1161
  }
1162
1162
  function Ot(t, e) {
1163
1163
  return t * Math.sqrt(1 - e * e);
1164
1164
  }
1165
- const Ua = ["duration", "bounce"], Ha = ["stiffness", "damping", "mass"];
1166
- function Nr(t, e) {
1165
+ const Ha = ["duration", "bounce"], Za = ["stiffness", "damping", "mass"];
1166
+ function Rr(t, e) {
1167
1167
  return e.some((n) => t[n] !== void 0);
1168
1168
  }
1169
- function Za(t) {
1169
+ function Ya(t) {
1170
1170
  let e = L({
1171
1171
  velocity: D.velocity,
1172
1172
  stiffness: D.stiffness,
@@ -1174,7 +1174,7 @@ function Za(t) {
1174
1174
  mass: D.mass,
1175
1175
  isResolvedFromDuration: !1
1176
1176
  }, t);
1177
- if (!Nr(t, Ha) && Nr(t, Ua))
1177
+ if (!Rr(t, Za) && Rr(t, Ha))
1178
1178
  if (t.visualDuration) {
1179
1179
  const n = t.visualDuration, r = 2 * Math.PI / (n * 1.2), i = r * r, s = 2 * Le(0.05, 1, 1 - (t.bounce || 0)) * Math.sqrt(i);
1180
1180
  e = M(L({}, e), {
@@ -1183,7 +1183,7 @@ function Za(t) {
1183
1183
  damping: s
1184
1184
  });
1185
1185
  } else {
1186
- const n = za(t);
1186
+ const n = $a(t);
1187
1187
  e = M(L(L({}, e), n), {
1188
1188
  mass: D.mass
1189
1189
  }), e.isResolvedFromDuration = !0;
@@ -1197,42 +1197,42 @@ function ot(t = D.visualDuration, e = D.bounce) {
1197
1197
  bounce: e
1198
1198
  } : t;
1199
1199
  let { restSpeed: r, restDelta: i } = n;
1200
- const s = n.keyframes[0], a = n.keyframes[n.keyframes.length - 1], o = { done: !1, value: s }, { stiffness: c, damping: u, mass: d, duration: h, velocity: m, isResolvedFromDuration: f } = Za(M(L({}, n), {
1200
+ const s = n.keyframes[0], a = n.keyframes[n.keyframes.length - 1], o = { done: !1, value: s }, { stiffness: c, damping: u, mass: d, duration: p, velocity: h, isResolvedFromDuration: f } = Ya(M(L({}, n), {
1201
1201
  velocity: -/* @__PURE__ */ le(n.velocity || 0)
1202
- })), p = m || 0, g = u / (2 * Math.sqrt(c * d)), y = a - s, b = /* @__PURE__ */ le(Math.sqrt(c / d)), A = Math.abs(y) < 5;
1202
+ })), m = h || 0, g = u / (2 * Math.sqrt(c * d)), y = a - s, b = /* @__PURE__ */ le(Math.sqrt(c / d)), A = Math.abs(y) < 5;
1203
1203
  r || (r = A ? D.restSpeed.granular : D.restSpeed.default), i || (i = A ? D.restDelta.granular : D.restDelta.default);
1204
1204
  let k;
1205
1205
  if (g < 1) {
1206
1206
  const C = Ot(b, g);
1207
1207
  k = (I) => {
1208
1208
  const S = Math.exp(-g * b * I);
1209
- return a - S * ((p + g * b * y) / C * Math.sin(C * I) + y * Math.cos(C * I));
1209
+ return a - S * ((m + g * b * y) / C * Math.sin(C * I) + y * Math.cos(C * I));
1210
1210
  };
1211
1211
  } else if (g === 1)
1212
- k = (C) => a - Math.exp(-b * C) * (y + (p + b * y) * C);
1212
+ k = (C) => a - Math.exp(-b * C) * (y + (m + b * y) * C);
1213
1213
  else {
1214
1214
  const C = b * Math.sqrt(g * g - 1);
1215
1215
  k = (I) => {
1216
1216
  const S = Math.exp(-g * b * I), x = Math.min(C * I, 300);
1217
- return a - S * ((p + g * b * y) * Math.sinh(x) + C * y * Math.cosh(x)) / C;
1217
+ return a - S * ((m + g * b * y) * Math.sinh(x) + C * y * Math.cosh(x)) / C;
1218
1218
  };
1219
1219
  }
1220
1220
  const V = {
1221
- calculatedDuration: f && h || null,
1221
+ calculatedDuration: f && p || null,
1222
1222
  next: (C) => {
1223
1223
  const I = k(C);
1224
1224
  if (f)
1225
- o.done = C >= h;
1225
+ o.done = C >= p;
1226
1226
  else {
1227
- let S = C === 0 ? p : 0;
1228
- g < 1 && (S = C === 0 ? /* @__PURE__ */ ne(p) : Pi(k, C, I));
1227
+ let S = C === 0 ? m : 0;
1228
+ g < 1 && (S = C === 0 ? /* @__PURE__ */ ne(m) : Di(k, C, I));
1229
1229
  const x = Math.abs(S) <= r, P = Math.abs(a - I) <= i;
1230
1230
  o.done = x && P;
1231
1231
  }
1232
1232
  return o.value = o.done ? a : I, o;
1233
1233
  },
1234
1234
  toString: () => {
1235
- const C = Math.min(en(V), Ct), I = _i((S) => V.next(C * S).value, C, 30);
1235
+ const C = Math.min(en(V), Ct), I = Pi((S) => V.next(C * S).value, C, 30);
1236
1236
  return C + "ms " + I;
1237
1237
  },
1238
1238
  toTransition: () => {
@@ -1241,26 +1241,26 @@ function ot(t = D.visualDuration, e = D.bounce) {
1241
1241
  return V;
1242
1242
  }
1243
1243
  ot.applyToOptions = (t) => {
1244
- const e = yi(t, 100, ot);
1244
+ const e = vi(t, 100, ot);
1245
1245
  return t.ease = e.ease, t.duration = /* @__PURE__ */ ne(e.duration), t.type = "keyframes", t;
1246
1246
  };
1247
1247
  function jt({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: r = 325, bounceDamping: i = 10, bounceStiffness: s = 500, modifyTarget: a, min: o, max: c, restDelta: u = 0.5, restSpeed: d }) {
1248
- const h = t[0], m = {
1248
+ const p = t[0], h = {
1249
1249
  done: !1,
1250
- value: h
1251
- }, f = (x) => o !== void 0 && x < o || c !== void 0 && x > c, p = (x) => o === void 0 ? c : c === void 0 || Math.abs(o - x) < Math.abs(c - x) ? o : c;
1250
+ value: p
1251
+ }, f = (x) => o !== void 0 && x < o || c !== void 0 && x > c, m = (x) => o === void 0 ? c : c === void 0 || Math.abs(o - x) < Math.abs(c - x) ? o : c;
1252
1252
  let g = n * e;
1253
- const y = h + g, b = a === void 0 ? y : a(y);
1254
- b !== y && (g = b - h);
1253
+ const y = p + g, b = a === void 0 ? y : a(y);
1254
+ b !== y && (g = b - p);
1255
1255
  const A = (x) => -g * Math.exp(-x / r), k = (x) => b + A(x), V = (x) => {
1256
1256
  const P = A(x), R = k(x);
1257
- m.done = Math.abs(P) <= u, m.value = m.done ? b : R;
1257
+ h.done = Math.abs(P) <= u, h.value = h.done ? b : R;
1258
1258
  };
1259
1259
  let C, I;
1260
1260
  const S = (x) => {
1261
- f(m.value) && (C = x, I = ot({
1262
- keyframes: [m.value, p(m.value)],
1263
- velocity: Pi(k, x, m.value),
1261
+ f(h.value) && (C = x, I = ot({
1262
+ keyframes: [h.value, m(h.value)],
1263
+ velocity: Di(k, x, h.value),
1264
1264
  // TODO: This should be passing * 1000
1265
1265
  damping: i,
1266
1266
  stiffness: s,
@@ -1272,12 +1272,12 @@ function jt({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: r = 3
1272
1272
  calculatedDuration: null,
1273
1273
  next: (x) => {
1274
1274
  let P = !1;
1275
- return !I && C === void 0 && (P = !0, V(x), S(x)), C !== void 0 && x >= C ? I.next(x - C) : (!P && V(x), m);
1275
+ return !I && C === void 0 && (P = !0, V(x), S(x)), C !== void 0 && x >= C ? I.next(x - C) : (!P && V(x), h);
1276
1276
  }
1277
1277
  };
1278
1278
  }
1279
- function Ya(t, e, n) {
1280
- const r = [], i = n || de.mix || Mi, s = t.length - 1;
1279
+ function Wa(t, e, n) {
1280
+ const r = [], i = n || de.mix || _i, s = t.length - 1;
1281
1281
  for (let a = 0; a < s; a++) {
1282
1282
  let o = i(t[a], t[a + 1]);
1283
1283
  if (e) {
@@ -1288,7 +1288,7 @@ function Ya(t, e, n) {
1288
1288
  }
1289
1289
  return r;
1290
1290
  }
1291
- function Wa(t, e, { clamp: n = !0, ease: r, mixer: i } = {}) {
1291
+ function Ja(t, e, { clamp: n = !0, ease: r, mixer: i } = {}) {
1292
1292
  const s = t.length;
1293
1293
  if (ce(s === e.length, "Both input and output ranges must be the same length"), s === 1)
1294
1294
  return () => e[0];
@@ -1296,90 +1296,90 @@ function Wa(t, e, { clamp: n = !0, ease: r, mixer: i } = {}) {
1296
1296
  return () => e[1];
1297
1297
  const a = t[0] === t[1];
1298
1298
  t[0] > t[s - 1] && (t = [...t].reverse(), e = [...e].reverse());
1299
- const o = Ya(e, r, i), c = o.length, u = (d) => {
1299
+ const o = Wa(e, r, i), c = o.length, u = (d) => {
1300
1300
  if (a && d < t[0])
1301
1301
  return e[0];
1302
- let h = 0;
1302
+ let p = 0;
1303
1303
  if (c > 1)
1304
- for (; h < t.length - 2 && !(d < t[h + 1]); h++)
1304
+ for (; p < t.length - 2 && !(d < t[p + 1]); p++)
1305
1305
  ;
1306
- const m = /* @__PURE__ */ Xt(t[h], t[h + 1], d);
1307
- return o[h](m);
1306
+ const h = /* @__PURE__ */ Xt(t[p], t[p + 1], d);
1307
+ return o[p](h);
1308
1308
  };
1309
1309
  return n ? (d) => u(Le(t[0], t[s - 1], d)) : u;
1310
1310
  }
1311
- function Ja(t, e) {
1311
+ function Xa(t, e) {
1312
1312
  return t.map((n) => n * e);
1313
1313
  }
1314
- const Di = (t, e, n) => (((1 - 3 * n + 3 * e) * t + (3 * n - 6 * e)) * t + 3 * e) * t, Xa = 1e-7, Qa = 12;
1315
- function eo(t, e, n, r, i) {
1314
+ const Ni = (t, e, n) => (((1 - 3 * n + 3 * e) * t + (3 * n - 6 * e)) * t + 3 * e) * t, Qa = 1e-7, eo = 12;
1315
+ function to(t, e, n, r, i) {
1316
1316
  let s, a, o = 0;
1317
1317
  do
1318
- a = e + (n - e) / 2, s = Di(a, r, i) - t, s > 0 ? n = a : e = a;
1319
- while (Math.abs(s) > Xa && ++o < Qa);
1318
+ a = e + (n - e) / 2, s = Ni(a, r, i) - t, s > 0 ? n = a : e = a;
1319
+ while (Math.abs(s) > Qa && ++o < eo);
1320
1320
  return a;
1321
1321
  }
1322
1322
  function ut(t, e, n, r) {
1323
1323
  if (t === e && n === r)
1324
1324
  return Pe;
1325
- const i = (s) => eo(s, 0, 1, t, n);
1326
- return (s) => s === 0 || s === 1 ? s : Di(i(s), e, r);
1325
+ const i = (s) => to(s, 0, 1, t, n);
1326
+ return (s) => s === 0 || s === 1 ? s : Ni(i(s), e, r);
1327
1327
  }
1328
- const to = /* @__PURE__ */ ut(0.42, 0, 1, 1), no = /* @__PURE__ */ ut(0, 0, 0.58, 1), Ni = /* @__PURE__ */ ut(0.42, 0, 0.58, 1), Ri = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, Oi = (t) => (e) => 1 - t(1 - e), ji = /* @__PURE__ */ ut(0.33, 1.53, 0.69, 0.99), ln = /* @__PURE__ */ Oi(ji), qi = /* @__PURE__ */ Ri(ln), Ki = (t) => (t *= 2) < 1 ? 0.5 * ln(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), cn = (t) => 1 - Math.sin(Math.acos(t)), ro = Oi(cn), Bi = Ri(cn), Fi = (t) => Array.isArray(t) && typeof t[0] == "number", Rr = {
1328
+ const no = /* @__PURE__ */ ut(0.42, 0, 1, 1), ro = /* @__PURE__ */ ut(0, 0, 0.58, 1), Ri = /* @__PURE__ */ ut(0.42, 0, 0.58, 1), Oi = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, ji = (t) => (e) => 1 - t(1 - e), qi = /* @__PURE__ */ ut(0.33, 1.53, 0.69, 0.99), ln = /* @__PURE__ */ ji(qi), Ki = /* @__PURE__ */ Oi(ln), Bi = (t) => (t *= 2) < 1 ? 0.5 * ln(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), cn = (t) => 1 - Math.sin(Math.acos(t)), io = ji(cn), Fi = Oi(cn), zi = (t) => Array.isArray(t) && typeof t[0] == "number", Or = {
1329
1329
  linear: Pe,
1330
- easeIn: to,
1331
- easeInOut: Ni,
1332
- easeOut: no,
1330
+ easeIn: no,
1331
+ easeInOut: Ri,
1332
+ easeOut: ro,
1333
1333
  circIn: cn,
1334
- circInOut: Bi,
1335
- circOut: ro,
1334
+ circInOut: Fi,
1335
+ circOut: io,
1336
1336
  backIn: ln,
1337
- backInOut: qi,
1338
- backOut: ji,
1339
- anticipate: Ki
1340
- }, io = (t) => typeof t == "string", Or = (t) => {
1341
- if (Fi(t)) {
1337
+ backInOut: Ki,
1338
+ backOut: qi,
1339
+ anticipate: Bi
1340
+ }, so = (t) => typeof t == "string", jr = (t) => {
1341
+ if (zi(t)) {
1342
1342
  ce(t.length === 4, "Cubic bezier arrays must contain four numerical values.");
1343
1343
  const [e, n, r, i] = t;
1344
1344
  return ut(e, n, r, i);
1345
- } else if (io(t))
1346
- return ce(Rr[t] !== void 0, `Invalid easing type '${t}'`), Rr[t];
1345
+ } else if (so(t))
1346
+ return ce(Or[t] !== void 0, `Invalid easing type '${t}'`), Or[t];
1347
1347
  return t;
1348
1348
  };
1349
- function so(t, e) {
1350
- return t.map(() => e || Ni).splice(0, t.length - 1);
1349
+ function ao(t, e) {
1350
+ return t.map(() => e || Ri).splice(0, t.length - 1);
1351
1351
  }
1352
1352
  function Se({ duration: t = 300, keyframes: e, times: n, ease: r = "easeInOut" }) {
1353
- const i = hi(r) ? r.map(Or) : Or(r), s = {
1353
+ const i = hi(r) ? r.map(jr) : jr(r), s = {
1354
1354
  done: !1,
1355
1355
  value: e[0]
1356
- }, a = Ja(
1356
+ }, a = Xa(
1357
1357
  // Only use the provided offsets if they're the correct length
1358
1358
  // TODO Maybe we should warn here if there's a length mismatch
1359
- n && n.length === e.length ? n : gi(e),
1359
+ n && n.length === e.length ? n : yi(e),
1360
1360
  t
1361
- ), o = Wa(a, e, {
1362
- ease: Array.isArray(i) ? i : so(e, i)
1361
+ ), o = Ja(a, e, {
1362
+ ease: Array.isArray(i) ? i : ao(e, i)
1363
1363
  });
1364
1364
  return {
1365
1365
  calculatedDuration: t,
1366
1366
  next: (c) => (s.value = o(c), s.done = c >= t, s)
1367
1367
  };
1368
1368
  }
1369
- const ao = (t) => t !== null;
1369
+ const oo = (t) => t !== null;
1370
1370
  function dn(t, { repeat: e, repeatType: n = "loop" }, r, i = 1) {
1371
- const s = t.filter(ao), o = i < 0 || e && n !== "loop" && e % 2 === 1 ? 0 : s.length - 1;
1371
+ const s = t.filter(oo), o = i < 0 || e && n !== "loop" && e % 2 === 1 ? 0 : s.length - 1;
1372
1372
  return !o || r === void 0 ? s[o] : r;
1373
1373
  }
1374
- const oo = {
1374
+ const lo = {
1375
1375
  decay: jt,
1376
1376
  inertia: jt,
1377
1377
  tween: Se,
1378
1378
  keyframes: Se,
1379
1379
  spring: ot
1380
1380
  };
1381
- function zi(t) {
1382
- typeof t.type == "string" && (t.type = oo[t.type]);
1381
+ function $i(t) {
1382
+ typeof t.type == "string" && (t.type = lo[t.type]);
1383
1383
  }
1384
1384
  class un {
1385
1385
  constructor() {
@@ -1405,8 +1405,8 @@ class un {
1405
1405
  return this.finished.then(e, n);
1406
1406
  }
1407
1407
  }
1408
- const lo = (t) => t / 100;
1409
- class hn extends un {
1408
+ const co = (t) => t / 100;
1409
+ class pn extends un {
1410
1410
  constructor(e) {
1411
1411
  super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.stop = () => {
1412
1412
  var r, i;
@@ -1416,11 +1416,11 @@ class hn extends un {
1416
1416
  }
1417
1417
  initAnimation() {
1418
1418
  const { options: e } = this;
1419
- zi(e);
1419
+ $i(e);
1420
1420
  const { type: n = Se, repeat: r = 0, repeatDelay: i = 0, repeatType: s, velocity: a = 0 } = e;
1421
1421
  let { keyframes: o } = e;
1422
1422
  const c = n || Se;
1423
- process.env.NODE_ENV !== "production" && c !== Se && ce(o.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`), c !== Se && typeof o[0] != "number" && (this.mixKeyframes = an(lo, Mi(o[0], o[1])), o = [0, 100]);
1423
+ process.env.NODE_ENV !== "production" && c !== Se && ce(o.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`), c !== Se && typeof o[0] != "number" && (this.mixKeyframes = an(co, _i(o[0], o[1])), o = [0, 100]);
1424
1424
  const u = c(M(L({}, e), { keyframes: o }));
1425
1425
  s === "mirror" && (this.mirroredGenerator = c(M(L({}, e), {
1426
1426
  keyframes: [...o].reverse(),
@@ -1437,22 +1437,22 @@ class hn extends un {
1437
1437
  const { generator: r, totalDuration: i, mixKeyframes: s, mirroredGenerator: a, resolvedDuration: o, calculatedDuration: c } = this;
1438
1438
  if (this.startTime === null)
1439
1439
  return r.next(0);
1440
- const { delay: u = 0, keyframes: d, repeat: h, repeatType: m, repeatDelay: f, type: p, onUpdate: g, finalKeyframe: y } = this.options;
1440
+ const { delay: u = 0, keyframes: d, repeat: p, repeatType: h, repeatDelay: f, type: m, onUpdate: g, finalKeyframe: y } = this.options;
1441
1441
  this.speed > 0 ? this.startTime = Math.min(this.startTime, e) : this.speed < 0 && (this.startTime = Math.min(e - i / this.speed, this.startTime)), n ? this.currentTime = e : this.updateTime(e);
1442
1442
  const b = this.currentTime - u * (this.playbackSpeed >= 0 ? 1 : -1), A = this.playbackSpeed >= 0 ? b < 0 : b > i;
1443
1443
  this.currentTime = Math.max(b, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = i);
1444
1444
  let k = this.currentTime, V = r;
1445
- if (h) {
1445
+ if (p) {
1446
1446
  const x = Math.min(this.currentTime, i) / o;
1447
1447
  let P = Math.floor(x), R = x % 1;
1448
- !R && x >= 1 && (R = 1), R === 1 && P--, P = Math.min(P, h + 1), !!(P % 2) && (m === "reverse" ? (R = 1 - R, f && (R -= f / o)) : m === "mirror" && (V = a)), k = Le(0, 1, R) * o;
1448
+ !R && x >= 1 && (R = 1), R === 1 && P--, P = Math.min(P, p + 1), !!(P % 2) && (h === "reverse" ? (R = 1 - R, f && (R -= f / o)) : h === "mirror" && (V = a)), k = Le(0, 1, R) * o;
1449
1449
  }
1450
1450
  const C = A ? { done: !1, value: d[0] } : V.next(k);
1451
1451
  s && (C.value = s(C.value));
1452
1452
  let { done: I } = C;
1453
1453
  !A && c !== null && (I = this.playbackSpeed >= 0 ? this.currentTime >= i : this.currentTime <= 0);
1454
1454
  const S = this.holdTime === null && (this.state === "finished" || this.state === "running" && I);
1455
- return S && p !== jt && (C.value = dn(d, this.options, y, this.speed)), g && g(C.value), S && this.finish(), C;
1455
+ return S && m !== jt && (C.value = dn(d, this.options, y, this.speed)), g && g(C.value), S && this.finish(), C;
1456
1456
  }
1457
1457
  /**
1458
1458
  * Allows the returned animation to be awaited or promise-chained. Currently
@@ -1484,7 +1484,7 @@ class hn extends un {
1484
1484
  var i, s;
1485
1485
  if (this.isStopped)
1486
1486
  return;
1487
- const { driver: e = Ba, startTime: n } = this.options;
1487
+ const { driver: e = Fa, startTime: n } = this.options;
1488
1488
  this.driver || (this.driver = e((a) => this.tick(a))), (s = (i = this.options).onPlay) == null || s.call(i);
1489
1489
  const r = this.driver.now();
1490
1490
  this.state === "finished" ? (this.updateFinished(), this.startTime = r) : this.holdTime !== null ? this.startTime = r - this.holdTime : this.startTime || (this.startTime = n != null ? n : r), this.state === "finished" && this.speed < 0 && (this.startTime += this.calculatedDuration), this.holdTime = null, this.state = "running", this.driver.start();
@@ -1517,7 +1517,7 @@ class hn extends un {
1517
1517
  return this.options.allowFlatten && (this.options.type = "keyframes", this.options.ease = "linear", this.initAnimation()), (n = this.driver) == null || n.stop(), e.observe(this);
1518
1518
  }
1519
1519
  }
1520
- function co(t) {
1520
+ function uo(t) {
1521
1521
  var e;
1522
1522
  for (let n = 1; n < t.length; n++)
1523
1523
  (e = t[n]) != null || (t[n] = t[n - 1]);
@@ -1525,7 +1525,7 @@ function co(t) {
1525
1525
  const we = (t) => t * 180 / Math.PI, qt = (t) => {
1526
1526
  const e = we(Math.atan2(t[1], t[0]));
1527
1527
  return Kt(e);
1528
- }, uo = {
1528
+ }, po = {
1529
1529
  x: 4,
1530
1530
  y: 5,
1531
1531
  translateX: 4,
@@ -1538,20 +1538,20 @@ const we = (t) => t * 180 / Math.PI, qt = (t) => {
1538
1538
  skewX: (t) => we(Math.atan(t[1])),
1539
1539
  skewY: (t) => we(Math.atan(t[2])),
1540
1540
  skew: (t) => (Math.abs(t[1]) + Math.abs(t[2])) / 2
1541
- }, Kt = (t) => (t = t % 360, t < 0 && (t += 360), t), jr = qt, qr = (t) => Math.sqrt(t[0] * t[0] + t[1] * t[1]), Kr = (t) => Math.sqrt(t[4] * t[4] + t[5] * t[5]), ho = {
1541
+ }, Kt = (t) => (t = t % 360, t < 0 && (t += 360), t), qr = qt, Kr = (t) => Math.sqrt(t[0] * t[0] + t[1] * t[1]), Br = (t) => Math.sqrt(t[4] * t[4] + t[5] * t[5]), ho = {
1542
1542
  x: 12,
1543
1543
  y: 13,
1544
1544
  z: 14,
1545
1545
  translateX: 12,
1546
1546
  translateY: 13,
1547
1547
  translateZ: 14,
1548
- scaleX: qr,
1549
- scaleY: Kr,
1550
- scale: (t) => (qr(t) + Kr(t)) / 2,
1548
+ scaleX: Kr,
1549
+ scaleY: Br,
1550
+ scale: (t) => (Kr(t) + Br(t)) / 2,
1551
1551
  rotateX: (t) => Kt(we(Math.atan2(t[6], t[5]))),
1552
1552
  rotateY: (t) => Kt(we(Math.atan2(-t[2], t[0]))),
1553
- rotateZ: jr,
1554
- rotate: jr,
1553
+ rotateZ: qr,
1554
+ rotate: qr,
1555
1555
  skewX: (t) => we(Math.atan(t[4])),
1556
1556
  skewY: (t) => we(Math.atan(t[1])),
1557
1557
  skew: (t) => (Math.abs(t[1]) + Math.abs(t[4])) / 2
@@ -1568,24 +1568,24 @@ function Ft(t, e) {
1568
1568
  r = ho, i = n;
1569
1569
  else {
1570
1570
  const o = t.match(/^matrix\(([-\d.e\s,]+)\)$/u);
1571
- r = uo, i = o;
1571
+ r = po, i = o;
1572
1572
  }
1573
1573
  if (!i)
1574
1574
  return Bt(e);
1575
- const s = r[e], a = i[1].split(",").map(mo);
1575
+ const s = r[e], a = i[1].split(",").map(fo);
1576
1576
  return typeof s == "function" ? s(a) : a[s];
1577
1577
  }
1578
- const po = (t, e) => {
1578
+ const mo = (t, e) => {
1579
1579
  const { transform: n = "none" } = getComputedStyle(t);
1580
1580
  return Ft(n, e);
1581
1581
  };
1582
- function mo(t) {
1582
+ function fo(t) {
1583
1583
  return parseFloat(t.trim());
1584
1584
  }
1585
- const Br = (t) => t === Re || t === E, fo = /* @__PURE__ */ new Set(["x", "y", "z"]), go = De.filter((t) => !fo.has(t));
1586
- function yo(t) {
1585
+ const Fr = (t) => t === Re || t === E, go = /* @__PURE__ */ new Set(["x", "y", "z"]), yo = De.filter((t) => !go.has(t));
1586
+ function vo(t) {
1587
1587
  const e = [];
1588
- return go.forEach((n) => {
1588
+ return yo.forEach((n) => {
1589
1589
  const r = t.getValue(n);
1590
1590
  r !== void 0 && (e.push([n, r.get()]), r.set(n.startsWith("scale") ? 1 : 0));
1591
1591
  }), e;
@@ -1606,11 +1606,11 @@ ke.translateX = ke.x;
1606
1606
  ke.translateY = ke.y;
1607
1607
  const Ee = /* @__PURE__ */ new Set();
1608
1608
  let zt = !1, $t = !1, Gt = !1;
1609
- function $i() {
1609
+ function Gi() {
1610
1610
  if ($t) {
1611
1611
  const t = Array.from(Ee).filter((r) => r.needsMeasurement), e = new Set(t.map((r) => r.element)), n = /* @__PURE__ */ new Map();
1612
1612
  e.forEach((r) => {
1613
- const i = yo(r);
1613
+ const i = vo(r);
1614
1614
  i.length && (n.set(r, i), r.render());
1615
1615
  }), t.forEach((r) => r.measureInitialState()), e.forEach((r) => {
1616
1616
  r.render();
@@ -1625,20 +1625,20 @@ function $i() {
1625
1625
  }
1626
1626
  $t = !1, zt = !1, Ee.forEach((t) => t.complete(Gt)), Ee.clear();
1627
1627
  }
1628
- function Gi() {
1628
+ function Ui() {
1629
1629
  Ee.forEach((t) => {
1630
1630
  t.readKeyframes(), t.needsMeasurement && ($t = !0);
1631
1631
  });
1632
1632
  }
1633
- function vo() {
1634
- Gt = !0, Gi(), $i(), Gt = !1;
1633
+ function bo() {
1634
+ Gt = !0, Ui(), Gi(), Gt = !1;
1635
1635
  }
1636
- class pn {
1636
+ class hn {
1637
1637
  constructor(e, n, r, i, s, a = !1) {
1638
1638
  this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...e], this.onComplete = n, this.name = r, this.motionValue = i, this.element = s, this.isAsync = a;
1639
1639
  }
1640
1640
  scheduleResolve() {
1641
- this.state = "scheduled", this.isAsync ? (Ee.add(this), zt || (zt = !0, ue.read(Gi), ue.resolveKeyframes($i))) : (this.readKeyframes(), this.complete());
1641
+ this.state = "scheduled", this.isAsync ? (Ee.add(this), zt || (zt = !0, ue.read(Ui), ue.resolveKeyframes(Gi))) : (this.readKeyframes(), this.complete());
1642
1642
  }
1643
1643
  readKeyframes() {
1644
1644
  const { unresolvedKeyframes: e, name: n, element: r, motionValue: i } = this;
@@ -1652,7 +1652,7 @@ class pn {
1652
1652
  }
1653
1653
  e[0] === void 0 && (e[0] = a), i && s === void 0 && i.set(e[0]);
1654
1654
  }
1655
- co(e);
1655
+ uo(e);
1656
1656
  }
1657
1657
  setFinalKeyframe() {
1658
1658
  }
@@ -1672,31 +1672,31 @@ class pn {
1672
1672
  this.state === "pending" && this.scheduleResolve();
1673
1673
  }
1674
1674
  }
1675
- const bo = (t) => t.startsWith("--");
1676
- function Co(t, e, n) {
1677
- bo(e) ? t.style.setProperty(e, n) : t.style[e] = n;
1675
+ const Co = (t) => t.startsWith("--");
1676
+ function xo(t, e, n) {
1677
+ Co(e) ? t.style.setProperty(e, n) : t.style[e] = n;
1678
1678
  }
1679
1679
  // @__NO_SIDE_EFFECTS__
1680
1680
  function mn(t) {
1681
1681
  let e;
1682
1682
  return () => (e === void 0 && (e = t()), e);
1683
1683
  }
1684
- const xo = /* @__PURE__ */ mn(() => window.ScrollTimeline !== void 0), wo = {};
1685
- function ko(t, e) {
1684
+ const wo = /* @__PURE__ */ mn(() => window.ScrollTimeline !== void 0), ko = {};
1685
+ function Eo(t, e) {
1686
1686
  const n = /* @__PURE__ */ mn(t);
1687
1687
  return () => {
1688
1688
  var r;
1689
- return (r = wo[e]) != null ? r : n();
1689
+ return (r = ko[e]) != null ? r : n();
1690
1690
  };
1691
1691
  }
1692
- const Ui = /* @__PURE__ */ ko(() => {
1692
+ const Hi = /* @__PURE__ */ Eo(() => {
1693
1693
  try {
1694
1694
  document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
1695
1695
  } catch (t) {
1696
1696
  return !1;
1697
1697
  }
1698
1698
  return !0;
1699
- }, "linearEasing"), tt = ([t, e, n, r]) => `cubic-bezier(${t}, ${e}, ${n}, ${r})`, Fr = {
1699
+ }, "linearEasing"), tt = ([t, e, n, r]) => `cubic-bezier(${t}, ${e}, ${n}, ${r})`, zr = {
1700
1700
  linear: "linear",
1701
1701
  ease: "ease",
1702
1702
  easeIn: "ease-in",
@@ -1707,43 +1707,43 @@ const Ui = /* @__PURE__ */ ko(() => {
1707
1707
  backIn: /* @__PURE__ */ tt([0.31, 0.01, 0.66, -0.59]),
1708
1708
  backOut: /* @__PURE__ */ tt([0.33, 1.53, 0.69, 0.99])
1709
1709
  };
1710
- function Hi(t, e) {
1710
+ function Zi(t, e) {
1711
1711
  if (t)
1712
- return typeof t == "function" ? Ui() ? _i(t, e) : "ease-out" : Fi(t) ? tt(t) : Array.isArray(t) ? t.map((n) => Hi(n, e) || Fr.easeOut) : Fr[t];
1712
+ return typeof t == "function" ? Hi() ? Pi(t, e) : "ease-out" : zi(t) ? tt(t) : Array.isArray(t) ? t.map((n) => Zi(n, e) || zr.easeOut) : zr[t];
1713
1713
  }
1714
- function Eo(t, e, n, { delay: r = 0, duration: i = 300, repeat: s = 0, repeatType: a = "loop", ease: o = "easeOut", times: c } = {}, u = void 0) {
1714
+ function Lo(t, e, n, { delay: r = 0, duration: i = 300, repeat: s = 0, repeatType: a = "loop", ease: o = "easeOut", times: c } = {}, u = void 0) {
1715
1715
  const d = {
1716
1716
  [e]: n
1717
1717
  };
1718
1718
  c && (d.offset = c);
1719
- const h = Hi(o, i);
1720
- Array.isArray(h) && (d.easing = h);
1721
- const m = {
1719
+ const p = Zi(o, i);
1720
+ Array.isArray(p) && (d.easing = p);
1721
+ const h = {
1722
1722
  delay: r,
1723
1723
  duration: i,
1724
- easing: Array.isArray(h) ? "linear" : h,
1724
+ easing: Array.isArray(p) ? "linear" : p,
1725
1725
  fill: "both",
1726
1726
  iterations: s + 1,
1727
1727
  direction: a === "reverse" ? "alternate" : "normal"
1728
1728
  };
1729
- return u && (m.pseudoElement = u), t.animate(d, m);
1729
+ return u && (h.pseudoElement = u), t.animate(d, h);
1730
1730
  }
1731
- function Lo(n) {
1731
+ function To(n) {
1732
1732
  var r = n, { type: t } = r, e = te(r, ["type"]);
1733
1733
  var i, s;
1734
- return Qt(t) && Ui() ? t.applyToOptions(e) : ((i = e.duration) != null || (e.duration = 300), (s = e.ease) != null || (e.ease = "easeOut"), e);
1734
+ return Qt(t) && Hi() ? t.applyToOptions(e) : ((i = e.duration) != null || (e.duration = 300), (s = e.ease) != null || (e.ease = "easeOut"), e);
1735
1735
  }
1736
- class To extends un {
1736
+ class Ao extends un {
1737
1737
  constructor(e) {
1738
1738
  if (super(), this.finishedTime = null, this.isStopped = !1, !e)
1739
1739
  return;
1740
1740
  const { element: n, name: r, keyframes: i, pseudoElement: s, allowFlatten: a = !1, finalKeyframe: o, onComplete: c } = e;
1741
1741
  this.isPseudoElement = !!s, this.allowFlatten = a, this.options = e, ce(typeof e.type != "string", `animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);
1742
- const u = Lo(e);
1743
- this.animation = Eo(n, r, i, u, s), u.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
1742
+ const u = To(e);
1743
+ this.animation = Lo(n, r, i, u, s), u.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
1744
1744
  if (this.finishedTime = this.time, !s) {
1745
1745
  const d = dn(i, this.options, o, this.speed);
1746
- this.updateMotionValue ? this.updateMotionValue(d) : Co(n, r, d), this.animation.cancel();
1746
+ this.updateMotionValue ? this.updateMotionValue(d) : xo(n, r, d), this.animation.cancel();
1747
1747
  }
1748
1748
  c == null || c(), this.notifyFinished();
1749
1749
  };
@@ -1822,24 +1822,24 @@ class To extends un {
1822
1822
  */
1823
1823
  attachTimeline({ timeline: e, observe: n }) {
1824
1824
  var r;
1825
- return this.allowFlatten && ((r = this.animation.effect) == null || r.updateTiming({ easing: "linear" })), this.animation.onfinish = null, e && xo() ? (this.animation.timeline = e, Pe) : n(this);
1825
+ return this.allowFlatten && ((r = this.animation.effect) == null || r.updateTiming({ easing: "linear" })), this.animation.onfinish = null, e && wo() ? (this.animation.timeline = e, Pe) : n(this);
1826
1826
  }
1827
1827
  }
1828
- const Zi = {
1829
- anticipate: Ki,
1830
- backInOut: qi,
1831
- circInOut: Bi
1828
+ const Yi = {
1829
+ anticipate: Bi,
1830
+ backInOut: Ki,
1831
+ circInOut: Fi
1832
1832
  };
1833
- function Ao(t) {
1834
- return t in Zi;
1835
- }
1836
1833
  function Vo(t) {
1837
- typeof t.ease == "string" && Ao(t.ease) && (t.ease = Zi[t.ease]);
1834
+ return t in Yi;
1835
+ }
1836
+ function Io(t) {
1837
+ typeof t.ease == "string" && Vo(t.ease) && (t.ease = Yi[t.ease]);
1838
1838
  }
1839
- const zr = 10;
1840
- class Io extends To {
1839
+ const $r = 10;
1840
+ class So extends Ao {
1841
1841
  constructor(e) {
1842
- Vo(e), zi(e), super(e), e.startTime && (this.startTime = e.startTime), this.options = e;
1842
+ Io(e), $i(e), super(e), e.startTime && (this.startTime = e.startTime), this.options = e;
1843
1843
  }
1844
1844
  /**
1845
1845
  * WAAPI doesn't natively have any interruption capabilities.
@@ -1858,16 +1858,16 @@ class Io extends To {
1858
1858
  n.set(e);
1859
1859
  return;
1860
1860
  }
1861
- const o = new hn(M(L({}, a), {
1861
+ const o = new pn(M(L({}, a), {
1862
1862
  autoplay: !1
1863
1863
  })), c = /* @__PURE__ */ ne((d = this.finishedTime) != null ? d : this.time);
1864
- n.setWithVelocity(o.sample(c - zr).value, o.sample(c).value, zr), o.stop();
1864
+ n.setWithVelocity(o.sample(c - $r).value, o.sample(c).value, $r), o.stop();
1865
1865
  }
1866
1866
  }
1867
- const $r = (t, e) => e === "zIndex" ? !1 : !!(typeof t == "number" || Array.isArray(t) || typeof t == "string" && // It's animatable if we have a string
1867
+ const Gr = (t, e) => e === "zIndex" ? !1 : !!(typeof t == "number" || Array.isArray(t) || typeof t == "string" && // It's animatable if we have a string
1868
1868
  (Oe.test(t) || t === "0") && // And it contains numbers and/or colors
1869
1869
  !t.startsWith("url("));
1870
- function So(t) {
1870
+ function Mo(t) {
1871
1871
  const e = t[0];
1872
1872
  if (t.length === 1)
1873
1873
  return !0;
@@ -1875,51 +1875,51 @@ function So(t) {
1875
1875
  if (t[n] !== e)
1876
1876
  return !0;
1877
1877
  }
1878
- function Mo(t, e, n, r) {
1878
+ function _o(t, e, n, r) {
1879
1879
  const i = t[0];
1880
1880
  if (i === null)
1881
1881
  return !1;
1882
1882
  if (e === "display" || e === "visibility")
1883
1883
  return !0;
1884
- const s = t[t.length - 1], a = $r(i, e), o = $r(s, e);
1885
- return ct(a === o, `You are trying to animate ${e} from "${i}" to "${s}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${s} via the \`style\` property.`), !a || !o ? !1 : So(t) || (n === "spring" || Qt(n)) && r;
1884
+ const s = t[t.length - 1], a = Gr(i, e), o = Gr(s, e);
1885
+ return ct(a === o, `You are trying to animate ${e} from "${i}" to "${s}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${s} via the \`style\` property.`), !a || !o ? !1 : Mo(t) || (n === "spring" || Qt(n)) && r;
1886
1886
  }
1887
- function Yi(t) {
1887
+ function Wi(t) {
1888
1888
  return typeof t == "object" && t !== null;
1889
1889
  }
1890
- function _o(t) {
1891
- return Yi(t) && "offsetHeight" in t;
1890
+ function Po(t) {
1891
+ return Wi(t) && "offsetHeight" in t;
1892
1892
  }
1893
- const Po = /* @__PURE__ */ new Set([
1893
+ const Do = /* @__PURE__ */ new Set([
1894
1894
  "opacity",
1895
1895
  "clipPath",
1896
1896
  "filter",
1897
1897
  "transform"
1898
1898
  // TODO: Could be re-enabled now we have support for linear() easing
1899
1899
  // "background-color"
1900
- ]), Do = /* @__PURE__ */ mn(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
1901
- function No(t) {
1900
+ ]), No = /* @__PURE__ */ mn(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
1901
+ function Ro(t) {
1902
1902
  var u;
1903
1903
  const { motionValue: e, name: n, repeatDelay: r, repeatType: i, damping: s, type: a } = t;
1904
- if (!_o((u = e == null ? void 0 : e.owner) == null ? void 0 : u.current))
1904
+ if (!Po((u = e == null ? void 0 : e.owner) == null ? void 0 : u.current))
1905
1905
  return !1;
1906
1906
  const { onUpdate: o, transformTemplate: c } = e.owner.getProps();
1907
- return Do() && n && Po.has(n) && (n !== "transform" || !c) && /**
1907
+ return No() && n && Do.has(n) && (n !== "transform" || !c) && /**
1908
1908
  * If we're outputting values to onUpdate then we can't use WAAPI as there's
1909
1909
  * no way to read the value from WAAPI every frame.
1910
1910
  */
1911
1911
  !o && !r && i !== "mirror" && s !== 0 && a !== "inertia";
1912
1912
  }
1913
- const Ro = 40;
1914
- class Oo extends un {
1915
- constructor(m) {
1916
- var f = m, { autoplay: e = !0, delay: n = 0, type: r = "keyframes", repeat: i = 0, repeatDelay: s = 0, repeatType: a = "loop", keyframes: o, name: c, motionValue: u, element: d } = f, h = te(f, ["autoplay", "delay", "type", "repeat", "repeatDelay", "repeatType", "keyframes", "name", "motionValue", "element"]);
1913
+ const Oo = 40;
1914
+ class jo extends un {
1915
+ constructor(h) {
1916
+ var f = h, { autoplay: e = !0, delay: n = 0, type: r = "keyframes", repeat: i = 0, repeatDelay: s = 0, repeatType: a = "loop", keyframes: o, name: c, motionValue: u, element: d } = f, p = te(f, ["autoplay", "delay", "type", "repeat", "repeatDelay", "repeatType", "keyframes", "name", "motionValue", "element"]);
1917
1917
  var y;
1918
1918
  super(), this.stop = () => {
1919
1919
  var b, A;
1920
1920
  this._animation && (this._animation.stop(), (b = this.stopTimeline) == null || b.call(this)), (A = this.keyframeResolver) == null || A.cancel();
1921
1921
  }, this.createdAt = W.now();
1922
- const p = L({
1922
+ const m = L({
1923
1923
  autoplay: e,
1924
1924
  delay: n,
1925
1925
  type: r,
@@ -1929,21 +1929,21 @@ class Oo extends un {
1929
1929
  name: c,
1930
1930
  motionValue: u,
1931
1931
  element: d
1932
- }, h), g = (d == null ? void 0 : d.KeyframeResolver) || pn;
1933
- this.keyframeResolver = new g(o, (b, A, k) => this.onKeyframesResolved(b, A, p, !k), c, u, d), (y = this.keyframeResolver) == null || y.scheduleResolve();
1932
+ }, p), g = (d == null ? void 0 : d.KeyframeResolver) || hn;
1933
+ this.keyframeResolver = new g(o, (b, A, k) => this.onKeyframesResolved(b, A, m, !k), c, u, d), (y = this.keyframeResolver) == null || y.scheduleResolve();
1934
1934
  }
1935
1935
  onKeyframesResolved(e, n, r, i) {
1936
1936
  this.keyframeResolver = void 0;
1937
1937
  const { name: s, type: a, velocity: o, delay: c, isHandoff: u, onUpdate: d } = r;
1938
- this.resolvedAt = W.now(), Mo(e, s, a, o) || ((de.instantAnimations || !c) && (d == null || d(dn(e, r, n))), e[0] = e[e.length - 1], r.duration = 0, r.repeat = 0);
1939
- const h = i ? this.resolvedAt ? this.resolvedAt - this.createdAt > Ro ? this.resolvedAt : this.createdAt : this.createdAt : void 0, m = M(L({
1940
- startTime: h,
1938
+ this.resolvedAt = W.now(), _o(e, s, a, o) || ((de.instantAnimations || !c) && (d == null || d(dn(e, r, n))), e[0] = e[e.length - 1], r.duration = 0, r.repeat = 0);
1939
+ const p = i ? this.resolvedAt ? this.resolvedAt - this.createdAt > Oo ? this.resolvedAt : this.createdAt : this.createdAt : void 0, h = M(L({
1940
+ startTime: p,
1941
1941
  finalKeyframe: n
1942
1942
  }, r), {
1943
1943
  keyframes: e
1944
- }), f = !u && No(m) ? new Io(M(L({}, m), {
1945
- element: m.motionValue.owner.current
1946
- })) : new hn(m);
1944
+ }), f = !u && Ro(h) ? new So(M(L({}, h), {
1945
+ element: h.motionValue.owner.current
1946
+ })) : new pn(h);
1947
1947
  f.finished.then(() => this.notifyFinished()).catch(Pe), this.pendingTimeline && (this.stopTimeline = f.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = f;
1948
1948
  }
1949
1949
  get finished() {
@@ -1955,7 +1955,7 @@ class Oo extends un {
1955
1955
  }
1956
1956
  get animation() {
1957
1957
  var e;
1958
- return this._animation || ((e = this.keyframeResolver) == null || e.resume(), vo()), this._animation;
1958
+ return this._animation || ((e = this.keyframeResolver) == null || e.resume(), bo()), this._animation;
1959
1959
  }
1960
1960
  get duration() {
1961
1961
  return this.animation.duration;
@@ -1995,8 +1995,8 @@ class Oo extends un {
1995
1995
  this._animation && this.animation.cancel(), (e = this.keyframeResolver) == null || e.cancel();
1996
1996
  }
1997
1997
  }
1998
- const Wi = (t, e, n, r = {}, i, s) => (a) => {
1999
- const o = wi(r, t) || {}, c = o.delay || r.delay || 0;
1998
+ const Ji = (t, e, n, r = {}, i, s) => (a) => {
1999
+ const o = ki(r, t) || {}, c = o.delay || r.delay || 0;
2000
2000
  let { elapsed: u = 0 } = r;
2001
2001
  u = u - /* @__PURE__ */ ne(c);
2002
2002
  const d = M(L({
@@ -2005,8 +2005,8 @@ const Wi = (t, e, n, r = {}, i, s) => (a) => {
2005
2005
  velocity: e.getVelocity()
2006
2006
  }, o), {
2007
2007
  delay: -u,
2008
- onUpdate: (m) => {
2009
- e.set(m), o.onUpdate && o.onUpdate(m);
2008
+ onUpdate: (h) => {
2009
+ e.set(h), o.onUpdate && o.onUpdate(h);
2010
2010
  },
2011
2011
  onComplete: () => {
2012
2012
  a(), o.onComplete && o.onComplete();
@@ -2015,19 +2015,19 @@ const Wi = (t, e, n, r = {}, i, s) => (a) => {
2015
2015
  motionValue: e,
2016
2016
  element: s ? void 0 : i
2017
2017
  });
2018
- ga(o) || Object.assign(d, fa(t, d)), d.duration && (d.duration = /* @__PURE__ */ ne(d.duration)), d.repeatDelay && (d.repeatDelay = /* @__PURE__ */ ne(d.repeatDelay)), d.from !== void 0 && (d.keyframes[0] = d.from);
2019
- let h = !1;
2020
- if ((d.type === !1 || d.duration === 0 && !d.repeatDelay) && (d.duration = 0, d.delay === 0 && (h = !0)), (de.instantAnimations || de.skipAnimations) && (h = !0, d.duration = 0, d.delay = 0), d.allowFlatten = !o.type && !o.ease, h && !s && e.get() !== void 0) {
2021
- const m = da(d.keyframes, o);
2022
- if (m !== void 0) {
2018
+ ya(o) || Object.assign(d, ga(t, d)), d.duration && (d.duration = /* @__PURE__ */ ne(d.duration)), d.repeatDelay && (d.repeatDelay = /* @__PURE__ */ ne(d.repeatDelay)), d.from !== void 0 && (d.keyframes[0] = d.from);
2019
+ let p = !1;
2020
+ if ((d.type === !1 || d.duration === 0 && !d.repeatDelay) && (d.duration = 0, d.delay === 0 && (p = !0)), (de.instantAnimations || de.skipAnimations) && (p = !0, d.duration = 0, d.delay = 0), d.allowFlatten = !o.type && !o.ease, p && !s && e.get() !== void 0) {
2021
+ const h = ua(d.keyframes, o);
2022
+ if (h !== void 0) {
2023
2023
  ue.update(() => {
2024
- d.onUpdate(m), d.onComplete();
2024
+ d.onUpdate(h), d.onComplete();
2025
2025
  });
2026
2026
  return;
2027
2027
  }
2028
2028
  }
2029
- return o.isSync ? new hn(d) : new Oo(d);
2030
- }, Ji = /* @__PURE__ */ new Set([
2029
+ return o.isSync ? new pn(d) : new jo(d);
2030
+ }, Xi = /* @__PURE__ */ new Set([
2031
2031
  "width",
2032
2032
  "height",
2033
2033
  "top",
@@ -2036,49 +2036,49 @@ const Wi = (t, e, n, r = {}, i, s) => (a) => {
2036
2036
  "bottom",
2037
2037
  ...De
2038
2038
  ]);
2039
- function jo({ protectedKeys: t, needsAnimating: e }, n) {
2039
+ function qo({ protectedKeys: t, needsAnimating: e }, n) {
2040
2040
  const r = t.hasOwnProperty(n) && e[n] !== !0;
2041
2041
  return e[n] = !1, r;
2042
2042
  }
2043
- function qo(t, e, { delay: n = 0, transitionOverride: r, type: i } = {}) {
2044
- var h;
2043
+ function Ko(t, e, { delay: n = 0, transitionOverride: r, type: i } = {}) {
2044
+ var p;
2045
2045
  let d = e, { transition: s = t.getDefaultTransition(), transitionEnd: a } = d, o = te(d, ["transition", "transitionEnd"]);
2046
2046
  r && (s = r);
2047
2047
  const c = [], u = i && t.animationState && t.animationState.getState()[i];
2048
- for (const m in o) {
2049
- const f = t.getValue(m, (h = t.latestValues[m]) != null ? h : null), p = o[m];
2050
- if (p === void 0 || u && jo(u, m))
2048
+ for (const h in o) {
2049
+ const f = t.getValue(h, (p = t.latestValues[h]) != null ? p : null), m = o[h];
2050
+ if (m === void 0 || u && qo(u, h))
2051
2051
  continue;
2052
2052
  const g = L({
2053
2053
  delay: n
2054
- }, wi(s || {}, m)), y = f.get();
2055
- if (y !== void 0 && !f.isAnimating && !Array.isArray(p) && p === y && !g.velocity)
2054
+ }, ki(s || {}, h)), y = f.get();
2055
+ if (y !== void 0 && !f.isAnimating && !Array.isArray(m) && m === y && !g.velocity)
2056
2056
  continue;
2057
2057
  let b = !1;
2058
2058
  if (window.MotionHandoffAnimation) {
2059
- const k = la(t);
2059
+ const k = ca(t);
2060
2060
  if (k) {
2061
- const V = window.MotionHandoffAnimation(k, m, ue);
2061
+ const V = window.MotionHandoffAnimation(k, h, ue);
2062
2062
  V !== null && (g.startTime = V, b = !0);
2063
2063
  }
2064
2064
  }
2065
- sa(t, m), f.start(Wi(m, f, p, t.shouldReduceMotion && Ji.has(m) ? { type: !1 } : g, t, b));
2065
+ aa(t, h), f.start(Ji(h, f, m, t.shouldReduceMotion && Xi.has(h) ? { type: !1 } : g, t, b));
2066
2066
  const A = f.animation;
2067
2067
  A && c.push(A);
2068
2068
  }
2069
2069
  return a && Promise.all(c).then(() => {
2070
2070
  ue.update(() => {
2071
- a && ra(t, a);
2071
+ a && ia(t, a);
2072
2072
  });
2073
2073
  }), c;
2074
2074
  }
2075
- function Ko({ top: t, left: e, right: n, bottom: r }) {
2075
+ function Bo({ top: t, left: e, right: n, bottom: r }) {
2076
2076
  return {
2077
2077
  x: { min: e, max: n },
2078
2078
  y: { min: t, max: r }
2079
2079
  };
2080
2080
  }
2081
- function Bo(t, e) {
2081
+ function Fo(t, e) {
2082
2082
  if (!e)
2083
2083
  return t;
2084
2084
  const n = e({ x: t.left, y: t.top }), r = e({ x: t.right, y: t.bottom });
@@ -2089,10 +2089,10 @@ function Bo(t, e) {
2089
2089
  right: r.x
2090
2090
  };
2091
2091
  }
2092
- function Fo(t, e) {
2093
- return Ko(Bo(t.getBoundingClientRect(), e));
2092
+ function zo(t, e) {
2093
+ return Bo(Fo(t.getBoundingClientRect(), e));
2094
2094
  }
2095
- const Gr = {
2095
+ const Ur = {
2096
2096
  animation: [
2097
2097
  "animate",
2098
2098
  "variants",
@@ -2112,29 +2112,29 @@ const Gr = {
2112
2112
  inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
2113
2113
  layout: ["layout", "layoutId"]
2114
2114
  }, Ut = {};
2115
- for (const t in Gr)
2115
+ for (const t in Ur)
2116
2116
  Ut[t] = {
2117
- isEnabled: (e) => Gr[t].some((n) => !!e[n])
2117
+ isEnabled: (e) => Ur[t].some((n) => !!e[n])
2118
2118
  };
2119
- const Ur = () => ({ min: 0, max: 0 }), fn = () => ({
2120
- x: Ur(),
2121
- y: Ur()
2122
- }), zo = typeof window != "undefined", Ht = { current: null }, Xi = { current: !1 };
2123
- function $o() {
2124
- if (Xi.current = !0, !!zo)
2119
+ const Hr = () => ({ min: 0, max: 0 }), fn = () => ({
2120
+ x: Hr(),
2121
+ y: Hr()
2122
+ }), $o = typeof window != "undefined", Ht = { current: null }, Qi = { current: !1 };
2123
+ function Go() {
2124
+ if (Qi.current = !0, !!$o)
2125
2125
  if (window.matchMedia) {
2126
2126
  const t = window.matchMedia("(prefers-reduced-motion)"), e = () => Ht.current = t.matches;
2127
2127
  t.addListener(e), e();
2128
2128
  } else
2129
2129
  Ht.current = !1;
2130
2130
  }
2131
- function Go(t) {
2131
+ function Uo(t) {
2132
2132
  return t !== null && typeof t == "object" && typeof t.start == "function";
2133
2133
  }
2134
- function Uo(t) {
2134
+ function Ho(t) {
2135
2135
  return typeof t == "string" || Array.isArray(t);
2136
2136
  }
2137
- const Ho = [
2137
+ const Zo = [
2138
2138
  "animate",
2139
2139
  "whileInView",
2140
2140
  "whileFocus",
@@ -2142,14 +2142,14 @@ const Ho = [
2142
2142
  "whileTap",
2143
2143
  "whileDrag",
2144
2144
  "exit"
2145
- ], Zo = ["initial", ...Ho];
2146
- function Qi(t) {
2147
- return Go(t.animate) || Zo.some((e) => Uo(t[e]));
2145
+ ], Yo = ["initial", ...Zo];
2146
+ function es(t) {
2147
+ return Uo(t.animate) || Yo.some((e) => Ho(t[e]));
2148
2148
  }
2149
- function Yo(t) {
2150
- return !!(Qi(t) || t.variants);
2149
+ function Wo(t) {
2150
+ return !!(es(t) || t.variants);
2151
2151
  }
2152
- function Wo(t, e, n) {
2152
+ function Jo(t, e, n) {
2153
2153
  for (const r in e) {
2154
2154
  const i = e[r], s = n[r];
2155
2155
  if (H(i))
@@ -2169,11 +2169,11 @@ function Wo(t, e, n) {
2169
2169
  e[r] === void 0 && t.removeValue(r);
2170
2170
  return e;
2171
2171
  }
2172
- const es = (t) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t), ts = (t) => /^0[^.\s]+$/u.test(t), Jo = {
2172
+ const ts = (t) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t), ns = (t) => /^0[^.\s]+$/u.test(t), Xo = {
2173
2173
  test: (t) => t === "auto",
2174
2174
  parse: (t) => t
2175
- }, ns = (t) => (e) => e.test(t), rs = [Re, E, Me, be, Ea, ka, Jo], Hr = (t) => rs.find(ns(t)), Xo = [...rs, F, Oe], Qo = (t) => Xo.find(ns(t)), el = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
2176
- function tl(t) {
2175
+ }, rs = (t) => (e) => e.test(t), is = [Re, E, Me, be, La, Ea, Xo], Zr = (t) => is.find(rs(t)), Qo = [...is, F, Oe], el = (t) => Qo.find(rs(t)), tl = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
2176
+ function nl(t) {
2177
2177
  const [e, n] = t.slice(0, -1).split("(");
2178
2178
  if (e === "drop-shadow")
2179
2179
  return t;
@@ -2181,17 +2181,17 @@ function tl(t) {
2181
2181
  if (!r)
2182
2182
  return t;
2183
2183
  const i = n.replace(r, "");
2184
- let s = el.has(e) ? 1 : 0;
2184
+ let s = tl.has(e) ? 1 : 0;
2185
2185
  return r !== n && (s *= 100), e + "(" + s + i + ")";
2186
2186
  }
2187
- const nl = /\b([a-z-]*)\(.*?\)/gu, Zt = M(L({}, Oe), {
2187
+ const rl = /\b([a-z-]*)\(.*?\)/gu, Zt = M(L({}, Oe), {
2188
2188
  getAnimatableNone: (t) => {
2189
- const e = t.match(nl);
2190
- return e ? e.map(tl).join(" ") : t;
2189
+ const e = t.match(rl);
2190
+ return e ? e.map(nl).join(" ") : t;
2191
2191
  }
2192
- }), Zr = M(L({}, Re), {
2192
+ }), Yr = M(L({}, Re), {
2193
2193
  transform: Math.round
2194
- }), rl = {
2194
+ }), il = {
2195
2195
  rotate: be,
2196
2196
  rotateX: be,
2197
2197
  rotateY: be,
@@ -2213,8 +2213,8 @@ const nl = /\b([a-z-]*)\(.*?\)/gu, Zt = M(L({}, Oe), {
2213
2213
  perspective: E,
2214
2214
  transformPerspective: E,
2215
2215
  opacity: st,
2216
- originX: Sr,
2217
- originY: Sr,
2216
+ originX: Mr,
2217
+ originY: Mr,
2218
2218
  originZ: E
2219
2219
  }, gn = M(L({
2220
2220
  // Border props
@@ -2252,13 +2252,13 @@ const nl = /\b([a-z-]*)\(.*?\)/gu, Zt = M(L({}, Oe), {
2252
2252
  // Misc
2253
2253
  backgroundPositionX: E,
2254
2254
  backgroundPositionY: E
2255
- }, rl), {
2256
- zIndex: Zr,
2255
+ }, il), {
2256
+ zIndex: Yr,
2257
2257
  // SVG
2258
2258
  fillOpacity: st,
2259
2259
  strokeOpacity: st,
2260
- numOctaves: Zr
2261
- }), il = M(L({}, gn), {
2260
+ numOctaves: Yr
2261
+ }), sl = M(L({}, gn), {
2262
2262
  // Color props
2263
2263
  color: F,
2264
2264
  backgroundColor: F,
@@ -2273,12 +2273,12 @@ const nl = /\b([a-z-]*)\(.*?\)/gu, Zt = M(L({}, Oe), {
2273
2273
  borderLeftColor: F,
2274
2274
  filter: Zt,
2275
2275
  WebkitFilter: Zt
2276
- }), is = (t) => il[t];
2277
- function ss(t, e) {
2278
- let n = is(t);
2276
+ }), ss = (t) => sl[t];
2277
+ function as(t, e) {
2278
+ let n = ss(t);
2279
2279
  return n !== Zt && (n = Oe), n.getAnimatableNone ? n.getAnimatableNone(e) : void 0;
2280
2280
  }
2281
- const Yr = [
2281
+ const Wr = [
2282
2282
  "AnimationStart",
2283
2283
  "AnimationComplete",
2284
2284
  "Update",
@@ -2287,7 +2287,7 @@ const Yr = [
2287
2287
  "LayoutAnimationStart",
2288
2288
  "LayoutAnimationComplete"
2289
2289
  ];
2290
- class as {
2290
+ class os {
2291
2291
  /**
2292
2292
  * This method takes React props and returns found MotionValues. For example, HTML
2293
2293
  * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
@@ -2299,22 +2299,22 @@ class as {
2299
2299
  return {};
2300
2300
  }
2301
2301
  constructor({ parent: e, props: n, presenceContext: r, reducedMotionConfig: i, blockInitialAnimation: s, visualState: a }, o = {}) {
2302
- this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = pn, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
2302
+ this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = hn, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
2303
2303
  this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
2304
2304
  }, this.renderScheduledAt = 0, this.scheduleRender = () => {
2305
2305
  const f = W.now();
2306
2306
  this.renderScheduledAt < f && (this.renderScheduledAt = f, ue.render(this.render, !1, !0));
2307
2307
  };
2308
2308
  const { latestValues: c, renderState: u } = a;
2309
- this.latestValues = c, this.baseTarget = L({}, c), this.initialValues = n.initial ? L({}, c) : {}, this.renderState = u, this.parent = e, this.props = n, this.presenceContext = r, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = i, this.options = o, this.blockInitialAnimation = !!s, this.isControllingVariants = Qi(n), this.isVariantNode = Yo(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
2310
- const m = this.scrapeMotionValuesFromProps(n, {}, this), { willChange: d } = m, h = te(m, ["willChange"]);
2311
- for (const f in h) {
2312
- const p = h[f];
2313
- c[f] !== void 0 && H(p) && p.set(c[f], !1);
2309
+ this.latestValues = c, this.baseTarget = L({}, c), this.initialValues = n.initial ? L({}, c) : {}, this.renderState = u, this.parent = e, this.props = n, this.presenceContext = r, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = i, this.options = o, this.blockInitialAnimation = !!s, this.isControllingVariants = es(n), this.isVariantNode = Wo(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
2310
+ const h = this.scrapeMotionValuesFromProps(n, {}, this), { willChange: d } = h, p = te(h, ["willChange"]);
2311
+ for (const f in p) {
2312
+ const m = p[f];
2313
+ c[f] !== void 0 && H(m) && m.set(c[f], !1);
2314
2314
  }
2315
2315
  }
2316
2316
  mount(e) {
2317
- this.current = e, rt.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, r) => this.bindToMotionValue(r, n)), Xi.current || $o(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : Ht.current, process.env.NODE_ENV !== "production" && bi(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);
2317
+ this.current = e, rt.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, r) => this.bindToMotionValue(r, n)), Qi.current || Go(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : Ht.current, process.env.NODE_ENV !== "production" && Ci(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected."), this.parent && this.parent.children.add(this), this.update(this.props, this.presenceContext);
2318
2318
  }
2319
2319
  unmount() {
2320
2320
  this.projection && this.projection.unmount(), Dt(this.notifyUpdate), Dt(this.render), this.valueSubscriptions.forEach((e) => e()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
@@ -2377,13 +2377,13 @@ class as {
2377
2377
  */
2378
2378
  update(e, n) {
2379
2379
  (e.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = e, this.prevPresenceContext = this.presenceContext, this.presenceContext = n;
2380
- for (let r = 0; r < Yr.length; r++) {
2381
- const i = Yr[r];
2380
+ for (let r = 0; r < Wr.length; r++) {
2381
+ const i = Wr[r];
2382
2382
  this.propEventSubscriptions[i] && (this.propEventSubscriptions[i](), delete this.propEventSubscriptions[i]);
2383
2383
  const s = "on" + i, a = e[s];
2384
2384
  a && (this.propEventSubscriptions[i] = this.on(i, a));
2385
2385
  }
2386
- this.prevMotionValues = Wo(this, this.scrapeMotionValuesFromProps(e, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
2386
+ this.prevMotionValues = Jo(this, this.scrapeMotionValuesFromProps(e, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
2387
2387
  }
2388
2388
  getProps() {
2389
2389
  return this.props;
@@ -2449,7 +2449,7 @@ class as {
2449
2449
  readValue(e, n) {
2450
2450
  var i;
2451
2451
  let r = this.latestValues[e] !== void 0 || !this.current ? this.latestValues[e] : (i = this.getBaseTargetFromProps(this.props, e)) != null ? i : this.readValueFromInstance(this.current, e, this.options);
2452
- return r != null && (typeof r == "string" && (es(r) || ts(r)) ? r = parseFloat(r) : !Qo(r) && Oe.test(n) && (r = ss(e, n)), this.setBaseTarget(e, H(r) ? r.get() : r)), H(r) ? r.get() : r;
2452
+ return r != null && (typeof r == "string" && (ts(r) || ns(r)) ? r = parseFloat(r) : !el(r) && Oe.test(n) && (r = as(e, n)), this.setBaseTarget(e, H(r) ? r.get() : r)), H(r) ? r.get() : r;
2453
2453
  }
2454
2454
  /**
2455
2455
  * Set the base target to later animate back to. This is currently
@@ -2467,7 +2467,7 @@ class as {
2467
2467
  const { initial: n } = this.props;
2468
2468
  let r;
2469
2469
  if (typeof n == "string" || typeof n == "object") {
2470
- const a = vi(this.props, n, (s = this.presenceContext) == null ? void 0 : s.custom);
2470
+ const a = bi(this.props, n, (s = this.presenceContext) == null ? void 0 : s.custom);
2471
2471
  a && (r = a[e]);
2472
2472
  }
2473
2473
  if (n && r !== void 0)
@@ -2476,51 +2476,51 @@ class as {
2476
2476
  return i !== void 0 && !H(i) ? i : this.initialValues[e] !== void 0 && r === void 0 ? void 0 : this.baseTarget[e];
2477
2477
  }
2478
2478
  on(e, n) {
2479
- return this.events[e] || (this.events[e] = new Ci()), this.events[e].add(n);
2479
+ return this.events[e] || (this.events[e] = new xi()), this.events[e].add(n);
2480
2480
  }
2481
2481
  notify(e, ...n) {
2482
2482
  this.events[e] && this.events[e].notify(...n);
2483
2483
  }
2484
2484
  }
2485
- const sl = (
2485
+ const al = (
2486
2486
  // eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
2487
2487
  /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
2488
2488
  );
2489
- function al(t) {
2490
- const e = sl.exec(t);
2489
+ function ol(t) {
2490
+ const e = al.exec(t);
2491
2491
  if (!e)
2492
2492
  return [,];
2493
2493
  const [, n, r, i] = e;
2494
2494
  return [`--${n != null ? n : r}`, i];
2495
2495
  }
2496
- const ol = 4;
2497
- function os(t, e, n = 1) {
2498
- ce(n <= ol, `Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);
2499
- const [r, i] = al(t);
2496
+ const ll = 4;
2497
+ function ls(t, e, n = 1) {
2498
+ ce(n <= ll, `Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);
2499
+ const [r, i] = ol(t);
2500
2500
  if (!r)
2501
2501
  return;
2502
2502
  const s = window.getComputedStyle(e).getPropertyValue(r);
2503
2503
  if (s) {
2504
2504
  const a = s.trim();
2505
- return es(a) ? parseFloat(a) : a;
2505
+ return ts(a) ? parseFloat(a) : a;
2506
2506
  }
2507
- return nn(i) ? os(i, e, n + 1) : i;
2507
+ return nn(i) ? ls(i, e, n + 1) : i;
2508
2508
  }
2509
- function ll(t) {
2510
- return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" || ts(t) : !0;
2509
+ function cl(t) {
2510
+ return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" || ns(t) : !0;
2511
2511
  }
2512
- const cl = /* @__PURE__ */ new Set(["auto", "none", "0"]);
2513
- function dl(t, e, n) {
2512
+ const dl = /* @__PURE__ */ new Set(["auto", "none", "0"]);
2513
+ function ul(t, e, n) {
2514
2514
  let r = 0, i;
2515
2515
  for (; r < t.length && !i; ) {
2516
2516
  const s = t[r];
2517
- typeof s == "string" && !cl.has(s) && at(s).values.length && (i = t[r]), r++;
2517
+ typeof s == "string" && !dl.has(s) && at(s).values.length && (i = t[r]), r++;
2518
2518
  }
2519
2519
  if (i && n)
2520
2520
  for (const s of e)
2521
- t[s] = ss(n, i);
2521
+ t[s] = as(n, i);
2522
2522
  }
2523
- class ul extends pn {
2523
+ class pl extends hn {
2524
2524
  constructor(e, n, r, i, s) {
2525
2525
  super(e, n, r, i, s, !0);
2526
2526
  }
@@ -2532,15 +2532,15 @@ class ul extends pn {
2532
2532
  for (let c = 0; c < e.length; c++) {
2533
2533
  let u = e[c];
2534
2534
  if (typeof u == "string" && (u = u.trim(), nn(u))) {
2535
- const d = os(u, n.current);
2535
+ const d = ls(u, n.current);
2536
2536
  d !== void 0 && (e[c] = d), c === e.length - 1 && (this.finalKeyframe = u);
2537
2537
  }
2538
2538
  }
2539
- if (this.resolveNoneKeyframes(), !Ji.has(r) || e.length !== 2)
2539
+ if (this.resolveNoneKeyframes(), !Xi.has(r) || e.length !== 2)
2540
2540
  return;
2541
- const [i, s] = e, a = Hr(i), o = Hr(s);
2541
+ const [i, s] = e, a = Zr(i), o = Zr(s);
2542
2542
  if (a !== o)
2543
- if (Br(a) && Br(o))
2543
+ if (Fr(a) && Fr(o))
2544
2544
  for (let c = 0; c < e.length; c++) {
2545
2545
  const u = e[c];
2546
2546
  typeof u == "string" && (e[c] = parseFloat(u));
@@ -2550,8 +2550,8 @@ class ul extends pn {
2550
2550
  resolveNoneKeyframes() {
2551
2551
  const { unresolvedKeyframes: e, name: n } = this, r = [];
2552
2552
  for (let i = 0; i < e.length; i++)
2553
- (e[i] === null || ll(e[i])) && r.push(i);
2554
- r.length && dl(e, r, n);
2553
+ (e[i] === null || cl(e[i])) && r.push(i);
2554
+ r.length && ul(e, r, n);
2555
2555
  }
2556
2556
  measureInitialState() {
2557
2557
  const { element: e, unresolvedKeyframes: n, name: r } = this;
@@ -2574,9 +2574,9 @@ class ul extends pn {
2574
2574
  }), this.resolveNoneKeyframes();
2575
2575
  }
2576
2576
  }
2577
- class ls extends as {
2577
+ class cs extends os {
2578
2578
  constructor() {
2579
- super(...arguments), this.KeyframeResolver = ul;
2579
+ super(...arguments), this.KeyframeResolver = pl;
2580
2580
  }
2581
2581
  sortInstanceNodePosition(e, n) {
2582
2582
  return e.compareDocumentPosition(n) & 2 ? 1 : -1;
@@ -2595,21 +2595,21 @@ class ls extends as {
2595
2595
  }));
2596
2596
  }
2597
2597
  }
2598
- const cs = (t, e) => e && typeof t == "number" ? e.transform(t) : t, hl = {
2598
+ const ds = (t, e) => e && typeof t == "number" ? e.transform(t) : t, hl = {
2599
2599
  x: "translateX",
2600
2600
  y: "translateY",
2601
2601
  z: "translateZ",
2602
2602
  transformPerspective: "perspective"
2603
- }, pl = De.length;
2604
- function ml(t, e, n) {
2603
+ }, ml = De.length;
2604
+ function fl(t, e, n) {
2605
2605
  let r = "", i = !0;
2606
- for (let s = 0; s < pl; s++) {
2606
+ for (let s = 0; s < ml; s++) {
2607
2607
  const a = De[s], o = t[a];
2608
2608
  if (o === void 0)
2609
2609
  continue;
2610
2610
  let c = !0;
2611
2611
  if (typeof o == "number" ? c = o === (a.startsWith("scale") ? 1 : 0) : c = parseFloat(o) === 0, !c || n) {
2612
- const u = cs(o, gn[a]);
2612
+ const u = ds(o, gn[a]);
2613
2613
  if (!c) {
2614
2614
  i = !1;
2615
2615
  const d = hl[a] || a;
@@ -2620,7 +2620,7 @@ function ml(t, e, n) {
2620
2620
  }
2621
2621
  return r = r.trim(), n ? r = n(e, i ? "" : r) : i && (r = "none"), r;
2622
2622
  }
2623
- function ds(t, e, n) {
2623
+ function us(t, e, n) {
2624
2624
  const { style: r, vars: i, transformOrigin: s } = t;
2625
2625
  let a = !1, o = !1;
2626
2626
  for (const c in e) {
@@ -2628,70 +2628,70 @@ function ds(t, e, n) {
2628
2628
  if (Ne.has(c)) {
2629
2629
  a = !0;
2630
2630
  continue;
2631
- } else if (Ei(c)) {
2631
+ } else if (Li(c)) {
2632
2632
  i[c] = u;
2633
2633
  continue;
2634
2634
  } else {
2635
- const d = cs(u, gn[c]);
2635
+ const d = ds(u, gn[c]);
2636
2636
  c.startsWith("origin") ? (o = !0, s[c] = d) : r[c] = d;
2637
2637
  }
2638
2638
  }
2639
- if (e.transform || (a || n ? r.transform = ml(e, t.transform, n) : r.transform && (r.transform = "none")), o) {
2639
+ if (e.transform || (a || n ? r.transform = fl(e, t.transform, n) : r.transform && (r.transform = "none")), o) {
2640
2640
  const { originX: c = "50%", originY: u = "50%", originZ: d = 0 } = s;
2641
2641
  r.transformOrigin = `${c} ${u} ${d}`;
2642
2642
  }
2643
2643
  }
2644
- function us(t, { style: e, vars: n }, r, i) {
2644
+ function ps(t, { style: e, vars: n }, r, i) {
2645
2645
  Object.assign(t.style, e, i && i.getProjectionStyles(r));
2646
2646
  for (const s in n)
2647
2647
  t.style.setProperty(s, n[s]);
2648
2648
  }
2649
- const fl = {};
2650
- function gl(t, { layout: e, layoutId: n }) {
2651
- return Ne.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!fl[t] || t === "opacity");
2649
+ const gl = {};
2650
+ function yl(t, { layout: e, layoutId: n }) {
2651
+ return Ne.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!gl[t] || t === "opacity");
2652
2652
  }
2653
2653
  function hs(t, e, n) {
2654
2654
  var s;
2655
2655
  const { style: r } = t, i = {};
2656
2656
  for (const a in r)
2657
- (H(r[a]) || e.style && H(e.style[a]) || gl(a, t) || ((s = n == null ? void 0 : n.getValue(a)) == null ? void 0 : s.liveStyle) !== void 0) && (i[a] = r[a]);
2657
+ (H(r[a]) || e.style && H(e.style[a]) || yl(a, t) || ((s = n == null ? void 0 : n.getValue(a)) == null ? void 0 : s.liveStyle) !== void 0) && (i[a] = r[a]);
2658
2658
  return i;
2659
2659
  }
2660
- function yl(t) {
2660
+ function vl(t) {
2661
2661
  return window.getComputedStyle(t);
2662
2662
  }
2663
- class vl extends ls {
2663
+ class bl extends cs {
2664
2664
  constructor() {
2665
- super(...arguments), this.type = "html", this.renderInstance = us;
2665
+ super(...arguments), this.type = "html", this.renderInstance = ps;
2666
2666
  }
2667
2667
  readValueFromInstance(e, n) {
2668
2668
  var r;
2669
2669
  if (Ne.has(n))
2670
- return (r = this.projection) != null && r.isProjecting ? Bt(n) : po(e, n);
2670
+ return (r = this.projection) != null && r.isProjecting ? Bt(n) : mo(e, n);
2671
2671
  {
2672
- const i = yl(e), s = (Ei(n) ? i.getPropertyValue(n) : i[n]) || 0;
2672
+ const i = vl(e), s = (Li(n) ? i.getPropertyValue(n) : i[n]) || 0;
2673
2673
  return typeof s == "string" ? s.trim() : s;
2674
2674
  }
2675
2675
  }
2676
2676
  measureInstanceViewportBox(e, { transformPagePoint: n }) {
2677
- return Fo(e, n);
2677
+ return zo(e, n);
2678
2678
  }
2679
2679
  build(e, n, r) {
2680
- ds(e, n, r.transformTemplate);
2680
+ us(e, n, r.transformTemplate);
2681
2681
  }
2682
2682
  scrapeMotionValuesFromProps(e, n, r) {
2683
2683
  return hs(e, n, r);
2684
2684
  }
2685
2685
  }
2686
- function bl(t, e) {
2686
+ function Cl(t, e) {
2687
2687
  return t in e;
2688
2688
  }
2689
- class Cl extends as {
2689
+ class xl extends os {
2690
2690
  constructor() {
2691
2691
  super(...arguments), this.type = "object";
2692
2692
  }
2693
2693
  readValueFromInstance(e, n) {
2694
- if (bl(n, e)) {
2694
+ if (Cl(n, e)) {
2695
2695
  const r = e[n];
2696
2696
  if (typeof r == "string" || typeof r == "number")
2697
2697
  return r;
@@ -2715,29 +2715,29 @@ class Cl extends as {
2715
2715
  return 0;
2716
2716
  }
2717
2717
  }
2718
- const xl = {
2718
+ const wl = {
2719
2719
  offset: "stroke-dashoffset",
2720
2720
  array: "stroke-dasharray"
2721
- }, wl = {
2721
+ }, kl = {
2722
2722
  offset: "strokeDashoffset",
2723
2723
  array: "strokeDasharray"
2724
2724
  };
2725
- function kl(t, e, n = 1, r = 0, i = !0) {
2725
+ function El(t, e, n = 1, r = 0, i = !0) {
2726
2726
  t.pathLength = 1;
2727
- const s = i ? xl : wl;
2727
+ const s = i ? wl : kl;
2728
2728
  t[s.offset] = E.transform(-r);
2729
2729
  const a = E.transform(e), o = E.transform(n);
2730
2730
  t[s.array] = `${a} ${o}`;
2731
2731
  }
2732
- function El(t, h, c, u, d) {
2733
- var m = h, {
2732
+ function Ll(t, p, c, u, d) {
2733
+ var h = p, {
2734
2734
  attrX: e,
2735
2735
  attrY: n,
2736
2736
  attrScale: r,
2737
2737
  pathLength: i,
2738
2738
  pathSpacing: s = 1,
2739
2739
  pathOffset: a = 0
2740
- } = m, o = te(m, [
2740
+ } = h, o = te(h, [
2741
2741
  "attrX",
2742
2742
  "attrY",
2743
2743
  "attrScale",
@@ -2746,15 +2746,15 @@ function El(t, h, c, u, d) {
2746
2746
  "pathOffset"
2747
2747
  ]);
2748
2748
  var g, y;
2749
- if (ds(t, o, u), c) {
2749
+ if (us(t, o, u), c) {
2750
2750
  t.style.viewBox && (t.attrs.viewBox = t.style.viewBox);
2751
2751
  return;
2752
2752
  }
2753
2753
  t.attrs = t.style, t.style = {};
2754
- const { attrs: f, style: p } = t;
2755
- f.transform && (p.transform = f.transform, delete f.transform), (p.transform || f.transformOrigin) && (p.transformOrigin = (g = f.transformOrigin) != null ? g : "50% 50%", delete f.transformOrigin), p.transform && (p.transformBox = (y = d == null ? void 0 : d.transformBox) != null ? y : "fill-box", delete f.transformBox), e !== void 0 && (f.x = e), n !== void 0 && (f.y = n), r !== void 0 && (f.scale = r), i !== void 0 && kl(f, i, s, a, !1);
2754
+ const { attrs: f, style: m } = t;
2755
+ f.transform && (m.transform = f.transform, delete f.transform), (m.transform || f.transformOrigin) && (m.transformOrigin = (g = f.transformOrigin) != null ? g : "50% 50%", delete f.transformOrigin), m.transform && (m.transformBox = (y = d == null ? void 0 : d.transformBox) != null ? y : "fill-box", delete f.transformBox), e !== void 0 && (f.x = e), n !== void 0 && (f.y = n), r !== void 0 && (f.scale = r), i !== void 0 && El(f, i, s, a, !1);
2756
2756
  }
2757
- const ps = /* @__PURE__ */ new Set([
2757
+ const ms = /* @__PURE__ */ new Set([
2758
2758
  "baseFrequency",
2759
2759
  "diffuseConstant",
2760
2760
  "kernelMatrix",
@@ -2778,13 +2778,13 @@ const ps = /* @__PURE__ */ new Set([
2778
2778
  "startOffset",
2779
2779
  "textLength",
2780
2780
  "lengthAdjust"
2781
- ]), Ll = (t) => typeof t == "string" && t.toLowerCase() === "svg";
2782
- function Tl(t, e, n, r) {
2783
- us(t, e, void 0, r);
2781
+ ]), Tl = (t) => typeof t == "string" && t.toLowerCase() === "svg";
2782
+ function Al(t, e, n, r) {
2783
+ ps(t, e, void 0, r);
2784
2784
  for (const i in e.attrs)
2785
- t.setAttribute(ps.has(i) ? i : tn(i), e.attrs[i]);
2785
+ t.setAttribute(ms.has(i) ? i : tn(i), e.attrs[i]);
2786
2786
  }
2787
- function Al(t, e, n) {
2787
+ function Vl(t, e, n) {
2788
2788
  const r = hs(t, e, n);
2789
2789
  for (const i in t)
2790
2790
  if (H(t[i]) || H(e[i])) {
@@ -2793,7 +2793,7 @@ function Al(t, e, n) {
2793
2793
  }
2794
2794
  return r;
2795
2795
  }
2796
- class Vl extends ls {
2796
+ class Il extends cs {
2797
2797
  constructor() {
2798
2798
  super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = fn;
2799
2799
  }
@@ -2802,31 +2802,31 @@ class Vl extends ls {
2802
2802
  }
2803
2803
  readValueFromInstance(e, n) {
2804
2804
  if (Ne.has(n)) {
2805
- const r = is(n);
2805
+ const r = ss(n);
2806
2806
  return r && r.default || 0;
2807
2807
  }
2808
- return n = ps.has(n) ? n : tn(n), e.getAttribute(n);
2808
+ return n = ms.has(n) ? n : tn(n), e.getAttribute(n);
2809
2809
  }
2810
2810
  scrapeMotionValuesFromProps(e, n, r) {
2811
- return Al(e, n, r);
2811
+ return Vl(e, n, r);
2812
2812
  }
2813
2813
  build(e, n, r) {
2814
- El(e, n, this.isSVGTag, r.transformTemplate, r.style);
2814
+ Ll(e, n, this.isSVGTag, r.transformTemplate, r.style);
2815
2815
  }
2816
2816
  renderInstance(e, n, r, i) {
2817
- Tl(e, n, r, i);
2817
+ Al(e, n, r, i);
2818
2818
  }
2819
2819
  mount(e) {
2820
- this.isSVGTag = Ll(e.tagName), super.mount(e);
2820
+ this.isSVGTag = Tl(e.tagName), super.mount(e);
2821
2821
  }
2822
2822
  }
2823
- function ms(t) {
2824
- return Yi(t) && "ownerSVGElement" in t;
2825
- }
2826
- function Il(t) {
2827
- return ms(t) && t.tagName === "svg";
2823
+ function fs(t) {
2824
+ return Wi(t) && "ownerSVGElement" in t;
2828
2825
  }
2829
2826
  function Sl(t) {
2827
+ return fs(t) && t.tagName === "svg";
2828
+ }
2829
+ function Ml(t) {
2830
2830
  const e = {
2831
2831
  presenceContext: null,
2832
2832
  props: {},
@@ -2840,10 +2840,10 @@ function Sl(t) {
2840
2840
  },
2841
2841
  latestValues: {}
2842
2842
  }
2843
- }, n = ms(t) && !Il(t) ? new Vl(e) : new vl(e);
2843
+ }, n = fs(t) && !Sl(t) ? new Il(e) : new bl(e);
2844
2844
  n.mount(t), rt.set(t, n);
2845
2845
  }
2846
- function Ml(t) {
2846
+ function _l(t) {
2847
2847
  const e = {
2848
2848
  presenceContext: null,
2849
2849
  props: {},
@@ -2853,39 +2853,39 @@ function Ml(t) {
2853
2853
  },
2854
2854
  latestValues: {}
2855
2855
  }
2856
- }, n = new Cl(e);
2856
+ }, n = new xl(e);
2857
2857
  n.mount(t), rt.set(t, n);
2858
2858
  }
2859
- function _l(t, e, n) {
2859
+ function Pl(t, e, n) {
2860
2860
  const r = H(t) ? t : it(t);
2861
- return r.start(Wi("", r, e, n)), r.animation;
2861
+ return r.start(Ji("", r, e, n)), r.animation;
2862
2862
  }
2863
- function Pl(t, e) {
2863
+ function Dl(t, e) {
2864
2864
  return H(t) || typeof t == "number" || typeof t == "string" && !Jt(e);
2865
2865
  }
2866
- function fs(t, e, n, r) {
2866
+ function gs(t, e, n, r) {
2867
2867
  const i = [];
2868
- if (Pl(t, e))
2869
- i.push(_l(t, Jt(e) && e.default || e, n && (n.default || n)));
2868
+ if (Dl(t, e))
2869
+ i.push(Pl(t, Jt(e) && e.default || e, n && (n.default || n)));
2870
2870
  else {
2871
- const s = ui(t, e, r), a = s.length;
2871
+ const s = pi(t, e, r), a = s.length;
2872
2872
  ce(!!a, "No valid elements provided.");
2873
2873
  for (let o = 0; o < a; o++) {
2874
- const c = s[o], u = c instanceof Element ? Sl : Ml;
2874
+ const c = s[o], u = c instanceof Element ? Ml : _l;
2875
2875
  rt.has(c) || u(c);
2876
- const d = rt.get(c), h = L({}, n);
2877
- "delay" in h && typeof h.delay == "function" && (h.delay = h.delay(o, a)), i.push(...qo(d, M(L({}, e), { transition: h }), {}));
2876
+ const d = rt.get(c), p = L({}, n);
2877
+ "delay" in p && typeof p.delay == "function" && (p.delay = p.delay(o, a)), i.push(...Ko(d, M(L({}, e), { transition: p }), {}));
2878
2878
  }
2879
2879
  }
2880
2880
  return i;
2881
2881
  }
2882
- function Dl(t, e, n) {
2882
+ function Nl(t, e, n) {
2883
2883
  const r = [];
2884
- return Fs(t, e, n, { spring: ot }).forEach(({ keyframes: s, transition: a }, o) => {
2885
- r.push(...fs(o, s, a));
2884
+ return zs(t, e, n, { spring: ot }).forEach(({ keyframes: s, transition: a }, o) => {
2885
+ r.push(...gs(o, s, a));
2886
2886
  }), r;
2887
2887
  }
2888
- class Nl {
2888
+ class Rl {
2889
2889
  constructor(e) {
2890
2890
  this.stop = () => this.runAll("stop"), this.animations = e.filter(Boolean);
2891
2891
  }
@@ -2950,34 +2950,34 @@ class Nl {
2950
2950
  this.runAll("complete");
2951
2951
  }
2952
2952
  }
2953
- class Rl extends Nl {
2953
+ class Ol extends Rl {
2954
2954
  then(e, n) {
2955
2955
  return this.finished.finally(e).then(() => {
2956
2956
  });
2957
2957
  }
2958
2958
  }
2959
- function Ol(t) {
2959
+ function jl(t) {
2960
2960
  return Array.isArray(t) && t.some(Array.isArray);
2961
2961
  }
2962
- function jl(t) {
2962
+ function ql(t) {
2963
2963
  function e(n, r, i) {
2964
2964
  let s = [];
2965
- return Ol(n) ? s = Dl(n, r, t) : s = fs(n, r, i, t), new Rl(s);
2965
+ return jl(n) ? s = Nl(n, r, t) : s = gs(n, r, i, t), new Ol(s);
2966
2966
  }
2967
2967
  return e;
2968
2968
  }
2969
- const j = jl(), ql = "_spinner_1waxg_1", Kl = "_spinnerContainer_1waxg_5", Bl = "_success_1waxg_9", Fl = "_successContainer_1waxg_13", zl = "_container_1waxg_17", $l = "_card_1waxg_26", Gl = "_warning_1waxg_35", Ul = "_svg_1waxg_43", Hl = "_srOnly_1waxg_48", T = {
2970
- spinner: ql,
2971
- spinnerContainer: Kl,
2972
- success: Bl,
2973
- successContainer: Fl,
2974
- container: zl,
2975
- card: $l,
2976
- warning: Gl,
2977
- svg: Ul,
2978
- srOnly: Hl
2969
+ const j = ql(), Kl = "_spinner_1waxg_1", Bl = "_spinnerContainer_1waxg_5", Fl = "_success_1waxg_9", zl = "_successContainer_1waxg_13", $l = "_container_1waxg_17", Gl = "_card_1waxg_26", Ul = "_warning_1waxg_35", Hl = "_svg_1waxg_43", Zl = "_srOnly_1waxg_48", T = {
2970
+ spinner: Kl,
2971
+ spinnerContainer: Bl,
2972
+ success: Fl,
2973
+ successContainer: zl,
2974
+ container: $l,
2975
+ card: Gl,
2976
+ warning: Ul,
2977
+ svg: Hl,
2978
+ srOnly: Zl
2979
2979
  };
2980
- class gs {
2980
+ class ys {
2981
2981
  constructor() {
2982
2982
  l(this, "template", `
2983
2983
  <svg aria-hidden="true" class="${T.spinner}" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -2999,34 +2999,34 @@ class gs {
2999
2999
  return this.spinner;
3000
3000
  }
3001
3001
  }
3002
- const Zl = "_loader_nwq3e_1", Wr = {
3003
- loader: Zl
3002
+ const Yl = "_loader_nwq3e_1", Jr = {
3003
+ loader: Yl
3004
3004
  };
3005
- class Yl {
3005
+ class Wl {
3006
3006
  constructor() {
3007
3007
  l(this, "loader");
3008
- this.loader = document.createElement("div"), this.loader.classList.add(Wr.loader), this.loader.appendChild(new gs().render());
3008
+ this.loader = document.createElement("div"), this.loader.classList.add(Jr.loader), this.loader.appendChild(new ys().render());
3009
3009
  }
3010
3010
  setClassName(e) {
3011
- e ? this.loader.classList.add(e) : this.loader.className = Wr.loader;
3011
+ e ? this.loader.classList.add(e) : this.loader.className = Jr.loader;
3012
3012
  }
3013
3013
  render() {
3014
3014
  return this.loader;
3015
3015
  }
3016
3016
  }
3017
- const Wl = "_checkout_5sq3n_1", Jl = "_hidden_5sq3n_7", Xl = "_formInitial_5sq3n_11", Ql = "_btnsInitial_5sq3n_16", B = {
3018
- checkout: Wl,
3019
- hidden: Jl,
3020
- formInitial: Xl,
3021
- btnsInitial: Ql
3022
- }, ec = "_buttons_1i8cu_1", tc = "_hidden_1i8cu_5", It = {
3023
- buttons: ec,
3024
- hidden: tc
3025
- }, nc = "_applePay_1m9xd_1", rc = "_hidden_1m9xd_22", St = {
3026
- applePay: nc,
3027
- hidden: rc
3017
+ const Jl = "_checkout_5sq3n_1", Xl = "_hidden_5sq3n_7", Ql = "_formInitial_5sq3n_11", ec = "_btnsInitial_5sq3n_16", B = {
3018
+ checkout: Jl,
3019
+ hidden: Xl,
3020
+ formInitial: Ql,
3021
+ btnsInitial: ec
3022
+ }, tc = "_buttons_1i8cu_1", nc = "_hidden_1i8cu_5", It = {
3023
+ buttons: tc,
3024
+ hidden: nc
3025
+ }, rc = "_applePay_1m9xd_1", ic = "_hidden_1m9xd_22", St = {
3026
+ applePay: rc,
3027
+ hidden: ic
3028
3028
  };
3029
- class ic {
3029
+ class sc {
3030
3030
  constructor(e) {
3031
3031
  l(this, "element");
3032
3032
  l(this, "events", {
@@ -3046,7 +3046,7 @@ class ic {
3046
3046
  return this.element;
3047
3047
  }
3048
3048
  }
3049
- const sc = [
3049
+ const ac = [
3050
3050
  { type: "paypal", is_active: !0, order: 1 },
3051
3051
  { type: "apple-pay", is_active: !0, order: 2 },
3052
3052
  { type: "google-pay", is_active: !0, order: 3 },
@@ -3068,10 +3068,10 @@ const sc = [
3068
3068
  close: { y: -15, opacity: 0, height: 0 },
3069
3069
  transition: { duration: 0.5, type: "spring", bounce: 0 }
3070
3070
  };
3071
- var Mt, Jr;
3072
- function ac() {
3073
- if (Jr) return Mt;
3074
- Jr = 1;
3071
+ var Mt, Xr;
3072
+ function oc() {
3073
+ if (Xr) return Mt;
3074
+ Xr = 1;
3075
3075
  var t = {
3076
3076
  visa: {
3077
3077
  niceType: "Visa",
@@ -3266,19 +3266,19 @@ function ac() {
3266
3266
  };
3267
3267
  return Mt = t, Mt;
3268
3268
  }
3269
- var Ye = {}, We = {}, Xr;
3270
- function ys() {
3271
- if (Xr) return We;
3272
- Xr = 1, Object.defineProperty(We, "__esModule", { value: !0 }), We.clone = void 0;
3269
+ var Ye = {}, We = {}, Qr;
3270
+ function vs() {
3271
+ if (Qr) return We;
3272
+ Qr = 1, Object.defineProperty(We, "__esModule", { value: !0 }), We.clone = void 0;
3273
3273
  function t(e) {
3274
3274
  return e ? JSON.parse(JSON.stringify(e)) : null;
3275
3275
  }
3276
3276
  return We.clone = t, We;
3277
3277
  }
3278
- var Je = {}, Qr;
3279
- function oc() {
3280
- if (Qr) return Je;
3281
- Qr = 1, Object.defineProperty(Je, "__esModule", { value: !0 }), Je.matches = void 0;
3278
+ var Je = {}, ei;
3279
+ function lc() {
3280
+ if (ei) return Je;
3281
+ ei = 1, Object.defineProperty(Je, "__esModule", { value: !0 }), Je.matches = void 0;
3282
3282
  function t(r, i, s) {
3283
3283
  var a = String(i).length, o = r.substr(0, a), c = parseInt(o, 10);
3284
3284
  return i = parseInt(String(i).substr(0, o.length), 10), s = parseInt(String(s).substr(0, o.length), 10), c >= i && c <= s;
@@ -3291,11 +3291,11 @@ function oc() {
3291
3291
  }
3292
3292
  return Je.matches = n, Je;
3293
3293
  }
3294
- var ei;
3295
- function lc() {
3296
- if (ei) return Ye;
3297
- ei = 1, Object.defineProperty(Ye, "__esModule", { value: !0 }), Ye.addMatchingCardsToResults = void 0;
3298
- var t = ys(), e = oc();
3294
+ var ti;
3295
+ function cc() {
3296
+ if (ti) return Ye;
3297
+ ti = 1, Object.defineProperty(Ye, "__esModule", { value: !0 }), Ye.addMatchingCardsToResults = void 0;
3298
+ var t = vs(), e = lc();
3299
3299
  function n(r, i, s) {
3300
3300
  var a, o;
3301
3301
  for (a = 0; a < i.patterns.length; a++) {
@@ -3309,19 +3309,19 @@ function lc() {
3309
3309
  }
3310
3310
  return Ye.addMatchingCardsToResults = n, Ye;
3311
3311
  }
3312
- var Xe = {}, ti;
3313
- function cc() {
3314
- if (ti) return Xe;
3315
- ti = 1, Object.defineProperty(Xe, "__esModule", { value: !0 }), Xe.isValidInputType = void 0;
3312
+ var Xe = {}, ni;
3313
+ function dc() {
3314
+ if (ni) return Xe;
3315
+ ni = 1, Object.defineProperty(Xe, "__esModule", { value: !0 }), Xe.isValidInputType = void 0;
3316
3316
  function t(e) {
3317
3317
  return typeof e == "string" || e instanceof String;
3318
3318
  }
3319
3319
  return Xe.isValidInputType = t, Xe;
3320
3320
  }
3321
- var Qe = {}, ni;
3322
- function dc() {
3323
- if (ni) return Qe;
3324
- ni = 1, Object.defineProperty(Qe, "__esModule", { value: !0 }), Qe.findBestMatch = void 0;
3321
+ var Qe = {}, ri;
3322
+ function uc() {
3323
+ if (ri) return Qe;
3324
+ ri = 1, Object.defineProperty(Qe, "__esModule", { value: !0 }), Qe.findBestMatch = void 0;
3325
3325
  function t(n) {
3326
3326
  var r = n.filter(function(i) {
3327
3327
  return i.matchStrength;
@@ -3335,19 +3335,19 @@ function dc() {
3335
3335
  }
3336
3336
  return Qe.findBestMatch = e, Qe;
3337
3337
  }
3338
- var et, ri;
3339
- function uc() {
3340
- if (ri) return et;
3341
- ri = 1;
3338
+ var et, ii;
3339
+ function pc() {
3340
+ if (ii) return et;
3341
+ ii = 1;
3342
3342
  var t = et && et.__assign || function() {
3343
- return t = Object.assign || function(p) {
3343
+ return t = Object.assign || function(m) {
3344
3344
  for (var g, y = 1, b = arguments.length; y < b; y++) {
3345
3345
  g = arguments[y];
3346
- for (var A in g) Object.prototype.hasOwnProperty.call(g, A) && (p[A] = g[A]);
3346
+ for (var A in g) Object.prototype.hasOwnProperty.call(g, A) && (m[A] = g[A]);
3347
3347
  }
3348
- return p;
3348
+ return m;
3349
3349
  }, t.apply(this, arguments);
3350
- }, e = ac(), n = lc(), r = cc(), i = dc(), s = ys(), a = {}, o = {
3350
+ }, e = oc(), n = cc(), r = dc(), i = uc(), s = vs(), a = {}, o = {
3351
3351
  VISA: "visa",
3352
3352
  MASTERCARD: "mastercard",
3353
3353
  AMERICAN_EXPRESS: "american-express",
@@ -3374,58 +3374,58 @@ function uc() {
3374
3374
  o.HIPER,
3375
3375
  o.HIPERCARD
3376
3376
  ], u = (0, s.clone)(c);
3377
- function d(p) {
3378
- return a[p] || e[p];
3377
+ function d(m) {
3378
+ return a[m] || e[m];
3379
3379
  }
3380
- function h() {
3381
- return u.map(function(p) {
3382
- return (0, s.clone)(d(p));
3380
+ function p() {
3381
+ return u.map(function(m) {
3382
+ return (0, s.clone)(d(m));
3383
3383
  });
3384
3384
  }
3385
- function m(p, g) {
3385
+ function h(m, g) {
3386
3386
  g === void 0 && (g = !1);
3387
- var y = u.indexOf(p);
3387
+ var y = u.indexOf(m);
3388
3388
  if (!g && y === -1)
3389
- throw new Error('"' + p + '" is not a supported card type.');
3389
+ throw new Error('"' + m + '" is not a supported card type.');
3390
3390
  return y;
3391
3391
  }
3392
- function f(p) {
3392
+ function f(m) {
3393
3393
  var g = [];
3394
- if (!(0, r.isValidInputType)(p))
3394
+ if (!(0, r.isValidInputType)(m))
3395
3395
  return g;
3396
- if (p.length === 0)
3397
- return h();
3396
+ if (m.length === 0)
3397
+ return p();
3398
3398
  u.forEach(function(b) {
3399
3399
  var A = d(b);
3400
- (0, n.addMatchingCardsToResults)(p, A, g);
3400
+ (0, n.addMatchingCardsToResults)(m, A, g);
3401
3401
  });
3402
3402
  var y = (0, i.findBestMatch)(g);
3403
3403
  return y ? [y] : g;
3404
3404
  }
3405
- return f.getTypeInfo = function(p) {
3406
- return (0, s.clone)(d(p));
3407
- }, f.removeCard = function(p) {
3408
- var g = m(p);
3405
+ return f.getTypeInfo = function(m) {
3406
+ return (0, s.clone)(d(m));
3407
+ }, f.removeCard = function(m) {
3408
+ var g = h(m);
3409
3409
  u.splice(g, 1);
3410
- }, f.addCard = function(p) {
3411
- var g = m(p.type, !0);
3412
- a[p.type] = p, g === -1 && u.push(p.type);
3413
- }, f.updateCard = function(p, g) {
3414
- var y = a[p] || e[p];
3410
+ }, f.addCard = function(m) {
3411
+ var g = h(m.type, !0);
3412
+ a[m.type] = m, g === -1 && u.push(m.type);
3413
+ }, f.updateCard = function(m, g) {
3414
+ var y = a[m] || e[m];
3415
3415
  if (!y)
3416
- throw new Error('"'.concat(p, "\" is not a recognized type. Use `addCard` instead.'"));
3416
+ throw new Error('"'.concat(m, "\" is not a recognized type. Use `addCard` instead.'"));
3417
3417
  if (g.type && y.type !== g.type)
3418
3418
  throw new Error("Cannot overwrite type parameter.");
3419
3419
  var b = (0, s.clone)(y);
3420
3420
  b = t(t({}, b), g), a[b.type] = b;
3421
- }, f.changeOrder = function(p, g) {
3422
- var y = m(p);
3423
- u.splice(y, 1), u.splice(g, 0, p);
3421
+ }, f.changeOrder = function(m, g) {
3422
+ var y = h(m);
3423
+ u.splice(y, 1), u.splice(g, 0, m);
3424
3424
  }, f.resetModifications = function() {
3425
3425
  u = (0, s.clone)(c), a = {};
3426
3426
  }, f.types = o, et = f, et;
3427
3427
  }
3428
- var _e = uc();
3428
+ var _e = pc();
3429
3429
  _e.updateCard("visa", {
3430
3430
  lengths: [16]
3431
3431
  });
@@ -3439,10 +3439,10 @@ const hc = (t, e) => {
3439
3439
  o.push(r.slice(u, d));
3440
3440
  }
3441
3441
  return o.join(" ").slice(0, s);
3442
- }, pc = (t, e) => {
3442
+ }, mc = (t, e) => {
3443
3443
  const n = _e.getTypeInfo(e), r = (n == null ? void 0 : n.code.size) || 4;
3444
3444
  return t.replace(/\D/g, "").slice(0, r);
3445
- }, mc = (t, e) => {
3445
+ }, fc = (t, e) => {
3446
3446
  const n = t.replace(/\D/g, "");
3447
3447
  let r = n.slice(0, 2);
3448
3448
  if (!r) return "";
@@ -3506,20 +3506,20 @@ const kt = [
3506
3506
  minLength: 12,
3507
3507
  maxLength: 19
3508
3508
  }
3509
- ], vs = (t) => kt.find((e) => e.pattern.test(t)) || null, ii = (t) => kt.filter((e) => e.pattern.test(t)), fc = (t) => {
3509
+ ], bs = (t) => kt.find((e) => e.pattern.test(t)) || null, si = (t) => kt.filter((e) => e.pattern.test(t)), gc = (t) => {
3510
3510
  let e = 0, n = !1;
3511
3511
  for (let r = t.length - 1; r >= 0; r--) {
3512
3512
  let i = parseInt(t[r]);
3513
3513
  n && (i *= 2, i > 9 && (i -= 9)), e += i, n = !n;
3514
3514
  }
3515
3515
  return e % 10 === 0;
3516
- }, si = (t, e) => {
3516
+ }, ai = (t, e) => {
3517
3517
  const n = t.replace(/\D/g, "");
3518
3518
  if (!n)
3519
3519
  return { isValid: !1, cardType: null, error: q.Empty };
3520
3520
  if (!/^\d+$/.test(n))
3521
3521
  return { isValid: !1, cardType: null, error: q.Invalid };
3522
- const r = vs(n);
3522
+ const r = bs(n);
3523
3523
  if (r) {
3524
3524
  if (n.length < r.minLength || n.length > r.maxLength)
3525
3525
  return {
@@ -3537,7 +3537,7 @@ const kt = [
3537
3537
  isValid: !1,
3538
3538
  cardType: r.name,
3539
3539
  error: "unsupported"
3540
- } : fc(n) ? {
3540
+ } : gc(n) ? {
3541
3541
  isValid: !0,
3542
3542
  cardType: (r == null ? void 0 : r.name) || null,
3543
3543
  error: null
@@ -3546,7 +3546,7 @@ const kt = [
3546
3546
  cardType: (r == null ? void 0 : r.name) || null,
3547
3547
  error: q.Invalid
3548
3548
  };
3549
- }, gc = (t) => {
3549
+ }, yc = (t) => {
3550
3550
  var e;
3551
3551
  return !t || typeof t.amount != "number" || !t.currency || !t.country || !t.merchant_id || t.checkout_config && !((e = t.checkout_config) == null ? void 0 : e.find(
3552
3552
  ({ is_active: r, type: i }) => r && i === "google-pay"
@@ -3557,7 +3557,7 @@ const kt = [
3557
3557
  merchantId: t.merchant_id,
3558
3558
  lineItems: []
3559
3559
  };
3560
- }, yc = (t) => {
3560
+ }, vc = (t) => {
3561
3561
  var e, n;
3562
3562
  return !t || typeof t.amount != "number" || !t.currency || !t.country || !t.merchant_id || t.checkout_config && !((e = t.checkout_config) == null ? void 0 : e.find(
3563
3563
  ({ is_active: i, type: s }) => i && s === "apple-pay"
@@ -3568,7 +3568,7 @@ const kt = [
3568
3568
  merchantId: t.merchant_id,
3569
3569
  lineItems: ((n = t.apple_pay_info) == null ? void 0 : n.line_items) || []
3570
3570
  };
3571
- }, vc = (t = []) => t.reduce((e, n) => {
3571
+ }, bc = (t = []) => t.reduce((e, n) => {
3572
3572
  switch (n) {
3573
3573
  case U.Visa:
3574
3574
  return e.push("visa"), e;
@@ -3585,11 +3585,11 @@ const kt = [
3585
3585
  default:
3586
3586
  return e;
3587
3587
  }
3588
- }, []), bc = "_googlePay_1j5ka_1", Cc = "_hidden_1j5ka_17", _t = {
3589
- googlePay: bc,
3590
- hidden: Cc
3588
+ }, []), Cc = "_googlePay_1j5ka_1", xc = "_hidden_1j5ka_17", _t = {
3589
+ googlePay: Cc,
3590
+ hidden: xc
3591
3591
  };
3592
- class xc {
3592
+ class wc {
3593
3593
  constructor(e) {
3594
3594
  l(this, "element");
3595
3595
  l(this, "events", {
@@ -3609,11 +3609,11 @@ class xc {
3609
3609
  return this.element;
3610
3610
  }
3611
3611
  }
3612
- const wc = "_paypal_1al9c_1", kc = "_hidden_1al9c_8", Pt = {
3613
- paypal: wc,
3614
- hidden: kc
3612
+ const kc = "_paypal_1al9c_1", Ec = "_hidden_1al9c_8", Pt = {
3613
+ paypal: kc,
3614
+ hidden: Ec
3615
3615
  };
3616
- class Ec {
3616
+ class Lc {
3617
3617
  constructor(e) {
3618
3618
  l(this, "element");
3619
3619
  l(this, "events", {
@@ -3646,7 +3646,7 @@ class Ec {
3646
3646
  return this.element;
3647
3647
  }
3648
3648
  }
3649
- const Lc = (t) => ({
3649
+ const Tc = (t) => ({
3650
3650
  ar: "ar-AB",
3651
3651
  en: "en-GB",
3652
3652
  cs: "cs-CZ",
@@ -3675,7 +3675,7 @@ const Lc = (t) => ({
3675
3675
  tr: "tr-TR",
3676
3676
  vi: "vi-VN",
3677
3677
  zh: "zh-CN"
3678
- })[t] || "en-US", Tc = (t) => ({
3678
+ })[t] || "en-US", Ac = (t) => ({
3679
3679
  en: "en",
3680
3680
  ar: "ar",
3681
3681
  cs: "cs",
@@ -3700,7 +3700,7 @@ const Lc = (t) => ({
3700
3700
  tr: "tr",
3701
3701
  zh: "zh"
3702
3702
  })[t] || "en";
3703
- class Ac {
3703
+ class Vc {
3704
3704
  constructor() {
3705
3705
  l(this, "template", `
3706
3706
  <svg
@@ -3725,14 +3725,14 @@ class Ac {
3725
3725
  return this.element;
3726
3726
  }
3727
3727
  }
3728
- const Vc = "_button_1br9w_1", Ic = "_press_1br9w_21", yt = {
3729
- button: Vc,
3730
- press: Ic
3728
+ const Ic = "_button_1br9w_1", Sc = "_press_1br9w_21", yt = {
3729
+ button: Ic,
3730
+ press: Sc
3731
3731
  };
3732
- class Sc {
3732
+ class Mc {
3733
3733
  constructor(e) {
3734
3734
  l(this, "element");
3735
- l(this, "icon", new Ac());
3735
+ l(this, "icon", new Vc());
3736
3736
  this.element = document.createElement("button"), this.element.classList.add(yt.button);
3737
3737
  const n = document.createElement("span");
3738
3738
  n.textContent = e.getState().messages.card.compact.button, this.element.append(this.icon.render(), n), this.element.addEventListener("mousedown", () => this.element.classList.add(yt.press)), this.element.addEventListener("mouseup", () => this.element.classList.remove(yt.press)), this.element.addEventListener("mouseout", () => this.element.classList.remove(yt.press)), e.subscribe(({ messages: r }) => {
@@ -3746,9 +3746,11 @@ class Sc {
3746
3746
  return this.element;
3747
3747
  }
3748
3748
  }
3749
- const Mc = (t, e, n) => e.concat(t.filter((r) => e.every((i) => !n(r, i)))), yn = {
3750
- apiBase: "https://api-dev.paynext.com/v1"
3751
- }, _c = [
3749
+ const _c = (t, e, n) => e.concat(t.filter((r) => e.every((i) => !n(r, i)))), yn = (t = "sandbox") => ({
3750
+ develop: "https://api-dev.paynext.com/v1",
3751
+ sandbox: "https://sandbox-api.paynext.com/v1",
3752
+ production: "https://api.paynext.com/v1"
3753
+ })[t], Pc = [
3752
3754
  {
3753
3755
  type: "paypal",
3754
3756
  order: 1,
@@ -3769,74 +3771,74 @@ const Mc = (t, e, n) => e.concat(t.filter((r) => e.every((i) => !n(r, i)))), yn
3769
3771
  order: 4,
3770
3772
  is_active: !0
3771
3773
  }
3772
- ], Pc = (t) => v(void 0, null, function* () {
3773
- var s, a, o, c, u, d, h, m, f, p, g, y, b, A, k, V, C, I, S, x, P, R, N, ae, G, oe, J, Te, Ae, Ce, Z, K, he, pe, me, fe, ge, ye, ve, X, re, ie, Q, ee, je, qe, Ke, Be, Fe, ze, $e, Ge, Ue, He, Ze, bn, Cn, xn, wn, kn, En, Ln, Tn, An, Vn, In, Sn, Mn, _n, Pn, Dn, Nn, Rn, On, jn, qn, Kn, Bn, Fn, zn, $n, Gn, Un, Hn, Zn, Yn, Wn, Jn, Xn, Qn, er, tr, nr, rr, ir, sr, ar, or, lr, cr, dr, ur, hr, pr, mr, fr, gr, yr, vr, br, Cr, xr;
3774
- const e = `${yn.apiBase}/payments/create`, n = new Headers();
3775
- return n.append("Content-Type", "application/json"), yield (yield fetch(e, {
3774
+ ], Dc = (t, e = "sandbox") => v(void 0, null, function* () {
3775
+ var a, o, c, u, d, p, h, f, m, g, y, b, A, k, V, C, I, S, x, P, R, N, ae, G, oe, J, Te, Ae, Ce, Z, K, pe, he, me, fe, ge, ye, ve, X, re, ie, Q, ee, je, qe, Ke, Be, Fe, ze, $e, Ge, Ue, He, Ze, bn, Cn, xn, wn, kn, En, Ln, Tn, An, Vn, In, Sn, Mn, _n, Pn, Dn, Nn, Rn, On, jn, qn, Kn, Bn, Fn, zn, $n, Gn, Un, Hn, Zn, Yn, Wn, Jn, Xn, Qn, er, tr, nr, rr, ir, sr, ar, or, lr, cr, dr, ur, pr, hr, mr, fr, gr, yr, vr, br, Cr, xr, wr;
3776
+ const n = `${yn(e)}/payments/create`, r = new Headers();
3777
+ return r.append("Content-Type", "application/json"), yield (yield fetch(n, {
3776
3778
  method: "POST",
3777
- headers: n,
3779
+ headers: r,
3778
3780
  body: JSON.stringify({
3779
3781
  client_session: t.clientSession,
3780
3782
  three_ds_session_id: t.threeDsSessionId,
3781
3783
  type: t.googlePay ? "GPAY" : t.applePay ? "APPLEPAY" : t.paypal ? "PAYPAL" : "CARD",
3782
- name: (a = (s = t.applePay) == null ? void 0 : s.billingContact) != null && a.givenName ? ((d = (u = t.applePay) == null ? void 0 : u.billingContact) == null ? void 0 : d.givenName) + " " + ((m = (h = t.applePay) == null ? void 0 : h.billingContact) == null ? void 0 : m.familyName) : (c = (o = t.card) == null ? void 0 : o.metadata) == null ? void 0 : c.name,
3783
- phone: (p = (f = t.applePay) == null ? void 0 : f.shippingContact) == null ? void 0 : p.phoneNumber,
3784
+ name: (o = (a = t.applePay) == null ? void 0 : a.billingContact) != null && o.givenName ? ((p = (d = t.applePay) == null ? void 0 : d.billingContact) == null ? void 0 : p.givenName) + " " + ((f = (h = t.applePay) == null ? void 0 : h.billingContact) == null ? void 0 : f.familyName) : (u = (c = t.card) == null ? void 0 : c.metadata) == null ? void 0 : u.name,
3785
+ phone: (g = (m = t.applePay) == null ? void 0 : m.shippingContact) == null ? void 0 : g.phoneNumber,
3784
3786
  billing_address: t.applePay || t.googlePay ? {
3785
- city: ((y = (g = t.applePay) == null ? void 0 : g.billingContact) == null ? void 0 : y.locality) || ((A = (b = t == null ? void 0 : t.googlePay) == null ? void 0 : b.billingAddress) == null ? void 0 : A.locality) || void 0,
3786
- country: ((V = (k = t.applePay) == null ? void 0 : k.billingContact) == null ? void 0 : V.countryCode) || ((I = (C = t == null ? void 0 : t.googlePay) == null ? void 0 : C.billingAddress) == null ? void 0 : I.countryCode) || void 0,
3787
- line1: ((P = (x = (S = t.applePay) == null ? void 0 : S.billingContact) == null ? void 0 : x.addressLines) == null ? void 0 : P.at(0)) || ((N = (R = t == null ? void 0 : t.googlePay) == null ? void 0 : R.billingAddress) == null ? void 0 : N.address1) || void 0,
3788
- line2: ((oe = (G = (ae = t.applePay) == null ? void 0 : ae.billingContact) == null ? void 0 : G.addressLines) == null ? void 0 : oe.at(1)) || ((Te = (J = t == null ? void 0 : t.googlePay) == null ? void 0 : J.billingAddress) == null ? void 0 : Te.address2) || void 0,
3789
- postal_code: ((Ce = (Ae = t.applePay) == null ? void 0 : Ae.billingContact) == null ? void 0 : Ce.postalCode) || ((K = (Z = t == null ? void 0 : t.googlePay) == null ? void 0 : Z.billingAddress) == null ? void 0 : K.postalCode) || void 0,
3790
- state: ((pe = (he = t.applePay) == null ? void 0 : he.billingContact) == null ? void 0 : pe.administrativeArea) || ((fe = (me = t == null ? void 0 : t.googlePay) == null ? void 0 : me.billingAddress) == null ? void 0 : fe.administrativeArea) || void 0
3787
+ city: ((b = (y = t.applePay) == null ? void 0 : y.billingContact) == null ? void 0 : b.locality) || ((k = (A = t == null ? void 0 : t.googlePay) == null ? void 0 : A.billingAddress) == null ? void 0 : k.locality) || void 0,
3788
+ country: ((C = (V = t.applePay) == null ? void 0 : V.billingContact) == null ? void 0 : C.countryCode) || ((S = (I = t == null ? void 0 : t.googlePay) == null ? void 0 : I.billingAddress) == null ? void 0 : S.countryCode) || void 0,
3789
+ line1: ((R = (P = (x = t.applePay) == null ? void 0 : x.billingContact) == null ? void 0 : P.addressLines) == null ? void 0 : R.at(0)) || ((ae = (N = t == null ? void 0 : t.googlePay) == null ? void 0 : N.billingAddress) == null ? void 0 : ae.address1) || void 0,
3790
+ line2: ((J = (oe = (G = t.applePay) == null ? void 0 : G.billingContact) == null ? void 0 : oe.addressLines) == null ? void 0 : J.at(1)) || ((Ae = (Te = t == null ? void 0 : t.googlePay) == null ? void 0 : Te.billingAddress) == null ? void 0 : Ae.address2) || void 0,
3791
+ postal_code: ((Z = (Ce = t.applePay) == null ? void 0 : Ce.billingContact) == null ? void 0 : Z.postalCode) || ((pe = (K = t == null ? void 0 : t.googlePay) == null ? void 0 : K.billingAddress) == null ? void 0 : pe.postalCode) || void 0,
3792
+ state: ((me = (he = t.applePay) == null ? void 0 : he.billingContact) == null ? void 0 : me.administrativeArea) || ((ge = (fe = t == null ? void 0 : t.googlePay) == null ? void 0 : fe.billingAddress) == null ? void 0 : ge.administrativeArea) || void 0
3791
3793
  } : void 0,
3792
- card: t.card || (ge = t.googlePay) != null && ge.card || (ye = t.applePay) != null && ye.card ? {
3793
- bin: (ve = t.card) == null ? void 0 : ve.firstSixDigits,
3794
+ card: t.card || (ye = t.googlePay) != null && ye.card || (ve = t.applePay) != null && ve.card ? {
3795
+ bin: (X = t.card) == null ? void 0 : X.firstSixDigits,
3794
3796
  bin_data: {
3795
- brand: ((X = t.card) == null ? void 0 : X.cardBrand) || ((ie = (re = t.googlePay) == null ? void 0 : re.card) == null ? void 0 : ie.brand) || ((ee = (Q = t.applePay) == null ? void 0 : Q.card) == null ? void 0 : ee.brand),
3796
- country: ((je = t.card) == null ? void 0 : je.country) || ((Ke = (qe = t.googlePay) == null ? void 0 : qe.card) == null ? void 0 : Ke.country) || ((Fe = (Be = t.applePay) == null ? void 0 : Be.card) == null ? void 0 : Fe.country),
3797
- currency_code: ((ze = t.card) == null ? void 0 : ze.currency) || ((Ge = ($e = t.googlePay) == null ? void 0 : $e.card) == null ? void 0 : Ge.currency) || ((He = (Ue = t.applePay) == null ? void 0 : Ue.card) == null ? void 0 : He.currency),
3798
- funding: ((Ze = t.card) == null ? void 0 : Ze.funding) || ((Cn = (bn = t.googlePay) == null ? void 0 : bn.card) == null ? void 0 : Cn.funding) || ((wn = (xn = t.applePay) == null ? void 0 : xn.card) == null ? void 0 : wn.funding),
3799
- issuer: ((kn = t.card) == null ? void 0 : kn.issuer) || ((Ln = (En = t.googlePay) == null ? void 0 : En.card) == null ? void 0 : Ln.issuer) || ((An = (Tn = t.applePay) == null ? void 0 : Tn.card) == null ? void 0 : An.issuer),
3800
- type: ((Vn = t.card) == null ? void 0 : Vn.type) || ((Sn = (In = t.googlePay) == null ? void 0 : In.card) == null ? void 0 : Sn.segment) || ((_n = (Mn = t.applePay) == null ? void 0 : Mn.card) == null ? void 0 : _n.segment)
3797
+ brand: ((re = t.card) == null ? void 0 : re.cardBrand) || ((Q = (ie = t.googlePay) == null ? void 0 : ie.card) == null ? void 0 : Q.brand) || ((je = (ee = t.applePay) == null ? void 0 : ee.card) == null ? void 0 : je.brand),
3798
+ country: ((qe = t.card) == null ? void 0 : qe.country) || ((Be = (Ke = t.googlePay) == null ? void 0 : Ke.card) == null ? void 0 : Be.country) || ((ze = (Fe = t.applePay) == null ? void 0 : Fe.card) == null ? void 0 : ze.country),
3799
+ currency_code: (($e = t.card) == null ? void 0 : $e.currency) || ((Ue = (Ge = t.googlePay) == null ? void 0 : Ge.card) == null ? void 0 : Ue.currency) || ((Ze = (He = t.applePay) == null ? void 0 : He.card) == null ? void 0 : Ze.currency),
3800
+ funding: ((bn = t.card) == null ? void 0 : bn.funding) || ((xn = (Cn = t.googlePay) == null ? void 0 : Cn.card) == null ? void 0 : xn.funding) || ((kn = (wn = t.applePay) == null ? void 0 : wn.card) == null ? void 0 : kn.funding),
3801
+ issuer: ((En = t.card) == null ? void 0 : En.issuer) || ((Tn = (Ln = t.googlePay) == null ? void 0 : Ln.card) == null ? void 0 : Tn.issuer) || ((Vn = (An = t.applePay) == null ? void 0 : An.card) == null ? void 0 : Vn.issuer),
3802
+ type: ((In = t.card) == null ? void 0 : In.type) || ((Mn = (Sn = t.googlePay) == null ? void 0 : Sn.card) == null ? void 0 : Mn.segment) || ((Pn = (_n = t.applePay) == null ? void 0 : _n.card) == null ? void 0 : Pn.segment)
3801
3803
  },
3802
- cvc: (Pn = t.card) == null ? void 0 : Pn.cvc,
3803
- exp_month: (Dn = t.card) != null && Dn.expMonth || (Rn = (Nn = t.googlePay) == null ? void 0 : Nn.card) != null && Rn.expiry.month ? Number(((On = t.card) == null ? void 0 : On.expMonth) || ((qn = (jn = t.googlePay) == null ? void 0 : jn.card) == null ? void 0 : qn.expiry.month)) : void 0,
3804
- exp_year: (Kn = t.card) != null && Kn.expYear || (Fn = (Bn = t.googlePay) == null ? void 0 : Bn.card) != null && Fn.expiry.year ? Number(((zn = t.card) == null ? void 0 : zn.expYear) || ((Gn = ($n = t.googlePay) == null ? void 0 : $n.card) == null ? void 0 : Gn.expiry.year)) : void 0,
3805
- last4: ((Un = t.card) == null ? void 0 : Un.lastFourDigits) || ((Zn = (Hn = t.googlePay) == null ? void 0 : Hn.card) == null ? void 0 : Zn.lastFour) || ((Wn = (Yn = t.applePay) == null ? void 0 : Yn.card) == null ? void 0 : Wn.lastFour),
3806
- number: ((Jn = t.card) == null ? void 0 : Jn.number) || ((Qn = (Xn = t.googlePay) == null ? void 0 : Xn.card) == null ? void 0 : Qn.number)
3804
+ cvc: (Dn = t.card) == null ? void 0 : Dn.cvc,
3805
+ exp_month: (Nn = t.card) != null && Nn.expMonth || (On = (Rn = t.googlePay) == null ? void 0 : Rn.card) != null && On.expiry.month ? Number(((jn = t.card) == null ? void 0 : jn.expMonth) || ((Kn = (qn = t.googlePay) == null ? void 0 : qn.card) == null ? void 0 : Kn.expiry.month)) : void 0,
3806
+ exp_year: (Bn = t.card) != null && Bn.expYear || (zn = (Fn = t.googlePay) == null ? void 0 : Fn.card) != null && zn.expiry.year ? Number((($n = t.card) == null ? void 0 : $n.expYear) || ((Un = (Gn = t.googlePay) == null ? void 0 : Gn.card) == null ? void 0 : Un.expiry.year)) : void 0,
3807
+ last4: ((Hn = t.card) == null ? void 0 : Hn.lastFourDigits) || ((Yn = (Zn = t.googlePay) == null ? void 0 : Zn.card) == null ? void 0 : Yn.lastFour) || ((Jn = (Wn = t.applePay) == null ? void 0 : Wn.card) == null ? void 0 : Jn.lastFour),
3808
+ number: ((Xn = t.card) == null ? void 0 : Xn.number) || ((er = (Qn = t.googlePay) == null ? void 0 : Qn.card) == null ? void 0 : er.number)
3807
3809
  } : void 0,
3808
- paypal: (er = t.paypal) != null && er.billing_agreement_token.paypalId ? { billing_agreement_token: (tr = t.paypal) == null ? void 0 : tr.billing_agreement_token.paypalId } : void 0,
3810
+ paypal: (tr = t.paypal) != null && tr.billing_agreement_token.paypalId ? { billing_agreement_token: (nr = t.paypal) == null ? void 0 : nr.billing_agreement_token.paypalId } : void 0,
3809
3811
  google_pay: t.googlePay && t.googlePay.token ? {
3810
3812
  cryptogram: t.googlePay.cryptogram,
3811
3813
  eci: t.googlePay.eci,
3812
- exp_month: (rr = (nr = t.googlePay) == null ? void 0 : nr.card) != null && rr.expiry.month || (ir = t.googlePay) != null && ir.token.expiry.month ? Number(t.googlePay.card.expiry.month || t.googlePay.token.expiry.month) : void 0,
3813
- exp_year: (ar = (sr = t.googlePay) == null ? void 0 : sr.card) != null && ar.expiry.year || (or = t.googlePay) != null && or.token.expiry.year ? Number(t.googlePay.card.expiry.year || t.googlePay.token.expiry.year) : void 0,
3814
- token: (cr = (lr = t.googlePay) == null ? void 0 : lr.token) == null ? void 0 : cr.number,
3815
- token_service_provider: (ur = (dr = t.googlePay) == null ? void 0 : dr.token) == null ? void 0 : ur.tokenServiceProvider
3814
+ exp_month: (ir = (rr = t.googlePay) == null ? void 0 : rr.card) != null && ir.expiry.month || (sr = t.googlePay) != null && sr.token.expiry.month ? Number(t.googlePay.card.expiry.month || t.googlePay.token.expiry.month) : void 0,
3815
+ exp_year: (or = (ar = t.googlePay) == null ? void 0 : ar.card) != null && or.expiry.year || (lr = t.googlePay) != null && lr.token.expiry.year ? Number(t.googlePay.card.expiry.year || t.googlePay.token.expiry.year) : void 0,
3816
+ token: (dr = (cr = t.googlePay) == null ? void 0 : cr.token) == null ? void 0 : dr.number,
3817
+ token_service_provider: (pr = (ur = t.googlePay) == null ? void 0 : ur.token) == null ? void 0 : pr.tokenServiceProvider
3816
3818
  } : void 0,
3817
3819
  apple_pay: t.applePay ? {
3818
3820
  cryptogram: t.applePay.cryptogram,
3819
3821
  eci: t.applePay.eci,
3820
- exp_month: (mr = (pr = (hr = t.applePay) == null ? void 0 : hr.networkToken) == null ? void 0 : pr.expiry) != null && mr.month ? Number(t.applePay.networkToken.expiry.month) : void 0,
3821
- exp_year: (yr = (gr = (fr = t.applePay) == null ? void 0 : fr.networkToken) == null ? void 0 : gr.expiry) != null && yr.year ? Number(t.applePay.networkToken.expiry.year) : void 0,
3822
- token: (br = (vr = t.applePay) == null ? void 0 : vr.networkToken) == null ? void 0 : br.number,
3823
- token_service_provider: (xr = (Cr = t.applePay) == null ? void 0 : Cr.networkToken) == null ? void 0 : xr.tokenServiceProvider
3822
+ exp_month: (fr = (mr = (hr = t.applePay) == null ? void 0 : hr.networkToken) == null ? void 0 : mr.expiry) != null && fr.month ? Number(t.applePay.networkToken.expiry.month) : void 0,
3823
+ exp_year: (vr = (yr = (gr = t.applePay) == null ? void 0 : gr.networkToken) == null ? void 0 : yr.expiry) != null && vr.year ? Number(t.applePay.networkToken.expiry.year) : void 0,
3824
+ token: (Cr = (br = t.applePay) == null ? void 0 : br.networkToken) == null ? void 0 : Cr.number,
3825
+ token_service_provider: (wr = (xr = t.applePay) == null ? void 0 : xr.networkToken) == null ? void 0 : wr.tokenServiceProvider
3824
3826
  } : void 0
3825
3827
  })
3826
3828
  })).json();
3827
- }), Dc = (t) => v(void 0, null, function* () {
3828
- const e = `${yn.apiBase}/payments/create/billing/agreement`, n = new Headers();
3829
- return n.append("Content-Type", "application/json"), (yield (yield fetch(e, {
3829
+ }), Nc = (t, e = "sandbox") => v(void 0, null, function* () {
3830
+ const n = `${yn(e)}/payments/create/billing/agreement`, r = new Headers();
3831
+ return r.append("Content-Type", "application/json"), (yield (yield fetch(n, {
3830
3832
  method: "POST",
3831
- headers: n,
3833
+ headers: r,
3832
3834
  body: JSON.stringify({ client_session: t })
3833
3835
  })).json()).paypal_agreement_token_response.token_id || "";
3834
- }), Nc = (t) => v(void 0, null, function* () {
3835
- const e = `${yn.apiBase}/payments/config?client_session_id=${t}`, r = yield (yield fetch(e)).json();
3836
- return r.checkout_config || (r.checkout_config = _c), r;
3836
+ }), Rc = (t, e = "sandbox") => v(void 0, null, function* () {
3837
+ const n = `${yn(e)}/payments/config?client_session_id=${t}`, i = yield (yield fetch(n)).json();
3838
+ return i.checkout_config || (i.checkout_config = Pc), i;
3837
3839
  });
3838
- var bs = /* @__PURE__ */ ((t) => (t.Card = "CARD", t))(bs || {});
3839
- class Rc {
3840
+ var Cs = /* @__PURE__ */ ((t) => (t.Card = "CARD", t))(Cs || {});
3841
+ class Oc {
3840
3842
  constructor(e) {
3841
3843
  l(this, "isAppleReady", !0);
3842
3844
  l(this, "isGoogleReady", !0);
@@ -3853,8 +3855,9 @@ class Rc {
3853
3855
  cancel: new $(),
3854
3856
  success: new $()
3855
3857
  });
3856
- this.config = e, this.applePay = new ic(e.service.ev), this.paypal = new Ec(e.service.paypal), this.googlePay = new xc(e.service.ev), this.card = new Sc(e.state.translate), this.buttons = document.createElement("div"), this.buttons.classList.add(It.buttons, It.hidden);
3858
+ this.config = e, this.applePay = new sc(e.service.ev), this.paypal = new Lc(e.service.paypal), this.googlePay = new wc(e.service.ev), this.card = new Mc(e.state.translate), this.buttons = document.createElement("div"), this.buttons.classList.add(It.buttons, It.hidden);
3857
3859
  }
3860
+ // init
3858
3861
  init() {
3859
3862
  return v(this, null, function* () {
3860
3863
  this.config.state.transaction.subscribe(() => {
@@ -3866,16 +3869,17 @@ class Rc {
3866
3869
  }), this.card.addEventListener(() => this.events.open.emit());
3867
3870
  });
3868
3871
  }
3872
+ // init apple
3869
3873
  initApple() {
3870
3874
  return v(this, null, function* () {
3871
3875
  this.isAppleReady = !1, this.buttons.appendChild(this.applePay.render());
3872
- const e = this.config.state.transaction.getState(), { locale: n, supportedCardTypes: r } = this.config.state.checkout.getState(), i = yc(e);
3876
+ const e = this.config.state.transaction.getState(), { locale: n, supportedCardTypes: r } = this.config.state.checkout.getState(), i = vc(e);
3873
3877
  try {
3874
3878
  if (!i) return;
3875
3879
  yield this.applePay.init({
3876
3880
  transaction: i,
3877
- supportedCardTypes: vc(r),
3878
- locale: Lc(n || "en"),
3881
+ supportedCardTypes: bc(r),
3882
+ locale: Tc(n || "en"),
3879
3883
  onError: () => this.events.error.emit(),
3880
3884
  onCancel: () => this.events.cancel.emit(),
3881
3885
  onSuccess: (s) => this.events.success.emit(M(L({}, s), { type: "apple" }))
@@ -3887,15 +3891,16 @@ class Rc {
3887
3891
  }
3888
3892
  });
3889
3893
  }
3894
+ // init google
3890
3895
  initGoogle() {
3891
3896
  return v(this, null, function* () {
3892
3897
  this.isGoogleReady = !1, this.buttons.appendChild(this.googlePay.render());
3893
- const e = this.config.state.transaction.getState(), { locale: n } = this.config.state.checkout.getState(), r = gc(e);
3898
+ const e = this.config.state.transaction.getState(), { locale: n } = this.config.state.checkout.getState(), r = yc(e);
3894
3899
  try {
3895
3900
  if (!r) return;
3896
3901
  yield this.googlePay.init({
3897
3902
  transaction: r,
3898
- locale: Tc(n || "en"),
3903
+ locale: Ac(n || "en"),
3899
3904
  onError: () => this.events.error.emit(),
3900
3905
  onCancel: () => this.events.cancel.emit(),
3901
3906
  onSuccess: (i) => this.events.success.emit(M(L({}, i), { type: "google" }))
@@ -3907,12 +3912,13 @@ class Rc {
3907
3912
  }
3908
3913
  });
3909
3914
  }
3915
+ // init paypal
3910
3916
  initPayPal() {
3911
3917
  return v(this, null, function* () {
3912
3918
  var i, s;
3913
3919
  this.isPayPalReady = !1, this.buttons.appendChild(this.paypal.render());
3914
- const e = this.config.state.transaction.getState(), n = this.config.state.checkout.getState().clientToken, r = () => v(this, null, function* () {
3915
- return yield Dc(n);
3920
+ const e = this.config.state.transaction.getState(), n = this.config.state.checkout.getState(), r = () => v(this, null, function* () {
3921
+ return yield Nc(n.clientToken, n.environment);
3916
3922
  });
3917
3923
  try {
3918
3924
  if (!e)
@@ -3932,14 +3938,16 @@ class Rc {
3932
3938
  }
3933
3939
  });
3934
3940
  }
3941
+ // init card
3935
3942
  initCard() {
3936
3943
  return v(this, null, function* () {
3937
3944
  this.buttons.appendChild(this.card.render());
3938
3945
  });
3939
3946
  }
3947
+ // init payment methods
3940
3948
  initPaymentMethods() {
3941
3949
  return v(this, null, function* () {
3942
- const e = this.config.state.transaction.getState(), r = Mc(sc, (e == null ? void 0 : e.checkout_config) || [], (i, s) => i.type === s.type).filter(({ is_active: i }) => i).sort((i, s) => i.order - s.order).map(({ type: i }) => {
3950
+ const e = this.config.state.transaction.getState(), r = _c(ac, (e == null ? void 0 : e.checkout_config) || [], (i, s) => i.type === s.type).filter(({ is_active: i }) => i).sort((i, s) => i.order - s.order).map(({ type: i }) => {
3943
3951
  switch (i) {
3944
3952
  case "apple-pay":
3945
3953
  return this.initApple();
@@ -3956,20 +3964,24 @@ class Rc {
3956
3964
  yield Promise.all(r), this.handleReady();
3957
3965
  });
3958
3966
  }
3967
+ // handle ready
3959
3968
  handleReady() {
3960
3969
  this.isAppleReady && this.isGoogleReady && this.isPayPalReady && this.events.ready.emit();
3961
3970
  }
3971
+ // add event listener
3962
3972
  addEventListener(e, n) {
3963
3973
  return this.events[e].addListener(n);
3964
3974
  }
3975
+ // show button
3965
3976
  showButton() {
3966
3977
  this.buttons.classList.remove(It.hidden);
3967
3978
  }
3979
+ // render
3968
3980
  render() {
3969
3981
  return this.buttons;
3970
3982
  }
3971
3983
  }
3972
- class Oc {
3984
+ class jc {
3973
3985
  constructor() {
3974
3986
  l(this, "template", `
3975
3987
  <svg
@@ -3995,14 +4007,14 @@ class Oc {
3995
4007
  return this.element;
3996
4008
  }
3997
4009
  }
3998
- const jc = "_button_125my_1", qc = {
3999
- button: jc
4010
+ const qc = "_button_125my_1", Kc = {
4011
+ button: qc
4000
4012
  };
4001
- class Kc {
4013
+ class Bc {
4002
4014
  constructor() {
4003
4015
  l(this, "element");
4004
- l(this, "icon", new Oc());
4005
- this.element = document.createElement("div"), this.element.classList.add(qc.button), this.element.appendChild(this.icon.render());
4016
+ l(this, "icon", new jc());
4017
+ this.element = document.createElement("div"), this.element.classList.add(Kc.button), this.element.appendChild(this.icon.render());
4006
4018
  }
4007
4019
  addEventListener(e) {
4008
4020
  return this.element.addEventListener("click", e);
@@ -4011,17 +4023,17 @@ class Kc {
4011
4023
  return this.element;
4012
4024
  }
4013
4025
  }
4014
- const Bc = "_button_rx9be_1", Fc = "_disabled_rx9be_17", zc = "_press_rx9be_22", $c = "_hidden_rx9be_26", Gc = "_spinner_rx9be_30", se = {
4015
- button: Bc,
4016
- disabled: Fc,
4017
- press: zc,
4018
- hidden: $c,
4019
- spinner: Gc
4026
+ const Fc = "_button_rx9be_1", zc = "_disabled_rx9be_17", $c = "_press_rx9be_22", Gc = "_hidden_rx9be_26", Uc = "_spinner_rx9be_30", se = {
4027
+ button: Fc,
4028
+ disabled: zc,
4029
+ press: $c,
4030
+ hidden: Gc,
4031
+ spinner: Uc
4020
4032
  };
4021
- class Uc {
4033
+ class Hc {
4022
4034
  constructor(e) {
4023
4035
  l(this, "element");
4024
- l(this, "spinner", new gs());
4036
+ l(this, "spinner", new ys());
4025
4037
  l(this, "message", document.createElement("span"));
4026
4038
  this.element = document.createElement("button"), this.element.classList.add(se.button), this.spinner.addClass(se.spinner), this.spinner.addClass(se.hidden), this.message.textContent = e.messages().card.pay.button, this.element.append(this.spinner.render(), this.message), this.element.addEventListener("mousedown", () => this.element.classList.add(se.press)), this.element.addEventListener("mouseup", () => this.element.classList.remove(se.press)), this.element.addEventListener("mouseout", () => this.element.classList.remove(se.press)), e.subscribe((n) => {
4027
4039
  this.message.textContent = n.messages.card.pay.button;
@@ -4037,19 +4049,19 @@ class Uc {
4037
4049
  return this.element;
4038
4050
  }
4039
4051
  }
4040
- const Hc = "_cardForm_isqbi_1", Zc = "_hidden_isqbi_5", vt = {
4041
- cardForm: Hc,
4042
- hidden: Zc
4043
- }, Yc = "_wrapper_4knhb_1", Wc = "_inputContainer_4knhb_5", Jc = "_input_4knhb_5", Xc = "_errorInput_4knhb_24", Qc = "_label_4knhb_28", ed = "_labelError_4knhb_32", td = "_disabled_4knhb_36", nd = "_disabledInput_4knhb_40", rd = "_hidden_4knhb_47", O = {
4044
- wrapper: Yc,
4045
- inputContainer: Wc,
4046
- input: Jc,
4047
- errorInput: Xc,
4048
- label: Qc,
4049
- labelError: ed,
4050
- disabled: td,
4051
- disabledInput: nd,
4052
- hidden: rd
4052
+ const Zc = "_cardForm_isqbi_1", Yc = "_hidden_isqbi_5", vt = {
4053
+ cardForm: Zc,
4054
+ hidden: Yc
4055
+ }, Wc = "_wrapper_4knhb_1", Jc = "_inputContainer_4knhb_5", Xc = "_input_4knhb_5", Qc = "_errorInput_4knhb_24", ed = "_label_4knhb_28", td = "_labelError_4knhb_32", nd = "_disabled_4knhb_36", rd = "_disabledInput_4knhb_40", id = "_hidden_4knhb_47", O = {
4056
+ wrapper: Wc,
4057
+ inputContainer: Jc,
4058
+ input: Xc,
4059
+ errorInput: Qc,
4060
+ label: ed,
4061
+ labelError: td,
4062
+ disabled: nd,
4063
+ disabledInput: rd,
4064
+ hidden: id
4053
4065
  };
4054
4066
  class vn {
4055
4067
  constructor() {
@@ -4072,7 +4084,7 @@ class vn {
4072
4084
  return this.element;
4073
4085
  }
4074
4086
  }
4075
- class id {
4087
+ class sd {
4076
4088
  constructor(e) {
4077
4089
  l(this, "id", "paynext-card-input-name");
4078
4090
  l(this, "element");
@@ -4134,20 +4146,20 @@ class id {
4134
4146
  return this.toggleLabelError(r), this.isDisabled ? (this.inputContainer.classList.add(O.disabled), this.input.classList.add(O.disabledInput)) : (this.inputContainer.classList.remove(O.disabled), this.input.classList.remove(O.disabledInput)), this.element;
4135
4147
  }
4136
4148
  }
4137
- const sd = "_wrapper_j8wuo_1", ad = "_inputContainer_j8wuo_5", od = "_input_j8wuo_5", ld = "_endContent_j8wuo_20", cd = "_errorInput_j8wuo_24", dd = "_error_j8wuo_24", ud = "_label_j8wuo_32", hd = "_labelError_j8wuo_36", pd = "_disabled_j8wuo_40", md = "_disabledInput_j8wuo_44", fd = "_hidden_j8wuo_51", _ = {
4138
- wrapper: sd,
4139
- inputContainer: ad,
4140
- input: od,
4141
- endContent: ld,
4142
- errorInput: cd,
4143
- error: dd,
4144
- label: ud,
4149
+ const ad = "_wrapper_j8wuo_1", od = "_inputContainer_j8wuo_5", ld = "_input_j8wuo_5", cd = "_endContent_j8wuo_20", dd = "_errorInput_j8wuo_24", ud = "_error_j8wuo_24", pd = "_label_j8wuo_32", hd = "_labelError_j8wuo_36", md = "_disabled_j8wuo_40", fd = "_disabledInput_j8wuo_44", gd = "_hidden_j8wuo_51", _ = {
4150
+ wrapper: ad,
4151
+ inputContainer: od,
4152
+ input: ld,
4153
+ endContent: cd,
4154
+ errorInput: dd,
4155
+ error: ud,
4156
+ label: pd,
4145
4157
  labelError: hd,
4146
- disabled: pd,
4147
- disabledInput: md,
4148
- hidden: fd
4158
+ disabled: md,
4159
+ disabledInput: fd,
4160
+ hidden: gd
4149
4161
  };
4150
- class gd {
4162
+ class yd {
4151
4163
  constructor() {
4152
4164
  l(this, "template", `
4153
4165
  <svg
@@ -4185,7 +4197,7 @@ class gd {
4185
4197
  return this.element;
4186
4198
  }
4187
4199
  }
4188
- class yd {
4200
+ class vd {
4189
4201
  constructor() {
4190
4202
  l(this, "template", `
4191
4203
  <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16' class='${T.svg}'>
@@ -4222,7 +4234,7 @@ class yd {
4222
4234
  return this.element;
4223
4235
  }
4224
4236
  }
4225
- class vd {
4237
+ class bd {
4226
4238
  constructor() {
4227
4239
  l(this, "template", `
4228
4240
  <svg
@@ -4272,7 +4284,7 @@ class vd {
4272
4284
  return this.element;
4273
4285
  }
4274
4286
  }
4275
- class bd {
4287
+ class Cd {
4276
4288
  constructor() {
4277
4289
  l(this, "template", `
4278
4290
  <svg
@@ -4327,7 +4339,7 @@ class bd {
4327
4339
  return this.element;
4328
4340
  }
4329
4341
  }
4330
- class Cd {
4342
+ class xd {
4331
4343
  constructor() {
4332
4344
  l(this, "template", `
4333
4345
  <svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 23 16' width='23' class='${T.svg}'>
@@ -4367,7 +4379,7 @@ class Cd {
4367
4379
  return this.element;
4368
4380
  }
4369
4381
  }
4370
- class xd {
4382
+ class wd {
4371
4383
  constructor() {
4372
4384
  l(this, "template", `
4373
4385
  <svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 24 16' width='24' class='${T.svg}'>
@@ -4390,7 +4402,7 @@ class xd {
4390
4402
  return this.element;
4391
4403
  }
4392
4404
  }
4393
- class wd {
4405
+ class kd {
4394
4406
  constructor() {
4395
4407
  l(this, "template", `
4396
4408
  <svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 24 16' width='24' class='${T.svg}'>
@@ -4422,7 +4434,7 @@ class wd {
4422
4434
  return this.element;
4423
4435
  }
4424
4436
  }
4425
- class kd {
4437
+ class Ed {
4426
4438
  constructor() {
4427
4439
  l(this, "template", `
4428
4440
  <svg
@@ -4471,7 +4483,7 @@ class kd {
4471
4483
  return this.element;
4472
4484
  }
4473
4485
  }
4474
- class Ed {
4486
+ class Ld {
4475
4487
  constructor(e) {
4476
4488
  l(this, "id", "paynext-card-input-number");
4477
4489
  l(this, "initialCardTypes", kt.map((e) => e.type));
@@ -4483,14 +4495,14 @@ class Ed {
4483
4495
  l(this, "labelError", document.createElement("span"));
4484
4496
  l(this, "endContent", document.createElement("div"));
4485
4497
  l(this, "error", document.createElement("p"));
4486
- l(this, "unknownCard", new gd());
4487
- l(this, "amex", new yd());
4488
- l(this, "dinerClub", new vd());
4489
- l(this, "discover", new bd());
4490
- l(this, "jcb", new Cd());
4491
- l(this, "masterCard", new xd());
4492
- l(this, "unionPay", new wd());
4493
- l(this, "visa", new kd());
4498
+ l(this, "unknownCard", new yd());
4499
+ l(this, "amex", new vd());
4500
+ l(this, "dinerClub", new bd());
4501
+ l(this, "discover", new Cd());
4502
+ l(this, "jcb", new xd());
4503
+ l(this, "masterCard", new wd());
4504
+ l(this, "unionPay", new kd());
4505
+ l(this, "visa", new Ed());
4494
4506
  l(this, "supportedCardTypes", this.initialCardTypes);
4495
4507
  l(this, "isTouchSubmit", !1);
4496
4508
  l(this, "errorMessage", "");
@@ -4514,12 +4526,12 @@ class Ed {
4514
4526
  handleChange(e) {
4515
4527
  if (this.isDisabled) return;
4516
4528
  this.isRequired = !1, this.errorMessage = "", this.isChanged || (this.isChanged = !0);
4517
- const n = ii(e).map((s) => s.type), r = vs(e), i = hc(e, (r == null ? void 0 : r.type) || "");
4529
+ const n = si(e).map((s) => s.type), r = bs(e), i = hc(e, (r == null ? void 0 : r.type) || "");
4518
4530
  i.replace(/\D/g, "").length === ((r == null ? void 0 : r.maxLength) || 16) && this.validate(i), this.supportedCardTypes = n.length ? n : this.initialCardTypes, this.input.value = i, this.events.change.emit({
4519
4531
  card: i,
4520
4532
  cardType: r == null ? void 0 : r.type,
4521
4533
  cardTypes: n,
4522
- isValid: si(e, this.supportedCardTypes).isValid
4534
+ isValid: ai(e, this.supportedCardTypes).isValid
4523
4535
  }), this.render();
4524
4536
  }
4525
4537
  toggleLabelError(e) {
@@ -4574,11 +4586,11 @@ class Ed {
4574
4586
  var e;
4575
4587
  return {
4576
4588
  value: this.input.value,
4577
- cardType: ((e = ii(this.input.value)[0]) == null ? void 0 : e.type) || ""
4589
+ cardType: ((e = si(this.input.value)[0]) == null ? void 0 : e.type) || ""
4578
4590
  };
4579
4591
  }
4580
4592
  validate(e) {
4581
- const n = this.translate.messages(), { isValid: r, error: i } = si(e, this.supportedCardTypes);
4593
+ const n = this.translate.messages(), { isValid: r, error: i } = ai(e, this.supportedCardTypes);
4582
4594
  return r ? (this.isRequired = !1, this.errorMessage = "", this.render(), r) : (i === q.Empty ? (this.errorMessage = "", this.isRequired = !0) : i === q.Unsupported ? (this.errorMessage = n.card.number.error.unsupported, this.isRequired = !1) : (this.errorMessage = i === q.Incomplete ? n.card.number.error.incomplete : n.card.number.error.invalid, this.isRequired = !1), this.render(), r);
4583
4595
  }
4584
4596
  render() {
@@ -4586,20 +4598,20 @@ class Ed {
4586
4598
  return this.toggleLabelError(n), this.toggleErrorMessage(r), !n && !r ? (this.inputContainer.classList.remove(_.errorInput), this.endContent.innerHTML = "", this.endContent.append(...this.getCardIcons())) : (this.endContent.innerHTML = "", this.endContent.appendChild(this.unknownCard.render())), this.isDisabled ? (this.inputContainer.classList.add(_.disabled), this.input.classList.add(_.disabledInput)) : (this.inputContainer.classList.remove(_.disabled), this.input.classList.remove(_.disabledInput)), this.element;
4587
4599
  }
4588
4600
  }
4589
- const Ld = "_inputContainer_1xdj3_5", Td = "_input_1xdj3_5", Ad = "_endContent_1xdj3_20", Vd = "_errorInput_1xdj3_24", Id = "_error_1xdj3_24", Sd = "_label_1xdj3_32", Md = "_labelError_1xdj3_36", _d = "_disabled_1xdj3_40", Pd = "_disabledInput_1xdj3_44", Dd = "_hidden_1xdj3_51", Nd = "_securityContent_1xdj3_55", w = {
4590
- inputContainer: Ld,
4591
- input: Td,
4592
- endContent: Ad,
4593
- errorInput: Vd,
4594
- error: Id,
4595
- label: Sd,
4596
- labelError: Md,
4597
- disabled: _d,
4598
- disabledInput: Pd,
4599
- hidden: Dd,
4600
- securityContent: Nd
4601
+ const Td = "_inputContainer_1xdj3_5", Ad = "_input_1xdj3_5", Vd = "_endContent_1xdj3_20", Id = "_errorInput_1xdj3_24", Sd = "_error_1xdj3_24", Md = "_label_1xdj3_32", _d = "_labelError_1xdj3_36", Pd = "_disabled_1xdj3_40", Dd = "_disabledInput_1xdj3_44", Nd = "_hidden_1xdj3_51", Rd = "_securityContent_1xdj3_55", w = {
4602
+ inputContainer: Td,
4603
+ input: Ad,
4604
+ endContent: Vd,
4605
+ errorInput: Id,
4606
+ error: Sd,
4607
+ label: Md,
4608
+ labelError: _d,
4609
+ disabled: Pd,
4610
+ disabledInput: Dd,
4611
+ hidden: Nd,
4612
+ securityContent: Rd
4601
4613
  };
4602
- class Rd {
4614
+ class Od {
4603
4615
  constructor() {
4604
4616
  l(this, "template", `
4605
4617
  <svg class='${T.svg}' focusable='false' viewBox='0 0 32 21' role='img' aria-label='CVC'>
@@ -4628,13 +4640,13 @@ class Rd {
4628
4640
  return this.element;
4629
4641
  }
4630
4642
  }
4631
- class Od {
4643
+ class jd {
4632
4644
  constructor(e) {
4633
4645
  l(this, "cvcId", "paynext-card-input-cvc");
4634
4646
  l(this, "expiryId", "paynext-card-input-expiry");
4635
4647
  l(this, "element");
4636
4648
  l(this, "warning", new vn());
4637
- l(this, "cardCvc", new Rd());
4649
+ l(this, "cardCvc", new Od());
4638
4650
  l(this, "expiryInputContainer", document.createElement("div"));
4639
4651
  l(this, "expiryInput", document.createElement("input"));
4640
4652
  l(this, "expiryLabel", document.createElement("label"));
@@ -4710,7 +4722,7 @@ class Od {
4710
4722
  handleCvcChange(e) {
4711
4723
  if (this.isDisabled) return;
4712
4724
  this.isCvcRequired = !1, this.cvcErrorMessage = "", this.isCvcChanged || (this.isCvcChanged = !0);
4713
- const n = pc(e, this.cardType || ""), r = _e.getTypeInfo(this.cardType || "");
4725
+ const n = mc(e, this.cardType || ""), r = _e.getTypeInfo(this.cardType || "");
4714
4726
  n.length === (r == null ? void 0 : r.code.size) && this.validateCvc(n), this.events.cvcChange.emit({
4715
4727
  value: n,
4716
4728
  isValid: this.cvcValidator(n) === null
@@ -4757,7 +4769,7 @@ class Od {
4757
4769
  handleExpiryChange(e) {
4758
4770
  if (this.isDisabled) return;
4759
4771
  this.isExpiryRequired = !1, this.expiryErrorMessage = "", this.isExpiryChanged || (this.isExpiryChanged = !0);
4760
- const n = mc(e, this.expiryPrevValue);
4772
+ const n = fc(e, this.expiryPrevValue);
4761
4773
  n.length === 7 && this.validateExpiry(n), this.events.expiryChange.emit({
4762
4774
  value: n,
4763
4775
  isValid: this.expiryValidator(n) === null
@@ -4810,16 +4822,16 @@ class Od {
4810
4822
  return this.toggleCvcLabelError(s), this.toggleCvcErrorMessage(a), !s && !a ? (this.cvcInputContainer.classList.remove(w.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(w.disabled), this.expiryInput.classList.add(w.disabledInput), this.cvcInputContainer.classList.add(w.disabled), this.cvcInput.classList.add(w.disabledInput)) : (this.expiryInputContainer.classList.remove(w.disabled), this.expiryInput.classList.remove(w.disabledInput), this.cvcInputContainer.classList.remove(w.disabled), this.cvcInput.classList.remove(w.disabledInput)), this.element;
4811
4823
  }
4812
4824
  }
4813
- const jd = "_container_94v1h_1", qd = "_title_94v1h_10", ai = {
4814
- container: jd,
4815
- title: qd
4825
+ const qd = "_container_94v1h_1", Kd = "_title_94v1h_10", oi = {
4826
+ container: qd,
4827
+ title: Kd
4816
4828
  };
4817
- class Cs {
4829
+ class xs {
4818
4830
  constructor(e) {
4819
4831
  l(this, "element");
4820
4832
  l(this, "message", document.createElement("p"));
4821
4833
  l(this, "icon", new vn());
4822
- this.translate = e, this.element = document.createElement("div"), this.element.classList.add(ai.container), this.message.classList.add(ai.title), this.message.textContent = e.messages().status.error, this.element.append(this.icon.render(), this.message), this.translate.subscribe(({ messages: n }) => {
4834
+ this.translate = e, this.element = document.createElement("div"), this.element.classList.add(oi.container), this.message.classList.add(oi.title), this.message.textContent = e.messages().status.error, this.element.append(this.icon.render(), this.message), this.translate.subscribe(({ messages: n }) => {
4823
4835
  this.message.textContent = n.status.success;
4824
4836
  });
4825
4837
  }
@@ -4833,7 +4845,7 @@ class Cs {
4833
4845
  return this.element;
4834
4846
  }
4835
4847
  }
4836
- class Kd {
4848
+ class Bd {
4837
4849
  constructor(e, n) {
4838
4850
  l(this, "element");
4839
4851
  l(this, "error");
@@ -4846,7 +4858,7 @@ class Kd {
4846
4858
  submit: new $(),
4847
4859
  close: new $()
4848
4860
  });
4849
- this.element = document.createElement("form"), this.error = new Cs(e), this.submit = new Uc(e), this.back = new Kc(), this.number = new Ed(e), this.name = new id(e), this.cardSecurity = new Od(e), this.error.addClassName(vt.hidden), this.element.classList.add(vt.cardForm, n || ""), this.element.append(
4861
+ this.element = document.createElement("form"), this.error = new xs(e), this.submit = new Hc(e), this.back = new Bc(), this.number = new Ld(e), this.name = new sd(e), this.cardSecurity = new jd(e), this.error.addClassName(vt.hidden), this.element.classList.add(vt.cardForm, n || ""), this.element.append(
4850
4862
  this.back.render(),
4851
4863
  this.number.render(),
4852
4864
  this.cardSecurity.render(),
@@ -4888,7 +4900,7 @@ class Kd {
4888
4900
  return this.element;
4889
4901
  }
4890
4902
  }
4891
- class Bd {
4903
+ class Fd {
4892
4904
  constructor() {
4893
4905
  l(this, "template", `
4894
4906
  <svg
@@ -4915,16 +4927,16 @@ class Bd {
4915
4927
  return this.element;
4916
4928
  }
4917
4929
  }
4918
- const Fd = "_container_hoha1_1", zd = "_title_hoha1_5", oi = {
4919
- container: Fd,
4920
- title: zd
4930
+ const zd = "_container_hoha1_1", $d = "_title_hoha1_5", li = {
4931
+ container: zd,
4932
+ title: $d
4921
4933
  };
4922
- class $d {
4934
+ class Gd {
4923
4935
  constructor(e) {
4924
4936
  l(this, "element");
4925
4937
  l(this, "message", document.createElement("p"));
4926
- l(this, "icon", new Bd());
4927
- this.translate = e, this.element = document.createElement("div"), this.element.classList.add(oi.container), this.message.classList.add(oi.title), this.message.textContent = e.messages().status.success, this.element.append(this.icon.render(), this.message), this.translate.subscribe(({ messages: n }) => {
4938
+ l(this, "icon", new Fd());
4939
+ this.translate = e, this.element = document.createElement("div"), this.element.classList.add(li.container), this.message.classList.add(li.title), this.message.textContent = e.messages().status.success, this.element.append(this.icon.render(), this.message), this.translate.subscribe(({ messages: n }) => {
4928
4940
  this.message.textContent = n.status.success;
4929
4941
  });
4930
4942
  }
@@ -4938,18 +4950,18 @@ class $d {
4938
4950
  return this.element;
4939
4951
  }
4940
4952
  }
4941
- class Gd {
4953
+ class Ud {
4942
4954
  constructor(e) {
4943
4955
  l(this, "checkout");
4944
4956
  l(this, "container", document.createElement("div"));
4945
- l(this, "loader", new Yl());
4957
+ l(this, "loader", new Wl());
4946
4958
  l(this, "error");
4947
4959
  l(this, "success");
4948
4960
  l(this, "buttons");
4949
4961
  l(this, "form");
4950
4962
  l(this, "isLoading", !1);
4951
4963
  l(this, "isFormOpen", !1);
4952
- this.config = e, this.buttons = new Rc(e), this.form = new Kd(e.state.translate, B.hidden), this.error = new Cs(e.state.translate), this.success = new $d(e.state.translate), this.error.addClassName(B.hidden), this.success.addClassName(B.hidden), this.container.append(this.loader.render(), this.buttons.render(), this.form.render()), this.checkout = document.createElement("div"), this.checkout.classList.add(B.checkout), this.checkout.append(this.container, this.error.render(), this.success.render());
4964
+ this.config = e, this.buttons = new Oc(e), this.form = new Bd(e.state.translate, B.hidden), this.error = new xs(e.state.translate), this.success = new Gd(e.state.translate), this.error.addClassName(B.hidden), this.success.addClassName(B.hidden), this.container.append(this.loader.render(), this.buttons.render(), this.form.render()), this.checkout = document.createElement("div"), this.checkout.classList.add(B.checkout), this.checkout.append(this.container, this.error.render(), this.success.render());
4953
4965
  }
4954
4966
  // init
4955
4967
  init() {
@@ -4986,7 +4998,7 @@ class Gd {
4986
4998
  cardBrand: e.cardBrand || "",
4987
4999
  number: a,
4988
5000
  cvc: o,
4989
- type: bs.Card,
5001
+ type: Cs.Card,
4990
5002
  metadata: {
4991
5003
  name: e.name,
4992
5004
  userAgent: navigator == null ? void 0 : navigator.userAgent
@@ -5010,7 +5022,7 @@ class Gd {
5010
5022
  this.hideError(), this.setLoading(!0);
5011
5023
  const n = this.config.state.checkout.getState(), r = this.config.state.translate.messages();
5012
5024
  try {
5013
- const s = yield Pc(e);
5025
+ const s = yield Dc(e, n.environment);
5014
5026
  if (s.error)
5015
5027
  throw new Error(r.status.error);
5016
5028
  if (s.three_ds_session_id) {
@@ -5054,22 +5066,22 @@ class Gd {
5054
5066
  return this.checkout;
5055
5067
  }
5056
5068
  }
5057
- class Ud {
5069
+ class Hd {
5058
5070
  constructor(e) {
5059
5071
  l(this, "component");
5060
- this.config = e, this.component = new Gd(e);
5072
+ this.config = e, this.component = new Ud(e);
5061
5073
  }
5062
5074
  // init
5063
5075
  init() {
5064
5076
  return v(this, null, function* () {
5065
5077
  const { checkout: e, transaction: n, translate: r, styles: i } = this.config.state;
5066
- e.subscribe(({ clientToken: s, locale: a, translate: o, styles: c }) => {
5067
- a && r.locale() !== a && r.setLocale(a), o && r.overrides() !== o && r.setMessages(o), c && i.setState(c), n.updateTransaction(s).then((u) => {
5068
- var d, h;
5069
- if (u)
5078
+ e.subscribe(({ clientToken: s, environment: a, locale: o, translate: c, styles: u }) => {
5079
+ o && r.locale() !== o && r.setLocale(o), c && r.overrides() !== c && r.setMessages(c), u && i.setState(u), n.updateTransaction(s, a || "sandbox").then((d) => {
5080
+ var p, h;
5081
+ if (d)
5070
5082
  return this.config.service.ev.initEv({
5071
- teamId: (d = u.evervault) == null ? void 0 : d.team_id,
5072
- appId: (h = u.evervault) == null ? void 0 : h.app_id
5083
+ teamId: (p = d.evervault) == null ? void 0 : p.team_id,
5084
+ appId: (h = d.evervault) == null ? void 0 : h.app_id
5073
5085
  });
5074
5086
  }).catch(console.error);
5075
5087
  });
@@ -5102,35 +5114,37 @@ class Et {
5102
5114
  return this.observer.addListener(e);
5103
5115
  }
5104
5116
  }
5105
- const Hd = {
5106
- clientToken: ""
5117
+ const Zd = {
5118
+ clientToken: "",
5119
+ environment: "sandbox"
5107
5120
  };
5108
- class Zd extends Et {
5121
+ class Yd extends Et {
5109
5122
  constructor(e) {
5110
- super(e || Hd);
5123
+ super(e || Zd);
5111
5124
  }
5112
5125
  }
5113
- const Yd = {};
5114
- class Wd extends Et {
5126
+ const Wd = {};
5127
+ class Jd extends Et {
5115
5128
  constructor(e) {
5116
- super(e || Yd);
5129
+ super(e || Wd);
5117
5130
  }
5118
5131
  }
5119
- class Jd extends Et {
5132
+ class Xd extends Et {
5120
5133
  constructor(n) {
5121
5134
  super(n || null);
5122
5135
  l(this, "clientToken", "");
5123
5136
  }
5124
- updateTransaction(n) {
5137
+ // update transaction
5138
+ updateTransaction(n, r = "sandbox") {
5125
5139
  return v(this, null, function* () {
5126
5140
  if (this.clientToken === n) return this.getState();
5127
5141
  this.clientToken = n;
5128
- const r = yield Nc(n);
5129
- return this.setState(r), r;
5142
+ const i = yield Rc(n, r);
5143
+ return this.setState(i), i;
5130
5144
  });
5131
5145
  }
5132
5146
  }
5133
- const Xd = {
5147
+ const Qd = {
5134
5148
  card: {
5135
5149
  title: "طريقة الدفع",
5136
5150
  number: {
@@ -5180,7 +5194,7 @@ const Xd = {
5180
5194
  success: "تمت عملية الدفع الخاصة بك بنجاح!",
5181
5195
  error: "لم نتمكن من التحقق من طريقة الدفع الخاصة بك. يرجى اختيار طريقة دفع أخرى وإعادة المحاولة."
5182
5196
  }
5183
- }, Qd = {
5197
+ }, eu = {
5184
5198
  card: {
5185
5199
  title: "Метод на плащане",
5186
5200
  number: {
@@ -5230,7 +5244,7 @@ const Xd = {
5230
5244
  success: "Успех",
5231
5245
  error: "Не можем да удостоверим автентичността на вашия метод на плащане. Моля, изберете друг метод на плащане и опитайте отново."
5232
5246
  }
5233
- }, eu = {
5247
+ }, tu = {
5234
5248
  card: {
5235
5249
  title: "Způsob platby",
5236
5250
  number: {
@@ -5280,7 +5294,7 @@ const Xd = {
5280
5294
  success: "Úspěch",
5281
5295
  error: "Váš způsob platby se nám nedaří ověřit. Zvolte prosím jiný způsob platby a zkuste to znovu."
5282
5296
  }
5283
- }, tu = {
5297
+ }, nu = {
5284
5298
  card: {
5285
5299
  title: "Betalingsmetode",
5286
5300
  number: {
@@ -5330,7 +5344,7 @@ const Xd = {
5330
5344
  success: "Succes",
5331
5345
  error: "Vi kan ikke godkende din betalingsmetode. Vælg venligst en anden betalingsmetode og prøv igen."
5332
5346
  }
5333
- }, nu = {
5347
+ }, ru = {
5334
5348
  card: {
5335
5349
  title: "Zahlungsmethode",
5336
5350
  number: {
@@ -5380,7 +5394,7 @@ const Xd = {
5380
5394
  success: "Erfolg",
5381
5395
  error: "Wir können Ihre Zahlungsmethode nicht authentifizieren. Bitte wählen Sie eine andere Zahlungsmethode und versuchen Sie es erneut."
5382
5396
  }
5383
- }, ru = {
5397
+ }, iu = {
5384
5398
  card: {
5385
5399
  title: "Μέθοδος πληρωμής",
5386
5400
  number: {
@@ -5430,7 +5444,7 @@ const Xd = {
5430
5444
  success: "Επιτυχία",
5431
5445
  error: "Δεν μπορούμε να πιστοποιήσουμε τη μέθοδο πληρωμής σας. Παρακαλούμε επιλέξτε μια διαφορετική μέθοδο πληρωμής και προσπαθήστε ξανά."
5432
5446
  }
5433
- }, iu = {
5447
+ }, su = {
5434
5448
  card: {
5435
5449
  title: "Payment method",
5436
5450
  number: {
@@ -5480,7 +5494,7 @@ const Xd = {
5480
5494
  success: "Your payment was successful!",
5481
5495
  error: "We are unable to authenticate your payment method. Please choose a different payment method and try again."
5482
5496
  }
5483
- }, su = {
5497
+ }, au = {
5484
5498
  card: {
5485
5499
  title: "Método de pago",
5486
5500
  number: {
@@ -5530,7 +5544,7 @@ const Xd = {
5530
5544
  success: "Éxito",
5531
5545
  error: "No podemos autenticar su método de pago. Elija otro método de pago e inténtelo de nuevo."
5532
5546
  }
5533
- }, au = {
5547
+ }, ou = {
5534
5548
  card: {
5535
5549
  title: "Makseviis",
5536
5550
  number: {
@@ -5580,7 +5594,7 @@ const Xd = {
5580
5594
  success: "Edu",
5581
5595
  error: "Me ei suuda teie makseviisi autentida. Palun valige teine makseviis ja proovige uuesti."
5582
5596
  }
5583
- }, ou = {
5597
+ }, lu = {
5584
5598
  card: {
5585
5599
  title: "Maksutapa",
5586
5600
  number: {
@@ -5630,7 +5644,7 @@ const Xd = {
5630
5644
  success: "Menestys",
5631
5645
  error: "Emme pysty todentamaan maksutapaasi. Valitse toinen maksutapa ja yritä uudelleen."
5632
5646
  }
5633
- }, lu = {
5647
+ }, cu = {
5634
5648
  card: {
5635
5649
  title: "Paraan ng pagbabayad",
5636
5650
  number: {
@@ -5680,7 +5694,7 @@ const Xd = {
5680
5694
  success: "Tagumpay",
5681
5695
  error: "Hindi namin ma-authenticate ang iyong paraan ng pagbabayad. Mangyaring pumili ng ibang paraan ng pagbabayad at subukang muli."
5682
5696
  }
5683
- }, cu = {
5697
+ }, du = {
5684
5698
  card: {
5685
5699
  title: "Moyen de paiement",
5686
5700
  number: {
@@ -5730,7 +5744,7 @@ const Xd = {
5730
5744
  success: "Succès",
5731
5745
  error: "Nous ne sommes pas en mesure d'authentifier votre méthode de paiement. Veuillez choisir un autre mode de paiement et réessayer."
5732
5746
  }
5733
- }, du = {
5747
+ }, uu = {
5734
5748
  card: {
5735
5749
  title: "Način plaćanja",
5736
5750
  number: {
@@ -5780,7 +5794,7 @@ const Xd = {
5780
5794
  success: "Uspjeh",
5781
5795
  error: "Ne možemo provjeriti autentičnost vašeg načina plaćanja. Odaberite drugi način plaćanja i pokušajte ponovno."
5782
5796
  }
5783
- }, uu = {
5797
+ }, pu = {
5784
5798
  card: {
5785
5799
  title: "Fizetési mód",
5786
5800
  number: {
@@ -5880,7 +5894,7 @@ const Xd = {
5880
5894
  success: "Sukses",
5881
5895
  error: "Kami tidak dapat mengautentikasi metode pembayaran Anda. Silakan pilih metode pembayaran lain dan coba lagi."
5882
5896
  }
5883
- }, pu = {
5897
+ }, mu = {
5884
5898
  card: {
5885
5899
  title: "Modalità di pagamento",
5886
5900
  number: {
@@ -5930,7 +5944,7 @@ const Xd = {
5930
5944
  success: "Il successo",
5931
5945
  error: "Non siamo in grado di autenticare il suo metodo di pagamento. Scegliere un altro metodo di pagamento e riprovare."
5932
5946
  }
5933
- }, mu = {
5947
+ }, fu = {
5934
5948
  card: {
5935
5949
  title: "支払い方法",
5936
5950
  number: {
@@ -5980,7 +5994,7 @@ const Xd = {
5980
5994
  success: "成功",
5981
5995
  error: "お客様のお支払い方法を認証できません。別のお支払い方法を選択し、再度お試しください。"
5982
5996
  }
5983
- }, fu = {
5997
+ }, gu = {
5984
5998
  card: {
5985
5999
  title: "결제 방식",
5986
6000
  number: {
@@ -6030,7 +6044,7 @@ const Xd = {
6030
6044
  success: "성공",
6031
6045
  error: "결제 방법을 인증할 수 없습니다. 다른 결제 방법을 선택하고 다시 시도해 주세요."
6032
6046
  }
6033
- }, gu = {
6047
+ }, yu = {
6034
6048
  card: {
6035
6049
  title: "Mokėjimo būdas",
6036
6050
  number: {
@@ -6080,7 +6094,7 @@ const Xd = {
6080
6094
  success: "Sėkmė",
6081
6095
  error: "Negalime patvirtinti jūsų mokėjimo būdo. Pasirinkite kitą mokėjimo būdą ir bandykite dar kartą."
6082
6096
  }
6083
- }, yu = {
6097
+ }, vu = {
6084
6098
  card: {
6085
6099
  title: "Maksājumu veids",
6086
6100
  number: {
@@ -6130,7 +6144,7 @@ const Xd = {
6130
6144
  success: "Panākumi",
6131
6145
  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."
6132
6146
  }
6133
- }, vu = {
6147
+ }, bu = {
6134
6148
  card: {
6135
6149
  title: "Kaedah pembayaran",
6136
6150
  number: {
@@ -6180,7 +6194,7 @@ const Xd = {
6180
6194
  success: "Kejayaan",
6181
6195
  error: "Kami tidak dapat mengesahkan kaedah pembayaran anda. Sila pilih kaedah pembayaran lain dan cuba lagi."
6182
6196
  }
6183
- }, bu = {
6197
+ }, Cu = {
6184
6198
  card: {
6185
6199
  title: "Metodu tal-ħlas",
6186
6200
  number: {
@@ -6230,7 +6244,7 @@ const Xd = {
6230
6244
  success: "Suċċess",
6231
6245
  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."
6232
6246
  }
6233
- }, Cu = {
6247
+ }, xu = {
6234
6248
  card: {
6235
6249
  title: "Betalingsmetode",
6236
6250
  number: {
@@ -6280,7 +6294,7 @@ const Xd = {
6280
6294
  success: "Suksess",
6281
6295
  error: "Vi kan ikke godkjenne betalingsmåten din. Vennligst velg en annen betalingsmetode og prøv på nytt."
6282
6296
  }
6283
- }, xu = {
6297
+ }, wu = {
6284
6298
  card: {
6285
6299
  title: "Betaalmethode",
6286
6300
  number: {
@@ -6330,7 +6344,7 @@ const Xd = {
6330
6344
  success: "Succes",
6331
6345
  error: "We kunnen je betaalmethode niet verifiëren. Kies een andere betaalmethode en probeer het opnieuw."
6332
6346
  }
6333
- }, wu = {
6347
+ }, ku = {
6334
6348
  card: {
6335
6349
  title: "Metoda płatności",
6336
6350
  number: {
@@ -6380,7 +6394,7 @@ const Xd = {
6380
6394
  success: "Sukces",
6381
6395
  error: "Nie możemy uwierzytelnić metody płatności. Wybierz inną metodę płatności i spróbuj ponownie."
6382
6396
  }
6383
- }, ku = {
6397
+ }, Eu = {
6384
6398
  card: {
6385
6399
  title: "Forma de pagamento",
6386
6400
  number: {
@@ -6430,7 +6444,7 @@ const Xd = {
6430
6444
  success: "Sucesso",
6431
6445
  error: "Não foi possível autenticar o seu método de pagamento. Selecione outro método de pagamento e tente novamente."
6432
6446
  }
6433
- }, Eu = {
6447
+ }, Lu = {
6434
6448
  card: {
6435
6449
  title: "Metoda de plată",
6436
6450
  number: {
@@ -6480,7 +6494,7 @@ const Xd = {
6480
6494
  success: "Succes",
6481
6495
  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."
6482
6496
  }
6483
- }, Lu = {
6497
+ }, Tu = {
6484
6498
  card: {
6485
6499
  title: "Метод оплаты",
6486
6500
  number: {
@@ -6530,7 +6544,7 @@ const Xd = {
6530
6544
  success: "Успех",
6531
6545
  error: "Мы не можем проверить подлинность вашего способа оплаты. Пожалуйста, выберите другой способ оплаты и повторите попытку."
6532
6546
  }
6533
- }, Tu = {
6547
+ }, Au = {
6534
6548
  card: {
6535
6549
  title: "Spôsob platby",
6536
6550
  number: {
@@ -6580,7 +6594,7 @@ const Xd = {
6580
6594
  success: "Úspech",
6581
6595
  error: "Nemôžeme overiť váš spôsob platby. Vyberte si iný spôsob platby a skúste to znova."
6582
6596
  }
6583
- }, Au = {
6597
+ }, Vu = {
6584
6598
  card: {
6585
6599
  title: "Način plačila",
6586
6600
  number: {
@@ -6630,7 +6644,7 @@ const Xd = {
6630
6644
  success: "Uspeh",
6631
6645
  error: "Vašega načina plačila ne moremo preveriti. Izberite drug način plačila in poskusite znova."
6632
6646
  }
6633
- }, Vu = {
6647
+ }, Iu = {
6634
6648
  card: {
6635
6649
  title: "Betalningsmetod",
6636
6650
  number: {
@@ -6680,7 +6694,7 @@ const Xd = {
6680
6694
  success: "Framgång",
6681
6695
  error: "Vi kan inte verifiera din betalningsmetod. Vänligen välj en annan betalningsmetod och försök igen."
6682
6696
  }
6683
- }, Iu = {
6697
+ }, Su = {
6684
6698
  card: {
6685
6699
  title: "วิธีการชำระเงิน",
6686
6700
  number: {
@@ -6730,7 +6744,7 @@ const Xd = {
6730
6744
  success: "ความสำเร็จ",
6731
6745
  error: "เราไม่สามารถตรวจสอบวิธีการชำระเงินของคุณได้ โปรดเลือกวิธีการชำระเงินอื่นแล้วลองอีกครั้ง"
6732
6746
  }
6733
- }, Su = {
6747
+ }, Mu = {
6734
6748
  card: {
6735
6749
  title: "Ödeme yöntemi",
6736
6750
  number: {
@@ -6780,7 +6794,7 @@ const Xd = {
6780
6794
  success: "Başarı",
6781
6795
  error: "Ödeme yönteminizi doğrulayamıyoruz. Lütfen farklı bir ödeme yöntemi seçin ve tekrar deneyin."
6782
6796
  }
6783
- }, Mu = {
6797
+ }, _u = {
6784
6798
  card: {
6785
6799
  title: "Phương thức thanh toán",
6786
6800
  number: {
@@ -6830,7 +6844,7 @@ const Xd = {
6830
6844
  success: "Thành công",
6831
6845
  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."
6832
6846
  }
6833
- }, _u = {
6847
+ }, Pu = {
6834
6848
  card: {
6835
6849
  title: "支付方式",
6836
6850
  number: {
@@ -6881,46 +6895,46 @@ const Xd = {
6881
6895
  error: "我们无法验证您的付款方式。请选择其他付款方式并重试。"
6882
6896
  }
6883
6897
  }, Yt = {
6884
- ar: Xd,
6885
- en: iu,
6886
- bg: Qd,
6887
- cs: eu,
6888
- da: tu,
6889
- de: nu,
6890
- el: ru,
6891
- es: su,
6892
- et: au,
6893
- fi: ou,
6894
- fil: lu,
6895
- fr: cu,
6896
- hr: du,
6897
- hu: uu,
6898
+ ar: Qd,
6899
+ en: su,
6900
+ bg: eu,
6901
+ cs: tu,
6902
+ da: nu,
6903
+ de: ru,
6904
+ el: iu,
6905
+ es: au,
6906
+ et: ou,
6907
+ fi: lu,
6908
+ fil: cu,
6909
+ fr: du,
6910
+ hr: uu,
6911
+ hu: pu,
6898
6912
  id: hu,
6899
- it: pu,
6900
- ja: mu,
6901
- ko: fu,
6902
- lt: gu,
6903
- lv: yu,
6904
- ms: vu,
6905
- ru: Lu,
6906
- mt: bu,
6907
- nb: Cu,
6908
- nl: xu,
6909
- pl: wu,
6910
- pt: ku,
6911
- ro: Eu,
6912
- sk: Tu,
6913
- sl: Au,
6914
- sv: Vu,
6915
- th: Iu,
6916
- tr: Su,
6917
- vi: Mu,
6918
- zh: _u
6913
+ it: mu,
6914
+ ja: fu,
6915
+ ko: gu,
6916
+ lt: yu,
6917
+ lv: vu,
6918
+ ms: bu,
6919
+ ru: Tu,
6920
+ mt: Cu,
6921
+ nb: xu,
6922
+ nl: wu,
6923
+ pl: ku,
6924
+ pt: Eu,
6925
+ ro: Lu,
6926
+ sk: Au,
6927
+ sl: Vu,
6928
+ sv: Iu,
6929
+ th: Su,
6930
+ tr: Mu,
6931
+ vi: _u,
6932
+ zh: Pu
6919
6933
  }, Wt = () => {
6920
6934
  const t = navigator == null ? void 0 : navigator.language.split("-")[0];
6921
6935
  return Yt[t] || Yt.en;
6922
- }, li = (t, e = {}) => {
6923
- var r, i, s, a, o, c, u, d, h, m, f, p, g, y, b, A, k, V, C, I, S, x, P, R, N, ae, G, oe, J, Te, Ae, Ce, Z, K, he, pe, me, fe, ge, ye, ve, X, re, ie, Q, ee, je, qe, Ke, Be, Fe, ze, $e, Ge, Ue, He, Ze;
6936
+ }, ci = (t, e = {}) => {
6937
+ var r, i, s, a, o, c, u, d, p, h, f, m, g, y, b, A, k, V, C, I, S, x, P, R, N, ae, G, oe, J, Te, Ae, Ce, Z, K, pe, he, me, fe, ge, ye, ve, X, re, ie, Q, ee, je, qe, Ke, Be, Fe, ze, $e, Ge, Ue, He, Ze;
6924
6938
  if (!t) return Wt();
6925
6939
  const n = Yt[t] || Wt();
6926
6940
  return {
@@ -6930,8 +6944,8 @@ const Xd = {
6930
6944
  label: ((s = (i = e == null ? void 0 : e.card) == null ? void 0 : i.number) == null ? void 0 : s.label) || n.card.number.label,
6931
6945
  error: {
6932
6946
  required: ((c = (o = (a = e == null ? void 0 : e.card) == null ? void 0 : a.number) == null ? void 0 : o.error) == null ? void 0 : c.required) || n.card.number.error.required,
6933
- invalid: ((h = (d = (u = e == null ? void 0 : e.card) == null ? void 0 : u.number) == null ? void 0 : d.error) == null ? void 0 : h.invalid) || n.card.number.error.invalid,
6934
- incomplete: ((p = (f = (m = e == null ? void 0 : e.card) == null ? void 0 : m.number) == null ? void 0 : f.error) == null ? void 0 : p.incomplete) || n.card.number.error.incomplete,
6947
+ invalid: ((p = (d = (u = e == null ? void 0 : e.card) == null ? void 0 : u.number) == null ? void 0 : d.error) == null ? void 0 : p.invalid) || n.card.number.error.invalid,
6948
+ incomplete: ((m = (f = (h = e == null ? void 0 : e.card) == null ? void 0 : h.number) == null ? void 0 : f.error) == null ? void 0 : m.incomplete) || n.card.number.error.incomplete,
6935
6949
  unsupported: ((b = (y = (g = e == null ? void 0 : e.card) == null ? void 0 : g.number) == null ? void 0 : y.error) == null ? void 0 : b.unsupported) || n.card.number.error.unsupported
6936
6950
  }
6937
6951
  },
@@ -6947,9 +6961,9 @@ const Xd = {
6947
6961
  },
6948
6962
  cvc: {
6949
6963
  label: ((Z = (Ce = e == null ? void 0 : e.card) == null ? void 0 : Ce.cvc) == null ? void 0 : Z.label) || n.card.cvc.label,
6950
- placeholder: ((he = (K = e == null ? void 0 : e.card) == null ? void 0 : K.cvc) == null ? void 0 : he.label) || n.card.cvc.label,
6964
+ placeholder: ((pe = (K = e == null ? void 0 : e.card) == null ? void 0 : K.cvc) == null ? void 0 : pe.label) || n.card.cvc.label,
6951
6965
  error: {
6952
- required: ((me = (pe = e == null ? void 0 : e.card) == null ? void 0 : pe.cvc) == null ? void 0 : me.label) || n.card.cvc.label,
6966
+ required: ((me = (he = e == null ? void 0 : e.card) == null ? void 0 : he.cvc) == null ? void 0 : me.label) || n.card.cvc.label,
6953
6967
  incomplete: ((ge = (fe = e == null ? void 0 : e.card) == null ? void 0 : fe.cvc) == null ? void 0 : ge.label) || n.card.cvc.label,
6954
6968
  invalid: ((ve = (ye = e == null ? void 0 : e.card) == null ? void 0 : ye.cvc) == null ? void 0 : ve.label) || n.card.cvc.label
6955
6969
  }
@@ -6975,7 +6989,7 @@ const Xd = {
6975
6989
  }
6976
6990
  };
6977
6991
  };
6978
- class Pu extends Et {
6992
+ class Du extends Et {
6979
6993
  constructor() {
6980
6994
  super({
6981
6995
  messages: Wt(),
@@ -6983,11 +6997,11 @@ class Pu extends Et {
6983
6997
  });
6984
6998
  }
6985
6999
  setMessages(e) {
6986
- const n = this.locale(), r = li(n, e);
7000
+ const n = this.locale(), r = ci(n, e);
6987
7001
  this.setState({ locale: n, messages: r, overrides: e });
6988
7002
  }
6989
7003
  setLocale(e) {
6990
- const n = this.overrides(), r = li(e, n);
7004
+ const n = this.overrides(), r = ci(e, n);
6991
7005
  this.setState({ locale: e, messages: r, overrides: n });
6992
7006
  }
6993
7007
  overrides() {
@@ -7022,7 +7036,7 @@ class Pu extends Et {
7022
7036
  * See the License for the specific language governing permissions and
7023
7037
  * limitations under the License.
7024
7038
  */
7025
- function Du(t, e) {
7039
+ function Nu(t, e) {
7026
7040
  var n = {};
7027
7041
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
7028
7042
  if (t != null && typeof Object.getOwnPropertySymbols == "function")
@@ -7030,11 +7044,11 @@ function Du(t, e) {
7030
7044
  e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
7031
7045
  return n;
7032
7046
  }
7033
- function Nu(t, e) {
7047
+ function Ru(t, e) {
7034
7048
  var n = document.querySelector('script[src="'.concat(t, '"]'));
7035
7049
  if (n === null)
7036
7050
  return null;
7037
- var r = xs(t, e), i = n.cloneNode();
7051
+ var r = ws(t, e), i = n.cloneNode();
7038
7052
  if (delete i.dataset.uidAuto, Object.keys(i.dataset).length !== Object.keys(r.dataset).length)
7039
7053
  return null;
7040
7054
  var s = !0;
@@ -7042,63 +7056,63 @@ function Nu(t, e) {
7042
7056
  i.dataset[a] !== r.dataset[a] && (s = !1);
7043
7057
  }), s ? n : null;
7044
7058
  }
7045
- function Ru(t) {
7046
- var e = t.url, n = t.attributes, r = t.onSuccess, i = t.onError, s = xs(e, n);
7059
+ function Ou(t) {
7060
+ var e = t.url, n = t.attributes, r = t.onSuccess, i = t.onError, s = ws(e, n);
7047
7061
  s.onerror = i, s.onload = r, document.head.insertBefore(s, document.head.firstElementChild);
7048
7062
  }
7049
- function Ou(t) {
7050
- var e = t.sdkBaseUrl, n = t.environment, r = Du(t, ["sdkBaseUrl", "environment"]), i = e || Ku(n), s = r, a = Object.keys(s).filter(function(u) {
7063
+ function ju(t) {
7064
+ var e = t.sdkBaseUrl, n = t.environment, r = Nu(t, ["sdkBaseUrl", "environment"]), i = e || Bu(n), s = r, a = Object.keys(s).filter(function(u) {
7051
7065
  return typeof s[u] != "undefined" && s[u] !== null && s[u] !== "";
7052
7066
  }).reduce(function(u, d) {
7053
- var h = s[d].toString();
7054
- return d = ju(d), d.substring(0, 4) === "data" || d === "crossorigin" ? u.attributes[d] = h : u.queryParams[d] = h, u;
7067
+ var p = s[d].toString();
7068
+ return d = qu(d), d.substring(0, 4) === "data" || d === "crossorigin" ? u.attributes[d] = p : u.queryParams[d] = p, u;
7055
7069
  }, {
7056
7070
  queryParams: {},
7057
7071
  attributes: {}
7058
7072
  }), o = a.queryParams, c = a.attributes;
7059
7073
  return o["merchant-id"] && o["merchant-id"].indexOf(",") !== -1 && (c["data-merchant-id"] = o["merchant-id"], o["merchant-id"] = "*"), {
7060
- url: "".concat(i, "?").concat(qu(o)),
7074
+ url: "".concat(i, "?").concat(Ku(o)),
7061
7075
  attributes: c
7062
7076
  };
7063
7077
  }
7064
- function ju(t) {
7078
+ function qu(t) {
7065
7079
  var e = function(n, r) {
7066
7080
  return (r ? "-" : "") + n.toLowerCase();
7067
7081
  };
7068
7082
  return t.replace(/[A-Z]+(?![a-z])|[A-Z]/g, e);
7069
7083
  }
7070
- function qu(t) {
7084
+ function Ku(t) {
7071
7085
  var e = "";
7072
7086
  return Object.keys(t).forEach(function(n) {
7073
7087
  e.length !== 0 && (e += "&"), e += n + "=" + t[n];
7074
7088
  }), e;
7075
7089
  }
7076
- function Ku(t) {
7090
+ function Bu(t) {
7077
7091
  return t === "sandbox" ? "https://www.sandbox.paypal.com/sdk/js" : "https://www.paypal.com/sdk/js";
7078
7092
  }
7079
- function xs(t, e) {
7093
+ function ws(t, e) {
7080
7094
  e === void 0 && (e = {});
7081
7095
  var n = document.createElement("script");
7082
7096
  return n.src = t, Object.keys(e).forEach(function(r) {
7083
7097
  n.setAttribute(r, e[r]), r === "data-csp-nonce" && n.setAttribute("nonce", e["data-csp-nonce"]);
7084
7098
  }), n;
7085
7099
  }
7086
- function Bu(t, e) {
7087
- if (e === void 0 && (e = Promise), ws(t, e), typeof document == "undefined")
7100
+ function Fu(t, e) {
7101
+ if (e === void 0 && (e = Promise), ks(t, e), typeof document == "undefined")
7088
7102
  return e.resolve(null);
7089
- var n = Ou(t), r = n.url, i = n.attributes, s = i["data-namespace"] || "paypal", a = ci(s);
7090
- return i["data-js-sdk-library"] || (i["data-js-sdk-library"] = "paypal-js"), Nu(r, i) && a ? e.resolve(a) : Fu({
7103
+ var n = ju(t), r = n.url, i = n.attributes, s = i["data-namespace"] || "paypal", a = di(s);
7104
+ return i["data-js-sdk-library"] || (i["data-js-sdk-library"] = "paypal-js"), Ru(r, i) && a ? e.resolve(a) : zu({
7091
7105
  url: r,
7092
7106
  attributes: i
7093
7107
  }, e).then(function() {
7094
- var o = ci(s);
7108
+ var o = di(s);
7095
7109
  if (o)
7096
7110
  return o;
7097
7111
  throw new Error("The window.".concat(s, " global variable is not available."));
7098
7112
  });
7099
7113
  }
7100
- function Fu(t, e) {
7101
- e === void 0 && (e = Promise), ws(t, e);
7114
+ function zu(t, e) {
7115
+ e === void 0 && (e = Promise), ks(t, e);
7102
7116
  var n = t.url, r = t.attributes;
7103
7117
  if (typeof n != "string" || n.length === 0)
7104
7118
  throw new Error("Invalid url.");
@@ -7107,7 +7121,7 @@ function Fu(t, e) {
7107
7121
  return new e(function(i, s) {
7108
7122
  if (typeof document == "undefined")
7109
7123
  return i();
7110
- Ru({
7124
+ Ou({
7111
7125
  url: n,
7112
7126
  attributes: r,
7113
7127
  onSuccess: function() {
@@ -7120,10 +7134,10 @@ function Fu(t, e) {
7120
7134
  });
7121
7135
  });
7122
7136
  }
7123
- function ci(t) {
7137
+ function di(t) {
7124
7138
  return window[t];
7125
7139
  }
7126
- function ws(t, e) {
7140
+ function ks(t, e) {
7127
7141
  if (typeof t != "object" || t === null)
7128
7142
  throw new Error("Expected an options object.");
7129
7143
  var n = t.environment;
@@ -7132,13 +7146,13 @@ function ws(t, e) {
7132
7146
  if (typeof e != "undefined" && typeof e != "function")
7133
7147
  throw new Error("Expected PromisePonyfill to be a function.");
7134
7148
  }
7135
- const zu = {
7149
+ const $u = {
7136
7150
  layout: "vertical",
7137
7151
  tagline: !1,
7138
7152
  height: 40,
7139
7153
  borderRadius: 12
7140
7154
  };
7141
- class $u {
7155
+ class Gu {
7142
7156
  constructor() {
7143
7157
  l(this, "paypal", null);
7144
7158
  }
@@ -7146,7 +7160,7 @@ class $u {
7146
7160
  init(e) {
7147
7161
  return v(this, null, function* () {
7148
7162
  try {
7149
- this.paypal = yield Bu(e);
7163
+ this.paypal = yield Fu(e);
7150
7164
  } catch (n) {
7151
7165
  console.error("failed to load the PayPal JS SDK script", n);
7152
7166
  }
@@ -7158,22 +7172,22 @@ class $u {
7158
7172
  var r, i;
7159
7173
  this.paypal && (yield (i = (r = this.paypal).Buttons) == null ? void 0 : i.call(r, L({
7160
7174
  fundingSource: "paypal",
7161
- style: zu
7175
+ style: $u
7162
7176
  }, n)).render(e));
7163
7177
  });
7164
7178
  }
7165
7179
  }
7166
- class Gu {
7180
+ class Uu {
7167
7181
  constructor() {
7168
- l(this, "ev", new Ms());
7169
- l(this, "paypal", new $u());
7182
+ l(this, "ev", new _s());
7183
+ l(this, "paypal", new Gu());
7170
7184
  l(this, "state", {
7171
- translate: new Pu(),
7172
- checkout: new Zd(),
7173
- transaction: new Jd(),
7174
- styles: new Wd()
7185
+ translate: new Du(),
7186
+ checkout: new Yd(),
7187
+ transaction: new Xd(),
7188
+ styles: new Jd()
7175
7189
  });
7176
- l(this, "checkout", new Ud({
7190
+ l(this, "checkout", new Hd({
7177
7191
  state: this.state,
7178
7192
  service: { ev: this.ev, paypal: this.paypal }
7179
7193
  }));
@@ -7182,10 +7196,10 @@ class Gu {
7182
7196
  Object.values(this.state).forEach((e) => e.clearState());
7183
7197
  }
7184
7198
  }
7185
- class Yu {
7199
+ class Wu {
7186
7200
  constructor(e) {
7187
7201
  l(this, "parent");
7188
- l(this, "core", new Gu());
7202
+ l(this, "core", new Uu());
7189
7203
  this.parent = e;
7190
7204
  }
7191
7205
  mount(e) {
@@ -7201,7 +7215,7 @@ class Yu {
7201
7215
  }
7202
7216
  }
7203
7217
  export {
7204
- Gu as Core,
7205
- Yu as PayNextCheckout
7218
+ Uu as Core,
7219
+ Wu as PayNextCheckout
7206
7220
  };
7207
7221
  //# sourceMappingURL=index.es.js.map