react-motion-modal 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ (function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-font-weight:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-500:oklch(63.7% .237 25.331);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--font-weight-semibold:600;--radius-md:.375rem;--radius-xl:.75rem;--blur-sm:8px;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.absolute{position:absolute}.fixed{position:fixed}.top-0{top:calc(var(--spacing)*0)}.top-1\\/2{top:50%}.right-0{right:calc(var(--spacing)*0)}.bottom-0{bottom:calc(var(--spacing)*0)}.left-0{left:calc(var(--spacing)*0)}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.mt-4{margin-top:calc(var(--spacing)*4)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.flex{display:flex}.h-screen{height:100vh}.max-h-screen{max-height:100vh}.w-screen{width:100vw}.max-w-screen{max-width:100vw}.-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.cursor-pointer{cursor:pointer}.items-center{align-items:center}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-2{gap:calc(var(--spacing)*2)}.overflow-auto{overflow:auto}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.bg-black{background-color:var(--color-black)}.bg-black\\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\\/40{background-color:color-mix(in oklab,var(--color-black)40%,transparent)}}.bg-blue-400{background-color:var(--color-blue-400)}.bg-gray-500{background-color:var(--color-gray-500)}.bg-white{background-color:var(--color-white)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-2{padding-block:calc(var(--spacing)*2)}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.break-all{word-break:break-all}.text-blue-500{color:var(--color-blue-500)}.text-red-500{color:var(--color-red-500)}.text-white{color:var(--color-white)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}@media (hover:hover){.hover\\:bg-blue-600:hover{background-color:var(--color-blue-600)}.hover\\:bg-gray-600:hover{background-color:var(--color-gray-600)}.hover\\:opacity-80:hover{opacity:.8}}@media (min-width:64rem){.lg\\:left-1\\/2{left:50%}.lg\\:-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
1
2
  import { jsx as X, Fragment as $r, jsxs as Wr } from "react/jsx-runtime";
2
3
  import * as Ze from "react";
3
4
  import re, { createContext as Ct, useRef as et, useLayoutEffect as Gr, useEffect as he, useId as Je, useContext as F, useInsertionEffect as ls, useMemo as mt, useCallback as cs, Children as Hr, isValidElement as zr, useState as Ln, forwardRef as Yr, Fragment as hs, createElement as qr, Component as Xr } from "react";
@@ -46,12 +47,12 @@ function Qr() {
46
47
  return v && s(p.prototype, v), p;
47
48
  }
48
49
  function r(p) {
49
- return u(p) || l(p) || a(p) || h();
50
+ return l(p) || u(p) || a(p) || h();
50
51
  }
51
- function u(p) {
52
+ function l(p) {
52
53
  if (Array.isArray(p)) return f(p);
53
54
  }
54
- function l(p) {
55
+ function u(p) {
55
56
  if (typeof Symbol < "u" && Symbol.iterator in Object(p)) return Array.from(p);
56
57
  }
57
58
  function a(p, v) {
@@ -572,10 +573,10 @@ function an(t, e, n) {
572
573
  }
573
574
  const vs = (t, e, n) => (((1 - 3 * n + 3 * e) * t + (3 * n - 6 * e)) * t + 3 * e) * t, no = 1e-7, io = 12;
574
575
  function so(t, e, n, i, s) {
575
- let o, r, u = 0;
576
+ let o, r, l = 0;
576
577
  do
577
578
  r = e + (n - e) / 2, o = vs(r, i, s) - t, o > 0 ? n = r : e = r;
578
- while (Math.abs(o) > no && ++u < io);
579
+ while (Math.abs(o) > no && ++l < io);
579
580
  return r;
580
581
  }
581
582
  function Gt(t, e, n, i) {
@@ -627,13 +628,13 @@ const bs = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, Ts
627
628
  function lo(t, e) {
628
629
  let n = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), s = !1, o = !1;
629
630
  const r = /* @__PURE__ */ new WeakSet();
630
- let u = {
631
+ let l = {
631
632
  delta: 0,
632
633
  timestamp: 0,
633
634
  isProcessing: !1
634
- }, l = 0;
635
+ }, u = 0;
635
636
  function a(h) {
636
- r.has(h) && (f.schedule(h), t()), l++, h(u);
637
+ r.has(h) && (f.schedule(h), t()), u++, h(l);
637
638
  }
638
639
  const f = {
639
640
  /**
@@ -653,11 +654,11 @@ function lo(t, e) {
653
654
  * Execute all schedule callbacks.
654
655
  */
655
656
  process: (h) => {
656
- if (u = h, s) {
657
+ if (l = h, s) {
657
658
  o = !0;
658
659
  return;
659
660
  }
660
- s = !0, [n, i] = [i, n], n.forEach(a), e && $n.value && $n.value.frameloop[e].push(l), l = 0, n.clear(), s = !1, o && (o = !1, f.process(h));
661
+ s = !0, [n, i] = [i, n], n.forEach(a), e && $n.value && $n.value.frameloop[e].push(u), u = 0, n.clear(), s = !1, o && (o = !1, f.process(h));
661
662
  }
662
663
  };
663
664
  return f;
@@ -669,9 +670,9 @@ function Es(t, e) {
669
670
  delta: 0,
670
671
  timestamp: 0,
671
672
  isProcessing: !1
672
- }, o = () => n = !0, r = qt.reduce((d, m) => (d[m] = lo(o, e ? m : void 0), d), {}), { setup: u, read: l, resolveKeyframes: a, preUpdate: f, update: h, preRender: c, render: g, postRender: T } = r, S = () => {
673
+ }, o = () => n = !0, r = qt.reduce((d, m) => (d[m] = lo(o, e ? m : void 0), d), {}), { setup: l, read: u, resolveKeyframes: a, preUpdate: f, update: h, preRender: c, render: g, postRender: T } = r, S = () => {
673
674
  const d = st.useManualTiming ? s.timestamp : performance.now();
674
- n = !1, st.useManualTiming || (s.delta = i ? 1e3 / 60 : Math.max(Math.min(d - s.timestamp, co), 1)), s.timestamp = d, s.isProcessing = !0, u.process(s), l.process(s), a.process(s), f.process(s), h.process(s), c.process(s), g.process(s), T.process(s), s.isProcessing = !1, n && e && (i = !1, t(S));
675
+ n = !1, st.useManualTiming || (s.delta = i ? 1e3 / 60 : Math.max(Math.min(d - s.timestamp, co), 1)), s.timestamp = d, s.isProcessing = !0, l.process(s), u.process(s), a.process(s), f.process(s), h.process(s), c.process(s), g.process(s), T.process(s), s.isProcessing = !1, n && e && (i = !1, t(S));
675
676
  }, C = () => {
676
677
  n = !0, i = !0, s.isProcessing || t(S);
677
678
  };
@@ -710,12 +711,12 @@ function mo(t) {
710
711
  const yo = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, dn = (t, e) => (n) => !!(typeof n == "string" && yo.test(n) && n.startsWith(t) || e && !mo(n) && Object.prototype.hasOwnProperty.call(n, e)), Vs = (t, e, n) => (i) => {
711
712
  if (typeof i != "string")
712
713
  return i;
713
- const [s, o, r, u] = i.match(fn);
714
+ const [s, o, r, l] = i.match(fn);
714
715
  return {
715
716
  [t]: parseFloat(s),
716
717
  [e]: parseFloat(o),
717
718
  [n]: parseFloat(r),
718
- alpha: u !== void 0 ? parseFloat(u) : 1
719
+ alpha: l !== void 0 ? parseFloat(l) : 1
719
720
  };
720
721
  }, go = (t) => nt(0, 255, t), ve = {
721
722
  ...At,
@@ -770,8 +771,8 @@ function Ft(t) {
770
771
  var: []
771
772
  }, s = [];
772
773
  let o = 0;
773
- const u = e.replace(Po, (l) => (k.test(l) ? (i.color.push(o), s.push(_s), n.push(k.parse(l))) : l.startsWith(Co) ? (i.var.push(o), s.push(So), n.push(l)) : (i.number.push(o), s.push(Rs), n.push(parseFloat(l))), ++o, Gn)).split(Gn);
774
- return { values: n, split: u, indexes: i, types: s };
774
+ const l = e.replace(Po, (u) => (k.test(u) ? (i.color.push(o), s.push(_s), n.push(k.parse(u))) : u.startsWith(Co) ? (i.var.push(o), s.push(So), n.push(u)) : (i.number.push(o), s.push(Rs), n.push(parseFloat(u))), ++o, Gn)).split(Gn);
775
+ return { values: n, split: l, indexes: i, types: s };
775
776
  }
776
777
  function Os(t) {
777
778
  return Ft(t).values;
@@ -782,8 +783,8 @@ function ks(t) {
782
783
  let o = "";
783
784
  for (let r = 0; r < i; r++)
784
785
  if (o += e[r], s[r] !== void 0) {
785
- const u = n[r];
786
- u === Rs ? o += Ot(s[r]) : u === _s ? o += k.transform(s[r]) : o += s[r];
786
+ const l = n[r];
787
+ l === Rs ? o += Ot(s[r]) : l === _s ? o += k.transform(s[r]) : o += s[r];
787
788
  }
788
789
  return o;
789
790
  };
@@ -808,8 +809,8 @@ function Eo({ hue: t, saturation: e, lightness: n, alpha: i }) {
808
809
  if (!e)
809
810
  s = o = r = n;
810
811
  else {
811
- const u = n < 0.5 ? n * (1 + e) : n + e - n * e, l = 2 * n - u;
812
- s = be(l, u, t + 1 / 3), o = be(l, u, t), r = be(l, u, t - 1 / 3);
812
+ const l = n < 0.5 ? n * (1 + e) : n + e - n * e, u = 2 * n - l;
813
+ s = be(u, l, t + 1 / 3), o = be(u, l, t), r = be(u, l, t - 1 / 3);
813
814
  }
814
815
  return {
815
816
  red: Math.round(s * 255),
@@ -869,8 +870,8 @@ function Oo(t, e) {
869
870
  function ko(t, e) {
870
871
  const n = [], i = { color: 0, var: 0, number: 0 };
871
872
  for (let s = 0; s < e.values.length; s++) {
872
- const o = e.types[s], r = t.indexes[o][i[o]], u = t.values[r] ?? 0;
873
- n[s] = u, i[o]++;
873
+ const o = e.types[s], r = t.indexes[o][i[o]], l = t.values[r] ?? 0;
874
+ n[s] = l, i[o]++;
874
875
  }
875
876
  return n;
876
877
  }
@@ -966,15 +967,15 @@ function Fo({ duration: t = D.duration, bounce: e = D.bounce, velocity: n = D.ve
966
967
  const f = Math.exp(-a * t), h = (n - a) * (t * t);
967
968
  return f * h;
968
969
  });
969
- const u = 5 / t, l = No(s, o, u);
970
- if (t = /* @__PURE__ */ Z(t), isNaN(l))
970
+ const l = 5 / t, u = No(s, o, l);
971
+ if (t = /* @__PURE__ */ Z(t), isNaN(u))
971
972
  return {
972
973
  stiffness: D.stiffness,
973
974
  damping: D.damping,
974
975
  duration: t
975
976
  };
976
977
  {
977
- const a = Math.pow(l, 2) * i;
978
+ const a = Math.pow(u, 2) * i;
978
979
  return {
979
980
  stiffness: a,
980
981
  damping: r * 2 * Math.sqrt(i * a),
@@ -1031,10 +1032,10 @@ function ue(t = D.visualDuration, e = D.bounce) {
1031
1032
  bounce: e
1032
1033
  } : t;
1033
1034
  let { restSpeed: i, restDelta: s } = n;
1034
- const o = n.keyframes[0], r = n.keyframes[n.keyframes.length - 1], u = { done: !1, value: o }, { stiffness: l, damping: a, mass: f, duration: h, velocity: c, isResolvedFromDuration: g } = Wo({
1035
+ const o = n.keyframes[0], r = n.keyframes[n.keyframes.length - 1], l = { done: !1, value: o }, { stiffness: u, damping: a, mass: f, duration: h, velocity: c, isResolvedFromDuration: g } = Wo({
1035
1036
  ...n,
1036
1037
  velocity: -/* @__PURE__ */ J(n.velocity || 0)
1037
- }), T = c || 0, S = a / (2 * Math.sqrt(l * f)), C = r - o, p = /* @__PURE__ */ J(Math.sqrt(l / f)), v = Math.abs(C) < 5;
1038
+ }), T = c || 0, S = a / (2 * Math.sqrt(u * f)), C = r - o, p = /* @__PURE__ */ J(Math.sqrt(u / f)), v = Math.abs(C) < 5;
1038
1039
  i || (i = v ? D.restSpeed.granular : D.restSpeed.default), s || (s = v ? D.restDelta.granular : D.restDelta.default);
1039
1040
  let d;
1040
1041
  if (S < 1) {
@@ -1057,14 +1058,14 @@ function ue(t = D.visualDuration, e = D.bounce) {
1057
1058
  next: (y) => {
1058
1059
  const b = d(y);
1059
1060
  if (g)
1060
- u.done = y >= h;
1061
+ l.done = y >= h;
1061
1062
  else {
1062
1063
  let x = y === 0 ? T : 0;
1063
1064
  S < 1 && (x = y === 0 ? /* @__PURE__ */ Z(T) : Is(d, y, b));
1064
1065
  const w = Math.abs(x) <= i, M = Math.abs(r - b) <= s;
1065
- u.done = w && M;
1066
+ l.done = w && M;
1066
1067
  }
1067
- return u.value = u.done ? r : b, u;
1068
+ return l.value = l.done ? r : b, l;
1068
1069
  },
1069
1070
  toString: () => {
1070
1071
  const y = Math.min(mn(m), ae), b = Bs((x) => m.next(y * x).value, y, 30);
@@ -1079,11 +1080,11 @@ ue.applyToOptions = (t) => {
1079
1080
  const e = Bo(t, 100, ue);
1080
1081
  return t.ease = e.ease, t.duration = /* @__PURE__ */ Z(e.duration), t.type = "keyframes", t;
1081
1082
  };
1082
- function ke({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: i = 325, bounceDamping: s = 10, bounceStiffness: o = 500, modifyTarget: r, min: u, max: l, restDelta: a = 0.5, restSpeed: f }) {
1083
+ function ke({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: i = 325, bounceDamping: s = 10, bounceStiffness: o = 500, modifyTarget: r, min: l, max: u, restDelta: a = 0.5, restSpeed: f }) {
1083
1084
  const h = t[0], c = {
1084
1085
  done: !1,
1085
1086
  value: h
1086
- }, g = (w) => u !== void 0 && w < u || l !== void 0 && w > l, T = (w) => u === void 0 ? l : l === void 0 || Math.abs(u - w) < Math.abs(l - w) ? u : l;
1087
+ }, g = (w) => l !== void 0 && w < l || u !== void 0 && w > u, T = (w) => l === void 0 ? u : u === void 0 || Math.abs(l - w) < Math.abs(u - w) ? l : u;
1087
1088
  let S = n * e;
1088
1089
  const C = h + S, p = r === void 0 ? C : r(C);
1089
1090
  p !== C && (S = p - h);
@@ -1114,12 +1115,12 @@ function ke({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: i = 3
1114
1115
  function Go(t, e, n) {
1115
1116
  const i = [], s = n || st.mix || Ks, o = t.length - 1;
1116
1117
  for (let r = 0; r < o; r++) {
1117
- let u = s(t[r], t[r + 1]);
1118
+ let l = s(t[r], t[r + 1]);
1118
1119
  if (e) {
1119
- const l = Array.isArray(e) ? e[r] || z : e;
1120
- u = Wt(l, u);
1120
+ const u = Array.isArray(e) ? e[r] || z : e;
1121
+ l = Wt(u, l);
1121
1122
  }
1122
- i.push(u);
1123
+ i.push(l);
1123
1124
  }
1124
1125
  return i;
1125
1126
  }
@@ -1131,15 +1132,15 @@ function Ho(t, e, { clamp: n = !0, ease: i, mixer: s } = {}) {
1131
1132
  return () => e[1];
1132
1133
  const r = t[0] === t[1];
1133
1134
  t[0] > t[o - 1] && (t = [...t].reverse(), e = [...e].reverse());
1134
- const u = Go(e, i, s), l = u.length, a = (f) => {
1135
+ const l = Go(e, i, s), u = l.length, a = (f) => {
1135
1136
  if (r && f < t[0])
1136
1137
  return e[0];
1137
1138
  let h = 0;
1138
- if (l > 1)
1139
+ if (u > 1)
1139
1140
  for (; h < t.length - 2 && !(f < t[h + 1]); h++)
1140
1141
  ;
1141
1142
  const c = /* @__PURE__ */ Bt(t[h], t[h + 1], f);
1142
- return u[h](c);
1143
+ return l[h](c);
1143
1144
  };
1144
1145
  return n ? (f) => a(nt(t[0], t[o - 1], f)) : a;
1145
1146
  }
@@ -1169,18 +1170,18 @@ function gt({ duration: t = 300, keyframes: e, times: n, ease: i = "easeInOut" }
1169
1170
  // TODO Maybe we should warn here if there's a length mismatch
1170
1171
  n && n.length === e.length ? n : Yo(e),
1171
1172
  t
1172
- ), u = Ho(r, e, {
1173
+ ), l = Ho(r, e, {
1173
1174
  ease: Array.isArray(s) ? s : Xo(e, s)
1174
1175
  });
1175
1176
  return {
1176
1177
  calculatedDuration: t,
1177
- next: (l) => (o.value = u(l), o.done = l >= t, o)
1178
+ next: (u) => (o.value = l(u), o.done = u >= t, o)
1178
1179
  };
1179
1180
  }
1180
1181
  const Zo = (t) => t !== null;
1181
1182
  function yn(t, { repeat: e, repeatType: n = "loop" }, i, s = 1) {
1182
- const o = t.filter(Zo), u = s < 0 || e && n !== "loop" && e % 2 === 1 ? 0 : o.length - 1;
1183
- return !u || i === void 0 ? o[u] : i;
1183
+ const o = t.filter(Zo), l = s < 0 || e && n !== "loop" && e % 2 === 1 ? 0 : o.length - 1;
1184
+ return !l || i === void 0 ? o[l] : i;
1184
1185
  }
1185
1186
  const Jo = {
1186
1187
  decay: ke,
@@ -1228,13 +1229,13 @@ class vn extends gn {
1228
1229
  const { options: e } = this;
1229
1230
  Fs(e);
1230
1231
  const { type: n = gt, repeat: i = 0, repeatDelay: s = 0, repeatType: o, velocity: r = 0 } = e;
1231
- let { keyframes: u } = e;
1232
- const l = n || gt;
1233
- process.env.NODE_ENV !== "production" && l !== gt && it(u.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${u}`), l !== gt && typeof u[0] != "number" && (this.mixKeyframes = Wt(Qo, Ks(u[0], u[1])), u = [0, 100]);
1234
- const a = l({ ...e, keyframes: u });
1235
- o === "mirror" && (this.mirroredGenerator = l({
1232
+ let { keyframes: l } = e;
1233
+ const u = n || gt;
1234
+ process.env.NODE_ENV !== "production" && u !== gt && it(l.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${l}`), u !== gt && typeof l[0] != "number" && (this.mixKeyframes = Wt(Qo, Ks(l[0], l[1])), l = [0, 100]);
1235
+ const a = u({ ...e, keyframes: l });
1236
+ o === "mirror" && (this.mirroredGenerator = u({
1236
1237
  ...e,
1237
- keyframes: [...u].reverse(),
1238
+ keyframes: [...l].reverse(),
1238
1239
  velocity: -r
1239
1240
  })), a.calculatedDuration === null && (a.calculatedDuration = mn(a));
1240
1241
  const { calculatedDuration: f } = a;
@@ -1245,7 +1246,7 @@ class vn extends gn {
1245
1246
  this.holdTime !== null ? this.currentTime = this.holdTime : this.currentTime = n;
1246
1247
  }
1247
1248
  tick(e, n = !1) {
1248
- const { generator: i, totalDuration: s, mixKeyframes: o, mirroredGenerator: r, resolvedDuration: u, calculatedDuration: l } = this;
1249
+ const { generator: i, totalDuration: s, mixKeyframes: o, mirroredGenerator: r, resolvedDuration: l, calculatedDuration: u } = this;
1249
1250
  if (this.startTime === null)
1250
1251
  return i.next(0);
1251
1252
  const { delay: a = 0, keyframes: f, repeat: h, repeatType: c, repeatDelay: g, type: T, onUpdate: S, finalKeyframe: C } = this.options;
@@ -1254,14 +1255,14 @@ class vn extends gn {
1254
1255
  this.currentTime = Math.max(p, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = s);
1255
1256
  let d = this.currentTime, m = i;
1256
1257
  if (h) {
1257
- const w = Math.min(this.currentTime, s) / u;
1258
+ const w = Math.min(this.currentTime, s) / l;
1258
1259
  let M = Math.floor(w), A = w % 1;
1259
- !A && w >= 1 && (A = 1), A === 1 && M--, M = Math.min(M, h + 1), !!(M % 2) && (c === "reverse" ? (A = 1 - A, g && (A -= g / u)) : c === "mirror" && (m = r)), d = nt(0, 1, A) * u;
1260
+ !A && w >= 1 && (A = 1), A === 1 && M--, M = Math.min(M, h + 1), !!(M % 2) && (c === "reverse" ? (A = 1 - A, g && (A -= g / l)) : c === "mirror" && (m = r)), d = nt(0, 1, A) * l;
1260
1261
  }
1261
1262
  const y = v ? { done: !1, value: f[0] } : m.next(d);
1262
1263
  o && (y.value = o(y.value));
1263
1264
  let { done: b } = y;
1264
- !v && l !== null && (b = this.playbackSpeed >= 0 ? this.currentTime >= s : this.currentTime <= 0);
1265
+ !v && u !== null && (b = this.playbackSpeed >= 0 ? this.currentTime >= s : this.currentTime <= 0);
1265
1266
  const x = this.holdTime === null && (this.state === "finished" || this.state === "running" && b);
1266
1267
  return x && T !== ke && (y.value = yn(f, this.options, C, this.speed)), S && S(y.value), x && this.finish(), y;
1267
1268
  }
@@ -1372,8 +1373,8 @@ function Ie(t, e) {
1372
1373
  if (n)
1373
1374
  i = na, s = n;
1374
1375
  else {
1375
- const u = t.match(/^matrix\(([-\d.e\s,]+)\)$/u);
1376
- i = ea, s = u;
1376
+ const l = t.match(/^matrix\(([-\d.e\s,]+)\)$/u);
1377
+ i = ea, s = l;
1377
1378
  }
1378
1379
  if (!s)
1379
1380
  return Be(e);
@@ -1469,8 +1470,8 @@ class bn {
1469
1470
  if (o !== void 0)
1470
1471
  e[0] = o;
1471
1472
  else if (i && n) {
1472
- const u = i.readValue(n, r);
1473
- u != null && (e[0] = u);
1473
+ const l = i.readValue(n, r);
1474
+ l != null && (e[0] = l);
1474
1475
  }
1475
1476
  e[0] === void 0 && (e[0] = r), s && o === void 0 && s.set(e[0]);
1476
1477
  }
@@ -1525,12 +1526,12 @@ function $s(t, e) {
1525
1526
  if (t)
1526
1527
  return typeof t == "function" ? Us() ? Bs(t, e) : "ease-out" : Ms(t) ? _t(t) : Array.isArray(t) ? t.map((n) => $s(n, e) || Qn.easeOut) : Qn[t];
1527
1528
  }
1528
- function pa(t, e, n, { delay: i = 0, duration: s = 300, repeat: o = 0, repeatType: r = "loop", ease: u = "easeOut", times: l } = {}, a = void 0) {
1529
+ function pa(t, e, n, { delay: i = 0, duration: s = 300, repeat: o = 0, repeatType: r = "loop", ease: l = "easeOut", times: u } = {}, a = void 0) {
1529
1530
  const f = {
1530
1531
  [e]: n
1531
1532
  };
1532
- l && (f.offset = l);
1533
- const h = $s(u, s);
1533
+ u && (f.offset = u);
1534
+ const h = $s(l, s);
1534
1535
  Array.isArray(h) && (f.easing = h);
1535
1536
  const c = {
1536
1537
  delay: i,
@@ -1552,15 +1553,15 @@ class ya extends gn {
1552
1553
  constructor(e) {
1553
1554
  if (super(), this.finishedTime = null, this.isStopped = !1, !e)
1554
1555
  return;
1555
- const { element: n, name: i, keyframes: s, pseudoElement: o, allowFlatten: r = !1, finalKeyframe: u, onComplete: l } = e;
1556
+ const { element: n, name: i, keyframes: s, pseudoElement: o, allowFlatten: r = !1, finalKeyframe: l, onComplete: u } = e;
1556
1557
  this.isPseudoElement = !!o, this.allowFlatten = r, this.options = e, it(typeof e.type != "string", `animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);
1557
1558
  const a = ma(e);
1558
1559
  this.animation = pa(n, i, s, a, o), a.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
1559
1560
  if (this.finishedTime = this.time, !o) {
1560
- const f = yn(s, this.options, u, this.speed);
1561
+ const f = yn(s, this.options, l, this.speed);
1561
1562
  this.updateMotionValue ? this.updateMotionValue(f) : ca(n, i, f), this.animation.cancel();
1562
1563
  }
1563
- l?.(), this.notifyFinished();
1564
+ u?.(), this.notifyFinished();
1564
1565
  };
1565
1566
  }
1566
1567
  play() {
@@ -1668,11 +1669,11 @@ class ba extends ya {
1668
1669
  n.set(e);
1669
1670
  return;
1670
1671
  }
1671
- const u = new vn({
1672
+ const l = new vn({
1672
1673
  ...r,
1673
1674
  autoplay: !1
1674
- }), l = /* @__PURE__ */ Z(this.finishedTime ?? this.time);
1675
- n.setWithVelocity(u.sample(l - ti).value, u.sample(l).value, ti), u.stop();
1675
+ }), u = /* @__PURE__ */ Z(this.finishedTime ?? this.time);
1676
+ n.setWithVelocity(l.sample(u - ti).value, l.sample(u).value, ti), l.stop();
1676
1677
  }
1677
1678
  }
1678
1679
  const ei = (t, e) => e === "zIndex" ? !1 : !!(typeof t == "number" || Array.isArray(t) || typeof t == "string" && // It's animatable if we have a string
@@ -1692,8 +1693,8 @@ function xa(t, e, n, i) {
1692
1693
  return !1;
1693
1694
  if (e === "display" || e === "visibility")
1694
1695
  return !0;
1695
- const o = t[t.length - 1], r = ei(s, e), u = ei(o, e);
1696
- return Pt(r === u, `You are trying to animate ${e} from "${s}" to "${o}". ${s} is not an animatable value - to enable this animation set ${s} to a value animatable to ${o} via the \`style\` property.`), !r || !u ? !1 : Ta(t) || (n === "spring" || Ws(n)) && i;
1696
+ const o = t[t.length - 1], r = ei(s, e), l = ei(o, e);
1697
+ return Pt(r === l, `You are trying to animate ${e} from "${s}" to "${o}". ${s} is not an animatable value - to enable this animation set ${s} to a value animatable to ${o} via the \`style\` property.`), !r || !l ? !1 : Ta(t) || (n === "spring" || Ws(n)) && i;
1697
1698
  }
1698
1699
  function Tn(t) {
1699
1700
  return ms(t) && "offsetHeight" in t;
@@ -1710,16 +1711,16 @@ function Ca(t) {
1710
1711
  const { motionValue: e, name: n, repeatDelay: i, repeatType: s, damping: o, type: r } = t;
1711
1712
  if (!Tn(e?.owner?.current))
1712
1713
  return !1;
1713
- const { onUpdate: u, transformTemplate: l } = e.owner.getProps();
1714
- return Sa() && n && wa.has(n) && (n !== "transform" || !l) && /**
1714
+ const { onUpdate: l, transformTemplate: u } = e.owner.getProps();
1715
+ return Sa() && n && wa.has(n) && (n !== "transform" || !u) && /**
1715
1716
  * If we're outputting values to onUpdate then we can't use WAAPI as there's
1716
1717
  * no way to read the value from WAAPI every frame.
1717
1718
  */
1718
- !u && !i && s !== "mirror" && o !== 0 && r !== "inertia";
1719
+ !l && !i && s !== "mirror" && o !== 0 && r !== "inertia";
1719
1720
  }
1720
1721
  const Pa = 40;
1721
1722
  class Aa extends gn {
1722
- constructor({ autoplay: e = !0, delay: n = 0, type: i = "keyframes", repeat: s = 0, repeatDelay: o = 0, repeatType: r = "loop", keyframes: u, name: l, motionValue: a, element: f, ...h }) {
1723
+ constructor({ autoplay: e = !0, delay: n = 0, type: i = "keyframes", repeat: s = 0, repeatDelay: o = 0, repeatType: r = "loop", keyframes: l, name: u, motionValue: a, element: f, ...h }) {
1723
1724
  super(), this.stop = () => {
1724
1725
  this._animation && (this._animation.stop(), this.stopTimeline?.()), this.keyframeResolver?.cancel();
1725
1726
  }, this.createdAt = U.now();
@@ -1730,17 +1731,17 @@ class Aa extends gn {
1730
1731
  repeat: s,
1731
1732
  repeatDelay: o,
1732
1733
  repeatType: r,
1733
- name: l,
1734
+ name: u,
1734
1735
  motionValue: a,
1735
1736
  element: f,
1736
1737
  ...h
1737
1738
  }, g = f?.KeyframeResolver || bn;
1738
- this.keyframeResolver = new g(u, (T, S, C) => this.onKeyframesResolved(T, S, c, !C), l, a, f), this.keyframeResolver?.scheduleResolve();
1739
+ this.keyframeResolver = new g(l, (T, S, C) => this.onKeyframesResolved(T, S, c, !C), u, a, f), this.keyframeResolver?.scheduleResolve();
1739
1740
  }
1740
1741
  onKeyframesResolved(e, n, i, s) {
1741
1742
  this.keyframeResolver = void 0;
1742
- const { name: o, type: r, velocity: u, delay: l, isHandoff: a, onUpdate: f } = i;
1743
- this.resolvedAt = U.now(), xa(e, o, r, u) || ((st.instantAnimations || !l) && f?.(yn(e, i, n)), e[0] = e[e.length - 1], i.duration = 0, i.repeat = 0);
1743
+ const { name: o, type: r, velocity: l, delay: u, isHandoff: a, onUpdate: f } = i;
1744
+ this.resolvedAt = U.now(), xa(e, o, r, l) || ((st.instantAnimations || !u) && f?.(yn(e, i, n)), e[0] = e[e.length - 1], i.duration = 0, i.repeat = 0);
1744
1745
  const c = {
1745
1746
  startTime: s ? this.resolvedAt ? this.resolvedAt - this.createdAt > Pa ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
1746
1747
  finalKeyframe: n,
@@ -1970,21 +1971,21 @@ class Fa extends bn {
1970
1971
  if (!n || !n.current)
1971
1972
  return;
1972
1973
  super.readKeyframes();
1973
- for (let l = 0; l < e.length; l++) {
1974
- let a = e[l];
1974
+ for (let u = 0; u < e.length; u++) {
1975
+ let a = e[u];
1975
1976
  if (typeof a == "string" && (a = a.trim(), hn(a))) {
1976
1977
  const f = Hs(a, n.current);
1977
- f !== void 0 && (e[l] = f), l === e.length - 1 && (this.finalKeyframe = a);
1978
+ f !== void 0 && (e[u] = f), u === e.length - 1 && (this.finalKeyframe = a);
1978
1979
  }
1979
1980
  }
1980
1981
  if (this.resolveNoneKeyframes(), !zs.has(i) || e.length !== 2)
1981
1982
  return;
1982
- const [s, o] = e, r = ni(s), u = ni(o);
1983
- if (r !== u)
1984
- if (Jn(r) && Jn(u))
1985
- for (let l = 0; l < e.length; l++) {
1986
- const a = e[l];
1987
- typeof a == "string" && (e[l] = parseFloat(a));
1983
+ const [s, o] = e, r = ni(s), l = ni(o);
1984
+ if (r !== l)
1985
+ if (Jn(r) && Jn(l))
1986
+ for (let u = 0; u < e.length; u++) {
1987
+ const a = e[u];
1988
+ typeof a == "string" && (e[u] = parseFloat(a));
1988
1989
  }
1989
1990
  else dt[i] && (this.needsMeasurement = !0);
1990
1991
  }
@@ -2009,8 +2010,8 @@ class Fa extends bn {
2009
2010
  const s = e.getValue(n);
2010
2011
  s && s.jump(this.measuredOrigin, !1);
2011
2012
  const o = i.length - 1, r = i[o];
2012
- i[o] = dt[n](e.measureViewportBox(), window.getComputedStyle(e.current)), r !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = r), this.removedTransforms?.length && this.removedTransforms.forEach(([u, l]) => {
2013
- e.getValue(u).set(l);
2013
+ i[o] = dt[n](e.measureViewportBox(), window.getComputedStyle(e.current)), r !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = r), this.removedTransforms?.length && this.removedTransforms.forEach(([l, u]) => {
2014
+ e.getValue(l).set(u);
2014
2015
  }), this.resolveNoneKeyframes();
2015
2016
  }
2016
2017
  }
@@ -2254,19 +2255,19 @@ function ri(t) {
2254
2255
  return !(t.pointerType === "touch" || Qs());
2255
2256
  }
2256
2257
  function Wa(t, e, n = {}) {
2257
- const [i, s, o] = tr(t, n), r = (u) => {
2258
- if (!ri(u))
2258
+ const [i, s, o] = tr(t, n), r = (l) => {
2259
+ if (!ri(l))
2259
2260
  return;
2260
- const { target: l } = u, a = e(l, u);
2261
- if (typeof a != "function" || !l)
2261
+ const { target: u } = l, a = e(u, l);
2262
+ if (typeof a != "function" || !u)
2262
2263
  return;
2263
2264
  const f = (h) => {
2264
- ri(h) && (a(h), l.removeEventListener("pointerleave", f));
2265
+ ri(h) && (a(h), u.removeEventListener("pointerleave", f));
2265
2266
  };
2266
- l.addEventListener("pointerleave", f, s);
2267
+ u.addEventListener("pointerleave", f, s);
2267
2268
  };
2268
- return i.forEach((u) => {
2269
- u.addEventListener("pointerenter", r, s);
2269
+ return i.forEach((l) => {
2270
+ l.addEventListener("pointerenter", r, s);
2270
2271
  }), o;
2271
2272
  }
2272
2273
  const er = (t, e) => e ? t === e ? !0 : er(t, e.parentElement) : !1, Cn = (t) => t.pointerType === "mouse" ? typeof t.button != "number" || t.button <= 0 : t.isPrimary !== !1, Ga = /* @__PURE__ */ new Set([
@@ -2307,22 +2308,22 @@ function ai(t) {
2307
2308
  return Cn(t) && !Qs();
2308
2309
  }
2309
2310
  function Ya(t, e, n = {}) {
2310
- const [i, s, o] = tr(t, n), r = (u) => {
2311
- const l = u.currentTarget;
2312
- if (!ai(u))
2311
+ const [i, s, o] = tr(t, n), r = (l) => {
2312
+ const u = l.currentTarget;
2313
+ if (!ai(l))
2313
2314
  return;
2314
- ne.add(l);
2315
- const a = e(l, u), f = (g, T) => {
2316
- window.removeEventListener("pointerup", h), window.removeEventListener("pointercancel", c), ne.has(l) && ne.delete(l), ai(g) && typeof a == "function" && a(g, { success: T });
2315
+ ne.add(u);
2316
+ const a = e(u, l), f = (g, T) => {
2317
+ window.removeEventListener("pointerup", h), window.removeEventListener("pointercancel", c), ne.has(u) && ne.delete(u), ai(g) && typeof a == "function" && a(g, { success: T });
2317
2318
  }, h = (g) => {
2318
- f(g, l === window || l === document || n.useGlobalTarget || er(l, g.target));
2319
+ f(g, u === window || u === document || n.useGlobalTarget || er(u, g.target));
2319
2320
  }, c = (g) => {
2320
2321
  f(g, !1);
2321
2322
  };
2322
2323
  window.addEventListener("pointerup", h, s), window.addEventListener("pointercancel", c, s);
2323
2324
  };
2324
- return i.forEach((u) => {
2325
- (n.useGlobalTarget ? window : u).addEventListener("pointerdown", r, s), Tn(u) && (u.addEventListener("focus", (a) => za(a, s)), !Ha(u) && !u.hasAttribute("tabindex") && (u.tabIndex = 0));
2325
+ return i.forEach((l) => {
2326
+ (n.useGlobalTarget ? window : l).addEventListener("pointerdown", r, s), Tn(l) && (l.addEventListener("focus", (a) => za(a, s)), !Ha(l) && !l.hasAttribute("tabindex") && (l.tabIndex = 0));
2326
2327
  }), o;
2327
2328
  }
2328
2329
  function nr(t) {
@@ -2361,20 +2362,20 @@ function Qa({ children: t, isPresent: e, anchorX: n, root: i }) {
2361
2362
  top: 0,
2362
2363
  left: 0,
2363
2364
  right: 0
2364
- }), { nonce: u } = F(Pn);
2365
+ }), { nonce: l } = F(Pn);
2365
2366
  return ls(() => {
2366
- const { width: l, height: a, top: f, left: h, right: c } = r.current;
2367
- if (e || !o.current || !l || !a)
2367
+ const { width: u, height: a, top: f, left: h, right: c } = r.current;
2368
+ if (e || !o.current || !u || !a)
2368
2369
  return;
2369
2370
  const g = n === "left" ? `left: ${h}` : `right: ${c}`;
2370
2371
  o.current.dataset.motionPopId = s;
2371
2372
  const T = document.createElement("style");
2372
- u && (T.nonce = u);
2373
+ l && (T.nonce = l);
2373
2374
  const S = i ?? document.head;
2374
2375
  return S.appendChild(T), T.sheet && T.sheet.insertRule(`
2375
2376
  [data-motion-pop-id="${s}"] {
2376
2377
  position: absolute !important;
2377
- width: ${l}px !important;
2378
+ width: ${u}px !important;
2378
2379
  height: ${a}px !important;
2379
2380
  ${g}px !important;
2380
2381
  top: ${f}px !important;
@@ -2384,7 +2385,7 @@ function Qa({ children: t, isPresent: e, anchorX: n, root: i }) {
2384
2385
  };
2385
2386
  }, [e]), X(Ja, { isPresent: e, childRef: o, sizeRef: r, children: Ze.cloneElement(t, { ref: o }) });
2386
2387
  }
2387
- const tu = ({ children: t, initial: e, isPresent: n, onExitComplete: i, custom: s, presenceAffectsLayout: o, mode: r, anchorX: u, root: l }) => {
2388
+ const tu = ({ children: t, initial: e, isPresent: n, onExitComplete: i, custom: s, presenceAffectsLayout: o, mode: r, anchorX: l, root: u }) => {
2388
2389
  const a = tn(eu), f = Je();
2389
2390
  let h = !0, c = mt(() => (h = !1, {
2390
2391
  id: f,
@@ -2404,7 +2405,7 @@ const tu = ({ children: t, initial: e, isPresent: n, onExitComplete: i, custom:
2404
2405
  a.forEach((g, T) => a.set(T, !1));
2405
2406
  }, [n]), Ze.useEffect(() => {
2406
2407
  !n && !a.size && i && i();
2407
- }, [n]), r === "popLayout" && (t = X(Qa, { isPresent: n, anchorX: u, root: l, children: t })), X(fe.Provider, { value: c, children: t });
2408
+ }, [n]), r === "popLayout" && (t = X(Qa, { isPresent: n, anchorX: l, root: u, children: t })), X(fe.Provider, { value: c, children: t });
2408
2409
  };
2409
2410
  function eu() {
2410
2411
  return /* @__PURE__ */ new Map();
@@ -2428,7 +2429,7 @@ function ui(t) {
2428
2429
  zr(n) && e.push(n);
2429
2430
  }), e;
2430
2431
  }
2431
- const nu = ({ children: t, custom: e, initial: n = !0, onExitComplete: i, presenceAffectsLayout: s = !0, mode: o = "sync", propagate: r = !1, anchorX: u = "left", root: l }) => {
2432
+ const nu = ({ children: t, custom: e, initial: n = !0, onExitComplete: i, presenceAffectsLayout: s = !0, mode: o = "sync", propagate: r = !1, anchorX: l = "left", root: u }) => {
2432
2433
  const [a, f] = ir(r), h = mt(() => ui(t), [t]), c = r && !a ? [] : h.map(Zt), g = et(!0), T = et(h), S = tn(() => /* @__PURE__ */ new Map()), [C, p] = Ln(h), [v, d] = Ln(h);
2433
2434
  ds(() => {
2434
2435
  g.current = !1, T.current = h;
@@ -2459,7 +2460,7 @@ const nu = ({ children: t, custom: e, initial: n = !0, onExitComplete: i, presen
2459
2460
  R || (A = !1);
2460
2461
  }), A && (y?.(), d(T.current), r && f?.(), i && i());
2461
2462
  };
2462
- return X(tu, { isPresent: w, initial: !g.current || n ? void 0 : !1, custom: e, presenceAffectsLayout: s, mode: o, root: l, onExitComplete: w ? void 0 : M, anchorX: u, children: b }, x);
2463
+ return X(tu, { isPresent: w, initial: !g.current || n ? void 0 : !1, custom: e, presenceAffectsLayout: s, mode: o, root: u, onExitComplete: w ? void 0 : M, anchorX: l, children: b }, x);
2463
2464
  }) });
2464
2465
  }, sr = Ct({ strict: !1 }), li = {
2465
2466
  animation: [
@@ -2613,20 +2614,20 @@ function hu(t, e, n) {
2613
2614
  }
2614
2615
  const En = (t) => t.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), fu = "framerAppearId", ar = "data-" + En(fu), ur = Ct({});
2615
2616
  function du(t, e, n, i, s) {
2616
- const { visualElement: o } = F(de), r = F(sr), u = F(fe), l = F(Pn).reducedMotion, a = et(null);
2617
+ const { visualElement: o } = F(de), r = F(sr), l = F(fe), u = F(Pn).reducedMotion, a = et(null);
2617
2618
  i = i || r.renderer, !a.current && i && (a.current = i(t, {
2618
2619
  visualState: e,
2619
2620
  parent: o,
2620
2621
  props: n,
2621
- presenceContext: u,
2622
- blockInitialAnimation: u ? u.initial === !1 : !1,
2623
- reducedMotionConfig: l
2622
+ presenceContext: l,
2623
+ blockInitialAnimation: l ? l.initial === !1 : !1,
2624
+ reducedMotionConfig: u
2624
2625
  }));
2625
2626
  const f = a.current, h = F(ur);
2626
2627
  f && !f.projection && s && (f.type === "html" || f.type === "svg") && pu(a.current, n, s, h);
2627
2628
  const c = et(!1);
2628
2629
  ls(() => {
2629
- f && c.current && f.update(n, u);
2630
+ f && c.current && f.update(n, l);
2630
2631
  });
2631
2632
  const g = n[ar], T = et(!!g && !window.MotionHandoffIsComplete?.(g) && window.MotionHasOptimisedAnimation?.(g));
2632
2633
  return ds(() => {
@@ -2638,11 +2639,11 @@ function du(t, e, n, i, s) {
2638
2639
  }), f;
2639
2640
  }
2640
2641
  function pu(t, e, n, i) {
2641
- const { layoutId: s, layout: o, drag: r, dragConstraints: u, layoutScroll: l, layoutRoot: a, layoutCrossfade: f } = e;
2642
+ const { layoutId: s, layout: o, drag: r, dragConstraints: l, layoutScroll: u, layoutRoot: a, layoutCrossfade: f } = e;
2642
2643
  t.projection = new n(t.latestValues, e["data-framer-portal-id"] ? void 0 : lr(t.parent)), t.projection.setOptions({
2643
2644
  layoutId: s,
2644
2645
  layout: o,
2645
- alwaysMeasureLayout: !!r || u && vt(u),
2646
+ alwaysMeasureLayout: !!r || l && vt(l),
2646
2647
  visualElement: t,
2647
2648
  /**
2648
2649
  * TODO: Update options in an effect. This could be tricky as it'll be too late
@@ -2654,7 +2655,7 @@ function pu(t, e, n, i) {
2654
2655
  animationType: typeof o == "string" ? o : "both",
2655
2656
  initialPromotionConfig: i,
2656
2657
  crossfade: f,
2657
- layoutScroll: l,
2658
+ layoutScroll: u,
2658
2659
  layoutRoot: a
2659
2660
  });
2660
2661
  }
@@ -2664,19 +2665,19 @@ function lr(t) {
2664
2665
  }
2665
2666
  function mu({ preloadedFeatures: t, createVisualElement: e, useRender: n, useVisualState: i, Component: s }) {
2666
2667
  t && iu(t);
2667
- function o(u, l) {
2668
+ function o(l, u) {
2668
2669
  let a;
2669
2670
  const f = {
2670
2671
  ...F(Pn),
2671
- ...u,
2672
- layoutId: yu(u)
2673
- }, { isStatic: h } = f, c = lu(u), g = i(u, h);
2672
+ ...l,
2673
+ layoutId: yu(l)
2674
+ }, { isStatic: h } = f, c = lu(l), g = i(l, h);
2674
2675
  if (!h && en) {
2675
2676
  gu(f, t);
2676
2677
  const T = vu(f);
2677
2678
  a = T.MeasureLayout, c.visualElement = du(s, g, f, e, T.ProjectionNode);
2678
2679
  }
2679
- return Wr(de.Provider, { value: c, children: [a && c.visualElement ? X(a, { visualElement: c.visualElement, ...f }) : null, n(s, u, hu(g, c.visualElement, l), g, h, c.visualElement)] });
2680
+ return Wr(de.Provider, { value: c, children: [a && c.visualElement ? X(a, { visualElement: c.visualElement, ...f }) : null, n(s, l, hu(g, c.visualElement, u), g, h, c.visualElement)] });
2680
2681
  }
2681
2682
  o.displayName = `motion.${typeof s == "string" ? s : `create(${s.displayName ?? s.name ?? ""})`}`;
2682
2683
  const r = Yr(o);
@@ -2720,13 +2721,13 @@ const Tu = {
2720
2721
  function wu(t, e, n) {
2721
2722
  let i = "", s = !0;
2722
2723
  for (let o = 0; o < xu; o++) {
2723
- const r = Mt[o], u = t[r];
2724
- if (u === void 0)
2724
+ const r = Mt[o], l = t[r];
2725
+ if (l === void 0)
2725
2726
  continue;
2726
- let l = !0;
2727
- if (typeof u == "number" ? l = u === (r.startsWith("scale") ? 1 : 0) : l = parseFloat(u) === 0, !l || n) {
2728
- const a = Js(u, wn[r]);
2729
- if (!l) {
2727
+ let u = !0;
2728
+ if (typeof l == "number" ? u = l === (r.startsWith("scale") ? 1 : 0) : u = parseFloat(l) === 0, !u || n) {
2729
+ const a = Js(l, wn[r]);
2730
+ if (!u) {
2730
2731
  s = !1;
2731
2732
  const f = Tu[r] || r;
2732
2733
  i += `${f}(${a}) `;
@@ -2738,23 +2739,23 @@ function wu(t, e, n) {
2738
2739
  }
2739
2740
  function Dn(t, e, n) {
2740
2741
  const { style: i, vars: s, transformOrigin: o } = t;
2741
- let r = !1, u = !1;
2742
- for (const l in e) {
2743
- const a = e[l];
2744
- if (Et.has(l)) {
2742
+ let r = !1, l = !1;
2743
+ for (const u in e) {
2744
+ const a = e[u];
2745
+ if (Et.has(u)) {
2745
2746
  r = !0;
2746
2747
  continue;
2747
- } else if (cn(l)) {
2748
- s[l] = a;
2748
+ } else if (cn(u)) {
2749
+ s[u] = a;
2749
2750
  continue;
2750
2751
  } else {
2751
- const f = Js(a, wn[l]);
2752
- l.startsWith("origin") ? (u = !0, o[l] = f) : i[l] = f;
2752
+ const f = Js(a, wn[u]);
2753
+ u.startsWith("origin") ? (l = !0, o[u] = f) : i[u] = f;
2753
2754
  }
2754
2755
  }
2755
- if (e.transform || (r || n ? i.transform = wu(e, t.transform, n) : i.transform && (i.transform = "none")), u) {
2756
- const { originX: l = "50%", originY: a = "50%", originZ: f = 0 } = o;
2757
- i.transformOrigin = `${l} ${a} ${f}`;
2756
+ if (e.transform || (r || n ? i.transform = wu(e, t.transform, n) : i.transform && (i.transform = "none")), l) {
2757
+ const { originX: u = "50%", originY: a = "50%", originZ: f = 0 } = o;
2758
+ i.transformOrigin = `${u} ${a} ${f}`;
2758
2759
  }
2759
2760
  }
2760
2761
  const Vn = () => ({
@@ -2792,8 +2793,8 @@ function Eu(t, e, n = 1, i = 0, s = !0) {
2792
2793
  t.pathLength = 1;
2793
2794
  const o = s ? Au : Mu;
2794
2795
  t[o.offset] = P.transform(-i);
2795
- const r = P.transform(e), u = P.transform(n);
2796
- t[o.array] = `${r} ${u}`;
2796
+ const r = P.transform(e), l = P.transform(n);
2797
+ t[o.array] = `${r} ${l}`;
2797
2798
  }
2798
2799
  function fr(t, {
2799
2800
  attrX: e,
@@ -2803,9 +2804,9 @@ function fr(t, {
2803
2804
  pathSpacing: o = 1,
2804
2805
  pathOffset: r = 0,
2805
2806
  // This is object creation, which we try to avoid per-frame.
2806
- ...u
2807
- }, l, a, f) {
2808
- if (Dn(t, u, a), l) {
2807
+ ...l
2808
+ }, u, a, f) {
2809
+ if (Dn(t, l, a), u) {
2809
2810
  t.style.viewBox && (t.attrs.viewBox = t.style.viewBox);
2810
2811
  return;
2811
2812
  }
@@ -2880,7 +2881,7 @@ function Rn(t) {
2880
2881
  }
2881
2882
  function Ru(t = !1) {
2882
2883
  return (n, i, s, { latestValues: o }, r) => {
2883
- const l = (Rn(n) ? Du : Pu)(i, o, r, n), a = ou(i, typeof n == "string", t), f = n !== hs ? { ...a, ...l, ref: s } : {}, { children: h } = i, c = mt(() => j(h) ? h.get() : h, [h]);
2884
+ const u = (Rn(n) ? Du : Pu)(i, o, r, n), a = ou(i, typeof n == "string", t), f = n !== hs ? { ...a, ...u, ref: s } : {}, { children: h } = i, c = mt(() => j(h) ? h.get() : h, [h]);
2884
2885
  return qr(n, {
2885
2886
  ...f,
2886
2887
  children: c
@@ -2921,12 +2922,12 @@ function Ou(t, e, n, i) {
2921
2922
  const s = {}, o = i(t, {});
2922
2923
  for (const c in o)
2923
2924
  s[c] = ie(o[c]);
2924
- let { initial: r, animate: u } = t;
2925
- const l = me(t), a = or(t);
2926
- e && a && !l && t.inherit !== !1 && (r === void 0 && (r = e.initial), u === void 0 && (u = e.animate));
2925
+ let { initial: r, animate: l } = t;
2926
+ const u = me(t), a = or(t);
2927
+ e && a && !u && t.inherit !== !1 && (r === void 0 && (r = e.initial), l === void 0 && (l = e.animate));
2927
2928
  let f = n ? n.initial === !1 : !1;
2928
2929
  f = f || r === !1;
2929
- const h = f ? u : r;
2930
+ const h = f ? l : r;
2930
2931
  if (h && typeof h != "boolean" && !pe(h)) {
2931
2932
  const c = Array.isArray(h) ? h : [h];
2932
2933
  for (let g = 0; g < c.length; g++) {
@@ -3003,8 +3004,8 @@ function Fu(t, e) {
3003
3004
  let { transitionEnd: i = {}, transition: s = {}, ...o } = n || {};
3004
3005
  o = { ...o, ...i };
3005
3006
  for (const r in o) {
3006
- const u = Iu(o[r]);
3007
- Bu(t, r, u);
3007
+ const l = Iu(o[r]);
3008
+ Bu(t, r, l);
3008
3009
  }
3009
3010
  }
3010
3011
  function ju(t) {
@@ -3045,33 +3046,33 @@ const $u = {
3045
3046
  ease: [0.25, 0.1, 0.35, 1],
3046
3047
  duration: 0.3
3047
3048
  }, zu = (t, { keyframes: e }) => e.length > 2 ? Gu : Et.has(t) ? t.startsWith("scale") ? Wu(e[1]) : $u : Hu;
3048
- function Yu({ when: t, delay: e, delayChildren: n, staggerChildren: i, staggerDirection: s, repeat: o, repeatType: r, repeatDelay: u, from: l, elapsed: a, ...f }) {
3049
+ function Yu({ when: t, delay: e, delayChildren: n, staggerChildren: i, staggerDirection: s, repeat: o, repeatType: r, repeatDelay: l, from: u, elapsed: a, ...f }) {
3049
3050
  return !!Object.keys(f).length;
3050
3051
  }
3051
3052
  const kn = (t, e, n, i = {}, s, o) => (r) => {
3052
- const u = xn(i, t) || {}, l = u.delay || i.delay || 0;
3053
+ const l = xn(i, t) || {}, u = l.delay || i.delay || 0;
3053
3054
  let { elapsed: a = 0 } = i;
3054
- a = a - /* @__PURE__ */ Z(l);
3055
+ a = a - /* @__PURE__ */ Z(u);
3055
3056
  const f = {
3056
3057
  keyframes: Array.isArray(n) ? n : [null, n],
3057
3058
  ease: "easeOut",
3058
3059
  velocity: e.getVelocity(),
3059
- ...u,
3060
+ ...l,
3060
3061
  delay: -a,
3061
3062
  onUpdate: (c) => {
3062
- e.set(c), u.onUpdate && u.onUpdate(c);
3063
+ e.set(c), l.onUpdate && l.onUpdate(c);
3063
3064
  },
3064
3065
  onComplete: () => {
3065
- r(), u.onComplete && u.onComplete();
3066
+ r(), l.onComplete && l.onComplete();
3066
3067
  },
3067
3068
  name: t,
3068
3069
  motionValue: e,
3069
3070
  element: o ? void 0 : s
3070
3071
  };
3071
- Yu(u) || Object.assign(f, zu(t, f)), f.duration && (f.duration = /* @__PURE__ */ Z(f.duration)), f.repeatDelay && (f.repeatDelay = /* @__PURE__ */ Z(f.repeatDelay)), f.from !== void 0 && (f.keyframes[0] = f.from);
3072
+ Yu(l) || Object.assign(f, zu(t, f)), f.duration && (f.duration = /* @__PURE__ */ Z(f.duration)), f.repeatDelay && (f.repeatDelay = /* @__PURE__ */ Z(f.repeatDelay)), f.from !== void 0 && (f.keyframes[0] = f.from);
3072
3073
  let h = !1;
3073
- if ((f.type === !1 || f.duration === 0 && !f.repeatDelay) && (f.duration = 0, f.delay === 0 && (h = !0)), (st.instantAnimations || st.skipAnimations) && (h = !0, f.duration = 0, f.delay = 0), f.allowFlatten = !u.type && !u.ease, h && !o && e.get() !== void 0) {
3074
- const c = Uu(f.keyframes, u);
3074
+ if ((f.type === !1 || f.duration === 0 && !f.repeatDelay) && (f.duration = 0, f.delay === 0 && (h = !0)), (st.instantAnimations || st.skipAnimations) && (h = !0, f.duration = 0, f.delay = 0), f.allowFlatten = !l.type && !l.ease, h && !o && e.get() !== void 0) {
3075
+ const c = Uu(f.keyframes, l);
3075
3076
  if (c !== void 0) {
3076
3077
  E.update(() => {
3077
3078
  f.onUpdate(c), f.onComplete();
@@ -3079,18 +3080,18 @@ const kn = (t, e, n, i = {}, s, o) => (r) => {
3079
3080
  return;
3080
3081
  }
3081
3082
  }
3082
- return u.isSync ? new vn(f) : new Aa(f);
3083
+ return l.isSync ? new vn(f) : new Aa(f);
3083
3084
  };
3084
3085
  function qu({ protectedKeys: t, needsAnimating: e }, n) {
3085
3086
  const i = t.hasOwnProperty(n) && e[n] !== !0;
3086
3087
  return e[n] = !1, i;
3087
3088
  }
3088
3089
  function vr(t, e, { delay: n = 0, transitionOverride: i, type: s } = {}) {
3089
- let { transition: o = t.getDefaultTransition(), transitionEnd: r, ...u } = e;
3090
+ let { transition: o = t.getDefaultTransition(), transitionEnd: r, ...l } = e;
3090
3091
  i && (o = i);
3091
- const l = [], a = s && t.animationState && t.animationState.getState()[s];
3092
- for (const f in u) {
3093
- const h = t.getValue(f, t.latestValues[f] ?? null), c = u[f];
3092
+ const u = [], a = s && t.animationState && t.animationState.getState()[s];
3093
+ for (const f in l) {
3094
+ const h = t.getValue(f, t.latestValues[f] ?? null), c = l[f];
3094
3095
  if (c === void 0 || a && qu(a, f))
3095
3096
  continue;
3096
3097
  const g = {
@@ -3109,39 +3110,39 @@ function vr(t, e, { delay: n = 0, transitionOverride: i, type: s } = {}) {
3109
3110
  }
3110
3111
  We(t, f), h.start(kn(f, h, c, t.shouldReduceMotion && zs.has(f) ? { type: !1 } : g, t, S));
3111
3112
  const C = h.animation;
3112
- C && l.push(C);
3113
+ C && u.push(C);
3113
3114
  }
3114
- return r && Promise.all(l).then(() => {
3115
+ return r && Promise.all(u).then(() => {
3115
3116
  E.update(() => {
3116
3117
  r && Fu(t, r);
3117
3118
  });
3118
- }), l;
3119
+ }), u;
3119
3120
  }
3120
3121
  function Ge(t, e, n = {}) {
3121
3122
  const i = Ut(t, e, n.type === "exit" ? t.presenceContext?.custom : void 0);
3122
3123
  let { transition: s = t.getDefaultTransition() || {} } = i || {};
3123
3124
  n.transitionOverride && (s = n.transitionOverride);
3124
- const o = i ? () => Promise.all(vr(t, i, n)) : () => Promise.resolve(), r = t.variantChildren && t.variantChildren.size ? (l = 0) => {
3125
+ const o = i ? () => Promise.all(vr(t, i, n)) : () => Promise.resolve(), r = t.variantChildren && t.variantChildren.size ? (u = 0) => {
3125
3126
  const { delayChildren: a = 0, staggerChildren: f, staggerDirection: h } = s;
3126
- return Xu(t, e, l, a, f, h, n);
3127
- } : () => Promise.resolve(), { when: u } = s;
3128
- if (u) {
3129
- const [l, a] = u === "beforeChildren" ? [o, r] : [r, o];
3130
- return l().then(() => a());
3127
+ return Xu(t, e, u, a, f, h, n);
3128
+ } : () => Promise.resolve(), { when: l } = s;
3129
+ if (l) {
3130
+ const [u, a] = l === "beforeChildren" ? [o, r] : [r, o];
3131
+ return u().then(() => a());
3131
3132
  } else
3132
3133
  return Promise.all([o(), r(n.delay)]);
3133
3134
  }
3134
3135
  function Xu(t, e, n = 0, i = 0, s = 0, o = 1, r) {
3135
- const u = [], l = t.variantChildren.size, a = (l - 1) * s, f = typeof i == "function", h = f ? (c) => i(c, l) : (
3136
+ const l = [], u = t.variantChildren.size, a = (u - 1) * s, f = typeof i == "function", h = f ? (c) => i(c, u) : (
3136
3137
  // Support deprecated staggerChildren
3137
3138
  o === 1 ? (c = 0) => c * s : (c = 0) => a - c * s
3138
3139
  );
3139
3140
  return Array.from(t.variantChildren).sort(Zu).forEach((c, g) => {
3140
- c.notify("AnimationStart", e), u.push(Ge(c, e, {
3141
+ c.notify("AnimationStart", e), l.push(Ge(c, e, {
3141
3142
  ...r,
3142
3143
  delay: n + (f ? 0 : i) + h(g)
3143
3144
  }).then(() => c.notify("AnimationComplete", e)));
3144
- }), Promise.all(u);
3145
+ }), Promise.all(l);
3145
3146
  }
3146
3147
  function Zu(t, e) {
3147
3148
  return t.sortNodePosition(e);
@@ -3194,22 +3195,22 @@ function nl(t) {
3194
3195
  }
3195
3196
  function il(t) {
3196
3197
  let e = nl(t), n = fi(), i = !0;
3197
- const s = (l) => (a, f) => {
3198
- const h = Ut(t, f, l === "exit" ? t.presenceContext?.custom : void 0);
3198
+ const s = (u) => (a, f) => {
3199
+ const h = Ut(t, f, u === "exit" ? t.presenceContext?.custom : void 0);
3199
3200
  if (h) {
3200
3201
  const { transition: c, transitionEnd: g, ...T } = h;
3201
3202
  a = { ...a, ...T, ...g };
3202
3203
  }
3203
3204
  return a;
3204
3205
  };
3205
- function o(l) {
3206
- e = l(t);
3206
+ function o(u) {
3207
+ e = u(t);
3207
3208
  }
3208
- function r(l) {
3209
+ function r(u) {
3209
3210
  const { props: a } = t, f = Tr(t.parent) || {}, h = [], c = /* @__PURE__ */ new Set();
3210
3211
  let g = {}, T = 1 / 0;
3211
3212
  for (let C = 0; C < el; C++) {
3212
- const p = tl[C], v = n[p], d = a[p] !== void 0 ? a[p] : f[p], m = jt(d), y = p === l ? v.isActive : null;
3213
+ const p = tl[C], v = n[p], d = a[p] !== void 0 ? a[p] : f[p], m = jt(d), y = p === u ? v.isActive : null;
3213
3214
  y === !1 && (T = C);
3214
3215
  let b = d === f[p] && d !== a[p] && m;
3215
3216
  if (b && i && t.manuallyAnimateOnMount && (b = !1), v.protectedKeys = { ...g }, // If it isn't active and hasn't *just* been set as inactive
@@ -3219,7 +3220,7 @@ function il(t) {
3219
3220
  continue;
3220
3221
  const x = sl(v.prevProp, d);
3221
3222
  let w = x || // If we're making this variant active, we want to always make it active
3222
- p === l && v.isActive && !b && m || // If we removed a higher-priority variant (i is in reverse order)
3223
+ p === u && v.isActive && !b && m || // If we removed a higher-priority variant (i is in reverse order)
3223
3224
  C > T && m, M = !1;
3224
3225
  const A = Array.isArray(d) ? d : [d];
3225
3226
  let R = A.reduce(s(p), {});
@@ -3258,18 +3259,18 @@ function il(t) {
3258
3259
  let S = !!h.length;
3259
3260
  return i && (a.initial === !1 || a.initial === a.animate) && !t.manuallyAnimateOnMount && (S = !1), i = !1, S ? e(h) : Promise.resolve();
3260
3261
  }
3261
- function u(l, a) {
3262
- if (n[l].isActive === a)
3262
+ function l(u, a) {
3263
+ if (n[u].isActive === a)
3263
3264
  return Promise.resolve();
3264
- t.variantChildren?.forEach((h) => h.animationState?.setActive(l, a)), n[l].isActive = a;
3265
- const f = r(l);
3265
+ t.variantChildren?.forEach((h) => h.animationState?.setActive(u, a)), n[u].isActive = a;
3266
+ const f = r(u);
3266
3267
  for (const h in n)
3267
3268
  n[h].protectedKeys = {};
3268
3269
  return f;
3269
3270
  }
3270
3271
  return {
3271
3272
  animateChanges: r,
3272
- setActive: u,
3273
+ setActive: l,
3273
3274
  setAnimateFunction: o,
3274
3275
  getState: () => n,
3275
3276
  reset: () => {
@@ -3474,10 +3475,10 @@ function vl(t, e, n, i = !1) {
3474
3475
  return;
3475
3476
  e.x = e.y = 1;
3476
3477
  let o, r;
3477
- for (let u = 0; u < s; u++) {
3478
- o = n[u], r = o.projectionDelta;
3479
- const { visualElement: l } = o.options;
3480
- l && l.props.style && l.props.style.display === "contents" || (i && o.options.layoutScroll && o.scroll && o !== o.root && xt(t, {
3478
+ for (let l = 0; l < s; l++) {
3479
+ o = n[l], r = o.projectionDelta;
3480
+ const { visualElement: u } = o.options;
3481
+ u && u.props.style && u.props.style.display === "contents" || (i && o.options.layoutScroll && o.scroll && o !== o.root && xt(t, {
3481
3482
  x: -o.scroll.offset.x,
3482
3483
  y: -o.scroll.offset.y
3483
3484
  }), r && (e.x *= r.x.scale, e.y *= r.y.scale, Pr(t, r)), i && ct(o.latestValues) && xt(t, o.latestValues));
@@ -3530,10 +3531,10 @@ class Er {
3530
3531
  }, !Cn(e))
3531
3532
  return;
3532
3533
  this.dragSnapToOrigin = o, this.handlers = n, this.transformPagePoint = i, this.distanceThreshold = r, this.contextWindow = s || window;
3533
- const u = zt(e), l = Ce(u, this.transformPagePoint), { point: a } = l, { timestamp: f } = K;
3534
+ const l = zt(e), u = Ce(l, this.transformPagePoint), { point: a } = u, { timestamp: f } = K;
3534
3535
  this.history = [{ ...a, timestamp: f }];
3535
3536
  const { onSessionStart: h } = n;
3536
- h && h(e, Pe(l, this.history)), this.removeListeners = Wt(kt(this.contextWindow, "pointermove", this.handlePointerMove), kt(this.contextWindow, "pointerup", this.handlePointerUp), kt(this.contextWindow, "pointercancel", this.handlePointerUp));
3537
+ h && h(e, Pe(u, this.history)), this.removeListeners = Wt(kt(this.contextWindow, "pointermove", this.handlePointerMove), kt(this.contextWindow, "pointerup", this.handlePointerUp), kt(this.contextWindow, "pointercancel", this.handlePointerUp));
3537
3538
  }
3538
3539
  updateHandlers(e) {
3539
3540
  this.handlers = e;
@@ -3659,7 +3660,7 @@ class Vl {
3659
3660
  }), S && E.postRender(() => S(h, c)), We(this.visualElement, "transform");
3660
3661
  const { animationState: C } = this.visualElement;
3661
3662
  C && C.setActive("whileDrag", !0);
3662
- }, u = (h, c) => {
3663
+ }, l = (h, c) => {
3663
3664
  this.latestPointerEvent = h, this.latestPanInfo = c;
3664
3665
  const { dragPropagation: g, dragDirectionLock: T, onDirectionLock: S, onDrag: C } = this.getProps();
3665
3666
  if (!g && !this.openDragLock)
@@ -3670,14 +3671,14 @@ class Vl {
3670
3671
  return;
3671
3672
  }
3672
3673
  this.updateAxis("x", c.point, p), this.updateAxis("y", c.point, p), this.visualElement.render(), C && C(h, c);
3673
- }, l = (h, c) => {
3674
+ }, u = (h, c) => {
3674
3675
  this.latestPointerEvent = h, this.latestPanInfo = c, this.stop(h, c), this.latestPointerEvent = null, this.latestPanInfo = null;
3675
3676
  }, a = () => H((h) => this.getAnimationState(h) === "paused" && this.getAxisMotionValue(h).animation?.play()), { dragSnapToOrigin: f } = this.getProps();
3676
3677
  this.panSession = new Er(e, {
3677
3678
  onSessionStart: o,
3678
3679
  onStart: r,
3679
- onMove: u,
3680
- onSessionEnd: l,
3680
+ onMove: l,
3681
+ onSessionEnd: u,
3681
3682
  resumeAnimation: a
3682
3683
  }, {
3683
3684
  transformPagePoint: this.visualElement.getTransformPagePoint(),
@@ -3695,8 +3696,8 @@ class Vl {
3695
3696
  return;
3696
3697
  const { velocity: r } = s;
3697
3698
  this.startAnimation(r);
3698
- const { onDragEnd: u } = this.getProps();
3699
- u && E.postRender(() => u(i, s));
3699
+ const { onDragEnd: l } = this.getProps();
3700
+ l && E.postRender(() => l(i, s));
3700
3701
  }
3701
3702
  /**
3702
3703
  * @internal
@@ -3734,16 +3735,16 @@ class Vl {
3734
3735
  const o = bl(i, s.root, this.visualElement.getTransformPagePoint());
3735
3736
  let r = Pl(s.layout.layoutBox, o);
3736
3737
  if (n) {
3737
- const u = n(cl(r));
3738
- this.hasMutatedConstraints = !!u, u && (r = xr(u));
3738
+ const l = n(cl(r));
3739
+ this.hasMutatedConstraints = !!l, l && (r = xr(l));
3739
3740
  }
3740
3741
  return r;
3741
3742
  }
3742
3743
  startAnimation(e) {
3743
- const { drag: n, dragMomentum: i, dragElastic: s, dragTransition: o, dragSnapToOrigin: r, onDragTransitionEnd: u } = this.getProps(), l = this.constraints || {}, a = H((f) => {
3744
+ const { drag: n, dragMomentum: i, dragElastic: s, dragTransition: o, dragSnapToOrigin: r, onDragTransitionEnd: l } = this.getProps(), u = this.constraints || {}, a = H((f) => {
3744
3745
  if (!Jt(f, n, this.currentDirection))
3745
3746
  return;
3746
- let h = l && l[f] || {};
3747
+ let h = u && u[f] || {};
3747
3748
  r && (h = { min: 0, max: 0 });
3748
3749
  const c = s ? 200 : 1e6, g = s ? 40 : 1e7, T = {
3749
3750
  type: "inertia",
@@ -3758,7 +3759,7 @@ class Vl {
3758
3759
  };
3759
3760
  return this.startAxisValueAnimation(f, T);
3760
3761
  });
3761
- return Promise.all(a).then(u);
3762
+ return Promise.all(a).then(l);
3762
3763
  }
3763
3764
  startAxisValueAnimation(e, n) {
3764
3765
  const i = this.getAxisMotionValue(e);
@@ -3790,8 +3791,8 @@ class Vl {
3790
3791
  return;
3791
3792
  const { projection: s } = this.visualElement, o = this.getAxisMotionValue(n);
3792
3793
  if (s && s.layout) {
3793
- const { min: r, max: u } = s.layout.layoutBox[n];
3794
- o.set(e[n] - V(r, u, 0.5));
3794
+ const { min: r, max: l } = s.layout.layoutBox[n];
3795
+ o.set(e[n] - V(r, l, 0.5));
3795
3796
  }
3796
3797
  });
3797
3798
  }
@@ -3809,44 +3810,44 @@ class Vl {
3809
3810
  this.stopAnimation();
3810
3811
  const s = { x: 0, y: 0 };
3811
3812
  H((r) => {
3812
- const u = this.getAxisMotionValue(r);
3813
- if (u && this.constraints !== !1) {
3814
- const l = u.get();
3815
- s[r] = Al({ min: l, max: l }, this.constraints[r]);
3813
+ const l = this.getAxisMotionValue(r);
3814
+ if (l && this.constraints !== !1) {
3815
+ const u = l.get();
3816
+ s[r] = Al({ min: u, max: u }, this.constraints[r]);
3816
3817
  }
3817
3818
  });
3818
3819
  const { transformTemplate: o } = this.visualElement.getProps();
3819
3820
  this.visualElement.current.style.transform = o ? o({}, "") : "none", i.root && i.root.updateScroll(), i.updateLayout(), this.resolveConstraints(), H((r) => {
3820
3821
  if (!Jt(r, e, null))
3821
3822
  return;
3822
- const u = this.getAxisMotionValue(r), { min: l, max: a } = this.constraints[r];
3823
- u.set(V(l, a, s[r]));
3823
+ const l = this.getAxisMotionValue(r), { min: u, max: a } = this.constraints[r];
3824
+ l.set(V(u, a, s[r]));
3824
3825
  });
3825
3826
  }
3826
3827
  addListeners() {
3827
3828
  if (!this.visualElement.current)
3828
3829
  return;
3829
3830
  Dl.set(this.visualElement, this);
3830
- const e = this.visualElement.current, n = kt(e, "pointerdown", (l) => {
3831
+ const e = this.visualElement.current, n = kt(e, "pointerdown", (u) => {
3831
3832
  const { drag: a, dragListener: f = !0 } = this.getProps();
3832
- a && f && this.start(l);
3833
+ a && f && this.start(u);
3833
3834
  }), i = () => {
3834
- const { dragConstraints: l } = this.getProps();
3835
- vt(l) && l.current && (this.constraints = this.resolveRefConstraints());
3835
+ const { dragConstraints: u } = this.getProps();
3836
+ vt(u) && u.current && (this.constraints = this.resolveRefConstraints());
3836
3837
  }, { projection: s } = this.visualElement, o = s.addEventListener("measure", i);
3837
3838
  s && !s.layout && (s.root && s.root.updateScroll(), s.updateLayout()), E.read(i);
3838
- const r = $t(window, "resize", () => this.scalePositionWithinConstraints()), u = s.addEventListener("didUpdate", ({ delta: l, hasLayoutChanged: a }) => {
3839
+ const r = $t(window, "resize", () => this.scalePositionWithinConstraints()), l = s.addEventListener("didUpdate", ({ delta: u, hasLayoutChanged: a }) => {
3839
3840
  this.isDragging && a && (H((f) => {
3840
3841
  const h = this.getAxisMotionValue(f);
3841
- h && (this.originPoint[f] += l[f].translate, h.set(h.get() + l[f].translate));
3842
+ h && (this.originPoint[f] += u[f].translate, h.set(h.get() + u[f].translate));
3842
3843
  }), this.visualElement.render());
3843
3844
  });
3844
3845
  return () => {
3845
- r(), n(), o(), u && u();
3846
+ r(), n(), o(), l && l();
3846
3847
  };
3847
3848
  }
3848
3849
  getProps() {
3849
- const e = this.visualElement.getProps(), { drag: n = !1, dragDirectionLock: i = !1, dragPropagation: s = !1, dragConstraints: o = !1, dragElastic: r = Ye, dragMomentum: u = !0 } = e;
3850
+ const e = this.visualElement.getProps(), { drag: n = !1, dragDirectionLock: i = !1, dragPropagation: s = !1, dragConstraints: o = !1, dragElastic: r = Ye, dragMomentum: l = !0 } = e;
3850
3851
  return {
3851
3852
  ...e,
3852
3853
  drag: n,
@@ -3854,7 +3855,7 @@ class Vl {
3854
3855
  dragPropagation: s,
3855
3856
  dragConstraints: o,
3856
3857
  dragElastic: r,
3857
- dragMomentum: u
3858
+ dragMomentum: l
3858
3859
  };
3859
3860
  }
3860
3861
  }
@@ -3943,9 +3944,9 @@ const Rt = {
3943
3944
  const i = t, s = at.parse(t);
3944
3945
  if (s.length > 5)
3945
3946
  return i;
3946
- const o = at.createTransformer(t), r = typeof s[0] != "number" ? 1 : 0, u = n.x.scale * e.x, l = n.y.scale * e.y;
3947
- s[0 + r] /= u, s[1 + r] /= l;
3948
- const a = V(u, l, 0.5);
3947
+ const o = at.createTransformer(t), r = typeof s[0] != "number" ? 1 : 0, l = n.x.scale * e.x, u = n.y.scale * e.y;
3948
+ s[0 + r] /= l, s[1 + r] /= u;
3949
+ const a = V(l, u, 0.5);
3949
3950
  return typeof s[2 + r] == "number" && (s[2 + r] /= a), typeof s[3 + r] == "number" && (s[3 + r] /= a), o(s);
3950
3951
  }
3951
3952
  };
@@ -3968,8 +3969,8 @@ class Ll extends Xr {
3968
3969
  getSnapshotBeforeUpdate(e) {
3969
3970
  const { layoutDependency: n, visualElement: i, drag: s, isPresent: o } = this.props, { projection: r } = i;
3970
3971
  return r && (r.isPresent = o, Ri = !0, s || e.layoutDependency !== n || n === void 0 || e.isPresent !== o ? r.willUpdate() : this.safeToRemove(), e.isPresent !== o && (o ? r.promote() : r.relegate() || E.postRender(() => {
3971
- const u = r.getStack();
3972
- (!u || !u.members.length) && this.safeToRemove();
3972
+ const l = r.getStack();
3973
+ (!l || !l.members.length) && this.safeToRemove();
3973
3974
  }))), null;
3974
3975
  }
3975
3976
  componentDidUpdate() {
@@ -4040,11 +4041,11 @@ const Rr = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], Nl = Rr.length,
4040
4041
  function Ul(t, e, n, i, s, o) {
4041
4042
  s ? (t.opacity = V(0, n.opacity ?? 1, $l(i)), t.opacityExit = V(e.opacity ?? 1, 0, Wl(i))) : o && (t.opacity = V(e.opacity ?? 1, n.opacity ?? 1, i));
4042
4043
  for (let r = 0; r < Nl; r++) {
4043
- const u = `border${Rr[r]}Radius`;
4044
- let l = ki(e, u), a = ki(n, u);
4045
- if (l === void 0 && a === void 0)
4044
+ const l = `border${Rr[r]}Radius`;
4045
+ let u = ki(e, l), a = ki(n, l);
4046
+ if (u === void 0 && a === void 0)
4046
4047
  continue;
4047
- l || (l = 0), a || (a = 0), l === 0 || a === 0 || Oi(l) === Oi(a) ? (t[u] = Math.max(V(_i(l), _i(a), i), 0), (Q.test(a) || Q.test(l)) && (t[u] += "%")) : t[u] = a;
4048
+ u || (u = 0), a || (a = 0), u === 0 || a === 0 || Oi(u) === Oi(a) ? (t[l] = Math.max(V(_i(u), _i(a), i), 0), (Q.test(a) || Q.test(u)) && (t[l] += "%")) : t[l] = a;
4048
4049
  }
4049
4050
  (e.rotate || n.rotate) && (t.rotate = V(e.rotate || 0, n.rotate || 0, i));
4050
4051
  }
@@ -4070,8 +4071,8 @@ function Bi(t, e, n, i, s) {
4070
4071
  function Gl(t, e = 0, n = 1, i = 0.5, s, o = t, r = t) {
4071
4072
  if (Q.test(e) && (e = parseFloat(e), e = V(r.min, r.max, e / 100) - r.min), typeof e != "number")
4072
4073
  return;
4073
- let u = V(o.min, o.max, i);
4074
- t === o && (u -= e), t.min = Bi(t.min, e, n, u, s), t.max = Bi(t.max, e, n, u, s);
4074
+ let l = V(o.min, o.max, i);
4075
+ t === o && (l -= e), t.min = Bi(t.min, e, n, l, s), t.max = Bi(t.max, e, n, l, s);
4075
4076
  }
4076
4077
  function Ii(t, e, [n, i, s], o, r) {
4077
4078
  Gl(t, e[n], e[i], e[s], e.scale, o, r);
@@ -4165,8 +4166,8 @@ function Xl(t, e, n) {
4165
4166
  const { transformPerspective: a, rotate: f, rotateX: h, rotateY: c, skewX: g, skewY: T } = n;
4166
4167
  a && (i = `perspective(${a}px) ${i}`), f && (i += `rotate(${f}deg) `), h && (i += `rotateX(${h}deg) `), c && (i += `rotateY(${c}deg) `), g && (i += `skewX(${g}deg) `), T && (i += `skewY(${T}deg) `);
4167
4168
  }
4168
- const u = t.x.scale * e.x, l = t.y.scale * e.y;
4169
- return (u !== 1 || l !== 1) && (i += `scale(${u}, ${l})`), i || "none";
4169
+ const l = t.x.scale * e.x, u = t.y.scale * e.y;
4170
+ return (l !== 1 || u !== 1) && (i += `scale(${l}, ${u})`), i || "none";
4170
4171
  }
4171
4172
  const Ae = ["", "X", "Y", "Z"], Zl = 1e3;
4172
4173
  let Jl = 0;
@@ -4190,22 +4191,22 @@ function Lr(t) {
4190
4191
  }
4191
4192
  function Kr({ attachResizeListener: t, defaultParent: e, measureScroll: n, checkIsScrollRoot: i, resetTransform: s }) {
4192
4193
  return class {
4193
- constructor(r = {}, u = e?.()) {
4194
+ constructor(r = {}, l = e?.()) {
4194
4195
  this.id = Jl++, 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 = () => {
4195
4196
  this.isUpdating && (this.isUpdating = !1, this.clearAllSnapshots());
4196
4197
  }, this.updateProjection = () => {
4197
4198
  this.projectionUpdateScheduled = !1, this.nodes.forEach(ec), this.nodes.forEach(rc), this.nodes.forEach(oc), this.nodes.forEach(nc);
4198
- }, this.resolvedRelativeTargetAt = 0, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.latestValues = r, this.root = u ? u.root || u : this, this.path = u ? [...u.path, u] : [], this.parent = u, this.depth = u ? u.depth + 1 : 0;
4199
- for (let l = 0; l < this.path.length; l++)
4200
- this.path[l].shouldResetTransform = !0;
4199
+ }, this.resolvedRelativeTargetAt = 0, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.latestValues = r, this.root = l ? l.root || l : this, this.path = l ? [...l.path, l] : [], this.parent = l, this.depth = l ? l.depth + 1 : 0;
4200
+ for (let u = 0; u < this.path.length; u++)
4201
+ this.path[u].shouldResetTransform = !0;
4201
4202
  this.root === this && (this.nodes = new Fl());
4202
4203
  }
4203
- addEventListener(r, u) {
4204
- return this.eventHandlers.has(r) || this.eventHandlers.set(r, new on()), this.eventHandlers.get(r).add(u);
4204
+ addEventListener(r, l) {
4205
+ return this.eventHandlers.has(r) || this.eventHandlers.set(r, new on()), this.eventHandlers.get(r).add(l);
4205
4206
  }
4206
- notifyListeners(r, ...u) {
4207
- const l = this.eventHandlers.get(r);
4208
- l && l.notify(...u);
4207
+ notifyListeners(r, ...l) {
4208
+ const u = this.eventHandlers.get(r);
4209
+ u && u.notify(...l);
4209
4210
  }
4210
4211
  hasListeners(r) {
4211
4212
  return this.eventHandlers.has(r);
@@ -4217,8 +4218,8 @@ function Kr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4217
4218
  if (this.instance)
4218
4219
  return;
4219
4220
  this.isSVG = nr(r) && !qa(r), this.instance = r;
4220
- const { layoutId: u, layout: l, visualElement: a } = this.options;
4221
- if (a && !a.current && a.mount(r), this.root.nodes.add(this), this.parent && this.parent.children.add(this), this.root.hasTreeAnimated && (l || u) && (this.isLayoutDirty = !0), t) {
4221
+ const { layoutId: l, layout: u, visualElement: a } = this.options;
4222
+ if (a && !a.current && a.mount(r), this.root.nodes.add(this), this.parent && this.parent.children.add(this), this.root.hasTreeAnimated && (u || l) && (this.isLayoutDirty = !0), t) {
4222
4223
  let f, h = 0;
4223
4224
  const c = () => this.root.updateBlockedByResize = !1;
4224
4225
  E.read(() => {
@@ -4228,7 +4229,7 @@ function Kr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4228
4229
  g !== h && (h = g, this.root.updateBlockedByResize = !0, f && f(), f = jl(c, 250), se.hasAnimatedSinceResize && (se.hasAnimatedSinceResize = !1, this.nodes.forEach(zi)));
4229
4230
  });
4230
4231
  }
4231
- u && this.root.registerSharedNode(u, this), this.options.animate !== !1 && a && (u || l) && this.addEventListener("didUpdate", ({ delta: f, hasLayoutChanged: h, hasRelativeLayoutChanged: c, layout: g }) => {
4232
+ l && this.root.registerSharedNode(l, this), this.options.animate !== !1 && a && (l || u) && this.addEventListener("didUpdate", ({ delta: f, hasLayoutChanged: h, hasRelativeLayoutChanged: c, layout: g }) => {
4232
4233
  if (this.isTreeAnimationBlocked()) {
4233
4234
  this.target = void 0, this.relativeTarget = void 0;
4234
4235
  return;
@@ -4285,8 +4286,8 @@ function Kr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4285
4286
  const h = this.path[f];
4286
4287
  h.shouldResetTransform = !0, h.updateScroll("snapshot"), h.options.layoutRoot && h.willUpdate(!1);
4287
4288
  }
4288
- const { layoutId: u, layout: l } = this.options;
4289
- if (u === void 0 && !l)
4289
+ const { layoutId: l, layout: u } = this.options;
4290
+ if (l === void 0 && !u)
4290
4291
  return;
4291
4292
  const a = this.getTransformTemplate();
4292
4293
  this.prevTransformTemplateValue = a ? a(this.latestValues, "") : void 0, this.updateSnapshot(), r && this.notifyListeners("willUpdate");
@@ -4301,8 +4302,8 @@ function Kr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4301
4302
  return;
4302
4303
  }
4303
4304
  this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(sc), this.nodes.forEach(Ql), this.nodes.forEach(tc)) : this.nodes.forEach(Hi), this.clearAllSnapshots();
4304
- const u = U.now();
4305
- K.delta = nt(0, 1e3 / 60, u - K.timestamp), K.timestamp = u, K.isProcessing = !0, ge.update.process(K), ge.preRender.process(K), ge.render.process(K), K.isProcessing = !1;
4305
+ const l = U.now();
4306
+ K.delta = nt(0, 1e3 / 60, l - K.timestamp), K.timestamp = l, K.isProcessing = !0, ge.update.process(K), ge.preRender.process(K), ge.render.process(K), K.isProcessing = !1;
4306
4307
  }
4307
4308
  didUpdate() {
4308
4309
  this.updateScheduled || (this.updateScheduled = !0, Sn.read(this.scheduleUpdate));
@@ -4328,39 +4329,39 @@ function Kr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4328
4329
  if (!this.instance || (this.updateScroll(), !(this.options.alwaysMeasureLayout && this.isLead()) && !this.isLayoutDirty))
4329
4330
  return;
4330
4331
  if (this.resumeFrom && !this.resumeFrom.instance)
4331
- for (let l = 0; l < this.path.length; l++)
4332
- this.path[l].updateScroll();
4332
+ for (let u = 0; u < this.path.length; u++)
4333
+ this.path[u].updateScroll();
4333
4334
  const r = this.layout;
4334
4335
  this.layout = this.measure(!1), this.layoutCorrected = _(), this.isLayoutDirty = !1, this.projectionDelta = void 0, this.notifyListeners("measure", this.layout.layoutBox);
4335
- const { visualElement: u } = this.options;
4336
- u && u.notify("LayoutMeasure", this.layout.layoutBox, r ? r.layoutBox : void 0);
4336
+ const { visualElement: l } = this.options;
4337
+ l && l.notify("LayoutMeasure", this.layout.layoutBox, r ? r.layoutBox : void 0);
4337
4338
  }
4338
4339
  updateScroll(r = "measure") {
4339
- let u = !!(this.options.layoutScroll && this.instance);
4340
- if (this.scroll && this.scroll.animationId === this.root.animationId && this.scroll.phase === r && (u = !1), u && this.instance) {
4341
- const l = i(this.instance);
4340
+ let l = !!(this.options.layoutScroll && this.instance);
4341
+ if (this.scroll && this.scroll.animationId === this.root.animationId && this.scroll.phase === r && (l = !1), l && this.instance) {
4342
+ const u = i(this.instance);
4342
4343
  this.scroll = {
4343
4344
  animationId: this.root.animationId,
4344
4345
  phase: r,
4345
- isRoot: l,
4346
+ isRoot: u,
4346
4347
  offset: n(this.instance),
4347
- wasRoot: this.scroll ? this.scroll.isRoot : l
4348
+ wasRoot: this.scroll ? this.scroll.isRoot : u
4348
4349
  };
4349
4350
  }
4350
4351
  }
4351
4352
  resetTransform() {
4352
4353
  if (!s)
4353
4354
  return;
4354
- const r = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, u = this.projectionDelta && !Or(this.projectionDelta), l = this.getTransformTemplate(), a = l ? l(this.latestValues, "") : void 0, f = a !== this.prevTransformTemplateValue;
4355
- r && this.instance && (u || ct(this.latestValues) || f) && (s(this.instance, a), this.shouldResetTransform = !1, this.scheduleRender());
4355
+ const r = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, l = this.projectionDelta && !Or(this.projectionDelta), u = this.getTransformTemplate(), a = u ? u(this.latestValues, "") : void 0, f = a !== this.prevTransformTemplateValue;
4356
+ r && this.instance && (l || ct(this.latestValues) || f) && (s(this.instance, a), this.shouldResetTransform = !1, this.scheduleRender());
4356
4357
  }
4357
4358
  measure(r = !0) {
4358
- const u = this.measurePageBox();
4359
- let l = this.removeElementScroll(u);
4360
- return r && (l = this.removeTransform(l)), fc(l), {
4359
+ const l = this.measurePageBox();
4360
+ let u = this.removeElementScroll(l);
4361
+ return r && (u = this.removeTransform(u)), fc(u), {
4361
4362
  animationId: this.root.animationId,
4362
- measuredBox: u,
4363
- layoutBox: l,
4363
+ measuredBox: l,
4364
+ layoutBox: u,
4364
4365
  latestValues: {},
4365
4366
  source: this.id
4366
4367
  };
@@ -4369,47 +4370,47 @@ function Kr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4369
4370
  const { visualElement: r } = this.options;
4370
4371
  if (!r)
4371
4372
  return _();
4372
- const u = r.measureViewportBox();
4373
+ const l = r.measureViewportBox();
4373
4374
  if (!(this.scroll?.wasRoot || this.path.some(dc))) {
4374
4375
  const { scroll: a } = this.root;
4375
- a && (Tt(u.x, a.offset.x), Tt(u.y, a.offset.y));
4376
+ a && (Tt(l.x, a.offset.x), Tt(l.y, a.offset.y));
4376
4377
  }
4377
- return u;
4378
+ return l;
4378
4379
  }
4379
4380
  removeElementScroll(r) {
4380
- const u = _();
4381
- if (G(u, r), this.scroll?.wasRoot)
4382
- return u;
4383
- for (let l = 0; l < this.path.length; l++) {
4384
- const a = this.path[l], { scroll: f, options: h } = a;
4385
- a !== this.root && f && h.layoutScroll && (f.wasRoot && G(u, r), Tt(u.x, f.offset.x), Tt(u.y, f.offset.y));
4381
+ const l = _();
4382
+ if (G(l, r), this.scroll?.wasRoot)
4383
+ return l;
4384
+ for (let u = 0; u < this.path.length; u++) {
4385
+ const a = this.path[u], { scroll: f, options: h } = a;
4386
+ a !== this.root && f && h.layoutScroll && (f.wasRoot && G(l, r), Tt(l.x, f.offset.x), Tt(l.y, f.offset.y));
4386
4387
  }
4387
- return u;
4388
+ return l;
4388
4389
  }
4389
- applyTransform(r, u = !1) {
4390
- const l = _();
4391
- G(l, r);
4390
+ applyTransform(r, l = !1) {
4391
+ const u = _();
4392
+ G(u, r);
4392
4393
  for (let a = 0; a < this.path.length; a++) {
4393
4394
  const f = this.path[a];
4394
- !u && f.options.layoutScroll && f.scroll && f !== f.root && xt(l, {
4395
+ !l && f.options.layoutScroll && f.scroll && f !== f.root && xt(u, {
4395
4396
  x: -f.scroll.offset.x,
4396
4397
  y: -f.scroll.offset.y
4397
- }), ct(f.latestValues) && xt(l, f.latestValues);
4398
+ }), ct(f.latestValues) && xt(u, f.latestValues);
4398
4399
  }
4399
- return ct(this.latestValues) && xt(l, this.latestValues), l;
4400
+ return ct(this.latestValues) && xt(u, this.latestValues), u;
4400
4401
  }
4401
4402
  removeTransform(r) {
4402
- const u = _();
4403
- G(u, r);
4404
- for (let l = 0; l < this.path.length; l++) {
4405
- const a = this.path[l];
4403
+ const l = _();
4404
+ G(l, r);
4405
+ for (let u = 0; u < this.path.length; u++) {
4406
+ const a = this.path[u];
4406
4407
  if (!a.instance || !ct(a.latestValues))
4407
4408
  continue;
4408
4409
  He(a.latestValues) && a.updateSnapshot();
4409
4410
  const f = _(), h = a.measurePageBox();
4410
- G(f, h), Fi(u, a.latestValues, a.snapshot ? a.snapshot.layoutBox : void 0, f);
4411
+ G(f, h), Fi(l, a.latestValues, a.snapshot ? a.snapshot.layoutBox : void 0, f);
4411
4412
  }
4412
- return ct(this.latestValues) && Fi(u, this.latestValues), u;
4413
+ return ct(this.latestValues) && Fi(l, this.latestValues), l;
4413
4414
  }
4414
4415
  setTargetDelta(r) {
4415
4416
  this.targetDelta = r, this.root.scheduleUpdateProjection(), this.isProjectionDirty = !0;
@@ -4428,10 +4429,10 @@ function Kr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4428
4429
  this.relativeParent && this.relativeParent.resolvedRelativeTargetAt !== K.timestamp && this.relativeParent.resolveTargetDelta(!0);
4429
4430
  }
4430
4431
  resolveTargetDelta(r = !1) {
4431
- const u = this.getLead();
4432
- this.isProjectionDirty || (this.isProjectionDirty = u.isProjectionDirty), this.isTransformDirty || (this.isTransformDirty = u.isTransformDirty), this.isSharedProjectionDirty || (this.isSharedProjectionDirty = u.isSharedProjectionDirty);
4433
- const l = !!this.resumingFrom || this !== u;
4434
- if (!(r || l && this.isSharedProjectionDirty || this.isProjectionDirty || this.parent?.isProjectionDirty || this.attemptToResolveRelativeTarget || this.root.updateBlockedByResize))
4432
+ const l = this.getLead();
4433
+ this.isProjectionDirty || (this.isProjectionDirty = l.isProjectionDirty), this.isTransformDirty || (this.isTransformDirty = l.isTransformDirty), this.isSharedProjectionDirty || (this.isSharedProjectionDirty = l.isSharedProjectionDirty);
4434
+ const u = !!this.resumingFrom || this !== l;
4435
+ if (!(r || u && this.isSharedProjectionDirty || this.isProjectionDirty || this.parent?.isProjectionDirty || this.attemptToResolveRelativeTarget || this.root.updateBlockedByResize))
4435
4436
  return;
4436
4437
  const { layout: f, layoutId: h } = this.options;
4437
4438
  if (!(!this.layout || !(f || h))) {
@@ -4454,16 +4455,16 @@ function Kr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4454
4455
  return !!((this.relativeTarget || this.targetDelta || this.options.layoutRoot) && this.layout);
4455
4456
  }
4456
4457
  calcProjection() {
4457
- const r = this.getLead(), u = !!this.resumingFrom || this !== r;
4458
- let l = !0;
4459
- if ((this.isProjectionDirty || this.parent?.isProjectionDirty) && (l = !1), u && (this.isSharedProjectionDirty || this.isTransformDirty) && (l = !1), this.resolvedRelativeTargetAt === K.timestamp && (l = !1), l)
4458
+ const r = this.getLead(), l = !!this.resumingFrom || this !== r;
4459
+ let u = !0;
4460
+ if ((this.isProjectionDirty || this.parent?.isProjectionDirty) && (u = !1), l && (this.isSharedProjectionDirty || this.isTransformDirty) && (u = !1), this.resolvedRelativeTargetAt === K.timestamp && (u = !1), u)
4460
4461
  return;
4461
4462
  const { layout: a, layoutId: f } = this.options;
4462
4463
  if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(a || f))
4463
4464
  return;
4464
4465
  G(this.layoutCorrected, this.layout.layoutBox);
4465
4466
  const h = this.treeScale.x, c = this.treeScale.y;
4466
- vl(this.layoutCorrected, this.treeScale, this.path, u), r.layout && !r.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (r.target = r.layout.layoutBox, r.targetWithTransforms = _());
4467
+ vl(this.layoutCorrected, this.treeScale, this.path, l), r.layout && !r.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (r.target = r.layout.layoutBox, r.targetWithTransforms = _());
4467
4468
  const { target: g } = r;
4468
4469
  if (!g) {
4469
4470
  this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
@@ -4479,18 +4480,18 @@ function Kr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4479
4480
  }
4480
4481
  scheduleRender(r = !0) {
4481
4482
  if (this.options.visualElement?.scheduleRender(), r) {
4482
- const u = this.getStack();
4483
- u && u.scheduleRender();
4483
+ const l = this.getStack();
4484
+ l && l.scheduleRender();
4484
4485
  }
4485
4486
  this.resumingFrom && !this.resumingFrom.instance && (this.resumingFrom = void 0);
4486
4487
  }
4487
4488
  createProjectionDeltas() {
4488
4489
  this.prevProjectionDelta = bt(), this.projectionDelta = bt(), this.projectionDeltaWithTransform = bt();
4489
4490
  }
4490
- setAnimationOrigin(r, u = !1) {
4491
- const l = this.snapshot, a = l ? l.latestValues : {}, f = { ...this.latestValues }, h = bt();
4492
- (!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !u;
4493
- const c = _(), g = l ? l.source : void 0, T = this.layout ? this.layout.source : void 0, S = g !== T, C = this.getStack(), p = !C || C.members.length <= 1, v = !!(S && !p && this.options.crossfade === !0 && !this.path.some(cc));
4491
+ setAnimationOrigin(r, l = !1) {
4492
+ const u = this.snapshot, a = u ? u.latestValues : {}, f = { ...this.latestValues }, h = bt();
4493
+ (!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !l;
4494
+ const c = _(), g = u ? u.source : void 0, T = this.layout ? this.layout.source : void 0, S = g !== T, C = this.getStack(), p = !C || C.members.length <= 1, v = !!(S && !p && this.options.crossfade === !0 && !this.path.some(cc));
4494
4495
  this.animationProgress = 0;
4495
4496
  let d;
4496
4497
  this.mixTargetDelta = (m) => {
@@ -4504,8 +4505,8 @@ function Kr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4504
4505
  ...r,
4505
4506
  velocity: 0,
4506
4507
  isSync: !0,
4507
- onUpdate: (u) => {
4508
- this.mixTargetDelta(u), r.onUpdate && r.onUpdate(u);
4508
+ onUpdate: (l) => {
4509
+ this.mixTargetDelta(l), r.onUpdate && r.onUpdate(l);
4509
4510
  },
4510
4511
  onStop: () => {
4511
4512
  },
@@ -4525,24 +4526,24 @@ function Kr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4525
4526
  }
4526
4527
  applyTransformsToTarget() {
4527
4528
  const r = this.getLead();
4528
- let { targetWithTransforms: u, target: l, layout: a, latestValues: f } = r;
4529
- if (!(!u || !l || !a)) {
4529
+ let { targetWithTransforms: l, target: u, layout: a, latestValues: f } = r;
4530
+ if (!(!l || !u || !a)) {
4530
4531
  if (this !== r && this.layout && a && Br(this.options.animationType, this.layout.layoutBox, a.layoutBox)) {
4531
- l = this.target || _();
4532
+ u = this.target || _();
4532
4533
  const h = N(this.layout.layoutBox.x);
4533
- l.x.min = r.target.x.min, l.x.max = l.x.min + h;
4534
+ u.x.min = r.target.x.min, u.x.max = u.x.min + h;
4534
4535
  const c = N(this.layout.layoutBox.y);
4535
- l.y.min = r.target.y.min, l.y.max = l.y.min + c;
4536
+ u.y.min = r.target.y.min, u.y.max = u.y.min + c;
4536
4537
  }
4537
- G(u, l), xt(u, f), Lt(this.projectionDeltaWithTransform, this.layoutCorrected, u, f);
4538
+ G(l, u), xt(l, f), Lt(this.projectionDeltaWithTransform, this.layoutCorrected, l, f);
4538
4539
  }
4539
4540
  }
4540
- registerSharedNode(r, u) {
4541
- this.sharedNodes.has(r) || this.sharedNodes.set(r, new ql()), this.sharedNodes.get(r).add(u);
4542
- const a = u.options.initialPromotionConfig;
4543
- u.promote({
4541
+ registerSharedNode(r, l) {
4542
+ this.sharedNodes.has(r) || this.sharedNodes.set(r, new ql()), this.sharedNodes.get(r).add(l);
4543
+ const a = l.options.initialPromotionConfig;
4544
+ l.promote({
4544
4545
  transition: a ? a.transition : void 0,
4545
- preserveFollowOpacity: a && a.shouldPreserveFollowOpacity ? a.shouldPreserveFollowOpacity(u) : void 0
4546
+ preserveFollowOpacity: a && a.shouldPreserveFollowOpacity ? a.shouldPreserveFollowOpacity(l) : void 0
4546
4547
  });
4547
4548
  }
4548
4549
  isLead() {
@@ -4562,9 +4563,9 @@ function Kr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4562
4563
  if (r)
4563
4564
  return this.root.sharedNodes.get(r);
4564
4565
  }
4565
- promote({ needsReset: r, transition: u, preserveFollowOpacity: l } = {}) {
4566
+ promote({ needsReset: r, transition: l, preserveFollowOpacity: u } = {}) {
4566
4567
  const a = this.getStack();
4567
- a && a.promote(this, l), r && (this.projectionDelta = void 0, this.needsReset = !0), u && this.setOptions({ transition: u });
4568
+ a && a.promote(this, u), r && (this.projectionDelta = void 0, this.needsReset = !0), l && this.setOptions({ transition: l });
4568
4569
  }
4569
4570
  relegate() {
4570
4571
  const r = this.getStack();
@@ -4574,12 +4575,12 @@ function Kr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4574
4575
  const { visualElement: r } = this.options;
4575
4576
  if (!r)
4576
4577
  return;
4577
- let u = !1;
4578
- const { latestValues: l } = r;
4579
- if ((l.z || l.rotate || l.rotateX || l.rotateY || l.rotateZ || l.skewX || l.skewY) && (u = !0), !u)
4578
+ let l = !1;
4579
+ const { latestValues: u } = r;
4580
+ if ((u.z || u.rotate || u.rotateX || u.rotateY || u.rotateZ || u.skewX || u.skewY) && (l = !0), !l)
4580
4581
  return;
4581
4582
  const a = {};
4582
- l.z && Me("z", r, a, this.animationValues);
4583
+ u.z && Me("z", r, a, this.animationValues);
4583
4584
  for (let f = 0; f < Ae.length; f++)
4584
4585
  Me(`rotate${Ae[f]}`, r, a, this.animationValues), Me(`skew${Ae[f]}`, r, a, this.animationValues);
4585
4586
  r.render();
@@ -4587,28 +4588,28 @@ function Kr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4587
4588
  r.setStaticValue(f, a[f]), this.animationValues && (this.animationValues[f] = a[f]);
4588
4589
  r.scheduleRender();
4589
4590
  }
4590
- applyProjectionStyles(r, u) {
4591
+ applyProjectionStyles(r, l) {
4591
4592
  if (!this.instance || this.isSVG)
4592
4593
  return;
4593
4594
  if (!this.isVisible) {
4594
4595
  r.visibility = "hidden";
4595
4596
  return;
4596
4597
  }
4597
- const l = this.getTransformTemplate();
4598
+ const u = this.getTransformTemplate();
4598
4599
  if (this.needsReset) {
4599
- this.needsReset = !1, r.visibility = "", r.opacity = "", r.pointerEvents = ie(u?.pointerEvents) || "", r.transform = l ? l(this.latestValues, "") : "none";
4600
+ this.needsReset = !1, r.visibility = "", r.opacity = "", r.pointerEvents = ie(l?.pointerEvents) || "", r.transform = u ? u(this.latestValues, "") : "none";
4600
4601
  return;
4601
4602
  }
4602
4603
  const a = this.getLead();
4603
4604
  if (!this.projectionDelta || !this.layout || !a.target) {
4604
- this.options.layoutId && (r.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, r.pointerEvents = ie(u?.pointerEvents) || ""), this.hasProjected && !ct(this.latestValues) && (r.transform = l ? l({}, "") : "none", this.hasProjected = !1);
4605
+ this.options.layoutId && (r.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, r.pointerEvents = ie(l?.pointerEvents) || ""), this.hasProjected && !ct(this.latestValues) && (r.transform = u ? u({}, "") : "none", this.hasProjected = !1);
4605
4606
  return;
4606
4607
  }
4607
4608
  r.visibility = "";
4608
4609
  const f = a.animationValues || a.latestValues;
4609
4610
  this.applyTransformsToTarget();
4610
4611
  let h = Xl(this.projectionDeltaWithTransform, this.treeScale, f);
4611
- l && (h = l(f, h)), r.transform = h;
4612
+ u && (h = u(f, h)), r.transform = h;
4612
4613
  const { x: c, y: g } = this.projectionDelta;
4613
4614
  r.transformOrigin = `${c.origin * 100}% ${g.origin * 100}% 0`, a.animationValues ? r.opacity = a === this ? f.opacity ?? this.latestValues.opacity ?? 1 : this.preserveOpacity ? this.latestValues.opacity : f.opacityExit : r.opacity = a === this ? f.opacity !== void 0 ? f.opacity : "" : f.opacityExit !== void 0 ? f.opacityExit : 0;
4614
4615
  for (const T in Nt) {
@@ -4622,7 +4623,7 @@ function Kr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4622
4623
  } else
4623
4624
  p ? this.options.visualElement.renderState.vars[T] = v : r[T] = v;
4624
4625
  }
4625
- this.options.layoutId && (r.pointerEvents = a === this ? ie(u?.pointerEvents) || "" : "none");
4626
+ this.options.layoutId && (r.pointerEvents = a === this ? ie(l?.pointerEvents) || "" : "none");
4626
4627
  }
4627
4628
  clearSnapshot() {
4628
4629
  this.resumeFrom = this.snapshot = void 0;
@@ -4649,9 +4650,9 @@ function tc(t) {
4649
4650
  });
4650
4651
  const r = bt();
4651
4652
  Lt(r, n, e.layoutBox);
4652
- const u = bt();
4653
- o ? Lt(u, t.applyTransform(i, !0), e.measuredBox) : Lt(u, n, e.layoutBox);
4654
- const l = !Or(r);
4653
+ const l = bt();
4654
+ o ? Lt(l, t.applyTransform(i, !0), e.measuredBox) : Lt(l, n, e.layoutBox);
4655
+ const u = !Or(r);
4655
4656
  let a = !1;
4656
4657
  if (!t.resumeFrom) {
4657
4658
  const f = t.getClosestProjectingParent();
@@ -4668,9 +4669,9 @@ function tc(t) {
4668
4669
  t.notifyListeners("didUpdate", {
4669
4670
  layout: n,
4670
4671
  snapshot: e,
4671
- delta: u,
4672
+ delta: l,
4672
4673
  layoutDelta: r,
4673
- hasLayoutChanged: l,
4674
+ hasLayoutChanged: u,
4674
4675
  hasRelativeLayoutChanged: a
4675
4676
  });
4676
4677
  } else if (t.isLead()) {
@@ -4860,15 +4861,15 @@ class Cc extends ut {
4860
4861
  root: n ? n.current : void 0,
4861
4862
  rootMargin: i,
4862
4863
  threshold: typeof s == "number" ? s : Sc[s]
4863
- }, u = (l) => {
4864
- const { isIntersecting: a } = l;
4864
+ }, l = (u) => {
4865
+ const { isIntersecting: a } = u;
4865
4866
  if (this.isInView === a || (this.isInView = a, o && !a && this.hasEnteredView))
4866
4867
  return;
4867
4868
  a && (this.hasEnteredView = !0), this.node.animationState && this.node.animationState.setActive("whileInView", a);
4868
4869
  const { onViewportEnter: f, onViewportLeave: h } = this.node.getProps(), c = a ? f : h;
4869
- c && c(l);
4870
+ c && c(u);
4870
4871
  };
4871
- return wc(this.node.current, r, u);
4872
+ return wc(this.node.current, r, l);
4872
4873
  }
4873
4874
  mount() {
4874
4875
  this.startObserver();
@@ -4953,19 +4954,19 @@ class Rc {
4953
4954
  scrapeMotionValuesFromProps(e, n, i) {
4954
4955
  return {};
4955
4956
  }
4956
- constructor({ parent: e, props: n, presenceContext: i, reducedMotionConfig: s, blockInitialAnimation: o, visualState: r }, u = {}) {
4957
+ constructor({ parent: e, props: n, presenceContext: i, reducedMotionConfig: s, blockInitialAnimation: o, visualState: r }, l = {}) {
4957
4958
  this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = bn, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
4958
4959
  this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
4959
4960
  }, this.renderScheduledAt = 0, this.scheduleRender = () => {
4960
4961
  const c = U.now();
4961
4962
  this.renderScheduledAt < c && (this.renderScheduledAt = c, E.render(this.render, !1, !0));
4962
4963
  };
4963
- const { latestValues: l, renderState: a } = r;
4964
- this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = n.initial ? { ...l } : {}, this.renderState = a, this.parent = e, this.props = n, this.presenceContext = i, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = s, this.options = u, this.blockInitialAnimation = !!o, this.isControllingVariants = me(n), this.isVariantNode = or(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
4964
+ const { latestValues: u, renderState: a } = r;
4965
+ this.latestValues = u, this.baseTarget = { ...u }, this.initialValues = n.initial ? { ...u } : {}, this.renderState = a, this.parent = e, this.props = n, this.presenceContext = i, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = s, this.options = l, this.blockInitialAnimation = !!o, this.isControllingVariants = me(n), this.isVariantNode = or(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
4965
4966
  const { willChange: f, ...h } = this.scrapeMotionValuesFromProps(n, {}, this);
4966
4967
  for (const c in h) {
4967
4968
  const g = h[c];
4968
- l[c] !== void 0 && j(g) && g.set(l[c], !1);
4969
+ u[c] !== void 0 && j(g) && g.set(u[c], !1);
4969
4970
  }
4970
4971
  }
4971
4972
  mount(e) {
@@ -4985,8 +4986,8 @@ class Rc {
4985
4986
  this.valueSubscriptions.has(e) && this.valueSubscriptions.get(e)();
4986
4987
  const i = Et.has(e);
4987
4988
  i && this.onBindTransform && this.onBindTransform();
4988
- const s = n.on("change", (u) => {
4989
- this.latestValues[e] = u, this.props.onUpdate && E.preRender(this.notifyUpdate), i && this.projection && (this.projection.isTransformDirty = !0);
4989
+ const s = n.on("change", (l) => {
4990
+ this.latestValues[e] = l, this.props.onUpdate && E.preRender(this.notifyUpdate), i && this.projection && (this.projection.isTransformDirty = !0);
4990
4991
  }), o = n.on("renderRequest", this.scheduleRender);
4991
4992
  let r;
4992
4993
  window.MotionCheckAppearSync && (r = window.MotionCheckAppearSync(this, e, n)), this.valueSubscriptions.set(e, () => {
@@ -5270,14 +5271,14 @@ function Fc() {
5270
5271
  if (ns) return B;
5271
5272
  ns = 1;
5272
5273
  var t = re;
5273
- function e(l) {
5274
- var a = "https://react.dev/errors/" + l;
5274
+ function e(u) {
5275
+ var a = "https://react.dev/errors/" + u;
5275
5276
  if (1 < arguments.length) {
5276
5277
  a += "?args[]=" + encodeURIComponent(arguments[1]);
5277
5278
  for (var f = 2; f < arguments.length; f++)
5278
5279
  a += "&args[]=" + encodeURIComponent(arguments[f]);
5279
5280
  }
5280
- return "Minified React error #" + l + "; visit " + a + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
5281
+ return "Minified React error #" + u + "; visit " + a + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
5281
5282
  }
5282
5283
  function n() {
5283
5284
  }
@@ -5298,75 +5299,75 @@ function Fc() {
5298
5299
  p: 0,
5299
5300
  findDOMNode: null
5300
5301
  }, s = Symbol.for("react.portal");
5301
- function o(l, a, f) {
5302
+ function o(u, a, f) {
5302
5303
  var h = 3 < arguments.length && arguments[3] !== void 0 ? arguments[3] : null;
5303
5304
  return {
5304
5305
  $$typeof: s,
5305
5306
  key: h == null ? null : "" + h,
5306
- children: l,
5307
+ children: u,
5307
5308
  containerInfo: a,
5308
5309
  implementation: f
5309
5310
  };
5310
5311
  }
5311
5312
  var r = t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
5312
- function u(l, a) {
5313
- if (l === "font") return "";
5313
+ function l(u, a) {
5314
+ if (u === "font") return "";
5314
5315
  if (typeof a == "string")
5315
5316
  return a === "use-credentials" ? a : "";
5316
5317
  }
5317
- return B.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = i, B.createPortal = function(l, a) {
5318
+ return B.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = i, B.createPortal = function(u, a) {
5318
5319
  var f = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : null;
5319
5320
  if (!a || a.nodeType !== 1 && a.nodeType !== 9 && a.nodeType !== 11)
5320
5321
  throw Error(e(299));
5321
- return o(l, a, null, f);
5322
- }, B.flushSync = function(l) {
5322
+ return o(u, a, null, f);
5323
+ }, B.flushSync = function(u) {
5323
5324
  var a = r.T, f = i.p;
5324
5325
  try {
5325
- if (r.T = null, i.p = 2, l) return l();
5326
+ if (r.T = null, i.p = 2, u) return u();
5326
5327
  } finally {
5327
5328
  r.T = a, i.p = f, i.d.f();
5328
5329
  }
5329
- }, B.preconnect = function(l, a) {
5330
- typeof l == "string" && (a ? (a = a.crossOrigin, a = typeof a == "string" ? a === "use-credentials" ? a : "" : void 0) : a = null, i.d.C(l, a));
5331
- }, B.prefetchDNS = function(l) {
5332
- typeof l == "string" && i.d.D(l);
5333
- }, B.preinit = function(l, a) {
5334
- if (typeof l == "string" && a && typeof a.as == "string") {
5335
- var f = a.as, h = u(f, a.crossOrigin), c = typeof a.integrity == "string" ? a.integrity : void 0, g = typeof a.fetchPriority == "string" ? a.fetchPriority : void 0;
5330
+ }, B.preconnect = function(u, a) {
5331
+ typeof u == "string" && (a ? (a = a.crossOrigin, a = typeof a == "string" ? a === "use-credentials" ? a : "" : void 0) : a = null, i.d.C(u, a));
5332
+ }, B.prefetchDNS = function(u) {
5333
+ typeof u == "string" && i.d.D(u);
5334
+ }, B.preinit = function(u, a) {
5335
+ if (typeof u == "string" && a && typeof a.as == "string") {
5336
+ var f = a.as, h = l(f, a.crossOrigin), c = typeof a.integrity == "string" ? a.integrity : void 0, g = typeof a.fetchPriority == "string" ? a.fetchPriority : void 0;
5336
5337
  f === "style" ? i.d.S(
5337
- l,
5338
+ u,
5338
5339
  typeof a.precedence == "string" ? a.precedence : void 0,
5339
5340
  {
5340
5341
  crossOrigin: h,
5341
5342
  integrity: c,
5342
5343
  fetchPriority: g
5343
5344
  }
5344
- ) : f === "script" && i.d.X(l, {
5345
+ ) : f === "script" && i.d.X(u, {
5345
5346
  crossOrigin: h,
5346
5347
  integrity: c,
5347
5348
  fetchPriority: g,
5348
5349
  nonce: typeof a.nonce == "string" ? a.nonce : void 0
5349
5350
  });
5350
5351
  }
5351
- }, B.preinitModule = function(l, a) {
5352
- if (typeof l == "string")
5352
+ }, B.preinitModule = function(u, a) {
5353
+ if (typeof u == "string")
5353
5354
  if (typeof a == "object" && a !== null) {
5354
5355
  if (a.as == null || a.as === "script") {
5355
- var f = u(
5356
+ var f = l(
5356
5357
  a.as,
5357
5358
  a.crossOrigin
5358
5359
  );
5359
- i.d.M(l, {
5360
+ i.d.M(u, {
5360
5361
  crossOrigin: f,
5361
5362
  integrity: typeof a.integrity == "string" ? a.integrity : void 0,
5362
5363
  nonce: typeof a.nonce == "string" ? a.nonce : void 0
5363
5364
  });
5364
5365
  }
5365
- } else a == null && i.d.M(l);
5366
- }, B.preload = function(l, a) {
5367
- if (typeof l == "string" && typeof a == "object" && a !== null && typeof a.as == "string") {
5368
- var f = a.as, h = u(f, a.crossOrigin);
5369
- i.d.L(l, f, {
5366
+ } else a == null && i.d.M(u);
5367
+ }, B.preload = function(u, a) {
5368
+ if (typeof u == "string" && typeof a == "object" && a !== null && typeof a.as == "string") {
5369
+ var f = a.as, h = l(f, a.crossOrigin);
5370
+ i.d.L(u, f, {
5370
5371
  crossOrigin: h,
5371
5372
  integrity: typeof a.integrity == "string" ? a.integrity : void 0,
5372
5373
  nonce: typeof a.nonce == "string" ? a.nonce : void 0,
@@ -5378,22 +5379,22 @@ function Fc() {
5378
5379
  media: typeof a.media == "string" ? a.media : void 0
5379
5380
  });
5380
5381
  }
5381
- }, B.preloadModule = function(l, a) {
5382
- if (typeof l == "string")
5382
+ }, B.preloadModule = function(u, a) {
5383
+ if (typeof u == "string")
5383
5384
  if (a) {
5384
- var f = u(a.as, a.crossOrigin);
5385
- i.d.m(l, {
5385
+ var f = l(a.as, a.crossOrigin);
5386
+ i.d.m(u, {
5386
5387
  as: typeof a.as == "string" && a.as !== "script" ? a.as : void 0,
5387
5388
  crossOrigin: f,
5388
5389
  integrity: typeof a.integrity == "string" ? a.integrity : void 0
5389
5390
  });
5390
- } else i.d.m(l);
5391
- }, B.requestFormReset = function(l) {
5392
- i.d.r(l);
5393
- }, B.unstable_batchedUpdates = function(l, a) {
5394
- return l(a);
5395
- }, B.useFormState = function(l, a, f) {
5396
- return r.H.useFormState(l, a, f);
5391
+ } else i.d.m(u);
5392
+ }, B.requestFormReset = function(u) {
5393
+ i.d.r(u);
5394
+ }, B.unstable_batchedUpdates = function(u, a) {
5395
+ return u(a);
5396
+ }, B.useFormState = function(u, a, f) {
5397
+ return r.H.useFormState(u, a, f);
5397
5398
  }, B.useFormStatus = function() {
5398
5399
  return r.H.useHostTransitionStatus();
5399
5400
  }, B.version = "19.1.0", B;
@@ -5457,7 +5458,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
5457
5458
  ), h;
5458
5459
  }
5459
5460
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
5460
- var u = re, l = {
5461
+ var l = re, u = {
5461
5462
  d: {
5462
5463
  f: t,
5463
5464
  r: function() {
@@ -5475,21 +5476,21 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
5475
5476
  },
5476
5477
  p: 0,
5477
5478
  findDOMNode: null
5478
- }, a = Symbol.for("react.portal"), f = u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
5479
+ }, a = Symbol.for("react.portal"), f = l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
5479
5480
  typeof Map == "function" && Map.prototype != null && typeof Map.prototype.forEach == "function" && typeof Set == "function" && Set.prototype != null && typeof Set.prototype.clear == "function" && typeof Set.prototype.forEach == "function" || console.error(
5480
5481
  "React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"
5481
- ), I.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = l, I.createPortal = function(h, c) {
5482
+ ), I.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = u, I.createPortal = function(h, c) {
5482
5483
  var g = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : null;
5483
5484
  if (!c || c.nodeType !== 1 && c.nodeType !== 9 && c.nodeType !== 11)
5484
5485
  throw Error("Target container is not a DOM element.");
5485
5486
  return n(h, c, null, g);
5486
5487
  }, I.flushSync = function(h) {
5487
- var c = f.T, g = l.p;
5488
+ var c = f.T, g = u.p;
5488
5489
  try {
5489
- if (f.T = null, l.p = 2, h)
5490
+ if (f.T = null, u.p = 2, h)
5490
5491
  return h();
5491
5492
  } finally {
5492
- f.T = c, l.p = g, l.d.f() && console.error(
5493
+ f.T = c, u.p = g, u.d.f() && console.error(
5493
5494
  "flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."
5494
5495
  );
5495
5496
  }
@@ -5503,7 +5504,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
5503
5504
  ) : console.error(
5504
5505
  "ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
5505
5506
  s(h)
5506
- ), typeof h == "string" && (c ? (c = c.crossOrigin, c = typeof c == "string" ? c === "use-credentials" ? c : "" : void 0) : c = null, l.d.C(h, c));
5507
+ ), typeof h == "string" && (c ? (c = c.crossOrigin, c = typeof c == "string" ? c === "use-credentials" ? c : "" : void 0) : c = null, u.d.C(h, c));
5507
5508
  }, I.prefetchDNS = function(h) {
5508
5509
  if (typeof h != "string" || !h)
5509
5510
  console.error(
@@ -5520,7 +5521,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
5520
5521
  o(c)
5521
5522
  );
5522
5523
  }
5523
- typeof h == "string" && l.d.D(h);
5524
+ typeof h == "string" && u.d.D(h);
5524
5525
  }, I.preinit = function(h, c) {
5525
5526
  if (typeof h == "string" && h ? c == null || typeof c != "object" ? console.error(
5526
5527
  "ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",
@@ -5533,7 +5534,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
5533
5534
  s(h)
5534
5535
  ), typeof h == "string" && c && typeof c.as == "string") {
5535
5536
  var g = c.as, T = i(g, c.crossOrigin), S = typeof c.integrity == "string" ? c.integrity : void 0, C = typeof c.fetchPriority == "string" ? c.fetchPriority : void 0;
5536
- g === "style" ? l.d.S(
5537
+ g === "style" ? u.d.S(
5537
5538
  h,
5538
5539
  typeof c.precedence == "string" ? c.precedence : void 0,
5539
5540
  {
@@ -5541,7 +5542,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
5541
5542
  integrity: S,
5542
5543
  fetchPriority: C
5543
5544
  }
5544
- ) : g === "script" && l.d.X(h, {
5545
+ ) : g === "script" && u.d.X(h, {
5545
5546
  crossOrigin: T,
5546
5547
  integrity: S,
5547
5548
  fetchPriority: C,
@@ -5569,11 +5570,11 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
5569
5570
  typeof h == "string" && (typeof c == "object" && c !== null ? (c.as == null || c.as === "script") && (g = i(
5570
5571
  c.as,
5571
5572
  c.crossOrigin
5572
- ), l.d.M(h, {
5573
+ ), u.d.M(h, {
5573
5574
  crossOrigin: g,
5574
5575
  integrity: typeof c.integrity == "string" ? c.integrity : void 0,
5575
5576
  nonce: typeof c.nonce == "string" ? c.nonce : void 0
5576
- })) : c == null && l.d.M(h));
5577
+ })) : c == null && u.d.M(h));
5577
5578
  }, I.preload = function(h, c) {
5578
5579
  var g = "";
5579
5580
  if (typeof h == "string" && h || (g += " The `href` argument encountered was " + s(h) + "."), c == null || typeof c != "object" ? g += " The `options` argument encountered was " + s(c) + "." : typeof c.as == "string" && c.as || (g += " The `as` option encountered was " + s(c.as) + "."), g && console.error(
@@ -5585,7 +5586,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
5585
5586
  g,
5586
5587
  c.crossOrigin
5587
5588
  );
5588
- l.d.L(h, g, {
5589
+ u.d.L(h, g, {
5589
5590
  crossOrigin: T,
5590
5591
  integrity: typeof c.integrity == "string" ? c.integrity : void 0,
5591
5592
  nonce: typeof c.nonce == "string" ? c.nonce : void 0,
@@ -5605,13 +5606,13 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
5605
5606
  ), typeof h == "string" && (c ? (g = i(
5606
5607
  c.as,
5607
5608
  c.crossOrigin
5608
- ), l.d.m(h, {
5609
+ ), u.d.m(h, {
5609
5610
  as: typeof c.as == "string" && c.as !== "script" ? c.as : void 0,
5610
5611
  crossOrigin: g,
5611
5612
  integrity: typeof c.integrity == "string" ? c.integrity : void 0
5612
- })) : l.d.m(h));
5613
+ })) : u.d.m(h));
5613
5614
  }, I.requestFormReset = function(h) {
5614
- l.d.r(h);
5615
+ u.d.r(h);
5615
5616
  }, I.unstable_batchedUpdates = function(h, c) {
5616
5617
  return h(c);
5617
5618
  }, I.useFormState = function(h, c, g) {
@@ -5673,8 +5674,8 @@ const os = (t) => {
5673
5674
  const c = e;
5674
5675
  e = f ?? (typeof h != "object" || h === null) ? h : Object.assign({}, e, h), n.forEach((g) => g(e, c));
5675
5676
  }
5676
- }, s = () => e, u = { setState: i, getState: s, getInitialState: () => l, subscribe: (a) => (n.add(a), () => n.delete(a)) }, l = e = t(i, s, u);
5677
- return u;
5677
+ }, s = () => e, l = { setState: i, getState: s, getInitialState: () => u, subscribe: (a) => (n.add(a), () => n.delete(a)) }, u = e = t(i, s, l);
5678
+ return l;
5678
5679
  }, Yc = (t) => t ? os(t) : os, qc = (t) => t;
5679
5680
  function Xc(t, e = qc) {
5680
5681
  const n = re.useSyncExternalStore(
@@ -5697,9 +5698,9 @@ const as = (t) => {
5697
5698
  id: zc(),
5698
5699
  name: n,
5699
5700
  params: o
5700
- }, u = [...e().activeModals, r];
5701
+ }, l = [...e().activeModals, r];
5701
5702
  t({
5702
- activeModals: u
5703
+ activeModals: l
5703
5704
  });
5704
5705
  },
5705
5706
  closeModal(n) {
@@ -5713,56 +5714,56 @@ const as = (t) => {
5713
5714
  activeModals: i
5714
5715
  });
5715
5716
  }
5716
- })), eh = ({ modals: t }) => {
5717
- const e = us((s) => s.activeModals), n = us((s) => s.closeModal), i = et(null);
5717
+ })), eh = ({ modals: t, initialParams: e }) => {
5718
+ const n = us((o) => o.activeModals), i = us((o) => o.closeModal), s = et(null);
5718
5719
  return he(() => {
5719
- if (i.current = document.body, e?.length === 0 || !e[e.length - 1].params?.closeOnPressEsc)
5720
+ if (s.current = document.body, n?.length === 0 || !n[n.length - 1].params?.closeOnPressEsc)
5720
5721
  return;
5721
- const s = () => {
5722
- n();
5722
+ const o = () => {
5723
+ i();
5723
5724
  };
5724
- return Fn.bind(["escape"], s), () => Fn.unbind(["escape"], s);
5725
- }, [e, n]), i.current && Uc.createPortal(
5726
- /* @__PURE__ */ X(nu, { initial: !0, mode: "popLayout", children: e?.map((s, o) => {
5727
- const r = t[s.name], u = s.params, l = u?.animate;
5725
+ return Fn.bind(["escape"], o), () => Fn.unbind(["escape"], o);
5726
+ }, [n, i]), s.current && Uc.createPortal(
5727
+ /* @__PURE__ */ X(nu, { initial: !0, mode: "popLayout", children: n?.map((o, r) => {
5728
+ const l = t[o.name], u = o.params || e, a = u?.animate || e?.animate, f = u?.onClose || e?.onClose, h = u?.container || e?.container, c = u?.body || e?.body, g = u?.closeOnClickOutside || e?.closeOnClickOutside;
5728
5729
  return /* @__PURE__ */ X(
5729
5730
  Ic.div,
5730
5731
  {
5731
- exit: l?.exit ?? { opacity: 0 },
5732
- initial: l?.exit ?? { opacity: 0 },
5733
- animate: l?.animate ?? { opacity: 1 },
5732
+ exit: a?.exit ?? { opacity: 0 },
5733
+ initial: a?.exit ?? { opacity: 0 },
5734
+ animate: a?.animate ?? { opacity: 1 },
5734
5735
  layout: !0,
5735
5736
  style: {
5736
- zIndex: 100 + o
5737
+ zIndex: 100 + r
5737
5738
  },
5738
5739
  className: Kn(
5739
5740
  {
5740
- "fixed top-0 left-0 right-0 bottom-0 bg-black/40 backdrop-blur-sm": !u?.container?.override
5741
+ "fixed top-0 left-0 right-0 bottom-0 bg-black/40 backdrop-blur-sm": !h?.override
5741
5742
  },
5742
- u?.container?.className
5743
+ h?.className
5743
5744
  ),
5744
5745
  onClick: () => {
5745
- u?.closeOnClickOutside && (n(), u.onClose?.());
5746
+ g && (i(), f?.());
5746
5747
  },
5747
5748
  children: /* @__PURE__ */ X(
5748
5749
  "div",
5749
5750
  {
5750
5751
  className: Kn(
5751
5752
  {
5752
- "p-5 absolute max-h-screen max-w-screen overflow-auto top-1/2 -translate-y-1/2": !u?.body?.override,
5753
- "lg:left-1/2 lg:-translate-x-1/2": !u?.body?.override
5753
+ "p-5 absolute max-h-screen max-w-screen overflow-auto top-1/2 -translate-y-1/2": !c?.override,
5754
+ "lg:left-1/2 lg:-translate-x-1/2": !c?.override
5754
5755
  },
5755
- u?.body?.className
5756
+ c?.className
5756
5757
  ),
5757
- onClick: (a) => a.stopPropagation(),
5758
- children: /* @__PURE__ */ X(r, { ...u })
5758
+ onClick: (T) => T.stopPropagation(),
5759
+ children: /* @__PURE__ */ X(l, { ...u })
5759
5760
  }
5760
5761
  )
5761
5762
  },
5762
- s.id
5763
+ o.id
5763
5764
  );
5764
5765
  }) }),
5765
- i.current
5766
+ s.current
5766
5767
  );
5767
5768
  };
5768
5769
  export {