@telegraph/tag 0.1.1 → 0.1.2

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.
@@ -1,41 +1,136 @@
1
1
  import { jsx as F, jsxs as ht } from "react/jsx-runtime";
2
2
  import { Button as xe } from "@telegraph/button";
3
- import { Icon as Qs } from "@telegraph/icon";
4
- import { Stack as ei } from "@telegraph/layout";
5
- import { Tooltip as ti } from "@telegraph/tooltip";
6
- import { Text as ni } from "@telegraph/typography";
7
- import { clsx as si } from "clsx";
8
- import { X as vn, Check as ii, Copy as ri } from "lucide-react";
9
- import X, { createContext as ie, useRef as j, useLayoutEffect as oi, useEffect as pt, useState as ai, useContext as E, useMemo as Oe, Fragment as Sn, createElement as ui, useInsertionEffect as Vn, useCallback as ci, forwardRef as li } from "react";
10
- const fi = ie({});
11
- function di(e) {
12
- const t = j(null);
3
+ import { Icon as ei } from "@telegraph/icon";
4
+ import { Stack as ti } from "@telegraph/layout";
5
+ import G, { createContext as re, useRef as W, useLayoutEffect as ni, useEffect as pt, useState as si, useContext as E, useMemo as Oe, Fragment as Tn, createElement as ii, useInsertionEffect as Vn, useCallback as ri, forwardRef as oi } from "react";
6
+ import { Tooltip as ai } from "@telegraph/tooltip";
7
+ import { Text as ui } from "@telegraph/typography";
8
+ import { clsx as ci } from "clsx";
9
+ import { X as Sn, Check as li, Copy as fi } from "lucide-react";
10
+ const di = (e) => {
11
+ const t = [];
12
+ let n = "", s = 0;
13
+ for (let i = 0; i < e.length; i++) {
14
+ const r = e[i];
15
+ r === "(" ? (s++, n += r) : r === ")" ? (s--, n += r) : r === " " && s === 0 ? n && (t.push(n), n = "") : n += r;
16
+ }
17
+ for (n && t.push(n); t.length < 4; )
18
+ t.push("0");
19
+ return [
20
+ t[0] || "0",
21
+ t[1] || "0",
22
+ t[2] || "0",
23
+ t[3] || "0"
24
+ ];
25
+ }, hi = ({
26
+ currentValueOfCssVar: e = "0 0 0 0",
27
+ value: t,
28
+ direction: n
29
+ }) => {
30
+ const [s, i, r, o] = di(e), a = {
31
+ top: s,
32
+ right: i,
33
+ bottom: r,
34
+ left: o
35
+ };
36
+ return n === "top" && (a.top = t), n === "right" && (a.right = t), n === "bottom" && (a.bottom = t), n === "left" && (a.left = t), n === "all" && (a.top = t, a.right = t, a.bottom = t, a.left = t), n === "x" && (a.left = t, a.right = t), n === "y" && (a.top = t, a.bottom = t), n === "side-top" && (a.top = t, a.right = t), n === "side-bottom" && (a.bottom = t, a.left = t), n === "side-left" && (a.top = t, a.left = t), n === "side-right" && (a.right = t, a.bottom = t), Object.values(a).join(" ");
37
+ }, pi = ({
38
+ currentValueOfCssVar: e = "visible visible",
39
+ value: t,
40
+ axis: n
41
+ }) => {
42
+ const [s, i] = e.split(" ");
43
+ return n === "x" ? `${t} ${i}` : n === "y" ? `${s} ${t}` : `${t} ${t}`;
44
+ }, mi = (e) => {
45
+ const { cssVars: t } = e;
46
+ if (!(e != null && e.props) || Object.keys(e.props).length === 0)
47
+ return { styleProp: {}, otherProps: {}, interactive: !1 };
48
+ const { style: n = {}, ...s } = e.props;
49
+ let i = n;
50
+ const r = {};
51
+ let o = !1;
52
+ return Object.keys(s).forEach((a) => {
53
+ const c = a, l = c, u = t == null ? void 0 : t[l];
54
+ if (!u) {
55
+ Object.assign(r, { [c]: s[c] });
56
+ return;
57
+ }
58
+ const d = s == null ? void 0 : s[c];
59
+ if (!d) {
60
+ Object.assign(i, { [c]: s[c] });
61
+ return;
62
+ }
63
+ let f;
64
+ if (typeof d == "string" && d.startsWith("-")) {
65
+ const p = d.slice(1);
66
+ f = `calc(-1 * ${u.value.replace(
67
+ "VARIABLE",
68
+ p
69
+ )})`;
70
+ } else
71
+ f = u.value.replace(
72
+ "VARIABLE",
73
+ d
74
+ );
75
+ const h = u.cssVar;
76
+ if (u.interactive && (o = !0), u.direction) {
77
+ const p = i == null ? void 0 : i[h], y = hi({
78
+ currentValueOfCssVar: p,
79
+ value: f,
80
+ direction: u.direction
81
+ });
82
+ i = {
83
+ ...i,
84
+ [h]: y
85
+ };
86
+ return;
87
+ }
88
+ if (u.axis) {
89
+ const p = i == null ? void 0 : i[h], y = pi({
90
+ currentValueOfCssVar: p,
91
+ value: f,
92
+ axis: u.axis
93
+ });
94
+ i = {
95
+ ...i,
96
+ [h]: y
97
+ };
98
+ return;
99
+ }
100
+ i = {
101
+ ...i,
102
+ [h]: f
103
+ };
104
+ }), { styleProp: i, otherProps: r, interactive: o };
105
+ }, gi = (e) => G.useMemo(() => mi(e), [e]), yi = re({});
106
+ function bi(e) {
107
+ const t = W(null);
13
108
  return t.current === null && (t.current = e()), t.current;
14
109
  }
15
- const xn = typeof window < "u", hi = xn ? oi : pt, An = /* @__PURE__ */ ie(null);
16
- function pi(e, t) {
110
+ const xn = typeof window < "u", vi = xn ? ni : pt, An = /* @__PURE__ */ re(null);
111
+ function wi(e, t) {
17
112
  e.indexOf(t) === -1 && e.push(t);
18
113
  }
19
- function mi(e, t) {
114
+ function Ti(e, t) {
20
115
  const n = e.indexOf(t);
21
116
  n > -1 && e.splice(n, 1);
22
117
  }
23
- const G = (e, t, n) => n > t ? t : n < e ? e : n;
118
+ const H = (e, t, n) => n > t ? t : n < e ? e : n;
24
119
  function Ue(e, t) {
25
120
  return t ? `${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}` : e;
26
121
  }
27
- let ge = () => {
122
+ let ye = () => {
28
123
  }, Z = () => {
29
124
  };
30
- var Tn;
31
- typeof process < "u" && ((Tn = process.env) == null ? void 0 : Tn.NODE_ENV) !== "production" && (ge = (e, t, n) => {
125
+ var wn;
126
+ typeof process < "u" && ((wn = process.env) == null ? void 0 : wn.NODE_ENV) !== "production" && (ye = (e, t, n) => {
32
127
  !e && typeof console < "u" && console.warn(Ue(t, n));
33
128
  }, Z = (e, t, n) => {
34
129
  if (!e)
35
130
  throw new Error(Ue(t, n));
36
131
  });
37
132
  const $ = {}, Mn = (e) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);
38
- function gi(e) {
133
+ function Vi(e) {
39
134
  return typeof e == "object" && e !== null;
40
135
  }
41
136
  const Cn = (e) => /^0[^.\s]+$/u.test(e);
@@ -44,7 +139,7 @@ function Pn(e) {
44
139
  let t;
45
140
  return () => (t === void 0 && (t = e()), t);
46
141
  }
47
- const re = /* @__NO_SIDE_EFFECTS__ */ (e) => e, yi = (e, t) => (n) => t(e(n)), Ee = (...e) => e.reduce(yi), Fn = /* @__NO_SIDE_EFFECTS__ */ (e, t, n) => {
142
+ const oe = /* @__NO_SIDE_EFFECTS__ */ (e) => e, Si = (e, t) => (n) => t(e(n)), Ee = (...e) => e.reduce(Si), Fn = /* @__NO_SIDE_EFFECTS__ */ (e, t, n) => {
48
143
  const s = t - e;
49
144
  return s === 0 ? 1 : (n - e) / s;
50
145
  };
@@ -53,7 +148,7 @@ class Rn {
53
148
  this.subscriptions = [];
54
149
  }
55
150
  add(t) {
56
- return pi(this.subscriptions, t), () => mi(this.subscriptions, t);
151
+ return wi(this.subscriptions, t), () => Ti(this.subscriptions, t);
57
152
  }
58
153
  notify(t, n, s) {
59
154
  const i = this.subscriptions.length;
@@ -78,44 +173,44 @@ function Dn(e, t) {
78
173
  return t ? e * (1e3 / t) : 0;
79
174
  }
80
175
  const Kt = /* @__PURE__ */ new Set();
81
- function kn(e, t, n) {
176
+ function In(e, t, n) {
82
177
  e || Kt.has(t) || (console.warn(Ue(t, n)), Kt.add(t));
83
178
  }
84
- const In = (e, t, n) => (((1 - 3 * n + 3 * t) * e + (3 * n - 6 * t)) * e + 3 * t) * e, bi = 1e-7, wi = 12;
85
- function Ti(e, t, n, s, i) {
179
+ const kn = (e, t, n) => (((1 - 3 * n + 3 * t) * e + (3 * n - 6 * t)) * e + 3 * t) * e, xi = 1e-7, Ai = 12;
180
+ function Mi(e, t, n, s, i) {
86
181
  let r, o, a = 0;
87
182
  do
88
- o = t + (n - t) / 2, r = In(o, s, i) - e, r > 0 ? n = o : t = o;
89
- while (Math.abs(r) > bi && ++a < wi);
183
+ o = t + (n - t) / 2, r = kn(o, s, i) - e, r > 0 ? n = o : t = o;
184
+ while (Math.abs(r) > xi && ++a < Ai);
90
185
  return o;
91
186
  }
92
- function ye(e, t, n, s) {
187
+ function be(e, t, n, s) {
93
188
  if (e === t && n === s)
94
- return re;
95
- const i = (r) => Ti(r, 0, 1, e, n);
96
- return (r) => r === 0 || r === 1 ? r : In(i(r), t, s);
189
+ return oe;
190
+ const i = (r) => Mi(r, 0, 1, e, n);
191
+ return (r) => r === 0 || r === 1 ? r : kn(i(r), t, s);
97
192
  }
98
- const On = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, En = (e) => (t) => 1 - e(1 - t), Bn = /* @__PURE__ */ ye(0.33, 1.53, 0.69, 0.99), mt = /* @__PURE__ */ En(Bn), Ln = /* @__PURE__ */ On(mt), Nn = (e) => (e *= 2) < 1 ? 0.5 * mt(e) : 0.5 * (2 - Math.pow(2, -10 * (e - 1))), gt = (e) => 1 - Math.sin(Math.acos(e)), vi = En(gt), Kn = On(gt), Si = /* @__PURE__ */ ye(0.42, 0, 1, 1), Vi = /* @__PURE__ */ ye(0, 0, 0.58, 1), $n = /* @__PURE__ */ ye(0.42, 0, 0.58, 1), xi = (e) => Array.isArray(e) && typeof e[0] != "number", Wn = (e) => Array.isArray(e) && typeof e[0] == "number", $t = {
99
- linear: re,
100
- easeIn: Si,
193
+ const On = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, En = (e) => (t) => 1 - e(1 - t), Bn = /* @__PURE__ */ be(0.33, 1.53, 0.69, 0.99), mt = /* @__PURE__ */ En(Bn), Ln = /* @__PURE__ */ On(mt), Nn = (e) => (e *= 2) < 1 ? 0.5 * mt(e) : 0.5 * (2 - Math.pow(2, -10 * (e - 1))), gt = (e) => 1 - Math.sin(Math.acos(e)), Ci = En(gt), Kn = On(gt), Pi = /* @__PURE__ */ be(0.42, 0, 1, 1), Fi = /* @__PURE__ */ be(0, 0, 0.58, 1), $n = /* @__PURE__ */ be(0.42, 0, 0.58, 1), Ri = (e) => Array.isArray(e) && typeof e[0] != "number", jn = (e) => Array.isArray(e) && typeof e[0] == "number", $t = {
194
+ linear: oe,
195
+ easeIn: Pi,
101
196
  easeInOut: $n,
102
- easeOut: Vi,
197
+ easeOut: Fi,
103
198
  circIn: gt,
104
199
  circInOut: Kn,
105
- circOut: vi,
200
+ circOut: Ci,
106
201
  backIn: mt,
107
202
  backInOut: Ln,
108
203
  backOut: Bn,
109
204
  anticipate: Nn
110
- }, Ai = (e) => typeof e == "string", Wt = (e) => {
111
- if (Wn(e)) {
205
+ }, Di = (e) => typeof e == "string", jt = (e) => {
206
+ if (jn(e)) {
112
207
  Z(e.length === 4, "Cubic bezier arrays must contain four numerical values.", "cubic-bezier-length");
113
208
  const [t, n, s, i] = e;
114
- return ye(t, n, s, i);
115
- } else if (Ai(e))
209
+ return be(t, n, s, i);
210
+ } else if (Di(e))
116
211
  return Z($t[e] !== void 0, `Invalid easing type '${e}'`, "invalid-easing-type"), $t[e];
117
212
  return e;
118
- }, Se = [
213
+ }, Ve = [
119
214
  "setup",
120
215
  // Compute
121
216
  "read",
@@ -133,7 +228,7 @@ const On = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, En
133
228
  "postRender"
134
229
  // Compute
135
230
  ];
136
- function Mi(e, t) {
231
+ function Ii(e, t) {
137
232
  let n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), i = !1, r = !1;
138
233
  const o = /* @__PURE__ */ new WeakSet();
139
234
  let a = {
@@ -171,56 +266,56 @@ function Mi(e, t) {
171
266
  };
172
267
  return l;
173
268
  }
174
- const Ci = 40;
175
- function jn(e, t) {
269
+ const ki = 40;
270
+ function Wn(e, t) {
176
271
  let n = !1, s = !0;
177
272
  const i = {
178
273
  delta: 0,
179
274
  timestamp: 0,
180
275
  isProcessing: !1
181
- }, r = () => n = !0, o = Se.reduce((w, V) => (w[V] = Mi(r), w), {}), { setup: a, read: c, resolveKeyframes: l, preUpdate: u, update: d, preRender: f, render: h, postRender: p } = o, b = () => {
182
- const w = $.useManualTiming ? i.timestamp : performance.now();
183
- n = !1, $.useManualTiming || (i.delta = s ? 1e3 / 60 : Math.max(Math.min(w - i.timestamp, Ci), 1)), i.timestamp = w, i.isProcessing = !0, a.process(i), c.process(i), l.process(i), u.process(i), d.process(i), f.process(i), h.process(i), p.process(i), i.isProcessing = !1, n && t && (s = !1, e(b));
184
- }, y = () => {
185
- n = !0, s = !0, i.isProcessing || e(b);
276
+ }, r = () => n = !0, o = Ve.reduce((v, S) => (v[S] = Ii(r), v), {}), { setup: a, read: c, resolveKeyframes: l, preUpdate: u, update: d, preRender: f, render: h, postRender: p } = o, y = () => {
277
+ const v = $.useManualTiming ? i.timestamp : performance.now();
278
+ n = !1, $.useManualTiming || (i.delta = s ? 1e3 / 60 : Math.max(Math.min(v - i.timestamp, ki), 1)), i.timestamp = v, i.isProcessing = !0, a.process(i), c.process(i), l.process(i), u.process(i), d.process(i), f.process(i), h.process(i), p.process(i), i.isProcessing = !1, n && t && (s = !1, e(y));
279
+ }, b = () => {
280
+ n = !0, s = !0, i.isProcessing || e(y);
186
281
  };
187
- return { schedule: Se.reduce((w, V) => {
188
- const T = o[V];
189
- return w[V] = (x, C = !1, S = !1) => (n || y(), T.schedule(x, C, S)), w;
190
- }, {}), cancel: (w) => {
191
- for (let V = 0; V < Se.length; V++)
192
- o[Se[V]].cancel(w);
282
+ return { schedule: Ve.reduce((v, S) => {
283
+ const w = o[S];
284
+ return v[S] = (x, C = !1, V = !1) => (n || b(), w.schedule(x, C, V)), v;
285
+ }, {}), cancel: (v) => {
286
+ for (let S = 0; S < Ve.length; S++)
287
+ o[Ve[S]].cancel(v);
193
288
  }, state: i, steps: o };
194
289
  }
195
- const { schedule: N, cancel: Ye, state: Ce } = /* @__PURE__ */ jn(typeof requestAnimationFrame < "u" ? requestAnimationFrame : re, !0);
290
+ const { schedule: N, cancel: Ye, state: Ce } = /* @__PURE__ */ Wn(typeof requestAnimationFrame < "u" ? requestAnimationFrame : oe, !0);
196
291
  let Ae;
197
- function Pi() {
292
+ function Oi() {
198
293
  Ae = void 0;
199
294
  }
200
- const k = {
201
- now: () => (Ae === void 0 && k.set(Ce.isProcessing || $.useManualTiming ? Ce.timestamp : performance.now()), Ae),
295
+ const I = {
296
+ now: () => (Ae === void 0 && I.set(Ce.isProcessing || $.useManualTiming ? Ce.timestamp : performance.now()), Ae),
202
297
  set: (e) => {
203
- Ae = e, queueMicrotask(Pi);
298
+ Ae = e, queueMicrotask(Oi);
204
299
  }
205
- }, _n = (e) => (t) => typeof t == "string" && t.startsWith(e), Gn = /* @__PURE__ */ _n("--"), Fi = /* @__PURE__ */ _n("var(--"), yt = (e) => Fi(e) ? Ri.test(e.split("/*")[0].trim()) : !1, Ri = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;
206
- function jt(e) {
300
+ }, _n = (e) => (t) => typeof t == "string" && t.startsWith(e), Gn = /* @__PURE__ */ _n("--"), Ei = /* @__PURE__ */ _n("var(--"), yt = (e) => Ei(e) ? Bi.test(e.split("/*")[0].trim()) : !1, Bi = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;
301
+ function Wt(e) {
207
302
  return typeof e != "string" ? !1 : e.split("/*")[0].includes("var(--");
208
303
  }
209
- const oe = {
304
+ const ae = {
210
305
  test: (e) => typeof e == "number",
211
306
  parse: parseFloat,
212
307
  transform: (e) => e
213
- }, he = {
214
- ...oe,
215
- transform: (e) => G(0, 1, e)
216
- }, Ve = {
217
- ...oe,
308
+ }, pe = {
309
+ ...ae,
310
+ transform: (e) => H(0, 1, e)
311
+ }, Se = {
312
+ ...ae,
218
313
  default: 1
219
- }, de = (e) => Math.round(e * 1e5) / 1e5, bt = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
220
- function Di(e) {
314
+ }, he = (e) => Math.round(e * 1e5) / 1e5, bt = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
315
+ function Li(e) {
221
316
  return e == null;
222
317
  }
223
- const ki = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, wt = (e, t) => (n) => !!(typeof n == "string" && ki.test(n) && n.startsWith(e) || t && !Di(n) && Object.prototype.hasOwnProperty.call(n, t)), Hn = (e, t, n) => (s) => {
318
+ const Ni = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, vt = (e, t) => (n) => !!(typeof n == "string" && Ni.test(n) && n.startsWith(e) || t && !Li(n) && Object.prototype.hasOwnProperty.call(n, t)), Hn = (e, t, n) => (s) => {
224
319
  if (typeof s != "string")
225
320
  return s;
226
321
  const [i, r, o, a] = s.match(bt);
@@ -230,15 +325,15 @@ const ki = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s
230
325
  [n]: parseFloat(o),
231
326
  alpha: a !== void 0 ? parseFloat(a) : 1
232
327
  };
233
- }, Ii = (e) => G(0, 255, e), Ke = {
234
- ...oe,
235
- transform: (e) => Math.round(Ii(e))
236
- }, U = {
237
- test: /* @__PURE__ */ wt("rgb", "red"),
328
+ }, Ki = (e) => H(0, 255, e), Ke = {
329
+ ...ae,
330
+ transform: (e) => Math.round(Ki(e))
331
+ }, Y = {
332
+ test: /* @__PURE__ */ vt("rgb", "red"),
238
333
  parse: /* @__PURE__ */ Hn("red", "green", "blue"),
239
- transform: ({ red: e, green: t, blue: n, alpha: s = 1 }) => "rgba(" + Ke.transform(e) + ", " + Ke.transform(t) + ", " + Ke.transform(n) + ", " + de(he.transform(s)) + ")"
334
+ transform: ({ red: e, green: t, blue: n, alpha: s = 1 }) => "rgba(" + Ke.transform(e) + ", " + Ke.transform(t) + ", " + Ke.transform(n) + ", " + he(pe.transform(s)) + ")"
240
335
  };
241
- function Oi(e) {
336
+ function $i(e) {
242
337
  let t = "", n = "", s = "", i = "";
243
338
  return e.length > 5 ? (t = e.substring(1, 3), n = e.substring(3, 5), s = e.substring(5, 7), i = e.substring(7, 9)) : (t = e.substring(1, 2), n = e.substring(2, 3), s = e.substring(3, 4), i = e.substring(4, 5), t += t, n += n, s += s, i += i), {
244
339
  red: parseInt(t, 16),
@@ -248,75 +343,75 @@ function Oi(e) {
248
343
  };
249
344
  }
250
345
  const Xe = {
251
- test: /* @__PURE__ */ wt("#"),
252
- parse: Oi,
253
- transform: U.transform
254
- }, be = /* @__NO_SIDE_EFFECTS__ */ (e) => ({
346
+ test: /* @__PURE__ */ vt("#"),
347
+ parse: $i,
348
+ transform: Y.transform
349
+ }, ve = /* @__NO_SIDE_EFFECTS__ */ (e) => ({
255
350
  test: (t) => typeof t == "string" && t.endsWith(e) && t.split(" ").length === 1,
256
351
  parse: parseFloat,
257
352
  transform: (t) => `${t}${e}`
258
- }), W = /* @__PURE__ */ be("deg"), ne = /* @__PURE__ */ be("%"), m = /* @__PURE__ */ be("px"), Ei = /* @__PURE__ */ be("vh"), Bi = /* @__PURE__ */ be("vw"), _t = {
353
+ }), j = /* @__PURE__ */ ve("deg"), ne = /* @__PURE__ */ ve("%"), m = /* @__PURE__ */ ve("px"), ji = /* @__PURE__ */ ve("vh"), Wi = /* @__PURE__ */ ve("vw"), _t = {
259
354
  ...ne,
260
355
  parse: (e) => ne.parse(e) / 100,
261
356
  transform: (e) => ne.transform(e * 100)
262
357
  }, ee = {
263
- test: /* @__PURE__ */ wt("hsl", "hue"),
358
+ test: /* @__PURE__ */ vt("hsl", "hue"),
264
359
  parse: /* @__PURE__ */ Hn("hue", "saturation", "lightness"),
265
- transform: ({ hue: e, saturation: t, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(e) + ", " + ne.transform(de(t)) + ", " + ne.transform(de(n)) + ", " + de(he.transform(s)) + ")"
360
+ transform: ({ hue: e, saturation: t, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(e) + ", " + ne.transform(he(t)) + ", " + ne.transform(he(n)) + ", " + he(pe.transform(s)) + ")"
266
361
  }, M = {
267
- test: (e) => U.test(e) || Xe.test(e) || ee.test(e),
268
- parse: (e) => U.test(e) ? U.parse(e) : ee.test(e) ? ee.parse(e) : Xe.parse(e),
269
- transform: (e) => typeof e == "string" ? e : e.hasOwnProperty("red") ? U.transform(e) : ee.transform(e),
362
+ test: (e) => Y.test(e) || Xe.test(e) || ee.test(e),
363
+ parse: (e) => Y.test(e) ? Y.parse(e) : ee.test(e) ? ee.parse(e) : Xe.parse(e),
364
+ transform: (e) => typeof e == "string" ? e : e.hasOwnProperty("red") ? Y.transform(e) : ee.transform(e),
270
365
  getAnimatableNone: (e) => {
271
366
  const t = M.parse(e);
272
367
  return t.alpha = 0, M.transform(t);
273
368
  }
274
- }, Li = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
275
- function Ni(e) {
369
+ }, _i = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
370
+ function Gi(e) {
276
371
  var t, n;
277
- return isNaN(e) && typeof e == "string" && (((t = e.match(bt)) == null ? void 0 : t.length) || 0) + (((n = e.match(Li)) == null ? void 0 : n.length) || 0) > 0;
372
+ return isNaN(e) && typeof e == "string" && (((t = e.match(bt)) == null ? void 0 : t.length) || 0) + (((n = e.match(_i)) == null ? void 0 : n.length) || 0) > 0;
278
373
  }
279
- const zn = "number", Un = "color", Ki = "var", $i = "var(", Gt = "${}", Wi = /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;
280
- function pe(e) {
374
+ const zn = "number", Un = "color", Hi = "var", zi = "var(", Gt = "${}", Ui = /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;
375
+ function me(e) {
281
376
  const t = e.toString(), n = [], s = {
282
377
  color: [],
283
378
  number: [],
284
379
  var: []
285
380
  }, i = [];
286
381
  let r = 0;
287
- const a = t.replace(Wi, (c) => (M.test(c) ? (s.color.push(r), i.push(Un), n.push(M.parse(c))) : c.startsWith($i) ? (s.var.push(r), i.push(Ki), n.push(c)) : (s.number.push(r), i.push(zn), n.push(parseFloat(c))), ++r, Gt)).split(Gt);
382
+ const a = t.replace(Ui, (c) => (M.test(c) ? (s.color.push(r), i.push(Un), n.push(M.parse(c))) : c.startsWith(zi) ? (s.var.push(r), i.push(Hi), n.push(c)) : (s.number.push(r), i.push(zn), n.push(parseFloat(c))), ++r, Gt)).split(Gt);
288
383
  return { values: n, split: a, indexes: s, types: i };
289
384
  }
290
385
  function Yn(e) {
291
- return pe(e).values;
386
+ return me(e).values;
292
387
  }
293
388
  function Xn(e) {
294
- const { split: t, types: n } = pe(e), s = t.length;
389
+ const { split: t, types: n } = me(e), s = t.length;
295
390
  return (i) => {
296
391
  let r = "";
297
392
  for (let o = 0; o < s; o++)
298
393
  if (r += t[o], i[o] !== void 0) {
299
394
  const a = n[o];
300
- a === zn ? r += de(i[o]) : a === Un ? r += M.transform(i[o]) : r += i[o];
395
+ a === zn ? r += he(i[o]) : a === Un ? r += M.transform(i[o]) : r += i[o];
301
396
  }
302
397
  return r;
303
398
  };
304
399
  }
305
- const ji = (e) => typeof e == "number" ? 0 : M.test(e) ? M.getAnimatableNone(e) : e;
306
- function _i(e) {
400
+ const Yi = (e) => typeof e == "number" ? 0 : M.test(e) ? M.getAnimatableNone(e) : e;
401
+ function Xi(e) {
307
402
  const t = Yn(e);
308
- return Xn(e)(t.map(ji));
403
+ return Xn(e)(t.map(Yi));
309
404
  }
310
405
  const L = {
311
- test: Ni,
406
+ test: Gi,
312
407
  parse: Yn,
313
408
  createTransformer: Xn,
314
- getAnimatableNone: _i
409
+ getAnimatableNone: Xi
315
410
  };
316
411
  function $e(e, t, n) {
317
412
  return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e;
318
413
  }
319
- function Gi({ hue: e, saturation: t, lightness: n, alpha: s }) {
414
+ function qi({ hue: e, saturation: t, lightness: n, alpha: s }) {
320
415
  e /= 360, t /= 100, n /= 100;
321
416
  let i = 0, r = 0, o = 0;
322
417
  if (!t)
@@ -335,52 +430,52 @@ function Gi({ hue: e, saturation: t, lightness: n, alpha: s }) {
335
430
  function Pe(e, t) {
336
431
  return (n) => n > 0 ? t : e;
337
432
  }
338
- const we = (e, t, n) => e + (t - e) * n, We = (e, t, n) => {
433
+ const we = (e, t, n) => e + (t - e) * n, je = (e, t, n) => {
339
434
  const s = e * e, i = n * (t * t - s) + s;
340
435
  return i < 0 ? 0 : Math.sqrt(i);
341
- }, Hi = [Xe, U, ee], zi = (e) => Hi.find((t) => t.test(e));
436
+ }, Zi = [Xe, Y, ee], Ji = (e) => Zi.find((t) => t.test(e));
342
437
  function Ht(e) {
343
- const t = zi(e);
344
- if (ge(!!t, `'${e}' is not an animatable color. Use the equivalent color code instead.`, "color-not-animatable"), !t)
438
+ const t = Ji(e);
439
+ if (ye(!!t, `'${e}' is not an animatable color. Use the equivalent color code instead.`, "color-not-animatable"), !t)
345
440
  return !1;
346
441
  let n = t.parse(e);
347
- return t === ee && (n = Gi(n)), n;
442
+ return t === ee && (n = qi(n)), n;
348
443
  }
349
444
  const zt = (e, t) => {
350
445
  const n = Ht(e), s = Ht(t);
351
446
  if (!n || !s)
352
447
  return Pe(e, t);
353
448
  const i = { ...n };
354
- return (r) => (i.red = We(n.red, s.red, r), i.green = We(n.green, s.green, r), i.blue = We(n.blue, s.blue, r), i.alpha = we(n.alpha, s.alpha, r), U.transform(i));
449
+ return (r) => (i.red = je(n.red, s.red, r), i.green = je(n.green, s.green, r), i.blue = je(n.blue, s.blue, r), i.alpha = we(n.alpha, s.alpha, r), Y.transform(i));
355
450
  }, qe = /* @__PURE__ */ new Set(["none", "hidden"]);
356
- function Ui(e, t) {
451
+ function Qi(e, t) {
357
452
  return qe.has(e) ? (n) => n <= 0 ? e : t : (n) => n >= 1 ? t : e;
358
453
  }
359
- function Yi(e, t) {
454
+ function er(e, t) {
360
455
  return (n) => we(e, t, n);
361
456
  }
362
- function Tt(e) {
363
- return typeof e == "number" ? Yi : typeof e == "string" ? yt(e) ? Pe : M.test(e) ? zt : Zi : Array.isArray(e) ? qn : typeof e == "object" ? M.test(e) ? zt : Xi : Pe;
457
+ function wt(e) {
458
+ return typeof e == "number" ? er : typeof e == "string" ? yt(e) ? Pe : M.test(e) ? zt : sr : Array.isArray(e) ? qn : typeof e == "object" ? M.test(e) ? zt : tr : Pe;
364
459
  }
365
460
  function qn(e, t) {
366
- const n = [...e], s = n.length, i = e.map((r, o) => Tt(r)(r, t[o]));
461
+ const n = [...e], s = n.length, i = e.map((r, o) => wt(r)(r, t[o]));
367
462
  return (r) => {
368
463
  for (let o = 0; o < s; o++)
369
464
  n[o] = i[o](r);
370
465
  return n;
371
466
  };
372
467
  }
373
- function Xi(e, t) {
468
+ function tr(e, t) {
374
469
  const n = { ...e, ...t }, s = {};
375
470
  for (const i in n)
376
- e[i] !== void 0 && t[i] !== void 0 && (s[i] = Tt(e[i])(e[i], t[i]));
471
+ e[i] !== void 0 && t[i] !== void 0 && (s[i] = wt(e[i])(e[i], t[i]));
377
472
  return (i) => {
378
473
  for (const r in s)
379
474
  n[r] = s[r](i);
380
475
  return n;
381
476
  };
382
477
  }
383
- function qi(e, t) {
478
+ function nr(e, t) {
384
479
  const n = [], s = { color: 0, var: 0, number: 0 };
385
480
  for (let i = 0; i < t.values.length; i++) {
386
481
  const r = t.types[i], o = e.indexes[r][s[r]], a = e.values[o] ?? 0;
@@ -388,14 +483,14 @@ function qi(e, t) {
388
483
  }
389
484
  return n;
390
485
  }
391
- const Zi = (e, t) => {
392
- const n = L.createTransformer(t), s = pe(e), i = pe(t);
393
- 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 ? qe.has(e) && !i.values.length || qe.has(t) && !s.values.length ? Ui(e, t) : Ee(qn(qi(s, i), i.values), n) : (ge(!0, `Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`, "complex-values-different"), Pe(e, t));
486
+ const sr = (e, t) => {
487
+ const n = L.createTransformer(t), s = me(e), i = me(t);
488
+ 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 ? qe.has(e) && !i.values.length || qe.has(t) && !s.values.length ? Qi(e, t) : Ee(qn(nr(s, i), i.values), n) : (ye(!0, `Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`, "complex-values-different"), Pe(e, t));
394
489
  };
395
490
  function Zn(e, t, n) {
396
- return typeof e == "number" && typeof t == "number" && typeof n == "number" ? we(e, t, n) : Tt(e)(e, t);
491
+ return typeof e == "number" && typeof t == "number" && typeof n == "number" ? we(e, t, n) : wt(e)(e, t);
397
492
  }
398
- const Ji = (e) => {
493
+ const ir = (e) => {
399
494
  const t = ({ timestamp: n }) => e(n);
400
495
  return {
401
496
  start: (n = !0) => N.update(t, n),
@@ -404,7 +499,7 @@ const Ji = (e) => {
404
499
  * If we're processing this frame we can use the
405
500
  * framelocked timestamp to keep things in sync.
406
501
  */
407
- now: () => Ce.isProcessing ? Ce.timestamp : k.now()
502
+ now: () => Ce.isProcessing ? Ce.timestamp : I.now()
408
503
  };
409
504
  }, Jn = (e, t, n = 10) => {
410
505
  let s = "";
@@ -413,7 +508,7 @@ const Ji = (e) => {
413
508
  s += Math.round(e(r / (i - 1)) * 1e4) / 1e4 + ", ";
414
509
  return `linear(${s.substring(0, s.length - 2)})`;
415
510
  }, Fe = 2e4;
416
- function vt(e) {
511
+ function Tt(e) {
417
512
  let t = 0;
418
513
  const n = 50;
419
514
  let s = e.next(t);
@@ -421,17 +516,17 @@ function vt(e) {
421
516
  t += n, s = e.next(t);
422
517
  return t >= Fe ? 1 / 0 : t;
423
518
  }
424
- function Qi(e, t = 100, n) {
425
- const s = n({ ...e, keyframes: [0, t] }), i = Math.min(vt(s), Fe);
519
+ function rr(e, t = 100, n) {
520
+ const s = n({ ...e, keyframes: [0, t] }), i = Math.min(Tt(s), Fe);
426
521
  return {
427
522
  type: "keyframes",
428
523
  ease: (r) => s.next(i * r).value / t,
429
524
  duration: /* @__PURE__ */ B(i)
430
525
  };
431
526
  }
432
- const er = 5;
527
+ const or = 5;
433
528
  function Qn(e, t, n) {
434
- const s = Math.max(t - er, 0);
529
+ const s = Math.max(t - or, 0);
435
530
  return Dn(n - e(s), t - s);
436
531
  }
437
532
  const A = {
@@ -462,25 +557,25 @@ const A = {
462
557
  // in seconds
463
558
  minDamping: 0.05,
464
559
  maxDamping: 1
465
- }, je = 1e-3;
466
- function tr({ duration: e = A.duration, bounce: t = A.bounce, velocity: n = A.velocity, mass: s = A.mass }) {
560
+ }, We = 1e-3;
561
+ function ar({ duration: e = A.duration, bounce: t = A.bounce, velocity: n = A.velocity, mass: s = A.mass }) {
467
562
  let i, r;
468
- ge(e <= /* @__PURE__ */ K(A.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
563
+ ye(e <= /* @__PURE__ */ K(A.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
469
564
  let o = 1 - t;
470
- o = G(A.minDamping, A.maxDamping, o), e = G(A.minDuration, A.maxDuration, /* @__PURE__ */ B(e)), o < 1 ? (i = (l) => {
565
+ o = H(A.minDamping, A.maxDamping, o), e = H(A.minDuration, A.maxDuration, /* @__PURE__ */ B(e)), o < 1 ? (i = (l) => {
471
566
  const u = l * o, d = u * e, f = u - n, h = Ze(l, o), p = Math.exp(-d);
472
- return je - f / h * p;
567
+ return We - f / h * p;
473
568
  }, r = (l) => {
474
- const d = l * o * e, f = d * n + n, h = Math.pow(o, 2) * Math.pow(l, 2) * e, p = Math.exp(-d), b = Ze(Math.pow(l, 2), o);
475
- return (-i(l) + je > 0 ? -1 : 1) * ((f - h) * p) / b;
569
+ const d = l * o * e, f = d * n + n, h = Math.pow(o, 2) * Math.pow(l, 2) * e, p = Math.exp(-d), y = Ze(Math.pow(l, 2), o);
570
+ return (-i(l) + We > 0 ? -1 : 1) * ((f - h) * p) / y;
476
571
  }) : (i = (l) => {
477
572
  const u = Math.exp(-l * e), d = (l - n) * e + 1;
478
- return -je + u * d;
573
+ return -We + u * d;
479
574
  }, r = (l) => {
480
575
  const u = Math.exp(-l * e), d = (n - l) * (e * e);
481
576
  return u * d;
482
577
  });
483
- const a = 5 / e, c = sr(i, r, a);
578
+ const a = 5 / e, c = cr(i, r, a);
484
579
  if (e = /* @__PURE__ */ K(e), isNaN(c))
485
580
  return {
486
581
  stiffness: A.stiffness,
@@ -496,21 +591,21 @@ function tr({ duration: e = A.duration, bounce: t = A.bounce, velocity: n = A.ve
496
591
  };
497
592
  }
498
593
  }
499
- const nr = 12;
500
- function sr(e, t, n) {
594
+ const ur = 12;
595
+ function cr(e, t, n) {
501
596
  let s = n;
502
- for (let i = 1; i < nr; i++)
597
+ for (let i = 1; i < ur; i++)
503
598
  s = s - e(s) / t(s);
504
599
  return s;
505
600
  }
506
601
  function Ze(e, t) {
507
602
  return e * Math.sqrt(1 - t * t);
508
603
  }
509
- const ir = ["duration", "bounce"], rr = ["stiffness", "damping", "mass"];
604
+ const lr = ["duration", "bounce"], fr = ["stiffness", "damping", "mass"];
510
605
  function Ut(e, t) {
511
606
  return t.some((n) => e[n] !== void 0);
512
607
  }
513
- function or(e) {
608
+ function dr(e) {
514
609
  let t = {
515
610
  velocity: A.velocity,
516
611
  stiffness: A.stiffness,
@@ -519,9 +614,9 @@ function or(e) {
519
614
  isResolvedFromDuration: !1,
520
615
  ...e
521
616
  };
522
- if (!Ut(e, rr) && Ut(e, ir))
617
+ if (!Ut(e, fr) && Ut(e, lr))
523
618
  if (t.velocity = 0, e.visualDuration) {
524
- const n = e.visualDuration, s = 2 * Math.PI / (n * 1.2), i = s * s, r = 2 * G(0.05, 1, 1 - (e.bounce || 0)) * Math.sqrt(i);
619
+ const n = e.visualDuration, s = 2 * Math.PI / (n * 1.2), i = s * s, r = 2 * H(0.05, 1, 1 - (e.bounce || 0)) * Math.sqrt(i);
525
620
  t = {
526
621
  ...t,
527
622
  mass: A.mass,
@@ -529,7 +624,7 @@ function or(e) {
529
624
  damping: r
530
625
  };
531
626
  } else {
532
- const n = tr({ ...e, velocity: 0 });
627
+ const n = ar({ ...e, velocity: 0 });
533
628
  t = {
534
629
  ...t,
535
630
  ...n,
@@ -545,71 +640,71 @@ function Re(e = A.visualDuration, t = A.bounce) {
545
640
  bounce: t
546
641
  } : e;
547
642
  let { restSpeed: s, restDelta: i } = n;
548
- const r = n.keyframes[0], o = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: r }, { stiffness: c, damping: l, mass: u, duration: d, velocity: f, isResolvedFromDuration: h } = or({
643
+ const r = n.keyframes[0], o = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: r }, { stiffness: c, damping: l, mass: u, duration: d, velocity: f, isResolvedFromDuration: h } = dr({
549
644
  ...n,
550
645
  velocity: -/* @__PURE__ */ B(n.velocity || 0)
551
- }), p = f || 0, b = l / (2 * Math.sqrt(c * u)), y = o - r, g = /* @__PURE__ */ B(Math.sqrt(c / u)), v = Math.abs(y) < 5;
552
- s || (s = v ? A.restSpeed.granular : A.restSpeed.default), i || (i = v ? A.restDelta.granular : A.restDelta.default);
553
- let w;
554
- if (b < 1) {
555
- const T = Ze(g, b);
556
- w = (x) => {
557
- const C = Math.exp(-b * g * x);
558
- return o - C * ((p + b * g * y) / T * Math.sin(T * x) + y * Math.cos(T * x));
646
+ }), p = f || 0, y = l / (2 * Math.sqrt(c * u)), b = o - r, g = /* @__PURE__ */ B(Math.sqrt(c / u)), T = Math.abs(b) < 5;
647
+ s || (s = T ? A.restSpeed.granular : A.restSpeed.default), i || (i = T ? A.restDelta.granular : A.restDelta.default);
648
+ let v;
649
+ if (y < 1) {
650
+ const w = Ze(g, y);
651
+ v = (x) => {
652
+ const C = Math.exp(-y * g * x);
653
+ return o - C * ((p + y * g * b) / w * Math.sin(w * x) + b * Math.cos(w * x));
559
654
  };
560
- } else if (b === 1)
561
- w = (T) => o - Math.exp(-g * T) * (y + (p + g * y) * T);
655
+ } else if (y === 1)
656
+ v = (w) => o - Math.exp(-g * w) * (b + (p + g * b) * w);
562
657
  else {
563
- const T = g * Math.sqrt(b * b - 1);
564
- w = (x) => {
565
- const C = Math.exp(-b * g * x), S = Math.min(T * x, 300);
566
- return o - C * ((p + b * g * y) * Math.sinh(S) + T * y * Math.cosh(S)) / T;
658
+ const w = g * Math.sqrt(y * y - 1);
659
+ v = (x) => {
660
+ const C = Math.exp(-y * g * x), V = Math.min(w * x, 300);
661
+ return o - C * ((p + y * g * b) * Math.sinh(V) + w * b * Math.cosh(V)) / w;
567
662
  };
568
663
  }
569
- const V = {
664
+ const S = {
570
665
  calculatedDuration: h && d || null,
571
- next: (T) => {
572
- const x = w(T);
666
+ next: (w) => {
667
+ const x = v(w);
573
668
  if (h)
574
- a.done = T >= d;
669
+ a.done = w >= d;
575
670
  else {
576
- let C = T === 0 ? p : 0;
577
- b < 1 && (C = T === 0 ? /* @__PURE__ */ K(p) : Qn(w, T, x));
578
- const S = Math.abs(C) <= s, D = Math.abs(o - x) <= i;
579
- a.done = S && D;
671
+ let C = w === 0 ? p : 0;
672
+ y < 1 && (C = w === 0 ? /* @__PURE__ */ K(p) : Qn(v, w, x));
673
+ const V = Math.abs(C) <= s, D = Math.abs(o - x) <= i;
674
+ a.done = V && D;
580
675
  }
581
676
  return a.value = a.done ? o : x, a;
582
677
  },
583
678
  toString: () => {
584
- const T = Math.min(vt(V), Fe), x = Jn((C) => V.next(T * C).value, T, 30);
585
- return T + "ms " + x;
679
+ const w = Math.min(Tt(S), Fe), x = Jn((C) => S.next(w * C).value, w, 30);
680
+ return w + "ms " + x;
586
681
  },
587
682
  toTransition: () => {
588
683
  }
589
684
  };
590
- return V;
685
+ return S;
591
686
  }
592
687
  Re.applyToOptions = (e) => {
593
- const t = Qi(e, 100, Re);
688
+ const t = rr(e, 100, Re);
594
689
  return e.ease = t.ease, e.duration = /* @__PURE__ */ K(t.duration), e.type = "keyframes", e;
595
690
  };
596
691
  function Je({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: s = 325, bounceDamping: i = 10, bounceStiffness: r = 500, modifyTarget: o, min: a, max: c, restDelta: l = 0.5, restSpeed: u }) {
597
692
  const d = e[0], f = {
598
693
  done: !1,
599
694
  value: d
600
- }, h = (S) => a !== void 0 && S < a || c !== void 0 && S > c, p = (S) => a === void 0 ? c : c === void 0 || Math.abs(a - S) < Math.abs(c - S) ? a : c;
601
- let b = n * t;
602
- const y = d + b, g = o === void 0 ? y : o(y);
603
- g !== y && (b = g - d);
604
- const v = (S) => -b * Math.exp(-S / s), w = (S) => g + v(S), V = (S) => {
605
- const D = v(S), I = w(S);
606
- f.done = Math.abs(D) <= l, f.value = f.done ? g : I;
695
+ }, h = (V) => a !== void 0 && V < a || c !== void 0 && V > c, p = (V) => a === void 0 ? c : c === void 0 || Math.abs(a - V) < Math.abs(c - V) ? a : c;
696
+ let y = n * t;
697
+ const b = d + y, g = o === void 0 ? b : o(b);
698
+ g !== b && (y = g - d);
699
+ const T = (V) => -y * Math.exp(-V / s), v = (V) => g + T(V), S = (V) => {
700
+ const D = T(V), k = v(V);
701
+ f.done = Math.abs(D) <= l, f.value = f.done ? g : k;
607
702
  };
608
- let T, x;
609
- const C = (S) => {
610
- h(f.value) && (T = S, x = Re({
703
+ let w, x;
704
+ const C = (V) => {
705
+ h(f.value) && (w = V, x = Re({
611
706
  keyframes: [f.value, p(f.value)],
612
- velocity: Qn(w, S, f.value),
707
+ velocity: Qn(v, V, f.value),
613
708
  // TODO: This should be passing * 1000
614
709
  damping: i,
615
710
  stiffness: r,
@@ -619,25 +714,25 @@ function Je({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: s = 3
619
714
  };
620
715
  return C(0), {
621
716
  calculatedDuration: null,
622
- next: (S) => {
717
+ next: (V) => {
623
718
  let D = !1;
624
- return !x && T === void 0 && (D = !0, V(S), C(S)), T !== void 0 && S >= T ? x.next(S - T) : (!D && V(S), f);
719
+ return !x && w === void 0 && (D = !0, S(V), C(V)), w !== void 0 && V >= w ? x.next(V - w) : (!D && S(V), f);
625
720
  }
626
721
  };
627
722
  }
628
- function ar(e, t, n) {
723
+ function hr(e, t, n) {
629
724
  const s = [], i = n || $.mix || Zn, r = e.length - 1;
630
725
  for (let o = 0; o < r; o++) {
631
726
  let a = i(e[o], e[o + 1]);
632
727
  if (t) {
633
- const c = Array.isArray(t) ? t[o] || re : t;
728
+ const c = Array.isArray(t) ? t[o] || oe : t;
634
729
  a = Ee(c, a);
635
730
  }
636
731
  s.push(a);
637
732
  }
638
733
  return s;
639
734
  }
640
- function ur(e, t, { clamp: n = !0, ease: s, mixer: i } = {}) {
735
+ function pr(e, t, { clamp: n = !0, ease: s, mixer: i } = {}) {
641
736
  const r = e.length;
642
737
  if (Z(r === t.length, "Both input and output ranges must be the same length", "range-length"), r === 1)
643
738
  return () => t[0];
@@ -645,7 +740,7 @@ function ur(e, t, { clamp: n = !0, ease: s, mixer: i } = {}) {
645
740
  return () => t[1];
646
741
  const o = e[0] === e[1];
647
742
  e[0] > e[r - 1] && (e = [...e].reverse(), t = [...t].reverse());
648
- const a = ar(t, s, i), c = a.length, l = (u) => {
743
+ const a = hr(t, s, i), c = a.length, l = (u) => {
649
744
  if (o && u < e[0])
650
745
  return t[0];
651
746
  let d = 0;
@@ -655,48 +750,48 @@ function ur(e, t, { clamp: n = !0, ease: s, mixer: i } = {}) {
655
750
  const f = /* @__PURE__ */ Fn(e[d], e[d + 1], u);
656
751
  return a[d](f);
657
752
  };
658
- return n ? (u) => l(G(e[0], e[r - 1], u)) : l;
753
+ return n ? (u) => l(H(e[0], e[r - 1], u)) : l;
659
754
  }
660
- function cr(e, t) {
755
+ function mr(e, t) {
661
756
  const n = e[e.length - 1];
662
757
  for (let s = 1; s <= t; s++) {
663
758
  const i = /* @__PURE__ */ Fn(0, t, s);
664
759
  e.push(we(n, 1, i));
665
760
  }
666
761
  }
667
- function lr(e) {
762
+ function gr(e) {
668
763
  const t = [0];
669
- return cr(t, e.length - 1), t;
764
+ return mr(t, e.length - 1), t;
670
765
  }
671
- function fr(e, t) {
766
+ function yr(e, t) {
672
767
  return e.map((n) => n * t);
673
768
  }
674
- function dr(e, t) {
769
+ function br(e, t) {
675
770
  return e.map(() => t || $n).splice(0, e.length - 1);
676
771
  }
677
772
  function te({ duration: e = 300, keyframes: t, times: n, ease: s = "easeInOut" }) {
678
- const i = xi(s) ? s.map(Wt) : Wt(s), r = {
773
+ const i = Ri(s) ? s.map(jt) : jt(s), r = {
679
774
  done: !1,
680
775
  value: t[0]
681
- }, o = fr(
776
+ }, o = yr(
682
777
  // Only use the provided offsets if they're the correct length
683
778
  // TODO Maybe we should warn here if there's a length mismatch
684
- n && n.length === t.length ? n : lr(t),
779
+ n && n.length === t.length ? n : gr(t),
685
780
  e
686
- ), a = ur(o, t, {
687
- ease: Array.isArray(i) ? i : dr(t, i)
781
+ ), a = pr(o, t, {
782
+ ease: Array.isArray(i) ? i : br(t, i)
688
783
  });
689
784
  return {
690
785
  calculatedDuration: e,
691
786
  next: (c) => (r.value = a(c), r.done = c >= e, r)
692
787
  };
693
788
  }
694
- const hr = (e) => e !== null;
695
- function St(e, { repeat: t, repeatType: n = "loop" }, s, i = 1) {
696
- const r = e.filter(hr), a = i < 0 || t && n !== "loop" && t % 2 === 1 ? 0 : r.length - 1;
789
+ const vr = (e) => e !== null;
790
+ function Vt(e, { repeat: t, repeatType: n = "loop" }, s, i = 1) {
791
+ const r = e.filter(vr), a = i < 0 || t && n !== "loop" && t % 2 === 1 ? 0 : r.length - 1;
697
792
  return !a || s === void 0 ? r[a] : s;
698
793
  }
699
- const pr = {
794
+ const wr = {
700
795
  decay: Je,
701
796
  inertia: Je,
702
797
  tween: te,
@@ -704,9 +799,9 @@ const pr = {
704
799
  spring: Re
705
800
  };
706
801
  function es(e) {
707
- typeof e.type == "string" && (e.type = pr[e.type]);
802
+ typeof e.type == "string" && (e.type = wr[e.type]);
708
803
  }
709
- class Vt {
804
+ class St {
710
805
  constructor() {
711
806
  this.updateFinished();
712
807
  }
@@ -730,13 +825,13 @@ class Vt {
730
825
  return this.finished.then(t, n);
731
826
  }
732
827
  }
733
- const mr = (e) => e / 100;
734
- class xt extends Vt {
828
+ const Tr = (e) => e / 100;
829
+ class xt extends St {
735
830
  constructor(t) {
736
831
  super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.stop = () => {
737
832
  var s, i;
738
833
  const { motionValue: n } = this.options;
739
- n && n.updatedAt !== k.now() && this.tick(k.now()), this.isStopped = !0, this.state !== "idle" && (this.teardown(), (i = (s = this.options).onStop) == null || i.call(s));
834
+ n && n.updatedAt !== I.now() && this.tick(I.now()), this.isStopped = !0, this.state !== "idle" && (this.teardown(), (i = (s = this.options).onStop) == null || i.call(s));
740
835
  }, this.options = t, this.initAnimation(), this.play(), t.autoplay === !1 && this.pause();
741
836
  }
742
837
  initAnimation() {
@@ -745,13 +840,13 @@ class xt extends Vt {
745
840
  const { type: n = te, repeat: s = 0, repeatDelay: i = 0, repeatType: r, velocity: o = 0 } = t;
746
841
  let { keyframes: a } = t;
747
842
  const c = n || te;
748
- process.env.NODE_ENV !== "production" && c !== te && Z(a.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`, "spring-two-frames"), c !== te && typeof a[0] != "number" && (this.mixKeyframes = Ee(mr, Zn(a[0], a[1])), a = [0, 100]);
843
+ process.env.NODE_ENV !== "production" && c !== te && Z(a.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`, "spring-two-frames"), c !== te && typeof a[0] != "number" && (this.mixKeyframes = Ee(Tr, Zn(a[0], a[1])), a = [0, 100]);
749
844
  const l = c({ ...t, keyframes: a });
750
845
  r === "mirror" && (this.mirroredGenerator = c({
751
846
  ...t,
752
847
  keyframes: [...a].reverse(),
753
848
  velocity: -o
754
- })), l.calculatedDuration === null && (l.calculatedDuration = vt(l));
849
+ })), l.calculatedDuration === null && (l.calculatedDuration = Tt(l));
755
850
  const { calculatedDuration: u } = l;
756
851
  this.calculatedDuration = u, this.resolvedDuration = u + i, this.totalDuration = this.resolvedDuration * (s + 1) - i, this.generator = l;
757
852
  }
@@ -763,22 +858,22 @@ class xt extends Vt {
763
858
  const { generator: s, totalDuration: i, mixKeyframes: r, mirroredGenerator: o, resolvedDuration: a, calculatedDuration: c } = this;
764
859
  if (this.startTime === null)
765
860
  return s.next(0);
766
- const { delay: l = 0, keyframes: u, repeat: d, repeatType: f, repeatDelay: h, type: p, onUpdate: b, finalKeyframe: y } = this.options;
861
+ const { delay: l = 0, keyframes: u, repeat: d, repeatType: f, repeatDelay: h, type: p, onUpdate: y, finalKeyframe: b } = this.options;
767
862
  this.speed > 0 ? this.startTime = Math.min(this.startTime, t) : this.speed < 0 && (this.startTime = Math.min(t - i / this.speed, this.startTime)), n ? this.currentTime = t : this.updateTime(t);
768
- const g = this.currentTime - l * (this.playbackSpeed >= 0 ? 1 : -1), v = this.playbackSpeed >= 0 ? g < 0 : g > i;
863
+ const g = this.currentTime - l * (this.playbackSpeed >= 0 ? 1 : -1), T = this.playbackSpeed >= 0 ? g < 0 : g > i;
769
864
  this.currentTime = Math.max(g, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = i);
770
- let w = this.currentTime, V = s;
865
+ let v = this.currentTime, S = s;
771
866
  if (d) {
772
- const S = Math.min(this.currentTime, i) / a;
773
- let D = Math.floor(S), I = S % 1;
774
- !I && S >= 1 && (I = 1), I === 1 && D--, D = Math.min(D, d + 1), !!(D % 2) && (f === "reverse" ? (I = 1 - I, h && (I -= h / a)) : f === "mirror" && (V = o)), w = G(0, 1, I) * a;
867
+ const V = Math.min(this.currentTime, i) / a;
868
+ let D = Math.floor(V), k = V % 1;
869
+ !k && V >= 1 && (k = 1), k === 1 && D--, D = Math.min(D, d + 1), !!(D % 2) && (f === "reverse" ? (k = 1 - k, h && (k -= h / a)) : f === "mirror" && (S = o)), v = H(0, 1, k) * a;
775
870
  }
776
- const T = v ? { done: !1, value: u[0] } : V.next(w);
777
- r && (T.value = r(T.value));
778
- let { done: x } = T;
779
- !v && c !== null && (x = this.playbackSpeed >= 0 ? this.currentTime >= i : this.currentTime <= 0);
871
+ const w = T ? { done: !1, value: u[0] } : S.next(v);
872
+ r && (w.value = r(w.value));
873
+ let { done: x } = w;
874
+ !T && c !== null && (x = this.playbackSpeed >= 0 ? this.currentTime >= i : this.currentTime <= 0);
780
875
  const C = this.holdTime === null && (this.state === "finished" || this.state === "running" && x);
781
- return C && p !== Je && (T.value = St(u, this.options, y, this.speed)), b && b(T.value), C && this.finish(), T;
876
+ return C && p !== Je && (w.value = Vt(u, this.options, b, this.speed)), y && y(w.value), C && this.finish(), w;
782
877
  }
783
878
  /**
784
879
  * Allows the returned animation to be awaited or promise-chained. Currently
@@ -806,7 +901,7 @@ class xt extends Vt {
806
901
  return this.playbackSpeed;
807
902
  }
808
903
  set speed(t) {
809
- this.updateTime(k.now());
904
+ this.updateTime(I.now());
810
905
  const n = this.playbackSpeed !== t;
811
906
  this.playbackSpeed = t, n && (this.time = /* @__PURE__ */ B(this.currentTime));
812
907
  }
@@ -814,13 +909,13 @@ class xt extends Vt {
814
909
  var i, r;
815
910
  if (this.isStopped)
816
911
  return;
817
- const { driver: t = Ji, startTime: n } = this.options;
912
+ const { driver: t = ir, startTime: n } = this.options;
818
913
  this.driver || (this.driver = t((o) => this.tick(o))), (r = (i = this.options).onPlay) == null || r.call(i);
819
914
  const s = this.driver.now();
820
915
  this.state === "finished" ? (this.updateFinished(), this.startTime = s) : this.holdTime !== null ? this.startTime = s - this.holdTime : this.startTime || (this.startTime = n ?? s), this.state === "finished" && this.speed < 0 && (this.startTime += this.calculatedDuration), this.holdTime = null, this.state = "running", this.driver.start();
821
916
  }
822
917
  pause() {
823
- this.state = "paused", this.updateTime(k.now()), this.holdTime = this.currentTime;
918
+ this.state = "paused", this.updateTime(I.now()), this.holdTime = this.currentTime;
824
919
  }
825
920
  complete() {
826
921
  this.state !== "running" && this.play(), this.state = "finished", this.holdTime = null;
@@ -847,14 +942,14 @@ class xt extends Vt {
847
942
  return this.options.allowFlatten && (this.options.type = "keyframes", this.options.ease = "linear", this.initAnimation()), (n = this.driver) == null || n.stop(), t.observe(this);
848
943
  }
849
944
  }
850
- function gr(e) {
945
+ function Vr(e) {
851
946
  for (let t = 1; t < e.length; t++)
852
947
  e[t] ?? (e[t] = e[t - 1]);
853
948
  }
854
- const Y = (e) => e * 180 / Math.PI, Qe = (e) => {
855
- const t = Y(Math.atan2(e[1], e[0]));
949
+ const X = (e) => e * 180 / Math.PI, Qe = (e) => {
950
+ const t = X(Math.atan2(e[1], e[0]));
856
951
  return et(t);
857
- }, yr = {
952
+ }, Sr = {
858
953
  x: 4,
859
954
  y: 5,
860
955
  translateX: 4,
@@ -864,10 +959,10 @@ const Y = (e) => e * 180 / Math.PI, Qe = (e) => {
864
959
  scale: (e) => (Math.abs(e[0]) + Math.abs(e[3])) / 2,
865
960
  rotate: Qe,
866
961
  rotateZ: Qe,
867
- skewX: (e) => Y(Math.atan(e[1])),
868
- skewY: (e) => Y(Math.atan(e[2])),
962
+ skewX: (e) => X(Math.atan(e[1])),
963
+ skewY: (e) => X(Math.atan(e[2])),
869
964
  skew: (e) => (Math.abs(e[1]) + Math.abs(e[2])) / 2
870
- }, et = (e) => (e = e % 360, e < 0 && (e += 360), e), Yt = Qe, Xt = (e) => Math.sqrt(e[0] * e[0] + e[1] * e[1]), qt = (e) => Math.sqrt(e[4] * e[4] + e[5] * e[5]), br = {
965
+ }, et = (e) => (e = e % 360, e < 0 && (e += 360), e), Yt = Qe, Xt = (e) => Math.sqrt(e[0] * e[0] + e[1] * e[1]), qt = (e) => Math.sqrt(e[4] * e[4] + e[5] * e[5]), xr = {
871
966
  x: 12,
872
967
  y: 13,
873
968
  z: 14,
@@ -877,12 +972,12 @@ const Y = (e) => e * 180 / Math.PI, Qe = (e) => {
877
972
  scaleX: Xt,
878
973
  scaleY: qt,
879
974
  scale: (e) => (Xt(e) + qt(e)) / 2,
880
- rotateX: (e) => et(Y(Math.atan2(e[6], e[5]))),
881
- rotateY: (e) => et(Y(Math.atan2(-e[2], e[0]))),
975
+ rotateX: (e) => et(X(Math.atan2(e[6], e[5]))),
976
+ rotateY: (e) => et(X(Math.atan2(-e[2], e[0]))),
882
977
  rotateZ: Yt,
883
978
  rotate: Yt,
884
- skewX: (e) => Y(Math.atan(e[4])),
885
- skewY: (e) => Y(Math.atan(e[1])),
979
+ skewX: (e) => X(Math.atan(e[4])),
980
+ skewY: (e) => X(Math.atan(e[1])),
886
981
  skew: (e) => (Math.abs(e[1]) + Math.abs(e[4])) / 2
887
982
  };
888
983
  function tt(e) {
@@ -894,24 +989,24 @@ function nt(e, t) {
894
989
  const n = e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
895
990
  let s, i;
896
991
  if (n)
897
- s = br, i = n;
992
+ s = xr, i = n;
898
993
  else {
899
994
  const a = e.match(/^matrix\(([-\d.e\s,]+)\)$/u);
900
- s = yr, i = a;
995
+ s = Sr, i = a;
901
996
  }
902
997
  if (!i)
903
998
  return tt(t);
904
- const r = s[t], o = i[1].split(",").map(Tr);
999
+ const r = s[t], o = i[1].split(",").map(Mr);
905
1000
  return typeof r == "function" ? r(o) : o[r];
906
1001
  }
907
- const wr = (e, t) => {
1002
+ const Ar = (e, t) => {
908
1003
  const { transform: n = "none" } = getComputedStyle(e);
909
1004
  return nt(n, t);
910
1005
  };
911
- function Tr(e) {
1006
+ function Mr(e) {
912
1007
  return parseFloat(e.trim());
913
1008
  }
914
- const ae = [
1009
+ const ue = [
915
1010
  "transformPerspective",
916
1011
  "x",
917
1012
  "y",
@@ -929,10 +1024,10 @@ const ae = [
929
1024
  "skew",
930
1025
  "skewX",
931
1026
  "skewY"
932
- ], ue = new Set(ae), Zt = (e) => e === oe || e === m, vr = /* @__PURE__ */ new Set(["x", "y", "z"]), Sr = ae.filter((e) => !vr.has(e));
933
- function Vr(e) {
1027
+ ], ce = new Set(ue), Zt = (e) => e === ae || e === m, Cr = /* @__PURE__ */ new Set(["x", "y", "z"]), Pr = ue.filter((e) => !Cr.has(e));
1028
+ function Fr(e) {
934
1029
  const t = [];
935
- return Sr.forEach((n) => {
1030
+ return Pr.forEach((n) => {
936
1031
  const s = e.getValue(n);
937
1032
  s !== void 0 && (t.push([n, s.get()]), s.set(n.startsWith("scale") ? 1 : 0));
938
1033
  }), t;
@@ -957,7 +1052,7 @@ function ts() {
957
1052
  if (it) {
958
1053
  const e = Array.from(q).filter((s) => s.needsMeasurement), t = new Set(e.map((s) => s.element)), n = /* @__PURE__ */ new Map();
959
1054
  t.forEach((s) => {
960
- const i = Vr(s);
1055
+ const i = Fr(s);
961
1056
  i.length && (n.set(s, i), s.render());
962
1057
  }), e.forEach((s) => s.measureInitialState()), t.forEach((s) => {
963
1058
  s.render();
@@ -977,7 +1072,7 @@ function ns() {
977
1072
  e.readKeyframes(), e.needsMeasurement && (it = !0);
978
1073
  });
979
1074
  }
980
- function xr() {
1075
+ function Rr() {
981
1076
  rt = !0, ns(), ts(), rt = !1;
982
1077
  }
983
1078
  class At {
@@ -999,7 +1094,7 @@ class At {
999
1094
  }
1000
1095
  t[0] === void 0 && (t[0] = o), i && r === void 0 && i.set(t[0]);
1001
1096
  }
1002
- gr(t);
1097
+ Vr(t);
1003
1098
  }
1004
1099
  setFinalKeyframe() {
1005
1100
  }
@@ -1019,38 +1114,38 @@ class At {
1019
1114
  this.state === "pending" && this.scheduleResolve();
1020
1115
  }
1021
1116
  }
1022
- const Ar = (e) => e.startsWith("--");
1023
- function Mr(e, t, n) {
1024
- Ar(t) ? e.style.setProperty(t, n) : e.style[t] = n;
1117
+ const Dr = (e) => e.startsWith("--");
1118
+ function Ir(e, t, n) {
1119
+ Dr(t) ? e.style.setProperty(t, n) : e.style[t] = n;
1025
1120
  }
1026
- const Cr = {};
1121
+ const kr = {};
1027
1122
  function ss(e, t) {
1028
1123
  const n = /* @__PURE__ */ Pn(e);
1029
- return () => Cr[t] ?? n();
1124
+ return () => kr[t] ?? n();
1030
1125
  }
1031
- const Pr = /* @__PURE__ */ ss(() => window.ScrollTimeline !== void 0, "scrollTimeline"), is = /* @__PURE__ */ ss(() => {
1126
+ const Or = /* @__PURE__ */ ss(() => window.ScrollTimeline !== void 0, "scrollTimeline"), is = /* @__PURE__ */ ss(() => {
1032
1127
  try {
1033
1128
  document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
1034
1129
  } catch {
1035
1130
  return !1;
1036
1131
  }
1037
1132
  return !0;
1038
- }, "linearEasing"), fe = ([e, t, n, s]) => `cubic-bezier(${e}, ${t}, ${n}, ${s})`, Jt = {
1133
+ }, "linearEasing"), de = ([e, t, n, s]) => `cubic-bezier(${e}, ${t}, ${n}, ${s})`, Jt = {
1039
1134
  linear: "linear",
1040
1135
  ease: "ease",
1041
1136
  easeIn: "ease-in",
1042
1137
  easeOut: "ease-out",
1043
1138
  easeInOut: "ease-in-out",
1044
- circIn: /* @__PURE__ */ fe([0, 0.65, 0.55, 1]),
1045
- circOut: /* @__PURE__ */ fe([0.55, 0, 1, 0.45]),
1046
- backIn: /* @__PURE__ */ fe([0.31, 0.01, 0.66, -0.59]),
1047
- backOut: /* @__PURE__ */ fe([0.33, 1.53, 0.69, 0.99])
1139
+ circIn: /* @__PURE__ */ de([0, 0.65, 0.55, 1]),
1140
+ circOut: /* @__PURE__ */ de([0.55, 0, 1, 0.45]),
1141
+ backIn: /* @__PURE__ */ de([0.31, 0.01, 0.66, -0.59]),
1142
+ backOut: /* @__PURE__ */ de([0.33, 1.53, 0.69, 0.99])
1048
1143
  };
1049
1144
  function rs(e, t) {
1050
1145
  if (e)
1051
- return typeof e == "function" ? is() ? Jn(e, t) : "ease-out" : Wn(e) ? fe(e) : Array.isArray(e) ? e.map((n) => rs(n, t) || Jt.easeOut) : Jt[e];
1146
+ return typeof e == "function" ? is() ? Jn(e, t) : "ease-out" : jn(e) ? de(e) : Array.isArray(e) ? e.map((n) => rs(n, t) || Jt.easeOut) : Jt[e];
1052
1147
  }
1053
- function Fr(e, t, n, { delay: s = 0, duration: i = 300, repeat: r = 0, repeatType: o = "loop", ease: a = "easeOut", times: c } = {}, l = void 0) {
1148
+ function Er(e, t, n, { delay: s = 0, duration: i = 300, repeat: r = 0, repeatType: o = "loop", ease: a = "easeOut", times: c } = {}, l = void 0) {
1054
1149
  const u = {
1055
1150
  [t]: n
1056
1151
  };
@@ -1070,20 +1165,20 @@ function Fr(e, t, n, { delay: s = 0, duration: i = 300, repeat: r = 0, repeatTyp
1070
1165
  function os(e) {
1071
1166
  return typeof e == "function" && "applyToOptions" in e;
1072
1167
  }
1073
- function Rr({ type: e, ...t }) {
1168
+ function Br({ type: e, ...t }) {
1074
1169
  return os(e) && is() ? e.applyToOptions(t) : (t.duration ?? (t.duration = 300), t.ease ?? (t.ease = "easeOut"), t);
1075
1170
  }
1076
- class as extends Vt {
1171
+ class as extends St {
1077
1172
  constructor(t) {
1078
1173
  if (super(), this.finishedTime = null, this.isStopped = !1, this.manualStartTime = null, !t)
1079
1174
  return;
1080
1175
  const { element: n, name: s, keyframes: i, pseudoElement: r, allowFlatten: o = !1, finalKeyframe: a, onComplete: c } = t;
1081
1176
  this.isPseudoElement = !!r, this.allowFlatten = o, this.options = t, Z(typeof t.type != "string", `Mini animate() doesn't support "type" as a string.`, "mini-spring");
1082
- const l = Rr(t);
1083
- this.animation = Fr(n, s, i, l, r), l.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
1177
+ const l = Br(t);
1178
+ this.animation = Er(n, s, i, l, r), l.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
1084
1179
  if (this.finishedTime = this.time, !r) {
1085
- const u = St(i, this.options, a, this.speed);
1086
- this.updateMotionValue ? this.updateMotionValue(u) : Mr(n, s, u), this.animation.cancel();
1180
+ const u = Vt(i, this.options, a, this.speed);
1181
+ this.updateMotionValue ? this.updateMotionValue(u) : Ir(n, s, u), this.animation.cancel();
1087
1182
  }
1088
1183
  c == null || c(), this.notifyFinished();
1089
1184
  };
@@ -1167,7 +1262,7 @@ class as extends Vt {
1167
1262
  */
1168
1263
  attachTimeline({ timeline: t, observe: n }) {
1169
1264
  var s;
1170
- return this.allowFlatten && ((s = this.animation.effect) == null || s.updateTiming({ easing: "linear" })), this.animation.onfinish = null, t && Pr() ? (this.animation.timeline = t, re) : n(this);
1265
+ return this.allowFlatten && ((s = this.animation.effect) == null || s.updateTiming({ easing: "linear" })), this.animation.onfinish = null, t && Or() ? (this.animation.timeline = t, oe) : n(this);
1171
1266
  }
1172
1267
  }
1173
1268
  const us = {
@@ -1175,16 +1270,16 @@ const us = {
1175
1270
  backInOut: Ln,
1176
1271
  circInOut: Kn
1177
1272
  };
1178
- function Dr(e) {
1273
+ function Lr(e) {
1179
1274
  return e in us;
1180
1275
  }
1181
- function kr(e) {
1182
- typeof e.ease == "string" && Dr(e.ease) && (e.ease = us[e.ease]);
1276
+ function Nr(e) {
1277
+ typeof e.ease == "string" && Lr(e.ease) && (e.ease = us[e.ease]);
1183
1278
  }
1184
1279
  const _e = 10;
1185
- class Ir extends as {
1280
+ class Kr extends as {
1186
1281
  constructor(t) {
1187
- kr(t), es(t), super(t), t.startTime !== void 0 && (this.startTime = t.startTime), this.options = t;
1282
+ Nr(t), es(t), super(t), t.startTime !== void 0 && (this.startTime = t.startTime), this.options = t;
1188
1283
  }
1189
1284
  /**
1190
1285
  * WAAPI doesn't natively have any interruption capabilities.
@@ -1205,14 +1300,14 @@ class Ir extends as {
1205
1300
  const a = new xt({
1206
1301
  ...o,
1207
1302
  autoplay: !1
1208
- }), c = Math.max(_e, k.now() - this.startTime), l = G(0, _e, c - _e);
1303
+ }), c = Math.max(_e, I.now() - this.startTime), l = H(0, _e, c - _e);
1209
1304
  n.setWithVelocity(a.sample(Math.max(0, c - l)).value, a.sample(c).value, l), a.stop();
1210
1305
  }
1211
1306
  }
1212
1307
  const Qt = (e, t) => t === "zIndex" ? !1 : !!(typeof e == "number" || Array.isArray(e) || typeof e == "string" && // It's animatable if we have a string
1213
1308
  (L.test(e) || e === "0") && // And it contains numbers and/or colors
1214
1309
  !e.startsWith("url("));
1215
- function Or(e) {
1310
+ function $r(e) {
1216
1311
  const t = e[0];
1217
1312
  if (e.length === 1)
1218
1313
  return !0;
@@ -1220,46 +1315,46 @@ function Or(e) {
1220
1315
  if (e[n] !== t)
1221
1316
  return !0;
1222
1317
  }
1223
- function Er(e, t, n, s) {
1318
+ function jr(e, t, n, s) {
1224
1319
  const i = e[0];
1225
1320
  if (i === null)
1226
1321
  return !1;
1227
1322
  if (t === "display" || t === "visibility")
1228
1323
  return !0;
1229
1324
  const r = e[e.length - 1], o = Qt(i, t), a = Qt(r, t);
1230
- return ge(o === a, `You are trying to animate ${t} from "${i}" to "${r}". "${o ? r : i}" is not an animatable value.`, "value-not-animatable"), !o || !a ? !1 : Or(e) || (n === "spring" || os(n)) && s;
1325
+ return ye(o === a, `You are trying to animate ${t} from "${i}" to "${r}". "${o ? r : i}" is not an animatable value.`, "value-not-animatable"), !o || !a ? !1 : $r(e) || (n === "spring" || os(n)) && s;
1231
1326
  }
1232
1327
  function ot(e) {
1233
1328
  e.duration = 0, e.type = "keyframes";
1234
1329
  }
1235
- const Br = /* @__PURE__ */ new Set([
1330
+ const Wr = /* @__PURE__ */ new Set([
1236
1331
  "opacity",
1237
1332
  "clipPath",
1238
1333
  "filter",
1239
1334
  "transform"
1240
1335
  // TODO: Could be re-enabled now we have support for linear() easing
1241
1336
  // "background-color"
1242
- ]), Lr = /* @__PURE__ */ Pn(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
1243
- function Nr(e) {
1337
+ ]), _r = /* @__PURE__ */ Pn(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
1338
+ function Gr(e) {
1244
1339
  var u;
1245
1340
  const { motionValue: t, name: n, repeatDelay: s, repeatType: i, damping: r, type: o } = e;
1246
1341
  if (!(((u = t == null ? void 0 : t.owner) == null ? void 0 : u.current) instanceof HTMLElement))
1247
1342
  return !1;
1248
1343
  const { onUpdate: c, transformTemplate: l } = t.owner.getProps();
1249
- return Lr() && n && Br.has(n) && (n !== "transform" || !l) && /**
1344
+ return _r() && n && Wr.has(n) && (n !== "transform" || !l) && /**
1250
1345
  * If we're outputting values to onUpdate then we can't use WAAPI as there's
1251
1346
  * no way to read the value from WAAPI every frame.
1252
1347
  */
1253
1348
  !c && !s && i !== "mirror" && r !== 0 && o !== "inertia";
1254
1349
  }
1255
- const Kr = 40;
1256
- class $r extends Vt {
1350
+ const Hr = 40;
1351
+ class zr extends St {
1257
1352
  constructor({ autoplay: t = !0, delay: n = 0, type: s = "keyframes", repeat: i = 0, repeatDelay: r = 0, repeatType: o = "loop", keyframes: a, name: c, motionValue: l, element: u, ...d }) {
1258
1353
  var p;
1259
1354
  super(), this.stop = () => {
1260
- var b, y;
1261
- this._animation && (this._animation.stop(), (b = this.stopTimeline) == null || b.call(this)), (y = this.keyframeResolver) == null || y.cancel();
1262
- }, this.createdAt = k.now();
1355
+ var y, b;
1356
+ this._animation && (this._animation.stop(), (y = this.stopTimeline) == null || y.call(this)), (b = this.keyframeResolver) == null || b.cancel();
1357
+ }, this.createdAt = I.now();
1263
1358
  const f = {
1264
1359
  autoplay: t,
1265
1360
  delay: n,
@@ -1272,25 +1367,25 @@ class $r extends Vt {
1272
1367
  element: u,
1273
1368
  ...d
1274
1369
  }, h = (u == null ? void 0 : u.KeyframeResolver) || At;
1275
- this.keyframeResolver = new h(a, (b, y, g) => this.onKeyframesResolved(b, y, f, !g), c, l, u), (p = this.keyframeResolver) == null || p.scheduleResolve();
1370
+ this.keyframeResolver = new h(a, (y, b, g) => this.onKeyframesResolved(y, b, f, !g), c, l, u), (p = this.keyframeResolver) == null || p.scheduleResolve();
1276
1371
  }
1277
1372
  onKeyframesResolved(t, n, s, i) {
1278
- var y, g;
1373
+ var b, g;
1279
1374
  this.keyframeResolver = void 0;
1280
1375
  const { name: r, type: o, velocity: a, delay: c, isHandoff: l, onUpdate: u } = s;
1281
- this.resolvedAt = k.now(), Er(t, r, o, a) || (($.instantAnimations || !c) && (u == null || u(St(t, s, n))), t[0] = t[t.length - 1], ot(s), s.repeat = 0);
1376
+ this.resolvedAt = I.now(), jr(t, r, o, a) || (($.instantAnimations || !c) && (u == null || u(Vt(t, s, n))), t[0] = t[t.length - 1], ot(s), s.repeat = 0);
1282
1377
  const f = {
1283
- startTime: i ? this.resolvedAt ? this.resolvedAt - this.createdAt > Kr ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
1378
+ startTime: i ? this.resolvedAt ? this.resolvedAt - this.createdAt > Hr ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
1284
1379
  finalKeyframe: n,
1285
1380
  ...s,
1286
1381
  keyframes: t
1287
- }, h = !l && Nr(f), p = (g = (y = f.motionValue) == null ? void 0 : y.owner) == null ? void 0 : g.current, b = h ? new Ir({
1382
+ }, h = !l && Gr(f), p = (g = (b = f.motionValue) == null ? void 0 : b.owner) == null ? void 0 : g.current, y = h ? new Kr({
1288
1383
  ...f,
1289
1384
  element: p
1290
1385
  }) : new xt(f);
1291
- b.finished.then(() => {
1386
+ y.finished.then(() => {
1292
1387
  this.notifyFinished();
1293
- }).catch(re), this.pendingTimeline && (this.stopTimeline = b.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = b;
1388
+ }).catch(oe), this.pendingTimeline && (this.stopTimeline = y.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = y;
1294
1389
  }
1295
1390
  get finished() {
1296
1391
  return this._animation ? this.animation.finished : this._finished;
@@ -1301,7 +1396,7 @@ class $r extends Vt {
1301
1396
  }
1302
1397
  get animation() {
1303
1398
  var t;
1304
- return this._animation || ((t = this.keyframeResolver) == null || t.resume(), xr()), this._animation;
1399
+ return this._animation || ((t = this.keyframeResolver) == null || t.resume(), Rr()), this._animation;
1305
1400
  }
1306
1401
  get duration() {
1307
1402
  return this.animation.duration;
@@ -1348,21 +1443,21 @@ function cs(e, t, n, s = 0, i = 1) {
1348
1443
  const r = Array.from(e).sort((l, u) => l.sortNodePosition(u)).indexOf(t), o = e.size, a = (o - 1) * s;
1349
1444
  return typeof n == "function" ? n(r, o) : i === 1 ? r * s : a - r * s;
1350
1445
  }
1351
- const Wr = (
1446
+ const Ur = (
1352
1447
  // eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
1353
1448
  /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
1354
1449
  );
1355
- function jr(e) {
1356
- const t = Wr.exec(e);
1450
+ function Yr(e) {
1451
+ const t = Ur.exec(e);
1357
1452
  if (!t)
1358
1453
  return [,];
1359
1454
  const [, n, s, i] = t;
1360
1455
  return [`--${n ?? s}`, i];
1361
1456
  }
1362
- const _r = 4;
1457
+ const Xr = 4;
1363
1458
  function ls(e, t, n = 1) {
1364
- Z(n <= _r, `Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`, "max-css-var-depth");
1365
- const [s, i] = jr(e);
1459
+ Z(n <= Xr, `Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`, "max-css-var-depth");
1460
+ const [s, i] = Yr(e);
1366
1461
  if (!s)
1367
1462
  return;
1368
1463
  const r = window.getComputedStyle(t).getPropertyValue(s);
@@ -1372,26 +1467,26 @@ function ls(e, t, n = 1) {
1372
1467
  }
1373
1468
  return yt(i) ? ls(i, t, n + 1) : i;
1374
1469
  }
1375
- const Gr = {
1470
+ const qr = {
1376
1471
  type: "spring",
1377
1472
  stiffness: 500,
1378
1473
  damping: 25,
1379
1474
  restSpeed: 10
1380
- }, Hr = (e) => ({
1475
+ }, Zr = (e) => ({
1381
1476
  type: "spring",
1382
1477
  stiffness: 550,
1383
1478
  damping: e === 0 ? 2 * Math.sqrt(550) : 30,
1384
1479
  restSpeed: 10
1385
- }), zr = {
1480
+ }), Jr = {
1386
1481
  type: "keyframes",
1387
1482
  duration: 0.8
1388
- }, Ur = {
1483
+ }, Qr = {
1389
1484
  type: "keyframes",
1390
1485
  ease: [0.25, 0.1, 0.35, 1],
1391
1486
  duration: 0.3
1392
- }, Yr = (e, { keyframes: t }) => t.length > 2 ? zr : ue.has(e) ? e.startsWith("scale") ? Hr(t[1]) : Gr : Ur, Xr = (e) => e !== null;
1393
- function qr(e, { repeat: t, repeatType: n = "loop" }, s) {
1394
- const i = e.filter(Xr), r = t && n !== "loop" && t % 2 === 1 ? 0 : i.length - 1;
1487
+ }, eo = (e, { keyframes: t }) => t.length > 2 ? Jr : ce.has(e) ? e.startsWith("scale") ? Zr(t[1]) : qr : Qr, to = (e) => e !== null;
1488
+ function no(e, { repeat: t, repeatType: n = "loop" }, s) {
1489
+ const i = e.filter(to), r = t && n !== "loop" && t % 2 === 1 ? 0 : i.length - 1;
1395
1490
  return i[r];
1396
1491
  }
1397
1492
  function fs(e, t) {
@@ -1405,10 +1500,10 @@ function ds(e, t) {
1405
1500
  const n = (e == null ? void 0 : e[t]) ?? (e == null ? void 0 : e.default) ?? e;
1406
1501
  return n !== e ? fs(n, e) : n;
1407
1502
  }
1408
- function Zr({ when: e, delay: t, delayChildren: n, staggerChildren: s, staggerDirection: i, repeat: r, repeatType: o, repeatDelay: a, from: c, elapsed: l, ...u }) {
1503
+ function so({ when: e, delay: t, delayChildren: n, staggerChildren: s, staggerDirection: i, repeat: r, repeatType: o, repeatDelay: a, from: c, elapsed: l, ...u }) {
1409
1504
  return !!Object.keys(u).length;
1410
1505
  }
1411
- const Jr = (e, t, n, s = {}, i, r) => (o) => {
1506
+ const io = (e, t, n, s = {}, i, r) => (o) => {
1412
1507
  const a = ds(s, e) || {}, c = a.delay || s.delay || 0;
1413
1508
  let { elapsed: l = 0 } = s;
1414
1509
  l = l - /* @__PURE__ */ K(c);
@@ -1428,10 +1523,10 @@ const Jr = (e, t, n, s = {}, i, r) => (o) => {
1428
1523
  motionValue: t,
1429
1524
  element: r ? void 0 : i
1430
1525
  };
1431
- Zr(a) || Object.assign(u, Yr(e, u)), u.duration && (u.duration = /* @__PURE__ */ K(u.duration)), u.repeatDelay && (u.repeatDelay = /* @__PURE__ */ K(u.repeatDelay)), u.from !== void 0 && (u.keyframes[0] = u.from);
1526
+ so(a) || Object.assign(u, eo(e, u)), u.duration && (u.duration = /* @__PURE__ */ K(u.duration)), u.repeatDelay && (u.repeatDelay = /* @__PURE__ */ K(u.repeatDelay)), u.from !== void 0 && (u.keyframes[0] = u.from);
1432
1527
  let d = !1;
1433
1528
  if ((u.type === !1 || u.duration === 0 && !u.repeatDelay) && (ot(u), u.delay === 0 && (d = !0)), ($.instantAnimations || $.skipAnimations || i != null && i.shouldSkipAnimations) && (d = !0, ot(u), u.delay = 0), u.allowFlatten = !a.type && !a.ease, d && !r && t.get() !== void 0) {
1434
- const f = qr(u.keyframes, a);
1529
+ const f = no(u.keyframes, a);
1435
1530
  if (f !== void 0) {
1436
1531
  N.update(() => {
1437
1532
  u.onUpdate(f), u.onComplete();
@@ -1439,7 +1534,7 @@ const Jr = (e, t, n, s = {}, i, r) => (o) => {
1439
1534
  return;
1440
1535
  }
1441
1536
  }
1442
- return a.isSync ? new xt(u) : new $r(u);
1537
+ return a.isSync ? new xt(u) : new zr(u);
1443
1538
  };
1444
1539
  function en(e) {
1445
1540
  const t = [{}, {}];
@@ -1469,9 +1564,9 @@ const hs = /* @__PURE__ */ new Set([
1469
1564
  "left",
1470
1565
  "right",
1471
1566
  "bottom",
1472
- ...ae
1473
- ]), tn = 30, Qr = (e) => !isNaN(parseFloat(e));
1474
- class eo {
1567
+ ...ue
1568
+ ]), tn = 30, ro = (e) => !isNaN(parseFloat(e));
1569
+ class oo {
1475
1570
  /**
1476
1571
  * @param init - The initiating value
1477
1572
  * @param config - Optional configuration options
@@ -1481,14 +1576,14 @@ class eo {
1481
1576
  constructor(t, n = {}) {
1482
1577
  this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (s) => {
1483
1578
  var r;
1484
- const i = k.now();
1579
+ const i = I.now();
1485
1580
  if (this.updatedAt !== i && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(s), this.current !== this.prev && ((r = this.events.change) == null || r.notify(this.current), this.dependents))
1486
1581
  for (const o of this.dependents)
1487
1582
  o.dirty();
1488
1583
  }, this.hasAnimated = !1, this.setCurrent(t), this.owner = n.owner;
1489
1584
  }
1490
1585
  setCurrent(t) {
1491
- this.current = t, this.updatedAt = k.now(), this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity = Qr(this.current));
1586
+ this.current = t, this.updatedAt = I.now(), this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity = ro(this.current));
1492
1587
  }
1493
1588
  setPrevFrameValue(t = this.current) {
1494
1589
  this.prevFrameValue = t, this.prevUpdatedAt = this.updatedAt;
@@ -1534,7 +1629,7 @@ class eo {
1534
1629
  * @deprecated
1535
1630
  */
1536
1631
  onChange(t) {
1537
- return process.env.NODE_ENV !== "production" && kn(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", t);
1632
+ return process.env.NODE_ENV !== "production" && In(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", t);
1538
1633
  }
1539
1634
  on(t, n) {
1540
1635
  this.events[t] || (this.events[t] = new Rn());
@@ -1617,7 +1712,7 @@ class eo {
1617
1712
  * @public
1618
1713
  */
1619
1714
  getVelocity() {
1620
- const t = k.now();
1715
+ const t = I.now();
1621
1716
  if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt > tn)
1622
1717
  return 0;
1623
1718
  const n = Math.min(this.updatedAt - this.prevUpdatedAt, tn);
@@ -1674,31 +1769,31 @@ class eo {
1674
1769
  }
1675
1770
  }
1676
1771
  function De(e, t) {
1677
- return new eo(e, t);
1772
+ return new oo(e, t);
1678
1773
  }
1679
1774
  const at = (e) => Array.isArray(e);
1680
- function to(e, t, n) {
1775
+ function ao(e, t, n) {
1681
1776
  e.hasValue(t) ? e.getValue(t).set(n) : e.addValue(t, De(n));
1682
1777
  }
1683
- function no(e) {
1778
+ function uo(e) {
1684
1779
  return at(e) ? e[e.length - 1] || 0 : e;
1685
1780
  }
1686
- function so(e, t) {
1781
+ function co(e, t) {
1687
1782
  const n = se(e, t);
1688
1783
  let { transitionEnd: s = {}, transition: i = {}, ...r } = n || {};
1689
1784
  r = { ...r, ...s };
1690
1785
  for (const o in r) {
1691
- const a = no(r[o]);
1692
- to(e, o, a);
1786
+ const a = uo(r[o]);
1787
+ ao(e, o, a);
1693
1788
  }
1694
1789
  }
1695
1790
  const R = (e) => !!(e && e.getVelocity);
1696
- function io(e) {
1791
+ function lo(e) {
1697
1792
  return !!(R(e) && e.add);
1698
1793
  }
1699
- function ro(e, t) {
1794
+ function fo(e, t) {
1700
1795
  const n = e.getValue("willChange");
1701
- if (io(n))
1796
+ if (lo(n))
1702
1797
  return n.add(t);
1703
1798
  if (!n && $.WillChange) {
1704
1799
  const s = new $.WillChange("auto");
@@ -1708,11 +1803,11 @@ function ro(e, t) {
1708
1803
  function Ct(e) {
1709
1804
  return e.replace(/([A-Z])/g, (t) => `-${t.toLowerCase()}`);
1710
1805
  }
1711
- const oo = "framerAppearId", ps = "data-" + Ct(oo);
1712
- function ao(e) {
1806
+ const ho = "framerAppearId", ps = "data-" + Ct(ho);
1807
+ function po(e) {
1713
1808
  return e.props[ps];
1714
1809
  }
1715
- function uo({ protectedKeys: e, needsAnimating: t }, n) {
1810
+ function mo({ protectedKeys: e, needsAnimating: t }, n) {
1716
1811
  const s = e.hasOwnProperty(n) && t[n] !== !0;
1717
1812
  return t[n] = !1, s;
1718
1813
  }
@@ -1725,31 +1820,31 @@ function ms(e, t, { delay: n = 0, transitionOverride: s, type: i } = {}) {
1725
1820
  const u = [], d = i && e.animationState && e.animationState.getState()[i];
1726
1821
  for (const f in a) {
1727
1822
  const h = e.getValue(f, e.latestValues[f] ?? null), p = a[f];
1728
- if (p === void 0 || d && uo(d, f))
1823
+ if (p === void 0 || d && mo(d, f))
1729
1824
  continue;
1730
- const b = {
1825
+ const y = {
1731
1826
  delay: n,
1732
1827
  ...ds(r || {}, f)
1733
- }, y = h.get();
1734
- if (y !== void 0 && !h.isAnimating && !Array.isArray(p) && p === y && !b.velocity)
1828
+ }, b = h.get();
1829
+ if (b !== void 0 && !h.isAnimating && !Array.isArray(p) && p === b && !y.velocity)
1735
1830
  continue;
1736
1831
  let g = !1;
1737
1832
  if (window.MotionHandoffAnimation) {
1738
- const V = ao(e);
1739
- if (V) {
1740
- const T = window.MotionHandoffAnimation(V, f, N);
1741
- T !== null && (b.startTime = T, g = !0);
1833
+ const S = po(e);
1834
+ if (S) {
1835
+ const w = window.MotionHandoffAnimation(S, f, N);
1836
+ w !== null && (y.startTime = w, g = !0);
1742
1837
  }
1743
1838
  }
1744
- ro(e, f);
1745
- const v = l ?? e.shouldReduceMotion;
1746
- h.start(Jr(f, h, p, v && hs.has(f) ? { type: !1 } : b, e, g));
1747
- const w = h.animation;
1748
- w && u.push(w);
1839
+ fo(e, f);
1840
+ const T = l ?? e.shouldReduceMotion;
1841
+ h.start(io(f, h, p, T && hs.has(f) ? { type: !1 } : y, e, g));
1842
+ const v = h.animation;
1843
+ v && u.push(v);
1749
1844
  }
1750
1845
  if (o) {
1751
1846
  const f = () => N.update(() => {
1752
- o && so(e, o);
1847
+ o && co(e, o);
1753
1848
  });
1754
1849
  u.length ? Promise.all(u).then(f) : f();
1755
1850
  }
@@ -1762,7 +1857,7 @@ function ut(e, t, n = {}) {
1762
1857
  n.transitionOverride && (i = n.transitionOverride);
1763
1858
  const r = s ? () => Promise.all(ms(e, s, n)) : () => Promise.resolve(), o = e.variantChildren && e.variantChildren.size ? (l = 0) => {
1764
1859
  const { delayChildren: u = 0, staggerChildren: d, staggerDirection: f } = i;
1765
- return co(e, t, l, u, d, f, n);
1860
+ return go(e, t, l, u, d, f, n);
1766
1861
  } : () => Promise.resolve(), { when: a } = i;
1767
1862
  if (a) {
1768
1863
  const [l, u] = a === "beforeChildren" ? [r, o] : [o, r];
@@ -1770,7 +1865,7 @@ function ut(e, t, n = {}) {
1770
1865
  } else
1771
1866
  return Promise.all([r(), o(n.delay)]);
1772
1867
  }
1773
- function co(e, t, n = 0, s = 0, i = 0, r = 1, o) {
1868
+ function go(e, t, n = 0, s = 0, i = 0, r = 1, o) {
1774
1869
  const a = [];
1775
1870
  for (const c of e.variantChildren)
1776
1871
  c.notify("AnimationStart", t), a.push(ut(c, t, {
@@ -1779,7 +1874,7 @@ function co(e, t, n = 0, s = 0, i = 0, r = 1, o) {
1779
1874
  }).then(() => c.notify("AnimationComplete", t)));
1780
1875
  return Promise.all(a);
1781
1876
  }
1782
- function lo(e, t, n = {}) {
1877
+ function yo(e, t, n = {}) {
1783
1878
  e.notify("AnimationStart", t);
1784
1879
  let s;
1785
1880
  if (Array.isArray(t)) {
@@ -1795,15 +1890,15 @@ function lo(e, t, n = {}) {
1795
1890
  e.notify("AnimationComplete", t);
1796
1891
  });
1797
1892
  }
1798
- const fo = {
1893
+ const bo = {
1799
1894
  test: (e) => e === "auto",
1800
1895
  parse: (e) => e
1801
- }, gs = (e) => (t) => t.test(e), ys = [oe, m, ne, W, Bi, Ei, fo], nn = (e) => ys.find(gs(e));
1802
- function ho(e) {
1896
+ }, gs = (e) => (t) => t.test(e), ys = [ae, m, ne, j, Wi, ji, bo], nn = (e) => ys.find(gs(e));
1897
+ function vo(e) {
1803
1898
  return typeof e == "number" ? e === 0 : e !== null ? e === "none" || e === "0" || Cn(e) : !0;
1804
1899
  }
1805
- const po = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
1806
- function mo(e) {
1900
+ const wo = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
1901
+ function To(e) {
1807
1902
  const [t, n] = e.slice(0, -1).split("(");
1808
1903
  if (t === "drop-shadow")
1809
1904
  return e;
@@ -1811,14 +1906,14 @@ function mo(e) {
1811
1906
  if (!s)
1812
1907
  return e;
1813
1908
  const i = n.replace(s, "");
1814
- let r = po.has(t) ? 1 : 0;
1909
+ let r = wo.has(t) ? 1 : 0;
1815
1910
  return s !== n && (r *= 100), t + "(" + r + i + ")";
1816
1911
  }
1817
- const go = /\b([a-z-]*)\(.*?\)/gu, ct = {
1912
+ const Vo = /\b([a-z-]*)\(.*?\)/gu, ct = {
1818
1913
  ...L,
1819
1914
  getAnimatableNone: (e) => {
1820
- const t = e.match(go);
1821
- return t ? t.map(mo).join(" ") : e;
1915
+ const t = e.match(Vo);
1916
+ return t ? t.map(To).join(" ") : e;
1822
1917
  }
1823
1918
  }, lt = {
1824
1919
  ...L,
@@ -1827,20 +1922,20 @@ const go = /\b([a-z-]*)\(.*?\)/gu, ct = {
1827
1922
  return L.createTransformer(e)(t.map((s) => typeof s == "number" ? 0 : typeof s == "object" ? { ...s, alpha: 1 } : s));
1828
1923
  }
1829
1924
  }, sn = {
1830
- ...oe,
1925
+ ...ae,
1831
1926
  transform: Math.round
1832
- }, yo = {
1833
- rotate: W,
1834
- rotateX: W,
1835
- rotateY: W,
1836
- rotateZ: W,
1837
- scale: Ve,
1838
- scaleX: Ve,
1839
- scaleY: Ve,
1840
- scaleZ: Ve,
1841
- skew: W,
1842
- skewX: W,
1843
- skewY: W,
1927
+ }, So = {
1928
+ rotate: j,
1929
+ rotateX: j,
1930
+ rotateY: j,
1931
+ rotateZ: j,
1932
+ scale: Se,
1933
+ scaleX: Se,
1934
+ scaleY: Se,
1935
+ scaleZ: Se,
1936
+ skew: j,
1937
+ skewX: j,
1938
+ skewY: j,
1844
1939
  distance: m,
1845
1940
  translateX: m,
1846
1941
  translateY: m,
@@ -1850,7 +1945,7 @@ const go = /\b([a-z-]*)\(.*?\)/gu, ct = {
1850
1945
  z: m,
1851
1946
  perspective: m,
1852
1947
  transformPerspective: m,
1853
- opacity: he,
1948
+ opacity: pe,
1854
1949
  originX: _t,
1855
1950
  originY: _t,
1856
1951
  originZ: m
@@ -1910,13 +2005,13 @@ const go = /\b([a-z-]*)\(.*?\)/gu, ct = {
1910
2005
  // Misc
1911
2006
  backgroundPositionX: m,
1912
2007
  backgroundPositionY: m,
1913
- ...yo,
2008
+ ...So,
1914
2009
  zIndex: sn,
1915
2010
  // SVG
1916
- fillOpacity: he,
1917
- strokeOpacity: he,
2011
+ fillOpacity: pe,
2012
+ strokeOpacity: pe,
1918
2013
  numOctaves: sn
1919
- }, bo = {
2014
+ }, xo = {
1920
2015
  ...Pt,
1921
2016
  // Color props
1922
2017
  color: M,
@@ -1934,23 +2029,23 @@ const go = /\b([a-z-]*)\(.*?\)/gu, ct = {
1934
2029
  WebkitFilter: ct,
1935
2030
  mask: lt,
1936
2031
  WebkitMask: lt
1937
- }, bs = (e) => bo[e], wo = /* @__PURE__ */ new Set([ct, lt]);
1938
- function ws(e, t) {
2032
+ }, bs = (e) => xo[e], Ao = /* @__PURE__ */ new Set([ct, lt]);
2033
+ function vs(e, t) {
1939
2034
  let n = bs(e);
1940
- return wo.has(n) || (n = L), n.getAnimatableNone ? n.getAnimatableNone(t) : void 0;
2035
+ return Ao.has(n) || (n = L), n.getAnimatableNone ? n.getAnimatableNone(t) : void 0;
1941
2036
  }
1942
- const To = /* @__PURE__ */ new Set(["auto", "none", "0"]);
1943
- function vo(e, t, n) {
2037
+ const Mo = /* @__PURE__ */ new Set(["auto", "none", "0"]);
2038
+ function Co(e, t, n) {
1944
2039
  let s = 0, i;
1945
2040
  for (; s < e.length && !i; ) {
1946
2041
  const r = e[s];
1947
- typeof r == "string" && !To.has(r) && pe(r).values.length && (i = e[s]), s++;
2042
+ typeof r == "string" && !Mo.has(r) && me(r).values.length && (i = e[s]), s++;
1948
2043
  }
1949
2044
  if (i && n)
1950
2045
  for (const r of t)
1951
- e[r] = ws(n, i);
2046
+ e[r] = vs(n, i);
1952
2047
  }
1953
- class So extends At {
2048
+ class Po extends At {
1954
2049
  constructor(t, n, s, i, r) {
1955
2050
  super(t, n, s, i, r, !0);
1956
2051
  }
@@ -1968,7 +2063,7 @@ class So extends At {
1968
2063
  }
1969
2064
  if (this.resolveNoneKeyframes(), !hs.has(s) || t.length !== 2)
1970
2065
  return;
1971
- const [i, r] = t, o = nn(i), a = nn(r), c = jt(i), l = jt(r);
2066
+ const [i, r] = t, o = nn(i), a = nn(r), c = Wt(i), l = Wt(r);
1972
2067
  if (c !== l && _[s]) {
1973
2068
  this.needsMeasurement = !0;
1974
2069
  return;
@@ -1984,8 +2079,8 @@ class So extends At {
1984
2079
  resolveNoneKeyframes() {
1985
2080
  const { unresolvedKeyframes: t, name: n } = this, s = [];
1986
2081
  for (let i = 0; i < t.length; i++)
1987
- (t[i] === null || ho(t[i])) && s.push(i);
1988
- s.length && vo(t, s, n);
2082
+ (t[i] === null || vo(t[i])) && s.push(i);
2083
+ s.length && Co(t, s, n);
1989
2084
  }
1990
2085
  measureInitialState() {
1991
2086
  const { element: t, unresolvedKeyframes: n, name: s } = this;
@@ -2008,7 +2103,7 @@ class So extends At {
2008
2103
  }), this.resolveNoneKeyframes();
2009
2104
  }
2010
2105
  }
2011
- const Vo = /* @__PURE__ */ new Set([
2106
+ const Fo = /* @__PURE__ */ new Set([
2012
2107
  "opacity",
2013
2108
  "clipPath",
2014
2109
  "filter",
@@ -2017,7 +2112,7 @@ const Vo = /* @__PURE__ */ new Set([
2017
2112
  // or until we implement support for linear() easing.
2018
2113
  // "background-color"
2019
2114
  ]);
2020
- function xo(e, t, n) {
2115
+ function Ro(e, t, n) {
2021
2116
  if (e == null)
2022
2117
  return [];
2023
2118
  if (e instanceof EventTarget)
@@ -2029,66 +2124,66 @@ function xo(e, t, n) {
2029
2124
  }
2030
2125
  return Array.from(e).filter((s) => s != null);
2031
2126
  }
2032
- const Ts = (e, t) => t && typeof e == "number" ? t.transform(e) : e;
2033
- function Ao(e) {
2034
- return gi(e) && "offsetHeight" in e;
2127
+ const ws = (e, t) => t && typeof e == "number" ? t.transform(e) : e;
2128
+ function Do(e) {
2129
+ return Vi(e) && "offsetHeight" in e;
2035
2130
  }
2036
- const { schedule: Mo } = /* @__PURE__ */ jn(queueMicrotask, !1), Co = {
2131
+ const { schedule: Io } = /* @__PURE__ */ Wn(queueMicrotask, !1), ko = {
2037
2132
  y: !1
2038
2133
  };
2039
- function Po() {
2040
- return Co.y;
2134
+ function Oo() {
2135
+ return ko.y;
2041
2136
  }
2042
- function vs(e, t) {
2043
- const n = xo(e), s = new AbortController(), i = {
2137
+ function Ts(e, t) {
2138
+ const n = Ro(e), s = new AbortController(), i = {
2044
2139
  passive: !0,
2045
2140
  ...t,
2046
2141
  signal: s.signal
2047
2142
  };
2048
2143
  return [n, i, () => s.abort()];
2049
2144
  }
2050
- function Fo(e) {
2051
- return !(e.pointerType === "touch" || Po());
2145
+ function Eo(e) {
2146
+ return !(e.pointerType === "touch" || Oo());
2052
2147
  }
2053
- function Ro(e, t, n = {}) {
2054
- const [s, i, r] = vs(e, n);
2148
+ function Bo(e, t, n = {}) {
2149
+ const [s, i, r] = Ts(e, n);
2055
2150
  return s.forEach((o) => {
2056
2151
  let a = !1, c = !1, l;
2057
2152
  const u = () => {
2058
2153
  o.removeEventListener("pointerleave", p);
2059
- }, d = (y) => {
2060
- l && (l(y), l = void 0), u();
2061
- }, f = (y) => {
2062
- a = !1, window.removeEventListener("pointerup", f), window.removeEventListener("pointercancel", f), c && (c = !1, d(y));
2154
+ }, d = (b) => {
2155
+ l && (l(b), l = void 0), u();
2156
+ }, f = (b) => {
2157
+ a = !1, window.removeEventListener("pointerup", f), window.removeEventListener("pointercancel", f), c && (c = !1, d(b));
2063
2158
  }, h = () => {
2064
2159
  a = !0, window.addEventListener("pointerup", f, i), window.addEventListener("pointercancel", f, i);
2065
- }, p = (y) => {
2066
- if (y.pointerType !== "touch") {
2160
+ }, p = (b) => {
2161
+ if (b.pointerType !== "touch") {
2067
2162
  if (a) {
2068
2163
  c = !0;
2069
2164
  return;
2070
2165
  }
2071
- d(y);
2166
+ d(b);
2072
2167
  }
2073
- }, b = (y) => {
2074
- if (!Fo(y))
2168
+ }, y = (b) => {
2169
+ if (!Eo(b))
2075
2170
  return;
2076
2171
  c = !1;
2077
- const g = t(o, y);
2172
+ const g = t(o, b);
2078
2173
  typeof g == "function" && (l = g, o.addEventListener("pointerleave", p, i));
2079
2174
  };
2080
- o.addEventListener("pointerenter", b, i), o.addEventListener("pointerdown", h, i);
2175
+ o.addEventListener("pointerenter", y, i), o.addEventListener("pointerdown", h, i);
2081
2176
  }), r;
2082
2177
  }
2083
- const Ss = (e, t) => t ? e === t ? !0 : Ss(e, t.parentElement) : !1, Do = (e) => e.pointerType === "mouse" ? typeof e.button != "number" || e.button <= 0 : e.isPrimary !== !1, ko = /* @__PURE__ */ new Set([
2178
+ const Vs = (e, t) => t ? e === t ? !0 : Vs(e, t.parentElement) : !1, Lo = (e) => e.pointerType === "mouse" ? typeof e.button != "number" || e.button <= 0 : e.isPrimary !== !1, No = /* @__PURE__ */ new Set([
2084
2179
  "BUTTON",
2085
2180
  "INPUT",
2086
2181
  "SELECT",
2087
2182
  "TEXTAREA",
2088
2183
  "A"
2089
2184
  ]);
2090
- function Io(e) {
2091
- return ko.has(e.tagName) || e.isContentEditable === !0;
2185
+ function Ko(e) {
2186
+ return No.has(e.tagName) || e.isContentEditable === !0;
2092
2187
  }
2093
2188
  const Me = /* @__PURE__ */ new WeakSet();
2094
2189
  function rn(e) {
@@ -2099,7 +2194,7 @@ function rn(e) {
2099
2194
  function Ge(e, t) {
2100
2195
  e.dispatchEvent(new PointerEvent("pointer" + t, { isPrimary: !0, bubbles: !0 }));
2101
2196
  }
2102
- const Oo = (e, t) => {
2197
+ const $o = (e, t) => {
2103
2198
  const n = e.currentTarget;
2104
2199
  if (!n)
2105
2200
  return;
@@ -2115,11 +2210,11 @@ const Oo = (e, t) => {
2115
2210
  n.addEventListener("keydown", s, t), n.addEventListener("blur", () => n.removeEventListener("keydown", s), t);
2116
2211
  };
2117
2212
  function on(e) {
2118
- return Do(e) && !0;
2213
+ return Lo(e) && !0;
2119
2214
  }
2120
2215
  const an = /* @__PURE__ */ new WeakSet();
2121
- function Eo(e, t, n = {}) {
2122
- const [s, i, r] = vs(e, n), o = (a) => {
2216
+ function jo(e, t, n = {}) {
2217
+ const [s, i, r] = Ts(e, n), o = (a) => {
2123
2218
  const c = a.currentTarget;
2124
2219
  if (!on(a) || an.has(a))
2125
2220
  return;
@@ -2127,24 +2222,24 @@ function Eo(e, t, n = {}) {
2127
2222
  const l = t(c, a), u = (h, p) => {
2128
2223
  window.removeEventListener("pointerup", d), window.removeEventListener("pointercancel", f), Me.has(c) && Me.delete(c), on(h) && typeof l == "function" && l(h, { success: p });
2129
2224
  }, d = (h) => {
2130
- u(h, c === window || c === document || n.useGlobalTarget || Ss(c, h.target));
2225
+ u(h, c === window || c === document || n.useGlobalTarget || Vs(c, h.target));
2131
2226
  }, f = (h) => {
2132
2227
  u(h, !1);
2133
2228
  };
2134
2229
  window.addEventListener("pointerup", d, i), window.addEventListener("pointercancel", f, i);
2135
2230
  };
2136
2231
  return s.forEach((a) => {
2137
- (n.useGlobalTarget ? window : a).addEventListener("pointerdown", o, i), Ao(a) && (a.addEventListener("focus", (l) => Oo(l, i)), !Io(a) && !a.hasAttribute("tabindex") && (a.tabIndex = 0));
2232
+ (n.useGlobalTarget ? window : a).addEventListener("pointerdown", o, i), Do(a) && (a.addEventListener("focus", (l) => $o(l, i)), !Ko(a) && !a.hasAttribute("tabindex") && (a.tabIndex = 0));
2138
2233
  }), r;
2139
2234
  }
2140
- const Bo = [...ys, M, L], Lo = (e) => Bo.find(gs(e)), un = () => ({ min: 0, max: 0 }), Vs = () => ({
2235
+ const Wo = [...ys, M, L], _o = (e) => Wo.find(gs(e)), un = () => ({ min: 0, max: 0 }), Ss = () => ({
2141
2236
  x: un(),
2142
2237
  y: un()
2143
- }), No = /* @__PURE__ */ new WeakMap();
2238
+ }), Go = /* @__PURE__ */ new WeakMap();
2144
2239
  function Be(e) {
2145
2240
  return e !== null && typeof e == "object" && typeof e.start == "function";
2146
2241
  }
2147
- function me(e) {
2242
+ function ge(e) {
2148
2243
  return typeof e == "string" || Array.isArray(e);
2149
2244
  }
2150
2245
  const Ft = [
@@ -2157,12 +2252,12 @@ const Ft = [
2157
2252
  "exit"
2158
2253
  ], Rt = ["initial", ...Ft];
2159
2254
  function Le(e) {
2160
- return Be(e.animate) || Rt.some((t) => me(e[t]));
2255
+ return Be(e.animate) || Rt.some((t) => ge(e[t]));
2161
2256
  }
2162
2257
  function xs(e) {
2163
2258
  return !!(Le(e) || e.variants);
2164
2259
  }
2165
- function Ko(e, t, n) {
2260
+ function Ho(e, t, n) {
2166
2261
  for (const s in t) {
2167
2262
  const i = t[s], r = n[s];
2168
2263
  if (R(i))
@@ -2182,9 +2277,9 @@ function Ko(e, t, n) {
2182
2277
  t[s] === void 0 && e.removeValue(s);
2183
2278
  return t;
2184
2279
  }
2185
- const ft = { current: null }, As = { current: !1 }, $o = typeof window < "u";
2186
- function Wo() {
2187
- if (As.current = !0, !!$o)
2280
+ const ft = { current: null }, As = { current: !1 }, zo = typeof window < "u";
2281
+ function Uo() {
2282
+ if (As.current = !0, !!zo)
2188
2283
  if (window.matchMedia) {
2189
2284
  const e = window.matchMedia("(prefers-reduced-motion)"), t = () => ft.current = e.matches;
2190
2285
  e.addEventListener("change", t), t();
@@ -2200,14 +2295,14 @@ const cn = [
2200
2295
  "LayoutAnimationStart",
2201
2296
  "LayoutAnimationComplete"
2202
2297
  ];
2203
- let ke = {};
2298
+ let Ie = {};
2204
2299
  function Ms(e) {
2205
- ke = e;
2300
+ Ie = e;
2206
2301
  }
2207
- function jo() {
2208
- return ke;
2302
+ function Yo() {
2303
+ return Ie;
2209
2304
  }
2210
- class _o {
2305
+ class Xo {
2211
2306
  /**
2212
2307
  * This method takes React props and returns found MotionValues. For example, HTML
2213
2308
  * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
@@ -2222,7 +2317,7 @@ class _o {
2222
2317
  this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.shouldSkipAnimations = !1, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = At, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.hasBeenMounted = !1, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
2223
2318
  this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
2224
2319
  }, this.renderScheduledAt = 0, this.scheduleRender = () => {
2225
- const h = k.now();
2320
+ const h = I.now();
2226
2321
  this.renderScheduledAt < h && (this.renderScheduledAt = h, N.render(this.render, !1, !0));
2227
2322
  };
2228
2323
  const { latestValues: l, renderState: u } = a;
@@ -2238,7 +2333,7 @@ class _o {
2238
2333
  if (this.hasBeenMounted)
2239
2334
  for (const i in this.initialValues)
2240
2335
  (n = this.values.get(i)) == null || n.jump(this.initialValues[i]), this.latestValues[i] = this.initialValues[i];
2241
- this.current = t, No.set(t, this), this.projection && !this.projection.instance && this.projection.mount(t), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((i, r) => this.bindToMotionValue(r, i)), this.reducedMotionConfig === "never" ? this.shouldReduceMotion = !1 : this.reducedMotionConfig === "always" ? this.shouldReduceMotion = !0 : (As.current || Wo(), this.shouldReduceMotion = ft.current), process.env.NODE_ENV !== "production" && kn(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled"), this.shouldSkipAnimations = this.skipAnimationsConfig ?? !1, (s = this.parent) == null || s.addChild(this), this.update(this.props, this.presenceContext), this.hasBeenMounted = !0;
2336
+ this.current = t, Go.set(t, this), this.projection && !this.projection.instance && this.projection.mount(t), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((i, r) => this.bindToMotionValue(r, i)), this.reducedMotionConfig === "never" ? this.shouldReduceMotion = !1 : this.reducedMotionConfig === "always" ? this.shouldReduceMotion = !0 : (As.current || Uo(), this.shouldReduceMotion = ft.current), process.env.NODE_ENV !== "production" && In(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled"), this.shouldSkipAnimations = this.skipAnimationsConfig ?? !1, (s = this.parent) == null || s.addChild(this), this.update(this.props, this.presenceContext), this.hasBeenMounted = !0;
2242
2337
  }
2243
2338
  unmount() {
2244
2339
  var t;
@@ -2258,7 +2353,7 @@ class _o {
2258
2353
  this.children.delete(t), this.enteringChildren && this.enteringChildren.delete(t);
2259
2354
  }
2260
2355
  bindToMotionValue(t, n) {
2261
- if (this.valueSubscriptions.has(t) && this.valueSubscriptions.get(t)(), n.accelerate && Vo.has(t) && this.current instanceof HTMLElement) {
2356
+ if (this.valueSubscriptions.has(t) && this.valueSubscriptions.get(t)(), n.accelerate && Fo.has(t) && this.current instanceof HTMLElement) {
2262
2357
  const { factory: o, keyframes: a, times: c, ease: l, duration: u } = n.accelerate, d = new as({
2263
2358
  element: this.current,
2264
2359
  name: t,
@@ -2272,7 +2367,7 @@ class _o {
2272
2367
  });
2273
2368
  return;
2274
2369
  }
2275
- const s = ue.has(t);
2370
+ const s = ce.has(t);
2276
2371
  s && this.onBindTransform && this.onBindTransform();
2277
2372
  const i = n.on("change", (o) => {
2278
2373
  this.latestValues[t] = o, this.props.onUpdate && N.preRender(this.notifyUpdate), s && this.projection && (this.projection.isTransformDirty = !0), this.scheduleRender();
@@ -2287,8 +2382,8 @@ class _o {
2287
2382
  }
2288
2383
  updateFeatures() {
2289
2384
  let t = "animation";
2290
- for (t in ke) {
2291
- const n = ke[t];
2385
+ for (t in Ie) {
2386
+ const n = Ie[t];
2292
2387
  if (!n)
2293
2388
  continue;
2294
2389
  const { isEnabled: s, Feature: i } = n;
@@ -2307,7 +2402,7 @@ class _o {
2307
2402
  * removed with a re-render to work.
2308
2403
  */
2309
2404
  measureViewportBox() {
2310
- return this.current ? this.measureInstanceViewportBox(this.current, this.props) : Vs();
2405
+ return this.current ? this.measureInstanceViewportBox(this.current, this.props) : Ss();
2311
2406
  }
2312
2407
  getStaticValue(t) {
2313
2408
  return this.latestValues[t];
@@ -2327,7 +2422,7 @@ class _o {
2327
2422
  const r = "on" + i, o = t[r];
2328
2423
  o && (this.propEventSubscriptions[i] = this.on(i, o));
2329
2424
  }
2330
- this.prevMotionValues = Ko(this, this.scrapeMotionValuesFromProps(t, this.prevProps || {}, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
2425
+ this.prevMotionValues = Ho(this, this.scrapeMotionValuesFromProps(t, this.prevProps || {}, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
2331
2426
  }
2332
2427
  getProps() {
2333
2428
  return this.props;
@@ -2392,7 +2487,7 @@ class _o {
2392
2487
  */
2393
2488
  readValue(t, n) {
2394
2489
  let s = this.latestValues[t] !== void 0 || !this.current ? this.latestValues[t] : this.getBaseTargetFromProps(this.props, t) ?? this.readValueFromInstance(this.current, t, this.options);
2395
- return s != null && (typeof s == "string" && (Mn(s) || Cn(s)) ? s = parseFloat(s) : !Lo(s) && L.test(n) && (s = ws(t, n)), this.setBaseTarget(t, R(s) ? s.get() : s)), R(s) ? s.get() : s;
2490
+ return s != null && (typeof s == "string" && (Mn(s) || Cn(s)) ? s = parseFloat(s) : !_o(s) && L.test(n) && (s = vs(t, n)), this.setBaseTarget(t, R(s) ? s.get() : s)), R(s) ? s.get() : s;
2396
2491
  }
2397
2492
  /**
2398
2493
  * Set the base target to later animate back to. This is currently
@@ -2425,12 +2520,12 @@ class _o {
2425
2520
  this.events[t] && this.events[t].notify(...n);
2426
2521
  }
2427
2522
  scheduleRenderMicrotask() {
2428
- Mo.render(this.render);
2523
+ Io.render(this.render);
2429
2524
  }
2430
2525
  }
2431
- class Cs extends _o {
2526
+ class Cs extends Xo {
2432
2527
  constructor() {
2433
- super(...arguments), this.KeyframeResolver = So;
2528
+ super(...arguments), this.KeyframeResolver = Po;
2434
2529
  }
2435
2530
  sortInstanceNodePosition(t, n) {
2436
2531
  return t.compareDocumentPosition(n) & 2 ? 1 : -1;
@@ -2450,20 +2545,20 @@ class Cs extends _o {
2450
2545
  }));
2451
2546
  }
2452
2547
  }
2453
- class ce {
2548
+ class le {
2454
2549
  constructor(t) {
2455
2550
  this.isMounted = !1, this.node = t;
2456
2551
  }
2457
2552
  update() {
2458
2553
  }
2459
2554
  }
2460
- function Go({ top: e, left: t, right: n, bottom: s }) {
2555
+ function qo({ top: e, left: t, right: n, bottom: s }) {
2461
2556
  return {
2462
2557
  x: { min: t, max: n },
2463
2558
  y: { min: e, max: s }
2464
2559
  };
2465
2560
  }
2466
- function Ho(e, t) {
2561
+ function Zo(e, t) {
2467
2562
  if (!t)
2468
2563
  return e;
2469
2564
  const n = t({ x: e.left, y: e.top }), s = t({ x: e.right, y: e.bottom });
@@ -2474,19 +2569,19 @@ function Ho(e, t) {
2474
2569
  right: s.x
2475
2570
  };
2476
2571
  }
2477
- function zo(e, t) {
2478
- return Go(Ho(e.getBoundingClientRect(), t));
2572
+ function Jo(e, t) {
2573
+ return qo(Zo(e.getBoundingClientRect(), t));
2479
2574
  }
2480
- const Uo = {
2575
+ const Qo = {
2481
2576
  x: "translateX",
2482
2577
  y: "translateY",
2483
2578
  z: "translateZ",
2484
2579
  transformPerspective: "perspective"
2485
- }, Yo = ae.length;
2486
- function Xo(e, t, n) {
2580
+ }, ea = ue.length;
2581
+ function ta(e, t, n) {
2487
2582
  let s = "", i = !0;
2488
- for (let r = 0; r < Yo; r++) {
2489
- const o = ae[r], a = e[o];
2583
+ for (let r = 0; r < ea; r++) {
2584
+ const o = ue[r], a = e[o];
2490
2585
  if (a === void 0)
2491
2586
  continue;
2492
2587
  let c = !0;
@@ -2497,10 +2592,10 @@ function Xo(e, t, n) {
2497
2592
  c = o.startsWith("scale") ? l === 1 : l === 0;
2498
2593
  }
2499
2594
  if (!c || n) {
2500
- const l = Ts(a, Pt[o]);
2595
+ const l = ws(a, Pt[o]);
2501
2596
  if (!c) {
2502
2597
  i = !1;
2503
- const u = Uo[o] || o;
2598
+ const u = Qo[o] || o;
2504
2599
  s += `${u}(${l}) `;
2505
2600
  }
2506
2601
  n && (t[o] = l);
@@ -2513,18 +2608,18 @@ function Dt(e, t, n) {
2513
2608
  let o = !1, a = !1;
2514
2609
  for (const c in t) {
2515
2610
  const l = t[c];
2516
- if (ue.has(c)) {
2611
+ if (ce.has(c)) {
2517
2612
  o = !0;
2518
2613
  continue;
2519
2614
  } else if (Gn(c)) {
2520
2615
  i[c] = l;
2521
2616
  continue;
2522
2617
  } else {
2523
- const u = Ts(l, Pt[c]);
2618
+ const u = ws(l, Pt[c]);
2524
2619
  c.startsWith("origin") ? (a = !0, r[c] = u) : s[c] = u;
2525
2620
  }
2526
2621
  }
2527
- if (t.transform || (o || n ? s.transform = Xo(t, e.transform, n) : s.transform && (s.transform = "none")), a) {
2622
+ if (t.transform || (o || n ? s.transform = ta(t, e.transform, n) : s.transform && (s.transform = "none")), a) {
2528
2623
  const { originX: c = "50%", originY: l = "50%", originZ: u = 0 } = r;
2529
2624
  s.transformOrigin = `${c} ${l} ${u}`;
2530
2625
  }
@@ -2541,7 +2636,7 @@ function Ps(e, { style: t, vars: n }, s, i) {
2541
2636
  function ln(e, t) {
2542
2637
  return t.max === t.min ? 0 : e / (t.max - t.min) * 100;
2543
2638
  }
2544
- const le = {
2639
+ const fe = {
2545
2640
  correct: (e, t) => {
2546
2641
  if (!t.target)
2547
2642
  return e;
@@ -2553,7 +2648,7 @@ const le = {
2553
2648
  const n = ln(e, t.target.x), s = ln(e, t.target.y);
2554
2649
  return `${n}% ${s}%`;
2555
2650
  }
2556
- }, qo = {
2651
+ }, na = {
2557
2652
  correct: (e, { treeScale: t, projectionDelta: n }) => {
2558
2653
  const s = e, i = L.parse(e);
2559
2654
  if (i.length > 5)
@@ -2563,9 +2658,9 @@ const le = {
2563
2658
  const l = we(a, c, 0.5);
2564
2659
  return typeof i[2 + o] == "number" && (i[2 + o] /= l), typeof i[3 + o] == "number" && (i[3 + o] /= l), r(i);
2565
2660
  }
2566
- }, Zo = {
2661
+ }, sa = {
2567
2662
  borderRadius: {
2568
- ...le,
2663
+ ...fe,
2569
2664
  applyTo: [
2570
2665
  "borderTopLeftRadius",
2571
2666
  "borderTopRightRadius",
@@ -2573,16 +2668,16 @@ const le = {
2573
2668
  "borderBottomRightRadius"
2574
2669
  ]
2575
2670
  },
2576
- borderTopLeftRadius: le,
2577
- borderTopRightRadius: le,
2578
- borderBottomLeftRadius: le,
2579
- borderBottomRightRadius: le,
2580
- boxShadow: qo
2671
+ borderTopLeftRadius: fe,
2672
+ borderTopRightRadius: fe,
2673
+ borderBottomLeftRadius: fe,
2674
+ borderBottomRightRadius: fe,
2675
+ boxShadow: na
2581
2676
  };
2582
2677
  function Fs(e, { layout: t, layoutId: n }) {
2583
- return ue.has(e) || e.startsWith("origin") || (t || n !== void 0) && (!!Zo[e] || e === "opacity");
2678
+ return ce.has(e) || e.startsWith("origin") || (t || n !== void 0) && (!!sa[e] || e === "opacity");
2584
2679
  }
2585
- function kt(e, t, n) {
2680
+ function It(e, t, n) {
2586
2681
  var o;
2587
2682
  const s = e.style, i = t == null ? void 0 : t.style, r = {};
2588
2683
  if (!s)
@@ -2591,45 +2686,45 @@ function kt(e, t, n) {
2591
2686
  (R(s[a]) || i && R(i[a]) || Fs(a, e) || ((o = n == null ? void 0 : n.getValue(a)) == null ? void 0 : o.liveStyle) !== void 0) && (r[a] = s[a]);
2592
2687
  return r;
2593
2688
  }
2594
- function Jo(e) {
2689
+ function ia(e) {
2595
2690
  return window.getComputedStyle(e);
2596
2691
  }
2597
- class Qo extends Cs {
2692
+ class ra extends Cs {
2598
2693
  constructor() {
2599
2694
  super(...arguments), this.type = "html", this.renderInstance = Ps;
2600
2695
  }
2601
2696
  readValueFromInstance(t, n) {
2602
2697
  var s;
2603
- if (ue.has(n))
2604
- return (s = this.projection) != null && s.isProjecting ? tt(n) : wr(t, n);
2698
+ if (ce.has(n))
2699
+ return (s = this.projection) != null && s.isProjecting ? tt(n) : Ar(t, n);
2605
2700
  {
2606
- const i = Jo(t), r = (Gn(n) ? i.getPropertyValue(n) : i[n]) || 0;
2701
+ const i = ia(t), r = (Gn(n) ? i.getPropertyValue(n) : i[n]) || 0;
2607
2702
  return typeof r == "string" ? r.trim() : r;
2608
2703
  }
2609
2704
  }
2610
2705
  measureInstanceViewportBox(t, { transformPagePoint: n }) {
2611
- return zo(t, n);
2706
+ return Jo(t, n);
2612
2707
  }
2613
2708
  build(t, n, s) {
2614
2709
  Dt(t, n, s.transformTemplate);
2615
2710
  }
2616
2711
  scrapeMotionValuesFromProps(t, n, s) {
2617
- return kt(t, n, s);
2712
+ return It(t, n, s);
2618
2713
  }
2619
2714
  }
2620
- const ea = {
2715
+ const oa = {
2621
2716
  offset: "stroke-dashoffset",
2622
2717
  array: "stroke-dasharray"
2623
- }, ta = {
2718
+ }, aa = {
2624
2719
  offset: "strokeDashoffset",
2625
2720
  array: "strokeDasharray"
2626
2721
  };
2627
- function na(e, t, n = 1, s = 0, i = !0) {
2722
+ function ua(e, t, n = 1, s = 0, i = !0) {
2628
2723
  e.pathLength = 1;
2629
- const r = i ? ea : ta;
2724
+ const r = i ? oa : aa;
2630
2725
  e[r.offset] = `${-s}`, e[r.array] = `${t} ${n}`;
2631
2726
  }
2632
- const sa = [
2727
+ const ca = [
2633
2728
  "offsetDistance",
2634
2729
  "offsetPath",
2635
2730
  "offsetRotate",
@@ -2652,9 +2747,9 @@ function Rs(e, {
2652
2747
  e.attrs = e.style, e.style = {};
2653
2748
  const { attrs: d, style: f } = e;
2654
2749
  d.transform && (f.transform = d.transform, delete d.transform), (f.transform || d.transformOrigin) && (f.transformOrigin = d.transformOrigin ?? "50% 50%", delete d.transformOrigin), f.transform && (f.transformBox = (u == null ? void 0 : u.transformBox) ?? "fill-box", delete d.transformBox);
2655
- for (const h of sa)
2750
+ for (const h of ca)
2656
2751
  d[h] !== void 0 && (f[h] = d[h], delete d[h]);
2657
- t !== void 0 && (d.x = t), n !== void 0 && (d.y = n), s !== void 0 && (d.scale = s), i !== void 0 && na(d, i, r, o, !1);
2752
+ t !== void 0 && (d.x = t), n !== void 0 && (d.y = n), s !== void 0 && (d.scale = s), i !== void 0 && ua(d, i, r, o, !1);
2658
2753
  }
2659
2754
  const Ds = /* @__PURE__ */ new Set([
2660
2755
  "baseFrequency",
@@ -2680,49 +2775,49 @@ const Ds = /* @__PURE__ */ new Set([
2680
2775
  "startOffset",
2681
2776
  "textLength",
2682
2777
  "lengthAdjust"
2683
- ]), ks = (e) => typeof e == "string" && e.toLowerCase() === "svg";
2684
- function ia(e, t, n, s) {
2778
+ ]), Is = (e) => typeof e == "string" && e.toLowerCase() === "svg";
2779
+ function la(e, t, n, s) {
2685
2780
  Ps(e, t, void 0, s);
2686
2781
  for (const i in t.attrs)
2687
2782
  e.setAttribute(Ds.has(i) ? i : Ct(i), t.attrs[i]);
2688
2783
  }
2689
- function Is(e, t, n) {
2690
- const s = kt(e, t, n);
2784
+ function ks(e, t, n) {
2785
+ const s = It(e, t, n);
2691
2786
  for (const i in e)
2692
2787
  if (R(e[i]) || R(t[i])) {
2693
- const r = ae.indexOf(i) !== -1 ? "attr" + i.charAt(0).toUpperCase() + i.substring(1) : i;
2788
+ const r = ue.indexOf(i) !== -1 ? "attr" + i.charAt(0).toUpperCase() + i.substring(1) : i;
2694
2789
  s[r] = e[i];
2695
2790
  }
2696
2791
  return s;
2697
2792
  }
2698
- class ra extends Cs {
2793
+ class fa extends Cs {
2699
2794
  constructor() {
2700
- super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = Vs;
2795
+ super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = Ss;
2701
2796
  }
2702
2797
  getBaseTargetFromProps(t, n) {
2703
2798
  return t[n];
2704
2799
  }
2705
2800
  readValueFromInstance(t, n) {
2706
- if (ue.has(n)) {
2801
+ if (ce.has(n)) {
2707
2802
  const s = bs(n);
2708
2803
  return s && s.default || 0;
2709
2804
  }
2710
2805
  return n = Ds.has(n) ? n : Ct(n), t.getAttribute(n);
2711
2806
  }
2712
2807
  scrapeMotionValuesFromProps(t, n, s) {
2713
- return Is(t, n, s);
2808
+ return ks(t, n, s);
2714
2809
  }
2715
2810
  build(t, n, s) {
2716
2811
  Rs(t, n, this.isSVGTag, s.transformTemplate, s.style);
2717
2812
  }
2718
2813
  renderInstance(t, n, s, i) {
2719
- ia(t, n, s, i);
2814
+ la(t, n, s, i);
2720
2815
  }
2721
2816
  mount(t) {
2722
- this.isSVGTag = ks(t.tagName), super.mount(t);
2817
+ this.isSVGTag = Is(t.tagName), super.mount(t);
2723
2818
  }
2724
2819
  }
2725
- const oa = Rt.length;
2820
+ const da = Rt.length;
2726
2821
  function Os(e) {
2727
2822
  if (!e)
2728
2823
  return;
@@ -2731,9 +2826,9 @@ function Os(e) {
2731
2826
  return e.props.initial !== void 0 && (n.initial = e.props.initial), n;
2732
2827
  }
2733
2828
  const t = {};
2734
- for (let n = 0; n < oa; n++) {
2829
+ for (let n = 0; n < da; n++) {
2735
2830
  const s = Rt[n], i = e.props[s];
2736
- (me(i) || i === !1) && (t[s] = i);
2831
+ (ge(i) || i === !1) && (t[s] = i);
2737
2832
  }
2738
2833
  return t;
2739
2834
  }
@@ -2748,18 +2843,18 @@ function Es(e, t) {
2748
2843
  return !1;
2749
2844
  return !0;
2750
2845
  }
2751
- const aa = [...Ft].reverse(), ua = Ft.length;
2752
- function ca(e) {
2753
- return (t) => Promise.all(t.map(({ animation: n, options: s }) => lo(e, n, s)));
2846
+ const ha = [...Ft].reverse(), pa = Ft.length;
2847
+ function ma(e) {
2848
+ return (t) => Promise.all(t.map(({ animation: n, options: s }) => yo(e, n, s)));
2754
2849
  }
2755
- function la(e) {
2756
- let t = ca(e), n = fn(), s = !0;
2850
+ function ga(e) {
2851
+ let t = ma(e), n = fn(), s = !0;
2757
2852
  const i = (c) => (l, u) => {
2758
2853
  var f;
2759
2854
  const d = se(e, u, c === "exit" ? (f = e.presenceContext) == null ? void 0 : f.custom : void 0);
2760
2855
  if (d) {
2761
- const { transition: h, transitionEnd: p, ...b } = d;
2762
- l = { ...l, ...b, ...p };
2856
+ const { transition: h, transitionEnd: p, ...y } = d;
2857
+ l = { ...l, ...y, ...p };
2763
2858
  }
2764
2859
  return l;
2765
2860
  };
@@ -2769,53 +2864,53 @@ function la(e) {
2769
2864
  function o(c) {
2770
2865
  const { props: l } = e, u = Os(e.parent) || {}, d = [], f = /* @__PURE__ */ new Set();
2771
2866
  let h = {}, p = 1 / 0;
2772
- for (let y = 0; y < ua; y++) {
2773
- const g = aa[y], v = n[g], w = l[g] !== void 0 ? l[g] : u[g], V = me(w), T = g === c ? v.isActive : null;
2774
- T === !1 && (p = y);
2775
- let x = w === u[g] && w !== l[g] && V;
2776
- if (x && s && e.manuallyAnimateOnMount && (x = !1), v.protectedKeys = { ...h }, // If it isn't active and hasn't *just* been set as inactive
2777
- !v.isActive && T === null || // If we didn't and don't have any defined prop for this animation type
2778
- !w && !v.prevProp || // Or if the prop doesn't define an animation
2779
- Be(w) || typeof w == "boolean")
2867
+ for (let b = 0; b < pa; b++) {
2868
+ const g = ha[b], T = n[g], v = l[g] !== void 0 ? l[g] : u[g], S = ge(v), w = g === c ? T.isActive : null;
2869
+ w === !1 && (p = b);
2870
+ let x = v === u[g] && v !== l[g] && S;
2871
+ if (x && s && e.manuallyAnimateOnMount && (x = !1), T.protectedKeys = { ...h }, // If it isn't active and hasn't *just* been set as inactive
2872
+ !T.isActive && w === null || // If we didn't and don't have any defined prop for this animation type
2873
+ !v && !T.prevProp || // Or if the prop doesn't define an animation
2874
+ Be(v) || typeof v == "boolean")
2780
2875
  continue;
2781
- if (g === "exit" && v.isActive && T !== !0) {
2782
- v.prevResolvedValues && (h = {
2876
+ if (g === "exit" && T.isActive && w !== !0) {
2877
+ T.prevResolvedValues && (h = {
2783
2878
  ...h,
2784
- ...v.prevResolvedValues
2879
+ ...T.prevResolvedValues
2785
2880
  });
2786
2881
  continue;
2787
2882
  }
2788
- const C = fa(v.prevProp, w);
2789
- let S = C || // If we're making this variant active, we want to always make it active
2790
- g === c && v.isActive && !x && V || // If we removed a higher-priority variant (i is in reverse order)
2791
- y > p && V, D = !1;
2792
- const I = Array.isArray(w) ? w : [w];
2793
- let J = I.reduce(i(g), {});
2794
- T === !1 && (J = {});
2795
- const { prevResolvedValues: Bt = {} } = v, Zs = {
2883
+ const C = ya(T.prevProp, v);
2884
+ let V = C || // If we're making this variant active, we want to always make it active
2885
+ g === c && T.isActive && !x && S || // If we removed a higher-priority variant (i is in reverse order)
2886
+ b > p && S, D = !1;
2887
+ const k = Array.isArray(v) ? v : [v];
2888
+ let J = k.reduce(i(g), {});
2889
+ w === !1 && (J = {});
2890
+ const { prevResolvedValues: Bt = {} } = T, Js = {
2796
2891
  ...Bt,
2797
2892
  ...J
2798
2893
  }, Lt = (P) => {
2799
- S = !0, f.has(P) && (D = !0, f.delete(P)), v.needsAnimating[P] = !0;
2894
+ V = !0, f.has(P) && (D = !0, f.delete(P)), T.needsAnimating[P] = !0;
2800
2895
  const O = e.getValue(P);
2801
2896
  O && (O.liveStyle = !1);
2802
2897
  };
2803
- for (const P in Zs) {
2804
- const O = J[P], H = Bt[P];
2898
+ for (const P in Js) {
2899
+ const O = J[P], z = Bt[P];
2805
2900
  if (h.hasOwnProperty(P))
2806
2901
  continue;
2807
2902
  let Q = !1;
2808
- at(O) && at(H) ? Q = !Es(O, H) : Q = O !== H, Q ? O != null ? Lt(P) : f.add(P) : O !== void 0 && f.has(P) ? Lt(P) : v.protectedKeys[P] = !0;
2903
+ at(O) && at(z) ? Q = !Es(O, z) : Q = O !== z, Q ? O != null ? Lt(P) : f.add(P) : O !== void 0 && f.has(P) ? Lt(P) : T.protectedKeys[P] = !0;
2809
2904
  }
2810
- v.prevProp = w, v.prevResolvedValues = J, v.isActive && (h = { ...h, ...J }), s && e.blockInitialAnimation && (S = !1);
2905
+ T.prevProp = v, T.prevResolvedValues = J, T.isActive && (h = { ...h, ...J }), s && e.blockInitialAnimation && (V = !1);
2811
2906
  const Nt = x && C;
2812
- S && (!Nt || D) && d.push(...I.map((P) => {
2907
+ V && (!Nt || D) && d.push(...k.map((P) => {
2813
2908
  const O = { type: g };
2814
2909
  if (typeof P == "string" && s && !Nt && e.manuallyAnimateOnMount && e.parent) {
2815
- const { parent: H } = e, Q = se(H, P);
2816
- if (H.enteringChildren && Q) {
2817
- const { delayChildren: Js } = Q.transition || {};
2818
- O.delay = cs(H.enteringChildren, e, Js);
2910
+ const { parent: z } = e, Q = se(z, P);
2911
+ if (z.enteringChildren && Q) {
2912
+ const { delayChildren: Qs } = Q.transition || {};
2913
+ O.delay = cs(z.enteringChildren, e, Qs);
2819
2914
  }
2820
2915
  }
2821
2916
  return {
@@ -2825,18 +2920,18 @@ function la(e) {
2825
2920
  }));
2826
2921
  }
2827
2922
  if (f.size) {
2828
- const y = {};
2923
+ const b = {};
2829
2924
  if (typeof l.initial != "boolean") {
2830
2925
  const g = se(e, Array.isArray(l.initial) ? l.initial[0] : l.initial);
2831
- g && g.transition && (y.transition = g.transition);
2926
+ g && g.transition && (b.transition = g.transition);
2832
2927
  }
2833
2928
  f.forEach((g) => {
2834
- const v = e.getBaseTarget(g), w = e.getValue(g);
2835
- w && (w.liveStyle = !0), y[g] = v ?? null;
2836
- }), d.push({ animation: y });
2929
+ const T = e.getBaseTarget(g), v = e.getValue(g);
2930
+ v && (v.liveStyle = !0), b[g] = T ?? null;
2931
+ }), d.push({ animation: b });
2837
2932
  }
2838
- let b = !!d.length;
2839
- return s && (l.initial === !1 || l.initial === l.animate) && !e.manuallyAnimateOnMount && (b = !1), s = !1, b ? t(d) : Promise.resolve();
2933
+ let y = !!d.length;
2934
+ return s && (l.initial === !1 || l.initial === l.animate) && !e.manuallyAnimateOnMount && (y = !1), s = !1, y ? t(d) : Promise.resolve();
2840
2935
  }
2841
2936
  function a(c, l) {
2842
2937
  var d;
@@ -2861,10 +2956,10 @@ function la(e) {
2861
2956
  }
2862
2957
  };
2863
2958
  }
2864
- function fa(e, t) {
2959
+ function ya(e, t) {
2865
2960
  return typeof t == "string" ? t !== e : Array.isArray(t) ? !Es(t, e) : !1;
2866
2961
  }
2867
- function z(e = !1) {
2962
+ function U(e = !1) {
2868
2963
  return {
2869
2964
  isActive: e,
2870
2965
  protectedKeys: {},
@@ -2874,26 +2969,26 @@ function z(e = !1) {
2874
2969
  }
2875
2970
  function fn() {
2876
2971
  return {
2877
- animate: z(!0),
2878
- whileInView: z(),
2879
- whileHover: z(),
2880
- whileTap: z(),
2881
- whileDrag: z(),
2882
- whileFocus: z(),
2883
- exit: z()
2972
+ animate: U(!0),
2973
+ whileInView: U(),
2974
+ whileHover: U(),
2975
+ whileTap: U(),
2976
+ whileDrag: U(),
2977
+ whileFocus: U(),
2978
+ exit: U()
2884
2979
  };
2885
2980
  }
2886
2981
  function dn(e, t, n, s = { passive: !0 }) {
2887
2982
  return e.addEventListener(t, n, s), () => e.removeEventListener(t, n);
2888
2983
  }
2889
- function da(e) {
2984
+ function ba(e) {
2890
2985
  return R(e) ? e.get() : e;
2891
2986
  }
2892
- const Bs = ie({
2987
+ const Bs = re({
2893
2988
  transformPagePoint: (e) => e,
2894
2989
  isStatic: !1,
2895
2990
  reducedMotion: "never"
2896
- }), It = ie({ strict: !1 }), hn = {
2991
+ }), kt = re({ strict: !1 }), hn = {
2897
2992
  animation: [
2898
2993
  "animate",
2899
2994
  "variants",
@@ -2914,7 +3009,7 @@ const Bs = ie({
2914
3009
  layout: ["layout", "layoutId"]
2915
3010
  };
2916
3011
  let pn = !1;
2917
- function ha() {
3012
+ function va() {
2918
3013
  if (pn)
2919
3014
  return;
2920
3015
  const e = {};
@@ -2925,7 +3020,7 @@ function ha() {
2925
3020
  Ms(e), pn = !0;
2926
3021
  }
2927
3022
  function Ls() {
2928
- return ha(), jo();
3023
+ return va(), Yo();
2929
3024
  }
2930
3025
  function mn(e) {
2931
3026
  const t = Ls();
@@ -2936,8 +3031,8 @@ function mn(e) {
2936
3031
  };
2937
3032
  Ms(t);
2938
3033
  }
2939
- function pa({ children: e, features: t, strict: n = !1 }) {
2940
- const [, s] = ai(!He(t)), i = j(void 0);
3034
+ function wa({ children: e, features: t, strict: n = !1 }) {
3035
+ const [, s] = si(!He(t)), i = W(void 0);
2941
3036
  if (!He(t)) {
2942
3037
  const { renderer: r, ...o } = t;
2943
3038
  i.current = r, mn(o);
@@ -2946,12 +3041,12 @@ function pa({ children: e, features: t, strict: n = !1 }) {
2946
3041
  He(t) && t().then(({ renderer: r, ...o }) => {
2947
3042
  mn(o), i.current = r, s(!0);
2948
3043
  });
2949
- }, []), F(It.Provider, { value: { renderer: i.current, strict: n }, children: e });
3044
+ }, []), F(kt.Provider, { value: { renderer: i.current, strict: n }, children: e });
2950
3045
  }
2951
3046
  function He(e) {
2952
3047
  return typeof e == "function";
2953
3048
  }
2954
- const ma = /* @__PURE__ */ new Set([
3049
+ const Ta = /* @__PURE__ */ new Set([
2955
3050
  "animate",
2956
3051
  "exit",
2957
3052
  "variants",
@@ -2984,37 +3079,37 @@ const ma = /* @__PURE__ */ new Set([
2984
3079
  "ignoreStrict",
2985
3080
  "viewport"
2986
3081
  ]);
2987
- function Ie(e) {
2988
- return e.startsWith("while") || e.startsWith("drag") && e !== "draggable" || e.startsWith("layout") || e.startsWith("onTap") || e.startsWith("onPan") || e.startsWith("onLayout") || ma.has(e);
3082
+ function ke(e) {
3083
+ return e.startsWith("while") || e.startsWith("drag") && e !== "draggable" || e.startsWith("layout") || e.startsWith("onTap") || e.startsWith("onPan") || e.startsWith("onLayout") || Ta.has(e);
2989
3084
  }
2990
- let Ns = (e) => !Ie(e);
2991
- function ga(e) {
2992
- typeof e == "function" && (Ns = (t) => t.startsWith("on") ? !Ie(t) : e(t));
3085
+ let Ns = (e) => !ke(e);
3086
+ function Va(e) {
3087
+ typeof e == "function" && (Ns = (t) => t.startsWith("on") ? !ke(t) : e(t));
2993
3088
  }
2994
3089
  try {
2995
- ga(require("@emotion/is-prop-valid").default);
3090
+ Va(require("@emotion/is-prop-valid").default);
2996
3091
  } catch {
2997
3092
  }
2998
- function ya(e, t, n) {
3093
+ function Sa(e, t, n) {
2999
3094
  const s = {};
3000
3095
  for (const i in e)
3001
- i === "values" && typeof e.values == "object" || (Ns(i) || n === !0 && Ie(i) || !t && !Ie(i) || // If trying to use native HTML drag events, forward drag listeners
3096
+ i === "values" && typeof e.values == "object" || (Ns(i) || n === !0 && ke(i) || !t && !ke(i) || // If trying to use native HTML drag events, forward drag listeners
3002
3097
  e.draggable && i.startsWith("onDrag")) && (s[i] = e[i]);
3003
3098
  return s;
3004
3099
  }
3005
- const Ne = /* @__PURE__ */ ie({});
3006
- function ba(e, t) {
3100
+ const Ne = /* @__PURE__ */ re({});
3101
+ function xa(e, t) {
3007
3102
  if (Le(e)) {
3008
3103
  const { initial: n, animate: s } = e;
3009
3104
  return {
3010
- initial: n === !1 || me(n) ? n : void 0,
3011
- animate: me(s) ? s : void 0
3105
+ initial: n === !1 || ge(n) ? n : void 0,
3106
+ animate: ge(s) ? s : void 0
3012
3107
  };
3013
3108
  }
3014
3109
  return e.inherit !== !1 ? t : {};
3015
3110
  }
3016
- function wa(e) {
3017
- const { initial: t, animate: n } = ba(e, E(Ne));
3111
+ function Aa(e) {
3112
+ const { initial: t, animate: n } = xa(e, E(Ne));
3018
3113
  return Oe(() => ({ initial: t, animate: n }), [gn(t), gn(n)]);
3019
3114
  }
3020
3115
  function gn(e) {
@@ -3030,28 +3125,28 @@ function Ks(e, t, n) {
3030
3125
  for (const s in t)
3031
3126
  !R(t[s]) && !Fs(s, n) && (e[s] = t[s]);
3032
3127
  }
3033
- function Ta({ transformTemplate: e }, t) {
3128
+ function Ma({ transformTemplate: e }, t) {
3034
3129
  return Oe(() => {
3035
3130
  const n = Ot();
3036
3131
  return Dt(n, t, e), Object.assign({}, n.vars, n.style);
3037
3132
  }, [t]);
3038
3133
  }
3039
- function va(e, t) {
3134
+ function Ca(e, t) {
3040
3135
  const n = e.style || {}, s = {};
3041
- return Ks(s, n, e), Object.assign(s, Ta(e, t)), s;
3136
+ return Ks(s, n, e), Object.assign(s, Ma(e, t)), s;
3042
3137
  }
3043
- function Sa(e, t) {
3044
- const n = {}, s = va(e, t);
3138
+ function Pa(e, t) {
3139
+ const n = {}, s = Ca(e, t);
3045
3140
  return e.drag && e.dragListener !== !1 && (n.draggable = !1, s.userSelect = s.WebkitUserSelect = s.WebkitTouchCallout = "none", s.touchAction = e.drag === !0 ? "none" : `pan-${e.drag === "x" ? "y" : "x"}`), e.tabIndex === void 0 && (e.onTap || e.onTapStart || e.whileTap) && (n.tabIndex = 0), n.style = s, n;
3046
3141
  }
3047
3142
  const $s = () => ({
3048
3143
  ...Ot(),
3049
3144
  attrs: {}
3050
3145
  });
3051
- function Va(e, t, n, s) {
3146
+ function Fa(e, t, n, s) {
3052
3147
  const i = Oe(() => {
3053
3148
  const r = $s();
3054
- return Rs(r, t, ks(s), e.transformTemplate, e.style), {
3149
+ return Rs(r, t, Is(s), e.transformTemplate, e.style), {
3055
3150
  ...r.attrs,
3056
3151
  style: { ...r.style }
3057
3152
  };
@@ -3062,7 +3157,7 @@ function Va(e, t, n, s) {
3062
3157
  }
3063
3158
  return i;
3064
3159
  }
3065
- const xa = [
3160
+ const Ra = [
3066
3161
  "animate",
3067
3162
  "circle",
3068
3163
  "defs",
@@ -3102,30 +3197,30 @@ function Et(e) {
3102
3197
  /**
3103
3198
  * If it's in our list of lowercase SVG tags, it's an SVG component
3104
3199
  */
3105
- !!(xa.indexOf(e) > -1 || /**
3200
+ !!(Ra.indexOf(e) > -1 || /**
3106
3201
  * If it contains a capital letter, it's an SVG component
3107
3202
  */
3108
3203
  /[A-Z]/u.test(e))
3109
3204
  )
3110
3205
  );
3111
3206
  }
3112
- function Aa(e, t, n, { latestValues: s }, i, r = !1, o) {
3113
- const c = (o ?? Et(e) ? Va : Sa)(t, s, i, e), l = ya(t, typeof e == "string", r), u = e !== Sn ? { ...l, ...c, ref: n } : {}, { children: d } = t, f = Oe(() => R(d) ? d.get() : d, [d]);
3114
- return ui(e, {
3207
+ function Da(e, t, n, { latestValues: s }, i, r = !1, o) {
3208
+ const c = (o ?? Et(e) ? Fa : Pa)(t, s, i, e), l = Sa(t, typeof e == "string", r), u = e !== Tn ? { ...l, ...c, ref: n } : {}, { children: d } = t, f = Oe(() => R(d) ? d.get() : d, [d]);
3209
+ return ii(e, {
3115
3210
  ...u,
3116
3211
  children: f
3117
3212
  });
3118
3213
  }
3119
- function Ma({ scrapeMotionValuesFromProps: e, createRenderState: t }, n, s, i) {
3214
+ function Ia({ scrapeMotionValuesFromProps: e, createRenderState: t }, n, s, i) {
3120
3215
  return {
3121
- latestValues: Ca(n, s, i, e),
3216
+ latestValues: ka(n, s, i, e),
3122
3217
  renderState: t()
3123
3218
  };
3124
3219
  }
3125
- function Ca(e, t, n, s) {
3220
+ function ka(e, t, n, s) {
3126
3221
  const i = {}, r = s(e, {});
3127
3222
  for (const f in r)
3128
- i[f] = da(r[f]);
3223
+ i[f] = ba(r[f]);
3129
3224
  let { initial: o, animate: a } = e;
3130
3225
  const c = Le(e), l = xs(e);
3131
3226
  t && l && !c && e.inherit !== !1 && (o === void 0 && (o = t.initial), a === void 0 && (a = t.animate));
@@ -3137,39 +3232,39 @@ function Ca(e, t, n, s) {
3137
3232
  for (let h = 0; h < f.length; h++) {
3138
3233
  const p = Mt(e, f[h]);
3139
3234
  if (p) {
3140
- const { transitionEnd: b, transition: y, ...g } = p;
3141
- for (const v in g) {
3142
- let w = g[v];
3143
- if (Array.isArray(w)) {
3144
- const V = u ? w.length - 1 : 0;
3145
- w = w[V];
3235
+ const { transitionEnd: y, transition: b, ...g } = p;
3236
+ for (const T in g) {
3237
+ let v = g[T];
3238
+ if (Array.isArray(v)) {
3239
+ const S = u ? v.length - 1 : 0;
3240
+ v = v[S];
3146
3241
  }
3147
- w !== null && (i[v] = w);
3242
+ v !== null && (i[T] = v);
3148
3243
  }
3149
- for (const v in b)
3150
- i[v] = b[v];
3244
+ for (const T in y)
3245
+ i[T] = y[T];
3151
3246
  }
3152
3247
  }
3153
3248
  }
3154
3249
  return i;
3155
3250
  }
3156
- const Ws = (e) => (t, n) => {
3157
- const s = E(Ne), i = E(An), r = () => Ma(e, t, s, i);
3158
- return n ? r() : di(r);
3159
- }, Pa = /* @__PURE__ */ Ws({
3160
- scrapeMotionValuesFromProps: kt,
3251
+ const js = (e) => (t, n) => {
3252
+ const s = E(Ne), i = E(An), r = () => Ia(e, t, s, i);
3253
+ return n ? r() : bi(r);
3254
+ }, Oa = /* @__PURE__ */ js({
3255
+ scrapeMotionValuesFromProps: It,
3161
3256
  createRenderState: Ot
3162
- }), Fa = /* @__PURE__ */ Ws({
3163
- scrapeMotionValuesFromProps: Is,
3257
+ }), Ea = /* @__PURE__ */ js({
3258
+ scrapeMotionValuesFromProps: ks,
3164
3259
  createRenderState: $s
3165
- }), Ra = Symbol.for("motionComponentSymbol");
3166
- function Da(e, t, n) {
3167
- const s = j(n);
3260
+ }), Ba = Symbol.for("motionComponentSymbol");
3261
+ function La(e, t, n) {
3262
+ const s = W(n);
3168
3263
  Vn(() => {
3169
3264
  s.current = n;
3170
3265
  });
3171
- const i = j(null);
3172
- return ci((r) => {
3266
+ const i = W(null);
3267
+ return ri((r) => {
3173
3268
  var a;
3174
3269
  r && ((a = e.onMount) == null || a.call(e, r)), t && (r ? t.mount(r) : t.unmount());
3175
3270
  const o = s.current;
@@ -3181,13 +3276,13 @@ function Da(e, t, n) {
3181
3276
  else o && (o.current = r);
3182
3277
  }, [t]);
3183
3278
  }
3184
- const ka = ie({});
3185
- function Ia(e) {
3279
+ const Na = re({});
3280
+ function Ka(e) {
3186
3281
  return e && typeof e == "object" && Object.prototype.hasOwnProperty.call(e, "current");
3187
3282
  }
3188
- function Oa(e, t, n, s, i, r) {
3189
- var w, V;
3190
- const { visualElement: o } = E(Ne), a = E(It), c = E(An), l = E(Bs), u = l.reducedMotion, d = l.skipAnimations, f = j(null), h = j(!1);
3283
+ function $a(e, t, n, s, i, r) {
3284
+ var v, S;
3285
+ const { visualElement: o } = E(Ne), a = E(kt), c = E(An), l = E(Bs), u = l.reducedMotion, d = l.skipAnimations, f = W(null), h = W(!1);
3191
3286
  s = s || a.renderer, !f.current && s && (f.current = s(e, {
3192
3287
  visualState: t,
3193
3288
  parent: o,
@@ -3198,28 +3293,28 @@ function Oa(e, t, n, s, i, r) {
3198
3293
  skipAnimations: d,
3199
3294
  isSVG: r
3200
3295
  }), h.current && f.current && (f.current.manuallyAnimateOnMount = !0));
3201
- const p = f.current, b = E(ka);
3202
- p && !p.projection && i && (p.type === "html" || p.type === "svg") && Ea(f.current, n, i, b);
3203
- const y = j(!1);
3296
+ const p = f.current, y = E(Na);
3297
+ p && !p.projection && i && (p.type === "html" || p.type === "svg") && ja(f.current, n, i, y);
3298
+ const b = W(!1);
3204
3299
  Vn(() => {
3205
- p && y.current && p.update(n, c);
3300
+ p && b.current && p.update(n, c);
3206
3301
  });
3207
- const g = n[ps], v = j(!!g && !((w = window.MotionHandoffIsComplete) != null && w.call(window, g)) && ((V = window.MotionHasOptimisedAnimation) == null ? void 0 : V.call(window, g)));
3208
- return hi(() => {
3209
- h.current = !0, p && (y.current = !0, window.MotionIsMounted = !0, p.updateFeatures(), p.scheduleRenderMicrotask(), v.current && p.animationState && p.animationState.animateChanges());
3302
+ const g = n[ps], T = W(!!g && !((v = window.MotionHandoffIsComplete) != null && v.call(window, g)) && ((S = window.MotionHasOptimisedAnimation) == null ? void 0 : S.call(window, g)));
3303
+ return vi(() => {
3304
+ h.current = !0, p && (b.current = !0, window.MotionIsMounted = !0, p.updateFeatures(), p.scheduleRenderMicrotask(), T.current && p.animationState && p.animationState.animateChanges());
3210
3305
  }), pt(() => {
3211
- p && (!v.current && p.animationState && p.animationState.animateChanges(), v.current && (queueMicrotask(() => {
3212
- var T;
3213
- (T = window.MotionHandoffMarkAsComplete) == null || T.call(window, g);
3214
- }), v.current = !1), p.enteringChildren = void 0);
3306
+ p && (!T.current && p.animationState && p.animationState.animateChanges(), T.current && (queueMicrotask(() => {
3307
+ var w;
3308
+ (w = window.MotionHandoffMarkAsComplete) == null || w.call(window, g);
3309
+ }), T.current = !1), p.enteringChildren = void 0);
3215
3310
  }), p;
3216
3311
  }
3217
- function Ea(e, t, n, s) {
3312
+ function ja(e, t, n, s) {
3218
3313
  const { layoutId: i, layout: r, drag: o, dragConstraints: a, layoutScroll: c, layoutRoot: l, layoutCrossfade: u } = t;
3219
- e.projection = new n(e.latestValues, t["data-framer-portal-id"] ? void 0 : js(e.parent)), e.projection.setOptions({
3314
+ e.projection = new n(e.latestValues, t["data-framer-portal-id"] ? void 0 : Ws(e.parent)), e.projection.setOptions({
3220
3315
  layoutId: i,
3221
3316
  layout: r,
3222
- alwaysMeasureLayout: !!o || a && Ia(a),
3317
+ alwaysMeasureLayout: !!o || a && Ka(a),
3223
3318
  visualElement: e,
3224
3319
  /**
3225
3320
  * TODO: Update options in an effect. This could be tricky as it'll be too late
@@ -3235,38 +3330,38 @@ function Ea(e, t, n, s) {
3235
3330
  layoutRoot: l
3236
3331
  });
3237
3332
  }
3238
- function js(e) {
3333
+ function Ws(e) {
3239
3334
  if (e)
3240
- return e.options.allowProjection !== !1 ? e.projection : js(e.parent);
3335
+ return e.options.allowProjection !== !1 ? e.projection : Ws(e.parent);
3241
3336
  }
3242
- function Ba(e, { forwardMotionProps: t = !1, type: n } = {}, s, i) {
3243
- const r = n ? n === "svg" : Et(e), o = r ? Fa : Pa;
3337
+ function Wa(e, { forwardMotionProps: t = !1, type: n } = {}, s, i) {
3338
+ const r = n ? n === "svg" : Et(e), o = r ? Ea : Oa;
3244
3339
  function a(l, u) {
3245
3340
  let d;
3246
3341
  const f = {
3247
3342
  ...E(Bs),
3248
3343
  ...l,
3249
- layoutId: La(l)
3250
- }, { isStatic: h } = f, p = wa(l), b = o(l, h);
3344
+ layoutId: _a(l)
3345
+ }, { isStatic: h } = f, p = Aa(l), y = o(l, h);
3251
3346
  if (!h && xn) {
3252
- Na(f, s);
3253
- const y = Ka(f);
3254
- d = y.MeasureLayout, p.visualElement = Oa(e, b, f, i, y.ProjectionNode, r);
3347
+ Ga(f, s);
3348
+ const b = Ha(f);
3349
+ d = b.MeasureLayout, p.visualElement = $a(e, y, f, i, b.ProjectionNode, r);
3255
3350
  }
3256
- return ht(Ne.Provider, { value: p, children: [d && p.visualElement ? F(d, { visualElement: p.visualElement, ...f }) : null, Aa(e, l, Da(b, p.visualElement, u), b, h, t, r)] });
3351
+ return ht(Ne.Provider, { value: p, children: [d && p.visualElement ? F(d, { visualElement: p.visualElement, ...f }) : null, Da(e, l, La(y, p.visualElement, u), y, h, t, r)] });
3257
3352
  }
3258
3353
  a.displayName = `motion.${typeof e == "string" ? e : `create(${e.displayName ?? e.name ?? ""})`}`;
3259
- const c = li(a);
3260
- return c[Ra] = e, c;
3354
+ const c = oi(a);
3355
+ return c[Ba] = e, c;
3261
3356
  }
3262
- function La({ layoutId: e }) {
3263
- const t = E(fi).id;
3357
+ function _a({ layoutId: e }) {
3358
+ const t = E(yi).id;
3264
3359
  return t && e !== void 0 ? t + "-" + e : e;
3265
3360
  }
3266
- function Na(e, t) {
3267
- E(It).strict, process.env.NODE_ENV;
3361
+ function Ga(e, t) {
3362
+ E(kt).strict, process.env.NODE_ENV;
3268
3363
  }
3269
- function Ka(e) {
3364
+ function Ha(e) {
3270
3365
  const t = Ls(), { drag: n, layout: s } = t;
3271
3366
  if (!n && !s)
3272
3367
  return {};
@@ -3276,17 +3371,17 @@ function Ka(e) {
3276
3371
  ProjectionNode: i.ProjectionNode
3277
3372
  };
3278
3373
  }
3279
- const $a = (e, t) => t.isSVG ?? Et(e) ? new ra(t) : new Qo(t, {
3280
- allowProjection: e !== Sn
3374
+ const za = (e, t) => t.isSVG ?? Et(e) ? new fa(t) : new ra(t, {
3375
+ allowProjection: e !== Tn
3281
3376
  });
3282
- class Wa extends ce {
3377
+ class Ua extends le {
3283
3378
  /**
3284
3379
  * We dynamically generate the AnimationState manager as it contains a reference
3285
3380
  * to the underlying animation library. We only want to load that if we load this,
3286
3381
  * so people can optionally code split it out using the `m` component.
3287
3382
  */
3288
3383
  constructor(t) {
3289
- super(t), t.animationState || (t.animationState = la(t));
3384
+ super(t), t.animationState || (t.animationState = ga(t));
3290
3385
  }
3291
3386
  updateAnimationControlsSubscription() {
3292
3387
  const { animate: t } = this.node.getProps();
@@ -3307,10 +3402,10 @@ class Wa extends ce {
3307
3402
  this.node.animationState.reset(), (t = this.unmountControls) == null || t.call(this);
3308
3403
  }
3309
3404
  }
3310
- let ja = 0;
3311
- class _a extends ce {
3405
+ let Ya = 0;
3406
+ class Xa extends le {
3312
3407
  constructor() {
3313
- super(...arguments), this.id = ja++;
3408
+ super(...arguments), this.id = Ya++;
3314
3409
  }
3315
3410
  update() {
3316
3411
  if (!this.node.presenceContext)
@@ -3330,12 +3425,12 @@ class _a extends ce {
3330
3425
  unmount() {
3331
3426
  }
3332
3427
  }
3333
- const Ga = {
3428
+ const qa = {
3334
3429
  animation: {
3335
- Feature: Wa
3430
+ Feature: Ua
3336
3431
  },
3337
3432
  exit: {
3338
- Feature: _a
3433
+ Feature: Xa
3339
3434
  }
3340
3435
  };
3341
3436
  function _s(e) {
@@ -3352,15 +3447,15 @@ function yn(e, t, n) {
3352
3447
  const i = "onHover" + n, r = s[i];
3353
3448
  r && N.postRender(() => r(t, _s(t)));
3354
3449
  }
3355
- class Ha extends ce {
3450
+ class Za extends le {
3356
3451
  mount() {
3357
3452
  const { current: t } = this.node;
3358
- t && (this.unmount = Ro(t, (n, s) => (yn(this.node, s, "Start"), (i) => yn(this.node, i, "End"))));
3453
+ t && (this.unmount = Bo(t, (n, s) => (yn(this.node, s, "Start"), (i) => yn(this.node, i, "End"))));
3359
3454
  }
3360
3455
  unmount() {
3361
3456
  }
3362
3457
  }
3363
- class za extends ce {
3458
+ class Ja extends le {
3364
3459
  constructor() {
3365
3460
  super(...arguments), this.isActive = !1;
3366
3461
  }
@@ -3390,13 +3485,13 @@ function bn(e, t, n) {
3390
3485
  const i = "onTap" + (n === "End" ? "" : n), r = s[i];
3391
3486
  r && N.postRender(() => r(t, _s(t)));
3392
3487
  }
3393
- class Ua extends ce {
3488
+ class Qa extends le {
3394
3489
  mount() {
3395
3490
  const { current: t } = this.node;
3396
3491
  if (!t)
3397
3492
  return;
3398
3493
  const { globalTapTarget: n, propagate: s } = this.node.props;
3399
- this.unmount = Eo(t, (i, r) => (bn(this.node, r, "Start"), (o, { success: a }) => bn(this.node, o, a ? "End" : "Cancel")), {
3494
+ this.unmount = jo(t, (i, r) => (bn(this.node, r, "Start"), (o, { success: a }) => bn(this.node, o, a ? "End" : "Cancel")), {
3400
3495
  useGlobalTarget: n,
3401
3496
  stopPropagation: (s == null ? void 0 : s.tap) === !1
3402
3497
  });
@@ -3404,29 +3499,29 @@ class Ua extends ce {
3404
3499
  unmount() {
3405
3500
  }
3406
3501
  }
3407
- const dt = /* @__PURE__ */ new WeakMap(), ze = /* @__PURE__ */ new WeakMap(), Ya = (e) => {
3502
+ const dt = /* @__PURE__ */ new WeakMap(), ze = /* @__PURE__ */ new WeakMap(), eu = (e) => {
3408
3503
  const t = dt.get(e.target);
3409
3504
  t && t(e);
3410
- }, Xa = (e) => {
3411
- e.forEach(Ya);
3505
+ }, tu = (e) => {
3506
+ e.forEach(eu);
3412
3507
  };
3413
- function qa({ root: e, ...t }) {
3508
+ function nu({ root: e, ...t }) {
3414
3509
  const n = e || document;
3415
3510
  ze.has(n) || ze.set(n, {});
3416
3511
  const s = ze.get(n), i = JSON.stringify(t);
3417
- return s[i] || (s[i] = new IntersectionObserver(Xa, { root: e, ...t })), s[i];
3512
+ return s[i] || (s[i] = new IntersectionObserver(tu, { root: e, ...t })), s[i];
3418
3513
  }
3419
- function Za(e, t, n) {
3420
- const s = qa(t);
3514
+ function su(e, t, n) {
3515
+ const s = nu(t);
3421
3516
  return dt.set(e, n), s.observe(e), () => {
3422
3517
  dt.delete(e), s.unobserve(e);
3423
3518
  };
3424
3519
  }
3425
- const Ja = {
3520
+ const iu = {
3426
3521
  some: 0,
3427
3522
  all: 1
3428
3523
  };
3429
- class Qa extends ce {
3524
+ class ru extends le {
3430
3525
  constructor() {
3431
3526
  super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
3432
3527
  }
@@ -3435,7 +3530,7 @@ class Qa extends ce {
3435
3530
  const { viewport: t = {} } = this.node.getProps(), { root: n, margin: s, amount: i = "some", once: r } = t, o = {
3436
3531
  root: n ? n.current : void 0,
3437
3532
  rootMargin: s,
3438
- threshold: typeof i == "number" ? i : Ja[i]
3533
+ threshold: typeof i == "number" ? i : iu[i]
3439
3534
  }, a = (c) => {
3440
3535
  const { isIntersecting: l } = c;
3441
3536
  if (this.isInView === l || (this.isInView = l, r && !l && this.hasEnteredView))
@@ -3444,7 +3539,7 @@ class Qa extends ce {
3444
3539
  const { onViewportEnter: u, onViewportLeave: d } = this.node.getProps(), f = l ? u : d;
3445
3540
  f && f(c);
3446
3541
  };
3447
- return Za(this.node.current, o, a);
3542
+ return su(this.node.current, o, a);
3448
3543
  }
3449
3544
  mount() {
3450
3545
  this.startObserver();
@@ -3453,36 +3548,36 @@ class Qa extends ce {
3453
3548
  if (typeof IntersectionObserver > "u")
3454
3549
  return;
3455
3550
  const { props: t, prevProps: n } = this.node;
3456
- ["amount", "margin", "root"].some(eu(t, n)) && this.startObserver();
3551
+ ["amount", "margin", "root"].some(ou(t, n)) && this.startObserver();
3457
3552
  }
3458
3553
  unmount() {
3459
3554
  }
3460
3555
  }
3461
- function eu({ viewport: e = {} }, { viewport: t = {} } = {}) {
3556
+ function ou({ viewport: e = {} }, { viewport: t = {} } = {}) {
3462
3557
  return (n) => e[n] !== t[n];
3463
3558
  }
3464
- const tu = {
3559
+ const au = {
3465
3560
  inView: {
3466
- Feature: Qa
3561
+ Feature: ru
3467
3562
  },
3468
3563
  tap: {
3469
- Feature: Ua
3564
+ Feature: Qa
3470
3565
  },
3471
3566
  focus: {
3472
- Feature: za
3567
+ Feature: Ja
3473
3568
  },
3474
3569
  hover: {
3475
- Feature: Ha
3570
+ Feature: Za
3476
3571
  }
3477
- }, nu = {
3478
- renderer: $a,
3479
- ...Ga,
3480
- ...tu
3572
+ }, uu = {
3573
+ renderer: za,
3574
+ ...qa,
3575
+ ...au
3481
3576
  };
3482
- function su(e, t) {
3483
- return Ba(e, t);
3577
+ function cu(e, t) {
3578
+ return Wa(e, t);
3484
3579
  }
3485
- const wn = /* @__PURE__ */ su("span"), iu = {
3580
+ const vn = /* @__PURE__ */ cu("span"), lu = {
3486
3581
  Root: {
3487
3582
  0: {
3488
3583
  h: "5"
@@ -3496,16 +3591,16 @@ const wn = /* @__PURE__ */ su("span"), iu = {
3496
3591
  }
3497
3592
  }, Gs = {
3498
3593
  Root: {
3499
- 0: "1",
3500
- 1: "1_5",
3501
- 2: "2"
3594
+ 0: "1_5",
3595
+ 1: "2",
3596
+ 2: "2_5"
3502
3597
  },
3503
3598
  Text: {
3504
- 0: "1",
3505
- 1: "1_5",
3506
- 2: "2"
3599
+ 0: "1_5",
3600
+ 1: "2",
3601
+ 2: "2_5"
3507
3602
  }
3508
- }, Te = {
3603
+ }, ie = {
3509
3604
  Root: {
3510
3605
  solid: {
3511
3606
  default: "gray-12",
@@ -3518,14 +3613,26 @@ const wn = /* @__PURE__ */ su("span"), iu = {
3518
3613
  purple: "purple-9"
3519
3614
  },
3520
3615
  soft: {
3521
- default: "gray-3",
3522
- accent: "accent-3",
3523
- gray: "gray-3",
3524
- red: "red-3",
3525
- blue: "blue-3",
3526
- green: "green-3",
3527
- yellow: "yellow-3",
3528
- purple: "purple-3"
3616
+ default: "gray-2",
3617
+ accent: "accent-2",
3618
+ gray: "gray-2",
3619
+ red: "red-2",
3620
+ blue: "blue-2",
3621
+ green: "green-2",
3622
+ yellow: "yellow-2",
3623
+ purple: "purple-2"
3624
+ }
3625
+ },
3626
+ Border: {
3627
+ soft: {
3628
+ default: "gray-4",
3629
+ accent: "accent-4",
3630
+ gray: "gray-4",
3631
+ red: "red-4",
3632
+ blue: "blue-4",
3633
+ green: "green-4",
3634
+ yellow: "yellow-4",
3635
+ purple: "purple-4"
3529
3636
  }
3530
3637
  },
3531
3638
  Icon: {
@@ -3594,45 +3701,68 @@ const wn = /* @__PURE__ */ su("span"), iu = {
3594
3701
  purple: "purple"
3595
3702
  }
3596
3703
  }
3597
- }, ve = X.createContext({
3704
+ }, Hs = {
3705
+ Button: {
3706
+ solid: "solid",
3707
+ soft: "ghost"
3708
+ }
3709
+ }, fu = {
3710
+ tagBorderColor: {
3711
+ cssVar: "--box-shadow",
3712
+ value: "inset 0 0 0 1px var(--tgph-VARIABLE)"
3713
+ }
3714
+ }, Te = G.createContext({
3598
3715
  size: "1",
3599
3716
  color: "default",
3600
3717
  variant: "soft"
3601
- }), Hs = ({
3718
+ }), zs = ({
3602
3719
  as: e = "span",
3603
3720
  size: t = "1",
3604
3721
  color: n = "default",
3605
3722
  variant: s = "soft",
3606
3723
  className: i,
3607
- ...r
3608
- }) => /* @__PURE__ */ F(ve.Provider, { value: { size: t, color: n, variant: s }, children: /* @__PURE__ */ F(
3609
- ei,
3610
- {
3611
- as: e,
3612
- align: "center",
3613
- rounded: "1",
3614
- display: "inline-flex",
3615
- pl: Gs.Root[t],
3616
- backgroundColor: Te.Root[s][n],
3617
- h: iu.Root[t].h,
3618
- className: si("tgph-tag", i),
3619
- ...r,
3620
- "data-tag": !0
3621
- }
3622
- ) }), zs = ({
3724
+ style: r,
3725
+ ...o
3726
+ }) => {
3727
+ const { styleProp: a, otherProps: c } = gi({
3728
+ props: {
3729
+ ...s === "soft" ? { tagBorderColor: ie.Border.soft[n] } : {},
3730
+ style: r
3731
+ },
3732
+ cssVars: fu
3733
+ });
3734
+ return /* @__PURE__ */ F(Te.Provider, { value: { size: t, color: n, variant: s }, children: /* @__PURE__ */ F(
3735
+ ti,
3736
+ {
3737
+ as: e,
3738
+ align: "center",
3739
+ rounded: "full",
3740
+ overflow: "hidden",
3741
+ display: "inline-flex",
3742
+ pl: Gs.Root[t],
3743
+ backgroundColor: ie.Root[s][n],
3744
+ h: lu.Root[t].h,
3745
+ className: ci("tgph-tag", i),
3746
+ style: a,
3747
+ ...c,
3748
+ ...o,
3749
+ "data-tag": !0
3750
+ }
3751
+ ) });
3752
+ }, Us = ({
3623
3753
  as: e = "span",
3624
3754
  maxW: t = "40",
3625
3755
  overflow: n = "hidden",
3626
3756
  style: s,
3627
3757
  ...i
3628
3758
  }) => {
3629
- const r = X.useContext(ve);
3759
+ const r = G.useContext(Te);
3630
3760
  return /* @__PURE__ */ F(
3631
- ni,
3761
+ ui,
3632
3762
  {
3633
3763
  as: e,
3634
3764
  size: r.size,
3635
- color: Te.Text[r.variant][r.color],
3765
+ color: ie.Text[r.variant][r.color],
3636
3766
  weight: "medium",
3637
3767
  mr: Gs.Text[r.size],
3638
3768
  maxW: t,
@@ -3646,14 +3776,14 @@ const wn = /* @__PURE__ */ su("span"), iu = {
3646
3776
  ...i
3647
3777
  }
3648
3778
  );
3649
- }, Us = ({ onClick: e, textToCopy: t, ...n }) => {
3650
- const s = X.useContext(ve), [i, r] = X.useState(!1);
3651
- return X.useEffect(() => {
3779
+ }, Ys = ({ onClick: e, textToCopy: t, ...n }) => {
3780
+ const s = G.useContext(Te), [i, r] = G.useState(!1);
3781
+ return G.useEffect(() => {
3652
3782
  if (i) {
3653
3783
  const o = setTimeout(() => r(!1), 2e3);
3654
3784
  return () => clearTimeout(o);
3655
3785
  }
3656
- }, [i]), /* @__PURE__ */ F(pa, { features: nu, children: /* @__PURE__ */ F(ti, { label: "Copy text", children: /* @__PURE__ */ ht(
3786
+ }, [i]), /* @__PURE__ */ F(wa, { features: uu, children: /* @__PURE__ */ F(ai, { label: "Copy text", children: /* @__PURE__ */ ht(
3657
3787
  xe.Root,
3658
3788
  {
3659
3789
  onClick: (o) => {
@@ -3661,25 +3791,21 @@ const wn = /* @__PURE__ */ su("span"), iu = {
3661
3791
  e == null || e(o), r(!0), t && navigator.clipboard.writeText(t), (a = o.currentTarget) == null || a.blur();
3662
3792
  },
3663
3793
  size: s.size,
3664
- color: Te.Button[s.variant][s.color],
3665
- variant: s.variant,
3666
- roundedTopRight: "1",
3667
- roundedBottomRight: "1",
3668
- roundedTopLeft: "0",
3669
- roundedBottomLeft: "0",
3794
+ color: ie.Button[s.variant][s.color],
3795
+ variant: Hs.Button[s.variant],
3796
+ rounded: "0",
3670
3797
  position: "relative",
3671
3798
  overflow: "hidden",
3672
- p: "2",
3673
3799
  ...n,
3674
3800
  children: [
3675
3801
  /* @__PURE__ */ F(
3676
3802
  xe.Icon,
3677
3803
  {
3678
- as: wn,
3804
+ as: vn,
3679
3805
  initial: !1,
3680
3806
  animate: { y: i ? 0 : "150%", opacity: 1 },
3681
3807
  transition: { duration: 0.15, type: "spring", bounce: 0 },
3682
- icon: ii,
3808
+ icon: li,
3683
3809
  alt: "Copied text",
3684
3810
  "aria-hidden": !i
3685
3811
  }
@@ -3687,11 +3813,11 @@ const wn = /* @__PURE__ */ su("span"), iu = {
3687
3813
  /* @__PURE__ */ F(
3688
3814
  xe.Icon,
3689
3815
  {
3690
- as: wn,
3816
+ as: vn,
3691
3817
  initial: !1,
3692
3818
  animate: { y: i ? "-150%" : 0, opacity: 1 },
3693
3819
  transition: { duration: 0.15, type: "spring", bounce: 0 },
3694
- icon: ri,
3820
+ icon: fi,
3695
3821
  position: "absolute",
3696
3822
  alt: "Copy text",
3697
3823
  "aria-hidden": i
@@ -3700,41 +3826,38 @@ const wn = /* @__PURE__ */ su("span"), iu = {
3700
3826
  ]
3701
3827
  }
3702
3828
  ) }) });
3703
- }, Ys = ({ ...e }) => {
3704
- const t = X.useContext(ve);
3829
+ }, Xs = ({ ...e }) => {
3830
+ const t = G.useContext(Te);
3705
3831
  return /* @__PURE__ */ F(
3706
3832
  xe,
3707
3833
  {
3708
3834
  size: t.size,
3709
- color: Te.Button[t.variant][t.color],
3710
- variant: t.variant,
3711
- icon: { icon: vn, alt: "close" },
3712
- roundedTopRight: "1",
3713
- roundedBottomRight: "1",
3714
- roundedTopLeft: "0",
3715
- roundedBottomLeft: "0",
3835
+ color: ie.Button[t.variant][t.color],
3836
+ variant: Hs.Button[t.variant],
3837
+ icon: { icon: Sn, alt: "close" },
3838
+ rounded: "0",
3716
3839
  ...e
3717
3840
  }
3718
3841
  );
3719
- }, Xs = ({
3842
+ }, qs = ({
3720
3843
  icon: e,
3721
3844
  alt: t,
3722
3845
  "aria-hidden": n,
3723
3846
  ...s
3724
3847
  }) => {
3725
- const i = X.useContext(ve), r = t ? { alt: t } : { "aria-hidden": n };
3848
+ const i = G.useContext(Te), r = t ? { alt: t } : { "aria-hidden": n };
3726
3849
  return /* @__PURE__ */ F(
3727
- Qs,
3850
+ ei,
3728
3851
  {
3729
3852
  icon: e,
3730
3853
  size: i.size,
3731
- color: Te.Icon[i.variant][i.color],
3854
+ color: ie.Icon[i.variant][i.color],
3732
3855
  mr: "1",
3733
3856
  ...r,
3734
3857
  ...s
3735
3858
  }
3736
3859
  );
3737
- }, qs = ({
3860
+ }, Zs = ({
3738
3861
  color: e = "default",
3739
3862
  size: t = "1",
3740
3863
  variant: n = "soft",
@@ -3745,21 +3868,27 @@ const wn = /* @__PURE__ */ su("span"), iu = {
3745
3868
  textProps: a = { maxW: "40" },
3746
3869
  children: c,
3747
3870
  ...l
3748
- }) => /* @__PURE__ */ ht(Hs, { color: e, size: t, variant: n, ...l, children: [
3749
- s && /* @__PURE__ */ F(Xs, { ...s }),
3750
- /* @__PURE__ */ F(zs, { as: "span", ...a, children: c }),
3751
- i && /* @__PURE__ */ F(Ys, { onClick: i, icon: { icon: vn, alt: "Remove" } }),
3752
- r && /* @__PURE__ */ F(Us, { onClick: r, textToCopy: o })
3753
- ] });
3754
- Object.assign(qs, {
3755
- Root: Hs,
3756
- Button: Ys,
3757
- Text: zs,
3758
- Icon: Xs,
3759
- CopyButton: Us
3871
+ }) => {
3872
+ const d = {
3873
+ ...a,
3874
+ ...!!(i || r) ? { mr: "0" } : {}
3875
+ };
3876
+ return /* @__PURE__ */ ht(zs, { color: e, size: t, variant: n, ...l, children: [
3877
+ s && /* @__PURE__ */ F(qs, { ...s }),
3878
+ /* @__PURE__ */ F(Us, { as: "span", ...d, children: c }),
3879
+ i && /* @__PURE__ */ F(Xs, { onClick: i, icon: { icon: Sn, alt: "Remove" } }),
3880
+ r && /* @__PURE__ */ F(Ys, { onClick: r, textToCopy: o })
3881
+ ] });
3882
+ };
3883
+ Object.assign(Zs, {
3884
+ Root: zs,
3885
+ Button: Xs,
3886
+ Text: Us,
3887
+ Icon: qs,
3888
+ CopyButton: Ys
3760
3889
  });
3761
- const mu = qs;
3890
+ const Vu = Zs;
3762
3891
  export {
3763
- mu as Tag
3892
+ Vu as Tag
3764
3893
  };
3765
3894
  //# sourceMappingURL=index.mjs.map