@algorisys/tinyfly 0.67.1 → 0.68.1

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.
@@ -211,8 +211,8 @@ class Ot {
211
211
  if (this.settledStep !== null) return;
212
212
  const e = Math.min(t, Tt + 1), s = dt / 1e3;
213
213
  for (; this.samples.length < e; ) {
214
- const n = this.samples[this.samples.length - 1], r = n - this.to, o = -this.stiffness * r, a = -this.damping * this.velocity, c = (o + a) / this.mass;
215
- this.velocity += c * s;
214
+ const n = this.samples[this.samples.length - 1], r = n - this.to, o = -this.stiffness * r, c = -this.damping * this.velocity, a = (o + c) / this.mass;
215
+ this.velocity += a * s;
216
216
  const l = n + this.velocity * s;
217
217
  if (this.samples.push(l), this.isAtRest(l)) {
218
218
  this.settledStep = this.samples.length - 1;
@@ -290,7 +290,7 @@ const ne = (i) => i, es = (i) => i * i, is = (i) => 1 - (1 - i) * (1 - i), ss =
290
290
  "ease-in-out-cubic": Nt
291
291
  };
292
292
  function cs(i) {
293
- const [t, e, s, n] = i, r = 3 * t, o = 3 * (s - t) - r, a = 1 - r - o, c = 3 * e, l = 3 * (n - e) - c, h = 1 - c - l, f = (p) => ((a * p + o) * p + r) * p, u = (p) => ((h * p + l) * p + c) * p, d = (p) => (3 * a * p + 2 * o) * p + r, m = (p) => {
293
+ const [t, e, s, n] = i, r = 3 * t, o = 3 * (s - t) - r, c = 1 - r - o, a = 3 * e, l = 3 * (n - e) - a, h = 1 - a - l, f = (p) => ((c * p + o) * p + r) * p, u = (p) => ((h * p + l) * p + a) * p, d = (p) => (3 * c * p + 2 * o) * p + r, m = (p) => {
294
294
  let g = p;
295
295
  for (let v = 0; v < 8; v++) {
296
296
  const T = f(g) - p;
@@ -407,32 +407,32 @@ function bs(i) {
407
407
  continue;
408
408
  }
409
409
  if (!s) break;
410
- const o = s.type === "A" || s.type === "a", a = s.args.length % 7;
411
- if (o && (a === 3 || a === 4)) {
410
+ const o = s.type === "A" || s.type === "a", c = s.args.length % 7;
411
+ if (o && (c === 3 || c === 4)) {
412
412
  if (r !== "0" && r !== "1") break;
413
413
  s.args.push(r === "1" ? 1 : 0), e++;
414
414
  continue;
415
415
  }
416
- const c = gs.exec(i.slice(e));
417
- if (!c) break;
418
- s.args.push(parseFloat(c[0])), e += c[0].length;
416
+ const a = gs.exec(i.slice(e));
417
+ if (!a) break;
418
+ s.args.push(parseFloat(a[0])), e += a[0].length;
419
419
  }
420
420
  return t;
421
421
  }
422
- function vs(i, t, e, s, n, r, o, a, c) {
423
- if (i === a && t === c) return [];
422
+ function vs(i, t, e, s, n, r, o, c, a) {
423
+ if (i === c && t === a) return [];
424
424
  let l = Math.abs(e), h = Math.abs(s);
425
- if (l === 0 || h === 0) return [[i, t, a, c, a, c]];
426
- const f = n * Math.PI / 180, u = Math.cos(f), d = Math.sin(f), m = (i - a) / 2, p = (t - c) / 2, g = u * m + d * p, y = -d * m + u * p, b = g * g / (l * l) + y * y / (h * h);
425
+ if (l === 0 || h === 0) return [[i, t, c, a, c, a]];
426
+ const f = n * Math.PI / 180, u = Math.cos(f), d = Math.sin(f), m = (i - c) / 2, p = (t - a) / 2, g = u * m + d * p, y = -d * m + u * p, b = g * g / (l * l) + y * y / (h * h);
427
427
  if (b > 1) {
428
428
  const I = Math.sqrt(b);
429
429
  l *= I, h *= I;
430
430
  }
431
- const v = r === o ? -1 : 1, T = l * l * h * h - l * l * y * y - h * h * g * g, w = l * l * y * y + h * h * g * g, x = v * Math.sqrt(Math.max(0, T / w)), S = x * l * y / h, _ = -x * h * g / l, L = u * S - d * _ + (i + a) / 2, A = d * S + u * _ + (t + c) / 2, M = (I, D, O, J) => {
431
+ const v = r === o ? -1 : 1, T = l * l * h * h - l * l * y * y - h * h * g * g, w = l * l * y * y + h * h * g * g, x = v * Math.sqrt(Math.max(0, T / w)), M = x * l * y / h, _ = -x * h * g / l, L = u * M - d * _ + (i + c) / 2, A = d * M + u * _ + (t + a) / 2, S = (I, D, O, J) => {
432
432
  const Xt = I * O + D * J, wt = Math.sqrt((I * I + D * D) * (O * O + J * J)), at = Math.acos(Math.max(-1, Math.min(1, Xt / wt)));
433
433
  return I * J - D * O < 0 ? -at : at;
434
- }, E = M(1, 0, (g - S) / l, (y - _) / h);
435
- let k = M((g - S) / l, (y - _) / h, (-g - S) / l, (-y - _) / h);
434
+ }, E = S(1, 0, (g - M) / l, (y - _) / h);
435
+ let k = S((g - M) / l, (y - _) / h, (-g - M) / l, (-y - _) / h);
436
436
  !o && k > 0 && (k -= 2 * Math.PI), o && k < 0 && (k += 2 * Math.PI);
437
437
  const P = Math.max(1, Math.ceil(Math.abs(k) / (Math.PI / 2))), C = k / P, $ = 4 / 3 * Math.tan(C / 4), R = (I) => {
438
438
  const D = l * Math.cos(I), O = h * Math.sin(I);
@@ -442,7 +442,7 @@ function vs(i, t, e, s, n, r, o, a, c) {
442
442
  return [u * D - d * O, d * D + u * O];
443
443
  }, H = [];
444
444
  for (let I = 0; I < P; I++) {
445
- const D = E + I * C, O = D + C, [J, Xt] = R(D), [wt, at] = I === P - 1 ? [a, c] : R(O), [Wi, ji] = j(D), [Ui, zi] = j(O);
445
+ const D = E + I * C, O = D + C, [J, Xt] = R(D), [wt, at] = I === P - 1 ? [c, a] : R(O), [Wi, ji] = j(D), [Ui, zi] = j(O);
446
446
  H.push([J + $ * Wi, Xt + $ * ji, wt - $ * Ui, at - $ * zi, wt, at]);
447
447
  }
448
448
  return H;
@@ -468,20 +468,20 @@ function ct(i, t, e, s) {
468
468
  };
469
469
  }
470
470
  function xt(i, t, e) {
471
- const [s, n, r, o, a, c] = e, l = [0];
471
+ const [s, n, r, o, c, a] = e, l = [0];
472
472
  let h = i, f = t, u = 0;
473
473
  for (let d = 1; d <= Te; d++) {
474
- const m = d / Te, p = z(i, s, r, a, m), g = z(t, n, o, c, m);
474
+ const m = d / Te, p = z(i, s, r, c, m), g = z(t, n, o, a, m);
475
475
  u += Math.hypot(p - h, g - f), l.push(u), h = p, f = g;
476
476
  }
477
477
  return {
478
478
  subpath: 0,
479
479
  type: "C",
480
- points: [s, n, r, o, a, c],
480
+ points: [s, n, r, o, c, a],
481
481
  startX: i,
482
482
  startY: t,
483
- endX: a,
484
- endY: c,
483
+ endX: c,
484
+ endY: a,
485
485
  length: u,
486
486
  lengths: l
487
487
  };
@@ -490,69 +490,69 @@ function nt(i) {
490
490
  const t = tt.get(i);
491
491
  if (t) return t;
492
492
  const e = [];
493
- let s = 0, n = 0, r = 0, o = 0, a = null, c = null, l = -1;
493
+ let s = 0, n = 0, r = 0, o = 0, c = null, a = null, l = -1;
494
494
  const h = /* @__PURE__ */ new Set(), f = (p) => {
495
495
  l < 0 && (l = 0), p.subpath = l, e.push(p);
496
496
  };
497
497
  for (const { type: p, args: g } of bs(i)) {
498
498
  const y = p.toUpperCase(), b = p !== y, v = ys[y];
499
499
  if (y === "Z") {
500
- (s !== r || n !== o) && f(ct(s, n, r, o)), l >= 0 && h.add(l), s = r, n = o, a = c = null;
500
+ (s !== r || n !== o) && f(ct(s, n, r, o)), l >= 0 && h.add(l), s = r, n = o, c = a = null;
501
501
  continue;
502
502
  }
503
503
  for (let T = 0; T + v <= g.length; T += v) {
504
- const w = g.slice(T, T + v), x = b ? s : 0, S = b ? n : 0;
504
+ const w = g.slice(T, T + v), x = b ? s : 0, M = b ? n : 0;
505
505
  let _ = null, L = null;
506
506
  switch (y) {
507
507
  case "M":
508
- T === 0 ? (s = w[0] + x, n = w[1] + S, r = s, o = n, (l < 0 || e[e.length - 1]?.subpath === l) && l++) : (f(ct(s, n, w[0] + x, w[1] + S)), s = w[0] + x, n = w[1] + S);
508
+ T === 0 ? (s = w[0] + x, n = w[1] + M, r = s, o = n, (l < 0 || e[e.length - 1]?.subpath === l) && l++) : (f(ct(s, n, w[0] + x, w[1] + M)), s = w[0] + x, n = w[1] + M);
509
509
  break;
510
510
  case "L":
511
- f(ct(s, n, w[0] + x, w[1] + S)), s = w[0] + x, n = w[1] + S;
511
+ f(ct(s, n, w[0] + x, w[1] + M)), s = w[0] + x, n = w[1] + M;
512
512
  break;
513
513
  case "H":
514
514
  f(ct(s, n, w[0] + x, n)), s = w[0] + x;
515
515
  break;
516
516
  case "V":
517
- f(ct(s, n, s, w[0] + S)), n = w[0] + S;
517
+ f(ct(s, n, s, w[0] + M)), n = w[0] + M;
518
518
  break;
519
519
  case "C": {
520
- const A = [w[0] + x, w[1] + S, w[2] + x, w[3] + S, w[4] + x, w[5] + S];
520
+ const A = [w[0] + x, w[1] + M, w[2] + x, w[3] + M, w[4] + x, w[5] + M];
521
521
  f(xt(s, n, A)), _ = [A[2], A[3]], s = A[4], n = A[5];
522
522
  break;
523
523
  }
524
524
  case "S": {
525
- const [A, M] = a ? [2 * s - a[0], 2 * n - a[1]] : [s, n], E = [A, M, w[0] + x, w[1] + S, w[2] + x, w[3] + S];
525
+ const [A, S] = c ? [2 * s - c[0], 2 * n - c[1]] : [s, n], E = [A, S, w[0] + x, w[1] + M, w[2] + x, w[3] + M];
526
526
  f(xt(s, n, E)), _ = [E[2], E[3]], s = E[4], n = E[5];
527
527
  break;
528
528
  }
529
529
  case "Q":
530
530
  case "T": {
531
- let A = s, M = n;
532
- y === "Q" ? (A = w[0] + x, M = w[1] + S) : c && (A = 2 * s - c[0], M = 2 * n - c[1]);
533
- const E = y === "Q" ? w[2] + x : w[0] + x, k = y === "Q" ? w[3] + S : w[1] + S;
531
+ let A = s, S = n;
532
+ y === "Q" ? (A = w[0] + x, S = w[1] + M) : a && (A = 2 * s - a[0], S = 2 * n - a[1]);
533
+ const E = y === "Q" ? w[2] + x : w[0] + x, k = y === "Q" ? w[3] + M : w[1] + M;
534
534
  f(
535
535
  xt(s, n, [
536
536
  s + 2 / 3 * (A - s),
537
- n + 2 / 3 * (M - n),
537
+ n + 2 / 3 * (S - n),
538
538
  E + 2 / 3 * (A - E),
539
- k + 2 / 3 * (M - k),
539
+ k + 2 / 3 * (S - k),
540
540
  E,
541
541
  k
542
542
  ])
543
- ), L = [A, M], s = E, n = k;
543
+ ), L = [A, S], s = E, n = k;
544
544
  break;
545
545
  }
546
546
  case "A": {
547
- const A = w[5] + x, M = w[6] + S;
547
+ const A = w[5] + x, S = w[6] + M;
548
548
  let E = s, k = n;
549
- for (const P of vs(s, n, w[0], w[1], w[2], w[3], w[4], A, M))
549
+ for (const P of vs(s, n, w[0], w[1], w[2], w[3], w[4], A, S))
550
550
  f(xt(E, k, P)), E = P[4], k = P[5];
551
- s = A, n = M;
551
+ s = A, n = S;
552
552
  break;
553
553
  }
554
554
  }
555
- a = _, c = L;
555
+ c = _, a = L;
556
556
  }
557
557
  }
558
558
  const u = e.reduce((p, g) => p + g.length, 0), d = [];
@@ -572,8 +572,8 @@ function ws(i, t) {
572
572
  if (t >= i.length) return 1;
573
573
  let s = 0, n = e.length - 1;
574
574
  for (; s < n - 1; ) {
575
- const a = s + n >> 1;
576
- e[a] < t ? s = a : n = a;
575
+ const c = s + n >> 1;
576
+ e[c] < t ? s = c : n = c;
577
577
  }
578
578
  const r = e[n] - e[s], o = r > 0 ? (t - e[s]) / r : 0;
579
579
  return (s + o) / (e.length - 1);
@@ -587,15 +587,15 @@ function Ts(i, t) {
587
587
  angle: Math.atan2(i.endY - i.startY, i.endX - i.startX) * 180 / Math.PI
588
588
  };
589
589
  }
590
- const [e, s, n, r, o, a] = i.points, c = ws(i, t);
591
- let l = xe(i.startX, e, n, o, c), h = xe(i.startY, s, r, a, c);
590
+ const [e, s, n, r, o, c] = i.points, a = ws(i, t);
591
+ let l = xe(i.startX, e, n, o, a), h = xe(i.startY, s, r, c, a);
592
592
  if (Math.hypot(l, h) < 1e-9) {
593
- const f = c < 0.5 ? Math.min(1, c + 1e-3) : Math.max(0, c - 1e-3), u = z(i.startX, e, n, o, f), d = z(i.startY, s, r, a, f), m = z(i.startX, e, n, o, c), p = z(i.startY, s, r, a, c);
594
- l = c < 0.5 ? u - m : m - u, h = c < 0.5 ? d - p : p - d;
593
+ const f = a < 0.5 ? Math.min(1, a + 1e-3) : Math.max(0, a - 1e-3), u = z(i.startX, e, n, o, f), d = z(i.startY, s, r, c, f), m = z(i.startX, e, n, o, a), p = z(i.startY, s, r, c, a);
594
+ l = a < 0.5 ? u - m : m - u, h = a < 0.5 ? d - p : p - d;
595
595
  }
596
596
  return {
597
- x: z(i.startX, e, n, o, c),
598
- y: z(i.startY, s, r, a, c),
597
+ x: z(i.startX, e, n, o, a),
598
+ y: z(i.startY, s, r, c, a),
599
599
  angle: Math.atan2(h, l) * 180 / Math.PI
600
600
  };
601
601
  }
@@ -660,19 +660,19 @@ function Es(i, t, e) {
660
660
  if (e !== void 0)
661
661
  return { offset: s ? Math.abs(e) % lt / lt : 0, reversed: e < 0 };
662
662
  const n = Pe(Ae(i, lt)), r = Pe(Ae(t, lt)), o = lt;
663
- let a = { offset: 0, reversed: !1 }, c = 1 / 0;
663
+ let c = { offset: 0, reversed: !1 }, a = 1 / 0;
664
664
  for (const l of [!1, !0]) {
665
665
  const h = s ? o : 1;
666
666
  for (let f = 0; f < h; f++) {
667
667
  let u = 0;
668
- for (let d = 0; d < o && u < c; d++) {
668
+ for (let d = 0; d < o && u < a; d++) {
669
669
  const m = s ? l ? (f - d + o) % o : (d + f) % o : l ? o - 1 - d : d, p = n[d][0] - r[m][0], g = n[d][1] - r[m][1];
670
670
  u += p * p + g * g;
671
671
  }
672
- u < c && (c = u, a = { offset: s ? f / o : 0, reversed: l });
672
+ u < a && (a = u, c = { offset: s ? f / o : 0, reversed: l });
673
673
  }
674
674
  }
675
- return a;
675
+ return c;
676
676
  }
677
677
  function _s(i, t, e) {
678
678
  return e ? ((t.reversed ? t.offset - i : i + t.offset) % 1 + 1) % 1 : t.reversed ? 1 - i : i;
@@ -684,14 +684,14 @@ function Rs(i, t, e) {
684
684
  const s = i.closed && t.closed, n = Es(i, t, e.shapeIndex), r = Math.max(
685
685
  ks,
686
686
  Math.min(Ss, Math.ceil(Math.max(i.length, t.length) / Ms))
687
- ), o = /* @__PURE__ */ new Set(), a = (f) => o.add(Math.round(f * 1e7) / 1e7);
688
- for (let f = 0; f <= r; f++) a(f / r);
689
- for (const f of Me(i)) a(f);
690
- for (const f of Me(t)) a(Cs(f, n, s));
691
- let c = [...o].sort((f, u) => f - u);
692
- s && (c = c.filter((f) => f < 1));
687
+ ), o = /* @__PURE__ */ new Set(), c = (f) => o.add(Math.round(f * 1e7) / 1e7);
688
+ for (let f = 0; f <= r; f++) c(f / r);
689
+ for (const f of Me(i)) c(f);
690
+ for (const f of Me(t)) c(Cs(f, n, s));
691
+ let a = [...o].sort((f, u) => f - u);
692
+ s && (a = a.filter((f) => f < 1));
693
693
  const l = [], h = [];
694
- for (const f of c)
694
+ for (const f of a)
695
695
  l.push(...re(i, f)), h.push(...re(t, _s(f, n, s)));
696
696
  return Is({ from: l, to: h, closed: s });
697
697
  }
@@ -702,13 +702,13 @@ function Is(i) {
702
702
  e[0] = 1, e[t - 1] = 1;
703
703
  const s = [[0, t - 1]];
704
704
  for (; s.length > 0; ) {
705
- const [o, a] = s.pop();
706
- let c = -1, l = As;
707
- for (let h = o + 1; h < a; h++) {
708
- const f = Math.max(Ee(i.from, o, a, h), Ee(i.to, o, a, h));
709
- f > l && (l = f, c = h);
705
+ const [o, c] = s.pop();
706
+ let a = -1, l = As;
707
+ for (let h = o + 1; h < c; h++) {
708
+ const f = Math.max(Ee(i.from, o, c, h), Ee(i.to, o, c, h));
709
+ f > l && (l = f, a = h);
710
710
  }
711
- c !== -1 && (e[c] = 1, s.push([o, c], [c, a]));
711
+ a !== -1 && (e[a] = 1, s.push([o, a], [a, c]));
712
712
  }
713
713
  const n = [], r = [];
714
714
  for (let o = 0; o < t; o++)
@@ -716,8 +716,8 @@ function Is(i) {
716
716
  return { from: n, to: r, closed: i.closed };
717
717
  }
718
718
  function Ee(i, t, e, s) {
719
- const n = i[t * 2], r = i[t * 2 + 1], o = i[e * 2] - n, a = i[e * 2 + 1] - r, c = i[s * 2] - n, l = i[s * 2 + 1] - r, h = o * o + a * a, f = h === 0 ? 0 : Math.max(0, Math.min(1, (c * o + l * a) / h));
720
- return Math.hypot(c - f * o, l - f * a);
719
+ const n = i[t * 2], r = i[t * 2 + 1], o = i[e * 2] - n, c = i[e * 2 + 1] - r, a = i[s * 2] - n, l = i[s * 2 + 1] - r, h = o * o + c * c, f = h === 0 ? 0 : Math.max(0, Math.min(1, (a * o + l * c) / h));
720
+ return Math.hypot(a - f * o, l - f * c);
721
721
  }
722
722
  function $s(i, t, e) {
723
723
  const s = e.shapeIndex;
@@ -725,8 +725,8 @@ function $s(i, t, e) {
725
725
  const r = pt.get(String(s ?? "auto"))?.get(i)?.get(t);
726
726
  if (r)
727
727
  return U = { from: i, to: t, shapeIndex: s, plan: r }, r;
728
- const o = nt(i).subpaths.filter((d) => d.length > 0).length === nt(t).subpaths.filter((d) => d.length > 0).length, a = Se(i, !o), c = Se(t, !o), l = {
729
- pairs: a.map((d, m) => Rs(d, c[m], e))
728
+ const o = nt(i).subpaths.filter((d) => d.length > 0).length === nt(t).subpaths.filter((d) => d.length > 0).length, c = Se(i, !o), a = Se(t, !o), l = {
729
+ pairs: c.map((d, m) => Rs(d, a[m], e))
730
730
  };
731
731
  At >= Ps && (pt.clear(), At = 0);
732
732
  const h = String(s ?? "auto"), f = pt.get(h) ?? /* @__PURE__ */ new Map();
@@ -743,12 +743,12 @@ function Fs(i, t, e, s = {}) {
743
743
  const r = $s(i, t, s);
744
744
  if (r.pairs.length === 0) return n < 0.5 ? i : t;
745
745
  let o = "";
746
- for (const a of r.pairs) {
747
- for (let c = 0; c < a.from.length; c += 2) {
748
- const l = ke(a.from[c] + (a.to[c] - a.from[c]) * n), h = ke(a.from[c + 1] + (a.to[c + 1] - a.from[c + 1]) * n);
749
- o += `${c === 0 ? o ? " M" : "M" : " L"}${l} ${h}`;
746
+ for (const c of r.pairs) {
747
+ for (let a = 0; a < c.from.length; a += 2) {
748
+ const l = ke(c.from[a] + (c.to[a] - c.from[a]) * n), h = ke(c.from[a + 1] + (c.to[a + 1] - c.from[a + 1]) * n);
749
+ o += `${a === 0 ? o ? " M" : "M" : " L"}${l} ${h}`;
750
750
  }
751
- a.closed && (o += " Z");
751
+ c.closed && (o += " Z");
752
752
  }
753
753
  return o;
754
754
  }
@@ -784,16 +784,16 @@ function $e(i) {
784
784
  }
785
785
  const Os = (i, t, e) => {
786
786
  if (Ce(i) && Ce(t)) {
787
- const [s, n, r] = _e(i), [o, a, c] = _e(t), l = Y(s, o, e), h = Y(n, a, e), f = Y(r, c, e);
787
+ const [s, n, r] = _e(i), [o, c, a] = _e(t), l = Y(s, o, e), h = Y(n, c, e), f = Y(r, a, e);
788
788
  return Ds(l, h, f);
789
789
  }
790
790
  if ((Re(i) || Ie(i)) && (Re(t) || Ie(t))) {
791
- const s = $e(i), n = $e(t), r = Math.round(Y(s[0], n[0], e)), o = Math.round(Y(s[1], n[1], e)), a = Math.round(Y(s[2], n[2], e));
791
+ const s = $e(i), n = $e(t), r = Math.round(Y(s[0], n[0], e)), o = Math.round(Y(s[1], n[1], e)), c = Math.round(Y(s[2], n[2], e));
792
792
  if (s.length === 4 || n.length === 4) {
793
- const c = s[3] ?? 1, l = n[3] ?? 1, h = Y(c, l, e);
794
- return `rgba(${r}, ${o}, ${a}, ${h})`;
793
+ const a = s[3] ?? 1, l = n[3] ?? 1, h = Y(a, l, e);
794
+ return `rgba(${r}, ${o}, ${c}, ${h})`;
795
795
  }
796
- return `rgb(${r}, ${o}, ${a})`;
796
+ return `rgb(${r}, ${o}, ${c})`;
797
797
  }
798
798
  return e < 1 ? i : t;
799
799
  }, Bs = (i, t, e) => {
@@ -826,33 +826,33 @@ function yi(i, t = {}) {
826
826
  );
827
827
  }
828
828
  function bi(i, t, e, s, n, r) {
829
- const o = r.intervalMs ?? mi, a = r.tolerance ?? 0.01, c = i.delay ?? 0, l = [];
829
+ const o = r.intervalMs ?? mi, c = r.tolerance ?? 0.01, a = i.delay ?? 0, l = [];
830
830
  for (let f = 0; f <= e; f += o)
831
- l.push({ time: f + c, value: t(f), easing: "linear" });
831
+ l.push({ time: f + a, value: t(f), easing: "linear" });
832
832
  const h = l[l.length - 1];
833
- return !h || h.time < e + c ? l.push({ time: e + c, value: n, easing: "linear" }) : h.value = n, c > 0 && l.unshift({ time: 0, value: s, easing: "linear" }), {
833
+ return !h || h.time < e + a ? l.push({ time: e + a, value: n, easing: "linear" }) : h.value = n, a > 0 && l.unshift({ time: 0, value: s, easing: "linear" }), {
834
834
  id: i.id,
835
835
  target: i.target,
836
836
  property: i.property,
837
- keyframes: a > 0 ? Xs(l, a) : l,
837
+ keyframes: c > 0 ? Xs(l, c) : l,
838
838
  ...i.targets && { targets: [...i.targets] },
839
839
  ...i.stagger && { stagger: { ...i.stagger } }
840
840
  };
841
841
  }
842
842
  function vi(i, t, e, s = {}) {
843
- const n = s.intervalMs ?? mi, r = typeof e == "function" ? e : W(e), o = Rt(i.value), a = t.time - i.time;
844
- if (a <= 0) return [t];
845
- const c = [];
846
- for (let h = n; h < a; h += n) {
847
- const f = h / a;
848
- c.push({
843
+ const n = s.intervalMs ?? mi, r = typeof e == "function" ? e : W(e), o = Rt(i.value), c = t.time - i.time;
844
+ if (c <= 0) return [t];
845
+ const a = [];
846
+ for (let h = n; h < c; h += n) {
847
+ const f = h / c;
848
+ a.push({
849
849
  time: i.time + h,
850
850
  value: o(i.value, t.value, r(f)),
851
851
  easing: "linear"
852
852
  });
853
853
  }
854
854
  const l = r(1);
855
- return c.push({ ...t, ...l !== 1 && { value: o(i.value, t.value, l) }, easing: "linear" }), c;
855
+ return a.push({ ...t, ...l !== 1 && { value: o(i.value, t.value, l) }, easing: "linear" }), a;
856
856
  }
857
857
  function vo(i, t) {
858
858
  return Q(i) ? gi(i, t) : Z(i) ? yi(i, t) : i;
@@ -877,9 +877,9 @@ function Xs(i, t) {
877
877
  if (i.length <= 2) return i;
878
878
  const e = [i[0]];
879
879
  for (let s = 1; s < i.length - 1; s++) {
880
- const n = e[e.length - 1], r = i[s], o = i[s + 1], a = o.time - n.time;
881
- if (a <= 0) continue;
882
- const c = (r.time - n.time) / a, l = n.value + (o.value - n.value) * c;
880
+ const n = e[e.length - 1], r = i[s], o = i[s + 1], c = o.time - n.time;
881
+ if (c <= 0) continue;
882
+ const a = (r.time - n.time) / c, l = n.value + (o.value - n.value) * a;
883
883
  Math.abs(r.value - l) > t && e.push(r);
884
884
  }
885
885
  return e.push(i[i.length - 1]), e;
@@ -958,8 +958,8 @@ class zt {
958
958
  return;
959
959
  if (s.time === t)
960
960
  return s.value;
961
- const r = n.time - s.time, o = (t - s.time) / r, c = W(n.easing)(o);
962
- return Rt(s.value)(s.value, n.value, c);
961
+ const r = n.time - s.time, o = (t - s.time) / r, a = W(n.easing)(o);
962
+ return Rt(s.value)(s.value, n.value, a);
963
963
  }
964
964
  /**
965
965
  * Find the keyframes surrounding a given time.
@@ -1029,8 +1029,8 @@ class Vs {
1029
1029
  function wi(i, t) {
1030
1030
  const e = { ...xs(i.pathData, t) };
1031
1031
  if (i.matrix) {
1032
- const [s, n, r, o, a, c] = i.matrix, { x: l, y: h } = e;
1033
- e.x = s * l + r * h + a, e.y = n * l + o * h + c;
1032
+ const [s, n, r, o, c, a] = i.matrix, { x: l, y: h } = e;
1033
+ e.x = s * l + r * h + c, e.y = n * l + o * h + a;
1034
1034
  const f = e.angle * Math.PI / 180, u = Math.cos(f), d = Math.sin(f);
1035
1035
  e.angle = Math.atan2(n * u + o * d, s * u + r * d) * 180 / Math.PI;
1036
1036
  }
@@ -1058,15 +1058,15 @@ function zs(i, t, e = 0) {
1058
1058
  const s = i.from ?? "", n = i.to, r = Math.max(0, Math.min(1, t));
1059
1059
  if (r <= 0) return s;
1060
1060
  if (r >= 1) return n;
1061
- const o = Array.from(s), a = Array.from(n), c = i.rightToLeft ?? !1;
1061
+ const o = Array.from(s), c = Array.from(n), a = i.rightToLeft ?? !1;
1062
1062
  if (i.mode === "type") {
1063
- const b = Math.round(r * Math.max(o.length, a.length));
1064
- return c ? o.slice(0, Math.max(0, o.length - b)).join("") + a.slice(Math.max(0, a.length - b)).join("") : a.slice(0, b).join("") + o.slice(b).join("");
1063
+ const b = Math.round(r * Math.max(o.length, c.length));
1064
+ return a ? o.slice(0, Math.max(0, o.length - b)).join("") + c.slice(Math.max(0, c.length - b)).join("") : c.slice(0, b).join("") + o.slice(b).join("");
1065
1065
  }
1066
- const l = Math.max(0, Math.min(0.999, i.revealDelay ?? 0)), h = Math.max(0, (r - l) / (1 - l)), f = Math.floor(h * a.length), u = i.tweenLength === !1 ? a.length : Math.round(o.length + (a.length - o.length) * r), d = js(i.chars), m = i.refreshRate ?? Ws, p = m > 0 ? Math.floor(e * m / 1e3) : 0, g = i.seed ?? 1;
1066
+ const l = Math.max(0, Math.min(0.999, i.revealDelay ?? 0)), h = Math.max(0, (r - l) / (1 - l)), f = Math.floor(h * c.length), u = i.tweenLength === !1 ? c.length : Math.round(o.length + (c.length - o.length) * r), d = js(i.chars), m = i.refreshRate ?? Ws, p = m > 0 ? Math.floor(e * m / 1e3) : 0, g = i.seed ?? 1;
1067
1067
  let y = "";
1068
1068
  for (let b = 0; b < u; b++) {
1069
- const v = c ? b >= u - f : b < f, T = c ? a[a.length - (u - b)] : a[b];
1069
+ const v = a ? b >= u - f : b < f, T = a ? c[c.length - (u - b)] : c[b];
1070
1070
  v && T !== void 0 || T === " " || T === `
1071
1071
  ` ? y += T : y += d[Us(g, b, p) % d.length];
1072
1072
  }
@@ -1187,26 +1187,26 @@ class Ti {
1187
1187
  return;
1188
1188
  let n = t * this.speed;
1189
1189
  if (this._repeatDelayRemaining > 0) {
1190
- const a = Math.min(this._repeatDelayRemaining, n);
1191
- if (this._repeatDelayRemaining -= a, n -= a, this._repeatDelayRemaining > 0) {
1190
+ const c = Math.min(this._repeatDelayRemaining, n);
1191
+ if (this._repeatDelayRemaining -= c, n -= c, this._repeatDelayRemaining > 0) {
1192
1192
  this.onUpdate?.(this.getStateAtTime(this._currentTime));
1193
1193
  return;
1194
1194
  }
1195
1195
  this._wrapAfterDelay && (this._wrapAfterDelay = !1, this._currentTime = 0);
1196
1196
  }
1197
1197
  const r = 1e3;
1198
- for (let a = 0; a < r && n > 0 && this._playbackState === "playing"; a++)
1198
+ for (let c = 0; c < r && n > 0 && this._playbackState === "playing"; c++)
1199
1199
  if (this._direction === "forward") {
1200
- const c = e - this._currentTime;
1201
- if (n >= c) {
1202
- if (n -= c, this._currentTime = e, !this._handleEndReached())
1200
+ const a = e - this._currentTime;
1201
+ if (n >= a) {
1202
+ if (n -= a, this._currentTime = e, !this._handleEndReached())
1203
1203
  break;
1204
1204
  } else
1205
1205
  this._currentTime += n, n = 0;
1206
1206
  } else {
1207
- const c = this._currentTime;
1208
- if (n >= c) {
1209
- if (n -= c, this._currentTime = 0, !this._handleStartReached())
1207
+ const a = this._currentTime;
1208
+ if (n >= a) {
1209
+ if (n -= a, this._currentTime = 0, !this._handleStartReached())
1210
1210
  break;
1211
1211
  } else
1212
1212
  this._currentTime -= n, n = 0;
@@ -1224,8 +1224,8 @@ class Ti {
1224
1224
  else
1225
1225
  for (const [s, n] of this._trackPlayers) {
1226
1226
  const r = n.getTrack().property;
1227
- for (const { target: o, value: a, start: c } of n.getTargetValues(t))
1228
- this._write(e, s, o, r, a, t - c);
1227
+ for (const { target: o, value: c, start: a } of n.getTargetValues(t))
1228
+ this._write(e, s, o, r, c, t - a);
1229
1229
  }
1230
1230
  return {
1231
1231
  values: e,
@@ -1252,13 +1252,13 @@ class Ti {
1252
1252
  const s = /* @__PURE__ */ new Map();
1253
1253
  for (const [n, r] of this._trackPlayers) {
1254
1254
  const o = r.getTrack().property;
1255
- for (const { target: a, value: c, start: l } of r.getTargetValues(t)) {
1256
- const h = `${a}\0${o}`, f = l <= t, u = s.get(h);
1257
- (!u || (f !== u.started ? f : f ? l >= u.start : l <= u.start)) && s.set(h, { trackId: n, target: a, property: o, value: c, start: l, started: f });
1255
+ for (const { target: c, value: a, start: l } of r.getTargetValues(t)) {
1256
+ const h = `${c}\0${o}`, f = l <= t, u = s.get(h);
1257
+ (!u || (f !== u.started ? f : f ? l >= u.start : l <= u.start)) && s.set(h, { trackId: n, target: c, property: o, value: a, start: l, started: f });
1258
1258
  }
1259
1259
  }
1260
- for (const { trackId: n, target: r, property: o, value: a, start: c } of s.values())
1261
- this._write(e, n, r, o, a, t - c);
1260
+ for (const { trackId: n, target: r, property: o, value: c, start: a } of s.values())
1261
+ this._write(e, n, r, o, c, t - a);
1262
1262
  }
1263
1263
  /**
1264
1264
  * Write one track's value for a target, expanding the progress of motion paths
@@ -1267,19 +1267,19 @@ class Ti {
1267
1267
  */
1268
1268
  _write(t, e, s, n, r, o) {
1269
1269
  if (r === void 0) return;
1270
- let a = t.get(s);
1271
- a || (a = /* @__PURE__ */ new Map(), t.set(s, a));
1272
- const c = this._textTracks.get(e);
1273
- if (c && typeof r == "number") {
1274
- a.set("text", zs(c.textConfig, r, Math.max(0, o)));
1270
+ let c = t.get(s);
1271
+ c || (c = /* @__PURE__ */ new Map(), t.set(s, c));
1272
+ const a = this._textTracks.get(e);
1273
+ if (a && typeof r == "number") {
1274
+ c.set("text", zs(a.textConfig, r, Math.max(0, o)));
1275
1275
  return;
1276
1276
  }
1277
1277
  const l = this._motionPathTracks.get(e);
1278
1278
  if (l && typeof r == "number") {
1279
1279
  const h = wi(l.motionPathConfig, r);
1280
- a.set("motionPathX", h.x), a.set("motionPathY", h.y), l.motionPathConfig.autoRotate && a.set("motionPathRotate", h.angle);
1280
+ c.set("motionPathX", h.x), c.set("motionPathY", h.y), l.motionPathConfig.autoRotate && c.set("motionPathRotate", h.angle);
1281
1281
  } else
1282
- a.set(n, r);
1282
+ c.set(n, r);
1283
1283
  }
1284
1284
  /** Cached: does any target+property have more than one track? */
1285
1285
  _sharedWrites = null;
@@ -1399,12 +1399,12 @@ class Ti {
1399
1399
  for (let r = 0; r < e; r++) {
1400
1400
  const o = this._tracks[r];
1401
1401
  if (o.property !== s.property) continue;
1402
- const a = G(o).filter((f) => G(s).includes(f));
1403
- if (a.length === 0) continue;
1404
- const c = this.getTrackSpan(o.id);
1405
- if (!c || !(c.from <= n.to && n.from <= c.to)) continue;
1406
- const h = n.from >= c.from;
1407
- for (const f of a)
1402
+ const c = G(o).filter((f) => G(s).includes(f));
1403
+ if (c.length === 0) continue;
1404
+ const a = this.getTrackSpan(o.id);
1405
+ if (!a || !(a.from <= n.to && n.from <= a.to)) continue;
1406
+ const h = n.from >= a.from;
1407
+ for (const f of c)
1408
1408
  t.push({
1409
1409
  target: f,
1410
1410
  property: s.property,
@@ -1488,7 +1488,7 @@ class Ti {
1488
1488
  }
1489
1489
  const Hs = 100;
1490
1490
  function xi(i, t, e, s) {
1491
- const n = [], r = [], { duration: o, alternate: a } = s, c = (d, m, p, g) => {
1491
+ const n = [], r = [], { duration: o, alternate: c } = s, a = (d, m, p, g) => {
1492
1492
  r.push([d, m]);
1493
1493
  const y = [];
1494
1494
  i.forEach((b, v) => {
@@ -1500,9 +1500,9 @@ function xi(i, t, e, s) {
1500
1500
  const u = Math.min(Hs, Math.max(0, e.iteration - t.iteration));
1501
1501
  for (let d = 0; d < u; d++) {
1502
1502
  const m = h === "forward" ? o : 0;
1503
- c(l, m, h, f), n.push({ kind: "repeat" }), a ? (h = h === "forward" ? "reverse" : "forward", l = m, f = !1) : (l = h === "forward" ? 0 : o, f = !0);
1503
+ a(l, m, h, f), n.push({ kind: "repeat" }), c ? (h = h === "forward" ? "reverse" : "forward", l = m, f = !1) : (l = h === "forward" ? 0 : o, f = !0);
1504
1504
  }
1505
- return u > 0 && s.holding && !a ? { crossings: n, passes: r } : (c(l, e.time, h, f), { crossings: n, passes: r });
1505
+ return u > 0 && s.holding && !c ? { crossings: n, passes: r } : (a(l, e.time, h, f), { crossings: n, passes: r });
1506
1506
  }
1507
1507
  function Gs(i) {
1508
1508
  return Z(i) ? {
@@ -1687,16 +1687,16 @@ function Pi(i, t = {}) {
1687
1687
  if (typeof i != "string") return i;
1688
1688
  const e = i.trim(), s = Mi.exec(e);
1689
1689
  if (s) {
1690
- const [, r, o] = s, a = t.base ?? 0, c = Number.parseFloat(o);
1690
+ const [, r, o] = s, c = t.base ?? 0, a = Number.parseFloat(o);
1691
1691
  switch (r) {
1692
1692
  case "+":
1693
- return a + c;
1693
+ return c + a;
1694
1694
  case "-":
1695
- return a - c;
1695
+ return c - a;
1696
1696
  case "*":
1697
- return a * c;
1697
+ return c * a;
1698
1698
  case "/":
1699
- return c === 0 ? a : a / c;
1699
+ return a === 0 ? c : c / a;
1700
1700
  }
1701
1701
  }
1702
1702
  const n = Ai.exec(e);
@@ -1705,8 +1705,8 @@ function Pi(i, t = {}) {
1705
1705
  throw new Error(
1706
1706
  `resolveValue: "${e}" needs a random source — pass one via context.random`
1707
1707
  );
1708
- const r = Number.parseFloat(n[1]), o = Number.parseFloat(n[2]), a = n[3] !== void 0 ? Number.parseFloat(n[3]) : void 0;
1709
- return a !== void 0 ? Js(t.random, r, o, a) : Si(t.random, r, o);
1708
+ const r = Number.parseFloat(n[1]), o = Number.parseFloat(n[2]), c = n[3] !== void 0 ? Number.parseFloat(n[3]) : void 0;
1709
+ return c !== void 0 ? Js(t.random, r, o, c) : Si(t.random, r, o);
1710
1710
  }
1711
1711
  return i;
1712
1712
  }
@@ -1745,16 +1745,16 @@ function sn(i) {
1745
1745
  if (t.length === 0) throw new Error(`customEase: no curve in "${i}"`);
1746
1746
  const e = t[0].startX, s = t[0].startY, n = t[t.length - 1], r = n.endX - e, o = n.endY - s;
1747
1747
  if (r === 0 || o === 0) throw new Error(`customEase: "${i}" must move along both axes`);
1748
- const a = (u) => (u - e) / r, c = (u) => (u - s) / o;
1748
+ const c = (u) => (u - e) / r, a = (u) => (u - s) / o;
1749
1749
  if (t.length === 1 && n.type === "C") {
1750
- const [u, d, m, p] = n.points, g = [a(u), c(d), a(m), c(p)];
1750
+ const [u, d, m, p] = n.points, g = [c(u), a(d), c(m), a(p)];
1751
1751
  return { fn: Le(...g), bezier: g };
1752
1752
  }
1753
1753
  const l = [], h = [], f = Math.max(8, Math.ceil(en / t.length));
1754
1754
  for (const u of t)
1755
1755
  for (let d = l.length === 0 ? 0 : 1; d <= f; d++) {
1756
1756
  const [m, p] = on(u, d / f);
1757
- l.push(a(m)), h.push(c(p));
1757
+ l.push(c(m)), h.push(a(p));
1758
1758
  }
1759
1759
  return { fn: an(l, h) };
1760
1760
  }
@@ -1766,13 +1766,13 @@ function nn(i = {}) {
1766
1766
  if (r <= 0) return 0;
1767
1767
  if (r >= 1) return 1;
1768
1768
  let o = r * n;
1769
- for (let a = 0; a < s.length; a++) {
1770
- if (o <= s[a]) {
1771
- if (a === 0) return (o / s[0]) ** 2;
1772
- const c = s[a] / 2, l = c * c, h = o - c;
1769
+ for (let c = 0; c < s.length; c++) {
1770
+ if (o <= s[c]) {
1771
+ if (c === 0) return (o / s[0]) ** 2;
1772
+ const a = s[c] / 2, l = a * a, h = o - a;
1773
1773
  return 1 - (l - h * h);
1774
1774
  }
1775
- o -= s[a];
1775
+ o -= s[c];
1776
1776
  }
1777
1777
  return 1;
1778
1778
  };
@@ -1786,10 +1786,10 @@ function on(i, t) {
1786
1786
  const [l, h] = i.points;
1787
1787
  return [i.startX + (l - i.startX) * t, i.startY + (h - i.startY) * t];
1788
1788
  }
1789
- const [e, s, n, r, o, a] = i.points, c = 1 - t;
1789
+ const [e, s, n, r, o, c] = i.points, a = 1 - t;
1790
1790
  return [
1791
- c * c * c * i.startX + 3 * c * c * t * e + 3 * c * t * t * n + t * t * t * o,
1792
- c * c * c * i.startY + 3 * c * c * t * s + 3 * c * t * t * r + t * t * t * a
1791
+ a * a * a * i.startX + 3 * a * a * t * e + 3 * a * t * t * n + t * t * t * o,
1792
+ a * a * a * i.startY + 3 * a * a * t * s + 3 * a * t * t * r + t * t * t * c
1793
1793
  ];
1794
1794
  }
1795
1795
  function an(i, t) {
@@ -1806,22 +1806,22 @@ function an(i, t) {
1806
1806
  };
1807
1807
  }
1808
1808
  function Le(i, t, e, s) {
1809
- const n = (o, a, c) => 3 * (1 - o) * (1 - o) * o * a + 3 * (1 - o) * o * o * c + o * o * o, r = (o, a, c) => 3 * (1 - o) * (1 - o) * a + 6 * (1 - o) * o * (c - a) + 3 * o * o * (1 - c);
1809
+ const n = (o, c, a) => 3 * (1 - o) * (1 - o) * o * c + 3 * (1 - o) * o * o * a + o * o * o, r = (o, c, a) => 3 * (1 - o) * (1 - o) * c + 6 * (1 - o) * o * (a - c) + 3 * o * o * (1 - a);
1810
1810
  return (o) => {
1811
1811
  if (o <= 0) return 0;
1812
1812
  if (o >= 1) return 1;
1813
- let a = o;
1813
+ let c = o;
1814
1814
  for (let h = 0; h < 8; h++) {
1815
- const f = n(a, i, e) - o, u = r(a, i, e);
1816
- if (Math.abs(f) < 1e-6) return n(a, t, s);
1815
+ const f = n(c, i, e) - o, u = r(c, i, e);
1816
+ if (Math.abs(f) < 1e-6) return n(c, t, s);
1817
1817
  if (Math.abs(u) < 1e-6) break;
1818
- a -= f / u;
1818
+ c -= f / u;
1819
1819
  }
1820
- let c = 0, l = 1;
1821
- a = o;
1820
+ let a = 0, l = 1;
1821
+ c = o;
1822
1822
  for (let h = 0; h < 40; h++)
1823
- n(a, i, e) < o ? c = a : l = a, a = (c + l) / 2;
1824
- return n(a, t, s);
1823
+ n(c, i, e) < o ? a = c : l = c, c = (a + l) / 2;
1824
+ return n(c, t, s);
1825
1825
  };
1826
1826
  }
1827
1827
  const q = (i) => Math.round(i * 1e3) / 1e3;
@@ -1830,9 +1830,9 @@ function cn(i, t = {}) {
1830
1830
  const e = t.curviness ?? 1, s = t.closed ?? !1, n = i.length;
1831
1831
  let r = `M${q(i[0].x)} ${q(i[0].y)}`;
1832
1832
  if (n === 1) return r;
1833
- const o = (c) => s ? i[(c % n + n) % n] : i[Math.max(0, Math.min(n - 1, c))], a = s ? n : n - 1;
1834
- for (let c = 0; c < a; c++) {
1835
- const l = o(c - 1), h = o(c), f = o(c + 1), u = o(c + 2);
1833
+ const o = (a) => s ? i[(a % n + n) % n] : i[Math.max(0, Math.min(n - 1, a))], c = s ? n : n - 1;
1834
+ for (let a = 0; a < c; a++) {
1835
+ const l = o(a - 1), h = o(a), f = o(a + 1), u = o(a + 2);
1836
1836
  if (e === 0) {
1837
1837
  r += ` L${q(f.x)} ${q(f.y)}`;
1838
1838
  continue;
@@ -1863,8 +1863,8 @@ function pe(i) {
1863
1863
  }
1864
1864
  case "rect": {
1865
1865
  const e = F(t.x), s = F(t.y), n = F(t.width), r = F(t.height);
1866
- let o = t.rx != null ? F(t.rx) : t.ry != null ? F(t.ry) : 0, a = t.ry != null ? F(t.ry) : o;
1867
- return o = Math.min(o, n / 2), a = Math.min(a, r / 2), o === 0 || a === 0 ? `M${e} ${s} H${e + n} V${s + r} H${e} Z` : `M${e + o} ${s} H${e + n - o} A${o} ${a} 0 0 1 ${e + n} ${s + a} V${s + r - a} A${o} ${a} 0 0 1 ${e + n - o} ${s + r} H${e + o} A${o} ${a} 0 0 1 ${e} ${s + r - a} V${s + a} A${o} ${a} 0 0 1 ${e + o} ${s} Z`;
1866
+ let o = t.rx != null ? F(t.rx) : t.ry != null ? F(t.ry) : 0, c = t.ry != null ? F(t.ry) : o;
1867
+ return o = Math.min(o, n / 2), c = Math.min(c, r / 2), o === 0 || c === 0 ? `M${e} ${s} H${e + n} V${s + r} H${e} Z` : `M${e + o} ${s} H${e + n - o} A${o} ${c} 0 0 1 ${e + n} ${s + c} V${s + r - c} A${o} ${c} 0 0 1 ${e + n - o} ${s + r} H${e + o} A${o} ${c} 0 0 1 ${e} ${s + r - c} V${s + c} A${o} ${c} 0 0 1 ${e + o} ${s} Z`;
1868
1868
  }
1869
1869
  case "line":
1870
1870
  return `M${F(t.x1)} ${F(t.y1)} L${F(t.x2)} ${F(t.y2)}`;
@@ -1934,10 +1934,10 @@ function It(i) {
1934
1934
  }
1935
1935
  const n = /^(elastic|bounce|back)\.(in|out|inout)(?:\(([^)]*)\))?$/.exec(e);
1936
1936
  if (n) {
1937
- const [, r, o, a] = n, c = (a ?? "").split(",").map((f) => Number.parseFloat(f)).filter((f) => Number.isFinite(f)), l = o === "inout" ? "in-out" : o;
1938
- if (r === "back" && c.length === 0 && e in kt)
1937
+ const [, r, o, c] = n, a = (c ?? "").split(",").map((f) => Number.parseFloat(f)).filter((f) => Number.isFinite(f)), l = o === "inout" ? "in-out" : o;
1938
+ if (r === "back" && a.length === 0 && e in kt)
1939
1939
  return { easing: { type: "cubic-bezier", points: kt[e] } };
1940
- const h = r === "elastic" ? { type: "elastic", mode: l, ...c[0] !== void 0 && { amplitude: c[0] }, ...c[1] !== void 0 && { period: c[1] } } : r === "bounce" ? { type: "bounce", mode: l } : { type: "back", mode: l, ...c[0] !== void 0 && { overshoot: c[0] } };
1940
+ const h = r === "elastic" ? { type: "elastic", mode: l, ...a[0] !== void 0 && { amplitude: a[0] }, ...a[1] !== void 0 && { period: a[1] } } : r === "bounce" ? { type: "bounce", mode: l } : { type: "back", mode: l, ...a[0] !== void 0 && { overshoot: a[0] } };
1941
1941
  return { easing: h, fn: W(h) };
1942
1942
  }
1943
1943
  return e in De ? { easing: De[e] } : e in kt ? { easing: { type: "cubic-bezier", points: kt[e] } } : { easing: "ease-out" };
@@ -1963,71 +1963,71 @@ function Ci(i) {
1963
1963
  }
1964
1964
  function un(i = 1) {
1965
1965
  let t = ae(i);
1966
- const e = (c, l) => ((...h) => h.length >= c ? l(...h) : (f) => l(...h, f)), s = (c, l, h) => Math.min(Math.max(h, Math.min(c, l)), Math.max(c, l)), n = (c, l, h, f, u) => l === c ? h : h + (u - c) / (l - c) * (f - h), r = (c, l) => {
1967
- if (typeof c == "number") return c === 0 ? l : Math.round(l / c) * c;
1968
- if (Array.isArray(c)) return Oe(c, l, 1 / 0);
1969
- if ("values" in c) return Oe(c.values, l, c.radius ?? 1 / 0);
1970
- const h = Math.round(l / c.increment) * c.increment;
1971
- return Math.abs(h - l) <= (c.radius ?? 1 / 0) ? h : l;
1972
- }, o = (c, l, h) => {
1973
- const f = c + t() * (l - c);
1966
+ const e = (a, l) => ((...h) => h.length >= a ? l(...h) : (f) => l(...h, f)), s = (a, l, h) => Math.min(Math.max(h, Math.min(a, l)), Math.max(a, l)), n = (a, l, h, f, u) => l === a ? h : h + (u - a) / (l - a) * (f - h), r = (a, l) => {
1967
+ if (typeof a == "number") return a === 0 ? l : Math.round(l / a) * a;
1968
+ if (Array.isArray(a)) return Oe(a, l, 1 / 0);
1969
+ if ("values" in a) return Oe(a.values, l, a.radius ?? 1 / 0);
1970
+ const h = Math.round(l / a.increment) * a.increment;
1971
+ return Math.abs(h - l) <= (a.radius ?? 1 / 0) ? h : l;
1972
+ }, o = (a, l, h) => {
1973
+ const f = a + t() * (l - a);
1974
1974
  return h ? Math.round(f / h) * h : f;
1975
1975
  };
1976
1976
  return {
1977
1977
  clamp: e(3, s),
1978
1978
  mapRange: e(5, n),
1979
- normalize: e(3, (c, l, h) => n(c, l, 0, 1, h)),
1980
- interpolate: e(3, (c, l, h) => {
1981
- if (typeof c == "object" && !Array.isArray(c)) {
1979
+ normalize: e(3, (a, l, h) => n(a, l, 0, 1, h)),
1980
+ interpolate: e(3, (a, l, h) => {
1981
+ if (typeof a == "object" && !Array.isArray(a)) {
1982
1982
  const f = {};
1983
- for (const u of Object.keys(c))
1984
- f[u] = Rt(c[u])(c[u], l[u], h);
1983
+ for (const u of Object.keys(a))
1984
+ f[u] = Rt(a[u])(a[u], l[u], h);
1985
1985
  return f;
1986
1986
  }
1987
- return Rt(c)(c, l, h);
1987
+ return Rt(a)(a, l, h);
1988
1988
  }),
1989
- wrap: ((c, l, h) => {
1990
- if (Array.isArray(c)) {
1991
- const p = c, g = (y) => p[(Math.round(y) % p.length + p.length) % p.length];
1989
+ wrap: ((a, l, h) => {
1990
+ if (Array.isArray(a)) {
1991
+ const p = a, g = (y) => p[(Math.round(y) % p.length + p.length) % p.length];
1992
1992
  return l === void 0 ? g : g(l);
1993
1993
  }
1994
- const f = c, d = l - f, m = (p) => d === 0 ? f : ((p - f) % d + d) % d + f;
1994
+ const f = a, d = l - f, m = (p) => d === 0 ? f : ((p - f) % d + d) % d + f;
1995
1995
  return h === void 0 ? m : m(h);
1996
1996
  }),
1997
- wrapYoyo: e(3, (c, l, h) => {
1998
- const f = l - c;
1999
- if (f === 0) return c;
2000
- const u = ((h - c) % (f * 2) + f * 2) % (f * 2);
2001
- return c + (u > f ? f * 2 - u : u);
1997
+ wrapYoyo: e(3, (a, l, h) => {
1998
+ const f = l - a;
1999
+ if (f === 0) return a;
2000
+ const u = ((h - a) % (f * 2) + f * 2) % (f * 2);
2001
+ return a + (u > f ? f * 2 - u : u);
2002
2002
  }),
2003
2003
  snap: e(2, r),
2004
- random: ((c, l, h, f) => {
2005
- if (Array.isArray(c)) {
2006
- const d = () => c[Math.floor(t() * c.length)];
2004
+ random: ((a, l, h, f) => {
2005
+ if (Array.isArray(a)) {
2006
+ const d = () => a[Math.floor(t() * a.length)];
2007
2007
  return l === !0 ? d : d();
2008
2008
  }
2009
- const u = () => o(c, l, h);
2009
+ const u = () => o(a, l, h);
2010
2010
  return f ? u : u();
2011
2011
  }),
2012
- shuffle: (c) => {
2013
- for (let l = c.length - 1; l > 0; l--) {
2012
+ shuffle: (a) => {
2013
+ for (let l = a.length - 1; l > 0; l--) {
2014
2014
  const h = Math.floor(t() * (l + 1));
2015
- [c[l], c[h]] = [c[h], c[l]];
2015
+ [a[l], a[h]] = [a[h], a[l]];
2016
2016
  }
2017
- return c;
2017
+ return a;
2018
2018
  },
2019
- distribute: ({ base: c = 0, amount: l, each: h, from: f = "start", ease: u }) => (d, m, p) => {
2019
+ distribute: ({ base: a = 0, amount: l, each: h, from: f = "start", ease: u }) => (d, m, p) => {
2020
2020
  const g = p.length, b = de(d, g, { ...l !== void 0 ? { amount: l } : { each: h ?? 1 }, from: f }), v = l !== void 0 ? l : (h ?? 1) * li(g, f), T = u && v > 0 ? u(b / v) * v : b;
2021
- return c + T;
2021
+ return a + T;
2022
2022
  },
2023
- pipe: (...c) => (l) => c.reduce((h, f) => f(h), l),
2024
- splitColor: (c) => fn(c),
2025
- getUnit: (c) => typeof c == "number" ? "" : /^-?[\d.]+(?:e[-+]?\d+)?([a-z%]*)$/i.exec(c.trim())?.[1] ?? "",
2026
- seed: (c) => {
2027
- t = ae(c);
2023
+ pipe: (...a) => (l) => a.reduce((h, f) => f(h), l),
2024
+ splitColor: (a) => fn(a),
2025
+ getUnit: (a) => typeof a == "number" ? "" : /^-?[\d.]+(?:e[-+]?\d+)?([a-z%]*)$/i.exec(a.trim())?.[1] ?? "",
2026
+ seed: (a) => {
2027
+ t = ae(a);
2028
2028
  },
2029
- resolveRandomString: (c) => {
2030
- const l = _i.exec(c)?.[1] ?? "";
2029
+ resolveRandomString: (a) => {
2030
+ const l = _i.exec(a)?.[1] ?? "";
2031
2031
  if (l.startsWith("[")) {
2032
2032
  const m = l.slice(1, -1).split(",").map((p) => p.trim()).filter(Boolean).map((p) => Number.isFinite(Number(p)) ? Number(p) : p.replace(/^['"]|['"]$/g, ""));
2033
2033
  return m[Math.floor(t() * m.length)];
@@ -2073,16 +2073,16 @@ function ht(i, t) {
2073
2073
  const h = s(o[3]);
2074
2074
  return l + (o[2] === "-" ? -h : h);
2075
2075
  }
2076
- const a = /^(.+?)([+-])=\s*(-?[\d.]+)$/.exec(n);
2077
- if (a) {
2078
- const l = t.labels.get(a[1].trim());
2076
+ const c = /^(.+?)([+-])=\s*(-?[\d.]+)$/.exec(n);
2077
+ if (c) {
2078
+ const l = t.labels.get(c[1].trim());
2079
2079
  if (l !== void 0) {
2080
- const h = s(a[3]);
2081
- return l + (a[2] === "-" ? -h : h);
2080
+ const h = s(c[3]);
2081
+ return l + (c[2] === "-" ? -h : h);
2082
2082
  }
2083
2083
  }
2084
- const c = t.labels.get(n);
2085
- return c !== void 0 ? c : /^-?[\d.]+$/.test(n) ? s(n) : t.cursor;
2084
+ const a = t.labels.get(n);
2085
+ return a !== void 0 ? a : /^-?[\d.]+$/.test(n) ? s(n) : t.cursor;
2086
2086
  }
2087
2087
  function mn(i) {
2088
2088
  if (typeof i != "object" || i === null) return !1;
@@ -2091,11 +2091,11 @@ function mn(i) {
2091
2091
  }
2092
2092
  function gn(i, t, e = {}) {
2093
2093
  if (i === 0) return [];
2094
- const s = t.grid === "auto" ? Math.max(1, Math.min(i, e.columnsFromLayout?.() ?? i)) : Array.isArray(t.grid) ? Math.max(1, t.grid[1]) : i, n = Array.isArray(t.grid) ? Math.max(1, t.grid[0]) : Math.ceil(i / s), r = (m) => ({ x: m % s, y: Math.floor(m / s) }), o = t.from ?? "start", a = Array.isArray(o) ? { x: o[0] * (s - 1), y: o[1] * (n - 1) } : typeof o == "number" ? r(Math.max(0, Math.min(i - 1, o))) : o === "end" ? r(i - 1) : o === "center" || o === "edges" ? { x: (s - 1) / 2, y: (n - 1) / 2 } : { x: 0, y: 0 }, c = (m) => {
2095
- const { x: p, y: g } = r(m), y = Math.abs(p - a.x), b = Math.abs(g - a.y);
2094
+ const s = t.grid === "auto" ? Math.max(1, Math.min(i, e.columnsFromLayout?.() ?? i)) : Array.isArray(t.grid) ? Math.max(1, t.grid[1]) : i, n = Array.isArray(t.grid) ? Math.max(1, t.grid[0]) : Math.ceil(i / s), r = (m) => ({ x: m % s, y: Math.floor(m / s) }), o = t.from ?? "start", c = Array.isArray(o) ? { x: o[0] * (s - 1), y: o[1] * (n - 1) } : typeof o == "number" ? r(Math.max(0, Math.min(i - 1, o))) : o === "end" ? r(i - 1) : o === "center" || o === "edges" ? { x: (s - 1) / 2, y: (n - 1) / 2 } : { x: 0, y: 0 }, a = (m) => {
2095
+ const { x: p, y: g } = r(m), y = Math.abs(p - c.x), b = Math.abs(g - c.y);
2096
2096
  return t.axis === "x" ? y : t.axis === "y" ? b : Math.hypot(y, b);
2097
2097
  };
2098
- let l = Array.from({ length: i }, (m, p) => c(p));
2098
+ let l = Array.from({ length: i }, (m, p) => a(p));
2099
2099
  const h = Math.max(...l);
2100
2100
  if (o === "edges" && (l = l.map((m) => h - m)), o === "random") {
2101
2101
  const m = e.random ?? Math.random;
@@ -2214,9 +2214,9 @@ function Tn(i, t) {
2214
2214
  if (i === !1) return [0, 0];
2215
2215
  if (typeof i == "number") return [0, Be(i, t)];
2216
2216
  const e = i.trim().split(/[\s,]+/).filter(Boolean), s = (o) => {
2217
- const a = Number.parseFloat(o);
2218
- if (Number.isNaN(a)) throw new Error(`gsap-compat: drawSVG "${i}" is not a length or percentage`);
2219
- return Be(o.endsWith("%") ? t * a / 100 : a, t);
2217
+ const c = Number.parseFloat(o);
2218
+ if (Number.isNaN(c)) throw new Error(`gsap-compat: drawSVG "${i}" is not a length or percentage`);
2219
+ return Be(o.endsWith("%") ? t * c / 100 : c, t);
2220
2220
  };
2221
2221
  if (e.length === 0) return [0, t];
2222
2222
  if (e.length === 1) return [0, s(e[0])];
@@ -2344,12 +2344,12 @@ class st {
2344
2344
  }
2345
2345
  /** Animate from the given values to where the property already is. */
2346
2346
  from(t, e, s) {
2347
- const { config: n, properties: r } = Pt(ut(e)), { motionPath: o, text: a, scrambleText: c, ...l } = r, h = this.targetsOf(t)[0], f = { ...n };
2347
+ const { config: n, properties: r } = Pt(ut(e)), { motionPath: o, text: c, scrambleText: a, ...l } = r, h = this.targetsOf(t)[0], f = { ...n };
2348
2348
  for (const m of Object.keys(l))
2349
2349
  f[m] = this.resolveStart(h, m);
2350
2350
  o !== void 0 && (f.motionPath = vn(o));
2351
2351
  const u = {}, d = String(this.resolveStart(h, "text"));
2352
- return a !== void 0 && (u.text = Kt(a), f.text = typeof a == "object" ? { ...a, value: d } : d), c !== void 0 && (u.text = Kt(c), f.scrambleText = typeof c == "object" ? { ...c, text: d } : d), this.build(t, { ...l, ...u }, f, s);
2352
+ return c !== void 0 && (u.text = Kt(c), f.text = typeof c == "object" ? { ...c, value: d } : d), a !== void 0 && (u.text = Kt(a), f.scrambleText = typeof a == "object" ? { ...a, text: d } : d), this.build(t, { ...l, ...u }, f, s);
2353
2353
  }
2354
2354
  /** Animate between two explicit sets of values. */
2355
2355
  fromTo(t, e, s, n) {
@@ -2407,7 +2407,7 @@ class st {
2407
2407
  const o = oe({
2408
2408
  ...r,
2409
2409
  id: this.nextTrackId(`nested-${r.id}`),
2410
- keyframes: r.keyframes.map((a) => ({ ...a, time: a.time + s }))
2410
+ keyframes: r.keyframes.map((c) => ({ ...c, time: c.time + s }))
2411
2411
  });
2412
2412
  this.timeline.addTrack(o);
2413
2413
  }
@@ -2474,55 +2474,55 @@ class st {
2474
2474
  * each property's start comes from the resolution chain.
2475
2475
  */
2476
2476
  build(t, e, s, n) {
2477
- const { config: r, properties: o } = Pt(s), { motionPath: a, text: c, scrambleText: l, inertia: h, ...f } = o, u = this.targetsOf(t), d = ht(n, this.context()), m = $t(r.delay, 0), p = $t(r.duration, 500), g = ce(r.stagger, {
2477
+ const { config: r, properties: o } = Pt(s), { motionPath: c, text: a, scrambleText: l, inertia: h, ...f } = o, u = this.targetsOf(t), d = ht(n, this.context()), m = $t(r.delay, 0), p = $t(r.duration, 500), g = ce(r.stagger, {
2478
2478
  count: u.length,
2479
2479
  columnsFromLayout: this.options.layoutColumns ? () => this.options.layoutColumns(u) : void 0,
2480
2480
  random: this.options.random ?? this.fallbackRandom
2481
2481
  }), y = this.easingFor(r.ease), b = [], v = r.spring;
2482
2482
  let T = 0, w = !1;
2483
- for (const [M, E] of Object.entries(f)) {
2483
+ for (const [S, E] of Object.entries(f)) {
2484
2484
  const k = E;
2485
- let P = e?.[M] !== void 0 ? e[M] : this.resolveStart(u[0], M);
2485
+ let P = e?.[S] !== void 0 ? e[S] : this.resolveStart(u[0], S);
2486
2486
  if (typeof P != typeof k && (this.warn(
2487
- `no usable start value for "${M}" on "${u[0]}" — it will snap to ${String(k)}. Use fromTo() to animate it.`
2488
- ), P = k), v !== void 0 && typeof P == "number" && typeof k == "number") {
2487
+ `no usable start value for "${S}" on "${u[0]}" — it will snap to ${String(k)}. Use fromTo() to animate it.`
2488
+ ), P = k), v !== void 0 && (typeof P != "number" || typeof k != "number") && this.warn(`spring works on numbers, so "${S}" on "${u[0]}" eases instead`), v !== void 0 && typeof P == "number" && typeof k == "number") {
2489
2489
  const R = {
2490
2490
  ...En(v),
2491
2491
  from: P,
2492
2492
  to: k,
2493
- velocity: _n(v, M) ?? this.options.startVelocity?.(u[0], M) ?? 0
2494
- }, j = this.nextTrackId(`${u[0]}-${M}-spring`), H = {
2493
+ velocity: _n(v, S) ?? this.options.startVelocity?.(u[0], S) ?? 0
2494
+ }, j = this.nextTrackId(`${u[0]}-${S}-spring`), H = {
2495
2495
  id: j,
2496
2496
  target: u[0],
2497
2497
  ...u.length > 1 && { targets: u },
2498
2498
  ...g && u.length > 1 && { stagger: g },
2499
- property: M,
2499
+ property: S,
2500
2500
  kind: "spring",
2501
2501
  spring: R,
2502
2502
  delay: d + m
2503
2503
  };
2504
2504
  this.timeline.addTrack(H), b.push(j), T = Math.max(T, Ki(R));
2505
- for (const I of u) this.lastValues.set(`${I}|${M}`, k);
2505
+ for (const I of u) this.lastValues.set(`${I}|${S}`, k);
2506
2506
  continue;
2507
2507
  }
2508
2508
  w = !0;
2509
- const C = this.keyframesFor(P, k, p, y, r.ease), $ = this.nextTrackId(`${u[0]}-${M}`);
2509
+ const C = this.keyframesFor(P, k, p, y, r.ease), $ = this.nextTrackId(`${u[0]}-${S}`);
2510
2510
  this.timeline.addTrack(
2511
2511
  oe({
2512
2512
  id: $,
2513
2513
  target: u[0],
2514
2514
  ...u.length > 1 && { targets: u },
2515
2515
  ...g && u.length > 1 && { stagger: g },
2516
- property: M,
2516
+ property: S,
2517
2517
  delay: d + m,
2518
2518
  keyframes: C
2519
2519
  })
2520
2520
  ), b.push($);
2521
- for (const R of u) this.lastValues.set(`${R}|${M}`, k);
2521
+ for (const R of u) this.lastValues.set(`${R}|${S}`, k);
2522
2522
  }
2523
- const x = An({ text: c, scrambleText: l }, u[0], p);
2523
+ const x = An({ text: a, scrambleText: l }, u[0], p);
2524
2524
  if (x) {
2525
- const M = e?.text ?? e?.scrambleText, E = M !== void 0 ? Kt(M) : this.resolveStart(u[0], "text"), k = this.nextTrackId(`${u[0]}-text`), P = {
2525
+ const S = e?.text ?? e?.scrambleText, E = S !== void 0 ? Kt(S) : this.resolveStart(u[0], "text"), k = this.nextTrackId(`${u[0]}-text`), P = {
2526
2526
  id: k,
2527
2527
  target: u[0],
2528
2528
  ...u.length > 1 && { targets: u },
@@ -2535,46 +2535,46 @@ class st {
2535
2535
  this.timeline.addTrack(P), b.push(k);
2536
2536
  for (const C of u) this.lastValues.set(`${C}|text`, x.to);
2537
2537
  }
2538
- if (a !== void 0) {
2539
- const { config: M, start: E, end: k } = bn(a), P = this.nextTrackId(`${u[0]}-motionPath`), C = {
2538
+ if (c !== void 0) {
2539
+ const { config: S, start: E, end: k } = bn(c), P = this.nextTrackId(`${u[0]}-motionPath`), C = {
2540
2540
  id: P,
2541
2541
  target: u[0],
2542
2542
  ...u.length > 1 && { targets: u },
2543
2543
  ...g && u.length > 1 && { stagger: g },
2544
2544
  property: "motionPath",
2545
- motionPathConfig: M,
2545
+ motionPathConfig: S,
2546
2546
  delay: d + m,
2547
2547
  keyframes: this.keyframesFor(E, k, p, y, r.ease)
2548
2548
  };
2549
2549
  this.timeline.addTrack(C), b.push(P);
2550
2550
  }
2551
2551
  if (h !== void 0)
2552
- for (const [M, E] of Object.entries(h)) {
2553
- const k = this.resolveStart(u[0], M);
2552
+ for (const [S, E] of Object.entries(h)) {
2553
+ const k = this.resolveStart(u[0], S);
2554
2554
  if (typeof k != "number") {
2555
- this.warn(`inertia on "${M}" needs a numeric start value; skipped`);
2555
+ this.warn(`inertia on "${S}" needs a numeric start value; skipped`);
2556
2556
  continue;
2557
2557
  }
2558
- const P = Pn(k, E), C = this.nextTrackId(`${u[0]}-${M}-inertia`), $ = {
2558
+ const P = Pn(k, E), C = this.nextTrackId(`${u[0]}-${S}-inertia`), $ = {
2559
2559
  id: C,
2560
2560
  target: u[0],
2561
2561
  ...u.length > 1 && { targets: u },
2562
2562
  ...g && u.length > 1 && { stagger: g },
2563
- property: M,
2563
+ property: S,
2564
2564
  kind: "inertia",
2565
2565
  inertia: P,
2566
2566
  delay: d + m
2567
2567
  };
2568
2568
  this.timeline.addTrack($), b.push(C), T = Math.max(T, bt(P));
2569
- for (const R of u) this.lastValues.set(`${R}|${M}`, yt(P));
2569
+ for (const R of u) this.lastValues.set(`${R}|${S}`, yt(P));
2570
2570
  }
2571
- const L = ((h !== void 0 || v !== void 0) && !w && !x && a === void 0 ? T : Math.max(p, T)) + (g && u.length > 1 ? Dt(u.length, g) : 0), A = d + m + L;
2571
+ const L = ((h !== void 0 || v !== void 0) && !w && !x && c === void 0 ? T : Math.max(p, T)) + (g && u.length > 1 ? Dt(u.length, g) : 0), A = d + m + L;
2572
2572
  return this.previousStart = d + m, this.previousEnd = A, this.cursor = Math.max(this.cursor, A), {
2573
2573
  trackIds: b,
2574
2574
  start: d + m,
2575
2575
  end: A,
2576
2576
  kill: () => {
2577
- for (const M of b) this.timeline.removeTrack(M);
2577
+ for (const S of b) this.timeline.removeTrack(S);
2578
2578
  }
2579
2579
  };
2580
2580
  }
@@ -2585,9 +2585,9 @@ class st {
2585
2585
  const o = { time: 0, value: t };
2586
2586
  if (s <= 0)
2587
2587
  return [{ time: 0, value: e }];
2588
- const a = typeof r == "string" ? It(r) : void 0;
2589
- if (a?.requiresBaking === "custom" || this.options.bakeEases && Et(n)) {
2590
- const l = a?.fn ?? W(n);
2588
+ const c = typeof r == "string" ? It(r) : void 0;
2589
+ if (c?.requiresBaking === "custom" || this.options.bakeEases && Et(n)) {
2590
+ const l = c?.fn ?? W(n);
2591
2591
  return [o, ...vi(o, { time: s, value: e }, l, { intervalMs: this.options.bakeIntervalMs })];
2592
2592
  }
2593
2593
  return [o, { time: s, value: e, ...n && { easing: n } }];
@@ -2787,9 +2787,9 @@ class K {
2787
2787
  applyProperties(t, e) {
2788
2788
  const s = [];
2789
2789
  let n = null, r = null, o = null;
2790
- const a = e.has("motionPathX"), c = e.has("motionPathY"), l = e.has("motionPathRotate");
2790
+ const c = e.has("motionPathX"), a = e.has("motionPathY"), l = e.has("motionPathRotate");
2791
2791
  for (const [u, d] of e)
2792
- if (!(u === "x" && a) && !(u === "y" && c) && !((u === "rotate" || u === "rotateZ") && l)) {
2792
+ if (!(u === "x" && c) && !(u === "y" && a) && !((u === "rotate" || u === "rotateZ") && l)) {
2793
2793
  if (On.has(u)) {
2794
2794
  const m = this.buildTransformPart(u, d);
2795
2795
  m && s.push(m);
@@ -2882,8 +2882,8 @@ class K {
2882
2882
  applyStyleProperty(t, e, s) {
2883
2883
  let n;
2884
2884
  if (t.namespaceURI === Xn && e in qe) {
2885
- const a = Array.isArray(s) ? s.join(", ") : String(s);
2886
- t.style[qe[e]] = a;
2885
+ const c = Array.isArray(s) ? s.join(", ") : String(s);
2886
+ t.style[qe[e]] = c;
2887
2887
  return;
2888
2888
  } else e === "fill" && t.dataset?.elementType === "text" ? n = "color" : n = qn[e] ?? e;
2889
2889
  let o;
@@ -2898,6 +2898,8 @@ class Vn {
2898
2898
  adapter = new K();
2899
2899
  scheduler;
2900
2900
  rootOption;
2901
+ /** Where live timelines on this stage report warnings, unless they have their own `onWarning` */
2902
+ onWarning;
2901
2903
  /** Element → engine target name. The engine only ever sees names. */
2902
2904
  names = /* @__PURE__ */ new WeakMap();
2903
2905
  elements = /* @__PURE__ */ new Map();
@@ -2928,7 +2930,7 @@ class Vn {
2928
2930
  lastTimestamp = null;
2929
2931
  destroyed = !1;
2930
2932
  constructor(t = {}) {
2931
- this.scheduler = t.scheduler ?? Yn, this.rootOption = t.root;
2933
+ this.scheduler = t.scheduler ?? Yn, this.rootOption = t.root, this.onWarning = t.onWarning;
2932
2934
  }
2933
2935
  // --- targets ------------------------------------------------------------
2934
2936
  /**
@@ -2996,10 +2998,10 @@ class Vn {
2996
2998
  if (n.getTracks({ target: t, property: e }).length === 0) continue;
2997
2999
  const r = n.currentTime;
2998
3000
  if (r < 4) return 0;
2999
- const o = n.getStateAtTime(r).values.get(t)?.get(e), a = n.getStateAtTime(r - 4).values.get(t)?.get(e);
3000
- if (typeof o != "number" || typeof a != "number") return;
3001
- const c = (o - a) / 4;
3002
- return (n.direction === "reverse" ? -c : c) * 1e3;
3001
+ const o = n.getStateAtTime(r).values.get(t)?.get(e), c = n.getStateAtTime(r - 4).values.get(t)?.get(e);
3002
+ if (typeof o != "number" || typeof c != "number") return;
3003
+ const a = (o - c) / 4;
3004
+ return (n.direction === "reverse" ? -a : a) * 1e3;
3003
3005
  }
3004
3006
  }
3005
3007
  /**
@@ -3183,29 +3185,29 @@ function Un(i) {
3183
3185
  return [1, 0, 0, 1, e.left, e.top];
3184
3186
  }
3185
3187
  function zn(i, t) {
3186
- const e = typeof i == "string" || Array.isArray(i) || Xe(i) ? { path: i } : i, { align: s, alignOrigin: n, path: r, ...o } = e, a = (x) => {
3187
- const S = Xe(x) ? x : t.query(x);
3188
- return S || t.warn(`gsap-compat: motionPath could not find "${String(x)}"`), S;
3188
+ const e = typeof i == "string" || Array.isArray(i) || Xe(i) ? { path: i } : i, { align: s, alignOrigin: n, path: r, ...o } = e, c = (x) => {
3189
+ const M = Xe(x) ? x : t.query(x);
3190
+ return M || t.warn(`gsap-compat: motionPath could not find "${String(x)}"`), M;
3189
3191
  };
3190
- let c = null, l = "";
3192
+ let a = null, l = "";
3191
3193
  if (Array.isArray(r) || typeof r == "string" && vt(r))
3192
3194
  l = r;
3193
3195
  else {
3194
- c = a(r);
3195
- const x = c && pe({ tag: c.localName, attributes: jn(c) });
3196
- c && !x && t.warn(`gsap-compat: motionPath element <${c.localName}> has no path geometry`), l = x ?? "";
3196
+ a = c(r);
3197
+ const x = a && pe({ tag: a.localName, attributes: jn(a) });
3198
+ a && !x && t.warn(`gsap-compat: motionPath element <${a.localName}> has no path geometry`), l = x ?? "";
3197
3199
  }
3198
3200
  const h = { ...o, path: l };
3199
3201
  if (s === void 0 || s === !1) return h;
3200
- const f = s === !0 ? c : a(s);
3202
+ const f = s === !0 ? a : c(s);
3201
3203
  if (!f)
3202
3204
  return s === !0 && t.warn("gsap-compat: motionPath align: true needs the path to be an element"), h;
3203
3205
  const u = t.targets[0];
3204
3206
  if (!u) return h;
3205
3207
  const [d, m, p, g, y, b] = Un(f), v = Ft(u), [T, w] = n ?? [0.5, 0.5];
3206
3208
  for (const x of t.targets.slice(1)) {
3207
- const S = Ft(x);
3208
- if (Math.abs(S.left - v.left) > 0.5 || Math.abs(S.top - v.top) > 0.5) {
3209
+ const M = Ft(x);
3210
+ if (Math.abs(M.left - v.left) > 0.5 || Math.abs(M.top - v.top) > 0.5) {
3209
3211
  t.warn("gsap-compat: motionPath align measures the first target; the others are laid out elsewhere");
3210
3212
  break;
3211
3213
  }
@@ -3282,9 +3284,9 @@ class Zn {
3282
3284
  if (!this.dragging) return;
3283
3285
  const n = t - this.lastX, r = e - this.lastY;
3284
3286
  this.lastX = t, this.lastY = e;
3285
- const o = t - this.startX, a = e - this.startY, c = this.options.tolerance ?? 3;
3287
+ const o = t - this.startX, c = e - this.startY, a = this.options.tolerance ?? 3;
3286
3288
  if (!this.passedTolerance) {
3287
- if (Math.hypot(o, a) < c) return;
3289
+ if (Math.hypot(o, c) < a) return;
3288
3290
  this.passedTolerance = !0;
3289
3291
  }
3290
3292
  this.updateVelocity(n, r), this.options.preventDefault !== !1 && s.cancelable && s.preventDefault(), this.options.onMove?.(this.stateFrom(n, r, s));
@@ -3355,8 +3357,8 @@ function Qn(i, t, e) {
3355
3357
  let s = { delta: 0, line: null }, n = e;
3356
3358
  for (const r of i)
3357
3359
  for (const o of t) {
3358
- const a = Math.abs(o - r);
3359
- a <= n && (n = a, s = { delta: o - r, line: o });
3360
+ const c = Math.abs(o - r);
3361
+ c <= n && (n = c, s = { delta: o - r, line: o });
3360
3362
  }
3361
3363
  return s;
3362
3364
  }
@@ -3447,8 +3449,8 @@ class Di {
3447
3449
  s += r.delta, e === "x" ? this.snappedX = r.line : this.snappedY = r.line;
3448
3450
  const o = this.options.bounds;
3449
3451
  if (o) {
3450
- const a = e === "x" ? o.minX : o.minY, c = e === "x" ? o.maxX : o.maxY;
3451
- a !== void 0 && (s = Math.max(a, s)), c !== void 0 && (s = Math.min(c, s));
3452
+ const c = e === "x" ? o.minX : o.minY, a = e === "x" ? o.maxX : o.maxY;
3453
+ c !== void 0 && (s = Math.max(c, s)), a !== void 0 && (s = Math.min(a, s));
3452
3454
  }
3453
3455
  return s;
3454
3456
  }
@@ -3478,26 +3480,26 @@ function ir(i, t, e, s = {}) {
3478
3480
  if (!n || !r)
3479
3481
  throw new Error(`gsap-compat: live.draggable could not find ${String(e)}`);
3480
3482
  if (s.type === "rotation") return sr(i, t, n, r, s);
3481
- const o = er[s.type ?? "x,y"], a = () => {
3483
+ const o = er[s.type ?? "x,y"], c = () => {
3482
3484
  const p = t.appliedValue(n, "x"), g = t.appliedValue(n, "y");
3483
3485
  return { x: typeof p == "number" ? p : 0, y: typeof g == "number" ? g : 0 };
3484
- }, c = typeof s.bounds == "string" ? t.query(s.bounds) : le(s.bounds) ? s.bounds : null, h = { bounds: (!c && s.bounds && !le(s.bounds) ? s.bounds : void 0) ?? (c ? We(r, c) : void 0) };
3486
+ }, a = typeof s.bounds == "string" ? t.query(s.bounds) : le(s.bounds) ? s.bounds : null, h = { bounds: (!a && s.bounds && !le(s.bounds) ? s.bounds : void 0) ?? (a ? We(r, a) : void 0) };
3485
3487
  let f = null;
3486
3488
  const u = () => {
3487
3489
  f?.kill(), f = null;
3488
3490
  }, d = (p) => {
3489
- const g = s.inertia === !0 ? {} : s.inertia, y = g.friction ?? (g.resistance !== void 0 ? ye(g.resistance) : 4), b = a(), v = h.bounds ?? {};
3491
+ const g = s.inertia === !0 ? {} : s.inertia, y = g.friction ?? (g.resistance !== void 0 ? ye(g.resistance) : 4), b = c(), v = h.bounds ?? {};
3490
3492
  let T, w;
3491
3493
  const x = g.end;
3492
3494
  if (Array.isArray(x)) {
3493
3495
  const _ = Ct({ from: b.x, velocity: o === "y" ? 0 : p.x, friction: y }), L = Ct({ from: b.y, velocity: o === "x" ? 0 : p.y, friction: y });
3494
3496
  let A = x[0];
3495
- for (const M of x)
3496
- Math.hypot(M.x - _, M.y - L) < Math.hypot(A.x - _, A.y - L) && (A = M);
3497
+ for (const S of x)
3498
+ Math.hypot(S.x - _, S.y - L) < Math.hypot(A.x - _, A.y - L) && (A = S);
3497
3499
  A && (T = [A.x], w = [A.y]);
3498
3500
  } else typeof x == "number" ? (T = x, w = x) : x && (T = je(x.x), w = je(x.y));
3499
- const S = {};
3500
- o !== "y" && (S.x = { velocity: p.x, friction: y, min: v.minX, max: v.maxX, end: T }), o !== "x" && (S.y = { velocity: p.y, friction: y, min: v.minY, max: v.maxY, end: w }), f = i.to(r, { inertia: S, onComplete: () => s.onThrowComplete?.() });
3501
+ const M = {};
3502
+ o !== "y" && (M.x = { velocity: p.x, friction: y, min: v.minX, max: v.maxX, end: T }), o !== "x" && (M.y = { velocity: p.y, friction: y, min: v.minY, max: v.maxY, end: w }), f = i.to(r, { inertia: M, onComplete: () => s.onThrowComplete?.() });
3501
3503
  }, m = new Di({
3502
3504
  target: r,
3503
3505
  axis: o,
@@ -3505,9 +3507,9 @@ function ir(i, t, e, s = {}) {
3505
3507
  get bounds() {
3506
3508
  return h.bounds;
3507
3509
  },
3508
- getPosition: a,
3510
+ getPosition: c,
3509
3511
  onPress: () => {
3510
- u(), c && (h.bounds = We(r, c)), s.onPress?.();
3512
+ u(), a && (h.bounds = We(r, a)), s.onPress?.();
3511
3513
  },
3512
3514
  onDrag: (p) => {
3513
3515
  t.apply(n, o === "x" ? { x: p.x } : o === "y" ? { y: p.y } : { x: p.x, y: p.y }), s.onDrag?.(p);
@@ -3520,7 +3522,7 @@ function ir(i, t, e, s = {}) {
3520
3522
  return m.start(), {
3521
3523
  draggable: m,
3522
3524
  get position() {
3523
- return a();
3525
+ return c();
3524
3526
  },
3525
3527
  get rotation() {
3526
3528
  const p = t.appliedValue(n, "rotate");
@@ -3535,11 +3537,11 @@ function sr(i, t, e, s, n) {
3535
3537
  const r = typeof n.bounds == "object" && n.bounds !== null && !le(n.bounds) ? n.bounds : {}, o = () => {
3536
3538
  const v = t.appliedValue(e, "rotate");
3537
3539
  return typeof v == "number" ? v : 0;
3538
- }, a = (v) => Math.min(r.maxRotation ?? 1 / 0, Math.max(r.minRotation ?? -1 / 0, v));
3539
- let c = null, l = !1, h, f = { x: 0, y: 0 }, u = 0, d = 0, m = [];
3540
+ }, c = (v) => Math.min(r.maxRotation ?? 1 / 0, Math.max(r.minRotation ?? -1 / 0, v));
3541
+ let a = null, l = !1, h, f = { x: 0, y: 0 }, u = 0, d = 0, m = [];
3540
3542
  const p = (v) => Math.atan2(v.clientY - f.y, v.clientX - f.x) * 180 / Math.PI, g = (v) => {
3541
3543
  if (l) return;
3542
- c?.kill(), c = null, l = !0, h = v.pointerId, s.setPointerCapture?.(v.pointerId);
3544
+ a?.kill(), a = null, l = !0, h = v.pointerId, s.setPointerCapture?.(v.pointerId);
3543
3545
  const T = s.getBoundingClientRect();
3544
3546
  f = { x: T.left + T.width / 2, y: T.top + T.height / 2 }, u = p(v), d = o(), m = [{ time: performance.now(), rotation: d }], n.onPress?.();
3545
3547
  }, y = (v) => {
@@ -3547,26 +3549,26 @@ function sr(i, t, e, s, n) {
3547
3549
  const T = p(v);
3548
3550
  let w = T - u;
3549
3551
  w > 180 && (w -= 360), w < -180 && (w += 360), u = T, d += w;
3550
- let x = a(d);
3551
- n.snap && (x = a(Math.round(x / n.snap) * n.snap)), t.apply(e, { rotate: x });
3552
- const S = performance.now();
3553
- for (m.push({ time: S, rotation: x }); m.length > 2 && S - m[0].time > 100; ) m.shift();
3552
+ let x = c(d);
3553
+ n.snap && (x = c(Math.round(x / n.snap) * n.snap)), t.apply(e, { rotate: x });
3554
+ const M = performance.now();
3555
+ for (m.push({ time: M, rotation: x }); m.length > 2 && M - m[0].time > 100; ) m.shift();
3554
3556
  const _ = { x: 0, y: 0 };
3555
3557
  n.onDrag?.(_);
3556
3558
  }, b = (v) => {
3557
3559
  if (!l || v.pointerId !== h) return;
3558
3560
  l = !1;
3559
- const T = m[0], w = m[m.length - 1], x = T && w ? (w.time - T.time) / 1e3 : 0, S = x > 0 ? (w.rotation - T.rotation) / x : 0;
3560
- if (n.onRelease?.({ x: S, y: 0 }), !n.inertia) return;
3561
+ const T = m[0], w = m[m.length - 1], x = T && w ? (w.time - T.time) / 1e3 : 0, M = x > 0 ? (w.rotation - T.rotation) / x : 0;
3562
+ if (n.onRelease?.({ x: M, y: 0 }), !n.inertia) return;
3561
3563
  const _ = n.inertia === !0 ? {} : n.inertia, L = _.friction ?? (_.resistance !== void 0 ? ye(_.resistance) : 4), A = typeof _.end == "number" || Array.isArray(_.end) ? _.end : void 0;
3562
- c = i.to(s, {
3564
+ a = i.to(s, {
3563
3565
  inertia: {
3564
3566
  rotate: {
3565
- velocity: S,
3567
+ velocity: M,
3566
3568
  friction: L,
3567
3569
  min: r.minRotation,
3568
3570
  max: r.maxRotation,
3569
- end: Array.isArray(A) ? A.filter((M) => typeof M == "number") : A
3571
+ end: Array.isArray(A) ? A.filter((S) => typeof S == "number") : A
3570
3572
  }
3571
3573
  },
3572
3574
  onComplete: () => n.onThrowComplete?.()
@@ -3579,7 +3581,7 @@ function sr(i, t, e, s, n) {
3579
3581
  return o();
3580
3582
  },
3581
3583
  destroy() {
3582
- c?.kill(), s.removeEventListener("pointerdown", g), s.removeEventListener("pointermove", y), s.removeEventListener("pointerup", b), s.removeEventListener("pointercancel", b);
3584
+ a?.kill(), s.removeEventListener("pointerdown", g), s.removeEventListener("pointermove", y), s.removeEventListener("pointerup", b), s.removeEventListener("pointercancel", b);
3583
3585
  }
3584
3586
  };
3585
3587
  }
@@ -3595,16 +3597,16 @@ function Ue(i) {
3595
3597
  function he(i, t) {
3596
3598
  const s = i.resolveTargets(t).map((o) => i.elementFor(o)).filter((o) => !!o), n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
3597
3599
  for (const o of s) {
3598
- const a = rr(o);
3599
- n.set(o, a);
3600
- const c = Oi(o);
3601
- a && c !== void 0 && !r.has(c) && r.set(c, { element: o, box: a });
3600
+ const c = rr(o);
3601
+ n.set(o, c);
3602
+ const a = Oi(o);
3603
+ c && a !== void 0 && !r.has(a) && r.set(a, { element: o, box: c });
3602
3604
  }
3603
3605
  return { elements: s, boxes: n, ids: r };
3604
3606
  }
3605
3607
  const Qt = /* @__PURE__ */ new WeakMap();
3606
3608
  function ue(i, t, e, s = {}) {
3607
- const n = s.duration ?? 0.6, r = s.ease ?? "power2.inOut", o = s.stagger ?? 0, a = s.scale !== !1, c = s.enter === void 0 ? nr : s.enter, l = new Set(e.elements);
3609
+ const n = s.duration ?? 0.6, r = s.ease ?? "power2.inOut", o = s.stagger ?? 0, c = s.scale !== !1, a = s.enter === void 0 ? nr : s.enter, l = new Set(e.elements);
3608
3610
  if (s.targets !== void 0)
3609
3611
  for (const d of i.resolveTargets(s.targets)) {
3610
3612
  const m = i.elementFor(d);
@@ -3624,23 +3626,23 @@ function ue(i, t, e, s = {}) {
3624
3626
  Qt.get(d)?.timeline.removeTracks({ target: v });
3625
3627
  const T = u * o;
3626
3628
  if (!p) {
3627
- if (c === !1) continue;
3628
- f.fromTo(d, { x: 0, y: 0, scaleX: 1, scaleY: 1, ...c }, { ...Bi(c), x: 0, y: 0, scaleX: 1, scaleY: 1, duration: n, ease: r, delay: T }, 0), Qt.set(d, f), u++;
3629
+ if (a === !1) continue;
3630
+ f.fromTo(d, { x: 0, y: 0, scaleX: 1, scaleY: 1, ...a }, { ...Bi(a), x: 0, y: 0, scaleX: 1, scaleY: 1, duration: n, ease: r, delay: T }, 0), Qt.set(d, f), u++;
3629
3631
  continue;
3630
3632
  }
3631
- const w = p.cx - m.cx, x = p.cy - m.cy, S = a ? p.width / m.width : 1, _ = a ? p.height / m.height : 1;
3632
- if (!(Math.abs(w) > 0.5 || Math.abs(x) > 0.5 || Math.abs(S - 1) > 1e-3 || Math.abs(_ - 1) > 1e-3)) {
3633
- const M = (E, k) => {
3633
+ const w = p.cx - m.cx, x = p.cy - m.cy, M = c ? p.width / m.width : 1, _ = c ? p.height / m.height : 1;
3634
+ if (!(Math.abs(w) > 0.5 || Math.abs(x) > 0.5 || Math.abs(M - 1) > 1e-3 || Math.abs(_ - 1) > 1e-3)) {
3635
+ const S = (E, k) => {
3634
3636
  const P = i.appliedValue(v, E);
3635
3637
  return typeof P == "number" && Math.abs(P - k) > 1e-6;
3636
3638
  };
3637
- (M("x", 0) || M("y", 0) || M("scaleX", 1) || M("scaleY", 1)) && f.set(d, { x: 0, y: 0, scaleX: 1, scaleY: 1 }, 0);
3639
+ (S("x", 0) || S("y", 0) || S("scaleX", 1) || S("scaleY", 1)) && f.set(d, { x: 0, y: 0, scaleX: 1, scaleY: 1 }, 0);
3638
3640
  continue;
3639
3641
  }
3640
3642
  const A = s.fade === !0 && g !== void 0;
3641
3643
  f.fromTo(
3642
3644
  d,
3643
- { x: w, y: x, scaleX: S, scaleY: _, ...A && { opacity: 0 } },
3645
+ { x: w, y: x, scaleX: M, scaleY: _, ...A && { opacity: 0 } },
3644
3646
  { x: 0, y: 0, scaleX: 1, scaleY: 1, ...A && { opacity: 1 }, duration: n, ease: r, delay: T },
3645
3647
  0
3646
3648
  ), A && g && Ue(g) && f.fromTo(g, { opacity: 1 }, { opacity: 0, duration: n, ease: r, delay: T }, 0), Qt.set(d, f), u++;
@@ -3666,12 +3668,12 @@ function or(i, t = {}) {
3666
3668
  html: p.innerHTML,
3667
3669
  ariaLabel: p.getAttribute("aria-label")
3668
3670
  }));
3669
- let o = { chars: [], words: [], lines: [], masks: [] }, a, c, l = !1;
3671
+ let o = { chars: [], words: [], lines: [], masks: [] }, c, a, l = !1;
3670
3672
  const h = () => {
3671
3673
  for (const { element: p, html: g, ariaLabel: y } of r)
3672
3674
  p.innerHTML = g, y === null ? p.removeAttribute("aria-label") : p.setAttribute("aria-label", y);
3673
3675
  }, f = () => {
3674
- a && (a.revert ? a.revert() : a.kill?.(), a = void 0);
3676
+ c && (c.revert ? c.revert() : c.kill?.(), c = void 0);
3675
3677
  }, u = () => {
3676
3678
  const p = { chars: [], words: [], lines: [], masks: [] };
3677
3679
  for (const { element: g } of r) {
@@ -3702,13 +3704,13 @@ function or(i, t = {}) {
3702
3704
  return o.masks;
3703
3705
  },
3704
3706
  split() {
3705
- l || (f(), h(), u(), a = t.onSplit?.(d));
3707
+ l || (f(), h(), u(), c = t.onSplit?.(d));
3706
3708
  },
3707
3709
  revert() {
3708
- l = !0, c?.disconnect(), f(), h();
3710
+ l = !0, a?.disconnect(), f(), h();
3709
3711
  }
3710
3712
  };
3711
- u(), a = t.onSplit?.(d), t.autoSplit && m();
3713
+ u(), c = t.onSplit?.(d), t.autoSplit && m();
3712
3714
  function m() {
3713
3715
  const p = /* @__PURE__ */ new Map();
3714
3716
  let g = !1;
@@ -3721,15 +3723,15 @@ function or(i, t = {}) {
3721
3723
  typeof requestAnimationFrame == "function" ? requestAnimationFrame(v) : setTimeout(v, 0);
3722
3724
  };
3723
3725
  if (typeof ResizeObserver == "function") {
3724
- c = new ResizeObserver((v) => {
3726
+ a = new ResizeObserver((v) => {
3725
3727
  let T = !1;
3726
3728
  for (const w of v) {
3727
- const x = Math.round(w.contentRect.width), S = p.get(w.target);
3728
- p.set(w.target, x), S !== void 0 && S !== x && (T = !0);
3729
+ const x = Math.round(w.contentRect.width), M = p.get(w.target);
3730
+ p.set(w.target, x), M !== void 0 && M !== x && (T = !0);
3729
3731
  }
3730
3732
  T && y();
3731
3733
  });
3732
- for (const v of i) c.observe(v);
3734
+ for (const v of i) a.observe(v);
3733
3735
  }
3734
3736
  const b = i[0]?.ownerDocument?.fonts;
3735
3737
  b && b.status !== "loaded" && b.ready.then(() => y());
@@ -3744,18 +3746,18 @@ function ar(i, t) {
3744
3746
  ), r = [];
3745
3747
  for (let o = n.nextNode(); o; o = n.nextNode()) r.push(o);
3746
3748
  for (const o of r) {
3747
- const a = o.data.match(/\s+|\S+/g) ?? [];
3748
- if (a.length === 0) continue;
3749
- const c = e.createDocumentFragment();
3750
- for (const l of a) {
3749
+ const c = o.data.match(/\s+|\S+/g) ?? [];
3750
+ if (c.length === 0) continue;
3751
+ const a = e.createDocumentFragment();
3752
+ for (const l of c) {
3751
3753
  if (/^\s/.test(l)) {
3752
- c.appendChild(e.createTextNode(l));
3754
+ a.appendChild(e.createTextNode(l));
3753
3755
  continue;
3754
3756
  }
3755
3757
  const h = e.createElement("span");
3756
- h.className = t, h.style.display = "inline-block", h.textContent = l, c.appendChild(h), s.push(h);
3758
+ h.className = t, h.style.display = "inline-block", h.textContent = l, a.appendChild(h), s.push(h);
3757
3759
  }
3758
- o.replaceWith(c);
3760
+ o.replaceWith(a);
3759
3761
  }
3760
3762
  return s;
3761
3763
  }
@@ -3776,10 +3778,10 @@ function hr(i, t, e) {
3776
3778
  p.nodeType === 3 || n.has(p) || p.tagName === "BR" ? r.push(p) : o(p);
3777
3779
  };
3778
3780
  o(i);
3779
- const a = [];
3780
- let c = null, l = 0, h = 0, f = !1, u = [];
3781
+ const c = [];
3782
+ let a = null, l = 0, h = 0, f = !1, u = [];
3781
3783
  const d = () => {
3782
- c = s.createElement("span"), c.className = e, c.style.display = "block", a.push(c), u = [];
3784
+ a = s.createElement("span"), a.className = e, a.style.display = "block", c.push(a), u = [];
3783
3785
  };
3784
3786
  for (const m of r) {
3785
3787
  if (m.tagName === "BR") {
@@ -3787,20 +3789,20 @@ function hr(i, t, e) {
3787
3789
  continue;
3788
3790
  }
3789
3791
  const p = n.get(m);
3790
- if (p && (!c || f || p.top > l + h) && (d(), l = p.top, h = p.height / 2, f = !1), !c) continue;
3792
+ if (p && (!a || f || p.top > l + h) && (d(), l = p.top, h = p.height / 2, f = !1), !a) continue;
3791
3793
  const g = [];
3792
3794
  for (let v = m.parentNode; v && v !== i; v = v.parentNode) g.unshift(v);
3793
3795
  let y = 0;
3794
3796
  for (; y < u.length && y < g.length && u[y].original === g[y]; ) y++;
3795
3797
  u.length = y;
3796
- let b = y === 0 ? c : u[y - 1].clone;
3798
+ let b = y === 0 ? a : u[y - 1].clone;
3797
3799
  for (const v of g.slice(y)) {
3798
3800
  const T = v.cloneNode(!1);
3799
3801
  b.appendChild(T), u.push({ original: v, clone: T }), b = T;
3800
3802
  }
3801
3803
  b.appendChild(m);
3802
3804
  }
3803
- return i.replaceChildren(...a), a;
3805
+ return i.replaceChildren(...c), c;
3804
3806
  }
3805
3807
  function ur(i, t) {
3806
3808
  const e = i.ownerDocument.createElement("span");
@@ -3829,7 +3831,7 @@ function Ni(i) {
3829
3831
  if (typeof i == "number")
3830
3832
  return { elementFraction: 0, viewportFraction: 0, offsetPx: 0, absolutePx: i };
3831
3833
  let t = 0;
3832
- const s = i.replace(/([+-])=\s*(-?[\d.]+)/g, (o, a, c) => (t += (a === "-" ? -1 : 1) * Number.parseFloat(c), "")).trim().split(/\s+/).filter(Boolean);
3834
+ const s = i.replace(/([+-])=\s*(-?[\d.]+)/g, (o, c, a) => (t += (c === "-" ? -1 : 1) * Number.parseFloat(a), "")).trim().split(/\s+/).filter(Boolean);
3833
3835
  if (s.length === 1 && /^-?[\d.]+$/.test(s[0]))
3834
3836
  return {
3835
3837
  elementFraction: 0,
@@ -3861,15 +3863,15 @@ function fr(i, t, e, s) {
3861
3863
  return i + (t - i) * n;
3862
3864
  }
3863
3865
  function Ge(i, t, e, s, n) {
3864
- const r = (h) => gt({ top: i + n(h), bottom: i + n(h) + t, height: t }, e, s), o = r(0), a = r(1);
3865
- if (Math.sign(o) === Math.sign(a) || o === 0 || a === 0)
3866
- return o === 0 ? 0 : a === 0 ? 1 : Math.abs(o) < Math.abs(a) ? 0 : 1;
3867
- let c = 0, l = 1;
3866
+ const r = (h) => gt({ top: i + n(h), bottom: i + n(h) + t, height: t }, e, s), o = r(0), c = r(1);
3867
+ if (Math.sign(o) === Math.sign(c) || o === 0 || c === 0)
3868
+ return o === 0 ? 0 : c === 0 ? 1 : Math.abs(o) < Math.abs(c) ? 0 : 1;
3869
+ let a = 0, l = 1;
3868
3870
  for (let h = 0; h < 40; h++) {
3869
- const f = (c + l) / 2;
3870
- Math.sign(r(f)) === Math.sign(o) ? c = f : l = f;
3871
+ const f = (a + l) / 2;
3872
+ Math.sign(r(f)) === Math.sign(o) ? a = f : l = f;
3871
3873
  }
3872
- return (c + l) / 2;
3874
+ return (a + l) / 2;
3873
3875
  }
3874
3876
  class dr {
3875
3877
  timeline;
@@ -3989,14 +3991,14 @@ class vr {
3989
3991
  this.write(e), r?.();
3990
3992
  return;
3991
3993
  }
3992
- for (const c of this.cancelEvents) this.eventTarget?.addEventListener(c, this.onInterrupt, { passive: !0 });
3994
+ for (const a of this.cancelEvents) this.eventTarget?.addEventListener(a, this.onInterrupt, { passive: !0 });
3993
3995
  let o = null;
3994
- const a = (c) => {
3995
- o ??= c;
3996
- const l = Math.min(1, (c - o) / (s * 1e3));
3997
- this.write(t + (e - t) * n(l)), l < 1 ? this.rafId = requestAnimationFrame(a) : (this.rafId = null, this.detach(), r?.());
3996
+ const c = (a) => {
3997
+ o ??= a;
3998
+ const l = Math.min(1, (a - o) / (s * 1e3));
3999
+ this.write(t + (e - t) * n(l)), l < 1 ? this.rafId = requestAnimationFrame(c) : (this.rafId = null, this.detach(), r?.());
3998
4000
  };
3999
- this.rafId = requestAnimationFrame(a);
4001
+ this.rafId = requestAnimationFrame(c);
4000
4002
  }
4001
4003
  cancel() {
4002
4004
  this.rafId !== null && typeof cancelAnimationFrame < "u" && cancelAnimationFrame(this.rafId), this.rafId = null, this.detach();
@@ -4018,9 +4020,9 @@ class wr {
4018
4020
  end;
4019
4021
  constructor(t, e, s) {
4020
4022
  this.options = s === !0 ? {} : s, this.scroller = e;
4021
- const { startColor: n = "#3ecf7a", endColor: r = "#ff5a5a", id: o } = this.options, a = o ? `${o} ` : "", c = (l, h, f) => {
4023
+ const { startColor: n = "#3ecf7a", endColor: r = "#ff5a5a", id: o } = this.options, c = o ? `${o} ` : "", a = (l, h, f) => {
4022
4024
  const u = t.createElement("div");
4023
- return u.textContent = `${a}${l}`, u.setAttribute("aria-hidden", "true"), u.className = "scroll-marker", Object.assign(u.style, {
4025
+ return u.textContent = `${c}${l}`, u.setAttribute("aria-hidden", "true"), u.className = "scroll-marker", Object.assign(u.style, {
4024
4026
  position: f ? "fixed" : "absolute",
4025
4027
  right: `${this.options.indent ?? 0}px`,
4026
4028
  zIndex: "2147483646",
@@ -4033,7 +4035,7 @@ class wr {
4033
4035
  background: "rgba(0, 0, 0, 0.35)"
4034
4036
  }), (e ?? t.body).appendChild(u), this.nodes.push(u), u;
4035
4037
  };
4036
- this.scrollerStart = c("scroller-start", n, !e), this.scrollerEnd = c("scroller-end", r, !e), this.start = c("start", n, !1), this.end = c("end", r, !1), e && getComputedStyle(e).position === "static" && (e.style.position = "relative");
4038
+ this.scrollerStart = a("scroller-start", n, !e), this.scrollerEnd = a("scroller-end", r, !e), this.start = a("start", n, !1), this.end = a("end", r, !1), e && getComputedStyle(e).position === "static" && (e.style.position = "relative");
4037
4039
  }
4038
4040
  /** Place the markers for the latest measurement. */
4039
4041
  place(t, e) {
@@ -4225,8 +4227,8 @@ class qt {
4225
4227
  this.snapTimer = null;
4226
4228
  const n = this.endPx - this.startPx, r = this.scrollPosition();
4227
4229
  if (!this.running || n <= 0 || r <= this.startPx || r >= this.endPx) return;
4228
- const o = (r - this.startPx) / n, a = this.startPx + yr(o, this.releaseVelocity / n, e.snapTo) * n;
4229
- Math.abs(a - r) < 1 || this.snapper.animate(r, a, br(e, a - r, this.viewportHeight()), e.ease);
4230
+ const o = (r - this.startPx) / n, c = this.startPx + yr(o, this.releaseVelocity / n, e.snapTo) * n;
4231
+ Math.abs(c - r) < 1 || this.snapper.animate(r, c, br(e, c - r, this.viewportHeight()), e.ease);
4230
4232
  };
4231
4233
  e.delay ? this.snapTimer = setTimeout(s, e.delay * 1e3) : s();
4232
4234
  }
@@ -4242,7 +4244,7 @@ class qt {
4242
4244
  measureInContainer(t) {
4243
4245
  const e = this.options.trigger;
4244
4246
  if (typeof e?.getBoundingClientRect != "function") return;
4245
- const s = e.getBoundingClientRect(), n = this.options.scroller?.getBoundingClientRect?.().left ?? 0, r = this.options.scroller ? this.options.scroller.clientWidth : typeof window < "u" ? window.innerWidth : 0, o = s.left - n - t.shiftAt(t.progress()), { start: a, end: c } = t.range(), l = (d) => a + d * (c - a), h = Ge(o, s.width, r, ft(this.options.start) ?? "left right", t.shiftAt);
4247
+ const s = e.getBoundingClientRect(), n = this.options.scroller?.getBoundingClientRect?.().left ?? 0, r = this.options.scroller ? this.options.scroller.clientWidth : typeof window < "u" ? window.innerWidth : 0, o = s.left - n - t.shiftAt(t.progress()), { start: c, end: a } = t.range(), l = (d) => c + d * (a - c), h = Ge(o, s.width, r, ft(this.options.start) ?? "left right", t.shiftAt);
4246
4248
  this.startPx = l(h);
4247
4249
  const f = ft(this.options.end) ?? "right left", u = typeof f == "string" ? f.trim().match(/^\+=\s*(-?[\d.]+)\s*(px)?$/) : null;
4248
4250
  this.endPx = u ? this.startPx + Number.parseFloat(u[1]) : l(Ge(o, s.width, r, f, t.shiftAt)), this.markerGeometry = null;
@@ -4250,11 +4252,11 @@ class qt {
4250
4252
  /** Where the markers go: the element points on the page, and the viewport lines they meet. */
4251
4253
  markersFor(t) {
4252
4254
  const e = (r, o) => {
4253
- const a = ft(r) ?? o;
4254
- if (typeof a == "number") return 0;
4255
- if (/^\s*\+=/.test(a)) return;
4256
- const c = Ni(a);
4257
- return t * c.viewportFraction - c.offsetPx;
4255
+ const c = ft(r) ?? o;
4256
+ if (typeof c == "number") return 0;
4257
+ if (/^\s*\+=/.test(c)) return;
4258
+ const a = Ni(c);
4259
+ return t * a.viewportFraction - a.offsetPx;
4258
4260
  }, s = e(this.options.start, "top bottom") ?? 0, n = e(this.options.end, "bottom top") ?? s;
4259
4261
  return {
4260
4262
  startViewport: s,
@@ -4295,8 +4297,8 @@ class qt {
4295
4297
  relativeRect(t) {
4296
4298
  const e = this.options.horizontal, s = e ? t.left ?? 0 : t.top, n = e ? t.right ?? 0 : t.bottom, r = e ? t.width ?? 0 : t.height, o = this.options.scroller;
4297
4299
  if (o && typeof o.getBoundingClientRect == "function") {
4298
- const a = o.getBoundingClientRect(), c = e ? a.left : a.top;
4299
- return { top: s - c, bottom: n - c, height: r };
4300
+ const c = o.getBoundingClientRect(), a = e ? c.left : c.top;
4301
+ return { top: s - a, bottom: n - a, height: r };
4300
4302
  }
4301
4303
  return { top: s, bottom: n, height: r };
4302
4304
  }
@@ -4395,11 +4397,11 @@ class Qe {
4395
4397
  if (t && !this.reduced) {
4396
4398
  const e = this.options.scroller ?? document, s = this.position(), n = this.viewportHeight(), r = this.options.scroller?.getBoundingClientRect().top ?? 0;
4397
4399
  for (const o of e.querySelectorAll(t)) {
4398
- const a = Number.parseFloat(o.dataset.speed ?? ""), c = Number.parseFloat(o.dataset.lag ?? ""), l = o.getBoundingClientRect(), h = l.top - r + s;
4400
+ const c = Number.parseFloat(o.dataset.speed ?? ""), a = Number.parseFloat(o.dataset.lag ?? ""), l = o.getBoundingClientRect(), h = l.top - r + s;
4399
4401
  this.effects.push({
4400
4402
  element: o,
4401
- speed: Number.isFinite(a) ? a : void 0,
4402
- lag: Number.isFinite(c) && c > 0 ? c : void 0,
4403
+ speed: Number.isFinite(c) ? c : void 0,
4404
+ lag: Number.isFinite(a) && a > 0 ? a : void 0,
4403
4405
  centre: h + l.height / 2 - n / 2,
4404
4406
  lagged: s,
4405
4407
  shift: 0,
@@ -4545,16 +4547,16 @@ function be(i, t, e, s, n = () => {
4545
4547
  n(`gsap-compat: scrollTrigger has no trigger element${typeof t.trigger == "string" ? ` for "${t.trigger}"` : ""}`);
4546
4548
  return;
4547
4549
  }
4548
- const a = t.scrub === void 0 || t.scrub === !1 ? !1 : t.scrub, c = (t.toggleActions ?? "play none none none").trim().split(/\s+/);
4550
+ const c = t.scrub === void 0 || t.scrub === !1 ? !1 : t.scrub, a = (t.toggleActions ?? "play none none none").trim().split(/\s+/);
4549
4551
  let l = 0, h;
4550
4552
  const f = (d, m) => () => {
4551
- m?.(), e && !a && Ar(e, c[d] ?? "none"), t.once && d === 0 && queueMicrotask(() => h.destroy());
4553
+ m?.(), e && !c && Ar(e, a[d] ?? "none"), t.once && d === 0 && queueMicrotask(() => h.destroy());
4552
4554
  }, u = t.containerAnimation ? _r(i, t.containerAnimation, o, n) : void 0;
4553
4555
  return h = new qt({
4554
4556
  trigger: o,
4555
4557
  start: t.start,
4556
4558
  end: t.end,
4557
- scrub: a === !1 ? void 0 : a,
4559
+ scrub: c === !1 ? void 0 : c,
4558
4560
  pin: t.pin === !0 ? !0 : r(t.pin),
4559
4561
  scroller: r(t.scroller),
4560
4562
  horizontal: t.horizontal,
@@ -4564,7 +4566,7 @@ function be(i, t, e, s, n = () => {
4564
4566
  markers: t.markers,
4565
4567
  container: u,
4566
4568
  onUpdate: (d, m) => {
4567
- if (e && a !== !1 && e.progress(d), t.onUpdate) {
4569
+ if (e && c !== !1 && e.progress(d), t.onUpdate) {
4568
4570
  const p = d < l || m < 0 ? -1 : 1;
4569
4571
  t.onUpdate({ progress: d, velocity: m, direction: p });
4570
4572
  }
@@ -4574,7 +4576,7 @@ function be(i, t, e, s, n = () => {
4574
4576
  onLeave: f(1, t.onLeave),
4575
4577
  onEnterBack: f(2, t.onEnterBack),
4576
4578
  onLeaveBack: f(3, t.onLeaveBack)
4577
- }), e && a === !1 && e.progress(0), h.start(), i.own(h);
4579
+ }), e && c === !1 && e.progress(0), h.start(), i.own(h);
4578
4580
  }
4579
4581
  function Pr(i, t) {
4580
4582
  const e = (n) => n === "labels" ? (r) => Er(r, t?.labelProgresses?.() ?? []) : n;
@@ -4603,12 +4605,12 @@ function _r(i, t, e, s) {
4603
4605
  progress: () => t.progress(),
4604
4606
  shiftAt: (r) => {
4605
4607
  const o = t.timeline.getStateAtTime(r * t.timeline.duration);
4606
- let a = 0;
4607
- for (const c of n()) {
4608
- const l = o.values.get(c)?.get("x");
4609
- typeof l == "number" && (a += l);
4608
+ let c = 0;
4609
+ for (const a of n()) {
4610
+ const l = o.values.get(a)?.get("x");
4611
+ typeof l == "number" && (c += l);
4610
4612
  }
4611
- return a;
4613
+ return c;
4612
4614
  }
4613
4615
  };
4614
4616
  }
@@ -4668,10 +4670,10 @@ class Cr {
4668
4670
  const s = { conditions: t, setup: e, queries: /* @__PURE__ */ new Map() }, n = typeof t == "string" ? { matches: t } : t;
4669
4671
  if (typeof window < "u" && typeof window.matchMedia == "function")
4670
4672
  for (const [r, o] of Object.entries(n)) {
4671
- const a = window.matchMedia(o);
4672
- s.queries.set(r, a);
4673
- const c = () => this.scheduleUpdate();
4674
- a.addEventListener("change", c), this.listeners.push(() => a.removeEventListener("change", c));
4673
+ const c = window.matchMedia(o);
4674
+ s.queries.set(r, c);
4675
+ const a = () => this.scheduleUpdate();
4676
+ c.addEventListener("change", a), this.listeners.push(() => c.removeEventListener("change", a));
4675
4677
  }
4676
4678
  return this.entries.push(s), this.update(s), this;
4677
4679
  }
@@ -4692,7 +4694,7 @@ class Cr {
4692
4694
  }
4693
4695
  update(t) {
4694
4696
  const e = {};
4695
- for (const [o, a] of t.queries) e[o] = a.matches;
4697
+ for (const [o, c] of t.queries) e[o] = c.matches;
4696
4698
  const s = Object.values(e).some(Boolean), n = s ? JSON.stringify(e) : void 0;
4697
4699
  if (n === t.key || (t.context?.revert(), t.context = void 0, t.key = n, !s)) return;
4698
4700
  const r = new Yi(this.host, this.scope);
@@ -4739,8 +4741,8 @@ class Rr {
4739
4741
  draw() {
4740
4742
  const t = Math.round(this.current), e = this.nearestReady(t);
4741
4743
  if (e === -1 || e === this.drawn || !this.context) return;
4742
- const s = this.images[e], { width: n, height: r } = this.canvas, o = (this.options.fit ?? "cover") === "cover" ? Math.max(n / s.naturalWidth, r / s.naturalHeight) : Math.min(n / s.naturalWidth, r / s.naturalHeight), a = s.naturalWidth * o, c = s.naturalHeight * o;
4743
- this.context.clearRect(0, 0, n, r), this.context.drawImage(s, (n - a) / 2, (r - c) / 2, a, c), this.drawn = e, this.pump();
4744
+ const s = this.images[e], { width: n, height: r } = this.canvas, o = (this.options.fit ?? "cover") === "cover" ? Math.max(n / s.naturalWidth, r / s.naturalHeight) : Math.min(n / s.naturalWidth, r / s.naturalHeight), c = s.naturalWidth * o, a = s.naturalHeight * o;
4745
+ this.context.clearRect(0, 0, n, r), this.context.drawImage(s, (n - c) / 2, (r - a) / 2, c, a), this.drawn = e, this.pump();
4744
4746
  }
4745
4747
  /** The loaded frame closest to `index`, or -1. */
4746
4748
  nearestReady(t) {
@@ -4778,18 +4780,18 @@ async function Fr(i, t, e, s) {
4778
4780
  const n = t.collector?.scope ?? t.root, r = n.ownerDocument ?? n, o = () => s.shared ? [...n.querySelectorAll(s.shared)] : [];
4779
4781
  if (s.native && typeof r.startViewTransition == "function")
4780
4782
  return Lr(r, s, o);
4781
- const a = s.duration ?? 0.35, c = s.ease ?? "power2.inOut", l = (g) => new Promise((y) => {
4783
+ const c = s.duration ?? 0.35, a = s.ease ?? "power2.inOut", l = (g) => new Promise((y) => {
4782
4784
  g(y) || y();
4783
4785
  }), h = o(), f = h.length ? he(t, h) : void 0, u = s.from !== void 0 ? Je(t, s.from, s.shared) : [];
4784
4786
  if (u.length && s.leave !== !1) {
4785
4787
  const g = s.leave ?? Ir;
4786
- await l((y) => i.to(u, { ...g, duration: a, ease: c, onComplete: y }));
4788
+ await l((y) => i.to(u, { ...g, duration: c, ease: a, onComplete: y }));
4787
4789
  }
4788
4790
  await s.update();
4789
4791
  const d = [], m = typeof s.to == "function" ? s.to() : s.to, p = m !== void 0 ? Je(t, m, s.shared) : [];
4790
4792
  if (p.length && s.enter !== !1) {
4791
4793
  const g = s.enter ?? $r;
4792
- d.push(l((y) => i.fromTo(p, g, { ...Bi(g), duration: a, ease: c, onComplete: y })));
4794
+ d.push(l((y) => i.fromTo(p, g, { ...Bi(g), duration: c, ease: a, onComplete: y })));
4793
4795
  }
4794
4796
  if (f) {
4795
4797
  const g = o().filter((y) => !h.includes(y));
@@ -4797,8 +4799,8 @@ async function Fr(i, t, e, s) {
4797
4799
  l(
4798
4800
  (y) => ue(t, e, f, {
4799
4801
  targets: g,
4800
- duration: a * 1.4,
4801
- ease: c,
4802
+ duration: c * 1.4,
4803
+ ease: a,
4802
4804
  enter: !1,
4803
4805
  onComplete: y
4804
4806
  })
@@ -4812,15 +4814,15 @@ function Je(i, t, e) {
4812
4814
  return e ? s.flatMap((n) => !n.querySelector(e) && !n.matches(e) ? [n] : [...n.children].filter((r) => !r.matches(e) && !r.querySelector(e))) : s;
4813
4815
  }
4814
4816
  async function Lr(i, t, e) {
4815
- const s = (a, c) => {
4816
- const l = a.dataset?.flipId;
4817
- l && a.style.setProperty("view-transition-name", c ? `tf-${l.replace(/[^\w-]/g, "-")}` : "");
4817
+ const s = (c, a) => {
4818
+ const l = c.dataset?.flipId;
4819
+ l && c.style.setProperty("view-transition-name", a ? `tf-${l.replace(/[^\w-]/g, "-")}` : "");
4818
4820
  }, n = e();
4819
- n.forEach((a) => s(a, !0));
4821
+ n.forEach((c) => s(c, !0));
4820
4822
  let r = [];
4821
4823
  await i.startViewTransition(async () => {
4822
- n.forEach((a) => s(a, !1)), await t.update(), r = e(), r.forEach((a) => s(a, !0));
4823
- }).finished, r.forEach((a) => s(a, !1));
4824
+ n.forEach((c) => s(c, !1)), await t.update(), r = e(), r.forEach((c) => s(c, !0));
4825
+ }).finished, r.forEach((c) => s(c, !1));
4824
4826
  }
4825
4827
  const Dr = {
4826
4828
  /** Register a curve from SVG path data or bezier points. Returns the name. */
@@ -4873,31 +4875,31 @@ function Yr(i) {
4873
4875
  }
4874
4876
  return h;
4875
4877
  }
4876
- const o = s.filter(([l, h]) => l !== "easeEach" && Array.isArray(h)), a = Math.max(0, ...o.map(([, l]) => l.length)), c = [];
4877
- for (let l = 0; l < a; l++) {
4878
- const h = { ...e, ease: r, duration: n / a };
4878
+ const o = s.filter(([l, h]) => l !== "easeEach" && Array.isArray(h)), c = Math.max(0, ...o.map(([, l]) => l.length)), a = [];
4879
+ for (let l = 0; l < c; l++) {
4880
+ const h = { ...e, ease: r, duration: n / c };
4879
4881
  for (const [f, u] of o)
4880
4882
  l < u.length && (h[f] = u[l]);
4881
- c.push(h);
4883
+ a.push(h);
4882
4884
  }
4883
- return c;
4885
+ return a;
4884
4886
  }
4885
4887
  function ei(i, t, e, s = {}) {
4886
4888
  const n = t.collector?.scope ?? t.root, r = typeof s.scroller == "string" ? n.querySelector(s.scroller) : s.scroller ?? null, o = {
4887
4889
  x: r ? r.scrollLeft : window.scrollX,
4888
4890
  y: r ? r.scrollTop : window.scrollY
4889
- }, a = {
4891
+ }, c = {
4890
4892
  x: r ? r.scrollWidth - r.clientWidth : document.documentElement.scrollWidth - window.innerWidth,
4891
4893
  y: r ? r.scrollHeight - r.clientHeight : document.documentElement.scrollHeight - window.innerHeight
4892
- }, c = (b, v) => {
4894
+ }, a = (b, v) => {
4893
4895
  if (v === void 0) return o[b];
4894
4896
  if (typeof v == "number") return v;
4895
- if (v === "max") return a[b];
4897
+ if (v === "max") return c[b];
4896
4898
  const T = typeof v == "string" ? n.querySelector(v) : v;
4897
4899
  if (!T) return o[b];
4898
- const w = T.getBoundingClientRect(), x = r?.getBoundingClientRect(), S = (b === "x" ? s.offsetX : s.offsetY) ?? s.offset ?? 0;
4899
- return b === "x" ? w.left - (x?.left ?? 0) + o.x - S : w.top - (x?.top ?? 0) + o.y - S;
4900
- }, l = typeof e == "object" && e !== null && !("nodeType" in e) ? { x: c("x", e.x), y: c("y", e.y) } : { x: o.x, y: c("y", e) }, h = { x: Math.max(0, Math.min(a.x, l.x)), y: Math.max(0, Math.min(a.y, l.y)) }, f = { ...o }, u = () => {
4900
+ const w = T.getBoundingClientRect(), x = r?.getBoundingClientRect(), M = (b === "x" ? s.offsetX : s.offsetY) ?? s.offset ?? 0;
4901
+ return b === "x" ? w.left - (x?.left ?? 0) + o.x - M : w.top - (x?.top ?? 0) + o.y - M;
4902
+ }, l = typeof e == "object" && e !== null && !("nodeType" in e) ? { x: a("x", e.x), y: a("y", e.y) } : { x: o.x, y: a("y", e) }, h = { x: Math.max(0, Math.min(c.x, l.x)), y: Math.max(0, Math.min(c.y, l.y)) }, f = { ...o }, u = () => {
4901
4903
  r ? (r.scrollLeft = f.x, r.scrollTop = f.y) : window.scrollTo({ left: f.x, top: f.y, behavior: "instant" });
4902
4904
  }, d = ["wheel", "touchstart", "keydown"], m = r ?? window, p = () => {
4903
4905
  y.kill(), g();
@@ -4920,7 +4922,7 @@ function ei(i, t, e, s = {}) {
4920
4922
  return y;
4921
4923
  }
4922
4924
  function Vr(i, t, e) {
4923
- const s = i.collector?.scope ?? i.root, n = typeof t == "string" ? [...s.querySelectorAll(t)] : "nodeType" in t ? [t] : Array.from(t), { interval: r = 0.1, batchMax: o, onEnter: a, onLeave: c, onEnterBack: l, onLeaveBack: h, ...f } = e, u = { onEnter: a, onLeave: c, onEnterBack: l, onLeaveBack: h }, d = { onEnter: [], onLeave: [], onEnterBack: [], onLeaveBack: [] }, m = {}, p = (y) => {
4925
+ const s = i.collector?.scope ?? i.root, n = typeof t == "string" ? [...s.querySelectorAll(t)] : "nodeType" in t ? [t] : Array.from(t), { interval: r = 0.1, batchMax: o, onEnter: c, onLeave: a, onEnterBack: l, onLeaveBack: h, ...f } = e, u = { onEnter: c, onLeave: a, onEnterBack: l, onLeaveBack: h }, d = { onEnter: [], onLeave: [], onEnterBack: [], onLeaveBack: [] }, m = {}, p = (y) => {
4924
4926
  m[y] !== void 0 && clearTimeout(m[y]), m[y] = void 0;
4925
4927
  const b = d[y].splice(0);
4926
4928
  b.length > 0 && u[y]?.(b);
@@ -4967,29 +4969,31 @@ class V {
4967
4969
  /** Set by `reverse()`: arriving at the start is a reverse completion */
4968
4970
  backwards = !1;
4969
4971
  constructor(t, e = {}) {
4970
- if (this.stage = t, this.options = e, this.compat = new st({
4971
- ...e,
4972
- startValue: (s, n) => {
4973
- const r = t.objectFor(s);
4974
- if (r) return zr(r[n]);
4975
- const o = t.appliedValue(s, n);
4976
- if (o !== void 0) return o;
4977
- if (n === "d") return Li(t.elementFor(s)) ?? void 0;
4978
- if (n === "text") return t.elementFor(s)?.textContent ?? void 0;
4979
- if (n === "strokeDasharray" || n === "strokeDashoffset") {
4980
- const a = ni(t.elementFor(s));
4981
- if (a !== void 0) return n === "strokeDasharray" ? [a, a] : 0;
4972
+ this.stage = t;
4973
+ const s = { ...e, onWarning: e.onWarning ?? t.onWarning };
4974
+ if (this.options = s, this.compat = new st({
4975
+ ...s,
4976
+ startValue: (n, r) => {
4977
+ const o = t.objectFor(n);
4978
+ if (o) return zr(o[r]);
4979
+ const c = t.appliedValue(n, r);
4980
+ if (c !== void 0) return c;
4981
+ if (r === "d") return Li(t.elementFor(n)) ?? void 0;
4982
+ if (r === "text") return t.elementFor(n)?.textContent ?? void 0;
4983
+ if (r === "strokeDasharray" || r === "strokeDashoffset") {
4984
+ const a = ni(t.elementFor(n));
4985
+ if (a !== void 0) return r === "strokeDasharray" ? [a, a] : 0;
4982
4986
  }
4983
4987
  },
4984
- startVelocity: (s, n) => t.velocityOf(s, n),
4985
- layoutColumns: (s) => si(s.map((n) => t.elementFor(n))),
4988
+ startVelocity: (n, r) => t.velocityOf(n, r),
4989
+ layoutColumns: (n) => si(n.map((r) => t.elementFor(r))),
4986
4990
  random: () => t.utils.random(0, 1)
4987
4991
  }), this.compat.timeline.onComplete = () => {
4988
4992
  this.finishedThisFrame = !0;
4989
- }, t.collector?.track(this), t.liveTimelines.add(this), this.autoplayPending = !e.paused && !e.scrollTrigger, e.scrollTrigger) {
4990
- const s = e.scrollTrigger;
4993
+ }, t.collector?.track(this), t.liveTimelines.add(this), this.autoplayPending = !s.paused && !s.scrollTrigger, s.scrollTrigger) {
4994
+ const n = s.scrollTrigger;
4991
4995
  queueMicrotask(() => {
4992
- this.killed || (this.scrollDriver = be(t, s, this, this.firstElement, (n) => e.onWarning?.(n)));
4996
+ this.killed || (this.scrollDriver = be(t, n, this, this.firstElement, (r) => s.onWarning?.(r)));
4993
4997
  });
4994
4998
  }
4995
4999
  this.autoplayPending && queueMicrotask(() => {
@@ -5013,7 +5017,7 @@ class V {
5013
5017
  }
5014
5018
  fromTo(t, e, s, n) {
5015
5019
  return this.record(
5016
- () => this.tween(t, [e, s], n, ([r, o], a, c) => this.compat.fromTo(a, r, o, c))
5020
+ () => this.tween(t, [e, s], n, ([r, o], c, a) => this.compat.fromTo(c, r, o, a))
5017
5021
  );
5018
5022
  }
5019
5023
  set(t, e, s) {
@@ -5068,15 +5072,15 @@ class V {
5068
5072
  /** Jump to `from`, then animate the playhead to `to` (seconds or labels). */
5069
5073
  tweenFromTo(t, e, s = {}) {
5070
5074
  this.pause(), this.seek(t);
5071
- const n = this.timeline.currentTime, r = Math.max(0, Math.min(this.timeline.duration, this.compat.timeOf(e))), o = { time: n }, a = s.duration ?? Math.abs(r - n) / 1e3 / (this.timeScale() || 1), c = new V(this.stage, { onStart: s.onStart, onComplete: s.onComplete });
5072
- return c.to(o, {
5075
+ const n = this.timeline.currentTime, r = Math.max(0, Math.min(this.timeline.duration, this.compat.timeOf(e))), o = { time: n }, c = s.duration ?? Math.abs(r - n) / 1e3 / (this.timeScale() || 1), a = new V(this.stage, { onStart: s.onStart, onComplete: s.onComplete });
5076
+ return a.to(o, {
5073
5077
  time: r,
5074
- duration: a,
5078
+ duration: c,
5075
5079
  ease: s.ease ?? "none",
5076
5080
  onUpdate: () => {
5077
5081
  this.moveTo(o.time), s.onUpdate?.();
5078
5082
  }
5079
- }), c;
5083
+ }), a;
5080
5084
  }
5081
5085
  // --- playback -----------------------------------------------------------
5082
5086
  play() {
@@ -5202,8 +5206,8 @@ class V {
5202
5206
  const o = this.runCrossings(s, n, e);
5203
5207
  if (this.options.onUpdate?.(), this.finishedThisFrame && !o) {
5204
5208
  this.finishedThisFrame = !1;
5205
- const a = t.currentTime === 0 && t.direction === "reverse";
5206
- !this.scrollDriver && !r && this.stage.liveTimelines.delete(this), a && this.backwards ? this.options.onReverseComplete?.() : this.options.onComplete?.();
5209
+ const c = t.currentTime === 0 && t.direction === "reverse";
5210
+ !this.scrollDriver && !r && this.stage.liveTimelines.delete(this), c && this.backwards ? this.options.onReverseComplete?.() : this.options.onComplete?.();
5207
5211
  }
5208
5212
  this.finishedThisFrame = !1;
5209
5213
  }
@@ -5211,26 +5215,26 @@ class V {
5211
5215
  runCrossings(t, e, s) {
5212
5216
  if (this.events.length === 0 && this.ranges.length === 0 && !this.options.onRepeat && !this.options.repeatRefresh) return !1;
5213
5217
  const n = this.events, { crossings: r, passes: o } = xi(
5214
- n.map((a) => a.time),
5218
+ n.map((c) => c.time),
5215
5219
  t,
5216
5220
  e,
5217
5221
  { duration: this.timeline.duration, alternate: this.options.yoyo === !0, holding: s }
5218
5222
  );
5219
- for (const a of r) {
5223
+ for (const c of r) {
5220
5224
  if (this.killed) return !0;
5221
- if (a.kind === "repeat") {
5225
+ if (c.kind === "repeat") {
5222
5226
  this.options.repeatRefresh && this.refreshForRepeat(), this.options.onRepeat?.();
5223
5227
  continue;
5224
5228
  }
5225
- const c = n[a.index];
5226
- if (!(c.direction && c.direction !== a.direction)) {
5227
- if (c.pause)
5228
- return this.timeline.seek(c.time), this.stage.render(this.timeline), this.pause(), this.playhead = this.readPlayhead(), this.waitingToWrap = !1, c.run(), !0;
5229
- c.run();
5229
+ const a = n[c.index];
5230
+ if (!(a.direction && a.direction !== c.direction)) {
5231
+ if (a.pause)
5232
+ return this.timeline.seek(a.time), this.stage.render(this.timeline), this.pause(), this.playhead = this.readPlayhead(), this.waitingToWrap = !1, a.run(), !0;
5233
+ a.run();
5230
5234
  }
5231
5235
  }
5232
- for (const a of this.ranges)
5233
- o.some(([l, h]) => l !== h && Math.max(l, h) >= a.start && Math.min(l, h) <= a.end) && a.run();
5236
+ for (const c of this.ranges)
5237
+ o.some(([l, h]) => l !== h && Math.max(l, h) >= c.start && Math.min(l, h) <= c.end) && c.run();
5234
5238
  return !1;
5235
5239
  }
5236
5240
  /**
@@ -5243,14 +5247,14 @@ class V {
5243
5247
  tween(t, e, s, n) {
5244
5248
  const r = this.resolve(t);
5245
5249
  if (!r) return;
5246
- const { onStart: o, onUpdate: a, onComplete: c } = e[e.length - 1];
5247
- if (o || a || c) {
5250
+ const { onStart: o, onUpdate: c, onComplete: a } = e[e.length - 1];
5251
+ if (o || c || a) {
5248
5252
  let l = 1 / 0, h = -1 / 0;
5249
5253
  const f = (u, d, m) => {
5250
5254
  n(u, d, m), l = Math.min(l, this.compat.lastStart), h = Math.max(h, this.compat.lastEnd);
5251
5255
  };
5252
5256
  if (this.buildTween(r, e, s, f), l === 1 / 0) return;
5253
- o && this.events.push({ time: l, direction: "forward", run: o }), a && this.ranges.push({ start: l, end: h, run: a }), c && this.events.push({ time: h, direction: "forward", run: c });
5257
+ o && this.events.push({ time: l, direction: "forward", run: o }), c && this.ranges.push({ start: l, end: h, run: c }), a && this.events.push({ time: h, direction: "forward", run: a });
5254
5258
  return;
5255
5259
  }
5256
5260
  this.buildTween(r, e, s, n);
@@ -5265,12 +5269,12 @@ class V {
5265
5269
  if (!n) return;
5266
5270
  const r = Yr(e);
5267
5271
  if (r.length === 0) return;
5268
- const o = n.length > 1 ? ce(e.stagger, this.staggerContext(n)) : void 0, a = n.map((g) => this.targetFor(g)).filter((g) => g !== void 0), c = o ? a.map((g) => [g]) : [a], l = o ? ie(n.length, o).map((g) => g / 1e3) : [0], h = this.compat.timeOf(s) / 1e3 + $t(e.delay, 0) / 1e3;
5272
+ const o = n.length > 1 ? ce(e.stagger, this.staggerContext(n)) : void 0, c = n.map((g) => this.targetFor(g)).filter((g) => g !== void 0), a = o ? c.map((g) => [g]) : [c], l = o ? ie(n.length, o).map((g) => g / 1e3) : [0], h = this.compat.timeOf(s) / 1e3 + $t(e.delay, 0) / 1e3;
5269
5273
  let f = 1 / 0, u = -1 / 0;
5270
- if (c.forEach((g, y) => {
5274
+ if (a.forEach((g, y) => {
5271
5275
  r.forEach((b, v) => {
5272
5276
  const T = v === 0 ? h + l[y] : ">";
5273
- this.tween(g, [b], T, ([w], x, S) => this.compat.to(x, w, S)), f = Math.min(f, this.compat.lastStart), u = Math.max(u, this.compat.lastEnd);
5277
+ this.tween(g, [b], T, ([w], x, M) => this.compat.to(x, w, M)), f = Math.min(f, this.compat.lastStart), u = Math.max(u, this.compat.lastEnd);
5274
5278
  });
5275
5279
  }), f === 1 / 0) return;
5276
5280
  const { onStart: d, onUpdate: m, onComplete: p } = e;
@@ -5290,9 +5294,9 @@ class V {
5290
5294
  n(e.map((d) => this.prepare(ii(d, 0, u, this.stage.utils, r), t)), t, s);
5291
5295
  return;
5292
5296
  }
5293
- const a = e.length - 1, { stagger: c, ...l } = e[a], h = ce(c, this.staggerContext(t)), f = h ? ie(t.length, h).map((u) => u / 1e3) : t.map(() => 0);
5297
+ const c = e.length - 1, { stagger: a, ...l } = e[c], h = ce(a, this.staggerContext(t)), f = h ? ie(t.length, h).map((u) => u / 1e3) : t.map(() => 0);
5294
5298
  t.forEach((u, d) => {
5295
- const m = d === 0 ? $t(l.delay, 0) / 1e3 + f[0] : 0, p = d === 0 ? 0 : f[d] - f[d - 1], g = d === 0 ? s : `<${p < 0 ? "-" : "+"}${Math.abs(p).toFixed(6)}`, b = e.map((v, T) => T === a ? { ...l, delay: m } : v).map((v) => this.prepare(ii(v, d, this.targetFor(u), this.stage.utils, r), [u]));
5299
+ const m = d === 0 ? $t(l.delay, 0) / 1e3 + f[0] : 0, p = d === 0 ? 0 : f[d] - f[d - 1], g = d === 0 ? s : `<${p < 0 ? "-" : "+"}${Math.abs(p).toFixed(6)}`, b = e.map((v, T) => T === c ? { ...l, delay: m } : v).map((v) => this.prepare(ii(v, d, this.targetFor(u), this.stage.utils, r), [u]));
5296
5300
  n(b, [u], g);
5297
5301
  });
5298
5302
  }
@@ -5310,21 +5314,21 @@ class V {
5310
5314
  if (t.motionPath !== void 0) {
5311
5315
  const o = zn(t.motionPath, {
5312
5316
  query: n,
5313
- targets: e.map((a) => this.stage.elementFor(a)).filter((a) => !!a),
5317
+ targets: e.map((c) => this.stage.elementFor(c)).filter((c) => !!c),
5314
5318
  warn: s
5315
5319
  });
5316
5320
  r = { ...r, motionPath: o };
5317
5321
  }
5318
5322
  if (t.morphSVG !== void 0) {
5319
- const o = Hn(t.morphSVG, n, s), { morphSVG: a, ...c } = r;
5320
- r = o ? { ...r, morphSVG: o } : c;
5323
+ const o = Hn(t.morphSVG, n, s), { morphSVG: c, ...a } = r;
5324
+ r = o ? { ...r, morphSVG: o } : a;
5321
5325
  }
5322
5326
  if (t.drawSVG !== void 0) {
5323
5327
  const o = ni(this.stage.elementFor(e[0]));
5324
5328
  if (o === void 0) {
5325
5329
  s("gsap-compat: drawSVG needs an SVG shape with a stroke (path, line, circle…)");
5326
- const { drawSVG: a, ...c } = r;
5327
- r = c;
5330
+ const { drawSVG: c, ...a } = r;
5331
+ r = a;
5328
5332
  } else
5329
5333
  r = kn(r, o);
5330
5334
  }
@@ -5356,20 +5360,20 @@ function Wr(i = new Vn()) {
5356
5360
  scrollTrigger: o.scrollTrigger
5357
5361
  });
5358
5362
  }, e = (r) => {
5359
- const { onStart: o, onUpdate: a, onComplete: c, onRepeat: l, onReverseComplete: h, repeatRefresh: f, ...u } = r;
5363
+ const { onStart: o, onUpdate: c, onComplete: a, onRepeat: l, onReverseComplete: h, repeatRefresh: f, ...u } = r;
5360
5364
  return u;
5361
5365
  }, s = (r) => (r && i.collector?.track(r), r), n = {
5362
5366
  stage: i,
5363
5367
  ticker: i.ticker,
5364
5368
  utils: i.utils,
5365
5369
  getProperty: (r, o) => {
5366
- const [a] = i.resolveTargets(r);
5367
- if (a === void 0) return;
5368
- const c = i.objectFor(a);
5369
- return c ? c[o] : i.appliedValue(a, o) ?? Ri(o);
5370
+ const [c] = i.resolveTargets(r);
5371
+ if (c === void 0) return;
5372
+ const a = i.objectFor(c);
5373
+ return a ? a[o] : i.appliedValue(c, o) ?? Ri(o);
5370
5374
  },
5371
5375
  scrollTrigger: (r) => s(be(i, r)),
5372
- scrollBatch: (r, o) => Vr(i, r, o).map((a) => s(a)),
5376
+ scrollBatch: (r, o) => Vr(i, r, o).map((c) => s(c)),
5373
5377
  scrollTo: (r, o) => ei(n, i, r, o),
5374
5378
  refreshScroll: () => {
5375
5379
  qt.refreshAll(), Qe.refreshAll();
@@ -5379,8 +5383,8 @@ function Wr(i = new Vn()) {
5379
5383
  return s(new Qe({ ...r, scroller: o }).start());
5380
5384
  },
5381
5385
  context: (r, o) => {
5382
- const a = new Yi(i, o);
5383
- return r && a.add(() => r(a)), a;
5386
+ const c = new Yi(i, o);
5387
+ return r && c.add(() => r(c)), c;
5384
5388
  },
5385
5389
  matchMedia: (r) => new Cr(i, r),
5386
5390
  customEase: Dr.create,
@@ -5388,30 +5392,30 @@ function Wr(i = new Vn()) {
5388
5392
  customWiggle: Br.create,
5389
5393
  pageTransition: (r) => Fr(n, i, (o) => new V(i, o), r),
5390
5394
  imageSequence: (r, o) => {
5391
- const a = typeof r == "string" ? (i.collector?.scope ?? i.root).querySelector(r) : r;
5392
- if (!(a instanceof HTMLCanvasElement)) throw new Error(`gsap-compat: imageSequence needs a <canvas>, got ${String(r)}`);
5393
- return s(new Rr(a, o));
5395
+ const c = typeof r == "string" ? (i.collector?.scope ?? i.root).querySelector(r) : r;
5396
+ if (!(c instanceof HTMLCanvasElement)) throw new Error(`gsap-compat: imageSequence needs a <canvas>, got ${String(r)}`);
5397
+ return s(new Rr(c, o));
5394
5398
  },
5395
- quickTo: (r, o, a = {}) => {
5396
- const c = new V(i, { paused: !0 }), [l] = i.resolveTargets(r);
5399
+ quickTo: (r, o, c = {}) => {
5400
+ const a = new V(i, { paused: !0 }), [l] = i.resolveTargets(r);
5397
5401
  return Object.assign((f) => {
5398
5402
  if (!l) return;
5399
- const u = a.spring !== void 0 ? i.velocityOf(l, o) ?? 0 : 0;
5400
- c.compat.reset(), c.compat.to(l, {
5403
+ const u = c.spring !== void 0 ? i.velocityOf(l, o) ?? 0 : 0;
5404
+ a.compat.reset(), a.compat.to(l, {
5401
5405
  [o]: f,
5402
- duration: a.duration ?? 0.4,
5403
- ease: a.ease ?? "power3.out",
5404
- ...a.spring !== void 0 && { spring: jr(a.spring, o, u) }
5405
- }), c.timeline.stop(), c.timeline.play(), i.activate(c.timeline);
5406
- }, { tween: c, kill: () => c.kill() });
5406
+ duration: c.duration ?? 0.4,
5407
+ ease: c.ease ?? "power3.out",
5408
+ ...c.spring !== void 0 && { spring: jr(c.spring, o, u) }
5409
+ }), a.timeline.stop(), a.timeline.play(), i.activate(a.timeline);
5410
+ }, { tween: a, kill: () => a.kill() });
5407
5411
  },
5408
5412
  timeline: (r) => new V(i, r),
5409
5413
  // A single tween's callbacks are its timeline's, so they are not placed again as events.
5410
5414
  to: (r, o) => {
5411
5415
  if (o.scrollTo !== void 0) {
5412
- const { scrollTo: a, ...c } = o, l = typeof a == "object" && a !== null && !("nodeType" in a) ? a : {}, h = typeof r != "string" && r !== window && r.nodeType === 1;
5413
- return ei(n, i, a, {
5414
- ...c,
5416
+ const { scrollTo: c, ...a } = o, l = typeof c == "object" && c !== null && !("nodeType" in c) ? c : {}, h = typeof r != "string" && r !== window && r.nodeType === 1;
5417
+ return ei(n, i, c, {
5418
+ ...a,
5415
5419
  offsetX: l.offsetX,
5416
5420
  offsetY: l.offsetY,
5417
5421
  scroller: h ? r : void 0
@@ -5420,24 +5424,24 @@ function Wr(i = new Vn()) {
5420
5424
  return t(o).to(r, e(o));
5421
5425
  },
5422
5426
  from: (r, o) => t(o).from(r, e(o)),
5423
- fromTo: (r, o, a) => t(a).fromTo(r, o, e(a)),
5427
+ fromTo: (r, o, c) => t(c).fromTo(r, o, e(c)),
5424
5428
  set: (r, o) => t(o).set(r, e(o)),
5425
- delayedCall: (r, o, a) => new V(i).call(o, a, r),
5429
+ delayedCall: (r, o, c) => new V(i).call(o, c, r),
5426
5430
  killTweensOf: (r, o) => {
5427
- const a = i.resolveTargets(r), c = typeof o == "string" ? o.split(",").map((l) => l.trim()).filter(Boolean) : o;
5428
- for (const l of [...i.liveTimelines]) l.killTweensOf(a, c);
5431
+ const c = i.resolveTargets(r), a = typeof o == "string" ? o.split(",").map((l) => l.trim()).filter(Boolean) : o;
5432
+ for (const l of [...i.liveTimelines]) l.killTweensOf(c, a);
5429
5433
  },
5430
5434
  convertToPath: (r) => Kn(r, i.root),
5431
5435
  splitText: (r, o) => {
5432
- const a = i.collector?.scope ?? i.root, c = typeof r == "string" ? Array.from(a.querySelectorAll(r)) : "nodeType" in r ? [r] : Array.from(r);
5433
- return s(or(c, o));
5436
+ const c = i.collector?.scope ?? i.root, a = typeof r == "string" ? Array.from(c.querySelectorAll(r)) : "nodeType" in r ? [r] : Array.from(r);
5437
+ return s(or(a, o));
5434
5438
  },
5435
5439
  draggable: (r, o) => s(ir(n, i, r, o)),
5436
5440
  getFlipState: (r) => he(i, r),
5437
- flipFrom: (r, o) => ue(i, (a) => new V(i, a), r, o),
5438
- flip: (r, o, a) => {
5439
- const c = he(i, r);
5440
- return o(), ue(i, (l) => new V(i, l), c, { targets: r, ...a });
5441
+ flipFrom: (r, o) => ue(i, (c) => new V(i, c), r, o),
5442
+ flip: (r, o, c) => {
5443
+ const a = he(i, r);
5444
+ return o(), ue(i, (l) => new V(i, l), a, { targets: r, ...c });
5441
5445
  }
5442
5446
  };
5443
5447
  return n;
@@ -5455,8 +5459,8 @@ function Vi(i) {
5455
5459
  function ii(i, t, e, s, n) {
5456
5460
  if (!Vi(i)) return i;
5457
5461
  const r = {};
5458
- for (const [o, a] of Object.entries(i))
5459
- ge.has(o) ? r[o] = a : typeof a == "function" ? r[o] = a(t, e, n) : Ci(a) ? r[o] = s.resolveRandomString(a) : r[o] = a;
5462
+ for (const [o, c] of Object.entries(i))
5463
+ ge.has(o) ? r[o] = c : typeof c == "function" ? r[o] = c(t, e, n) : Ci(c) ? r[o] = s.resolveRandomString(c) : r[o] = c;
5460
5464
  return r;
5461
5465
  }
5462
5466
  function si(i) {
@@ -5744,9 +5748,9 @@ class ve {
5744
5748
  const r = e.get(n);
5745
5749
  if (!r || !r.timeline.tracks?.length) return;
5746
5750
  const o = new K();
5747
- s.querySelectorAll("[data-tinyfly]").forEach((a) => {
5748
- const c = a.getAttribute("data-tinyfly");
5749
- c && o.registerTarget(c, a);
5751
+ s.querySelectorAll("[data-tinyfly]").forEach((c) => {
5752
+ const a = c.getAttribute("data-tinyfly");
5753
+ a && o.registerTarget(a, c);
5750
5754
  }), this.symbolInstances.push({ adapter: o, timeline: mt(r.timeline) });
5751
5755
  });
5752
5756
  }
@@ -5864,9 +5868,9 @@ class ve {
5864
5868
  );
5865
5869
  for (const o of r) {
5866
5870
  if (o.kind !== "event") continue;
5867
- const a = n[o.index];
5868
- if (this.stepping || a.pause) {
5869
- this.stepping = !1, e.pause(), e.seek(a.time), this.playhead = { time: a.time, iteration: e.loopIteration, direction: e.direction };
5871
+ const c = n[o.index];
5872
+ if (this.stepping || c.pause) {
5873
+ this.stepping = !1, e.pause(), e.seek(c.time), this.playhead = { time: c.time, iteration: e.loopIteration, direction: e.direction };
5870
5874
  return;
5871
5875
  }
5872
5876
  }
@@ -5931,8 +5935,8 @@ function Qr(i) {
5931
5935
  function Jr(i, t, e = {}) {
5932
5936
  const s = t.ownerDocument;
5933
5937
  Qr(s);
5934
- const n = { ...Kr, ...e.labels }, r = e.speeds ?? [0.5, 1, 2], o = () => i.markers.length > 0, a = () => i.markers.some((k) => k.label !== void 0 || i.caption(k.id) !== void 0), c = s.createElement("div");
5935
- c.className = "tf-ctl";
5938
+ const n = { ...Kr, ...e.labels }, r = e.speeds ?? [0.5, 1, 2], o = () => i.markers.length > 0, c = () => i.markers.some((k) => k.label !== void 0 || i.caption(k.id) !== void 0), a = s.createElement("div");
5939
+ a.className = "tf-ctl";
5936
5940
  const l = s.createElement("div");
5937
5941
  l.className = "tf-ctl-bar", l.setAttribute("role", "group");
5938
5942
  const h = (k, P, C, $ = "") => {
@@ -5954,15 +5958,15 @@ function Jr(i, t, e = {}) {
5954
5958
  const P = s.createElement("option");
5955
5959
  P.value = String(k), P.textContent = `${k}×`, k === 1 && (P.selected = !0), b.appendChild(P);
5956
5960
  }
5957
- b.addEventListener("change", () => i.setSpeed(Number(b.value))), l.append(f, u, d, m, g, y), r.length > 0 && l.append(b), c.append(l);
5961
+ b.addEventListener("change", () => i.setSpeed(Number(b.value))), l.append(f, u, d, m, g, y), r.length > 0 && l.append(b), a.append(l);
5958
5962
  const v = s.createElement("p");
5959
- v.className = "tf-ctl-caption", v.setAttribute("aria-live", "polite"), e.captions !== !1 && c.append(v);
5963
+ v.className = "tf-ctl-caption", v.setAttribute("aria-live", "polite"), e.captions !== !1 && a.append(v);
5960
5964
  const T = s.createElement("div");
5961
5965
  T.className = "tf-ctl-question", T.hidden = !0;
5962
5966
  const w = s.createElement("span"), x = h(n.reveal, n.reveal, () => i.play(), "tf-ctl-primary");
5963
- T.append(w, x), c.append(T);
5964
- const S = e.mount;
5965
- S ? S.appendChild(c) : t.insertAdjacentElement("afterend", c);
5967
+ T.append(w, x), a.append(T);
5968
+ const M = e.mount;
5969
+ M ? M.appendChild(a) : t.insertAdjacentElement("afterend", a);
5966
5970
  const _ = () => {
5967
5971
  const k = i.isPlaying;
5968
5972
  d.textContent = k ? "❚❚" : "▶", d.setAttribute("aria-label", k ? n.pause : n.play), d.title = k ? n.pause : n.play;
@@ -5973,7 +5977,7 @@ function Jr(i, t, e = {}) {
5973
5977
  const $ = i.currentMarker, R = $ ? C.indexOf($) + 1 : 0;
5974
5978
  y.textContent = n.stepFormat.replace("{index}", String(R)).replace("{total}", String(C.length)), y.setAttribute("aria-label", `${n.step} ${R} ${n.of} ${C.length}`), u.disabled = i.currentTime <= 0.5, m.disabled = i.currentTime >= P - 0.5;
5975
5979
  const j = i.caption() ?? "";
5976
- v.textContent !== j && (v.textContent = j), v.hidden = !a();
5980
+ v.textContent !== j && (v.textContent = j), v.hidden = !c();
5977
5981
  const H = !k && $?.question !== void 0 && Math.abs(i.currentTime - $.time) < 1;
5978
5982
  T.hidden = !H, H && w.textContent !== $.question && (w.textContent = $.question);
5979
5983
  } else
@@ -5982,8 +5986,8 @@ function Jr(i, t, e = {}) {
5982
5986
  _();
5983
5987
  const A = e.keyboardScope ?? t;
5984
5988
  !A.hasAttribute("tabindex") && A.tabIndex < 0 && (A.tabIndex = 0);
5985
- const M = /* @__PURE__ */ new WeakSet(), E = (k) => {
5986
- if (M.has(k) || (M.add(k), k.defaultPrevented || k.altKey || k.ctrlKey || k.metaKey)) return;
5989
+ const S = /* @__PURE__ */ new WeakSet(), E = (k) => {
5990
+ if (S.has(k) || (S.add(k), k.defaultPrevented || k.altKey || k.ctrlKey || k.metaKey)) return;
5987
5991
  const P = k.target;
5988
5992
  if (!(P.tagName === "INPUT" || P.tagName === "SELECT") && !(k.key === " " && P.tagName === "BUTTON"))
5989
5993
  switch (k.key) {
@@ -6003,10 +6007,10 @@ function Jr(i, t, e = {}) {
6003
6007
  break;
6004
6008
  }
6005
6009
  };
6006
- return A.addEventListener("keydown", E), c.addEventListener("keydown", E), {
6007
- element: c,
6010
+ return A.addEventListener("keydown", E), a.addEventListener("keydown", E), {
6011
+ element: a,
6008
6012
  destroy() {
6009
- L(), A.removeEventListener("keydown", E), c.removeEventListener("keydown", E), c.remove();
6013
+ L(), A.removeEventListener("keydown", E), a.removeEventListener("keydown", E), a.remove();
6010
6014
  }
6011
6015
  };
6012
6016
  }
@@ -6035,14 +6039,14 @@ async function eo(i, t = {}) {
6035
6039
  console.warn('tinyfly: embed has no timeline (a <script type="application/json" data-tinyfly-timeline> or data-src)', i);
6036
6040
  return;
6037
6041
  }
6038
- const a = Mt(i.querySelector("script[data-tinyfly-captions]")?.textContent, "captions", i), c = {
6042
+ const c = Mt(i.querySelector("script[data-tinyfly-captions]")?.textContent, "captions", i), a = {
6039
6043
  playWhenVisible: !0,
6040
6044
  ...t.player,
6041
- ...a && { captions: a },
6045
+ ...c && { captions: c },
6042
6046
  ...Mt(i.getAttribute("data-options"), "data-options", i)
6043
6047
  };
6044
6048
  no(i);
6045
- const l = new ve(i, c), h = { element: i, player: l };
6049
+ const l = new ve(i, a), h = { element: i, player: l };
6046
6050
  if (Lt.set(i, h), i.setAttribute("data-tinyfly-mounted", ""), await l.load(r ?? n), i.getAttribute("data-controls") !== "false") {
6047
6051
  const f = Mt(i.getAttribute("data-labels"), "data-labels", i), u = i.querySelector("figcaption");
6048
6052
  h.controls = Jr(l, i, {
@@ -6210,11 +6214,11 @@ class oo {
6210
6214
  if (!r.html) continue;
6211
6215
  const o = document.createElement("div");
6212
6216
  o.innerHTML = r.html.trim();
6213
- const a = o.firstElementChild;
6214
- if (a) {
6215
- n.appendChild(a);
6216
- const c = a.getAttribute("data-tinyfly");
6217
- c && s.registerTarget(c, a);
6217
+ const c = o.firstElementChild;
6218
+ if (c) {
6219
+ n.appendChild(c);
6220
+ const a = c.getAttribute("data-tinyfly");
6221
+ a && s.registerTarget(a, c);
6218
6222
  }
6219
6223
  }
6220
6224
  this.setupNested(n, s);
@@ -6230,11 +6234,11 @@ class oo {
6230
6234
  if (!r) return;
6231
6235
  const o = this.symbolDefs.get(r);
6232
6236
  if (!o) return;
6233
- const a = new K();
6234
- n.querySelectorAll("[data-tinyfly]").forEach((c) => {
6235
- const l = c.getAttribute("data-tinyfly");
6236
- l && a.registerTarget(l, c);
6237
- }), s.push({ adapter: a, timeline: mt(o) });
6237
+ const c = new K();
6238
+ n.querySelectorAll("[data-tinyfly]").forEach((a) => {
6239
+ const l = a.getAttribute("data-tinyfly");
6240
+ l && c.registerTarget(l, a);
6241
+ }), s.push({ adapter: c, timeline: mt(o) });
6238
6242
  }), s.length ? this.nestedByAdapter.set(e, s) : this.nestedByAdapter.delete(e);
6239
6243
  }
6240
6244
  /** Apply the nested symbol states for a slot at a given scene time. */
@@ -6370,28 +6374,28 @@ function Oo(i) {
6370
6374
  if (r) return;
6371
6375
  const h = n === null ? 0 : l - n;
6372
6376
  n = l, h > 0 && t.tick(h), s = requestAnimationFrame(o);
6373
- }, a = () => {
6374
- s !== null || r || (n = null, s = requestAnimationFrame(o));
6375
6377
  }, c = () => {
6378
+ s !== null || r || (n = null, s = requestAnimationFrame(o));
6379
+ }, a = () => {
6376
6380
  s !== null && cancelAnimationFrame(s), s = null, n = null;
6377
6381
  };
6378
- return e.applyState(t.getStateAtTime(t.currentTime)), i.autoplay !== !1 && (t.play(), a()), {
6382
+ return e.applyState(t.getStateAtTime(t.currentTime)), i.autoplay !== !1 && (t.play(), c()), {
6379
6383
  timeline: t,
6380
6384
  adapter: e,
6381
6385
  play() {
6382
- t.play(), a();
6386
+ t.play(), c();
6383
6387
  },
6384
6388
  pause() {
6385
- t.pause(), c();
6389
+ t.pause(), a();
6386
6390
  },
6387
6391
  restart() {
6388
- t.stop(), t.play(), a();
6392
+ t.stop(), t.play(), c();
6389
6393
  },
6390
6394
  seek(l) {
6391
6395
  t.seek(l * 1e3), e.applyState(t.getStateAtTime(t.currentTime));
6392
6396
  },
6393
6397
  destroy() {
6394
- r = !0, c(), t.stop(), e.clearTargets();
6398
+ r = !0, a(), t.stop(), e.clearTargets();
6395
6399
  }
6396
6400
  };
6397
6401
  }