@telegraph/modal 0.0.85 → 0.0.86

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import { jsx as M, jsxs as Ve } from "react/jsx-runtime";
2
2
  import * as J from "@radix-ui/react-dialog";
3
3
  import * as v from "react";
4
- import ne, { createContext as se, useRef as de, useLayoutEffect as Us, useEffect as dt, useState as zs, useContext as I, useMemo as Fe, useCallback as Gs, useInsertionEffect as Hs, forwardRef as Ys, Fragment as Tn, createElement as Xs } from "react";
4
+ import ne, { createContext as se, useRef as fe, useLayoutEffect as Us, useEffect as dt, useState as Gs, useContext as I, useMemo as Fe, useCallback as zs, useInsertionEffect as Hs, forwardRef as Ys, Fragment as Tn, createElement as Xs } from "react";
5
5
  import * as qs from "react-dom";
6
6
  import { FocusScope as Zs } from "@radix-ui/react-focus-scope";
7
7
  import * as Js from "@radix-ui/react-portal";
@@ -130,7 +130,7 @@ function di(e, t = globalThis == null ? void 0 : globalThis.document) {
130
130
  return t.addEventListener("keydown", s, { capture: !0 }), () => t.removeEventListener("keydown", s, { capture: !0 });
131
131
  }, [n, t]);
132
132
  }
133
- var hi = "DismissableLayer", Ge = "dismissableLayer.update", pi = "dismissableLayer.pointerDownOutside", mi = "dismissableLayer.focusOutside", Wt, Vn = v.createContext({
133
+ var hi = "DismissableLayer", He = "dismissableLayer.update", pi = "dismissableLayer.pointerDownOutside", mi = "dismissableLayer.focusOutside", Wt, Vn = v.createContext({
134
134
  layers: /* @__PURE__ */ new Set(),
135
135
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
136
136
  branches: /* @__PURE__ */ new Set()
@@ -162,7 +162,7 @@ var hi = "DismissableLayer", Ge = "dismissableLayer.update", pi = "dismissableLa
162
162
  c && (u.layers.delete(c), u.layersWithOutsidePointerEventsDisabled.delete(c), $t());
163
163
  }, [c, u]), v.useEffect(() => {
164
164
  const x = () => h({});
165
- return document.addEventListener(Ge, x), () => document.removeEventListener(Ge, x);
165
+ return document.addEventListener(He, x), () => document.removeEventListener(He, x);
166
166
  }, []), /* @__PURE__ */ M(
167
167
  xn.div,
168
168
  {
@@ -239,7 +239,7 @@ function vi(e, t = globalThis == null ? void 0 : globalThis.document) {
239
239
  };
240
240
  }
241
241
  function $t() {
242
- const e = new CustomEvent(Ge);
242
+ const e = new CustomEvent(He);
243
243
  document.dispatchEvent(e);
244
244
  }
245
245
  function Cn(e, t, n, { discrete: s }) {
@@ -298,7 +298,7 @@ function Vi(e) {
298
298
  }
299
299
  const Ai = se({});
300
300
  function Ci(e) {
301
- const t = de(null);
301
+ const t = fe(null);
302
302
  return t.current === null && (t.current = e()), t.current;
303
303
  }
304
304
  const pt = typeof window < "u", Mi = pt ? Us : dt, Mn = /* @__PURE__ */ se(null);
@@ -309,13 +309,13 @@ function Ei(e, t) {
309
309
  const n = e.indexOf(t);
310
310
  n > -1 && e.splice(n, 1);
311
311
  }
312
- const Y = (e, t, n) => n > t ? t : n < e ? e : n;
313
- let ie = () => {
314
- }, _ = () => {
312
+ const H = (e, t, n) => n > t ? t : n < e ? e : n;
313
+ let ye = () => {
314
+ }, Y = () => {
315
315
  };
316
- process.env.NODE_ENV !== "production" && (ie = (e, t) => {
316
+ process.env.NODE_ENV !== "production" && (ye = (e, t) => {
317
317
  !e && typeof console < "u" && console.warn(t);
318
- }, _ = (e, t) => {
318
+ }, Y = (e, t) => {
319
319
  if (!e)
320
320
  throw new Error(t);
321
321
  });
@@ -329,7 +329,7 @@ function mt(e) {
329
329
  let t;
330
330
  return () => (t === void 0 && (t = e()), t);
331
331
  }
332
- const re = /* @__NO_SIDE_EFFECTS__ */ (e) => e, Fi = (e, t) => (n) => t(e(n)), Re = (...e) => e.reduce(Fi), Dn = /* @__NO_SIDE_EFFECTS__ */ (e, t, n) => {
332
+ const ie = /* @__NO_SIDE_EFFECTS__ */ (e) => e, Fi = (e, t) => (n) => t(e(n)), Re = (...e) => e.reduce(Fi), Dn = /* @__NO_SIDE_EFFECTS__ */ (e, t, n) => {
333
333
  const s = t - e;
334
334
  return s === 0 ? 1 : (n - e) / s;
335
335
  };
@@ -376,12 +376,12 @@ function Li(e, t, n, s, i) {
376
376
  }
377
377
  function be(e, t, n, s) {
378
378
  if (e === t && n === s)
379
- return re;
379
+ return ie;
380
380
  const i = (r) => Li(r, 0, 1, e, n);
381
381
  return (r) => r === 0 || r === 1 ? r : Ln(i(r), t, s);
382
382
  }
383
383
  const In = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, kn = (e) => (t) => 1 - e(1 - t), Nn = /* @__PURE__ */ be(0.33, 1.53, 0.69, 0.99), gt = /* @__PURE__ */ kn(Nn), Bn = /* @__PURE__ */ In(gt), Kn = (e) => (e *= 2) < 1 ? 0.5 * gt(e) : 0.5 * (2 - Math.pow(2, -10 * (e - 1))), yt = (e) => 1 - Math.sin(Math.acos(e)), Ii = kn(yt), Wn = In(yt), ki = /* @__PURE__ */ be(0.42, 0, 1, 1), Ni = /* @__PURE__ */ be(0, 0, 0.58, 1), $n = /* @__PURE__ */ be(0.42, 0, 0.58, 1), Bi = (e) => Array.isArray(e) && typeof e[0] != "number", _n = (e) => Array.isArray(e) && typeof e[0] == "number", jt = {
384
- linear: re,
384
+ linear: ie,
385
385
  easeIn: ki,
386
386
  easeInOut: $n,
387
387
  easeOut: Ni,
@@ -394,11 +394,11 @@ const In = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, kn
394
394
  anticipate: Kn
395
395
  }, Ki = (e) => typeof e == "string", Ut = (e) => {
396
396
  if (_n(e)) {
397
- _(e.length === 4, "Cubic bezier arrays must contain four numerical values.");
397
+ Y(e.length === 4, "Cubic bezier arrays must contain four numerical values.");
398
398
  const [t, n, s, i] = e;
399
399
  return be(t, n, s, i);
400
400
  } else if (Ki(e))
401
- return _(jt[e] !== void 0, `Invalid easing type '${e}'`), jt[e];
401
+ return Y(jt[e] !== void 0, `Invalid easing type '${e}'`), jt[e];
402
402
  return e;
403
403
  }, Te = [
404
404
  "setup",
@@ -477,7 +477,7 @@ function jn(e, t) {
477
477
  o[Te[C]].cancel(m);
478
478
  }, state: i, steps: o };
479
479
  }
480
- const { schedule: k, cancel: He, state: Ae, steps: Dc } = /* @__PURE__ */ jn(typeof requestAnimationFrame < "u" ? requestAnimationFrame : re, !0);
480
+ const { schedule: k, cancel: Ye, state: Ae } = /* @__PURE__ */ jn(typeof requestAnimationFrame < "u" ? requestAnimationFrame : ie, !0);
481
481
  let Se;
482
482
  function _i() {
483
483
  Se = void 0;
@@ -487,21 +487,21 @@ const L = {
487
487
  set: (e) => {
488
488
  Se = e, queueMicrotask(_i);
489
489
  }
490
- }, Un = (e) => (t) => typeof t == "string" && t.startsWith(e), zn = /* @__PURE__ */ Un("--"), ji = /* @__PURE__ */ Un("var(--"), bt = (e) => ji(e) ? Ui.test(e.split("/*")[0].trim()) : !1, Ui = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, oe = {
490
+ }, Un = (e) => (t) => typeof t == "string" && t.startsWith(e), Gn = /* @__PURE__ */ Un("--"), ji = /* @__PURE__ */ Un("var(--"), bt = (e) => ji(e) ? Ui.test(e.split("/*")[0].trim()) : !1, Ui = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, re = {
491
491
  test: (e) => typeof e == "number",
492
492
  parse: parseFloat,
493
493
  transform: (e) => e
494
- }, pe = {
495
- ...oe,
496
- transform: (e) => Y(0, 1, e)
494
+ }, he = {
495
+ ...re,
496
+ transform: (e) => H(0, 1, e)
497
497
  }, we = {
498
- ...oe,
498
+ ...re,
499
499
  default: 1
500
- }, he = (e) => Math.round(e * 1e5) / 1e5, vt = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
501
- function zi(e) {
500
+ }, de = (e) => Math.round(e * 1e5) / 1e5, vt = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
501
+ function Gi(e) {
502
502
  return e == null;
503
503
  }
504
- const Gi = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, Tt = (e, t) => (n) => !!(typeof n == "string" && Gi.test(n) && n.startsWith(e) || t && !zi(n) && Object.prototype.hasOwnProperty.call(n, t)), Gn = (e, t, n) => (s) => {
504
+ const zi = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, Tt = (e, t) => (n) => !!(typeof n == "string" && zi.test(n) && n.startsWith(e) || t && !Gi(n) && Object.prototype.hasOwnProperty.call(n, t)), zn = (e, t, n) => (s) => {
505
505
  if (typeof s != "string")
506
506
  return s;
507
507
  const [i, r, o, a] = s.match(vt);
@@ -511,13 +511,13 @@ const Gi = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s
511
511
  [n]: parseFloat(o),
512
512
  alpha: a !== void 0 ? parseFloat(a) : 1
513
513
  };
514
- }, Hi = (e) => Y(0, 255, e), We = {
515
- ...oe,
514
+ }, Hi = (e) => H(0, 255, e), We = {
515
+ ...re,
516
516
  transform: (e) => Math.round(Hi(e))
517
- }, U = {
517
+ }, j = {
518
518
  test: /* @__PURE__ */ Tt("rgb", "red"),
519
- parse: /* @__PURE__ */ Gn("red", "green", "blue"),
520
- transform: ({ red: e, green: t, blue: n, alpha: s = 1 }) => "rgba(" + We.transform(e) + ", " + We.transform(t) + ", " + We.transform(n) + ", " + he(pe.transform(s)) + ")"
519
+ parse: /* @__PURE__ */ zn("red", "green", "blue"),
520
+ transform: ({ red: e, green: t, blue: n, alpha: s = 1 }) => "rgba(" + We.transform(e) + ", " + We.transform(t) + ", " + We.transform(n) + ", " + de(he.transform(s)) + ")"
521
521
  };
522
522
  function Yi(e) {
523
523
  let t = "", n = "", s = "", i = "";
@@ -528,26 +528,26 @@ function Yi(e) {
528
528
  alpha: i ? parseInt(i, 16) / 255 : 1
529
529
  };
530
530
  }
531
- const Ye = {
531
+ const Xe = {
532
532
  test: /* @__PURE__ */ Tt("#"),
533
533
  parse: Yi,
534
- transform: U.transform
534
+ transform: j.transform
535
535
  }, ve = /* @__NO_SIDE_EFFECTS__ */ (e) => ({
536
536
  test: (t) => typeof t == "string" && t.endsWith(e) && t.split(" ").length === 1,
537
537
  parse: parseFloat,
538
538
  transform: (t) => `${t}${e}`
539
- }), $ = /* @__PURE__ */ ve("deg"), Q = /* @__PURE__ */ ve("%"), b = /* @__PURE__ */ ve("px"), Xi = /* @__PURE__ */ ve("vh"), qi = /* @__PURE__ */ ve("vw"), zt = {
539
+ }), $ = /* @__PURE__ */ ve("deg"), Q = /* @__PURE__ */ ve("%"), b = /* @__PURE__ */ ve("px"), Xi = /* @__PURE__ */ ve("vh"), qi = /* @__PURE__ */ ve("vw"), Gt = {
540
540
  ...Q,
541
541
  parse: (e) => Q.parse(e) / 100,
542
542
  transform: (e) => Q.transform(e * 100)
543
543
  }, q = {
544
544
  test: /* @__PURE__ */ Tt("hsl", "hue"),
545
- parse: /* @__PURE__ */ Gn("hue", "saturation", "lightness"),
546
- transform: ({ hue: e, saturation: t, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(e) + ", " + Q.transform(he(t)) + ", " + Q.transform(he(n)) + ", " + he(pe.transform(s)) + ")"
545
+ parse: /* @__PURE__ */ zn("hue", "saturation", "lightness"),
546
+ transform: ({ hue: e, saturation: t, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(e) + ", " + Q.transform(de(t)) + ", " + Q.transform(de(n)) + ", " + de(he.transform(s)) + ")"
547
547
  }, E = {
548
- test: (e) => U.test(e) || Ye.test(e) || q.test(e),
549
- parse: (e) => U.test(e) ? U.parse(e) : q.test(e) ? q.parse(e) : Ye.parse(e),
550
- transform: (e) => typeof e == "string" ? e : e.hasOwnProperty("red") ? U.transform(e) : q.transform(e),
548
+ test: (e) => j.test(e) || Xe.test(e) || q.test(e),
549
+ parse: (e) => j.test(e) ? j.parse(e) : q.test(e) ? q.parse(e) : Xe.parse(e),
550
+ transform: (e) => typeof e == "string" ? e : e.hasOwnProperty("red") ? j.transform(e) : q.transform(e),
551
551
  getAnimatableNone: (e) => {
552
552
  const t = E.parse(e);
553
553
  return t.alpha = 0, E.transform(t);
@@ -557,28 +557,28 @@ function Ji(e) {
557
557
  var t, n;
558
558
  return isNaN(e) && typeof e == "string" && (((t = e.match(vt)) == null ? void 0 : t.length) || 0) + (((n = e.match(Zi)) == null ? void 0 : n.length) || 0) > 0;
559
559
  }
560
- const Hn = "number", Yn = "color", Qi = "var", er = "var(", Gt = "${}", tr = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;
561
- function me(e) {
560
+ const Hn = "number", Yn = "color", Qi = "var", er = "var(", zt = "${}", tr = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;
561
+ function pe(e) {
562
562
  const t = e.toString(), n = [], s = {
563
563
  color: [],
564
564
  number: [],
565
565
  var: []
566
566
  }, i = [];
567
567
  let r = 0;
568
- const a = t.replace(tr, (l) => (E.test(l) ? (s.color.push(r), i.push(Yn), n.push(E.parse(l))) : l.startsWith(er) ? (s.var.push(r), i.push(Qi), n.push(l)) : (s.number.push(r), i.push(Hn), n.push(parseFloat(l))), ++r, Gt)).split(Gt);
568
+ const a = t.replace(tr, (l) => (E.test(l) ? (s.color.push(r), i.push(Yn), n.push(E.parse(l))) : l.startsWith(er) ? (s.var.push(r), i.push(Qi), n.push(l)) : (s.number.push(r), i.push(Hn), n.push(parseFloat(l))), ++r, zt)).split(zt);
569
569
  return { values: n, split: a, indexes: s, types: i };
570
570
  }
571
571
  function Xn(e) {
572
- return me(e).values;
572
+ return pe(e).values;
573
573
  }
574
574
  function qn(e) {
575
- const { split: t, types: n } = me(e), s = t.length;
575
+ const { split: t, types: n } = pe(e), s = t.length;
576
576
  return (i) => {
577
577
  let r = "";
578
578
  for (let o = 0; o < s; o++)
579
579
  if (r += t[o], i[o] !== void 0) {
580
580
  const a = n[o];
581
- a === Hn ? r += he(i[o]) : a === Yn ? r += E.transform(i[o]) : r += i[o];
581
+ a === Hn ? r += de(i[o]) : a === Yn ? r += E.transform(i[o]) : r += i[o];
582
582
  }
583
583
  return r;
584
584
  };
@@ -588,7 +588,7 @@ function sr(e) {
588
588
  const t = Xn(e);
589
589
  return qn(e)(t.map(nr));
590
590
  }
591
- const ae = {
591
+ const oe = {
592
592
  test: Ji,
593
593
  parse: Xn,
594
594
  createTransformer: qn,
@@ -619,10 +619,10 @@ function Ce(e, t) {
619
619
  const Oe = (e, t, n) => e + (t - e) * n, _e = (e, t, n) => {
620
620
  const s = e * e, i = n * (t * t - s) + s;
621
621
  return i < 0 ? 0 : Math.sqrt(i);
622
- }, rr = [Ye, U, q], or = (e) => rr.find((t) => t.test(e));
622
+ }, rr = [Xe, j, q], or = (e) => rr.find((t) => t.test(e));
623
623
  function Ht(e) {
624
624
  const t = or(e);
625
- if (ie(!!t, `'${e}' is not an animatable color. Use the equivalent color code instead.`), !t)
625
+ if (ye(!!t, `'${e}' is not an animatable color. Use the equivalent color code instead.`), !t)
626
626
  return !1;
627
627
  let n = t.parse(e);
628
628
  return t === q && (n = ir(n)), n;
@@ -632,10 +632,10 @@ const Yt = (e, t) => {
632
632
  if (!n || !s)
633
633
  return Ce(e, t);
634
634
  const i = { ...n };
635
- return (r) => (i.red = _e(n.red, s.red, r), i.green = _e(n.green, s.green, r), i.blue = _e(n.blue, s.blue, r), i.alpha = Oe(n.alpha, s.alpha, r), U.transform(i));
636
- }, Xe = /* @__PURE__ */ new Set(["none", "hidden"]);
635
+ return (r) => (i.red = _e(n.red, s.red, r), i.green = _e(n.green, s.green, r), i.blue = _e(n.blue, s.blue, r), i.alpha = Oe(n.alpha, s.alpha, r), j.transform(i));
636
+ }, qe = /* @__PURE__ */ new Set(["none", "hidden"]);
637
637
  function ar(e, t) {
638
- return Xe.has(e) ? (n) => n <= 0 ? e : t : (n) => n >= 1 ? t : e;
638
+ return qe.has(e) ? (n) => n <= 0 ? e : t : (n) => n >= 1 ? t : e;
639
639
  }
640
640
  function cr(e, t) {
641
641
  return (n) => Oe(e, t, n);
@@ -670,8 +670,8 @@ function lr(e, t) {
670
670
  return n;
671
671
  }
672
672
  const fr = (e, t) => {
673
- const n = ae.createTransformer(t), s = me(e), i = me(t);
674
- 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 ? Xe.has(e) && !i.values.length || Xe.has(t) && !s.values.length ? ar(e, t) : Re(Zn(lr(s, i), i.values), n) : (ie(!0, `Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`), Ce(e, t));
673
+ const n = oe.createTransformer(t), s = pe(e), i = pe(t);
674
+ return s.indexes.var.length === i.indexes.var.length && s.indexes.color.length === i.indexes.color.length && s.indexes.number.length >= i.indexes.number.length ? qe.has(e) && !i.values.length || qe.has(t) && !s.values.length ? ar(e, t) : Re(Zn(lr(s, i), i.values), n) : (ye(!0, `Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`), Ce(e, t));
675
675
  };
676
676
  function Jn(e, t, n) {
677
677
  return typeof e == "number" && typeof t == "number" && typeof n == "number" ? Oe(e, t, n) : wt(e)(e, t);
@@ -680,7 +680,7 @@ const dr = (e) => {
680
680
  const t = ({ timestamp: n }) => e(n);
681
681
  return {
682
682
  start: (n = !0) => k.update(t, n),
683
- stop: () => He(t),
683
+ stop: () => Ye(t),
684
684
  /**
685
685
  * If we're processing this frame we can use the
686
686
  * framelocked timestamp to keep things in sync.
@@ -743,20 +743,20 @@ const P = {
743
743
  // in seconds
744
744
  minDamping: 0.05,
745
745
  maxDamping: 1
746
- }, Xt = 1e-3;
746
+ }, je = 1e-3;
747
747
  function mr({ duration: e = P.duration, bounce: t = P.bounce, velocity: n = P.velocity, mass: s = P.mass }) {
748
748
  let i, r;
749
- ie(e <= /* @__PURE__ */ N(P.maxDuration), "Spring duration must be 10 seconds or less");
749
+ ye(e <= /* @__PURE__ */ N(P.maxDuration), "Spring duration must be 10 seconds or less");
750
750
  let o = 1 - t;
751
- o = Y(P.minDamping, P.maxDamping, o), e = Y(P.minDuration, P.maxDuration, /* @__PURE__ */ K(e)), o < 1 ? (i = (u) => {
752
- const c = u * o, d = c * e, f = c - n, h = qe(u, o), g = Math.exp(-d);
753
- return Xt - f / h * g;
751
+ o = H(P.minDamping, P.maxDamping, o), e = H(P.minDuration, P.maxDuration, /* @__PURE__ */ K(e)), o < 1 ? (i = (u) => {
752
+ const c = u * o, d = c * e, f = c - n, h = Ze(u, o), g = Math.exp(-d);
753
+ return je - f / h * g;
754
754
  }, r = (u) => {
755
- const d = u * o * e, f = d * n + n, h = Math.pow(o, 2) * Math.pow(u, 2) * e, g = Math.exp(-d), y = qe(Math.pow(u, 2), o);
756
- return (-i(u) + Xt > 0 ? -1 : 1) * ((f - h) * g) / y;
755
+ const d = u * o * e, f = d * n + n, h = Math.pow(o, 2) * Math.pow(u, 2) * e, g = Math.exp(-d), y = Ze(Math.pow(u, 2), o);
756
+ return (-i(u) + je > 0 ? -1 : 1) * ((f - h) * g) / y;
757
757
  }) : (i = (u) => {
758
758
  const c = Math.exp(-u * e), d = (u - n) * e + 1;
759
- return -1e-3 + c * d;
759
+ return -je + c * d;
760
760
  }, r = (u) => {
761
761
  const c = Math.exp(-u * e), d = (n - u) * (e * e);
762
762
  return c * d;
@@ -784,11 +784,11 @@ function yr(e, t, n) {
784
784
  s = s - e(s) / t(s);
785
785
  return s;
786
786
  }
787
- function qe(e, t) {
787
+ function Ze(e, t) {
788
788
  return e * Math.sqrt(1 - t * t);
789
789
  }
790
790
  const br = ["duration", "bounce"], vr = ["stiffness", "damping", "mass"];
791
- function qt(e, t) {
791
+ function Xt(e, t) {
792
792
  return t.some((n) => e[n] !== void 0);
793
793
  }
794
794
  function Tr(e) {
@@ -800,9 +800,9 @@ function Tr(e) {
800
800
  isResolvedFromDuration: !1,
801
801
  ...e
802
802
  };
803
- if (!qt(e, vr) && qt(e, br))
803
+ if (!Xt(e, vr) && Xt(e, br))
804
804
  if (e.visualDuration) {
805
- const n = e.visualDuration, s = 2 * Math.PI / (n * 1.2), i = s * s, r = 2 * Y(0.05, 1, 1 - (e.bounce || 0)) * Math.sqrt(i);
805
+ const n = e.visualDuration, s = 2 * Math.PI / (n * 1.2), i = s * s, r = 2 * H(0.05, 1, 1 - (e.bounce || 0)) * Math.sqrt(i);
806
806
  t = {
807
807
  ...t,
808
808
  mass: P.mass,
@@ -833,7 +833,7 @@ function Pe(e = P.visualDuration, t = P.bounce) {
833
833
  s || (s = V ? P.restSpeed.granular : P.restSpeed.default), i || (i = V ? P.restDelta.granular : P.restDelta.default);
834
834
  let m;
835
835
  if (y < 1) {
836
- const w = qe(p, y);
836
+ const w = Ze(p, y);
837
837
  m = (A) => {
838
838
  const x = Math.exp(-y * p * A);
839
839
  return o - x * ((g + y * p * T) / w * Math.sin(w * A) + T * Math.cos(w * A));
@@ -874,7 +874,7 @@ Pe.applyToOptions = (e) => {
874
874
  const t = hr(e, 100, Pe);
875
875
  return e.ease = t.ease, e.duration = /* @__PURE__ */ N(t.duration), e.type = "keyframes", e;
876
876
  };
877
- function Ze({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: s = 325, bounceDamping: i = 10, bounceStiffness: r = 500, modifyTarget: o, min: a, max: l, restDelta: u = 0.5, restSpeed: c }) {
877
+ function Je({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: s = 325, bounceDamping: i = 10, bounceStiffness: r = 500, modifyTarget: o, min: a, max: l, restDelta: u = 0.5, restSpeed: c }) {
878
878
  const d = e[0], f = {
879
879
  done: !1,
880
880
  value: d
@@ -911,7 +911,7 @@ function wr(e, t, n) {
911
911
  for (let o = 0; o < r; o++) {
912
912
  let a = i(e[o], e[o + 1]);
913
913
  if (t) {
914
- const l = Array.isArray(t) ? t[o] || re : t;
914
+ const l = Array.isArray(t) ? t[o] || ie : t;
915
915
  a = Re(l, a);
916
916
  }
917
917
  s.push(a);
@@ -920,7 +920,7 @@ function wr(e, t, n) {
920
920
  }
921
921
  function Sr(e, t, { clamp: n = !0, ease: s, mixer: i } = {}) {
922
922
  const r = e.length;
923
- if (_(r === t.length, "Both input and output ranges must be the same length"), r === 1)
923
+ if (Y(r === t.length, "Both input and output ranges must be the same length"), r === 1)
924
924
  return () => t[0];
925
925
  if (r === 2 && t[0] === t[1])
926
926
  return () => t[1];
@@ -936,7 +936,7 @@ function Sr(e, t, { clamp: n = !0, ease: s, mixer: i } = {}) {
936
936
  const f = /* @__PURE__ */ Dn(e[d], e[d + 1], c);
937
937
  return a[d](f);
938
938
  };
939
- return n ? (c) => u(Y(e[0], e[r - 1], c)) : u;
939
+ return n ? (c) => u(H(e[0], e[r - 1], c)) : u;
940
940
  }
941
941
  function xr(e, t) {
942
942
  const n = e[e.length - 1];
@@ -978,8 +978,8 @@ function xt(e, { repeat: t, repeatType: n = "loop" }, s, i = 1) {
978
978
  return !a || s === void 0 ? r[a] : s;
979
979
  }
980
980
  const Pr = {
981
- decay: Ze,
982
- inertia: Ze,
981
+ decay: Je,
982
+ inertia: Je,
983
983
  tween: Z,
984
984
  keyframes: Z,
985
985
  spring: Pe
@@ -1026,7 +1026,7 @@ class At extends Vt {
1026
1026
  const { type: n = Z, repeat: s = 0, repeatDelay: i = 0, repeatType: r, velocity: o = 0 } = t;
1027
1027
  let { keyframes: a } = t;
1028
1028
  const l = n || Z;
1029
- process.env.NODE_ENV !== "production" && l !== Z && _(a.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`), l !== Z && typeof a[0] != "number" && (this.mixKeyframes = Re(Er, Jn(a[0], a[1])), a = [0, 100]);
1029
+ process.env.NODE_ENV !== "production" && l !== Z && Y(a.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`), l !== Z && typeof a[0] != "number" && (this.mixKeyframes = Re(Er, Jn(a[0], a[1])), a = [0, 100]);
1030
1030
  const u = l({ ...t, keyframes: a });
1031
1031
  r === "mirror" && (this.mirroredGenerator = l({
1032
1032
  ...t,
@@ -1052,14 +1052,14 @@ class At extends Vt {
1052
1052
  if (d) {
1053
1053
  const S = Math.min(this.currentTime, i) / a;
1054
1054
  let D = Math.floor(S), F = S % 1;
1055
- !F && S >= 1 && (F = 1), F === 1 && D--, D = Math.min(D, d + 1), !!(D % 2) && (f === "reverse" ? (F = 1 - F, h && (F -= h / a)) : f === "mirror" && (C = o)), m = Y(0, 1, F) * a;
1055
+ !F && S >= 1 && (F = 1), F === 1 && D--, D = Math.min(D, d + 1), !!(D % 2) && (f === "reverse" ? (F = 1 - F, h && (F -= h / a)) : f === "mirror" && (C = o)), m = H(0, 1, F) * a;
1056
1056
  }
1057
1057
  const w = V ? { done: !1, value: c[0] } : C.next(m);
1058
1058
  r && (w.value = r(w.value));
1059
1059
  let { done: A } = w;
1060
1060
  !V && l !== null && (A = this.playbackSpeed >= 0 ? this.currentTime >= i : this.currentTime <= 0);
1061
1061
  const x = this.holdTime === null && (this.state === "finished" || this.state === "running" && A);
1062
- return x && g !== Ze && (w.value = xt(c, this.options, T, this.speed)), y && y(w.value), x && this.finish(), w;
1062
+ return x && g !== Je && (w.value = xt(c, this.options, T, this.speed)), y && y(w.value), x && this.finish(), w;
1063
1063
  }
1064
1064
  /**
1065
1065
  * Allows the returned animation to be awaited or promise-chained. Currently
@@ -1128,9 +1128,9 @@ function Dr(e) {
1128
1128
  for (let t = 1; t < e.length; t++)
1129
1129
  e[t] ?? (e[t] = e[t - 1]);
1130
1130
  }
1131
- const z = (e) => e * 180 / Math.PI, Je = (e) => {
1132
- const t = z(Math.atan2(e[1], e[0]));
1133
- return Qe(t);
1131
+ const U = (e) => e * 180 / Math.PI, Qe = (e) => {
1132
+ const t = U(Math.atan2(e[1], e[0]));
1133
+ return et(t);
1134
1134
  }, Fr = {
1135
1135
  x: 4,
1136
1136
  y: 5,
@@ -1139,35 +1139,35 @@ const z = (e) => e * 180 / Math.PI, Je = (e) => {
1139
1139
  scaleX: 0,
1140
1140
  scaleY: 3,
1141
1141
  scale: (e) => (Math.abs(e[0]) + Math.abs(e[3])) / 2,
1142
- rotate: Je,
1143
- rotateZ: Je,
1144
- skewX: (e) => z(Math.atan(e[1])),
1145
- skewY: (e) => z(Math.atan(e[2])),
1142
+ rotate: Qe,
1143
+ rotateZ: Qe,
1144
+ skewX: (e) => U(Math.atan(e[1])),
1145
+ skewY: (e) => U(Math.atan(e[2])),
1146
1146
  skew: (e) => (Math.abs(e[1]) + Math.abs(e[2])) / 2
1147
- }, Qe = (e) => (e = e % 360, e < 0 && (e += 360), e), Zt = Je, Jt = (e) => Math.sqrt(e[0] * e[0] + e[1] * e[1]), Qt = (e) => Math.sqrt(e[4] * e[4] + e[5] * e[5]), Rr = {
1147
+ }, et = (e) => (e = e % 360, e < 0 && (e += 360), e), qt = Qe, Zt = (e) => Math.sqrt(e[0] * e[0] + e[1] * e[1]), Jt = (e) => Math.sqrt(e[4] * e[4] + e[5] * e[5]), Rr = {
1148
1148
  x: 12,
1149
1149
  y: 13,
1150
1150
  z: 14,
1151
1151
  translateX: 12,
1152
1152
  translateY: 13,
1153
1153
  translateZ: 14,
1154
- scaleX: Jt,
1155
- scaleY: Qt,
1156
- scale: (e) => (Jt(e) + Qt(e)) / 2,
1157
- rotateX: (e) => Qe(z(Math.atan2(e[6], e[5]))),
1158
- rotateY: (e) => Qe(z(Math.atan2(-e[2], e[0]))),
1159
- rotateZ: Zt,
1160
- rotate: Zt,
1161
- skewX: (e) => z(Math.atan(e[4])),
1162
- skewY: (e) => z(Math.atan(e[1])),
1154
+ scaleX: Zt,
1155
+ scaleY: Jt,
1156
+ scale: (e) => (Zt(e) + Jt(e)) / 2,
1157
+ rotateX: (e) => et(U(Math.atan2(e[6], e[5]))),
1158
+ rotateY: (e) => et(U(Math.atan2(-e[2], e[0]))),
1159
+ rotateZ: qt,
1160
+ rotate: qt,
1161
+ skewX: (e) => U(Math.atan(e[4])),
1162
+ skewY: (e) => U(Math.atan(e[1])),
1163
1163
  skew: (e) => (Math.abs(e[1]) + Math.abs(e[4])) / 2
1164
1164
  };
1165
- function et(e) {
1165
+ function tt(e) {
1166
1166
  return e.includes("scale") ? 1 : 0;
1167
1167
  }
1168
- function tt(e, t) {
1168
+ function nt(e, t) {
1169
1169
  if (!e || e === "none")
1170
- return et(t);
1170
+ return tt(t);
1171
1171
  const n = e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
1172
1172
  let s, i;
1173
1173
  if (n)
@@ -1177,18 +1177,18 @@ function tt(e, t) {
1177
1177
  s = Fr, i = a;
1178
1178
  }
1179
1179
  if (!i)
1180
- return et(t);
1180
+ return tt(t);
1181
1181
  const r = s[t], o = i[1].split(",").map(Lr);
1182
1182
  return typeof r == "function" ? r(o) : o[r];
1183
1183
  }
1184
1184
  const Or = (e, t) => {
1185
1185
  const { transform: n = "none" } = getComputedStyle(e);
1186
- return tt(n, t);
1186
+ return nt(n, t);
1187
1187
  };
1188
1188
  function Lr(e) {
1189
1189
  return parseFloat(e.trim());
1190
1190
  }
1191
- const ce = [
1191
+ const ae = [
1192
1192
  "transformPerspective",
1193
1193
  "x",
1194
1194
  "y",
@@ -1206,7 +1206,7 @@ const ce = [
1206
1206
  "skew",
1207
1207
  "skewX",
1208
1208
  "skewY"
1209
- ], ue = new Set(ce), en = (e) => e === oe || e === b, Ir = /* @__PURE__ */ new Set(["x", "y", "z"]), kr = ce.filter((e) => !Ir.has(e));
1209
+ ], ce = new Set(ae), Qt = (e) => e === re || e === b, Ir = /* @__PURE__ */ new Set(["x", "y", "z"]), kr = ae.filter((e) => !Ir.has(e));
1210
1210
  function Nr(e) {
1211
1211
  const t = [];
1212
1212
  return kr.forEach((n) => {
@@ -1223,16 +1223,16 @@ const G = {
1223
1223
  bottom: ({ y: e }, { top: t }) => parseFloat(t) + (e.max - e.min),
1224
1224
  right: ({ x: e }, { left: t }) => parseFloat(t) + (e.max - e.min),
1225
1225
  // Transform
1226
- x: (e, { transform: t }) => tt(t, "x"),
1227
- y: (e, { transform: t }) => tt(t, "y")
1226
+ x: (e, { transform: t }) => nt(t, "x"),
1227
+ y: (e, { transform: t }) => nt(t, "y")
1228
1228
  };
1229
1229
  G.translateX = G.x;
1230
1230
  G.translateY = G.y;
1231
- const H = /* @__PURE__ */ new Set();
1232
- let nt = !1, st = !1, it = !1;
1231
+ const z = /* @__PURE__ */ new Set();
1232
+ let st = !1, it = !1, rt = !1;
1233
1233
  function ns() {
1234
- if (st) {
1235
- const e = Array.from(H).filter((s) => s.needsMeasurement), t = new Set(e.map((s) => s.element)), n = /* @__PURE__ */ new Map();
1234
+ if (it) {
1235
+ const e = Array.from(z).filter((s) => s.needsMeasurement), t = new Set(e.map((s) => s.element)), n = /* @__PURE__ */ new Map();
1236
1236
  t.forEach((s) => {
1237
1237
  const i = Nr(s);
1238
1238
  i.length && (n.set(s, i), s.render());
@@ -1247,22 +1247,22 @@ function ns() {
1247
1247
  s.suspendedScrollY !== void 0 && window.scrollTo(0, s.suspendedScrollY);
1248
1248
  });
1249
1249
  }
1250
- st = !1, nt = !1, H.forEach((e) => e.complete(it)), H.clear();
1250
+ it = !1, st = !1, z.forEach((e) => e.complete(rt)), z.clear();
1251
1251
  }
1252
1252
  function ss() {
1253
- H.forEach((e) => {
1254
- e.readKeyframes(), e.needsMeasurement && (st = !0);
1253
+ z.forEach((e) => {
1254
+ e.readKeyframes(), e.needsMeasurement && (it = !0);
1255
1255
  });
1256
1256
  }
1257
1257
  function Br() {
1258
- it = !0, ss(), ns(), it = !1;
1258
+ rt = !0, ss(), ns(), rt = !1;
1259
1259
  }
1260
1260
  class Ct {
1261
1261
  constructor(t, n, s, i, r, o = !1) {
1262
1262
  this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...t], this.onComplete = n, this.name = s, this.motionValue = i, this.element = r, this.isAsync = o;
1263
1263
  }
1264
1264
  scheduleResolve() {
1265
- this.state = "scheduled", this.isAsync ? (H.add(this), nt || (nt = !0, k.read(ss), k.resolveKeyframes(ns))) : (this.readKeyframes(), this.complete());
1265
+ this.state = "scheduled", this.isAsync ? (z.add(this), st || (st = !0, k.read(ss), k.resolveKeyframes(ns))) : (this.readKeyframes(), this.complete());
1266
1266
  }
1267
1267
  readKeyframes() {
1268
1268
  const { unresolvedKeyframes: t, name: n, element: s, motionValue: i } = this;
@@ -1287,10 +1287,10 @@ class Ct {
1287
1287
  measureEndState() {
1288
1288
  }
1289
1289
  complete(t = !1) {
1290
- this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, t), H.delete(this);
1290
+ this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, t), z.delete(this);
1291
1291
  }
1292
1292
  cancel() {
1293
- this.state === "scheduled" && (H.delete(this), this.state = "pending");
1293
+ this.state === "scheduled" && (z.delete(this), this.state = "pending");
1294
1294
  }
1295
1295
  resume() {
1296
1296
  this.state === "pending" && this.scheduleResolve();
@@ -1312,20 +1312,20 @@ const is = /* @__PURE__ */ jr(() => {
1312
1312
  return !1;
1313
1313
  }
1314
1314
  return !0;
1315
- }, "linearEasing"), fe = ([e, t, n, s]) => `cubic-bezier(${e}, ${t}, ${n}, ${s})`, tn = {
1315
+ }, "linearEasing"), le = ([e, t, n, s]) => `cubic-bezier(${e}, ${t}, ${n}, ${s})`, en = {
1316
1316
  linear: "linear",
1317
1317
  ease: "ease",
1318
1318
  easeIn: "ease-in",
1319
1319
  easeOut: "ease-out",
1320
1320
  easeInOut: "ease-in-out",
1321
- circIn: /* @__PURE__ */ fe([0, 0.65, 0.55, 1]),
1322
- circOut: /* @__PURE__ */ fe([0.55, 0, 1, 0.45]),
1323
- backIn: /* @__PURE__ */ fe([0.31, 0.01, 0.66, -0.59]),
1324
- backOut: /* @__PURE__ */ fe([0.33, 1.53, 0.69, 0.99])
1321
+ circIn: /* @__PURE__ */ le([0, 0.65, 0.55, 1]),
1322
+ circOut: /* @__PURE__ */ le([0.55, 0, 1, 0.45]),
1323
+ backIn: /* @__PURE__ */ le([0.31, 0.01, 0.66, -0.59]),
1324
+ backOut: /* @__PURE__ */ le([0.33, 1.53, 0.69, 0.99])
1325
1325
  };
1326
1326
  function rs(e, t) {
1327
1327
  if (e)
1328
- return typeof e == "function" ? is() ? Qn(e, t) : "ease-out" : _n(e) ? fe(e) : Array.isArray(e) ? e.map((n) => rs(n, t) || tn.easeOut) : tn[e];
1328
+ return typeof e == "function" ? is() ? Qn(e, t) : "ease-out" : _n(e) ? le(e) : Array.isArray(e) ? e.map((n) => rs(n, t) || en.easeOut) : en[e];
1329
1329
  }
1330
1330
  function Ur(e, t, n, { delay: s = 0, duration: i = 300, repeat: r = 0, repeatType: o = "loop", ease: a = "easeOut", times: l } = {}, u = void 0) {
1331
1331
  const c = {
@@ -1347,16 +1347,16 @@ function Ur(e, t, n, { delay: s = 0, duration: i = 300, repeat: r = 0, repeatTyp
1347
1347
  function os(e) {
1348
1348
  return typeof e == "function" && "applyToOptions" in e;
1349
1349
  }
1350
- function zr({ type: e, ...t }) {
1350
+ function Gr({ type: e, ...t }) {
1351
1351
  return os(e) && is() ? e.applyToOptions(t) : (t.duration ?? (t.duration = 300), t.ease ?? (t.ease = "easeOut"), t);
1352
1352
  }
1353
- class Gr extends Vt {
1353
+ class zr extends Vt {
1354
1354
  constructor(t) {
1355
1355
  if (super(), this.finishedTime = null, this.isStopped = !1, !t)
1356
1356
  return;
1357
1357
  const { element: n, name: s, keyframes: i, pseudoElement: r, allowFlatten: o = !1, finalKeyframe: a, onComplete: l } = t;
1358
- this.isPseudoElement = !!r, this.allowFlatten = o, this.options = t, _(typeof t.type != "string", `animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);
1359
- const u = zr(t);
1358
+ this.isPseudoElement = !!r, this.allowFlatten = o, this.options = t, Y(typeof t.type != "string", `animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);
1359
+ const u = Gr(t);
1360
1360
  this.animation = Ur(n, s, i, u, r), u.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
1361
1361
  if (this.finishedTime = this.time, !r) {
1362
1362
  const c = xt(i, this.options, a, this.speed);
@@ -1439,7 +1439,7 @@ class Gr extends Vt {
1439
1439
  */
1440
1440
  attachTimeline({ timeline: t, observe: n }) {
1441
1441
  var s;
1442
- return this.allowFlatten && ((s = this.animation.effect) == null || s.updateTiming({ easing: "linear" })), this.animation.onfinish = null, t && $r() ? (this.animation.timeline = t, re) : n(this);
1442
+ return this.allowFlatten && ((s = this.animation.effect) == null || s.updateTiming({ easing: "linear" })), this.animation.onfinish = null, t && $r() ? (this.animation.timeline = t, ie) : n(this);
1443
1443
  }
1444
1444
  }
1445
1445
  const as = {
@@ -1453,8 +1453,8 @@ function Hr(e) {
1453
1453
  function Yr(e) {
1454
1454
  typeof e.ease == "string" && Hr(e.ease) && (e.ease = as[e.ease]);
1455
1455
  }
1456
- const nn = 10;
1457
- class Xr extends Gr {
1456
+ const tn = 10;
1457
+ class Xr extends zr {
1458
1458
  constructor(t) {
1459
1459
  Yr(t), ts(t), super(t), t.startTime && (this.startTime = t.startTime), this.options = t;
1460
1460
  }
@@ -1478,11 +1478,11 @@ class Xr extends Gr {
1478
1478
  ...o,
1479
1479
  autoplay: !1
1480
1480
  }), l = /* @__PURE__ */ N(this.finishedTime ?? this.time);
1481
- n.setWithVelocity(a.sample(l - nn).value, a.sample(l).value, nn), a.stop();
1481
+ n.setWithVelocity(a.sample(l - tn).value, a.sample(l).value, tn), a.stop();
1482
1482
  }
1483
1483
  }
1484
- const sn = (e, t) => t === "zIndex" ? !1 : !!(typeof e == "number" || Array.isArray(e) || typeof e == "string" && // It's animatable if we have a string
1485
- (ae.test(e) || e === "0") && // And it contains numbers and/or colors
1484
+ const nn = (e, t) => t === "zIndex" ? !1 : !!(typeof e == "number" || Array.isArray(e) || typeof e == "string" && // It's animatable if we have a string
1485
+ (oe.test(e) || e === "0") && // And it contains numbers and/or colors
1486
1486
  !e.startsWith("url("));
1487
1487
  function qr(e) {
1488
1488
  const t = e[0];
@@ -1498,8 +1498,8 @@ function Zr(e, t, n, s) {
1498
1498
  return !1;
1499
1499
  if (t === "display" || t === "visibility")
1500
1500
  return !0;
1501
- const r = e[e.length - 1], o = sn(i, t), a = sn(r, t);
1502
- return ie(o === a, `You are trying to animate ${t} from "${i}" to "${r}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${r} via the \`style\` property.`), !o || !a ? !1 : qr(e) || (n === "spring" || os(n)) && s;
1501
+ const r = e[e.length - 1], o = nn(i, t), a = nn(r, t);
1502
+ return ye(o === a, `You are trying to animate ${t} from "${i}" to "${r}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${r} via the \`style\` property.`), !o || !a ? !1 : qr(e) || (n === "spring" || os(n)) && s;
1503
1503
  }
1504
1504
  function cs(e) {
1505
1505
  return Di(e) && "offsetHeight" in e;
@@ -1559,7 +1559,7 @@ class no extends Vt {
1559
1559
  ...f,
1560
1560
  element: f.motionValue.owner.current
1561
1561
  }) : new At(f);
1562
- h.finished.then(() => this.notifyFinished()).catch(re), this.pendingTimeline && (this.stopTimeline = h.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = h;
1562
+ h.finished.then(() => this.notifyFinished()).catch(ie), this.pendingTimeline && (this.stopTimeline = h.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = h;
1563
1563
  }
1564
1564
  get finished() {
1565
1565
  return this._animation ? this.animation.finished : this._finished;
@@ -1623,7 +1623,7 @@ function io(e) {
1623
1623
  }
1624
1624
  const ro = 4;
1625
1625
  function us(e, t, n = 1) {
1626
- _(n <= ro, `Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);
1626
+ Y(n <= ro, `Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);
1627
1627
  const [s, i] = io(e);
1628
1628
  if (!s)
1629
1629
  return;
@@ -1644,11 +1644,11 @@ const fs = /* @__PURE__ */ new Set([
1644
1644
  "left",
1645
1645
  "right",
1646
1646
  "bottom",
1647
- ...ce
1647
+ ...ae
1648
1648
  ]), oo = {
1649
1649
  test: (e) => e === "auto",
1650
1650
  parse: (e) => e
1651
- }, ds = (e) => (t) => t.test(e), hs = [oe, b, Q, $, qi, Xi, oo], rn = (e) => hs.find(ds(e));
1651
+ }, ds = (e) => (t) => t.test(e), hs = [re, b, Q, $, qi, Xi, oo], sn = (e) => hs.find(ds(e));
1652
1652
  function ao(e) {
1653
1653
  return typeof e == "number" ? e === 0 : e !== null ? e === "none" || e === "0" || En(e) : !0;
1654
1654
  }
@@ -1664,14 +1664,14 @@ function uo(e) {
1664
1664
  let r = co.has(t) ? 1 : 0;
1665
1665
  return s !== n && (r *= 100), t + "(" + r + i + ")";
1666
1666
  }
1667
- const lo = /\b([a-z-]*)\(.*?\)/gu, rt = {
1668
- ...ae,
1667
+ const lo = /\b([a-z-]*)\(.*?\)/gu, ot = {
1668
+ ...oe,
1669
1669
  getAnimatableNone: (e) => {
1670
1670
  const t = e.match(lo);
1671
1671
  return t ? t.map(uo).join(" ") : e;
1672
1672
  }
1673
- }, on = {
1674
- ...oe,
1673
+ }, rn = {
1674
+ ...re,
1675
1675
  transform: Math.round
1676
1676
  }, fo = {
1677
1677
  rotate: $,
@@ -1694,9 +1694,9 @@ const lo = /\b([a-z-]*)\(.*?\)/gu, rt = {
1694
1694
  z: b,
1695
1695
  perspective: b,
1696
1696
  transformPerspective: b,
1697
- opacity: pe,
1698
- originX: zt,
1699
- originY: zt,
1697
+ opacity: he,
1698
+ originX: Gt,
1699
+ originY: Gt,
1700
1700
  originZ: b
1701
1701
  }, Mt = {
1702
1702
  // Border props
@@ -1735,11 +1735,11 @@ const lo = /\b([a-z-]*)\(.*?\)/gu, rt = {
1735
1735
  backgroundPositionX: b,
1736
1736
  backgroundPositionY: b,
1737
1737
  ...fo,
1738
- zIndex: on,
1738
+ zIndex: rn,
1739
1739
  // SVG
1740
- fillOpacity: pe,
1741
- strokeOpacity: pe,
1742
- numOctaves: on
1740
+ fillOpacity: he,
1741
+ strokeOpacity: he,
1742
+ numOctaves: rn
1743
1743
  }, ho = {
1744
1744
  ...Mt,
1745
1745
  // Color props
@@ -1754,19 +1754,19 @@ const lo = /\b([a-z-]*)\(.*?\)/gu, rt = {
1754
1754
  borderRightColor: E,
1755
1755
  borderBottomColor: E,
1756
1756
  borderLeftColor: E,
1757
- filter: rt,
1758
- WebkitFilter: rt
1757
+ filter: ot,
1758
+ WebkitFilter: ot
1759
1759
  }, ps = (e) => ho[e];
1760
1760
  function ms(e, t) {
1761
1761
  let n = ps(e);
1762
- return n !== rt && (n = ae), n.getAnimatableNone ? n.getAnimatableNone(t) : void 0;
1762
+ return n !== ot && (n = oe), n.getAnimatableNone ? n.getAnimatableNone(t) : void 0;
1763
1763
  }
1764
1764
  const po = /* @__PURE__ */ new Set(["auto", "none", "0"]);
1765
1765
  function mo(e, t, n) {
1766
1766
  let s = 0, i;
1767
1767
  for (; s < e.length && !i; ) {
1768
1768
  const r = e[s];
1769
- typeof r == "string" && !po.has(r) && me(r).values.length && (i = e[s]), s++;
1769
+ typeof r == "string" && !po.has(r) && pe(r).values.length && (i = e[s]), s++;
1770
1770
  }
1771
1771
  if (i && n)
1772
1772
  for (const r of t)
@@ -1790,9 +1790,9 @@ class go extends Ct {
1790
1790
  }
1791
1791
  if (this.resolveNoneKeyframes(), !fs.has(s) || t.length !== 2)
1792
1792
  return;
1793
- const [i, r] = t, o = rn(i), a = rn(r);
1793
+ const [i, r] = t, o = sn(i), a = sn(r);
1794
1794
  if (o !== a)
1795
- if (en(o) && en(a))
1795
+ if (Qt(o) && Qt(a))
1796
1796
  for (let l = 0; l < t.length; l++) {
1797
1797
  const u = t[l];
1798
1798
  typeof u == "string" && (t[l] = parseFloat(u));
@@ -1830,12 +1830,13 @@ function yo(e, t, n) {
1830
1830
  if (e instanceof EventTarget)
1831
1831
  return [e];
1832
1832
  if (typeof e == "string") {
1833
- const i = document.querySelectorAll(e);
1833
+ let s = document;
1834
+ const i = (n == null ? void 0 : n[e]) ?? s.querySelectorAll(e);
1834
1835
  return i ? Array.from(i) : [];
1835
1836
  }
1836
1837
  return Array.from(e);
1837
1838
  }
1838
- const gs = (e, t) => t && typeof e == "number" ? t.transform(e) : e, an = 30, bo = (e) => !isNaN(parseFloat(e));
1839
+ const gs = (e, t) => t && typeof e == "number" ? t.transform(e) : e, on = 30, bo = (e) => !isNaN(parseFloat(e));
1839
1840
  class vo {
1840
1841
  /**
1841
1842
  * @param init - The initiating value
@@ -1984,9 +1985,9 @@ class vo {
1984
1985
  */
1985
1986
  getVelocity() {
1986
1987
  const t = L.now();
1987
- if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt > an)
1988
+ if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt > on)
1988
1989
  return 0;
1989
- const n = Math.min(this.updatedAt - this.prevUpdatedAt, an);
1990
+ const n = Math.min(this.updatedAt - this.prevUpdatedAt, on);
1990
1991
  return Rn(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
1991
1992
  }
1992
1993
  /**
@@ -2042,8 +2043,7 @@ class vo {
2042
2043
  function Ee(e, t) {
2043
2044
  return new vo(e, t);
2044
2045
  }
2045
- const { schedule: To, cancel: Fc } = /* @__PURE__ */ jn(queueMicrotask, !1), wo = {
2046
- x: !1,
2046
+ const { schedule: To } = /* @__PURE__ */ jn(queueMicrotask, !1), wo = {
2047
2047
  y: !1
2048
2048
  };
2049
2049
  function So() {
@@ -2057,18 +2057,18 @@ function ys(e, t) {
2057
2057
  };
2058
2058
  return [n, i, () => s.abort()];
2059
2059
  }
2060
- function cn(e) {
2060
+ function an(e) {
2061
2061
  return !(e.pointerType === "touch" || So());
2062
2062
  }
2063
2063
  function xo(e, t, n = {}) {
2064
2064
  const [s, i, r] = ys(e, n), o = (a) => {
2065
- if (!cn(a))
2065
+ if (!an(a))
2066
2066
  return;
2067
2067
  const { target: l } = a, u = t(l, a);
2068
2068
  if (typeof u != "function" || !l)
2069
2069
  return;
2070
2070
  const c = (d) => {
2071
- cn(d) && (u(d), l.removeEventListener("pointerleave", c));
2071
+ an(d) && (u(d), l.removeEventListener("pointerleave", c));
2072
2072
  };
2073
2073
  l.addEventListener("pointerleave", c, i);
2074
2074
  };
@@ -2087,40 +2087,40 @@ function Co(e) {
2087
2087
  return Ao.has(e.tagName) || e.tabIndex !== -1;
2088
2088
  }
2089
2089
  const xe = /* @__PURE__ */ new WeakSet();
2090
- function un(e) {
2090
+ function cn(e) {
2091
2091
  return (t) => {
2092
2092
  t.key === "Enter" && e(t);
2093
2093
  };
2094
2094
  }
2095
- function je(e, t) {
2095
+ function Ue(e, t) {
2096
2096
  e.dispatchEvent(new PointerEvent("pointer" + t, { isPrimary: !0, bubbles: !0 }));
2097
2097
  }
2098
2098
  const Mo = (e, t) => {
2099
2099
  const n = e.currentTarget;
2100
2100
  if (!n)
2101
2101
  return;
2102
- const s = un(() => {
2102
+ const s = cn(() => {
2103
2103
  if (xe.has(n))
2104
2104
  return;
2105
- je(n, "down");
2106
- const i = un(() => {
2107
- je(n, "up");
2108
- }), r = () => je(n, "cancel");
2105
+ Ue(n, "down");
2106
+ const i = cn(() => {
2107
+ Ue(n, "up");
2108
+ }), r = () => Ue(n, "cancel");
2109
2109
  n.addEventListener("keyup", i, t), n.addEventListener("blur", r, t);
2110
2110
  });
2111
2111
  n.addEventListener("keydown", s, t), n.addEventListener("blur", () => n.removeEventListener("keydown", s), t);
2112
2112
  };
2113
- function ln(e) {
2113
+ function un(e) {
2114
2114
  return Vo(e) && !0;
2115
2115
  }
2116
2116
  function Po(e, t, n = {}) {
2117
2117
  const [s, i, r] = ys(e, n), o = (a) => {
2118
2118
  const l = a.currentTarget;
2119
- if (!ln(a))
2119
+ if (!un(a))
2120
2120
  return;
2121
2121
  xe.add(l);
2122
2122
  const u = t(l, a), c = (h, g) => {
2123
- window.removeEventListener("pointerup", d), window.removeEventListener("pointercancel", f), xe.has(l) && xe.delete(l), ln(h) && typeof u == "function" && u(h, { success: g });
2123
+ window.removeEventListener("pointerup", d), window.removeEventListener("pointercancel", f), xe.has(l) && xe.delete(l), un(h) && typeof u == "function" && u(h, { success: g });
2124
2124
  }, d = (h) => {
2125
2125
  c(h, l === window || l === document || n.useGlobalTarget || bs(l, h.target));
2126
2126
  }, f = (h) => {
@@ -2132,11 +2132,11 @@ function Po(e, t, n = {}) {
2132
2132
  (n.useGlobalTarget ? window : a).addEventListener("pointerdown", o, i), cs(a) && (a.addEventListener("focus", (u) => Mo(u, i)), !Co(a) && !a.hasAttribute("tabindex") && (a.tabIndex = 0));
2133
2133
  }), r;
2134
2134
  }
2135
- const O = (e) => !!(e && e.getVelocity), Eo = [...hs, E, ae], Do = (e) => Eo.find(ds(e)), vs = se({
2135
+ const O = (e) => !!(e && e.getVelocity), Eo = [...hs, E, oe], Do = (e) => Eo.find(ds(e)), vs = se({
2136
2136
  transformPagePoint: (e) => e,
2137
2137
  isStatic: !1,
2138
2138
  reducedMotion: "never"
2139
- }), Pt = se({ strict: !1 }), fn = {
2139
+ }), Pt = se({ strict: !1 }), ln = {
2140
2140
  animation: [
2141
2141
  "animate",
2142
2142
  "variants",
@@ -2156,11 +2156,11 @@ const O = (e) => !!(e && e.getVelocity), Eo = [...hs, E, ae], Do = (e) => Eo.fin
2156
2156
  inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
2157
2157
  layout: ["layout", "layoutId"]
2158
2158
  }, te = {};
2159
- for (const e in fn)
2159
+ for (const e in ln)
2160
2160
  te[e] = {
2161
- isEnabled: (t) => fn[e].some((n) => !!t[n])
2161
+ isEnabled: (t) => ln[e].some((n) => !!t[n])
2162
2162
  };
2163
- function ot(e) {
2163
+ function fn(e) {
2164
2164
  for (const t in e)
2165
2165
  te[t] = {
2166
2166
  ...te[t],
@@ -2168,18 +2168,18 @@ function ot(e) {
2168
2168
  };
2169
2169
  }
2170
2170
  function Fo({ children: e, features: t, strict: n = !1 }) {
2171
- const [, s] = zs(!Ue(t)), i = de(void 0);
2172
- if (!Ue(t)) {
2171
+ const [, s] = Gs(!Ge(t)), i = fe(void 0);
2172
+ if (!Ge(t)) {
2173
2173
  const { renderer: r, ...o } = t;
2174
- i.current = r, ot(o);
2174
+ i.current = r, fn(o);
2175
2175
  }
2176
2176
  return dt(() => {
2177
- Ue(t) && t().then(({ renderer: r, ...o }) => {
2178
- ot(o), i.current = r, s(!0);
2177
+ Ge(t) && t().then(({ renderer: r, ...o }) => {
2178
+ fn(o), i.current = r, s(!0);
2179
2179
  });
2180
2180
  }, []), M(Pt.Provider, { value: { renderer: i.current, strict: n }, children: e });
2181
2181
  }
2182
- function Ue(e) {
2182
+ function Ge(e) {
2183
2183
  return typeof e == "function";
2184
2184
  }
2185
2185
  const Ro = /* @__PURE__ */ new Set([
@@ -2236,7 +2236,7 @@ const Le = /* @__PURE__ */ se({});
2236
2236
  function Ie(e) {
2237
2237
  return e !== null && typeof e == "object" && typeof e.start == "function";
2238
2238
  }
2239
- function ge(e) {
2239
+ function me(e) {
2240
2240
  return typeof e == "string" || Array.isArray(e);
2241
2241
  }
2242
2242
  const Et = [
@@ -2249,7 +2249,7 @@ const Et = [
2249
2249
  "exit"
2250
2250
  ], Dt = ["initial", ...Et];
2251
2251
  function ke(e) {
2252
- return Ie(e.animate) || Dt.some((t) => ge(e[t]));
2252
+ return Ie(e.animate) || Dt.some((t) => me(e[t]));
2253
2253
  }
2254
2254
  function ws(e) {
2255
2255
  return !!(ke(e) || e.variants);
@@ -2258,8 +2258,8 @@ function Io(e, t) {
2258
2258
  if (ke(e)) {
2259
2259
  const { initial: n, animate: s } = e;
2260
2260
  return {
2261
- initial: n === !1 || ge(n) ? n : void 0,
2262
- animate: ge(s) ? s : void 0
2261
+ initial: n === !1 || me(n) ? n : void 0,
2262
+ animate: me(s) ? s : void 0
2263
2263
  };
2264
2264
  }
2265
2265
  return e.inherit !== !1 ? t : {};
@@ -2276,7 +2276,7 @@ function Ss(e) {
2276
2276
  return e && typeof e == "object" && Object.prototype.hasOwnProperty.call(e, "current");
2277
2277
  }
2278
2278
  function Bo(e, t, n) {
2279
- return Gs(
2279
+ return zs(
2280
2280
  (s) => {
2281
2281
  s && e.onMount && e.onMount(s), t && (s ? t.mount(s) : t.unmount()), n && (typeof n == "function" ? n(s) : Ss(n) && (n.current = s));
2282
2282
  },
@@ -2291,7 +2291,7 @@ function Bo(e, t, n) {
2291
2291
  const Ft = (e) => e.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), Ko = "framerAppearId", xs = "data-" + Ft(Ko), Wo = se({});
2292
2292
  function $o(e, t, n, s, i) {
2293
2293
  var y, T;
2294
- const { visualElement: r } = I(Le), o = I(Pt), a = I(Mn), l = I(vs).reducedMotion, u = de(null);
2294
+ const { visualElement: r } = I(Le), o = I(Pt), a = I(Mn), l = I(vs).reducedMotion, u = fe(null);
2295
2295
  s = s || o.renderer, !u.current && s && (u.current = s(e, {
2296
2296
  visualState: t,
2297
2297
  parent: r,
@@ -2302,11 +2302,11 @@ function $o(e, t, n, s, i) {
2302
2302
  }));
2303
2303
  const c = u.current, d = I(Wo);
2304
2304
  c && !c.projection && i && (c.type === "html" || c.type === "svg") && _o(u.current, n, i, d);
2305
- const f = de(!1);
2305
+ const f = fe(!1);
2306
2306
  Hs(() => {
2307
2307
  c && f.current && c.update(n, a);
2308
2308
  });
2309
- const h = n[xs], g = de(!!h && !((y = window.MotionHandoffIsComplete) != null && y.call(window, h)) && ((T = window.MotionHasOptimisedAnimation) == null ? void 0 : T.call(window, h)));
2309
+ const h = n[xs], g = fe(!!h && !((y = window.MotionHandoffIsComplete) != null && y.call(window, h)) && ((T = window.MotionHasOptimisedAnimation) == null ? void 0 : T.call(window, h)));
2310
2310
  return Mi(() => {
2311
2311
  c && (f.current = !0, window.MotionIsMounted = !0, c.updateFeatures(), To.render(c.render), g.current && c.animationState && c.animationState.animateChanges());
2312
2312
  }), dt(() => {
@@ -2342,7 +2342,6 @@ function Vs(e) {
2342
2342
  return e.options.allowProjection !== !1 ? e.projection : Vs(e.parent);
2343
2343
  }
2344
2344
  function jo({ preloadedFeatures: e, createVisualElement: t, useRender: n, useVisualState: s, Component: i }) {
2345
- e && ot(e);
2346
2345
  function r(a, l) {
2347
2346
  let u;
2348
2347
  const c = {
@@ -2351,8 +2350,8 @@ function jo({ preloadedFeatures: e, createVisualElement: t, useRender: n, useVis
2351
2350
  layoutId: Uo(a)
2352
2351
  }, { isStatic: d } = c, f = ko(a), h = s(a, d);
2353
2352
  if (!d && pt) {
2354
- zo(c, e);
2355
- const g = Go(c);
2353
+ Go(c, e);
2354
+ const g = zo(c);
2356
2355
  u = g.MeasureLayout, f.visualElement = $o(i, h, c, t, g.ProjectionNode);
2357
2356
  }
2358
2357
  return Ve(Le.Provider, { value: f, children: [u && f.visualElement ? M(u, { visualElement: f.visualElement, ...c }) : null, n(i, a, Bo(h, f.visualElement, l), h, d, f.visualElement)] });
@@ -2365,14 +2364,10 @@ function Uo({ layoutId: e }) {
2365
2364
  const t = I(Ai).id;
2366
2365
  return t && e !== void 0 ? t + "-" + e : e;
2367
2366
  }
2368
- function zo(e, t) {
2369
- const n = I(Pt).strict;
2370
- if (process.env.NODE_ENV !== "production" && t && n) {
2371
- const s = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
2372
- e.ignoreStrict ? ie(!1, s) : _(!1, s);
2373
- }
2367
+ function Go(e, t) {
2368
+ I(Pt).strict, process.env.NODE_ENV;
2374
2369
  }
2375
- function Go(e) {
2370
+ function zo(e) {
2376
2371
  const { drag: t, layout: n } = te;
2377
2372
  if (!t && !n)
2378
2373
  return {};
@@ -2384,18 +2379,18 @@ function Go(e) {
2384
2379
  }
2385
2380
  const Ho = {};
2386
2381
  function As(e, { layout: t, layoutId: n }) {
2387
- return ue.has(e) || e.startsWith("origin") || (t || n !== void 0) && (!!Ho[e] || e === "opacity");
2382
+ return ce.has(e) || e.startsWith("origin") || (t || n !== void 0) && (!!Ho[e] || e === "opacity");
2388
2383
  }
2389
2384
  const Yo = {
2390
2385
  x: "translateX",
2391
2386
  y: "translateY",
2392
2387
  z: "translateZ",
2393
2388
  transformPerspective: "perspective"
2394
- }, Xo = ce.length;
2389
+ }, Xo = ae.length;
2395
2390
  function qo(e, t, n) {
2396
2391
  let s = "", i = !0;
2397
2392
  for (let r = 0; r < Xo; r++) {
2398
- const o = ce[r], a = e[o];
2393
+ const o = ae[r], a = e[o];
2399
2394
  if (a === void 0)
2400
2395
  continue;
2401
2396
  let l = !0;
@@ -2416,10 +2411,10 @@ function Rt(e, t, n) {
2416
2411
  let o = !1, a = !1;
2417
2412
  for (const l in t) {
2418
2413
  const u = t[l];
2419
- if (ue.has(l)) {
2414
+ if (ce.has(l)) {
2420
2415
  o = !0;
2421
2416
  continue;
2422
- } else if (zn(l)) {
2417
+ } else if (Gn(l)) {
2423
2418
  i[l] = u;
2424
2419
  continue;
2425
2420
  } else {
@@ -2640,7 +2635,7 @@ function Fs(e, t, n) {
2640
2635
  const s = kt(e, t, n);
2641
2636
  for (const i in e)
2642
2637
  if (O(e[i]) || O(t[i])) {
2643
- const r = ce.indexOf(i) !== -1 ? "attr" + i.charAt(0).toUpperCase() + i.substring(1) : i;
2638
+ const r = ae.indexOf(i) !== -1 ? "attr" + i.charAt(0).toUpperCase() + i.substring(1) : i;
2644
2639
  s[r] = e[i];
2645
2640
  }
2646
2641
  return s;
@@ -2664,7 +2659,7 @@ function fa(e, t) {
2664
2659
  };
2665
2660
  }
2666
2661
  const da = /* @__PURE__ */ fa();
2667
- function ye(e, t, n) {
2662
+ function ge(e, t, n) {
2668
2663
  const s = e.getProps();
2669
2664
  return It(s, t, n !== void 0 ? n : s.custom, e);
2670
2665
  }
@@ -2676,7 +2671,7 @@ function pa(e) {
2676
2671
  return at(e) ? e[e.length - 1] || 0 : e;
2677
2672
  }
2678
2673
  function ma(e, t) {
2679
- const n = ye(e, t);
2674
+ const n = ge(e, t);
2680
2675
  let { transitionEnd: s = {}, transition: i = {}, ...r } = n || {};
2681
2676
  r = { ...r, ...s };
2682
2677
  for (const o in r) {
@@ -2721,7 +2716,7 @@ const wa = {
2721
2716
  type: "keyframes",
2722
2717
  ease: [0.25, 0.1, 0.35, 1],
2723
2718
  duration: 0.3
2724
- }, Aa = (e, { keyframes: t }) => t.length > 2 ? xa : ue.has(e) ? e.startsWith("scale") ? Sa(t[1]) : wa : Va;
2719
+ }, Aa = (e, { keyframes: t }) => t.length > 2 ? xa : ce.has(e) ? e.startsWith("scale") ? Sa(t[1]) : wa : Va;
2725
2720
  function Ca({ when: e, delay: t, delayChildren: n, staggerChildren: s, staggerDirection: i, repeat: r, repeatType: o, repeatDelay: a, from: l, elapsed: u, ...c }) {
2726
2721
  return !!Object.keys(c).length;
2727
2722
  }
@@ -2796,7 +2791,7 @@ function Rs(e, t, { delay: n = 0, transitionOverride: s, type: i } = {}) {
2796
2791
  }
2797
2792
  function ct(e, t, n = {}) {
2798
2793
  var l;
2799
- const s = ye(e, t, n.type === "exit" ? (l = e.presenceContext) == null ? void 0 : l.custom : void 0);
2794
+ const s = ge(e, t, n.type === "exit" ? (l = e.presenceContext) == null ? void 0 : l.custom : void 0);
2800
2795
  let { transition: i = e.getDefaultTransition() || {} } = s || {};
2801
2796
  n.transitionOverride && (i = n.transitionOverride);
2802
2797
  const r = s ? () => Promise.all(Rs(e, s, n)) : () => Promise.resolve(), o = e.variantChildren && e.variantChildren.size ? (u = 0) => {
@@ -2833,7 +2828,7 @@ function Fa(e, t, n = {}) {
2833
2828
  } else if (typeof t == "string")
2834
2829
  s = ct(e, t, n);
2835
2830
  else {
2836
- const i = typeof t == "function" ? ye(e, t, n.custom) : t;
2831
+ const i = typeof t == "function" ? ge(e, t, n.custom) : t;
2837
2832
  s = Promise.all(Rs(e, i, n));
2838
2833
  }
2839
2834
  return s.then(() => {
@@ -2862,7 +2857,7 @@ function Ls(e) {
2862
2857
  const t = {};
2863
2858
  for (let n = 0; n < Ra; n++) {
2864
2859
  const s = Dt[n], i = e.props[s];
2865
- (ge(i) || i === !1) && (t[s] = i);
2860
+ (me(i) || i === !1) && (t[s] = i);
2866
2861
  }
2867
2862
  return t;
2868
2863
  }
@@ -2874,7 +2869,7 @@ function ka(e) {
2874
2869
  let t = Ia(e), n = pn(), s = !0;
2875
2870
  const i = (l) => (u, c) => {
2876
2871
  var f;
2877
- const d = ye(e, c, l === "exit" ? (f = e.presenceContext) == null ? void 0 : f.custom : void 0);
2872
+ const d = ge(e, c, l === "exit" ? (f = e.presenceContext) == null ? void 0 : f.custom : void 0);
2878
2873
  if (d) {
2879
2874
  const { transition: h, transitionEnd: g, ...y } = d;
2880
2875
  u = { ...u, ...y, ...g };
@@ -2888,7 +2883,7 @@ function ka(e) {
2888
2883
  const { props: u } = e, c = Ls(e.parent) || {}, d = [], f = /* @__PURE__ */ new Set();
2889
2884
  let h = {}, g = 1 / 0;
2890
2885
  for (let T = 0; T < La; T++) {
2891
- const p = Oa[T], V = n[p], m = u[p] !== void 0 ? u[p] : c[p], C = ge(m), w = p === l ? V.isActive : null;
2886
+ const p = Oa[T], V = n[p], m = u[p] !== void 0 ? u[p] : c[p], C = me(m), w = p === l ? V.isActive : null;
2892
2887
  w === !1 && (g = T);
2893
2888
  let A = m === c[p] && m !== u[p] && C;
2894
2889
  if (A && s && e.manuallyAnimateOnMount && (A = !1), V.protectedKeys = { ...h }, // If it isn't active and hasn't *just* been set as inactive
@@ -2926,7 +2921,7 @@ function ka(e) {
2926
2921
  if (f.size) {
2927
2922
  const T = {};
2928
2923
  if (typeof u.initial != "boolean") {
2929
- const p = ye(e, Array.isArray(u.initial) ? u.initial[0] : u.initial);
2924
+ const p = ge(e, Array.isArray(u.initial) ? u.initial[0] : u.initial);
2930
2925
  p && p.transition && (T.transition = p.transition);
2931
2926
  }
2932
2927
  f.forEach((p) => {
@@ -2963,7 +2958,7 @@ function ka(e) {
2963
2958
  function Na(e, t) {
2964
2959
  return typeof t == "string" ? t !== e : Array.isArray(t) ? !Os(t, e) : !1;
2965
2960
  }
2966
- function j(e = !1) {
2961
+ function _(e = !1) {
2967
2962
  return {
2968
2963
  isActive: e,
2969
2964
  protectedKeys: {},
@@ -2973,23 +2968,23 @@ function j(e = !1) {
2973
2968
  }
2974
2969
  function pn() {
2975
2970
  return {
2976
- animate: j(!0),
2977
- whileInView: j(),
2978
- whileHover: j(),
2979
- whileTap: j(),
2980
- whileDrag: j(),
2981
- whileFocus: j(),
2982
- exit: j()
2971
+ animate: _(!0),
2972
+ whileInView: _(),
2973
+ whileHover: _(),
2974
+ whileTap: _(),
2975
+ whileDrag: _(),
2976
+ whileFocus: _(),
2977
+ exit: _()
2983
2978
  };
2984
2979
  }
2985
- class le {
2980
+ class ue {
2986
2981
  constructor(t) {
2987
2982
  this.isMounted = !1, this.node = t;
2988
2983
  }
2989
2984
  update() {
2990
2985
  }
2991
2986
  }
2992
- class Ba extends le {
2987
+ class Ba extends ue {
2993
2988
  /**
2994
2989
  * We dynamically generate the AnimationState manager as it contains a reference
2995
2990
  * to the underlying animation library. We only want to load that if we load this,
@@ -3018,7 +3013,7 @@ class Ba extends le {
3018
3013
  }
3019
3014
  }
3020
3015
  let Ka = 0;
3021
- class Wa extends le {
3016
+ class Wa extends ue {
3022
3017
  constructor() {
3023
3018
  super(...arguments), this.id = Ka++;
3024
3019
  }
@@ -3089,7 +3084,7 @@ function yn(e, t, n) {
3089
3084
  const i = "onHover" + n, r = s[i];
3090
3085
  r && k.postRender(() => r(t, Is(t)));
3091
3086
  }
3092
- class za extends le {
3087
+ class Ga extends ue {
3093
3088
  mount() {
3094
3089
  const { current: t } = this.node;
3095
3090
  t && (this.unmount = xo(t, (n, s) => (yn(this.node, s, "Start"), (i) => yn(this.node, i, "End"))));
@@ -3097,7 +3092,7 @@ class za extends le {
3097
3092
  unmount() {
3098
3093
  }
3099
3094
  }
3100
- class Ga extends le {
3095
+ class za extends ue {
3101
3096
  constructor() {
3102
3097
  super(...arguments), this.isActive = !1;
3103
3098
  }
@@ -3127,7 +3122,7 @@ function bn(e, t, n) {
3127
3122
  const i = "onTap" + (n === "End" ? "" : n), r = s[i];
3128
3123
  r && k.postRender(() => r(t, Is(t)));
3129
3124
  }
3130
- class Ha extends le {
3125
+ class Ha extends ue {
3131
3126
  mount() {
3132
3127
  const { current: t } = this.node;
3133
3128
  t && (this.unmount = Po(t, (n, s) => (bn(this.node, s, "Start"), (i, { success: r }) => bn(this.node, i, r ? "End" : "Cancel")), { useGlobalTarget: this.node.props.globalTapTarget }));
@@ -3157,7 +3152,7 @@ const Ja = {
3157
3152
  some: 0,
3158
3153
  all: 1
3159
3154
  };
3160
- class Qa extends le {
3155
+ class Qa extends ue {
3161
3156
  constructor() {
3162
3157
  super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
3163
3158
  }
@@ -3200,10 +3195,10 @@ const tc = {
3200
3195
  Feature: Ha
3201
3196
  },
3202
3197
  focus: {
3203
- Feature: Ga
3198
+ Feature: za
3204
3199
  },
3205
3200
  hover: {
3206
- Feature: za
3201
+ Feature: Ga
3207
3202
  }
3208
3203
  }, lt = { current: null }, Ns = { current: !1 };
3209
3204
  function nc() {
@@ -3274,7 +3269,7 @@ class rc {
3274
3269
  this.current = t, sc.set(t, this), this.projection && !this.projection.instance && this.projection.mount(t), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, s) => this.bindToMotionValue(s, n)), Ns.current || nc(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : lt.current, process.env.NODE_ENV !== "production" && On(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected."), this.parent && this.parent.children.add(this), this.update(this.props, this.presenceContext);
3275
3270
  }
3276
3271
  unmount() {
3277
- this.projection && this.projection.unmount(), He(this.notifyUpdate), He(this.render), this.valueSubscriptions.forEach((t) => t()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
3272
+ this.projection && this.projection.unmount(), Ye(this.notifyUpdate), Ye(this.render), this.valueSubscriptions.forEach((t) => t()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
3278
3273
  for (const t in this.events)
3279
3274
  this.events[t].clear();
3280
3275
  for (const t in this.features) {
@@ -3285,7 +3280,7 @@ class rc {
3285
3280
  }
3286
3281
  bindToMotionValue(t, n) {
3287
3282
  this.valueSubscriptions.has(t) && this.valueSubscriptions.get(t)();
3288
- const s = ue.has(t);
3283
+ const s = ce.has(t);
3289
3284
  s && this.onBindTransform && this.onBindTransform();
3290
3285
  const i = n.on("change", (a) => {
3291
3286
  this.latestValues[t] = a, this.props.onUpdate && k.preRender(this.notifyUpdate), s && this.projection && (this.projection.isTransformDirty = !0);
@@ -3405,7 +3400,7 @@ class rc {
3405
3400
  */
3406
3401
  readValue(t, n) {
3407
3402
  let s = this.latestValues[t] !== void 0 || !this.current ? this.latestValues[t] : this.getBaseTargetFromProps(this.props, t) ?? this.readValueFromInstance(this.current, t, this.options);
3408
- return s != null && (typeof s == "string" && (Pn(s) || En(s)) ? s = parseFloat(s) : !Do(s) && ae.test(n) && (s = ms(t, n)), this.setBaseTarget(t, O(s) ? s.get() : s)), O(s) ? s.get() : s;
3403
+ return s != null && (typeof s == "string" && (Pn(s) || En(s)) ? s = parseFloat(s) : !Do(s) && oe.test(n) && (s = ms(t, n)), this.setBaseTarget(t, O(s) ? s.get() : s)), O(s) ? s.get() : s;
3409
3404
  }
3410
3405
  /**
3411
3406
  * Set the base target to later animate back to. This is currently
@@ -3477,10 +3472,10 @@ class ac extends Bs {
3477
3472
  }
3478
3473
  readValueFromInstance(t, n) {
3479
3474
  var s;
3480
- if (ue.has(n))
3481
- return (s = this.projection) != null && s.isProjecting ? et(n) : Or(t, n);
3475
+ if (ce.has(n))
3476
+ return (s = this.projection) != null && s.isProjecting ? tt(n) : Or(t, n);
3482
3477
  {
3483
- const i = oc(t), r = (zn(n) ? i.getPropertyValue(n) : i[n]) || 0;
3478
+ const i = oc(t), r = (Gn(n) ? i.getPropertyValue(n) : i[n]) || 0;
3484
3479
  return typeof r == "string" ? r.trim() : r;
3485
3480
  }
3486
3481
  }
@@ -3532,7 +3527,7 @@ class uc extends Bs {
3532
3527
  return t[n];
3533
3528
  }
3534
3529
  readValueFromInstance(t, n) {
3535
- if (ue.has(n)) {
3530
+ if (ce.has(n)) {
3536
3531
  const s = ps(n);
3537
3532
  return s && s.default || 0;
3538
3533
  }
@@ -3567,7 +3562,7 @@ const lc = (e, t) => Lt(e) ? new uc(t) : new ac(t, {
3567
3562
  },
3568
3563
  removeTopLayer: () => {
3569
3564
  }
3570
- }), Rc = ({ children: e }) => {
3565
+ }), Dc = ({ children: e }) => {
3571
3566
  const [t, n] = ne.useState([]), s = (o) => {
3572
3567
  n((a) => [...a, o]);
3573
3568
  }, i = (o) => {
@@ -3800,6 +3795,6 @@ Object.assign(Tc, {
3800
3795
  });
3801
3796
  export {
3802
3797
  Tc as Modal,
3803
- Rc as ModalStackingProvider
3798
+ Dc as ModalStackingProvider
3804
3799
  };
3805
3800
  //# sourceMappingURL=index.mjs.map