fansunited-widgets-cdn 0.0.86-RC8 → 0.0.87

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.
Files changed (60) hide show
  1. package/chunks/{Alert-B6o66mYo.js → Alert-9mNu8Mc0.js} +32 -32
  2. package/chunks/{CardContent-NCZhfGcZ.js → CardContent-DscfzeuS.js} +19 -18
  3. package/chunks/{ChevronRight-1pLZ7T0v.js → ChevronRight-Dp3uUQ9e.js} +11 -11
  4. package/chunks/{ClassicQuizWrapper-n2epPO4k.js → ClassicQuizWrapper-DKnk6Jbn.js} +8 -9
  5. package/chunks/{CollectLeadForm-C_3plJtn-Dr8J3eDw.js → CollectLeadForm-iZpBeMTk-agYOzLhF.js} +2 -2
  6. package/chunks/{CollectLeadWrapper-CCtTZAxL.js → CollectLeadWrapper-YFzUEmx9.js} +22 -23
  7. package/chunks/{EitherOrById-ClGwMK0b.js → EitherOrById-D-JHgdbL.js} +65 -65
  8. package/chunks/{EitherOrPreviewWrapper-BYiKyYwi.js → EitherOrPreviewWrapper-CeWnhkez.js} +10 -10
  9. package/chunks/{Error-BurPfBJw-DWYn31sK.js → Error-DRnLP9GC-DyNgW_L4.js} +3 -3
  10. package/chunks/{EventGameWrapper-BphusLTk.js → EventGameWrapper-yRtBxO_C.js} +3490 -3117
  11. package/chunks/{Grid-yjqNNhEx.js → Grid-DSE12r_N.js} +37 -37
  12. package/chunks/{IconButton-D7onwgY0.js → IconButton-CzQWRgrG.js} +21 -21
  13. package/chunks/{List-8Vy9IZiv.js → List-D1p_as40.js} +23 -23
  14. package/chunks/{MatchPredictionContainer-BGytBwLo.js → MatchPredictionContainer-CVjsgllW.js} +7 -7
  15. package/chunks/{MatchQuizWrapper-BGjldBpF.js → MatchQuizWrapper-CbD5M2Wo.js} +1197 -1190
  16. package/chunks/{OverlayLeadAfterCollection-Bjh1xAB5-DgVOuSX5.js → OverlayLeadAfterCollection-Uxf4kZ42-txLJVNOw.js} +6 -6
  17. package/chunks/{OverlayScoreStateSkeleton-Cha5KeNi-fyZTu-l5.js → OverlayScoreStateSkeleton-DD-LpNq6-CDGvi7Rx.js} +8 -8
  18. package/chunks/{PersonalityQuizWrapper-BgLFw5tM.js → PersonalityQuizWrapper-Dq7ucwct.js} +1359 -1318
  19. package/chunks/{PlayerOfTheMatch-CImBLG3T.js → PlayerOfTheMatch-N6lR4Yvg.js} +96 -96
  20. package/chunks/{PollWrapper-QpIKCCVF.js → PollWrapper-BztqlT7j.js} +8 -9
  21. package/chunks/{Portal-DegkUXpU-ByGP9zS1.js → Portal-Cvhw2F3y-CU1eTfkD.js} +313 -314
  22. package/chunks/{PreviewQuizById-Ba6yhxKV.js → PreviewQuizById-Bs5Y67aA.js} +1019 -996
  23. package/chunks/{Sheet-U5EnSrgg.js → Sheet-B9TtakEd.js} +35 -35
  24. package/chunks/{Stack-DbDi7kPO.js → Stack-hikS_o6M.js} +36 -36
  25. package/chunks/{Tabs-leN3Fb8D--YMyy3EM.js → Tabs-DmfafFAr-BiYbbqHP.js} +2 -2
  26. package/chunks/{TeamNextMatchPrediction-9VSQOCcC.js → TeamNextMatchPrediction-BoQ6Xxut.js} +2 -2
  27. package/chunks/{Tutorial-CRJLOovs.js → Tutorial-BnKZMnrU.js} +72 -73
  28. package/chunks/{createLucideIcon-CMWOQsDL.js → createLucideIcon-CAUCKclr.js} +8 -8
  29. package/chunks/{createSvgIcon-D9D4a1R9.js → createSvgIcon-DqH6kyRk.js} +167 -167
  30. package/chunks/{default-quiz-bg-ADjjIfPj.js → default-quiz-bg-D-_bYiBa.js} +15 -14
  31. package/chunks/{index-CiB_Gqim.js → index-BDSM3ZSY.js} +1 -1
  32. package/chunks/{index-B74jHeYm.js → index-BL-6bYjr.js} +2 -2
  33. package/chunks/{index-BfVvJg5R.js → index-BNwb-Lvr.js} +1 -1
  34. package/chunks/{index-CPTAlr_t.js → index-BRE9HGrj.js} +1 -1
  35. package/chunks/{index-CviTG4Nv.js → index-BjEfmr8T.js} +1 -1
  36. package/chunks/{index-DUQ2LFod-Cw45tHim.js → index-Bwmh7c-g-BHgL_SSg.js} +334 -291
  37. package/chunks/{index-C6KAc5B_.js → index-C1Ys-PBz.js} +1 -1
  38. package/chunks/{index-BycLbIYY.js → index-CNUarcba.js} +1 -1
  39. package/chunks/{index-CILd3yUc.js → index-CRneQWSC.js} +1 -1
  40. package/chunks/{index-DwR4J2nN.js → index-CigP9xnu.js} +1 -1
  41. package/chunks/{index-UwW9niUj.js → index-D2gHUkPX.js} +1 -1
  42. package/chunks/{index-Da0AXb_O.js → index-D5BAtJb9.js} +1 -1
  43. package/chunks/{index-CHV6tlpH.js → index-D_UY6ZuF.js} +9 -9
  44. package/chunks/{index-CK2RXrJm.js → index-DpF1i8sE.js} +1 -1
  45. package/chunks/{index-CvGJXa6l.js → index-qrrSqrdU.js} +1 -1
  46. package/chunks/{index-0ADq_9jd.js → index-wUUFLR8N.js} +1 -1
  47. package/chunks/{init-C-gCorsh.js → init-BR2mi8sg.js} +1 -1
  48. package/chunks/main-uhXEX2Kp.js +51049 -0
  49. package/chunks/resolveProps-BA473GCc.js +1632 -0
  50. package/chunks/{users-CXdzg3DM.js → users-D1F95dG3.js} +1 -1
  51. package/fu-widgets-loader.es.js +16 -17
  52. package/fu-widgets-loader.js +1 -1
  53. package/fu-widgets.es.js +2 -2
  54. package/fu-widgets.iife.js +296 -296
  55. package/manifest.json +52 -54
  56. package/package.json +1 -1
  57. package/chunks/index-CJqcqbHq.js +0 -5
  58. package/chunks/index.es-wHqA4PHm.js +0 -11480
  59. package/chunks/main-Bh6iw92_.js +0 -39827
  60. package/chunks/resolveProps-Bgg0H6c2.js +0 -1016
@@ -1,32 +1,55 @@
1
- import { r as P, j as A, u as oo, B as Nt, a as ro, b as ao } from "./main-Bh6iw92_.js";
2
- import { u as lo } from "./index-CHV6tlpH.js";
3
- import { d as uo, A as co } from "./default-quiz-bg-ADjjIfPj.js";
4
- import { S as Bt } from "./Stack-DbDi7kPO.js";
5
- import { c as Le, C as ho } from "./createLucideIcon-CMWOQsDL.js";
6
- import { T as vt, B as fo, C as mo } from "./resolveProps-Bgg0H6c2.js";
7
- import { U as po } from "./users-CXdzg3DM.js";
8
- const Ms = P.createContext({});
9
- function go(t) {
1
+ import { j as A, r as P, u as rr, a as or } from "./main-uhXEX2Kp.js";
2
+ import { B as St, C as ar, T as vt, a as lr, b as ur } from "./resolveProps-BA473GCc.js";
3
+ import { u as cr } from "./index-D_UY6ZuF.js";
4
+ import { d as hr, A as fr } from "./default-quiz-bg-D-_bYiBa.js";
5
+ import { S as kt } from "./Stack-hikS_o6M.js";
6
+ import { c as Le, C as dr } from "./createLucideIcon-CAUCKclr.js";
7
+ import { U as mr } from "./users-D1F95dG3.js";
8
+ const pr = () => /* @__PURE__ */ A.jsx(
9
+ St,
10
+ {
11
+ sx: {
12
+ display: "flex",
13
+ minHeight: "300px",
14
+ width: "100%",
15
+ alignItems: "center",
16
+ justifyContent: "center",
17
+ bgcolor: "background.body"
18
+ },
19
+ children: /* @__PURE__ */ A.jsx(
20
+ ar,
21
+ {
22
+ size: "lg",
23
+ variant: "soft",
24
+ sx: {
25
+ "--CircularProgress-progressColor": "var(--joy-palette-primary-500)",
26
+ "--CircularProgress-trackColor": "var(--joy-palette-primary-100)"
27
+ }
28
+ }
29
+ )
30
+ }
31
+ ), Ms = P.createContext({});
32
+ function gr(t) {
10
33
  const e = P.useRef(null);
11
34
  return e.current === null && (e.current = t()), e.current;
12
35
  }
13
- const Fe = P.createContext(null), Rs = P.createContext({
36
+ const je = P.createContext(null), Rs = P.createContext({
14
37
  transformPagePoint: (t) => t,
15
38
  isStatic: !1,
16
39
  reducedMotion: "never"
17
40
  });
18
- function yo(t = !0) {
19
- const e = P.useContext(Fe);
41
+ function yr(t = !0) {
42
+ const e = P.useContext(je);
20
43
  if (e === null)
21
44
  return [!0, null];
22
- const { isPresent: n, onExitComplete: s, register: i } = e, r = P.useId();
45
+ const { isPresent: n, onExitComplete: s, register: i } = e, o = P.useId();
23
46
  P.useEffect(() => {
24
- t && i(r);
47
+ t && i(o);
25
48
  }, [t]);
26
- const o = P.useCallback(() => t && s && s(r), [r, s, t]);
27
- return !n && s ? [!1, o] : [!0];
49
+ const r = P.useCallback(() => t && s && s(o), [o, s, t]);
50
+ return !n && s ? [!1, r] : [!0];
28
51
  }
29
- const je = typeof window < "u", vo = je ? P.useLayoutEffect : P.useEffect, I = /* @__NO_SIDE_EFFECTS__ */ (t) => t;
52
+ const Fe = typeof window < "u", vr = Fe ? P.useLayoutEffect : P.useEffect, I = /* @__NO_SIDE_EFFECTS__ */ (t) => t;
30
53
  let Es = I;
31
54
  // @__NO_SIDE_EFFECTS__
32
55
  function Be(t) {
@@ -36,19 +59,19 @@ function Be(t) {
36
59
  const ft = /* @__NO_SIDE_EFFECTS__ */ (t, e, n) => {
37
60
  const s = e - t;
38
61
  return s === 0 ? 1 : (n - t) / s;
39
- }, G = /* @__NO_SIDE_EFFECTS__ */ (t) => t * 1e3, H = /* @__NO_SIDE_EFFECTS__ */ (t) => t / 1e3, xo = {
62
+ }, G = /* @__NO_SIDE_EFFECTS__ */ (t) => t * 1e3, H = /* @__NO_SIDE_EFFECTS__ */ (t) => t / 1e3, xr = {
40
63
  useManualTiming: !1
41
64
  };
42
- function To(t) {
65
+ function Tr(t) {
43
66
  let e = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), s = !1, i = !1;
44
- const r = /* @__PURE__ */ new WeakSet();
45
- let o = {
67
+ const o = /* @__PURE__ */ new WeakSet();
68
+ let r = {
46
69
  delta: 0,
47
70
  timestamp: 0,
48
71
  isProcessing: !1
49
72
  };
50
73
  function a(u) {
51
- r.has(u) && (l.schedule(u), t()), u(o);
74
+ o.has(u) && (l.schedule(u), t()), u(r);
52
75
  }
53
76
  const l = {
54
77
  /**
@@ -56,19 +79,19 @@ function To(t) {
56
79
  */
57
80
  schedule: (u, c = !1, h = !1) => {
58
81
  const d = h && s ? e : n;
59
- return c && r.add(u), d.has(u) || d.add(u), u;
82
+ return c && o.add(u), d.has(u) || d.add(u), u;
60
83
  },
61
84
  /**
62
85
  * Cancel the provided callback from running on the next frame.
63
86
  */
64
87
  cancel: (u) => {
65
- n.delete(u), r.delete(u);
88
+ n.delete(u), o.delete(u);
66
89
  },
67
90
  /**
68
91
  * Execute all schedule callbacks.
69
92
  */
70
93
  process: (u) => {
71
- if (o = u, s) {
94
+ if (r = u, s) {
72
95
  i = !0;
73
96
  return;
74
97
  }
@@ -77,7 +100,7 @@ function To(t) {
77
100
  };
78
101
  return l;
79
102
  }
80
- const kt = [
103
+ const It = [
81
104
  "read",
82
105
  // Read
83
106
  "resolveKeyframes",
@@ -90,28 +113,28 @@ const kt = [
90
113
  // Write
91
114
  "postRender"
92
115
  // Compute
93
- ], Po = 40;
116
+ ], Pr = 40;
94
117
  function Ls(t, e) {
95
118
  let n = !1, s = !0;
96
119
  const i = {
97
120
  delta: 0,
98
121
  timestamp: 0,
99
122
  isProcessing: !1
100
- }, r = () => n = !0, o = kt.reduce((g, v) => (g[v] = To(r), g), {}), { read: a, resolveKeyframes: l, update: u, preRender: c, render: h, postRender: f } = o, d = () => {
123
+ }, o = () => n = !0, r = It.reduce((g, v) => (g[v] = Tr(o), g), {}), { read: a, resolveKeyframes: l, update: u, preRender: c, render: h, postRender: f } = r, d = () => {
101
124
  const g = performance.now();
102
- n = !1, i.delta = s ? 1e3 / 60 : Math.max(Math.min(g - i.timestamp, Po), 1), i.timestamp = g, i.isProcessing = !0, a.process(i), l.process(i), u.process(i), c.process(i), h.process(i), f.process(i), i.isProcessing = !1, n && e && (s = !1, t(d));
125
+ n = !1, i.delta = s ? 1e3 / 60 : Math.max(Math.min(g - i.timestamp, Pr), 1), i.timestamp = g, i.isProcessing = !0, a.process(i), l.process(i), u.process(i), c.process(i), h.process(i), f.process(i), i.isProcessing = !1, n && e && (s = !1, t(d));
103
126
  }, m = () => {
104
127
  n = !0, s = !0, i.isProcessing || t(d);
105
128
  };
106
- return { schedule: kt.reduce((g, v) => {
107
- const T = o[v];
129
+ return { schedule: It.reduce((g, v) => {
130
+ const T = r[v];
108
131
  return g[v] = (w, S = !1, V = !1) => (n || m(), T.schedule(w, S, V)), g;
109
132
  }, {}), cancel: (g) => {
110
- for (let v = 0; v < kt.length; v++)
111
- o[kt[v]].cancel(g);
112
- }, state: i, steps: o };
133
+ for (let v = 0; v < It.length; v++)
134
+ r[It[v]].cancel(g);
135
+ }, state: i, steps: r };
113
136
  }
114
- const { schedule: C, cancel: Y, state: L, steps: se } = Ls(typeof requestAnimationFrame < "u" ? requestAnimationFrame : I, !0), Fs = P.createContext({ strict: !1 }), mn = {
137
+ const { schedule: C, cancel: Y, state: L, steps: se } = Ls(typeof requestAnimationFrame < "u" ? requestAnimationFrame : I, !0), js = P.createContext({ strict: !1 }), mn = {
115
138
  animation: [
116
139
  "animate",
117
140
  "variants",
@@ -135,14 +158,14 @@ for (const t in mn)
135
158
  dt[t] = {
136
159
  isEnabled: (e) => mn[t].some((n) => !!e[n])
137
160
  };
138
- function So(t) {
161
+ function Sr(t) {
139
162
  for (const e in t)
140
163
  dt[e] = {
141
164
  ...dt[e],
142
165
  ...t[e]
143
166
  };
144
167
  }
145
- const bo = /* @__PURE__ */ new Set([
168
+ const br = /* @__PURE__ */ new Set([
146
169
  "animate",
147
170
  "exit",
148
171
  "variants",
@@ -175,24 +198,24 @@ const bo = /* @__PURE__ */ new Set([
175
198
  "viewport"
176
199
  ]);
177
200
  function zt(t) {
178
- return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") || bo.has(t);
201
+ return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") || br.has(t);
179
202
  }
180
- let js = (t) => !zt(t);
181
- function Ao(t) {
182
- t && (js = (e) => e.startsWith("on") ? !zt(e) : t(e));
203
+ let Fs = (t) => !zt(t);
204
+ function Ar(t) {
205
+ t && (Fs = (e) => e.startsWith("on") ? !zt(e) : t(e));
183
206
  }
184
207
  try {
185
- Ao(require("@emotion/is-prop-valid").default);
208
+ Ar(require("@emotion/is-prop-valid").default);
186
209
  } catch {
187
210
  }
188
- function wo(t, e, n) {
211
+ function wr(t, e, n) {
189
212
  const s = {};
190
213
  for (const i in t)
191
- i === "values" && typeof t.values == "object" || (js(i) || n === !0 && zt(i) || !e && !zt(i) || // If trying to use native HTML drag events, forward drag listeners
214
+ i === "values" && typeof t.values == "object" || (Fs(i) || n === !0 && zt(i) || !e && !zt(i) || // If trying to use native HTML drag events, forward drag listeners
192
215
  t.draggable && i.startsWith("onDrag")) && (s[i] = t[i]);
193
216
  return s;
194
217
  }
195
- function Vo(t) {
218
+ function Vr(t) {
196
219
  if (typeof Proxy > "u")
197
220
  return t;
198
221
  const e = /* @__PURE__ */ new Map(), n = (...s) => t(...s);
@@ -206,7 +229,7 @@ function Vo(t) {
206
229
  });
207
230
  }
208
231
  const Yt = P.createContext({});
209
- function Vt(t) {
232
+ function Ct(t) {
210
233
  return typeof t == "string" || Array.isArray(t);
211
234
  }
212
235
  function Zt(t) {
@@ -222,33 +245,33 @@ const ke = [
222
245
  "exit"
223
246
  ], Ie = ["initial", ...ke];
224
247
  function Qt(t) {
225
- return Zt(t.animate) || Ie.some((e) => Vt(t[e]));
248
+ return Zt(t.animate) || Ie.some((e) => Ct(t[e]));
226
249
  }
227
250
  function Bs(t) {
228
251
  return !!(Qt(t) || t.variants);
229
252
  }
230
- function Co(t, e) {
253
+ function Cr(t, e) {
231
254
  if (Qt(t)) {
232
255
  const { initial: n, animate: s } = t;
233
256
  return {
234
- initial: n === !1 || Vt(n) ? n : void 0,
235
- animate: Vt(s) ? s : void 0
257
+ initial: n === !1 || Ct(n) ? n : void 0,
258
+ animate: Ct(s) ? s : void 0
236
259
  };
237
260
  }
238
261
  return t.inherit !== !1 ? e : {};
239
262
  }
240
- function Do(t) {
241
- const { initial: e, animate: n } = Co(t, P.useContext(Yt));
263
+ function Dr(t) {
264
+ const { initial: e, animate: n } = Cr(t, P.useContext(Yt));
242
265
  return P.useMemo(() => ({ initial: e, animate: n }), [pn(e), pn(n)]);
243
266
  }
244
267
  function pn(t) {
245
268
  return Array.isArray(t) ? t.join(" ") : t;
246
269
  }
247
- const Mo = Symbol.for("motionComponentSymbol");
270
+ const Mr = Symbol.for("motionComponentSymbol");
248
271
  function at(t) {
249
272
  return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current");
250
273
  }
251
- function Ro(t, e, n) {
274
+ function Rr(t, e, n) {
252
275
  return P.useCallback(
253
276
  (s) => {
254
277
  s && t.onMount && t.onMount(s), e && (s ? e.mount(s) : e.unmount()), n && (typeof n == "function" ? n(s) : at(n) && (n.current = s));
@@ -261,10 +284,10 @@ function Ro(t, e, n) {
261
284
  [e]
262
285
  );
263
286
  }
264
- const Oe = (t) => t.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), Eo = "framerAppearId", ks = "data-" + Oe(Eo), { schedule: Ne } = Ls(queueMicrotask, !1), Is = P.createContext({});
265
- function Lo(t, e, n, s, i) {
266
- var r, o;
267
- const { visualElement: a } = P.useContext(Yt), l = P.useContext(Fs), u = P.useContext(Fe), c = P.useContext(Rs).reducedMotion, h = P.useRef(null);
287
+ const Oe = (t) => t.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), Er = "framerAppearId", ks = "data-" + Oe(Er), { schedule: Ne } = Ls(queueMicrotask, !1), Is = P.createContext({});
288
+ function Lr(t, e, n, s, i) {
289
+ var o, r;
290
+ const { visualElement: a } = P.useContext(Yt), l = P.useContext(js), u = P.useContext(je), c = P.useContext(Rs).reducedMotion, h = P.useRef(null);
268
291
  s = s || l.renderer, !h.current && s && (h.current = s(t, {
269
292
  visualState: e,
270
293
  parent: a,
@@ -274,13 +297,13 @@ function Lo(t, e, n, s, i) {
274
297
  reducedMotionConfig: c
275
298
  }));
276
299
  const f = h.current, d = P.useContext(Is);
277
- f && !f.projection && i && (f.type === "html" || f.type === "svg") && Fo(h.current, n, i, d);
300
+ f && !f.projection && i && (f.type === "html" || f.type === "svg") && jr(h.current, n, i, d);
278
301
  const m = P.useRef(!1);
279
302
  P.useInsertionEffect(() => {
280
303
  f && m.current && f.update(n, u);
281
304
  });
282
- const p = n[ks], y = P.useRef(!!p && !(!((r = window.MotionHandoffIsComplete) === null || r === void 0) && r.call(window, p)) && ((o = window.MotionHasOptimisedAnimation) === null || o === void 0 ? void 0 : o.call(window, p)));
283
- return vo(() => {
305
+ const p = n[ks], y = P.useRef(!!p && !(!((o = window.MotionHandoffIsComplete) === null || o === void 0) && o.call(window, p)) && ((r = window.MotionHasOptimisedAnimation) === null || r === void 0 ? void 0 : r.call(window, p)));
306
+ return vr(() => {
284
307
  f && (m.current = !0, window.MotionIsMounted = !0, f.updateFeatures(), Ne.render(f.render), y.current && f.animationState && f.animationState.animateChanges());
285
308
  }), P.useEffect(() => {
286
309
  f && (!y.current && f.animationState && f.animationState.animateChanges(), y.current && (queueMicrotask(() => {
@@ -289,12 +312,12 @@ function Lo(t, e, n, s, i) {
289
312
  }), y.current = !1));
290
313
  }), f;
291
314
  }
292
- function Fo(t, e, n, s) {
293
- const { layoutId: i, layout: r, drag: o, dragConstraints: a, layoutScroll: l, layoutRoot: u } = e;
315
+ function jr(t, e, n, s) {
316
+ const { layoutId: i, layout: o, drag: r, dragConstraints: a, layoutScroll: l, layoutRoot: u } = e;
294
317
  t.projection = new n(t.latestValues, e["data-framer-portal-id"] ? void 0 : Os(t.parent)), t.projection.setOptions({
295
318
  layoutId: i,
296
- layout: r,
297
- alwaysMeasureLayout: !!o || a && at(a),
319
+ layout: o,
320
+ alwaysMeasureLayout: !!r || a && at(a),
298
321
  visualElement: t,
299
322
  /**
300
323
  * TODO: Update options in an effect. This could be tricky as it'll be too late
@@ -303,7 +326,7 @@ function Fo(t, e, n, s) {
303
326
  * ensuring it gets called if there's no potential layout animations.
304
327
  *
305
328
  */
306
- animationType: typeof r == "string" ? r : "both",
329
+ animationType: typeof o == "string" ? o : "both",
307
330
  initialPromotionConfig: s,
308
331
  layoutScroll: l,
309
332
  layoutRoot: u
@@ -313,35 +336,35 @@ function Os(t) {
313
336
  if (t)
314
337
  return t.options.allowProjection !== !1 ? t.projection : Os(t.parent);
315
338
  }
316
- function jo({ preloadedFeatures: t, createVisualElement: e, useRender: n, useVisualState: s, Component: i }) {
317
- var r, o;
318
- t && So(t);
339
+ function Fr({ preloadedFeatures: t, createVisualElement: e, useRender: n, useVisualState: s, Component: i }) {
340
+ var o, r;
341
+ t && Sr(t);
319
342
  function a(u, c) {
320
343
  let h;
321
344
  const f = {
322
345
  ...P.useContext(Rs),
323
346
  ...u,
324
- layoutId: Bo(u)
325
- }, { isStatic: d } = f, m = Do(u), p = s(u, d);
326
- if (!d && je) {
327
- ko();
328
- const y = Io(f);
329
- h = y.MeasureLayout, m.visualElement = Lo(i, p, f, e, y.ProjectionNode);
347
+ layoutId: Br(u)
348
+ }, { isStatic: d } = f, m = Dr(u), p = s(u, d);
349
+ if (!d && Fe) {
350
+ kr();
351
+ const y = Ir(f);
352
+ h = y.MeasureLayout, m.visualElement = Lr(i, p, f, e, y.ProjectionNode);
330
353
  }
331
- return A.jsxs(Yt.Provider, { value: m, children: [h && m.visualElement ? A.jsx(h, { visualElement: m.visualElement, ...f }) : null, n(i, u, Ro(p, m.visualElement, c), p, d, m.visualElement)] });
354
+ return A.jsxs(Yt.Provider, { value: m, children: [h && m.visualElement ? A.jsx(h, { visualElement: m.visualElement, ...f }) : null, n(i, u, Rr(p, m.visualElement, c), p, d, m.visualElement)] });
332
355
  }
333
- a.displayName = `motion.${typeof i == "string" ? i : `create(${(o = (r = i.displayName) !== null && r !== void 0 ? r : i.name) !== null && o !== void 0 ? o : ""})`}`;
356
+ a.displayName = `motion.${typeof i == "string" ? i : `create(${(r = (o = i.displayName) !== null && o !== void 0 ? o : i.name) !== null && r !== void 0 ? r : ""})`}`;
334
357
  const l = P.forwardRef(a);
335
- return l[Mo] = i, l;
358
+ return l[Mr] = i, l;
336
359
  }
337
- function Bo({ layoutId: t }) {
360
+ function Br({ layoutId: t }) {
338
361
  const e = P.useContext(Ms).id;
339
362
  return e && t !== void 0 ? e + "-" + t : t;
340
363
  }
341
- function ko(t, e) {
342
- P.useContext(Fs).strict;
364
+ function kr(t, e) {
365
+ P.useContext(js).strict;
343
366
  }
344
- function Io(t) {
367
+ function Ir(t) {
345
368
  const { drag: e, layout: n } = dt;
346
369
  if (!e && !n)
347
370
  return {};
@@ -351,7 +374,7 @@ function Io(t) {
351
374
  ProjectionNode: s.ProjectionNode
352
375
  };
353
376
  }
354
- const Oo = [
377
+ const Or = [
355
378
  "animate",
356
379
  "circle",
357
380
  "defs",
@@ -391,7 +414,7 @@ function Ue(t) {
391
414
  /**
392
415
  * If it's in our list of lowercase SVG tags, it's an SVG component
393
416
  */
394
- !!(Oo.indexOf(t) > -1 || /**
417
+ !!(Or.indexOf(t) > -1 || /**
395
418
  * If it contains a capital letter, it's an SVG component
396
419
  */
397
420
  /[A-Z]/u.test(t))
@@ -406,41 +429,41 @@ function gn(t) {
406
429
  }
407
430
  function _e(t, e, n, s) {
408
431
  if (typeof e == "function") {
409
- const [i, r] = gn(s);
410
- e = e(n !== void 0 ? n : t.custom, i, r);
432
+ const [i, o] = gn(s);
433
+ e = e(n !== void 0 ? n : t.custom, i, o);
411
434
  }
412
435
  if (typeof e == "string" && (e = t.variants && t.variants[e]), typeof e == "function") {
413
- const [i, r] = gn(s);
414
- e = e(n !== void 0 ? n : t.custom, i, r);
436
+ const [i, o] = gn(s);
437
+ e = e(n !== void 0 ? n : t.custom, i, o);
415
438
  }
416
439
  return e;
417
440
  }
418
- const ge = (t) => Array.isArray(t), No = (t) => !!(t && typeof t == "object" && t.mix && t.toValue), Uo = (t) => ge(t) ? t[t.length - 1] || 0 : t, j = (t) => !!(t && t.getVelocity);
441
+ const ge = (t) => Array.isArray(t), Nr = (t) => !!(t && typeof t == "object" && t.mix && t.toValue), Ur = (t) => ge(t) ? t[t.length - 1] || 0 : t, F = (t) => !!(t && t.getVelocity);
419
442
  function Ut(t) {
420
- const e = j(t) ? t.get() : t;
421
- return No(e) ? e.toValue() : e;
443
+ const e = F(t) ? t.get() : t;
444
+ return Nr(e) ? e.toValue() : e;
422
445
  }
423
- function _o({ scrapeMotionValuesFromProps: t, createRenderState: e, onUpdate: n }, s, i, r) {
424
- const o = {
425
- latestValues: Ko(s, i, r, t),
446
+ function _r({ scrapeMotionValuesFromProps: t, createRenderState: e, onUpdate: n }, s, i, o) {
447
+ const r = {
448
+ latestValues: Kr(s, i, o, t),
426
449
  renderState: e()
427
450
  };
428
- return n && (o.onMount = (a) => n({ props: s, current: a, ...o }), o.onUpdate = (a) => n(a)), o;
451
+ return n && (r.onMount = (a) => n({ props: s, current: a, ...r }), r.onUpdate = (a) => n(a)), r;
429
452
  }
430
453
  const Ns = (t) => (e, n) => {
431
- const s = P.useContext(Yt), i = P.useContext(Fe), r = () => _o(t, e, s, i);
432
- return n ? r() : go(r);
454
+ const s = P.useContext(Yt), i = P.useContext(je), o = () => _r(t, e, s, i);
455
+ return n ? o() : gr(o);
433
456
  };
434
- function Ko(t, e, n, s) {
435
- const i = {}, r = s(t, {});
436
- for (const f in r)
437
- i[f] = Ut(r[f]);
438
- let { initial: o, animate: a } = t;
457
+ function Kr(t, e, n, s) {
458
+ const i = {}, o = s(t, {});
459
+ for (const f in o)
460
+ i[f] = Ut(o[f]);
461
+ let { initial: r, animate: a } = t;
439
462
  const l = Qt(t), u = Bs(t);
440
- e && u && !l && t.inherit !== !1 && (o === void 0 && (o = e.initial), a === void 0 && (a = e.animate));
463
+ e && u && !l && t.inherit !== !1 && (r === void 0 && (r = e.initial), a === void 0 && (a = e.animate));
441
464
  let c = n ? n.initial === !1 : !1;
442
- c = c || o === !1;
443
- const h = c ? a : o;
465
+ c = c || r === !1;
466
+ const h = c ? a : r;
444
467
  if (h && typeof h != "boolean" && !Zt(h)) {
445
468
  const f = Array.isArray(h) ? h : [h];
446
469
  for (let d = 0; d < f.length; d++) {
@@ -480,25 +503,25 @@ const pt = [
480
503
  "skew",
481
504
  "skewX",
482
505
  "skewY"
483
- ], it = new Set(pt), Us = (t) => (e) => typeof e == "string" && e.startsWith(t), _s = /* @__PURE__ */ Us("--"), zo = /* @__PURE__ */ Us("var(--"), Ke = (t) => zo(t) ? Wo.test(t.split("/*")[0].trim()) : !1, Wo = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, Ks = (t, e) => e && typeof t == "number" ? e.transform(t) : t, X = (t, e, n) => n > e ? e : n < t ? t : n, gt = {
506
+ ], it = new Set(pt), Us = (t) => (e) => typeof e == "string" && e.startsWith(t), _s = /* @__PURE__ */ Us("--"), zr = /* @__PURE__ */ Us("var(--"), Ke = (t) => zr(t) ? Wr.test(t.split("/*")[0].trim()) : !1, Wr = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, Ks = (t, e) => e && typeof t == "number" ? e.transform(t) : t, X = (t, e, n) => n > e ? e : n < t ? t : n, gt = {
484
507
  test: (t) => typeof t == "number",
485
508
  parse: parseFloat,
486
509
  transform: (t) => t
487
- }, Ct = {
510
+ }, Dt = {
488
511
  ...gt,
489
512
  transform: (t) => X(0, 1, t)
490
- }, It = {
513
+ }, Ot = {
491
514
  ...gt,
492
515
  default: 1
493
- }, Et = (t) => ({
516
+ }, Lt = (t) => ({
494
517
  test: (e) => typeof e == "string" && e.endsWith(t) && e.split(" ").length === 1,
495
518
  parse: parseFloat,
496
519
  transform: (e) => `${e}${t}`
497
- }), q = /* @__PURE__ */ Et("deg"), z = /* @__PURE__ */ Et("%"), x = /* @__PURE__ */ Et("px"), $o = /* @__PURE__ */ Et("vh"), Go = /* @__PURE__ */ Et("vw"), yn = {
520
+ }), q = /* @__PURE__ */ Lt("deg"), z = /* @__PURE__ */ Lt("%"), x = /* @__PURE__ */ Lt("px"), $r = /* @__PURE__ */ Lt("vh"), Gr = /* @__PURE__ */ Lt("vw"), yn = {
498
521
  ...z,
499
522
  parse: (t) => z.parse(t) / 100,
500
523
  transform: (t) => z.transform(t * 100)
501
- }, Ho = {
524
+ }, Hr = {
502
525
  // Border props
503
526
  borderWidth: x,
504
527
  borderTopWidth: x,
@@ -534,15 +557,15 @@ const pt = [
534
557
  // Misc
535
558
  backgroundPositionX: x,
536
559
  backgroundPositionY: x
537
- }, Xo = {
560
+ }, Xr = {
538
561
  rotate: q,
539
562
  rotateX: q,
540
563
  rotateY: q,
541
564
  rotateZ: q,
542
- scale: It,
543
- scaleX: It,
544
- scaleY: It,
545
- scaleZ: It,
565
+ scale: Ot,
566
+ scaleX: Ot,
567
+ scaleY: Ot,
568
+ scaleZ: Ot,
546
569
  skew: q,
547
570
  skewX: q,
548
571
  skewY: q,
@@ -555,7 +578,7 @@ const pt = [
555
578
  z: x,
556
579
  perspective: x,
557
580
  transformPerspective: x,
558
- opacity: Ct,
581
+ opacity: Dt,
559
582
  originX: yn,
560
583
  originY: yn,
561
584
  originZ: x
@@ -563,78 +586,78 @@ const pt = [
563
586
  ...gt,
564
587
  transform: Math.round
565
588
  }, ze = {
566
- ...Ho,
567
- ...Xo,
589
+ ...Hr,
590
+ ...Xr,
568
591
  zIndex: vn,
569
592
  size: x,
570
593
  // SVG
571
- fillOpacity: Ct,
572
- strokeOpacity: Ct,
594
+ fillOpacity: Dt,
595
+ strokeOpacity: Dt,
573
596
  numOctaves: vn
574
- }, qo = {
597
+ }, qr = {
575
598
  x: "translateX",
576
599
  y: "translateY",
577
600
  z: "translateZ",
578
601
  transformPerspective: "perspective"
579
- }, Yo = pt.length;
580
- function Zo(t, e, n) {
602
+ }, Yr = pt.length;
603
+ function Zr(t, e, n) {
581
604
  let s = "", i = !0;
582
- for (let r = 0; r < Yo; r++) {
583
- const o = pt[r], a = t[o];
605
+ for (let o = 0; o < Yr; o++) {
606
+ const r = pt[o], a = t[r];
584
607
  if (a === void 0)
585
608
  continue;
586
609
  let l = !0;
587
- if (typeof a == "number" ? l = a === (o.startsWith("scale") ? 1 : 0) : l = parseFloat(a) === 0, !l || n) {
588
- const u = Ks(a, ze[o]);
610
+ if (typeof a == "number" ? l = a === (r.startsWith("scale") ? 1 : 0) : l = parseFloat(a) === 0, !l || n) {
611
+ const u = Ks(a, ze[r]);
589
612
  if (!l) {
590
613
  i = !1;
591
- const c = qo[o] || o;
614
+ const c = qr[r] || r;
592
615
  s += `${c}(${u}) `;
593
616
  }
594
- n && (e[o] = u);
617
+ n && (e[r] = u);
595
618
  }
596
619
  }
597
620
  return s = s.trim(), n ? s = n(e, i ? "" : s) : i && (s = "none"), s;
598
621
  }
599
622
  function We(t, e, n) {
600
- const { style: s, vars: i, transformOrigin: r } = t;
601
- let o = !1, a = !1;
623
+ const { style: s, vars: i, transformOrigin: o } = t;
624
+ let r = !1, a = !1;
602
625
  for (const l in e) {
603
626
  const u = e[l];
604
627
  if (it.has(l)) {
605
- o = !0;
628
+ r = !0;
606
629
  continue;
607
630
  } else if (_s(l)) {
608
631
  i[l] = u;
609
632
  continue;
610
633
  } else {
611
634
  const c = Ks(u, ze[l]);
612
- l.startsWith("origin") ? (a = !0, r[l] = c) : s[l] = c;
635
+ l.startsWith("origin") ? (a = !0, o[l] = c) : s[l] = c;
613
636
  }
614
637
  }
615
- if (e.transform || (o || n ? s.transform = Zo(e, t.transform, n) : s.transform && (s.transform = "none")), a) {
616
- const { originX: l = "50%", originY: u = "50%", originZ: c = 0 } = r;
638
+ if (e.transform || (r || n ? s.transform = Zr(e, t.transform, n) : s.transform && (s.transform = "none")), a) {
639
+ const { originX: l = "50%", originY: u = "50%", originZ: c = 0 } = o;
617
640
  s.transformOrigin = `${l} ${u} ${c}`;
618
641
  }
619
642
  }
620
- const Qo = {
643
+ const Qr = {
621
644
  offset: "stroke-dashoffset",
622
645
  array: "stroke-dasharray"
623
- }, Jo = {
646
+ }, Jr = {
624
647
  offset: "strokeDashoffset",
625
648
  array: "strokeDasharray"
626
649
  };
627
- function tr(t, e, n = 1, s = 0, i = !0) {
650
+ function to(t, e, n = 1, s = 0, i = !0) {
628
651
  t.pathLength = 1;
629
- const r = i ? Qo : Jo;
630
- t[r.offset] = x.transform(-s);
631
- const o = x.transform(e), a = x.transform(n);
632
- t[r.array] = `${o} ${a}`;
652
+ const o = i ? Qr : Jr;
653
+ t[o.offset] = x.transform(-s);
654
+ const r = x.transform(e), a = x.transform(n);
655
+ t[o.array] = `${r} ${a}`;
633
656
  }
634
657
  function xn(t, e, n) {
635
658
  return typeof t == "string" ? t : x.transform(e + n * t);
636
659
  }
637
- function er(t, e, n) {
660
+ function eo(t, e, n) {
638
661
  const s = xn(e, t.x, t.width), i = xn(n, t.y, t.height);
639
662
  return `${s} ${i}`;
640
663
  }
@@ -643,8 +666,8 @@ function $e(t, {
643
666
  attrY: n,
644
667
  attrScale: s,
645
668
  originX: i,
646
- originY: r,
647
- pathLength: o,
669
+ originY: o,
670
+ pathLength: r,
648
671
  pathSpacing: a = 1,
649
672
  pathOffset: l = 0,
650
673
  // This is object creation, which we try to avoid per-frame.
@@ -656,7 +679,7 @@ function $e(t, {
656
679
  }
657
680
  t.attrs = t.style, t.style = {};
658
681
  const { attrs: f, style: d, dimensions: m } = t;
659
- f.transform && (m && (d.transform = f.transform), delete f.transform), m && (i !== void 0 || r !== void 0 || d.transform) && (d.transformOrigin = er(m, i !== void 0 ? i : 0.5, r !== void 0 ? r : 0.5)), e !== void 0 && (f.x = e), n !== void 0 && (f.y = n), s !== void 0 && (f.scale = s), o !== void 0 && tr(f, o, a, l, !1);
682
+ f.transform && (m && (d.transform = f.transform), delete f.transform), m && (i !== void 0 || o !== void 0 || d.transform) && (d.transformOrigin = eo(m, i !== void 0 ? i : 0.5, o !== void 0 ? o : 0.5)), e !== void 0 && (f.x = e), n !== void 0 && (f.y = n), s !== void 0 && (f.scale = s), r !== void 0 && to(f, r, a, l, !1);
660
683
  }
661
684
  const Ge = () => ({
662
685
  style: {},
@@ -669,8 +692,8 @@ const Ge = () => ({
669
692
  }), He = (t) => typeof t == "string" && t.toLowerCase() === "svg";
670
693
  function Ws(t, { style: e, vars: n }, s, i) {
671
694
  Object.assign(t.style, e, i && i.getProjectionStyles(s));
672
- for (const r in n)
673
- t.style.setProperty(r, n[r]);
695
+ for (const o in n)
696
+ t.style.setProperty(o, n[o]);
674
697
  }
675
698
  const $s = /* @__PURE__ */ new Set([
676
699
  "baseFrequency",
@@ -703,7 +726,7 @@ function Gs(t, e, n, s) {
703
726
  t.setAttribute($s.has(i) ? i : Oe(i), e.attrs[i]);
704
727
  }
705
728
  const Wt = {};
706
- function nr(t) {
729
+ function no(t) {
707
730
  Object.assign(Wt, t);
708
731
  }
709
732
  function Hs(t, { layout: e, layoutId: n }) {
@@ -711,21 +734,21 @@ function Hs(t, { layout: e, layoutId: n }) {
711
734
  }
712
735
  function Xe(t, e, n) {
713
736
  var s;
714
- const { style: i } = t, r = {};
715
- for (const o in i)
716
- (j(i[o]) || e.style && j(e.style[o]) || Hs(o, t) || ((s = n == null ? void 0 : n.getValue(o)) === null || s === void 0 ? void 0 : s.liveStyle) !== void 0) && (r[o] = i[o]);
717
- return r;
737
+ const { style: i } = t, o = {};
738
+ for (const r in i)
739
+ (F(i[r]) || e.style && F(e.style[r]) || Hs(r, t) || ((s = n == null ? void 0 : n.getValue(r)) === null || s === void 0 ? void 0 : s.liveStyle) !== void 0) && (o[r] = i[r]);
740
+ return o;
718
741
  }
719
742
  function Xs(t, e, n) {
720
743
  const s = Xe(t, e, n);
721
744
  for (const i in t)
722
- if (j(t[i]) || j(e[i])) {
723
- const r = pt.indexOf(i) !== -1 ? "attr" + i.charAt(0).toUpperCase() + i.substring(1) : i;
724
- s[r] = t[i];
745
+ if (F(t[i]) || F(e[i])) {
746
+ const o = pt.indexOf(i) !== -1 ? "attr" + i.charAt(0).toUpperCase() + i.substring(1) : i;
747
+ s[o] = t[i];
725
748
  }
726
749
  return s;
727
750
  }
728
- function sr(t, e) {
751
+ function so(t, e) {
729
752
  try {
730
753
  e.dimensions = typeof t.getBBox == "function" ? t.getBBox() : t.getBoundingClientRect();
731
754
  } catch {
@@ -737,37 +760,37 @@ function sr(t, e) {
737
760
  };
738
761
  }
739
762
  }
740
- const Tn = ["x", "y", "width", "height", "cx", "cy", "r"], ir = {
763
+ const Tn = ["x", "y", "width", "height", "cx", "cy", "r"], io = {
741
764
  useVisualState: Ns({
742
765
  scrapeMotionValuesFromProps: Xs,
743
766
  createRenderState: zs,
744
767
  onUpdate: ({ props: t, prevProps: e, current: n, renderState: s, latestValues: i }) => {
745
768
  if (!n)
746
769
  return;
747
- let r = !!t.drag;
748
- if (!r) {
770
+ let o = !!t.drag;
771
+ if (!o) {
749
772
  for (const a in i)
750
773
  if (it.has(a)) {
751
- r = !0;
774
+ o = !0;
752
775
  break;
753
776
  }
754
777
  }
755
- if (!r)
778
+ if (!o)
756
779
  return;
757
- let o = !e;
780
+ let r = !e;
758
781
  if (e)
759
782
  for (let a = 0; a < Tn.length; a++) {
760
783
  const l = Tn[a];
761
- t[l] !== e[l] && (o = !0);
784
+ t[l] !== e[l] && (r = !0);
762
785
  }
763
- o && C.read(() => {
764
- sr(n, s), C.render(() => {
786
+ r && C.read(() => {
787
+ so(n, s), C.render(() => {
765
788
  $e(s, i, He(n.tagName), t.transformTemplate), Gs(n, s);
766
789
  });
767
790
  });
768
791
  }
769
792
  })
770
- }, or = {
793
+ }, ro = {
771
794
  useVisualState: Ns({
772
795
  scrapeMotionValuesFromProps: Xe,
773
796
  createRenderState: Ge
@@ -775,55 +798,55 @@ const Tn = ["x", "y", "width", "height", "cx", "cy", "r"], ir = {
775
798
  };
776
799
  function qs(t, e, n) {
777
800
  for (const s in e)
778
- !j(e[s]) && !Hs(s, n) && (t[s] = e[s]);
801
+ !F(e[s]) && !Hs(s, n) && (t[s] = e[s]);
779
802
  }
780
- function rr({ transformTemplate: t }, e) {
803
+ function oo({ transformTemplate: t }, e) {
781
804
  return P.useMemo(() => {
782
805
  const n = Ge();
783
806
  return We(n, e, t), Object.assign({}, n.vars, n.style);
784
807
  }, [e]);
785
808
  }
786
- function ar(t, e) {
809
+ function ao(t, e) {
787
810
  const n = t.style || {}, s = {};
788
- return qs(s, n, t), Object.assign(s, rr(t, e)), s;
811
+ return qs(s, n, t), Object.assign(s, oo(t, e)), s;
789
812
  }
790
- function lr(t, e) {
791
- const n = {}, s = ar(t, e);
813
+ function lo(t, e) {
814
+ const n = {}, s = ao(t, e);
792
815
  return t.drag && t.dragListener !== !1 && (n.draggable = !1, s.userSelect = s.WebkitUserSelect = s.WebkitTouchCallout = "none", s.touchAction = t.drag === !0 ? "none" : `pan-${t.drag === "x" ? "y" : "x"}`), t.tabIndex === void 0 && (t.onTap || t.onTapStart || t.whileTap) && (n.tabIndex = 0), n.style = s, n;
793
816
  }
794
- function ur(t, e, n, s) {
817
+ function uo(t, e, n, s) {
795
818
  const i = P.useMemo(() => {
796
- const r = zs();
797
- return $e(r, e, He(s), t.transformTemplate), {
798
- ...r.attrs,
799
- style: { ...r.style }
819
+ const o = zs();
820
+ return $e(o, e, He(s), t.transformTemplate), {
821
+ ...o.attrs,
822
+ style: { ...o.style }
800
823
  };
801
824
  }, [e]);
802
825
  if (t.style) {
803
- const r = {};
804
- qs(r, t.style, t), i.style = { ...r, ...i.style };
826
+ const o = {};
827
+ qs(o, t.style, t), i.style = { ...o, ...i.style };
805
828
  }
806
829
  return i;
807
830
  }
808
- function cr(t = !1) {
809
- return (n, s, i, { latestValues: r }, o) => {
810
- const l = (Ue(n) ? ur : lr)(s, r, o, n), u = wo(s, typeof n == "string", t), c = n !== P.Fragment ? { ...u, ...l, ref: i } : {}, { children: h } = s, f = P.useMemo(() => j(h) ? h.get() : h, [h]);
831
+ function co(t = !1) {
832
+ return (n, s, i, { latestValues: o }, r) => {
833
+ const l = (Ue(n) ? uo : lo)(s, o, r, n), u = wr(s, typeof n == "string", t), c = n !== P.Fragment ? { ...u, ...l, ref: i } : {}, { children: h } = s, f = P.useMemo(() => F(h) ? h.get() : h, [h]);
811
834
  return P.createElement(n, {
812
835
  ...c,
813
836
  children: f
814
837
  });
815
838
  };
816
839
  }
817
- function hr(t, e) {
840
+ function ho(t, e) {
818
841
  return function(s, { forwardMotionProps: i } = { forwardMotionProps: !1 }) {
819
- const o = {
820
- ...Ue(s) ? ir : or,
842
+ const r = {
843
+ ...Ue(s) ? io : ro,
821
844
  preloadedFeatures: t,
822
- useRender: cr(i),
845
+ useRender: co(i),
823
846
  createVisualElement: e,
824
847
  Component: s
825
848
  };
826
- return jo(o);
849
+ return Fr(r);
827
850
  };
828
851
  }
829
852
  function Ys(t, e) {
@@ -841,8 +864,8 @@ function Jt(t, e, n) {
841
864
  const s = t.getProps();
842
865
  return _e(s, e, n !== void 0 ? n : s.custom, t);
843
866
  }
844
- const fr = /* @__PURE__ */ Be(() => window.ScrollTimeline !== void 0);
845
- class dr {
867
+ const fo = /* @__PURE__ */ Be(() => window.ScrollTimeline !== void 0);
868
+ class mo {
846
869
  constructor(e) {
847
870
  this.stop = () => this.runAll("stop"), this.animations = e.filter(Boolean);
848
871
  }
@@ -861,14 +884,14 @@ class dr {
861
884
  }
862
885
  attachTimeline(e, n) {
863
886
  const s = this.animations.map((i) => {
864
- if (fr() && i.attachTimeline)
887
+ if (fo() && i.attachTimeline)
865
888
  return i.attachTimeline(e);
866
889
  if (typeof n == "function")
867
890
  return n(i);
868
891
  });
869
892
  return () => {
870
- s.forEach((i, r) => {
871
- i && i(), this.animations[r].stop();
893
+ s.forEach((i, o) => {
894
+ i && i(), this.animations[o].stop();
872
895
  });
873
896
  };
874
897
  }
@@ -912,7 +935,7 @@ class dr {
912
935
  this.runAll("complete");
913
936
  }
914
937
  }
915
- class mr extends dr {
938
+ class po extends mo {
916
939
  then(e, n) {
917
940
  return Promise.all(this.animations).then(e).catch(n);
918
941
  }
@@ -935,17 +958,17 @@ function Ye(t) {
935
958
  function Pn(t, e) {
936
959
  t.timeline = e, t.onfinish = null;
937
960
  }
938
- const Ze = (t) => Array.isArray(t) && typeof t[0] == "number", pr = {
961
+ const Ze = (t) => Array.isArray(t) && typeof t[0] == "number", go = {
939
962
  linearEasing: void 0
940
963
  };
941
- function gr(t, e) {
964
+ function yo(t, e) {
942
965
  const n = /* @__PURE__ */ Be(t);
943
966
  return () => {
944
967
  var s;
945
- return (s = pr[e]) !== null && s !== void 0 ? s : n();
968
+ return (s = go[e]) !== null && s !== void 0 ? s : n();
946
969
  };
947
970
  }
948
- const $t = /* @__PURE__ */ gr(() => {
971
+ const $t = /* @__PURE__ */ yo(() => {
949
972
  try {
950
973
  document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
951
974
  } catch {
@@ -955,8 +978,8 @@ const $t = /* @__PURE__ */ gr(() => {
955
978
  }, "linearEasing"), Qs = (t, e, n = 10) => {
956
979
  let s = "";
957
980
  const i = Math.max(Math.round(e / n), 2);
958
- for (let r = 0; r < i; r++)
959
- s += t(/* @__PURE__ */ ft(0, i - 1, r)) + ", ";
981
+ for (let o = 0; o < i; o++)
982
+ s += t(/* @__PURE__ */ ft(0, i - 1, o)) + ", ";
960
983
  return `linear(${s.substring(0, s.length - 2)})`;
961
984
  };
962
985
  function Js(t) {
@@ -984,19 +1007,19 @@ const K = {
984
1007
  function ei() {
985
1008
  return K.x || K.y;
986
1009
  }
987
- function yr(t, e, n) {
1010
+ function vo(t, e, n) {
988
1011
  var s;
989
1012
  if (t instanceof Element)
990
1013
  return [t];
991
1014
  if (typeof t == "string") {
992
1015
  let i = document;
993
- const r = (s = void 0) !== null && s !== void 0 ? s : i.querySelectorAll(t);
994
- return r ? Array.from(r) : [];
1016
+ const o = (s = void 0) !== null && s !== void 0 ? s : i.querySelectorAll(t);
1017
+ return o ? Array.from(o) : [];
995
1018
  }
996
1019
  return Array.from(t);
997
1020
  }
998
1021
  function ni(t, e) {
999
- const n = yr(t), s = new AbortController(), i = {
1022
+ const n = vo(t), s = new AbortController(), i = {
1000
1023
  passive: !0,
1001
1024
  ...e,
1002
1025
  signal: s.signal
@@ -1008,8 +1031,8 @@ function Sn(t) {
1008
1031
  e.pointerType === "touch" || ei() || t(e);
1009
1032
  };
1010
1033
  }
1011
- function vr(t, e, n = {}) {
1012
- const [s, i, r] = ni(t, n), o = Sn((a) => {
1034
+ function xo(t, e, n = {}) {
1035
+ const [s, i, o] = ni(t, n), r = Sn((a) => {
1013
1036
  const { target: l } = a, u = e(a);
1014
1037
  if (typeof u != "function" || !l)
1015
1038
  return;
@@ -1019,18 +1042,18 @@ function vr(t, e, n = {}) {
1019
1042
  l.addEventListener("pointerleave", c, i);
1020
1043
  });
1021
1044
  return s.forEach((a) => {
1022
- a.addEventListener("pointerenter", o, i);
1023
- }), r;
1045
+ a.addEventListener("pointerenter", r, i);
1046
+ }), o;
1024
1047
  }
1025
- const si = (t, e) => e ? t === e ? !0 : si(t, e.parentElement) : !1, Qe = (t) => t.pointerType === "mouse" ? typeof t.button != "number" || t.button <= 0 : t.isPrimary !== !1, xr = /* @__PURE__ */ new Set([
1048
+ const si = (t, e) => e ? t === e ? !0 : si(t, e.parentElement) : !1, Qe = (t) => t.pointerType === "mouse" ? typeof t.button != "number" || t.button <= 0 : t.isPrimary !== !1, To = /* @__PURE__ */ new Set([
1026
1049
  "BUTTON",
1027
1050
  "INPUT",
1028
1051
  "SELECT",
1029
1052
  "TEXTAREA",
1030
1053
  "A"
1031
1054
  ]);
1032
- function Tr(t) {
1033
- return xr.has(t.tagName) || t.tabIndex !== -1;
1055
+ function Po(t) {
1056
+ return To.has(t.tagName) || t.tabIndex !== -1;
1034
1057
  }
1035
1058
  const Tt = /* @__PURE__ */ new WeakSet();
1036
1059
  function bn(t) {
@@ -1041,7 +1064,7 @@ function bn(t) {
1041
1064
  function ie(t, e) {
1042
1065
  t.dispatchEvent(new PointerEvent("pointer" + e, { isPrimary: !0, bubbles: !0 }));
1043
1066
  }
1044
- const Pr = (t, e) => {
1067
+ const So = (t, e) => {
1045
1068
  const n = t.currentTarget;
1046
1069
  if (!n)
1047
1070
  return;
@@ -1051,16 +1074,16 @@ const Pr = (t, e) => {
1051
1074
  ie(n, "down");
1052
1075
  const i = bn(() => {
1053
1076
  ie(n, "up");
1054
- }), r = () => ie(n, "cancel");
1055
- n.addEventListener("keyup", i, e), n.addEventListener("blur", r, e);
1077
+ }), o = () => ie(n, "cancel");
1078
+ n.addEventListener("keyup", i, e), n.addEventListener("blur", o, e);
1056
1079
  });
1057
1080
  n.addEventListener("keydown", s, e), n.addEventListener("blur", () => n.removeEventListener("keydown", s), e);
1058
1081
  };
1059
1082
  function An(t) {
1060
1083
  return Qe(t) && !ei();
1061
1084
  }
1062
- function Sr(t, e, n = {}) {
1063
- const [s, i, r] = ni(t, n), o = (a) => {
1085
+ function bo(t, e, n = {}) {
1086
+ const [s, i, o] = ni(t, n), r = (a) => {
1064
1087
  const l = a.currentTarget;
1065
1088
  if (!An(a) || Tt.has(l))
1066
1089
  return;
@@ -1075,10 +1098,10 @@ function Sr(t, e, n = {}) {
1075
1098
  window.addEventListener("pointerup", h, i), window.addEventListener("pointercancel", f, i);
1076
1099
  };
1077
1100
  return s.forEach((a) => {
1078
- !Tr(a) && a.getAttribute("tabindex") === null && (a.tabIndex = 0), (n.useGlobalTarget ? window : a).addEventListener("pointerdown", o, i), a.addEventListener("focus", (u) => Pr(u, i), i);
1079
- }), r;
1101
+ !Po(a) && a.getAttribute("tabindex") === null && (a.tabIndex = 0), (n.useGlobalTarget ? window : a).addEventListener("pointerdown", r, i), a.addEventListener("focus", (u) => So(u, i), i);
1102
+ }), o;
1080
1103
  }
1081
- function br(t) {
1104
+ function Ao(t) {
1082
1105
  return t === "x" || t === "y" ? K[t] ? null : (K[t] = !0, () => {
1083
1106
  K[t] = !1;
1084
1107
  }) : K.x || K.y ? null : (K.x = K.y = !0, () => {
@@ -1095,13 +1118,13 @@ const ii = /* @__PURE__ */ new Set([
1095
1118
  ...pt
1096
1119
  ]);
1097
1120
  let _t;
1098
- function Ar() {
1121
+ function wo() {
1099
1122
  _t = void 0;
1100
1123
  }
1101
1124
  const W = {
1102
- now: () => (_t === void 0 && W.set(L.isProcessing || xo.useManualTiming ? L.timestamp : performance.now()), _t),
1125
+ now: () => (_t === void 0 && W.set(L.isProcessing || xr.useManualTiming ? L.timestamp : performance.now()), _t),
1103
1126
  set: (t) => {
1104
- _t = t, queueMicrotask(Ar);
1127
+ _t = t, queueMicrotask(wo);
1105
1128
  }
1106
1129
  };
1107
1130
  function Je(t, e) {
@@ -1124,9 +1147,9 @@ class en {
1124
1147
  if (i === 1)
1125
1148
  this.subscriptions[0](e, n, s);
1126
1149
  else
1127
- for (let r = 0; r < i; r++) {
1128
- const o = this.subscriptions[r];
1129
- o && o(e, n, s);
1150
+ for (let o = 0; o < i; o++) {
1151
+ const r = this.subscriptions[o];
1152
+ r && r(e, n, s);
1130
1153
  }
1131
1154
  }
1132
1155
  getSize() {
@@ -1136,11 +1159,11 @@ class en {
1136
1159
  this.subscriptions.length = 0;
1137
1160
  }
1138
1161
  }
1139
- function oi(t, e) {
1162
+ function ri(t, e) {
1140
1163
  return e ? t * (1e3 / e) : 0;
1141
1164
  }
1142
- const wn = 30, wr = (t) => !isNaN(parseFloat(t));
1143
- class Vr {
1165
+ const wn = 30, Vo = (t) => !isNaN(parseFloat(t));
1166
+ class Co {
1144
1167
  /**
1145
1168
  * @param init - The initiating value
1146
1169
  * @param config - Optional configuration options
@@ -1151,12 +1174,12 @@ class Vr {
1151
1174
  */
1152
1175
  constructor(e, n = {}) {
1153
1176
  this.version = "11.18.2", this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (s, i = !0) => {
1154
- const r = W.now();
1155
- this.updatedAt !== r && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(s), this.current !== this.prev && this.events.change && this.events.change.notify(this.current), i && this.events.renderRequest && this.events.renderRequest.notify(this.current);
1177
+ const o = W.now();
1178
+ this.updatedAt !== o && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(s), this.current !== this.prev && this.events.change && this.events.change.notify(this.current), i && this.events.renderRequest && this.events.renderRequest.notify(this.current);
1156
1179
  }, this.hasAnimated = !1, this.setCurrent(e), this.owner = n.owner;
1157
1180
  }
1158
1181
  setCurrent(e) {
1159
- this.current = e, this.updatedAt = W.now(), this.canTrackVelocity === null && e !== void 0 && (this.canTrackVelocity = wr(this.current));
1182
+ this.current = e, this.updatedAt = W.now(), this.canTrackVelocity === null && e !== void 0 && (this.canTrackVelocity = Vo(this.current));
1160
1183
  }
1161
1184
  setPrevFrameValue(e = this.current) {
1162
1185
  this.prevFrameValue = e, this.prevUpdatedAt = this.updatedAt;
@@ -1281,7 +1304,7 @@ class Vr {
1281
1304
  if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt > wn)
1282
1305
  return 0;
1283
1306
  const n = Math.min(this.updatedAt - this.prevUpdatedAt, wn);
1284
- return oi(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
1307
+ return ri(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
1285
1308
  }
1286
1309
  /**
1287
1310
  * Registers a new animation to control this `MotionValue`. Only one
@@ -1334,73 +1357,73 @@ class Vr {
1334
1357
  this.clearListeners(), this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
1335
1358
  }
1336
1359
  }
1337
- function Dt(t, e) {
1338
- return new Vr(t, e);
1360
+ function Mt(t, e) {
1361
+ return new Co(t, e);
1339
1362
  }
1340
- function Cr(t, e, n) {
1341
- t.hasValue(e) ? t.getValue(e).set(n) : t.addValue(e, Dt(n));
1363
+ function Do(t, e, n) {
1364
+ t.hasValue(e) ? t.getValue(e).set(n) : t.addValue(e, Mt(n));
1342
1365
  }
1343
- function Dr(t, e) {
1366
+ function Mo(t, e) {
1344
1367
  const n = Jt(t, e);
1345
- let { transitionEnd: s = {}, transition: i = {}, ...r } = n || {};
1346
- r = { ...r, ...s };
1347
- for (const o in r) {
1348
- const a = Uo(r[o]);
1349
- Cr(t, o, a);
1368
+ let { transitionEnd: s = {}, transition: i = {}, ...o } = n || {};
1369
+ o = { ...o, ...s };
1370
+ for (const r in o) {
1371
+ const a = Ur(o[r]);
1372
+ Do(t, r, a);
1350
1373
  }
1351
1374
  }
1352
- function Mr(t) {
1353
- return !!(j(t) && t.add);
1375
+ function Ro(t) {
1376
+ return !!(F(t) && t.add);
1354
1377
  }
1355
1378
  function xe(t, e) {
1356
1379
  const n = t.getValue("willChange");
1357
- if (Mr(n))
1380
+ if (Ro(n))
1358
1381
  return n.add(e);
1359
1382
  }
1360
- function ri(t) {
1383
+ function oi(t) {
1361
1384
  return t.props[ks];
1362
1385
  }
1363
- const ai = (t, e, n) => (((1 - 3 * n + 3 * e) * t + (3 * n - 6 * e)) * t + 3 * e) * t, Rr = 1e-7, Er = 12;
1364
- function Lr(t, e, n, s, i) {
1365
- let r, o, a = 0;
1386
+ const ai = (t, e, n) => (((1 - 3 * n + 3 * e) * t + (3 * n - 6 * e)) * t + 3 * e) * t, Eo = 1e-7, Lo = 12;
1387
+ function jo(t, e, n, s, i) {
1388
+ let o, r, a = 0;
1366
1389
  do
1367
- o = e + (n - e) / 2, r = ai(o, s, i) - t, r > 0 ? n = o : e = o;
1368
- while (Math.abs(r) > Rr && ++a < Er);
1369
- return o;
1390
+ r = e + (n - e) / 2, o = ai(r, s, i) - t, o > 0 ? n = r : e = r;
1391
+ while (Math.abs(o) > Eo && ++a < Lo);
1392
+ return r;
1370
1393
  }
1371
- function Lt(t, e, n, s) {
1394
+ function jt(t, e, n, s) {
1372
1395
  if (t === e && n === s)
1373
1396
  return I;
1374
- const i = (r) => Lr(r, 0, 1, t, n);
1375
- return (r) => r === 0 || r === 1 ? r : ai(i(r), e, s);
1397
+ const i = (o) => jo(o, 0, 1, t, n);
1398
+ return (o) => o === 0 || o === 1 ? o : ai(i(o), e, s);
1376
1399
  }
1377
- const li = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, ui = (t) => (e) => 1 - t(1 - e), ci = /* @__PURE__ */ Lt(0.33, 1.53, 0.69, 0.99), nn = /* @__PURE__ */ ui(ci), hi = /* @__PURE__ */ li(nn), fi = (t) => (t *= 2) < 1 ? 0.5 * nn(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), sn = (t) => 1 - Math.sin(Math.acos(t)), di = ui(sn), mi = li(sn), pi = (t) => /^0[^.\s]+$/u.test(t);
1378
- function Fr(t) {
1400
+ const li = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, ui = (t) => (e) => 1 - t(1 - e), ci = /* @__PURE__ */ jt(0.33, 1.53, 0.69, 0.99), nn = /* @__PURE__ */ ui(ci), hi = /* @__PURE__ */ li(nn), fi = (t) => (t *= 2) < 1 ? 0.5 * nn(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), sn = (t) => 1 - Math.sin(Math.acos(t)), di = ui(sn), mi = li(sn), pi = (t) => /^0[^.\s]+$/u.test(t);
1401
+ function Fo(t) {
1379
1402
  return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" || pi(t) : !0;
1380
1403
  }
1381
- const St = (t) => Math.round(t * 1e5) / 1e5, on = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
1382
- function jr(t) {
1404
+ const bt = (t) => Math.round(t * 1e5) / 1e5, rn = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
1405
+ function Bo(t) {
1383
1406
  return t == null;
1384
1407
  }
1385
- const Br = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, rn = (t, e) => (n) => !!(typeof n == "string" && Br.test(n) && n.startsWith(t) || e && !jr(n) && Object.prototype.hasOwnProperty.call(n, e)), gi = (t, e, n) => (s) => {
1408
+ const ko = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, on = (t, e) => (n) => !!(typeof n == "string" && ko.test(n) && n.startsWith(t) || e && !Bo(n) && Object.prototype.hasOwnProperty.call(n, e)), gi = (t, e, n) => (s) => {
1386
1409
  if (typeof s != "string")
1387
1410
  return s;
1388
- const [i, r, o, a] = s.match(on);
1411
+ const [i, o, r, a] = s.match(rn);
1389
1412
  return {
1390
1413
  [t]: parseFloat(i),
1391
- [e]: parseFloat(r),
1392
- [n]: parseFloat(o),
1414
+ [e]: parseFloat(o),
1415
+ [n]: parseFloat(r),
1393
1416
  alpha: a !== void 0 ? parseFloat(a) : 1
1394
1417
  };
1395
- }, kr = (t) => X(0, 255, t), oe = {
1418
+ }, Io = (t) => X(0, 255, t), re = {
1396
1419
  ...gt,
1397
- transform: (t) => Math.round(kr(t))
1420
+ transform: (t) => Math.round(Io(t))
1398
1421
  }, nt = {
1399
- test: /* @__PURE__ */ rn("rgb", "red"),
1422
+ test: /* @__PURE__ */ on("rgb", "red"),
1400
1423
  parse: /* @__PURE__ */ gi("red", "green", "blue"),
1401
- transform: ({ red: t, green: e, blue: n, alpha: s = 1 }) => "rgba(" + oe.transform(t) + ", " + oe.transform(e) + ", " + oe.transform(n) + ", " + St(Ct.transform(s)) + ")"
1424
+ transform: ({ red: t, green: e, blue: n, alpha: s = 1 }) => "rgba(" + re.transform(t) + ", " + re.transform(e) + ", " + re.transform(n) + ", " + bt(Dt.transform(s)) + ")"
1402
1425
  };
1403
- function Ir(t) {
1426
+ function Oo(t) {
1404
1427
  let e = "", n = "", s = "", i = "";
1405
1428
  return t.length > 5 ? (e = t.substring(1, 3), n = t.substring(3, 5), s = t.substring(5, 7), i = t.substring(7, 9)) : (e = t.substring(1, 2), n = t.substring(2, 3), s = t.substring(3, 4), i = t.substring(4, 5), e += e, n += n, s += s, i += i), {
1406
1429
  red: parseInt(e, 16),
@@ -1410,107 +1433,107 @@ function Ir(t) {
1410
1433
  };
1411
1434
  }
1412
1435
  const Te = {
1413
- test: /* @__PURE__ */ rn("#"),
1414
- parse: Ir,
1436
+ test: /* @__PURE__ */ on("#"),
1437
+ parse: Oo,
1415
1438
  transform: nt.transform
1416
1439
  }, lt = {
1417
- test: /* @__PURE__ */ rn("hsl", "hue"),
1440
+ test: /* @__PURE__ */ on("hsl", "hue"),
1418
1441
  parse: /* @__PURE__ */ gi("hue", "saturation", "lightness"),
1419
- transform: ({ hue: t, saturation: e, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(t) + ", " + z.transform(St(e)) + ", " + z.transform(St(n)) + ", " + St(Ct.transform(s)) + ")"
1420
- }, F = {
1442
+ transform: ({ hue: t, saturation: e, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(t) + ", " + z.transform(bt(e)) + ", " + z.transform(bt(n)) + ", " + bt(Dt.transform(s)) + ")"
1443
+ }, j = {
1421
1444
  test: (t) => nt.test(t) || Te.test(t) || lt.test(t),
1422
1445
  parse: (t) => nt.test(t) ? nt.parse(t) : lt.test(t) ? lt.parse(t) : Te.parse(t),
1423
1446
  transform: (t) => typeof t == "string" ? t : t.hasOwnProperty("red") ? nt.transform(t) : lt.transform(t)
1424
- }, Or = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
1425
- function Nr(t) {
1447
+ }, No = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
1448
+ function Uo(t) {
1426
1449
  var e, n;
1427
- return isNaN(t) && typeof t == "string" && (((e = t.match(on)) === null || e === void 0 ? void 0 : e.length) || 0) + (((n = t.match(Or)) === null || n === void 0 ? void 0 : n.length) || 0) > 0;
1450
+ return isNaN(t) && typeof t == "string" && (((e = t.match(rn)) === null || e === void 0 ? void 0 : e.length) || 0) + (((n = t.match(No)) === null || n === void 0 ? void 0 : n.length) || 0) > 0;
1428
1451
  }
1429
- const yi = "number", vi = "color", Ur = "var", _r = "var(", Vn = "${}", Kr = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;
1430
- function Mt(t) {
1452
+ const yi = "number", vi = "color", _o = "var", Ko = "var(", Vn = "${}", zo = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;
1453
+ function Rt(t) {
1431
1454
  const e = t.toString(), n = [], s = {
1432
1455
  color: [],
1433
1456
  number: [],
1434
1457
  var: []
1435
1458
  }, i = [];
1436
- let r = 0;
1437
- const a = e.replace(Kr, (l) => (F.test(l) ? (s.color.push(r), i.push(vi), n.push(F.parse(l))) : l.startsWith(_r) ? (s.var.push(r), i.push(Ur), n.push(l)) : (s.number.push(r), i.push(yi), n.push(parseFloat(l))), ++r, Vn)).split(Vn);
1459
+ let o = 0;
1460
+ const a = e.replace(zo, (l) => (j.test(l) ? (s.color.push(o), i.push(vi), n.push(j.parse(l))) : l.startsWith(Ko) ? (s.var.push(o), i.push(_o), n.push(l)) : (s.number.push(o), i.push(yi), n.push(parseFloat(l))), ++o, Vn)).split(Vn);
1438
1461
  return { values: n, split: a, indexes: s, types: i };
1439
1462
  }
1440
1463
  function xi(t) {
1441
- return Mt(t).values;
1464
+ return Rt(t).values;
1442
1465
  }
1443
1466
  function Ti(t) {
1444
- const { split: e, types: n } = Mt(t), s = e.length;
1467
+ const { split: e, types: n } = Rt(t), s = e.length;
1445
1468
  return (i) => {
1446
- let r = "";
1447
- for (let o = 0; o < s; o++)
1448
- if (r += e[o], i[o] !== void 0) {
1449
- const a = n[o];
1450
- a === yi ? r += St(i[o]) : a === vi ? r += F.transform(i[o]) : r += i[o];
1469
+ let o = "";
1470
+ for (let r = 0; r < s; r++)
1471
+ if (o += e[r], i[r] !== void 0) {
1472
+ const a = n[r];
1473
+ a === yi ? o += bt(i[r]) : a === vi ? o += j.transform(i[r]) : o += i[r];
1451
1474
  }
1452
- return r;
1475
+ return o;
1453
1476
  };
1454
1477
  }
1455
- const zr = (t) => typeof t == "number" ? 0 : t;
1456
- function Wr(t) {
1478
+ const Wo = (t) => typeof t == "number" ? 0 : t;
1479
+ function $o(t) {
1457
1480
  const e = xi(t);
1458
- return Ti(t)(e.map(zr));
1481
+ return Ti(t)(e.map(Wo));
1459
1482
  }
1460
1483
  const Z = {
1461
- test: Nr,
1484
+ test: Uo,
1462
1485
  parse: xi,
1463
1486
  createTransformer: Ti,
1464
- getAnimatableNone: Wr
1465
- }, $r = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
1466
- function Gr(t) {
1487
+ getAnimatableNone: $o
1488
+ }, Go = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
1489
+ function Ho(t) {
1467
1490
  const [e, n] = t.slice(0, -1).split("(");
1468
1491
  if (e === "drop-shadow")
1469
1492
  return t;
1470
- const [s] = n.match(on) || [];
1493
+ const [s] = n.match(rn) || [];
1471
1494
  if (!s)
1472
1495
  return t;
1473
1496
  const i = n.replace(s, "");
1474
- let r = $r.has(e) ? 1 : 0;
1475
- return s !== n && (r *= 100), e + "(" + r + i + ")";
1497
+ let o = Go.has(e) ? 1 : 0;
1498
+ return s !== n && (o *= 100), e + "(" + o + i + ")";
1476
1499
  }
1477
- const Hr = /\b([a-z-]*)\(.*?\)/gu, Pe = {
1500
+ const Xo = /\b([a-z-]*)\(.*?\)/gu, Pe = {
1478
1501
  ...Z,
1479
1502
  getAnimatableNone: (t) => {
1480
- const e = t.match(Hr);
1481
- return e ? e.map(Gr).join(" ") : t;
1503
+ const e = t.match(Xo);
1504
+ return e ? e.map(Ho).join(" ") : t;
1482
1505
  }
1483
- }, Xr = {
1506
+ }, qo = {
1484
1507
  ...ze,
1485
1508
  // Color props
1486
- color: F,
1487
- backgroundColor: F,
1488
- outlineColor: F,
1489
- fill: F,
1490
- stroke: F,
1509
+ color: j,
1510
+ backgroundColor: j,
1511
+ outlineColor: j,
1512
+ fill: j,
1513
+ stroke: j,
1491
1514
  // Border props
1492
- borderColor: F,
1493
- borderTopColor: F,
1494
- borderRightColor: F,
1495
- borderBottomColor: F,
1496
- borderLeftColor: F,
1515
+ borderColor: j,
1516
+ borderTopColor: j,
1517
+ borderRightColor: j,
1518
+ borderBottomColor: j,
1519
+ borderLeftColor: j,
1497
1520
  filter: Pe,
1498
1521
  WebkitFilter: Pe
1499
- }, an = (t) => Xr[t];
1522
+ }, an = (t) => qo[t];
1500
1523
  function Pi(t, e) {
1501
1524
  let n = an(t);
1502
1525
  return n !== Pe && (n = Z), n.getAnimatableNone ? n.getAnimatableNone(e) : void 0;
1503
1526
  }
1504
- const qr = /* @__PURE__ */ new Set(["auto", "none", "0"]);
1505
- function Yr(t, e, n) {
1527
+ const Yo = /* @__PURE__ */ new Set(["auto", "none", "0"]);
1528
+ function Zo(t, e, n) {
1506
1529
  let s = 0, i;
1507
1530
  for (; s < t.length && !i; ) {
1508
- const r = t[s];
1509
- typeof r == "string" && !qr.has(r) && Mt(r).values.length && (i = t[s]), s++;
1531
+ const o = t[s];
1532
+ typeof o == "string" && !Yo.has(o) && Rt(o).values.length && (i = t[s]), s++;
1510
1533
  }
1511
1534
  if (i && n)
1512
- for (const r of e)
1513
- t[r] = Pi(n, i);
1535
+ for (const o of e)
1536
+ t[o] = Pi(n, i);
1514
1537
  }
1515
1538
  const Cn = (t) => t === gt || t === x, Dn = (t, e) => parseFloat(t.split(", ")[e]), Mn = (t, e) => (n, { transform: s }) => {
1516
1539
  if (s === "none" || !s)
@@ -1519,13 +1542,13 @@ const Cn = (t) => t === gt || t === x, Dn = (t, e) => parseFloat(t.split(", ")[e
1519
1542
  if (i)
1520
1543
  return Dn(i[1], e);
1521
1544
  {
1522
- const r = s.match(/^matrix\((.+)\)$/u);
1523
- return r ? Dn(r[1], t) : 0;
1545
+ const o = s.match(/^matrix\((.+)\)$/u);
1546
+ return o ? Dn(o[1], t) : 0;
1524
1547
  }
1525
- }, Zr = /* @__PURE__ */ new Set(["x", "y", "z"]), Qr = pt.filter((t) => !Zr.has(t));
1526
- function Jr(t) {
1548
+ }, Qo = /* @__PURE__ */ new Set(["x", "y", "z"]), Jo = pt.filter((t) => !Qo.has(t));
1549
+ function ta(t) {
1527
1550
  const e = [];
1528
- return Qr.forEach((n) => {
1551
+ return Jo.forEach((n) => {
1529
1552
  const s = t.getValue(n);
1530
1553
  s !== void 0 && (e.push([n, s.get()]), s.set(n.startsWith("scale") ? 1 : 0));
1531
1554
  }), e;
@@ -1550,14 +1573,14 @@ function Si() {
1550
1573
  if (be) {
1551
1574
  const t = Array.from(st).filter((s) => s.needsMeasurement), e = new Set(t.map((s) => s.element)), n = /* @__PURE__ */ new Map();
1552
1575
  e.forEach((s) => {
1553
- const i = Jr(s);
1576
+ const i = ta(s);
1554
1577
  i.length && (n.set(s, i), s.render());
1555
1578
  }), t.forEach((s) => s.measureInitialState()), e.forEach((s) => {
1556
1579
  s.render();
1557
1580
  const i = n.get(s);
1558
- i && i.forEach(([r, o]) => {
1581
+ i && i.forEach(([o, r]) => {
1559
1582
  var a;
1560
- (a = s.getValue(r)) === null || a === void 0 || a.set(o);
1583
+ (a = s.getValue(o)) === null || a === void 0 || a.set(r);
1561
1584
  });
1562
1585
  }), t.forEach((s) => s.measureEndState()), t.forEach((s) => {
1563
1586
  s.suspendedScrollY !== void 0 && window.scrollTo(0, s.suspendedScrollY);
@@ -1570,31 +1593,31 @@ function bi() {
1570
1593
  t.readKeyframes(), t.needsMeasurement && (be = !0);
1571
1594
  });
1572
1595
  }
1573
- function ta() {
1596
+ function ea() {
1574
1597
  bi(), Si();
1575
1598
  }
1576
1599
  class ln {
1577
- constructor(e, n, s, i, r, o = !1) {
1578
- this.isComplete = !1, this.isAsync = !1, this.needsMeasurement = !1, this.isScheduled = !1, this.unresolvedKeyframes = [...e], this.onComplete = n, this.name = s, this.motionValue = i, this.element = r, this.isAsync = o;
1600
+ constructor(e, n, s, i, o, r = !1) {
1601
+ this.isComplete = !1, this.isAsync = !1, this.needsMeasurement = !1, this.isScheduled = !1, this.unresolvedKeyframes = [...e], this.onComplete = n, this.name = s, this.motionValue = i, this.element = o, this.isAsync = r;
1579
1602
  }
1580
1603
  scheduleResolve() {
1581
1604
  this.isScheduled = !0, this.isAsync ? (st.add(this), Se || (Se = !0, C.read(bi), C.resolveKeyframes(Si))) : (this.readKeyframes(), this.complete());
1582
1605
  }
1583
1606
  readKeyframes() {
1584
1607
  const { unresolvedKeyframes: e, name: n, element: s, motionValue: i } = this;
1585
- for (let r = 0; r < e.length; r++)
1586
- if (e[r] === null)
1587
- if (r === 0) {
1588
- const o = i == null ? void 0 : i.get(), a = e[e.length - 1];
1589
- if (o !== void 0)
1590
- e[0] = o;
1608
+ for (let o = 0; o < e.length; o++)
1609
+ if (e[o] === null)
1610
+ if (o === 0) {
1611
+ const r = i == null ? void 0 : i.get(), a = e[e.length - 1];
1612
+ if (r !== void 0)
1613
+ e[0] = r;
1591
1614
  else if (s && n) {
1592
1615
  const l = s.readValue(n, a);
1593
1616
  l != null && (e[0] = l);
1594
1617
  }
1595
- e[0] === void 0 && (e[0] = a), i && o === void 0 && i.set(e[0]);
1618
+ e[0] === void 0 && (e[0] = a), i && r === void 0 && i.set(e[0]);
1596
1619
  } else
1597
- e[r] = e[r - 1];
1620
+ e[o] = e[o - 1];
1598
1621
  }
1599
1622
  setFinalKeyframe() {
1600
1623
  }
@@ -1614,35 +1637,35 @@ class ln {
1614
1637
  this.isComplete || this.scheduleResolve();
1615
1638
  }
1616
1639
  }
1617
- const Ai = (t) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t), ea = (
1640
+ const Ai = (t) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t), na = (
1618
1641
  // eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
1619
1642
  /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
1620
1643
  );
1621
- function na(t) {
1622
- const e = ea.exec(t);
1644
+ function sa(t) {
1645
+ const e = na.exec(t);
1623
1646
  if (!e)
1624
1647
  return [,];
1625
1648
  const [, n, s, i] = e;
1626
1649
  return [`--${n ?? s}`, i];
1627
1650
  }
1628
1651
  function wi(t, e, n = 1) {
1629
- const [s, i] = na(t);
1652
+ const [s, i] = sa(t);
1630
1653
  if (!s)
1631
1654
  return;
1632
- const r = window.getComputedStyle(e).getPropertyValue(s);
1633
- if (r) {
1634
- const o = r.trim();
1635
- return Ai(o) ? parseFloat(o) : o;
1655
+ const o = window.getComputedStyle(e).getPropertyValue(s);
1656
+ if (o) {
1657
+ const r = o.trim();
1658
+ return Ai(r) ? parseFloat(r) : r;
1636
1659
  }
1637
1660
  return Ke(i) ? wi(i, e, n + 1) : i;
1638
1661
  }
1639
- const Vi = (t) => (e) => e.test(t), sa = {
1662
+ const Vi = (t) => (e) => e.test(t), ia = {
1640
1663
  test: (t) => t === "auto",
1641
1664
  parse: (t) => t
1642
- }, Ci = [gt, x, z, q, Go, $o, sa], Rn = (t) => Ci.find(Vi(t));
1665
+ }, Ci = [gt, x, z, q, Gr, $r, ia], Rn = (t) => Ci.find(Vi(t));
1643
1666
  class Di extends ln {
1644
- constructor(e, n, s, i, r) {
1645
- super(e, n, s, i, r, !0);
1667
+ constructor(e, n, s, i, o) {
1668
+ super(e, n, s, i, o, !0);
1646
1669
  }
1647
1670
  readKeyframes() {
1648
1671
  const { unresolvedKeyframes: e, element: n, name: s } = this;
@@ -1658,9 +1681,9 @@ class Di extends ln {
1658
1681
  }
1659
1682
  if (this.resolveNoneKeyframes(), !ii.has(s) || e.length !== 2)
1660
1683
  return;
1661
- const [i, r] = e, o = Rn(i), a = Rn(r);
1662
- if (o !== a)
1663
- if (Cn(o) && Cn(a))
1684
+ const [i, o] = e, r = Rn(i), a = Rn(o);
1685
+ if (r !== a)
1686
+ if (Cn(r) && Cn(a))
1664
1687
  for (let l = 0; l < e.length; l++) {
1665
1688
  const u = e[l];
1666
1689
  typeof u == "string" && (e[l] = parseFloat(u));
@@ -1671,8 +1694,8 @@ class Di extends ln {
1671
1694
  resolveNoneKeyframes() {
1672
1695
  const { unresolvedKeyframes: e, name: n } = this, s = [];
1673
1696
  for (let i = 0; i < e.length; i++)
1674
- Fr(e[i]) && s.push(i);
1675
- s.length && Yr(e, s, n);
1697
+ Fo(e[i]) && s.push(i);
1698
+ s.length && Zo(e, s, n);
1676
1699
  }
1677
1700
  measureInitialState() {
1678
1701
  const { element: e, unresolvedKeyframes: n, name: s } = this;
@@ -1687,10 +1710,10 @@ class Di extends ln {
1687
1710
  const { element: n, name: s, unresolvedKeyframes: i } = this;
1688
1711
  if (!n || !n.current)
1689
1712
  return;
1690
- const r = n.getValue(s);
1691
- r && r.jump(this.measuredOrigin, !1);
1692
- const o = i.length - 1, a = i[o];
1693
- i[o] = mt[s](n.measureViewportBox(), window.getComputedStyle(n.current)), a !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = a), !((e = this.removedTransforms) === null || e === void 0) && e.length && this.removedTransforms.forEach(([l, u]) => {
1713
+ const o = n.getValue(s);
1714
+ o && o.jump(this.measuredOrigin, !1);
1715
+ const r = i.length - 1, a = i[r];
1716
+ i[r] = mt[s](n.measureViewportBox(), window.getComputedStyle(n.current)), a !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = a), !((e = this.removedTransforms) === null || e === void 0) && e.length && this.removedTransforms.forEach(([l, u]) => {
1694
1717
  n.getValue(l).set(u);
1695
1718
  }), this.resolveNoneKeyframes();
1696
1719
  }
@@ -1698,7 +1721,7 @@ class Di extends ln {
1698
1721
  const En = (t, e) => e === "zIndex" ? !1 : !!(typeof t == "number" || Array.isArray(t) || typeof t == "string" && // It's animatable if we have a string
1699
1722
  (Z.test(t) || t === "0") && // And it contains numbers and/or colors
1700
1723
  !t.startsWith("url("));
1701
- function ia(t) {
1724
+ function ra(t) {
1702
1725
  const e = t[0];
1703
1726
  if (t.length === 1)
1704
1727
  return !0;
@@ -1712,24 +1735,24 @@ function oa(t, e, n, s) {
1712
1735
  return !1;
1713
1736
  if (e === "display" || e === "visibility")
1714
1737
  return !0;
1715
- const r = t[t.length - 1], o = En(i, e), a = En(r, e);
1716
- return !o || !a ? !1 : ia(t) || (n === "spring" || Ye(n)) && s;
1738
+ const o = t[t.length - 1], r = En(i, e), a = En(o, e);
1739
+ return !r || !a ? !1 : ra(t) || (n === "spring" || Ye(n)) && s;
1717
1740
  }
1718
- const ra = (t) => t !== null;
1741
+ const aa = (t) => t !== null;
1719
1742
  function te(t, { repeat: e, repeatType: n = "loop" }, s) {
1720
- const i = t.filter(ra), r = e && n !== "loop" && e % 2 === 1 ? 0 : i.length - 1;
1721
- return !r || s === void 0 ? i[r] : s;
1743
+ const i = t.filter(aa), o = e && n !== "loop" && e % 2 === 1 ? 0 : i.length - 1;
1744
+ return !o || s === void 0 ? i[o] : s;
1722
1745
  }
1723
- const aa = 40;
1746
+ const la = 40;
1724
1747
  class Mi {
1725
- constructor({ autoplay: e = !0, delay: n = 0, type: s = "keyframes", repeat: i = 0, repeatDelay: r = 0, repeatType: o = "loop", ...a }) {
1748
+ constructor({ autoplay: e = !0, delay: n = 0, type: s = "keyframes", repeat: i = 0, repeatDelay: o = 0, repeatType: r = "loop", ...a }) {
1726
1749
  this.isStopped = !1, this.hasAttemptedResolve = !1, this.createdAt = W.now(), this.options = {
1727
1750
  autoplay: e,
1728
1751
  delay: n,
1729
1752
  type: s,
1730
1753
  repeat: i,
1731
- repeatDelay: r,
1732
- repeatType: o,
1754
+ repeatDelay: o,
1755
+ repeatType: r,
1733
1756
  ...a
1734
1757
  }, this.updateFinishedPromise();
1735
1758
  }
@@ -1744,7 +1767,7 @@ class Mi {
1744
1767
  * to avoid a sudden jump into the animation.
1745
1768
  */
1746
1769
  calcStartTime() {
1747
- return this.resolvedAt ? this.resolvedAt - this.createdAt > aa ? this.resolvedAt : this.createdAt : this.createdAt;
1770
+ return this.resolvedAt ? this.resolvedAt - this.createdAt > la ? this.resolvedAt : this.createdAt : this.createdAt;
1748
1771
  }
1749
1772
  /**
1750
1773
  * A getter for resolved data. If keyframes are not yet resolved, accessing
@@ -1752,7 +1775,7 @@ class Mi {
1752
1775
  * This is a deoptimisation, but at its worst still batches read/writes.
1753
1776
  */
1754
1777
  get resolved() {
1755
- return !this._resolved && !this.hasAttemptedResolve && ta(), this._resolved;
1778
+ return !this._resolved && !this.hasAttemptedResolve && ea(), this._resolved;
1756
1779
  }
1757
1780
  /**
1758
1781
  * A method to be called when the keyframes resolver completes. This method
@@ -1761,9 +1784,9 @@ class Mi {
1761
1784
  */
1762
1785
  onKeyframesResolved(e, n) {
1763
1786
  this.resolvedAt = W.now(), this.hasAttemptedResolve = !0;
1764
- const { name: s, type: i, velocity: r, delay: o, onComplete: a, onUpdate: l, isGenerator: u } = this.options;
1765
- if (!u && !oa(e, s, i, r))
1766
- if (o)
1787
+ const { name: s, type: i, velocity: o, delay: r, onComplete: a, onUpdate: l, isGenerator: u } = this.options;
1788
+ if (!u && !oa(e, s, i, o))
1789
+ if (r)
1767
1790
  this.options.duration = 0;
1768
1791
  else {
1769
1792
  l && l(te(e, this.options, n)), a && a(), this.resolveFinishedPromise();
@@ -1796,22 +1819,22 @@ class Mi {
1796
1819
  }
1797
1820
  }
1798
1821
  const D = (t, e, n) => t + (e - t) * n;
1799
- function re(t, e, n) {
1822
+ function oe(t, e, n) {
1800
1823
  return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? t + (e - t) * 6 * n : n < 1 / 2 ? e : n < 2 / 3 ? t + (e - t) * (2 / 3 - n) * 6 : t;
1801
1824
  }
1802
- function la({ hue: t, saturation: e, lightness: n, alpha: s }) {
1825
+ function ua({ hue: t, saturation: e, lightness: n, alpha: s }) {
1803
1826
  t /= 360, e /= 100, n /= 100;
1804
- let i = 0, r = 0, o = 0;
1827
+ let i = 0, o = 0, r = 0;
1805
1828
  if (!e)
1806
- i = r = o = n;
1829
+ i = o = r = n;
1807
1830
  else {
1808
1831
  const a = n < 0.5 ? n * (1 + e) : n + e - n * e, l = 2 * n - a;
1809
- i = re(l, a, t + 1 / 3), r = re(l, a, t), o = re(l, a, t - 1 / 3);
1832
+ i = oe(l, a, t + 1 / 3), o = oe(l, a, t), r = oe(l, a, t - 1 / 3);
1810
1833
  }
1811
1834
  return {
1812
1835
  red: Math.round(i * 255),
1813
- green: Math.round(r * 255),
1814
- blue: Math.round(o * 255),
1836
+ green: Math.round(o * 255),
1837
+ blue: Math.round(r * 255),
1815
1838
  alpha: s
1816
1839
  };
1817
1840
  }
@@ -1821,68 +1844,68 @@ function Gt(t, e) {
1821
1844
  const ae = (t, e, n) => {
1822
1845
  const s = t * t, i = n * (e * e - s) + s;
1823
1846
  return i < 0 ? 0 : Math.sqrt(i);
1824
- }, ua = [Te, nt, lt], ca = (t) => ua.find((e) => e.test(t));
1847
+ }, ca = [Te, nt, lt], ha = (t) => ca.find((e) => e.test(t));
1825
1848
  function Ln(t) {
1826
- const e = ca(t);
1849
+ const e = ha(t);
1827
1850
  if (!e)
1828
1851
  return !1;
1829
1852
  let n = e.parse(t);
1830
- return e === lt && (n = la(n)), n;
1853
+ return e === lt && (n = ua(n)), n;
1831
1854
  }
1832
- const Fn = (t, e) => {
1855
+ const jn = (t, e) => {
1833
1856
  const n = Ln(t), s = Ln(e);
1834
1857
  if (!n || !s)
1835
1858
  return Gt(t, e);
1836
1859
  const i = { ...n };
1837
- return (r) => (i.red = ae(n.red, s.red, r), i.green = ae(n.green, s.green, r), i.blue = ae(n.blue, s.blue, r), i.alpha = D(n.alpha, s.alpha, r), nt.transform(i));
1838
- }, ha = (t, e) => (n) => e(t(n)), Ft = (...t) => t.reduce(ha), Ae = /* @__PURE__ */ new Set(["none", "hidden"]);
1839
- function fa(t, e) {
1860
+ return (o) => (i.red = ae(n.red, s.red, o), i.green = ae(n.green, s.green, o), i.blue = ae(n.blue, s.blue, o), i.alpha = D(n.alpha, s.alpha, o), nt.transform(i));
1861
+ }, fa = (t, e) => (n) => e(t(n)), Ft = (...t) => t.reduce(fa), Ae = /* @__PURE__ */ new Set(["none", "hidden"]);
1862
+ function da(t, e) {
1840
1863
  return Ae.has(t) ? (n) => n <= 0 ? t : e : (n) => n >= 1 ? e : t;
1841
1864
  }
1842
- function da(t, e) {
1865
+ function ma(t, e) {
1843
1866
  return (n) => D(t, e, n);
1844
1867
  }
1845
1868
  function un(t) {
1846
- return typeof t == "number" ? da : typeof t == "string" ? Ke(t) ? Gt : F.test(t) ? Fn : ga : Array.isArray(t) ? Ri : typeof t == "object" ? F.test(t) ? Fn : ma : Gt;
1869
+ return typeof t == "number" ? ma : typeof t == "string" ? Ke(t) ? Gt : j.test(t) ? jn : ya : Array.isArray(t) ? Ri : typeof t == "object" ? j.test(t) ? jn : pa : Gt;
1847
1870
  }
1848
1871
  function Ri(t, e) {
1849
- const n = [...t], s = n.length, i = t.map((r, o) => un(r)(r, e[o]));
1850
- return (r) => {
1851
- for (let o = 0; o < s; o++)
1852
- n[o] = i[o](r);
1872
+ const n = [...t], s = n.length, i = t.map((o, r) => un(o)(o, e[r]));
1873
+ return (o) => {
1874
+ for (let r = 0; r < s; r++)
1875
+ n[r] = i[r](o);
1853
1876
  return n;
1854
1877
  };
1855
1878
  }
1856
- function ma(t, e) {
1879
+ function pa(t, e) {
1857
1880
  const n = { ...t, ...e }, s = {};
1858
1881
  for (const i in n)
1859
1882
  t[i] !== void 0 && e[i] !== void 0 && (s[i] = un(t[i])(t[i], e[i]));
1860
1883
  return (i) => {
1861
- for (const r in s)
1862
- n[r] = s[r](i);
1884
+ for (const o in s)
1885
+ n[o] = s[o](i);
1863
1886
  return n;
1864
1887
  };
1865
1888
  }
1866
- function pa(t, e) {
1889
+ function ga(t, e) {
1867
1890
  var n;
1868
1891
  const s = [], i = { color: 0, var: 0, number: 0 };
1869
- for (let r = 0; r < e.values.length; r++) {
1870
- const o = e.types[r], a = t.indexes[o][i[o]], l = (n = t.values[a]) !== null && n !== void 0 ? n : 0;
1871
- s[r] = l, i[o]++;
1892
+ for (let o = 0; o < e.values.length; o++) {
1893
+ const r = e.types[o], a = t.indexes[r][i[r]], l = (n = t.values[a]) !== null && n !== void 0 ? n : 0;
1894
+ s[o] = l, i[r]++;
1872
1895
  }
1873
1896
  return s;
1874
1897
  }
1875
- const ga = (t, e) => {
1876
- const n = Z.createTransformer(e), s = Mt(t), i = Mt(e);
1877
- return s.indexes.var.length === i.indexes.var.length && s.indexes.color.length === i.indexes.color.length && s.indexes.number.length >= i.indexes.number.length ? Ae.has(t) && !i.values.length || Ae.has(e) && !s.values.length ? fa(t, e) : Ft(Ri(pa(s, i), i.values), n) : Gt(t, e);
1898
+ const ya = (t, e) => {
1899
+ const n = Z.createTransformer(e), s = Rt(t), i = Rt(e);
1900
+ return s.indexes.var.length === i.indexes.var.length && s.indexes.color.length === i.indexes.color.length && s.indexes.number.length >= i.indexes.number.length ? Ae.has(t) && !i.values.length || Ae.has(e) && !s.values.length ? da(t, e) : Ft(Ri(ga(s, i), i.values), n) : Gt(t, e);
1878
1901
  };
1879
1902
  function Ei(t, e, n) {
1880
1903
  return typeof t == "number" && typeof e == "number" && typeof n == "number" ? D(t, e, n) : un(t)(t, e);
1881
1904
  }
1882
- const ya = 5;
1905
+ const va = 5;
1883
1906
  function Li(t, e, n) {
1884
- const s = Math.max(e - ya, 0);
1885
- return oi(n - t(s), e - s);
1907
+ const s = Math.max(e - va, 0);
1908
+ return ri(n - t(s), e - s);
1886
1909
  }
1887
1910
  const M = {
1888
1911
  // Default spring physics
@@ -1913,22 +1936,22 @@ const M = {
1913
1936
  minDamping: 0.05,
1914
1937
  maxDamping: 1
1915
1938
  }, le = 1e-3;
1916
- function va({ duration: t = M.duration, bounce: e = M.bounce, velocity: n = M.velocity, mass: s = M.mass }) {
1917
- let i, r, o = 1 - e;
1918
- o = X(M.minDamping, M.maxDamping, o), t = X(M.minDuration, M.maxDuration, /* @__PURE__ */ H(t)), o < 1 ? (i = (u) => {
1919
- const c = u * o, h = c * t, f = c - n, d = we(u, o), m = Math.exp(-h);
1939
+ function xa({ duration: t = M.duration, bounce: e = M.bounce, velocity: n = M.velocity, mass: s = M.mass }) {
1940
+ let i, o, r = 1 - e;
1941
+ r = X(M.minDamping, M.maxDamping, r), t = X(M.minDuration, M.maxDuration, /* @__PURE__ */ H(t)), r < 1 ? (i = (u) => {
1942
+ const c = u * r, h = c * t, f = c - n, d = we(u, r), m = Math.exp(-h);
1920
1943
  return le - f / d * m;
1921
- }, r = (u) => {
1922
- const h = u * o * t, f = h * n + n, d = Math.pow(o, 2) * Math.pow(u, 2) * t, m = Math.exp(-h), p = we(Math.pow(u, 2), o);
1944
+ }, o = (u) => {
1945
+ const h = u * r * t, f = h * n + n, d = Math.pow(r, 2) * Math.pow(u, 2) * t, m = Math.exp(-h), p = we(Math.pow(u, 2), r);
1923
1946
  return (-i(u) + le > 0 ? -1 : 1) * ((f - d) * m) / p;
1924
1947
  }) : (i = (u) => {
1925
1948
  const c = Math.exp(-u * t), h = (u - n) * t + 1;
1926
1949
  return -le + c * h;
1927
- }, r = (u) => {
1950
+ }, o = (u) => {
1928
1951
  const c = Math.exp(-u * t), h = (n - u) * (t * t);
1929
1952
  return c * h;
1930
1953
  });
1931
- const a = 5 / t, l = Ta(i, r, a);
1954
+ const a = 5 / t, l = Pa(i, o, a);
1932
1955
  if (t = /* @__PURE__ */ G(t), isNaN(l))
1933
1956
  return {
1934
1957
  stiffness: M.stiffness,
@@ -1939,26 +1962,26 @@ function va({ duration: t = M.duration, bounce: e = M.bounce, velocity: n = M.ve
1939
1962
  const u = Math.pow(l, 2) * s;
1940
1963
  return {
1941
1964
  stiffness: u,
1942
- damping: o * 2 * Math.sqrt(s * u),
1965
+ damping: r * 2 * Math.sqrt(s * u),
1943
1966
  duration: t
1944
1967
  };
1945
1968
  }
1946
1969
  }
1947
- const xa = 12;
1948
- function Ta(t, e, n) {
1970
+ const Ta = 12;
1971
+ function Pa(t, e, n) {
1949
1972
  let s = n;
1950
- for (let i = 1; i < xa; i++)
1973
+ for (let i = 1; i < Ta; i++)
1951
1974
  s = s - t(s) / e(s);
1952
1975
  return s;
1953
1976
  }
1954
1977
  function we(t, e) {
1955
1978
  return t * Math.sqrt(1 - e * e);
1956
1979
  }
1957
- const Pa = ["duration", "bounce"], Sa = ["stiffness", "damping", "mass"];
1958
- function jn(t, e) {
1980
+ const Sa = ["duration", "bounce"], ba = ["stiffness", "damping", "mass"];
1981
+ function Fn(t, e) {
1959
1982
  return e.some((n) => t[n] !== void 0);
1960
1983
  }
1961
- function ba(t) {
1984
+ function Aa(t) {
1962
1985
  let e = {
1963
1986
  velocity: M.velocity,
1964
1987
  stiffness: M.stiffness,
@@ -1967,17 +1990,17 @@ function ba(t) {
1967
1990
  isResolvedFromDuration: !1,
1968
1991
  ...t
1969
1992
  };
1970
- if (!jn(t, Sa) && jn(t, Pa))
1993
+ if (!Fn(t, ba) && Fn(t, Sa))
1971
1994
  if (t.visualDuration) {
1972
- const n = t.visualDuration, s = 2 * Math.PI / (n * 1.2), i = s * s, r = 2 * X(0.05, 1, 1 - (t.bounce || 0)) * Math.sqrt(i);
1995
+ const n = t.visualDuration, s = 2 * Math.PI / (n * 1.2), i = s * s, o = 2 * X(0.05, 1, 1 - (t.bounce || 0)) * Math.sqrt(i);
1973
1996
  e = {
1974
1997
  ...e,
1975
1998
  mass: M.mass,
1976
1999
  stiffness: i,
1977
- damping: r
2000
+ damping: o
1978
2001
  };
1979
2002
  } else {
1980
- const n = va(t);
2003
+ const n = xa(t);
1981
2004
  e = {
1982
2005
  ...e,
1983
2006
  ...n,
@@ -1986,32 +2009,32 @@ function ba(t) {
1986
2009
  }
1987
2010
  return e;
1988
2011
  }
1989
- function Fi(t = M.visualDuration, e = M.bounce) {
2012
+ function ji(t = M.visualDuration, e = M.bounce) {
1990
2013
  const n = typeof t != "object" ? {
1991
2014
  visualDuration: t,
1992
2015
  keyframes: [0, 1],
1993
2016
  bounce: e
1994
2017
  } : t;
1995
2018
  let { restSpeed: s, restDelta: i } = n;
1996
- const r = n.keyframes[0], o = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: r }, { stiffness: l, damping: u, mass: c, duration: h, velocity: f, isResolvedFromDuration: d } = ba({
2019
+ const o = n.keyframes[0], r = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: o }, { stiffness: l, damping: u, mass: c, duration: h, velocity: f, isResolvedFromDuration: d } = Aa({
1997
2020
  ...n,
1998
2021
  velocity: -/* @__PURE__ */ H(n.velocity || 0)
1999
- }), m = f || 0, p = u / (2 * Math.sqrt(l * c)), y = o - r, g = /* @__PURE__ */ H(Math.sqrt(l / c)), v = Math.abs(y) < 5;
2022
+ }), m = f || 0, p = u / (2 * Math.sqrt(l * c)), y = r - o, g = /* @__PURE__ */ H(Math.sqrt(l / c)), v = Math.abs(y) < 5;
2000
2023
  s || (s = v ? M.restSpeed.granular : M.restSpeed.default), i || (i = v ? M.restDelta.granular : M.restDelta.default);
2001
2024
  let T;
2002
2025
  if (p < 1) {
2003
2026
  const S = we(g, p);
2004
2027
  T = (V) => {
2005
2028
  const E = Math.exp(-p * g * V);
2006
- return o - E * ((m + p * g * y) / S * Math.sin(S * V) + y * Math.cos(S * V));
2029
+ return r - E * ((m + p * g * y) / S * Math.sin(S * V) + y * Math.cos(S * V));
2007
2030
  };
2008
2031
  } else if (p === 1)
2009
- T = (S) => o - Math.exp(-g * S) * (y + (m + g * y) * S);
2032
+ T = (S) => r - Math.exp(-g * S) * (y + (m + g * y) * S);
2010
2033
  else {
2011
2034
  const S = g * Math.sqrt(p * p - 1);
2012
2035
  T = (V) => {
2013
2036
  const E = Math.exp(-p * g * V), b = Math.min(S * V, 300);
2014
- return o - E * ((m + p * g * y) * Math.sinh(b) + S * y * Math.cosh(b)) / S;
2037
+ return r - E * ((m + p * g * y) * Math.sinh(b) + S * y * Math.cosh(b)) / S;
2015
2038
  };
2016
2039
  }
2017
2040
  const w = {
@@ -2023,10 +2046,10 @@ function Fi(t = M.visualDuration, e = M.bounce) {
2023
2046
  else {
2024
2047
  let E = 0;
2025
2048
  p < 1 && (E = S === 0 ? /* @__PURE__ */ G(m) : Li(T, S, V));
2026
- const b = Math.abs(E) <= s, k = Math.abs(o - V) <= i;
2049
+ const b = Math.abs(E) <= s, k = Math.abs(r - V) <= i;
2027
2050
  a.done = b && k;
2028
2051
  }
2029
- return a.value = a.done ? o : V, a;
2052
+ return a.value = a.done ? r : V, a;
2030
2053
  },
2031
2054
  toString: () => {
2032
2055
  const S = Math.min(Zs(w), ye), V = Qs((E) => w.next(S * E).value, S, 30);
@@ -2035,13 +2058,13 @@ function Fi(t = M.visualDuration, e = M.bounce) {
2035
2058
  };
2036
2059
  return w;
2037
2060
  }
2038
- function Bn({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 325, bounceDamping: i = 10, bounceStiffness: r = 500, modifyTarget: o, min: a, max: l, restDelta: u = 0.5, restSpeed: c }) {
2061
+ function Bn({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 325, bounceDamping: i = 10, bounceStiffness: o = 500, modifyTarget: r, min: a, max: l, restDelta: u = 0.5, restSpeed: c }) {
2039
2062
  const h = t[0], f = {
2040
2063
  done: !1,
2041
2064
  value: h
2042
2065
  }, d = (b) => a !== void 0 && b < a || l !== void 0 && b > l, m = (b) => a === void 0 ? l : l === void 0 || Math.abs(a - b) < Math.abs(l - b) ? a : l;
2043
2066
  let p = n * e;
2044
- const y = h + p, g = o === void 0 ? y : o(y);
2067
+ const y = h + p, g = r === void 0 ? y : r(y);
2045
2068
  g !== y && (p = g - h);
2046
2069
  const v = (b) => -p * Math.exp(-b / s), T = (b) => g + v(b), w = (b) => {
2047
2070
  const k = v(b), N = T(b);
@@ -2049,12 +2072,12 @@ function Bn({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 3
2049
2072
  };
2050
2073
  let S, V;
2051
2074
  const E = (b) => {
2052
- d(f.value) && (S = b, V = Fi({
2075
+ d(f.value) && (S = b, V = ji({
2053
2076
  keyframes: [f.value, m(f.value)],
2054
2077
  velocity: Li(T, b, f.value),
2055
2078
  // TODO: This should be passing * 1000
2056
2079
  damping: i,
2057
- stiffness: r,
2080
+ stiffness: o,
2058
2081
  restDelta: u,
2059
2082
  restSpeed: c
2060
2083
  }));
@@ -2067,11 +2090,11 @@ function Bn({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 3
2067
2090
  }
2068
2091
  };
2069
2092
  }
2070
- const Aa = /* @__PURE__ */ Lt(0.42, 0, 1, 1), wa = /* @__PURE__ */ Lt(0, 0, 0.58, 1), ji = /* @__PURE__ */ Lt(0.42, 0, 0.58, 1), Va = (t) => Array.isArray(t) && typeof t[0] != "number", Ca = {
2093
+ const wa = /* @__PURE__ */ jt(0.42, 0, 1, 1), Va = /* @__PURE__ */ jt(0, 0, 0.58, 1), Fi = /* @__PURE__ */ jt(0.42, 0, 0.58, 1), Ca = (t) => Array.isArray(t) && typeof t[0] != "number", Da = {
2071
2094
  linear: I,
2072
- easeIn: Aa,
2073
- easeInOut: ji,
2074
- easeOut: wa,
2095
+ easeIn: wa,
2096
+ easeInOut: Fi,
2097
+ easeOut: Va,
2075
2098
  circIn: sn,
2076
2099
  circInOut: mi,
2077
2100
  circOut: di,
@@ -2083,33 +2106,33 @@ const Aa = /* @__PURE__ */ Lt(0.42, 0, 1, 1), wa = /* @__PURE__ */ Lt(0, 0, 0.58
2083
2106
  if (Ze(t)) {
2084
2107
  Es(t.length === 4);
2085
2108
  const [e, n, s, i] = t;
2086
- return Lt(e, n, s, i);
2109
+ return jt(e, n, s, i);
2087
2110
  } else if (typeof t == "string")
2088
- return Ca[t];
2111
+ return Da[t];
2089
2112
  return t;
2090
2113
  };
2091
- function Da(t, e, n) {
2092
- const s = [], i = n || Ei, r = t.length - 1;
2093
- for (let o = 0; o < r; o++) {
2094
- let a = i(t[o], t[o + 1]);
2114
+ function Ma(t, e, n) {
2115
+ const s = [], i = n || Ei, o = t.length - 1;
2116
+ for (let r = 0; r < o; r++) {
2117
+ let a = i(t[r], t[r + 1]);
2095
2118
  if (e) {
2096
- const l = Array.isArray(e) ? e[o] || I : e;
2119
+ const l = Array.isArray(e) ? e[r] || I : e;
2097
2120
  a = Ft(l, a);
2098
2121
  }
2099
2122
  s.push(a);
2100
2123
  }
2101
2124
  return s;
2102
2125
  }
2103
- function Ma(t, e, { clamp: n = !0, ease: s, mixer: i } = {}) {
2104
- const r = t.length;
2105
- if (Es(r === e.length), r === 1)
2126
+ function Ra(t, e, { clamp: n = !0, ease: s, mixer: i } = {}) {
2127
+ const o = t.length;
2128
+ if (Es(o === e.length), o === 1)
2106
2129
  return () => e[0];
2107
- if (r === 2 && e[0] === e[1])
2130
+ if (o === 2 && e[0] === e[1])
2108
2131
  return () => e[1];
2109
- const o = t[0] === t[1];
2110
- t[0] > t[r - 1] && (t = [...t].reverse(), e = [...e].reverse());
2111
- const a = Da(e, s, i), l = a.length, u = (c) => {
2112
- if (o && c < t[0])
2132
+ const r = t[0] === t[1];
2133
+ t[0] > t[o - 1] && (t = [...t].reverse(), e = [...e].reverse());
2134
+ const a = Ma(e, s, i), l = a.length, u = (c) => {
2135
+ if (r && c < t[0])
2113
2136
  return e[0];
2114
2137
  let h = 0;
2115
2138
  if (l > 1)
@@ -2118,43 +2141,43 @@ function Ma(t, e, { clamp: n = !0, ease: s, mixer: i } = {}) {
2118
2141
  const f = /* @__PURE__ */ ft(t[h], t[h + 1], c);
2119
2142
  return a[h](f);
2120
2143
  };
2121
- return n ? (c) => u(X(t[0], t[r - 1], c)) : u;
2144
+ return n ? (c) => u(X(t[0], t[o - 1], c)) : u;
2122
2145
  }
2123
- function Ra(t, e) {
2146
+ function Ea(t, e) {
2124
2147
  const n = t[t.length - 1];
2125
2148
  for (let s = 1; s <= e; s++) {
2126
2149
  const i = /* @__PURE__ */ ft(0, e, s);
2127
2150
  t.push(D(n, 1, i));
2128
2151
  }
2129
2152
  }
2130
- function Ea(t) {
2153
+ function La(t) {
2131
2154
  const e = [0];
2132
- return Ra(e, t.length - 1), e;
2155
+ return Ea(e, t.length - 1), e;
2133
2156
  }
2134
- function La(t, e) {
2157
+ function ja(t, e) {
2135
2158
  return t.map((n) => n * e);
2136
2159
  }
2137
2160
  function Fa(t, e) {
2138
- return t.map(() => e || ji).splice(0, t.length - 1);
2161
+ return t.map(() => e || Fi).splice(0, t.length - 1);
2139
2162
  }
2140
2163
  function Ht({ duration: t = 300, keyframes: e, times: n, ease: s = "easeInOut" }) {
2141
- const i = Va(s) ? s.map(kn) : kn(s), r = {
2164
+ const i = Ca(s) ? s.map(kn) : kn(s), o = {
2142
2165
  done: !1,
2143
2166
  value: e[0]
2144
- }, o = La(
2167
+ }, r = ja(
2145
2168
  // Only use the provided offsets if they're the correct length
2146
2169
  // TODO Maybe we should warn here if there's a length mismatch
2147
- n && n.length === e.length ? n : Ea(e),
2170
+ n && n.length === e.length ? n : La(e),
2148
2171
  t
2149
- ), a = Ma(o, e, {
2172
+ ), a = Ra(r, e, {
2150
2173
  ease: Array.isArray(i) ? i : Fa(e, i)
2151
2174
  });
2152
2175
  return {
2153
2176
  calculatedDuration: t,
2154
- next: (l) => (r.value = a(l), r.done = l >= t, r)
2177
+ next: (l) => (o.value = a(l), o.done = l >= t, o)
2155
2178
  };
2156
2179
  }
2157
- const ja = (t) => {
2180
+ const Ba = (t) => {
2158
2181
  const e = ({ timestamp: n }) => t(n);
2159
2182
  return {
2160
2183
  start: () => C.update(e, !0),
@@ -2165,13 +2188,13 @@ const ja = (t) => {
2165
2188
  */
2166
2189
  now: () => L.isProcessing ? L.timestamp : W.now()
2167
2190
  };
2168
- }, Ba = {
2191
+ }, ka = {
2169
2192
  decay: Bn,
2170
2193
  inertia: Bn,
2171
2194
  tween: Ht,
2172
2195
  keyframes: Ht,
2173
- spring: Fi
2174
- }, ka = (t) => t / 100;
2196
+ spring: ji
2197
+ }, Ia = (t) => t / 100;
2175
2198
  class cn extends Mi {
2176
2199
  constructor(e) {
2177
2200
  super(e), this.holdTime = null, this.cancelTime = null, this.currentTime = 0, this.playbackSpeed = 1, this.pendingPlayState = "running", this.startTime = null, this.state = "idle", this.stop = () => {
@@ -2181,21 +2204,21 @@ class cn extends Mi {
2181
2204
  const { onStop: l } = this.options;
2182
2205
  l && l();
2183
2206
  };
2184
- const { name: n, motionValue: s, element: i, keyframes: r } = this.options, o = (i == null ? void 0 : i.KeyframeResolver) || ln, a = (l, u) => this.onKeyframesResolved(l, u);
2185
- this.resolver = new o(r, a, n, s, i), this.resolver.scheduleResolve();
2207
+ const { name: n, motionValue: s, element: i, keyframes: o } = this.options, r = (i == null ? void 0 : i.KeyframeResolver) || ln, a = (l, u) => this.onKeyframesResolved(l, u);
2208
+ this.resolver = new r(o, a, n, s, i), this.resolver.scheduleResolve();
2186
2209
  }
2187
2210
  flatten() {
2188
2211
  super.flatten(), this._resolved && Object.assign(this._resolved, this.initPlayback(this._resolved.keyframes));
2189
2212
  }
2190
2213
  initPlayback(e) {
2191
- const { type: n = "keyframes", repeat: s = 0, repeatDelay: i = 0, repeatType: r, velocity: o = 0 } = this.options, a = Ye(n) ? n : Ba[n] || Ht;
2214
+ const { type: n = "keyframes", repeat: s = 0, repeatDelay: i = 0, repeatType: o, velocity: r = 0 } = this.options, a = Ye(n) ? n : ka[n] || Ht;
2192
2215
  let l, u;
2193
- a !== Ht && typeof e[0] != "number" && (l = Ft(ka, Ei(e[0], e[1])), e = [0, 100]);
2216
+ a !== Ht && typeof e[0] != "number" && (l = Ft(Ia, Ei(e[0], e[1])), e = [0, 100]);
2194
2217
  const c = a({ ...this.options, keyframes: e });
2195
- r === "mirror" && (u = a({
2218
+ o === "mirror" && (u = a({
2196
2219
  ...this.options,
2197
2220
  keyframes: [...e].reverse(),
2198
- velocity: -o
2221
+ velocity: -r
2199
2222
  })), c.calculatedDuration === null && (c.calculatedDuration = Zs(c));
2200
2223
  const { calculatedDuration: h } = c, f = h + i, d = f * (s + 1) - i;
2201
2224
  return {
@@ -2217,18 +2240,18 @@ class cn extends Mi {
2217
2240
  const { keyframes: b } = this.options;
2218
2241
  return { done: !0, value: b[b.length - 1] };
2219
2242
  }
2220
- const { finalKeyframe: i, generator: r, mirroredGenerator: o, mapPercentToKeyframes: a, keyframes: l, calculatedDuration: u, totalDuration: c, resolvedDuration: h } = s;
2243
+ const { finalKeyframe: i, generator: o, mirroredGenerator: r, mapPercentToKeyframes: a, keyframes: l, calculatedDuration: u, totalDuration: c, resolvedDuration: h } = s;
2221
2244
  if (this.startTime === null)
2222
- return r.next(0);
2245
+ return o.next(0);
2223
2246
  const { delay: f, repeat: d, repeatType: m, repeatDelay: p, onUpdate: y } = this.options;
2224
2247
  this.speed > 0 ? this.startTime = Math.min(this.startTime, e) : this.speed < 0 && (this.startTime = Math.min(e - c / this.speed, this.startTime)), n ? this.currentTime = e : this.holdTime !== null ? this.currentTime = this.holdTime : this.currentTime = Math.round(e - this.startTime) * this.speed;
2225
2248
  const g = this.currentTime - f * (this.speed >= 0 ? 1 : -1), v = this.speed >= 0 ? g < 0 : g > c;
2226
2249
  this.currentTime = Math.max(g, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = c);
2227
- let T = this.currentTime, w = r;
2250
+ let T = this.currentTime, w = o;
2228
2251
  if (d) {
2229
2252
  const b = Math.min(this.currentTime, c) / h;
2230
2253
  let k = Math.floor(b), N = b % 1;
2231
- !N && b >= 1 && (N = 1), N === 1 && k--, k = Math.min(k, d + 1), !!(k % 2) && (m === "reverse" ? (N = 1 - N, p && (N -= p / h)) : m === "mirror" && (w = o)), T = X(0, 1, N) * h;
2254
+ !N && b >= 1 && (N = 1), N === 1 && k--, k = Math.min(k, d + 1), !!(k % 2) && (m === "reverse" ? (N = 1 - N, p && (N -= p / h)) : m === "mirror" && (w = r)), T = X(0, 1, N) * h;
2232
2255
  }
2233
2256
  const S = v ? { done: !1, value: l[0] } : w.next(T);
2234
2257
  a && (S.value = a(S.value));
@@ -2261,8 +2284,8 @@ class cn extends Mi {
2261
2284
  }
2262
2285
  if (this.isStopped)
2263
2286
  return;
2264
- const { driver: e = ja, onPlay: n, startTime: s } = this.options;
2265
- this.driver || (this.driver = e((r) => this.tick(r))), n && n();
2287
+ const { driver: e = Ba, onPlay: n, startTime: s } = this.options;
2288
+ this.driver || (this.driver = e((o) => this.tick(o))), n && n();
2266
2289
  const i = this.driver.now();
2267
2290
  this.holdTime !== null ? this.startTime = i - this.holdTime : this.startTime ? this.state === "finished" && (this.startTime = i) : this.startTime = s ?? this.calcStartTime(), this.state === "finished" && this.updateFinishedPromise(), this.cancelTime = this.startTime, this.holdTime = null, this.state = "running", this.driver.start();
2268
2291
  }
@@ -2295,7 +2318,7 @@ class cn extends Mi {
2295
2318
  return this.startTime = 0, this.tick(e, !0);
2296
2319
  }
2297
2320
  }
2298
- const Ia = /* @__PURE__ */ new Set([
2321
+ const Oa = /* @__PURE__ */ new Set([
2299
2322
  "opacity",
2300
2323
  "clipPath",
2301
2324
  "filter",
@@ -2304,7 +2327,7 @@ const Ia = /* @__PURE__ */ new Set([
2304
2327
  // or until we implement support for linear() easing.
2305
2328
  // "background-color"
2306
2329
  ]);
2307
- function Oa(t, e, n, { delay: s = 0, duration: i = 300, repeat: r = 0, repeatType: o = "loop", ease: a = "easeInOut", times: l } = {}) {
2330
+ function Na(t, e, n, { delay: s = 0, duration: i = 300, repeat: o = 0, repeatType: r = "loop", ease: a = "easeInOut", times: l } = {}) {
2308
2331
  const u = { [e]: n };
2309
2332
  l && (u.offset = l);
2310
2333
  const c = ti(a, i);
@@ -2313,15 +2336,15 @@ function Oa(t, e, n, { delay: s = 0, duration: i = 300, repeat: r = 0, repeatTyp
2313
2336
  duration: i,
2314
2337
  easing: Array.isArray(c) ? "linear" : c,
2315
2338
  fill: "both",
2316
- iterations: r + 1,
2317
- direction: o === "reverse" ? "alternate" : "normal"
2339
+ iterations: o + 1,
2340
+ direction: r === "reverse" ? "alternate" : "normal"
2318
2341
  });
2319
2342
  }
2320
- const Na = /* @__PURE__ */ Be(() => Object.hasOwnProperty.call(Element.prototype, "animate")), Xt = 10, Ua = 2e4;
2321
- function _a(t) {
2343
+ const Ua = /* @__PURE__ */ Be(() => Object.hasOwnProperty.call(Element.prototype, "animate")), Xt = 10, _a = 2e4;
2344
+ function Ka(t) {
2322
2345
  return Ye(t.type) || t.type === "spring" || !Js(t.ease);
2323
2346
  }
2324
- function Ka(t, e) {
2347
+ function za(t, e) {
2325
2348
  const n = new cn({
2326
2349
  ...e,
2327
2350
  keyframes: t,
@@ -2331,13 +2354,13 @@ function Ka(t, e) {
2331
2354
  });
2332
2355
  let s = { done: !1, value: t[0] };
2333
2356
  const i = [];
2334
- let r = 0;
2335
- for (; !s.done && r < Ua; )
2336
- s = n.sample(r), i.push(s.value), r += Xt;
2357
+ let o = 0;
2358
+ for (; !s.done && o < _a; )
2359
+ s = n.sample(o), i.push(s.value), o += Xt;
2337
2360
  return {
2338
2361
  times: void 0,
2339
2362
  keyframes: i,
2340
- duration: r - Xt,
2363
+ duration: o - Xt,
2341
2364
  ease: "linear"
2342
2365
  };
2343
2366
  }
@@ -2346,24 +2369,24 @@ const Bi = {
2346
2369
  backInOut: hi,
2347
2370
  circInOut: mi
2348
2371
  };
2349
- function za(t) {
2372
+ function Wa(t) {
2350
2373
  return t in Bi;
2351
2374
  }
2352
2375
  class In extends Mi {
2353
2376
  constructor(e) {
2354
2377
  super(e);
2355
- const { name: n, motionValue: s, element: i, keyframes: r } = this.options;
2356
- this.resolver = new Di(r, (o, a) => this.onKeyframesResolved(o, a), n, s, i), this.resolver.scheduleResolve();
2378
+ const { name: n, motionValue: s, element: i, keyframes: o } = this.options;
2379
+ this.resolver = new Di(o, (r, a) => this.onKeyframesResolved(r, a), n, s, i), this.resolver.scheduleResolve();
2357
2380
  }
2358
2381
  initPlayback(e, n) {
2359
- let { duration: s = 300, times: i, ease: r, type: o, motionValue: a, name: l, startTime: u } = this.options;
2382
+ let { duration: s = 300, times: i, ease: o, type: r, motionValue: a, name: l, startTime: u } = this.options;
2360
2383
  if (!a.owner || !a.owner.current)
2361
2384
  return !1;
2362
- if (typeof r == "string" && $t() && za(r) && (r = Bi[r]), _a(this.options)) {
2363
- const { onComplete: h, onUpdate: f, motionValue: d, element: m, ...p } = this.options, y = Ka(e, p);
2364
- e = y.keyframes, e.length === 1 && (e[1] = e[0]), s = y.duration, i = y.times, r = y.ease, o = "keyframes";
2385
+ if (typeof o == "string" && $t() && Wa(o) && (o = Bi[o]), Ka(this.options)) {
2386
+ const { onComplete: h, onUpdate: f, motionValue: d, element: m, ...p } = this.options, y = za(e, p);
2387
+ e = y.keyframes, e.length === 1 && (e[1] = e[0]), s = y.duration, i = y.times, o = y.ease, r = "keyframes";
2365
2388
  }
2366
- const c = Oa(a.owner.current, l, e, { ...this.options, duration: s, times: i, ease: r });
2389
+ const c = Na(a.owner.current, l, e, { ...this.options, duration: s, times: i, ease: o });
2367
2390
  return c.startTime = u ?? this.calcStartTime(), this.pendingTimeline ? (Pn(c, this.pendingTimeline), this.pendingTimeline = void 0) : c.onfinish = () => {
2368
2391
  const { onComplete: h } = this.options;
2369
2392
  a.set(te(e, this.options, n)), h && h(), this.cancel(), this.resolveFinishedPromise();
@@ -2371,8 +2394,8 @@ class In extends Mi {
2371
2394
  animation: c,
2372
2395
  duration: s,
2373
2396
  times: i,
2374
- type: o,
2375
- ease: r,
2397
+ type: r,
2398
+ ease: o,
2376
2399
  keyframes: e
2377
2400
  };
2378
2401
  }
@@ -2464,7 +2487,7 @@ class In extends Mi {
2464
2487
  const { resolved: e } = this;
2465
2488
  if (!e)
2466
2489
  return;
2467
- const { animation: n, keyframes: s, duration: i, type: r, ease: o, times: a } = e;
2490
+ const { animation: n, keyframes: s, duration: i, type: o, ease: r, times: a } = e;
2468
2491
  if (n.playState === "idle" || n.playState === "finished")
2469
2492
  return;
2470
2493
  if (this.time) {
@@ -2472,8 +2495,8 @@ class In extends Mi {
2472
2495
  ...d,
2473
2496
  keyframes: s,
2474
2497
  duration: i,
2475
- type: r,
2476
- ease: o,
2498
+ type: o,
2499
+ ease: r,
2477
2500
  times: a,
2478
2501
  isGenerator: !0
2479
2502
  }), p = /* @__PURE__ */ G(this.time);
@@ -2491,39 +2514,39 @@ class In extends Mi {
2491
2514
  e && e.animation.cancel();
2492
2515
  }
2493
2516
  static supports(e) {
2494
- const { motionValue: n, name: s, repeatDelay: i, repeatType: r, damping: o, type: a } = e;
2517
+ const { motionValue: n, name: s, repeatDelay: i, repeatType: o, damping: r, type: a } = e;
2495
2518
  if (!n || !n.owner || !(n.owner.current instanceof HTMLElement))
2496
2519
  return !1;
2497
2520
  const { onUpdate: l, transformTemplate: u } = n.owner.getProps();
2498
- return Na() && s && Ia.has(s) && /**
2521
+ return Ua() && s && Oa.has(s) && /**
2499
2522
  * If we're outputting values to onUpdate then we can't use WAAPI as there's
2500
2523
  * no way to read the value from WAAPI every frame.
2501
2524
  */
2502
- !l && !u && !i && r !== "mirror" && o !== 0 && a !== "inertia";
2525
+ !l && !u && !i && o !== "mirror" && r !== 0 && a !== "inertia";
2503
2526
  }
2504
2527
  }
2505
- const Wa = {
2528
+ const $a = {
2506
2529
  type: "spring",
2507
2530
  stiffness: 500,
2508
2531
  damping: 25,
2509
2532
  restSpeed: 10
2510
- }, $a = (t) => ({
2533
+ }, Ga = (t) => ({
2511
2534
  type: "spring",
2512
2535
  stiffness: 550,
2513
2536
  damping: t === 0 ? 2 * Math.sqrt(550) : 30,
2514
2537
  restSpeed: 10
2515
- }), Ga = {
2538
+ }), Ha = {
2516
2539
  type: "keyframes",
2517
2540
  duration: 0.8
2518
- }, Ha = {
2541
+ }, Xa = {
2519
2542
  type: "keyframes",
2520
2543
  ease: [0.25, 0.1, 0.35, 1],
2521
2544
  duration: 0.3
2522
- }, Xa = (t, { keyframes: e }) => e.length > 2 ? Ga : it.has(t) ? t.startsWith("scale") ? $a(e[1]) : Wa : Ha;
2523
- function qa({ when: t, delay: e, delayChildren: n, staggerChildren: s, staggerDirection: i, repeat: r, repeatType: o, repeatDelay: a, from: l, elapsed: u, ...c }) {
2545
+ }, qa = (t, { keyframes: e }) => e.length > 2 ? Ha : it.has(t) ? t.startsWith("scale") ? Ga(e[1]) : $a : Xa;
2546
+ function Ya({ when: t, delay: e, delayChildren: n, staggerChildren: s, staggerDirection: i, repeat: o, repeatType: r, repeatDelay: a, from: l, elapsed: u, ...c }) {
2524
2547
  return !!Object.keys(c).length;
2525
2548
  }
2526
- const hn = (t, e, n, s = {}, i, r) => (o) => {
2549
+ const hn = (t, e, n, s = {}, i, o) => (r) => {
2527
2550
  const a = qe(s, t) || {}, l = a.delay || s.delay || 0;
2528
2551
  let { elapsed: u = 0 } = s;
2529
2552
  u = u - /* @__PURE__ */ G(l);
@@ -2537,46 +2560,46 @@ const hn = (t, e, n, s = {}, i, r) => (o) => {
2537
2560
  e.set(f), a.onUpdate && a.onUpdate(f);
2538
2561
  },
2539
2562
  onComplete: () => {
2540
- o(), a.onComplete && a.onComplete();
2563
+ r(), a.onComplete && a.onComplete();
2541
2564
  },
2542
2565
  name: t,
2543
2566
  motionValue: e,
2544
- element: r ? void 0 : i
2567
+ element: o ? void 0 : i
2545
2568
  };
2546
- qa(a) || (c = {
2569
+ Ya(a) || (c = {
2547
2570
  ...c,
2548
- ...Xa(t, c)
2571
+ ...qa(t, c)
2549
2572
  }), c.duration && (c.duration = /* @__PURE__ */ G(c.duration)), c.repeatDelay && (c.repeatDelay = /* @__PURE__ */ G(c.repeatDelay)), c.from !== void 0 && (c.keyframes[0] = c.from);
2550
2573
  let h = !1;
2551
- if ((c.type === !1 || c.duration === 0 && !c.repeatDelay) && (c.duration = 0, c.delay === 0 && (h = !0)), h && !r && e.get() !== void 0) {
2574
+ if ((c.type === !1 || c.duration === 0 && !c.repeatDelay) && (c.duration = 0, c.delay === 0 && (h = !0)), h && !o && e.get() !== void 0) {
2552
2575
  const f = te(c.keyframes, a);
2553
2576
  if (f !== void 0)
2554
2577
  return C.update(() => {
2555
2578
  c.onUpdate(f), c.onComplete();
2556
- }), new mr([]);
2579
+ }), new po([]);
2557
2580
  }
2558
- return !r && In.supports(c) ? new In(c) : new cn(c);
2581
+ return !o && In.supports(c) ? new In(c) : new cn(c);
2559
2582
  };
2560
- function Ya({ protectedKeys: t, needsAnimating: e }, n) {
2583
+ function Za({ protectedKeys: t, needsAnimating: e }, n) {
2561
2584
  const s = t.hasOwnProperty(n) && e[n] !== !0;
2562
2585
  return e[n] = !1, s;
2563
2586
  }
2564
2587
  function ki(t, e, { delay: n = 0, transitionOverride: s, type: i } = {}) {
2565
- var r;
2566
- let { transition: o = t.getDefaultTransition(), transitionEnd: a, ...l } = e;
2567
- s && (o = s);
2588
+ var o;
2589
+ let { transition: r = t.getDefaultTransition(), transitionEnd: a, ...l } = e;
2590
+ s && (r = s);
2568
2591
  const u = [], c = i && t.animationState && t.animationState.getState()[i];
2569
2592
  for (const h in l) {
2570
- const f = t.getValue(h, (r = t.latestValues[h]) !== null && r !== void 0 ? r : null), d = l[h];
2571
- if (d === void 0 || c && Ya(c, h))
2593
+ const f = t.getValue(h, (o = t.latestValues[h]) !== null && o !== void 0 ? o : null), d = l[h];
2594
+ if (d === void 0 || c && Za(c, h))
2572
2595
  continue;
2573
2596
  const m = {
2574
2597
  delay: n,
2575
- ...qe(o || {}, h)
2598
+ ...qe(r || {}, h)
2576
2599
  };
2577
2600
  let p = !1;
2578
2601
  if (window.MotionHandoffAnimation) {
2579
- const g = ri(t);
2602
+ const g = oi(t);
2580
2603
  if (g) {
2581
2604
  const v = window.MotionHandoffAnimation(g, h, C);
2582
2605
  v !== null && (m.startTime = v, p = !0);
@@ -2588,42 +2611,42 @@ function ki(t, e, { delay: n = 0, transitionOverride: s, type: i } = {}) {
2588
2611
  }
2589
2612
  return a && Promise.all(u).then(() => {
2590
2613
  C.update(() => {
2591
- a && Dr(t, a);
2614
+ a && Mo(t, a);
2592
2615
  });
2593
2616
  }), u;
2594
2617
  }
2595
2618
  function Ve(t, e, n = {}) {
2596
2619
  var s;
2597
2620
  const i = Jt(t, e, n.type === "exit" ? (s = t.presenceContext) === null || s === void 0 ? void 0 : s.custom : void 0);
2598
- let { transition: r = t.getDefaultTransition() || {} } = i || {};
2599
- n.transitionOverride && (r = n.transitionOverride);
2600
- const o = i ? () => Promise.all(ki(t, i, n)) : () => Promise.resolve(), a = t.variantChildren && t.variantChildren.size ? (u = 0) => {
2601
- const { delayChildren: c = 0, staggerChildren: h, staggerDirection: f } = r;
2602
- return Za(t, e, c + u, h, f, n);
2603
- } : () => Promise.resolve(), { when: l } = r;
2621
+ let { transition: o = t.getDefaultTransition() || {} } = i || {};
2622
+ n.transitionOverride && (o = n.transitionOverride);
2623
+ const r = i ? () => Promise.all(ki(t, i, n)) : () => Promise.resolve(), a = t.variantChildren && t.variantChildren.size ? (u = 0) => {
2624
+ const { delayChildren: c = 0, staggerChildren: h, staggerDirection: f } = o;
2625
+ return Qa(t, e, c + u, h, f, n);
2626
+ } : () => Promise.resolve(), { when: l } = o;
2604
2627
  if (l) {
2605
- const [u, c] = l === "beforeChildren" ? [o, a] : [a, o];
2628
+ const [u, c] = l === "beforeChildren" ? [r, a] : [a, r];
2606
2629
  return u().then(() => c());
2607
2630
  } else
2608
- return Promise.all([o(), a(n.delay)]);
2631
+ return Promise.all([r(), a(n.delay)]);
2609
2632
  }
2610
- function Za(t, e, n = 0, s = 0, i = 1, r) {
2611
- const o = [], a = (t.variantChildren.size - 1) * s, l = i === 1 ? (u = 0) => u * s : (u = 0) => a - u * s;
2612
- return Array.from(t.variantChildren).sort(Qa).forEach((u, c) => {
2613
- u.notify("AnimationStart", e), o.push(Ve(u, e, {
2614
- ...r,
2633
+ function Qa(t, e, n = 0, s = 0, i = 1, o) {
2634
+ const r = [], a = (t.variantChildren.size - 1) * s, l = i === 1 ? (u = 0) => u * s : (u = 0) => a - u * s;
2635
+ return Array.from(t.variantChildren).sort(Ja).forEach((u, c) => {
2636
+ u.notify("AnimationStart", e), r.push(Ve(u, e, {
2637
+ ...o,
2615
2638
  delay: n + l(c)
2616
2639
  }).then(() => u.notify("AnimationComplete", e)));
2617
- }), Promise.all(o);
2640
+ }), Promise.all(r);
2618
2641
  }
2619
- function Qa(t, e) {
2642
+ function Ja(t, e) {
2620
2643
  return t.sortNodePosition(e);
2621
2644
  }
2622
- function Ja(t, e, n = {}) {
2645
+ function tl(t, e, n = {}) {
2623
2646
  t.notify("AnimationStart", e);
2624
2647
  let s;
2625
2648
  if (Array.isArray(e)) {
2626
- const i = e.map((r) => Ve(t, r, n));
2649
+ const i = e.map((o) => Ve(t, o, n));
2627
2650
  s = Promise.all(i);
2628
2651
  } else if (typeof e == "string")
2629
2652
  s = Ve(t, e, n);
@@ -2635,7 +2658,7 @@ function Ja(t, e, n = {}) {
2635
2658
  t.notify("AnimationComplete", e);
2636
2659
  });
2637
2660
  }
2638
- const tl = Ie.length;
2661
+ const el = Ie.length;
2639
2662
  function Ii(t) {
2640
2663
  if (!t)
2641
2664
  return;
@@ -2644,18 +2667,18 @@ function Ii(t) {
2644
2667
  return t.props.initial !== void 0 && (n.initial = t.props.initial), n;
2645
2668
  }
2646
2669
  const e = {};
2647
- for (let n = 0; n < tl; n++) {
2670
+ for (let n = 0; n < el; n++) {
2648
2671
  const s = Ie[n], i = t.props[s];
2649
- (Vt(i) || i === !1) && (e[s] = i);
2672
+ (Ct(i) || i === !1) && (e[s] = i);
2650
2673
  }
2651
2674
  return e;
2652
2675
  }
2653
- const el = [...ke].reverse(), nl = ke.length;
2654
- function sl(t) {
2655
- return (e) => Promise.all(e.map(({ animation: n, options: s }) => Ja(t, n, s)));
2656
- }
2676
+ const nl = [...ke].reverse(), sl = ke.length;
2657
2677
  function il(t) {
2658
- let e = sl(t), n = On(), s = !0;
2678
+ return (e) => Promise.all(e.map(({ animation: n, options: s }) => tl(t, n, s)));
2679
+ }
2680
+ function rl(t) {
2681
+ let e = il(t), n = On(), s = !0;
2659
2682
  const i = (l) => (u, c) => {
2660
2683
  var h;
2661
2684
  const f = Jt(t, c, l === "exit" ? (h = t.presenceContext) === null || h === void 0 ? void 0 : h.custom : void 0);
@@ -2665,14 +2688,14 @@ function il(t) {
2665
2688
  }
2666
2689
  return u;
2667
2690
  };
2668
- function r(l) {
2691
+ function o(l) {
2669
2692
  e = l(t);
2670
2693
  }
2671
- function o(l) {
2694
+ function r(l) {
2672
2695
  const { props: u } = t, c = Ii(t.parent) || {}, h = [], f = /* @__PURE__ */ new Set();
2673
2696
  let d = {}, m = 1 / 0;
2674
- for (let y = 0; y < nl; y++) {
2675
- const g = el[y], v = n[g], T = u[g] !== void 0 ? u[g] : c[g], w = Vt(T), S = g === l ? v.isActive : null;
2697
+ for (let y = 0; y < sl; y++) {
2698
+ const g = nl[y], v = n[g], T = u[g] !== void 0 ? u[g] : c[g], w = Ct(T), S = g === l ? v.isActive : null;
2676
2699
  S === !1 && (m = y);
2677
2700
  let V = T === c[g] && T !== u[g] && w;
2678
2701
  if (V && s && t.manuallyAnimateOnMount && (V = !1), v.protectedKeys = { ...d }, // If it isn't active and hasn't *just* been set as inactive
@@ -2685,24 +2708,24 @@ function il(t) {
2685
2708
  g === l && v.isActive && !V && w || // If we removed a higher-priority variant (i is in reverse order)
2686
2709
  y > m && w, k = !1;
2687
2710
  const N = Array.isArray(T) ? T : [T];
2688
- let ot = N.reduce(i(g), {});
2689
- S === !1 && (ot = {});
2690
- const { prevResolvedValues: fn = {} } = v, io = {
2711
+ let rt = N.reduce(i(g), {});
2712
+ S === !1 && (rt = {});
2713
+ const { prevResolvedValues: fn = {} } = v, ir = {
2691
2714
  ...fn,
2692
- ...ot
2715
+ ...rt
2693
2716
  }, dn = (B) => {
2694
2717
  b = !0, f.has(B) && (k = !0, f.delete(B)), v.needsAnimating[B] = !0;
2695
2718
  const $ = t.getValue(B);
2696
2719
  $ && ($.liveStyle = !1);
2697
2720
  };
2698
- for (const B in io) {
2699
- const $ = ot[B], ee = fn[B];
2721
+ for (const B in ir) {
2722
+ const $ = rt[B], ee = fn[B];
2700
2723
  if (d.hasOwnProperty(B))
2701
2724
  continue;
2702
2725
  let ne = !1;
2703
2726
  ge($) && ge(ee) ? ne = !Ys($, ee) : ne = $ !== ee, ne ? $ != null ? dn(B) : f.add(B) : $ !== void 0 && f.has(B) ? dn(B) : v.protectedKeys[B] = !0;
2704
2727
  }
2705
- v.prevProp = T, v.prevResolvedValues = ot, v.isActive && (d = { ...d, ...ot }), s && t.blockInitialAnimation && (b = !1), b && (!(V && E) || k) && h.push(...N.map((B) => ({
2728
+ v.prevProp = T, v.prevResolvedValues = rt, v.isActive && (d = { ...d, ...rt }), s && t.blockInitialAnimation && (b = !1), b && (!(V && E) || k) && h.push(...N.map((B) => ({
2706
2729
  animation: B,
2707
2730
  options: { type: g }
2708
2731
  })));
@@ -2725,15 +2748,15 @@ function il(t) {
2725
2748
  var d;
2726
2749
  return (d = f.animationState) === null || d === void 0 ? void 0 : d.setActive(l, u);
2727
2750
  }), n[l].isActive = u;
2728
- const h = o(l);
2751
+ const h = r(l);
2729
2752
  for (const f in n)
2730
2753
  n[f].protectedKeys = {};
2731
2754
  return h;
2732
2755
  }
2733
2756
  return {
2734
- animateChanges: o,
2757
+ animateChanges: r,
2735
2758
  setActive: a,
2736
- setAnimateFunction: r,
2759
+ setAnimateFunction: o,
2737
2760
  getState: () => n,
2738
2761
  reset: () => {
2739
2762
  n = On(), s = !0;
@@ -2769,14 +2792,14 @@ class Q {
2769
2792
  update() {
2770
2793
  }
2771
2794
  }
2772
- class rl extends Q {
2795
+ class al extends Q {
2773
2796
  /**
2774
2797
  * We dynamically generate the AnimationState manager as it contains a reference
2775
2798
  * to the underlying animation library. We only want to load that if we load this,
2776
2799
  * so people can optionally code split it out using the `m` component.
2777
2800
  */
2778
2801
  constructor(e) {
2779
- super(e), e.animationState || (e.animationState = il(e));
2802
+ super(e), e.animationState || (e.animationState = rl(e));
2780
2803
  }
2781
2804
  updateAnimationControlsSubscription() {
2782
2805
  const { animate: e } = this.node.getProps();
@@ -2797,10 +2820,10 @@ class rl extends Q {
2797
2820
  this.node.animationState.reset(), (e = this.unmountControls) === null || e === void 0 || e.call(this);
2798
2821
  }
2799
2822
  }
2800
- let al = 0;
2801
- class ll extends Q {
2823
+ let ll = 0;
2824
+ class ul extends Q {
2802
2825
  constructor() {
2803
- super(...arguments), this.id = al++;
2826
+ super(...arguments), this.id = ll++;
2804
2827
  }
2805
2828
  update() {
2806
2829
  if (!this.node.presenceContext)
@@ -2818,18 +2841,18 @@ class ll extends Q {
2818
2841
  unmount() {
2819
2842
  }
2820
2843
  }
2821
- const ul = {
2844
+ const cl = {
2822
2845
  animation: {
2823
- Feature: rl
2846
+ Feature: al
2824
2847
  },
2825
2848
  exit: {
2826
- Feature: ll
2849
+ Feature: ul
2827
2850
  }
2828
2851
  };
2829
- function Rt(t, e, n, s = { passive: !0 }) {
2852
+ function Et(t, e, n, s = { passive: !0 }) {
2830
2853
  return t.addEventListener(e, n, s), () => t.removeEventListener(e, n);
2831
2854
  }
2832
- function jt(t) {
2855
+ function Bt(t) {
2833
2856
  return {
2834
2857
  point: {
2835
2858
  x: t.pageX,
@@ -2837,21 +2860,21 @@ function jt(t) {
2837
2860
  }
2838
2861
  };
2839
2862
  }
2840
- const cl = (t) => (e) => Qe(e) && t(e, jt(e));
2841
- function bt(t, e, n, s) {
2842
- return Rt(t, e, cl(n), s);
2863
+ const hl = (t) => (e) => Qe(e) && t(e, Bt(e));
2864
+ function At(t, e, n, s) {
2865
+ return Et(t, e, hl(n), s);
2843
2866
  }
2844
2867
  const Nn = (t, e) => Math.abs(t - e);
2845
- function hl(t, e) {
2868
+ function fl(t, e) {
2846
2869
  const n = Nn(t.x, e.x), s = Nn(t.y, e.y);
2847
2870
  return Math.sqrt(n ** 2 + s ** 2);
2848
2871
  }
2849
2872
  class Oi {
2850
- constructor(e, n, { transformPagePoint: s, contextWindow: i, dragSnapToOrigin: r = !1 } = {}) {
2873
+ constructor(e, n, { transformPagePoint: s, contextWindow: i, dragSnapToOrigin: o = !1 } = {}) {
2851
2874
  if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.handlers = {}, this.contextWindow = window, this.updatePoint = () => {
2852
2875
  if (!(this.lastMoveEvent && this.lastMoveEventInfo))
2853
2876
  return;
2854
- const h = ce(this.lastMoveEventInfo, this.history), f = this.startEvent !== null, d = hl(h.offset, { x: 0, y: 0 }) >= 3;
2877
+ const h = ce(this.lastMoveEventInfo, this.history), f = this.startEvent !== null, d = fl(h.offset, { x: 0, y: 0 }) >= 3;
2855
2878
  if (!f && !d)
2856
2879
  return;
2857
2880
  const { point: m } = h, { timestamp: p } = L;
@@ -2869,11 +2892,11 @@ class Oi {
2869
2892
  this.startEvent && d && d(h, y), m && m(h, y);
2870
2893
  }, !Qe(e))
2871
2894
  return;
2872
- this.dragSnapToOrigin = r, this.handlers = n, this.transformPagePoint = s, this.contextWindow = i || window;
2873
- const o = jt(e), a = ue(o, this.transformPagePoint), { point: l } = a, { timestamp: u } = L;
2895
+ this.dragSnapToOrigin = o, this.handlers = n, this.transformPagePoint = s, this.contextWindow = i || window;
2896
+ const r = Bt(e), a = ue(r, this.transformPagePoint), { point: l } = a, { timestamp: u } = L;
2874
2897
  this.history = [{ ...l, timestamp: u }];
2875
2898
  const { onSessionStart: c } = n;
2876
- c && c(e, ce(a, this.history)), this.removeListeners = Ft(bt(this.contextWindow, "pointermove", this.handlePointerMove), bt(this.contextWindow, "pointerup", this.handlePointerUp), bt(this.contextWindow, "pointercancel", this.handlePointerUp));
2899
+ c && c(e, ce(a, this.history)), this.removeListeners = Ft(At(this.contextWindow, "pointermove", this.handlePointerMove), At(this.contextWindow, "pointerup", this.handlePointerUp), At(this.contextWindow, "pointercancel", this.handlePointerUp));
2877
2900
  }
2878
2901
  updateHandlers(e) {
2879
2902
  this.handlers = e;
@@ -2892,17 +2915,17 @@ function ce({ point: t }, e) {
2892
2915
  return {
2893
2916
  point: t,
2894
2917
  delta: Un(t, Ni(e)),
2895
- offset: Un(t, fl(e)),
2896
- velocity: dl(e, 0.1)
2918
+ offset: Un(t, dl(e)),
2919
+ velocity: ml(e, 0.1)
2897
2920
  };
2898
2921
  }
2899
- function fl(t) {
2922
+ function dl(t) {
2900
2923
  return t[0];
2901
2924
  }
2902
2925
  function Ni(t) {
2903
2926
  return t[t.length - 1];
2904
2927
  }
2905
- function dl(t, e) {
2928
+ function ml(t, e) {
2906
2929
  if (t.length < 2)
2907
2930
  return { x: 0, y: 0 };
2908
2931
  let n = t.length - 1, s = null;
@@ -2911,41 +2934,41 @@ function dl(t, e) {
2911
2934
  n--;
2912
2935
  if (!s)
2913
2936
  return { x: 0, y: 0 };
2914
- const r = /* @__PURE__ */ H(i.timestamp - s.timestamp);
2915
- if (r === 0)
2937
+ const o = /* @__PURE__ */ H(i.timestamp - s.timestamp);
2938
+ if (o === 0)
2916
2939
  return { x: 0, y: 0 };
2917
- const o = {
2918
- x: (i.x - s.x) / r,
2919
- y: (i.y - s.y) / r
2940
+ const r = {
2941
+ x: (i.x - s.x) / o,
2942
+ y: (i.y - s.y) / o
2920
2943
  };
2921
- return o.x === 1 / 0 && (o.x = 0), o.y === 1 / 0 && (o.y = 0), o;
2944
+ return r.x === 1 / 0 && (r.x = 0), r.y === 1 / 0 && (r.y = 0), r;
2922
2945
  }
2923
- const Ui = 1e-4, ml = 1 - Ui, pl = 1 + Ui, _i = 0.01, gl = 0 - _i, yl = 0 + _i;
2946
+ const Ui = 1e-4, pl = 1 - Ui, gl = 1 + Ui, _i = 0.01, yl = 0 - _i, vl = 0 + _i;
2924
2947
  function O(t) {
2925
2948
  return t.max - t.min;
2926
2949
  }
2927
- function vl(t, e, n) {
2950
+ function xl(t, e, n) {
2928
2951
  return Math.abs(t - e) <= n;
2929
2952
  }
2930
2953
  function _n(t, e, n, s = 0.5) {
2931
- t.origin = s, t.originPoint = D(e.min, e.max, t.origin), t.scale = O(n) / O(e), t.translate = D(n.min, n.max, t.origin) - t.originPoint, (t.scale >= ml && t.scale <= pl || isNaN(t.scale)) && (t.scale = 1), (t.translate >= gl && t.translate <= yl || isNaN(t.translate)) && (t.translate = 0);
2954
+ t.origin = s, t.originPoint = D(e.min, e.max, t.origin), t.scale = O(n) / O(e), t.translate = D(n.min, n.max, t.origin) - t.originPoint, (t.scale >= pl && t.scale <= gl || isNaN(t.scale)) && (t.scale = 1), (t.translate >= yl && t.translate <= vl || isNaN(t.translate)) && (t.translate = 0);
2932
2955
  }
2933
- function At(t, e, n, s) {
2956
+ function wt(t, e, n, s) {
2934
2957
  _n(t.x, e.x, n.x, s ? s.originX : void 0), _n(t.y, e.y, n.y, s ? s.originY : void 0);
2935
2958
  }
2936
2959
  function Kn(t, e, n) {
2937
2960
  t.min = n.min + e.min, t.max = t.min + O(e);
2938
2961
  }
2939
- function xl(t, e, n) {
2962
+ function Tl(t, e, n) {
2940
2963
  Kn(t.x, e.x, n.x), Kn(t.y, e.y, n.y);
2941
2964
  }
2942
2965
  function zn(t, e, n) {
2943
2966
  t.min = e.min - n.min, t.max = t.min + O(e);
2944
2967
  }
2945
- function wt(t, e, n) {
2968
+ function Vt(t, e, n) {
2946
2969
  zn(t.x, e.x, n.x), zn(t.y, e.y, n.y);
2947
2970
  }
2948
- function Tl(t, { min: e, max: n }, s) {
2971
+ function Pl(t, { min: e, max: n }, s) {
2949
2972
  return e !== void 0 && t < e ? t = s ? D(e, t, s.min) : Math.max(t, e) : n !== void 0 && t > n && (t = s ? D(n, t, s.max) : Math.min(t, n)), t;
2950
2973
  }
2951
2974
  function Wn(t, e, n) {
@@ -2954,7 +2977,7 @@ function Wn(t, e, n) {
2954
2977
  max: n !== void 0 ? t.max + n - (t.max - t.min) : void 0
2955
2978
  };
2956
2979
  }
2957
- function Pl(t, { top: e, left: n, bottom: s, right: i }) {
2980
+ function Sl(t, { top: e, left: n, bottom: s, right: i }) {
2958
2981
  return {
2959
2982
  x: Wn(t.x, n, i),
2960
2983
  y: Wn(t.y, e, s)
@@ -2964,23 +2987,23 @@ function $n(t, e) {
2964
2987
  let n = e.min - t.min, s = e.max - t.max;
2965
2988
  return e.max - e.min < t.max - t.min && ([n, s] = [s, n]), { min: n, max: s };
2966
2989
  }
2967
- function Sl(t, e) {
2990
+ function bl(t, e) {
2968
2991
  return {
2969
2992
  x: $n(t.x, e.x),
2970
2993
  y: $n(t.y, e.y)
2971
2994
  };
2972
2995
  }
2973
- function bl(t, e) {
2996
+ function Al(t, e) {
2974
2997
  let n = 0.5;
2975
2998
  const s = O(t), i = O(e);
2976
2999
  return i > s ? n = /* @__PURE__ */ ft(e.min, e.max - s, t.min) : s > i && (n = /* @__PURE__ */ ft(t.min, t.max - i, e.min)), X(0, 1, n);
2977
3000
  }
2978
- function Al(t, e) {
3001
+ function wl(t, e) {
2979
3002
  const n = {};
2980
3003
  return e.min !== void 0 && (n.min = e.min - t.min), e.max !== void 0 && (n.max = e.max - t.min), n;
2981
3004
  }
2982
3005
  const Ce = 0.35;
2983
- function wl(t = Ce) {
3006
+ function Vl(t = Ce) {
2984
3007
  return t === !1 ? t = 0 : t === !0 && (t = Ce), {
2985
3008
  x: Gn(t, "left", "right"),
2986
3009
  y: Gn(t, "top", "bottom")
@@ -3016,10 +3039,10 @@ function Ki({ top: t, left: e, right: n, bottom: s }) {
3016
3039
  y: { min: t, max: s }
3017
3040
  };
3018
3041
  }
3019
- function Vl({ x: t, y: e }) {
3042
+ function Cl({ x: t, y: e }) {
3020
3043
  return { top: e.min, right: t.max, bottom: e.max, left: t.min };
3021
3044
  }
3022
- function Cl(t, e) {
3045
+ function Dl(t, e) {
3023
3046
  if (!e)
3024
3047
  return t;
3025
3048
  const n = e({ x: t.left, y: t.top }), s = e({ x: t.right, y: t.bottom });
@@ -3059,19 +3082,19 @@ function Wi(t, { x: e, y: n }) {
3059
3082
  Me(t.x, e.translate, e.scale, e.originPoint), Me(t.y, n.translate, n.scale, n.originPoint);
3060
3083
  }
3061
3084
  const Qn = 0.999999999999, Jn = 1.0000000000001;
3062
- function Dl(t, e, n, s = !1) {
3085
+ function Ml(t, e, n, s = !1) {
3063
3086
  const i = n.length;
3064
3087
  if (!i)
3065
3088
  return;
3066
3089
  e.x = e.y = 1;
3067
- let r, o;
3090
+ let o, r;
3068
3091
  for (let a = 0; a < i; a++) {
3069
- r = n[a], o = r.projectionDelta;
3070
- const { visualElement: l } = r.options;
3071
- l && l.props.style && l.props.style.display === "contents" || (s && r.options.layoutScroll && r.scroll && r !== r.root && ht(t, {
3072
- x: -r.scroll.offset.x,
3073
- y: -r.scroll.offset.y
3074
- }), o && (e.x *= o.x.scale, e.y *= o.y.scale, Wi(t, o)), s && tt(r.latestValues) && ht(t, r.latestValues));
3092
+ o = n[a], r = o.projectionDelta;
3093
+ const { visualElement: l } = o.options;
3094
+ l && l.props.style && l.props.style.display === "contents" || (s && o.options.layoutScroll && o.scroll && o !== o.root && ht(t, {
3095
+ x: -o.scroll.offset.x,
3096
+ y: -o.scroll.offset.y
3097
+ }), r && (e.x *= r.x.scale, e.y *= r.y.scale, Wi(t, r)), s && tt(o.latestValues) && ht(t, o.latestValues));
3075
3098
  }
3076
3099
  e.x < Jn && e.x > Qn && (e.x = 1), e.y < Jn && e.y > Qn && (e.y = 1);
3077
3100
  }
@@ -3079,21 +3102,21 @@ function ct(t, e) {
3079
3102
  t.min = t.min + e, t.max = t.max + e;
3080
3103
  }
3081
3104
  function ts(t, e, n, s, i = 0.5) {
3082
- const r = D(t.min, t.max, i);
3083
- Me(t, e, n, r, s);
3105
+ const o = D(t.min, t.max, i);
3106
+ Me(t, e, n, o, s);
3084
3107
  }
3085
3108
  function ht(t, e) {
3086
3109
  ts(t.x, e.x, e.scaleX, e.scale, e.originX), ts(t.y, e.y, e.scaleY, e.scale, e.originY);
3087
3110
  }
3088
3111
  function $i(t, e) {
3089
- return Ki(Cl(t.getBoundingClientRect(), e));
3112
+ return Ki(Dl(t.getBoundingClientRect(), e));
3090
3113
  }
3091
- function Ml(t, e, n) {
3114
+ function Rl(t, e, n) {
3092
3115
  const s = $i(t, n), { scroll: i } = e;
3093
3116
  return i && (ct(s.x, i.offset.x), ct(s.y, i.offset.y)), s;
3094
3117
  }
3095
- const Gi = ({ current: t }) => t ? t.ownerDocument.defaultView : null, Rl = /* @__PURE__ */ new WeakMap();
3096
- class El {
3118
+ const Gi = ({ current: t }) => t ? t.ownerDocument.defaultView : null, El = /* @__PURE__ */ new WeakMap();
3119
+ class Ll {
3097
3120
  constructor(e) {
3098
3121
  this.openDragLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = R(), this.visualElement = e;
3099
3122
  }
@@ -3103,10 +3126,10 @@ class El {
3103
3126
  return;
3104
3127
  const i = (c) => {
3105
3128
  const { dragSnapToOrigin: h } = this.getProps();
3106
- h ? this.pauseAnimation() : this.stopAnimation(), n && this.snapToCursor(jt(c).point);
3107
- }, r = (c, h) => {
3129
+ h ? this.pauseAnimation() : this.stopAnimation(), n && this.snapToCursor(Bt(c).point);
3130
+ }, o = (c, h) => {
3108
3131
  const { drag: f, dragPropagation: d, onDragStart: m } = this.getProps();
3109
- if (f && !d && (this.openDragLock && this.openDragLock(), this.openDragLock = br(f), !this.openDragLock))
3132
+ if (f && !d && (this.openDragLock && this.openDragLock(), this.openDragLock = Ao(f), !this.openDragLock))
3110
3133
  return;
3111
3134
  this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), _((y) => {
3112
3135
  let g = this.getAxisMotionValue(y).get() || 0;
@@ -3121,13 +3144,13 @@ class El {
3121
3144
  }), m && C.postRender(() => m(c, h)), xe(this.visualElement, "transform");
3122
3145
  const { animationState: p } = this.visualElement;
3123
3146
  p && p.setActive("whileDrag", !0);
3124
- }, o = (c, h) => {
3147
+ }, r = (c, h) => {
3125
3148
  const { dragPropagation: f, dragDirectionLock: d, onDirectionLock: m, onDrag: p } = this.getProps();
3126
3149
  if (!f && !this.openDragLock)
3127
3150
  return;
3128
3151
  const { offset: y } = h;
3129
3152
  if (d && this.currentDirection === null) {
3130
- this.currentDirection = Ll(y), this.currentDirection !== null && m && m(this.currentDirection);
3153
+ this.currentDirection = jl(y), this.currentDirection !== null && m && m(this.currentDirection);
3131
3154
  return;
3132
3155
  }
3133
3156
  this.updateAxis("x", h.point, y), this.updateAxis("y", h.point, y), this.visualElement.render(), p && p(c, h);
@@ -3137,8 +3160,8 @@ class El {
3137
3160
  }), { dragSnapToOrigin: u } = this.getProps();
3138
3161
  this.panSession = new Oi(e, {
3139
3162
  onSessionStart: i,
3140
- onStart: r,
3141
- onMove: o,
3163
+ onStart: o,
3164
+ onMove: r,
3142
3165
  onSessionEnd: a,
3143
3166
  resumeAnimation: l
3144
3167
  }, {
@@ -3153,8 +3176,8 @@ class El {
3153
3176
  return;
3154
3177
  const { velocity: i } = n;
3155
3178
  this.startAnimation(i);
3156
- const { onDragEnd: r } = this.getProps();
3157
- r && C.postRender(() => r(e, n));
3179
+ const { onDragEnd: o } = this.getProps();
3180
+ o && C.postRender(() => o(e, n));
3158
3181
  }
3159
3182
  cancel() {
3160
3183
  this.isDragging = !1;
@@ -3165,17 +3188,17 @@ class El {
3165
3188
  }
3166
3189
  updateAxis(e, n, s) {
3167
3190
  const { drag: i } = this.getProps();
3168
- if (!s || !Ot(e, i, this.currentDirection))
3191
+ if (!s || !Nt(e, i, this.currentDirection))
3169
3192
  return;
3170
- const r = this.getAxisMotionValue(e);
3171
- let o = this.originPoint[e] + s[e];
3172
- this.constraints && this.constraints[e] && (o = Tl(o, this.constraints[e], this.elastic[e])), r.set(o);
3193
+ const o = this.getAxisMotionValue(e);
3194
+ let r = this.originPoint[e] + s[e];
3195
+ this.constraints && this.constraints[e] && (r = Pl(r, this.constraints[e], this.elastic[e])), o.set(r);
3173
3196
  }
3174
3197
  resolveConstraints() {
3175
3198
  var e;
3176
- const { dragConstraints: n, dragElastic: s } = this.getProps(), i = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(!1) : (e = this.visualElement.projection) === null || e === void 0 ? void 0 : e.layout, r = this.constraints;
3177
- n && at(n) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : n && i ? this.constraints = Pl(i.layoutBox, n) : this.constraints = !1, this.elastic = wl(s), r !== this.constraints && i && this.constraints && !this.hasMutatedConstraints && _((o) => {
3178
- this.constraints !== !1 && this.getAxisMotionValue(o) && (this.constraints[o] = Al(i.layoutBox[o], this.constraints[o]));
3199
+ const { dragConstraints: n, dragElastic: s } = this.getProps(), i = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(!1) : (e = this.visualElement.projection) === null || e === void 0 ? void 0 : e.layout, o = this.constraints;
3200
+ n && at(n) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : n && i ? this.constraints = Sl(i.layoutBox, n) : this.constraints = !1, this.elastic = Vl(s), o !== this.constraints && i && this.constraints && !this.hasMutatedConstraints && _((r) => {
3201
+ this.constraints !== !1 && this.getAxisMotionValue(r) && (this.constraints[r] = wl(i.layoutBox[r], this.constraints[r]));
3179
3202
  });
3180
3203
  }
3181
3204
  resolveRefConstraints() {
@@ -3185,20 +3208,20 @@ class El {
3185
3208
  const s = e.current, { projection: i } = this.visualElement;
3186
3209
  if (!i || !i.layout)
3187
3210
  return !1;
3188
- const r = Ml(s, i.root, this.visualElement.getTransformPagePoint());
3189
- let o = Sl(i.layout.layoutBox, r);
3211
+ const o = Rl(s, i.root, this.visualElement.getTransformPagePoint());
3212
+ let r = bl(i.layout.layoutBox, o);
3190
3213
  if (n) {
3191
- const a = n(Vl(o));
3192
- this.hasMutatedConstraints = !!a, a && (o = Ki(a));
3214
+ const a = n(Cl(r));
3215
+ this.hasMutatedConstraints = !!a, a && (r = Ki(a));
3193
3216
  }
3194
- return o;
3217
+ return r;
3195
3218
  }
3196
3219
  startAnimation(e) {
3197
- const { drag: n, dragMomentum: s, dragElastic: i, dragTransition: r, dragSnapToOrigin: o, onDragTransitionEnd: a } = this.getProps(), l = this.constraints || {}, u = _((c) => {
3198
- if (!Ot(c, n, this.currentDirection))
3220
+ const { drag: n, dragMomentum: s, dragElastic: i, dragTransition: o, dragSnapToOrigin: r, onDragTransitionEnd: a } = this.getProps(), l = this.constraints || {}, u = _((c) => {
3221
+ if (!Nt(c, n, this.currentDirection))
3199
3222
  return;
3200
3223
  let h = l && l[c] || {};
3201
- o && (h = { min: 0, max: 0 });
3224
+ r && (h = { min: 0, max: 0 });
3202
3225
  const f = i ? 200 : 1e6, d = i ? 40 : 1e7, m = {
3203
3226
  type: "inertia",
3204
3227
  velocity: s ? e[c] : 0,
@@ -3207,7 +3230,7 @@ class El {
3207
3230
  timeConstant: 750,
3208
3231
  restDelta: 1,
3209
3232
  restSpeed: 10,
3210
- ...r,
3233
+ ...o,
3211
3234
  ...h
3212
3235
  };
3213
3236
  return this.startAxisValueAnimation(c, m);
@@ -3244,12 +3267,12 @@ class El {
3244
3267
  snapToCursor(e) {
3245
3268
  _((n) => {
3246
3269
  const { drag: s } = this.getProps();
3247
- if (!Ot(n, s, this.currentDirection))
3270
+ if (!Nt(n, s, this.currentDirection))
3248
3271
  return;
3249
- const { projection: i } = this.visualElement, r = this.getAxisMotionValue(n);
3272
+ const { projection: i } = this.visualElement, o = this.getAxisMotionValue(n);
3250
3273
  if (i && i.layout) {
3251
- const { min: o, max: a } = i.layout.layoutBox[n];
3252
- r.set(e[n] - D(o, a, 0.5));
3274
+ const { min: r, max: a } = i.layout.layoutBox[n];
3275
+ o.set(e[n] - D(r, a, 0.5));
3253
3276
  }
3254
3277
  });
3255
3278
  }
@@ -3266,66 +3289,66 @@ class El {
3266
3289
  return;
3267
3290
  this.stopAnimation();
3268
3291
  const i = { x: 0, y: 0 };
3269
- _((o) => {
3270
- const a = this.getAxisMotionValue(o);
3292
+ _((r) => {
3293
+ const a = this.getAxisMotionValue(r);
3271
3294
  if (a && this.constraints !== !1) {
3272
3295
  const l = a.get();
3273
- i[o] = bl({ min: l, max: l }, this.constraints[o]);
3296
+ i[r] = Al({ min: l, max: l }, this.constraints[r]);
3274
3297
  }
3275
3298
  });
3276
- const { transformTemplate: r } = this.visualElement.getProps();
3277
- this.visualElement.current.style.transform = r ? r({}, "") : "none", s.root && s.root.updateScroll(), s.updateLayout(), this.resolveConstraints(), _((o) => {
3278
- if (!Ot(o, e, null))
3299
+ const { transformTemplate: o } = this.visualElement.getProps();
3300
+ this.visualElement.current.style.transform = o ? o({}, "") : "none", s.root && s.root.updateScroll(), s.updateLayout(), this.resolveConstraints(), _((r) => {
3301
+ if (!Nt(r, e, null))
3279
3302
  return;
3280
- const a = this.getAxisMotionValue(o), { min: l, max: u } = this.constraints[o];
3281
- a.set(D(l, u, i[o]));
3303
+ const a = this.getAxisMotionValue(r), { min: l, max: u } = this.constraints[r];
3304
+ a.set(D(l, u, i[r]));
3282
3305
  });
3283
3306
  }
3284
3307
  addListeners() {
3285
3308
  if (!this.visualElement.current)
3286
3309
  return;
3287
- Rl.set(this.visualElement, this);
3288
- const e = this.visualElement.current, n = bt(e, "pointerdown", (l) => {
3310
+ El.set(this.visualElement, this);
3311
+ const e = this.visualElement.current, n = At(e, "pointerdown", (l) => {
3289
3312
  const { drag: u, dragListener: c = !0 } = this.getProps();
3290
3313
  u && c && this.start(l);
3291
3314
  }), s = () => {
3292
3315
  const { dragConstraints: l } = this.getProps();
3293
3316
  at(l) && l.current && (this.constraints = this.resolveRefConstraints());
3294
- }, { projection: i } = this.visualElement, r = i.addEventListener("measure", s);
3317
+ }, { projection: i } = this.visualElement, o = i.addEventListener("measure", s);
3295
3318
  i && !i.layout && (i.root && i.root.updateScroll(), i.updateLayout()), C.read(s);
3296
- const o = Rt(window, "resize", () => this.scalePositionWithinConstraints()), a = i.addEventListener("didUpdate", (({ delta: l, hasLayoutChanged: u }) => {
3319
+ const r = Et(window, "resize", () => this.scalePositionWithinConstraints()), a = i.addEventListener("didUpdate", (({ delta: l, hasLayoutChanged: u }) => {
3297
3320
  this.isDragging && u && (_((c) => {
3298
3321
  const h = this.getAxisMotionValue(c);
3299
3322
  h && (this.originPoint[c] += l[c].translate, h.set(h.get() + l[c].translate));
3300
3323
  }), this.visualElement.render());
3301
3324
  }));
3302
3325
  return () => {
3303
- o(), n(), r(), a && a();
3326
+ r(), n(), o(), a && a();
3304
3327
  };
3305
3328
  }
3306
3329
  getProps() {
3307
- const e = this.visualElement.getProps(), { drag: n = !1, dragDirectionLock: s = !1, dragPropagation: i = !1, dragConstraints: r = !1, dragElastic: o = Ce, dragMomentum: a = !0 } = e;
3330
+ const e = this.visualElement.getProps(), { drag: n = !1, dragDirectionLock: s = !1, dragPropagation: i = !1, dragConstraints: o = !1, dragElastic: r = Ce, dragMomentum: a = !0 } = e;
3308
3331
  return {
3309
3332
  ...e,
3310
3333
  drag: n,
3311
3334
  dragDirectionLock: s,
3312
3335
  dragPropagation: i,
3313
- dragConstraints: r,
3314
- dragElastic: o,
3336
+ dragConstraints: o,
3337
+ dragElastic: r,
3315
3338
  dragMomentum: a
3316
3339
  };
3317
3340
  }
3318
3341
  }
3319
- function Ot(t, e, n) {
3342
+ function Nt(t, e, n) {
3320
3343
  return (e === !0 || e === t) && (n === null || n === t);
3321
3344
  }
3322
- function Ll(t, e = 10) {
3345
+ function jl(t, e = 10) {
3323
3346
  let n = null;
3324
3347
  return Math.abs(t.y) > e ? n = "y" : Math.abs(t.x) > e && (n = "x"), n;
3325
3348
  }
3326
3349
  class Fl extends Q {
3327
3350
  constructor(e) {
3328
- super(e), this.removeGroupControls = I, this.removeListeners = I, this.controls = new El(e);
3351
+ super(e), this.removeGroupControls = I, this.removeListeners = I, this.controls = new Ll(e);
3329
3352
  }
3330
3353
  mount() {
3331
3354
  const { dragControls: e } = this.node.getProps();
@@ -3338,7 +3361,7 @@ class Fl extends Q {
3338
3361
  const es = (t) => (e, n) => {
3339
3362
  t && C.postRender(() => t(e, n));
3340
3363
  };
3341
- class jl extends Q {
3364
+ class Bl extends Q {
3342
3365
  constructor() {
3343
3366
  super(...arguments), this.removePointerDownListener = I;
3344
3367
  }
@@ -3354,13 +3377,13 @@ class jl extends Q {
3354
3377
  onSessionStart: es(e),
3355
3378
  onStart: es(n),
3356
3379
  onMove: s,
3357
- onEnd: (r, o) => {
3358
- delete this.session, i && C.postRender(() => i(r, o));
3380
+ onEnd: (o, r) => {
3381
+ delete this.session, i && C.postRender(() => i(o, r));
3359
3382
  }
3360
3383
  };
3361
3384
  }
3362
3385
  mount() {
3363
- this.removePointerDownListener = bt(this.node.current, "pointerdown", (e) => this.onPointerDown(e));
3386
+ this.removePointerDownListener = At(this.node.current, "pointerdown", (e) => this.onPointerDown(e));
3364
3387
  }
3365
3388
  update() {
3366
3389
  this.session && this.session.updateHandlers(this.createPanHandlers());
@@ -3396,36 +3419,36 @@ const yt = {
3396
3419
  const n = ns(t, e.target.x), s = ns(t, e.target.y);
3397
3420
  return `${n}% ${s}%`;
3398
3421
  }
3399
- }, Bl = {
3422
+ }, kl = {
3400
3423
  correct: (t, { treeScale: e, projectionDelta: n }) => {
3401
3424
  const s = t, i = Z.parse(t);
3402
3425
  if (i.length > 5)
3403
3426
  return s;
3404
- const r = Z.createTransformer(t), o = typeof i[0] != "number" ? 1 : 0, a = n.x.scale * e.x, l = n.y.scale * e.y;
3405
- i[0 + o] /= a, i[1 + o] /= l;
3427
+ const o = Z.createTransformer(t), r = typeof i[0] != "number" ? 1 : 0, a = n.x.scale * e.x, l = n.y.scale * e.y;
3428
+ i[0 + r] /= a, i[1 + r] /= l;
3406
3429
  const u = D(a, l, 0.5);
3407
- return typeof i[2 + o] == "number" && (i[2 + o] /= u), typeof i[3 + o] == "number" && (i[3 + o] /= u), r(i);
3430
+ return typeof i[2 + r] == "number" && (i[2 + r] /= u), typeof i[3 + r] == "number" && (i[3 + r] /= u), o(i);
3408
3431
  }
3409
3432
  };
3410
- class kl extends P.Component {
3433
+ class Il extends P.Component {
3411
3434
  /**
3412
3435
  * This only mounts projection nodes for components that
3413
3436
  * need measuring, we might want to do it for all components
3414
3437
  * in order to incorporate transforms
3415
3438
  */
3416
3439
  componentDidMount() {
3417
- const { visualElement: e, layoutGroup: n, switchLayoutGroup: s, layoutId: i } = this.props, { projection: r } = e;
3418
- nr(Il), r && (n.group && n.group.add(r), s && s.register && i && s.register(r), r.root.didUpdate(), r.addEventListener("animationComplete", () => {
3440
+ const { visualElement: e, layoutGroup: n, switchLayoutGroup: s, layoutId: i } = this.props, { projection: o } = e;
3441
+ no(Ol), o && (n.group && n.group.add(o), s && s.register && i && s.register(o), o.root.didUpdate(), o.addEventListener("animationComplete", () => {
3419
3442
  this.safeToRemove();
3420
- }), r.setOptions({
3421
- ...r.options,
3443
+ }), o.setOptions({
3444
+ ...o.options,
3422
3445
  onExitComplete: () => this.safeToRemove()
3423
3446
  })), Kt.hasEverUpdated = !0;
3424
3447
  }
3425
3448
  getSnapshotBeforeUpdate(e) {
3426
- const { layoutDependency: n, visualElement: s, drag: i, isPresent: r } = this.props, o = s.projection;
3427
- return o && (o.isPresent = r, i || e.layoutDependency !== n || n === void 0 ? o.willUpdate() : this.safeToRemove(), e.isPresent !== r && (r ? o.promote() : o.relegate() || C.postRender(() => {
3428
- const a = o.getStack();
3449
+ const { layoutDependency: n, visualElement: s, drag: i, isPresent: o } = this.props, r = s.projection;
3450
+ return r && (r.isPresent = o, i || e.layoutDependency !== n || n === void 0 ? r.willUpdate() : this.safeToRemove(), e.isPresent !== o && (o ? r.promote() : r.relegate() || C.postRender(() => {
3451
+ const a = r.getStack();
3429
3452
  (!a || !a.members.length) && this.safeToRemove();
3430
3453
  }))), null;
3431
3454
  }
@@ -3448,10 +3471,10 @@ class kl extends P.Component {
3448
3471
  }
3449
3472
  }
3450
3473
  function Hi(t) {
3451
- const [e, n] = yo(), s = P.useContext(Ms);
3452
- return A.jsx(kl, { ...t, layoutGroup: s, switchLayoutGroup: P.useContext(Is), isPresent: e, safeToRemove: n });
3474
+ const [e, n] = yr(), s = P.useContext(Ms);
3475
+ return A.jsx(Il, { ...t, layoutGroup: s, switchLayoutGroup: P.useContext(Is), isPresent: e, safeToRemove: n });
3453
3476
  }
3454
- const Il = {
3477
+ const Ol = {
3455
3478
  borderRadius: {
3456
3479
  ...yt,
3457
3480
  applyTo: [
@@ -3465,17 +3488,17 @@ const Il = {
3465
3488
  borderTopRightRadius: yt,
3466
3489
  borderBottomLeftRadius: yt,
3467
3490
  borderBottomRightRadius: yt,
3468
- boxShadow: Bl
3491
+ boxShadow: kl
3469
3492
  };
3470
- function Ol(t, e, n) {
3471
- const s = j(t) ? t : Dt(t);
3493
+ function Nl(t, e, n) {
3494
+ const s = F(t) ? t : Mt(t);
3472
3495
  return s.start(hn("", s, e, n)), s.animation;
3473
3496
  }
3474
- function Nl(t) {
3497
+ function Ul(t) {
3475
3498
  return t instanceof SVGElement && t.tagName !== "svg";
3476
3499
  }
3477
- const Ul = (t, e) => t.depth - e.depth;
3478
- class _l {
3500
+ const _l = (t, e) => t.depth - e.depth;
3501
+ class Kl {
3479
3502
  constructor() {
3480
3503
  this.children = [], this.isDirty = !1;
3481
3504
  }
@@ -3486,45 +3509,45 @@ class _l {
3486
3509
  tn(this.children, e), this.isDirty = !0;
3487
3510
  }
3488
3511
  forEach(e) {
3489
- this.isDirty && this.children.sort(Ul), this.isDirty = !1, this.children.forEach(e);
3512
+ this.isDirty && this.children.sort(_l), this.isDirty = !1, this.children.forEach(e);
3490
3513
  }
3491
3514
  }
3492
- function Kl(t, e) {
3515
+ function zl(t, e) {
3493
3516
  const n = W.now(), s = ({ timestamp: i }) => {
3494
- const r = i - n;
3495
- r >= e && (Y(s), t(r - e));
3517
+ const o = i - n;
3518
+ o >= e && (Y(s), t(o - e));
3496
3519
  };
3497
3520
  return C.read(s, !0), () => Y(s);
3498
3521
  }
3499
- const Xi = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], zl = Xi.length, ss = (t) => typeof t == "string" ? parseFloat(t) : t, is = (t) => typeof t == "number" || x.test(t);
3500
- function Wl(t, e, n, s, i, r) {
3522
+ const Xi = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], Wl = Xi.length, ss = (t) => typeof t == "string" ? parseFloat(t) : t, is = (t) => typeof t == "number" || x.test(t);
3523
+ function $l(t, e, n, s, i, o) {
3501
3524
  i ? (t.opacity = D(
3502
3525
  0,
3503
3526
  // TODO Reinstate this if only child
3504
3527
  n.opacity !== void 0 ? n.opacity : 1,
3505
- $l(s)
3506
- ), t.opacityExit = D(e.opacity !== void 0 ? e.opacity : 1, 0, Gl(s))) : r && (t.opacity = D(e.opacity !== void 0 ? e.opacity : 1, n.opacity !== void 0 ? n.opacity : 1, s));
3507
- for (let o = 0; o < zl; o++) {
3508
- const a = `border${Xi[o]}Radius`;
3509
- let l = os(e, a), u = os(n, a);
3528
+ Gl(s)
3529
+ ), t.opacityExit = D(e.opacity !== void 0 ? e.opacity : 1, 0, Hl(s))) : o && (t.opacity = D(e.opacity !== void 0 ? e.opacity : 1, n.opacity !== void 0 ? n.opacity : 1, s));
3530
+ for (let r = 0; r < Wl; r++) {
3531
+ const a = `border${Xi[r]}Radius`;
3532
+ let l = rs(e, a), u = rs(n, a);
3510
3533
  if (l === void 0 && u === void 0)
3511
3534
  continue;
3512
3535
  l || (l = 0), u || (u = 0), l === 0 || u === 0 || is(l) === is(u) ? (t[a] = Math.max(D(ss(l), ss(u), s), 0), (z.test(u) || z.test(l)) && (t[a] += "%")) : t[a] = u;
3513
3536
  }
3514
3537
  (e.rotate || n.rotate) && (t.rotate = D(e.rotate || 0, n.rotate || 0, s));
3515
3538
  }
3516
- function os(t, e) {
3539
+ function rs(t, e) {
3517
3540
  return t[e] !== void 0 ? t[e] : t.borderRadius;
3518
3541
  }
3519
- const $l = /* @__PURE__ */ qi(0, 0.5, di), Gl = /* @__PURE__ */ qi(0.5, 0.95, I);
3542
+ const Gl = /* @__PURE__ */ qi(0, 0.5, di), Hl = /* @__PURE__ */ qi(0.5, 0.95, I);
3520
3543
  function qi(t, e, n) {
3521
3544
  return (s) => s < t ? 0 : s > e ? 1 : n(/* @__PURE__ */ ft(t, e, s));
3522
3545
  }
3523
- function rs(t, e) {
3546
+ function os(t, e) {
3524
3547
  t.min = e.min, t.max = e.max;
3525
3548
  }
3526
3549
  function U(t, e) {
3527
- rs(t.x, e.x), rs(t.y, e.y);
3550
+ os(t.x, e.x), os(t.y, e.y);
3528
3551
  }
3529
3552
  function as(t, e) {
3530
3553
  t.translate = e.translate, t.scale = e.scale, t.originPoint = e.originPoint, t.origin = e.origin;
@@ -3532,18 +3555,18 @@ function as(t, e) {
3532
3555
  function ls(t, e, n, s, i) {
3533
3556
  return t -= e, t = qt(t, 1 / n, s), i !== void 0 && (t = qt(t, 1 / i, s)), t;
3534
3557
  }
3535
- function Hl(t, e = 0, n = 1, s = 0.5, i, r = t, o = t) {
3536
- if (z.test(e) && (e = parseFloat(e), e = D(o.min, o.max, e / 100) - o.min), typeof e != "number")
3558
+ function Xl(t, e = 0, n = 1, s = 0.5, i, o = t, r = t) {
3559
+ if (z.test(e) && (e = parseFloat(e), e = D(r.min, r.max, e / 100) - r.min), typeof e != "number")
3537
3560
  return;
3538
- let a = D(r.min, r.max, s);
3539
- t === r && (a -= e), t.min = ls(t.min, e, n, a, i), t.max = ls(t.max, e, n, a, i);
3561
+ let a = D(o.min, o.max, s);
3562
+ t === o && (a -= e), t.min = ls(t.min, e, n, a, i), t.max = ls(t.max, e, n, a, i);
3540
3563
  }
3541
- function us(t, e, [n, s, i], r, o) {
3542
- Hl(t, e[n], e[s], e[i], e.scale, r, o);
3564
+ function us(t, e, [n, s, i], o, r) {
3565
+ Xl(t, e[n], e[s], e[i], e.scale, o, r);
3543
3566
  }
3544
- const Xl = ["x", "scaleX", "originX"], ql = ["y", "scaleY", "originY"];
3567
+ const ql = ["x", "scaleX", "originX"], Yl = ["y", "scaleY", "originY"];
3545
3568
  function cs(t, e, n, s) {
3546
- us(t.x, e, Xl, n ? n.x : void 0, s ? s.x : void 0), us(t.y, e, ql, n ? n.y : void 0, s ? s.y : void 0);
3569
+ us(t.x, e, ql, n ? n.x : void 0, s ? s.x : void 0), us(t.y, e, Yl, n ? n.y : void 0, s ? s.y : void 0);
3547
3570
  }
3548
3571
  function hs(t) {
3549
3572
  return t.translate === 0 && t.scale === 1;
@@ -3554,7 +3577,7 @@ function Yi(t) {
3554
3577
  function fs(t, e) {
3555
3578
  return t.min === e.min && t.max === e.max;
3556
3579
  }
3557
- function Yl(t, e) {
3580
+ function Zl(t, e) {
3558
3581
  return fs(t.x, e.x) && fs(t.y, e.y);
3559
3582
  }
3560
3583
  function ds(t, e) {
@@ -3569,7 +3592,7 @@ function ms(t) {
3569
3592
  function ps(t, e) {
3570
3593
  return t.translate === e.translate && t.scale === e.scale && t.originPoint === e.originPoint;
3571
3594
  }
3572
- class Zl {
3595
+ class Ql {
3573
3596
  constructor() {
3574
3597
  this.members = [];
3575
3598
  }
@@ -3588,9 +3611,9 @@ class Zl {
3588
3611
  return !1;
3589
3612
  let s;
3590
3613
  for (let i = n; i >= 0; i--) {
3591
- const r = this.members[i];
3592
- if (r.isPresent !== !1) {
3593
- s = r;
3614
+ const o = this.members[i];
3615
+ if (o.isPresent !== !1) {
3616
+ s = o;
3594
3617
  break;
3595
3618
  }
3596
3619
  }
@@ -3623,10 +3646,10 @@ class Zl {
3623
3646
  this.lead && this.lead.snapshot && (this.lead.snapshot = void 0);
3624
3647
  }
3625
3648
  }
3626
- function Ql(t, e, n) {
3649
+ function Jl(t, e, n) {
3627
3650
  let s = "";
3628
- const i = t.x.translate / e.x, r = t.y.translate / e.y, o = (n == null ? void 0 : n.z) || 0;
3629
- if ((i || r || o) && (s = `translate3d(${i}px, ${r}px, ${o}px) `), (e.x !== 1 || e.y !== 1) && (s += `scale(${1 / e.x}, ${1 / e.y}) `), n) {
3651
+ const i = t.x.translate / e.x, o = t.y.translate / e.y, r = (n == null ? void 0 : n.z) || 0;
3652
+ if ((i || o || r) && (s = `translate3d(${i}px, ${o}px, ${r}px) `), (e.x !== 1 || e.y !== 1) && (s += `scale(${1 / e.x}, ${1 / e.y}) `), n) {
3630
3653
  const { transformPerspective: u, rotate: c, rotateX: h, rotateY: f, skewX: d, skewY: m } = n;
3631
3654
  u && (s = `perspective(${u}px) ${s}`), c && (s += `rotate(${c}deg) `), h && (s += `rotateX(${h}deg) `), f && (s += `rotateY(${f}deg) `), d && (s += `skewX(${d}deg) `), m && (s += `skewY(${m}deg) `);
3632
3655
  }
@@ -3638,8 +3661,8 @@ const et = {
3638
3661
  totalNodes: 0,
3639
3662
  resolvedTargetDeltas: 0,
3640
3663
  recalculatedProjection: 0
3641
- }, Pt = typeof window < "u" && window.MotionDebug !== void 0, fe = ["", "X", "Y", "Z"], Jl = { visibility: "hidden" }, gs = 1e3;
3642
- let tu = 0;
3664
+ }, Pt = typeof window < "u" && window.MotionDebug !== void 0, fe = ["", "X", "Y", "Z"], tu = { visibility: "hidden" }, gs = 1e3;
3665
+ let eu = 0;
3643
3666
  function de(t, e, n, s) {
3644
3667
  const { latestValues: i } = e;
3645
3668
  i[t] && (n[t] = i[t], e.setStaticValue(t, 0), s && (s[t] = 0));
@@ -3650,49 +3673,49 @@ function Qi(t) {
3650
3673
  const { visualElement: e } = t.options;
3651
3674
  if (!e)
3652
3675
  return;
3653
- const n = ri(e);
3676
+ const n = oi(e);
3654
3677
  if (window.MotionHasOptimisedAnimation(n, "transform")) {
3655
- const { layout: i, layoutId: r } = t.options;
3656
- window.MotionCancelOptimisedAnimation(n, "transform", C, !(i || r));
3678
+ const { layout: i, layoutId: o } = t.options;
3679
+ window.MotionCancelOptimisedAnimation(n, "transform", C, !(i || o));
3657
3680
  }
3658
3681
  const { parent: s } = t;
3659
3682
  s && !s.hasCheckedOptimisedAppear && Qi(s);
3660
3683
  }
3661
3684
  function Ji({ attachResizeListener: t, defaultParent: e, measureScroll: n, checkIsScrollRoot: s, resetTransform: i }) {
3662
3685
  return class {
3663
- constructor(o = {}, a = e == null ? void 0 : e()) {
3664
- this.id = tu++, this.animationId = 0, this.children = /* @__PURE__ */ new Set(), this.options = {}, this.isTreeAnimating = !1, this.isAnimationBlocked = !1, this.isLayoutDirty = !1, this.isProjectionDirty = !1, this.isSharedProjectionDirty = !1, this.isTransformDirty = !1, this.updateManuallyBlocked = !1, this.updateBlockedByResize = !1, this.isUpdating = !1, this.isSVG = !1, this.needsReset = !1, this.shouldResetTransform = !1, this.hasCheckedOptimisedAppear = !1, this.treeScale = { x: 1, y: 1 }, this.eventHandlers = /* @__PURE__ */ new Map(), this.hasTreeAnimated = !1, this.updateScheduled = !1, this.scheduleUpdate = () => this.update(), this.projectionUpdateScheduled = !1, this.checkUpdateFailed = () => {
3686
+ constructor(r = {}, a = e == null ? void 0 : e()) {
3687
+ this.id = eu++, this.animationId = 0, this.children = /* @__PURE__ */ new Set(), this.options = {}, this.isTreeAnimating = !1, this.isAnimationBlocked = !1, this.isLayoutDirty = !1, this.isProjectionDirty = !1, this.isSharedProjectionDirty = !1, this.isTransformDirty = !1, this.updateManuallyBlocked = !1, this.updateBlockedByResize = !1, this.isUpdating = !1, this.isSVG = !1, this.needsReset = !1, this.shouldResetTransform = !1, this.hasCheckedOptimisedAppear = !1, this.treeScale = { x: 1, y: 1 }, this.eventHandlers = /* @__PURE__ */ new Map(), this.hasTreeAnimated = !1, this.updateScheduled = !1, this.scheduleUpdate = () => this.update(), this.projectionUpdateScheduled = !1, this.checkUpdateFailed = () => {
3665
3688
  this.isUpdating && (this.isUpdating = !1, this.clearAllSnapshots());
3666
3689
  }, this.updateProjection = () => {
3667
- this.projectionUpdateScheduled = !1, Pt && (et.totalNodes = et.resolvedTargetDeltas = et.recalculatedProjection = 0), this.nodes.forEach(su), this.nodes.forEach(lu), this.nodes.forEach(uu), this.nodes.forEach(iu), Pt && window.MotionDebug.record(et);
3668
- }, this.resolvedRelativeTargetAt = 0, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.latestValues = o, this.root = a ? a.root || a : this, this.path = a ? [...a.path, a] : [], this.parent = a, this.depth = a ? a.depth + 1 : 0;
3690
+ this.projectionUpdateScheduled = !1, Pt && (et.totalNodes = et.resolvedTargetDeltas = et.recalculatedProjection = 0), this.nodes.forEach(iu), this.nodes.forEach(uu), this.nodes.forEach(cu), this.nodes.forEach(ru), Pt && window.MotionDebug.record(et);
3691
+ }, this.resolvedRelativeTargetAt = 0, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.latestValues = r, this.root = a ? a.root || a : this, this.path = a ? [...a.path, a] : [], this.parent = a, this.depth = a ? a.depth + 1 : 0;
3669
3692
  for (let l = 0; l < this.path.length; l++)
3670
3693
  this.path[l].shouldResetTransform = !0;
3671
- this.root === this && (this.nodes = new _l());
3694
+ this.root === this && (this.nodes = new Kl());
3672
3695
  }
3673
- addEventListener(o, a) {
3674
- return this.eventHandlers.has(o) || this.eventHandlers.set(o, new en()), this.eventHandlers.get(o).add(a);
3696
+ addEventListener(r, a) {
3697
+ return this.eventHandlers.has(r) || this.eventHandlers.set(r, new en()), this.eventHandlers.get(r).add(a);
3675
3698
  }
3676
- notifyListeners(o, ...a) {
3677
- const l = this.eventHandlers.get(o);
3699
+ notifyListeners(r, ...a) {
3700
+ const l = this.eventHandlers.get(r);
3678
3701
  l && l.notify(...a);
3679
3702
  }
3680
- hasListeners(o) {
3681
- return this.eventHandlers.has(o);
3703
+ hasListeners(r) {
3704
+ return this.eventHandlers.has(r);
3682
3705
  }
3683
3706
  /**
3684
3707
  * Lifecycles
3685
3708
  */
3686
- mount(o, a = this.root.hasTreeAnimated) {
3709
+ mount(r, a = this.root.hasTreeAnimated) {
3687
3710
  if (this.instance)
3688
3711
  return;
3689
- this.isSVG = Nl(o), this.instance = o;
3712
+ this.isSVG = Ul(r), this.instance = r;
3690
3713
  const { layoutId: l, layout: u, visualElement: c } = this.options;
3691
- if (c && !c.current && c.mount(o), this.root.nodes.add(this), this.parent && this.parent.children.add(this), a && (u || l) && (this.isLayoutDirty = !0), t) {
3714
+ if (c && !c.current && c.mount(r), this.root.nodes.add(this), this.parent && this.parent.children.add(this), a && (u || l) && (this.isLayoutDirty = !0), t) {
3692
3715
  let h;
3693
3716
  const f = () => this.root.updateBlockedByResize = !1;
3694
- t(o, () => {
3695
- this.root.updateBlockedByResize = !0, h && h(), h = Kl(f, 250), Kt.hasAnimatedSinceResize && (Kt.hasAnimatedSinceResize = !1, this.nodes.forEach(vs));
3717
+ t(r, () => {
3718
+ this.root.updateBlockedByResize = !0, h && h(), h = zl(f, 250), Kt.hasAnimatedSinceResize && (Kt.hasAnimatedSinceResize = !1, this.nodes.forEach(vs));
3696
3719
  });
3697
3720
  }
3698
3721
  l && this.root.registerSharedNode(l, this), this.options.animate !== !1 && c && (l || u) && this.addEventListener("didUpdate", ({ delta: h, hasLayoutChanged: f, hasRelativeTargetChanged: d, layout: m }) => {
@@ -3700,7 +3723,7 @@ function Ji({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3700
3723
  this.target = void 0, this.relativeTarget = void 0;
3701
3724
  return;
3702
3725
  }
3703
- const p = this.options.transition || c.getDefaultTransition() || mu, { onLayoutAnimationStart: y, onLayoutAnimationComplete: g } = c.getProps(), v = !this.targetLayout || !Zi(this.targetLayout, m) || d, T = !f && d;
3726
+ const p = this.options.transition || c.getDefaultTransition() || pu, { onLayoutAnimationStart: y, onLayoutAnimationComplete: g } = c.getProps(), v = !this.targetLayout || !Zi(this.targetLayout, m) || d, T = !f && d;
3704
3727
  if (this.options.layoutRoot || this.resumeFrom && this.resumeFrom.instance || T || f && (v || !this.currentAnimation)) {
3705
3728
  this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0), this.setAnimationOrigin(h, T);
3706
3729
  const w = {
@@ -3716,8 +3739,8 @@ function Ji({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3716
3739
  }
3717
3740
  unmount() {
3718
3741
  this.options.layoutId && this.willUpdate(), this.root.nodes.remove(this);
3719
- const o = this.getStack();
3720
- o && o.remove(this), this.parent && this.parent.children.delete(this), this.instance = void 0, Y(this.updateProjection);
3742
+ const r = this.getStack();
3743
+ r && r.remove(this), this.parent && this.parent.children.delete(this), this.instance = void 0, Y(this.updateProjection);
3721
3744
  }
3722
3745
  // only on the root
3723
3746
  blockUpdate() {
@@ -3734,13 +3757,13 @@ function Ji({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3734
3757
  }
3735
3758
  // Note: currently only running on root node
3736
3759
  startUpdate() {
3737
- this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(cu), this.animationId++);
3760
+ this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(hu), this.animationId++);
3738
3761
  }
3739
3762
  getTransformTemplate() {
3740
- const { visualElement: o } = this.options;
3741
- return o && o.getProps().transformTemplate;
3763
+ const { visualElement: r } = this.options;
3764
+ return r && r.getProps().transformTemplate;
3742
3765
  }
3743
- willUpdate(o = !0) {
3766
+ willUpdate(r = !0) {
3744
3767
  if (this.root.hasTreeAnimated = !0, this.root.isUpdateBlocked()) {
3745
3768
  this.options.onExitComplete && this.options.onExitComplete();
3746
3769
  return;
@@ -3756,14 +3779,14 @@ function Ji({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3756
3779
  if (a === void 0 && !l)
3757
3780
  return;
3758
3781
  const u = this.getTransformTemplate();
3759
- this.prevTransformTemplateValue = u ? u(this.latestValues, "") : void 0, this.updateSnapshot(), o && this.notifyListeners("willUpdate");
3782
+ this.prevTransformTemplateValue = u ? u(this.latestValues, "") : void 0, this.updateSnapshot(), r && this.notifyListeners("willUpdate");
3760
3783
  }
3761
3784
  update() {
3762
3785
  if (this.updateScheduled = !1, this.isUpdateBlocked()) {
3763
3786
  this.unblockUpdate(), this.clearAllSnapshots(), this.nodes.forEach(ys);
3764
3787
  return;
3765
3788
  }
3766
- this.isUpdating || this.nodes.forEach(ru), this.isUpdating = !1, this.nodes.forEach(au), this.nodes.forEach(eu), this.nodes.forEach(nu), this.clearAllSnapshots();
3789
+ this.isUpdating || this.nodes.forEach(au), this.isUpdating = !1, this.nodes.forEach(lu), this.nodes.forEach(nu), this.nodes.forEach(su), this.clearAllSnapshots();
3767
3790
  const a = W.now();
3768
3791
  L.delta = X(0, 1e3 / 60, a - L.timestamp), L.timestamp = a, L.isProcessing = !0, se.update.process(L), se.preRender.process(L), se.render.process(L), L.isProcessing = !1;
3769
3792
  }
@@ -3771,7 +3794,7 @@ function Ji({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3771
3794
  this.updateScheduled || (this.updateScheduled = !0, Ne.read(this.scheduleUpdate));
3772
3795
  }
3773
3796
  clearAllSnapshots() {
3774
- this.nodes.forEach(ou), this.sharedNodes.forEach(hu);
3797
+ this.nodes.forEach(ou), this.sharedNodes.forEach(fu);
3775
3798
  }
3776
3799
  scheduleUpdateProjection() {
3777
3800
  this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0, C.preRender(this.updateProjection, !1, !0));
@@ -3793,18 +3816,18 @@ function Ji({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3793
3816
  if (this.resumeFrom && !this.resumeFrom.instance)
3794
3817
  for (let l = 0; l < this.path.length; l++)
3795
3818
  this.path[l].updateScroll();
3796
- const o = this.layout;
3819
+ const r = this.layout;
3797
3820
  this.layout = this.measure(!1), this.layoutCorrected = R(), this.isLayoutDirty = !1, this.projectionDelta = void 0, this.notifyListeners("measure", this.layout.layoutBox);
3798
3821
  const { visualElement: a } = this.options;
3799
- a && a.notify("LayoutMeasure", this.layout.layoutBox, o ? o.layoutBox : void 0);
3822
+ a && a.notify("LayoutMeasure", this.layout.layoutBox, r ? r.layoutBox : void 0);
3800
3823
  }
3801
- updateScroll(o = "measure") {
3824
+ updateScroll(r = "measure") {
3802
3825
  let a = !!(this.options.layoutScroll && this.instance);
3803
- if (this.scroll && this.scroll.animationId === this.root.animationId && this.scroll.phase === o && (a = !1), a) {
3826
+ if (this.scroll && this.scroll.animationId === this.root.animationId && this.scroll.phase === r && (a = !1), a) {
3804
3827
  const l = s(this.instance);
3805
3828
  this.scroll = {
3806
3829
  animationId: this.root.animationId,
3807
- phase: o,
3830
+ phase: r,
3808
3831
  isRoot: l,
3809
3832
  offset: n(this.instance),
3810
3833
  wasRoot: this.scroll ? this.scroll.isRoot : l
@@ -3814,13 +3837,13 @@ function Ji({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3814
3837
  resetTransform() {
3815
3838
  if (!i)
3816
3839
  return;
3817
- const o = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, a = this.projectionDelta && !Yi(this.projectionDelta), l = this.getTransformTemplate(), u = l ? l(this.latestValues, "") : void 0, c = u !== this.prevTransformTemplateValue;
3818
- o && (a || tt(this.latestValues) || c) && (i(this.instance, u), this.shouldResetTransform = !1, this.scheduleRender());
3840
+ const r = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, a = this.projectionDelta && !Yi(this.projectionDelta), l = this.getTransformTemplate(), u = l ? l(this.latestValues, "") : void 0, c = u !== this.prevTransformTemplateValue;
3841
+ r && (a || tt(this.latestValues) || c) && (i(this.instance, u), this.shouldResetTransform = !1, this.scheduleRender());
3819
3842
  }
3820
- measure(o = !0) {
3843
+ measure(r = !0) {
3821
3844
  const a = this.measurePageBox();
3822
3845
  let l = this.removeElementScroll(a);
3823
- return o && (l = this.removeTransform(l)), pu(l), {
3846
+ return r && (l = this.removeTransform(l)), gu(l), {
3824
3847
  animationId: this.root.animationId,
3825
3848
  measuredBox: a,
3826
3849
  layoutBox: l,
@@ -3829,31 +3852,31 @@ function Ji({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3829
3852
  };
3830
3853
  }
3831
3854
  measurePageBox() {
3832
- var o;
3855
+ var r;
3833
3856
  const { visualElement: a } = this.options;
3834
3857
  if (!a)
3835
3858
  return R();
3836
3859
  const l = a.measureViewportBox();
3837
- if (!(((o = this.scroll) === null || o === void 0 ? void 0 : o.wasRoot) || this.path.some(gu))) {
3860
+ if (!(((r = this.scroll) === null || r === void 0 ? void 0 : r.wasRoot) || this.path.some(yu))) {
3838
3861
  const { scroll: c } = this.root;
3839
3862
  c && (ct(l.x, c.offset.x), ct(l.y, c.offset.y));
3840
3863
  }
3841
3864
  return l;
3842
3865
  }
3843
- removeElementScroll(o) {
3866
+ removeElementScroll(r) {
3844
3867
  var a;
3845
3868
  const l = R();
3846
- if (U(l, o), !((a = this.scroll) === null || a === void 0) && a.wasRoot)
3869
+ if (U(l, r), !((a = this.scroll) === null || a === void 0) && a.wasRoot)
3847
3870
  return l;
3848
3871
  for (let u = 0; u < this.path.length; u++) {
3849
3872
  const c = this.path[u], { scroll: h, options: f } = c;
3850
- c !== this.root && h && f.layoutScroll && (h.wasRoot && U(l, o), ct(l.x, h.offset.x), ct(l.y, h.offset.y));
3873
+ c !== this.root && h && f.layoutScroll && (h.wasRoot && U(l, r), ct(l.x, h.offset.x), ct(l.y, h.offset.y));
3851
3874
  }
3852
3875
  return l;
3853
3876
  }
3854
- applyTransform(o, a = !1) {
3877
+ applyTransform(r, a = !1) {
3855
3878
  const l = R();
3856
- U(l, o);
3879
+ U(l, r);
3857
3880
  for (let u = 0; u < this.path.length; u++) {
3858
3881
  const c = this.path[u];
3859
3882
  !a && c.options.layoutScroll && c.scroll && c !== c.root && ht(l, {
@@ -3863,9 +3886,9 @@ function Ji({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3863
3886
  }
3864
3887
  return tt(this.latestValues) && ht(l, this.latestValues), l;
3865
3888
  }
3866
- removeTransform(o) {
3889
+ removeTransform(r) {
3867
3890
  const a = R();
3868
- U(a, o);
3891
+ U(a, r);
3869
3892
  for (let l = 0; l < this.path.length; l++) {
3870
3893
  const u = this.path[l];
3871
3894
  if (!u.instance || !tt(u.latestValues))
@@ -3876,14 +3899,14 @@ function Ji({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3876
3899
  }
3877
3900
  return tt(this.latestValues) && cs(a, this.latestValues), a;
3878
3901
  }
3879
- setTargetDelta(o) {
3880
- this.targetDelta = o, this.root.scheduleUpdateProjection(), this.isProjectionDirty = !0;
3902
+ setTargetDelta(r) {
3903
+ this.targetDelta = r, this.root.scheduleUpdateProjection(), this.isProjectionDirty = !0;
3881
3904
  }
3882
- setOptions(o) {
3905
+ setOptions(r) {
3883
3906
  this.options = {
3884
3907
  ...this.options,
3885
- ...o,
3886
- crossfade: o.crossfade !== void 0 ? o.crossfade : !0
3908
+ ...r,
3909
+ crossfade: r.crossfade !== void 0 ? r.crossfade : !0
3887
3910
  };
3888
3911
  }
3889
3912
  clearMeasurements() {
@@ -3892,24 +3915,24 @@ function Ji({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3892
3915
  forceRelativeParentToResolveTarget() {
3893
3916
  this.relativeParent && this.relativeParent.resolvedRelativeTargetAt !== L.timestamp && this.relativeParent.resolveTargetDelta(!0);
3894
3917
  }
3895
- resolveTargetDelta(o = !1) {
3918
+ resolveTargetDelta(r = !1) {
3896
3919
  var a;
3897
3920
  const l = this.getLead();
3898
3921
  this.isProjectionDirty || (this.isProjectionDirty = l.isProjectionDirty), this.isTransformDirty || (this.isTransformDirty = l.isTransformDirty), this.isSharedProjectionDirty || (this.isSharedProjectionDirty = l.isSharedProjectionDirty);
3899
3922
  const u = !!this.resumingFrom || this !== l;
3900
- if (!(o || u && this.isSharedProjectionDirty || this.isProjectionDirty || !((a = this.parent) === null || a === void 0) && a.isProjectionDirty || this.attemptToResolveRelativeTarget || this.root.updateBlockedByResize))
3923
+ if (!(r || u && this.isSharedProjectionDirty || this.isProjectionDirty || !((a = this.parent) === null || a === void 0) && a.isProjectionDirty || this.attemptToResolveRelativeTarget || this.root.updateBlockedByResize))
3901
3924
  return;
3902
3925
  const { layout: h, layoutId: f } = this.options;
3903
3926
  if (!(!this.layout || !(h || f))) {
3904
3927
  if (this.resolvedRelativeTargetAt = L.timestamp, !this.targetDelta && !this.relativeTarget) {
3905
3928
  const d = this.getClosestProjectingParent();
3906
- d && d.layout && this.animationProgress !== 1 ? (this.relativeParent = d, this.forceRelativeParentToResolveTarget(), this.relativeTarget = R(), this.relativeTargetOrigin = R(), wt(this.relativeTargetOrigin, this.layout.layoutBox, d.layout.layoutBox), U(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
3929
+ d && d.layout && this.animationProgress !== 1 ? (this.relativeParent = d, this.forceRelativeParentToResolveTarget(), this.relativeTarget = R(), this.relativeTargetOrigin = R(), Vt(this.relativeTargetOrigin, this.layout.layoutBox, d.layout.layoutBox), U(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
3907
3930
  }
3908
3931
  if (!(!this.relativeTarget && !this.targetDelta)) {
3909
- if (this.target || (this.target = R(), this.targetWithTransforms = R()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), xl(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.layoutBox) : U(this.target, this.layout.layoutBox), Wi(this.target, this.targetDelta)) : U(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget) {
3932
+ if (this.target || (this.target = R(), this.targetWithTransforms = R()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), Tl(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.layoutBox) : U(this.target, this.layout.layoutBox), Wi(this.target, this.targetDelta)) : U(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget) {
3910
3933
  this.attemptToResolveRelativeTarget = !1;
3911
3934
  const d = this.getClosestProjectingParent();
3912
- d && !!d.resumingFrom == !!this.resumingFrom && !d.options.layoutScroll && d.target && this.animationProgress !== 1 ? (this.relativeParent = d, this.forceRelativeParentToResolveTarget(), this.relativeTarget = R(), this.relativeTargetOrigin = R(), wt(this.relativeTargetOrigin, this.target, d.target), U(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
3935
+ d && !!d.resumingFrom == !!this.resumingFrom && !d.options.layoutScroll && d.target && this.animationProgress !== 1 ? (this.relativeParent = d, this.forceRelativeParentToResolveTarget(), this.relativeTarget = R(), this.relativeTargetOrigin = R(), Vt(this.relativeTargetOrigin, this.target, d.target), U(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
3913
3936
  }
3914
3937
  Pt && et.resolvedTargetDeltas++;
3915
3938
  }
@@ -3923,23 +3946,23 @@ function Ji({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3923
3946
  return !!((this.relativeTarget || this.targetDelta || this.options.layoutRoot) && this.layout);
3924
3947
  }
3925
3948
  calcProjection() {
3926
- var o;
3949
+ var r;
3927
3950
  const a = this.getLead(), l = !!this.resumingFrom || this !== a;
3928
3951
  let u = !0;
3929
- if ((this.isProjectionDirty || !((o = this.parent) === null || o === void 0) && o.isProjectionDirty) && (u = !1), l && (this.isSharedProjectionDirty || this.isTransformDirty) && (u = !1), this.resolvedRelativeTargetAt === L.timestamp && (u = !1), u)
3952
+ if ((this.isProjectionDirty || !((r = this.parent) === null || r === void 0) && r.isProjectionDirty) && (u = !1), l && (this.isSharedProjectionDirty || this.isTransformDirty) && (u = !1), this.resolvedRelativeTargetAt === L.timestamp && (u = !1), u)
3930
3953
  return;
3931
3954
  const { layout: c, layoutId: h } = this.options;
3932
3955
  if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(c || h))
3933
3956
  return;
3934
3957
  U(this.layoutCorrected, this.layout.layoutBox);
3935
3958
  const f = this.treeScale.x, d = this.treeScale.y;
3936
- Dl(this.layoutCorrected, this.treeScale, this.path, l), a.layout && !a.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (a.target = a.layout.layoutBox, a.targetWithTransforms = R());
3959
+ Ml(this.layoutCorrected, this.treeScale, this.path, l), a.layout && !a.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (a.target = a.layout.layoutBox, a.targetWithTransforms = R());
3937
3960
  const { target: m } = a;
3938
3961
  if (!m) {
3939
3962
  this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
3940
3963
  return;
3941
3964
  }
3942
- !this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (as(this.prevProjectionDelta.x, this.projectionDelta.x), as(this.prevProjectionDelta.y, this.projectionDelta.y)), At(this.projectionDelta, this.layoutCorrected, m, this.latestValues), (this.treeScale.x !== f || this.treeScale.y !== d || !ps(this.projectionDelta.x, this.prevProjectionDelta.x) || !ps(this.projectionDelta.y, this.prevProjectionDelta.y)) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", m)), Pt && et.recalculatedProjection++;
3965
+ !this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (as(this.prevProjectionDelta.x, this.projectionDelta.x), as(this.prevProjectionDelta.y, this.projectionDelta.y)), wt(this.projectionDelta, this.layoutCorrected, m, this.latestValues), (this.treeScale.x !== f || this.treeScale.y !== d || !ps(this.projectionDelta.x, this.prevProjectionDelta.x) || !ps(this.projectionDelta.y, this.prevProjectionDelta.y)) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", m)), Pt && et.recalculatedProjection++;
3943
3966
  }
3944
3967
  hide() {
3945
3968
  this.isVisible = !1;
@@ -3947,9 +3970,9 @@ function Ji({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3947
3970
  show() {
3948
3971
  this.isVisible = !0;
3949
3972
  }
3950
- scheduleRender(o = !0) {
3973
+ scheduleRender(r = !0) {
3951
3974
  var a;
3952
- if ((a = this.options.visualElement) === null || a === void 0 || a.scheduleRender(), o) {
3975
+ if ((a = this.options.visualElement) === null || a === void 0 || a.scheduleRender(), r) {
3953
3976
  const l = this.getStack();
3954
3977
  l && l.scheduleRender();
3955
3978
  }
@@ -3958,54 +3981,54 @@ function Ji({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3958
3981
  createProjectionDeltas() {
3959
3982
  this.prevProjectionDelta = ut(), this.projectionDelta = ut(), this.projectionDeltaWithTransform = ut();
3960
3983
  }
3961
- setAnimationOrigin(o, a = !1) {
3984
+ setAnimationOrigin(r, a = !1) {
3962
3985
  const l = this.snapshot, u = l ? l.latestValues : {}, c = { ...this.latestValues }, h = ut();
3963
3986
  (!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !a;
3964
- const f = R(), d = l ? l.source : void 0, m = this.layout ? this.layout.source : void 0, p = d !== m, y = this.getStack(), g = !y || y.members.length <= 1, v = !!(p && !g && this.options.crossfade === !0 && !this.path.some(du));
3987
+ const f = R(), d = l ? l.source : void 0, m = this.layout ? this.layout.source : void 0, p = d !== m, y = this.getStack(), g = !y || y.members.length <= 1, v = !!(p && !g && this.options.crossfade === !0 && !this.path.some(mu));
3965
3988
  this.animationProgress = 0;
3966
3989
  let T;
3967
3990
  this.mixTargetDelta = (w) => {
3968
3991
  const S = w / 1e3;
3969
- xs(h.x, o.x, S), xs(h.y, o.y, S), this.setTargetDelta(h), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (wt(f, this.layout.layoutBox, this.relativeParent.layout.layoutBox), fu(this.relativeTarget, this.relativeTargetOrigin, f, S), T && Yl(this.relativeTarget, T) && (this.isProjectionDirty = !1), T || (T = R()), U(T, this.relativeTarget)), p && (this.animationValues = c, Wl(c, u, this.latestValues, S, v, g)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = S;
3992
+ xs(h.x, r.x, S), xs(h.y, r.y, S), this.setTargetDelta(h), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (Vt(f, this.layout.layoutBox, this.relativeParent.layout.layoutBox), du(this.relativeTarget, this.relativeTargetOrigin, f, S), T && Zl(this.relativeTarget, T) && (this.isProjectionDirty = !1), T || (T = R()), U(T, this.relativeTarget)), p && (this.animationValues = c, $l(c, u, this.latestValues, S, v, g)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = S;
3970
3993
  }, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
3971
3994
  }
3972
- startAnimation(o) {
3995
+ startAnimation(r) {
3973
3996
  this.notifyListeners("animationStart"), this.currentAnimation && this.currentAnimation.stop(), this.resumingFrom && this.resumingFrom.currentAnimation && this.resumingFrom.currentAnimation.stop(), this.pendingAnimation && (Y(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = C.update(() => {
3974
- Kt.hasAnimatedSinceResize = !0, this.currentAnimation = Ol(0, gs, {
3975
- ...o,
3997
+ Kt.hasAnimatedSinceResize = !0, this.currentAnimation = Nl(0, gs, {
3998
+ ...r,
3976
3999
  onUpdate: (a) => {
3977
- this.mixTargetDelta(a), o.onUpdate && o.onUpdate(a);
4000
+ this.mixTargetDelta(a), r.onUpdate && r.onUpdate(a);
3978
4001
  },
3979
4002
  onComplete: () => {
3980
- o.onComplete && o.onComplete(), this.completeAnimation();
4003
+ r.onComplete && r.onComplete(), this.completeAnimation();
3981
4004
  }
3982
4005
  }), this.resumingFrom && (this.resumingFrom.currentAnimation = this.currentAnimation), this.pendingAnimation = void 0;
3983
4006
  });
3984
4007
  }
3985
4008
  completeAnimation() {
3986
4009
  this.resumingFrom && (this.resumingFrom.currentAnimation = void 0, this.resumingFrom.preserveOpacity = void 0);
3987
- const o = this.getStack();
3988
- o && o.exitAnimationComplete(), this.resumingFrom = this.currentAnimation = this.animationValues = void 0, this.notifyListeners("animationComplete");
4010
+ const r = this.getStack();
4011
+ r && r.exitAnimationComplete(), this.resumingFrom = this.currentAnimation = this.animationValues = void 0, this.notifyListeners("animationComplete");
3989
4012
  }
3990
4013
  finishAnimation() {
3991
4014
  this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(gs), this.currentAnimation.stop()), this.completeAnimation();
3992
4015
  }
3993
4016
  applyTransformsToTarget() {
3994
- const o = this.getLead();
3995
- let { targetWithTransforms: a, target: l, layout: u, latestValues: c } = o;
4017
+ const r = this.getLead();
4018
+ let { targetWithTransforms: a, target: l, layout: u, latestValues: c } = r;
3996
4019
  if (!(!a || !l || !u)) {
3997
- if (this !== o && this.layout && u && to(this.options.animationType, this.layout.layoutBox, u.layoutBox)) {
4020
+ if (this !== r && this.layout && u && tr(this.options.animationType, this.layout.layoutBox, u.layoutBox)) {
3998
4021
  l = this.target || R();
3999
4022
  const h = O(this.layout.layoutBox.x);
4000
- l.x.min = o.target.x.min, l.x.max = l.x.min + h;
4023
+ l.x.min = r.target.x.min, l.x.max = l.x.min + h;
4001
4024
  const f = O(this.layout.layoutBox.y);
4002
- l.y.min = o.target.y.min, l.y.max = l.y.min + f;
4025
+ l.y.min = r.target.y.min, l.y.max = l.y.min + f;
4003
4026
  }
4004
- U(a, l), ht(a, c), At(this.projectionDeltaWithTransform, this.layoutCorrected, a, c);
4027
+ U(a, l), ht(a, c), wt(this.projectionDeltaWithTransform, this.layoutCorrected, a, c);
4005
4028
  }
4006
4029
  }
4007
- registerSharedNode(o, a) {
4008
- this.sharedNodes.has(o) || this.sharedNodes.set(o, new Zl()), this.sharedNodes.get(o).add(a);
4030
+ registerSharedNode(r, a) {
4031
+ this.sharedNodes.has(r) || this.sharedNodes.set(r, new Ql()), this.sharedNodes.get(r).add(a);
4009
4032
  const u = a.options.initialPromotionConfig;
4010
4033
  a.promote({
4011
4034
  transition: u ? u.transition : void 0,
@@ -4013,67 +4036,67 @@ function Ji({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4013
4036
  });
4014
4037
  }
4015
4038
  isLead() {
4016
- const o = this.getStack();
4017
- return o ? o.lead === this : !0;
4039
+ const r = this.getStack();
4040
+ return r ? r.lead === this : !0;
4018
4041
  }
4019
4042
  getLead() {
4020
- var o;
4043
+ var r;
4021
4044
  const { layoutId: a } = this.options;
4022
- return a ? ((o = this.getStack()) === null || o === void 0 ? void 0 : o.lead) || this : this;
4045
+ return a ? ((r = this.getStack()) === null || r === void 0 ? void 0 : r.lead) || this : this;
4023
4046
  }
4024
4047
  getPrevLead() {
4025
- var o;
4048
+ var r;
4026
4049
  const { layoutId: a } = this.options;
4027
- return a ? (o = this.getStack()) === null || o === void 0 ? void 0 : o.prevLead : void 0;
4050
+ return a ? (r = this.getStack()) === null || r === void 0 ? void 0 : r.prevLead : void 0;
4028
4051
  }
4029
4052
  getStack() {
4030
- const { layoutId: o } = this.options;
4031
- if (o)
4032
- return this.root.sharedNodes.get(o);
4053
+ const { layoutId: r } = this.options;
4054
+ if (r)
4055
+ return this.root.sharedNodes.get(r);
4033
4056
  }
4034
- promote({ needsReset: o, transition: a, preserveFollowOpacity: l } = {}) {
4057
+ promote({ needsReset: r, transition: a, preserveFollowOpacity: l } = {}) {
4035
4058
  const u = this.getStack();
4036
- u && u.promote(this, l), o && (this.projectionDelta = void 0, this.needsReset = !0), a && this.setOptions({ transition: a });
4059
+ u && u.promote(this, l), r && (this.projectionDelta = void 0, this.needsReset = !0), a && this.setOptions({ transition: a });
4037
4060
  }
4038
4061
  relegate() {
4039
- const o = this.getStack();
4040
- return o ? o.relegate(this) : !1;
4062
+ const r = this.getStack();
4063
+ return r ? r.relegate(this) : !1;
4041
4064
  }
4042
4065
  resetSkewAndRotation() {
4043
- const { visualElement: o } = this.options;
4044
- if (!o)
4066
+ const { visualElement: r } = this.options;
4067
+ if (!r)
4045
4068
  return;
4046
4069
  let a = !1;
4047
- const { latestValues: l } = o;
4070
+ const { latestValues: l } = r;
4048
4071
  if ((l.z || l.rotate || l.rotateX || l.rotateY || l.rotateZ || l.skewX || l.skewY) && (a = !0), !a)
4049
4072
  return;
4050
4073
  const u = {};
4051
- l.z && de("z", o, u, this.animationValues);
4074
+ l.z && de("z", r, u, this.animationValues);
4052
4075
  for (let c = 0; c < fe.length; c++)
4053
- de(`rotate${fe[c]}`, o, u, this.animationValues), de(`skew${fe[c]}`, o, u, this.animationValues);
4054
- o.render();
4076
+ de(`rotate${fe[c]}`, r, u, this.animationValues), de(`skew${fe[c]}`, r, u, this.animationValues);
4077
+ r.render();
4055
4078
  for (const c in u)
4056
- o.setStaticValue(c, u[c]), this.animationValues && (this.animationValues[c] = u[c]);
4057
- o.scheduleRender();
4079
+ r.setStaticValue(c, u[c]), this.animationValues && (this.animationValues[c] = u[c]);
4080
+ r.scheduleRender();
4058
4081
  }
4059
- getProjectionStyles(o) {
4082
+ getProjectionStyles(r) {
4060
4083
  var a, l;
4061
4084
  if (!this.instance || this.isSVG)
4062
4085
  return;
4063
4086
  if (!this.isVisible)
4064
- return Jl;
4087
+ return tu;
4065
4088
  const u = {
4066
4089
  visibility: ""
4067
4090
  }, c = this.getTransformTemplate();
4068
4091
  if (this.needsReset)
4069
- return this.needsReset = !1, u.opacity = "", u.pointerEvents = Ut(o == null ? void 0 : o.pointerEvents) || "", u.transform = c ? c(this.latestValues, "") : "none", u;
4092
+ return this.needsReset = !1, u.opacity = "", u.pointerEvents = Ut(r == null ? void 0 : r.pointerEvents) || "", u.transform = c ? c(this.latestValues, "") : "none", u;
4070
4093
  const h = this.getLead();
4071
4094
  if (!this.projectionDelta || !this.layout || !h.target) {
4072
4095
  const p = {};
4073
- return this.options.layoutId && (p.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, p.pointerEvents = Ut(o == null ? void 0 : o.pointerEvents) || ""), this.hasProjected && !tt(this.latestValues) && (p.transform = c ? c({}, "") : "none", this.hasProjected = !1), p;
4096
+ return this.options.layoutId && (p.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, p.pointerEvents = Ut(r == null ? void 0 : r.pointerEvents) || ""), this.hasProjected && !tt(this.latestValues) && (p.transform = c ? c({}, "") : "none", this.hasProjected = !1), p;
4074
4097
  }
4075
4098
  const f = h.animationValues || h.latestValues;
4076
- this.applyTransformsToTarget(), u.transform = Ql(this.projectionDeltaWithTransform, this.treeScale, f), c && (u.transform = c(f, u.transform));
4099
+ this.applyTransformsToTarget(), u.transform = Jl(this.projectionDeltaWithTransform, this.treeScale, f), c && (u.transform = c(f, u.transform));
4077
4100
  const { x: d, y: m } = this.projectionDelta;
4078
4101
  u.transformOrigin = `${d.origin * 100}% ${m.origin * 100}% 0`, h.animationValues ? u.opacity = h === this ? (l = (a = f.opacity) !== null && a !== void 0 ? a : this.latestValues.opacity) !== null && l !== void 0 ? l : 1 : this.preserveOpacity ? this.latestValues.opacity : f.opacityExit : u.opacity = h === this ? f.opacity !== void 0 ? f.opacity : "" : f.opacityExit !== void 0 ? f.opacityExit : 0;
4079
4102
  for (const p in Wt) {
@@ -4087,39 +4110,39 @@ function Ji({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4087
4110
  } else
4088
4111
  u[p] = v;
4089
4112
  }
4090
- return this.options.layoutId && (u.pointerEvents = h === this ? Ut(o == null ? void 0 : o.pointerEvents) || "" : "none"), u;
4113
+ return this.options.layoutId && (u.pointerEvents = h === this ? Ut(r == null ? void 0 : r.pointerEvents) || "" : "none"), u;
4091
4114
  }
4092
4115
  clearSnapshot() {
4093
4116
  this.resumeFrom = this.snapshot = void 0;
4094
4117
  }
4095
4118
  // Only run on root
4096
4119
  resetTree() {
4097
- this.root.nodes.forEach((o) => {
4120
+ this.root.nodes.forEach((r) => {
4098
4121
  var a;
4099
- return (a = o.currentAnimation) === null || a === void 0 ? void 0 : a.stop();
4122
+ return (a = r.currentAnimation) === null || a === void 0 ? void 0 : a.stop();
4100
4123
  }), this.root.nodes.forEach(ys), this.root.sharedNodes.clear();
4101
4124
  }
4102
4125
  };
4103
4126
  }
4104
- function eu(t) {
4127
+ function nu(t) {
4105
4128
  t.updateLayout();
4106
4129
  }
4107
- function nu(t) {
4130
+ function su(t) {
4108
4131
  var e;
4109
4132
  const n = ((e = t.resumeFrom) === null || e === void 0 ? void 0 : e.snapshot) || t.snapshot;
4110
4133
  if (t.isLead() && t.layout && n && t.hasListeners("didUpdate")) {
4111
- const { layoutBox: s, measuredBox: i } = t.layout, { animationType: r } = t.options, o = n.source !== t.layout.source;
4112
- r === "size" ? _((h) => {
4113
- const f = o ? n.measuredBox[h] : n.layoutBox[h], d = O(f);
4134
+ const { layoutBox: s, measuredBox: i } = t.layout, { animationType: o } = t.options, r = n.source !== t.layout.source;
4135
+ o === "size" ? _((h) => {
4136
+ const f = r ? n.measuredBox[h] : n.layoutBox[h], d = O(f);
4114
4137
  f.min = s[h].min, f.max = f.min + d;
4115
- }) : to(r, n.layoutBox, s) && _((h) => {
4116
- const f = o ? n.measuredBox[h] : n.layoutBox[h], d = O(s[h]);
4138
+ }) : tr(o, n.layoutBox, s) && _((h) => {
4139
+ const f = r ? n.measuredBox[h] : n.layoutBox[h], d = O(s[h]);
4117
4140
  f.max = f.min + d, t.relativeTarget && !t.currentAnimation && (t.isProjectionDirty = !0, t.relativeTarget[h].max = t.relativeTarget[h].min + d);
4118
4141
  });
4119
4142
  const a = ut();
4120
- At(a, s, n.layoutBox);
4143
+ wt(a, s, n.layoutBox);
4121
4144
  const l = ut();
4122
- o ? At(l, t.applyTransform(i, !0), n.measuredBox) : At(l, s, n.layoutBox);
4145
+ r ? wt(l, t.applyTransform(i, !0), n.measuredBox) : wt(l, s, n.layoutBox);
4123
4146
  const u = !Yi(a);
4124
4147
  let c = !1;
4125
4148
  if (!t.resumeFrom) {
@@ -4128,9 +4151,9 @@ function nu(t) {
4128
4151
  const { snapshot: f, layout: d } = h;
4129
4152
  if (f && d) {
4130
4153
  const m = R();
4131
- wt(m, n.layoutBox, f.layoutBox);
4154
+ Vt(m, n.layoutBox, f.layoutBox);
4132
4155
  const p = R();
4133
- wt(p, s, d.layoutBox), Zi(m, p) || (c = !0), h.options.layoutRoot && (t.relativeTarget = p, t.relativeTargetOrigin = m, t.relativeParent = h);
4156
+ Vt(p, s, d.layoutBox), Zi(m, p) || (c = !0), h.options.layoutRoot && (t.relativeTarget = p, t.relativeTargetOrigin = m, t.relativeParent = h);
4134
4157
  }
4135
4158
  }
4136
4159
  }
@@ -4148,10 +4171,10 @@ function nu(t) {
4148
4171
  }
4149
4172
  t.options.transition = void 0;
4150
4173
  }
4151
- function su(t) {
4174
+ function iu(t) {
4152
4175
  Pt && et.totalNodes++, t.parent && (t.isProjecting() || (t.isProjectionDirty = t.parent.isProjectionDirty), t.isSharedProjectionDirty || (t.isSharedProjectionDirty = !!(t.isProjectionDirty || t.parent.isProjectionDirty || t.parent.isSharedProjectionDirty)), t.isTransformDirty || (t.isTransformDirty = t.parent.isTransformDirty));
4153
4176
  }
4154
- function iu(t) {
4177
+ function ru(t) {
4155
4178
  t.isProjectionDirty = t.isSharedProjectionDirty = t.isTransformDirty = !1;
4156
4179
  }
4157
4180
  function ou(t) {
@@ -4160,26 +4183,26 @@ function ou(t) {
4160
4183
  function ys(t) {
4161
4184
  t.clearMeasurements();
4162
4185
  }
4163
- function ru(t) {
4186
+ function au(t) {
4164
4187
  t.isLayoutDirty = !1;
4165
4188
  }
4166
- function au(t) {
4189
+ function lu(t) {
4167
4190
  const { visualElement: e } = t.options;
4168
4191
  e && e.getProps().onBeforeLayoutMeasure && e.notify("BeforeLayoutMeasure"), t.resetTransform();
4169
4192
  }
4170
4193
  function vs(t) {
4171
4194
  t.finishAnimation(), t.targetDelta = t.relativeTarget = t.target = void 0, t.isProjectionDirty = !0;
4172
4195
  }
4173
- function lu(t) {
4196
+ function uu(t) {
4174
4197
  t.resolveTargetDelta();
4175
4198
  }
4176
- function uu(t) {
4199
+ function cu(t) {
4177
4200
  t.calcProjection();
4178
4201
  }
4179
- function cu(t) {
4202
+ function hu(t) {
4180
4203
  t.resetSkewAndRotation();
4181
4204
  }
4182
- function hu(t) {
4205
+ function fu(t) {
4183
4206
  t.removeLeadSnapshot();
4184
4207
  }
4185
4208
  function xs(t, e, n) {
@@ -4188,31 +4211,31 @@ function xs(t, e, n) {
4188
4211
  function Ts(t, e, n, s) {
4189
4212
  t.min = D(e.min, n.min, s), t.max = D(e.max, n.max, s);
4190
4213
  }
4191
- function fu(t, e, n, s) {
4214
+ function du(t, e, n, s) {
4192
4215
  Ts(t.x, e.x, n.x, s), Ts(t.y, e.y, n.y, s);
4193
4216
  }
4194
- function du(t) {
4217
+ function mu(t) {
4195
4218
  return t.animationValues && t.animationValues.opacityExit !== void 0;
4196
4219
  }
4197
- const mu = {
4220
+ const pu = {
4198
4221
  duration: 0.45,
4199
4222
  ease: [0.4, 0, 0.1, 1]
4200
4223
  }, Ps = (t) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(t), Ss = Ps("applewebkit/") && !Ps("chrome/") ? Math.round : I;
4201
4224
  function bs(t) {
4202
4225
  t.min = Ss(t.min), t.max = Ss(t.max);
4203
4226
  }
4204
- function pu(t) {
4227
+ function gu(t) {
4205
4228
  bs(t.x), bs(t.y);
4206
4229
  }
4207
- function to(t, e, n) {
4208
- return t === "position" || t === "preserve-aspect" && !vl(ms(e), ms(n), 0.2);
4230
+ function tr(t, e, n) {
4231
+ return t === "position" || t === "preserve-aspect" && !xl(ms(e), ms(n), 0.2);
4209
4232
  }
4210
- function gu(t) {
4233
+ function yu(t) {
4211
4234
  var e;
4212
4235
  return t !== t.root && ((e = t.scroll) === null || e === void 0 ? void 0 : e.wasRoot);
4213
4236
  }
4214
- const yu = Ji({
4215
- attachResizeListener: (t, e) => Rt(t, "resize", e),
4237
+ const vu = Ji({
4238
+ attachResizeListener: (t, e) => Et(t, "resize", e),
4216
4239
  measureScroll: () => ({
4217
4240
  x: document.documentElement.scrollLeft || document.body.scrollLeft,
4218
4241
  y: document.documentElement.scrollTop || document.body.scrollTop
@@ -4220,14 +4243,14 @@ const yu = Ji({
4220
4243
  checkIsScrollRoot: () => !0
4221
4244
  }), me = {
4222
4245
  current: void 0
4223
- }, eo = Ji({
4246
+ }, er = Ji({
4224
4247
  measureScroll: (t) => ({
4225
4248
  x: t.scrollLeft,
4226
4249
  y: t.scrollTop
4227
4250
  }),
4228
4251
  defaultParent: () => {
4229
4252
  if (!me.current) {
4230
- const t = new yu({});
4253
+ const t = new vu({});
4231
4254
  t.mount(window), t.setOptions({ layoutScroll: !0 }), me.current = t;
4232
4255
  }
4233
4256
  return me.current;
@@ -4236,31 +4259,31 @@ const yu = Ji({
4236
4259
  t.style.transform = e !== void 0 ? e : "none";
4237
4260
  },
4238
4261
  checkIsScrollRoot: (t) => window.getComputedStyle(t).position === "fixed"
4239
- }), vu = {
4262
+ }), xu = {
4240
4263
  pan: {
4241
- Feature: jl
4264
+ Feature: Bl
4242
4265
  },
4243
4266
  drag: {
4244
4267
  Feature: Fl,
4245
- ProjectionNode: eo,
4268
+ ProjectionNode: er,
4246
4269
  MeasureLayout: Hi
4247
4270
  }
4248
4271
  };
4249
4272
  function As(t, e, n) {
4250
4273
  const { props: s } = t;
4251
4274
  t.animationState && s.whileHover && t.animationState.setActive("whileHover", n === "Start");
4252
- const i = "onHover" + n, r = s[i];
4253
- r && C.postRender(() => r(e, jt(e)));
4275
+ const i = "onHover" + n, o = s[i];
4276
+ o && C.postRender(() => o(e, Bt(e)));
4254
4277
  }
4255
- class xu extends Q {
4278
+ class Tu extends Q {
4256
4279
  mount() {
4257
4280
  const { current: e } = this.node;
4258
- e && (this.unmount = vr(e, (n) => (As(this.node, n, "Start"), (s) => As(this.node, s, "End"))));
4281
+ e && (this.unmount = xo(e, (n) => (As(this.node, n, "Start"), (s) => As(this.node, s, "End"))));
4259
4282
  }
4260
4283
  unmount() {
4261
4284
  }
4262
4285
  }
4263
- class Tu extends Q {
4286
+ class Pu extends Q {
4264
4287
  constructor() {
4265
4288
  super(...arguments), this.isActive = !1;
4266
4289
  }
@@ -4277,7 +4300,7 @@ class Tu extends Q {
4277
4300
  !this.isActive || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !1), this.isActive = !1);
4278
4301
  }
4279
4302
  mount() {
4280
- this.unmount = Ft(Rt(this.node.current, "focus", () => this.onFocus()), Rt(this.node.current, "blur", () => this.onBlur()));
4303
+ this.unmount = Ft(Et(this.node.current, "focus", () => this.onFocus()), Et(this.node.current, "blur", () => this.onBlur()));
4281
4304
  }
4282
4305
  unmount() {
4283
4306
  }
@@ -4285,58 +4308,58 @@ class Tu extends Q {
4285
4308
  function ws(t, e, n) {
4286
4309
  const { props: s } = t;
4287
4310
  t.animationState && s.whileTap && t.animationState.setActive("whileTap", n === "Start");
4288
- const i = "onTap" + (n === "End" ? "" : n), r = s[i];
4289
- r && C.postRender(() => r(e, jt(e)));
4311
+ const i = "onTap" + (n === "End" ? "" : n), o = s[i];
4312
+ o && C.postRender(() => o(e, Bt(e)));
4290
4313
  }
4291
- class Pu extends Q {
4314
+ class Su extends Q {
4292
4315
  mount() {
4293
4316
  const { current: e } = this.node;
4294
- e && (this.unmount = Sr(e, (n) => (ws(this.node, n, "Start"), (s, { success: i }) => ws(this.node, s, i ? "End" : "Cancel")), { useGlobalTarget: this.node.props.globalTapTarget }));
4317
+ e && (this.unmount = bo(e, (n) => (ws(this.node, n, "Start"), (s, { success: i }) => ws(this.node, s, i ? "End" : "Cancel")), { useGlobalTarget: this.node.props.globalTapTarget }));
4295
4318
  }
4296
4319
  unmount() {
4297
4320
  }
4298
4321
  }
4299
- const Re = /* @__PURE__ */ new WeakMap(), pe = /* @__PURE__ */ new WeakMap(), Su = (t) => {
4322
+ const Re = /* @__PURE__ */ new WeakMap(), pe = /* @__PURE__ */ new WeakMap(), bu = (t) => {
4300
4323
  const e = Re.get(t.target);
4301
4324
  e && e(t);
4302
- }, bu = (t) => {
4303
- t.forEach(Su);
4325
+ }, Au = (t) => {
4326
+ t.forEach(bu);
4304
4327
  };
4305
- function Au({ root: t, ...e }) {
4328
+ function wu({ root: t, ...e }) {
4306
4329
  const n = t || document;
4307
4330
  pe.has(n) || pe.set(n, {});
4308
4331
  const s = pe.get(n), i = JSON.stringify(e);
4309
- return s[i] || (s[i] = new IntersectionObserver(bu, { root: t, ...e })), s[i];
4332
+ return s[i] || (s[i] = new IntersectionObserver(Au, { root: t, ...e })), s[i];
4310
4333
  }
4311
- function wu(t, e, n) {
4312
- const s = Au(e);
4334
+ function Vu(t, e, n) {
4335
+ const s = wu(e);
4313
4336
  return Re.set(t, n), s.observe(t), () => {
4314
4337
  Re.delete(t), s.unobserve(t);
4315
4338
  };
4316
4339
  }
4317
- const Vu = {
4340
+ const Cu = {
4318
4341
  some: 0,
4319
4342
  all: 1
4320
4343
  };
4321
- class Cu extends Q {
4344
+ class Du extends Q {
4322
4345
  constructor() {
4323
4346
  super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
4324
4347
  }
4325
4348
  startObserver() {
4326
4349
  this.unmount();
4327
- const { viewport: e = {} } = this.node.getProps(), { root: n, margin: s, amount: i = "some", once: r } = e, o = {
4350
+ const { viewport: e = {} } = this.node.getProps(), { root: n, margin: s, amount: i = "some", once: o } = e, r = {
4328
4351
  root: n ? n.current : void 0,
4329
4352
  rootMargin: s,
4330
- threshold: typeof i == "number" ? i : Vu[i]
4353
+ threshold: typeof i == "number" ? i : Cu[i]
4331
4354
  }, a = (l) => {
4332
4355
  const { isIntersecting: u } = l;
4333
- if (this.isInView === u || (this.isInView = u, r && !u && this.hasEnteredView))
4356
+ if (this.isInView === u || (this.isInView = u, o && !u && this.hasEnteredView))
4334
4357
  return;
4335
4358
  u && (this.hasEnteredView = !0), this.node.animationState && this.node.animationState.setActive("whileInView", u);
4336
4359
  const { onViewportEnter: c, onViewportLeave: h } = this.node.getProps(), f = u ? c : h;
4337
4360
  f && f(l);
4338
4361
  };
4339
- return wu(this.node.current, o, a);
4362
+ return Vu(this.node.current, r, a);
4340
4363
  }
4341
4364
  mount() {
4342
4365
  this.startObserver();
@@ -4345,56 +4368,56 @@ class Cu extends Q {
4345
4368
  if (typeof IntersectionObserver > "u")
4346
4369
  return;
4347
4370
  const { props: e, prevProps: n } = this.node;
4348
- ["amount", "margin", "root"].some(Du(e, n)) && this.startObserver();
4371
+ ["amount", "margin", "root"].some(Mu(e, n)) && this.startObserver();
4349
4372
  }
4350
4373
  unmount() {
4351
4374
  }
4352
4375
  }
4353
- function Du({ viewport: t = {} }, { viewport: e = {} } = {}) {
4376
+ function Mu({ viewport: t = {} }, { viewport: e = {} } = {}) {
4354
4377
  return (n) => t[n] !== e[n];
4355
4378
  }
4356
- const Mu = {
4379
+ const Ru = {
4357
4380
  inView: {
4358
- Feature: Cu
4381
+ Feature: Du
4359
4382
  },
4360
4383
  tap: {
4361
- Feature: Pu
4384
+ Feature: Su
4362
4385
  },
4363
4386
  focus: {
4364
- Feature: Tu
4387
+ Feature: Pu
4365
4388
  },
4366
4389
  hover: {
4367
- Feature: xu
4390
+ Feature: Tu
4368
4391
  }
4369
- }, Ru = {
4392
+ }, Eu = {
4370
4393
  layout: {
4371
- ProjectionNode: eo,
4394
+ ProjectionNode: er,
4372
4395
  MeasureLayout: Hi
4373
4396
  }
4374
- }, Ee = { current: null }, no = { current: !1 };
4375
- function Eu() {
4376
- if (no.current = !0, !!je)
4397
+ }, Ee = { current: null }, nr = { current: !1 };
4398
+ function Lu() {
4399
+ if (nr.current = !0, !!Fe)
4377
4400
  if (window.matchMedia) {
4378
4401
  const t = window.matchMedia("(prefers-reduced-motion)"), e = () => Ee.current = t.matches;
4379
4402
  t.addListener(e), e();
4380
4403
  } else
4381
4404
  Ee.current = !1;
4382
4405
  }
4383
- const Lu = [...Ci, F, Z], Fu = (t) => Lu.find(Vi(t)), Vs = /* @__PURE__ */ new WeakMap();
4384
- function ju(t, e, n) {
4406
+ const ju = [...Ci, j, Z], Fu = (t) => ju.find(Vi(t)), Vs = /* @__PURE__ */ new WeakMap();
4407
+ function Bu(t, e, n) {
4385
4408
  for (const s in e) {
4386
- const i = e[s], r = n[s];
4387
- if (j(i))
4409
+ const i = e[s], o = n[s];
4410
+ if (F(i))
4388
4411
  t.addValue(s, i);
4389
- else if (j(r))
4390
- t.addValue(s, Dt(i, { owner: t }));
4391
- else if (r !== i)
4412
+ else if (F(o))
4413
+ t.addValue(s, Mt(i, { owner: t }));
4414
+ else if (o !== i)
4392
4415
  if (t.hasValue(s)) {
4393
- const o = t.getValue(s);
4394
- o.liveStyle === !0 ? o.jump(i) : o.hasAnimated || o.set(i);
4416
+ const r = t.getValue(s);
4417
+ r.liveStyle === !0 ? r.jump(i) : r.hasAnimated || r.set(i);
4395
4418
  } else {
4396
- const o = t.getStaticValue(s);
4397
- t.addValue(s, Dt(o !== void 0 ? o : i, { owner: t }));
4419
+ const r = t.getStaticValue(s);
4420
+ t.addValue(s, Mt(r !== void 0 ? r : i, { owner: t }));
4398
4421
  }
4399
4422
  }
4400
4423
  for (const s in n)
@@ -4410,7 +4433,7 @@ const Cs = [
4410
4433
  "LayoutAnimationStart",
4411
4434
  "LayoutAnimationComplete"
4412
4435
  ];
4413
- class Bu {
4436
+ class ku {
4414
4437
  /**
4415
4438
  * This method takes React props and returns found MotionValues. For example, HTML
4416
4439
  * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
@@ -4421,23 +4444,23 @@ class Bu {
4421
4444
  scrapeMotionValuesFromProps(e, n, s) {
4422
4445
  return {};
4423
4446
  }
4424
- constructor({ parent: e, props: n, presenceContext: s, reducedMotionConfig: i, blockInitialAnimation: r, visualState: o }, a = {}) {
4447
+ constructor({ parent: e, props: n, presenceContext: s, reducedMotionConfig: i, blockInitialAnimation: o, visualState: r }, a = {}) {
4425
4448
  this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = ln, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
4426
4449
  this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
4427
4450
  }, this.renderScheduledAt = 0, this.scheduleRender = () => {
4428
4451
  const d = W.now();
4429
4452
  this.renderScheduledAt < d && (this.renderScheduledAt = d, C.render(this.render, !1, !0));
4430
4453
  };
4431
- const { latestValues: l, renderState: u, onUpdate: c } = o;
4432
- this.onUpdate = c, this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = n.initial ? { ...l } : {}, this.renderState = u, this.parent = e, this.props = n, this.presenceContext = s, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = i, this.options = a, this.blockInitialAnimation = !!r, this.isControllingVariants = Qt(n), this.isVariantNode = Bs(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
4454
+ const { latestValues: l, renderState: u, onUpdate: c } = r;
4455
+ this.onUpdate = c, this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = n.initial ? { ...l } : {}, this.renderState = u, this.parent = e, this.props = n, this.presenceContext = s, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = i, this.options = a, this.blockInitialAnimation = !!o, this.isControllingVariants = Qt(n), this.isVariantNode = Bs(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
4433
4456
  const { willChange: h, ...f } = this.scrapeMotionValuesFromProps(n, {}, this);
4434
4457
  for (const d in f) {
4435
4458
  const m = f[d];
4436
- l[d] !== void 0 && j(m) && m.set(l[d], !1);
4459
+ l[d] !== void 0 && F(m) && m.set(l[d], !1);
4437
4460
  }
4438
4461
  }
4439
4462
  mount(e) {
4440
- this.current = e, Vs.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, s) => this.bindToMotionValue(s, n)), no.current || Eu(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : Ee.current, this.parent && this.parent.children.add(this), this.update(this.props, this.presenceContext);
4463
+ this.current = e, Vs.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, s) => this.bindToMotionValue(s, n)), nr.current || Lu(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : Ee.current, this.parent && this.parent.children.add(this), this.update(this.props, this.presenceContext);
4441
4464
  }
4442
4465
  unmount() {
4443
4466
  Vs.delete(this.current), this.projection && this.projection.unmount(), Y(this.notifyUpdate), Y(this.render), this.valueSubscriptions.forEach((e) => e()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
@@ -4453,10 +4476,10 @@ class Bu {
4453
4476
  this.valueSubscriptions.has(e) && this.valueSubscriptions.get(e)();
4454
4477
  const s = it.has(e), i = n.on("change", (a) => {
4455
4478
  this.latestValues[e] = a, this.props.onUpdate && C.preRender(this.notifyUpdate), s && this.projection && (this.projection.isTransformDirty = !0);
4456
- }), r = n.on("renderRequest", this.scheduleRender);
4457
- let o;
4458
- window.MotionCheckAppearSync && (o = window.MotionCheckAppearSync(this, e, n)), this.valueSubscriptions.set(e, () => {
4459
- i(), r(), o && o(), n.owner && n.stop();
4479
+ }), o = n.on("renderRequest", this.scheduleRender);
4480
+ let r;
4481
+ window.MotionCheckAppearSync && (r = window.MotionCheckAppearSync(this, e, n)), this.valueSubscriptions.set(e, () => {
4482
+ i(), o(), r && r(), n.owner && n.stop();
4460
4483
  });
4461
4484
  }
4462
4485
  sortNodePosition(e) {
@@ -4470,8 +4493,8 @@ class Bu {
4470
4493
  continue;
4471
4494
  const { isEnabled: s, Feature: i } = n;
4472
4495
  if (!this.features[e] && i && s(this.props) && (this.features[e] = new i(this)), this.features[e]) {
4473
- const r = this.features[e];
4474
- r.isMounted ? r.update() : (r.mount(), r.isMounted = !0);
4496
+ const o = this.features[e];
4497
+ o.isMounted ? o.update() : (o.mount(), o.isMounted = !0);
4475
4498
  }
4476
4499
  }
4477
4500
  }
@@ -4501,10 +4524,10 @@ class Bu {
4501
4524
  for (let s = 0; s < Cs.length; s++) {
4502
4525
  const i = Cs[s];
4503
4526
  this.propEventSubscriptions[i] && (this.propEventSubscriptions[i](), delete this.propEventSubscriptions[i]);
4504
- const r = "on" + i, o = e[r];
4505
- o && (this.propEventSubscriptions[i] = this.on(i, o));
4527
+ const o = "on" + i, r = e[o];
4528
+ r && (this.propEventSubscriptions[i] = this.on(i, r));
4506
4529
  }
4507
- this.prevMotionValues = ju(this, this.scrapeMotionValuesFromProps(e, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue(), this.onUpdate && this.onUpdate(this);
4530
+ this.prevMotionValues = Bu(this, this.scrapeMotionValuesFromProps(e, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue(), this.onUpdate && this.onUpdate(this);
4508
4531
  }
4509
4532
  getProps() {
4510
4533
  return this.props;
@@ -4560,7 +4583,7 @@ class Bu {
4560
4583
  if (this.props.values && this.props.values[e])
4561
4584
  return this.props.values[e];
4562
4585
  let s = this.values.get(e);
4563
- return s === void 0 && n !== void 0 && (s = Dt(n === null ? void 0 : n, { owner: this }), this.addValue(e, s)), s;
4586
+ return s === void 0 && n !== void 0 && (s = Mt(n === null ? void 0 : n, { owner: this }), this.addValue(e, s)), s;
4564
4587
  }
4565
4588
  /**
4566
4589
  * If we're trying to animate to a previously unencountered value,
@@ -4570,7 +4593,7 @@ class Bu {
4570
4593
  readValue(e, n) {
4571
4594
  var s;
4572
4595
  let i = this.latestValues[e] !== void 0 || !this.current ? this.latestValues[e] : (s = this.getBaseTargetFromProps(this.props, e)) !== null && s !== void 0 ? s : this.readValueFromInstance(this.current, e, this.options);
4573
- return i != null && (typeof i == "string" && (Ai(i) || pi(i)) ? i = parseFloat(i) : !Fu(i) && Z.test(n) && (i = Pi(e, n)), this.setBaseTarget(e, j(i) ? i.get() : i)), j(i) ? i.get() : i;
4596
+ return i != null && (typeof i == "string" && (Ai(i) || pi(i)) ? i = parseFloat(i) : !Fu(i) && Z.test(n) && (i = Pi(e, n)), this.setBaseTarget(e, F(i) ? i.get() : i)), F(i) ? i.get() : i;
4574
4597
  }
4575
4598
  /**
4576
4599
  * Set the base target to later animate back to. This is currently
@@ -4588,13 +4611,13 @@ class Bu {
4588
4611
  const { initial: s } = this.props;
4589
4612
  let i;
4590
4613
  if (typeof s == "string" || typeof s == "object") {
4591
- const o = _e(this.props, s, (n = this.presenceContext) === null || n === void 0 ? void 0 : n.custom);
4592
- o && (i = o[e]);
4614
+ const r = _e(this.props, s, (n = this.presenceContext) === null || n === void 0 ? void 0 : n.custom);
4615
+ r && (i = r[e]);
4593
4616
  }
4594
4617
  if (s && i !== void 0)
4595
4618
  return i;
4596
- const r = this.getBaseTargetFromProps(this.props, e);
4597
- return r !== void 0 && !j(r) ? r : this.initialValues[e] !== void 0 && i === void 0 ? void 0 : this.baseTarget[e];
4619
+ const o = this.getBaseTargetFromProps(this.props, e);
4620
+ return o !== void 0 && !F(o) ? o : this.initialValues[e] !== void 0 && i === void 0 ? void 0 : this.baseTarget[e];
4598
4621
  }
4599
4622
  on(e, n) {
4600
4623
  return this.events[e] || (this.events[e] = new en()), this.events[e].add(n);
@@ -4603,7 +4626,7 @@ class Bu {
4603
4626
  this.events[e] && this.events[e].notify(...n);
4604
4627
  }
4605
4628
  }
4606
- class so extends Bu {
4629
+ class sr extends ku {
4607
4630
  constructor() {
4608
4631
  super(...arguments), this.KeyframeResolver = Di;
4609
4632
  }
@@ -4619,15 +4642,15 @@ class so extends Bu {
4619
4642
  handleChildMotionValue() {
4620
4643
  this.childSubscription && (this.childSubscription(), delete this.childSubscription);
4621
4644
  const { children: e } = this.props;
4622
- j(e) && (this.childSubscription = e.on("change", (n) => {
4645
+ F(e) && (this.childSubscription = e.on("change", (n) => {
4623
4646
  this.current && (this.current.textContent = `${n}`);
4624
4647
  }));
4625
4648
  }
4626
4649
  }
4627
- function ku(t) {
4650
+ function Iu(t) {
4628
4651
  return window.getComputedStyle(t);
4629
4652
  }
4630
- class Iu extends so {
4653
+ class Ou extends sr {
4631
4654
  constructor() {
4632
4655
  super(...arguments), this.type = "html", this.renderInstance = Ws;
4633
4656
  }
@@ -4636,7 +4659,7 @@ class Iu extends so {
4636
4659
  const s = an(n);
4637
4660
  return s && s.default || 0;
4638
4661
  } else {
4639
- const s = ku(e), i = (_s(n) ? s.getPropertyValue(n) : s[n]) || 0;
4662
+ const s = Iu(e), i = (_s(n) ? s.getPropertyValue(n) : s[n]) || 0;
4640
4663
  return typeof i == "string" ? i.trim() : i;
4641
4664
  }
4642
4665
  }
@@ -4650,7 +4673,7 @@ class Iu extends so {
4650
4673
  return Xe(e, n, s);
4651
4674
  }
4652
4675
  }
4653
- class Ou extends so {
4676
+ class Nu extends sr {
4654
4677
  constructor() {
4655
4678
  super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = R;
4656
4679
  }
@@ -4677,42 +4700,42 @@ class Ou extends so {
4677
4700
  this.isSVGTag = He(e.tagName), super.mount(e);
4678
4701
  }
4679
4702
  }
4680
- const Nu = (t, e) => Ue(t) ? new Ou(e) : new Iu(e, {
4703
+ const Uu = (t, e) => Ue(t) ? new Nu(e) : new Ou(e, {
4681
4704
  allowProjection: t !== P.Fragment
4682
- }), Uu = /* @__PURE__ */ hr({
4683
- ...ul,
4684
- ...Mu,
4685
- ...vu,
4686
- ...Ru
4687
- }, Nu), _u = /* @__PURE__ */ Vo(Uu);
4705
+ }), _u = /* @__PURE__ */ ho({
4706
+ ...cl,
4707
+ ...Ru,
4708
+ ...xu,
4709
+ ...Eu
4710
+ }, Uu), Ku = /* @__PURE__ */ Vr(_u);
4688
4711
  /**
4689
4712
  * @license lucide-react v0.474.0 - ISC
4690
4713
  *
4691
4714
  * This source code is licensed under the ISC license.
4692
4715
  * See the LICENSE file in the root directory of this source tree.
4693
4716
  */
4694
- const Ku = [
4717
+ const zu = [
4695
4718
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
4696
4719
  ["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
4697
4720
  ["path", { d: "M12 17h.01", key: "p32p05" }]
4698
- ], zu = Le("CircleHelp", Ku);
4721
+ ], Wu = Le("CircleHelp", zu);
4699
4722
  /**
4700
4723
  * @license lucide-react v0.474.0 - ISC
4701
4724
  *
4702
4725
  * This source code is licensed under the ISC license.
4703
4726
  * See the LICENSE file in the root directory of this source tree.
4704
4727
  */
4705
- const Wu = [
4728
+ const $u = [
4706
4729
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
4707
4730
  ["polyline", { points: "12 6 12 12 16 14", key: "68esgv" }]
4708
- ], $u = Le("Clock", Wu);
4731
+ ], Gu = Le("Clock", $u);
4709
4732
  /**
4710
4733
  * @license lucide-react v0.474.0 - ISC
4711
4734
  *
4712
4735
  * This source code is licensed under the ISC license.
4713
4736
  * See the LICENSE file in the root directory of this source tree.
4714
4737
  */
4715
- const Gu = [
4738
+ const Hu = [
4716
4739
  [
4717
4740
  "path",
4718
4741
  {
@@ -4720,14 +4743,14 @@ const Gu = [
4720
4743
  key: "1xq2db"
4721
4744
  }
4722
4745
  ]
4723
- ], Hu = Le("Zap", Gu), Xu = ({ description: t, quizStyles: e }) => {
4724
- const n = lo("(max-width:600px)"), [s, i] = P.useState("");
4746
+ ], Xu = Le("Zap", Hu), qu = ({ description: t, quizStyles: e }) => {
4747
+ const n = cr("(max-width:600px)"), [s, i] = P.useState("");
4725
4748
  return P.useEffect(() => {
4726
4749
  if (!t) return;
4727
- const r = n ? 90 : 500, a = String(t).replace(/<[^>]*>/g, "");
4728
- a.length > r ? i(a.substring(0, r) + "...") : i(a);
4750
+ const o = n ? 90 : 500, a = String(t).replace(/<[^>]*>/g, "");
4751
+ a.length > o ? i(a.substring(0, o) + "...") : i(a);
4729
4752
  }, [t, n]), /* @__PURE__ */ A.jsx("div", { className: "quiz-description", style: e, dangerouslySetInnerHTML: { __html: s } });
4730
- }, rt = {
4753
+ }, ot = {
4731
4754
  heroSection: {
4732
4755
  position: "relative",
4733
4756
  borderRadius: "sm",
@@ -4766,28 +4789,28 @@ const Gu = [
4766
4789
  fontSize: "md",
4767
4790
  "--Button-gap": "1em"
4768
4791
  }
4769
- }, qu = {
4770
- defaultImage: uo
4771
- }, Ds = () => qu.defaultImage, Yu = (t) => {
4792
+ }, Yu = {
4793
+ defaultImage: hr
4794
+ }, Ds = () => Yu.defaultImage, Zu = (t) => {
4772
4795
  var e, n;
4773
4796
  return t ? (e = t.images) != null && e.main ? t.images.main : (n = t.images) != null && n.cover ? t.images.cover : Ds() : Ds();
4774
4797
  };
4775
- function Zu({ quiz: t, onStart: e }) {
4776
- const { t: n } = oo(), s = n("quizzes.buttons.start"), i = t.questionsCount;
4777
- return t ? /* @__PURE__ */ A.jsxs(Bt, { spacing: 2, children: [
4778
- /* @__PURE__ */ A.jsxs(Nt, { sx: rt.heroSection, children: [
4779
- /* @__PURE__ */ A.jsx(co, { ratio: 16 / 9, children: /* @__PURE__ */ A.jsx("img", { src: Yu(t), alt: t.title, style: rt.heroImage, loading: "lazy" }) }),
4780
- /* @__PURE__ */ A.jsx(Nt, { sx: rt.heroOverlay, children: /* @__PURE__ */ A.jsxs(_u.div, { initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { delay: 0.2 }, children: [
4781
- /* @__PURE__ */ A.jsxs(Nt, { sx: { display: "flex", gap: 1.5, alignItems: "center", mb: 1 }, children: [
4782
- /* @__PURE__ */ A.jsx(ho, { size: "sm", children: n("quizzes.label", { count: 1 }) }),
4783
- /* @__PURE__ */ A.jsxs(Bt, { direction: "row", spacing: 2, sx: { color: "neutral.300" }, children: [
4798
+ function Qu({ quiz: t, onStart: e }) {
4799
+ const { t: n } = rr(), s = n("quizzes.buttons.start"), i = t.questionsCount;
4800
+ return t ? /* @__PURE__ */ A.jsxs(kt, { spacing: 2, children: [
4801
+ /* @__PURE__ */ A.jsxs(St, { sx: ot.heroSection, children: [
4802
+ /* @__PURE__ */ A.jsx(fr, { ratio: 16 / 9, children: /* @__PURE__ */ A.jsx("img", { src: Zu(t), alt: t.title, style: ot.heroImage, loading: "lazy" }) }),
4803
+ /* @__PURE__ */ A.jsx(St, { sx: ot.heroOverlay, children: /* @__PURE__ */ A.jsxs(Ku.div, { initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { delay: 0.2 }, children: [
4804
+ /* @__PURE__ */ A.jsxs(St, { sx: { display: "flex", gap: 1.5, alignItems: "center", mb: 1 }, children: [
4805
+ /* @__PURE__ */ A.jsx(dr, { size: "sm", children: n("quizzes.label", { count: 1 }) }),
4806
+ /* @__PURE__ */ A.jsxs(kt, { direction: "row", spacing: 2, sx: { color: "neutral.300" }, children: [
4784
4807
  /* @__PURE__ */ A.jsx(
4785
4808
  vt,
4786
4809
  {
4787
4810
  title: n("quizzes.question", { count: i }),
4788
4811
  level: "body-sm",
4789
4812
  textColor: "white",
4790
- startDecorator: /* @__PURE__ */ A.jsx(zu, { size: 16, color: "white" }),
4813
+ startDecorator: /* @__PURE__ */ A.jsx(Wu, { size: 16, color: "white" }),
4791
4814
  children: t.questionsCount
4792
4815
  }
4793
4816
  ),
@@ -4797,7 +4820,7 @@ function Zu({ quiz: t, onStart: e }) {
4797
4820
  title: n("common.labels.time"),
4798
4821
  level: "body-sm",
4799
4822
  textColor: "white",
4800
- startDecorator: /* @__PURE__ */ A.jsx($u, { size: 16, color: "white" }),
4823
+ startDecorator: /* @__PURE__ */ A.jsx(Gu, { size: 16, color: "white" }),
4801
4824
  children: [
4802
4825
  i > 3 ? 2 : 1,
4803
4826
  "m"
@@ -4810,33 +4833,33 @@ function Zu({ quiz: t, onStart: e }) {
4810
4833
  title: n("quizzes.participant", { count: t.participationCount }),
4811
4834
  level: "body-sm",
4812
4835
  textColor: "white",
4813
- startDecorator: /* @__PURE__ */ A.jsx(po, { size: 16, color: "white" }),
4836
+ startDecorator: /* @__PURE__ */ A.jsx(mr, { size: 16, color: "white" }),
4814
4837
  children: t.participationCount
4815
4838
  }
4816
4839
  )
4817
4840
  ] })
4818
4841
  ] }),
4819
- /* @__PURE__ */ A.jsxs(Bt, { mb: 1, spacing: 0.5, children: [
4820
- /* @__PURE__ */ A.jsx(vt, { level: "h1", sx: rt.heroTitle, children: t.title }),
4821
- /* @__PURE__ */ A.jsx(Xu, { description: t.description, quizStyles: rt.heroDescription })
4842
+ /* @__PURE__ */ A.jsxs(kt, { mb: 1, spacing: 0.5, children: [
4843
+ /* @__PURE__ */ A.jsx(vt, { level: "h1", sx: ot.heroTitle, children: t.title }),
4844
+ /* @__PURE__ */ A.jsx(qu, { description: t.description, quizStyles: ot.heroDescription })
4822
4845
  ] })
4823
4846
  ] }) })
4824
4847
  ] }),
4825
- /* @__PURE__ */ A.jsx(Bt, { spacing: 1, children: /* @__PURE__ */ A.jsx(fo, { fullWidth: !0, size: "sm", onClick: e, startDecorator: /* @__PURE__ */ A.jsx(Hu, {}), sx: rt.startButtonContainer, children: s }) })
4848
+ /* @__PURE__ */ A.jsx(kt, { spacing: 1, children: /* @__PURE__ */ A.jsx(lr, { fullWidth: !0, size: "sm", onClick: e, startDecorator: /* @__PURE__ */ A.jsx(Xu, {}), sx: ot.startButtonContainer, children: s }) })
4826
4849
  ] }) : null;
4827
4850
  }
4828
- const lc = ({ initialQuizId: t, url: e }) => {
4829
- const [n, s] = P.useState(null), [i, r] = P.useState({}), [o, a] = P.useState(!0), [l, u] = P.useState(null), c = ro();
4851
+ const uc = ({ initialQuizId: t, url: e }) => {
4852
+ const [n, s] = P.useState(null), [i, o] = P.useState({}), [r, a] = P.useState(!0), [l, u] = P.useState(null), c = or();
4830
4853
  return P.useEffect(() => {
4831
4854
  t && s(t);
4832
4855
  }, [t]), P.useEffect(() => {
4833
4856
  n && (a(!0), u(null), c.miniGames.getClassicQuizById(n, !0).then((h) => {
4834
- r(h), a(!1);
4857
+ o(h), a(!1);
4835
4858
  }).catch((h) => {
4836
4859
  console.error("Failed to fetch quiz:", h), u("Failed to load quiz. Please try again."), a(!1);
4837
4860
  }));
4838
- }, [n]), /* @__PURE__ */ A.jsx(A.Fragment, { children: o ? /* @__PURE__ */ A.jsx(Nt, { minHeight: "200px", display: "flex", justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ A.jsx(ao, {}) }) : l ? /* @__PURE__ */ A.jsx(A.Fragment, {}) : i ? /* @__PURE__ */ A.jsx(
4839
- mo,
4861
+ }, [n]), /* @__PURE__ */ A.jsx(A.Fragment, { children: r ? /* @__PURE__ */ A.jsx(St, { minHeight: "200px", display: "flex", justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ A.jsx(pr, {}) }) : l ? /* @__PURE__ */ A.jsx(A.Fragment, {}) : i ? /* @__PURE__ */ A.jsx(
4862
+ ur,
4840
4863
  {
4841
4864
  sx: {
4842
4865
  borderColor: "divider",
@@ -4845,7 +4868,7 @@ const lc = ({ initialQuizId: t, url: e }) => {
4845
4868
  }
4846
4869
  },
4847
4870
  children: /* @__PURE__ */ A.jsx(
4848
- Zu,
4871
+ Qu,
4849
4872
  {
4850
4873
  quiz: i,
4851
4874
  onStart: () => {
@@ -4857,5 +4880,5 @@ const lc = ({ initialQuizId: t, url: e }) => {
4857
4880
  ) : /* @__PURE__ */ A.jsx(vt, { children: "No quiz data available" }) });
4858
4881
  };
4859
4882
  export {
4860
- lc as default
4883
+ uc as default
4861
4884
  };