@algorisys/tinyfly 0.66.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.
@@ -46,7 +46,7 @@ function ee(n) {
46
46
  const e = /^([a-z]+\d?)(\(.*\))?$/.exec(t);
47
47
  return e && e[1] !== "steps" && t !== "none" && t !== "linear" && (t = `${e[1]}.out${e[2] ?? ""}`), t;
48
48
  }
49
- const pr = (n = 1, t = 0.3) => F({ type: "elastic", mode: "in", amplitude: n, period: t }), yr = (n = 1, t = 0.3) => F({ type: "elastic", mode: "in-out", amplitude: n, period: t }), gr = F({ type: "bounce", mode: "in" }), wr = F({ type: "bounce", mode: "in-out" }), br = (n) => F({ type: "steps", count: Math.max(1, Math.floor(n)) + 1, position: "none" });
49
+ const mr = (n = 1, t = 0.3) => F({ type: "elastic", mode: "in", amplitude: n, period: t }), yr = (n = 1, t = 0.3) => F({ type: "elastic", mode: "in-out", amplitude: n, period: t }), gr = F({ type: "bounce", mode: "in" }), wr = F({ type: "bounce", mode: "in-out" }), br = (n) => F({ type: "steps", count: Math.max(1, Math.floor(n)) + 1, position: "none" });
50
50
  function V(n) {
51
51
  const t = Et.get(n.trim().toLowerCase());
52
52
  if (t) return t;
@@ -117,8 +117,8 @@ function re(n = 1) {
117
117
  const d = a, y = (g) => d[(Math.round(g) % d.length + d.length) % d.length];
118
118
  return l === void 0 ? y : y(l);
119
119
  }
120
- const f = a, m = l - f, p = (d) => m === 0 ? f : ((d - f) % m + m) % m + f;
121
- return h === void 0 ? p : p(h);
120
+ const f = a, p = l - f, m = (d) => p === 0 ? f : ((d - f) % p + p) % p + f;
121
+ return h === void 0 ? m : m(h);
122
122
  }),
123
123
  wrapYoyo: e(3, (a, l, h) => {
124
124
  const f = l - a;
@@ -129,8 +129,8 @@ function re(n = 1) {
129
129
  snap: e(2, o),
130
130
  random: ((a, l, h, f) => {
131
131
  if (Array.isArray(a)) {
132
- const m = () => a[Math.floor(t() * a.length)];
133
- return l === !0 ? m : m();
132
+ const p = () => a[Math.floor(t() * a.length)];
133
+ return l === !0 ? p : p();
134
134
  }
135
135
  const u = () => s(a, l, h);
136
136
  return f ? u : u();
@@ -142,8 +142,8 @@ function re(n = 1) {
142
142
  }
143
143
  return a;
144
144
  },
145
- distribute: ({ base: a = 0, amount: l, each: h, from: f = "start", ease: u }) => (m, p, d) => {
146
- const y = d.length, b = qt(m, y, { ...l !== void 0 ? { amount: l } : { each: h ?? 1 }, from: f }), w = l !== void 0 ? l : (h ?? 1) * Bt(y, f), k = u && w > 0 ? u(b / w) * w : b;
145
+ distribute: ({ base: a = 0, amount: l, each: h, from: f = "start", ease: u }) => (p, m, d) => {
146
+ const y = d.length, b = qt(p, y, { ...l !== void 0 ? { amount: l } : { each: h ?? 1 }, from: f }), w = l !== void 0 ? l : (h ?? 1) * Bt(y, f), k = u && w > 0 ? u(b / w) * w : b;
147
147
  return a + k;
148
148
  },
149
149
  pipe: (...a) => (l) => a.reduce((h, f) => f(h), l),
@@ -155,10 +155,10 @@ function re(n = 1) {
155
155
  resolveRandomString: (a) => {
156
156
  const l = At.exec(a)?.[1] ?? "";
157
157
  if (l.startsWith("[")) {
158
- const p = l.slice(1, -1).split(",").map((d) => d.trim()).filter(Boolean).map((d) => Number.isFinite(Number(d)) ? Number(d) : d.replace(/^['"]|['"]$/g, ""));
159
- return p[Math.floor(t() * p.length)];
158
+ const m = l.slice(1, -1).split(",").map((d) => d.trim()).filter(Boolean).map((d) => Number.isFinite(Number(d)) ? Number(d) : d.replace(/^['"]|['"]$/g, ""));
159
+ return m[Math.floor(t() * m.length)];
160
160
  }
161
- const [h, f, u] = l.split(",").map((m) => Number.parseFloat(m));
161
+ const [h, f, u] = l.split(",").map((p) => Number.parseFloat(p));
162
162
  return s(h, f, Number.isFinite(u) ? u : void 0);
163
163
  }
164
164
  };
@@ -217,20 +217,20 @@ function se(n) {
217
217
  }
218
218
  function ae(n, t, e = {}) {
219
219
  if (n === 0) return [];
220
- const r = t.grid === "auto" ? Math.max(1, Math.min(n, e.columnsFromLayout?.() ?? n)) : Array.isArray(t.grid) ? Math.max(1, t.grid[1]) : n, i = Array.isArray(t.grid) ? Math.max(1, t.grid[0]) : Math.ceil(n / r), o = (p) => ({ x: p % r, y: Math.floor(p / r) }), s = t.from ?? "start", c = Array.isArray(s) ? { x: s[0] * (r - 1), y: s[1] * (i - 1) } : typeof s == "number" ? o(Math.max(0, Math.min(n - 1, s))) : s === "end" ? o(n - 1) : s === "center" || s === "edges" ? { x: (r - 1) / 2, y: (i - 1) / 2 } : { x: 0, y: 0 }, a = (p) => {
221
- const { x: d, y } = o(p), g = Math.abs(d - c.x), b = Math.abs(y - c.y);
220
+ const r = t.grid === "auto" ? Math.max(1, Math.min(n, e.columnsFromLayout?.() ?? n)) : Array.isArray(t.grid) ? Math.max(1, t.grid[1]) : n, i = Array.isArray(t.grid) ? Math.max(1, t.grid[0]) : Math.ceil(n / r), o = (m) => ({ x: m % r, y: Math.floor(m / r) }), s = t.from ?? "start", c = Array.isArray(s) ? { x: s[0] * (r - 1), y: s[1] * (i - 1) } : typeof s == "number" ? o(Math.max(0, Math.min(n - 1, s))) : s === "end" ? o(n - 1) : s === "center" || s === "edges" ? { x: (r - 1) / 2, y: (i - 1) / 2 } : { x: 0, y: 0 }, a = (m) => {
221
+ const { x: d, y } = o(m), g = Math.abs(d - c.x), b = Math.abs(y - c.y);
222
222
  return t.axis === "x" ? g : t.axis === "y" ? b : Math.hypot(g, b);
223
223
  };
224
- let l = Array.from({ length: n }, (p, d) => a(d));
224
+ let l = Array.from({ length: n }, (m, d) => a(d));
225
225
  const h = Math.max(...l);
226
- if (s === "edges" && (l = l.map((p) => h - p)), s === "random") {
227
- const p = e.random ?? Math.random;
228
- l = l.map(() => p() * h);
229
- }
230
- const f = t.amount !== void 0 ? t.amount : (t.each ?? 0) * h, u = t.ease ? V(t.ease) : void 0, m = u ? u.fn ?? F(u.easing) : void 0;
231
- return l.map((p) => {
232
- const d = h === 0 ? 0 : p / h;
233
- return (m ? m(d) : d) * f;
226
+ if (s === "edges" && (l = l.map((m) => h - m)), s === "random") {
227
+ const m = e.random ?? Math.random;
228
+ l = l.map(() => m() * h);
229
+ }
230
+ const f = t.amount !== void 0 ? t.amount : (t.each ?? 0) * h, u = t.ease ? V(t.ease) : void 0, p = u ? u.fn ?? F(u.easing) : void 0;
231
+ return l.map((m) => {
232
+ const d = h === 0 ? 0 : m / h;
233
+ return (p ? p(d) : d) * f;
234
234
  });
235
235
  }
236
236
  const nt = /* @__PURE__ */ new Set([
@@ -353,12 +353,12 @@ function de(n, t) {
353
353
  const [e, r] = fe(n, t);
354
354
  return { strokeDasharray: [r - e, t], strokeDashoffset: -e };
355
355
  }
356
- function me(n, t) {
356
+ function pe(n, t) {
357
357
  if (n.drawSVG === void 0) return n;
358
358
  const { drawSVG: e, ...r } = n;
359
359
  return { ...r, ...de(e, t) };
360
360
  }
361
- function pe(n) {
361
+ function me(n) {
362
362
  if (n.drawSVG !== void 0)
363
363
  throw new Error(
364
364
  "gsap-compat: drawSVG needs the stroke length from the page. Use live.to(), or animate strokeDasharray / strokeDashoffset directly (see drawSvgProperties)."
@@ -436,7 +436,7 @@ function ve(n, t) {
436
436
  const e = n.velocity;
437
437
  return typeof e == "number" ? e : e?.[t];
438
438
  }
439
- class $ {
439
+ class O {
440
440
  /** The engine timeline. Use it for anything the facade does not cover. */
441
441
  timeline;
442
442
  options;
@@ -471,11 +471,11 @@ class $ {
471
471
  /** Animate from the given values to where the property already is. */
472
472
  from(t, e, r) {
473
473
  const { config: i, properties: o } = B(N(e)), { motionPath: s, text: c, scrambleText: a, ...l } = o, h = this.targetsOf(t)[0], f = { ...i };
474
- for (const p of Object.keys(l))
475
- f[p] = this.resolveStart(h, p);
474
+ for (const m of Object.keys(l))
475
+ f[m] = this.resolveStart(h, m);
476
476
  s !== void 0 && (f.motionPath = he(s));
477
- const u = {}, m = String(this.resolveStart(h, "text"));
478
- return c !== void 0 && (u.text = G(c), f.text = typeof c == "object" ? { ...c, value: m } : m), a !== void 0 && (u.text = G(a), f.scrambleText = typeof a == "object" ? { ...a, text: m } : m), this.build(t, { ...l, ...u }, f, r);
477
+ const u = {}, p = String(this.resolveStart(h, "text"));
478
+ return c !== void 0 && (u.text = G(c), f.text = typeof c == "object" ? { ...c, value: p } : p), a !== void 0 && (u.text = G(a), f.scrambleText = typeof a == "object" ? { ...a, text: p } : p), this.build(t, { ...l, ...u }, f, r);
479
479
  }
480
480
  /** Animate between two explicit sets of values. */
481
481
  fromTo(t, e, r, i) {
@@ -600,22 +600,22 @@ class $ {
600
600
  * each property's start comes from the resolution chain.
601
601
  */
602
602
  build(t, e, r, i) {
603
- const { config: o, properties: s } = B(r), { motionPath: c, text: a, scrambleText: l, inertia: h, ...f } = s, u = this.targetsOf(t), m = I(i, this.context()), p = U(o.delay, 0), d = U(o.duration, 500), y = Z(o.stagger, {
603
+ const { config: o, properties: s } = B(r), { motionPath: c, text: a, scrambleText: l, inertia: h, ...f } = s, u = this.targetsOf(t), p = I(i, this.context()), m = U(o.delay, 0), d = U(o.duration, 500), y = Z(o.stagger, {
604
604
  count: u.length,
605
605
  columnsFromLayout: this.options.layoutColumns ? () => this.options.layoutColumns(u) : void 0,
606
606
  random: this.options.random ?? this.fallbackRandom
607
607
  }), g = this.easingFor(o.ease), b = [], w = o.spring;
608
608
  let k = 0, x = !1;
609
609
  for (const [T, R] of Object.entries(f)) {
610
- const E = R;
610
+ const M = R;
611
611
  let A = e?.[T] !== void 0 ? e[T] : this.resolveStart(u[0], T);
612
- if (typeof A != typeof E && (this.warn(
613
- `no usable start value for "${T}" on "${u[0]}" — it will snap to ${String(E)}. Use fromTo() to animate it.`
614
- ), A = E), w !== void 0 && typeof A == "number" && typeof E == "number") {
615
- const O = {
612
+ if (typeof A != typeof M && (this.warn(
613
+ `no usable start value for "${T}" on "${u[0]}" — it will snap to ${String(M)}. Use fromTo() to animate it.`
614
+ ), A = M), w !== void 0 && (typeof A != "number" || typeof M != "number") && this.warn(`spring works on numbers, so "${T}" on "${u[0]}" eases instead`), w !== void 0 && typeof A == "number" && typeof M == "number") {
615
+ const L = {
616
616
  ...be(w),
617
617
  from: A,
618
- to: E,
618
+ to: M,
619
619
  velocity: ve(w, T) ?? this.options.startVelocity?.(u[0], T) ?? 0
620
620
  }, st = this.nextTrackId(`${u[0]}-${T}-spring`), Vt = {
621
621
  id: st,
@@ -624,15 +624,15 @@ class $ {
624
624
  ...y && u.length > 1 && { stagger: y },
625
625
  property: T,
626
626
  kind: "spring",
627
- spring: O,
628
- delay: m + p
627
+ spring: L,
628
+ delay: p + m
629
629
  };
630
- this.timeline.addTrack(Vt), b.push(st), k = Math.max(k, zt(O));
631
- for (const jt of u) this.lastValues.set(`${jt}|${T}`, E);
630
+ this.timeline.addTrack(Vt), b.push(st), k = Math.max(k, zt(L));
631
+ for (const jt of u) this.lastValues.set(`${jt}|${T}`, M);
632
632
  continue;
633
633
  }
634
634
  x = !0;
635
- const D = this.keyframesFor(A, E, d, g, o.ease), j = this.nextTrackId(`${u[0]}-${T}`);
635
+ const D = this.keyframesFor(A, M, d, g, o.ease), j = this.nextTrackId(`${u[0]}-${T}`);
636
636
  this.timeline.addTrack(
637
637
  ct({
638
638
  id: j,
@@ -640,48 +640,48 @@ class $ {
640
640
  ...u.length > 1 && { targets: u },
641
641
  ...y && u.length > 1 && { stagger: y },
642
642
  property: T,
643
- delay: m + p,
643
+ delay: p + m,
644
644
  keyframes: D
645
645
  })
646
646
  ), b.push(j);
647
- for (const O of u) this.lastValues.set(`${O}|${T}`, E);
647
+ for (const L of u) this.lastValues.set(`${L}|${T}`, M);
648
648
  }
649
649
  const v = ge({ text: a, scrambleText: l }, u[0], d);
650
650
  if (v) {
651
- const T = e?.text ?? e?.scrambleText, R = T !== void 0 ? G(T) : this.resolveStart(u[0], "text"), E = this.nextTrackId(`${u[0]}-text`), A = {
652
- id: E,
651
+ const T = e?.text ?? e?.scrambleText, R = T !== void 0 ? G(T) : this.resolveStart(u[0], "text"), M = this.nextTrackId(`${u[0]}-text`), A = {
652
+ id: M,
653
653
  target: u[0],
654
654
  ...u.length > 1 && { targets: u },
655
655
  ...y && u.length > 1 && { stagger: y },
656
656
  property: "text",
657
657
  textConfig: { from: typeof R == "string" ? R : String(R ?? ""), ...v },
658
- delay: m + p,
658
+ delay: p + m,
659
659
  keyframes: this.keyframesFor(0, 1, d, g, o.ease)
660
660
  };
661
- this.timeline.addTrack(A), b.push(E);
661
+ this.timeline.addTrack(A), b.push(M);
662
662
  for (const D of u) this.lastValues.set(`${D}|text`, v.to);
663
663
  }
664
664
  if (c !== void 0) {
665
- const { config: T, start: R, end: E } = le(c), A = this.nextTrackId(`${u[0]}-motionPath`), D = {
665
+ const { config: T, start: R, end: M } = le(c), A = this.nextTrackId(`${u[0]}-motionPath`), D = {
666
666
  id: A,
667
667
  target: u[0],
668
668
  ...u.length > 1 && { targets: u },
669
669
  ...y && u.length > 1 && { stagger: y },
670
670
  property: "motionPath",
671
671
  motionPathConfig: T,
672
- delay: m + p,
673
- keyframes: this.keyframesFor(R, E, d, g, o.ease)
672
+ delay: p + m,
673
+ keyframes: this.keyframesFor(R, M, d, g, o.ease)
674
674
  };
675
675
  this.timeline.addTrack(D), b.push(A);
676
676
  }
677
677
  if (h !== void 0)
678
678
  for (const [T, R] of Object.entries(h)) {
679
- const E = this.resolveStart(u[0], T);
680
- if (typeof E != "number") {
679
+ const M = this.resolveStart(u[0], T);
680
+ if (typeof M != "number") {
681
681
  this.warn(`inertia on "${T}" needs a numeric start value; skipped`);
682
682
  continue;
683
683
  }
684
- const A = we(E, R), D = this.nextTrackId(`${u[0]}-${T}-inertia`), j = {
684
+ const A = we(M, R), D = this.nextTrackId(`${u[0]}-${T}-inertia`), j = {
685
685
  id: D,
686
686
  target: u[0],
687
687
  ...u.length > 1 && { targets: u },
@@ -689,16 +689,16 @@ class $ {
689
689
  property: T,
690
690
  kind: "inertia",
691
691
  inertia: A,
692
- delay: m + p
692
+ delay: p + m
693
693
  };
694
694
  this.timeline.addTrack(j), b.push(D), k = Math.max(k, _t(A));
695
- for (const O of u) this.lastValues.set(`${O}|${T}`, Gt(A));
695
+ for (const L of u) this.lastValues.set(`${L}|${T}`, Gt(A));
696
696
  }
697
- const L = ((h !== void 0 || w !== void 0) && !x && !v && c === void 0 ? k : Math.max(d, k)) + (y && u.length > 1 ? Yt(u.length, y) : 0), M = m + p + L;
698
- return this.previousStart = m + p, this.previousEnd = M, this.cursor = Math.max(this.cursor, M), {
697
+ const $ = ((h !== void 0 || w !== void 0) && !x && !v && c === void 0 ? k : Math.max(d, k)) + (y && u.length > 1 ? Yt(u.length, y) : 0), E = p + m + $;
698
+ return this.previousStart = p + m, this.previousEnd = E, this.cursor = Math.max(this.cursor, E), {
699
699
  trackIds: b,
700
- start: m + p,
701
- end: M,
700
+ start: p + m,
701
+ end: E,
702
702
  kill: () => {
703
703
  for (const T of b) this.timeline.removeTrack(T);
704
704
  }
@@ -775,10 +775,10 @@ function G(n) {
775
775
  return String(n ?? "");
776
776
  }
777
777
  function ke(n) {
778
- return new $(n);
778
+ return new O(n);
779
779
  }
780
780
  function N(n) {
781
- return pe(ue(n));
781
+ return me(ue(n));
782
782
  }
783
783
  function kr(n) {
784
784
  const { timeline: t } = n, e = new St();
@@ -827,7 +827,7 @@ function Dt(n) {
827
827
  for (const e of Array.from(n.attributes)) t[e.name] = e.value;
828
828
  return t;
829
829
  }
830
- function Lt(n) {
830
+ function $t(n) {
831
831
  if (!n) return null;
832
832
  const t = et({ tag: n.localName, attributes: Dt(n) });
833
833
  return t || (n.querySelector("path")?.getAttribute("d") ?? null);
@@ -835,7 +835,7 @@ function Lt(n) {
835
835
  function Te(n, t, e) {
836
836
  const r = Ft(n);
837
837
  if (typeof r == "string" && z(r)) return r;
838
- const i = Pt(r) ? r : typeof r == "string" ? t(r) : null, o = Lt(i);
838
+ const i = Pt(r) ? r : typeof r == "string" ? t(r) : null, o = $t(i);
839
839
  return o || (e(`gsap-compat: morphSVG could not find a shape for "${String(r)}"`), "");
840
840
  }
841
841
  const xe = /* @__PURE__ */ new Set(["cx", "cy", "r", "rx", "ry", "x", "y", "width", "height", "x1", "y1", "x2", "y2", "points"]);
@@ -881,7 +881,7 @@ function Me(n, t = {}) {
881
881
  for (const v of x) d.masks.push(Fe(v, `${r[t.mask]}-mask`));
882
882
  }
883
883
  s = d;
884
- }, m = {
884
+ }, p = {
885
885
  elements: n,
886
886
  get chars() {
887
887
  return s.chars;
@@ -896,21 +896,21 @@ function Me(n, t = {}) {
896
896
  return s.masks;
897
897
  },
898
898
  split() {
899
- l || (f(), h(), u(), c = t.onSplit?.(m));
899
+ l || (f(), h(), u(), c = t.onSplit?.(p));
900
900
  },
901
901
  revert() {
902
902
  l = !0, a?.disconnect(), f(), h();
903
903
  }
904
904
  };
905
- u(), c = t.onSplit?.(m), t.autoSplit && p();
906
- function p() {
905
+ u(), c = t.onSplit?.(p), t.autoSplit && m();
906
+ function m() {
907
907
  const d = /* @__PURE__ */ new Map();
908
908
  let y = !1;
909
909
  const g = () => {
910
910
  if (y) return;
911
911
  y = !0;
912
912
  const w = () => {
913
- y = !1, m.split();
913
+ y = !1, p.split();
914
914
  };
915
915
  typeof requestAnimationFrame == "function" ? requestAnimationFrame(w) : setTimeout(w, 0);
916
916
  };
@@ -928,7 +928,7 @@ function Me(n, t = {}) {
928
928
  const b = n[0]?.ownerDocument?.fonts;
929
929
  b && b.status !== "loaded" && b.ready.then(() => g());
930
930
  }
931
- return m;
931
+ return p;
932
932
  }
933
933
  function Ee(n, t) {
934
934
  const e = n.ownerDocument, r = [], i = e.createTreeWalker(
@@ -965,25 +965,25 @@ function Ce(n) {
965
965
  return t ? Array.from(new t(void 0, { granularity: "grapheme" }).segment(n), (e) => e.segment) : Array.from(n);
966
966
  }
967
967
  function Re(n, t, e) {
968
- const r = n.ownerDocument, i = new Map(t.map((p) => [p, p.getBoundingClientRect()])), o = [], s = (p) => {
969
- for (const d of Array.from(p.childNodes))
968
+ const r = n.ownerDocument, i = new Map(t.map((m) => [m, m.getBoundingClientRect()])), o = [], s = (m) => {
969
+ for (const d of Array.from(m.childNodes))
970
970
  d.nodeType === 3 || i.has(d) || d.tagName === "BR" ? o.push(d) : s(d);
971
971
  };
972
972
  s(n);
973
973
  const c = [];
974
974
  let a = null, l = 0, h = 0, f = !1, u = [];
975
- const m = () => {
975
+ const p = () => {
976
976
  a = r.createElement("span"), a.className = e, a.style.display = "block", c.push(a), u = [];
977
977
  };
978
- for (const p of o) {
979
- if (p.tagName === "BR") {
978
+ for (const m of o) {
979
+ if (m.tagName === "BR") {
980
980
  f = !0;
981
981
  continue;
982
982
  }
983
- const d = i.get(p);
984
- if (d && (!a || f || d.top > l + h) && (m(), l = d.top, h = d.height / 2, f = !1), !a) continue;
983
+ const d = i.get(m);
984
+ if (d && (!a || f || d.top > l + h) && (p(), l = d.top, h = d.height / 2, f = !1), !a) continue;
985
985
  const y = [];
986
- for (let w = p.parentNode; w && w !== n; w = w.parentNode) y.unshift(w);
986
+ for (let w = m.parentNode; w && w !== n; w = w.parentNode) y.unshift(w);
987
987
  let g = 0;
988
988
  for (; g < u.length && g < y.length && u[g].original === y[g]; ) g++;
989
989
  u.length = g;
@@ -992,7 +992,7 @@ function Re(n, t, e) {
992
992
  const k = w.cloneNode(!1);
993
993
  b.appendChild(k), u.push({ original: w, clone: k }), b = k;
994
994
  }
995
- b.appendChild(p);
995
+ b.appendChild(m);
996
996
  }
997
997
  return n.replaceChildren(...c), c;
998
998
  }
@@ -1031,16 +1031,16 @@ function Pe(n, t) {
1031
1031
  }
1032
1032
  function it(n, t, e, r, i = () => {
1033
1033
  }) {
1034
- const o = (m) => typeof m == "string" ? n.query(m) ?? void 0 : m, s = o(t.trigger) ?? r;
1034
+ const o = (p) => typeof p == "string" ? n.query(p) ?? void 0 : p, s = o(t.trigger) ?? r;
1035
1035
  if (!s) {
1036
1036
  i(`gsap-compat: scrollTrigger has no trigger element${typeof t.trigger == "string" ? ` for "${t.trigger}"` : ""}`);
1037
1037
  return;
1038
1038
  }
1039
1039
  const c = t.scrub === void 0 || t.scrub === !1 ? !1 : t.scrub, a = (t.toggleActions ?? "play none none none").trim().split(/\s+/);
1040
1040
  let l = 0, h;
1041
- const f = (m, p) => () => {
1042
- p?.(), e && !c && Pe(e, a[m] ?? "none"), t.once && m === 0 && queueMicrotask(() => h.destroy());
1043
- }, u = t.containerAnimation ? Oe(n, t.containerAnimation, s, i) : void 0;
1041
+ const f = (p, m) => () => {
1042
+ m?.(), e && !c && Pe(e, a[p] ?? "none"), t.once && p === 0 && queueMicrotask(() => h.destroy());
1043
+ }, u = t.containerAnimation ? Le(n, t.containerAnimation, s, i) : void 0;
1044
1044
  return h = new Mt({
1045
1045
  trigger: s,
1046
1046
  start: t.start,
@@ -1054,12 +1054,12 @@ function it(n, t, e, r, i = () => {
1054
1054
  snap: t.snap === void 0 ? void 0 : De(t.snap, e),
1055
1055
  markers: t.markers,
1056
1056
  container: u,
1057
- onUpdate: (m, p) => {
1058
- if (e && c !== !1 && e.progress(m), t.onUpdate) {
1059
- const d = m < l || p < 0 ? -1 : 1;
1060
- t.onUpdate({ progress: m, velocity: p, direction: d });
1057
+ onUpdate: (p, m) => {
1058
+ if (e && c !== !1 && e.progress(p), t.onUpdate) {
1059
+ const d = p < l || m < 0 ? -1 : 1;
1060
+ t.onUpdate({ progress: p, velocity: m, direction: d });
1061
1061
  }
1062
- l = m;
1062
+ l = p;
1063
1063
  },
1064
1064
  onEnter: f(0, t.onEnter),
1065
1065
  onLeave: f(1, t.onLeave),
@@ -1068,7 +1068,7 @@ function it(n, t, e, r, i = () => {
1068
1068
  }), e && c === !1 && e.progress(0), h.start(), n.own(h);
1069
1069
  }
1070
1070
  function De(n, t) {
1071
- const e = (i) => i === "labels" ? (o) => Le(o, t?.labelProgresses?.() ?? []) : i;
1071
+ const e = (i) => i === "labels" ? (o) => $e(o, t?.labelProgresses?.() ?? []) : i;
1072
1072
  if (typeof n != "object" || Array.isArray(n)) return e(n);
1073
1073
  const r = n.ease ? V(n.ease) : void 0;
1074
1074
  return {
@@ -1078,10 +1078,10 @@ function De(n, t) {
1078
1078
  ease: r ? r.fn ?? F(r.easing) : void 0
1079
1079
  };
1080
1080
  }
1081
- function Le(n, t) {
1081
+ function $e(n, t) {
1082
1082
  return t.reduce((e, r) => Math.abs(r - n) < Math.abs(e - n) ? r : e, t[0] ?? n);
1083
1083
  }
1084
- function Oe(n, t, e, r) {
1084
+ function Le(n, t, e, r) {
1085
1085
  const i = () => t.timeline.getTracks({ property: "x" }).map((o) => o.target).filter((o) => {
1086
1086
  const s = n.elementFor(o);
1087
1087
  return !!s && s !== e && s.contains(e);
@@ -1103,7 +1103,7 @@ function Oe(n, t, e, r) {
1103
1103
  }
1104
1104
  };
1105
1105
  }
1106
- class Ot {
1106
+ class Lt {
1107
1107
  /** For contexts made by matchMedia: which named queries match */
1108
1108
  conditions = {};
1109
1109
  scope;
@@ -1146,7 +1146,7 @@ class Ot {
1146
1146
  this.revert();
1147
1147
  }
1148
1148
  }
1149
- class $e {
1149
+ class Oe {
1150
1150
  host;
1151
1151
  scope;
1152
1152
  entries = [];
@@ -1186,7 +1186,7 @@ class $e {
1186
1186
  for (const [s, c] of t.queries) e[s] = c.matches;
1187
1187
  const r = Object.values(e).some(Boolean), i = r ? JSON.stringify(e) : void 0;
1188
1188
  if (i === t.key || (t.context?.revert(), t.context = void 0, t.key = i, !r)) return;
1189
- const o = new Ot(this.host, this.scope);
1189
+ const o = new Lt(this.host, this.scope);
1190
1190
  o.conditions = e, o.add(() => t.setup(o)), t.context = o;
1191
1191
  }
1192
1192
  }
@@ -1283,7 +1283,7 @@ function W(n) {
1283
1283
  return t.transform = e, r;
1284
1284
  }
1285
1285
  const qe = { x: "x", y: "y", "x,y": "both" }, J = (n) => typeof n == "object" && n !== null && n.nodeType === 1;
1286
- function mt(n, t) {
1286
+ function pt(n, t) {
1287
1287
  const e = W(n), r = t.getBoundingClientRect();
1288
1288
  return {
1289
1289
  minX: r.left - e.left,
@@ -1292,7 +1292,7 @@ function mt(n, t) {
1292
1292
  maxY: r.bottom - e.bottom
1293
1293
  };
1294
1294
  }
1295
- function pt(n) {
1295
+ function mt(n) {
1296
1296
  return Array.isArray(n) ? [...n] : n;
1297
1297
  }
1298
1298
  function Be(n, t, e, r = {}) {
@@ -1303,24 +1303,24 @@ function Be(n, t, e, r = {}) {
1303
1303
  const s = qe[r.type ?? "x,y"], c = () => {
1304
1304
  const d = t.appliedValue(i, "x"), y = t.appliedValue(i, "y");
1305
1305
  return { x: typeof d == "number" ? d : 0, y: typeof y == "number" ? y : 0 };
1306
- }, a = typeof r.bounds == "string" ? t.query(r.bounds) : J(r.bounds) ? r.bounds : null, h = { bounds: (!a && r.bounds && !J(r.bounds) ? r.bounds : void 0) ?? (a ? mt(o, a) : void 0) };
1306
+ }, a = typeof r.bounds == "string" ? t.query(r.bounds) : J(r.bounds) ? r.bounds : null, h = { bounds: (!a && r.bounds && !J(r.bounds) ? r.bounds : void 0) ?? (a ? pt(o, a) : void 0) };
1307
1307
  let f = null;
1308
1308
  const u = () => {
1309
1309
  f?.kill(), f = null;
1310
- }, m = (d) => {
1310
+ }, p = (d) => {
1311
1311
  const y = r.inertia === !0 ? {} : r.inertia, g = y.friction ?? (y.resistance !== void 0 ? ot(y.resistance) : 4), b = c(), w = h.bounds ?? {};
1312
1312
  let k, x;
1313
1313
  const v = y.end;
1314
1314
  if (Array.isArray(v)) {
1315
- const C = H({ from: b.x, velocity: s === "y" ? 0 : d.x, friction: g }), L = H({ from: b.y, velocity: s === "x" ? 0 : d.y, friction: g });
1316
- let M = v[0];
1315
+ const C = H({ from: b.x, velocity: s === "y" ? 0 : d.x, friction: g }), $ = H({ from: b.y, velocity: s === "x" ? 0 : d.y, friction: g });
1316
+ let E = v[0];
1317
1317
  for (const T of v)
1318
- Math.hypot(T.x - C, T.y - L) < Math.hypot(M.x - C, M.y - L) && (M = T);
1319
- M && (k = [M.x], x = [M.y]);
1320
- } else typeof v == "number" ? (k = v, x = v) : v && (k = pt(v.x), x = pt(v.y));
1318
+ Math.hypot(T.x - C, T.y - $) < Math.hypot(E.x - C, E.y - $) && (E = T);
1319
+ E && (k = [E.x], x = [E.y]);
1320
+ } else typeof v == "number" ? (k = v, x = v) : v && (k = mt(v.x), x = mt(v.y));
1321
1321
  const S = {};
1322
1322
  s !== "y" && (S.x = { velocity: d.x, friction: g, min: w.minX, max: w.maxX, end: k }), s !== "x" && (S.y = { velocity: d.y, friction: g, min: w.minY, max: w.maxY, end: x }), f = n.to(o, { inertia: S, onComplete: () => r.onThrowComplete?.() });
1323
- }, p = new te({
1323
+ }, m = new te({
1324
1324
  target: o,
1325
1325
  axis: s,
1326
1326
  snap: r.snap,
@@ -1329,18 +1329,18 @@ function Be(n, t, e, r = {}) {
1329
1329
  },
1330
1330
  getPosition: c,
1331
1331
  onPress: () => {
1332
- u(), a && (h.bounds = mt(o, a)), r.onPress?.();
1332
+ u(), a && (h.bounds = pt(o, a)), r.onPress?.();
1333
1333
  },
1334
1334
  onDrag: (d) => {
1335
1335
  t.apply(i, s === "x" ? { x: d.x } : s === "y" ? { y: d.y } : { x: d.x, y: d.y }), r.onDrag?.(d);
1336
1336
  },
1337
1337
  onRelease: () => {
1338
- const d = p.velocity;
1339
- r.onRelease?.(d), r.inertia && m(d);
1338
+ const d = m.velocity;
1339
+ r.onRelease?.(d), r.inertia && p(d);
1340
1340
  }
1341
1341
  });
1342
- return p.start(), {
1343
- draggable: p,
1342
+ return m.start(), {
1343
+ draggable: m,
1344
1344
  get position() {
1345
1345
  return c();
1346
1346
  },
@@ -1349,7 +1349,7 @@ function Be(n, t, e, r = {}) {
1349
1349
  return typeof d == "number" ? d : 0;
1350
1350
  },
1351
1351
  destroy() {
1352
- u(), p.destroy();
1352
+ u(), m.destroy();
1353
1353
  }
1354
1354
  };
1355
1355
  }
@@ -1358,37 +1358,37 @@ function Ue(n, t, e, r, i) {
1358
1358
  const w = t.appliedValue(e, "rotate");
1359
1359
  return typeof w == "number" ? w : 0;
1360
1360
  }, c = (w) => Math.min(o.maxRotation ?? 1 / 0, Math.max(o.minRotation ?? -1 / 0, w));
1361
- let a = null, l = !1, h, f = { x: 0, y: 0 }, u = 0, m = 0, p = [];
1361
+ let a = null, l = !1, h, f = { x: 0, y: 0 }, u = 0, p = 0, m = [];
1362
1362
  const d = (w) => Math.atan2(w.clientY - f.y, w.clientX - f.x) * 180 / Math.PI, y = (w) => {
1363
1363
  if (l) return;
1364
1364
  a?.kill(), a = null, l = !0, h = w.pointerId, r.setPointerCapture?.(w.pointerId);
1365
1365
  const k = r.getBoundingClientRect();
1366
- f = { x: k.left + k.width / 2, y: k.top + k.height / 2 }, u = d(w), m = s(), p = [{ time: performance.now(), rotation: m }], i.onPress?.();
1366
+ f = { x: k.left + k.width / 2, y: k.top + k.height / 2 }, u = d(w), p = s(), m = [{ time: performance.now(), rotation: p }], i.onPress?.();
1367
1367
  }, g = (w) => {
1368
1368
  if (!l || w.pointerId !== h) return;
1369
1369
  const k = d(w);
1370
1370
  let x = k - u;
1371
- x > 180 && (x -= 360), x < -180 && (x += 360), u = k, m += x;
1372
- let v = c(m);
1371
+ x > 180 && (x -= 360), x < -180 && (x += 360), u = k, p += x;
1372
+ let v = c(p);
1373
1373
  i.snap && (v = c(Math.round(v / i.snap) * i.snap)), t.apply(e, { rotate: v });
1374
1374
  const S = performance.now();
1375
- for (p.push({ time: S, rotation: v }); p.length > 2 && S - p[0].time > 100; ) p.shift();
1375
+ for (m.push({ time: S, rotation: v }); m.length > 2 && S - m[0].time > 100; ) m.shift();
1376
1376
  const C = { x: 0, y: 0 };
1377
1377
  i.onDrag?.(C);
1378
1378
  }, b = (w) => {
1379
1379
  if (!l || w.pointerId !== h) return;
1380
1380
  l = !1;
1381
- const k = p[0], x = p[p.length - 1], v = k && x ? (x.time - k.time) / 1e3 : 0, S = v > 0 ? (x.rotation - k.rotation) / v : 0;
1381
+ const k = m[0], x = m[m.length - 1], v = k && x ? (x.time - k.time) / 1e3 : 0, S = v > 0 ? (x.rotation - k.rotation) / v : 0;
1382
1382
  if (i.onRelease?.({ x: S, y: 0 }), !i.inertia) return;
1383
- const C = i.inertia === !0 ? {} : i.inertia, L = C.friction ?? (C.resistance !== void 0 ? ot(C.resistance) : 4), M = typeof C.end == "number" || Array.isArray(C.end) ? C.end : void 0;
1383
+ const C = i.inertia === !0 ? {} : i.inertia, $ = C.friction ?? (C.resistance !== void 0 ? ot(C.resistance) : 4), E = typeof C.end == "number" || Array.isArray(C.end) ? C.end : void 0;
1384
1384
  a = n.to(r, {
1385
1385
  inertia: {
1386
1386
  rotate: {
1387
1387
  velocity: S,
1388
- friction: L,
1388
+ friction: $,
1389
1389
  min: o.minRotation,
1390
1390
  max: o.maxRotation,
1391
- end: Array.isArray(M) ? M.filter((T) => typeof T == "number") : M
1391
+ end: Array.isArray(E) ? E.filter((T) => typeof T == "number") : E
1392
1392
  }
1393
1393
  },
1394
1394
  onComplete: () => i.onThrowComplete?.()
@@ -1419,7 +1419,7 @@ function Q(n, t) {
1419
1419
  for (const s of r) {
1420
1420
  const c = ze(s);
1421
1421
  i.set(s, c);
1422
- const a = $t(s);
1422
+ const a = Ot(s);
1423
1423
  c && a !== void 0 && !o.has(a) && o.set(a, { element: s, box: c });
1424
1424
  }
1425
1425
  return { elements: r, boxes: i, ids: o };
@@ -1428,48 +1428,48 @@ const Y = /* @__PURE__ */ new WeakMap();
1428
1428
  function tt(n, t, e, r = {}) {
1429
1429
  const i = r.duration ?? 0.6, o = r.ease ?? "power2.inOut", s = r.stagger ?? 0, c = r.scale !== !1, a = r.enter === void 0 ? We : r.enter, l = new Set(e.elements);
1430
1430
  if (r.targets !== void 0)
1431
- for (const m of n.resolveTargets(r.targets)) {
1432
- const p = n.elementFor(m);
1433
- p && l.add(p);
1431
+ for (const p of n.resolveTargets(r.targets)) {
1432
+ const m = n.elementFor(p);
1433
+ m && l.add(m);
1434
1434
  }
1435
1435
  const h = [...l].sort(
1436
- (m, p) => m === p ? 0 : m.compareDocumentPosition(p) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1
1436
+ (p, m) => p === m ? 0 : p.compareDocumentPosition(m) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1
1437
1437
  ), f = t({ onComplete: r.onComplete });
1438
1438
  let u = 0;
1439
- for (const m of h) {
1440
- const p = yt(m);
1441
- if (!p) continue;
1442
- let d = e.boxes.get(m) ?? null, y;
1443
- const g = $t(m), b = !d && g !== void 0 ? e.ids.get(g) : void 0;
1444
- b && b.element !== m && (d = b.box, y = b.element);
1445
- const [w] = n.resolveTargets(m);
1446
- Y.get(m)?.timeline.removeTracks({ target: w });
1439
+ for (const p of h) {
1440
+ const m = yt(p);
1441
+ if (!m) continue;
1442
+ let d = e.boxes.get(p) ?? null, y;
1443
+ const g = Ot(p), b = !d && g !== void 0 ? e.ids.get(g) : void 0;
1444
+ b && b.element !== p && (d = b.box, y = b.element);
1445
+ const [w] = n.resolveTargets(p);
1446
+ Y.get(p)?.timeline.removeTracks({ target: w });
1447
1447
  const k = u * s;
1448
1448
  if (!d) {
1449
1449
  if (a === !1) continue;
1450
- f.fromTo(m, { x: 0, y: 0, scaleX: 1, scaleY: 1, ...a }, { ...It(a), x: 0, y: 0, scaleX: 1, scaleY: 1, duration: i, ease: o, delay: k }, 0), Y.set(m, f), u++;
1450
+ f.fromTo(p, { x: 0, y: 0, scaleX: 1, scaleY: 1, ...a }, { ...It(a), x: 0, y: 0, scaleX: 1, scaleY: 1, duration: i, ease: o, delay: k }, 0), Y.set(p, f), u++;
1451
1451
  continue;
1452
1452
  }
1453
- const x = d.cx - p.cx, v = d.cy - p.cy, S = c ? d.width / p.width : 1, C = c ? d.height / p.height : 1;
1453
+ const x = d.cx - m.cx, v = d.cy - m.cy, S = c ? d.width / m.width : 1, C = c ? d.height / m.height : 1;
1454
1454
  if (!(Math.abs(x) > 0.5 || Math.abs(v) > 0.5 || Math.abs(S - 1) > 1e-3 || Math.abs(C - 1) > 1e-3)) {
1455
- const T = (R, E) => {
1455
+ const T = (R, M) => {
1456
1456
  const A = n.appliedValue(w, R);
1457
- return typeof A == "number" && Math.abs(A - E) > 1e-6;
1457
+ return typeof A == "number" && Math.abs(A - M) > 1e-6;
1458
1458
  };
1459
- (T("x", 0) || T("y", 0) || T("scaleX", 1) || T("scaleY", 1)) && f.set(m, { x: 0, y: 0, scaleX: 1, scaleY: 1 }, 0);
1459
+ (T("x", 0) || T("y", 0) || T("scaleX", 1) || T("scaleY", 1)) && f.set(p, { x: 0, y: 0, scaleX: 1, scaleY: 1 }, 0);
1460
1460
  continue;
1461
1461
  }
1462
- const M = r.fade === !0 && y !== void 0;
1462
+ const E = r.fade === !0 && y !== void 0;
1463
1463
  f.fromTo(
1464
- m,
1465
- { x, y: v, scaleX: S, scaleY: C, ...M && { opacity: 0 } },
1466
- { x: 0, y: 0, scaleX: 1, scaleY: 1, ...M && { opacity: 1 }, duration: i, ease: o, delay: k },
1464
+ p,
1465
+ { x, y: v, scaleX: S, scaleY: C, ...E && { opacity: 0 } },
1466
+ { x: 0, y: 0, scaleX: 1, scaleY: 1, ...E && { opacity: 1 }, duration: i, ease: o, delay: k },
1467
1467
  0
1468
- ), M && y && yt(y) && f.fromTo(y, { opacity: 1 }, { opacity: 0, duration: i, ease: o, delay: k }, 0), Y.set(m, f), u++;
1468
+ ), E && y && yt(y) && f.fromTo(y, { opacity: 1 }, { opacity: 0, duration: i, ease: o, delay: k }, 0), Y.set(p, f), u++;
1469
1469
  }
1470
1470
  return f;
1471
1471
  }
1472
- function $t(n) {
1472
+ function Ot(n) {
1473
1473
  return n.dataset?.flipId;
1474
1474
  }
1475
1475
  function It(n) {
@@ -1510,7 +1510,7 @@ function Ye(n, t) {
1510
1510
  return r === !0 && t.warn("gsap-compat: motionPath align: true needs the path to be an element"), h;
1511
1511
  const u = t.targets[0];
1512
1512
  if (!u) return h;
1513
- const [m, p, d, y, g, b] = Ge(f), w = W(u), [k, x] = i ?? [0.5, 0.5];
1513
+ const [p, m, d, y, g, b] = Ge(f), w = W(u), [k, x] = i ?? [0.5, 0.5];
1514
1514
  for (const v of t.targets.slice(1)) {
1515
1515
  const S = W(v);
1516
1516
  if (Math.abs(S.left - w.left) > 0.5 || Math.abs(S.top - w.top) > 0.5) {
@@ -1518,7 +1518,7 @@ function Ye(n, t) {
1518
1518
  break;
1519
1519
  }
1520
1520
  }
1521
- return h.matrix = [m, p, d, y, g - w.left - k * w.width, b - w.top - x * w.height], h;
1521
+ return h.matrix = [p, m, d, y, g - w.left - k * w.width, b - w.top - x * w.height], h;
1522
1522
  }
1523
1523
  const Xe = /* @__PURE__ */ new Set([
1524
1524
  "keyframes",
@@ -1554,11 +1554,11 @@ function Ze(n) {
1554
1554
  }));
1555
1555
  const r = Object.entries(t), i = n.duration ?? wt, o = t.easeEach ?? n.easeEach ?? He;
1556
1556
  if (r.length > 0 && r.every(([l]) => /^\s*-?\d+(\.\d+)?\s*%\s*$/.test(l) || l === "easeEach")) {
1557
- const l = r.filter(([u]) => u !== "easeEach").map(([u, m]) => ({ at: Number.parseFloat(u) / 100, step: m })).sort((u, m) => u.at - m.at), h = [];
1557
+ const l = r.filter(([u]) => u !== "easeEach").map(([u, p]) => ({ at: Number.parseFloat(u) / 100, step: p })).sort((u, p) => u.at - p.at), h = [];
1558
1558
  let f = 0;
1559
- for (const { at: u, step: m } of l) {
1560
- const p = Math.max(0, u - f);
1561
- h.push({ ...e, ease: o, ...m, duration: p * i }), f = u;
1559
+ for (const { at: u, step: p } of l) {
1560
+ const m = Math.max(0, u - f);
1561
+ h.push({ ...e, ease: o, ...p, duration: m * i }), f = u;
1562
1562
  }
1563
1563
  return h;
1564
1564
  }
@@ -1588,10 +1588,10 @@ function bt(n, t, e, r = {}) {
1588
1588
  return b === "x" ? x.left - (v?.left ?? 0) + s.x - S : x.top - (v?.top ?? 0) + s.y - S;
1589
1589
  }, l = typeof e == "object" && e !== null && !("nodeType" in e) ? { x: a("x", e.x), y: a("y", e.y) } : { x: s.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 = { ...s }, u = () => {
1590
1590
  o ? (o.scrollLeft = f.x, o.scrollTop = f.y) : window.scrollTo({ left: f.x, top: f.y, behavior: "instant" });
1591
- }, m = ["wheel", "touchstart", "keydown"], p = o ?? window, d = () => {
1591
+ }, p = ["wheel", "touchstart", "keydown"], m = o ?? window, d = () => {
1592
1592
  g.kill(), y();
1593
1593
  }, y = () => {
1594
- for (const b of m) p.removeEventListener(b, d);
1594
+ for (const b of p) m.removeEventListener(b, d);
1595
1595
  }, g = n.to(f, {
1596
1596
  x: h.x,
1597
1597
  y: h.y,
@@ -1605,18 +1605,18 @@ function bt(n, t, e, r = {}) {
1605
1605
  y(), r.onComplete?.();
1606
1606
  }
1607
1607
  });
1608
- if (r.autoKill !== !1) for (const b of m) p.addEventListener(b, d, { passive: !0 });
1608
+ if (r.autoKill !== !1) for (const b of p) m.addEventListener(b, d, { passive: !0 });
1609
1609
  return g;
1610
1610
  }
1611
1611
  function Je(n, t, e) {
1612
- const r = n.collector?.scope ?? n.root, i = typeof t == "string" ? [...r.querySelectorAll(t)] : "nodeType" in t ? [t] : Array.from(t), { interval: o = 0.1, batchMax: s, onEnter: c, onLeave: a, onEnterBack: l, onLeaveBack: h, ...f } = e, u = { onEnter: c, onLeave: a, onEnterBack: l, onLeaveBack: h }, m = { onEnter: [], onLeave: [], onEnterBack: [], onLeaveBack: [] }, p = {}, d = (g) => {
1613
- p[g] !== void 0 && clearTimeout(p[g]), p[g] = void 0;
1614
- const b = m[g].splice(0);
1612
+ const r = n.collector?.scope ?? n.root, i = typeof t == "string" ? [...r.querySelectorAll(t)] : "nodeType" in t ? [t] : Array.from(t), { interval: o = 0.1, batchMax: s, onEnter: c, onLeave: a, onEnterBack: l, onLeaveBack: h, ...f } = e, u = { onEnter: c, onLeave: a, onEnterBack: l, onLeaveBack: h }, p = { onEnter: [], onLeave: [], onEnterBack: [], onLeaveBack: [] }, m = {}, d = (g) => {
1613
+ m[g] !== void 0 && clearTimeout(m[g]), m[g] = void 0;
1614
+ const b = p[g].splice(0);
1615
1615
  b.length > 0 && u[g]?.(b);
1616
1616
  }, y = (g, b) => {
1617
1617
  if (u[g]) {
1618
- if (m[g].push(b), s !== void 0 && m[g].length >= s) return d(g);
1619
- p[g] === void 0 && (p[g] = setTimeout(() => d(g), o * 1e3));
1618
+ if (p[g].push(b), s !== void 0 && p[g].length >= s) return d(g);
1619
+ m[g] === void 0 && (m[g] = setTimeout(() => d(g), o * 1e3));
1620
1620
  }
1621
1621
  };
1622
1622
  return i.map(
@@ -1638,6 +1638,8 @@ class tr {
1638
1638
  adapter = new St();
1639
1639
  scheduler;
1640
1640
  rootOption;
1641
+ /** Where live timelines on this stage report warnings, unless they have their own `onWarning` */
1642
+ onWarning;
1641
1643
  /** Element → engine target name. The engine only ever sees names. */
1642
1644
  names = /* @__PURE__ */ new WeakMap();
1643
1645
  elements = /* @__PURE__ */ new Map();
@@ -1668,7 +1670,7 @@ class tr {
1668
1670
  lastTimestamp = null;
1669
1671
  destroyed = !1;
1670
1672
  constructor(t = {}) {
1671
- this.scheduler = t.scheduler ?? Qe, this.rootOption = t.root;
1673
+ this.scheduler = t.scheduler ?? Qe, this.rootOption = t.root, this.onWarning = t.onWarning;
1672
1674
  }
1673
1675
  // --- targets ------------------------------------------------------------
1674
1676
  /**
@@ -1915,14 +1917,14 @@ async function or(n, t, e, r) {
1915
1917
  await l((g) => n.to(u, { ...y, duration: c, ease: a, onComplete: g }));
1916
1918
  }
1917
1919
  await r.update();
1918
- const m = [], p = typeof r.to == "function" ? r.to() : r.to, d = p !== void 0 ? vt(t, p, r.shared) : [];
1920
+ const p = [], m = typeof r.to == "function" ? r.to() : r.to, d = m !== void 0 ? vt(t, m, r.shared) : [];
1919
1921
  if (d.length && r.enter !== !1) {
1920
1922
  const y = r.enter ?? nr;
1921
- m.push(l((g) => n.fromTo(d, y, { ...It(y), duration: c, ease: a, onComplete: g })));
1923
+ p.push(l((g) => n.fromTo(d, y, { ...It(y), duration: c, ease: a, onComplete: g })));
1922
1924
  }
1923
1925
  if (f) {
1924
1926
  const y = s().filter((g) => !h.includes(g));
1925
- y.length && m.push(
1927
+ y.length && p.push(
1926
1928
  l(
1927
1929
  (g) => tt(t, e, f, {
1928
1930
  targets: y,
@@ -1934,7 +1936,7 @@ async function or(n, t, e, r) {
1934
1936
  )
1935
1937
  );
1936
1938
  }
1937
- await Promise.all(m);
1939
+ await Promise.all(p);
1938
1940
  }
1939
1941
  function vt(n, t, e) {
1940
1942
  const r = n.resolveTargets(t).map((i) => n.elementFor(i)).filter((i) => !!i);
@@ -1977,29 +1979,31 @@ class P {
1977
1979
  /** Set by `reverse()`: arriving at the start is a reverse completion */
1978
1980
  backwards = !1;
1979
1981
  constructor(t, e = {}) {
1980
- if (this.stage = t, this.options = e, this.compat = new $({
1981
- ...e,
1982
- startValue: (r, i) => {
1983
- const o = t.objectFor(r);
1984
- if (o) return lr(o[i]);
1985
- const s = t.appliedValue(r, i);
1986
- if (s !== void 0) return s;
1987
- if (i === "d") return Lt(t.elementFor(r)) ?? void 0;
1988
- if (i === "text") return t.elementFor(r)?.textContent ?? void 0;
1989
- if (i === "strokeDasharray" || i === "strokeDashoffset") {
1990
- const c = xt(t.elementFor(r));
1991
- if (c !== void 0) return i === "strokeDasharray" ? [c, c] : 0;
1982
+ this.stage = t;
1983
+ const r = { ...e, onWarning: e.onWarning ?? t.onWarning };
1984
+ if (this.options = r, this.compat = new O({
1985
+ ...r,
1986
+ startValue: (i, o) => {
1987
+ const s = t.objectFor(i);
1988
+ if (s) return lr(s[o]);
1989
+ const c = t.appliedValue(i, o);
1990
+ if (c !== void 0) return c;
1991
+ if (o === "d") return $t(t.elementFor(i)) ?? void 0;
1992
+ if (o === "text") return t.elementFor(i)?.textContent ?? void 0;
1993
+ if (o === "strokeDasharray" || o === "strokeDashoffset") {
1994
+ const a = xt(t.elementFor(i));
1995
+ if (a !== void 0) return o === "strokeDasharray" ? [a, a] : 0;
1992
1996
  }
1993
1997
  },
1994
- startVelocity: (r, i) => t.velocityOf(r, i),
1995
- layoutColumns: (r) => Tt(r.map((i) => t.elementFor(i))),
1998
+ startVelocity: (i, o) => t.velocityOf(i, o),
1999
+ layoutColumns: (i) => Tt(i.map((o) => t.elementFor(o))),
1996
2000
  random: () => t.utils.random(0, 1)
1997
2001
  }), this.compat.timeline.onComplete = () => {
1998
2002
  this.finishedThisFrame = !0;
1999
- }, t.collector?.track(this), t.liveTimelines.add(this), this.autoplayPending = !e.paused && !e.scrollTrigger, e.scrollTrigger) {
2000
- const r = e.scrollTrigger;
2003
+ }, t.collector?.track(this), t.liveTimelines.add(this), this.autoplayPending = !r.paused && !r.scrollTrigger, r.scrollTrigger) {
2004
+ const i = r.scrollTrigger;
2001
2005
  queueMicrotask(() => {
2002
- this.killed || (this.scrollDriver = it(t, r, this, this.firstElement, (i) => e.onWarning?.(i)));
2006
+ this.killed || (this.scrollDriver = it(t, i, this, this.firstElement, (o) => r.onWarning?.(o)));
2003
2007
  });
2004
2008
  }
2005
2009
  this.autoplayPending && queueMicrotask(() => {
@@ -2256,8 +2260,8 @@ class P {
2256
2260
  const { onStart: s, onUpdate: c, onComplete: a } = e[e.length - 1];
2257
2261
  if (s || c || a) {
2258
2262
  let l = 1 / 0, h = -1 / 0;
2259
- const f = (u, m, p) => {
2260
- i(u, m, p), l = Math.min(l, this.compat.lastStart), h = Math.max(h, this.compat.lastEnd);
2263
+ const f = (u, p, m) => {
2264
+ i(u, p, m), l = Math.min(l, this.compat.lastStart), h = Math.max(h, this.compat.lastEnd);
2261
2265
  };
2262
2266
  if (this.buildTween(o, e, r, f), l === 1 / 0) return;
2263
2267
  s && this.events.push({ time: l, direction: "forward", run: s }), c && this.ranges.push({ start: l, end: h, run: c }), a && this.events.push({ time: h, direction: "forward", run: a });
@@ -2283,8 +2287,8 @@ class P {
2283
2287
  this.tween(y, [b], k, ([x], v, S) => this.compat.to(v, x, S)), f = Math.min(f, this.compat.lastStart), u = Math.max(u, this.compat.lastEnd);
2284
2288
  });
2285
2289
  }), f === 1 / 0) return;
2286
- const { onStart: m, onUpdate: p, onComplete: d } = e;
2287
- m && this.events.push({ time: f, direction: "forward", run: m }), p && this.ranges.push({ start: f, end: u, run: p }), d && this.events.push({ time: u, direction: "forward", run: d });
2290
+ const { onStart: p, onUpdate: m, onComplete: d } = e;
2291
+ p && this.events.push({ time: f, direction: "forward", run: p }), m && this.ranges.push({ start: f, end: u, run: m }), d && this.events.push({ time: u, direction: "forward", run: d });
2288
2292
  }
2289
2293
  staggerContext(t) {
2290
2294
  return {
@@ -2297,12 +2301,12 @@ class P {
2297
2301
  const o = t.map((u) => this.targetFor(u));
2298
2302
  if (!(t.length > 1 && (e.some(cr) || t.some((u) => this.stage.objectFor(u) !== void 0)))) {
2299
2303
  const u = this.targetFor(t[0]);
2300
- i(e.map((m) => this.prepare(kt(m, 0, u, this.stage.utils, o), t)), t, r);
2304
+ i(e.map((p) => this.prepare(kt(p, 0, u, this.stage.utils, o), t)), t, r);
2301
2305
  return;
2302
2306
  }
2303
2307
  const c = e.length - 1, { stagger: a, ...l } = e[c], h = Z(a, this.staggerContext(t)), f = h ? lt(t.length, h).map((u) => u / 1e3) : t.map(() => 0);
2304
- t.forEach((u, m) => {
2305
- const p = m === 0 ? U(l.delay, 0) / 1e3 + f[0] : 0, d = m === 0 ? 0 : f[m] - f[m - 1], y = m === 0 ? r : `<${d < 0 ? "-" : "+"}${Math.abs(d).toFixed(6)}`, b = e.map((w, k) => k === c ? { ...l, delay: p } : w).map((w) => this.prepare(kt(w, m, this.targetFor(u), this.stage.utils, o), [u]));
2308
+ t.forEach((u, p) => {
2309
+ const m = p === 0 ? U(l.delay, 0) / 1e3 + f[0] : 0, d = p === 0 ? 0 : f[p] - f[p - 1], y = p === 0 ? r : `<${d < 0 ? "-" : "+"}${Math.abs(d).toFixed(6)}`, b = e.map((w, k) => k === c ? { ...l, delay: m } : w).map((w) => this.prepare(kt(w, p, this.targetFor(u), this.stage.utils, o), [u]));
2306
2310
  i(b, [u], y);
2307
2311
  });
2308
2312
  }
@@ -2336,7 +2340,7 @@ class P {
2336
2340
  const { drawSVG: c, ...a } = o;
2337
2341
  o = a;
2338
2342
  } else
2339
- o = me(o, s);
2343
+ o = pe(o, s);
2340
2344
  }
2341
2345
  return o;
2342
2346
  }
@@ -2389,10 +2393,10 @@ function sr(n = new tr()) {
2389
2393
  return r(new ht({ ...o, scroller: s }).start());
2390
2394
  },
2391
2395
  context: (o, s) => {
2392
- const c = new Ot(n, s);
2396
+ const c = new Lt(n, s);
2393
2397
  return o && c.add(() => o(c)), c;
2394
2398
  },
2395
- matchMedia: (o) => new $e(n, o),
2399
+ matchMedia: (o) => new Oe(n, o),
2396
2400
  customEase: Ne.create,
2397
2401
  customBounce: Ve.create,
2398
2402
  customWiggle: je.create,
@@ -2493,30 +2497,30 @@ function hr(n) {
2493
2497
  const xr = {
2494
2498
  timeline: ke,
2495
2499
  to(n, t, e) {
2496
- const r = new $(e);
2500
+ const r = new O(e);
2497
2501
  return r.to(n, t), r;
2498
2502
  },
2499
2503
  from(n, t, e) {
2500
- const r = new $(e);
2504
+ const r = new O(e);
2501
2505
  return r.from(n, t), r;
2502
2506
  },
2503
2507
  fromTo(n, t, e, r) {
2504
- const i = new $(r);
2508
+ const i = new O(r);
2505
2509
  return i.fromTo(n, t, e), i;
2506
2510
  },
2507
2511
  set(n, t, e) {
2508
- const r = new $(e);
2512
+ const r = new O(e);
2509
2513
  return r.set(n, t), r;
2510
2514
  }
2511
2515
  };
2512
2516
  export {
2513
- $ as CompatTimeline,
2517
+ O as CompatTimeline,
2514
2518
  Ve as CustomBounce,
2515
2519
  Ne as CustomEase,
2516
2520
  je as CustomWiggle,
2517
2521
  Ie as ImageSequence,
2518
- Ot as LiveContext,
2519
- $e as LiveMatchMedia,
2522
+ Lt as LiveContext,
2523
+ Oe as LiveMatchMedia,
2520
2524
  P as LiveTimeline,
2521
2525
  ce as PROPERTY_DEFAULTS,
2522
2526
  nt as RESERVED_KEYS,
@@ -2538,7 +2542,7 @@ export {
2538
2542
  fe as drawSegment,
2539
2543
  de as drawSvgProperties,
2540
2544
  vr as easeRequiresBaking,
2541
- pr as elasticIn,
2545
+ mr as elasticIn,
2542
2546
  yr as elasticInOut,
2543
2547
  Cr as elasticOut,
2544
2548
  Ze as expandKeyframes,
@@ -2550,13 +2554,13 @@ export {
2550
2554
  V as mapEase,
2551
2555
  Ft as morphShapeOf,
2552
2556
  ee as normaliseEaseName,
2553
- Lt as pathDataOf,
2557
+ $t as pathDataOf,
2554
2558
  Rr as playheadCrossings,
2555
2559
  kr as quickPlay,
2556
2560
  rt as registerEase,
2557
- pe as rejectUnresolvedDrawSvg,
2561
+ me as rejectUnresolvedDrawSvg,
2558
2562
  ot as resistanceToFriction,
2559
- me as resolveDrawSvg,
2563
+ pe as resolveDrawSvg,
2560
2564
  Ye as resolveLiveMotionPath,
2561
2565
  I as resolvePosition,
2562
2566
  he as reverseMotionPath,