PageSourceSearch

https://pixel-leaves-34276573.figma.site/_components/v2/6cc76248e0339c4d864e41e7d123686a81bb3c73.js

js pixel-leaves-34276573.figma.site collected 2026-10-03 03:17:12 UTC 240,489 bytes, 6,366 lines download raw bytes

vendor: 17,550 bytes, lines 1-516
1const Dd = (t) => import(t), Rd = () => Promise.resolve().then(() => Ed), { Fragment: Ge, jsx: f, jsxs: w } = globalThis.__GLOBALS__.ReactJSXRuntime;
2"use" in globalThis.__GLOBALS__.React || (globalThis.__GLOBALS__.React.use = () => {
3  throw new Error("`use` is not available in this version of React. Make currently only supports React 18, but `use` is only available in React 19+.");
4});
5const To = globalThis.__GLOBALS__.React, { Children: So, cloneElement: Po, Component: Ci, createContext: Ft, createElement: ye, createFactory: Nd, createRef: Ld, forwardRef: yn, Fragment: Mi, isValidElement: Co, lazy: Id, memo: Fd, Profiler: Bd, PureComponent: Od, startTransition: jd, StrictMode: $d, Suspense: Ud, use: _d, useCallback: xn, useContext: z, useDebugValue: Wd, useDeferredValue: zd, useEffect: G, useId: vn, useImperativeHandle: Hd, useInsertionEffect: Ai, useLayoutEffect: Mo, useMemo: mt, useReducer: Kd, useRef: rt, useState: D, useSyncExternalStore: Gd, useTransition: Xd, version: Yd } = globalThis.__GLOBALS__.React, bn = Ft({});
6function wn(t) {
7  const e = rt(null);
8  return e.current === null && (e.current = t()), e.current;
9}
10const Tn = typeof window < "u", ki = Tn ? Mo : G, Ce = /* @__PURE__ */ Ft(null);
11function Sn(t, e) {
12  t.indexOf(e) === -1 && t.push(e);
13}
14function Pn(t, e) {
15  const n = t.indexOf(e);
16  n > -1 && t.splice(n, 1);
17}
18const lt = (t, e, n) => n > e ? e : n < t ? t : n;
19let Cn = () => {
20};
21const ct = {}, Vi = (t) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);
22function Ei(t) {
23  return typeof t == "object" && t !== null;
24}
25const Di = (t) => /^0[^.\s]+$/u.test(t);
26// @__NO_SIDE_EFFECTS__
27function Mn(t) {
28  let e;
29  return () => (e === void 0 && (e = t()), e);
30}
31const nt = /* @__NO_SIDE_EFFECTS__ */ (t) => t, Ao = (t, e) => (n) => e(t(n)), se = (...t) => t.reduce(Ao), Zt = /* @__NO_SIDE_EFFECTS__ */ (t, e, n) => {
32  const s = e - t;
33  return s === 0 ? 1 : (n - t) / s;
34};
35class An {
36  constructor() {
37    this.subscriptions = [];
38  }
39  add(e) {
40    return Sn(this.subscriptions, e), () => Pn(this.subscriptions, e);
41  }
42  notify(e, n, s) {
43    const i = this.subscriptions.length;
44    if (i)
45      if (i === 1)
46        this.subscriptions[0](e, n, s);
47      else
48        for (let o = 0; o < i; o++) {
49          const r = this.subscriptions[o];
50          r && r(e, n, s);
51        }
52  }
53  getSize() {
54    return this.subscriptions.length;
55  }
56  clear() {
57    this.subscriptions.length = 0;
58  }
59}
60const ot = /* @__NO_SIDE_EFFECTS__ */ (t) => t * 1e3, et = /* @__NO_SIDE_EFFECTS__ */ (t) => t / 1e3;
61function Ri(t, e) {
62  return e ? t * (1e3 / e) : 0;
63}
64const Ni = (t, e, n) => (((1 - 3 * n + 3 * e) * t + (3 * n - 6 * e)) * t + 3 * e) * t, ko = 1e-7, Vo = 12;
65function Eo(t, e, n, s, i) {
66  let o, r, a = 0;
67  do
68    r = e + (n - e) / 2, o = Ni(r, s, i) - t, o > 0 ? n = r : e = r;
69  while (Math.abs(o) > ko && ++a < Vo);
70  return r;
71}
72function ie(t, e, n, s) {
73  if (t === e && n === s)
74    return nt;
75  const i = (o) => Eo(o, 0, 1, t, n);
76  return (o) => o === 0 || o === 1 ? o : Ni(i(o), e, s);
77}
78const Li = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, Ii = (t) => (e) => 1 - t(1 - e), Fi = /* @__PURE__ */ ie(0.33, 1.53, 0.69, 0.99), kn = /* @__PURE__ */ Ii(Fi), Bi = /* @__PURE__ */ Li(kn), Oi = (t) => (t *= 2) < 1 ? 0.5 * kn(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), Vn = (t) => 1 - Math.sin(Math.acos(t)), ji = Ii(Vn), $i = Li(Vn), Do = /* @__PURE__ */ ie(0.42, 0, 1, 1), Ro = /* @__PURE__ */ ie(0, 0, 0.58, 1), Ui = /* @__PURE__ */ ie(0.42, 0, 0.58, 1), No = (t) => Array.isArray(t) && typeof t[0] != "number", _i = (t) => Array.isArray(t) && typeof t[0] == "number", Lo = {
79  linear: nt,
80  easeIn: Do,
81  easeInOut: Ui,
82  easeOut: Ro,
83  circIn: Vn,
84  circInOut: $i,
85  circOut: ji,
86  backIn: kn,
87  backInOut: Bi,
88  backOut: Fi,
89  anticipate: Oi
90}, Io = (t) => typeof t == "string", ss = (t) => {
91  if (_i(t)) {
92    Cn(t.length === 4);
93    const [e, n, s, i] = t;
94    return ie(e, n, s, i);
95  } else if (Io(t))
96    return Lo[t];
97  return t;
98}, ce = [
99  "setup",
100  // Compute
101  "read",
102  // Read
103  "resolveKeyframes",
104  // Write/Read/Write/Read
105  "preUpdate",
106  // Compute
107  "update",
108  // Compute
109  "preRender",
110  // Compute
111  "render",
112  // Write
113  "postRender"
114  // Compute
115];
116function Fo(t, e) {
117  let n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), i = !1, o = !1;
118  const r = /* @__PURE__ */ new WeakSet();
119  let a = {
120    delta: 0,
121    timestamp: 0,
122    isProcessing: !1
123  };
124  function l(c) {
125    r.has(c) && (u.schedule(c), t()), c(a);
126  }
127  const u = {
128    /**
129     * Schedule a process to run on the next frame.
130     */
131    schedule: (c, h = !1, d = !1) => {
132      const p = d && i ? n : s;
133      return h && r.add(c), p.has(c) || p.add(c), c;
134    },
135    /**
136     * Cancel the provided callback from running on the next frame.
137     */
138    cancel: (c) => {
139      s.delete(c), r.delete(c);
140    },
141    /**
142     * Execute all schedule callbacks.
143     */
144    process: (c) => {
145      if (a = c, i) {
146        o = !0;
147        return;
148      }
149      i = !0, [n, s] = [s, n], n.forEach(l), n.clear(), i = !1, o && (o = !1, u.process(c));
150    }
151  };
152  return u;
153}
154const Bo = 40;
155function Wi(t, e) {
156  let n = !1, s = !0;
157  const i = {
158    delta: 0,
159    timestamp: 0,
160    isProcessing: !1
161  }, o = () => n = !0, r = ce.reduce((v, A) => (v[A] = Fo(o), v), {}), { setup: a, read: l, resolveKeyframes: u, preUpdate: c, update: h, preRender: d, render: m, postRender: p } = r, g = () => {
162    const v = ct.useManualTiming ? i.timestamp : performance.now();
163    n = !1, ct.useManualTiming || (i.delta = s ? 1e3 / 60 : Math.max(Math.min(v - i.timestamp, Bo), 1)), i.timestamp = v, i.isProcessing = !0, a.process(i), l.process(i), u.process(i), c.process(i), h.process(i), d.process(i), m.process(i), p.process(i), i.isProcessing = !1, n && e && (s = !1, t(g));
164  }, b = () => {
165    n = !0, s = !0, i.isProcessing || t(g);
166  };
167  return { schedule: ce.reduce((v, A) => {
168    const S = r[A];
169    return v[A] = (M, k = !1, C = !1) => (n || b(), S.schedule(M, k, C)), v;
170  }, {}), cancel: (v) => {
171    for (let A = 0; A < ce.length; A++)
172      r[ce[A]].cancel(v);
173  }, state: i, steps: r };
174}
175const { schedule: R, cancel: pt, state: _, steps: De } = /* @__PURE__ */ Wi(typeof requestAnimationFrame < "u" ? requestAnimationFrame : nt, !0);
176let fe;
177function Oo() {
178  fe = void 0;
179}
180const X = {
181  now: () => (fe === void 0 && X.set(_.isProcessing || ct.useManualTiming ? _.timestamp : performance.now()), fe),
182  set: (t) => {
183    fe = t, queueMicrotask(Oo);
184  }
185}, zi = (t) => (e) => typeof e == "string" && e.startsWith(t), En = /* @__PURE__ */ zi("--"), jo = /* @__PURE__ */ zi("var(--"), Dn = (t) => jo(t) ? $o.test(t.split("/*")[0].trim()) : !1, $o = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, Bt = {
186  test: (t) => typeof t == "number",
187  parse: parseFloat,
188  transform: (t) => t
189}, Jt = {
190  ...Bt,
191  transform: (t) => lt(0, 1, t)
192}, ue = {
193  ...Bt,
194  default: 1
195}, Kt = (t) => Math.round(t * 1e5) / 1e5, Rn = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
196function Uo(t) {
197  return t == null;
198}
199const _o = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, Nn = (t, e) => (n) => !!(typeof n == "string" && _o.test(n) && n.startsWith(t) || e && !Uo(n) && Object.prototype.hasOwnProperty.call(n, e)), Hi = (t, e, n) => (s) => {
200  if (typeof s != "string")
201    return s;
202  const [i, o, r, a] = s.match(Rn);
203  return {
204    [t]: parseFloat(i),
205    [e]: parseFloat(o),
206    [n]: parseFloat(r),
207    alpha: a !== void 0 ? parseFloat(a) : 1
208  };
209}, Wo = (t) => lt(0, 255, t), Re = {
210  ...Bt,
211  transform: (t) => Math.round(Wo(t))
212}, wt = {
213  test: /* @__PURE__ */ Nn("rgb", "red"),
214  parse: /* @__PURE__ */ Hi("red", "green", "blue"),
215  transform: ({ red: t, green: e, blue: n, alpha: s = 1 }) => "rgba(" + Re.transform(t) + ", " + Re.transform(e) + ", " + Re.transform(n) + ", " + Kt(Jt.transform(s)) + ")"
216};
217function zo(t) {
218  let e = "", n = "", s = "", i = "";
219  return t.length > 5 ? (e = t.substring(1, 3), n = t.substring(3, 5), s = t.substring(5, 7), i = t.substring(7, 9)) : (e = t.substring(1, 2), n = t.substring(2, 3), s = t.substring(3, 4), i = t.substring(4, 5), e += e, n += n, s += s, i += i), {
220    red: parseInt(e, 16),
221    green: parseInt(n, 16),
222    blue: parseInt(s, 16),
223    alpha: i ? parseInt(i, 16) / 255 : 1
224  };
225}
226const Xe = {
227  test: /* @__PURE__ */ Nn("#"),
228  parse: zo,
229  transform: wt.transform
230}, re = /* @__NO_SIDE_EFFECTS__ */ (t) => ({
231  test: (e) => typeof e == "string" && e.endsWith(t) && e.split(" ").length === 1,
232  parse: parseFloat,
233  transform: (e) => `${e}${t}`
234}), ht = /* @__PURE__ */ re("deg"), at = /* @__PURE__ */ re("%"), P = /* @__PURE__ */ re("px"), Ho = /* @__PURE__ */ re("vh"), Ko = /* @__PURE__ */ re("vw"), is = {
235  ...at,
236  parse: (t) => at.parse(t) / 100,
237  transform: (t) => at.transform(t * 100)
238}, At = {
239  test: /* @__PURE__ */ Nn("hsl", "hue"),
240  parse: /* @__PURE__ */ Hi("hue", "saturation", "lightness"),
241  transform: ({ hue: t, saturation: e, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(t) + ", " + at.transform(Kt(e)) + ", " + at.transform(Kt(n)) + ", " + Kt(Jt.transform(s)) + ")"
242}, j = {
243  test: (t) => wt.test(t) || Xe.test(t) || At.test(t),
244  parse: (t) => wt.test(t) ? wt.parse(t) : At.test(t) ? At.parse(t) : Xe.parse(t),
245  transform: (t) => typeof t == "string" ? t : t.hasOwnProperty("red") ? wt.transform(t) : At.transform(t),
246  getAnimatableNone: (t) => {
247    const e = j.parse(t);
248    return e.alpha = 0, j.transform(e);
249  }
250}, Go = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
251function Xo(t) {
252  return isNaN(t) && typeof t == "string" && (t.match(Rn)?.length || 0) + (t.match(Go)?.length || 0) > 0;
253}
254const Ki = "number", Gi = "color", Yo = "var", qo = "var(", rs = "${}", Zo = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;
255function Qt(t) {
256  const e = t.toString(), n = [], s = {
257    color: [],
258    number: [],
259    var: []
260  }, i = [];
261  let o = 0;
262  const a = e.replace(Zo, (l) => (j.test(l) ? (s.color.push(o), i.push(Gi), n.push(j.parse(l))) : l.startsWith(qo) ? (s.var.push(o), i.push(Yo), n.push(l)) : (s.number.push(o), i.push(Ki), n.push(parseFloat(l))), ++o, rs)).split(rs);
263  return { values: n, split: a, indexes: s, types: i };
264}
265function Xi(t) {
266  return Qt(t).values;
267}
268function Yi(t) {
269  const { split: e, types: n } = Qt(t), s = e.length;
270  return (i) => {
271    let o = "";
272    for (let r = 0; r < s; r++)
273      if (o += e[r], i[r] !== void 0) {
274        const a = n[r];
275        a === Ki ? o += Kt(i[r]) : a === Gi ? o += j.transform(i[r]) : o += i[r];
276      }
277    return o;
278  };
279}
280const Jo = (t) => typeof t == "number" ? 0 : j.test(t) ? j.getAnimatableNone(t) : t;
281function Qo(t) {
282  const e = Xi(t);
283  return Yi(t)(e.map(Jo));
284}
285const gt = {
286  test: Xo,
287  parse: Xi,
288  createTransformer: Yi,
289  getAnimatableNone: Qo
290};
291function Ne(t, e, n) {
292  return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? t + (e - t) * 6 * n : n < 1 / 2 ? e : n < 2 / 3 ? t + (e - t) * (2 / 3 - n) * 6 : t;
293}
294function ta({ hue: t, saturation: e, lightness: n, alpha: s }) {
295  t /= 360, e /= 100, n /= 100;
296  let i = 0, o = 0, r = 0;
297  if (!e)
298    i = o = r = n;
299  else {
300    const a = n < 0.5 ? n * (1 + e) : n + e - n * e, l = 2 * n - a;
301    i = Ne(l, a, t + 1 / 3), o = Ne(l, a, t), r = Ne(l, a, t - 1 / 3);
302  }
303  return {
304    red: Math.round(i * 255),
305    green: Math.round(o * 255),
306    blue: Math.round(r * 255),
307    alpha: s
308  };
309}
310function xe(t, e) {
311  return (n) => n > 0 ? e : t;
312}
313const N = (t, e, n) => t + (e - t) * n, Le = (t, e, n) => {
314  const s = t * t, i = n * (e * e - s) + s;
315  return i < 0 ? 0 : Math.sqrt(i);
316}, ea = [Xe, wt, At], na = (t) => ea.find((e) => e.test(t));
317function os(t) {
318  const e = na(t);
319  if (!e)
320    return !1;
321  let n = e.parse(t);
322  return e === At && (n = ta(n)), n;
323}
324const as = (t, e) => {
325  const n = os(t), s = os(e);
326  if (!n || !s)
327    return xe(t, e);
328  const i = { ...n };
329  return (o) => (i.red = Le(n.red, s.red, o), i.green = Le(n.green, s.green, o), i.blue = Le(n.blue, s.blue, o), i.alpha = N(n.alpha, s.alpha, o), wt.transform(i));
330}, Ye = /* @__PURE__ */ new Set(["none", "hidden"]);
331function sa(t, e) {
332  return Ye.has(t) ? (n) => n <= 0 ? t : e : (n) => n >= 1 ? e : t;
333}
334function ia(t, e) {
335  return (n) => N(t, e, n);
336}
337function Ln(t) {
338  return typeof t == "number" ? ia : typeof t == "string" ? Dn(t) ? xe : j.test(t) ? as : aa : Array.isArray(t) ? qi : typeof t == "object" ? j.test(t) ? as : ra : xe;
339}
340function qi(t, e) {
341  const n = [...t], s = n.length, i = t.map((o, r) => Ln(o)(o, e[r]));
342  return (o) => {
343    for (let r = 0; r < s; r++)
344      n[r] = i[r](o);
345    return n;
346  };
347}
348function ra(t, e) {
349  const n = { ...t, ...e }, s = {};
350  for (const i in n)
351    t[i] !== void 0 && e[i] !== void 0 && (s[i] = Ln(t[i])(t[i], e[i]));
352  return (i) => {
353    for (const o in s)
354      n[o] = s[o](i);
355    return n;
356  };
357}
358function oa(t, e) {
359  const n = [], s = { color: 0, var: 0, number: 0 };
360  for (let i = 0; i < e.values.length; i++) {
361    const o = e.types[i], r = t.indexes[o][s[o]], a = t.values[r] ?? 0;
362    n[i] = a, s[o]++;
363  }
364  return n;
365}
366const aa = (t, e) => {
367  const n = gt.createTransformer(e), s = Qt(t), i = Qt(e);
368  return s.indexes.var.length === i.indexes.var.length && s.indexes.color.length === i.indexes.color.length && s.indexes.number.length >= i.indexes.number.length ? Ye.has(t) && !i.values.length || Ye.has(e) && !s.values.length ? sa(t, e) : se(qi(oa(s, i), i.values), n) : xe(t, e);
369};
370function Zi(t, e, n) {
371  return typeof t == "number" && typeof e == "number" && typeof n == "number" ? N(t, e, n) : Ln(t)(t, e);
372}
373const la = (t) => {
374  const e = ({ timestamp: n }) => t(n);
375  return {
376    start: (n = !0) => R.update(e, n),
377    stop: () => pt(e),
378    /**
379     * If we're processing this frame we can use the
380     * framelocked timestamp to keep things in sync.
381     */
382    now: () => _.isProcessing ? _.timestamp : X.now()
383  };
384}, Ji = (t, e, n = 10) => {
385  let s = "";
386  const i = Math.max(Math.round(e / n), 2);
387  for (let o = 0; o < i; o++)
388    s += Math.round(t(o / (i - 1)) * 1e4) / 1e4 + ", ";
389  return `linear(${s.substring(0, s.length - 2)})`;
390}, ve = 2e4;
391function In(t) {
392  let e = 0;
393  const n = 50;
394  let s = t.next(e);
395  for (; !s.done && e < ve; )
396    e += n, s = t.next(e);
397  return e >= ve ? 1 / 0 : e;
398}
399function ca(t, e = 100, n) {
400  const s = n({ ...t, keyframes: [0, e] }), i = Math.min(In(s), ve);
401  return {
402    type: "keyframes",
403    ease: (o) => s.next(i * o).value / e,
404    duration: /* @__PURE__ */ et(i)
405  };
406}
407const ua = 5;
408function Qi(t, e, n) {
409  const s = Math.max(e - ua, 0);
410  return Ri(n - t(s), e - s);
411}
412const L = {
413  // Default spring physics
414  stiffness: 100,
415  damping: 10,
416  mass: 1,
417  velocity: 0,
418  // Default duration/bounce-based options
419  duration: 800,
420  // in ms
421  bounce: 0.3,
422  visualDuration: 0.3,
423  // in seconds
424  // Rest thresholds
425  restSpeed: {
426    granular: 0.01,
427    default: 2
428  },
429  restDelta: {
430    granular: 5e-3,
431    default: 0.5
432  },
433  // Limits
434  minDuration: 0.01,
435  // in seconds
436  maxDuration: 10,
437  // in seconds
438  minDamping: 0.05,
439  maxDamping: 1
440}, Ie = 1e-3;
441function ha({ duration: t = L.duration, bounce: e = L.bounce, velocity: n = L.velocity, mass: s = L.mass }) {
442  let i, o, r = 1 - e;
443  r = lt(L.minDamping, L.maxDamping, r), t = lt(L.minDuration, L.maxDuration, /* @__PURE__ */ et(t)), r < 1 ? (i = (u) => {
444    const c = u * r, h = c * t, d = c - n, m = qe(u, r), p = Math.exp(-h);
445    return Ie - d / m * p;
446  }, o = (u) => {
447    const h = u * r * t, d = h * n + n, m = Math.pow(r, 2) * Math.pow(u, 2) * t, p = Math.exp(-h), g = qe(Math.pow(u, 2), r);
448    return (-i(u) + Ie > 0 ? -1 : 1) * ((d - m) * p) / g;
449  }) : (i = (u) => {
450    const c = Math.exp(-u * t), h = (u - n) * t + 1;
451    return -Ie + c * h;
452  }, o = (u) => {
453    const c = Math.exp(-u * t), h = (n - u) * (t * t);
454    return c * h;
455  });
456  const a = 5 / t, l = fa(i, o, a);
457  if (t = /* @__PURE__ */ ot(t), isNaN(l))
458    return {
459      stiffness: L.stiffness,
460      damping: L.damping,
461      duration: t
462    };
463  {
464    const u = Math.pow(l, 2) * s;
465    return {
466      stiffness: u,
467      damping: r * 2 * Math.sqrt(s * u),
468      duration: t
469    };
470  }
471}
472const da = 12;
473function fa(t, e, n) {
474  let s = n;
475  for (let i = 1; i < da; i++)
476    s = s - t(s) / e(s);
477  return s;
478}
479function qe(t, e) {
480  return t * Math.sqrt(1 - e * e);
481}
482const ma = ["duration", "bounce"], pa = ["stiffness", "damping", "mass"];
483function ls(t, e) {
484  return e.some((n) => t[n] !== void 0);
485}
486function ga(t) {
487  let e = {
488    velocity: L.velocity,
489    stiffness: L.stiffness,
490    damping: L.damping,
491    mass: L.mass,
492    isResolvedFromDuration: !1,
493    ...t
494  };
495  if (!ls(t, pa) && ls(t, ma))
496    if (t.visualDuration) {
497      const n = t.visualDuration, s = 2 * Math.PI / (n * 1.2), i = s * s, o = 2 * lt(0.05, 1, 1 - (t.bounce || 0)) * Math.sqrt(i);
498      e = {
499        ...e,
500        mass: L.mass,
501        stiffness: i,
502        damping: o
503      };
504    } else {
505      const n = ha(t);
506      e = {
507        ...e,
508        ...n,
509        mass: L.mass
510      }, e.isResolvedFromDuration = !0;
511    }
512  return e;
513}
514function be(t = L.visualDuration, e = L.bounce) {
515  const n = typeof t != "object" ? {
516    visualDuration: t,
vendor: 4,375 bytes, lines 517-654
517    keyframes: [0, 1],
518    bounce: e
519  } : t;
520  let { restSpeed: s, restDelta: i } = n;
521  const o = n.keyframes[0], r = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: o }, { stiffness: l, damping: u, mass: c, duration: h, velocity: d, isResolvedFromDuration: m } = ga({
522    ...n,
523    velocity: -/* @__PURE__ */ et(n.velocity || 0)
524  }), p = d || 0, g = u / (2 * Math.sqrt(l * c)), b = r - o, y = /* @__PURE__ */ et(Math.sqrt(l / c)), x = Math.abs(b) < 5;
525  s || (s = x ? L.restSpeed.granular : L.restSpeed.default), i || (i = x ? L.restDelta.granular : L.restDelta.default);
526  let v;
527  if (g < 1) {
528    const S = qe(y, g);
529    v = (M) => {
530      const k = Math.exp(-g * y * M);
531      return r - k * ((p + g * y * b) / S * Math.sin(S * M) + b * Math.cos(S * M));
532    };
533  } else if (g === 1)
534    v = (S) => r - Math.exp(-y * S) * (b + (p + y * b) * S);
535  else {
536    const S = y * Math.sqrt(g * g - 1);
537    v = (M) => {
538      const k = Math.exp(-g * y * M), C = Math.min(S * M, 300);
539      return r - k * ((p + g * y * b) * Math.sinh(C) + S * b * Math.cosh(C)) / S;
540    };
541  }
542  const A = {
543    calculatedDuration: m && h || null,
544    next: (S) => {
545      const M = v(S);
546      if (m)
547        a.done = S >= h;
548      else {
549        let k = S === 0 ? p : 0;
550        g < 1 && (k = S === 0 ? /* @__PURE__ */ ot(p) : Qi(v, S, M));
551        const C = Math.abs(k) <= s, B = Math.abs(r - M) <= i;
552        a.done = C && B;
553      }
554      return a.value = a.done ? r : M, a;
555    },
556    toString: () => {
557      const S = Math.min(In(A), ve), M = Ji((k) => A.next(S * k).value, S, 30);
558      return S + "ms " + M;
559    },
560    toTransition: () => {
561    }
562  };
563  return A;
564}
565be.applyToOptions = (t) => {
566  const e = ca(t, 100, be);
567  return t.ease = e.ease, t.duration = /* @__PURE__ */ ot(e.duration), t.type = "keyframes", t;
568};
569function Ze({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 325, bounceDamping: i = 10, bounceStiffness: o = 500, modifyTarget: r, min: a, max: l, restDelta: u = 0.5, restSpeed: c }) {
570  const h = t[0], d = {
571    done: !1,
572    value: h
573  }, m = (C) => a !== void 0 && C < a || l !== void 0 && C > l, p = (C) => a === void 0 ? l : l === void 0 || Math.abs(a - C) < Math.abs(l - C) ? a : l;
574  let g = n * e;
575  const b = h + g, y = r === void 0 ? b : r(b);
576  y !== b && (g = y - h);
577  const x = (C) => -g * Math.exp(-C / s), v = (C) => y + x(C), A = (C) => {
578    const B = x(C), $ = v(C);
579    d.done = Math.abs(B) <= u, d.value = d.done ? y : $;
580  };
581  let S, M;
582  const k = (C) => {
583    m(d.value) && (S = C, M = be({
584      keyframes: [d.value, p(d.value)],
585      velocity: Qi(v, C, d.value),
586      // TODO: This should be passing * 1000
587      damping: i,
588      stiffness: o,
589      restDelta: u,
590      restSpeed: c
591    }));
592  };
593  return k(0), {
594    calculatedDuration: null,
595    next: (C) => {
596      let B = !1;
597      return !M && S === void 0 && (B = !0, A(C), k(C)), S !== void 0 && C >= S ? M.next(C - S) : (!B && A(C), d);
598    }
599  };
600}
601function ya(t, e, n) {
602  const s = [], i = n || ct.mix || Zi, o = t.length - 1;
603  for (let r = 0; r < o; r++) {
604    let a = i(t[r], t[r + 1]);
605    if (e) {
606      const l = Array.isArray(e) ? e[r] || nt : e;
607      a = se(l, a);
608    }
609    s.push(a);
610  }
611  return s;
612}
613function xa(t, e, { clamp: n = !0, ease: s, mixer: i } = {}) {
614  const o = t.length;
615  if (Cn(o === e.length), o === 1)
616    return () => e[0];
617  if (o === 2 && e[0] === e[1])
618    return () => e[1];
619  const r = t[0] === t[1];
620  t[0] > t[o - 1] && (t = [...t].reverse(), e = [...e].reverse());
621  const a = ya(e, s, i), l = a.length, u = (c) => {
622    if (r && c < t[0])
623      return e[0];
624    let h = 0;
625    if (l > 1)
626      for (; h < t.length - 2 && !(c < t[h + 1]); h++)
627        ;
628    const d = /* @__PURE__ */ Zt(t[h], t[h + 1], c);
629    return a[h](d);
630  };
631  return n ? (c) => u(lt(t[0], t[o - 1], c)) : u;
632}
633function va(t, e) {
634  const n = t[t.length - 1];
635  for (let s = 1; s <= e; s++) {
636    const i = /* @__PURE__ */ Zt(0, e, s);
637    t.push(N(n, 1, i));
638  }
639}
640function ba(t) {
641  const e = [0];
642  return va(e, t.length - 1), e;
643}
644function wa(t, e) {
645  return t.map((n) => n * e);
646}
647function Ta(t, e) {
648  return t.map(() => e || Ui).splice(0, t.length - 1);
649}
650function Gt({ duration: t = 300, keyframes: e, times: n, ease: s = "easeInOut" }) {
651  const i = No(s) ? s.map(ss) : ss(s), o = {
652    done: !1,
653    value: e[0]
654  }
vendor: 13,052 bytes, lines 654-1029
654, r = wa(
655    // Only use the provided offsets if they're the correct length
656    // TODO Maybe we should warn here if there's a length mismatch
657    n && n.length === e.length ? n : ba(e),
658    t
659  ), a = xa(r, e, {
660    ease: Array.isArray(i) ? i : Ta(e, i)
661  });
662  return {
663    calculatedDuration: t,
664    next: (l) => (o.value = a(l), o.done = l >= t, o)
665  };
666}
667const Sa = (t) => t !== null;
668function Fn(t, { repeat: e, repeatType: n = "loop" }, s, i = 1) {
669  const o = t.filter(Sa), a = i < 0 || e && n !== "loop" && e % 2 === 1 ? 0 : o.length - 1;
670  return !a || s === void 0 ? o[a] : s;
671}
672const Pa = {
673  decay: Ze,
674  inertia: Ze,
675  tween: Gt,
676  keyframes: Gt,
677  spring: be
678};
679function tr(t) {
680  typeof t.type == "string" && (t.type = Pa[t.type]);
681}
682class Bn {
683  constructor() {
684    this.updateFinished();
685  }
686  get finished() {
687    return this._finished;
688  }
689  updateFinished() {
690    this._finished = new Promise((e) => {
691      this.resolve = e;
692    });
693  }
694  notifyFinished() {
695    this.resolve();
696  }
697  /**
698   * Allows the animation to be awaited.
699   *
700   * @deprecated Use `finished` instead.
701   */
702  then(e, n) {
703    return this.finished.then(e, n);
704  }
705}
706const Ca = (t) => t / 100;
707class On extends Bn {
708  constructor(e) {
709    super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.stop = () => {
710      const { motionValue: n } = this.options;
711      n && n.updatedAt !== X.now() && this.tick(X.now()), this.isStopped = !0, this.state !== "idle" && (this.teardown(), this.options.onStop?.());
712    }, this.options = e, this.initAnimation(), this.play(), e.autoplay === !1 && this.pause();
713  }
714  initAnimation() {
715    const { options: e } = this;
716    tr(e);
717    const { type: n = Gt, repeat: s = 0, repeatDelay: i = 0, repeatType: o, velocity: r = 0 } = e;
718    let { keyframes: a } = e;
719    const l = n || Gt;
720    l !== Gt && typeof a[0] != "number" && (this.mixKeyframes = se(Ca, Zi(a[0], a[1])), a = [0, 100]);
721    const u = l({ ...e, keyframes: a });
722    o === "mirror" && (this.mirroredGenerator = l({
723      ...e,
724      keyframes: [...a].reverse(),
725      velocity: -r
726    })), u.calculatedDuration === null && (u.calculatedDuration = In(u));
727    const { calculatedDuration: c } = u;
728    this.calculatedDuration = c, this.resolvedDuration = c + i, this.totalDuration = this.resolvedDuration * (s + 1) - i, this.generator = u;
729  }
730  updateTime(e) {
731    const n = Math.round(e - this.startTime) * this.playbackSpeed;
732    this.holdTime !== null ? this.currentTime = this.holdTime : this.currentTime = n;
733  }
734  tick(e, n = !1) {
735    const { generator: s, totalDuration: i, mixKeyframes: o, mirroredGenerator: r, resolvedDuration: a, calculatedDuration: l } = this;
736    if (this.startTime === null)
737      return s.next(0);
738    const { delay: u = 0, keyframes: c, repeat: h, repeatType: d, repeatDelay: m, type: p, onUpdate: g, finalKeyframe: b } = this.options;
739    this.speed > 0 ? this.startTime = Math.min(this.startTime, e) : this.speed < 0 && (this.startTime = Math.min(e - i / this.speed, this.startTime)), n ? this.currentTime = e : this.updateTime(e);
740    const y = this.currentTime - u * (this.playbackSpeed >= 0 ? 1 : -1), x = this.playbackSpeed >= 0 ? y < 0 : y > i;
741    this.currentTime = Math.max(y, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = i);
742    let v = this.currentTime, A = s;
743    if (h) {
744      const C = Math.min(this.currentTime, i) / a;
745      let B = Math.floor(C), $ = C % 1;
746      !$ && C >= 1 && ($ = 1), $ === 1 && B--, B = Math.min(B, h + 1), !!(B % 2) && (d === "reverse" ? ($ = 1 - $, m && ($ -= m / a)) : d === "mirror" && (A = r)), v = lt(0, 1, $) * a;
747    }
748    const S = x ? { done: !1, value: c[0] } : A.next(v);
749    o && (S.value = o(S.value));
750    let { done: M } = S;
751    !x && l !== null && (M = this.playbackSpeed >= 0 ? this.currentTime >= i : this.currentTime <= 0);
752    const k = this.holdTime === null && (this.state === "finished" || this.state === "running" && M);
753    return k && p !== Ze && (S.value = Fn(c, this.options, b, this.speed)), g && g(S.value), k && this.finish(), S;
754  }
755  /**
756   * Allows the returned animation to be awaited or promise-chained. Currently
757   * resolves when the animation finishes at all but in a future update could/should
758   * reject if its cancels.
759   */
760  then(e, n) {
761    return this.finished.then(e, n);
762  }
763  get duration() {
764    return /* @__PURE__ */ et(this.calculatedDuration);
765  }
766  get iterationDuration() {
767    const { delay: e = 0 } = this.options || {};
768    return this.duration + /* @__PURE__ */ et(e);
769  }
770  get time() {
771    return /* @__PURE__ */ et(this.currentTime);
772  }
773  set time(e) {
774    e = /* @__PURE__ */ ot(e), this.currentTime = e, this.startTime === null || this.holdTime !== null || this.playbackSpeed === 0 ? this.holdTime = e : this.driver && (this.startTime = this.driver.now() - e / this.playbackSpeed), this.driver?.start(!1);
775  }
776  get speed() {
777    return this.playbackSpeed;
778  }
779  set speed(e) {
780    this.updateTime(X.now());
781    const n = this.playbackSpeed !== e;
782    this.playbackSpeed = e, n && (this.time = /* @__PURE__ */ et(this.currentTime));
783  }
784  play() {
785    if (this.isStopped)
786      return;
787    const { driver: e = la, startTime: n } = this.options;
788    this.driver || (this.driver = e((i) => this.tick(i))), this.options.onPlay?.();
789    const s = this.driver.now();
790    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();
791  }
792  pause() {
793    this.state = "paused", this.updateTime(X.now()), this.holdTime = this.currentTime;
794  }
795  complete() {
796    this.state !== "running" && this.play(), this.state = "finished", this.holdTime = null;
797  }
798  finish() {
799    this.notifyFinished(), this.teardown(), this.state = "finished", this.options.onComplete?.();
800  }
801  cancel() {
802    this.holdTime = null, this.startTime = 0, this.tick(0), this.teardown(), this.options.onCancel?.();
803  }
804  teardown() {
805    this.state = "idle", this.stopDriver(), this.startTime = this.holdTime = null;
806  }
807  stopDriver() {
808    this.driver && (this.driver.stop(), this.driver = void 0);
809  }
810  sample(e) {
811    return this.startTime = 0, this.tick(e, !0);
812  }
813  attachTimeline(e) {
814    return this.options.allowFlatten && (this.options.type = "keyframes", this.options.ease = "linear", this.initAnimation()), this.driver?.stop(), e.observe(this);
815  }
816}
817function Ma(t) {
818  for (let e = 1; e < t.length; e++)
819    t[e] ?? (t[e] = t[e - 1]);
820}
821const Tt = (t) => t * 180 / Math.PI, Je = (t) => {
822  const e = Tt(Math.atan2(t[1], t[0]));
823  return Qe(e);
824}, Aa = {
825  x: 4,
826  y: 5,
827  translateX: 4,
828  translateY: 5,
829  scaleX: 0,
830  scaleY: 3,
831  scale: (t) => (Math.abs(t[0]) + Math.abs(t[3])) / 2,
832  rotate: Je,
833  rotateZ: Je,
834  skewX: (t) => Tt(Math.atan(t[1])),
835  skewY: (t) => Tt(Math.atan(t[2])),
836  skew: (t) => (Math.abs(t[1]) + Math.abs(t[2])) / 2
837}, Qe = (t) => (t = t % 360, t < 0 && (t += 360), t), cs = Je, us = (t) => Math.sqrt(t[0] * t[0] + t[1] * t[1]), hs = (t) => Math.sqrt(t[4] * t[4] + t[5] * t[5]), ka = {
838  x: 12,
839  y: 13,
840  z: 14,
841  translateX: 12,
842  translateY: 13,
843  translateZ: 14,
844  scaleX: us,
845  scaleY: hs,
846  scale: (t) => (us(t) + hs(t)) / 2,
847  rotateX: (t) => Qe(Tt(Math.atan2(t[6], t[5]))),
848  rotateY: (t) => Qe(Tt(Math.atan2(-t[2], t[0]))),
849  rotateZ: cs,
850  rotate: cs,
851  skewX: (t) => Tt(Math.atan(t[4])),
852  skewY: (t) => Tt(Math.atan(t[1])),
853  skew: (t) => (Math.abs(t[1]) + Math.abs(t[4])) / 2
854};
855function tn(t) {
856  return t.includes("scale") ? 1 : 0;
857}
858function en(t, e) {
859  if (!t || t === "none")
860    return tn(e);
861  const n = t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
862  let s, i;
863  if (n)
864    s = ka, i = n;
865  else {
866    const a = t.match(/^matrix\(([-\d.e\s,]+)\)$/u);
867    s = Aa, i = a;
868  }
869  if (!i)
870    return tn(e);
871  const o = s[e], r = i[1].split(",").map(Ea);
872  return typeof o == "function" ? o(r) : r[o];
873}
874const Va = (t, e) => {
875  const { transform: n = "none" } = getComputedStyle(t);
876  return en(n, e);
877};
878function Ea(t) {
879  return parseFloat(t.trim());
880}
881const Ot = [
882  "transformPerspective",
883  "x",
884  "y",
885  "z",
886  "translateX",
887  "translateY",
888  "translateZ",
889  "scale",
890  "scaleX",
891  "scaleY",
892  "rotate",
893  "rotateX",
894  "rotateY",
895  "rotateZ",
896  "skew",
897  "skewX",
898  "skewY"
899], jt = new Set(Ot), ds = (t) => t === Bt || t === P, Da = /* @__PURE__ */ new Set(["x", "y", "z"]), Ra = Ot.filter((t) => !Da.has(t));
900function Na(t) {
901  const e = [];
902  return Ra.forEach((n) => {
903    const s = t.getValue(n);
904    s !== void 0 && (e.push([n, s.get()]), s.set(n.startsWith("scale") ? 1 : 0));
905  }), e;
906}
907const St = {
908  // Dimensions
909  width: ({ x: t }, { paddingLeft: e = "0", paddingRight: n = "0" }) => t.max - t.min - parseFloat(e) - parseFloat(n),
910  height: ({ y: t }, { paddingTop: e = "0", paddingBottom: n = "0" }) => t.max - t.min - parseFloat(e) - parseFloat(n),
911  top: (t, { top: e }) => parseFloat(e),
912  left: (t, { left: e }) => parseFloat(e),
913  bottom: ({ y: t }, { top: e }) => parseFloat(e) + (t.max - t.min),
914  right: ({ x: t }, { left: e }) => parseFloat(e) + (t.max - t.min),
915  // Transform
916  x: (t, { transform: e }) => en(e, "x"),
917  y: (t, { transform: e }) => en(e, "y")
918};
919St.translateX = St.x;
920St.translateY = St.y;
921const Pt = /* @__PURE__ */ new Set();
922let nn = !1, sn = !1, rn = !1;
923function er() {
924  if (sn) {
925    const t = Array.from(Pt).filter((s) => s.needsMeasurement), e = new Set(t.map((s) => s.element)), n = /* @__PURE__ */ new Map();
926    e.forEach((s) => {
927      const i = Na(s);
928      i.length && (n.set(s, i), s.render());
929    }), t.forEach((s) => s.measureInitialState()), e.forEach((s) => {
930      s.render();
931      const i = n.get(s);
932      i && i.forEach(([o, r]) => {
933        s.getValue(o)?.set(r);
934      });
935    }), t.forEach((s) => s.measureEndState()), t.forEach((s) => {
936      s.suspendedScrollY !== void 0 && window.scrollTo(0, s.suspendedScrollY);
937    });
938  }
939  sn = !1, nn = !1, Pt.forEach((t) => t.complete(rn)), Pt.clear();
940}
941function nr() {
942  Pt.forEach((t) => {
943    t.readKeyframes(), t.needsMeasurement && (sn = !0);
944  });
945}
946function La() {
947  rn = !0, nr(), er(), rn = !1;
948}
949class jn {
950  constructor(e, n, s, i, o, r = !1) {
951    this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...e], this.onComplete = n, this.name = s, this.motionValue = i, this.element = o, this.isAsync = r;
952  }
953  scheduleResolve() {
954    this.state = "scheduled", this.isAsync ? (Pt.add(this), nn || (nn = !0, R.read(nr), R.resolveKeyframes(er))) : (this.readKeyframes(), this.complete());
955  }
956  readKeyframes() {
957    const { unresolvedKeyframes: e, name: n, element: s, motionValue: i } = this;
958    if (e[0] === null) {
959      const o = i?.get(), r = e[e.length - 1];
960      if (o !== void 0)
961        e[0] = o;
962      else if (s && n) {
963        const a = s.readValue(n, r);
964        a != null && (e[0] = a);
965      }
966      e[0] === void 0 && (e[0] = r), i && o === void 0 && i.set(e[0]);
967    }
968    Ma(e);
969  }
970  setFinalKeyframe() {
971  }
972  measureInitialState() {
973  }
974  renderEndStyles() {
975  }
976  measureEndState() {
977  }
978  complete(e = !1) {
979    this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, e), Pt.delete(this);
980  }
981  cancel() {
982    this.state === "scheduled" && (Pt.delete(this), this.state = "pending");
983  }
984  resume() {
985    this.state === "pending" && this.scheduleResolve();
986  }
987}
988const Ia = (t) => t.startsWith("--");
989function Fa(t, e, n) {
990  Ia(e) ? t.style.setProperty(e, n) : t.style[e] = n;
991}
992const Ba = /* @__PURE__ */ Mn(() => window.ScrollTimeline !== void 0), Oa = {};
993function ja(t, e) {
994  const n = /* @__PURE__ */ Mn(t);
995  return () => Oa[e] ?? n();
996}
997const sr = /* @__PURE__ */ ja(() => {
998  try {
999    document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
1000  } catch {
1001    return !1;
1002  }
1003  return !0;
1004}, "linearEasing"), Ht = ([t, e, n, s]) => `cubic-bezier(${t}, ${e}, ${n}, ${s})`, fs = {
1005  linear: "linear",
1006  ease: "ease",
1007  easeIn: "ease-in",
1008  easeOut: "ease-out",
1009  easeInOut: "ease-in-out",
1010  circIn: /* @__PURE__ */ Ht([0, 0.65, 0.55, 1]),
1011  circOut: /* @__PURE__ */ Ht([0.55, 0, 1, 0.45]),
1012  backIn: /* @__PURE__ */ Ht([0.31, 0.01, 0.66, -0.59]),
1013  backOut: /* @__PURE__ */ Ht([0.33, 1.53, 0.69, 0.99])
1014};
1015function ir(t, e) {
1016  if (t)
1017    return typeof t == "function" ? sr() ? Ji(t, e) : "ease-out" : _i(t) ? Ht(t) : Array.isArray(t) ? t.map((n) => ir(n, e) || fs.easeOut) : fs[t];
1018}
1019function $a(t, e, n, { delay: s = 0, duration: i = 300, repeat: o = 0, repeatType: r = "loop", ease: a = "easeOut", times: l } = {}, u = void 0) {
1020  const c = {
1021    [e]: n
1022  };
1023  l && (c.offset = l);
1024  const h = ir(a, i);
1025  Array.isArray(h) && (c.easing = h);
1026  const d = {
1027    delay: s,
1028    duration: i,
1029    easing: Array.isArray(h) ? "linear" : h,
1030    fill: "both",
1031    iterations: o + 1,
1032    direction: r === "reverse" ? "alternate" : "normal"
1033  };
1034  return u && (d.pseudoElement = u), t.animate(c, d);
1035}
1036function rr(t) {
1037  return typeof t == "function" && "applyToOptions" in t;
1038}
1039function Ua({ type: t, ...e }) {
1040  return rr(t) && sr() ? t.applyToOptions(e) : (e.duration ?? (e.duration = 300), e.ease ?? (e.ease = "easeOut"), e);
1041}
1042class _a extends Bn {
1043  constructor(e) {
1044    if (super(), this.finishedTime = null, this.isStopped = !1, !e)
1045      return;
1046    const { element: n, name: s, keyframes: i, pseudoElement: o, allowFlatten: r = !1, finalKeyframe: a, onComplete: l } = e;
1047    this.isPseudoElement = !!o, this.allowFlatten = r, this.options = e, Cn(typeof e.type != "string");
1048    const u = Ua(e);
1049    this.animation = $a(n, s, i, u, o), u.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
1050      if (this.finishedTime = this.time, !o) {
1051        const c = Fn(i, this.options, a, this.speed);
1052        this.updateMotionValue ? this.updateMotionValue(c) : Fa(n, s, c), this.animation.cancel();
1053      }
1054      l?.(), this.notifyFinished();
1055    };
1056  }
1057  play() {
1058    this.isStopped || (this.animation.play(), this.state === "finished" && this.updateFinished());
1059  }
1060  pause() {
1061    this.animation.pause();
1062  }
1063  complete() {
1064    this.animation.finish?.();
1065  }
1066  cancel() {
1067    try {
1068      this.animation.cancel();
1069    } catch {
1070    }
1071  }
1072  stop() {
1073    if (this.isStopped)
1074      return;
1075    this.isStopped = !0;
1076    const { state: e } = this;
1077    e === "idle" || e === "finished" || (this.updateMotionValue ? this.updateMotionValue() : this.commitStyles(), this.isPseudoElement || this.cancel());
1078  }
1079  /**
1080   * WAAPI doesn't natively have any interruption capabilities.
1081   *
1082   * In this method, we commit styles back to the DOM before cancelling
1083   * the animation.
1084   *
1085   * This is designed to be overridden by NativeAnimationExtended, which
1086   * will create a renderless JS animation and sample it twice to calculate
1087   * its current value, "previous" value, and therefore allow
1088   * Motion to also correctly calculate velocity for any subsequent animation
1089   * while deferring the commit until the next animation frame.
1090   */
1091  commitStyles() {
1092    this.isPseudoElement || this.animation.commitStyles?.();
1093  }
1094  get duration() {
1095    const e = this.animation.effect?.getComputedTiming?.().duration || 0;
1096    return /* @__PURE__ */ et(Number(e));
1097  }
1098  get iterationDuration() {
1099    const { delay: e = 0 } = this.options || {};
1100    return this.duration + /* @__PURE__ */ et(e);
1101  }
1102  get time() {
1103    return /* @__PURE__ */ et(Number(this.animation.currentTime) || 0);
1104  }
1105  set time(e) {
1106    this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */ ot(e);
1107  }
1108  /**
1109   * The playback speed of the animation.
1110   * 1 = normal speed, 2 = double speed, 0.5 = half speed.
1111   */
1112  get speed() {
1113    return this.animation.playbackRate;
1114  }
1115  set speed(e) {
1116    e < 0 && (this.finishedTime = null), this.animation.playbackRate = e;
1117  }
1118  get state() {
1119    return this.finishedTime !== null ? "finished" : this.animation.playState;
1120  }
1121  get startTime() {
1122    return Number(this.animation.startTime);
1123  }
1124  set startTime(e) {
1125    this.animation.startTime = e;
1126  }
1127  /**
1128   * Attaches a timeline to the animation, for instance the `ScrollTimeline`.
1129   */
1130  attachTimeline({ timeline: e, observe: n }) {
1131    return this.allowFlatten && this.animation.effect?.updateTiming({ easing: "linear" }), this.animation.onfinish = null, e && Ba() ? (this.animation.timeline = e, nt) : n(this);
1132  }
1133}
1134const or = {
1135  anticipate: Oi,
1136  backInOut: Bi,
1137  circInOut: $i
1138};
1139function Wa(t) {
1140  return t in or;
1141}
1142function za(t) {
1143  typeof t.ease == "string" && Wa(t.ease) && (t.ease = or[t.ease]);
1144}
1145const ms = 10;
1146class Ha extends _a {
1147  constructor(e) {
1148    za(e), tr(e), super(e), e.startTime && (this.startTime = e.startTime), this.options = e;
1149  }
1150  /**
1151   * WAAPI doesn't natively have any interruption capabilities.
1152   *
1153   * Rather than read commited styles back out of the DOM, we can
1154   * create a renderless JS animation and sample it twice to calculate
1155   * its current value, "previous" value, and therefore allow
1156   * Motion to calculate velocity for any subsequent animation.
1157   */
1158  updateMotionValue(e) {
1159    const { motionValue: n, onUpdate: s, onComplete: i, element: o, ...r } = this.options;
1160    if (!n)
1161      return;
1162    if (e !== void 0) {
1163      n.set(e);
1164      return;
1165    }
1166    const a = new On({
1167      ...r,
1168      autoplay: !1
1169    }), l = /* @__PURE__ */ ot(this.finishedTime ?? this.time);
1170    n.setWithVelocity(a.sample(l - ms).value, a.sample(l).value, ms), a.stop();
1171  }
1172}
1173const ps = (t, e) => e === "zIndex" ? !1 : !!(typeof t == "number" || Array.isArray(t) || typeof t == "string" && // It's animatable if we have a string
1174(gt.test(t) || t === "0") && // And it contains numbers and/or colors
1175!t.startsWith("url("));
1176function Ka(t) {
1177  const e = t[0];
1178  if (t.length === 1)
1179    return !0;
1180  for (let n = 0; n < t.length; n++)
1181    if (t[n] !== e)
1182      return !0;
1183}
1184function Ga(t, e, n, s) {
1185  const i = t[0];
1186  if (i === null)
1187    return !1;
1188  if (e === "display" || e === "visibility")
1189    return !0;
1190  const o = t[t.length - 1], r = ps(i, e), a = ps(o, e);
1191  return !r || !a ? !1 : Ka(t) || (n === "spring" || rr(n)) && s;
1192}
1193function on(t) {
1194  t.duration = 0, t.type = "keyframes";
1195}
1196const Xa = /* @__PURE__ */ new Set([
1197  "opacity",
1198  "clipPath",
1199  "filter",
1200  "transform"
1201  // TODO: Could be re-enabled now we have support for linear() easing
1202  // "background-color"
1203]), Ya = /* @__PURE__ */ Mn(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
1204function qa(t) {
1205  const { motionValue: e, name: n, repeatDelay: s, repeatType: i, damping: o, type: r } = t;
1206  if (!(e?.owner?.current instanceof HTMLElement))
1207    return !1;
1208  const { onUpdate: l, transformTemplate: u } = e.owner.getProps();
1209  return Ya() && n && Xa.has(n) && (n !== "transform" || !u) && /**
1210   * If we're outputting values to onUpdate then we can't use WAAPI as there's
1211   * no way to read the value from WAAPI every frame.
1212   */
1213  !l && !s && i !== "mirror" && o !== 0 && r !== "inertia";
1214}
1215const Za = 40;
1216class Ja extends Bn {
1217  constructor({ autoplay: e = !0, delay: n = 0, type: s = "keyframes", repeat: i = 0, repeatDelay: o = 0, repeatType: r = "loop", keyframes: a, name: l, motionValue: u, element: c, ...h }) {
1218    super(), this.stop = () => {
1219      this._animation && (this._animation.stop(), this.stopTimeline?.()), this.keyframeResolver?.cancel();
1220    }, this.createdAt = X.now();
1221    const d = {
1222      autoplay: e,
1223      delay: n,
1224      type: s,
1225      repeat: i,
1226      repeatDelay: o,
1227      repeatType: r,
1228      name: l,
1229      motionValue: u,
1230      element: c,
1231      ...h
1232    }, m = c?.KeyframeResolver || jn;
1233    this.keyframeResolver = new m(a, (p, g, b) => this.onKeyframesResolved(p, g, d, !b), l, u, c), this.keyframeResolver?.scheduleResolve();
1234  }
1235  onKeyframesResolved(e, n, s, i) {
1236    this.keyframeResolver = void 0;
1237    const { name: o, type: r, velocity: a, delay: l, isHandoff: u, onUpdate: c } = s;
1238    this.resolvedAt = X.now(), Ga(e, o, r, a) || ((ct.instantAnimations || !l) && c?.(Fn(e, s, n)), e[0] = e[e.length - 1], on(s), s.repeat = 0);
1239    const d = {
1240      startTime: i ? this.resolvedAt ? this.resolvedAt - this.createdAt > Za ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
1241      finalKeyframe: n,
1242      ...s,
1243      keyframes: e
1244    }, m = !u && qa(d) ? new Ha({
1245      ...d,
1246      element: d.motionValue.owner.current
1247    }) : new On(d);
1248    m.finished.then(() => this.notifyFinished()).catch(nt), this.pendingTimeline && (this.stopTimeline = m.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = m;
1249  }
1250  get finished() {
1251    return this._animation ? this.animation.finished : this._finished;
1252  }
1253  then(e, n) {
1254    return this.finished.finally(e).then(() => {
1255    });
1256  }
1257  get animation() {
1258    return this._animation || (this.keyframeResolver?.resume(), La()), this._animation;
1259  }
1260  get duration() {
1261    return this.animation.duration;
1262  }
1263  get iterationDuration() {
1264    return this.animation.iterationDuration;
1265  }
1266  get time() {
1267    return this.animation.time;
1268  }
1269  set time(e) {
1270    this.animation.time = e;
1271  }
1272  get speed() {
1273    return this.animation.speed;
1274  }
1275  get state() {
1276    return this.animation.state;
1277  }
1278  set speed(e) {
1279    this.animation.speed = e;
1280  }
1281  get startTime() {
1282    return this.animation.startTime;
1283  }
1284  attachTimeline(e) {
1285    return this._animation ? this.stopTimeline = this.animation.attachTimeline(e) : this.pendingTimeline = e, () => this.stop();
1286  }
1287  play() {
1288    this.animation.play();
1289  }
1290  pause() {
1291    this.animation.pause();
1292  }
1293  complete() {
1294    this.animation.complete();
1295  }
1296  cancel() {
1297    this._animation && this.animation.cancel(), this.keyframeResolver?.cancel();
1298  }
1299}
1300const Qa = (
1301  // eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
1302  /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
1303);
1304function tl(t) {
1305  const e = Qa.exec(t);
1306  if (!e)
1307    return [,];
1308  const [, n, s, i] = e;
1309  return [`--${n ?? s}`, i];
1310}
1311function ar(t, e, n = 1) {
1312  const [s, i] = tl(t);
1313  if (!s)
1314    return;
1315  const o = window.getComputedStyle(e).getPropertyValue(s);
1316  if (o) {
1317    const r = o.trim();
1318    return Vi(r) ? parseFloat(r) : r;
1319  }
1320  return Dn(i) ? ar(i, e, n + 1) : i;
1321}
1322function $n(t, e) {
1323  return t?.[e] ?? t?.default ?? t;
1324}
1325const lr = /* @__PURE__ */ new Set([
1326  "width",
1327  "height",
1328  "top",
1329  "left",
1330  "right",
1331  "bottom",
1332  ...Ot
1333]), el = {
1334  test: (t) => t === "auto",
1335  parse: (t) => t
1336}, cr = (t) => (e) => e.test(t), ur = [Bt, P, at, ht, Ko, Ho, el], gs = (t) => ur.find(cr(t));
1337function nl(t) {
1338  return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" || Di(t) : !0;
1339}
1340const sl = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
1341function il(t) {
1342  const [e, n] = t.slice(0, -1).split("(");
1343  if (e === "drop-shadow")
1344    return t;
vendor: 11,351 bytes, lines 1345-1756
1345  const [s] = n.match(Rn) || [];
1346  if (!s)
1347    return t;
1348  const i = n.replace(s, "");
1349  let o = sl.has(e) ? 1 : 0;
1350  return s !== n && (o *= 100), e + "(" + o + i + ")";
1351}
1352const rl = /\b([a-z-]*)\(.*?\)/gu, an = {
1353  ...gt,
1354  getAnimatableNone: (t) => {
1355    const e = t.match(rl);
1356    return e ? e.map(il).join(" ") : t;
1357  }
1358}, ys = {
1359  ...Bt,
1360  transform: Math.round
1361}, ol = {
1362  rotate: ht,
1363  rotateX: ht,
1364  rotateY: ht,
1365  rotateZ: ht,
1366  scale: ue,
1367  scaleX: ue,
1368  scaleY: ue,
1369  scaleZ: ue,
1370  skew: ht,
1371  skewX: ht,
1372  skewY: ht,
1373  distance: P,
1374  translateX: P,
1375  translateY: P,
1376  translateZ: P,
1377  x: P,
1378  y: P,
1379  z: P,
1380  perspective: P,
1381  transformPerspective: P,
1382  opacity: Jt,
1383  originX: is,
1384  originY: is,
1385  originZ: P
1386}, Un = {
1387  // Border props
1388  borderWidth: P,
1389  borderTopWidth: P,
1390  borderRightWidth: P,
1391  borderBottomWidth: P,
1392  borderLeftWidth: P,
1393  borderRadius: P,
1394  radius: P,
1395  borderTopLeftRadius: P,
1396  borderTopRightRadius: P,
1397  borderBottomRightRadius: P,
1398  borderBottomLeftRadius: P,
1399  // Positioning props
1400  width: P,
1401  maxWidth: P,
1402  height: P,
1403  maxHeight: P,
1404  top: P,
1405  right: P,
1406  bottom: P,
1407  left: P,
1408  // Spacing props
1409  padding: P,
1410  paddingTop: P,
1411  paddingRight: P,
1412  paddingBottom: P,
1413  paddingLeft: P,
1414  margin: P,
1415  marginTop: P,
1416  marginRight: P,
1417  marginBottom: P,
1418  marginLeft: P,
1419  // Misc
1420  backgroundPositionX: P,
1421  backgroundPositionY: P,
1422  ...ol,
1423  zIndex: ys,
1424  // SVG
1425  fillOpacity: Jt,
1426  strokeOpacity: Jt,
1427  numOctaves: ys
1428}, al = {
1429  ...Un,
1430  // Color props
1431  color: j,
1432  backgroundColor: j,
1433  outlineColor: j,
1434  fill: j,
1435  stroke: j,
1436  // Border props
1437  borderColor: j,
1438  borderTopColor: j,
1439  borderRightColor: j,
1440  borderBottomColor: j,
1441  borderLeftColor: j,
1442  filter: an,
1443  WebkitFilter: an
1444}, hr = (t) => al[t];
1445function dr(t, e) {
1446  let n = hr(t);
1447  return n !== an && (n = gt), n.getAnimatableNone ? n.getAnimatableNone(e) : void 0;
1448}
1449const ll = /* @__PURE__ */ new Set(["auto", "none", "0"]);
1450function cl(t, e, n) {
1451  let s = 0, i;
1452  for (; s < t.length && !i; ) {
1453    const o = t[s];
1454    typeof o == "string" && !ll.has(o) && Qt(o).values.length && (i = t[s]), s++;
1455  }
1456  if (i && n)
1457    for (const o of e)
1458      t[o] = dr(n, i);
1459}
1460class ul extends jn {
1461  constructor(e, n, s, i, o) {
1462    super(e, n, s, i, o, !0);
1463  }
1464  readKeyframes() {
1465    const { unresolvedKeyframes: e, element: n, name: s } = this;
1466    if (!n || !n.current)
1467      return;
1468    super.readKeyframes();
1469    for (let l = 0; l < e.length; l++) {
1470      let u = e[l];
1471      if (typeof u == "string" && (u = u.trim(), Dn(u))) {
1472        const c = ar(u, n.current);
1473        c !== void 0 && (e[l] = c), l === e.length - 1 && (this.finalKeyframe = u);
1474      }
1475    }
1476    if (this.resolveNoneKeyframes(), !lr.has(s) || e.length !== 2)
1477      return;
1478    const [i, o] = e, r = gs(i), a = gs(o);
1479    if (r !== a)
1480      if (ds(r) && ds(a))
1481        for (let l = 0; l < e.length; l++) {
1482          const u = e[l];
1483          typeof u == "string" && (e[l] = parseFloat(u));
1484        }
1485      else St[s] && (this.needsMeasurement = !0);
1486  }
1487  resolveNoneKeyframes() {
1488    const { unresolvedKeyframes: e, name: n } = this, s = [];
1489    for (let i = 0; i < e.length; i++)
1490      (e[i] === null || nl(e[i])) && s.push(i);
1491    s.length && cl(e, s, n);
1492  }
1493  measureInitialState() {
1494    const { element: e, unresolvedKeyframes: n, name: s } = this;
1495    if (!e || !e.current)
1496      return;
1497    s === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = St[s](e.measureViewportBox(), window.getComputedStyle(e.current)), n[0] = this.measuredOrigin;
1498    const i = n[n.length - 1];
1499    i !== void 0 && e.getValue(s, i).jump(i, !1);
1500  }
1501  measureEndState() {
1502    const { element: e, name: n, unresolvedKeyframes: s } = this;
1503    if (!e || !e.current)
1504      return;
1505    const i = e.getValue(n);
1506    i && i.jump(this.measuredOrigin, !1);
1507    const o = s.length - 1, r = s[o];
1508    s[o] = St[n](e.measureViewportBox(), window.getComputedStyle(e.current)), r !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = r), this.removedTransforms?.length && this.removedTransforms.forEach(([a, l]) => {
1509      e.getValue(a).set(l);
1510    }), this.resolveNoneKeyframes();
1511  }
1512}
1513function hl(t, e, n) {
1514  if (t instanceof EventTarget)
1515    return [t];
1516  if (typeof t == "string") {
1517    let s = document;
1518    const i = n?.[t] ?? s.querySelectorAll(t);
1519    return i ? Array.from(i) : [];
1520  }
1521  return Array.from(t);
1522}
1523const fr = (t, e) => e && typeof t == "number" ? e.transform(t) : t;
1524function mr(t) {
1525  return Ei(t) && "offsetHeight" in t;
1526}
1527const xs = 30, dl = (t) => !isNaN(parseFloat(t));
1528class fl {
1529  /**
1530   * @param init - The initiating value
1531   * @param config - Optional configuration options
1532   *
1533   * -  `transformer`: A function to transform incoming values with.
1534   */
1535  constructor(e, n = {}) {
1536    this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (s) => {
1537      const i = X.now();
1538      if (this.updatedAt !== i && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(s), this.current !== this.prev && (this.events.change?.notify(this.current), this.dependents))
1539        for (const o of this.dependents)
1540          o.dirty();
1541    }, this.hasAnimated = !1, this.setCurrent(e), this.owner = n.owner;
1542  }
1543  setCurrent(e) {
1544    this.current = e, this.updatedAt = X.now(), this.canTrackVelocity === null && e !== void 0 && (this.canTrackVelocity = dl(this.current));
1545  }
1546  setPrevFrameValue(e = this.current) {
1547    this.prevFrameValue = e, this.prevUpdatedAt = this.updatedAt;
1548  }
1549  /**
1550   * Adds a function that will be notified when the `MotionValue` is updated.
1551   *
1552   * It returns a function that, when called, will cancel the subscription.
1553   *
1554   * When calling `onChange` inside a React component, it should be wrapped with the
1555   * `useEffect` hook. As it returns an unsubscribe function, this should be returned
1556   * from the `useEffect` function to ensure you don't add duplicate subscribers..
1557   *
1558   * ```jsx
1559   * export const MyComponent = () => {
1560   *   const x = useMotionValue(0)
1561   *   const y = useMotionValue(0)
1562   *   const opacity = useMotionValue(1)
1563   *
1564   *   useEffect(() => {
1565   *     function updateOpacity() {
1566   *       const maxXY = Math.max(x.get(), y.get())
1567   *       const newOpacity = transform(maxXY, [0, 100], [1, 0])
1568   *       opacity.set(newOpacity)
1569   *     }
1570   *
1571   *     const unsubscribeX = x.on("change", updateOpacity)
1572   *     const unsubscribeY = y.on("change", updateOpacity)
1573   *
1574   *     return () => {
1575   *       unsubscribeX()
1576   *       unsubscribeY()
1577   *     }
1578   *   }, [])
1579   *
1580   *   return <motion.div style={{ x }} />
1581   * }
1582   * ```
1583   *
1584   * @param subscriber - A function that receives the latest value.
1585   * @returns A function that, when called, will cancel this subscription.
1586   *
1587   * @deprecated
1588   */
1589  onChange(e) {
1590    return this.on("change", e);
1591  }
1592  on(e, n) {
1593    this.events[e] || (this.events[e] = new An());
1594    const s = this.events[e].add(n);
1595    return e === "change" ? () => {
1596      s(), R.read(() => {
1597        this.events.change.getSize() || this.stop();
1598      });
1599    } : s;
1600  }
1601  clearListeners() {
1602    for (const e in this.events)
1603      this.events[e].clear();
1604  }
1605  /**
1606   * Attaches a passive effect to the `MotionValue`.
1607   */
1608  attach(e, n) {
1609    this.passiveEffect = e, this.stopPassiveEffect = n;
1610  }
1611  /**
1612   * Sets the state of the `MotionValue`.
1613   *
1614   * @remarks
1615   *
1616   * ```jsx
1617   * const x = useMotionValue(0)
1618   * x.set(10)
1619   * ```
1620   *
1621   * @param latest - Latest value to set.
1622   * @param render - Whether to notify render subscribers. Defaults to `true`
1623   *
1624   * @public
1625   */
1626  set(e) {
1627    this.passiveEffect ? this.passiveEffect(e, this.updateAndNotify) : this.updateAndNotify(e);
1628  }
1629  setWithVelocity(e, n, s) {
1630    this.set(n), this.prev = void 0, this.prevFrameValue = e, this.prevUpdatedAt = this.updatedAt - s;
1631  }
1632  /**
1633   * Set the state of the `MotionValue`, stopping any active animations,
1634   * effects, and resets velocity to `0`.
1635   */
1636  jump(e, n = !0) {
1637    this.updateAndNotify(e), this.prev = e, this.prevUpdatedAt = this.prevFrameValue = void 0, n && this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
1638  }
1639  dirty() {
1640    this.events.change?.notify(this.current);
1641  }
1642  addDependent(e) {
1643    this.dependents || (this.dependents = /* @__PURE__ */ new Set()), this.dependents.add(e);
1644  }
1645  removeDependent(e) {
1646    this.dependents && this.dependents.delete(e);
1647  }
1648  /**
1649   * Returns the latest state of `MotionValue`
1650   *
1651   * @returns - The latest state of `MotionValue`
1652   *
1653   * @public
1654   */
1655  get() {
1656    return this.current;
1657  }
1658  /**
1659   * @public
1660   */
1661  getPrevious() {
1662    return this.prev;
1663  }
1664  /**
1665   * Returns the latest velocity of `MotionValue`
1666   *
1667   * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.
1668   *
1669   * @public
1670   */
1671  getVelocity() {
1672    const e = X.now();
1673    if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt > xs)
1674      return 0;
1675    const n = Math.min(this.updatedAt - this.prevUpdatedAt, xs);
1676    return Ri(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
1677  }
1678  /**
1679   * Registers a new animation to control this `MotionValue`. Only one
1680   * animation can drive a `MotionValue` at one time.
1681   *
1682   * ```jsx
1683   * value.start()
1684   * ```
1685   *
1686   * @param animation - A function that starts the provided animation
1687   */
1688  start(e) {
1689    return this.stop(), new Promise((n) => {
1690      this.hasAnimated = !0, this.animation = e(n), this.events.animationStart && this.events.animationStart.notify();
1691    }).then(() => {
1692      this.events.animationComplete && this.events.animationComplete.notify(), this.clearAnimation();
1693    });
1694  }
1695  /**
1696   * Stop the currently active animation.
1697   *
1698   * @public
1699   */
1700  stop() {
1701    this.animation && (this.animation.stop(), this.events.animationCancel && this.events.animationCancel.notify()), this.clearAnimation();
1702  }
1703  /**
1704   * Returns `true` if this value is currently animating.
1705   *
1706   * @public
1707   */
1708  isAnimating() {
1709    return !!this.animation;
1710  }
1711  clearAnimation() {
1712    delete this.animation;
1713  }
1714  /**
1715   * Destroy and clean up subscribers to this `MotionValue`.
1716   *
1717   * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically
1718   * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually
1719   * created a `MotionValue` via the `motionValue` function.
1720   *
1721   * @public
1722   */
1723  destroy() {
1724    this.dependents?.clear(), this.events.destroy?.notify(), this.clearListeners(), this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
1725  }
1726}
1727function Lt(t, e) {
1728  return new fl(t, e);
1729}
1730const { schedule: _n } = /* @__PURE__ */ Wi(queueMicrotask, !1), it = {
1731  x: !1,
1732  y: !1
1733};
1734function pr() {
1735  return it.x || it.y;
1736}
1737function ml(t) {
1738  return t === "x" || t === "y" ? it[t] ? null : (it[t] = !0, () => {
1739    it[t] = !1;
1740  }) : it.x || it.y ? null : (it.x = it.y = !0, () => {
1741    it.x = it.y = !1;
1742  });
1743}
1744function gr(t, e) {
1745  const n = hl(t), s = new AbortController(), i = {
1746    passive: !0,
1747    ...e,
1748    signal: s.signal
1749  };
1750  return [n, i, () => s.abort()];
1751}
1752function vs(t) {
1753  return !(t.pointerType === "touch" || pr());
1754}
1755function pl(t, e, n = {}) {
1756  const [s, i, o] = gr(t, n), r = (a) => {
1757    if (!vs(a))
1758      return;
1759    const { target: l } = a, u = e(l, a);
1760    if (typeof u != "function" || !l)
1761      return;
1762    const c = (h) => {
1763      vs(h) && (u(h), l.removeEventListener("pointerleave", c));
1764    };
1765    l.addEventListener("pointerleave", c, i);
1766  };
1767  return s.forEach((a) => {
1768    a.addEventListener("pointerenter", r, i);
1769  }), o;
1770}
1771const yr = (t, e) => e ? t === e ? !0 : yr(t, e.parentElement) : !1, Wn = (t) => t.pointerType === "mouse" ? typeof t.button != "number" || t.button <= 0 : t.isPrimary !== !1, gl = /* @__PURE__ */ new Set([
1772  "BUTTON",
1773  "INPUT",
1774  "SELECT",
1775  "TEXTAREA",
1776  "A"
1777]);
1778function yl(t) {
1779  return gl.has(t.tagName) || t.tabIndex !== -1;
1780}
1781const me = /* @__PURE__ */ new WeakSet();
1782function bs(t) {
1783  return (e) => {
1784    e.key === "Enter" && t(e);
1785  };
1786}
1787function Fe(t, e) {
1788  t.dispatchEvent(new PointerEvent("pointer" + e, { isPrimary: !0, bubbles: !0 }));
1789}
1790const xl = (t, e) => {
1791  const n = t.currentTarget;
1792  if (!n)
1793    return;
1794  const s = bs(() => {
1795    if (me.has(n))
1796      return;
1797    Fe(n, "down");
1798    const i = bs(() => {
1799      Fe(n, "up");
1800    }), o = () => Fe(n, "cancel");
1801    n.addEventListener("keyup", i, e), n.addEventListener("blur", o, e);
1802  });
1803  n.addEventListener("keydown", s, e), n.addEventListener("blur", () => n.removeEventListener("keydown", s), e);
1804};
1805function ws(t) {
1806  return Wn(t) && !pr();
1807}
1808function vl(t, e, n = {}) {
1809  const [s, i, o] = gr(t, n), r = (a) => {
1810    const l = a.currentTarget;
1811    if (!ws(a))
1812      return;
1813    me.add(l);
1814    const u = e(l, a), c = (m, p) => {
1815      window.removeEventListener("pointerup", h), window.removeEventListener("pointercancel", d), me.has(l) && me.delete(l), ws(m) && typeof u == "function" && u(m, { success: p });
1816    }, h = (m) => {
1817      c(m, l === window || l === document || n.useGlobalTarget || yr(l, m.target));
1818    }, d = (m) => {
1819      c(m, !1);
1820    };
1821    window.addEventListener("pointerup", h, i), window.addEventListener("pointercancel", d, i);
1822  };
1823  return s.forEach((a) => {
1824    (n.useGlobalTarget ? window : a).addEventListener("pointerdown", r, i), mr(a) && (a.addEventListener("focus", (u) => xl(u, i)), !yl(a) && !a.hasAttribute("tabindex") && (a.tabIndex = 0));
1825  }), o;
1826}
1827function xr(t) {
1828  return Ei(t) && "ownerSVGElement" in t;
1829}
1830function bl(t) {
1831  return xr(t) && t.tagName === "svg";
1832}
1833const H = (t) => !!(t && t.getVelocity), wl = [...ur, j, gt], Tl = (t) => wl.find(cr(t)), zn = Ft({
1834  transformPagePoint: (t) => t,
1835  isStatic: !1,
1836  reducedMotion: "never"
1837});
1838function Ts(t, e) {
1839  if (typeof t == "function")
1840    return t(e);
1841  t != null && (t.current = e);
1842}
1843function Sl(...t) {
1844  return (e) => {
1845    let n = !1;
1846    const s = t.map((i) => {
1847      const o = Ts(i, e);
1848      return !n && typeof o == "function" && (n = !0), o;
1849    });
1850    if (n)
1851      return () => {
1852        for (let i = 0; i < s.length; i++) {
1853          const o = s[i];
1854          typeof o == "function" ? o() : Ts(t[i], null);
1855        }
1856      };
1857  };
1858}
1859function Pl(...t) {
1860  return xn(Sl(...t), t);
1861}
1862class Cl extends Ci {
1863  getSnapshotBeforeUpdate(e) {
1864    const n = this.props.childRef.current;
1865    if (n && e.isPresent && !this.props.isPresent) {
1866      const s = n.offsetParent, i = mr(s) && s.offsetWidth || 0, o = this.props.sizeRef.current;
1867      o.height = n.offsetHeight || 0, o.width = n.offsetWidth || 0, o.top = n.offsetTop, o.left = n.offsetLeft, o.right = i - o.width - o.left;
1868    }
1869    return null;
1870  }
1871  /**
1872   * Required with getSnapshotBeforeUpdate to stop React complaining.
1873   */
1874  componentDidUpdate() {
1875  }
1876  render() {
1877    return this.props.children;
1878  }
1879}
1880function Ml({ children: t, isPresent: e, anchorX: n, root: s }) {
1881  const i = vn(), o = rt(null), r = rt({
1882    width: 0,
1883    height: 0,
1884    top: 0,
1885    left: 0,
1886    right: 0
1887  }), { nonce: a } = z(zn), l = Pl(o, t?.ref);
1888  return Ai(() => {
1889    const { width: u, height: c, top: h, left: d, right: m } = r.current;
1890    if (e || !o.current || !u || !c)
1891      return;
1892    const p = n === "left" ? `left: ${d}` : `right: ${m}`;
1893    o.current.dataset.motionPopId = i;
1894    const g = document.createElement("style");
1895    a && (g.nonce = a);
1896    const b = s ?? document.head;
1897    return b.appendChild(g), g.sheet && g.sheet.insertRule(`
1898          [data-motion-pop-id="${i}"] {
1899            position: absolute !important;
1900            width: ${u}px !important;
1901            height: ${c}px !important;
1902            ${p}px !important;
1903            top: ${h}px !important;
1904          }
1905        `), () => {
1906      b.contains(g) && b.removeChild(g);
1907    };
1908  }, [e]), f(Cl, { isPresent: e, childRef: o, sizeRef: r, children: Po(t, { ref: l }) });
1909}
1910const Al = ({ children: t, initial: e, isPresent: n, onExitComplete: s, custom: i, presenceAffectsLayout: o, mode: r, anchorX: a, root: l }) => {
1911  const u = wn(kl), c = vn();
1912  let h = !0, d = mt(() => (h = !1, {
1913    id: c,
1914    initial: e,
1915    isPresent: n,
1916    custom: i,
1917    onExitComplete: (m) => {
1918      u.set(m, !0);
1919      for (const p of u.values())
1920        if (!p)
1921          return;
1922      s && s();
1923    },
1924    register: (m) => (u.set(m, !1), () => u.delete(m))
1925  }), [n, u, s]);
1926  return o && h && (d = { ...d }), mt(() => {
1927    u.forEach((m, p) => u.set(p, !1));
1928  }, [n]), G(() => {
1929    !n && !u.size && s && s();
1930  }, [n]), r === "popLayout" && (t = f(Ml, { isPresent: n, anchorX: a, root: l, children: t })), f(Ce.Provider, { value: d, children: t });
1931};
1932function kl() {
1933  return /* @__PURE__ */ new Map();
1934}
1935function vr(t = !0) {
1936  const e = z(Ce);
1937  if (e === null)
1938    return [!0, null];
1939  const { isPresent: n, onExitComplete: s, register: i } = e, o = vn();
1940  G(() => {
1941    if (t)
1942      return i(o);
1943  }, [t]);
1944  const r = xn(() => t && s && s(o), [o, s, t]);
1945  return !n && s ? [!1, r] : [!0];
1946}
1947const he = (t) => t.key || "";
1948function Ss(t) {
1949  const e = [];
1950  return So.forEach(t, (n) => {
1951    Co(n) && e.push(n);
1952  }), e;
1953}
1954const dt = ({ children: t, custom: e, initial: n = !0, onExitComplete: s, presenceAffectsLayout: i = !0, mode: o = "sync", propagate: r = !1, anchorX: a = "left", root: l }) => {
1955  const [u, c] = vr(r), h = mt(() => Ss(t), [t]), d = r && !u ? [] : h.map(he), m = rt(!0), p = rt(h), g = wn(() => /* @__PURE__ */ new Map()), [b, y] = D(h), [x, v] = D(h);
1956  ki(() => {
1957    m.current = !1, p.current = h;
1958    for (let M = 0; M < x.length; M++) {
1959      const k = he(x[M]);
1960      d.includes(k) ? g.delete(k) : g.get(k) !== !0 && g.set(k, !1);
1961    }
1962  }, [x, d.length, d.join("-")]);
1963  const A = [];
1964  if (h !== b) {
1965    let M = [...h];
1966    for (let k = 0; k < x.length; k++) {
1967      const C = x[k], B = he(C);
1968      d.includes(B) || (M.splice(k, 0, C), A.push(C));
1969    }
1970    return o === "wait" && A.length && (M = A), v(Ss(M)), y(h), null;
1971  }
1972  const { forceRender: S } = z(bn);
1973  return f(Ge, { children: x.map((M) => {
1974    const k = he(M), C = r && !u ? !1 : h === x || d.includes(k), B = () => {
1975      if (g.has(k))
1976        g.set(k, !0);
1977      else
1978        return;
1979      let $ = !0;
1980      g.forEach((q) => {
1981        q || ($ = !1);
1982      }), $ && (S?.(), v(p.current), r && c?.(), s && s());
1983    };
1984    return f(Al, { isPresent: C, initial: !m.current || n ? void 0 : !1, custom: e, presenceAffectsLayout: i, mode: o, root: l, onExitComplete: C ? void 0 : B, anchorX: a, children: M }, k);
1985  }) });
1986}, br = Ft({ strict: !1 }), Ps = {
1987  animation: [
1988    "animate",
1989    "variants",
1990    "whileHover",
1991    "whileTap",
1992    "exit",
1993    "whileInView",
1994    "whileFocus",
1995    "whileDrag"
1996  ],
1997  exit: ["exit"],
1998  drag: ["drag", "dragControls"],
1999  focus: ["whileFocus"],
2000  hover: ["whileHover", "onHoverStart", "onHoverEnd"],
2001  tap: ["whileTap", "onTap", "onTapStart", "onTapCancel"],
2002  pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"],
2003  inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
2004  layout: ["layout", "layoutId"]
2005}, It = {};
2006for (const t in Ps)
2007  It[t] = {
2008    isEnabled: (e) => Ps[t].some((n) => !!e[n])
2009  };
2010function Vl(t) {
2011  for (const e in t)
2012    It[e] = {
2013      ...It[e],
2014      ...t[e]
2015    };
2016}
2017const El = /* @__PURE__ */ new Set([
2018  "animate",
2019  "exit",
2020  "variants",
2021  "initial",
2022  "style",
2023  "values",
2024  "variants",
2025  "transition",
2026  "transformTemplate",
2027  "custom",
2028  "inherit",
2029  "onBeforeLayoutMeasure",
2030  "onAnimationStart",
2031  "onAnimationComplete",
2032  "onUpdate",
2033  "onDragStart",
2034  "onDrag",
2035  "onDragEnd",
2036  "onMeasureDragConstraints",
2037  "onDirectionLock",
2038  "onDragTransitionEnd",
2039  "_dragX",
2040  "_dragY",
2041  "onHoverStart",
2042  "onHoverEnd",
2043  "onViewportEnter",
2044  "onViewportLeave",
2045  "globalTapTarget",
2046  "ignoreStrict",
2047  "viewport"
2048]);
2049function we(t) {
2050  return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") || El.has(t);
2051}
2052let wr = (t) => !we(t);
2053function Dl(t) {
2054  typeof t == "function" && (wr = (e) => e.startsWith("on") ? !we(e) : t(e));
2055}
2056try {
2057  Dl(require("@emotion/is-prop-valid").default);
2058} catch {
2059}
2060function Rl(t, e, n) {
2061  const s = {};
2062  for (const i in t)
2063    i === "values" && typeof t.values == "object" || (wr(i) || n === !0 && we(i) || !e && !we(i) || // If trying to use native HTML drag events, forward drag listeners
2064    t.draggable && i.startsWith("onDrag")) && (s[i] = t[i]);
2065  return s;
2066}
2067const Me = /* @__PURE__ */ Ft({});
2068function Ae(t) {
2069  return t !== null && typeof t == "object" && typeof t.start == "function";
2070}
2071function te(t) {
2072  return typeof t == "string" || Array.isArray(t);
2073}
2074const Hn = [
2075  "animate",
2076  "whileInView",
2077  "whileFocus",
2078  "whileHover",
2079  "whileTap",
2080  "whileDrag",
2081  "exit"
2082], Kn = ["initial", ...Hn];
2083function ke(t) {
2084  return Ae(t.animate) || Kn.some((e) => te(t[e]));
2085}
2086function Tr(t) {
2087  return !!(ke(t) || t.variants);
2088}
2089function Nl(t, e) {
2090  if (ke(t)) {
2091    const { initial: n, animate: s } = t;
2092    return {
2093      initial: n === !1 || te(n) ? n : void 0,
2094      animate: te(s) ? s : void 0
2095    };
2096  }
2097  return t.inherit !== !1 ? e : {};
2098}
2099function Ll(t) {
2100  const { initial: e, animate: n } = Nl(t, z(Me));
2101  return mt(() => ({ initial: e, animate: n }), [Cs(e), Cs(n)]);
2102}
2103function Cs(t) {
2104  return Array.isArray(t) ? t.join(" ") : t;
2105}
2106const ee = {};
2107function Il(t) {
2108  for (const e in t)
2109    ee[e] = t[e], En(e) && (ee[e].isCSSVariable = !0);
2110}
2111function Sr(t, { layout: e, layoutId: n }) {
2112  return jt.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!ee[t] || t === "opacity");
2113}
2114const Fl = {
2115  x: "translateX",
2116  y: "translateY",
2117  z: "translateZ",
2118  transformPerspective: "perspective"
2119}, Bl = Ot.length;
2120function Ol(t, e, n) {
2121  let s = "", i = !0;
2122  for (let o = 0; o < Bl; o++) {
2123    const r = Ot[o], a = t[r];
2124    if (a === void 0)
2125      continue;
2126    let l = !0;
2127    if (typeof a == "number" ? l = a === (r.startsWith("scale") ? 1 : 0) : l = parseFloat(a) === 0, !l || n) {
2128      const u = fr(a, Un[r]);
2129      if (!l) {
2130        i = !1;
2131        const c = Fl[r] || r;
2132        s += `${c}(${u}) `;
2133      }
2134      n && (e[r] = u);
2135    }
2136  }
2137  return s = s.trim(), n ? s = n(e, i ? "" : s) : i && (s = "none"), s;
2138}
2139function Gn(t, e, n) {
2140  const { style: s, vars: i, transformOrigin: o } = t;
2141  let r = !1, a = !1;
2142  for (const l in e) {
2143    const u = e[l];
2144    if (jt.has(l)) {
2145      r = !0;
2146      continue;
2147    } else if (En(l)) {
2148      i[l] = u;
2149      continue;
2150    } else {
2151      const c = fr(u, Un[l]);
2152      l.startsWith("origin") ? (a = !0, o[l] = c) : s[l] = c;
2153    }
2154  }
2155  if (e.transform || (r || n ? s.transform = Ol(e, t.transform, n) : s.transform && (s.transform = "none")), a) {
2156    const { originX: l = "50%", originY: u = "50%", originZ: c = 0 } = o;
2157    s.transformOrigin = `${l} ${u} ${c}`;
2158  }
2159}
2160const Xn = () => ({
2161  style: {},
2162  transform: {},
2163  transformOrigin: {},
2164  vars: {}
2165});
2166function Pr(t, e, n) {
2167  for (const s in e)
2168    !H(e[s]) && !Sr(s, n) && (t[s] = e[s]);
2169}
2170function jl({ transformTemplate: t }, e) {
2171  return mt(() => {
2172    const n = Xn();
2173    return Gn(n, e, t), Object.assign({}, n.vars, n.style);
2174  }, [e]);
2175}
2176function $l(t, e) {
2177  const n = t.style || {}, s = {};
2178  return Pr(s, n, t), Object.assign(s, jl(t, e)), s;
2179}
2180function Ul(t, e) {
2181  const n = {}, s = $l(t, e);
2182  return t.drag && t.dragListener !== !1 && (n.draggable = !1, s.userSelect = s.WebkitUserSelect = s.WebkitTouchCallout = "none", s.touchAction = t.drag === !0 ? "none" : `pan-${t.drag === "x" ? "y" : "x"}
2182`), t.tabIndex === void 0 && (t.onTap || t.onTapStart || t.whileTap) && (n.tabIndex = 0), n.style = s, n;
2183}
2184const _l = {
2185  offset: "stroke-dashoffset",
2186  array: "stroke-dasharray"
2187}, Wl = {
2188  offset: "strokeDashoffset",
2189  array: "strokeDasharray"
2190};
2191function zl(t, e, n = 1, s = 0, i = !0) {
2192  t.pathLength = 1;
2193  const o = i ? _l : Wl;
2194  t[o.offset] = P.transform(-s);
2195  const r = P.transform(e), a = P.transform(n);
2196  t[o.array] = `${r} ${a}`;
2197}
2198function Cr(t, {
2199  attrX: e,
2200  attrY: n,
2201  attrScale: s,
2202  pathLength: i,
2203  pathSpacing: o = 1,
2204  pathOffset: r = 0,
2205  // This is object creation, which we try to avoid per-frame.
2206  ...a
2207}, l, u, c) {
2208  if (Gn(t, a, u), l) {
2209    t.style.viewBox && (t.attrs.viewBox = t.style.viewBox);
2210    return;
2211  }
2212  t.attrs = t.style, t.style = {};
2213  const { attrs: h, style: d } = t;
2214  h.transform && (d.transform = h.transform, delete h.transform), (d.transform || h.transformOrigin) && (d.transformOrigin = h.transformOrigin ?? "50% 50%", delete h.transformOrigin), d.transform && (d.transformBox = c?.transformBox ?? "fill-box", delete h.transformBox), e !== void 0 && (h.x = e), n !== void 0 && (h.y = n
2214), s !== void 0 && (h.scale = s), i !== void 0 && zl(h, i, o, r, !1);
2215}
2216const Mr = () => ({
2217  ...Xn(),
2218  attrs: {}
2219}), Ar = (t) => typeof t == "string" && t.toLowerCase() === "svg";
2220function Hl(t, e, n, s) {
2221  const i = mt(() => {
2222    const o = Mr();
2223    return Cr(o, e, Ar(s), t.transformTemplate, t.style), {
2224      ...o.attrs,
2225      style: { ...o.style }
2226    };
2227  }, [e]);
2228  if (t.style) {
2229    const o = {};
2230    Pr(o, t.style, t), i.style = { ...o, ...i.style };
2231  }
2232  return i;
2233}
2234const Kl = [
2235  "animate",
2236  "circle",
2237  "defs",
2238  "desc",
2239  "ellipse",
2240  "g",
2241  "image",
2242  "line",
2243  "filter",
2244  "marker",
2245  "mask",
2246  "metadata",
2247  "path",
2248  "pattern",
2249  "polygon",
2250  "polyline",
2251  "rect",
2252  "stop",
2253  "switch",
2254  "symbol",
2255  "svg",
2256  "text",
2257  "tspan",
2258  "use",
2259  "view"
2260];
2261function Yn(t) {
2262  return (
2263    /**
2264     * If it's not a string, it's a custom React component. Currently we only support
2265     * HTML custom React components.
2266     */
2267    typeof t != "string" || /**
2268     * If it contains a dash, the element is a custom HTML webcomponent.
2269     */
2270    t.includes("-") ? !1 : (
2271      /**
2272       * If it's in our list of lowercase SVG tags, it's an SVG component
2273       */
2274      !!(Kl.indexOf(t) > -1 || /**
2275       * If it contains a capital letter, it's an SVG component
2276       */
2277      /[A-Z]/u.test(t))
2278    )
2279  );
2280}
2281function Gl(t, e, n, { latestValues: s }, i, o = !1) {
2282  const a = (Yn(t) ? Hl : Ul)(e, s, i, t), l = Rl(e, typeof t == "string", o), u = t !== Mi ? { ...l, ...a, ref: n } : {}, { children: c } = e, h = mt(() => H(c) ? c.get() : c, [c]);
2283  return ye(t, {
2284    ...u,
2285    children: h
2286  });
2287}
2288function Ms(t) {
2289  const e = [{}, {}];
2290  return t?.values.forEach((n, s) => {
2291    e[0][s] = n.get(), e[1][s] = n.getVelocity();
2292  }), e;
2293}
2294function qn(t, e, n, s) {
2295  if (typeof e == "function") {
2296    const [i, o] = Ms(s);
2297    e = e(n !== void 0 ? n : t.custom, i, o);
2298  }
2299  if (typeof e == "string" && (e = t.variants && t.variants[e]), typeof e == "function") {
2300    const [i, o] = Ms(s);
2301    e = e(n !== void 0 ? n : t.custom, i, o);
2302  }
2303  return e;
2304}
2305function pe(t) {
2306  return H(t) ? t.get() : t;
2307}
2308function Xl({ scrapeMotionValuesFromProps: t, createRenderState: e }, n, s, i) {
2309  return {
2310    latestValues: Yl(n, s, i, t),
2311    renderState: e()
2312  };
2313}
2314function Yl(t, e, n, s) {
2315  const i = {}, o = s(t, {});
2316  for (const d in o)
2317    i[d] = pe(o[d]);
2318  let { initial: r, animate: a } = t;
2319  const l = ke(t), u = Tr(t);
2320  e && u && !l && t.inherit !== !1 && (r === void 0 && (r = e.initial), a === void 0 && (a = e.animate));
2321  let c = n ? n.initial === !1 : !1;
2322  c = c || r === !1;
2323  const h = c ? a : r;
2324  if (h && typeof h != "boolean" && !Ae(h)) {
2325    const d = Array.isArray(h) ? h : [h];
2326    for (let m = 0; m < d.length; m++) {
2327      const p = qn(t, d[m]);
2328      if (p) {
2329        const { transitionEnd: g, transition: b, ...y } = p;
2330        for (const x in y) {
2331          let v = y[x];
2332          if (Array.isArray(v)) {
2333            const A = c ? v.length - 1 : 0;
2334            v = v[A];
2335          }
2336          v !== null && (i[x] = v);
2337        }
2338        for (const x in g)
2339          i[x] = g[x];
2340      }
2341    }
2342  }
2343  return i;
2344}
2345const kr = (t) => (e, n) => {
2346  const s = z(Me), i = z(Ce), o = () => Xl(t, e, s, i);
2347  return n ? o() : wn(o);
2348};
2349function Zn(t, e, n) {
2350  const { style: s } = t, i = {};
2351  for (const o in s)
2352    (H(s[o]) || e.style && H(e.style[o]) || Sr(o, t) || n?.getValue(o)?.liveStyle !== void 0) && (i[o] = s[o]);
2353  return i;
2354}
2355const ql = /* @__PURE__ */ kr({
2356  scrapeMotionValuesFromProps: Zn,
2357  createRenderState: Xn
2358});
2359function Vr(t, e, n) {
2360  const s = Zn(t, e, n);
2361  for (const i in t)
2362    if (H(t[i]) || H(e[i])) {
2363      const o = Ot.indexOf(i) !== -1 ? "attr" + i.charAt(0).toUpperCase() + i.substring(1) : i;
2364      s[o] = t[i];
2365    }
2366  return s;
2367}
2368const Zl = /* @__PURE__ */ kr({
2369  scrapeMotionValuesFromProps: Vr,
2370  createRenderState: Mr
2371}), Jl = Symbol.for("motionComponentSymbol");
2372function kt(t) {
2373  return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current");
2374}
2375function Ql(t, e, n) {
2376  return xn(
2377    (s) => {
2378      s && t.onMount && t.onMount(s), e && (s ? e.mount(s) : e.unmount()), n && (typeof n == "function" ? n(s) : kt(n) && (n.current = s));
2379    },
2380    /**
2381     * Include externalRef in dependencies to ensure the callback updates
2382     * when the ref changes, allowing proper ref forwarding.
2383     */
2384    [e]
2385  );
2386}
2387const Jn = (t) => t.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), tc = "framerAppearId", Er = "data-" + Jn(tc), Dr = Ft({});
2388function ec(t, e, n, s, i) {
2389  const { visualElement: o }
2389 = z(Me), r = z(br), a = z(Ce), l = z(zn).reducedMotion, u = rt(null);
2390  s = s || r.renderer, !u.current && s && (u.current = s(t, {
2391    visualState: e,
2392    parent: o,
2393    props: n,
2394    presenceContext: a,
2395    blockInitialAnimation: a ? a.initial === !1 : !1,
2396    reducedMotionConfig: l
2397  }));
2398  const c = u.current, h = z(Dr);
2399  c && !c.projection && i && (c.type === "html" || c.type === "svg") && nc(u.current, n, i, h);
2400  const d = rt(!1);
2401  Ai(() => {
2402    c && d.current && c.update(n, a);
2403  });
2404  const m = n[Er], p = rt(!!m && !window.MotionHandoffIsComplete?.(m) && window.MotionHasOptimisedAnimation?.(m));
2405  return ki(() => {
2406    c && (d.current = !0, window.MotionIsMounted = !0, c.updateFeatures(), c.scheduleRenderMicrotask(), p.current && c.animationState && c.animationState.animateChanges());
2407  }), G(() => {
2408    c && (!p.current && c.animationState && c.animationState.animateChanges(), p.current && (queueMicrotask(() => {
2409      window.MotionHandoffMarkAsComplete?.(m);
2410    }), p.current = !1), c.enteringChildren = void 0);
2411  }), c;
2412}
2413function nc(t, e, n, s) {
2414  const { layoutId: i, layout: o, drag: r, dragConstraints: a, layoutScroll: l, layoutRoot: u, layoutCrossfade: c } = e;
2415  t.projection = new n(t.latestValues, e["data-framer-portal-id"] ? void 0 : Rr(t.parent)), t.projection.setOptions({
2416    layoutId: i,
2417    layout: o,
2418    alwaysMeasureLayout: !!r || a && kt(a),
2419    visualElement: t,
2420    /**
2421     * TODO: Update options in an effect. This could be tricky as it'll be too late
2422     * to update by the time layout animations run.
2423     * We also need to fix this safeToRemove by linking it up to the one returned by usePresence,
2424     * ensuring it gets called if there's no potential layout animations.
2425     *
2426     */
2427    animationType: typeof o == "string" ? o : "both",
2428    initialPromotionConfig: s,
2429    crossfade: c,
2430    layoutScroll: l,
2431    layoutRoot: u
2432  });
2433}
2434function Rr(t) {
2435  if (t)
2436    return t.options.allowProjection !== !1 ? t.projection : Rr(t.parent);
2437}
2438function Be(t, { forwardMotionProps: e = !1 } = {}, n, s) {
2439  n && Vl(n);
2440  const i = Yn(t) ? Zl : ql;
2441  function o(a, l) {
2442    let u;
2443    const c = {
2444      ...z(zn),
2445      ...a,
2446      layoutId: sc(a)
2447    }, { isStatic: h } = c, d = Ll(a), m = i(a, h);
2448    if (!h && Tn) {
2449      ic();
2450      const p = rc(c);
2451      u = p.MeasureLayout, d.visualElement = ec(t, m, c, s, p.ProjectionNode);
2452    }
2453    return w(Me.Provider, { value: d, children: [u && d.visualElement ? f(u, { visualElement: d.visualElement, ...c }) : null, Gl(t, a, Ql(m, d.visualElement, l), m, h, e)] });
2454  }
2455  o.displayName = `motion.${typeof t == "string" ? t : `create(${t.displayName ?? t.name ?? ""})`}`;
2456  const r = yn(o);
2457  return r[Jl] = t, r;
2458}
2459function sc({ layoutId: t }) {
2460  const e = z(bn).id;
2461  return e && t !== void 0 ? e + "-" + t : t;
2462}
2463function ic(t, e) {
2464  z(br).strict;
2465}
2466function rc(t) {
2467  const { drag: e, layout: n } = It;
2468  if (!e && !n)
2469    return {};
2470  const s = { ...e, ...n };
2471  return {
2472    MeasureLayout: e?.isEnabled(t) || n?.isEnabled(t) ? s.MeasureLayout : void 0,
2473    ProjectionNode: s.ProjectionNode
2474  };
2475}
2476function oc(t, e) {
2477  if (typeof Proxy > "u")
2478    return Be;
2479  const n = /* @__PURE__ */ new Map(), s = (o, r) => Be(o, r, t, e), i = (o, r) => s(o, r);
2480  return new Proxy(i, {
2481    /**
2482     * Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.
2483     * The prop name is passed through as `key` and we can use that to generate a `motion`
2484     * DOM component with that name.
2485     */
2486    get: (o, r) => r === "create" ? s : (n.has(r) || n.set(r, Be(r, void 0, t, e)), n.get(r))
2487  });
2488}
2489function Nr({ top: t, left: e, right: n, bottom: s }) {
2490  return {
2491    x: { min: e, max: n },
2492    y: { min: t, max: s }
2493  };
2494}
2495function ac({ x: t, y: e }) {
2496  return { top: e.min, right: t.max, bottom: e.max, left: t.min };
2497}
2498function lc(t, e) {
2499  if (!e)
2500    return t;
2501  const n = e({ x: t.left, y: t.top }), s = e({ x: t.right, y: t.bottom });
2502  return {
2503    top: n.y,
2504    left: n.x,
2505    bottom: s.y,
2506    right: s.x
2507  };
2508}
2509function Oe(t) {
2510  return t === void 0 || t === 1;
2511}
2512function ln({ scale: t, scaleX: e, scaleY: n }) {
2513  return !Oe(t) || !Oe(e) || !Oe(n);
2514}
2515function bt(t) {
2516  return ln(t) || Lr(t) || t.z || t.rotate || t.rotateX || t.rotateY || t.skewX || t.skewY;
2517}
2518function Lr(t) {
2519  return As(t.x) || As(t.y);
2520}
2521function As(t) {
2522  return t && t !== "0%";
2523}
2524function Te(t, e, n) {
2525  const s = t - n, i = e * s;
2526  return n + i;
2527}
2528function ks(t, e, n, s, i) {
2529  return i !== void 0 && (t = Te(t, i, s)), Te(t, n, s) + e;
2530}
2531function cn(t, e = 0, n = 1, s, i) {
2532  t.min = ks(t.min, e, n, s, i), t.max = ks(t.max, e, n, s, i);
2533}
2534function Ir(t, { x: e, y: n }) {
2535  cn(t.x, e.translate, e.scale, e.originPoint), cn(t.y, n.translate, n.scale, n.originPoint);
2536}
2537const Vs = 0.999999999999, Es = 1.0000000000001;
2538function cc(t, e, n, s = !1) {
2539  const i = n.length;
2540  if (!i)
2541    return;
2542  e.x = e.y = 1;
2543  let o, r;
2544  for (let a = 0; a < i; a++) {
2545    o = n[a], r = o.projectionDelta;
2546    const { visualElement: l } = o.options;
2547    l && l.props.style && l.props.style.display === "contents" || (s && o.options.layoutScroll && o.scroll && o !== o.root && Et(t, {
vendor: 4,256 bytes, lines 2548-2648
2548      x: -o.scroll.offset.x,
2549      y: -o.scroll.offset.y
2550    }), r && (e.x *= r.x.scale, e.y *= r.y.scale, Ir(t, r)), s && bt(o.latestValues) && Et(t, o.latestValues));
2551  }
2552  e.x < Es && e.x > Vs && (e.x = 1), e.y < Es && e.y > Vs && (e.y = 1);
2553}
2554function Vt(t, e) {
2555  t.min = t.min + e, t.max = t.max + e;
2556}
2557function Ds(t, e, n, s, i = 0.5) {
2558  const o = N(t.min, t.max, i);
2559  cn(t, e, n, o, s);
2560}
2561function Et(t, e) {
2562  Ds(t.x, e.x, e.scaleX, e.scale, e.originX), Ds(t.y, e.y, e.scaleY, e.scale, e.originY);
2563}
2564function Fr(t, e) {
2565  return Nr(lc(t.getBoundingClientRect(), e));
2566}
2567function uc(t, e, n) {
2568  const s = Fr(t, n), { scroll: i } = e;
2569  return i && (Vt(s.x, i.offset.x), Vt(s.y, i.offset.y)), s;
2570}
2571const Rs = () => ({
2572  translate: 0,
2573  scale: 1,
2574  origin: 0,
2575  originPoint: 0
2576}), Dt = () => ({
2577  x: Rs(),
2578  y: Rs()
2579}), Ns = () => ({ min: 0, max: 0 }), F = () => ({
2580  x: Ns(),
2581  y: Ns()
2582}), un = { current: null }, Br = { current: !1 };
2583function hc() {
2584  if (Br.current = !0, !!Tn)
2585    if (window.matchMedia) {
2586      const t = window.matchMedia("(prefers-reduced-motion)"), e = () => un.current = t.matches;
2587      t.addEventListener("change", e), e();
2588    } else
2589      un.current = !1;
2590}
2591const dc = /* @__PURE__ */ new WeakMap();
2592function fc(t, e, n) {
2593  for (const s in e) {
2594    const i = e[s], o = n[s];
2595    if (H(i))
2596      t.addValue(s, i);
2597    else if (H(o))
2598      t.addValue(s, Lt(i, { owner: t }));
2599    else if (o !== i)
2600      if (t.hasValue(s)) {
2601        const r = t.getValue(s);
2602        r.liveStyle === !0 ? r.jump(i) : r.hasAnimated || r.set(i);
2603      } else {
2604        const r = t.getStaticValue(s);
2605        t.addValue(s, Lt(r !== void 0 ? r : i, { owner: t }));
2606      }
2607  }
2608  for (const s in n)
2609    e[s] === void 0 && t.removeValue(s);
2610  return e;
2611}
2612const Ls = [
2613  "AnimationStart",
2614  "AnimationComplete",
2615  "Update",
2616  "BeforeLayoutMeasure",
2617  "LayoutMeasure",
2618  "LayoutAnimationStart",
2619  "LayoutAnimationComplete"
2620];
2621class mc {
2622  /**
2623   * This method takes React props and returns found MotionValues. For example, HTML
2624   * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
2625   *
2626   * This isn't an abstract method as it needs calling in the constructor, but it is
2627   * intended to be one.
2628   */
2629  scrapeMotionValuesFromProps(e, n, s) {
2630    return {};
2631  }
2632  constructor({ parent: e, props: n, presenceContext: s, reducedMotionConfig: i, blockInitialAnimation: o, visualState: r }, a = {}) {
2633    this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = jn, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
2634      this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
2635    }, this.renderScheduledAt = 0, this.scheduleRender = () => {
2636      const d = X.now();
2637      this.renderScheduledAt < d && (this.renderScheduledAt = d, R.render(this.render, !1, !0));
2638    };
2639    const { latestValues: l, renderState: u } = r;
2640    this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = n.initial ? { ...l } : {}, this.renderState = u, this.parent = e, this.props = n, this.presenceContext = s, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = i, this.options = a, this.blockInitialAnimation = !!o, this.isControllingVariants = ke(n), this.isVariantNode = Tr(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
2641    const { willChange: c, ...h } = this.scrapeMotionValuesFromProps(n, {}, this);
2642    for (const d in h) {
2643      const m = h[d];
2644      l[d] !== void 0 && H(m) && m.set(l[d]);
2645    }
2646  }
2647  mount(e) {
2648    this.current = e, dc.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEac
vendor: 5,869 bytes, lines 2648-2788
2648h((n, s) => this.bindToMotionValue(s, n)), Br.current || hc(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : un.current, this.parent?.addChild(this), this.update(this.props, this.presenceContext);
2649  }
2650  unmount() {
2651    this.projection && this.projection.unmount(), pt(this.notifyUpdate), pt(this.render), this.valueSubscriptions.forEach((e) => e()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent?.removeChild(this);
2652    for (const e in this.events)
2653      this.events[e].clear();
2654    for (const e in this.features) {
2655      const n = this.features[e];
2656      n && (n.unmount(), n.isMounted = !1);
2657    }
2658    this.current = null;
2659  }
2660  addChild(e) {
2661    this.children.add(e), this.enteringChildren ?? (this.enteringChildren = /* @__PURE__ */ new Set()), this.enteringChildren.add(e);
2662  }
2663  removeChild(e) {
2664    this.children.delete(e), this.enteringChildren && this.enteringChildren.delete(e);
2665  }
2666  bindToMotionValue(e, n) {
2667    this.valueSubscriptions.has(e) && this.valueSubscriptions.get(e)();
2668    const s = jt.has(e);
2669    s && this.onBindTransform && this.onBindTransform();
2670    const i = n.on("change", (r) => {
2671      this.latestValues[e] = r, this.props.onUpdate && R.preRender(this.notifyUpdate), s && this.projection && (this.projection.isTransformDirty = !0), this.scheduleRender();
2672    });
2673    let o;
2674    window.MotionCheckAppearSync && (o = window.MotionCheckAppearSync(this, e, n)), this.valueSubscriptions.set(e, () => {
2675      i(), o && o(), n.owner && n.stop();
2676    });
2677  }
2678  sortNodePosition(e) {
2679    return !this.current || !this.sortInstanceNodePosition || this.type !== e.type ? 0 : this.sortInstanceNodePosition(this.current, e.current);
2680  }
2681  updateFeatures() {
2682    let e = "animation";
2683    for (e in It) {
2684      const n = It[e];
2685      if (!n)
2686        continue;
2687      const { isEnabled: s, Feature: i } = n;
2688      if (!this.features[e] && i && s(this.props) && (this.features[e] = new i(this)), this.features[e]) {
2689        const o = this.features[e];
2690        o.isMounted ? o.update() : (o.mount(), o.isMounted = !0);
2691      }
2692    }
2693  }
2694  triggerBuild() {
2695    this.build(this.renderState, this.latestValues, this.props);
2696  }
2697  /**
2698   * Measure the current viewport box with or without transforms.
2699   * Only measures axis-aligned boxes, rotate and skew must be manually
2700   * removed with a re-render to work.
2701   */
2702  measureViewportBox() {
2703    return this.current ? this.measureInstanceViewportBox(this.current, this.props) : F();
2704  }
2705  getStaticValue(e) {
2706    return this.latestValues[e];
2707  }
2708  setStaticValue(e, n) {
2709    this.latestValues[e] = n;
2710  }
2711  /**
2712   * Update the provided props. Ensure any newly-added motion values are
2713   * added to our map, old ones removed, and listeners updated.
2714   */
2715  update(e, n) {
2716    (e.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = e, this.prevPresenceContext = this.presenceContext, this.presenceContext = n;
2717    for (let s = 0; s < Ls.length; s++) {
2718      const i = Ls[s];
2719      this.propEventSubscriptions[i] && (this.propEventSubscriptions[i](), delete this.propEventSubscriptions[i]);
2720      const o = "on" + i, r = e[o];
2721      r && (this.propEventSubscriptions[i] = this.on(i, r));
2722    }
2723    this.prevMotionValues = fc(this, this.scrapeMotionValuesFromProps(e, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
2724  }
2725  getProps() {
2726    return this.props;
2727  }
2728  /**
2729   * Returns the variant definition with a given name.
2730   */
2731  getVariant(e) {
2732    return this.props.variants ? this.props.variants[e] : void 0;
2733  }
2734  /**
2735   * Returns the defined default transition on this component.
2736   */
2737  getDefaultTransition() {
2738    return this.props.transition;
2739  }
2740  getTransformPagePoint() {
2741    return this.props.transformPagePoint;
2742  }
2743  getClosestVariantNode() {
2744    return this.isVariantNode ? this : this.parent ? this.parent.getClosestVariantNode() : void 0;
2745  }
2746  /**
2747   * Add a child visual element to our set of children.
2748   */
2749  addVariantChild(e) {
2750    const n = this.getClosestVariantNode();
2751    if (n)
2752      return n.variantChildren && n.variantChildren.add(e), () => n.variantChildren.delete(e);
2753  }
2754  /**
2755   * Add a motion value and bind it to this visual element.
2756   */
2757  addValue(e, n) {
2758    const s = this.values.get(e);
2759    n !== s && (s && this.removeValue(e), this.bindToMotionValue(e, n), this.values.set(e, n), this.latestValues[e] = n.get());
2760  }
2761  /**
2762   * Remove a motion value and unbind any active subscriptions.
2763   */
2764  removeValue(e) {
2765    this.values.delete(e);
2766    const n = this.valueSubscriptions.get(e);
2767    n && (n(), this.valueSubscriptions.delete(e)), delete this.latestValues[e], this.removeValueFromRenderState(e, this.renderState);
2768  }
2769  /**
2770   * Check whether we have a motion value for this key
2771   */
2772  hasValue(e) {
2773    return this.values.has(e);
2774  }
2775  getValue(e, n) {
2776    if (this.props.values && this.props.values[e])
2777      return this.props.values[e];
2778    let s = this.values.get(e);
2779    return s === void 0 && n !== void 0 && (s = Lt(n === null ? void 0 : n, { owner: this }), this.addValue(e, s)), s;
2780  }
2781  /**
2782   * If we're trying to animate to a previously unencountered value,
2783   * we need to check for it in our state and as a last resort read it
2784   * directly from the instance (which might have performance implications).
2785   */
2786  readValue(e, n) {
2787    let s = this.latestValues[e] !== void 0 || !this.current ? this.latestValues[e] : this.getBaseTargetFromProps(this.props, e) ?? this.readValueFromInstance(this.current, e, this.options);
2788    return s != null && (typeof s == "string" && (Vi(s) || Di(s)) ? s = parseFloat(s) : !Tl(s) && gt.test(n) && (s = dr(e, n)), this.setBaseTarget(e, H(s) ? s.get() : s
2788)), H(s) ? s.get() : s;
2789  }
2790  /**
2791   * Set the base target to later animate back to. This is currently
2792   * only hydrated on creation and when we first read a value.
2793   */
2794  setBaseTarget(e, n) {
2795    this.baseTarget[e] = n;
2796  }
2797  /**
2798   * Find the base target for a value thats been removed from all animation
2799   * props.
2800   */
2801  getBaseTarget(e) {
2802    const { initial: n } = this.props;
2803    let s;
2804    if (typeof n == "string" || typeof n == "object") {
2805      const o = qn(this.props, n, this.presenceContext?.custom);
2806      o && (s = o[e]);
2807    }
2808    if (n && s !== void 0)
2809      return s;
2810    const i = this.getBaseTargetFromProps(this.props, e);
2811    return i !== void 0 && !H(i) ? i : this.initialValues[e] !== void 0 && s === void 0 ? void 0 : this.baseTarget[e];
2812  }
2813  on(e, n) {
2814    return this.events[e] || (this.events[e] = new An()), this.events[e].add(n);
2815  }
2816  notify(e, ...n) {
2817    this.events[e] && this.events[e].notify(...n);
2818  }
2819  scheduleRenderMicrotask() {
2820    _n.render(this.render);
2821  }
2822}
2823class Or extends mc {
2824  constructor() {
2825    super(...arguments), this.KeyframeResolver = ul;
2826  }
2827  sortInstanceNodePosition(e, n) {
2828    return e.compareDocumentPosition(n) & 2 ? 1 : -1;
2829  }
2830  getBaseTargetFromProps(e, n) {
2831    return e.style ? e.style[n] : void 0;
2832  }
2833  removeValueFromRenderState(e, { vars: n, style: s }) {
2834    delete n[e], delete s[e];
2835  }
2836  handleChildMotionValue() {
2837    this.childSubscription && (this.childSubscription(), delete this.childSubscription);
2838    const { children: e } = this.props;
2839    H(e) && (this.childSubscription = e.on("change", (n) => {
2840      this.current && (this.current.textContent = `${n}`);
2841    }));
2842  }
2843}
2844function jr(t, { style: e, vars: n }, s, i) {
2845  const o = t.style;
2846  let r;
2847  for (r in e)
2848    o[r] = e[r];
2849  i?.applyProjectionStyles(o, s);
2850  for (r in n)
2851    o.setProperty(r, n[r]);
2852}
2853function pc(t) {
2854  return window.getComputedStyle(t);
2855}
2856class gc extends Or {
2857  constructor() {
2858    super(...arguments), this.type = "html", this.renderInstance = jr;
2859  }
2860  readValueFromInstance(e, n) {
2861    if (jt.has(n))
2862      return this.projection?.isProjecting ? tn(n) : Va(e, n);
2863    {
2864      const s = pc(e), i = (En(n) ? s.getPropertyValue(n) : s[n]) || 0;
2865      return typeof i == "string" ? i.trim() : i;
2866    }
2867  }
2868  measureInstanceViewportBox(e, { transformPagePoint: n }) {
2869    return Fr(e, n);
2870  }
2871  build(e, n, s) {
2872    Gn(e, n, s.transformTemplate);
2873  }
2874  scrapeMotionValuesFromProps(e, n, s) {
2875    return Zn(e, n, s);
2876  }
2877}
2878const $r = /* @__PURE__ */ new Set([
2879  "baseFrequency",
2880  "diffuseConstant",
2881  "kernelMatrix",
2882  "kernelUnitLength",
2883  "keySplines",
2884  "keyTimes",
2885  "limitingConeAngle",
2886  "markerHeight",
2887  "markerWidth",
2888  "numOctaves",
2889  "targetX",
2890  "targetY",
2891  "surfaceScale",
2892  "specularConstant",
2893  "specularExponent",
2894  "stdDeviation",
2895  "tableValues",
2896  "viewBox",
2897  "gradientTransform",
2898  "pathLength",
2899  "startOffset",
2900  "textLength",
2901  "lengthAdjust"
2902]);
2903function yc(t, e, n, s) {
2904  jr(t, e, void 0, s);
2905  for (const i in e.attrs)
2906    t.setAttribute($r.has(i) ? i : Jn(i), e.attrs[i]);
2907}
2908class xc extends Or {
2909  constructor() {
2910    super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = F;
2911  }
2912  getBaseTargetFromProps(e, n) {
2913    return e[n];
2914  }
2915  readValueFromInstance(e, n) {
2916    if (jt.has(n)) {
2917      const s = hr(n);
2918      return s && s.default || 0;
2919    }
2920    return n = $r.has(n) ? n : Jn(n), e.getAttribute(n);
2921  }
2922  scrapeMotionValuesFromProps(e, n, s) {
2923    return Vr(e, n, s);
2924  }
2925  build(e, n, s) {
2926    Cr(e, n, this.isSVGTag, s.transformTemplate, s.style);
2927  }
2928  renderInstance(e, n, s, i) {
2929    yc(e, n, s, i);
2930  }
2931  mount(e) {
2932    this.isSVGTag = Ar(e.tagName), super.mount(e);
2933  }
2934}
2935const vc = (t, e) => Yn(t) ? new xc(e) : new gc(e, {
2936  allowProjection: t !== Mi
2937});
2938function Rt(t, e, n) {
2939  const s = t.getProps();
2940  return qn(s, e, n !== void 0 ? n : s.custom, t);
2941}
2942const hn = (t) => Array.isArray(t);
2943function bc(t, e, n) {
2944  t.hasValue(e) ? t.getValue(e).set(n) : t.addValue(e, Lt(n));
2945}
2946function wc(t) {
2947  return hn(t) ? t[t.length - 1] || 0 : t;
2948}
2949function Tc(t, e) {
2950  const n = Rt(t, e);
2951  let { transitionEnd: s = {}, transition: i = {}, ...o } = n || {};
2952  o = { ...o, ...s };
2953  for (const r in o) {
2954    const a = wc(o[r]);
2955    bc(t, r, a);
2956  }
2957}
2958function Sc(t) {
2959  return !!(H(t) && t.add);
2960}
2961function dn(t, e) {
2962  const n = t.getValue("willChange");
2963  if (Sc(n))
2964    return n.add(e);
2965  if (!n && ct.WillChange) {
2966    const s = new ct.WillChange("auto");
2967    t.addValue("willChange", s), s.add(e);
2968  }
2969}
2970function Ur(t) {
2971  return t.props[Er];
2972}
2973const Pc = (t) => t !== null;
2974function Cc(t, { repeat: e, repeatType: n = "loop" }, s) {
2975  const i = t.filter(Pc), o = e && n !== "loop" && e % 2 === 1 ? 0 : i.length - 1;
2976  return i[o];
2977}
2978const Mc = {
2979  type: "spring",
2980  stiffness: 500,
2981  damping: 25,
2982  restSpeed: 10
2983}, Ac = (t) => ({
2984  type: "spring",
2985  stiffness: 550,
2986  damping: t === 0 ? 2 * Math.sqrt(550) : 30,
2987  restSpeed: 10
2988}), kc = {
2989  type: "keyframes",
2990  duration: 0.8
2991}, Vc = {
2992  type: "keyframes",
2993  ease: [0.25, 0.1, 0.35, 1],
2994  duration: 0.3
2995}, Ec = (t, { keyframes: e }) => e.length > 2 ? kc : jt.has(t) ? t.startsWith("scale") ? Ac(e[1]) : Mc : Vc;
2996function Dc({ when: t, delay: e, delayChildren: n, staggerChildren: s, staggerDirection: i, repeat: o, repeatType: r, repeatDelay: a, from: l, elapsed: u, ...c }) {
2997  return !!Object.keys(c).length;
2998}
2999const Qn = (t, e, n, s = {}, i, o) => (r) => {
3000  const a = $n(s, t) || {}, l = a.delay || s.delay || 0;
3001  let { elapsed: u = 0 } = s;
3002  u = u - /* @__PURE__ */ ot(l);
3003  const c = {
3004    keyframes: Array.isArray(n) ? n : [null, n],
3005    ease: "easeOut",
3006    velocity: e.getVelocity(),
3007    ...a,
3008    delay: -u,
3009    onUpdate: (d) => {
3010      e.set(d), a.onUpdate && a.onUpdate(d);
3011    },
3012    onComplete: () => {
3013      r(), a.onComplete && a.onComplete();
3014    },
3015    name: t,
3016    motionValue: e,
3017    element: o ? void 0 : i
3018  };
3019  Dc(a) || Object.assign(c, Ec(t, c)), c.duration && (c.duration = /* @__PURE__ */ ot(c.duration)), c.repeatDelay && (c.repeatDelay = /* @__PURE__ */ ot(c.repeatDelay)), c.from !== void 0 && (c.keyframes[0] = c.from);
3020  let h = !1;
3021  if ((c.type === !1 || c.duration === 0 && !c.repeatDelay) && (on(c), c.delay === 0 && (h = !0)), (ct.instantAnimations || ct.skipAnimations) && (h = !0, on(c), c.delay = 0), c.allowFlatten = !a.type && !a.ease, h && !o && e.get() !== void 0) {
3022    const d = Cc(c.keyframes, a);
3023    if (d !== void 0) {
3024      R.update(() => {
3025        c.onUpdate(d), c.onComplete();
3026      });
3027      return;
3028    }
3029  }
3030  return a.isSync ? new On(c) : new Ja(c);
3031};
3032function Rc({ protectedKeys: t, needsAnimating: e }, n) {
3033  const s = t.hasOwnProperty(n) && e[n] !== !0;
3034  return e[n] = !1, s;
3035}
3036function _r(t, e, { delay: n = 0, transitionOverride: s, type: i } = {}) {
3037  let { transition: o = t.getDefaultTransition(), transitionEnd: r, ...a } = e;
3038  s && (o = s);
3039  const l = [], u = i && t.animationState && t.animationState.getState()[i];
3040  for (const c in a) {
3041    const h = t.getValue(c, t.latestValues[c] ?? null), d = a[c];
3042    if (d === void 0 || u && Rc(u, c))
3043      continue;
3044    const m = {
3045      delay: n,
3046      ...$n(o || {}, c)
3047    }, p = h.get();
3048    if (p !== void 0 && !h.isAnimating && !Array.isArray(d) && d === p && !m.velocity)
3049      continue;
3050    let g = !1;
3051    if (window.MotionHandoffAnimation) {
3052      const y = Ur(t);
3053      if (y) {
3054        const x = window.MotionHandoffAnimation(y, c, R);
3055        x !== null && (m.startTime = x, g = !0);
3056      }
3057    }
3058    dn(t, c), h.start(Qn(c, h, d, t.shouldReduceMotion && lr.has(c) ? { type: !1 } : m, t, g));
3059    const b = h.animation;
3060    b && l.push(b);
3061  }
3062  return r && Promise.all(l).then(() => {
3063    R.update(() => {
3064      r && Tc(t, r);
3065    });
3066  }), l;
3067}
3068function Wr(t, e, n, s = 0, i = 1) {
3069  const o = Array.from(t).sort((u, c) => u.sortNodePosition(c)).indexOf(e), r = t.size, a = (r - 1) * s;
3070  return typeof n == "function" ? n(o, r) : i === 1 ? o * s : a - o * s;
3071}
3072function fn(t, e, n = {}) {
3073  const s = Rt(t, e, n.type === "exit" ? t.presenceContext?.custom : void 0);
3074  let { transition: i = t.getDefaultTransition() || {} } = s || {};
3075  n.transitionOverride && (i = n.transitionOverride);
3076  const o = s ? () => Promise.all(_r(t, s, n)) : () => Promise.resolve(), r = t.variantChildren && t.variantChildren.size ? (l = 0) => {
3077    const { delayChildren: u = 0, staggerChildren: c, staggerDirection: h } = i;
3078    return Nc(t, e, l, u, c, h, n);
3079  } : () => Promise.resolve(), { when: a } = i;
3080  if (a) {
3081    const [l, u] = a === "beforeChildren" ? [o, r] : [r, o];
3082    return l().then(() => u());
3083  } else
3084    return Promise.all([o(), r(n.delay)]);
3085}
3086function Nc(t, e, n = 0, s = 0, i = 0, o = 1, r) {
3087  const a = [];
3088  for (const l of t.variantChildren)
3089    l.notify("AnimationStart", e), a.push(fn(l, e, {
3090      ...r,
3091      delay: n + (typeof s == "function" ? 0 : s) + Wr(t.variantChildren, l, s, i, o)
3092    }).then(() => l.notify("AnimationComplete", e)));
3093  return Promise.all(a);
3094}
3095function Lc(t, e, n = {}) {
3096  t.notify("AnimationStart", e);
3097  let s;
3098  if (Array.isArray(e)) {
3099    const i = e.map((o) => fn(t, o, n));
3100    s = Promise.all(i);
3101  } else if (typeof e == "string")
3102    s = fn(t, e, n);
3103  else {
3104    const i = typeof e == "function" ? Rt(t, e, n.custom) : e;
3105    s = Promise.all(_r(t, i, n));
3106  }
3107  return s.then(() => {
3108    t.notify("AnimationComplete", e);
3109  });
3110}
3111function zr(t, e) {
3112  if (!Array.isArray(e))
3113    return !1;
3114  const n = e.length;
3115  if (n !== t.length)
3116    return !1;
3117  for (let s = 0; s < n; s++)
3118    if (e[s] !== t[s])
3119      return !1;
3120  return !0;
3121}
3122const Ic = Kn.length;
3123function Hr(t) {
3124  if (!t)
3125    return;
3126  if (!t.isControllingVariants) {
3127    const n = t.parent ? Hr(t.parent) || {} : {};
3128    return t.props.initial !== void 0 && (n.initial = t.props.initial), n;
3129  }
3130  const e = {};
3131  for (let n = 0; n < Ic; n++) {
3132    const s = Kn[n], i = t.props[s];
3133    (te(i) || i === !1) && (e[s] = i);
3134  }
3135  return e;
3136}
vendor: 5,746 bytes, lines 3137-3311
3137const Fc = [...Hn].reverse(), Bc = Hn.length;
3138function Oc(t) {
3139  return (e) => Promise.all(e.map(({ animation: n, options: s }) => Lc(t, n, s)));
3140}
3141function jc(t) {
3142  let e = Oc(t), n = Is(), s = !0;
3143  const i = (l) => (u, c) => {
3144    const h = Rt(t, c, l === "exit" ? t.presenceContext?.custom : void 0);
3145    if (h) {
3146      const { transition: d, transitionEnd: m, ...p } = h;
3147      u = { ...u, ...p, ...m };
3148    }
3149    return u;
3150  };
3151  function o(l) {
3152    e = l(t);
3153  }
3154  function r(l) {
3155    const { props: u } = t, c = Hr(t.parent) || {}, h = [], d = /* @__PURE__ */ new Set();
3156    let m = {}, p = 1 / 0;
3157    for (let b = 0; b < Bc; b++) {
3158      const y = Fc[b], x = n[y], v = u[y] !== void 0 ? u[y] : c[y], A = te(v), S = y === l ? x.isActive : null;
3159      S === !1 && (p = b);
3160      let M = v === c[y] && v !== u[y] && A;
3161      if (M && s && t.manuallyAnimateOnMount && (M = !1), x.protectedKeys = { ...m }, // If it isn't active and hasn't *just* been set as inactive
3162      !x.isActive && S === null || // If we didn't and don't have any defined prop for this animation type
3163      !v && !x.prevProp || // Or if the prop doesn't define an animation
3164      Ae(v) || typeof v == "boolean")
3165        continue;
3166      const k = $c(x.prevProp, v);
3167      let C = k || // If we're making this variant active, we want to always make it active
3168      y === l && x.isActive && !M && A || // If we removed a higher-priority variant (i is in reverse order)
3169      b > p && A, B = !1;
3170      const $ = Array.isArray(v) ? v : [v];
3171      let q = $.reduce(i(y), {});
3172      S === !1 && (q = {});
3173      const { prevResolvedValues: $t = {} } = x, ae = {
3174        ...$t,
3175        ...q
3176      }, Ut = (I) => {
3177        C = !0, d.has(I) && (B = !0, d.delete(I)), x.needsAnimating[I] = !0;
3178        const W = t.getValue(I);
3179        W && (W.liveStyle = !1);
3180      };
3181      for (const I in ae) {
3182        const W = q[I], Z = $t[I];
3183        if (m.hasOwnProperty(I))
3184          continue;
3185        let U = !1;
3186        hn(W) && hn(Z) ? U = !zr(W, Z) : U = W !== Z, U ? W != null ? Ut(I) : d.add(I) : W !== void 0 && d.has(I) ? Ut(I) : x.protectedKeys[I] = !0;
3187      }
3188      x.prevProp = v, x.prevResolvedValues = q, x.isActive && (m = { ...m, ...q }), s && t.blockInitialAnimation && (C = !1);
3189      const st = M && k;
3190      C && (!st || B) && h.push(...$.map((I) => {
3191        const W = { type: y };
3192        if (typeof I == "string" && s && !st && t.manuallyAnimateOnMount && t.parent) {
3193          const { parent: Z } = t, U = Rt(Z, I);
3194          if (Z.enteringChildren && U) {
3195            const { delayChildren: le } = U.transition || {};
3196            W.delay = Wr(Z.enteringChildren, t, le);
3197          }
3198        }
3199        return {
3200          animation: I,
3201          options: W
3202        };
3203      }));
3204    }
3205    if (d.size) {
3206      const b = {};
3207      if (typeof u.initial != "boolean") {
3208        const y = Rt(t, Array.isArray(u.initial) ? u.initial[0] : u.initial);
3209        y && y.transition && (b.transition = y.transition);
3210      }
3211      d.forEach((y) => {
3212        const x = t.getBaseTarget(y), v = t.getValue(y);
3213        v && (v.liveStyle = !0), b[y] = x ?? null;
3214      }), h.push({ animation: b });
3215    }
3216    let g = !!h.length;
3217    return s && (u.initial === !1 || u.initial === u.animate) && !t.manuallyAnimateOnMount && (g = !1), s = !1, g ? e(h) : Promise.resolve();
3218  }
3219  function a(l, u) {
3220    if (n[l].isActive === u)
3221      return Promise.resolve();
3222    t.variantChildren?.forEach((h) => h.animationState?.setActive(l, u)), n[l].isActive = u;
3223    const c = r(l);
3224    for (const h in n)
3225      n[h].protectedKeys = {};
3226    return c;
3227  }
3228  return {
3229    animateChanges: r,
3230    setActive: a,
3231    setAnimateFunction: o,
3232    getState: () => n,
3233    reset: () => {
3234      n = Is();
3235    }
3236  };
3237}
3238function $c(t, e) {
3239  return typeof e == "string" ? e !== t : Array.isArray(e) ? !zr(e, t) : !1;
3240}
3241function vt(t = !1) {
3242  return {
3243    isActive: t,
3244    protectedKeys: {},
3245    needsAnimating: {},
3246    prevResolvedValues: {}
3247  };
3248}
3249function Is() {
3250  return {
3251    animate: vt(!0),
3252    whileInView: vt(),
3253    whileHover: vt(),
3254    whileTap: vt(),
3255    whileDrag: vt(),
3256    whileFocus: vt(),
3257    exit: vt()
3258  };
3259}
3260class yt {
3261  constructor(e) {
3262    this.isMounted = !1, this.node = e;
3263  }
3264  update() {
3265  }
3266}
3267class Uc extends yt {
3268  /**
3269   * We dynamically generate the AnimationState manager as it contains a reference
3270   * to the underlying animation library. We only want to load that if we load this,
3271   * so people can optionally code split it out using the `m` component.
3272   */
3273  constructor(e) {
3274    super(e), e.animationState || (e.animationState = jc(e));
3275  }
3276  updateAnimationControlsSubscription() {
3277    const { animate: e } = this.node.getProps();
3278    Ae(e) && (this.unmountControls = e.subscribe(this.node));
3279  }
3280  /**
3281   * Subscribe any provided AnimationControls to the component's VisualElement
3282   */
3283  mount() {
3284    this.updateAnimationControlsSubscription();
3285  }
3286  update() {
3287    const { animate: e } = this.node.getProps(), { animate: n } = this.node.prevProps || {};
3288    e !== n && this.updateAnimationControlsSubscription();
3289  }
3290  unmount() {
3291    this.node.animationState.reset(), this.unmountControls?.();
3292  }
3293}
3294let _c = 0;
3295class Wc extends yt {
3296  constructor() {
3297    super(...arguments), this.id = _c++;
3298  }
3299  update() {
3300    if (!this.node.presenceContext)
3301      return;
3302    const { isPresent: e, onExitComplete: n } = this.node.presenceContext, { isPresent: s } = this.node.prevPresenceContext || {};
3303    if (!this.node.animationState || e === s)
3304      return;
3305    const i = this.node.animationState.setActive("exit", !e);
3306    n && !e && i.then(() => {
3307      n(this.id);
3308    });
3309  }
3310  mount() {
3311    const { register: e, onExitComplete: n } = this.node.presenceContext || {};
vendor: 8,688 bytes, lines 3312-3546
3312    n && n(this.id), e && (this.unmount = e(this.id));
3313  }
3314  unmount() {
3315  }
3316}
3317const zc = {
3318  animation: {
3319    Feature: Uc
3320  },
3321  exit: {
3322    Feature: Wc
3323  }
3324};
3325function ne(t, e, n, s = { passive: !0 }) {
3326  return t.addEventListener(e, n, s), () => t.removeEventListener(e, n);
3327}
3328function oe(t) {
3329  return {
3330    point: {
3331      x: t.pageX,
3332      y: t.pageY
3333    }
3334  };
3335}
3336const Hc = (t) => (e) => Wn(e) && t(e, oe(e));
3337function Xt(t, e, n, s) {
3338  return ne(t, e, Hc(n), s);
3339}
3340const Kr = 1e-4, Kc = 1 - Kr, Gc = 1 + Kr, Gr = 0.01, Xc = 0 - Gr, Yc = 0 + Gr;
3341function K(t) {
3342  return t.max - t.min;
3343}
3344function qc(t, e, n) {
3345  return Math.abs(t - e) <= n;
3346}
3347function Fs(t, e, n, s = 0.5) {
3348  t.origin = s, t.originPoint = N(e.min, e.max, t.origin), t.scale = K(n) / K(e), t.translate = N(n.min, n.max, t.origin) - t.originPoint, (t.scale >= Kc && t.scale <= Gc || isNaN(t.scale)) && (t.scale = 1), (t.translate >= Xc && t.translate <= Yc || isNaN(t.translate)) && (t.translate = 0);
3349}
3350function Yt(t, e, n, s) {
3351  Fs(t.x, e.x, n.x, s ? s.originX : void 0), Fs(t.y, e.y, n.y, s ? s.originY : void 0);
3352}
3353function Bs(t, e, n) {
3354  t.min = n.min + e.min, t.max = t.min + K(e);
3355}
3356function Zc(t, e, n) {
3357  Bs(t.x, e.x, n.x), Bs(t.y, e.y, n.y);
3358}
3359function Os(t, e, n) {
3360  t.min = e.min - n.min, t.max = t.min + K(e);
3361}
3362function qt(t, e, n) {
3363  Os(t.x, e.x, n.x), Os(t.y, e.y, n.y);
3364}
3365function tt(t) {
3366  return [t("x"), t("y")];
3367}
3368const Xr = ({ current: t }) => t ? t.ownerDocument.defaultView : null, js = (t, e) => Math.abs(t - e);
3369function Jc(t, e) {
3370  const n = js(t.x, e.x), s = js(t.y, e.y);
3371  return Math.sqrt(n ** 2 + s ** 2);
3372}
3373class Yr {
3374  constructor(e, n, { transformPagePoint: s, contextWindow: i = window, dragSnapToOrigin: o = !1, distanceThreshold: r = 3 } = {}) {
3375    if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.handlers = {}, this.contextWindow = window, this.updatePoint = () => {
3376      if (!(this.lastMoveEvent && this.lastMoveEventInfo))
3377        return;
3378      const d = $e(this.lastMoveEventInfo, this.history), m = this.startEvent !== null, p = Jc(d.offset, { x: 0, y: 0 }) >= this.distanceThreshold;
3379      if (!m && !p)
3380        return;
3381      const { point: g } = d, { timestamp: b } = _;
3382      this.history.push({ ...g, timestamp: b });
3383      const { onStart: y, onMove: x } = this.handlers;
3384      m || (y && y(this.lastMoveEvent, d), this.startEvent = this.lastMoveEvent), x && x(this.lastMoveEvent, d);
3385    }, this.handlePointerMove = (d, m) => {
3386      this.lastMoveEvent = d, this.lastMoveEventInfo = je(m, this.transformPagePoint), R.update(this.updatePoint, !0);
3387    }, this.handlePointerUp = (d, m) => {
3388      this.end();
3389      const { onEnd: p, onSessionEnd: g, resumeAnimation: b } = this.handlers;
3390      if (this.dragSnapToOrigin && b && b(), !(this.lastMoveEvent && this.lastMoveEventInfo))
3391        return;
3392      const y = $e(d.type === "pointercancel" ? this.lastMoveEventInfo : je(m, this.transformPagePoint), this.history);
3393      this.startEvent && p && p(d, y), g && g(d, y);
3394    }, !Wn(e))
3395      return;
3396    this.dragSnapToOrigin = o, this.handlers = n, this.transformPagePoint = s, this.distanceThreshold = r, this.contextWindow = i || window;
3397    const a = oe(e), l = je(a, this.transformPagePoint), { point: u } = l, { timestamp: c } = _;
3398    this.history = [{ ...u, timestamp: c }];
3399    const { onSessionStart: h } = n;
3400    h && h(e, $e(l, this.history)), this.removeListeners = se(Xt(this.contextWindow, "pointermove", this.handlePointerMove), Xt(this.contextWindow, "pointerup", this.handlePointerUp), Xt(this.contextWindow, "pointercancel", this.handlePointerUp));
3401  }
3402  updateHandlers(e) {
3403    this.handlers = e;
3404  }
3405  end() {
3406    this.removeListeners && this.removeListeners(), pt(this.updatePoint);
3407  }
3408}
3409function je(t, e) {
3410  return e ? { point: e(t.point) } : t;
3411}
3412function $s(t, e) {
3413  return { x: t.x - e.x, y: t.y - e.y };
3414}
3415function $e({ point: t }, e) {
3416  return {
3417    point: t,
3418    delta: $s(t, qr(e)),
3419    offset: $s(t, Qc(e)),
3420    velocity: tu(e, 0.1)
3421  };
3422}
3423function Qc(t) {
3424  return t[0];
3425}
3426function qr(t) {
3427  return t[t.length - 1];
3428}
3429function tu(t, e) {
3430  if (t.length < 2)
3431    return { x: 0, y: 0 };
3432  let n = t.length - 1, s = null;
3433  const i = qr(t);
3434  for (; n >= 0 && (s = t[n], !(i.timestamp - s.timestamp > /* @__PURE__ */ ot(e))); )
3435    n--;
3436  if (!s)
3437    return { x: 0, y: 0 };
3438  const o = /* @__PURE__ */ et(i.timestamp - s.timestamp);
3439  if (o === 0)
3440    return { x: 0, y: 0 };
3441  const r = {
3442    x: (i.x - s.x) / o,
3443    y: (i.y - s.y) / o
3444  };
3445  return r.x === 1 / 0 && (r.x = 0), r.y === 1 / 0 && (r.y = 0), r;
3446}
3447function eu(t, { min: e, max: n }, s) {
3448  return e !== void 0 && t < e ? t = s ? N(e, t, s.min) : Math.max(t, e) : n !== void 0 && t > n && (t = s ? N(n, t, s.max) : Math.min(t, n)), t;
3449}
3450function Us(t, e, n) {
3451  return {
3452    min: e !== void 0 ? t.min + e : void 0,
3453    max: n !== void 0 ? t.max + n - (t.max - t.min) : void 0
3454  };
3455}
3456function nu(t, { top: e, left: n, bottom: s, right: i }) {
3457  return {
3458    x: Us(t.x, n, i),
3459    y: Us(t.y, e, s)
3460  };
3461}
3462function _s(t, e) {
3463  let n = e.min - t.min, s = e.max - t.max;
3464  return e.max - e.min < t.max - t.min && ([n, s] = [s, n]), { min: n, max: s };
3465}
3466function su(t, e) {
3467  return {
3468    x: _s(t.x, e.x),
3469    y: _s(t.y, e.y)
3470  };
3471}
3472function iu(t, e) {
3473  let n = 0.5;
3474  const s = K(t), i = K(e);
3475  return i > s ? n = /* @__PURE__ */ Zt(e.min, e.max - s, t.min) : s > i && (n = /* @__PURE__ */ Zt(t.min, t.max - i, e.min)), lt(0, 1, n);
3476}
3477function ru(t, e) {
3478  const n = {};
3479  return e.min !== void 0 && (n.min = e.min - t.min), e.max !== void 0 && (n.max = e.max - t.min), n;
3480}
3481const mn = 0.35;
3482function ou(t = mn) {
3483  return t === !1 ? t = 0 : t === !0 && (t = mn), {
3484    x: Ws(t, "left", "right"),
3485    y: Ws(t, "top", "bottom")
3486  };
3487}
3488function Ws(t, e, n) {
3489  return {
3490    min: zs(t, e),
3491    max: zs(t, n)
3492  };
3493}
3494function zs(t, e) {
3495  return typeof t == "number" ? t : t[e] || 0;
3496}
3497const au = /* @__PURE__ */ new WeakMap();
3498class lu {
3499  constructor(e) {
3500    this.openDragLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = F(), this.latestPointerEvent = null, this.latestPanInfo = null, this.visualElement = e;
3501  }
3502  start(e, { snapToCursor: n = !1, distanceThreshold: s } = {}) {
3503    const { presenceContext: i } = this.visualElement;
3504    if (i && i.isPresent === !1)
3505      return;
3506    const o = (h) => {
3507      const { dragSnapToOrigin: d } = this.getProps();
3508      d ? this.pauseAnimation() : this.stopAnimation(), n && this.snapToCursor(oe(h).point);
3509    }, r = (h, d) => {
3510      const { drag: m, dragPropagation: p, onDragStart: g } = this.getProps();
3511      if (m && !p && (this.openDragLock && this.openDragLock(), this.openDragLock = ml(m), !this.openDragLock))
3512        return;
3513      this.latestPointerEvent = h, this.latestPanInfo = d, this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), tt((y) => {
3514        let x = this.getAxisMotionValue(y).get() || 0;
3515        if (at.test(x)) {
3516          const { projection: v } = this.visualElement;
3517          if (v && v.layout) {
3518            const A = v.layout.layoutBox[y];
3519            A && (x = K(A) * (parseFloat(x) / 100));
3520          }
3521        }
3522        this.originPoint[y] = x;
3523      }), g && R.postRender(() => g(h, d)), dn(this.visualElement, "transform");
3524      const { animationState: b } = this.visualElement;
3525      b && b.setActive("whileDrag", !0);
3526    }, a = (h, d) => {
3527      this.latestPointerEvent = h, this.latestPanInfo = d;
3528      const { dragPropagation: m, dragDirectionLock: p, onDirectionLock: g, onDrag: b } = this.getProps();
3529      if (!m && !this.openDragLock)
3530        return;
3531      const { offset: y } = d;
3532      if (p && this.currentDirection === null) {
3533        this.currentDirection = cu(y), this.currentDirection !== null && g && g(this.currentDirection);
3534        return;
3535      }
3536      this.updateAxis("x", d.point, y), this.updateAxis("y", d.point, y), this.visualElement.render(), b && b(h, d);
3537    }, l = (h, d) => {
3538      this.latestPointerEvent = h, this.latestPanInfo = d, this.stop(h, d), this.latestPointerEvent = null, this.latestPanInfo = null;
3539    }, u = () => tt((h) => this.getAnimationState(h) === "paused" && this.getAxisMotionValue(h).animation?.play()), { dragSnapToOrigin: c } = this.getProps();
3540    this.panSession = new Yr(e, {
3541      onSessionStart: o,
3542      onStart: r,
3543      onMove: a,
3544      onSessionEnd: l,
3545      resumeAnimation: u
3546    }, {
vendor: 9,739 bytes, lines 3547-3817
3547      transformPagePoint: this.visualElement.getTransformPagePoint(),
3548      dragSnapToOrigin: c,
3549      distanceThreshold: s,
3550      contextWindow: Xr(this.visualElement)
3551    });
3552  }
3553  /**
3554   * @internal
3555   */
3556  stop(e, n) {
3557    const s = e || this.latestPointerEvent, i = n || this.latestPanInfo, o = this.isDragging;
3558    if (this.cancel(), !o || !i || !s)
3559      return;
3560    const { velocity: r } = i;
3561    this.startAnimation(r);
3562    const { onDragEnd: a } = this.getProps();
3563    a && R.postRender(() => a(s, i));
3564  }
3565  /**
3566   * @internal
3567   */
3568  cancel() {
3569    this.isDragging = !1;
3570    const { projection: e, animationState: n } = this.visualElement;
3571    e && (e.isAnimationBlocked = !1), this.panSession && this.panSession.end(), this.panSession = void 0;
3572    const { dragPropagation: s } = this.getProps();
3573    !s && this.openDragLock && (this.openDragLock(), this.openDragLock = null), n && n.setActive("whileDrag", !1);
3574  }
3575  updateAxis(e, n, s) {
3576    const { drag: i } = this.getProps();
3577    if (!s || !de(e, i, this.currentDirection))
3578      return;
3579    const o = this.getAxisMotionValue(e);
3580    let r = this.originPoint[e] + s[e];
3581    this.constraints && this.constraints[e] && (r = eu(r, this.constraints[e], this.elastic[e])), o.set(r);
3582  }
3583  resolveConstraints() {
3584    const { dragConstraints: e, dragElastic: n } = this.getProps(), s = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(!1) : this.visualElement.projection?.layout, i = this.constraints;
3585    e && kt(e) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : e && s ? this.constraints = nu(s.layoutBox, e) : this.constraints = !1, this.elastic = ou(n), i !== this.constraints && s && this.constraints && !this.hasMutatedConstraints && tt((o) => {
3586      this.constraints !== !1 && this.getAxisMotionValue(o) && (this.constraints[o] = ru(s.layoutBox[o], this.constraints[o]));
3587    });
3588  }
3589  resolveRefConstraints() {
3590    const { dragConstraints: e, onMeasureDragConstraints: n } = this.getProps();
3591    if (!e || !kt(e))
3592      return !1;
3593    const s = e.current, { projection: i } = this.visualElement;
3594    if (!i || !i.layout)
3595      return !1;
3596    const o = uc(s, i.root, this.visualElement.getTransformPagePoint());
3597    let r = su(i.layout.layoutBox, o);
3598    if (n) {
3599      const a = n(ac(r));
3600      this.hasMutatedConstraints = !!a, a && (r = Nr(a));
3601    }
3602    return r;
3603  }
3604  startAnimation(e) {
3605    const { drag: n, dragMomentum: s, dragElastic: i, dragTransition: o, dragSnapToOrigin: r, onDragTransitionEnd: a } = this.getProps(), l = this.constraints || {}, u = tt((c) => {
3606      if (!de(c, n, this.currentDirection))
3607        return;
3608      let h = l && l[c] || {};
3609      r && (h = { min: 0, max: 0 });
3610      const d = i ? 200 : 1e6, m = i ? 40 : 1e7, p = {
3611        type: "inertia",
3612        velocity: s ? e[c] : 0,
3613        bounceStiffness: d,
3614        bounceDamping: m,
3615        timeConstant: 750,
3616        restDelta: 1,
3617        restSpeed: 10,
3618        ...o,
3619        ...h
3620      };
3621      return this.startAxisValueAnimation(c, p);
3622    });
3623    return Promise.all(u).then(a);
3624  }
3625  startAxisValueAnimation(e, n) {
3626    const s = this.getAxisMotionValue(e);
3627    return dn(this.visualElement, e), s.start(Qn(e, s, 0, n, this.visualElement, !1));
3628  }
3629  stopAnimation() {
3630    tt((e) => this.getAxisMotionValue(e).stop());
3631  }
3632  pauseAnimation() {
3633    tt((e) => this.getAxisMotionValue(e).animation?.pause());
3634  }
3635  getAnimationState(e) {
3636    return this.getAxisMotionValue(e).animation?.state;
3637  }
3638  /**
3639   * Drag works differently depending on which props are provided.
3640   *
3641   * - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values.
3642   * - Otherwise, we apply the delta to the x/y motion values.
3643   */
3644  getAxisMotionValue(e) {
3645    const n = `_drag${e.toUpperCase()}`, s = this.visualElement.getProps(), i = s[n];
3646    return i || this.visualElement.getValue(e, (s.initial ? s.initial[e] : void 0) || 0);
3647  }
3648  snapToCursor(e) {
3649    tt((n) => {
3650      const { drag: s } = this.getProps();
3651      if (!de(n, s, this.currentDirection))
3652        return;
3653      const { projection: i } = this.visualElement, o = this.getAxisMotionValue(n);
3654      if (i && i.layout) {
3655        const { min: r, max: a } = i.layout.layoutBox[n];
3656        o.set(e[n] - N(r, a, 0.5));
3657      }
3658    });
3659  }
3660  /**
3661   * When the viewport resizes we want to check if the measured constraints
3662   * have changed and, if so, reposition the element within those new constraints
3663   * relative to where it was before the resize.
3664   */
3665  scalePositionWithinConstraints() {
3666    if (!this.visualElement.current)
3667      return;
3668    const { drag: e, dragConstraints: n } = this.getProps(), { projection: s } = this.visualElement;
3669    if (!kt(n) || !s || !this.constraints)
3670      return;
3671    this.stopAnimation();
3672    const i = { x: 0, y: 0 };
3673    tt((r) => {
3674      const a = this.getAxisMotionValue(r);
3675      if (a && this.constraints !== !1) {
3676        const l = a.get();
3677        i[r] = iu({ min: l, max: l }, this.constraints[r]);
3678      }
3679    });
3680    const { transformTemplate: o } = this.visualElement.getProps();
3681    this.visualElement.current.style.transform = o ? o({}, "") : "none", s.root && s.root.updateScroll(), s.updateLayout(), this.resolveConstraints(), tt((r) => {
3682      if (!de(r, e, null))
3683        return;
3684      const a = this.getAxisMotionValue(r), { min: l, max: u } = this.constraints[r];
3685      a.set(N(l, u, i[r]));
3686    });
3687  }
3688  addListeners() {
3689    if (!this.visualElement.current)
3690      return;
3691    au.set(this.visualElement, this);
3692    const e = this.visualElement.current, n = Xt(e, "pointerdown", (l) => {
3693      const { drag: u, dragListener: c = !0 } = this.getProps();
3694      u && c && this.start(l);
3695    }), s = () => {
3696      const { dragConstraints: l } = this.getProps();
3697      kt(l) && l.current && (this.constraints = this.resolveRefConstraints());
3698    }, { projection: i } = this.visualElement, o = i.addEventListener("measure", s);
3699    i && !i.layout && (i.root && i.root.updateScroll(), i.updateLayout()), R.read(s);
3700    const r = ne(window, "resize", () => this.scalePositionWithinConstraints()), a = i.addEventListener("didUpdate", (({ delta: l, hasLayoutChanged: u }) => {
3701      this.isDragging && u && (tt((c) => {
3702        const h = this.getAxisMotionValue(c);
3703        h && (this.originPoint[c] += l[c].translate, h.set(h.get() + l[c].translate));
3704      }), this.visualElement.render());
3705    }));
3706    return () => {
3707      r(), n(), o(), a && a();
3708    };
3709  }
3710  getProps() {
3711    const e = this.visualElement.getProps(), { drag: n = !1, dragDirectionLock: s = !1, dragPropagation: i = !1, dragConstraints: o = !1, dragElastic: r = mn, dragMomentum: a = !0 } = e;
3712    return {
3713      ...e,
3714      drag: n,
3715      dragDirectionLock: s,
3716      dragPropagation: i,
3717      dragConstraints: o,
3718      dragElastic: r,
3719      dragMomentum: a
3720    };
3721  }
3722}
3723function de(t, e, n) {
3724  return (e === !0 || e === t) && (n === null || n === t);
3725}
3726function cu(t, e = 10) {
3727  let n = null;
3728  return Math.abs(t.y) > e ? n = "y" : Math.abs(t.x) > e && (n = "x"), n;
3729}
3730class uu extends yt {
3731  constructor(e) {
3732    super(e), this.removeGroupControls = nt, this.removeListeners = nt, this.controls = new lu(e);
3733  }
3734  mount() {
3735    const { dragControls: e } = this.node.getProps();
3736    e && (this.removeGroupControls = e.subscribe(this.controls)), this.removeListeners = this.controls.addListeners() || nt;
3737  }
3738  unmount() {
3739    this.removeGroupControls(), this.removeListeners();
3740  }
3741}
3742const Hs = (t) => (e, n) => {
3743  t && R.postRender(() => t(e, n));
3744};
3745class hu extends yt {
3746  constructor() {
3747    super(...arguments), this.removePointerDownListener = nt;
3748  }
3749  onPointerDown(e) {
3750    this.session = new Yr(e, this.createPanHandlers(), {
3751      transformPagePoint: this.node.getTransformPagePoint(),
3752      contextWindow: Xr(this.node)
3753    });
3754  }
3755  createPanHandlers() {
3756    const { onPanSessionStart: e, onPanStart: n, onPan: s, onPanEnd: i } = this.node.getProps();
3757    return {
3758      onSessionStart: Hs(e),
3759      onStart: Hs(n),
3760      onMove: s,
3761      onEnd: (o, r) => {
3762        delete this.session, i && R.postRender(() => i(o, r));
3763      }
3764    };
3765  }
3766  mount() {
3767    this.removePointerDownListener = Xt(this.node.current, "pointerdown", (e) => this.onPointerDown(e));
3768  }
3769  update() {
3770    this.session && this.session.updateHandlers(this.createPanHandlers());
3771  }
3772  unmount() {
3773    this.removePointerDownListener(), this.session && this.session.end();
3774  }
3775}
3776const ge = {
3777  /**
3778   * Global flag as to whether the tree has animated since the last time
3779   * we resized the window
3780   */
3781  hasAnimatedSinceResize: !0,
3782  /**
3783   * We set this to true once, on the first update. Any nodes added to the tree beyond that
3784   * update will be given a `data-projection-id` attribute.
3785   */
3786  hasEverUpdated: !1
3787};
3788function Ks(t, e) {
3789  return e.max === e.min ? 0 : t / (e.max - e.min) * 100;
3790}
3791const zt = {
3792  correct: (t, e) => {
3793    if (!e.target)
3794      return t;
3795    if (typeof t == "string")
3796      if (P.test(t))
3797        t = parseFloat(t);
3798      else
3799        return t;
3800    const n = Ks(t, e.target.x), s = Ks(t, e.target.y);
3801    return `${n}% ${s}%`;
3802  }
3803}, du = {
3804  correct: (t, { treeScale: e, projectionDelta: n }) => {
3805    const s = t, i = gt.parse(t);
3806    if (i.length > 5)
3807      return s;
3808    const o = gt.createTransformer(t), r = typeof i[0] != "number" ? 1 : 0, a = n.x.scale * e.x, l = n.y.scale * e.y;
3809    i[0 + r] /= a, i[1 + r] /= l;
3810    const u = N(a, l, 0.5);
3811    return typeof i[2 + r] == "number" && (i[2 + r] /= u), typeof i[3 + r] == "number" && (i[3 + r] /= u), o(i);
3812  }
3813};
3814let Ue = !1;
3815class fu extends Ci {
3816  /**
3817   * This only mounts projection nodes for components that
vendor: 6,376 bytes, lines 3818-4004
3818   * need measuring, we might want to do it for all components
3819   * in order to incorporate transforms
3820   */
3821  componentDidMount() {
3822    const { visualElement: e, layoutGroup: n, switchLayoutGroup: s, layoutId: i } = this.props, { projection: o } = e;
3823    Il(mu), o && (n.group && n.group.add(o), s && s.register && i && s.register(o), Ue && o.root.didUpdate(), o.addEventListener("animationComplete", () => {
3824      this.safeToRemove();
3825    }), o.setOptions({
3826      ...o.options,
3827      onExitComplete: () => this.safeToRemove()
3828    })), ge.hasEverUpdated = !0;
3829  }
3830  getSnapshotBeforeUpdate(e) {
3831    const { layoutDependency: n, visualElement: s, drag: i, isPresent: o } = this.props, { projection: r } = s;
3832    return r && (r.isPresent = o, Ue = !0, i || e.layoutDependency !== n || n === void 0 || e.isPresent !== o ? r.willUpdate() : this.safeToRemove(), e.isPresent !== o && (o ? r.promote() : r.relegate() || R.postRender(() => {
3833      const a = r.getStack();
3834      (!a || !a.members.length) && this.safeToRemove();
3835    }))), null;
3836  }
3837  componentDidUpdate() {
3838    const { projection: e } = this.props.visualElement;
3839    e && (e.root.didUpdate(), _n.postRender(() => {
3840      !e.currentAnimation && e.isLead() && this.safeToRemove();
3841    }));
3842  }
3843  componentWillUnmount() {
3844    const { visualElement: e, layoutGroup: n, switchLayoutGroup: s } = this.props, { projection: i } = e;
3845    Ue = !0, i && (i.scheduleCheckAfterUnmount(), n && n.group && n.group.remove(i), s && s.deregister && s.deregister(i));
3846  }
3847  safeToRemove() {
3848    const { safeToRemove: e } = this.props;
3849    e && e();
3850  }
3851  render() {
3852    return null;
3853  }
3854}
3855function Zr(t) {
3856  const [e, n] = vr(), s = z(bn);
3857  return f(fu, { ...t, layoutGroup: s, switchLayoutGroup: z(Dr), isPresent: e, safeToRemove: n });
3858}
3859const mu = {
3860  borderRadius: {
3861    ...zt,
3862    applyTo: [
3863      "borderTopLeftRadius",
3864      "borderTopRightRadius",
3865      "borderBottomLeftRadius",
3866      "borderBottomRightRadius"
3867    ]
3868  },
3869  borderTopLeftRadius: zt,
3870  borderTopRightRadius: zt,
3871  borderBottomLeftRadius: zt,
3872  borderBottomRightRadius: zt,
3873  boxShadow: du
3874};
3875function pu(t, e, n) {
3876  const s = H(t) ? t : Lt(t);
3877  return s.start(Qn("", s, e, n)), s.animation;
3878}
3879const gu = (t, e) => t.depth - e.depth;
3880class yu {
3881  constructor() {
3882    this.children = [], this.isDirty = !1;
3883  }
3884  add(e) {
3885    Sn(this.children, e), this.isDirty = !0;
3886  }
3887  remove(e) {
3888    Pn(this.children, e), this.isDirty = !0;
3889  }
3890  forEach(e) {
3891    this.isDirty && this.children.sort(gu), this.isDirty = !1, this.children.forEach(e);
3892  }
3893}
3894function xu(t, e) {
3895  const n = X.now(), s = ({ timestamp: i }) => {
3896    const o = i - n;
3897    o >= e && (pt(s), t(o - e));
3898  };
3899  return R.setup(s, !0), () => pt(s);
3900}
3901const Jr = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], vu = Jr.length, Gs = (t) => typeof t == "string" ? parseFloat(t) : t, Xs = (t) => typeof t == "number" || P.test(t);
3902function bu(t, e, n, s, i, o) {
3903  i ? (t.opacity = N(0, n.opacity ?? 1, wu(s)), t.opacityExit = N(e.opacity ?? 1, 0, Tu(s))) : o && (t.opacity = N(e.opacity ?? 1, n.opacity ?? 1, s));
3904  for (let r = 0; r < vu; r++) {
3905    const a = `border${Jr[r]}Radius`;
3906    let l = Ys(e, a), u = Ys(n, a);
3907    if (l === void 0 && u === void 0)
3908      continue;
3909    l || (l = 0), u || (u = 0), l === 0 || u === 0 || Xs(l) === Xs(u) ? (t[a] = Math.max(N(Gs(l), Gs(u), s), 0), (at.test(u) || at.test(l)) && (t[a] += "%")) : t[a] = u;
3910  }
3911  (e.rotate || n.rotate) && (t.rotate = N(e.rotate || 0, n.rotate || 0, s));
3912}
3913function Ys(t, e) {
3914  return t[e] !== void 0 ? t[e] : t.borderRadius;
3915}
3916const wu = /* @__PURE__ */ Qr(0, 0.5, ji), Tu = /* @__PURE__ */ Qr(0.5, 0.95, nt);
3917function Qr(t, e, n) {
3918  return (s) => s < t ? 0 : s > e ? 1 : n(/* @__PURE__ */ Zt(t, e, s));
3919}
3920function qs(t, e) {
3921  t.min = e.min, t.max = e.max;
3922}
3923function Q(t, e) {
3924  qs(t.x, e.x), qs(t.y, e.y);
3925}
3926function Zs(t, e) {
3927  t.translate = e.translate, t.scale = e.scale, t.originPoint = e.originPoint, t.origin = e.origin;
3928}
3929function Js(t, e, n, s, i) {
3930  return t -= e, t = Te(t, 1 / n, s), i !== void 0 && (t = Te(t, 1 / i, s)), t;
3931}
3932function Su(t, e = 0, n = 1, s = 0.5, i, o = t, r = t) {
3933  if (at.test(e) && (e = parseFloat(e), e = N(r.min, r.max, e / 100) - r.min), typeof e != "number")
3934    return;
3935  let a = N(o.min, o.max, s);
3936  t === o && (a -= e), t.min = Js(t.min, e, n, a, i), t.max = Js(t.max, e, n, a, i);
3937}
3938function Qs(t, e, [n, s, i], o, r) {
3939  Su(t, e[n], e[s], e[i], e.scale, o, r);
3940}
3941const Pu = ["x", "scaleX", "originX"], Cu = ["y", "scaleY", "originY"];
3942function ti(t, e, n, s) {
3943  Qs(t.x, e, Pu, n ? n.x : void 0, s ? s.x : void 0), Qs(t.y, e, Cu, n ? n.y : void 0, s ? s.y : void 0);
3944}
3945function ei(t) {
3946  return t.translate === 0 && t.scale === 1;
3947}
3948function to(t) {
3949  return ei(t.x) && ei(t.y);
3950}
3951function ni(t, e) {
3952  return t.min === e.min && t.max === e.max;
3953}
3954function Mu(t, e) {
3955  return ni(t.x, e.x) && ni(t.y, e.y);
3956}
3957function si(t, e) {
3958  return Math.round(t.min) === Math.round(e.min) && Math.round(t.max) === Math.round(e.max);
3959}
3960function eo(t, e) {
3961  return si(t.x, e.x) && si(t.y, e.y);
3962}
3963function ii(t) {
3964  return K(t.x) / K(t.y);
3965}
3966function ri(t, e) {
3967  return t.translate === e.translate && t.scale === e.scale && t.originPoint === e.originPoint;
3968}
3969class Au {
3970  constructor() {
3971    this.members = [];
3972  }
3973  add(e) {
3974    Sn(this.members, e), e.scheduleRender();
3975  }
3976  remove(e) {
3977    if (Pn(this.members, e), e === this.prevLead && (this.prevLead = void 0), e === this.lead) {
3978      const n = this.members[this.members.length - 1];
3979      n && this.promote(n);
3980    }
3981  }
3982  relegate(e) {
3983    const n = this.members.findIndex((i) => e === i);
3984    if (n === 0)
3985      return !1;
3986    let s;
3987    for (let i = n; i >= 0; i--) {
3988      const o = this.members[i];
3989      if (o.isPresent !== !1) {
3990        s = o;
3991        break;
3992      }
3993    }
3994    return s ? (this.promote(s), !0) : !1;
3995  }
3996  promote(e, n) {
3997    const s = this.lead;
3998    if (e !== s && (this.prevLead = s, this.lead = e, e.show(), s)) {
3999      s.instance && s.scheduleRender(), e.scheduleRender(), e.resumeFrom = s, n && (e.resumeFrom.preserveOpacity = !0), s.snapshot && (e.snapshot = s.snapshot, e.snapshot.latestValues = s.animationValues || s.latestValues), e.root && e.root.isUpdating && (e.isLayoutDirty = !0);
4000      const { crossfade: i } = e.options;
4001      i === !1 && s.hide();
4002    }
4003  }
4004  exitAnimationComplete() {
vendor: 11,266 bytes, lines 4005-4231
4005    this.members.forEach((e) => {
4006      const { options: n, resumingFrom: s } = e;
4007      n.onExitComplete && n.onExitComplete(), s && s.options.onExitComplete && s.options.onExitComplete();
4008    });
4009  }
4010  scheduleRender() {
4011    this.members.forEach((e) => {
4012      e.instance && e.scheduleRender(!1);
4013    });
4014  }
4015  /**
4016   * Clear any leads that have been removed this render to prevent them from being
4017   * used in future animations and to prevent memory leaks
4018   */
4019  removeLeadSnapshot() {
4020    this.lead && this.lead.snapshot && (this.lead.snapshot = void 0);
4021  }
4022}
4023function ku(t, e, n) {
4024  let s = "";
4025  const i = t.x.translate / e.x, o = t.y.translate / e.y, r = n?.z || 0;
4026  if ((i || o || r) && (s = `translate3d(${i}px, ${o}px, ${r}px) `), (e.x !== 1 || e.y !== 1) && (s += `scale(${1 / e.x}, ${1 / e.y}) `), n) {
4027    const { transformPerspective: u, rotate: c, rotateX: h, rotateY: d, skewX: m, skewY: p } = n;
4028    u && (s = `perspective(${u}px) ${s}`), c && (s += `rotate(${c}deg) `), h && (s += `rotateX(${h}deg) `), d && (s += `rotateY(${d}deg) `), m && (s += `skewX(${m}deg) `), p && (s += `skewY(${p}deg) `);
4029  }
4030  const a = t.x.scale * e.x, l = t.y.scale * e.y;
4031  return (a !== 1 || l !== 1) && (s += `scale(${a}, ${l})`), s || "none";
4032}
4033const _e = ["", "X", "Y", "Z"], Vu = 1e3;
4034let Eu = 0;
4035function We(t, e, n, s) {
4036  const { latestValues: i } = e;
4037  i[t] && (n[t] = i[t], e.setStaticValue(t, 0), s && (s[t] = 0));
4038}
4039function no(t) {
4040  if (t.hasCheckedOptimisedAppear = !0, t.root === t)
4041    return;
4042  const { visualElement: e } = t.options;
4043  if (!e)
4044    return;
4045  const n = Ur(e);
4046  if (window.MotionHasOptimisedAnimation(n, "transform")) {
4047    const { layout: i, layoutId: o } = t.options;
4048    window.MotionCancelOptimisedAnimation(n, "transform", R, !(i || o));
4049  }
4050  const { parent: s } = t;
4051  s && !s.hasCheckedOptimisedAppear && no(s);
4052}
4053function so({ attachResizeListener: t, defaultParent: e, measureScroll: n, checkIsScrollRoot: s, resetTransform: i }) {
4054  return class {
4055    constructor(r = {}, a = e?.()) {
4056      this.id = Eu++, this.animationId = 0, this.animationCommitId = 0, this.children = /* @__PURE__ */ new Set(), this.options = {}, this.isTreeAnimating = !1, this.isAnimationBlocked = !1, this.isLayoutDirty = !1, this.isProjectionDirty = !1, this.isSharedProjectionDirty = !1, this.isTransformDirty = !1, this.updateManuallyBlocked = !1, this.updateBlockedByResize = !1, this.isUpdating = !1, this.isSVG = !1, this.needsReset = !1, this.shouldResetTransform = !1, this.hasCheckedOptimisedAppear = !1, this.treeScale = { x: 1, y: 1 }, this.eventHandlers = /* @__PURE__ */ new Map(), this.hasTreeAnimated = !1, this.updateScheduled = !1, this.scheduleUpdate = () => this.update(), this.projectionUpdateScheduled = !1, this.checkUpdateFailed = () => {
4057        this.isUpdating && (this.isUpdating = !1, this.clearAllSnapshots());
4058      }, this.updateProjection = () => {
4059        this.projectionUpdateScheduled = !1, this.nodes.forEach(Nu), this.nodes.forEach(Bu), this.nodes.forEach(Ou), this.nodes.forEach(Lu);
4060      }, this.resolvedRelativeTargetAt = 0, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.latestValues = r, this.root = a ? a.root || a : this, this.path = a ? [...a.path, a] : [], this.parent = a, this.depth = a ? a.depth + 1 : 0;
4061      for (let l = 0; l < this.path.length; l++)
4062        this.path[l].shouldResetTransform = !0;
4063      this.root === this && (this.nodes = new yu());
4064    }
4065    addEventListener(r, a) {
4066      return this.eventHandlers.has(r) || this.eventHandlers.set(r, new An()), this.eventHandlers.get(r).add(a);
4067    }
4068    notifyListeners(r, ...a) {
4069      const l = this.eventHandlers.get(r);
4070      l && l.notify(...a);
4071    }
4072    hasListeners(r) {
4073      return this.eventHandlers.has(r);
4074    }
4075    /**
4076     * Lifecycles
4077     */
4078    mount(r) {
4079      if (this.instance)
4080        return;
4081      this.isSVG = xr(r) && !bl(r), this.instance = r;
4082      const { layoutId: a, layout: l, visualElement: u } = this.options;
4083      if (u && !u.current && u.mount(r), this.root.nodes.add(this), this.parent && this.parent.children.add(this), this.root.hasTreeAnimated && (l || a) && (this.isLayoutDirty = !0), t) {
4084        let c, h = 0;
4085        const d = () => this.root.updateBlockedByResize = !1;
4086        R.read(() => {
4087          h = window.innerWidth;
4088        }), t(r, () => {
4089          const m = window.innerWidth;
4090          m !== h && (h = m, this.root.updateBlockedByResize = !0, c && c(), c = xu(d, 250), ge.hasAnimatedSinceResize && (ge.hasAnimatedSinceResize = !1, this.nodes.forEach(li)));
4091        });
4092      }
4093      a && this.root.registerSharedNode(a, this), this.options.animate !== !1 && u && (a || l) && this.addEventListener("didUpdate", ({ delta: c, hasLayoutChanged: h, hasRelativeLayoutChanged: d, layout: m }) => {
4094        if (this.isTreeAnimationBlocked()) {
4095          this.target = void 0, this.relativeTarget = void 0;
4096          return;
4097        }
4098        const p = this.options.transition || u.getDefaultTransition() || Wu, { onLayoutAnimationStart: g, onLayoutAnimationComplete: b } = u.getProps(), y = !this.targetLayout || !eo(this.targetLayout, m), x = !h && d;
4099        if (this.options.layoutRoot || this.resumeFrom || x || h && (y || !this.currentAnimation)) {
4100          this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0);
4101          const v = {
4102            ...$n(p, "layout"),
4103            onPlay: g,
4104            onComplete: b
4105          };
4106          (u.shouldReduceMotion || this.options.layoutRoot) && (v.delay = 0, v.type = !1), this.startAnimation(v), this.setAnimationOrigin(c, x);
4107        } else
4108          h || li(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
4109        this.targetLayout = m;
4110      });
4111    }
4112    unmount() {
4113      this.options.layoutId && this.willUpdate(), this.root.nodes.remove(this);
4114      const r = this.getStack();
4115      r && r.remove(this), this.parent && this.parent.children.delete(this), this.instance = void 0, this.eventHandlers.clear(), pt(this.updateProjection);
4116    }
4117    // only on the root
4118    blockUpdate() {
4119      this.updateManuallyBlocked = !0;
4120    }
4121    unblockUpdate() {
4122      this.updateManuallyBlocked = !1;
4123    }
4124    isUpdateBlocked() {
4125      return this.updateManuallyBlocked || this.updateBlockedByResize;
4126    }
4127    isTreeAnimationBlocked() {
4128      return this.isAnimationBlocked || this.parent && this.parent.isTreeAnimationBlocked() || !1;
4129    }
4130    // Note: currently only running on root node
4131    startUpdate() {
4132      this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(ju), this.animationId++);
4133    }
4134    getTransformTemplate() {
4135      const { visualElement: r } = this.options;
4136      return r && r.getProps().transformTemplate;
4137    }
4138    willUpdate(r = !0) {
4139      if (this.root.hasTreeAnimated = !0, this.root.isUpdateBlocked()) {
4140        this.options.onExitComplete && this.options.onExitComplete();
4141        return;
4142      }
4143      if (window.MotionCancelOptimisedAnimation && !this.hasCheckedOptimisedAppear && no(this), !this.root.isUpdating && this.root.startUpdate(), this.isLayoutDirty)
4144        return;
4145      this.isLayoutDirty = !0;
4146      for (let c = 0; c < this.path.length; c++) {
4147        const h = this.path[c];
4148        h.shouldResetTransform = !0, h.updateScroll("snapshot"), h.options.layoutRoot && h.willUpdate(!1);
4149      }
4150      const { layoutId: a, layout: l } = this.options;
4151      if (a === void 0 && !l)
4152        return;
4153      const u = this.getTransformTemplate();
4154      this.prevTransformTemplateValue = u ? u(this.latestValues, "") : void 0, this.updateSnapshot(), r && this.notifyListeners("willUpdate");
4155    }
4156    update() {
4157      if (this.updateScheduled = !1, this.isUpdateBlocked()) {
4158        this.unblockUpdate(), this.clearAllSnapshots(), this.nodes.forEach(oi);
4159        return;
4160      }
4161      if (this.animationId <= this.animationCommitId) {
4162        this.nodes.forEach(ai);
4163        return;
4164      }
4165      this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(Fu), this.nodes.forEach(Du), this.nodes.forEach(Ru)) : this.nodes.forEach(ai), this.clearAllSnapshots();
4166      const a = X.now();
4167      _.delta = lt(0, 1e3 / 60, a - _.timestamp), _.timestamp = a, _.isProcessing = !0, De.update.process(_), De.preRender.process(_), De.render.process(_), _.isProcessing = !1;
4168    }
4169    didUpdate() {
4170      this.updateScheduled || (this.updateScheduled = !0, _n.read(this.scheduleUpdate));
4171    }
4172    clearAllSnapshots() {
4173      this.nodes.forEach(Iu), this.sharedNodes.forEach($u);
4174    }
4175    scheduleUpdateProjection() {
4176      this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0, R.preRender(this.updateProjection, !1, !0));
4177    }
4178    scheduleCheckAfterUnmount() {
4179      R.postRender(() => {
4180        this.isLayoutDirty ? this.root.didUpdate() : this.root.checkUpdateFailed();
4181      });
4182    }
4183    /**
4184     * Update measurements
4185     */
4186    updateSnapshot() {
4187      this.snapshot || !this.instance || (this.snapshot = this.measure(), this.snapshot && !K(this.snapshot.measuredBox.x) && !K(this.snapshot.measuredBox.y) && (this.snapshot = void 0));
4188    }
4189    updateLayout() {
4190      if (!this.instance || (this.updateScroll(), !(this.options.alwaysMeasureLayout && this.isLead()) && !this.isLayoutDirty))
4191        return;
4192      if (this.resumeFrom && !this.resumeFrom.instance)
4193        for (let l = 0; l < this.path.length; l++)
4194          this.path[l].updateScroll();
4195      const r = this.layout;
4196      this.layout = this.measure(!1), this.layoutCorrected = F(), this.isLayoutDirty = !1, this.projectionDelta = void 0, this.notifyListeners("measure", this.layout.layoutBox);
4197      const { visualElement: a } = this.options;
4198      a && a.notify("LayoutMeasure", this.layout.layoutBox, r ? r.layoutBox : void 0);
4199    }
4200    updateScroll(r = "measure") {
4201      let a = !!(this.options.layoutScroll && this.instance);
4202      if (this.scroll && this.scroll.animationId === this.root.animationId && this.scroll.phase === r && (a = !1), a && this.instance) {
4203        const l = s(this.instance);
4204        this.scroll = {
4205          animationId: this.root.animationId,
4206          phase: r,
4207          isRoot: l,
4208          offset: n(this.instance),
4209          wasRoot: this.scroll ? this.scroll.isRoot : l
4210        };
4211      }
4212    }
4213    resetTransform() {
4214      if (!i)
4215        return;
4216      const r = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, a = this.projectionDelta && !to(this.projectionDelta), l = this.getTransformTemplate(), u = l ? l(this.latestValues, "") : void 0, c = u !== this.prevTransformTemplateValue;
4217      r && this.instance && (a || bt(this.latestValues) || c) && (i(this.instance, u), this.shouldResetTransform = !1, this.scheduleRender());
4218    }
4219    measure(r = !0) {
4220      const a = this.measurePageBox();
4221      let l = this.removeElementScroll(a);
4222      return r && (l = this.removeTransform(l)), zu(l), {
4223        animationId: this.root.animationId,
4224        measuredBox: a,
4225        layoutBox: l,
4226        latestValues: {},
4227        source: this.id
4228      };
4229    }
4230    measurePageBox() {
4231      const { visualElement: r }
vendor: 6,801 bytes, lines 4231-4343
4231 = this.options;
4232      if (!r)
4233        return F();
4234      const a = r.measureViewportBox();
4235      if (!(this.scroll?.wasRoot || this.path.some(Hu))) {
4236        const { scroll: u } = this.root;
4237        u && (Vt(a.x, u.offset.x), Vt(a.y, u.offset.y));
4238      }
4239      return a;
4240    }
4241    removeElementScroll(r) {
4242      const a = F();
4243      if (Q(a, r), this.scroll?.wasRoot)
4244        return a;
4245      for (let l = 0; l < this.path.length; l++) {
4246        const u = this.path[l], { scroll: c, options: h } = u;
4247        u !== this.root && c && h.layoutScroll && (c.wasRoot && Q(a, r), Vt(a.x, c.offset.x), Vt(a.y, c.offset.y));
4248      }
4249      return a;
4250    }
4251    applyTransform(r, a = !1) {
4252      const l = F();
4253      Q(l, r);
4254      for (let u = 0; u < this.path.length; u++) {
4255        const c = this.path[u];
4256        !a && c.options.layoutScroll && c.scroll && c !== c.root && Et(l, {
4257          x: -c.scroll.offset.x,
4258          y: -c.scroll.offset.y
4259        }), bt(c.latestValues) && Et(l, c.latestValues);
4260      }
4261      return bt(this.latestValues) && Et(l, this.latestValues), l;
4262    }
4263    removeTransform(r) {
4264      const a = F();
4265      Q(a, r);
4266      for (let l = 0; l < this.path.length; l++) {
4267        const u = this.path[l];
4268        if (!u.instance || !bt(u.latestValues))
4269          continue;
4270        ln(u.latestValues) && u.updateSnapshot();
4271        const c = F(), h = u.measurePageBox();
4272        Q(c, h), ti(a, u.latestValues, u.snapshot ? u.snapshot.layoutBox : void 0, c);
4273      }
4274      return bt(this.latestValues) && ti(a, this.latestValues), a;
4275    }
4276    setTargetDelta(r) {
4277      this.targetDelta = r, this.root.scheduleUpdateProjection(), this.isProjectionDirty = !0;
4278    }
4279    setOptions(r) {
4280      this.options = {
4281        ...this.options,
4282        ...r,
4283        crossfade: r.crossfade !== void 0 ? r.crossfade : !0
4284      };
4285    }
4286    clearMeasurements() {
4287      this.scroll = void 0, this.layout = void 0, this.snapshot = void 0, this.prevTransformTemplateValue = void 0, this.targetDelta = void 0, this.target = void 0, this.isLayoutDirty = !1;
4288    }
4289    forceRelativeParentToResolveTarget() {
4290      this.relativeParent && this.relativeParent.resolvedRelativeTargetAt !== _.timestamp && this.relativeParent.resolveTargetDelta(!0);
4291    }
4292    resolveTargetDelta(r = !1) {
4293      const a = this.getLead();
4294      this.isProjectionDirty || (this.isProjectionDirty = a.isProjectionDirty), this.isTransformDirty || (this.isTransformDirty = a.isTransformDirty), this.isSharedProjectionDirty || (this.isSharedProjectionDirty = a.isSharedProjectionDirty);
4295      const l = !!this.resumingFrom || this !== a;
4296      if (!(r || l && this.isSharedProjectionDirty || this.isProjectionDirty || this.parent?.isProjectionDirty || this.attemptToResolveRelativeTarget || this.root.updateBlockedByResize))
4297        return;
4298      const { layout: c, layoutId: h } = this.options;
4299      if (!(!this.layout || !(c || h))) {
4300        if (this.resolvedRelativeTargetAt = _.timestamp, !this.targetDelta && !this.relativeTarget) {
4301          const d = this.getClosestProjectingParent();
4302          d && d.layout && this.animationProgress !== 1 ? (this.relativeParent = d, this.forceRelativeParentToResolveTarget(), this.relativeTarget = F(), this.relativeTargetOrigin = F(), qt(this.relativeTargetOrigin, this.layout.layoutBox, d.layout.layoutBox), Q(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
4303        }
4304        if (!(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = F(), this.targetWithTransforms = F()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), Zc(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.layoutBox) : Q(this.target, this.layout.layoutBox), Ir(this.target, this.targetDelta)) : Q(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget)) {
4305          this.attemptToResolveRelativeTarget = !1;
4306          const d = this.getClosestProjectingParent();
4307          d && !!d.resumingFrom == !!this.resumingFrom && !d.options.layoutScroll && d.target && this.animationProgress !== 1 ? (this.relativeParent = d, this.forceRelativeParentToResolveTarget(), this.relativeTarget = F(), this.relativeTargetOrigin = F(), qt(this.relativeTargetOrigin, this.target, d.target), Q(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
4308        }
4309      }
4310    }
4311    getClosestProjectingParent() {
4312      if (!(!this.parent || ln(this.parent.latestValues) || Lr(this.parent.latestValues)))
4313        return this.parent.isProjecting() ? this.parent : this.parent.getClosestProjectingParent();
4314    }
4315    isProjecting() {
4316      return !!((this.relativeTarget || this.targetDelta || this.options.layoutRoot) && this.layout);
4317    }
4318    calcProjection() {
4319      const r = this.getLead(), a = !!this.resumingFrom || this !== r;
4320      let l = !0;
4321      if ((this.isProjectionDirty || this.parent?.isProjectionDirty) && (l = !1), a && (this.isSharedProjectionDirty || this.isTransformDirty) && (l = !1), this.resolvedRelativeTargetAt === _.timestamp && (l = !1), l)
4322        return;
4323      const { layout: u, layoutId: c } = this.options;
4324      if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(u || c))
4325        return;
4326      Q(this.layoutCorrected, this.layout.layoutBox);
4327      const h = this.treeScale.x, d = this.treeScale.y;
4328      cc(this.layoutCorrected, this.treeScale, this.path, a), r.layout && !r.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (r.target = r.layout.layoutBox, r.targetWithTransforms = F());
4329      const { target: m } = r;
4330      if (!m) {
4331        this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
4332        return;
4333      }
4334      !this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (Zs(this.prevProjectionDelta.x, this.projectionDelta.x), Zs(this.prevProjectionDelta.y, this.projectionDelta.y)), Yt(this.projectionDelta, this.layoutCorrected, m, this.latestValues), (this.treeScale.x !== h || this.treeScale.y !== d || !ri(this.projectionDelta.x, this.prevProjectionDelta.x) || !ri(this.projectionDelta.y, this.prevProjectionDelta.y)) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", m));
4335    }
4336    hide() {
4337      this.isVisible = !1;
4338    }
4339    show() {
4340      this.isVisible = !0;
4341    }
4342    scheduleRender(r = !0) {
4343      if (this.options.visualElement?.scheduleRender(), r) {
vendor: 10,312 bytes, lines 4344-4572
4344        const a = this.getStack();
4345        a && a.scheduleRender();
4346      }
4347      this.resumingFrom && !this.resumingFrom.instance && (this.resumingFrom = void 0);
4348    }
4349    createProjectionDeltas() {
4350      this.prevProjectionDelta = Dt(), this.projectionDelta = Dt(), this.projectionDeltaWithTransform = Dt();
4351    }
4352    setAnimationOrigin(r, a = !1) {
4353      const l = this.snapshot, u = l ? l.latestValues : {}, c = { ...this.latestValues }, h = Dt();
4354      (!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !a;
4355      const d = F(), m = l ? l.source : void 0, p = this.layout ? this.layout.source : void 0, g = m !== p, b = this.getStack(), y = !b || b.members.length <= 1, x = !!(g && !y && this.options.crossfade === !0 && !this.path.some(_u));
4356      this.animationProgress = 0;
4357      let v;
4358      this.mixTargetDelta = (A) => {
4359        const S = A / 1e3;
4360        ci(h.x, r.x, S), ci(h.y, r.y, S), this.setTargetDelta(h), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (qt(d, this.layout.layoutBox, this.relativeParent.layout.layoutBox), Uu(this.relativeTarget, this.relativeTargetOrigin, d, S), v && Mu(this.relativeTarget, v) && (this.isProjectionDirty = !1), v || (v = F()), Q(v, this.relativeTarget)), g && (this.animationValues = c, bu(c, u, this.latestValues, S, x, y)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = S;
4361      }, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
4362    }
4363    startAnimation(r) {
4364      this.notifyListeners("animationStart"), this.currentAnimation?.stop(), this.resumingFrom?.currentAnimation?.stop(), this.pendingAnimation && (pt(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = R.update(() => {
4365        ge.hasAnimatedSinceResize = !0, this.motionValue || (this.motionValue = Lt(0)), this.currentAnimation = pu(this.motionValue, [0, 1e3], {
4366          ...r,
4367          velocity: 0,
4368          isSync: !0,
4369          onUpdate: (a) => {
4370            this.mixTargetDelta(a), r.onUpdate && r.onUpdate(a);
4371          },
4372          onStop: () => {
4373          },
4374          onComplete: () => {
4375            r.onComplete && r.onComplete(), this.completeAnimation();
4376          }
4377        }), this.resumingFrom && (this.resumingFrom.currentAnimation = this.currentAnimation), this.pendingAnimation = void 0;
4378      });
4379    }
4380    completeAnimation() {
4381      this.resumingFrom && (this.resumingFrom.currentAnimation = void 0, this.resumingFrom.preserveOpacity = void 0);
4382      const r = this.getStack();
4383      r && r.exitAnimationComplete(), this.resumingFrom = this.currentAnimation = this.animationValues = void 0, this.notifyListeners("animationComplete");
4384    }
4385    finishAnimation() {
4386      this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(Vu), this.currentAnimation.stop()), this.completeAnimation();
4387    }
4388    applyTransformsToTarget() {
4389      const r = this.getLead();
4390      let { targetWithTransforms: a, target: l, layout: u, latestValues: c } = r;
4391      if (!(!a || !l || !u)) {
4392        if (this !== r && this.layout && u && io(this.options.animationType, this.layout.layoutBox, u.layoutBox)) {
4393          l = this.target || F();
4394          const h = K(this.layout.layoutBox.x);
4395          l.x.min = r.target.x.min, l.x.max = l.x.min + h;
4396          const d = K(this.layout.layoutBox.y);
4397          l.y.min = r.target.y.min, l.y.max = l.y.min + d;
4398        }
4399        Q(a, l), Et(a, c), Yt(this.projectionDeltaWithTransform, this.layoutCorrected, a, c);
4400      }
4401    }
4402    registerSharedNode(r, a) {
4403      this.sharedNodes.has(r) || this.sharedNodes.set(r, new Au()), this.sharedNodes.get(r).add(a);
4404      const u = a.options.initialPromotionConfig;
4405      a.promote({
4406        transition: u ? u.transition : void 0,
4407        preserveFollowOpacity: u && u.shouldPreserveFollowOpacity ? u.shouldPreserveFollowOpacity(a) : void 0
4408      });
4409    }
4410    isLead() {
4411      const r = this.getStack();
4412      return r ? r.lead === this : !0;
4413    }
4414    getLead() {
4415      const { layoutId: r } = this.options;
4416      return r ? this.getStack()?.lead || this : this;
4417    }
4418    getPrevLead() {
4419      const { layoutId: r } = this.options;
4420      return r ? this.getStack()?.prevLead : void 0;
4421    }
4422    getStack() {
4423      const { layoutId: r } = this.options;
4424      if (r)
4425        return this.root.sharedNodes.get(r);
4426    }
4427    promote({ needsReset: r, transition: a, preserveFollowOpacity: l } = {}) {
4428      const u = this.getStack();
4429      u && u.promote(this, l), r && (this.projectionDelta = void 0, this.needsReset = !0), a && this.setOptions({ transition: a });
4430    }
4431    relegate() {
4432      const r = this.getStack();
4433      return r ? r.relegate(this) : !1;
4434    }
4435    resetSkewAndRotation() {
4436      const { visualElement: r } = this.options;
4437      if (!r)
4438        return;
4439      let a = !1;
4440      const { latestValues: l } = r;
4441      if ((l.z || l.rotate || l.rotateX || l.rotateY || l.rotateZ || l.skewX || l.skewY) && (a = !0), !a)
4442        return;
4443      const u = {};
4444      l.z && We("z", r, u, this.animationValues);
4445      for (let c = 0; c < _e.length; c++)
4446        We(`rotate${_e[c]}`, r, u, this.animationValues), We(`skew${_e[c]}`, r, u, this.animationValues);
4447      r.render();
4448      for (const c in u)
4449        r.setStaticValue(c, u[c]), this.animationValues && (this.animationValues[c] = u[c]);
4450      r.scheduleRender();
4451    }
4452    applyProjectionStyles(r, a) {
4453      if (!this.instance || this.isSVG)
4454        return;
4455      if (!this.isVisible) {
4456        r.visibility = "hidden";
4457        return;
4458      }
4459      const l = this.getTransformTemplate();
4460      if (this.needsReset) {
4461        this.needsReset = !1, r.visibility = "", r.opacity = "", r.pointerEvents = pe(a?.pointerEvents) || "", r.transform = l ? l(this.latestValues, "") : "none";
4462        return;
4463      }
4464      const u = this.getLead();
4465      if (!this.projectionDelta || !this.layout || !u.target) {
4466        this.options.layoutId && (r.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, r.pointerEvents = pe(a?.pointerEvents) || ""), this.hasProjected && !bt(this.latestValues) && (r.transform = l ? l({}, "") : "none", this.hasProjected = !1);
4467        return;
4468      }
4469      r.visibility = "";
4470      const c = u.animationValues || u.latestValues;
4471      this.applyTransformsToTarget();
4472      let h = ku(this.projectionDeltaWithTransform, this.treeScale, c);
4473      l && (h = l(c, h)), r.transform = h;
4474      const { x: d, y: m } = this.projectionDelta;
4475      r.transformOrigin = `${d.origin * 100}% ${m.origin * 100}% 0`, u.animationValues ? r.opacity = u === this ? c.opacity ?? this.latestValues.opacity ?? 1 : this.preserveOpacity ? this.latestValues.opacity : c.opacityExit : r.opacity = u === this ? c.opacity !== void 0 ? c.opacity : "" : c.opacityExit !== void 0 ? c.opacityExit : 0;
4476      for (const p in ee) {
4477        if (c[p] === void 0)
4478          continue;
4479        const { correct: g, applyTo: b, isCSSVariable: y } = ee[p], x = h === "none" ? c[p] : g(c[p], u);
4480        if (b) {
4481          const v = b.length;
4482          for (let A = 0; A < v; A++)
4483            r[b[A]] = x;
4484        } else
4485          y ? this.options.visualElement.renderState.vars[p] = x : r[p] = x;
4486      }
4487      this.options.layoutId && (r.pointerEvents = u === this ? pe(a?.pointerEvents) || "" : "none");
4488    }
4489    clearSnapshot() {
4490      this.resumeFrom = this.snapshot = void 0;
4491    }
4492    // Only run on root
4493    resetTree() {
4494      this.root.nodes.forEach((r) => r.currentAnimation?.stop()), this.root.nodes.forEach(oi), this.root.sharedNodes.clear();
4495    }
4496  };
4497}
4498function Du(t) {
4499  t.updateLayout();
4500}
4501function Ru(t) {
4502  const e = t.resumeFrom?.snapshot || t.snapshot;
4503  if (t.isLead() && t.layout && e && t.hasListeners("didUpdate")) {
4504    const { layoutBox: n, measuredBox: s } = t.layout, { animationType: i } = t.options, o = e.source !== t.layout.source;
4505    i === "size" ? tt((c) => {
4506      const h = o ? e.measuredBox[c] : e.layoutBox[c], d = K(h);
4507      h.min = n[c].min, h.max = h.min + d;
4508    }) : io(i, e.layoutBox, n) && tt((c) => {
4509      const h = o ? e.measuredBox[c] : e.layoutBox[c], d = K(n[c]);
4510      h.max = h.min + d, t.relativeTarget && !t.currentAnimation && (t.isProjectionDirty = !0, t.relativeTarget[c].max = t.relativeTarget[c].min + d);
4511    });
4512    const r = Dt();
4513    Yt(r, n, e.layoutBox);
4514    const a = Dt();
4515    o ? Yt(a, t.applyTransform(s, !0), e.measuredBox) : Yt(a, n, e.layoutBox);
4516    const l = !to(r);
4517    let u = !1;
4518    if (!t.resumeFrom) {
4519      const c = t.getClosestProjectingParent();
4520      if (c && !c.resumeFrom) {
4521        const { snapshot: h, layout: d } = c;
4522        if (h && d) {
4523          const m = F();
4524          qt(m, e.layoutBox, h.layoutBox);
4525          const p = F();
4526          qt(p, n, d.layoutBox), eo(m, p) || (u = !0), c.options.layoutRoot && (t.relativeTarget = p, t.relativeTargetOrigin = m, t.relativeParent = c);
4527        }
4528      }
4529    }
4530    t.notifyListeners("didUpdate", {
4531      layout: n,
4532      snapshot: e,
4533      delta: a,
4534      layoutDelta: r,
4535      hasLayoutChanged: l,
4536      hasRelativeLayoutChanged: u
4537    });
4538  } else if (t.isLead()) {
4539    const { onExitComplete: n } = t.options;
4540    n && n();
4541  }
4542  t.options.transition = void 0;
4543}
4544function Nu(t) {
4545  t.parent && (t.isProjecting() || (t.isProjectionDirty = t.parent.isProjectionDirty), t.isSharedProjectionDirty || (t.isSharedProjectionDirty = !!(t.isProjectionDirty || t.parent.isProjectionDirty || t.parent.isSharedProjectionDirty)), t.isTransformDirty || (t.isTransformDirty = t.parent.isTransformDirty));
4546}
4547function Lu(t) {
4548  t.isProjectionDirty = t.isSharedProjectionDirty = t.isTransformDirty = !1;
4549}
4550function Iu(t) {
4551  t.clearSnapshot();
4552}
4553function oi(t) {
4554  t.clearMeasurements();
4555}
4556function ai(t) {
4557  t.isLayoutDirty = !1;
4558}
4559function Fu(t) {
4560  const { visualElement: e } = t.options;
4561  e && e.getProps().onBeforeLayoutMeasure && e.notify("BeforeLayoutMeasure"), t.resetTransform();
4562}
4563function li(t) {
4564  t.finishAnimation(), t.targetDelta = t.relativeTarget = t.target = void 0, t.isProjectionDirty = !0;
4565}
4566function Bu(t) {
4567  t.resolveTargetDelta();
4568}
4569function Ou(t) {
4570  t.calcProjection();
4571}
4572function ju(t) {
4573  t.resetSkewAndRotation();
4574}
4575function $u(t) {
4576  t.removeLeadSnapshot();
4577}
4578function ci(t, e, n) {
4579  t.translate = N(e.translate, 0, n), t.scale = N(e.scale, 1, n), t.origin = e.origin, t.originPoint = e.originPoint;
4580}
4581function ui(t, e, n, s) {
4582  t.min = N(e.min, n.min, s), t.max = N(e.max, n.max, s);
4583}
4584function Uu(t, e, n, s) {
4585  ui(t.x, e.x, n.x, s), ui(t.y, e.y, n.y, s);
4586}
4587function _u(t) {
4588  return t.animationValues && t.animationValues.opacityExit !== void 0;
4589}
4590const Wu = {
4591  duration: 0.45,
4592  ease: [0.4, 0, 0.1, 1]
4593}, hi = (t) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(t), di = hi("applewebkit/") && !hi("chrome/") ? Math.round : nt;
4594function fi(t) {
4595  t.min = di(t.min), t.max = di(t.max);
4596}
4597function zu(t) {
4598  fi(t.x), fi(t.y);
4599}
4600function io(t, e, n) {
4601  return t === "position" || t === "preserve-aspect" && !qc(ii(e), ii(n), 0.2);
4602}
4603function Hu(t) {
4604  return t !== t.root && t.scroll?.wasRoot;
4605}
4606const Ku = so({
4607  attachResizeListener: (t, e) => ne(t, "resize", e),
4608  measureScroll: () => ({
4609    x: document.documentElement.scrollLeft || document.body.scrollLeft,
4610    y: document.documentElement.scrollTop || document.body.scrollTop
4611  }),
4612  checkIsScrollRoot: () => !0
4613}), ze = {
4614  current: void 0
4615}, ro = so({
4616  measureScroll: (t) => ({
4617    x: t.scrollLeft,
4618    y: t.scrollTop
4619  }),
4620  defaultParent: () => {
4621    if (!ze.current) {
4622      const t = new Ku({});
4623      t.mount(window), t.setOptions({ layoutScroll: !0 }), ze.current = t;
4624    }
4625    return ze.current;
4626  },
4627  resetTransform: (t, e) => {
4628    t.style.transform = e !== void 0 ? e : "none";
4629  },
4630  checkIsScrollRoot: (t) => window.getComputedStyle(t).position === "fixed"
4631}), Gu = {
4632  pan: {
4633    Feature: hu
4634  },
4635  drag: {
4636    Feature: uu,
4637    ProjectionNode: ro,
4638    MeasureLayout: Zr
4639  }
4640};
4641function mi(t, e, n) {
4642  const { props: s } = t;
4643  t.animationState && s.whileHover && t.animationState.setActive("whileHover", n === "Start");
4644  const i = "onHover" + n, o = s[i];
4645  o && R.postRender(() => o(e, oe(e)));
4646}
4647class Xu extends yt {
4648  mount() {
4649    const { current: e } = this.node;
4650    e && (this.unmount = pl(e, (n, s) => (mi(this.node, s, "Start"), (i) => mi(this.node, i, "End"))));
4651  }
4652  unmount() {
4653  }
4654}
4655class Yu extends yt {
4656  constructor() {
4657    super(...arguments), this.isActive = !1;
4658  }
4659  onFocus() {
4660    let e = !1;
4661    try {
4662      e = this.node.current.matches(":focus-visible");
4663    } catch {
4664      e = !0;
4665    }
4666    !e || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !0), this.isActive = !0);
4667  }
4668  onBlur() {
4669    !this.isActive || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !1), this.isActive = !1);
4670  }
4671  mount() {
4672    this.unmount = se(ne(this.node.current, "focus", () => this.onFocus()), ne(this.node.current, "blur", () => this.onBlur()));
4673  }
4674  unmount() {
4675  }
4676}
4677function pi(t, e, n) {
4678  const { props: s } = t;
4679  if (t.current instanceof HTMLButtonElement && t.current.disabled)
4680    return;
4681  t.animationState && s.whileTap && t.animationState.setActive("whileTap", n === "Start");
4682  const i = "onTap" + (n === "End" ? "" : n), o = s[i];
4683  o && R.postRender(() => o(e, oe(e)));
4684}
4685class qu extends yt {
4686  mount() {
4687    const { current: e } = this.node;
4688    e && (this.unmount = vl(e, (n, s) => (pi(this.node, s, "Start"), (i, { success: o }) => pi(this.node, i, o ? "End" : "Cancel")), { useGlobalTarget: this.node.props.globalTapTarget }));
4689  }
4690  unmount() {
4691  }
4692}
4693const pn = /* @__PURE__ */ new WeakMap(), He = /* @__PURE__ */ new WeakMap(), Zu = (t) => {
4694  const e = pn.get(t.target);
4695  e && e(t);
4696}, Ju = (t) => {
4697  t.forEach(Zu);
4698};
4699function Qu({ root: t, ...e }) {
4700  const n = t || document;
4701  He.has(n) || He.set(n, {});
4702  const s = He.get(n), i = JSON.stringify(e);
4703  return s[i] || (s[i] = new IntersectionObserver(Ju, { root: t, ...e })), s[i];
4704}
4705function th(t, e, n) {
4706  const s = Qu(e);
4707  return pn.set(t, n), s.observe(t), () => {
4708    pn.delete(t), s.unobserve(t);
4709  };
4710}
4711const eh = {
4712  some: 0,
4713  all: 1
4714};
4715class nh extends yt {
4716  constructor() {
4717    super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
4718  }
4719  startObserver() {
4720    this.unmount();
4721    const { viewport: e = {} } = this.node.getProps(), { root: n, margin: s, amount: i = "some", once: o } = e, r = {
4722      root: n ? n.current : void 0,
4723      rootMargin: s,
4724      threshold: typeof i == "number" ? i : eh[i]
4725    }, a = (l) => {
4726      const { isIntersecting: u } = l;
4727      if (this.isInView === u || (this.isInView = u, o && !u && this.hasEnteredView))
4728        return;
4729      u && (this.hasEnteredView = !0), this.node.animationState && this.node.animationState.setActive("whileInView", u);
4730      const { onViewportEnter: c, onViewportLeave: h } = this.node.getProps(), d = u ? c : h;
4731      d && d(l);
4732    };
4733    return th(this.node.current, r, a);
4734  }
4735  mount() {
4736    this.startObserver();
4737  }
4738  update() {
4739    if (typeof IntersectionObserver > "u")
4740      return;
4741    const { props: e, prevProps: n } = this.node;
4742    ["amount", "margin", "root"].some(sh(e, n)) && this.startObserver();
4743  }
4744  unmount() {
4745  }
4746}
4747function sh({ viewport: t = {} }, { viewport: e = {} } = {}) {
4748  return (n) => t[n] !== e[n];
4749}
4750const ih = {
4751  inView: {
4752    Feature: nh
4753  },
4754  tap: {
4755    Feature: qu
4756  },
4757  focus: {
4758    Feature: Yu
4759  },
4760  hover: {
4761    Feature: Xu
4762  }
4763}, rh = {
4764  layout: {
4765    ProjectionNode: ro,
4766    MeasureLayout: Zr
4767  }
4768}, oh = {
4769  ...zc,
4770  ...ih,
4771  ...Gu,
4772  ...rh
4773}, E = /* @__PURE__ */ oc(oh, vc);
4774/**
4775 * @license lucide-react v0.487.0 - ISC
4776 *
4777 * This source code is licensed under the ISC license.
4778 * See the LICENSE file in the root directory of this source tree.
4779 */
4780const ah = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), lh = (t) => t.replace(
4781  /^([A-Z])|[\s-_]+(\w)/g,
4782  (e, n, s) => s ? s.toUpperCase() : n.toLowerCase()
4783), gi = (t) => {
4784  const e = lh(t);
4785  return e.charAt(0).toUpperCase() + e.slice(1);
4786}, oo = (...t) => t.filter((e, n, s) => !!e && e.trim() !== "" && s.indexOf(e) === n).join(" ").trim();
4787/**
4788 * @license lucide-react v0.487.0 - ISC
4789 *
4790 * This source code is licensed under the ISC license.
4791 * See the LICENSE file in the root directory of this source tree.
4792 */
4793var ch = {
4794  xmlns: "http://www.w3.org/2000/svg",
4795  width: 24,
4796  height: 24,
4797  viewBox: "0 0 24 24",
4798  fill: "none",
4799  stroke: "currentColor",
4800  strokeWidth: 2,
4801  strokeLinecap: "round",
4802  strokeLinejoin: "round"
4803};
4804/**
4805 * @license lucide-react v0.487.0 - ISC
4806 *
4807 * This source code is licensed under the ISC license.
4808 * See the LICENSE file in the root directory of this source tree.
4809 */
4810const uh = yn(
4811  ({
4812    color: t = "currentColor",
4813    size: e = 24,
4814    strokeWidth: n = 2,
4815    absoluteStrokeWidth: s,
4816    className: i = "",
4817    children: o,
4818    iconNode: r,
4819    ...a
4820  }, l) => ye(
4821    "svg",
4822    {
4823      ref: l,
4824      ...ch,
4825      width: e,
4826      height: e,
4827      stroke: t,
4828      strokeWidth: s ? Number(n) * 24 / Number(e) : n,
4829      className: oo("lucide", i),
4830      ...a
4831    },
4832    [
4833      ...r.map(([u, c]) => ye(u, c)),
4834      ...Array.isArray(o) ? o : [o]
4835    ]
4836  )
4837);
4838/**
4839 * @license lucide-react v0.487.0 - ISC
4840 *
4841 * This source code is licensed under the ISC license.
4842 * See the LICENSE file in the root directory of this source tree.
4843 */
4844const ut = (t, e) => {
4845  const n = yn(
4846    ({ className: s, ...i }, o) => ye(uh, {
4847      ref: o,
4848      iconNode: e,
4849      className: oo(
4850        `lucide-${ah(gi(t))}`,
4851        `lucide-${t}`,
4852        s
4853      ),
4854      ...i
4855    })
4856  );
4857  return n.displayName = gi(t), n;
4858};
4859/**
4860 * @license lucide-react v0.487.0 - ISC
4861 *
4862 * This source code is licensed under the ISC license.
4863 * See the LICENSE file in the root directory of this source tree.
4864 */
4865const hh = [
4866  ["path", { d: "m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z", key: "1fy3hk" }]
4867], dh = ut("bookmark", hh);
4868/**
4869 * @license lucide-react v0.487.0 - ISC
4870 *
4871 * This source code is licensed under the ISC license.
4872 * See the LICENSE file in the root directory of this source tree.
4873 */
4874const fh = [
4875  [
4876    "path",
4877    {
4878      d: "M12.67 19a2 2 0 0 0 1.416-.588l6.154-6.172a6 6 0 0 0-8.49-8.49L5.586 9.914A2 2 0 0 0 5 11.328V18a1 1 0 0 0 1 1z",
4879      key: "18jl4k"
4880    }
4881  ],
4882  ["path", { d: "M16 8 2 22", key: "vp34q" }],
4883  ["path", { d: "M17.5 15H9", key: "1oz8nu" }]
4884], mh = ut("feather", fh);
4885/**
4886 * @license lucide-react v0.487.0 - ISC
4887 *
4888 * This source code is licensed under the ISC license.
4889 * See the LICENSE file in the root directory of this source tree.
4890 */
4891const ph = [
4892  ["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
4893  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
4894  ["path", { d: "M10 9H8", key: "b1mrlr" }],
4895  ["path", { d: "M16 13H8", key: "t4e002" }],
4896  ["path", { d: "M16 17H8", key: "z1uh3a" }]
4897], gh = ut("file-text", ph);
4898/**
4899 * @license lucide-react v0.487.0 - ISC
4900 *
4901 * This source code is licensed under the ISC license.
4902 * See the LICENSE file in the root directory of this source tree.
4903 */
4904const yh = [
4905  ["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
4906  ["path", { d: "M3 3v5h5", key: "1xhq8a" }],
4907  ["path", { d: "M12 7v5l4 2", key: "1fdv2h" }]
4908], xh = ut("history", yh);
4909/**
4910 * @license lucide-react v0.487.0 - ISC
4911 *
4912 * This source code is licensed under the ISC license.
4913 * See the LICENSE file in the root directory of this source tree.
4914 */
4915const vh = [
4916  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
4917  ["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
4918  ["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
4919], bh = ut("image", vh);
4920/**
4921 * @license lucide-react v0.487.0 - ISC
4922 *
4923 * This source code is licensed under the ISC license.
4924 * See the LICENSE file in the root directory of this source tree.
4925 */
4926const wh = [
4927  ["path", { d: "M10 8h.01", key: "1r9ogq" }],
4928  ["path", { d: "M12 12h.01", key: "1mp3jc" }],
4929  ["path", { d: "M14 8h.01", key: "1primd" }],
4930  ["path", { d: "M16 12h.01", key: "1l6xoz" }],
4931  ["path", { d: "M18 8h.01", key: "emo2bl" }],
4932  ["path", { d: "M6 8h.01", key: "x9i8wu" }],
4933  ["path", { d: "M7 16h10", key: "wp8him" }],
4934  ["path", { d: "M8 12h.01", key: "czm47f" }],
4935  ["rect", { width: "20", height: "16", x: "2", y: "4", rx: "2", key: "18n3k1" }]
4936], Th = ut("keyboard", wh);
4937/**
4938 * @license lucide-react v0.487.0 - ISC
4939 *
4940 * This source code is licensed under the ISC license.
4941 * See the LICENSE file in the root directory of this source tree.
4942 */
4943const Sh = [
4944  [
4945    "path",
4946    {
4947      d: "M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",
4948      key: "1qme2f"
4949    }
4950  ],
4951  ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
4952], Ph = ut("settings", Sh);
4953/**
4954 * @license lucide-react v0.487.0 - ISC
4955 *
4956 * This source code is licensed under the ISC license.
4957 * See the LICENSE file in the root directory of this source tree.
4958 */
4959const Ch = [
4960  ["path", { d: "M3 6h18", key: "d0wm0j" }],
4961  ["path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6", key: "4alrt4" }],
4962  ["path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2", key: "v07s0e" }],
4963  ["line", { x1: "10", x2: "10", y1: "11", y2: "17", key: "1uufr5" }],
4964  ["line", { x1: "14", x2: "14", y1: "11", y2: "17", key: "xtxkd" }]
4965], Mh = ut("trash-2", Ch);
4966/**
4967 * @license lucide-react v0.487.0 - ISC
4968 *
4969 * This source code is licensed under the ISC license.
4970 * See the LICENSE file in the root directory of this source tree.
4971 */
4972const Ah = [
4973  ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
4974  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
4975], kh = ut("x", Ah);
4976function Vh(t, e) {
4977  if (t.match(/^[a-z]+:\/\//i))
4978    return t;
4979  if (t.match(/^\/\//))
4980    return window.location.protocol + t;
4981  if (t.match(/^[a-z]+:/i))
4982    return t;
4983  const n = document.implementation.createHTMLDocument(), s = n.createElement("base"), i = n.createElement("a");
4984  return n.head.appendChild(s), n.body.appendChild(i), e && (s.href = e), i.href = t, i.href;
4985}
4986const Eh = /* @__PURE__ */ (() => {
4987  let t = 0;
4988  const e = () => (
4989    // eslint-disable-next-line no-bitwise
4990    `0000${(Math.random() * 36 ** 4 << 0).toString(36)}`.slice(-4)
4991  );
4992  return () => (t += 1, `u${e()}${t}`);
4993})();
4994function ft(t) {
4995  const e = [];
4996  for (let n = 0, s = t.length; n < s; n++)
4997    e.push(t[n]);
4998  return e;
4999}
5000let Ct = null;
5001function ao(t = {}) {
5002  return Ct || (t.includeStyleProperties ? (Ct = t.includeStyleProperties, Ct) : (Ct = ft(window.getComputedStyle(document.documentElement)), Ct));
5003}
5004function Se(t, e) {
5005  const s = (t.ownerDocument.defaultView || window).getComputedStyle(t).getPropertyValue(e);
5006  return s ? parseFloat(s.replace("px", "")) : 0;
5007}
5008function Dh(t) {
5009  const e = Se(t, "border-left-width"), n = Se(t, "border-right-width");
5010  return t.clientWidth + e + n;
5011}
5012function Rh(t) {
5013  const e = Se(t, "border-top-width"), n = Se(t, "border-bottom-width");
5014  return t.clientHeight + e + n;
5015}
5016function lo(t, e = {}) {
5017  const n = e.width || Dh(t), s = e.height || Rh(t);
5018  return { width: n, height: s };
5019}
5020function Nh() {
5021  let t, e;
5022  try {
5023    e = process;
5024  } catch {
5025  }
5026  const n = e && e.env ? e.env.devicePixelRatio : null;
5027  return n && (t = parseInt(n, 10), Number.isNaN(t) && (t = 1)), t || window.devicePixelRatio || 1;
5028}
5029const J = 16384;
5030function Lh(t) {
5031  (t.width > J || t.height > J) && (t.width > J && t.height > J ? t.width > t.height ? (t.height *= J / t.width, t.width = J) : (t.width *= J / t.height, t.height = J) : t.width > J ? (t.height *= J / t.width, t.width = J) : (t.width *= J / t.height, t.height = J));
5032}
5033function Pe(t) {
5034  return new Promise((e, n) => {
5035    const s = new Image();
5036    s.onload = () => {
5037      s.decode().then(() => {
5038        requestAnimationFrame(() => e(s));
5039      });
5040    }, s.onerror = n, s.crossOrigin = "anonymous", s.decoding = "async", s.src = t;
5041  });
5042}
5043async function Ih(t) {
5044  return Promise.resolve().then(() => new XMLSerializer().serializeToString(t)).then(encodeURIComponent).then((e) => `data:image/svg+xml;charset=utf-8,${e}`);
5045}
5046async function Fh(t, e, n) {
5047  const s = "http://www.w3.org/2000/svg", i = document.createElementNS(s, "svg"), o = document.createElementNS(s, "foreignObject");
5048  return i.setAttribute("width", `${e}`), i.setAttribute("height", `${n}`), i.setAttribute("viewBox", `0 0 ${e} ${n}`), o.setAttribute("width", "100%"), o.setAttribute("height", "100%"), o.setAttribute("x", "0"), o.setAttribute("y", "0"), o.setAttribute("externalResourcesRequired", "true"), i.appendChild(o), o.appendChild(t), Ih(i);
5049}
5050const Y = (t, e) => {
5051  if (t instanceof e)
5052    return !0;
5053  const n = Object.getPrototypeOf(t);
5054  return n === null ? !1 : n.constructor.name === e.name || Y(n, e);
5055};
5056function Bh(t) {
5057  const e = t.getPropertyValue("content");
5058  return `${t.cssText} content: '${e.replace(/'|"/g, "")}';`;
5059}
5060function Oh(t, e) {
5061  return ao(e).map((n) => {
5062    const s = t.getPropertyValue(n), i = t.getPropertyPriority(n);
5063    return `${n}: ${s}${i ? " !important" : ""};`;
5064  }).join(" ");
5065}
5066function jh(t, e, n, s) {
5067  const i = `.${t}:${e}`, o = n.cssText ? Bh(n) : Oh(n, s);
5068  return document.createTextNode(`${i}{${o}}`);
5069}
5070function yi(t, e, n, s) {
5071  const i = window.getComputedStyle(t, n), o = i.getPropertyValue("content");
5072  if (o === "" || o === "none")
5073    return;
5074  const r = Eh();
5075  try {
5076    e.className = `${e.className} ${r}`;
5077  } catch {
5078    return;
5079  }
5080  const a = document.createElement("style");
5081  a.appendChild(jh(r, n, i, s)), e.appendChild(a);
5082}
5083function $h(t, e, n) {
5084  yi(t, e, ":before", n), yi(t, e, ":after", n);
5085}
5086const xi = "application/font-woff", vi = "image/jpeg", Uh = {
5087  woff: xi,
5088  woff2: xi,
5089  ttf: "application/font-truetype",
5090  eot: "application/vnd.ms-fontobject",
5091  png: "image/png",
5092  jpg: vi,
5093  jpeg: vi,
5094  gif: "image/gif",
5095  tiff: "image/tiff",
5096  svg: "image/svg+xml",
5097  webp: "image/webp"
5098};
5099function _h(t) {
5100  const e = /\.([^./]*?)$/g.exec(t);
5101  return e ? e[1] : "";
5102}
5103function ts(t) {
5104  const e = _h(t).toLowerCase();
5105  return Uh[e] || "";
5106}
5107function Wh(t) {
5108  return t.split(/,/)[1];
5109}
5110function gn(t) {
5111  return t.search(/^(data:)/) !== -1;
5112}
5113function zh(t, e) {
5114  return `data:${e};base64,${t}`;
5115}
5116async function co(t, e, n) {
5117  const s = await fetch(t, e);
5118  if (s.status === 404)
5119    throw new Error(`Resource "${s.url}" not found`);
5120  const i = await s.blob();
5121  return new Promise((o, r) => {
5122    const a = new FileReader();
5123    a.onerror = r, a.onloadend = () => {
5124      try {
5125        o(n({ res: s, result: a.result }));
5126      } catch (l) {
5127        r(l);
5128      }
5129    }, a.readAsDataURL(i);
5130  });
5131}
5132const Ke = {};
5133function Hh(t, e, n) {
5134  let s = t.replace(/\?.*/, "");
5135  return n && (s = t), /ttf|otf|eot|woff2?/i.test(s) && (s = s.replace(/.*\//, "")), e ? `[${e}]${s}` : s;
5136}
5137async function es(t, e, n) {
5138  const s = Hh(t, e, n.includeQueryParams);
5139  if (Ke[s] != null)
5140    return Ke[s];
5141  n.cacheBust && (t += (/\?/.test(t) ? "&" : "?") + (/* @__PURE__ */ new Date()).getTime());
5142  let i;
5143  try {
5144    const o = await co(t, n.fetchRequestInit, ({ res: r, result: a }) => (e || (e = r.headers.get("Content-Type") || ""), Wh(a)));
5145    i = zh(o, e);
5146  } catch (o) {
5147    i = n.imagePlaceholder || "";
5148    let r = `Failed to fetch resource: ${t}`;
5149    o && (r = typeof o == "string" ? o : o.message), r && console.warn(r);
5150  }
5151  return Ke[s] = i, i;
5152}
5153async function Kh(t) {
5154  const e = t.toDataURL();
5155  return e === "data:," ? t.cloneNode(!1) : Pe(e);
5156}
5157async function Gh(t, e) {
5158  if (t.currentSrc) {
5159    const o = document.createElement("canvas"), r = o.getContext("2d");
5160    o.width = t.clientWidth, o.height = t.clientHeight, r?.drawImage(t, 0, 0, o.width, o.height);
5161    const a = o.toDataURL();
5162    return Pe(a);
5163  }
5164  const n = t.poster, s = ts(n), i = await es(n, s, e);
5165  return Pe(i);
5166}
5167async function Xh(t, e) {
5168  var n;
5169  try {
5170    if (!((n = t?.contentDocument) === null || n === void 0) && n.body)
5171      return await Ve(t.contentDocument.body, e, !0);
5172  } catch {
5173  }
5174  return t.cloneNode(!1);
5175}
5176async function Yh(t, e) {
5177  return Y(t, HTMLCanvasElement) ? Kh(t) : Y(t, HTMLVideoElement) ? Gh(t, e) : Y(t, HTMLIFrameElement) ? Xh(t, e) : t.cloneNode(uo(t));
5178}
5179const qh = (t) => t.tagName != null && t.tagName.toUpperCase() === "SLOT", uo = (t) => t.tagName != null && t.tagName.toUpperCase() === "SVG";
5180async function Zh(t, e, n) {
5181  var s, i;
5182  if (uo(e))
5183    return e;
5184  let o = [];
5185  return qh(t) && t.assignedNodes ? o = ft(t.assignedNodes()) : Y(t, HTMLIFrameElement) && (!((s = t.contentDocument) === null || s === void 0) && s.body) ? o = ft(t.contentDocument.body.childNodes) : o = ft(((i = t.shadowRoot) !== null && i !== void 0 ? i : t).childNodes), o.length === 0 || Y(t, HTMLVideoElement) || await o.reduce((r, a) => r.then(() => Ve(a, n)).then((l) => {
5186    l && e.appendChild(l);
5187  }), Promise.resolve()), e;
5188}
5189function Jh(t, e, n) {
5190  const s = e.style;
5191  if (!s)
5192    return;
5193  const i = window.getComputedStyle(t);
5194  i.cssText ? (s.cssText = i.cssText, s.transformOrigin = i.transformOrigin) : ao(n).forEach((o) => {
5195    let r = i.getPropertyValue(o);
5196    o === "font-size" && r.endsWith("px") && (r = `${Math.floor(parseFloat(r.substring(0, r.length - 2))) - 0.1}px`), Y(t, HTMLIFrameElement) && o === "display" && r === "inline" && (r = "block"), o === "d" && e.getAttribute("d") && (r = `path(${e.getAttribute("d")})`), s.setProperty(o, r, i.getPropertyPriority(o));
5197  });
5198}
5199function Qh(t, e) {
5200  Y(t, HTMLTextAreaElement) && (e.innerHTML = t.value), Y(t, HTMLInputElement) && e.setAttribute("value", t.value);
5201}
5202function td(t, e) {
5203  if (Y(t, HTMLSelectElement)) {
5204    const n = e, s = Array.from(n.children).find((i) => t.value === i.getAttribute("value"));
5205    s && s.setAttribute("selected", "");
5206  }
5207}
5208function ed(t, e, n) {
5209  return Y(e, Element) && (Jh(t, e, n), $h(t, e, n), Qh(t, e), td(t, e)), e;
5210}
5211async function nd(t, e) {
5212  const n = t.querySelectorAll ? t.querySelectorAll("use") : [];
5213  if (n.length === 0)
5214    return t;
5215  const s = {};
5216  for (let o = 0; o < n.length; o++) {
5217    const a = n[o].getAttribute("xlink:href");
5218    if (a) {
5219      const l = t.querySelector(a), u = document.querySelector(a);
5220      !l && u && !s[a] && (s[a] = await Ve(u, e, !0));
5221    }
5222  }
5223  const i = Object.values(s);
5224  if (i.length) {
5225    const o = "http://www.w3.org/1999/xhtml", r = document.createElementNS(o, "svg");
5226    r.setAttribute("xmlns", o), r.style.position = "absolute", r.style.width = "0", r.style.height = "0", r.style.overflow = "hidden", r.style.display = "none";
5227    const a = document.createElementNS(o, "defs");
5228    r.appendChild(a);
5229    for (let l = 0; l < i.length; l++)
5230      a.appendChild(i[l]);
5231    t.appendChild(r);
5232  }
5233  return t;
5234}
5235async function Ve(t, e, n) {
5236  return !n && e.filter && !e.filter(t) ? null : Promise.resolve(t).then((s) => Yh(s, e)).then((s) => Zh(t, s, e)).then((s) => ed(t, s, e)).then((s) => nd(s, e));
5237}
5238const ho = /url\((['"]?)([^'"]+?)\1\)/g, sd = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, id = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
5239function rd(t) {
5240  const e = t.replace(/([.*+?^${}()|\[\]\/\\])/g, "\\$1");
5241  return new RegExp(`(url\\(['"]?)(${e})(['"]?\\))`, "g");
5242}
5243function od(t) {
5244  const e = [];
5245  return t.replace(ho, (n, s, i) => (e.push(i), n)), e.filter((n) => !gn(n));
5246}
5247async function ad(t, e, n, s, i) {
5248  try {
5249    const o = n ? Vh(e, n) : e, r = ts(e);
5250    let a;
5251    return i || (a = await es(o, r, s)), t.replace(rd(e), `$1${a}$3`);
5252  } catch {
5253  }
5254  return t;
5255}
5256function ld(t, { preferredFontFormat: e }) {
5257  return e ? t.replace(id, (n) => {
5258    for (; ; ) {
5259      const [s, , i] = sd.exec(n) || [];
5260      if (!i)
5261        return "";
5262      if (i === e)
5263        return `src: ${s};`;
5264    }
5265  }) : t;
5266}
5267function fo(t) {
5268  return t.search(ho) !== -1;
5269}
5270async function mo(t, e, n) {
5271  if (!fo(t))
5272    return t;
5273  const s = ld(t, n);
5274  return od(s).reduce((o, r) => o.then((a) => ad(a, r, e, n)), Promise.resolve(s));
5275}
5276async function Mt(t, e, n) {
5277  var s;
5278  const i = (s = e.style) === null || s === void 0 ? void 0 : s.getPropertyValue(t);
5279  if (i) {
5280    const o = await mo(i, null, n);
5281    return e.style.setProperty(t, o, e.style.getPropertyPriority(t)), !0;
5282  }
5283  return !1;
5284}
5285async function cd(t, e) {
5286  await Mt("background", t, e) || await Mt("background-image", t, e), await Mt("mask", t, e) || await Mt("-webkit-mask", t, e) || await Mt("mask-image", t, e) || await Mt("-webkit-mask-image", t, e);
5287}
5288async function ud(t, e) {
5289  const n = Y(t, HTMLImageElement);
5290  if (!(n && !gn(t.src)) && !(Y(t, SVGImageElement) && !gn(t.href.baseVal)))
5291    return;
5292  const s = n ? t.src : t.href.baseVal, i = await es(s, ts(s), e);
5293  await new Promise((o, r) => {
5294    t.onload = o, t.onerror = e.onImageErrorHandler ? (...l) => {
5295      try {
5296        o(e.onImageErrorHandler(...l));
5297      } catch (u) {
5298        r(u);
5299      }
5300    } : r;
5301    const a = t;
5302    a.decode && (a.decode = o), a.loading === "lazy" && (a.loading = "eager"), n ? (t.srcset = "", t.src = i) : t.href.baseVal = i;
5303  });
5304}
5305async function hd(t, e) {
5306  const s = ft(t.childNodes).map((i) => po(i, e));
5307  await Promise.all(s).then(() => t);
5308}
5309async function po(t, e) {
5310  Y(t, Element) && (await cd(t, e), await ud(t, e), await hd(t, e));
5311}
5312function dd(t, e) {
5313  const { style: n } = t;
5314  e.backgroundColor && (n.backgroundColor = e.backgroundColor), e.width && (n.width = `${e.width}px`), e.height && (n.height = `${e.height}px`);
5315  const s = e.style;
5316  return s != null && Object.keys(s).forEach((i) => {
5317    n[i] = s[i];
5318  }), t;
5319}
5320const bi = {};
5321async function wi(t) {
5322  let e = bi[t];
5323  if (e != null)
5324    return e;
5325  const s = await (await fetch(t)).text();
5326  return e = { url: t, cssText: s }, bi[t] = e, e;
5327}
5328async function Ti(t, e) {
5329  let n = t.cssText;
5330  const s = /url\(["']?([^"')]+)["']?\)/g, o = (n.match(/url\([^)]+\)/g) || []).map(async (r) => {
5331    let a = r.replace(s, "$1");
5332    return a.startsWith("https://") || (a = new URL(a, t.url).href), co(a, e.fetchRequestInit, ({ result: l }) => (n = n.replace(r, `url(${l})`), [r, l]));
5333  });
5334  return Promise.all(o).then(() => n);
5335}
5336function Si(t) {
5337  if (t == null)
5338    return [];
5339  const e = [], n = /(\/\*[\s\S]*?\*\/)/gi;
5340  let s = t.replace(n, "");
5341  const i = new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)}
5341)", "gi");
5342  for (; ; ) {
5343    const l = i.exec(s);
5344    if (l === null)
5345      break;
5346    e.push(l[0]);
5347  }
5348  s = s.replace(i, "");
5349  const o = /@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi, r = "((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})", a = new RegExp(r, "gi");
5350  for (; ; ) {
5351    let l = o.exec(s);
5352    if (l === null) {
5353      if (l = a.exec(s), l === null)
5354        break;
5355      o.lastIndex = a.lastIndex;
5356    } else
5357      a.lastIndex = o.lastIndex;
5358    e.push(l[0]);
5359  }
5360  return e;
5361}
5362async function fd(t, e) {
5363  const n = [], s = [];
5364  return t.forEach((i) => {
5365    if ("cssRules" in i)
5366      try {
5367        ft(i.cssRules || []).forEach((o, r) => {
5368          if (o.type === CSSRule.IMPORT_RULE) {
5369            let a = r + 1;
5370            const l = o.href, u = wi(l).then((c) => Ti(c, e)).then((c) => Si(c).forEach((h) => {
5371              try {
5372                i.insertRule(h, h.startsWith("@import") ? a += 1 : i.cssRules.length);
5373              } catch (d) {
5374                console.error("Error inserting rule from remote css", {
5375                  rule: h,
5376                  error: d
5377                });
5378              }
5379            })).catch((c) => {
5380              console.error("Error loading remote css", c.toString());
5381            });
5382            s.push(u);
5383          }
5384        });
5385      } catch (o) {
5386        const r = t.find((a) => a.href == null) || document.styleSheets[0];
5387        i.href != null && s.push(wi(i.href).then((a) => Ti(a, e)).then((a) => Si(a).forEach((l) => {
5388          r.insertRule(l, r.cssRules.length);
5389        })).catch((a) => {
5390          console.error("Error loading remote stylesheet", a);
5391        })), console.error("Error inlining remote css file", o);
5392      }
5393  }), Promise.all(s).then(() => (t.forEach((i) => {
5394    if ("cssRules" in i)
5395      try {
5396        ft(i.cssRules || []).forEach((o) => {
5397          n.push(o);
5398        });
5399      } catch (o) {
5400        console.error(`Error while reading CSS rules from ${i.href}`, o);
5401      }
5402  }), n));
5403}
5404function md(t) {
5405  return t.filter((e) => e.type === CSSRule.FONT_FACE_RULE).filter((e) => fo(e.style.getPropertyValue("src")));
5406}
5407async function pd(t, e) {
5408  if (t.ownerDocument == null)
5409    throw new Error("Provided element is not within a Document");
5410  const n = ft(t.ownerDocument.styleSheets), s = await fd(n, e);
5411  return md(s);
5412}
5413function go(t) {
5414  return t.trim().replace(/["']/g, "");
5415}
5416function gd(t) {
5417  const e = /* @__PURE__ */ new Set();
5418  function n(s) {
5419    (s.style.fontFamily || getComputedStyle(s).fontFamily).split(",").forEach((o) => {
5420      e.add(go(o));
5421    }), Array.from(s.children).forEach((o) => {
5422      o instanceof HTMLElement && n(o);
5423    });
5424  }
5425  return n(t), e;
5426}
5427async function yd(t, e) {
5428  const n = await pd(t, e), s = gd(t);
5429  return (await Promise.all(n.filter((o) => s.has(go(o.style.fontFamily))).map((o) => {
5430    const r = o.parentStyleSheet ? o.parentStyleSheet.href : null;
5431    return mo(o.cssText, r, e);
5432  }))).join(`
5433`);
5434}
5435async function xd(t, e) {
5436  const n = e.fontEmbedCSS != null ? e.fontEmbedCSS : e.skipFonts ? null : await yd(t, e);
5437  if (n) {
5438    const s = document.createElement("style"), i = document.createTextNode(n);
5439    s.appendChild(i), t.firstChild ? t.insertBefore(s, t.firstChild) : t.appendChild(s);
5440  }
5441}
5442async function vd(t, e = {}) {
5443  const { width: n, height: s } = lo(t, e), i = await Ve(t, e, !0);
5444  return await xd(i, e), await po(i, e), dd(i, e), await Fh(i, n, s);
5445}
5446async function bd(t, e = {}) {
5447  const { width: n, height: s } = lo(t, e), i = await vd(t, e), o = await Pe(i), r = document.createElement("canvas"), a = r.getContext("2d"), l = e.pixelRatio || Nh(), u = e.canvasWidth || n, c = e.canvasHeight || s;
5448  return r.width = u * l, r.height = c * l, e.skipAutoScale || Lh(r), r.style.width = `${u}`, r.style.height = `${c}`, e.backgroundColor && (a.fillStyle = e.backgroundColor, a.fillRect(0, 0, r.width, r.height)), a.drawImage(o, 0, 0, r.width, r.height), r;
5449}
5450async function wd(t, e = {}) {
5451  return (await bd(t, e)).toDataURL("image/jpeg", e.quality || 1);
5452}
5453class Td {
5454  constructor() {
5455    this.audioContext = null, typeof window < "u" && (this.audioContext = new (window.AudioContext || window.webkitAudioContext)());
5456  }
5457  // Generate keystroke sound (mechanical clack)
5458  generateKeystroke(e = 0) {
5459    if (!this.audioContext) return null;
5460    const n = this.audioContext.sampleRate, s = 0.035 + Math.random() * 0.015, i = this.audioContext.createBuffer(1, n * s, n), o = i.getChannelData(0);
5461    for (let r = 0; r < i.length; r++) {
5462      const a = r / n, l = Math.exp(-a * 200) * (Math.random() * 0.3 + 0.7), u = 3500 + e * 200 + Math.random() * 400, c = Math.sin(2 * Math.PI * u * a) * Math.exp(-a * 180), h = 2800 + e * 150 + Math.random() * 300, d = Math.sin(2 * Math.PI * h * a) * Math.exp(-a * 120) * 0.3, m = (Math.random() - 0.5) * Math.exp(-a * 250) * 0.5;
5463      o[r] = (l * 0.5 + c * 0.3 + d * 0.15 + m * 0.05) * 0.8;
5464    }
5465    return i;
5466  }
5467  // Generate carriage return bell sound
5468  generateBell() {
5469    if (!this.audioContext) return null;
5470    const e = this.audioContext.sampleRate, s = this.audioContext.createBuffer(1, e * 0.38, e), i = s.getChannelData(0);
5471    for (let o = 0; o < s.length; o++) {
5472      const r = o / e;
5473      let a = 0;
5474      if (r < 0.3 && Math.random() > 0.975) {
5475        const p = (Math.random() - 0.5) * 1.2;
5476        a += p;
5477      }
5478      const l = (Math.random() - 0.5) * Math.exp(-r * 9) * 0.3, u = 100 + Math.sin(r * 90) * 25, c = Math.sin(2 * Math.PI * u * r) * Math.exp(-r * 8) * 0.2, h = 450 + Math.sin(r * 70) * 80, d = Math.sin(2 * Math.PI * h * r) * Math.exp(-r * 11) * 0.15;
5479      let m = 0;
5480      if (r > 0.3) {
5481        const p = r - 0.3;
5482        m = (Math.random() - 0.5) * Math.exp(-p * 120) * 2.2, m += Math.sin(2 * Math.PI * 2400 * p) * Math.exp(-p * 60) * 0.4;
5483      }
5484      i[o] = (a * 0.35 + l * 0.25 + c * 0.2 + d * 0.1 + m * 0.4) * 0.7;
5485    }
5486    return s;
5487  }
5488  // Generate subtle bell ding
5489  generateDing() {
5490    if (!this.audioContext) return null;
5491    const e = this.audioContext.sampleRate, s = this.audioContext.createBuffer(1, e * 0.8, e), i = s.getChannelData(0);
5492    for (let o = 0; o < s.length; o++) {
5493      const r = o / e, a = 1800, l = Math.sin(2 * Math.PI * a * r) * Math.exp(-r * 4) * 0.4, u = Math.sin(2 * Math.PI * a * 2.5 * r) * Math.exp(-r * 6) * 0.2, c = Math.sin(2 * Math.PI * a * 4 * r) * Math.exp(-r * 8) * 0.1;
5494      i[o] = (l + u + c) * 0.5;
5495    }
5496    return s;
5497  }
5498  // Generate paper crumple sound
5499  generateCrumple() {
5500    if (!this.audioContext) return null;
5501    const e = this.audioContext.sampleRate, s = this.audioContext.createBuffer(1, e * 0.6, e), i = s.getChannelData(0);
5502    for (let o = 0; o < s.length; o++) {
5503      const r = o / e;
5504      let a = Math.random() - 0.5;
5505      a *= Math.exp(-r * 3), Math.random() > 0.97 && (a += (Math.random() - 0.5) * 2), i[o] = a * 0.4;
5506    }
5507    return s;
5508  }
5509  // Play a sound buffer
5510  playBuffer(e, n = 0.3) {
5511    if (!this.audioContext || !e) return;
5512    this.audioContext.state === "suspended" && this.audioContext.resume();
5513    const s = this.audioContext.createBufferSource(), i = this.audioContext.createGain();
5514    s.buffer = e, i.gain.value = n, s.connect(i), i.connect(this.audioContext.destination), s.start(0);
5515  }
5516  // Public methods to play each sound type
5517  playKeystroke(e = 0) {
5518    const n = this.generateKeystroke(e);
5519    this.playBuffer(n, 0.25);
5520  }
5521  playBell() {
5522    if (!this.audioContext) return;
5523    const e = 5, n = 0.035;
5524    for (let s = 0; s < e; s++)
5525      setTimeout(() => {
5526        const i = this.generateKeystroke(s * 0.5);
5527        this.playBuffer(i, 0.22);
5528      }, s * n * 1e3);
5529    setTimeout(() => {
5530      const s = this.generateDing();
5531      this.playBuffer(s, 0.15);
5532    }, (e * n + 0.05) * 1e3);
5533  }
5534  playDing() {
5535    const e = this.generateDing();
5536    this.playBuffer(e, 0.3);
5537  }
5538  playCrumple() {
5539    const e = this.generateCrumple();
5540    this.playBuffer(e, 0.3);
5541  }
5542}
5543let Nt = null;
5544function Sd() {
5545  return Nt || (Nt = new Td()), Nt;
5546}
5547function Pd() {
5548  if (Nt && Nt.audioContext) {
5549    const t = Nt.audioContext;
5550    t.state === "suspended" && t.resume();
5551  }
5552}
5553const Pi = {
5554  courier: "'Cutive Mono', monospace",
5555  vintage: "'Special Elite', system-ui",
5556  technical: "'IBM Plex Mono', monospace",
5557  classic: "'Courier Prime', monospace"
5558}, Cd = {
5559  courier: [700, 900],
5560  // Bold variations for Default
5561  vintage: [400, 700],
5562  // Normal to bold for Vintage
5563  technical: [200, 300],
5564  // Extra light to light for Technical
5565  classic: [400, 600]
5566  // Regular to semibold for Classic
5567}, Md = ({ char: t, isSpace: e, isCurrentLine: n, charIndex: s, struck: i, fontFamily: o, isNeglected: r, showAging: a, age: l, timestamp: u, currentTime: c, paperAged: h }) => {
5568  const [d] = D(() => {
5569    let g = "courier";
5570    o.includes("Special Elite") ? g = "vintage" : o.includes("IBM Plex") ? g = "technical" : o.includes("Courier Prime") && (g = "classic");
5571    const b = Cd[g];
5572    return {
5573      rotate: (Math.random() - 0.5) * 2.4,
5574      // Increased rotation
5575      yOffset: (Math.random() - 0.5) * 1.2,
5576      // Increased vertical offset for baseline variation
5577      xOffset: (Math.random() - 0.5) * 0.3,
5578      // New: horizontal offset for letter spacing variation
5579      opacity: 0.88 + Math.random() * 0.12,
5580      // Increased range for more dramatic variation
5581      fontWeight: Math.random() > 0.5 ? b[1] : b[0],
5582      edgeSoftness: Math.random() * 0.3,
5583      // Blur variation (0 to 0.3px)
5584      scaleX: 0.992 + Math.random() * 0.016,
5585      // Increased horizontal compression/expansion
5586      scaleY: 0.994 + Math.random() * 0.012,
5587      // New: vertical compression/expansion
5588      skewX: (Math.random() - 0.5) * 1.5,
5589      // New: horizontal skew for leaning effect
5590      letterSpacing: (Math.random() - 0.5) * 0.4,
5591      // New: letter spacing micro-adjustments
5592      strikeRotate: (Math.random() - 0.5) * 10,
5593      // Ink bleed effect - some characters get slightly bolder stroke
5594      textShadow: Math.random() > 0.7 ? `0 0 ${0.2 + Math.random() * 0.3}px rgba(28, 25, 23, ${0.15 + Math.random() * 0.25})` : "none"
5595    };
5596  }), [m, p] = D(1);
5597  return G(() => {
5598    if (!a) {
5599      p(1);
5600      return;
5601    }
5602    const g = () => {
5603      const y = Date.now() - u, x = 2e4;
5604      if (y < x) {
5605        const v = y / x;
5606        p(1 - v * 0.3);
5607      } else p(h ? 0.4 : 0.7);
5608    };
5609    g();
5610    const b = setInterval(g, 100);
5611    return () => clearInterval(b);
5612  }
5612, [u, a, h]), e ? /* @__PURE__ */ f("span", { className: "inline-block w-[1ch]", children: " " }) : t === `
5613` ? /* @__PURE__ */ f("br", {}) : /* @__PURE__ */ w(
5614    E.span,
5615    {
5616      initial: !1,
5617      animate: {
5618        opacity: m * d.opacity
5619      },
5620      transition: {
5621        duration: 0.5,
5622        ease: "easeInOut"
5623      },
5624      className: "inline-block relative select-none leading-[1.4]",
5625      style: {
5626        fontFamily: o,
5627        fontSize: "20px",
5628        transform: `rotate(${d.rotate}deg) translateY(${d.yOffset}px) translateX(${d.xOffset}px) scaleX(${d.scaleX}) scaleY(${d.scaleY}) skewX(${d.skewX}deg)`,
5629        fontWeight: d.fontWeight,
5630        color: "rgb(28, 25, 23)",
5631        letterSpacing: `${d.letterSpacing}px`,
5632        textShadow: d.textShadow
5633      },
5634      children: [
5635        t,
5636        i && /* @__PURE__ */ f(
5637          E.span,
5638          {
5639            initial: { opacity: 0, scale: 1.5 },
5640            animate: { opacity: 1, scale: 1 },
5641            className: "absolute inset-0 flex items-center justify-center pointer-events-none",
5642            style: { transform: `rotate(${d.strikeRotate}deg)` },
5643            children: /* @__PURE__ */ f("span", { className: "w-full h-[3px] bg-stone-900/80 rounded-full blur-[0.4px]" })
5644          }
5645        )
5646      ]
5647    }
5648  );
5649}, Ad = ({ onHasContent: t, hideControls: e = !1 }) => {
5650  const [n, s] = D([]), [i, o] = D(!1), [r, a] = D(!1), [l, u] = D(!1), [c, h] = D(Date.now()), [d, m] = D(!1), [p, g] = D("beige"), [b, y] = D("courier"), [x, v] = D(!0), [A, S] = D(!1), [M, k] = D(!1), [, C] = D(0), [B, $] = D(!1), [q, $t] = D(0), [ae, Ut] = D(!1), [st, ns] = D({
5651    spot1X: 15,
5652    spot1Y: 20,
5653    spot2X: 85,
5654    spot2Y: 80,
5655    spot3X: 50,
5656    spot3Y: 50
5657  }), I = rt(null), W = rt(null), Z = rt(null), [U, le] = D(!0), Ee = [
5658    "set your thoughts on paper...",
5659    "write a three-sentence story...",
5660    "try your hand at a haiku (5-7-5)...",
5661    "when was the last time you felt alive?...",
5662    "describe your morning in exactly ten words...",
5663    "what would you tell your younger self?..."
5664  ];
5665  G(() => {
5666    t?.(n.length > 0);
5667  }, [n.length, t]), G(() => {
5668    if (!x) {
5669      m(!1), k(!1), Ut(!1);
5670      return;
5671    }
5672    const T = setInterval(() => {
5673      const V = Date.now() - c;
5674      Ut(V > 0 && V <= 2e4), m(V > 2e4), k(V > 45e3);
5675    }, 100);
5676    return () => clearInterval(T);
5677  }, [c, x]), G(() => {
5678    if (!x || n.length === 0) return;
5679    const T = setInterval(() => {
5680      C((V) => V + 1);
5681    }, 500);
5682    return () => clearInterval(T);
5683  }, [x, n.length]), G(() => {
5684    M && ns({
5685      spot1X: 10 + Math.random() * 20,
5686      // 10-30%
5687      spot1Y: 10 + Math.random() * 30,
5688      // 10-40%
5689      spot2X: 70 + Math.random() * 20,
5690      // 70-90%
5691      spot2Y: 60 + Math.random() * 30,
5692      // 60-90%
5693      spot3X: 35 + Math.random() * 30,
5694      // 35-65%
5695      spot3Y: 40 + Math.random() * 30
5696      // 40-70%
5697    });
5698  }, [M]), G(() => {
5699    if (n.length > 0) return;
5700    if (q === 0) {
5701      const V = setTimeout(() => {
5702        $t(1);
5703      }, 3e3);
5704      return () => clearTimeout(V);
5705    }
5706    const T = setInterval(() => {
5707      $t((V) => {
5708        const O = V + 1;
5709        return O >= Ee.length ? 1 : O;
5710      });
5711    }, 5e3);
5712    return () => clearInterval(T);
5713  }, [Ee.length, q, n.length]), G(() => {
5714    console.log("Initializing synthesized typewriter audio..."), Z.current = Sd(), console.log("Synthesized audio ready!");
5715  }, []);
5716  const _t = (T) => {
5717    if (!(!U || !Z.current))
5718      try {
5719        if (Pd(), T === "keystroke") {
5720          const V = Math.floor(Math.random() * 4);
5721          Z.current.playKeystroke(V);
5722        } else T === "bell" ? Z.current.playBell() : T === "crumple" && Z.current.playCrumple();
5723      } catch (V) {
5724        console.error("Sound playback error:", V);
5725      }
5726  }, yo = (T) => {
5727    if (h(Date.now()), k(!1), T.key === "Backspace") {
5728      if (T.preventDefault(), n.length === 0) return;
5729      if (A)
5730        s((V) => V.slice(0, -1)), _t("keystroke");
5731      else {
5732        let V = -1;
5733        for (let O = n.length - 1; O >= 0; O--)
5734          if (!n[O].struck && n[O].char !== `
5735`) {
5736            V = O;
5737            break;
5738          }
5739        if (V === -1) return;
5740        s((O) => {
5741          const xt = [...O];
5742          return xt[V] = { ...xt[V], struck: !0 }, xt;
5743        }), _t("keystroke");
5744      }
5745    } else T.key === "Enter" ? (T.preventDefault(), s((V) => [...V, { char: `
5746`, struck: !1, id: Math.random().toString(36), timestamp: Date.now() }]), $(!0), setTimeout(() => $(!1), 300), _t("bell")) : T.key.length === 1 && !T.ctrlKey && !T.metaKey && (T.preventDefault(), s((V) => [...V, { char: T.key, struck: !1, id: Math.random().toString(36), timestamp: Date.now() }]), _t("keystroke"));
5747  }, xo = async () => {
5748    if (I.current) {
5749      o(!0);
5750      try {
5751        const V = await wd(I.current, {
5752          quality: 0.95,
5753          backgroundColor: "#fcfaf7",
5754          pixelRatio: 3.125
5755        }), O = document.createElement("a");
5756        O.download = `close-typing-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.jpg`, O.href = V, O.click();
5757      } catch (T) {
5758        console.error("Export failed", T);
5759      } finally {
5760        o(!1);
5761      }
5762    }
5763  }, vo = () => {
5764    const T = n.map((xt) => xt.struck ? "" : xt.char).join(""), V = new Blob([T], { type: "text/plain" }), O = document.createElement("a");
5765    O.download = `close-typing-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.txt`, O.href = URL.createObjectURL(V), O.click();
5766  }, bo = () => {
5767    s([]), u(!1), _t("crumple");
5768  }, wo = mt(() => n.map((V) => V.char).join("").split(/\s+/).filter((V) => V.length > 0).length, [n]), Wt = () => /* @__PURE__ */ f("div", { className: "h-8 w-[1px] bg-stone-800/60 mx-1" });
5769  return /* @__PURE__ */ w("div", { className: "flex flex-col items-center w-full min-h-screen py-12 md:py-24", children: [
5770    /* @__PURE__ */ w("div", { className: "relative w-full max-w-3xl z-10", onClick: () => W.current?.focus(), children: [
5771      /* @__PURE__ */ f("textarea", { ref: W, onKeyDown: yo, onFocus: () => W.current?.focus(), className: "absolute opacity-0 pointer-events-none", autoFocus: !0 }),
5772      /* @__PURE__ */ w(
5773        E.div,
5774        {
5775          ref: I,
5776          animate: B ? { x: [0, -8, 6, -6, 4, -2, 0] } : {},
5777          transition: { duration: 0.3 },
5778          className: `relative w-full shadow-[0_50px_100px_-20px_rgba(0,0,0,0.3)] overflow-hidden cursor-text ${p === "beige" ? "bg-[#e8dcc5]" : p === "manuscript" ? "bg-white" : p === "notebook" ? "bg-[#fdfdfd]" : "bg-[#a9886f]"}`,
5779          style: { minHeight: "600px" },
5780          children: [
5781            /* @__PURE__ */ f(
5782              E.div,
5783              {
5784                initial: { opacity: 0 },
5785                animate: { opacity: M ? 1 : 0 },
5786                transition: { duration: 2, ease: "easeInOut" },
5787                className: "absolute inset-0 pointer-events-none z-[2]",
5788                style: {
5789                  backgroundImage: `
5790                radial-gradient(circle at ${st.spot1X}% ${st.spot1Y}%, rgba(139, 90, 43, 0.18) 0%, transparent 40%),
5791                radial-gradient(circle at ${st.spot2X}% ${st.spot2Y}%, rgba(101, 67, 33, 0.22) 0%, transparent 40%),
5792                radial-gradient(circle at ${st.spot3X}% ${st.spot3Y}%, rgba(120, 80, 40, 0.12) 0%, transparent 60%)
5793              `,
5794                  mixBlendMode: "multiply"
5795                }
5796              },
5797              `aging-${st.spot1X}-${st.spot1Y}`
5798            ),
5799            /* @__PURE__ */ f(
5800              E.div,
5801              {
5802                initial: { opacity: 0 },
5803                animate: { opacity: M ? 0.15 : 0 },
5804                transition: { duration: 2, ease: "easeInOut" },
5805                className: "absolute inset-0 pointer-events-none z-[2]",
5806                style: {
5807                  background: "linear-gradient(180deg, rgba(218, 179, 120, 0.3) 0%, rgba(205, 164, 94, 0.25) 100%)",
5808                  mixBlendMode: "overlay"
5809                }
5810              }
5811            ),
5812            /* @__PURE__ */ f(
5813              E.div,
5814              {
5815                initial: { opacity: 0 },
5816                animate: { opacity: M ? 0.18 : 0 },
5817                transition: { duration: 2, ease: "easeInOut" },
5818                className: "absolute inset-0 pointer-events-none z-[2]",
5819                style: {
5820                  backgroundImage: `url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='5' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E")`,
5821                  mixBlendMode: "overlay"
5822                }
5823              }
5824            ),
5825            /* @__PURE__ */ f("div", { className: "absolute inset-0 pointer-events-none opacity-[0.03] mix-blend-multiply noise-overlay z-0" }),
5826            p === "beige" && /* @__PURE__ */ f("div", { className: "absolute inset-0 pointer-events-none opacity-[0.08] mix-blend-multiply z-0", style: { backgroundImage: "radial-gradient(circle at 20% 30%, rgba(139, 90, 43, 0.15) 0%, transparent 50%), radial-gradient(circle at 80% 70%, rgba(101, 67, 33, 0.12) 0%, transparent 50%)" } }),
5827            p === "manuscript" && /* @__PURE__ */ w(Ge, { children: [
5828              /* @__PURE__ */ f("div", { className: "absolute left-12 md:left-16 top-0 bottom-0 w-[2px] bg-red-400/40 z-[1]" }),
5829              /* @__PURE__ */ f("div", { className: "absolute right-12 md:right-16 top-0 bottom-0 w-[2px] bg-red-400/40 z-[1]" })
5830            ] }),
5831            p === "notebook" && /* @__PURE__ */ f(
5832              "div",
5833              {
5834                className: "absolute inset-0 z-[1]",
5835                style: {
5836                  backgroundImage: "repeating-linear-gradient(transparent, transparent calc(28px - 1px), rgba(147, 197, 253, 0.15) calc(28px - 1px), rgba(147, 197, 253, 0.15) 28px)",
5837                  backgroundSize: "100% 28px",
5838                  backgroundPosition: "0 12px"
5839                }
5840              }
5841            ),
5842            p === "kraft" && /* @__PURE__ */ w(Ge, { children: [
5843              /* @__PURE__ */ f(
5844                "div",
5845                {
5846                  className: "absolute inset-0 z-[1] opacity-30",
5847                  style: {
5848                    backgroundImage: `url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='kraftTexture'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='2.5' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23kraftTexture)'/%3E%3C/svg%3E")`,
5849                    mixBlendMode: "multiply"
5850                  }
5851                }
5852              ),
5853              /* @__PURE__ */ f(
5854                "div",
5855                {
5856                  className: "absolute inset-0 pointer-events-none opacity-20 z-[1]",
5857                  style: {
5858                    backgroundImage: "radial-gradient(circle at 25% 40%, rgba(90, 65, 45, 0.4) 0%, transparent 35%), radial-gradient(circle at 75% 60%, rgba(80, 58, 42, 0.3) 0%, transparent 40%), radial-gradient(circle at 50% 80%, rgba(95, 70, 50, 0.25) 0%, transparent 45%)"
5859                  }
5860                }
5861              )
5862            ] }),
5863            /* @__PURE__ */ w("div", { className: "relative z-10 p-8 px-6 md:p-24 h-full overflow-y-auto custom-scrollbar", style: {
5864              wordBreak: "break-word",
5865              overflowWrap: "break-word",
5866              hyphens: "auto",
5867              WebkitHyphens: "auto",
5868              MozHyphens: "auto"
5869            }, children: [
5870              n.length === 0 && /* @__PURE__ */ f("div", { className: "absolute inset-0 flex items-center justify-center pointer-events-none", children: /* @__PURE__ */ f("div", { className: "relative h-8 overflow-hidden px-4", children: /* @__PURE__ */ f(dt, { mode: "wait", children: /* @__PURE__ */ f(
5871                E.p,
5872                {
5873                  initial: { opacity: 0, y: 20 },
5874                  animate: { opacity: 1, y: 0 },
5875                  exit: { opacity: 0, y: -20 },
5876                  transition: { duration: 0.8, ease: [0.22, 1, 0.36, 1] },
5877                  className: "text-stone-400/50 italic text-lg md:text-xl font-serif text-center",
5878                  children: Ee[q]
5879                },
5880                q
5881              ) }) }) }),
5882              n.map((T) => /* @__PURE__ */ f(Md, { char: T.char, isSpace: T.char === " ", isCurrentLine: !0, charIndex: 0, struck: T.struck, fontFamily: Pi[b], isNeglected: d, showAging: x, age: 0, timestamp: T.timestamp, currentTime: Date.now(), paperAged: M }, T.id)),
5883              /* @__PURE__ */ f(
5884                E.span,
5885                {
5886                  animate: { opacity: [1, 1, 0, 0] },
5887                  transition: { duration: 1.6, repeat: 1 / 0, ease: "linear" },
5888                  className: "inline-block w-[2px] h-[1.2em] bg-stone-900/70 ml-[1px]"
5889                }
5890              )
5891            ] })
5892          ]
5893        }
5894      )
5895    ] }),
5896    /* @__PURE__ */ f(dt, { children: !e && /* @__PURE__ */ w(
5897      E.div,
5898      {
5899        initial: { opacity: 0, y: 20 },
5900        animate: { opacity: 1, y: 0 },
5901        exit: { opacity: 0, y: 20 },
5902        className: "w-full max-w-3xl mt-12 flex flex-col items-center z-20",
5903        children: [
5904          /* @__PURE__ */ w("div", { className: "bg-[#0c0c0c] border border-stone-800/80 rounded-3xl md:rounded-full h-auto md:h-16 w-full flex flex-col md:flex-row items-stretch md:items-center p-4 md:p-0 md:px-4 shadow-2xl overflow-hidden gap-3 md:gap-0", children: [
5905            /* @__PURE__ */ f(
5906              "button",
5907              {
5908                onClick: () => le(!U),
5909                className: "flex items-center justify-between md:justify-start gap-3 px-4 md:px-6 py-3 md:py-0 md:h-full rounded-xl md:rounded-none bg-stone-900/20 md:bg-transparent hover:bg-white/[0.02] transition-all group",
5910                children: /* @__PURE__ */ w("div", { className: "flex items-center gap-2", children: [
5911                  /* @__PURE__ */ f(
5912                    E.div,
5913                    {
5914                      animate: {
5915                        backgroundColor: U ? "#ffc273" : "#57534e",
5916                        boxShadow: U ? ["0 0 0px rgba(255, 194, 115, 0)", "0 0 12px rgba(255, 194, 115, 0.8)", "0 0 0px rgba(255, 194, 115, 0)"] : "0 0 0px rgba(255, 194, 115, 0)"
5917                      },
5918                      transition: {
5919                        boxShadow: {
5920                          duration: 2,
5921                          repeat: 1 / 0,
5922                          ease: "easeInOut"
5923                        },
5924                        backgroundColor: {
5925                          duration: 0.3
5926                        }
5927                      },
5928                      className: "w-2 h-2 rounded-full"
5929                    }
5930                  ),
5931                  /* @__PURE__ */ f("span", { className: `text-[11px] md:text-[9px] font-bold tracking-[0.2em] uppercase transition-colors ${U ? "text-stone-100" : "text-stone-600"}`, children: U ? "Acoustics" : "Muted" })
5932                ] })
5933              }
5934            ),
5935            /* @__PURE__ */ f("div", { className: "hidden md:block", children: /* @__PURE__ */ f(Wt, {}) }),
5936            /* @__PURE__ */ w("div", { className: "flex items-center gap-4 md:gap-0 w-full md:w-auto", children: [
5937              /* @__PURE__ */ w("div", { className: "flex items-center justify-between md:justify-start gap-3 px-4 md:px-6 py-3 md:py-0 md:h-full flex-1 md:flex-initial rounded-xl md:rounded-none bg-stone-900/20 md:bg-transparent", children: [
5938                /* @__PURE__ */ f("span", { className: "text-[11px] md:text-[9px] font-bold tracking-[0.2em] uppercase text-stone-600", children: "Words" }),
5939                /* @__PURE__ */ f("span", { className: "text-stone-100 font-mono text-sm md:text-xs tabular-nums", children: wo.toString().padStart(3, "0") })
5940              ] }),
5941              /* @__PURE__ */ f("div", { className: "hidden md:block", children: /* @__PURE__ */ f(Wt, {}) }),
5942              /* @__PURE__ */ f("div", { className: "flex items-center justify-between md:justify-start gap-3 px-4 md:px-6 py-3 md:py-0 md:h-full flex-1 md:flex-initial rounded-xl md:rounded-none bg-stone-900/20 md:bg-transparent relative", children: /* @__PURE__ */ f(
5943                E.span,
5944                {
5945                  className: "text-[11px] md:text-[9px] font-bold tracking-[0.2em] uppercase transition-all duration-300 relative z-10",
5946                  animate: {
5947                    color: ae ? "#ffc273" : "#57534e",
5948                    textShadow: ae ? ["0 0 0px rgba(255, 194, 115, 0)", "0 0 12px rgba(255, 194, 115, 0.8)", "0 0 0px rgba(255, 194, 115, 0)"] : "0 0 0px rgba(255, 194, 115, 0)"
5949                  },
5950                  transition: {
5951                    textShadow: {
5952                      duration: 2,
5953                      repeat: 1 / 0,
5954                      ease: "easeInOut"
5955                    },
5956                    color: {
5957                      duration: 0.3
5958                    }
5959                  },
5960                  children: "Drying"
5961                }
5962              ) })
5963            ] }),
5964            /* @__PURE__ */ f("div", { className: "hidden md:block", children: /* @__PURE__ */ f(Wt, {}) }),
5965            /* @__PURE__ */ w("div", { className: "flex items-center gap-2 w-full md:w-auto", children: [
5966              /* @__PURE__ */ w("div", { className: "flex items-center gap-2 px-2 md:px-4 py-2 md:py-0 md:h-full flex-1 md:flex-initial justify-center rounded-xl md:rounded-none bg-stone-900/20 md:bg-transparent", children: [
5967                /* @__PURE__ */ w("button", { onClick: vo, className: "group relative p-3 md:p-3 text-stone-600 hover:text-stone-200 transition-all", children: [
5968                  /* @__PURE__ */ f(gh, { className: "w-5 h-5 md:w-4 md:h-4" }),
5969                  /* @__PURE__ */ f("span", { className: "absolute -top-10 left-1/2 -translate-x-1/2 opacity-0 group-hover:opacity-100 transition-all duration-300 bg-stone-800 text-[10px] md:text-[9px] px-2 py-1 rounded-sm border border-stone-700 text-stone-100 uppercase whitespace-nowrap pointer-events-none z-50", children: "Export TXT" })
5970                ] }),
5971                /* @__PURE__ */ w("button", { onClick: xo, className: "group relative p-3 md:p-3 text-stone-600 hover:text-stone-200 transition-all", children: [
5972                  /* @__PURE__ */ f(bh, { className: "w-5 h-5 md:w-4 md:h-4" }),
5973                  /* @__PURE__ */ f("span", { className: "absolute -top-10 left-1/2 -translate-x-1/2 opacity-0 group-hover:opacity-100 transition-all duration-300 bg-stone-800 text-[10px] md:text-[9px] px-2 py-1 rounded-sm border border-stone-700 text-stone-100 uppercase whitespace-nowrap pointer-events-none z-50", children: "Export JPG" })
5974                ] })
5975              ] }),
5976              /* @__PURE__ */ f("div", { className: "hidden md:block", children: /* @__PURE__ */ f(Wt, {}) }),
5977              /* @__PURE__ */ w(
5978                "button",
5979                {
5980                  onClick: () => u(!0),
5981                  className: "flex items-center justify-center gap-2 px-4 md:px-4 py-3 md:py-0 md:h-full hover:bg-white/[0.02] transition-colors group flex-1 md:flex-initial rounded-xl md:rounded-none bg-stone-900/20 md:bg-transparent",
5982                  children: [
5983                    /* @__PURE__ */ f(Mh, { className: "w-4 h-4 md:w-3.5 md:h-3.5 text-stone-600 group-hover:text-red-400 transition-colors" }),
5984                    /* @__PURE__ */ f("span", { className: "text-[11px] md:text-[9px] font-bold tracking-[0.2em] uppercase text-stone-600 group-hover:text-red-400 transition-colors", children: "Crumple" })
5985                  ]
5986                }
5987              ),
5988              /* @__PURE__ */ f("div", { className: "hidden md:block", children: /* @__PURE__ */ f(Wt, {}) }),
5989              /* @__PURE__ */ f(
5990                "button",
5991                {
5992                  onClick: () => a(!0),
5993                  className: "flex items-center justify-center px-4 md:px-6 py-3 md:py-0 md:h-full hover:bg-white/[0.02] transition-colors group rounded-xl md:rounded-none bg-stone-900/20 md:bg-transparent",
5994                  children: /* @__PURE__ */ f(Ph, { className: "w-5 h-5 md:w-4 md:h-4 text-stone-600 group-hover:text-stone-200 transition-colors" })
5995                }
5996              )
5997            ] })
5998          ] }),
5999          /* @__PURE__ */ w("div", { className: "mt-12 grid grid-cols-1 md:grid-cols-2 gap-6 w-full", children: [
6000            /* @__PURE__ */ w("div", { className: "flex flex-col items-center gap-4 bg-stone-900/40 backdrop-blur-md p-6 rounded-3xl border border-stone-800/50 shadow-xl", children: [
6001              /* @__PURE__ */ f("span", { className: "text-xs md:text-[10px] font-bold uppercase tracking-[0.3em] md:tracking-[0.4em] text-stone-500", children: "Paper Type" }),
6002              /* @__PURE__ */ f("div", { className: "flex items-center justify-between gap-4 w-full px-2", children: ["beige", "manuscript", "notebook", "kraft"].map((T, V) => {
6003                const O = { beige: "Antique", manuscript: "Manuscript", notebook: "Journal", kraft: "Kraft" };
6004                return /* @__PURE__ */ w("div", { className: "flex flex-col items-center gap-1", children: [
6005                  /* @__PURE__ */ w("button", { onClick: () => g(T), className: `group relative w-16 h-11 md:w-14 md:h-9 border-2 transition-all rounded-lg overflow-hidden ${p === T ? "border-[#ffc273] ring-4 ring-[#ffc273]/10" : "border-stone-700 opacity-50 hover:opacity-100"}`, children: [
6006                    /* @__PURE__ */ f("span", { className: "absolute -top-20 left-1/2 -translate-x-1/2 w-48 opacity-0 group-hover:opacity-100 transition-all duration-300 bg-stone-800 text-[10px] md:text-[9px] px-3 py-2 rounded-sm border border-stone-700 text-stone-100 text-center whitespace-normal z-30 pointer-events-none", children: {
6007                      beige: "Warm aged paper with subtle character",
6008                      manuscript: "Clean white with red margin guides",
6009                      notebook: "Faint horizontal blue rules",
6010                      kraft: "Organic brown paper with rich texture"
6011                    }[T] }),
6012                    /* @__PURE__ */ f("div", { className: `absolute inset-0 ${T === "beige" ? "bg-[#e8dcc5]" : T === "kraft" ? "bg-[#a9886f]" : "bg-white"}` }),
6013                    T === "manuscript" && /* @__PURE__ */ f("div", { className: "absolute left-1.5 top-0 bottom-0 w-[1px] bg-red-100" }),
6014                    T === "notebook" && /* @__PURE__ */ f("div", { className: "absolute inset-0", style: { backgroundImage: "repeating-linear-gradient(transparent, transparent 3px, #e2e8f0 3px, #e2e8f0 4px)", backgroundSize: "100% 4px" } })
6015                  ] }),
6016                  /* @__PURE__ */ f("span", { className: `text-[10px] md:text-[9px] uppercase tracking-widest transition-colors ${p === T ? "text-[#ffc273] font-bold" : "text-stone-600"}`, children: O[T] })
6017                ] }, T);
6018              }) })
6019            ] }),
6020            /* @__PURE__ */ w("div", { className: "flex flex-col items-center gap-4 bg-stone-900/40 backdrop-blur-md p-6 rounded-3xl border border-stone-800/50 shadow-xl", children: [
6021              /* @__PURE__ */ f("span", { className: "text-xs md:text-[10px] font-bold uppercase tracking-[0.3em] md:tracking-[0.4em] text-stone-500", children: "Typeface" }),
6022              /* @__PURE__ */ f("div", { className: "flex items-center gap-6", children: ["courier", "vintage", "technical", "classic"].map((T) => /* @__PURE__ */ w("button", { onClick: () => y(T), className: `group relative flex flex-col items-center gap-1 transition-all ${b === T ? "text-[#ffc273]" : "text-stone-500 hover:text-stone-300"}`, children: [
6023                /* @__PURE__ */ f("span", { className: "absolute -top-14 md:-top-12 left-1/2 -translate-x-1/2 opacity-0 group-hover:opacity-100 transition-all duration-300 bg-stone-800 text-xs md:text-[10px] px-3 md:px-2 py-2 md:py-1 rounded-sm border border-stone-700 text-stone-100 uppercase whitespace-nowrap z-30", children: T === "courier" ? "Cutive Mono" : T === "vintage" ? "Special Elite" : T === "technical" ? "IBM Plex Mono" : "Courier Prime" }),
6024                /* @__PURE__ */ f("span", { className: "text-3xl md:text-2xl font-bold", style: { fontFamily: Pi[T] }, children: "Aa" }),
6025                /* @__PURE__ */ f("span", { className: "text-[10px] md:text-[9px] font-bold uppercase tracking-widest", children: T === "courier" ? "default" : T })
6026              ] }, T)) })
6027            ] })
6028          ] })
6029        ]
6030      }
6031    ) }),
6032    /* @__PURE__ */ f(dt, { children: r && /* @__PURE__ */ w("div", { className: "fixed inset-0 z-[100] flex items-center justify-center p-4", children: [
6033      /* @__PURE__ */ f(E.div, { initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, onClick: () => a(!1), className: "absolute inset-0 bg-stone-950/95 backdrop-blur-2xl" }),
6034      /* @__PURE__ */ w(E.div, { initial: { opacity: 0, scale: 0.95, y: 20 }, animate: { opacity: 1, scale: 1, y: 0 }, exit: { opacity: 0, scale: 0.95, y: 20 }, className: "relative w-full max-w-md bg-[#111] border border-stone-800 rounded-3xl shadow-2xl flex flex-col max-h-[85vh] overflow-hidden", children: [
6035        /* @__PURE__ */ w("div", { className: "flex items-center justify-between p-8 pb-6", children: [
6036          /* @__PURE__ */ f("h3", { className: "text-stone-100 font-bold tracking-[0.3em] uppercase text-[10px]", children: "Mechanical Settings" }),
6037          /* @__PURE__ */ f("button", { onClick: () => a(!1), className: "p-2 text-stone-600 hover:text-stone-100 transition-colors", children: /* @__PURE__ */ f(kh, { className: "w-5 h-5" }) })
6038        ] }),
6039        /* @__PURE__ */ f("div", { className: "flex-1 overflow-y-auto px-8 pb-8 space-y-6 custom-scrollbar", children: /* @__PURE__ */ w("div", { className: "space-y-4", children: [
6040          /* @__PURE__ */ w("div", { className: "p-6 bg-[#0a0a0a] rounded-2xl border border-stone-800/50 flex items-center justify-between gap-4", children: [
6041            /* @__PURE__ */ w("div", { className: "flex-1", children: [
6042              /* @__PURE__ */ f("h4", { className: "text-stone-200 text-[10px] font-bold uppercase tracking-[0.2em]", children: "Natural Aging" }),
6043              /* @__P
6043URE__ */ f("p", { className: "text-stone-600 text-[9px] mt-1.5 italic leading-snug", children: "Ink fades after 20 seconds; paper ages after 45 seconds of inactivity." })
6044            ] }),
6045            /* @__PURE__ */ f("button", { onClick: () => v(!x), className: `w-12 h-6 rounded-full relative transition-all flex-shrink-0 ${x ? "bg-[#ffc273]" : "bg-stone-800"}`, children: /* @__PURE__ */ f(E.div, { animate: { x: x ? 24 : 2 }, className: `absolute top-1 w-4 h-4 rounded-full ${x ? "bg-stone-950" : "bg-stone-400"}` }) })
6046          ] }),
6047          /* @__PURE__ */ w("div", { className: "p-6 bg-[#0a0a0a] rounded-2xl border border-stone-800/50 flex items-center justify-between gap-4", children: [
6048            /* @__PURE__ */ w("div", { className: "flex-1", children: [
6049              /* @__PURE__ */ f("h4", { className: "text-stone-200 text-[10px] font-bold uppercase tracking-[0.2em]", children: "Mindful Deletion" }),
6050              /* @__PURE__ */ f("p", { className: "text-stone-600 text-[9px] mt-1.5 italic leading-snug", children: "When OFF, backspace creates strikethrough like a real typewriter. When ON, allows normal deletion." })
6051            ] }),
6052            /* @__PURE__ */ f("button", { onClick: () => S(!A), className: `w-12 h-6 rounded-full relative transition-all flex-shrink-0 ${A ? "bg-[#ffc273]" : "bg-stone-800"}`, children: /* @__PURE__ */ f(E.div, { animate: { x: A ? 24 : 2 }, className: `absolute top-1 w-4 h-4 rounded-full ${A ? "bg-stone-950" : "bg-stone-400"}` }) })
6053          ] }),
6054          /* @__PURE__ */ w("div", { className: "p-6 bg-[#0a0a0a] rounded-2xl border border-stone-800/50 flex items-center justify-between gap-4", children: [
6055            /* @__PURE__ */ w("div", { className: "flex-1", children: [
6056              /* @__PURE__ */ f("h4", { className: "text-stone-200 text-[10px] font-bold uppercase tracking-[0.2em]", children: "Acoustics" }),
6057              /* @__PURE__ */ f("p", { className: "text-stone-600 text-[9px] mt-1.5 italic leading-snug", children: "Enable typewriter sounds: keystrokes, carriage return bell, and paper crumple." })
6058            ] }),
6059            /* @__PURE__ */ f("button", { onClick: () => le(!U), className: `w-12 h-6 rounded-full relative transition-all flex-shrink-0 ${U ? "bg-[#ffc273]" : "bg-stone-800"}`, children: /* @__PURE__ */ f(E.div, { animate: { x: U ? 24 : 2 }, className: `absolute top-1 w-4 h-4 rounded-full ${U ? "bg-stone-950" : "bg-stone-400"}` }) })
6060          ] }),
6061          /* @__PURE__ */ f("div", { className: "p-6 bg-[#0a0a0a] rounded-2xl border border-stone-800/50", children: /* @__PURE__ */ w("div", { className: "space-y-2", children: [
6062            /* @__PURE__ */ f("h4", { className: "text-stone-400 text-[10px] font-bold uppercase tracking-[0.2em]", children: "Audio Technology" }),
6063            /* @__PURE__ */ f("p", { className: "text-stone-600 text-[9px] italic leading-snug", children: "Typewriter sounds are synthesized in real-time using the Web Audio API. No external files required — everything runs locally in your browser." })
6064          ] }) })
6065        ] }) }),
6066        /* @__PURE__ */ f("div", { className: "p-6 bg-[#0a0a0a] border-t border-stone-800/50 flex justify-center", children: /* @__PURE__ */ f("button", { onClick: () => a(!1), className: "text-[9px] font-bold uppercase tracking-[0.3em] text-stone-500 py-3 px-10 rounded-full border border-stone-800 hover:bg-stone-800 hover:text-stone-200 active:bg-stone-700 transition-all", children: "Close Desk" }) })
6067      ] })
6068    ] }) }),
6069    /* @__PURE__ */ f(dt, { children: l && /* @__PURE__ */ w("div", { className: "fixed inset-0 z-[100] flex items-center justify-center p-4", children: [
6070      /* @__PURE__ */ f(E.div, { initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, onClick: () => u(!1), className: "absolute inset-0 bg-stone-950/80 backdrop-blur-sm" }),
6071      /* @__PURE__ */ f(E.div, { initial: { opacity: 0, scale: 0.9 }, animate: { opacity: 1, scale: 1 }, exit: { opacity: 0, scale: 0.9 }, className: "relative w-full max-w-xs bg-[#1a1a1a] border border-stone-700 rounded-3xl shadow-2xl p-6", children: /* @__PURE__ */ w("div", { className: "text-center space-y-4", children: [
6072        /* @__PURE__ */ f("h4", { className: "text-stone-300 text-[10px] font-bold uppercase tracking-[0.3em]", children: "Throw away" }),
6073        /* @__PURE__ */ w("div", { className: "flex gap-3 pt-2", children: [
6074          /* @__PURE__ */ f(
6075            "button",
6076            {
6077              onClick: () => u(!1),
6078              className: "flex-1 text-[9px] font-bold uppercase tracking-[0.2em] text-stone-400 py-3 px-4 rounded-full border border-stone-700 hover:bg-stone-800 hover:text-stone-200 active:bg-stone-700 transition-all",
6079              children: "Wait, no!"
6080            }
6081          ),
6082          /* @__PURE__ */ f(
6083            "button",
6084            {
6085              onClick: bo,
6086              className: "flex-1 text-[9px] font-bold uppercase tracking-[0.2em] text-stone-950 bg-red-500 py-3 px-4 rounded-full hover:bg-red-400 active:bg-red-600 transition-all",
6087              children: "Yes"
6088            }
6089          )
6090        ] })
6091      ] }) })
6092    ] }) })
6093  ] });
6094}, kd = ({
6095  text: t,
6096  speed: e = 50,
6097  delay: n = 0,
6098  className: s = "",
6099  cursorClassName: i = "",
6100  onComplete: o,
6101  loop: r = !1
6102}) => {
6103  const [a, l] = D(""), [u, c] = D(0), [h, d] = D(!1), m = To.useRef(null);
6104  return G(() => {
6105    m.current = new Audio("https://www.soundjay.com/misc/sounds/typewriter-key-1.mp3"), m.current && (m.current.volume = 0.2);
6106  }, []), G(() => {
6107    let p;
6108    return n > 0 && u === 0 && !h ? (p = setTimeout(() => {
6109      c(0.1);
6110    }, n), () => clearTimeout(p)) : (u < t.length ? p = setTimeout(() => {
6111      l((g) => g + t[Math.floor(u)]), c((g) => g + 1), m.current && (m.current.currentTime = 0, m.current.playbackRate = 0.8 + Math.random() * 0.4, m.current.play().catch(() => {
6112      }));
6113    }, e) : h || (d(!0), o && o(), r && (p = setTimeout(() => {
6114      l(""), c(0), d(!1);
6115    }, 2e3))), () => clearTimeout(p));
6116  }
6116, [u, t, e, n, h, o, r]), /* @__PURE__ */ w("div", { className: `inline-flex items-baseline ${s}`, children: [
6117    /* @__PURE__ */ f("span", { children: a }),
6118    /* @__PURE__ */ f(
6119      E.span,
6120      {
6121        animate: { opacity: [1, 0, 1] },
6122        transition: {
6123          duration: 0.8,
6124          repeat: 1 / 0,
6125          ease: "linear"
6126        },
6127        className: `inline-block w-[2px] h-[1em] ml-1 bg-current translate-y-[10%] ${i}`
6128      }
6129    )
6130  ] });
6131};
6132function Vd() {
6133  const [t, e] = D(0), [n, s] = D(!1), [i, o] = D(!1), r = ["AN AI-FREE WRITING TOOL", "THE ACT OF CLOSE TYPING"];
6134  return G(() => {
6135    document.title = "Close Typing";
6136    let a = document.querySelector('meta[name="viewport"]');
6137    a || (a = document.createElement("meta"), a.name = "viewport", a.content = "width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0", document.getElementsByTagName("head")[0].appendChild(a));
6138    const l = setInterval(() => {
6139      e((u) => (u + 1) % r.length);
6140    }, 6e3);
6141    return () => {
6142      clearInterval(l);
6143    };
6144  }
6144, []), /* @__PURE__ */ w("div", { className: "min-h-screen bg-[#24211e] relative py-10 md:py-20 px-4 md:px-6 overflow-y-auto overflow-x-hidden", children: [
6145    /* @__PURE__ */ f("style", { children: `
6146          @import url('https://fonts.googleapis.com/css2?family=Special+Elite&family=Cutive+Mono&family=IBM+Plex+Mono:wght@200;300;400;600;700&family=Courier+Prime:wght@400;600;700&display=swap');
6147          
6148          :root {
6149            color-scheme: dark;
6150          }
6151
6152          html, body {
6153            margin: 0;
6154            padding: 0;
6155            width: 100%;
6156            height: 100%;
6157            background: #24211e;
6158            -webkit-tap-highlight-color: transparent;
6159          }
6160          
6161          html {
6162            scroll-behavior: smooth;
6163          }
6164          
6165          .pixel-overlay {
6166            background-image: radial-gradient(#ffffff08 1px, transparent 0);
6167            background-size: 4px 4px;
6168          }
6169          
6170          .noise-overlay {
6171            background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
6172          }
6173
6174          .vignette-overlay {
6175            background: radial-gradient(circle, transparent 20%, rgba(0,0,0,0.3) 100%);
6176          }
6177        ` }),
6178    /* @__PURE__ */ f(
6179      "div",
6180      {
6181        className: "fixed inset-0 pointer-events-none opacity-40 mix-blend-screen blur-[1px]",
6182        style: {
6183          backgroundImage: "url('https://images.unsplash.com/photo-1753849985607-310166f77cc2?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHx3YXJtJTIwZGFyayUyMHdvb2QlMjBkZXNrJTIwdGV4dHVyZXxlbnwxfHx8fDE3NzAzMjkzNTN8MA&ixlib=rb-4.1.0&q=80&w=1080&utm_source=figma&utm_medium=referral')",
6184          backgroundSize: "cover",
6185          backgroundPosition: "center"
6186        }
6187      }
6188    ),
6189    /* @__PURE__ */ f("div", { className: "fixed inset-0 pointer-events-none pixel-overlay opacity-50 mix-blend-overlay" }),
6190    /* @__PURE__ */ f("div", { className: "fixed inset-0 pointer-events-none noise-overlay opacity-[0.05] mix-blend-screen" }),
6191    /* @__PURE__ */ f("div", { className: "fixed inset-0 pointer-events-none vignette-overlay z-50 mix-blend-multiply" }),
6192    /* @__PURE__ */ w("div", { className: "fixed top-6 left-6 z-[60] flex items-center gap-3", children: [
6193      /* @__PURE__ */ f(
6194        "button",
6195        {
6196          onClick: () => o(!i),
6197          className: `w-12 h-6 rounded-full transition-all relative border border-stone-700/50 flex items-center ${i ? "bg-[#ffc273]/20" : "bg-stone-900/50"}`,
6198          children: /* @__PURE__ */ f(
6199            E.div,
6200            {
6201              animate: {
6202                x: i ? 26 : 2,
6203                backgroundColor: i ? "#ffc273" : "#444"
6204              },
6205              className: "absolute top-1 w-4 h-4 rounded-full shadow-lg"
6206            }
6207          )
6208        }
6209      ),
6210      /* @__PURE__ */ f(dt, { children: !i && /* @__PURE__ */ f(
6211        E.span,
6212        {
6213          initial: { opacity: 0, x: -10 },
6214          animate: { opacity: 1, x: 0 },
6215          exit: { opacity: 0, x: -10 },
6216          className: "text-[10px] font-bold text-stone-500 uppercase tracking-[0.3em] hidden md:block",
6217          children: "Distraction Free"
6218        }
6219      ) })
6220    ] }),
6221    /* @__PURE__ */ w("div", { className: "max-w-4xl mx-auto relative z-10", children: [
6222      /* @__PURE__ */ f(dt, { children: !i && /* @__PURE__ */ f(
6223        E.header,
6224        {
6225          initial: { opacity: 0, y: -20 },
6226          animate: { opacity: 1, y: 0 },
6227          exit: { opacity: 0, y: -20, filter: "blur(10px)" },
6228          transition: { duration: 0.8, ease: [0.22, 1, 0.36, 1] },
6229          className: "text-center pt-4 px-4 mb-8",
6230          children: /* @__PURE__ */ w("div", { className: "flex flex-col items-center", children: [
6231            /* @__PURE__ */ w("div", { className: "flex items-center gap-6 mb-10 group cursor-default", children: [
6232              /* @__PURE__ */ f("div", { className: "h-[0.5px] w-16 bg-stone-500/30 transition-all duration-700 group-hover:w-20 group-hover:bg-stone-400/50" }),
6233              /* @__PURE__ */ f("div", { className: "relative h-4 overflow-hidden flex items-center justify-center min-w-[180px]", children: /* @__PURE__ */ f(dt, { mode: "wait", children: /* @__PURE__ */ f(
6234                E.span,
6235                {
6236                  initial: { opacity: 0, y: 15 },
6237                  animate: { opacity: 1, y: 0 },
6238                  exit: { opacity: 0, y: -15 },
6239                  transition: { duration: 0.8, ease: [0.22, 1, 0.36, 1] },
6240                  className: "text-[10px] font-bold text-stone-500 uppercase tracking-[0.4em] whitespace-nowrap",
6241                  children: r[t]
6242                },
6243                t
6244              ) }) }),
6245              /* @__PURE__ */ f("div", { className: "h-[0.5px] w-16 bg-stone-500/30 transition-all duration-700 group-hover:w-20 group-hover:bg-stone-400/50" })
6246            ] }),
6247            /* @__PURE__ */ w("div", { className: "space-y-6", children: [
6248              /* @__PURE__ */ f(
6249                "h1",
6250                {
6251                  className: "text-5xl md:text-8xl font-bold text-stone-100 tracking-tight italic select-none",
6252                  style: { fontFamily: "'Times New Roman', Times, serif" },
6253                  children: /* @__PURE__ */ f(kd, { text: "Close-Typing", speed: 120 })
6254                }
6255              ),
6256              /* @__PURE__ */ w("div", { className: "relative inline-block max-w-3xl px-2 md:px-12", children: [
6257                /* @__PURE__ */ f("p", { className: "text-stone-400/90 md:text-stone-400/80 text-[14px] md:text-[18px] leading-relaxed font-serif italic tracking-wide text-center", children: "The aim of close typing is to reconnect with your written voice. Consider every word. No AI, no spelling suggestions, no backspace. Just a space to slow down, focus on your craft, play with words and see what magic happens." }),
6258                /* @__PURE__ */ f(
6259                  E.div,
6260                  {
6261                    initial: { width: 0, opacity: 0 },
6262                    animate: { width: "100%", opacity: 1 },
6263                    transition: { delay: 1.5, duration: 2, ease: "easeInOut" },
6264                    className: "absolute -bottom-6 left-0 h-[0.5px] bg-gradient-to-r from-transparent via-stone-500/40 to-transparent"
6265                  }
6266                )
6267              ] })
6268            ] })
6269          ] })
6270        }
6271      ) }),
6272      /* @__PURE__ */ f("main", { className: `relative transition-all duration-1000 ${i ? "mt-0" : "mt-8"}`, children: /* @__PURE__ */ f(Ad, { onHasContent: s, hideControls: i }) }),
6273      /* @__PURE__ */ f(dt, { children: !i && /* @__PURE__ */ w(
6274        E.footer,
6275        {
6276          initial: { opacity: 0, y: 20 },
6277          animate: { opacity: 1, y: 0 },
6278          exit: { opacity: 0, y: 20 },
6279          className: "grid grid-cols-1 md:grid-cols-3 gap-12 py-12 border-t border-stone-100/10 mt-12",
6280          children: [
6281            /* @__PURE__ */ w(
6282              E.div,
6283              {
6284                whileHover: { x: 8 },
6285                transition: { type: "spring", stiffness: 400, damping: 10 },
6286                className: "flex flex-col items-center md:items-start gap-4 text-stone-400 group cursor-default",
6287                children: [
6288                  /* @__PURE__ */ w("div", { className: "flex items-center gap-4", children: [
6289                    /* @__PURE__ */ f("div", { className: "h-px w-8 bg-stone-700/50 group-hover:w-12 transition-all duration-700" }),
6290                    /* @__PURE__ */ f(Th, { className: "w-4 h-4 opacity-40 group-hover:opacity-100 transition-opacity" }),
6291                    /* @__PURE__ */ f("div", { className: "h-px w-8 bg-stone-700/50 group-hover:w-12 transition-all duration-700" })
6292                  ] }),
6293                  /* @__PURE__ */ w("div", { className: "text-center md:text-left space-y-1", children: [
6294                    /* @__PURE__ */ f("span", { className: "block text-[11px] font-bold text-stone-200 uppercase tracking-[0.3em]", children: "Mechanical Action" }),
6295                    /* @__PURE__ */ f("span", { className: "block text-[10px] font-mono text-stone-500 uppercase tracking-[0.2em]", children: "Proprietary Ink-Bleed™ Rendering" })
6296                  ] })
6297                ]
6298              }
6299            ),
6300            /* @__PURE__ */ w(
6301              E.div,
6302              {
6303                whileHover: { y: -8 },
6304                transition: { type: "spring", stiffness: 400, damping: 10 },
6305                className: "flex flex-col items-center gap-4 text-stone-400 group cursor-default",
6306                children: [
6307                  /* @__PURE__ */ w("div", { className: "flex items-center gap-4", children: [
6308                    /* @__PURE__ */ f("div", { className: "h-px w-8 bg-stone-700/50 group-hover:w-12 transition-all duration-700" }),
6309                    /* @__PURE__ */ f(mh, { className: "w-4 h-4 opacity-40 group-hover:opacity-100 transition-opacity" }),
6310                    /* @__PURE__ */ f("div", { className: "h-px w-8 bg-stone-700/50 group-hover:w-12 transition-all duration-700" })
6311                  ] }),
6312                  /* @__PURE__ */ w("div", { className: "text-center space-y-1", children: [
6313                    /* @__PURE__ */ f("span", { className: "block text-[11px] font-bold text-stone-200 uppercase tracking-[0.3em]", children: "Dynamic Weight" }),
6314                    /* @__PURE__ */ f("span", { className: "block text-[10px] font-mono text-stone-500 uppercase tracking-[0.2em]", children: "Randomized Strike Pressure" })
6315                  ] })
6316                ]
6317              }
6318            ),
6319            /* @__PURE__ */ w(
6320              E.div,
6321              {
6322                whileHover: { x: -8 },
6323                transition: { type: "spring", stiffness: 400, damping: 10 },
6324                className: "flex flex-col items-center md:items-end gap-4 text-stone-400 group cursor-default",
6325                children: [
6326                  /* @__PURE__ */ w("div", { className: "flex items-center gap-4", children: [
6327                    /* @__PURE__ */ f("div", { className: "h-px w-8 bg-stone-700/50 group-hover:w-12 transition-all duration-700" }),
6328                    /* @__PURE__ */ f(xh, { className: "w-4 h-4 opacity-40 group-hover:opacity-100 transition-opacity" }),
6329                    /* @__PURE__ */ f("div", { className: "h-px w-8 bg-stone-700/50 group-hover:w-12 transition-all duration-700" })
6330                  ] }),
6331                  /* @__PURE__ */ w("div", { className: "text-center md:text-right space-y-1", children: [
6332                    /* @__PURE__ */ f("span", { className: "block text-[11px] font-bold text-stone-200 uppercase tracking-[0.3em]", children: "Carriage Return" }),
6333                    /* @__PURE__ */ f("span", { className: "block text-[10px] font-mono text-stone-500 uppercase tracking-[0.2em]", children: "Auto-Shake Physical Response" })
6334                  ] })
6335                ]
6336              }
6337            )
6338          ]
6339        }
6340      ) }),
6341      !i && /* @__PURE__ */ w("div", { className: "pt-20 pb-10 text-center space-y-6 border-t border-stone-100/5", children: [
6342        /* @__PURE__ */ w("div", { className: "flex flex-col items-center gap-2 opacity-50 hover:opacity-100 transition-opacity duration-700 cursor-default", children: [
6343          /* @__PURE__ */ w("div", { className: "flex items-center gap-3", children: [
6344            /* @__PURE__ */ f("div", { className: "h-px w-6 bg-stone-700" }),
6345            /* @__PURE__ */ f(dh, { className: "w-3 h-3 text-stone-400" }),
6346            /* @__PURE__ */ f("div", { className: "h-px w-6 bg-stone-700" })
6347          ] }),
6348          /* @__PURE__ */ f("span", { className: "text-[10px] font-mono uppercase tracking-[0.4em] text-stone-300", children: "Bookmark for your daily writer's ritual" })
6349        ] }),
6350        /* @__PURE__ */ w("div", { className: "space-y-1", children: [
6351          /* @__PURE__ */ f("p", { className: "text-[10px] font-mono text-stone-500 uppercase tracking-[0.3em]", children: "© 2026 Jessica Hylek / ArtCenter College of Design" }),
6352          /* @__PURE__ */ f("p", { className: "text-[10px] font-mono text-stone-500 uppercase tracking-[0.3em]", children: "CLOSE TYPING prototype for Graphic Lenses: Literature + Design (MFA Thesis)" }),
6353          /* @__PURE__ */ f("p", { className: "text-[9px] font-mono text-stone-600 uppercase tracking-[0.1em] mt-2", children: "Built with Figma + Figma Make (First Draft). Open source: CC-BY-NC 4.0." })
6354        ] })
6355      ] })
6356    ] })
6357  ] });
6358}
6359const Ed = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6360  __proto__: null,
6361  default: Vd
6362}, Symbol.toStringTag, { value: "Module" }));
6363export {
6364  Rd as Code0_8,
6365  Dd as __importModule__
6366};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.