kss-modern 0.0.21 → 0.0.23

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,33 +1,33 @@
1
- function Ps(e, t) {
1
+ function ks(e, t) {
2
2
  e.indexOf(t) === -1 && e.push(t);
3
3
  }
4
- function bn(e, t) {
4
+ function hn(e, t) {
5
5
  const n = e.indexOf(t);
6
6
  n > -1 && e.splice(n, 1);
7
7
  }
8
- const U = (e, t, n) => n > t ? t : n < e ? e : n;
9
- let st = () => {
8
+ const _ = (e, t, n) => n > t ? t : n < e ? e : n;
9
+ let et = () => {
10
10
  };
11
- const N = {}, wn = (e) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);
12
- function Os(e) {
11
+ const R = {}, mn = (e) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);
12
+ function Cs(e) {
13
13
  return typeof e == "object" && e !== null;
14
14
  }
15
- const Tn = (e) => /^0[^.\s]+$/u.test(e);
15
+ const pn = (e) => /^0[^.\s]+$/u.test(e);
16
16
  // @__NO_SIDE_EFFECTS__
17
- function rt(e) {
17
+ function tt(e) {
18
18
  let t;
19
19
  return () => (t === void 0 && (t = e()), t);
20
20
  }
21
- const Z = /* @__NO_SIDE_EFFECTS__ */ (e) => e, Rs = (e, t) => (n) => t(e(n)), it = (...e) => e.reduce(Rs), ot = /* @__NO_SIDE_EFFECTS__ */ (e, t, n) => {
21
+ const Z = /* @__NO_SIDE_EFFECTS__ */ (e) => e, Ds = (e, t) => (n) => t(e(n)), nt = (...e) => e.reduce(Ds), st = /* @__NO_SIDE_EFFECTS__ */ (e, t, n) => {
22
22
  const s = t - e;
23
23
  return s === 0 ? 1 : (n - e) / s;
24
24
  };
25
- class vn {
25
+ class gn {
26
26
  constructor() {
27
27
  this.subscriptions = [];
28
28
  }
29
29
  add(t) {
30
- return Ps(this.subscriptions, t), () => bn(this.subscriptions, t);
30
+ return ks(this.subscriptions, t), () => hn(this.subscriptions, t);
31
31
  }
32
32
  notify(t, n, s) {
33
33
  const r = this.subscriptions.length;
@@ -47,50 +47,50 @@ class vn {
47
47
  this.subscriptions.length = 0;
48
48
  }
49
49
  }
50
- const O = /* @__NO_SIDE_EFFECTS__ */ (e) => e * 1e3, F = /* @__NO_SIDE_EFFECTS__ */ (e) => e / 1e3;
51
- function An(e, t) {
50
+ const P = /* @__NO_SIDE_EFFECTS__ */ (e) => e * 1e3, I = /* @__NO_SIDE_EFFECTS__ */ (e) => e / 1e3;
51
+ function yn(e, t) {
52
52
  return t ? e * (1e3 / t) : 0;
53
53
  }
54
- const Ns = (e, t, n) => {
54
+ const Fs = (e, t, n) => {
55
55
  const s = t - e;
56
56
  return ((n - e) % s + s) % s + e;
57
- }, Sn = (e, t, n) => (((1 - 3 * n + 3 * t) * e + (3 * n - 6 * t)) * e + 3 * t) * e, Ks = 1e-7, Bs = 12;
58
- function qs(e, t, n, s, r) {
57
+ }, bn = (e, t, n) => (((1 - 3 * n + 3 * t) * e + (3 * n - 6 * t)) * e + 3 * t) * e, Ls = 1e-7, Is = 12;
58
+ function Os(e, t, n, s, r) {
59
59
  let i, o, a = 0;
60
60
  do
61
- o = t + (n - t) / 2, i = Sn(o, s, r) - e, i > 0 ? n = o : t = o;
62
- while (Math.abs(i) > Ks && ++a < Bs);
61
+ o = t + (n - t) / 2, i = bn(o, s, r) - e, i > 0 ? n = o : t = o;
62
+ while (Math.abs(i) > Ls && ++a < Is);
63
63
  return o;
64
64
  }
65
65
  function he(e, t, n, s) {
66
66
  if (e === t && n === s)
67
67
  return Z;
68
- const r = (i) => qs(i, 0, 1, e, n);
69
- return (i) => i === 0 || i === 1 ? i : Sn(r(i), t, s);
68
+ const r = (i) => Os(i, 0, 1, e, n);
69
+ return (i) => i === 0 || i === 1 ? i : bn(r(i), t, s);
70
70
  }
71
- const xn = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, En = (e) => (t) => 1 - e(1 - t), Vn = /* @__PURE__ */ he(0.33, 1.53, 0.69, 0.99), at = /* @__PURE__ */ En(Vn), Mn = /* @__PURE__ */ xn(at), kn = (e) => (e *= 2) < 1 ? 0.5 * at(e) : 0.5 * (2 - Math.pow(2, -10 * (e - 1))), lt = (e) => 1 - Math.sin(Math.acos(e)), $s = En(lt), Cn = xn(lt), Hs = /* @__PURE__ */ he(0.42, 0, 1, 1), Ws = /* @__PURE__ */ he(0, 0, 0.58, 1), Dn = /* @__PURE__ */ he(0.42, 0, 0.58, 1), In = (e) => Array.isArray(e) && typeof e[0] != "number";
72
- function Ln(e, t) {
73
- return In(e) ? e[Ns(0, e.length, t)] : e;
71
+ const wn = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, Tn = (e) => (t) => 1 - e(1 - t), An = /* @__PURE__ */ he(0.33, 1.53, 0.69, 0.99), rt = /* @__PURE__ */ Tn(An), vn = /* @__PURE__ */ wn(rt), Sn = (e) => (e *= 2) < 1 ? 0.5 * rt(e) : 0.5 * (2 - Math.pow(2, -10 * (e - 1))), it = (e) => 1 - Math.sin(Math.acos(e)), Ps = Tn(it), xn = wn(it), Ns = /* @__PURE__ */ he(0.42, 0, 1, 1), Rs = /* @__PURE__ */ he(0, 0, 0.58, 1), En = /* @__PURE__ */ he(0.42, 0, 0.58, 1), Vn = (e) => Array.isArray(e) && typeof e[0] != "number";
72
+ function Mn(e, t) {
73
+ return Vn(e) ? e[Fs(0, e.length, t)] : e;
74
74
  }
75
- const Fn = (e) => Array.isArray(e) && typeof e[0] == "number", _s = {
75
+ const kn = (e) => Array.isArray(e) && typeof e[0] == "number", Ks = {
76
76
  linear: Z,
77
- easeIn: Hs,
78
- easeInOut: Dn,
79
- easeOut: Ws,
80
- circIn: lt,
81
- circInOut: Cn,
82
- circOut: $s,
83
- backIn: at,
84
- backInOut: Mn,
85
- backOut: Vn,
86
- anticipate: kn
87
- }, Us = (e) => typeof e == "string", Dt = (e) => {
88
- if (Fn(e)) {
89
- st(e.length === 4);
77
+ easeIn: Ns,
78
+ easeInOut: En,
79
+ easeOut: Rs,
80
+ circIn: it,
81
+ circInOut: xn,
82
+ circOut: Ps,
83
+ backIn: rt,
84
+ backInOut: vn,
85
+ backOut: An,
86
+ anticipate: Sn
87
+ }, Bs = (e) => typeof e == "string", Mt = (e) => {
88
+ if (kn(e)) {
89
+ et(e.length === 4);
90
90
  const [t, n, s, r] = e;
91
91
  return he(t, n, s, r);
92
- } else if (Us(e))
93
- return _s[e];
92
+ } else if (Bs(e))
93
+ return Ks[e];
94
94
  return e;
95
95
  }, we = [
96
96
  "setup",
@@ -110,7 +110,7 @@ const Fn = (e) => Array.isArray(e) && typeof e[0] == "number", _s = {
110
110
  "postRender"
111
111
  // Compute
112
112
  ];
113
- function js(e, t) {
113
+ function $s(e, t) {
114
114
  let n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), r = !1, i = !1;
115
115
  const o = /* @__PURE__ */ new WeakSet();
116
116
  let a = {
@@ -118,100 +118,100 @@ function js(e, t) {
118
118
  timestamp: 0,
119
119
  isProcessing: !1
120
120
  };
121
- function l(c) {
122
- o.has(c) && (f.schedule(c), e()), c(a);
121
+ function l(u) {
122
+ o.has(u) && (c.schedule(u), e()), u(a);
123
123
  }
124
- const f = {
124
+ const c = {
125
125
  /**
126
126
  * Schedule a process to run on the next frame.
127
127
  */
128
- schedule: (c, u = !1, d = !1) => {
128
+ schedule: (u, f = !1, d = !1) => {
129
129
  const m = d && r ? n : s;
130
- return u && o.add(c), m.has(c) || m.add(c), c;
130
+ return f && o.add(u), m.has(u) || m.add(u), u;
131
131
  },
132
132
  /**
133
133
  * Cancel the provided callback from running on the next frame.
134
134
  */
135
- cancel: (c) => {
136
- s.delete(c), o.delete(c);
135
+ cancel: (u) => {
136
+ s.delete(u), o.delete(u);
137
137
  },
138
138
  /**
139
139
  * Execute all schedule callbacks.
140
140
  */
141
- process: (c) => {
142
- if (a = c, r) {
141
+ process: (u) => {
142
+ if (a = u, r) {
143
143
  i = !0;
144
144
  return;
145
145
  }
146
- r = !0, [n, s] = [s, n], n.forEach(l), n.clear(), r = !1, i && (i = !1, f.process(c));
146
+ r = !0, [n, s] = [s, n], n.forEach(l), n.clear(), r = !1, i && (i = !1, c.process(u));
147
147
  }
148
148
  };
149
- return f;
149
+ return c;
150
150
  }
151
- const Gs = 40;
152
- function Pn(e, t) {
151
+ const qs = 40;
152
+ function Cn(e, t) {
153
153
  let n = !1, s = !0;
154
154
  const r = {
155
155
  delta: 0,
156
156
  timestamp: 0,
157
157
  isProcessing: !1
158
- }, i = () => n = !0, o = we.reduce((v, S) => (v[S] = js(i), v), {}), { setup: a, read: l, resolveKeyframes: f, preUpdate: c, update: u, preRender: d, render: h, postRender: m } = o, y = () => {
159
- const v = N.useManualTiming ? r.timestamp : performance.now();
160
- n = !1, N.useManualTiming || (r.delta = s ? 1e3 / 60 : Math.max(Math.min(v - r.timestamp, Gs), 1)), r.timestamp = v, r.isProcessing = !0, a.process(r), l.process(r), f.process(r), c.process(r), u.process(r), d.process(r), h.process(r), m.process(r), r.isProcessing = !1, n && t && (s = !1, e(y));
158
+ }, i = () => n = !0, o = we.reduce((A, S) => (A[S] = $s(i), A), {}), { setup: a, read: l, resolveKeyframes: c, preUpdate: u, update: f, preRender: d, render: h, postRender: m } = o, y = () => {
159
+ const A = R.useManualTiming ? r.timestamp : performance.now();
160
+ n = !1, R.useManualTiming || (r.delta = s ? 1e3 / 60 : Math.max(Math.min(A - r.timestamp, qs), 1)), r.timestamp = A, r.isProcessing = !0, a.process(r), l.process(r), c.process(r), u.process(r), f.process(r), d.process(r), h.process(r), m.process(r), r.isProcessing = !1, n && t && (s = !1, e(y));
161
161
  }, T = () => {
162
162
  n = !0, s = !0, r.isProcessing || e(y);
163
163
  };
164
- return { schedule: we.reduce((v, S) => {
164
+ return { schedule: we.reduce((A, S) => {
165
165
  const g = o[S];
166
- return v[S] = (A, V = !1, w = !1) => (n || T(), g.schedule(A, V, w)), v;
167
- }, {}), cancel: (v) => {
166
+ return A[S] = (v, V = !1, w = !1) => (n || T(), g.schedule(v, V, w)), A;
167
+ }, {}), cancel: (A) => {
168
168
  for (let S = 0; S < we.length; S++)
169
- o[we[S]].cancel(v);
169
+ o[we[S]].cancel(A);
170
170
  }, state: r, steps: o };
171
171
  }
172
- const { schedule: K, cancel: $e, state: Me } = /* @__PURE__ */ Pn(typeof requestAnimationFrame < "u" ? requestAnimationFrame : Z, !0);
173
- let Ve;
174
- function zs() {
175
- Ve = void 0;
172
+ const { schedule: K, cancel: Ke, state: Ve } = /* @__PURE__ */ Cn(typeof requestAnimationFrame < "u" ? requestAnimationFrame : Z, !0);
173
+ let Ee;
174
+ function Ws() {
175
+ Ee = void 0;
176
176
  }
177
- const I = {
178
- now: () => (Ve === void 0 && I.set(Me.isProcessing || N.useManualTiming ? Me.timestamp : performance.now()), Ve),
177
+ const F = {
178
+ now: () => (Ee === void 0 && F.set(Ve.isProcessing || R.useManualTiming ? Ve.timestamp : performance.now()), Ee),
179
179
  set: (e) => {
180
- Ve = e, queueMicrotask(zs);
180
+ Ee = e, queueMicrotask(Ws);
181
181
  }
182
- }, On = (e) => (t) => typeof t == "string" && t.startsWith(e), Rn = /* @__PURE__ */ On("--"), Ys = /* @__PURE__ */ On("var(--"), ct = (e) => Ys(e) ? Xs.test(e.split("/*")[0].trim()) : !1, Xs = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, J = {
182
+ }, Dn = (e) => (t) => typeof t == "string" && t.startsWith(e), Fn = /* @__PURE__ */ Dn("--"), Hs = /* @__PURE__ */ Dn("var(--"), ot = (e) => Hs(e) ? Us.test(e.split("/*")[0].trim()) : !1, Us = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, J = {
183
183
  test: (e) => typeof e == "number",
184
184
  parse: parseFloat,
185
185
  transform: (e) => e
186
- }, ce = {
186
+ }, ue = {
187
187
  ...J,
188
- transform: (e) => U(0, 1, e)
188
+ transform: (e) => _(0, 1, e)
189
189
  }, Te = {
190
190
  ...J,
191
191
  default: 1
192
- }, ae = (e) => Math.round(e * 1e5) / 1e5, ut = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
193
- function Zs(e) {
192
+ }, ae = (e) => Math.round(e * 1e5) / 1e5, at = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
193
+ function _s(e) {
194
194
  return e == null;
195
195
  }
196
- const Js = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, ft = (e, t) => (n) => !!(typeof n == "string" && Js.test(n) && n.startsWith(e) || t && !Zs(n) && Object.prototype.hasOwnProperty.call(n, t)), Nn = (e, t, n) => (s) => {
196
+ const js = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, lt = (e, t) => (n) => !!(typeof n == "string" && js.test(n) && n.startsWith(e) || t && !_s(n) && Object.prototype.hasOwnProperty.call(n, t)), Ln = (e, t, n) => (s) => {
197
197
  if (typeof s != "string")
198
198
  return s;
199
- const [r, i, o, a] = s.match(ut);
199
+ const [r, i, o, a] = s.match(at);
200
200
  return {
201
201
  [e]: parseFloat(r),
202
202
  [t]: parseFloat(i),
203
203
  [n]: parseFloat(o),
204
204
  alpha: a !== void 0 ? parseFloat(a) : 1
205
205
  };
206
- }, Qs = (e) => U(0, 255, e), Ie = {
206
+ }, Gs = (e) => _(0, 255, e), De = {
207
207
  ...J,
208
- transform: (e) => Math.round(Qs(e))
209
- }, $ = {
210
- test: /* @__PURE__ */ ft("rgb", "red"),
211
- parse: /* @__PURE__ */ Nn("red", "green", "blue"),
212
- transform: ({ red: e, green: t, blue: n, alpha: s = 1 }) => "rgba(" + Ie.transform(e) + ", " + Ie.transform(t) + ", " + Ie.transform(n) + ", " + ae(ce.transform(s)) + ")"
208
+ transform: (e) => Math.round(Gs(e))
209
+ }, q = {
210
+ test: /* @__PURE__ */ lt("rgb", "red"),
211
+ parse: /* @__PURE__ */ Ln("red", "green", "blue"),
212
+ transform: ({ red: e, green: t, blue: n, alpha: s = 1 }) => "rgba(" + De.transform(e) + ", " + De.transform(t) + ", " + De.transform(n) + ", " + ae(ue.transform(s)) + ")"
213
213
  };
214
- function er(e) {
214
+ function zs(e) {
215
215
  let t = "", n = "", s = "", r = "";
216
216
  return e.length > 5 ? (t = e.substring(1, 3), n = e.substring(3, 5), s = e.substring(5, 7), r = e.substring(7, 9)) : (t = e.substring(1, 2), n = e.substring(2, 3), s = e.substring(3, 4), r = e.substring(4, 5), t += t, n += n, s += s, r += r), {
217
217
  red: parseInt(t, 16),
@@ -220,82 +220,82 @@ function er(e) {
220
220
  alpha: r ? parseInt(r, 16) / 255 : 1
221
221
  };
222
222
  }
223
- const He = {
224
- test: /* @__PURE__ */ ft("#"),
225
- parse: er,
226
- transform: $.transform
223
+ const Be = {
224
+ test: /* @__PURE__ */ lt("#"),
225
+ parse: zs,
226
+ transform: q.transform
227
227
  }, me = /* @__NO_SIDE_EFFECTS__ */ (e) => ({
228
228
  test: (t) => typeof t == "string" && t.endsWith(e) && t.split(" ").length === 1,
229
229
  parse: parseFloat,
230
230
  transform: (t) => `${t}${e}`
231
- }), q = /* @__PURE__ */ me("deg"), z = /* @__PURE__ */ me("%"), p = /* @__PURE__ */ me("px"), tr = /* @__PURE__ */ me("vh"), nr = /* @__PURE__ */ me("vw"), It = {
231
+ }), $ = /* @__PURE__ */ me("deg"), z = /* @__PURE__ */ me("%"), p = /* @__PURE__ */ me("px"), Ys = /* @__PURE__ */ me("vh"), Xs = /* @__PURE__ */ me("vw"), kt = {
232
232
  ...z,
233
233
  parse: (e) => z.parse(e) / 100,
234
234
  transform: (e) => z.transform(e * 100)
235
235
  }, G = {
236
- test: /* @__PURE__ */ ft("hsl", "hue"),
237
- parse: /* @__PURE__ */ Nn("hue", "saturation", "lightness"),
238
- transform: ({ hue: e, saturation: t, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(e) + ", " + z.transform(ae(t)) + ", " + z.transform(ae(n)) + ", " + ae(ce.transform(s)) + ")"
236
+ test: /* @__PURE__ */ lt("hsl", "hue"),
237
+ parse: /* @__PURE__ */ Ln("hue", "saturation", "lightness"),
238
+ transform: ({ hue: e, saturation: t, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(e) + ", " + z.transform(ae(t)) + ", " + z.transform(ae(n)) + ", " + ae(ue.transform(s)) + ")"
239
239
  }, k = {
240
- test: (e) => $.test(e) || He.test(e) || G.test(e),
241
- parse: (e) => $.test(e) ? $.parse(e) : G.test(e) ? G.parse(e) : He.parse(e),
242
- transform: (e) => typeof e == "string" ? e : e.hasOwnProperty("red") ? $.transform(e) : G.transform(e),
240
+ test: (e) => q.test(e) || Be.test(e) || G.test(e),
241
+ parse: (e) => q.test(e) ? q.parse(e) : G.test(e) ? G.parse(e) : Be.parse(e),
242
+ transform: (e) => typeof e == "string" ? e : e.hasOwnProperty("red") ? q.transform(e) : G.transform(e),
243
243
  getAnimatableNone: (e) => {
244
244
  const t = k.parse(e);
245
245
  return t.alpha = 0, k.transform(t);
246
246
  }
247
- }, sr = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
248
- function rr(e) {
249
- return isNaN(e) && typeof e == "string" && (e.match(ut)?.length || 0) + (e.match(sr)?.length || 0) > 0;
247
+ }, Zs = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
248
+ function Js(e) {
249
+ return isNaN(e) && typeof e == "string" && (e.match(at)?.length || 0) + (e.match(Zs)?.length || 0) > 0;
250
250
  }
251
- const Kn = "number", Bn = "color", ir = "var", or = "var(", Lt = "${}", ar = /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;
252
- function ue(e) {
251
+ const In = "number", On = "color", Qs = "var", er = "var(", Ct = "${}", tr = /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;
252
+ function ce(e) {
253
253
  const t = e.toString(), n = [], s = {
254
254
  color: [],
255
255
  number: [],
256
256
  var: []
257
257
  }, r = [];
258
258
  let i = 0;
259
- const a = t.replace(ar, (l) => (k.test(l) ? (s.color.push(i), r.push(Bn), n.push(k.parse(l))) : l.startsWith(or) ? (s.var.push(i), r.push(ir), n.push(l)) : (s.number.push(i), r.push(Kn), n.push(parseFloat(l))), ++i, Lt)).split(Lt);
259
+ const a = t.replace(tr, (l) => (k.test(l) ? (s.color.push(i), r.push(On), n.push(k.parse(l))) : l.startsWith(er) ? (s.var.push(i), r.push(Qs), n.push(l)) : (s.number.push(i), r.push(In), n.push(parseFloat(l))), ++i, Ct)).split(Ct);
260
260
  return { values: n, split: a, indexes: s, types: r };
261
261
  }
262
- function qn(e) {
263
- return ue(e).values;
262
+ function Pn(e) {
263
+ return ce(e).values;
264
264
  }
265
- function $n(e) {
266
- const { split: t, types: n } = ue(e), s = t.length;
265
+ function Nn(e) {
266
+ const { split: t, types: n } = ce(e), s = t.length;
267
267
  return (r) => {
268
268
  let i = "";
269
269
  for (let o = 0; o < s; o++)
270
270
  if (i += t[o], r[o] !== void 0) {
271
271
  const a = n[o];
272
- a === Kn ? i += ae(r[o]) : a === Bn ? i += k.transform(r[o]) : i += r[o];
272
+ a === In ? i += ae(r[o]) : a === On ? i += k.transform(r[o]) : i += r[o];
273
273
  }
274
274
  return i;
275
275
  };
276
276
  }
277
- const lr = (e) => typeof e == "number" ? 0 : k.test(e) ? k.getAnimatableNone(e) : e;
278
- function cr(e) {
279
- const t = qn(e);
280
- return $n(e)(t.map(lr));
277
+ const nr = (e) => typeof e == "number" ? 0 : k.test(e) ? k.getAnimatableNone(e) : e;
278
+ function sr(e) {
279
+ const t = Pn(e);
280
+ return Nn(e)(t.map(nr));
281
281
  }
282
282
  const Q = {
283
- test: rr,
284
- parse: qn,
285
- createTransformer: $n,
286
- getAnimatableNone: cr
283
+ test: Js,
284
+ parse: Pn,
285
+ createTransformer: Nn,
286
+ getAnimatableNone: sr
287
287
  };
288
- function Le(e, t, n) {
288
+ function Fe(e, t, n) {
289
289
  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;
290
290
  }
291
- function ur({ hue: e, saturation: t, lightness: n, alpha: s }) {
291
+ function rr({ hue: e, saturation: t, lightness: n, alpha: s }) {
292
292
  e /= 360, t /= 100, n /= 100;
293
293
  let r = 0, i = 0, o = 0;
294
294
  if (!t)
295
295
  r = i = o = n;
296
296
  else {
297
297
  const a = n < 0.5 ? n * (1 + t) : n + t - n * t, l = 2 * n - a;
298
- r = Le(l, a, e + 1 / 3), i = Le(l, a, e), o = Le(l, a, e - 1 / 3);
298
+ r = Fe(l, a, e + 1 / 3), i = Fe(l, a, e), o = Fe(l, a, e - 1 / 3);
299
299
  }
300
300
  return {
301
301
  red: Math.round(r * 255),
@@ -304,55 +304,55 @@ function ur({ hue: e, saturation: t, lightness: n, alpha: s }) {
304
304
  alpha: s
305
305
  };
306
306
  }
307
- function ke(e, t) {
307
+ function Me(e, t) {
308
308
  return (n) => n > 0 ? t : e;
309
309
  }
310
- const pe = (e, t, n) => e + (t - e) * n, Fe = (e, t, n) => {
310
+ const pe = (e, t, n) => e + (t - e) * n, Le = (e, t, n) => {
311
311
  const s = e * e, r = n * (t * t - s) + s;
312
312
  return r < 0 ? 0 : Math.sqrt(r);
313
- }, fr = [He, $, G], dr = (e) => fr.find((t) => t.test(e));
314
- function Ft(e) {
315
- const t = dr(e);
313
+ }, ir = [Be, q, G], or = (e) => ir.find((t) => t.test(e));
314
+ function Dt(e) {
315
+ const t = or(e);
316
316
  if (!t)
317
317
  return !1;
318
318
  let n = t.parse(e);
319
- return t === G && (n = ur(n)), n;
319
+ return t === G && (n = rr(n)), n;
320
320
  }
321
- const Pt = (e, t) => {
322
- const n = Ft(e), s = Ft(t);
321
+ const Ft = (e, t) => {
322
+ const n = Dt(e), s = Dt(t);
323
323
  if (!n || !s)
324
- return ke(e, t);
324
+ return Me(e, t);
325
325
  const r = { ...n };
326
- return (i) => (r.red = Fe(n.red, s.red, i), r.green = Fe(n.green, s.green, i), r.blue = Fe(n.blue, s.blue, i), r.alpha = pe(n.alpha, s.alpha, i), $.transform(r));
327
- }, We = /* @__PURE__ */ new Set(["none", "hidden"]);
328
- function hr(e, t) {
329
- return We.has(e) ? (n) => n <= 0 ? e : t : (n) => n >= 1 ? t : e;
326
+ return (i) => (r.red = Le(n.red, s.red, i), r.green = Le(n.green, s.green, i), r.blue = Le(n.blue, s.blue, i), r.alpha = pe(n.alpha, s.alpha, i), q.transform(r));
327
+ }, $e = /* @__PURE__ */ new Set(["none", "hidden"]);
328
+ function ar(e, t) {
329
+ return $e.has(e) ? (n) => n <= 0 ? e : t : (n) => n >= 1 ? t : e;
330
330
  }
331
- function mr(e, t) {
331
+ function lr(e, t) {
332
332
  return (n) => pe(e, t, n);
333
333
  }
334
- function dt(e) {
335
- return typeof e == "number" ? mr : typeof e == "string" ? ct(e) ? ke : k.test(e) ? Pt : yr : Array.isArray(e) ? Hn : typeof e == "object" ? k.test(e) ? Pt : pr : ke;
334
+ function ut(e) {
335
+ return typeof e == "number" ? lr : typeof e == "string" ? ot(e) ? Me : k.test(e) ? Ft : fr : Array.isArray(e) ? Rn : typeof e == "object" ? k.test(e) ? Ft : ur : Me;
336
336
  }
337
- function Hn(e, t) {
338
- const n = [...e], s = n.length, r = e.map((i, o) => dt(i)(i, t[o]));
337
+ function Rn(e, t) {
338
+ const n = [...e], s = n.length, r = e.map((i, o) => ut(i)(i, t[o]));
339
339
  return (i) => {
340
340
  for (let o = 0; o < s; o++)
341
341
  n[o] = r[o](i);
342
342
  return n;
343
343
  };
344
344
  }
345
- function pr(e, t) {
345
+ function ur(e, t) {
346
346
  const n = { ...e, ...t }, s = {};
347
347
  for (const r in n)
348
- e[r] !== void 0 && t[r] !== void 0 && (s[r] = dt(e[r])(e[r], t[r]));
348
+ e[r] !== void 0 && t[r] !== void 0 && (s[r] = ut(e[r])(e[r], t[r]));
349
349
  return (r) => {
350
350
  for (const i in s)
351
351
  n[i] = s[i](r);
352
352
  return n;
353
353
  };
354
354
  }
355
- function gr(e, t) {
355
+ function cr(e, t) {
356
356
  const n = [], s = { color: 0, var: 0, number: 0 };
357
357
  for (let r = 0; r < t.values.length; r++) {
358
358
  const i = t.types[r], o = e.indexes[i][s[i]], a = e.values[o] ?? 0;
@@ -360,51 +360,51 @@ function gr(e, t) {
360
360
  }
361
361
  return n;
362
362
  }
363
- const yr = (e, t) => {
364
- const n = Q.createTransformer(t), s = ue(e), r = ue(t);
365
- return s.indexes.var.length === r.indexes.var.length && s.indexes.color.length === r.indexes.color.length && s.indexes.number.length >= r.indexes.number.length ? We.has(e) && !r.values.length || We.has(t) && !s.values.length ? hr(e, t) : it(Hn(gr(s, r), r.values), n) : ke(e, t);
363
+ const fr = (e, t) => {
364
+ const n = Q.createTransformer(t), s = ce(e), r = ce(t);
365
+ return s.indexes.var.length === r.indexes.var.length && s.indexes.color.length === r.indexes.color.length && s.indexes.number.length >= r.indexes.number.length ? $e.has(e) && !r.values.length || $e.has(t) && !s.values.length ? ar(e, t) : nt(Rn(cr(s, r), r.values), n) : Me(e, t);
366
366
  };
367
- function Wn(e, t, n) {
368
- return typeof e == "number" && typeof t == "number" && typeof n == "number" ? pe(e, t, n) : dt(e)(e, t);
367
+ function Kn(e, t, n) {
368
+ return typeof e == "number" && typeof t == "number" && typeof n == "number" ? pe(e, t, n) : ut(e)(e, t);
369
369
  }
370
- const br = (e) => {
370
+ const dr = (e) => {
371
371
  const t = ({ timestamp: n }) => e(n);
372
372
  return {
373
373
  start: (n = !0) => K.update(t, n),
374
- stop: () => $e(t),
374
+ stop: () => Ke(t),
375
375
  /**
376
376
  * If we're processing this frame we can use the
377
377
  * framelocked timestamp to keep things in sync.
378
378
  */
379
- now: () => Me.isProcessing ? Me.timestamp : I.now()
379
+ now: () => Ve.isProcessing ? Ve.timestamp : F.now()
380
380
  };
381
- }, _n = (e, t, n = 10) => {
381
+ }, Bn = (e, t, n = 10) => {
382
382
  let s = "";
383
383
  const r = Math.max(Math.round(t / n), 2);
384
384
  for (let i = 0; i < r; i++)
385
385
  s += Math.round(e(i / (r - 1)) * 1e4) / 1e4 + ", ";
386
386
  return `linear(${s.substring(0, s.length - 2)})`;
387
- }, Ce = 2e4;
388
- function ht(e) {
387
+ }, ke = 2e4;
388
+ function ct(e) {
389
389
  let t = 0;
390
390
  const n = 50;
391
391
  let s = e.next(t);
392
- for (; !s.done && t < Ce; )
392
+ for (; !s.done && t < ke; )
393
393
  t += n, s = e.next(t);
394
- return t >= Ce ? 1 / 0 : t;
394
+ return t >= ke ? 1 / 0 : t;
395
395
  }
396
- function Un(e, t = 100, n) {
397
- const s = n({ ...e, keyframes: [0, t] }), r = Math.min(ht(s), Ce);
396
+ function $n(e, t = 100, n) {
397
+ const s = n({ ...e, keyframes: [0, t] }), r = Math.min(ct(s), ke);
398
398
  return {
399
399
  type: "keyframes",
400
400
  ease: (i) => s.next(r * i).value / t,
401
- duration: /* @__PURE__ */ F(r)
401
+ duration: /* @__PURE__ */ I(r)
402
402
  };
403
403
  }
404
- const wr = 5;
405
- function jn(e, t, n) {
406
- const s = Math.max(t - wr, 0);
407
- return An(n - e(s), t - s);
404
+ const hr = 5;
405
+ function qn(e, t, n) {
406
+ const s = Math.max(t - hr, 0);
407
+ return yn(n - e(s), t - s);
408
408
  }
409
409
  const M = {
410
410
  // Default spring physics
@@ -434,53 +434,53 @@ const M = {
434
434
  // in seconds
435
435
  minDamping: 0.05,
436
436
  maxDamping: 1
437
- }, Pe = 1e-3;
438
- function Tr({ duration: e = M.duration, bounce: t = M.bounce, velocity: n = M.velocity, mass: s = M.mass }) {
437
+ }, Ie = 1e-3;
438
+ function mr({ duration: e = M.duration, bounce: t = M.bounce, velocity: n = M.velocity, mass: s = M.mass }) {
439
439
  let r, i, o = 1 - t;
440
- o = U(M.minDamping, M.maxDamping, o), e = U(M.minDuration, M.maxDuration, /* @__PURE__ */ F(e)), o < 1 ? (r = (f) => {
441
- const c = f * o, u = c * e, d = c - n, h = _e(f, o), m = Math.exp(-u);
442
- return Pe - d / h * m;
443
- }, i = (f) => {
444
- const u = f * o * e, d = u * n + n, h = Math.pow(o, 2) * Math.pow(f, 2) * e, m = Math.exp(-u), y = _e(Math.pow(f, 2), o);
445
- return (-r(f) + Pe > 0 ? -1 : 1) * ((d - h) * m) / y;
446
- }) : (r = (f) => {
447
- const c = Math.exp(-f * e), u = (f - n) * e + 1;
448
- return -Pe + c * u;
449
- }, i = (f) => {
450
- const c = Math.exp(-f * e), u = (n - f) * (e * e);
451
- return c * u;
440
+ o = _(M.minDamping, M.maxDamping, o), e = _(M.minDuration, M.maxDuration, /* @__PURE__ */ I(e)), o < 1 ? (r = (c) => {
441
+ const u = c * o, f = u * e, d = u - n, h = qe(c, o), m = Math.exp(-f);
442
+ return Ie - d / h * m;
443
+ }, i = (c) => {
444
+ const f = c * o * e, d = f * n + n, h = Math.pow(o, 2) * Math.pow(c, 2) * e, m = Math.exp(-f), y = qe(Math.pow(c, 2), o);
445
+ return (-r(c) + Ie > 0 ? -1 : 1) * ((d - h) * m) / y;
446
+ }) : (r = (c) => {
447
+ const u = Math.exp(-c * e), f = (c - n) * e + 1;
448
+ return -Ie + u * f;
449
+ }, i = (c) => {
450
+ const u = Math.exp(-c * e), f = (n - c) * (e * e);
451
+ return u * f;
452
452
  });
453
- const a = 5 / e, l = Ar(r, i, a);
454
- if (e = /* @__PURE__ */ O(e), isNaN(l))
453
+ const a = 5 / e, l = gr(r, i, a);
454
+ if (e = /* @__PURE__ */ P(e), isNaN(l))
455
455
  return {
456
456
  stiffness: M.stiffness,
457
457
  damping: M.damping,
458
458
  duration: e
459
459
  };
460
460
  {
461
- const f = Math.pow(l, 2) * s;
461
+ const c = Math.pow(l, 2) * s;
462
462
  return {
463
- stiffness: f,
464
- damping: o * 2 * Math.sqrt(s * f),
463
+ stiffness: c,
464
+ damping: o * 2 * Math.sqrt(s * c),
465
465
  duration: e
466
466
  };
467
467
  }
468
468
  }
469
- const vr = 12;
470
- function Ar(e, t, n) {
469
+ const pr = 12;
470
+ function gr(e, t, n) {
471
471
  let s = n;
472
- for (let r = 1; r < vr; r++)
472
+ for (let r = 1; r < pr; r++)
473
473
  s = s - e(s) / t(s);
474
474
  return s;
475
475
  }
476
- function _e(e, t) {
476
+ function qe(e, t) {
477
477
  return e * Math.sqrt(1 - t * t);
478
478
  }
479
- const Sr = ["duration", "bounce"], xr = ["stiffness", "damping", "mass"];
480
- function Ot(e, t) {
479
+ const yr = ["duration", "bounce"], br = ["stiffness", "damping", "mass"];
480
+ function Lt(e, t) {
481
481
  return t.some((n) => e[n] !== void 0);
482
482
  }
483
- function Er(e) {
483
+ function wr(e) {
484
484
  let t = {
485
485
  velocity: M.velocity,
486
486
  stiffness: M.stiffness,
@@ -489,9 +489,9 @@ function Er(e) {
489
489
  isResolvedFromDuration: !1,
490
490
  ...e
491
491
  };
492
- if (!Ot(e, xr) && Ot(e, Sr))
492
+ if (!Lt(e, br) && Lt(e, yr))
493
493
  if (e.visualDuration) {
494
- const n = e.visualDuration, s = 2 * Math.PI / (n * 1.2), r = s * s, i = 2 * U(0.05, 1, 1 - (e.bounce || 0)) * Math.sqrt(r);
494
+ const n = e.visualDuration, s = 2 * Math.PI / (n * 1.2), r = s * s, i = 2 * _(0.05, 1, 1 - (e.bounce || 0)) * Math.sqrt(r);
495
495
  t = {
496
496
  ...t,
497
497
  mass: M.mass,
@@ -499,7 +499,7 @@ function Er(e) {
499
499
  damping: i
500
500
  };
501
501
  } else {
502
- const n = Tr(e);
502
+ const n = mr(e);
503
503
  t = {
504
504
  ...t,
505
505
  ...n,
@@ -515,44 +515,44 @@ function X(e = M.visualDuration, t = M.bounce) {
515
515
  bounce: t
516
516
  } : e;
517
517
  let { restSpeed: s, restDelta: r } = n;
518
- const i = n.keyframes[0], o = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: i }, { stiffness: l, damping: f, mass: c, duration: u, velocity: d, isResolvedFromDuration: h } = Er({
518
+ const i = n.keyframes[0], o = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: i }, { stiffness: l, damping: c, mass: u, duration: f, velocity: d, isResolvedFromDuration: h } = wr({
519
519
  ...n,
520
- velocity: -/* @__PURE__ */ F(n.velocity || 0)
521
- }), m = d || 0, y = f / (2 * Math.sqrt(l * c)), T = o - i, b = /* @__PURE__ */ F(Math.sqrt(l / c)), x = Math.abs(T) < 5;
520
+ velocity: -/* @__PURE__ */ I(n.velocity || 0)
521
+ }), m = d || 0, y = c / (2 * Math.sqrt(l * u)), T = o - i, b = /* @__PURE__ */ I(Math.sqrt(l / u)), x = Math.abs(T) < 5;
522
522
  s || (s = x ? M.restSpeed.granular : M.restSpeed.default), r || (r = x ? M.restDelta.granular : M.restDelta.default);
523
- let v;
523
+ let A;
524
524
  if (y < 1) {
525
- const g = _e(b, y);
526
- v = (A) => {
527
- const V = Math.exp(-y * b * A);
528
- return o - V * ((m + y * b * T) / g * Math.sin(g * A) + T * Math.cos(g * A));
525
+ const g = qe(b, y);
526
+ A = (v) => {
527
+ const V = Math.exp(-y * b * v);
528
+ return o - V * ((m + y * b * T) / g * Math.sin(g * v) + T * Math.cos(g * v));
529
529
  };
530
530
  } else if (y === 1)
531
- v = (g) => o - Math.exp(-b * g) * (T + (m + b * T) * g);
531
+ A = (g) => o - Math.exp(-b * g) * (T + (m + b * T) * g);
532
532
  else {
533
533
  const g = b * Math.sqrt(y * y - 1);
534
- v = (A) => {
535
- const V = Math.exp(-y * b * A), w = Math.min(g * A, 300);
534
+ A = (v) => {
535
+ const V = Math.exp(-y * b * v), w = Math.min(g * v, 300);
536
536
  return o - V * ((m + y * b * T) * Math.sinh(w) + g * T * Math.cosh(w)) / g;
537
537
  };
538
538
  }
539
539
  const S = {
540
- calculatedDuration: h && u || null,
540
+ calculatedDuration: h && f || null,
541
541
  next: (g) => {
542
- const A = v(g);
542
+ const v = A(g);
543
543
  if (h)
544
- a.done = g >= u;
544
+ a.done = g >= f;
545
545
  else {
546
546
  let V = g === 0 ? m : 0;
547
- y < 1 && (V = g === 0 ? /* @__PURE__ */ O(m) : jn(v, g, A));
548
- const w = Math.abs(V) <= s, E = Math.abs(o - A) <= r;
547
+ y < 1 && (V = g === 0 ? /* @__PURE__ */ P(m) : qn(A, g, v));
548
+ const w = Math.abs(V) <= s, E = Math.abs(o - v) <= r;
549
549
  a.done = w && E;
550
550
  }
551
- return a.value = a.done ? o : A, a;
551
+ return a.value = a.done ? o : v, a;
552
552
  },
553
553
  toString: () => {
554
- const g = Math.min(ht(S), Ce), A = _n((V) => S.next(g * V).value, g, 30);
555
- return g + "ms " + A;
554
+ const g = Math.min(ct(S), ke), v = Bn((V) => S.next(g * V).value, g, 30);
555
+ return g + "ms " + v;
556
556
  },
557
557
  toTransition: () => {
558
558
  }
@@ -560,123 +560,123 @@ function X(e = M.visualDuration, t = M.bounce) {
560
560
  return S;
561
561
  }
562
562
  X.applyToOptions = (e) => {
563
- const t = Un(e, 100, X);
564
- return e.ease = t.ease, e.duration = /* @__PURE__ */ O(t.duration), e.type = "keyframes", e;
563
+ const t = $n(e, 100, X);
564
+ return e.ease = t.ease, e.duration = /* @__PURE__ */ P(t.duration), e.type = "keyframes", e;
565
565
  };
566
- function Ue({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: s = 325, bounceDamping: r = 10, bounceStiffness: i = 500, modifyTarget: o, min: a, max: l, restDelta: f = 0.5, restSpeed: c }) {
567
- const u = e[0], d = {
566
+ function We({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: s = 325, bounceDamping: r = 10, bounceStiffness: i = 500, modifyTarget: o, min: a, max: l, restDelta: c = 0.5, restSpeed: u }) {
567
+ const f = e[0], d = {
568
568
  done: !1,
569
- value: u
569
+ value: f
570
570
  }, h = (w) => a !== void 0 && w < a || l !== void 0 && w > l, m = (w) => a === void 0 ? l : l === void 0 || Math.abs(a - w) < Math.abs(l - w) ? a : l;
571
571
  let y = n * t;
572
- const T = u + y, b = o === void 0 ? T : o(T);
573
- b !== T && (y = b - u);
574
- const x = (w) => -y * Math.exp(-w / s), v = (w) => b + x(w), S = (w) => {
575
- const E = x(w), D = v(w);
576
- d.done = Math.abs(E) <= f, d.value = d.done ? b : D;
572
+ const T = f + y, b = o === void 0 ? T : o(T);
573
+ b !== T && (y = b - f);
574
+ const x = (w) => -y * Math.exp(-w / s), A = (w) => b + x(w), S = (w) => {
575
+ const E = x(w), D = A(w);
576
+ d.done = Math.abs(E) <= c, d.value = d.done ? b : D;
577
577
  };
578
- let g, A;
578
+ let g, v;
579
579
  const V = (w) => {
580
- h(d.value) && (g = w, A = X({
580
+ h(d.value) && (g = w, v = X({
581
581
  keyframes: [d.value, m(d.value)],
582
- velocity: jn(v, w, d.value),
582
+ velocity: qn(A, w, d.value),
583
583
  // TODO: This should be passing * 1000
584
584
  damping: r,
585
585
  stiffness: i,
586
- restDelta: f,
587
- restSpeed: c
586
+ restDelta: c,
587
+ restSpeed: u
588
588
  }));
589
589
  };
590
590
  return V(0), {
591
591
  calculatedDuration: null,
592
592
  next: (w) => {
593
593
  let E = !1;
594
- return !A && g === void 0 && (E = !0, S(w), V(w)), g !== void 0 && w >= g ? A.next(w - g) : (!E && S(w), d);
594
+ return !v && g === void 0 && (E = !0, S(w), V(w)), g !== void 0 && w >= g ? v.next(w - g) : (!E && S(w), d);
595
595
  }
596
596
  };
597
597
  }
598
- function Vr(e, t, n) {
599
- const s = [], r = n || N.mix || Wn, i = e.length - 1;
598
+ function Tr(e, t, n) {
599
+ const s = [], r = n || R.mix || Kn, i = e.length - 1;
600
600
  for (let o = 0; o < i; o++) {
601
601
  let a = r(e[o], e[o + 1]);
602
602
  if (t) {
603
603
  const l = Array.isArray(t) ? t[o] || Z : t;
604
- a = it(l, a);
604
+ a = nt(l, a);
605
605
  }
606
606
  s.push(a);
607
607
  }
608
608
  return s;
609
609
  }
610
- function Mr(e, t, { clamp: n = !0, ease: s, mixer: r } = {}) {
610
+ function Ar(e, t, { clamp: n = !0, ease: s, mixer: r } = {}) {
611
611
  const i = e.length;
612
- if (st(i === t.length), i === 1)
612
+ if (et(i === t.length), i === 1)
613
613
  return () => t[0];
614
614
  if (i === 2 && t[0] === t[1])
615
615
  return () => t[1];
616
616
  const o = e[0] === e[1];
617
617
  e[0] > e[i - 1] && (e = [...e].reverse(), t = [...t].reverse());
618
- const a = Vr(t, s, r), l = a.length, f = (c) => {
619
- if (o && c < e[0])
618
+ const a = Tr(t, s, r), l = a.length, c = (u) => {
619
+ if (o && u < e[0])
620
620
  return t[0];
621
- let u = 0;
621
+ let f = 0;
622
622
  if (l > 1)
623
- for (; u < e.length - 2 && !(c < e[u + 1]); u++)
623
+ for (; f < e.length - 2 && !(u < e[f + 1]); f++)
624
624
  ;
625
- const d = /* @__PURE__ */ ot(e[u], e[u + 1], c);
626
- return a[u](d);
625
+ const d = /* @__PURE__ */ st(e[f], e[f + 1], u);
626
+ return a[f](d);
627
627
  };
628
- return n ? (c) => f(U(e[0], e[i - 1], c)) : f;
628
+ return n ? (u) => c(_(e[0], e[i - 1], u)) : c;
629
629
  }
630
- function Gn(e, t) {
630
+ function Wn(e, t) {
631
631
  const n = e[e.length - 1];
632
632
  for (let s = 1; s <= t; s++) {
633
- const r = /* @__PURE__ */ ot(0, t, s);
633
+ const r = /* @__PURE__ */ st(0, t, s);
634
634
  e.push(pe(n, 1, r));
635
635
  }
636
636
  }
637
- function zn(e) {
637
+ function Hn(e) {
638
638
  const t = [0];
639
- return Gn(t, e.length - 1), t;
639
+ return Wn(t, e.length - 1), t;
640
640
  }
641
- function kr(e, t) {
641
+ function vr(e, t) {
642
642
  return e.map((n) => n * t);
643
643
  }
644
- function Cr(e, t) {
645
- return e.map(() => t || Dn).splice(0, e.length - 1);
644
+ function Sr(e, t) {
645
+ return e.map(() => t || En).splice(0, e.length - 1);
646
646
  }
647
647
  function le({ duration: e = 300, keyframes: t, times: n, ease: s = "easeInOut" }) {
648
- const r = In(s) ? s.map(Dt) : Dt(s), i = {
648
+ const r = Vn(s) ? s.map(Mt) : Mt(s), i = {
649
649
  done: !1,
650
650
  value: t[0]
651
- }, o = kr(
651
+ }, o = vr(
652
652
  // Only use the provided offsets if they're the correct length
653
653
  // TODO Maybe we should warn here if there's a length mismatch
654
- n && n.length === t.length ? n : zn(t),
654
+ n && n.length === t.length ? n : Hn(t),
655
655
  e
656
- ), a = Mr(o, t, {
657
- ease: Array.isArray(r) ? r : Cr(t, r)
656
+ ), a = Ar(o, t, {
657
+ ease: Array.isArray(r) ? r : Sr(t, r)
658
658
  });
659
659
  return {
660
660
  calculatedDuration: e,
661
661
  next: (l) => (i.value = a(l), i.done = l >= e, i)
662
662
  };
663
663
  }
664
- const Dr = (e) => e !== null;
665
- function mt(e, { repeat: t, repeatType: n = "loop" }, s, r = 1) {
666
- const i = e.filter(Dr), a = r < 0 || t && n !== "loop" && t % 2 === 1 ? 0 : i.length - 1;
664
+ const xr = (e) => e !== null;
665
+ function ft(e, { repeat: t, repeatType: n = "loop" }, s, r = 1) {
666
+ const i = e.filter(xr), a = r < 0 || t && n !== "loop" && t % 2 === 1 ? 0 : i.length - 1;
667
667
  return !a || s === void 0 ? i[a] : s;
668
668
  }
669
- const Ir = {
670
- decay: Ue,
671
- inertia: Ue,
669
+ const Er = {
670
+ decay: We,
671
+ inertia: We,
672
672
  tween: le,
673
673
  keyframes: le,
674
674
  spring: X
675
675
  };
676
- function Yn(e) {
677
- typeof e.type == "string" && (e.type = Ir[e.type]);
676
+ function Un(e) {
677
+ typeof e.type == "string" && (e.type = Er[e.type]);
678
678
  }
679
- class pt {
679
+ class dt {
680
680
  constructor() {
681
681
  this.updateFinished();
682
682
  }
@@ -700,29 +700,29 @@ class pt {
700
700
  return this.finished.then(t, n);
701
701
  }
702
702
  }
703
- const Lr = (e) => e / 100;
704
- class gt extends pt {
703
+ const Vr = (e) => e / 100;
704
+ class ht extends dt {
705
705
  constructor(t) {
706
706
  super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.stop = () => {
707
707
  const { motionValue: n } = this.options;
708
- n && n.updatedAt !== I.now() && this.tick(I.now()), this.isStopped = !0, this.state !== "idle" && (this.teardown(), this.options.onStop?.());
708
+ n && n.updatedAt !== F.now() && this.tick(F.now()), this.isStopped = !0, this.state !== "idle" && (this.teardown(), this.options.onStop?.());
709
709
  }, this.options = t, this.initAnimation(), this.play(), t.autoplay === !1 && this.pause();
710
710
  }
711
711
  initAnimation() {
712
712
  const { options: t } = this;
713
- Yn(t);
713
+ Un(t);
714
714
  const { type: n = le, repeat: s = 0, repeatDelay: r = 0, repeatType: i, velocity: o = 0 } = t;
715
715
  let { keyframes: a } = t;
716
716
  const l = n || le;
717
- l !== le && typeof a[0] != "number" && (this.mixKeyframes = it(Lr, Wn(a[0], a[1])), a = [0, 100]);
718
- const f = l({ ...t, keyframes: a });
717
+ l !== le && typeof a[0] != "number" && (this.mixKeyframes = nt(Vr, Kn(a[0], a[1])), a = [0, 100]);
718
+ const c = l({ ...t, keyframes: a });
719
719
  i === "mirror" && (this.mirroredGenerator = l({
720
720
  ...t,
721
721
  keyframes: [...a].reverse(),
722
722
  velocity: -o
723
- })), f.calculatedDuration === null && (f.calculatedDuration = ht(f));
724
- const { calculatedDuration: c } = f;
725
- this.calculatedDuration = c, this.resolvedDuration = c + r, this.totalDuration = this.resolvedDuration * (s + 1) - r, this.generator = f;
723
+ })), c.calculatedDuration === null && (c.calculatedDuration = ct(c));
724
+ const { calculatedDuration: u } = c;
725
+ this.calculatedDuration = u, this.resolvedDuration = u + r, this.totalDuration = this.resolvedDuration * (s + 1) - r, this.generator = c;
726
726
  }
727
727
  updateTime(t) {
728
728
  const n = Math.round(t - this.startTime) * this.playbackSpeed;
@@ -732,22 +732,22 @@ class gt extends pt {
732
732
  const { generator: s, totalDuration: r, mixKeyframes: i, mirroredGenerator: o, resolvedDuration: a, calculatedDuration: l } = this;
733
733
  if (this.startTime === null)
734
734
  return s.next(0);
735
- const { delay: f = 0, keyframes: c, repeat: u, repeatType: d, repeatDelay: h, type: m, onUpdate: y, finalKeyframe: T } = this.options;
735
+ const { delay: c = 0, keyframes: u, repeat: f, repeatType: d, repeatDelay: h, type: m, onUpdate: y, finalKeyframe: T } = this.options;
736
736
  this.speed > 0 ? this.startTime = Math.min(this.startTime, t) : this.speed < 0 && (this.startTime = Math.min(t - r / this.speed, this.startTime)), n ? this.currentTime = t : this.updateTime(t);
737
- const b = this.currentTime - f * (this.playbackSpeed >= 0 ? 1 : -1), x = this.playbackSpeed >= 0 ? b < 0 : b > r;
737
+ const b = this.currentTime - c * (this.playbackSpeed >= 0 ? 1 : -1), x = this.playbackSpeed >= 0 ? b < 0 : b > r;
738
738
  this.currentTime = Math.max(b, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = r);
739
- let v = this.currentTime, S = s;
740
- if (u) {
739
+ let A = this.currentTime, S = s;
740
+ if (f) {
741
741
  const w = Math.min(this.currentTime, r) / a;
742
742
  let E = Math.floor(w), D = w % 1;
743
- !D && w >= 1 && (D = 1), D === 1 && E--, E = Math.min(E, u + 1), !!(E % 2) && (d === "reverse" ? (D = 1 - D, h && (D -= h / a)) : d === "mirror" && (S = o)), v = U(0, 1, D) * a;
743
+ !D && w >= 1 && (D = 1), D === 1 && E--, E = Math.min(E, f + 1), !!(E % 2) && (d === "reverse" ? (D = 1 - D, h && (D -= h / a)) : d === "mirror" && (S = o)), A = _(0, 1, D) * a;
744
744
  }
745
- const g = x ? { done: !1, value: c[0] } : S.next(v);
745
+ const g = x ? { done: !1, value: u[0] } : S.next(A);
746
746
  i && (g.value = i(g.value));
747
- let { done: A } = g;
748
- !x && l !== null && (A = this.playbackSpeed >= 0 ? this.currentTime >= r : this.currentTime <= 0);
749
- const V = this.holdTime === null && (this.state === "finished" || this.state === "running" && A);
750
- return V && m !== Ue && (g.value = mt(c, this.options, T, this.speed)), y && y(g.value), V && this.finish(), g;
747
+ let { done: v } = g;
748
+ !x && l !== null && (v = this.playbackSpeed >= 0 ? this.currentTime >= r : this.currentTime <= 0);
749
+ const V = this.holdTime === null && (this.state === "finished" || this.state === "running" && v);
750
+ return V && m !== We && (g.value = ft(u, this.options, T, this.speed)), y && y(g.value), V && this.finish(), g;
751
751
  }
752
752
  /**
753
753
  * Allows the returned animation to be awaited or promise-chained. Currently
@@ -758,36 +758,36 @@ class gt extends pt {
758
758
  return this.finished.then(t, n);
759
759
  }
760
760
  get duration() {
761
- return /* @__PURE__ */ F(this.calculatedDuration);
761
+ return /* @__PURE__ */ I(this.calculatedDuration);
762
762
  }
763
763
  get iterationDuration() {
764
764
  const { delay: t = 0 } = this.options || {};
765
- return this.duration + /* @__PURE__ */ F(t);
765
+ return this.duration + /* @__PURE__ */ I(t);
766
766
  }
767
767
  get time() {
768
- return /* @__PURE__ */ F(this.currentTime);
768
+ return /* @__PURE__ */ I(this.currentTime);
769
769
  }
770
770
  set time(t) {
771
- t = /* @__PURE__ */ O(t), this.currentTime = t, this.startTime === null || this.holdTime !== null || this.playbackSpeed === 0 ? this.holdTime = t : this.driver && (this.startTime = this.driver.now() - t / this.playbackSpeed), this.driver?.start(!1);
771
+ t = /* @__PURE__ */ P(t), this.currentTime = t, this.startTime === null || this.holdTime !== null || this.playbackSpeed === 0 ? this.holdTime = t : this.driver && (this.startTime = this.driver.now() - t / this.playbackSpeed), this.driver?.start(!1);
772
772
  }
773
773
  get speed() {
774
774
  return this.playbackSpeed;
775
775
  }
776
776
  set speed(t) {
777
- this.updateTime(I.now());
777
+ this.updateTime(F.now());
778
778
  const n = this.playbackSpeed !== t;
779
- this.playbackSpeed = t, n && (this.time = /* @__PURE__ */ F(this.currentTime));
779
+ this.playbackSpeed = t, n && (this.time = /* @__PURE__ */ I(this.currentTime));
780
780
  }
781
781
  play() {
782
782
  if (this.isStopped)
783
783
  return;
784
- const { driver: t = br, startTime: n } = this.options;
784
+ const { driver: t = dr, startTime: n } = this.options;
785
785
  this.driver || (this.driver = t((r) => this.tick(r))), this.options.onPlay?.();
786
786
  const s = this.driver.now();
787
787
  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();
788
788
  }
789
789
  pause() {
790
- this.state = "paused", this.updateTime(I.now()), this.holdTime = this.currentTime;
790
+ this.state = "paused", this.updateTime(F.now()), this.holdTime = this.currentTime;
791
791
  }
792
792
  complete() {
793
793
  this.state !== "running" && this.play(), this.state = "finished", this.holdTime = null;
@@ -811,14 +811,14 @@ class gt extends pt {
811
811
  return this.options.allowFlatten && (this.options.type = "keyframes", this.options.ease = "linear", this.initAnimation()), this.driver?.stop(), t.observe(this);
812
812
  }
813
813
  }
814
- function Fr(e) {
814
+ function Mr(e) {
815
815
  for (let t = 1; t < e.length; t++)
816
816
  e[t] ?? (e[t] = e[t - 1]);
817
817
  }
818
- const H = (e) => e * 180 / Math.PI, je = (e) => {
819
- const t = H(Math.atan2(e[1], e[0]));
820
- return Ge(t);
821
- }, Pr = {
818
+ const W = (e) => e * 180 / Math.PI, He = (e) => {
819
+ const t = W(Math.atan2(e[1], e[0]));
820
+ return Ue(t);
821
+ }, kr = {
822
822
  x: 4,
823
823
  y: 5,
824
824
  translateX: 4,
@@ -826,53 +826,53 @@ const H = (e) => e * 180 / Math.PI, je = (e) => {
826
826
  scaleX: 0,
827
827
  scaleY: 3,
828
828
  scale: (e) => (Math.abs(e[0]) + Math.abs(e[3])) / 2,
829
- rotate: je,
830
- rotateZ: je,
831
- skewX: (e) => H(Math.atan(e[1])),
832
- skewY: (e) => H(Math.atan(e[2])),
829
+ rotate: He,
830
+ rotateZ: He,
831
+ skewX: (e) => W(Math.atan(e[1])),
832
+ skewY: (e) => W(Math.atan(e[2])),
833
833
  skew: (e) => (Math.abs(e[1]) + Math.abs(e[2])) / 2
834
- }, Ge = (e) => (e = e % 360, e < 0 && (e += 360), e), Rt = je, Nt = (e) => Math.sqrt(e[0] * e[0] + e[1] * e[1]), Kt = (e) => Math.sqrt(e[4] * e[4] + e[5] * e[5]), Or = {
834
+ }, Ue = (e) => (e = e % 360, e < 0 && (e += 360), e), It = He, Ot = (e) => Math.sqrt(e[0] * e[0] + e[1] * e[1]), Pt = (e) => Math.sqrt(e[4] * e[4] + e[5] * e[5]), Cr = {
835
835
  x: 12,
836
836
  y: 13,
837
837
  z: 14,
838
838
  translateX: 12,
839
839
  translateY: 13,
840
840
  translateZ: 14,
841
- scaleX: Nt,
842
- scaleY: Kt,
843
- scale: (e) => (Nt(e) + Kt(e)) / 2,
844
- rotateX: (e) => Ge(H(Math.atan2(e[6], e[5]))),
845
- rotateY: (e) => Ge(H(Math.atan2(-e[2], e[0]))),
846
- rotateZ: Rt,
847
- rotate: Rt,
848
- skewX: (e) => H(Math.atan(e[4])),
849
- skewY: (e) => H(Math.atan(e[1])),
841
+ scaleX: Ot,
842
+ scaleY: Pt,
843
+ scale: (e) => (Ot(e) + Pt(e)) / 2,
844
+ rotateX: (e) => Ue(W(Math.atan2(e[6], e[5]))),
845
+ rotateY: (e) => Ue(W(Math.atan2(-e[2], e[0]))),
846
+ rotateZ: It,
847
+ rotate: It,
848
+ skewX: (e) => W(Math.atan(e[4])),
849
+ skewY: (e) => W(Math.atan(e[1])),
850
850
  skew: (e) => (Math.abs(e[1]) + Math.abs(e[4])) / 2
851
851
  };
852
- function ze(e) {
852
+ function _e(e) {
853
853
  return e.includes("scale") ? 1 : 0;
854
854
  }
855
- function Ye(e, t) {
855
+ function je(e, t) {
856
856
  if (!e || e === "none")
857
- return ze(t);
857
+ return _e(t);
858
858
  const n = e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
859
859
  let s, r;
860
860
  if (n)
861
- s = Or, r = n;
861
+ s = Cr, r = n;
862
862
  else {
863
863
  const a = e.match(/^matrix\(([-\d.e\s,]+)\)$/u);
864
- s = Pr, r = a;
864
+ s = kr, r = a;
865
865
  }
866
866
  if (!r)
867
- return ze(t);
868
- const i = s[t], o = r[1].split(",").map(Nr);
867
+ return _e(t);
868
+ const i = s[t], o = r[1].split(",").map(Fr);
869
869
  return typeof i == "function" ? i(o) : o[i];
870
870
  }
871
- const Rr = (e, t) => {
871
+ const Dr = (e, t) => {
872
872
  const { transform: n = "none" } = getComputedStyle(e);
873
- return Ye(n, t);
873
+ return je(n, t);
874
874
  };
875
- function Nr(e) {
875
+ function Fr(e) {
876
876
  return parseFloat(e.trim());
877
877
  }
878
878
  const ee = [
@@ -893,15 +893,15 @@ const ee = [
893
893
  "skew",
894
894
  "skewX",
895
895
  "skewY"
896
- ], te = new Set(ee), Bt = (e) => e === J || e === p, Kr = /* @__PURE__ */ new Set(["x", "y", "z"]), Br = ee.filter((e) => !Kr.has(e));
897
- function qr(e) {
896
+ ], te = new Set(ee), Nt = (e) => e === J || e === p, Lr = /* @__PURE__ */ new Set(["x", "y", "z"]), Ir = ee.filter((e) => !Lr.has(e));
897
+ function Or(e) {
898
898
  const t = [];
899
- return Br.forEach((n) => {
899
+ return Ir.forEach((n) => {
900
900
  const s = e.getValue(n);
901
901
  s !== void 0 && (t.push([n, s.get()]), s.set(n.startsWith("scale") ? 1 : 0));
902
902
  }), t;
903
903
  }
904
- const W = {
904
+ const H = {
905
905
  // Dimensions
906
906
  width: ({ x: e }, { paddingLeft: t = "0", paddingRight: n = "0" }) => e.max - e.min - parseFloat(t) - parseFloat(n),
907
907
  height: ({ y: e }, { paddingTop: t = "0", paddingBottom: n = "0" }) => e.max - e.min - parseFloat(t) - parseFloat(n),
@@ -910,18 +910,18 @@ const W = {
910
910
  bottom: ({ y: e }, { top: t }) => parseFloat(t) + (e.max - e.min),
911
911
  right: ({ x: e }, { left: t }) => parseFloat(t) + (e.max - e.min),
912
912
  // Transform
913
- x: (e, { transform: t }) => Ye(t, "x"),
914
- y: (e, { transform: t }) => Ye(t, "y")
913
+ x: (e, { transform: t }) => je(t, "x"),
914
+ y: (e, { transform: t }) => je(t, "y")
915
915
  };
916
- W.translateX = W.x;
917
- W.translateY = W.y;
918
- const _ = /* @__PURE__ */ new Set();
919
- let Xe = !1, Ze = !1, Je = !1;
920
- function Xn() {
921
- if (Ze) {
922
- const e = Array.from(_).filter((s) => s.needsMeasurement), t = new Set(e.map((s) => s.element)), n = /* @__PURE__ */ new Map();
916
+ H.translateX = H.x;
917
+ H.translateY = H.y;
918
+ const U = /* @__PURE__ */ new Set();
919
+ let Ge = !1, ze = !1, Ye = !1;
920
+ function _n() {
921
+ if (ze) {
922
+ const e = Array.from(U).filter((s) => s.needsMeasurement), t = new Set(e.map((s) => s.element)), n = /* @__PURE__ */ new Map();
923
923
  t.forEach((s) => {
924
- const r = qr(s);
924
+ const r = Or(s);
925
925
  r.length && (n.set(s, r), s.render());
926
926
  }), e.forEach((s) => s.measureInitialState()), t.forEach((s) => {
927
927
  s.render();
@@ -933,22 +933,22 @@ function Xn() {
933
933
  s.suspendedScrollY !== void 0 && window.scrollTo(0, s.suspendedScrollY);
934
934
  });
935
935
  }
936
- Ze = !1, Xe = !1, _.forEach((e) => e.complete(Je)), _.clear();
936
+ ze = !1, Ge = !1, U.forEach((e) => e.complete(Ye)), U.clear();
937
937
  }
938
- function Zn() {
939
- _.forEach((e) => {
940
- e.readKeyframes(), e.needsMeasurement && (Ze = !0);
938
+ function jn() {
939
+ U.forEach((e) => {
940
+ e.readKeyframes(), e.needsMeasurement && (ze = !0);
941
941
  });
942
942
  }
943
- function $r() {
944
- Je = !0, Zn(), Xn(), Je = !1;
943
+ function Pr() {
944
+ Ye = !0, jn(), _n(), Ye = !1;
945
945
  }
946
- class yt {
946
+ class mt {
947
947
  constructor(t, n, s, r, i, o = !1) {
948
948
  this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...t], this.onComplete = n, this.name = s, this.motionValue = r, this.element = i, this.isAsync = o;
949
949
  }
950
950
  scheduleResolve() {
951
- this.state = "scheduled", this.isAsync ? (_.add(this), Xe || (Xe = !0, K.read(Zn), K.resolveKeyframes(Xn))) : (this.readKeyframes(), this.complete());
951
+ this.state = "scheduled", this.isAsync ? (U.add(this), Ge || (Ge = !0, K.read(jn), K.resolveKeyframes(_n))) : (this.readKeyframes(), this.complete());
952
952
  }
953
953
  readKeyframes() {
954
954
  const { unresolvedKeyframes: t, name: n, element: s, motionValue: r } = this;
@@ -962,7 +962,7 @@ class yt {
962
962
  }
963
963
  t[0] === void 0 && (t[0] = o), r && i === void 0 && r.set(t[0]);
964
964
  }
965
- Fr(t);
965
+ Mr(t);
966
966
  }
967
967
  setFinalKeyframe() {
968
968
  }
@@ -973,32 +973,32 @@ class yt {
973
973
  measureEndState() {
974
974
  }
975
975
  complete(t = !1) {
976
- this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, t), _.delete(this);
976
+ this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, t), U.delete(this);
977
977
  }
978
978
  cancel() {
979
- this.state === "scheduled" && (_.delete(this), this.state = "pending");
979
+ this.state === "scheduled" && (U.delete(this), this.state = "pending");
980
980
  }
981
981
  resume() {
982
982
  this.state === "pending" && this.scheduleResolve();
983
983
  }
984
984
  }
985
- const Hr = (e) => e.startsWith("--");
986
- function Wr(e, t, n) {
987
- Hr(t) ? e.style.setProperty(t, n) : e.style[t] = n;
985
+ const Nr = (e) => e.startsWith("--");
986
+ function Rr(e, t, n) {
987
+ Nr(t) ? e.style.setProperty(t, n) : e.style[t] = n;
988
988
  }
989
- const _r = /* @__PURE__ */ rt(() => window.ScrollTimeline !== void 0), Ur = {};
990
- function jr(e, t) {
991
- const n = /* @__PURE__ */ rt(e);
992
- return () => Ur[t] ?? n();
989
+ const Kr = /* @__PURE__ */ tt(() => window.ScrollTimeline !== void 0), Br = {};
990
+ function $r(e, t) {
991
+ const n = /* @__PURE__ */ tt(e);
992
+ return () => Br[t] ?? n();
993
993
  }
994
- const Jn = /* @__PURE__ */ jr(() => {
994
+ const Gn = /* @__PURE__ */ $r(() => {
995
995
  try {
996
996
  document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
997
997
  } catch {
998
998
  return !1;
999
999
  }
1000
1000
  return !0;
1001
- }, "linearEasing"), oe = ([e, t, n, s]) => `cubic-bezier(${e}, ${t}, ${n}, ${s})`, qt = {
1001
+ }, "linearEasing"), oe = ([e, t, n, s]) => `cubic-bezier(${e}, ${t}, ${n}, ${s})`, Rt = {
1002
1002
  linear: "linear",
1003
1003
  ease: "ease",
1004
1004
  easeIn: "ease-in",
@@ -1009,44 +1009,44 @@ const Jn = /* @__PURE__ */ jr(() => {
1009
1009
  backIn: /* @__PURE__ */ oe([0.31, 0.01, 0.66, -0.59]),
1010
1010
  backOut: /* @__PURE__ */ oe([0.33, 1.53, 0.69, 0.99])
1011
1011
  };
1012
- function Qn(e, t) {
1012
+ function zn(e, t) {
1013
1013
  if (e)
1014
- return typeof e == "function" ? Jn() ? _n(e, t) : "ease-out" : Fn(e) ? oe(e) : Array.isArray(e) ? e.map((n) => Qn(n, t) || qt.easeOut) : qt[e];
1014
+ return typeof e == "function" ? Gn() ? Bn(e, t) : "ease-out" : kn(e) ? oe(e) : Array.isArray(e) ? e.map((n) => zn(n, t) || Rt.easeOut) : Rt[e];
1015
1015
  }
1016
- function Gr(e, t, n, { delay: s = 0, duration: r = 300, repeat: i = 0, repeatType: o = "loop", ease: a = "easeOut", times: l } = {}, f = void 0) {
1017
- const c = {
1016
+ function qr(e, t, n, { delay: s = 0, duration: r = 300, repeat: i = 0, repeatType: o = "loop", ease: a = "easeOut", times: l } = {}, c = void 0) {
1017
+ const u = {
1018
1018
  [t]: n
1019
1019
  };
1020
- l && (c.offset = l);
1021
- const u = Qn(a, r);
1022
- Array.isArray(u) && (c.easing = u);
1020
+ l && (u.offset = l);
1021
+ const f = zn(a, r);
1022
+ Array.isArray(f) && (u.easing = f);
1023
1023
  const d = {
1024
1024
  delay: s,
1025
1025
  duration: r,
1026
- easing: Array.isArray(u) ? "linear" : u,
1026
+ easing: Array.isArray(f) ? "linear" : f,
1027
1027
  fill: "both",
1028
1028
  iterations: i + 1,
1029
1029
  direction: o === "reverse" ? "alternate" : "normal"
1030
1030
  };
1031
- return f && (d.pseudoElement = f), e.animate(c, d);
1031
+ return c && (d.pseudoElement = c), e.animate(u, d);
1032
1032
  }
1033
- function bt(e) {
1033
+ function pt(e) {
1034
1034
  return typeof e == "function" && "applyToOptions" in e;
1035
1035
  }
1036
- function zr({ type: e, ...t }) {
1037
- return bt(e) && Jn() ? e.applyToOptions(t) : (t.duration ?? (t.duration = 300), t.ease ?? (t.ease = "easeOut"), t);
1036
+ function Wr({ type: e, ...t }) {
1037
+ return pt(e) && Gn() ? e.applyToOptions(t) : (t.duration ?? (t.duration = 300), t.ease ?? (t.ease = "easeOut"), t);
1038
1038
  }
1039
- class Yr extends pt {
1039
+ class Hr extends dt {
1040
1040
  constructor(t) {
1041
1041
  if (super(), this.finishedTime = null, this.isStopped = !1, !t)
1042
1042
  return;
1043
1043
  const { element: n, name: s, keyframes: r, pseudoElement: i, allowFlatten: o = !1, finalKeyframe: a, onComplete: l } = t;
1044
- this.isPseudoElement = !!i, this.allowFlatten = o, this.options = t, st(typeof t.type != "string");
1045
- const f = zr(t);
1046
- this.animation = Gr(n, s, r, f, i), f.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
1044
+ this.isPseudoElement = !!i, this.allowFlatten = o, this.options = t, et(typeof t.type != "string");
1045
+ const c = Wr(t);
1046
+ this.animation = qr(n, s, r, c, i), c.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
1047
1047
  if (this.finishedTime = this.time, !i) {
1048
- const c = mt(r, this.options, a, this.speed);
1049
- this.updateMotionValue ? this.updateMotionValue(c) : Wr(n, s, c), this.animation.cancel();
1048
+ const u = ft(r, this.options, a, this.speed);
1049
+ this.updateMotionValue ? this.updateMotionValue(u) : Rr(n, s, u), this.animation.cancel();
1050
1050
  }
1051
1051
  l?.(), this.notifyFinished();
1052
1052
  };
@@ -1090,17 +1090,17 @@ class Yr extends pt {
1090
1090
  }
1091
1091
  get duration() {
1092
1092
  const t = this.animation.effect?.getComputedTiming?.().duration || 0;
1093
- return /* @__PURE__ */ F(Number(t));
1093
+ return /* @__PURE__ */ I(Number(t));
1094
1094
  }
1095
1095
  get iterationDuration() {
1096
1096
  const { delay: t = 0 } = this.options || {};
1097
- return this.duration + /* @__PURE__ */ F(t);
1097
+ return this.duration + /* @__PURE__ */ I(t);
1098
1098
  }
1099
1099
  get time() {
1100
- return /* @__PURE__ */ F(Number(this.animation.currentTime) || 0);
1100
+ return /* @__PURE__ */ I(Number(this.animation.currentTime) || 0);
1101
1101
  }
1102
1102
  set time(t) {
1103
- this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */ O(t);
1103
+ this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */ P(t);
1104
1104
  }
1105
1105
  /**
1106
1106
  * The playback speed of the animation.
@@ -1125,24 +1125,24 @@ class Yr extends pt {
1125
1125
  * Attaches a timeline to the animation, for instance the `ScrollTimeline`.
1126
1126
  */
1127
1127
  attachTimeline({ timeline: t, observe: n }) {
1128
- return this.allowFlatten && this.animation.effect?.updateTiming({ easing: "linear" }), this.animation.onfinish = null, t && _r() ? (this.animation.timeline = t, Z) : n(this);
1128
+ return this.allowFlatten && this.animation.effect?.updateTiming({ easing: "linear" }), this.animation.onfinish = null, t && Kr() ? (this.animation.timeline = t, Z) : n(this);
1129
1129
  }
1130
1130
  }
1131
- const es = {
1132
- anticipate: kn,
1133
- backInOut: Mn,
1134
- circInOut: Cn
1131
+ const Yn = {
1132
+ anticipate: Sn,
1133
+ backInOut: vn,
1134
+ circInOut: xn
1135
1135
  };
1136
- function Xr(e) {
1137
- return e in es;
1136
+ function Ur(e) {
1137
+ return e in Yn;
1138
1138
  }
1139
- function Zr(e) {
1140
- typeof e.ease == "string" && Xr(e.ease) && (e.ease = es[e.ease]);
1139
+ function _r(e) {
1140
+ typeof e.ease == "string" && Ur(e.ease) && (e.ease = Yn[e.ease]);
1141
1141
  }
1142
- const $t = 10;
1143
- class Jr extends Yr {
1142
+ const Kt = 10;
1143
+ class jr extends Hr {
1144
1144
  constructor(t) {
1145
- Zr(t), Yn(t), super(t), t.startTime && (this.startTime = t.startTime), this.options = t;
1145
+ _r(t), Un(t), super(t), t.startTime && (this.startTime = t.startTime), this.options = t;
1146
1146
  }
1147
1147
  /**
1148
1148
  * WAAPI doesn't natively have any interruption capabilities.
@@ -1160,17 +1160,17 @@ class Jr extends Yr {
1160
1160
  n.set(t);
1161
1161
  return;
1162
1162
  }
1163
- const a = new gt({
1163
+ const a = new ht({
1164
1164
  ...o,
1165
1165
  autoplay: !1
1166
- }), l = /* @__PURE__ */ O(this.finishedTime ?? this.time);
1167
- n.setWithVelocity(a.sample(l - $t).value, a.sample(l).value, $t), a.stop();
1166
+ }), l = /* @__PURE__ */ P(this.finishedTime ?? this.time);
1167
+ n.setWithVelocity(a.sample(l - Kt).value, a.sample(l).value, Kt), a.stop();
1168
1168
  }
1169
1169
  }
1170
- const Ht = (e, t) => t === "zIndex" ? !1 : !!(typeof e == "number" || Array.isArray(e) || typeof e == "string" && // It's animatable if we have a string
1170
+ const Bt = (e, t) => t === "zIndex" ? !1 : !!(typeof e == "number" || Array.isArray(e) || typeof e == "string" && // It's animatable if we have a string
1171
1171
  (Q.test(e) || e === "0") && // And it contains numbers and/or colors
1172
1172
  !e.startsWith("url("));
1173
- function Qr(e) {
1173
+ function Gr(e) {
1174
1174
  const t = e[0];
1175
1175
  if (e.length === 1)
1176
1176
  return !0;
@@ -1178,43 +1178,43 @@ function Qr(e) {
1178
1178
  if (e[n] !== t)
1179
1179
  return !0;
1180
1180
  }
1181
- function ei(e, t, n, s) {
1181
+ function zr(e, t, n, s) {
1182
1182
  const r = e[0];
1183
1183
  if (r === null)
1184
1184
  return !1;
1185
1185
  if (t === "display" || t === "visibility")
1186
1186
  return !0;
1187
- const i = e[e.length - 1], o = Ht(r, t), a = Ht(i, t);
1188
- return !o || !a ? !1 : Qr(e) || (n === "spring" || bt(n)) && s;
1187
+ const i = e[e.length - 1], o = Bt(r, t), a = Bt(i, t);
1188
+ return !o || !a ? !1 : Gr(e) || (n === "spring" || pt(n)) && s;
1189
1189
  }
1190
- function Qe(e) {
1190
+ function Xe(e) {
1191
1191
  e.duration = 0, e.type = "keyframes";
1192
1192
  }
1193
- const ti = /* @__PURE__ */ new Set([
1193
+ const Yr = /* @__PURE__ */ new Set([
1194
1194
  "opacity",
1195
1195
  "clipPath",
1196
1196
  "filter",
1197
1197
  "transform"
1198
1198
  // TODO: Could be re-enabled now we have support for linear() easing
1199
1199
  // "background-color"
1200
- ]), ni = /* @__PURE__ */ rt(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
1201
- function si(e) {
1200
+ ]), Xr = /* @__PURE__ */ tt(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
1201
+ function Zr(e) {
1202
1202
  const { motionValue: t, name: n, repeatDelay: s, repeatType: r, damping: i, type: o } = e;
1203
1203
  if (!(t?.owner?.current instanceof HTMLElement))
1204
1204
  return !1;
1205
- const { onUpdate: l, transformTemplate: f } = t.owner.getProps();
1206
- return ni() && n && ti.has(n) && (n !== "transform" || !f) && /**
1205
+ const { onUpdate: l, transformTemplate: c } = t.owner.getProps();
1206
+ return Xr() && n && Yr.has(n) && (n !== "transform" || !c) && /**
1207
1207
  * If we're outputting values to onUpdate then we can't use WAAPI as there's
1208
1208
  * no way to read the value from WAAPI every frame.
1209
1209
  */
1210
1210
  !l && !s && r !== "mirror" && i !== 0 && o !== "inertia";
1211
1211
  }
1212
- const ri = 40;
1213
- class ii extends pt {
1214
- constructor({ autoplay: t = !0, delay: n = 0, type: s = "keyframes", repeat: r = 0, repeatDelay: i = 0, repeatType: o = "loop", keyframes: a, name: l, motionValue: f, element: c, ...u }) {
1212
+ const Jr = 40;
1213
+ class Qr extends dt {
1214
+ constructor({ autoplay: t = !0, delay: n = 0, type: s = "keyframes", repeat: r = 0, repeatDelay: i = 0, repeatType: o = "loop", keyframes: a, name: l, motionValue: c, element: u, ...f }) {
1215
1215
  super(), this.stop = () => {
1216
1216
  this._animation && (this._animation.stop(), this.stopTimeline?.()), this.keyframeResolver?.cancel();
1217
- }, this.createdAt = I.now();
1217
+ }, this.createdAt = F.now();
1218
1218
  const d = {
1219
1219
  autoplay: t,
1220
1220
  delay: n,
@@ -1223,25 +1223,25 @@ class ii extends pt {
1223
1223
  repeatDelay: i,
1224
1224
  repeatType: o,
1225
1225
  name: l,
1226
- motionValue: f,
1227
- element: c,
1228
- ...u
1229
- }, h = c?.KeyframeResolver || yt;
1230
- this.keyframeResolver = new h(a, (m, y, T) => this.onKeyframesResolved(m, y, d, !T), l, f, c), this.keyframeResolver?.scheduleResolve();
1226
+ motionValue: c,
1227
+ element: u,
1228
+ ...f
1229
+ }, h = u?.KeyframeResolver || mt;
1230
+ this.keyframeResolver = new h(a, (m, y, T) => this.onKeyframesResolved(m, y, d, !T), l, c, u), this.keyframeResolver?.scheduleResolve();
1231
1231
  }
1232
1232
  onKeyframesResolved(t, n, s, r) {
1233
1233
  this.keyframeResolver = void 0;
1234
- const { name: i, type: o, velocity: a, delay: l, isHandoff: f, onUpdate: c } = s;
1235
- this.resolvedAt = I.now(), ei(t, i, o, a) || ((N.instantAnimations || !l) && c?.(mt(t, s, n)), t[0] = t[t.length - 1], Qe(s), s.repeat = 0);
1234
+ const { name: i, type: o, velocity: a, delay: l, isHandoff: c, onUpdate: u } = s;
1235
+ this.resolvedAt = F.now(), zr(t, i, o, a) || ((R.instantAnimations || !l) && u?.(ft(t, s, n)), t[0] = t[t.length - 1], Xe(s), s.repeat = 0);
1236
1236
  const d = {
1237
- startTime: r ? this.resolvedAt ? this.resolvedAt - this.createdAt > ri ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
1237
+ startTime: r ? this.resolvedAt ? this.resolvedAt - this.createdAt > Jr ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
1238
1238
  finalKeyframe: n,
1239
1239
  ...s,
1240
1240
  keyframes: t
1241
- }, h = !f && si(d) ? new Jr({
1241
+ }, h = !c && Zr(d) ? new jr({
1242
1242
  ...d,
1243
1243
  element: d.motionValue.owner.current
1244
- }) : new gt(d);
1244
+ }) : new ht(d);
1245
1245
  h.finished.then(() => this.notifyFinished()).catch(Z), this.pendingTimeline && (this.stopTimeline = h.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = h;
1246
1246
  }
1247
1247
  get finished() {
@@ -1252,7 +1252,7 @@ class ii extends pt {
1252
1252
  });
1253
1253
  }
1254
1254
  get animation() {
1255
- return this._animation || (this.keyframeResolver?.resume(), $r()), this._animation;
1255
+ return this._animation || (this.keyframeResolver?.resume(), Pr()), this._animation;
1256
1256
  }
1257
1257
  get duration() {
1258
1258
  return this.animation.duration;
@@ -1294,7 +1294,7 @@ class ii extends pt {
1294
1294
  this._animation && this.animation.cancel(), this.keyframeResolver?.cancel();
1295
1295
  }
1296
1296
  }
1297
- class oi {
1297
+ class ei {
1298
1298
  constructor(t) {
1299
1299
  this.stop = () => this.runAll("stop"), this.animations = t.filter(Boolean);
1300
1300
  }
@@ -1338,10 +1338,10 @@ class oi {
1338
1338
  return this.getAll("startTime");
1339
1339
  }
1340
1340
  get duration() {
1341
- return Wt(this.animations, "duration");
1341
+ return $t(this.animations, "duration");
1342
1342
  }
1343
1343
  get iterationDuration() {
1344
- return Wt(this.animations, "iterationDuration");
1344
+ return $t(this.animations, "iterationDuration");
1345
1345
  }
1346
1346
  runAll(t) {
1347
1347
  this.animations.forEach((n) => n[t]());
@@ -1359,7 +1359,7 @@ class oi {
1359
1359
  this.runAll("complete");
1360
1360
  }
1361
1361
  }
1362
- function Wt(e, t) {
1362
+ function $t(e, t) {
1363
1363
  let n = 0;
1364
1364
  for (let s = 0; s < e.length; s++) {
1365
1365
  const r = e[s][t];
@@ -1367,38 +1367,38 @@ function Wt(e, t) {
1367
1367
  }
1368
1368
  return n;
1369
1369
  }
1370
- class ai extends oi {
1370
+ class ti extends ei {
1371
1371
  then(t, n) {
1372
1372
  return this.finished.finally(t).then(() => {
1373
1373
  });
1374
1374
  }
1375
1375
  }
1376
- const li = (
1376
+ const ni = (
1377
1377
  // eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
1378
1378
  /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
1379
1379
  );
1380
- function ci(e) {
1381
- const t = li.exec(e);
1380
+ function si(e) {
1381
+ const t = ni.exec(e);
1382
1382
  if (!t)
1383
1383
  return [,];
1384
1384
  const [, n, s, r] = t;
1385
1385
  return [`--${n ?? s}`, r];
1386
1386
  }
1387
- function ts(e, t, n = 1) {
1388
- const [s, r] = ci(e);
1387
+ function Xn(e, t, n = 1) {
1388
+ const [s, r] = si(e);
1389
1389
  if (!s)
1390
1390
  return;
1391
1391
  const i = window.getComputedStyle(t).getPropertyValue(s);
1392
1392
  if (i) {
1393
1393
  const o = i.trim();
1394
- return wn(o) ? parseFloat(o) : o;
1394
+ return mn(o) ? parseFloat(o) : o;
1395
1395
  }
1396
- return ct(r) ? ts(r, t, n + 1) : r;
1396
+ return ot(r) ? Xn(r, t, n + 1) : r;
1397
1397
  }
1398
- function ns(e, t) {
1398
+ function Zn(e, t) {
1399
1399
  return e?.[t] ?? e?.default ?? e;
1400
1400
  }
1401
- const ss = /* @__PURE__ */ new Set([
1401
+ const Jn = /* @__PURE__ */ new Set([
1402
1402
  "width",
1403
1403
  "height",
1404
1404
  "top",
@@ -1406,46 +1406,46 @@ const ss = /* @__PURE__ */ new Set([
1406
1406
  "right",
1407
1407
  "bottom",
1408
1408
  ...ee
1409
- ]), ui = {
1409
+ ]), ri = {
1410
1410
  test: (e) => e === "auto",
1411
1411
  parse: (e) => e
1412
- }, rs = (e) => (t) => t.test(e), is = [J, p, z, q, nr, tr, ui], _t = (e) => is.find(rs(e));
1413
- function fi(e) {
1414
- return typeof e == "number" ? e === 0 : e !== null ? e === "none" || e === "0" || Tn(e) : !0;
1412
+ }, Qn = (e) => (t) => t.test(e), es = [J, p, z, $, Xs, Ys, ri], qt = (e) => es.find(Qn(e));
1413
+ function ii(e) {
1414
+ return typeof e == "number" ? e === 0 : e !== null ? e === "none" || e === "0" || pn(e) : !0;
1415
1415
  }
1416
- const di = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
1417
- function hi(e) {
1416
+ const oi = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
1417
+ function ai(e) {
1418
1418
  const [t, n] = e.slice(0, -1).split("(");
1419
1419
  if (t === "drop-shadow")
1420
1420
  return e;
1421
- const [s] = n.match(ut) || [];
1421
+ const [s] = n.match(at) || [];
1422
1422
  if (!s)
1423
1423
  return e;
1424
1424
  const r = n.replace(s, "");
1425
- let i = di.has(t) ? 1 : 0;
1425
+ let i = oi.has(t) ? 1 : 0;
1426
1426
  return s !== n && (i *= 100), t + "(" + i + r + ")";
1427
1427
  }
1428
- const mi = /\b([a-z-]*)\(.*?\)/gu, et = {
1428
+ const li = /\b([a-z-]*)\(.*?\)/gu, Ze = {
1429
1429
  ...Q,
1430
1430
  getAnimatableNone: (e) => {
1431
- const t = e.match(mi);
1432
- return t ? t.map(hi).join(" ") : e;
1431
+ const t = e.match(li);
1432
+ return t ? t.map(ai).join(" ") : e;
1433
1433
  }
1434
- }, Ut = {
1434
+ }, Wt = {
1435
1435
  ...J,
1436
1436
  transform: Math.round
1437
- }, pi = {
1438
- rotate: q,
1439
- rotateX: q,
1440
- rotateY: q,
1441
- rotateZ: q,
1437
+ }, ui = {
1438
+ rotate: $,
1439
+ rotateX: $,
1440
+ rotateY: $,
1441
+ rotateZ: $,
1442
1442
  scale: Te,
1443
1443
  scaleX: Te,
1444
1444
  scaleY: Te,
1445
1445
  scaleZ: Te,
1446
- skew: q,
1447
- skewX: q,
1448
- skewY: q,
1446
+ skew: $,
1447
+ skewX: $,
1448
+ skewY: $,
1449
1449
  distance: p,
1450
1450
  translateX: p,
1451
1451
  translateY: p,
@@ -1455,11 +1455,11 @@ const mi = /\b([a-z-]*)\(.*?\)/gu, et = {
1455
1455
  z: p,
1456
1456
  perspective: p,
1457
1457
  transformPerspective: p,
1458
- opacity: ce,
1459
- originX: It,
1460
- originY: It,
1458
+ opacity: ue,
1459
+ originX: kt,
1460
+ originY: kt,
1461
1461
  originZ: p
1462
- }, wt = {
1462
+ }, gt = {
1463
1463
  // Border props
1464
1464
  borderWidth: p,
1465
1465
  borderTopWidth: p,
@@ -1495,14 +1495,14 @@ const mi = /\b([a-z-]*)\(.*?\)/gu, et = {
1495
1495
  // Misc
1496
1496
  backgroundPositionX: p,
1497
1497
  backgroundPositionY: p,
1498
- ...pi,
1499
- zIndex: Ut,
1498
+ ...ui,
1499
+ zIndex: Wt,
1500
1500
  // SVG
1501
- fillOpacity: ce,
1502
- strokeOpacity: ce,
1503
- numOctaves: Ut
1504
- }, gi = {
1505
- ...wt,
1501
+ fillOpacity: ue,
1502
+ strokeOpacity: ue,
1503
+ numOctaves: Wt
1504
+ }, ci = {
1505
+ ...gt,
1506
1506
  // Color props
1507
1507
  color: k,
1508
1508
  backgroundColor: k,
@@ -1515,25 +1515,25 @@ const mi = /\b([a-z-]*)\(.*?\)/gu, et = {
1515
1515
  borderRightColor: k,
1516
1516
  borderBottomColor: k,
1517
1517
  borderLeftColor: k,
1518
- filter: et,
1519
- WebkitFilter: et
1520
- }, os = (e) => gi[e];
1521
- function as(e, t) {
1522
- let n = os(e);
1523
- return n !== et && (n = Q), n.getAnimatableNone ? n.getAnimatableNone(t) : void 0;
1524
- }
1525
- const yi = /* @__PURE__ */ new Set(["auto", "none", "0"]);
1526
- function bi(e, t, n) {
1518
+ filter: Ze,
1519
+ WebkitFilter: Ze
1520
+ }, ts = (e) => ci[e];
1521
+ function ns(e, t) {
1522
+ let n = ts(e);
1523
+ return n !== Ze && (n = Q), n.getAnimatableNone ? n.getAnimatableNone(t) : void 0;
1524
+ }
1525
+ const fi = /* @__PURE__ */ new Set(["auto", "none", "0"]);
1526
+ function di(e, t, n) {
1527
1527
  let s = 0, r;
1528
1528
  for (; s < e.length && !r; ) {
1529
1529
  const i = e[s];
1530
- typeof i == "string" && !yi.has(i) && ue(i).values.length && (r = e[s]), s++;
1530
+ typeof i == "string" && !fi.has(i) && ce(i).values.length && (r = e[s]), s++;
1531
1531
  }
1532
1532
  if (r && n)
1533
1533
  for (const i of t)
1534
- e[i] = as(n, r);
1534
+ e[i] = ns(n, r);
1535
1535
  }
1536
- class wi extends yt {
1536
+ class hi extends mt {
1537
1537
  constructor(t, n, s, r, i) {
1538
1538
  super(t, n, s, r, i, !0);
1539
1539
  }
@@ -1543,34 +1543,34 @@ class wi extends yt {
1543
1543
  return;
1544
1544
  super.readKeyframes();
1545
1545
  for (let l = 0; l < t.length; l++) {
1546
- let f = t[l];
1547
- if (typeof f == "string" && (f = f.trim(), ct(f))) {
1548
- const c = ts(f, n.current);
1549
- c !== void 0 && (t[l] = c), l === t.length - 1 && (this.finalKeyframe = f);
1546
+ let c = t[l];
1547
+ if (typeof c == "string" && (c = c.trim(), ot(c))) {
1548
+ const u = Xn(c, n.current);
1549
+ u !== void 0 && (t[l] = u), l === t.length - 1 && (this.finalKeyframe = c);
1550
1550
  }
1551
1551
  }
1552
- if (this.resolveNoneKeyframes(), !ss.has(s) || t.length !== 2)
1552
+ if (this.resolveNoneKeyframes(), !Jn.has(s) || t.length !== 2)
1553
1553
  return;
1554
- const [r, i] = t, o = _t(r), a = _t(i);
1554
+ const [r, i] = t, o = qt(r), a = qt(i);
1555
1555
  if (o !== a)
1556
- if (Bt(o) && Bt(a))
1556
+ if (Nt(o) && Nt(a))
1557
1557
  for (let l = 0; l < t.length; l++) {
1558
- const f = t[l];
1559
- typeof f == "string" && (t[l] = parseFloat(f));
1558
+ const c = t[l];
1559
+ typeof c == "string" && (t[l] = parseFloat(c));
1560
1560
  }
1561
- else W[s] && (this.needsMeasurement = !0);
1561
+ else H[s] && (this.needsMeasurement = !0);
1562
1562
  }
1563
1563
  resolveNoneKeyframes() {
1564
1564
  const { unresolvedKeyframes: t, name: n } = this, s = [];
1565
1565
  for (let r = 0; r < t.length; r++)
1566
- (t[r] === null || fi(t[r])) && s.push(r);
1567
- s.length && bi(t, s, n);
1566
+ (t[r] === null || ii(t[r])) && s.push(r);
1567
+ s.length && di(t, s, n);
1568
1568
  }
1569
1569
  measureInitialState() {
1570
1570
  const { element: t, unresolvedKeyframes: n, name: s } = this;
1571
1571
  if (!t || !t.current)
1572
1572
  return;
1573
- s === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = W[s](t.measureViewportBox(), window.getComputedStyle(t.current)), n[0] = this.measuredOrigin;
1573
+ s === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = H[s](t.measureViewportBox(), window.getComputedStyle(t.current)), n[0] = this.measuredOrigin;
1574
1574
  const r = n[n.length - 1];
1575
1575
  r !== void 0 && t.getValue(s, r).jump(r, !1);
1576
1576
  }
@@ -1581,12 +1581,12 @@ class wi extends yt {
1581
1581
  const r = t.getValue(n);
1582
1582
  r && r.jump(this.measuredOrigin, !1);
1583
1583
  const i = s.length - 1, o = s[i];
1584
- s[i] = W[n](t.measureViewportBox(), window.getComputedStyle(t.current)), o !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = o), this.removedTransforms?.length && this.removedTransforms.forEach(([a, l]) => {
1584
+ s[i] = H[n](t.measureViewportBox(), window.getComputedStyle(t.current)), o !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = o), this.removedTransforms?.length && this.removedTransforms.forEach(([a, l]) => {
1585
1585
  t.getValue(a).set(l);
1586
1586
  }), this.resolveNoneKeyframes();
1587
1587
  }
1588
1588
  }
1589
- function Ti(e, t, n) {
1589
+ function mi(e, t, n) {
1590
1590
  if (e instanceof EventTarget)
1591
1591
  return [e];
1592
1592
  if (typeof e == "string") {
@@ -1596,8 +1596,8 @@ function Ti(e, t, n) {
1596
1596
  }
1597
1597
  return Array.from(e);
1598
1598
  }
1599
- const ls = (e, t) => t && typeof e == "number" ? t.transform(e) : e, jt = 30, vi = (e) => !isNaN(parseFloat(e));
1600
- class Ai {
1599
+ const ss = (e, t) => t && typeof e == "number" ? t.transform(e) : e, Ht = 30, pi = (e) => !isNaN(parseFloat(e));
1600
+ class gi {
1601
1601
  /**
1602
1602
  * @param init - The initiating value
1603
1603
  * @param config - Optional configuration options
@@ -1606,14 +1606,14 @@ class Ai {
1606
1606
  */
1607
1607
  constructor(t, n = {}) {
1608
1608
  this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (s) => {
1609
- const r = I.now();
1609
+ const r = F.now();
1610
1610
  if (this.updatedAt !== r && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(s), this.current !== this.prev && (this.events.change?.notify(this.current), this.dependents))
1611
1611
  for (const i of this.dependents)
1612
1612
  i.dirty();
1613
1613
  }, this.hasAnimated = !1, this.setCurrent(t), this.owner = n.owner;
1614
1614
  }
1615
1615
  setCurrent(t) {
1616
- this.current = t, this.updatedAt = I.now(), this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity = vi(this.current));
1616
+ this.current = t, this.updatedAt = F.now(), this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity = pi(this.current));
1617
1617
  }
1618
1618
  setPrevFrameValue(t = this.current) {
1619
1619
  this.prevFrameValue = t, this.prevUpdatedAt = this.updatedAt;
@@ -1662,7 +1662,7 @@ class Ai {
1662
1662
  return this.on("change", t);
1663
1663
  }
1664
1664
  on(t, n) {
1665
- this.events[t] || (this.events[t] = new vn());
1665
+ this.events[t] || (this.events[t] = new gn());
1666
1666
  const s = this.events[t].add(n);
1667
1667
  return t === "change" ? () => {
1668
1668
  s(), K.read(() => {
@@ -1741,11 +1741,11 @@ class Ai {
1741
1741
  * @public
1742
1742
  */
1743
1743
  getVelocity() {
1744
- const t = I.now();
1745
- if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt > jt)
1744
+ const t = F.now();
1745
+ if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt > Ht)
1746
1746
  return 0;
1747
- const n = Math.min(this.updatedAt - this.prevUpdatedAt, jt);
1748
- return An(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
1747
+ const n = Math.min(this.updatedAt - this.prevUpdatedAt, Ht);
1748
+ return yn(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
1749
1749
  }
1750
1750
  /**
1751
1751
  * Registers a new animation to control this `MotionValue`. Only one
@@ -1797,124 +1797,124 @@ class Ai {
1797
1797
  }
1798
1798
  }
1799
1799
  function fe(e, t) {
1800
- return new Ai(e, t);
1800
+ return new gi(e, t);
1801
1801
  }
1802
- const { schedule: Si } = /* @__PURE__ */ Pn(queueMicrotask, !1);
1803
- function cs(e) {
1804
- return Os(e) && "ownerSVGElement" in e;
1802
+ const { schedule: yi } = /* @__PURE__ */ Cn(queueMicrotask, !1);
1803
+ function rs(e) {
1804
+ return Cs(e) && "ownerSVGElement" in e;
1805
1805
  }
1806
- function xi(e) {
1807
- return cs(e) && e.tagName === "svg";
1806
+ function bi(e) {
1807
+ return rs(e) && e.tagName === "svg";
1808
1808
  }
1809
- const C = (e) => !!(e && e.getVelocity), Ei = [...is, k, Q], Vi = (e) => Ei.find(rs(e));
1810
- function Tt(e) {
1809
+ const C = (e) => !!(e && e.getVelocity), wi = [...es, k, Q], Ti = (e) => wi.find(Qn(e));
1810
+ function yt(e) {
1811
1811
  return typeof e == "object" && !Array.isArray(e);
1812
1812
  }
1813
- function us(e, t, n, s) {
1814
- return typeof e == "string" && Tt(t) ? Ti(e, n, s) : e instanceof NodeList ? Array.from(e) : Array.isArray(e) ? e : [e];
1813
+ function is(e, t, n, s) {
1814
+ return typeof e == "string" && yt(t) ? mi(e, n, s) : e instanceof NodeList ? Array.from(e) : Array.isArray(e) ? e : [e];
1815
1815
  }
1816
- function Mi(e, t, n) {
1816
+ function Ai(e, t, n) {
1817
1817
  return e * (t + 1);
1818
1818
  }
1819
- function Gt(e, t, n, s) {
1819
+ function Ut(e, t, n, s) {
1820
1820
  return typeof t == "number" ? t : t.startsWith("-") || t.startsWith("+") ? Math.max(0, e + parseFloat(t)) : t === "<" ? n : t.startsWith("<") ? Math.max(0, n + parseFloat(t.slice(1))) : s.get(t) ?? e;
1821
1821
  }
1822
- function ki(e, t, n) {
1822
+ function vi(e, t, n) {
1823
1823
  for (let s = 0; s < e.length; s++) {
1824
1824
  const r = e[s];
1825
- r.at > t && r.at < n && (bn(e, r), s--);
1825
+ r.at > t && r.at < n && (hn(e, r), s--);
1826
1826
  }
1827
1827
  }
1828
- function Ci(e, t, n, s, r, i) {
1829
- ki(e, r, i);
1828
+ function Si(e, t, n, s, r, i) {
1829
+ vi(e, r, i);
1830
1830
  for (let o = 0; o < t.length; o++)
1831
1831
  e.push({
1832
1832
  value: t[o],
1833
1833
  at: pe(r, i, s[o]),
1834
- easing: Ln(n, o)
1834
+ easing: Mn(n, o)
1835
1835
  });
1836
1836
  }
1837
- function Di(e, t) {
1837
+ function xi(e, t) {
1838
1838
  for (let n = 0; n < e.length; n++)
1839
1839
  e[n] = e[n] / (t + 1);
1840
1840
  }
1841
- function Ii(e, t) {
1841
+ function Ei(e, t) {
1842
1842
  return e.at === t.at ? e.value === null ? 1 : t.value === null ? -1 : 0 : e.at - t.at;
1843
1843
  }
1844
- const Li = "easeInOut";
1845
- function Fi(e, { defaultTransition: t = {}, ...n } = {}, s, r) {
1846
- const i = t.duration || 0.3, o = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), l = {}, f = /* @__PURE__ */ new Map();
1847
- let c = 0, u = 0, d = 0;
1844
+ const Vi = "easeInOut";
1845
+ function Mi(e, { defaultTransition: t = {}, ...n } = {}, s, r) {
1846
+ const i = t.duration || 0.3, o = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), l = {}, c = /* @__PURE__ */ new Map();
1847
+ let u = 0, f = 0, d = 0;
1848
1848
  for (let h = 0; h < e.length; h++) {
1849
1849
  const m = e[h];
1850
1850
  if (typeof m == "string") {
1851
- f.set(m, u);
1851
+ c.set(m, f);
1852
1852
  continue;
1853
1853
  } else if (!Array.isArray(m)) {
1854
- f.set(m.name, Gt(u, m.at, c, f));
1854
+ c.set(m.name, Ut(f, m.at, u, c));
1855
1855
  continue;
1856
1856
  }
1857
1857
  let [y, T, b = {}] = m;
1858
- b.at !== void 0 && (u = Gt(u, b.at, c, f));
1858
+ b.at !== void 0 && (f = Ut(f, b.at, u, c));
1859
1859
  let x = 0;
1860
- const v = (S, g, A, V = 0, w = 0) => {
1861
- const E = Pi(S), { delay: D = 0, times: P = zn(E), type: De = "keyframes", repeat: ge, repeatType: Va, repeatDelay: Ma = 0, ...Fs } = g;
1862
- let { ease: B = t.ease || "easeOut", duration: R } = g;
1863
- const xt = typeof D == "function" ? D(V, w) : D, Et = E.length, Vt = bt(De) ? De : r?.[De || "keyframes"];
1864
- if (Et <= 2 && Vt) {
1860
+ const A = (S, g, v, V = 0, w = 0) => {
1861
+ const E = ki(S), { delay: D = 0, times: O = Hn(E), type: Ce = "keyframes", repeat: ge, repeatType: ga, repeatDelay: ya = 0, ...Ms } = g;
1862
+ let { ease: B = t.ease || "easeOut", duration: N } = g;
1863
+ const At = typeof D == "function" ? D(V, w) : D, vt = E.length, St = pt(Ce) ? Ce : r?.[Ce || "keyframes"];
1864
+ if (vt <= 2 && St) {
1865
1865
  let ne = 100;
1866
- if (Et === 2 && Ni(E)) {
1866
+ if (vt === 2 && Fi(E)) {
1867
1867
  const se = E[1] - E[0];
1868
1868
  ne = Math.abs(se);
1869
1869
  }
1870
- const ye = { ...Fs };
1871
- R !== void 0 && (ye.duration = /* @__PURE__ */ O(R));
1872
- const be = Un(ye, ne, Vt);
1873
- B = be.ease, R = be.duration;
1870
+ const ye = { ...Ms };
1871
+ N !== void 0 && (ye.duration = /* @__PURE__ */ P(N));
1872
+ const be = $n(ye, ne, St);
1873
+ B = be.ease, N = be.duration;
1874
1874
  }
1875
- R ?? (R = i);
1876
- const Mt = u + xt;
1877
- P.length === 1 && P[0] === 0 && (P[1] = 1);
1878
- const kt = P.length - E.length;
1879
- if (kt > 0 && Gn(P, kt), E.length === 1 && E.unshift(null), ge) {
1880
- R = Mi(R, ge);
1881
- const ne = [...E], ye = [...P];
1875
+ N ?? (N = i);
1876
+ const xt = f + At;
1877
+ O.length === 1 && O[0] === 0 && (O[1] = 1);
1878
+ const Et = O.length - E.length;
1879
+ if (Et > 0 && Wn(O, Et), E.length === 1 && E.unshift(null), ge) {
1880
+ N = Ai(N, ge);
1881
+ const ne = [...E], ye = [...O];
1882
1882
  B = Array.isArray(B) ? [...B] : [B];
1883
1883
  const be = [...B];
1884
1884
  for (let se = 0; se < ge; se++) {
1885
1885
  E.push(...ne);
1886
1886
  for (let re = 0; re < ne.length; re++)
1887
- P.push(ye[re] + (se + 1)), B.push(re === 0 ? "linear" : Ln(be, re - 1));
1887
+ O.push(ye[re] + (se + 1)), B.push(re === 0 ? "linear" : Mn(be, re - 1));
1888
1888
  }
1889
- Di(P, ge);
1889
+ xi(O, ge);
1890
1890
  }
1891
- const Ct = Mt + R;
1892
- Ci(A, E, B, P, Mt, Ct), x = Math.max(xt + R, x), d = Math.max(Ct, d);
1891
+ const Vt = xt + N;
1892
+ Si(v, E, B, O, xt, Vt), x = Math.max(At + N, x), d = Math.max(Vt, d);
1893
1893
  };
1894
1894
  if (C(y)) {
1895
- const S = zt(y, a);
1896
- v(T, b, Yt("default", S));
1895
+ const S = _t(y, a);
1896
+ A(T, b, jt("default", S));
1897
1897
  } else {
1898
- const S = us(y, T, s, l), g = S.length;
1899
- for (let A = 0; A < g; A++) {
1898
+ const S = is(y, T, s, l), g = S.length;
1899
+ for (let v = 0; v < g; v++) {
1900
1900
  T = T, b = b;
1901
- const V = S[A], w = zt(V, a);
1901
+ const V = S[v], w = _t(V, a);
1902
1902
  for (const E in T)
1903
- v(T[E], Oi(b, E), Yt(E, w), A, g);
1903
+ A(T[E], Ci(b, E), jt(E, w), v, g);
1904
1904
  }
1905
1905
  }
1906
- c = u, u += x;
1906
+ u = f, f += x;
1907
1907
  }
1908
1908
  return a.forEach((h, m) => {
1909
1909
  for (const y in h) {
1910
1910
  const T = h[y];
1911
- T.sort(Ii);
1912
- const b = [], x = [], v = [];
1911
+ T.sort(Ei);
1912
+ const b = [], x = [], A = [];
1913
1913
  for (let g = 0; g < T.length; g++) {
1914
- const { at: A, value: V, easing: w } = T[g];
1915
- b.push(V), x.push(/* @__PURE__ */ ot(0, d, A)), v.push(w || "easeOut");
1914
+ const { at: v, value: V, easing: w } = T[g];
1915
+ b.push(V), x.push(/* @__PURE__ */ st(0, d, v)), A.push(w || "easeOut");
1916
1916
  }
1917
- x[0] !== 0 && (x.unshift(0), b.unshift(b[0]), v.unshift(Li)), x[x.length - 1] !== 1 && (x.push(1), b.push(null)), o.has(m) || o.set(m, {
1917
+ x[0] !== 0 && (x.unshift(0), b.unshift(b[0]), A.unshift(Vi)), x[x.length - 1] !== 1 && (x.push(1), b.push(null)), o.has(m) || o.set(m, {
1918
1918
  keyframes: {},
1919
1919
  transition: {}
1920
1920
  });
@@ -1922,117 +1922,117 @@ function Fi(e, { defaultTransition: t = {}, ...n } = {}, s, r) {
1922
1922
  S.keyframes[y] = b, S.transition[y] = {
1923
1923
  ...t,
1924
1924
  duration: d,
1925
- ease: v,
1925
+ ease: A,
1926
1926
  times: x,
1927
1927
  ...n
1928
1928
  };
1929
1929
  }
1930
1930
  }), o;
1931
1931
  }
1932
- function zt(e, t) {
1932
+ function _t(e, t) {
1933
1933
  return !t.has(e) && t.set(e, {}), t.get(e);
1934
1934
  }
1935
- function Yt(e, t) {
1935
+ function jt(e, t) {
1936
1936
  return t[e] || (t[e] = []), t[e];
1937
1937
  }
1938
- function Pi(e) {
1938
+ function ki(e) {
1939
1939
  return Array.isArray(e) ? e : [e];
1940
1940
  }
1941
- function Oi(e, t) {
1941
+ function Ci(e, t) {
1942
1942
  return e && e[t] ? {
1943
1943
  ...e,
1944
1944
  ...e[t]
1945
1945
  } : { ...e };
1946
1946
  }
1947
- const Ri = (e) => typeof e == "number", Ni = (e) => e.every(Ri), de = /* @__PURE__ */ new WeakMap(), Ki = (e) => Array.isArray(e);
1948
- function Xt(e) {
1947
+ const Di = (e) => typeof e == "number", Fi = (e) => e.every(Di), de = /* @__PURE__ */ new WeakMap(), Li = (e) => Array.isArray(e);
1948
+ function Gt(e) {
1949
1949
  const t = [{}, {}];
1950
1950
  return e?.values.forEach((n, s) => {
1951
1951
  t[0][s] = n.get(), t[1][s] = n.getVelocity();
1952
1952
  }), t;
1953
1953
  }
1954
- function fs(e, t, n, s) {
1954
+ function os(e, t, n, s) {
1955
1955
  if (typeof t == "function") {
1956
- const [r, i] = Xt(s);
1956
+ const [r, i] = Gt(s);
1957
1957
  t = t(n !== void 0 ? n : e.custom, r, i);
1958
1958
  }
1959
1959
  if (typeof t == "string" && (t = e.variants && e.variants[t]), typeof t == "function") {
1960
- const [r, i] = Xt(s);
1960
+ const [r, i] = Gt(s);
1961
1961
  t = t(n !== void 0 ? n : e.custom, r, i);
1962
1962
  }
1963
1963
  return t;
1964
1964
  }
1965
- function Bi(e, t, n) {
1965
+ function Ii(e, t, n) {
1966
1966
  const s = e.getProps();
1967
- return fs(s, t, s.custom, e);
1967
+ return os(s, t, s.custom, e);
1968
1968
  }
1969
- function qi(e, t, n) {
1969
+ function Oi(e, t, n) {
1970
1970
  e.hasValue(t) ? e.getValue(t).set(n) : e.addValue(t, fe(n));
1971
1971
  }
1972
- function $i(e) {
1973
- return Ki(e) ? e[e.length - 1] || 0 : e;
1972
+ function Pi(e) {
1973
+ return Li(e) ? e[e.length - 1] || 0 : e;
1974
1974
  }
1975
- function Hi(e, t) {
1976
- const n = Bi(e, t);
1975
+ function Ni(e, t) {
1976
+ const n = Ii(e, t);
1977
1977
  let { transitionEnd: s = {}, transition: r = {}, ...i } = n || {};
1978
1978
  i = { ...i, ...s };
1979
1979
  for (const o in i) {
1980
- const a = $i(i[o]);
1981
- qi(e, o, a);
1980
+ const a = Pi(i[o]);
1981
+ Oi(e, o, a);
1982
1982
  }
1983
1983
  }
1984
- function Wi(e) {
1984
+ function Ri(e) {
1985
1985
  return !!(C(e) && e.add);
1986
1986
  }
1987
- function _i(e, t) {
1987
+ function Ki(e, t) {
1988
1988
  const n = e.getValue("willChange");
1989
- if (Wi(n))
1989
+ if (Ri(n))
1990
1990
  return n.add(t);
1991
- if (!n && N.WillChange) {
1992
- const s = new N.WillChange("auto");
1991
+ if (!n && R.WillChange) {
1992
+ const s = new R.WillChange("auto");
1993
1993
  e.addValue("willChange", s), s.add(t);
1994
1994
  }
1995
1995
  }
1996
- const vt = (e) => e.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), Ui = "framerAppearId", ji = "data-" + vt(Ui);
1997
- function Gi(e) {
1998
- return e.props[ji];
1996
+ const bt = (e) => e.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), Bi = "framerAppearId", $i = "data-" + bt(Bi);
1997
+ function qi(e) {
1998
+ return e.props[$i];
1999
1999
  }
2000
- const zi = (e) => e !== null;
2001
- function Yi(e, { repeat: t, repeatType: n = "loop" }, s) {
2002
- const r = e.filter(zi), i = t && n !== "loop" && t % 2 === 1 ? 0 : r.length - 1;
2000
+ const Wi = (e) => e !== null;
2001
+ function Hi(e, { repeat: t, repeatType: n = "loop" }, s) {
2002
+ const r = e.filter(Wi), i = t && n !== "loop" && t % 2 === 1 ? 0 : r.length - 1;
2003
2003
  return r[i];
2004
2004
  }
2005
- const Xi = {
2005
+ const Ui = {
2006
2006
  type: "spring",
2007
2007
  stiffness: 500,
2008
2008
  damping: 25,
2009
2009
  restSpeed: 10
2010
- }, Zi = (e) => ({
2010
+ }, _i = (e) => ({
2011
2011
  type: "spring",
2012
2012
  stiffness: 550,
2013
2013
  damping: e === 0 ? 2 * Math.sqrt(550) : 30,
2014
2014
  restSpeed: 10
2015
- }), Ji = {
2015
+ }), ji = {
2016
2016
  type: "keyframes",
2017
2017
  duration: 0.8
2018
- }, Qi = {
2018
+ }, Gi = {
2019
2019
  type: "keyframes",
2020
2020
  ease: [0.25, 0.1, 0.35, 1],
2021
2021
  duration: 0.3
2022
- }, eo = (e, { keyframes: t }) => t.length > 2 ? Ji : te.has(e) ? e.startsWith("scale") ? Zi(t[1]) : Xi : Qi;
2023
- function to({ when: e, delay: t, delayChildren: n, staggerChildren: s, staggerDirection: r, repeat: i, repeatType: o, repeatDelay: a, from: l, elapsed: f, ...c }) {
2024
- return !!Object.keys(c).length;
2025
- }
2026
- const ds = (e, t, n, s = {}, r, i) => (o) => {
2027
- const a = ns(s, e) || {}, l = a.delay || s.delay || 0;
2028
- let { elapsed: f = 0 } = s;
2029
- f = f - /* @__PURE__ */ O(l);
2030
- const c = {
2022
+ }, zi = (e, { keyframes: t }) => t.length > 2 ? ji : te.has(e) ? e.startsWith("scale") ? _i(t[1]) : Ui : Gi;
2023
+ function Yi({ when: e, delay: t, delayChildren: n, staggerChildren: s, staggerDirection: r, repeat: i, repeatType: o, repeatDelay: a, from: l, elapsed: c, ...u }) {
2024
+ return !!Object.keys(u).length;
2025
+ }
2026
+ const as = (e, t, n, s = {}, r, i) => (o) => {
2027
+ const a = Zn(s, e) || {}, l = a.delay || s.delay || 0;
2028
+ let { elapsed: c = 0 } = s;
2029
+ c = c - /* @__PURE__ */ P(l);
2030
+ const u = {
2031
2031
  keyframes: Array.isArray(n) ? n : [null, n],
2032
2032
  ease: "easeOut",
2033
2033
  velocity: t.getVelocity(),
2034
2034
  ...a,
2035
- delay: -f,
2035
+ delay: -c,
2036
2036
  onUpdate: (d) => {
2037
2037
  t.set(d), a.onUpdate && a.onUpdate(d);
2038
2038
  },
@@ -2043,62 +2043,62 @@ const ds = (e, t, n, s = {}, r, i) => (o) => {
2043
2043
  motionValue: t,
2044
2044
  element: i ? void 0 : r
2045
2045
  };
2046
- to(a) || Object.assign(c, eo(e, c)), c.duration && (c.duration = /* @__PURE__ */ O(c.duration)), c.repeatDelay && (c.repeatDelay = /* @__PURE__ */ O(c.repeatDelay)), c.from !== void 0 && (c.keyframes[0] = c.from);
2047
- let u = !1;
2048
- if ((c.type === !1 || c.duration === 0 && !c.repeatDelay) && (Qe(c), c.delay === 0 && (u = !0)), (N.instantAnimations || N.skipAnimations) && (u = !0, Qe(c), c.delay = 0), c.allowFlatten = !a.type && !a.ease, u && !i && t.get() !== void 0) {
2049
- const d = Yi(c.keyframes, a);
2046
+ Yi(a) || Object.assign(u, zi(e, u)), u.duration && (u.duration = /* @__PURE__ */ P(u.duration)), u.repeatDelay && (u.repeatDelay = /* @__PURE__ */ P(u.repeatDelay)), u.from !== void 0 && (u.keyframes[0] = u.from);
2047
+ let f = !1;
2048
+ if ((u.type === !1 || u.duration === 0 && !u.repeatDelay) && (Xe(u), u.delay === 0 && (f = !0)), (R.instantAnimations || R.skipAnimations) && (f = !0, Xe(u), u.delay = 0), u.allowFlatten = !a.type && !a.ease, f && !i && t.get() !== void 0) {
2049
+ const d = Hi(u.keyframes, a);
2050
2050
  if (d !== void 0) {
2051
2051
  K.update(() => {
2052
- c.onUpdate(d), c.onComplete();
2052
+ u.onUpdate(d), u.onComplete();
2053
2053
  });
2054
2054
  return;
2055
2055
  }
2056
2056
  }
2057
- return a.isSync ? new gt(c) : new ii(c);
2057
+ return a.isSync ? new ht(u) : new Qr(u);
2058
2058
  };
2059
- function no({ protectedKeys: e, needsAnimating: t }, n) {
2059
+ function Xi({ protectedKeys: e, needsAnimating: t }, n) {
2060
2060
  const s = e.hasOwnProperty(n) && t[n] !== !0;
2061
2061
  return t[n] = !1, s;
2062
2062
  }
2063
- function so(e, t, { delay: n = 0, transitionOverride: s, type: r } = {}) {
2063
+ function Zi(e, t, { delay: n = 0, transitionOverride: s, type: r } = {}) {
2064
2064
  let { transition: i = e.getDefaultTransition(), transitionEnd: o, ...a } = t;
2065
2065
  s && (i = s);
2066
- const l = [], f = r && e.animationState && e.animationState.getState()[r];
2067
- for (const c in a) {
2068
- const u = e.getValue(c, e.latestValues[c] ?? null), d = a[c];
2069
- if (d === void 0 || f && no(f, c))
2066
+ const l = [], c = r && e.animationState && e.animationState.getState()[r];
2067
+ for (const u in a) {
2068
+ const f = e.getValue(u, e.latestValues[u] ?? null), d = a[u];
2069
+ if (d === void 0 || c && Xi(c, u))
2070
2070
  continue;
2071
2071
  const h = {
2072
2072
  delay: n,
2073
- ...ns(i || {}, c)
2074
- }, m = u.get();
2075
- if (m !== void 0 && !u.isAnimating && !Array.isArray(d) && d === m && !h.velocity)
2073
+ ...Zn(i || {}, u)
2074
+ }, m = f.get();
2075
+ if (m !== void 0 && !f.isAnimating && !Array.isArray(d) && d === m && !h.velocity)
2076
2076
  continue;
2077
2077
  let y = !1;
2078
2078
  if (window.MotionHandoffAnimation) {
2079
- const b = Gi(e);
2079
+ const b = qi(e);
2080
2080
  if (b) {
2081
- const x = window.MotionHandoffAnimation(b, c, K);
2081
+ const x = window.MotionHandoffAnimation(b, u, K);
2082
2082
  x !== null && (h.startTime = x, y = !0);
2083
2083
  }
2084
2084
  }
2085
- _i(e, c), u.start(ds(c, u, d, e.shouldReduceMotion && ss.has(c) ? { type: !1 } : h, e, y));
2086
- const T = u.animation;
2085
+ Ki(e, u), f.start(as(u, f, d, e.shouldReduceMotion && Jn.has(u) ? { type: !1 } : h, e, y));
2086
+ const T = f.animation;
2087
2087
  T && l.push(T);
2088
2088
  }
2089
2089
  return o && Promise.all(l).then(() => {
2090
2090
  K.update(() => {
2091
- o && Hi(e, o);
2091
+ o && Ni(e, o);
2092
2092
  });
2093
2093
  }), l;
2094
2094
  }
2095
- function ro({ top: e, left: t, right: n, bottom: s }) {
2095
+ function Ji({ top: e, left: t, right: n, bottom: s }) {
2096
2096
  return {
2097
2097
  x: { min: t, max: n },
2098
2098
  y: { min: e, max: s }
2099
2099
  };
2100
2100
  }
2101
- function io(e, t) {
2101
+ function Qi(e, t) {
2102
2102
  if (!t)
2103
2103
  return e;
2104
2104
  const n = t({ x: e.left, y: e.top }), s = t({ x: e.right, y: e.bottom });
@@ -2109,10 +2109,10 @@ function io(e, t) {
2109
2109
  right: s.x
2110
2110
  };
2111
2111
  }
2112
- function oo(e, t) {
2113
- return ro(io(e.getBoundingClientRect(), t));
2112
+ function eo(e, t) {
2113
+ return Ji(Qi(e.getBoundingClientRect(), t));
2114
2114
  }
2115
- const Zt = {
2115
+ const zt = {
2116
2116
  animation: [
2117
2117
  "animate",
2118
2118
  "variants",
@@ -2131,30 +2131,30 @@ const Zt = {
2131
2131
  pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"],
2132
2132
  inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
2133
2133
  layout: ["layout", "layoutId"]
2134
- }, tt = {};
2135
- for (const e in Zt)
2136
- tt[e] = {
2137
- isEnabled: (t) => Zt[e].some((n) => !!t[n])
2134
+ }, Je = {};
2135
+ for (const e in zt)
2136
+ Je[e] = {
2137
+ isEnabled: (t) => zt[e].some((n) => !!t[n])
2138
2138
  };
2139
- const Jt = () => ({ min: 0, max: 0 }), At = () => ({
2140
- x: Jt(),
2141
- y: Jt()
2142
- }), ao = typeof window < "u", nt = { current: null }, hs = { current: !1 };
2143
- function lo() {
2144
- if (hs.current = !0, !!ao)
2139
+ const Yt = () => ({ min: 0, max: 0 }), wt = () => ({
2140
+ x: Yt(),
2141
+ y: Yt()
2142
+ }), to = typeof window < "u", Qe = { current: null }, ls = { current: !1 };
2143
+ function no() {
2144
+ if (ls.current = !0, !!to)
2145
2145
  if (window.matchMedia) {
2146
- const e = window.matchMedia("(prefers-reduced-motion)"), t = () => nt.current = e.matches;
2146
+ const e = window.matchMedia("(prefers-reduced-motion)"), t = () => Qe.current = e.matches;
2147
2147
  e.addEventListener("change", t), t();
2148
2148
  } else
2149
- nt.current = !1;
2149
+ Qe.current = !1;
2150
2150
  }
2151
- function co(e) {
2151
+ function so(e) {
2152
2152
  return e !== null && typeof e == "object" && typeof e.start == "function";
2153
2153
  }
2154
- function uo(e) {
2154
+ function ro(e) {
2155
2155
  return typeof e == "string" || Array.isArray(e);
2156
2156
  }
2157
- const fo = [
2157
+ const io = [
2158
2158
  "animate",
2159
2159
  "whileInView",
2160
2160
  "whileFocus",
@@ -2162,14 +2162,14 @@ const fo = [
2162
2162
  "whileTap",
2163
2163
  "whileDrag",
2164
2164
  "exit"
2165
- ], ho = ["initial", ...fo];
2166
- function ms(e) {
2167
- return co(e.animate) || ho.some((t) => uo(e[t]));
2165
+ ], oo = ["initial", ...io];
2166
+ function us(e) {
2167
+ return so(e.animate) || oo.some((t) => ro(e[t]));
2168
2168
  }
2169
- function mo(e) {
2170
- return !!(ms(e) || e.variants);
2169
+ function ao(e) {
2170
+ return !!(us(e) || e.variants);
2171
2171
  }
2172
- function po(e, t, n) {
2172
+ function lo(e, t, n) {
2173
2173
  for (const s in t) {
2174
2174
  const r = t[s], i = n[s];
2175
2175
  if (C(r))
@@ -2189,7 +2189,7 @@ function po(e, t, n) {
2189
2189
  t[s] === void 0 && e.removeValue(s);
2190
2190
  return t;
2191
2191
  }
2192
- const Qt = [
2192
+ const Xt = [
2193
2193
  "AnimationStart",
2194
2194
  "AnimationComplete",
2195
2195
  "Update",
@@ -2198,7 +2198,7 @@ const Qt = [
2198
2198
  "LayoutAnimationStart",
2199
2199
  "LayoutAnimationComplete"
2200
2200
  ];
2201
- class ps {
2201
+ class cs {
2202
2202
  /**
2203
2203
  * This method takes React props and returns found MotionValues. For example, HTML
2204
2204
  * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
@@ -2210,25 +2210,25 @@ class ps {
2210
2210
  return {};
2211
2211
  }
2212
2212
  constructor({ parent: t, props: n, presenceContext: s, reducedMotionConfig: r, blockInitialAnimation: i, visualState: o }, a = {}) {
2213
- this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = yt, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
2213
+ this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = mt, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
2214
2214
  this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
2215
2215
  }, this.renderScheduledAt = 0, this.scheduleRender = () => {
2216
- const d = I.now();
2216
+ const d = F.now();
2217
2217
  this.renderScheduledAt < d && (this.renderScheduledAt = d, K.render(this.render, !1, !0));
2218
2218
  };
2219
- const { latestValues: l, renderState: f } = o;
2220
- this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = n.initial ? { ...l } : {}, this.renderState = f, this.parent = t, this.props = n, this.presenceContext = s, this.depth = t ? t.depth + 1 : 0, this.reducedMotionConfig = r, this.options = a, this.blockInitialAnimation = !!i, this.isControllingVariants = ms(n), this.isVariantNode = mo(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(t && t.current);
2221
- const { willChange: c, ...u } = this.scrapeMotionValuesFromProps(n, {}, this);
2222
- for (const d in u) {
2223
- const h = u[d];
2219
+ const { latestValues: l, renderState: c } = o;
2220
+ this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = n.initial ? { ...l } : {}, this.renderState = c, this.parent = t, this.props = n, this.presenceContext = s, this.depth = t ? t.depth + 1 : 0, this.reducedMotionConfig = r, this.options = a, this.blockInitialAnimation = !!i, this.isControllingVariants = us(n), this.isVariantNode = ao(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(t && t.current);
2221
+ const { willChange: u, ...f } = this.scrapeMotionValuesFromProps(n, {}, this);
2222
+ for (const d in f) {
2223
+ const h = f[d];
2224
2224
  l[d] !== void 0 && C(h) && h.set(l[d]);
2225
2225
  }
2226
2226
  }
2227
2227
  mount(t) {
2228
- this.current = t, de.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((n, s) => this.bindToMotionValue(s, n)), hs.current || lo(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : nt.current, this.parent?.addChild(this), this.update(this.props, this.presenceContext);
2228
+ this.current = t, de.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((n, s) => this.bindToMotionValue(s, n)), ls.current || no(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : Qe.current, this.parent?.addChild(this), this.update(this.props, this.presenceContext);
2229
2229
  }
2230
2230
  unmount() {
2231
- this.projection && this.projection.unmount(), $e(this.notifyUpdate), $e(this.render), this.valueSubscriptions.forEach((t) => t()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent?.removeChild(this);
2231
+ this.projection && this.projection.unmount(), Ke(this.notifyUpdate), Ke(this.render), this.valueSubscriptions.forEach((t) => t()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent?.removeChild(this);
2232
2232
  for (const t in this.events)
2233
2233
  this.events[t].clear();
2234
2234
  for (const t in this.features) {
@@ -2260,8 +2260,8 @@ class ps {
2260
2260
  }
2261
2261
  updateFeatures() {
2262
2262
  let t = "animation";
2263
- for (t in tt) {
2264
- const n = tt[t];
2263
+ for (t in Je) {
2264
+ const n = Je[t];
2265
2265
  if (!n)
2266
2266
  continue;
2267
2267
  const { isEnabled: s, Feature: r } = n;
@@ -2280,7 +2280,7 @@ class ps {
2280
2280
  * removed with a re-render to work.
2281
2281
  */
2282
2282
  measureViewportBox() {
2283
- return this.current ? this.measureInstanceViewportBox(this.current, this.props) : At();
2283
+ return this.current ? this.measureInstanceViewportBox(this.current, this.props) : wt();
2284
2284
  }
2285
2285
  getStaticValue(t) {
2286
2286
  return this.latestValues[t];
@@ -2294,13 +2294,13 @@ class ps {
2294
2294
  */
2295
2295
  update(t, n) {
2296
2296
  (t.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = t, this.prevPresenceContext = this.presenceContext, this.presenceContext = n;
2297
- for (let s = 0; s < Qt.length; s++) {
2298
- const r = Qt[s];
2297
+ for (let s = 0; s < Xt.length; s++) {
2298
+ const r = Xt[s];
2299
2299
  this.propEventSubscriptions[r] && (this.propEventSubscriptions[r](), delete this.propEventSubscriptions[r]);
2300
2300
  const i = "on" + r, o = t[i];
2301
2301
  o && (this.propEventSubscriptions[r] = this.on(r, o));
2302
2302
  }
2303
- this.prevMotionValues = po(this, this.scrapeMotionValuesFromProps(t, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
2303
+ this.prevMotionValues = lo(this, this.scrapeMotionValuesFromProps(t, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
2304
2304
  }
2305
2305
  getProps() {
2306
2306
  return this.props;
@@ -2365,7 +2365,7 @@ class ps {
2365
2365
  */
2366
2366
  readValue(t, n) {
2367
2367
  let s = this.latestValues[t] !== void 0 || !this.current ? this.latestValues[t] : this.getBaseTargetFromProps(this.props, t) ?? this.readValueFromInstance(this.current, t, this.options);
2368
- return s != null && (typeof s == "string" && (wn(s) || Tn(s)) ? s = parseFloat(s) : !Vi(s) && Q.test(n) && (s = as(t, n)), this.setBaseTarget(t, C(s) ? s.get() : s)), C(s) ? s.get() : s;
2368
+ return s != null && (typeof s == "string" && (mn(s) || pn(s)) ? s = parseFloat(s) : !Ti(s) && Q.test(n) && (s = ns(t, n)), this.setBaseTarget(t, C(s) ? s.get() : s)), C(s) ? s.get() : s;
2369
2369
  }
2370
2370
  /**
2371
2371
  * Set the base target to later animate back to. This is currently
@@ -2382,7 +2382,7 @@ class ps {
2382
2382
  const { initial: n } = this.props;
2383
2383
  let s;
2384
2384
  if (typeof n == "string" || typeof n == "object") {
2385
- const i = fs(this.props, n, this.presenceContext?.custom);
2385
+ const i = os(this.props, n, this.presenceContext?.custom);
2386
2386
  i && (s = i[t]);
2387
2387
  }
2388
2388
  if (n && s !== void 0)
@@ -2391,18 +2391,18 @@ class ps {
2391
2391
  return r !== void 0 && !C(r) ? r : this.initialValues[t] !== void 0 && s === void 0 ? void 0 : this.baseTarget[t];
2392
2392
  }
2393
2393
  on(t, n) {
2394
- return this.events[t] || (this.events[t] = new vn()), this.events[t].add(n);
2394
+ return this.events[t] || (this.events[t] = new gn()), this.events[t].add(n);
2395
2395
  }
2396
2396
  notify(t, ...n) {
2397
2397
  this.events[t] && this.events[t].notify(...n);
2398
2398
  }
2399
2399
  scheduleRenderMicrotask() {
2400
- Si.render(this.render);
2400
+ yi.render(this.render);
2401
2401
  }
2402
2402
  }
2403
- class gs extends ps {
2403
+ class fs extends cs {
2404
2404
  constructor() {
2405
- super(...arguments), this.KeyframeResolver = wi;
2405
+ super(...arguments), this.KeyframeResolver = hi;
2406
2406
  }
2407
2407
  sortInstanceNodePosition(t, n) {
2408
2408
  return t.compareDocumentPosition(n) & 2 ? 1 : -1;
@@ -2421,53 +2421,53 @@ class gs extends ps {
2421
2421
  }));
2422
2422
  }
2423
2423
  }
2424
- const go = {
2424
+ const uo = {
2425
2425
  x: "translateX",
2426
2426
  y: "translateY",
2427
2427
  z: "translateZ",
2428
2428
  transformPerspective: "perspective"
2429
- }, yo = ee.length;
2430
- function bo(e, t, n) {
2429
+ }, co = ee.length;
2430
+ function fo(e, t, n) {
2431
2431
  let s = "", r = !0;
2432
- for (let i = 0; i < yo; i++) {
2432
+ for (let i = 0; i < co; i++) {
2433
2433
  const o = ee[i], a = e[o];
2434
2434
  if (a === void 0)
2435
2435
  continue;
2436
2436
  let l = !0;
2437
2437
  if (typeof a == "number" ? l = a === (o.startsWith("scale") ? 1 : 0) : l = parseFloat(a) === 0, !l || n) {
2438
- const f = ls(a, wt[o]);
2438
+ const c = ss(a, gt[o]);
2439
2439
  if (!l) {
2440
2440
  r = !1;
2441
- const c = go[o] || o;
2442
- s += `${c}(${f}) `;
2441
+ const u = uo[o] || o;
2442
+ s += `${u}(${c}) `;
2443
2443
  }
2444
- n && (t[o] = f);
2444
+ n && (t[o] = c);
2445
2445
  }
2446
2446
  }
2447
2447
  return s = s.trim(), n ? s = n(t, r ? "" : s) : r && (s = "none"), s;
2448
2448
  }
2449
- function ys(e, t, n) {
2449
+ function ds(e, t, n) {
2450
2450
  const { style: s, vars: r, transformOrigin: i } = e;
2451
2451
  let o = !1, a = !1;
2452
2452
  for (const l in t) {
2453
- const f = t[l];
2453
+ const c = t[l];
2454
2454
  if (te.has(l)) {
2455
2455
  o = !0;
2456
2456
  continue;
2457
- } else if (Rn(l)) {
2458
- r[l] = f;
2457
+ } else if (Fn(l)) {
2458
+ r[l] = c;
2459
2459
  continue;
2460
2460
  } else {
2461
- const c = ls(f, wt[l]);
2462
- l.startsWith("origin") ? (a = !0, i[l] = c) : s[l] = c;
2461
+ const u = ss(c, gt[l]);
2462
+ l.startsWith("origin") ? (a = !0, i[l] = u) : s[l] = u;
2463
2463
  }
2464
2464
  }
2465
- if (t.transform || (o || n ? s.transform = bo(t, e.transform, n) : s.transform && (s.transform = "none")), a) {
2466
- const { originX: l = "50%", originY: f = "50%", originZ: c = 0 } = i;
2467
- s.transformOrigin = `${l} ${f} ${c}`;
2465
+ if (t.transform || (o || n ? s.transform = fo(t, e.transform, n) : s.transform && (s.transform = "none")), a) {
2466
+ const { originX: l = "50%", originY: c = "50%", originZ: u = 0 } = i;
2467
+ s.transformOrigin = `${l} ${c} ${u}`;
2468
2468
  }
2469
2469
  }
2470
- function bs(e, { style: t, vars: n }, s, r) {
2470
+ function hs(e, { style: t, vars: n }, s, r) {
2471
2471
  const i = e.style;
2472
2472
  let o;
2473
2473
  for (o in t)
@@ -2476,50 +2476,50 @@ function bs(e, { style: t, vars: n }, s, r) {
2476
2476
  for (o in n)
2477
2477
  i.setProperty(o, n[o]);
2478
2478
  }
2479
- const wo = {};
2480
- function To(e, { layout: t, layoutId: n }) {
2481
- return te.has(e) || e.startsWith("origin") || (t || n !== void 0) && (!!wo[e] || e === "opacity");
2479
+ const ho = {};
2480
+ function mo(e, { layout: t, layoutId: n }) {
2481
+ return te.has(e) || e.startsWith("origin") || (t || n !== void 0) && (!!ho[e] || e === "opacity");
2482
2482
  }
2483
- function ws(e, t, n) {
2483
+ function ms(e, t, n) {
2484
2484
  const { style: s } = e, r = {};
2485
2485
  for (const i in s)
2486
- (C(s[i]) || t.style && C(t.style[i]) || To(i, e) || n?.getValue(i)?.liveStyle !== void 0) && (r[i] = s[i]);
2486
+ (C(s[i]) || t.style && C(t.style[i]) || mo(i, e) || n?.getValue(i)?.liveStyle !== void 0) && (r[i] = s[i]);
2487
2487
  return r;
2488
2488
  }
2489
- function vo(e) {
2489
+ function po(e) {
2490
2490
  return window.getComputedStyle(e);
2491
2491
  }
2492
- class Ao extends gs {
2492
+ class go extends fs {
2493
2493
  constructor() {
2494
- super(...arguments), this.type = "html", this.renderInstance = bs;
2494
+ super(...arguments), this.type = "html", this.renderInstance = hs;
2495
2495
  }
2496
2496
  readValueFromInstance(t, n) {
2497
2497
  if (te.has(n))
2498
- return this.projection?.isProjecting ? ze(n) : Rr(t, n);
2498
+ return this.projection?.isProjecting ? _e(n) : Dr(t, n);
2499
2499
  {
2500
- const s = vo(t), r = (Rn(n) ? s.getPropertyValue(n) : s[n]) || 0;
2500
+ const s = po(t), r = (Fn(n) ? s.getPropertyValue(n) : s[n]) || 0;
2501
2501
  return typeof r == "string" ? r.trim() : r;
2502
2502
  }
2503
2503
  }
2504
2504
  measureInstanceViewportBox(t, { transformPagePoint: n }) {
2505
- return oo(t, n);
2505
+ return eo(t, n);
2506
2506
  }
2507
2507
  build(t, n, s) {
2508
- ys(t, n, s.transformTemplate);
2508
+ ds(t, n, s.transformTemplate);
2509
2509
  }
2510
2510
  scrapeMotionValuesFromProps(t, n, s) {
2511
- return ws(t, n, s);
2511
+ return ms(t, n, s);
2512
2512
  }
2513
2513
  }
2514
- function So(e, t) {
2514
+ function yo(e, t) {
2515
2515
  return e in t;
2516
2516
  }
2517
- class xo extends ps {
2517
+ class bo extends cs {
2518
2518
  constructor() {
2519
2519
  super(...arguments), this.type = "object";
2520
2520
  }
2521
2521
  readValueFromInstance(t, n) {
2522
- if (So(n, t)) {
2522
+ if (yo(n, t)) {
2523
2523
  const s = t[n];
2524
2524
  if (typeof s == "string" || typeof s == "number")
2525
2525
  return s;
@@ -2531,7 +2531,7 @@ class xo extends ps {
2531
2531
  delete n.output[t];
2532
2532
  }
2533
2533
  measureInstanceViewportBox() {
2534
- return At();
2534
+ return wt();
2535
2535
  }
2536
2536
  build(t, n) {
2537
2537
  Object.assign(t.output, n);
@@ -2543,21 +2543,21 @@ class xo extends ps {
2543
2543
  return 0;
2544
2544
  }
2545
2545
  }
2546
- const Eo = {
2546
+ const wo = {
2547
2547
  offset: "stroke-dashoffset",
2548
2548
  array: "stroke-dasharray"
2549
- }, Vo = {
2549
+ }, To = {
2550
2550
  offset: "strokeDashoffset",
2551
2551
  array: "strokeDasharray"
2552
2552
  };
2553
- function Mo(e, t, n = 1, s = 0, r = !0) {
2553
+ function Ao(e, t, n = 1, s = 0, r = !0) {
2554
2554
  e.pathLength = 1;
2555
- const i = r ? Eo : Vo;
2555
+ const i = r ? wo : To;
2556
2556
  e[i.offset] = p.transform(-s);
2557
2557
  const o = p.transform(t), a = p.transform(n);
2558
2558
  e[i.array] = `${o} ${a}`;
2559
2559
  }
2560
- function ko(e, {
2560
+ function vo(e, {
2561
2561
  attrX: t,
2562
2562
  attrY: n,
2563
2563
  attrScale: s,
@@ -2566,16 +2566,16 @@ function ko(e, {
2566
2566
  pathOffset: o = 0,
2567
2567
  // This is object creation, which we try to avoid per-frame.
2568
2568
  ...a
2569
- }, l, f, c) {
2570
- if (ys(e, a, f), l) {
2569
+ }, l, c, u) {
2570
+ if (ds(e, a, c), l) {
2571
2571
  e.style.viewBox && (e.attrs.viewBox = e.style.viewBox);
2572
2572
  return;
2573
2573
  }
2574
2574
  e.attrs = e.style, e.style = {};
2575
- const { attrs: u, style: d } = e;
2576
- u.transform && (d.transform = u.transform, delete u.transform), (d.transform || u.transformOrigin) && (d.transformOrigin = u.transformOrigin ?? "50% 50%", delete u.transformOrigin), d.transform && (d.transformBox = c?.transformBox ?? "fill-box", delete u.transformBox), t !== void 0 && (u.x = t), n !== void 0 && (u.y = n), s !== void 0 && (u.scale = s), r !== void 0 && Mo(u, r, i, o, !1);
2575
+ const { attrs: f, style: d } = e;
2576
+ f.transform && (d.transform = f.transform, delete f.transform), (d.transform || f.transformOrigin) && (d.transformOrigin = f.transformOrigin ?? "50% 50%", delete f.transformOrigin), d.transform && (d.transformBox = u?.transformBox ?? "fill-box", delete f.transformBox), t !== void 0 && (f.x = t), n !== void 0 && (f.y = n), s !== void 0 && (f.scale = s), r !== void 0 && Ao(f, r, i, o, !1);
2577
2577
  }
2578
- const Ts = /* @__PURE__ */ new Set([
2578
+ const ps = /* @__PURE__ */ new Set([
2579
2579
  "baseFrequency",
2580
2580
  "diffuseConstant",
2581
2581
  "kernelMatrix",
@@ -2599,14 +2599,14 @@ const Ts = /* @__PURE__ */ new Set([
2599
2599
  "startOffset",
2600
2600
  "textLength",
2601
2601
  "lengthAdjust"
2602
- ]), Co = (e) => typeof e == "string" && e.toLowerCase() === "svg";
2603
- function Do(e, t, n, s) {
2604
- bs(e, t, void 0, s);
2602
+ ]), So = (e) => typeof e == "string" && e.toLowerCase() === "svg";
2603
+ function xo(e, t, n, s) {
2604
+ hs(e, t, void 0, s);
2605
2605
  for (const r in t.attrs)
2606
- e.setAttribute(Ts.has(r) ? r : vt(r), t.attrs[r]);
2606
+ e.setAttribute(ps.has(r) ? r : bt(r), t.attrs[r]);
2607
2607
  }
2608
- function Io(e, t, n) {
2609
- const s = ws(e, t, n);
2608
+ function Eo(e, t, n) {
2609
+ const s = ms(e, t, n);
2610
2610
  for (const r in e)
2611
2611
  if (C(e[r]) || C(t[r])) {
2612
2612
  const i = ee.indexOf(r) !== -1 ? "attr" + r.charAt(0).toUpperCase() + r.substring(1) : r;
@@ -2614,34 +2614,34 @@ function Io(e, t, n) {
2614
2614
  }
2615
2615
  return s;
2616
2616
  }
2617
- class Lo extends gs {
2617
+ class Vo extends fs {
2618
2618
  constructor() {
2619
- super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = At;
2619
+ super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = wt;
2620
2620
  }
2621
2621
  getBaseTargetFromProps(t, n) {
2622
2622
  return t[n];
2623
2623
  }
2624
2624
  readValueFromInstance(t, n) {
2625
2625
  if (te.has(n)) {
2626
- const s = os(n);
2626
+ const s = ts(n);
2627
2627
  return s && s.default || 0;
2628
2628
  }
2629
- return n = Ts.has(n) ? n : vt(n), t.getAttribute(n);
2629
+ return n = ps.has(n) ? n : bt(n), t.getAttribute(n);
2630
2630
  }
2631
2631
  scrapeMotionValuesFromProps(t, n, s) {
2632
- return Io(t, n, s);
2632
+ return Eo(t, n, s);
2633
2633
  }
2634
2634
  build(t, n, s) {
2635
- ko(t, n, this.isSVGTag, s.transformTemplate, s.style);
2635
+ vo(t, n, this.isSVGTag, s.transformTemplate, s.style);
2636
2636
  }
2637
2637
  renderInstance(t, n, s, r) {
2638
- Do(t, n, s, r);
2638
+ xo(t, n, s, r);
2639
2639
  }
2640
2640
  mount(t) {
2641
- this.isSVGTag = Co(t.tagName), super.mount(t);
2641
+ this.isSVGTag = So(t.tagName), super.mount(t);
2642
2642
  }
2643
2643
  }
2644
- function Fo(e) {
2644
+ function Mo(e) {
2645
2645
  const t = {
2646
2646
  presenceContext: null,
2647
2647
  props: {},
@@ -2655,10 +2655,10 @@ function Fo(e) {
2655
2655
  },
2656
2656
  latestValues: {}
2657
2657
  }
2658
- }, n = cs(e) && !xi(e) ? new Lo(t) : new Ao(t);
2658
+ }, n = rs(e) && !bi(e) ? new Vo(t) : new go(t);
2659
2659
  n.mount(e), de.set(e, n);
2660
2660
  }
2661
- function Po(e) {
2661
+ function ko(e) {
2662
2662
  const t = {
2663
2663
  presenceContext: null,
2664
2664
  props: {},
@@ -2668,56 +2668,56 @@ function Po(e) {
2668
2668
  },
2669
2669
  latestValues: {}
2670
2670
  }
2671
- }, n = new xo(t);
2671
+ }, n = new bo(t);
2672
2672
  n.mount(e), de.set(e, n);
2673
2673
  }
2674
- function Oo(e, t, n) {
2674
+ function Co(e, t, n) {
2675
2675
  const s = C(e) ? e : fe(e);
2676
- return s.start(ds("", s, t, n)), s.animation;
2676
+ return s.start(as("", s, t, n)), s.animation;
2677
2677
  }
2678
- function Ro(e, t) {
2679
- return C(e) || typeof e == "number" || typeof e == "string" && !Tt(t);
2678
+ function Do(e, t) {
2679
+ return C(e) || typeof e == "number" || typeof e == "string" && !yt(t);
2680
2680
  }
2681
- function vs(e, t, n, s) {
2681
+ function gs(e, t, n, s) {
2682
2682
  const r = [];
2683
- if (Ro(e, t))
2684
- r.push(Oo(e, Tt(t) && t.default || t, n && (n.default || n)));
2683
+ if (Do(e, t))
2684
+ r.push(Co(e, yt(t) && t.default || t, n && (n.default || n)));
2685
2685
  else {
2686
- const i = us(e, t, s), o = i.length;
2686
+ const i = is(e, t, s), o = i.length;
2687
2687
  for (let a = 0; a < o; a++) {
2688
- const l = i[a], f = l instanceof Element ? Fo : Po;
2689
- de.has(l) || f(l);
2690
- const c = de.get(l), u = { ...n };
2691
- "delay" in u && typeof u.delay == "function" && (u.delay = u.delay(a, o)), r.push(...so(c, { ...t, transition: u }, {}));
2688
+ const l = i[a], c = l instanceof Element ? Mo : ko;
2689
+ de.has(l) || c(l);
2690
+ const u = de.get(l), f = { ...n };
2691
+ "delay" in f && typeof f.delay == "function" && (f.delay = f.delay(a, o)), r.push(...Zi(u, { ...t, transition: f }, {}));
2692
2692
  }
2693
2693
  }
2694
2694
  return r;
2695
2695
  }
2696
- function No(e, t, n) {
2696
+ function Fo(e, t, n) {
2697
2697
  const s = [];
2698
- return Fi(e, t, n, { spring: X }).forEach(({ keyframes: i, transition: o }, a) => {
2699
- s.push(...vs(a, i, o));
2698
+ return Mi(e, t, n, { spring: X }).forEach(({ keyframes: i, transition: o }, a) => {
2699
+ s.push(...gs(a, i, o));
2700
2700
  }), s;
2701
2701
  }
2702
- function Ko(e) {
2702
+ function Lo(e) {
2703
2703
  return Array.isArray(e) && e.some(Array.isArray);
2704
2704
  }
2705
- function Bo(e) {
2705
+ function Io(e) {
2706
2706
  function t(n, s, r) {
2707
2707
  let i = [], o;
2708
- if (Ko(n))
2709
- i = No(n, s, e);
2708
+ if (Lo(n))
2709
+ i = Fo(n, s, e);
2710
2710
  else {
2711
- const { onComplete: l, ...f } = r || {};
2712
- typeof l == "function" && (o = l), i = vs(n, s, f, e);
2711
+ const { onComplete: l, ...c } = r || {};
2712
+ typeof l == "function" && (o = l), i = gs(n, s, c, e);
2713
2713
  }
2714
- const a = new ai(i);
2714
+ const a = new ti(i);
2715
2715
  return o && a.finished.then(o), a;
2716
2716
  }
2717
2717
  return t;
2718
2718
  }
2719
- const L = Bo();
2720
- function qo(e) {
2719
+ const L = Io();
2720
+ function Oo(e) {
2721
2721
  return new Worker(
2722
2722
  "" + new URL("assets/worker-DbYry4sK.js", import.meta.url).href,
2723
2723
  {
@@ -2725,30 +2725,30 @@ function qo(e) {
2725
2725
  }
2726
2726
  );
2727
2727
  }
2728
- const Oe = /* @__PURE__ */ new Map(), en = "data-highlighted", tn = Array.from({ length: 5 }, () => ({
2729
- worker: new qo(),
2728
+ const Oe = /* @__PURE__ */ new Map(), Zt = "data-highlighted", Jt = Array.from({ length: 5 }, () => ({
2729
+ worker: new Oo(),
2730
2730
  isBusy: !1
2731
2731
  }));
2732
- function $o() {
2732
+ function Po() {
2733
2733
  return new Promise((e) => {
2734
- const t = tn.find((s) => !s.isBusy);
2734
+ const t = Jt.find((s) => !s.isBusy);
2735
2735
  t && (t.isBusy = !0, e(t));
2736
2736
  const n = setInterval(() => {
2737
- const s = tn.find((r) => !r.isBusy);
2737
+ const s = Jt.find((r) => !r.isBusy);
2738
2738
  s && (s.isBusy = !0, clearInterval(n), e(s));
2739
2739
  }, Math.random() * 100);
2740
2740
  });
2741
2741
  }
2742
- async function Ho(e, t) {
2743
- const n = await $o();
2742
+ async function No(e, t) {
2743
+ const n = await Po();
2744
2744
  return n.isBusy = !0, new Promise((s) => {
2745
2745
  n.worker.onmessage = (r) => {
2746
2746
  n.isBusy = !1, s(r.data);
2747
2747
  }, n.worker.postMessage({ lang: e, text: t });
2748
2748
  });
2749
2749
  }
2750
- async function Wo(e, t) {
2751
- if (e.getAttribute(en) === "true")
2750
+ async function Ro(e, t) {
2751
+ if (e.getAttribute(Zt) === "true")
2752
2752
  return;
2753
2753
  let s = e.getAttribute("data-source-code");
2754
2754
  if (!s)
@@ -2757,15 +2757,15 @@ async function Wo(e, t) {
2757
2757
  s = decodeURIComponent(s).trim();
2758
2758
  let i = "";
2759
2759
  const o = `${r}:::${s}`;
2760
- Oe.has(o) ? i = Oe.get(o) : (i = await Ho(r, s), Oe.set(o, i)), e.insertAdjacentHTML("beforeend", i), e.setAttribute(en, "true");
2760
+ Oe.has(o) ? i = Oe.get(o) : (i = await No(r, s), Oe.set(o, i)), e.insertAdjacentHTML("beforeend", i), e.setAttribute(Zt, "true");
2761
2761
  }
2762
- const nn = () => window.matchMedia("(max-width: 768px)").matches;
2763
- function As(e, t) {
2762
+ const Qt = () => window.matchMedia("(max-width: 768px)").matches;
2763
+ function ys(e, t) {
2764
2764
  let n;
2765
2765
  const s = async (o, a) => {
2766
2766
  if (!e.open)
2767
2767
  return;
2768
- const l = nn();
2768
+ const l = Qt();
2769
2769
  o?.(l), l ? (L(e, { opacity: 0, y: [0, 250] }, { duration: 0.3, ease: "easeOut" }), await L(t, { opacity: 0 }, { duration: 0.3, ease: "easeOut" })) : (L(e, { opacity: 0, scale: [1, 0.98] }, { duration: 0.3, ease: "easeOut" }), await L(t, { opacity: 0 }, { duration: 0.3, ease: "linear" }).then(() => t.style.display = "none")), a?.(l), e.close(), n && n.abort();
2770
2770
  };
2771
2771
  async function r(o) {
@@ -2777,16 +2777,16 @@ function As(e, t) {
2777
2777
  return { show: async (o, a) => {
2778
2778
  n = new AbortController();
2779
2779
  const l = window.scrollY;
2780
- e.showModal(), await new Promise((c) => setTimeout(c, 50)), window.scrollTo(0, l), setTimeout(() => window.scrollTo(0, l), 0), setTimeout(() => window.scrollTo(0, l), 50), t.style.display = "block";
2781
- const f = nn();
2782
- o?.(f), f ? (e.style.overflowY = "hidden", L(e, { opacity: [0, 1], y: [250, 0] }, { duration: 0.3, ease: "easeOut" }), await L(t, { opacity: [0, 1] }, { duration: 0.3, ease: "easeOut" }), e.style.overflowY = "auto") : (L(e, { opacity: [0, 1], scale: [0.98, 1] }, { duration: 0.3, ease: "easeOut" }), L(t, { opacity: [0, 1] }, { duration: 0.3, ease: "easeOut" })), a?.(f), setTimeout(() => document.addEventListener("click", r, {
2780
+ e.showModal(), await new Promise((u) => setTimeout(u, 50)), window.scrollTo(0, l), setTimeout(() => window.scrollTo(0, l), 0), setTimeout(() => window.scrollTo(0, l), 50), t.style.display = "block";
2781
+ const c = Qt();
2782
+ o?.(c), c ? (e.style.overflowY = "hidden", L(e, { opacity: [0, 1], y: [250, 0] }, { duration: 0.3, ease: "easeOut" }), await L(t, { opacity: [0, 1] }, { duration: 0.3, ease: "easeOut" }), e.style.overflowY = "auto") : (L(e, { opacity: [0, 1], scale: [0.98, 1] }, { duration: 0.3, ease: "easeOut" }), L(t, { opacity: [0, 1] }, { duration: 0.3, ease: "easeOut" })), a?.(c), setTimeout(() => document.addEventListener("click", r, {
2783
2783
  signal: n?.signal
2784
- }), 0), e.addEventListener("keydown", async (c) => {
2785
- c.key === "Escape" && (c.preventDefault(), await s());
2784
+ }), 0), e.addEventListener("keydown", async (u) => {
2785
+ u.key === "Escape" && (u.preventDefault(), await s());
2786
2786
  }, { signal: n?.signal });
2787
2787
  }, close: s };
2788
2788
  }
2789
- class _o extends EventTarget {
2789
+ class Ko extends EventTarget {
2790
2790
  #e;
2791
2791
  constructor(t) {
2792
2792
  super(), this.#e = t;
@@ -2807,67 +2807,15 @@ class _o extends EventTarget {
2807
2807
  return String(this.#e);
2808
2808
  }
2809
2809
  }
2810
- const Uo = (e) => new _o(e);
2811
- function jo(e) {
2812
- const t = Uo(!1);
2810
+ const Bo = (e) => new Ko(e);
2811
+ function $o(e) {
2812
+ const t = Bo(!1);
2813
2813
  return new ResizeObserver(() => {
2814
2814
  const n = e.scrollHeight > e.clientHeight;
2815
2815
  t.value !== n && (t.value = n);
2816
2816
  }).observe(e), { $isOverflowingVertically: t };
2817
2817
  }
2818
- const Go = 5e3;
2819
- async function zo(e) {
2820
- const t = (n) => {
2821
- const s = n.contentWindow?.document;
2822
- if (!s)
2823
- return !1;
2824
- const r = s.body && s.body.children.length > 0, i = s.readyState === "complete";
2825
- return r && i && s.body.children.length > 0;
2826
- };
2827
- await Promise.allSettled(
2828
- e.map((n) => new Promise((s) => {
2829
- const r = setInterval(() => {
2830
- if (t(n))
2831
- return clearInterval(r), s();
2832
- }, 100);
2833
- setTimeout(() => (clearInterval(r), s()), Go);
2834
- }))
2835
- );
2836
- }
2837
- function Re(e) {
2838
- const t = e.contentWindow?.document;
2839
- if (!t)
2840
- throw new Error("iFrame was not fully loaded yet");
2841
- e.style.height = "0px", e.offsetHeight;
2842
- const n = Math.max(
2843
- t.documentElement.scrollHeight,
2844
- t.body.scrollHeight,
2845
- t.documentElement.offsetHeight,
2846
- t.body.offsetHeight,
2847
- t.documentElement.clientHeight,
2848
- t.body.clientHeight
2849
- );
2850
- e.style.height = `${n}px`;
2851
- }
2852
- function Ss() {
2853
- document.body.classList.add("js-loaded");
2854
- }
2855
- const Yo = async (e) => {
2856
- if (await zo(e), e.forEach((t) => {
2857
- Re(t);
2858
- const n = t.contentWindow;
2859
- if (!n)
2860
- return;
2861
- new ResizeObserver(() => Re(t)).observe(n.document.body);
2862
- }), window.addEventListener("resize", () => {
2863
- e.forEach((t) => Re(t));
2864
- }), window.location.hash) {
2865
- const t = document.querySelector(window.location.hash);
2866
- t && (await new Promise((n) => setTimeout(n, 200)), t.scrollIntoView());
2867
- }
2868
- Ss();
2869
- };
2870
- function Xo(e = 500) {
2818
+ function qo(e = 500) {
2871
2819
  function t() {
2872
2820
  return performance.getEntriesByType("resource").filter(
2873
2821
  (r) => performance.now() - r.responseEnd < e
@@ -2880,17 +2828,17 @@ function Xo(e = 500) {
2880
2828
  s();
2881
2829
  });
2882
2830
  }
2883
- function Zo(e) {
2831
+ function Wo(e) {
2884
2832
  e.forEach((t) => {
2885
2833
  const n = t.querySelectorAll('[role="tab"]'), s = Array.from(t.querySelectorAll('[role="tabpanel"]')), r = t.querySelector(".tab-trigger-background");
2886
2834
  if (!r)
2887
2835
  throw new Error("No tab trigger background found");
2888
- const i = (l, f) => {
2889
- const c = l.offsetWidth;
2890
- if (f) {
2836
+ const i = (l, c) => {
2837
+ const u = l.offsetWidth;
2838
+ if (c) {
2891
2839
  const d = l === n[0] ? l.offsetLeft : l.offsetLeft + 1;
2892
2840
  L(r, {
2893
- width: c,
2841
+ width: u,
2894
2842
  x: `${d}px`
2895
2843
  }, {
2896
2844
  duration: 0.3,
@@ -2899,84 +2847,42 @@ function Zo(e) {
2899
2847
  bounce: 0.1
2900
2848
  });
2901
2849
  } else
2902
- r.style.width = `${c}px`, r.style.transform = "translateX(2px)";
2850
+ r.style.width = `${u}px`, r.style.transform = "translateX(2px)";
2903
2851
  }, o = n[0];
2904
2852
  i(o, !1), n.forEach((l) => l.addEventListener("click", () => {
2905
- n.forEach((f) => {
2906
- const c = f === l;
2907
- f.setAttribute("aria-selected", c.toString());
2908
- const u = s.find((d) => d.getAttribute("aria-labelledby") === f.id);
2909
- u?.setAttribute("tab-index", c ? "0" : "-1"), u?.classList.toggle("hidden", !c), c && i(l, !0);
2853
+ n.forEach((c) => {
2854
+ const u = c === l;
2855
+ c.setAttribute("aria-selected", u.toString());
2856
+ const f = s.find((d) => d.getAttribute("aria-labelledby") === c.id);
2857
+ f?.setAttribute("tab-index", u ? "0" : "-1"), f?.classList.toggle("hidden", !u), u && i(l, !0);
2910
2858
  });
2911
2859
  })), window.innerWidth < 768 || n.forEach((l) => {
2912
- const f = s.find((d) => d.getAttribute("aria-labelledby") === l.id);
2913
- if (!f)
2860
+ const c = s.find((d) => d.getAttribute("aria-labelledby") === l.id);
2861
+ if (!c)
2914
2862
  throw new Error(`No content found for trigger ${l.id}`);
2915
- const c = f.querySelector("iframe");
2916
- if (!c || c.loading !== "lazy")
2863
+ const u = c.querySelector("iframe");
2864
+ if (!u || u.loading !== "lazy")
2917
2865
  return;
2918
- const u = () => {
2919
- if (c.src.includes("embed.figma.com")) {
2920
- const h = c.cloneNode(!0);
2866
+ const f = () => {
2867
+ if (u.src.includes("embed.figma.com")) {
2868
+ const h = u.cloneNode(!0);
2921
2869
  h.loading = "eager", h.style.position = "absolute", h.style.opacity = "0", h.style.pointerEvents = "none", h.style.left = "-9999px", h.inert = !0, h.tabIndex = -1, h.addEventListener("load", () => {
2922
- c.replaceWith(h), h.style.position = "", h.style.opacity = "", h.style.pointerEvents = "", h.style.left = "", h.inert = !1, h.tabIndex = 0;
2870
+ u.replaceWith(h), h.style.position = "", h.style.opacity = "", h.style.pointerEvents = "", h.style.left = "", h.inert = !1, h.tabIndex = 0;
2923
2871
  }), document.body.appendChild(h);
2924
2872
  } else
2925
- c.loading = "eager";
2873
+ u.loading = "eager";
2926
2874
  };
2927
- Xo().then(u);
2875
+ qo().then(f);
2928
2876
  });
2929
2877
  });
2930
2878
  }
2931
- const Ne = "in2theme", ve = {
2932
- normal: "theme-normal",
2933
- light: "theme-light",
2934
- dark: "theme-dark"
2935
- }, Jo = (e) => {
2936
- const t = window.matchMedia("(prefers-color-scheme: dark)");
2937
- function n() {
2938
- const o = localStorage.getItem(Ne);
2939
- return o || localStorage.setItem(Ne, "normal"), o;
2940
- }
2941
- function s() {
2942
- const o = n();
2943
- let a = ve[o];
2944
- o === "normal" && t.matches && (a = ve.dark);
2945
- const l = (u) => {
2946
- Object.values(ve).forEach((d) => u.classList.remove(d)), u.classList.remove("dark");
2947
- }, f = (u) => {
2948
- u.classList.add(a), a === ve.dark && u.classList.add("dark");
2949
- };
2950
- l(e), f(e);
2951
- const c = document.querySelectorAll("iframe");
2952
- c && c.forEach((u) => {
2953
- l(u), f(u);
2954
- }), l(document.body), f(document.body), Array.from(document.querySelectorAll("iframe")).filter((u) => u.src.includes("embed.figma.com")).forEach((u) => {
2955
- const d = new URL(u.src);
2956
- o === "normal" ? d.searchParams.set("theme", "system") : d.searchParams.set("theme", o), u.src = d.href;
2957
- });
2958
- }
2959
- t.addEventListener("change", () => {
2960
- n() === "normal" && s();
2961
- }), s(), e.addEventListener("change", () => {
2962
- const o = e.querySelector('input[name="theme"]:checked');
2963
- if (!o)
2964
- throw new Error("No selected theme found");
2965
- const a = o.value;
2966
- localStorage.setItem(Ne, a), s();
2967
- });
2968
- const r = n(), i = e.querySelector(`input[value="${r}"]`);
2969
- if (!i)
2970
- throw new Error("No current theme input found");
2971
- i.checked = !0;
2972
- };
2973
- function sn(e, t, n, s) {
2879
+ function en(e, t, n, s) {
2974
2880
  return t.navigator.platform.indexOf("Mac") === 0 && !e.includes("meta+ctrl") ? e.replace(n, s) : e;
2975
2881
  }
2976
- function Qo() {
2882
+ function Ho() {
2977
2883
  return [
2978
- (e, t) => sn(e, t, "meta", "ctrl"),
2979
- (e, t) => sn(e, t, "ctrl", "meta")
2884
+ (e, t) => en(e, t, "meta", "ctrl"),
2885
+ (e, t) => en(e, t, "ctrl", "meta")
2980
2886
  ];
2981
2887
  }
2982
2888
  function j(e, t) {
@@ -2986,15 +2892,15 @@ function Ae(e) {
2986
2892
  let t = e.closest('[focusgroup]:not([focusgroup="none"])');
2987
2893
  if (t) return t;
2988
2894
  }
2989
- function Se(e) {
2895
+ function ve(e) {
2990
2896
  if (e.hasAttribute("focusgroup"))
2991
2897
  return [...e.querySelectorAll('*:not([focusgroup="none"])')].filter((n) => n.role === "button" || n.type === "button" || n.role === "checkbox" || n.type === "checkbox");
2992
2898
  }
2993
- function ea(e) {
2899
+ function Uo(e) {
2994
2900
  let t = e.getAttribute("focusgroup");
2995
2901
  if (t !== null) return !t.split(" ").includes("block");
2996
2902
  }
2997
- function ta() {
2903
+ function _o() {
2998
2904
  return (e) => {
2999
2905
  let t = !1;
3000
2906
  function n(a) {
@@ -3003,8 +2909,8 @@ function ta() {
3003
2909
  s();
3004
2910
  return;
3005
2911
  }
3006
- let f = Se(l), c = Array.from(f).indexOf(a.target), u = "ArrowDown", d = "ArrowUp";
3007
- ea(l) && (e.document.dir === "rtl" ? (u = "ArrowLeft", d = "ArrowRight") : (u = "ArrowRight", d = "ArrowLeft")), a.key === u ? (a.preventDefault(), f[c + 1] ? j(a.target, f[c + 1]) : l.getAttribute("focusgroup").includes("wrap") && j(a.target, f[0])) : a.key === d ? (a.preventDefault(), f[c - 1] ? j(a.target, f[c - 1]) : l.getAttribute("focusgroup").includes("wrap") && j(a.target, f[f.length - 1])) : a.key === "Home" ? (a.preventDefault(), j(a.target, f[0])) : a.key === "End" && (a.preventDefault(), j(a.target, f[f.length - 1]));
2912
+ let c = ve(l), u = Array.from(c).indexOf(a.target), f = "ArrowDown", d = "ArrowUp";
2913
+ Uo(l) && (e.document.dir === "rtl" ? (f = "ArrowLeft", d = "ArrowRight") : (f = "ArrowRight", d = "ArrowLeft")), a.key === f ? (a.preventDefault(), c[u + 1] ? j(a.target, c[u + 1]) : l.getAttribute("focusgroup").includes("wrap") && j(a.target, c[0])) : a.key === d ? (a.preventDefault(), c[u - 1] ? j(a.target, c[u - 1]) : l.getAttribute("focusgroup").includes("wrap") && j(a.target, c[c.length - 1])) : a.key === "Home" ? (a.preventDefault(), j(a.target, c[0])) : a.key === "End" && (a.preventDefault(), j(a.target, c[c.length - 1]));
3008
2914
  }
3009
2915
  function s() {
3010
2916
  t = !1, e.removeEventListener("keydown", n);
@@ -3013,26 +2919,26 @@ function ta() {
3013
2919
  let l = Ae(a.target);
3014
2920
  if (l) {
3015
2921
  t || (t = !0, e.addEventListener("keydown", n));
3016
- let f = Se(l);
3017
- f.some((c) => c.getAttribute("tabindex") === "0") ? f.forEach((c) => {
3018
- c !== a.target && c.setAttribute("tabindex", -1);
3019
- }) : (f.forEach(
3020
- (c, u) => c.setAttribute("tabindex", u === 0 ? 0 : -1)
3021
- ), f[0]?.focus());
2922
+ let c = ve(l);
2923
+ c.some((u) => u.getAttribute("tabindex") === "0") ? c.forEach((u) => {
2924
+ u !== a.target && u.setAttribute("tabindex", -1);
2925
+ }) : (c.forEach(
2926
+ (u, f) => u.setAttribute("tabindex", f === 0 ? 0 : -1)
2927
+ ), c[0]?.focus());
3022
2928
  } else t && s();
3023
2929
  }
3024
2930
  function i(a) {
3025
2931
  let l = Ae(a.target);
3026
- l?.getAttribute("focusgroup")?.includes("no-memory") && Se(l).forEach((c, u) => {
3027
- c.setAttribute("tabindex", u === 0 ? 0 : -1);
2932
+ l?.getAttribute("focusgroup")?.includes("no-memory") && ve(l).forEach((u, f) => {
2933
+ u.setAttribute("tabindex", f === 0 ? 0 : -1);
3028
2934
  }), (!a.relatedTarget || a.relatedTarget === e.document) && s();
3029
2935
  }
3030
2936
  function o(a) {
3031
2937
  let l = Ae(a.target);
3032
2938
  if (l) {
3033
- let f = Se(l);
3034
- for (let c of f)
3035
- c !== a.target && c.setAttribute("tabindex", -1);
2939
+ let c = ve(l);
2940
+ for (let u of c)
2941
+ u !== a.target && u.setAttribute("tabindex", -1);
3036
2942
  a.target.setAttribute("tabindex", 0);
3037
2943
  }
3038
2944
  }
@@ -3041,7 +2947,7 @@ function ta() {
3041
2947
  };
3042
2948
  };
3043
2949
  }
3044
- let na = {
2950
+ let jo = {
3045
2951
  button: ["toolbar"],
3046
2952
  checkbox: ["toolbar"],
3047
2953
  menuitem: ["menu", "menubar"],
@@ -3051,20 +2957,20 @@ let na = {
3051
2957
  function ie(e, t) {
3052
2958
  t.tabIndex = 0, t.focus(), e.tabIndex = -1;
3053
2959
  }
3054
- function Ke(e) {
2960
+ function Pe(e) {
3055
2961
  let t = e.role || e.type || e.tagName;
3056
2962
  if (!t) return null;
3057
- let n = na[t.toLowerCase()];
2963
+ let n = jo[t.toLowerCase()];
3058
2964
  if (!n) return null;
3059
2965
  for (let s of n) {
3060
2966
  let r = e.closest(`[role=${s}]`);
3061
2967
  if (r) return r;
3062
2968
  }
3063
2969
  }
3064
- function Be(e, t) {
3065
- return t.role === "toolbar" ? ra(t) : t.querySelectorAll(`[role=${e.role}]`);
2970
+ function Ne(e, t) {
2971
+ return t.role === "toolbar" ? zo(t) : t.querySelectorAll(`[role=${e.role}]`);
3066
2972
  }
3067
- function sa(e, t) {
2973
+ function Go(e, t) {
3068
2974
  return Array.from(e).filter((n) => {
3069
2975
  let s = n.parentElement;
3070
2976
  for (; s && s !== t; ) {
@@ -3075,70 +2981,70 @@ function sa(e, t) {
3075
2981
  return !0;
3076
2982
  });
3077
2983
  }
3078
- function ra(e) {
2984
+ function zo(e) {
3079
2985
  return [...e.querySelectorAll("*")].filter((n) => n.role === "button" || n.type === "button" || n.role === "checkbox" || n.type === "checkbox");
3080
2986
  }
3081
- function ia(e) {
2987
+ function Yo(e) {
3082
2988
  let t = e.getAttribute("aria-orientation");
3083
2989
  if (t === "vertical") return !1;
3084
2990
  if (t === "horizontal") return !0;
3085
2991
  let n = e.role;
3086
2992
  return n === "menubar" || n === "tablist" || n === "toolbar";
3087
2993
  }
3088
- function oa(e) {
2994
+ function Xo(e) {
3089
2995
  return (t) => {
3090
2996
  let n = !1, s = 300, r = 0, i = "";
3091
- function o(u) {
3092
- let d = Ke(u.target);
2997
+ function o(f) {
2998
+ let d = Pe(f.target);
3093
2999
  if (!d) {
3094
3000
  a();
3095
3001
  return;
3096
3002
  }
3097
- let h = Be(u.target, d), m = sa(h, d), y = Array.from(m).indexOf(u.target), T = "ArrowDown", b = "ArrowUp";
3098
- if (ia(d) && (t.document.dir === "rtl" ? (T = "ArrowLeft", b = "ArrowRight") : (T = "ArrowRight", b = "ArrowLeft")), u.key === T)
3099
- u.preventDefault(), ie(u.target, m[y + 1] || m[0]);
3100
- else if (u.key === b)
3101
- u.preventDefault(), ie(u.target, m[y - 1] || m[m.length - 1]);
3102
- else if (u.key === "Home")
3103
- u.preventDefault(), ie(u.target, m[0]);
3104
- else if (u.key === "End")
3105
- u.preventDefault(), ie(u.target, m[m.length - 1]);
3106
- else if (u.key.length === 1 && d.role !== "tablist") {
3107
- u.timeStamp - r <= s ? i += u.key.toLowerCase() : i = u.key.toLowerCase(), r = u.timeStamp;
3108
- let x = Array.from(h).find((v) => v.textContent?.trim()?.toLowerCase()?.startsWith(i));
3109
- x && (u.preventDefault(), ie(u.target, x));
3003
+ let h = Ne(f.target, d), m = Go(h, d), y = Array.from(m).indexOf(f.target), T = "ArrowDown", b = "ArrowUp";
3004
+ if (Yo(d) && (t.document.dir === "rtl" ? (T = "ArrowLeft", b = "ArrowRight") : (T = "ArrowRight", b = "ArrowLeft")), f.key === T)
3005
+ f.preventDefault(), ie(f.target, m[y + 1] || m[0]);
3006
+ else if (f.key === b)
3007
+ f.preventDefault(), ie(f.target, m[y - 1] || m[m.length - 1]);
3008
+ else if (f.key === "Home")
3009
+ f.preventDefault(), ie(f.target, m[0]);
3010
+ else if (f.key === "End")
3011
+ f.preventDefault(), ie(f.target, m[m.length - 1]);
3012
+ else if (f.key.length === 1 && d.role !== "tablist") {
3013
+ f.timeStamp - r <= s ? i += f.key.toLowerCase() : i = f.key.toLowerCase(), r = f.timeStamp;
3014
+ let x = Array.from(h).find((A) => A.textContent?.trim()?.toLowerCase()?.startsWith(i));
3015
+ x && (f.preventDefault(), ie(f.target, x));
3110
3016
  }
3111
3017
  }
3112
3018
  function a() {
3113
3019
  n = !1, t.removeEventListener("keydown", o);
3114
3020
  }
3115
- function l(u) {
3116
- let d = Ke(u.target);
3021
+ function l(f) {
3022
+ let d = Pe(f.target);
3117
3023
  if (d) {
3118
3024
  n || (n = !0, t.addEventListener("keydown", o));
3119
- let h = Be(u.target, d);
3025
+ let h = Ne(f.target, d);
3120
3026
  for (let m of h)
3121
- m !== u.target && m.setAttribute("tabindex", -1);
3027
+ m !== f.target && m.setAttribute("tabindex", -1);
3122
3028
  } else n && a();
3123
3029
  }
3124
- function f(u) {
3125
- (!u.relatedTarget || u.relatedTarget === t.document) && a();
3030
+ function c(f) {
3031
+ (!f.relatedTarget || f.relatedTarget === t.document) && a();
3126
3032
  }
3127
- function c(u) {
3128
- let d = Ke(u.target);
3033
+ function u(f) {
3034
+ let d = Pe(f.target);
3129
3035
  if (d) {
3130
- let h = Be(u.target, d);
3036
+ let h = Ne(f.target, d);
3131
3037
  for (let m of h)
3132
- m !== u.target && m.setAttribute("tabindex", -1);
3133
- u.target.setAttribute("tabindex", 0);
3038
+ m !== f.target && m.setAttribute("tabindex", -1);
3039
+ f.target.setAttribute("tabindex", 0);
3134
3040
  }
3135
3041
  }
3136
- return t.addEventListener("click", c), t.addEventListener("focusin", l), t.addEventListener("focusout", f), () => {
3137
- a(), t.removeEventListener("click", c), t.removeEventListener("focusin", l), t.removeEventListener("focusout", f);
3042
+ return t.addEventListener("click", u), t.addEventListener("focusin", l), t.addEventListener("focusout", c), () => {
3043
+ a(), t.removeEventListener("click", u), t.removeEventListener("focusin", l), t.removeEventListener("focusout", c);
3138
3044
  };
3139
3045
  };
3140
3046
  }
3141
- function aa() {
3047
+ function Zo() {
3142
3048
  return (e) => {
3143
3049
  let t, n;
3144
3050
  function s(i) {
@@ -3158,28 +3064,28 @@ function aa() {
3158
3064
  };
3159
3065
  };
3160
3066
  }
3161
- let la = /^[^\x00-\x7F]$/, ca = {
3067
+ let Jo = /^[^\x00-\x7F]$/, Qo = {
3162
3068
  checkbox: !0,
3163
3069
  file: !0,
3164
3070
  radio: !0
3165
- }, ua = {
3071
+ }, ea = {
3166
3072
  button: !0,
3167
3073
  reset: !0,
3168
3074
  submit: !0
3169
- }, fa = {
3075
+ }, ta = {
3170
3076
  " ": "space",
3171
3077
  "+": "plus"
3172
3078
  };
3173
- function xs(e, t) {
3079
+ function bs(e, t) {
3174
3080
  if (t.tagName !== "BODY" && e !== t)
3175
- return t.hasAttribute("data-keyux-ignore-hotkeys") || t.getAttribute("aria-hidden") === "true" || t.hasAttribute("inert") ? !0 : xs(e, t.parentNode);
3081
+ return t.hasAttribute("data-keyux-ignore-hotkeys") || t.getAttribute("aria-hidden") === "true" || t.hasAttribute("inert") ? !0 : bs(e, t.parentNode);
3176
3082
  }
3177
- function rn(e, t) {
3083
+ function tn(e, t) {
3178
3084
  for (let n of t)
3179
- if (!xs(e, n))
3085
+ if (!bs(e, n))
3180
3086
  return n;
3181
3087
  }
3182
- function on(e, t, n) {
3088
+ function nn(e, t, n) {
3183
3089
  let s = t;
3184
3090
  for (let [a] of n)
3185
3091
  if (s = a(s, e), !s) return !1;
@@ -3191,34 +3097,34 @@ function on(e, t, n) {
3191
3097
  if (l) return l;
3192
3098
  }
3193
3099
  }
3194
- return rn(
3100
+ return tn(
3195
3101
  i,
3196
3102
  i.querySelectorAll(`[aria-keyshortcuts="${s}" i]`)
3197
- ) || rn(
3103
+ ) || tn(
3198
3104
  r,
3199
3105
  r.querySelectorAll(`[aria-keyshortcuts="${s}" i]`)
3200
3106
  );
3201
3107
  }
3202
- function da(e, t, n) {
3108
+ function na(e, t, n) {
3203
3109
  let s = "";
3204
3110
  e.metaKey && (s += "meta+"), e.ctrlKey && (s += "ctrl+"), e.altKey && (s += "alt+"), e.shiftKey && (s += "shift+");
3205
3111
  let r = s;
3206
- r += fa[e.key] ?? e.key.toLowerCase();
3207
- let i = on(t, r, n);
3208
- if (!i && (e.key.length > 1 || la.test(e.key)) && /^(Key.|Digit\d)$/.test(e.code)) {
3112
+ r += ta[e.key] ?? e.key.toLowerCase();
3113
+ let i = nn(t, r, n);
3114
+ if (!i && (e.key.length > 1 || Jo.test(e.key)) && /^(Key.|Digit\d)$/.test(e.code)) {
3209
3115
  let o = e.code.replace(/^Key|^Digit/, "").toLowerCase();
3210
- i = on(t, s + o, n);
3116
+ i = nn(t, s + o, n);
3211
3117
  }
3212
3118
  return i;
3213
3119
  }
3214
- function ha(e = []) {
3120
+ function sa(e = []) {
3215
3121
  return (t) => {
3216
3122
  function n(s) {
3217
- let r = s.ctrlKey || s.metaKey || s.altKey, i = s.target.isContentEditable || s.target.tagName === "TEXTAREA" || s.target.tagName === "INPUT" && !ca[s.target.type], o = s.target.role === "menuitem";
3123
+ let r = s.ctrlKey || s.metaKey || s.altKey, i = s.target.isContentEditable || s.target.tagName === "TEXTAREA" || s.target.tagName === "INPUT" && !Qo[s.target.type], o = s.target.role === "menuitem";
3218
3124
  if (!r && (i || o))
3219
3125
  return;
3220
- let a = da(s, t, e);
3221
- a && (a.tagName === "TEXTAREA" || a.tagName === "INPUT" && !ua[a.type] ? setTimeout(() => {
3126
+ let a = na(s, t, e);
3127
+ a && (a.tagName === "TEXTAREA" || a.tagName === "INPUT" && !ea[a.type] ? setTimeout(() => {
3222
3128
  a.focus();
3223
3129
  }) : a.click());
3224
3130
  }
@@ -3227,12 +3133,12 @@ function ha(e = []) {
3227
3133
  };
3228
3134
  };
3229
3135
  }
3230
- function ma() {
3136
+ function ra() {
3231
3137
  return (e) => {
3232
3138
  let t = [];
3233
3139
  function n(l) {
3234
- let f = e.document.activeElement;
3235
- f && f !== e.document.body && t.push(new WeakRef(f)), l.focus({ focusVisible: !0 });
3140
+ let c = e.document.activeElement;
3141
+ c && c !== e.document.body && t.push(new WeakRef(c)), l.focus({ focusVisible: !0 });
3236
3142
  }
3237
3143
  function s() {
3238
3144
  let l = t.pop();
@@ -3240,26 +3146,26 @@ function ma() {
3240
3146
  e.document.activeElement.blur();
3241
3147
  return;
3242
3148
  }
3243
- let f = l.deref();
3244
- f && f.isConnected ? f.focus() : s();
3149
+ let c = l.deref();
3150
+ c && c.isConnected ? c.focus() : s();
3245
3151
  }
3246
3152
  let r = 0, i;
3247
3153
  function o(l) {
3248
3154
  clearInterval(i);
3249
- let f = l.getAttribute("aria-controls");
3155
+ let c = l.getAttribute("aria-controls");
3250
3156
  i = setInterval(() => {
3251
3157
  if (r++ > 50) {
3252
3158
  clearInterval(i);
3253
3159
  return;
3254
3160
  }
3255
- let c = e.document.getElementById(f);
3256
- if (c) {
3257
- let u = c.querySelector(
3161
+ let u = e.document.getElementById(c);
3162
+ if (u) {
3163
+ let f = u.querySelector(
3258
3164
  'a, button, select, textarea, input:not([type=radio]), [type=radio]:checked, [tabindex]:not([tabindex="-1"])'
3259
3165
  );
3260
- u && (clearInterval(i), c.dispatchEvent(
3166
+ f && (clearInterval(i), u.dispatchEvent(
3261
3167
  new e.CustomEvent("keyuxJump", { bubbles: !0 })
3262
- ), n(u));
3168
+ ), n(f));
3263
3169
  }
3264
3170
  }, 50);
3265
3171
  }
@@ -3271,25 +3177,25 @@ function ma() {
3271
3177
  };
3272
3178
  };
3273
3179
  }
3274
- function pa(e, t) {
3180
+ function ia(e, t) {
3275
3181
  let n = t.map((s) => s(e));
3276
3182
  return () => {
3277
3183
  n.forEach((s) => s());
3278
3184
  };
3279
3185
  }
3280
- const ga = Qo();
3281
- pa(window, [
3282
- ha([ga]),
3283
- oa(),
3284
- ta(),
3285
- ma(),
3286
- aa()
3186
+ const oa = Ho();
3187
+ ia(window, [
3188
+ sa([oa]),
3189
+ Xo(),
3190
+ _o(),
3191
+ ra(),
3192
+ Zo()
3287
3193
  ]);
3288
- function ya() {
3194
+ function aa() {
3289
3195
  const e = navigator.userAgent.toLowerCase();
3290
3196
  return e.includes("mac") ? "mac" : e.includes("linux") ? "linux" : e.includes("win") ? "windows" : "unknown";
3291
3197
  }
3292
- function ba() {
3198
+ function la() {
3293
3199
  const e = document.querySelectorAll("iframe"), t = document.querySelector("#styleguide-previous"), n = document.querySelector("#styleguide-next"), s = (r) => {
3294
3200
  const i = document.activeElement instanceof HTMLButtonElement, o = document.activeElement instanceof HTMLInputElement, a = document.activeElement instanceof HTMLTextAreaElement;
3295
3201
  i || o || a || r.metaKey || r.ctrlKey || (t && r.key === "ArrowLeft" && (r.preventDefault(), t.click()), n && r.key === "ArrowRight" && (r.preventDefault(), n.click()));
@@ -3299,7 +3205,7 @@ function ba() {
3299
3205
  i && i.addEventListener("keydown", s);
3300
3206
  }), window.addEventListener("keydown", s);
3301
3207
  }
3302
- function wa() {
3208
+ function ua() {
3303
3209
  const e = document.querySelectorAll("iframe"), t = (n) => {
3304
3210
  n.key === "k" && (n.metaKey || n.ctrlKey) && (n.preventDefault(), window.dispatchEvent(new Event("styleguideOpenSearch")));
3305
3211
  };
@@ -3308,13 +3214,13 @@ function wa() {
3308
3214
  s && s.addEventListener("keydown", t);
3309
3215
  }), window.addEventListener("keydown", t);
3310
3216
  }
3311
- const Ta = ya();
3312
- document.body.setAttribute("data-os", Ta);
3313
- const va = "ontouchstart" in window || navigator.maxTouchPoints > 0;
3314
- document.body.setAttribute("data-is-mobile", String(va));
3315
- ba();
3316
- wa();
3317
- function Aa() {
3217
+ const ca = aa();
3218
+ document.body.setAttribute("data-os", ca);
3219
+ const fa = "ontouchstart" in window || navigator.maxTouchPoints > 0;
3220
+ document.body.setAttribute("data-is-mobile", String(fa));
3221
+ la();
3222
+ ua();
3223
+ function da() {
3318
3224
  const e = document.querySelector("header");
3319
3225
  if (!e)
3320
3226
  throw new Error("No header found");
@@ -3323,7 +3229,7 @@ function Aa() {
3323
3229
  document.documentElement.style.setProperty("--header-height", `${t()}px`);
3324
3230
  });
3325
3231
  }
3326
- function Sa() {
3232
+ function ha() {
3327
3233
  const e = document.querySelector("aside");
3328
3234
  if (!e)
3329
3235
  throw new Error("No aside menu found");
@@ -3340,92 +3246,88 @@ function Sa() {
3340
3246
  }
3341
3247
  window.addEventListener("resize", t), t();
3342
3248
  }
3343
- Aa();
3344
- Sa();
3345
- const Es = document.querySelector("#search-dialog");
3346
- if (!Es)
3249
+ da();
3250
+ ha();
3251
+ const ws = document.querySelector("#search-dialog");
3252
+ if (!ws)
3347
3253
  throw new Error("No search dialog found");
3348
- const Vs = document.querySelector(".dialog-backdrop");
3349
- if (!Vs)
3254
+ const Ts = document.querySelector(".dialog-backdrop");
3255
+ if (!Ts)
3350
3256
  throw new Error("No dialog backdrop found");
3351
- const St = document.querySelectorAll("[data-open-search]");
3352
- if (St.length === 0)
3257
+ const Tt = document.querySelectorAll("[data-open-search]");
3258
+ if (Tt.length === 0)
3353
3259
  throw new Error("No open search buttons found");
3354
3260
  const Y = document.querySelector("#search-input");
3355
3261
  if (!Y)
3356
3262
  throw new Error("No search input found");
3357
- const Ms = document.querySelector("#search-list");
3358
- if (!Ms)
3263
+ const As = document.querySelector("#search-list");
3264
+ if (!As)
3359
3265
  throw new Error("No search list found");
3360
- const ks = document.querySelectorAll(".search-category__item--active");
3361
- if (!ks)
3266
+ const vs = document.querySelectorAll(".search-category__item--active");
3267
+ if (!vs)
3362
3268
  throw new Error("No search results found");
3363
- const Cs = document.querySelector("#search-no-results");
3364
- if (!Cs)
3269
+ const Ss = document.querySelector("#search-no-results");
3270
+ if (!Ss)
3365
3271
  throw new Error("No search no results element found");
3366
- const { show: xa } = As(Es, Vs);
3367
- async function Ds() {
3368
- await xa(
3272
+ const { show: ma } = ys(ws, Ts);
3273
+ async function xs() {
3274
+ await ma(
3369
3275
  (e) => {
3370
3276
  e && Y.setAttribute("inert", "");
3371
3277
  },
3372
3278
  (e) => {
3373
- e && Y.removeAttribute("inert"), St.forEach((t) => t.ariaExpanded = "true"), Y.ariaExpanded = "true", Is();
3279
+ e && Y.removeAttribute("inert"), Tt.forEach((t) => t.ariaExpanded = "true"), Y.ariaExpanded = "true", Es();
3374
3280
  }
3375
3281
  );
3376
3282
  }
3377
- function Is() {
3283
+ function Es() {
3378
3284
  const e = Y.value.toLowerCase().trim();
3379
3285
  let t = !1;
3380
- ks.forEach((n) => {
3286
+ vs.forEach((n) => {
3381
3287
  let s;
3382
3288
  const r = n.getAttribute("data-search-keywords")?.split(",") || [];
3383
3289
  r.length > 0 ? s = r.some((i) => i.toLowerCase().includes(e)) : s = (n.textContent?.toLowerCase() ?? "")?.includes(e), n.classList.toggle("search-category__item--active", s), s && (t = !0);
3384
- }), Ms.classList.toggle("hidden", !t), Cs.classList.toggle("hidden", t);
3385
- }
3386
- Y.addEventListener("input", Is);
3387
- St.forEach((e) => e.addEventListener("click", Ds));
3388
- window.addEventListener("styleguideOpenSearch", Ds);
3389
- const an = Array.from(document.querySelectorAll(".preview-iframe"));
3390
- an.length > 0 ? Yo(an).catch(console.error) : Ss();
3391
- const ln = document.querySelector(".theme-select");
3392
- ln && Jo(ln);
3393
- const Ea = document.querySelectorAll(".styleguide-section");
3394
- Ea.forEach((e) => {
3290
+ }), As.classList.toggle("hidden", !t), Ss.classList.toggle("hidden", t);
3291
+ }
3292
+ Y.addEventListener("input", Es);
3293
+ Tt.forEach((e) => e.addEventListener("click", xs));
3294
+ window.addEventListener("styleguideOpenSearch", xs);
3295
+ const pa = document.querySelectorAll(".styleguide-section");
3296
+ pa.forEach((e) => {
3395
3297
  new ResizeObserver(() => {
3396
3298
  const t = e.scrollHeight > 600;
3397
3299
  e.classList.toggle("styleguide-section--large", t);
3398
3300
  }).observe(e);
3399
3301
  });
3400
- const cn = document.querySelectorAll(".tabs");
3401
- cn.length > 0 && Zo(cn);
3402
- const un = document.querySelectorAll("details:has(.code-highlight)");
3403
- un.length > 0 && un.forEach((e) => {
3302
+ const sn = document.querySelectorAll(".tabs");
3303
+ sn.length > 0 && Wo(sn);
3304
+ const rn = document.querySelectorAll("details:has(.code-highlight)");
3305
+ rn.length > 0 && rn.forEach((e) => {
3404
3306
  const t = e.querySelector(".code-highlight");
3405
3307
  if (!t)
3406
3308
  throw new Error("No code element found");
3407
- Wo(t).catch(console.error);
3309
+ Ro(t).catch(console.error);
3408
3310
  });
3409
- const xe = document.querySelectorAll("[data-code-audit-iframe]"), qe = document.querySelector("#code-audit-dialog"), fn = document.querySelector(".dialog-backdrop");
3410
- xe.length > 0 && qe && fn && (async () => {
3411
- const { auditCode: e } = await import("./html-validator-BlXeWTXJ.js"), { show: t, close: n } = As(qe, fn);
3412
- xe.forEach((s) => s.addEventListener("click", async () => {
3413
- xe.forEach((r) => r.setAttribute("aria-expanded", "false")), s.setAttribute("disabled", ""), await e(s, qe, n), s.removeAttribute("disabled"), s.setAttribute("aria-expanded", "true"), await t(
3311
+ const Se = document.querySelectorAll("[data-code-audit-iframe]"), Re = document.querySelector("#code-audit-dialog"), on = document.querySelector(".dialog-backdrop");
3312
+ Se.length > 0 && Re && on && (async () => {
3313
+ const { auditCode: e } = await import("./html-validator-DLEAmrmB.js"), { show: t, close: n } = ys(Re, on);
3314
+ Se.forEach((s) => s.addEventListener("click", async () => {
3315
+ Se.forEach((r) => r.setAttribute("aria-expanded", "false")), s.setAttribute("disabled", ""), await e(s, Re, n), s.removeAttribute("disabled"), s.setAttribute("aria-expanded", "true"), await t(
3414
3316
  void 0,
3415
3317
  () => {
3416
- xe.forEach((r) => {
3318
+ Se.forEach((r) => {
3417
3319
  r.setAttribute("aria-expanded", "false");
3418
3320
  });
3419
3321
  }
3420
3322
  );
3421
3323
  }));
3422
3324
  })();
3423
- const dn = document.querySelector("#icon-search-input"), hn = document.querySelector("#icon-search-input-reset"), mn = document.querySelector("#icon-search-list");
3424
- dn && mn && hn && import("./icons-DfSfd5nI.js").then(({ default: e }) => e(dn, mn, hn)).catch(console.error);
3425
- const Ls = "data-clipboard-value", pn = document.querySelectorAll(`button[${Ls}]`);
3426
- pn.length > 0 && import("./clipboard-CmSioy8N.js").then(({ default: e }) => e(pn, Ls)).catch(console.error);
3427
- const gn = document.querySelectorAll(".markdown-container-folded");
3428
- gn.length > 0 && gn.forEach((e) => {
3325
+ const an = document.querySelector("#icon-search-input"), ln = document.querySelector("#icon-search-input-reset"), un = document.querySelector("#icon-search-list");
3326
+ an && un && ln && import("./icons-s_oHNZd6.js").then(({ default: e }) => e(an, un, ln)).catch(console.error);
3327
+ const Vs = "data-clipboard-value", cn = document.querySelectorAll(`button[${Vs}]`);
3328
+ cn.length > 0 && import("./clipboard-DULMn8xf.js").then(({ default: e }) => e(cn, Vs)).catch(console.error);
3329
+ const fn = document.querySelectorAll(".markdown-container-folded");
3330
+ fn.length > 0 && fn.forEach((e) => {
3429
3331
  const t = e.querySelector(".markdown-container");
3430
3332
  if (!t)
3431
3333
  throw new Error("No markdown container found");
@@ -3435,7 +3337,7 @@ gn.length > 0 && gn.forEach((e) => {
3435
3337
  const s = e.querySelector(".markdown-show-more");
3436
3338
  if (!s)
3437
3339
  throw new Error("No show more button found");
3438
- const { $isOverflowingVertically: r } = jo(e), i = () => {
3340
+ const { $isOverflowingVertically: r } = $o(e), i = () => {
3439
3341
  const a = t.scrollHeight > t.clientHeight;
3440
3342
  n.classList.toggle("hidden", !a);
3441
3343
  };
@@ -3453,17 +3355,17 @@ gn.length > 0 && gn.forEach((e) => {
3453
3355
  }, { duration: 0.5 }).then(() => n.classList.add("hidden"));
3454
3356
  });
3455
3357
  });
3456
- let Ee;
3358
+ let xe;
3457
3359
  window.addEventListener("scroll", () => {
3458
- Ee && (clearTimeout(Ee), Ee = void 0), document.body.classList.contains("is-scrolling") || document.body.classList.add("is-scrolling"), Ee = setTimeout(() => {
3360
+ xe && (clearTimeout(xe), xe = void 0), document.body.classList.contains("is-scrolling") || document.body.classList.add("is-scrolling"), xe = setTimeout(() => {
3459
3361
  document.body.classList.remove("is-scrolling");
3460
3362
  }, 250);
3461
3363
  });
3462
- const yn = document.querySelector(".editor-select");
3463
- yn && import("./editor-select-Bzw7rF0M.js").then(({ default: e }) => e(yn)).catch(console.error);
3364
+ const dn = document.querySelector(".editor-select");
3365
+ dn && import("./editor-select-Bzw7rF0M.js").then(({ default: e }) => e(dn)).catch(console.error);
3464
3366
  export {
3465
3367
  L as a,
3466
- Uo as b,
3467
- Wo as h,
3368
+ Bo as b,
3369
+ Ro as h,
3468
3370
  X as s
3469
3371
  };