@devalok/shilp-sutra 0.23.3 → 0.25.0

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.
Files changed (89) hide show
  1. package/dist/_chunks/framer.js +946 -672
  2. package/dist/_chunks/keybinding.js +19 -0
  3. package/dist/_chunks/stat-row.js +455 -0
  4. package/dist/_chunks/tiptap.js +1 -1
  5. package/dist/_chunks/vendor-client.js +1 -1
  6. package/dist/_chunks/vendor-utils.js +1311 -1168
  7. package/dist/ai/ai-command-provider.d.ts +23 -0
  8. package/dist/ai/ai-command-provider.d.ts.map +1 -0
  9. package/dist/ai/ai-command-provider.js +20 -0
  10. package/dist/ai/block-renderer.d.ts +12 -0
  11. package/dist/ai/block-renderer.d.ts.map +1 -0
  12. package/dist/ai/block-renderer.js +54 -0
  13. package/dist/ai/blocks/block-table.d.ts +6 -0
  14. package/dist/ai/blocks/block-table.d.ts.map +1 -0
  15. package/dist/ai/blocks/confirm.d.ts +6 -0
  16. package/dist/ai/blocks/confirm.d.ts.map +1 -0
  17. package/dist/ai/blocks/divider.d.ts +6 -0
  18. package/dist/ai/blocks/divider.d.ts.map +1 -0
  19. package/dist/ai/blocks/error.d.ts +6 -0
  20. package/dist/ai/blocks/error.d.ts.map +1 -0
  21. package/dist/ai/blocks/index.d.ts +11 -0
  22. package/dist/ai/blocks/index.d.ts.map +1 -0
  23. package/dist/ai/blocks/index.js +13 -0
  24. package/dist/ai/blocks/info.d.ts +8 -0
  25. package/dist/ai/blocks/info.d.ts.map +1 -0
  26. package/dist/ai/blocks/loading.d.ts +6 -0
  27. package/dist/ai/blocks/loading.d.ts.map +1 -0
  28. package/dist/ai/blocks/stat-row.d.ts +6 -0
  29. package/dist/ai/blocks/stat-row.d.ts.map +1 -0
  30. package/dist/ai/blocks/success.d.ts +6 -0
  31. package/dist/ai/blocks/success.d.ts.map +1 -0
  32. package/dist/ai/blocks/text.d.ts +8 -0
  33. package/dist/ai/blocks/text.d.ts.map +1 -0
  34. package/dist/ai/command-bar.d.ts +40 -0
  35. package/dist/ai/command-bar.d.ts.map +1 -0
  36. package/dist/ai/command-bar.js +545 -0
  37. package/dist/ai/conversation.d.ts +20 -0
  38. package/dist/ai/conversation.d.ts.map +1 -0
  39. package/dist/ai/conversation.js +255 -0
  40. package/dist/ai/devadoot-icon.d.ts +23 -0
  41. package/dist/ai/devadoot-icon.d.ts.map +1 -0
  42. package/dist/ai/index.d.ts +22 -0
  43. package/dist/ai/index.d.ts.map +1 -0
  44. package/dist/ai/index.js +170 -0
  45. package/dist/ai/types.d.ts +81 -0
  46. package/dist/ai/types.d.ts.map +1 -0
  47. package/dist/composed/avatar-group.js +1 -1
  48. package/dist/composed/command-palette.d.ts +32 -2
  49. package/dist/composed/command-palette.d.ts.map +1 -1
  50. package/dist/composed/command-palette.js +176 -140
  51. package/dist/composed/content-card.js +1 -1
  52. package/dist/composed/index.d.ts +1 -1
  53. package/dist/composed/index.d.ts.map +1 -1
  54. package/dist/composed/priority-indicator.js +1 -1
  55. package/dist/composed/status-badge.js +1 -1
  56. package/dist/shell/app-command-palette.d.ts +36 -5
  57. package/dist/shell/app-command-palette.d.ts.map +1 -1
  58. package/dist/shell/app-command-palette.js +158 -137
  59. package/dist/shell/index.d.ts +1 -1
  60. package/dist/shell/index.d.ts.map +1 -1
  61. package/dist/tailwind/index.cjs +1 -1
  62. package/dist/tailwind/preset.js +1 -1
  63. package/dist/ui/alert.js +1 -1
  64. package/dist/ui/avatar.js +1 -1
  65. package/dist/ui/badge.js +1 -1
  66. package/dist/ui/banner.js +4 -4
  67. package/dist/ui/button.js +7 -7
  68. package/dist/ui/card.js +7 -7
  69. package/dist/ui/chip.js +1 -1
  70. package/dist/ui/input.js +5 -5
  71. package/dist/ui/lib/keybinding.d.ts +8 -0
  72. package/dist/ui/lib/keybinding.d.ts.map +1 -0
  73. package/dist/ui/lib/motion.d.ts +4 -0
  74. package/dist/ui/lib/motion.d.ts.map +1 -1
  75. package/dist/ui/lib/motion.js +18 -14
  76. package/dist/ui/lib/utils.js +1 -1
  77. package/dist/ui/progress.js +1 -1
  78. package/dist/ui/segmented-control.js +1 -1
  79. package/dist/ui/select.js +1 -1
  80. package/dist/ui/sheet.js +6 -6
  81. package/dist/ui/sidebar.js +1 -1
  82. package/dist/ui/skeleton.js +4 -4
  83. package/dist/ui/tabs.js +1 -1
  84. package/dist/ui/text.js +1 -1
  85. package/dist/ui/textarea.js +1 -1
  86. package/dist/ui/toggle.js +1 -1
  87. package/llms-full.txt +1 -1
  88. package/llms.txt +45 -2
  89. package/package.json +733 -699
@@ -1,47 +1,47 @@
1
1
  "use client";
2
- import { jsx as V, Fragment as le, jsxs as fe } from "react/jsx-runtime";
3
- import * as q from "react";
4
- import { createContext as I, useRef as x, useLayoutEffect as de, useEffect as ut, useId as lt, useContext as w, useInsertionEffect as ft, useMemo as b, useCallback as z, Children as he, isValidElement as me, useState as $, Fragment as Wt, createElement as pe, forwardRef as ge, Component as ve } from "react";
5
- import { i as tt, f as M, n as vt, g as ye, s as Ht, a as dt, r as Pe, b as Nt, c as yt, d as we, e as Ee, h as Ce, j as xe, k as Se, l as Me, m as Bt, o as Le, p as Ve, q as be, t as De, w as Ae, u as Ut, v as zt, S as Te, H as Ie, F as A, x as Re, y as ke, z as $t, A as _, B as Pt, C as _t, D as Fe, E as wt, G as je, I as Y, J as rt, K as Et, L as Oe, M as Ge, N as D, O as We, P as He, Q as Ne, R as Ct, T as Be, U as Ue, V as xt, W as ze, X as $e, Y as U, Z as _e, _ as Ye, $ as Yt, a0 as Xe, a1 as qe, a2 as Ke, a3 as Je, a4 as Ze } from "./vendor-utils.js";
6
- const O = I({});
7
- function K(e) {
8
- const t = x(null);
9
- return t.current === null && (t.current = e()), t.current;
10
- }
11
- const Qe = typeof window < "u", ht = Qe ? de : ut, J = /* @__PURE__ */ I(null), G = I({
12
- transformPagePoint: (e) => e,
2
+ import { jsx as I, Fragment as He, jsxs as Ne } from "react/jsx-runtime";
3
+ import * as ut from "react";
4
+ import { createContext as j, useRef as V, useLayoutEffect as Be, useEffect as ct, useId as At, useContext as C, useInsertionEffect as Vt, useMemo as R, useCallback as ot, Children as Ue, isValidElement as ze, useState as Y, Fragment as ae, createElement as $e, forwardRef as _e, Component as Ye } from "react";
5
+ import { i as mt, f as b, n as Gt, g as Ke, s as ue, a as q, r as Xe, b as ce, c as jt, d as qe, e as Je, h as Ze, j as Qe, k as tn, l as en, m as le, o as nn, p as sn, q as on, t as rn, w as an, u as lt, v as fe, S as de, H as he, F as O, x as un, y as cn, z as me, A as it, B as Wt, C as pe, D as ge, E as Et, G as ln, I as K, J as St, K as Ct, L as fn, M as dn, N as F, O as hn, P as mn, Q as pn, R as Ht, T as gn, U as vn, V as Nt, W as yn, X as Pn, Y as st, Z as wn, _ as En, $ as ve, a0 as Sn, a1 as Cn, a2 as ye, a3 as pt, a4 as xn, a5 as Mn, a6 as An, a7 as Vn, a8 as Dn, a9 as Pe, aa as we, ab as bn, ac as Ln, ad as Tn, ae as In, af as Rn, ag as kn, ah as rt, ai as Fn, aj as On, ak as Gn, al as jn, am as Wn } from "./vendor-utils.js";
6
+ const X = j({});
7
+ function B(t) {
8
+ const e = V(null);
9
+ return e.current === null && (e.current = t()), e.current;
10
+ }
11
+ const Hn = typeof window < "u", ft = Hn ? Be : ct, dt = /* @__PURE__ */ j(null), N = j({
12
+ transformPagePoint: (t) => t,
13
13
  isStatic: !1,
14
14
  reducedMotion: "never"
15
15
  });
16
- function St(e, t) {
17
- if (typeof e == "function")
18
- return e(t);
19
- e != null && (e.current = t);
16
+ function Bt(t, e) {
17
+ if (typeof t == "function")
18
+ return t(e);
19
+ t != null && (t.current = e);
20
20
  }
21
- function tn(...e) {
22
- return (t) => {
21
+ function Nn(...t) {
22
+ return (e) => {
23
23
  let n = !1;
24
- const s = e.map((o) => {
25
- const i = St(o, t);
24
+ const s = t.map((o) => {
25
+ const i = Bt(o, e);
26
26
  return !n && typeof i == "function" && (n = !0), i;
27
27
  });
28
28
  if (n)
29
29
  return () => {
30
30
  for (let o = 0; o < s.length; o++) {
31
31
  const i = s[o];
32
- typeof i == "function" ? i() : St(e[o], null);
32
+ typeof i == "function" ? i() : Bt(t[o], null);
33
33
  }
34
34
  };
35
35
  };
36
36
  }
37
- function en(...e) {
38
- return q.useCallback(tn(...e), e);
37
+ function Bn(...t) {
38
+ return ut.useCallback(Nn(...t), t);
39
39
  }
40
- class nn extends q.Component {
41
- getSnapshotBeforeUpdate(t) {
40
+ class Un extends ut.Component {
41
+ getSnapshotBeforeUpdate(e) {
42
42
  const n = this.props.childRef.current;
43
- if (tt(n) && t.isPresent && !this.props.isPresent && this.props.pop !== !1) {
44
- const s = n.offsetParent, o = tt(s) && s.offsetWidth || 0, i = tt(s) && s.offsetHeight || 0, r = getComputedStyle(n), a = this.props.sizeRef.current;
43
+ if (mt(n) && e.isPresent && !this.props.isPresent && this.props.pop !== !1) {
44
+ const s = n.offsetParent, o = mt(s) && s.offsetWidth || 0, i = mt(s) && s.offsetHeight || 0, r = getComputedStyle(n), a = this.props.sizeRef.current;
45
45
  a.height = parseFloat(r.height), a.width = parseFloat(r.width), a.top = n.offsetTop, a.left = n.offsetLeft, a.right = o - a.width - a.left, a.bottom = i - a.height - a.top;
46
46
  }
47
47
  return null;
@@ -55,140 +55,140 @@ class nn extends q.Component {
55
55
  return this.props.children;
56
56
  }
57
57
  }
58
- function sn({ children: e, isPresent: t, anchorX: n, anchorY: s, root: o, pop: i }) {
59
- var c;
60
- const r = lt(), a = x(null), f = x({
58
+ function zn({ children: t, isPresent: e, anchorX: n, anchorY: s, root: o, pop: i }) {
59
+ var l;
60
+ const r = At(), a = V(null), c = V({
61
61
  width: 0,
62
62
  height: 0,
63
63
  top: 0,
64
64
  left: 0,
65
65
  right: 0,
66
66
  bottom: 0
67
- }), { nonce: d } = w(G), m = ((c = e.props) == null ? void 0 : c.ref) ?? (e == null ? void 0 : e.ref), u = en(a, m);
68
- return ft(() => {
69
- const { width: h, height: l, top: p, left: g, right: v, bottom: y } = f.current;
70
- if (t || i === !1 || !a.current || !h || !l)
67
+ }), { nonce: f } = C(N), h = ((l = t.props) == null ? void 0 : l.ref) ?? (t == null ? void 0 : t.ref), u = Bn(a, h);
68
+ return Vt(() => {
69
+ const { width: m, height: d, top: y, left: g, right: p, bottom: v } = c.current;
70
+ if (e || i === !1 || !a.current || !m || !d)
71
71
  return;
72
- const P = n === "left" ? `left: ${g}` : `right: ${v}`, E = s === "bottom" ? `bottom: ${y}` : `top: ${p}`;
72
+ const E = n === "left" ? `left: ${g}` : `right: ${p}`, w = s === "bottom" ? `bottom: ${v}` : `top: ${y}`;
73
73
  a.current.dataset.motionPopId = r;
74
74
  const S = document.createElement("style");
75
- d && (S.nonce = d);
76
- const T = o ?? document.head;
77
- return T.appendChild(S), S.sheet && S.sheet.insertRule(`
75
+ f && (S.nonce = f);
76
+ const x = o ?? document.head;
77
+ return x.appendChild(S), S.sheet && S.sheet.insertRule(`
78
78
  [data-motion-pop-id="${r}"] {
79
79
  position: absolute !important;
80
- width: ${h}px !important;
81
- height: ${l}px !important;
82
- ${P}px !important;
80
+ width: ${m}px !important;
81
+ height: ${d}px !important;
83
82
  ${E}px !important;
83
+ ${w}px !important;
84
84
  }
85
85
  `), () => {
86
- var R;
87
- (R = a.current) == null || R.removeAttribute("data-motion-pop-id"), T.contains(S) && T.removeChild(S);
86
+ var A;
87
+ (A = a.current) == null || A.removeAttribute("data-motion-pop-id"), x.contains(S) && x.removeChild(S);
88
88
  };
89
- }, [t]), V(nn, { isPresent: t, childRef: a, sizeRef: f, pop: i, children: i === !1 ? e : q.cloneElement(e, { ref: u }) });
89
+ }, [e]), I(Un, { isPresent: e, childRef: a, sizeRef: c, pop: i, children: i === !1 ? t : ut.cloneElement(t, { ref: u }) });
90
90
  }
91
- const on = ({ children: e, initial: t, isPresent: n, onExitComplete: s, custom: o, presenceAffectsLayout: i, mode: r, anchorX: a, anchorY: f, root: d }) => {
92
- const m = K(rn), u = lt();
93
- let c = !0, h = b(() => (c = !1, {
91
+ const $n = ({ children: t, initial: e, isPresent: n, onExitComplete: s, custom: o, presenceAffectsLayout: i, mode: r, anchorX: a, anchorY: c, root: f }) => {
92
+ const h = B(_n), u = At();
93
+ let l = !0, m = R(() => (l = !1, {
94
94
  id: u,
95
- initial: t,
95
+ initial: e,
96
96
  isPresent: n,
97
97
  custom: o,
98
- onExitComplete: (l) => {
99
- m.set(l, !0);
100
- for (const p of m.values())
101
- if (!p)
98
+ onExitComplete: (d) => {
99
+ h.set(d, !0);
100
+ for (const y of h.values())
101
+ if (!y)
102
102
  return;
103
103
  s && s();
104
104
  },
105
- register: (l) => (m.set(l, !1), () => m.delete(l))
106
- }), [n, m, s]);
107
- return i && c && (h = { ...h }), b(() => {
108
- m.forEach((l, p) => m.set(p, !1));
109
- }, [n]), q.useEffect(() => {
110
- !n && !m.size && s && s();
111
- }, [n]), e = V(sn, { pop: r === "popLayout", isPresent: n, anchorX: a, anchorY: f, root: d, children: e }), V(J.Provider, { value: h, children: e });
105
+ register: (d) => (h.set(d, !1), () => h.delete(d))
106
+ }), [n, h, s]);
107
+ return i && l && (m = { ...m }), R(() => {
108
+ h.forEach((d, y) => h.set(y, !1));
109
+ }, [n]), ut.useEffect(() => {
110
+ !n && !h.size && s && s();
111
+ }, [n]), t = I(zn, { pop: r === "popLayout", isPresent: n, anchorX: a, anchorY: c, root: f, children: t }), I(dt.Provider, { value: m, children: t });
112
112
  };
113
- function rn() {
113
+ function _n() {
114
114
  return /* @__PURE__ */ new Map();
115
115
  }
116
- function Xt(e = !0) {
117
- const t = w(J);
118
- if (t === null)
116
+ function Ee(t = !0) {
117
+ const e = C(dt);
118
+ if (e === null)
119
119
  return [!0, null];
120
- const { isPresent: n, onExitComplete: s, register: o } = t, i = lt();
121
- ut(() => {
122
- if (e)
120
+ const { isPresent: n, onExitComplete: s, register: o } = e, i = At();
121
+ ct(() => {
122
+ if (t)
123
123
  return o(i);
124
- }, [e]);
125
- const r = z(() => e && s && s(i), [i, s, e]);
124
+ }, [t]);
125
+ const r = ot(() => t && s && s(i), [i, s, t]);
126
126
  return !n && s ? [!1, r] : [!0];
127
127
  }
128
- const H = (e) => e.key || "";
129
- function Mt(e) {
130
- const t = [];
131
- return he.forEach(e, (n) => {
132
- me(n) && t.push(n);
133
- }), t;
134
- }
135
- const ws = ({ children: e, custom: t, initial: n = !0, onExitComplete: s, presenceAffectsLayout: o = !0, mode: i = "sync", propagate: r = !1, anchorX: a = "left", anchorY: f = "top", root: d }) => {
136
- const [m, u] = Xt(r), c = b(() => Mt(e), [e]), h = r && !m ? [] : c.map(H), l = x(!0), p = x(c), g = K(() => /* @__PURE__ */ new Map()), v = x(/* @__PURE__ */ new Set()), [y, P] = $(c), [E, S] = $(c);
137
- ht(() => {
138
- l.current = !1, p.current = c;
139
- for (let L = 0; L < E.length; L++) {
140
- const C = H(E[L]);
141
- h.includes(C) ? (g.delete(C), v.current.delete(C)) : g.get(C) !== !0 && g.set(C, !1);
128
+ const tt = (t) => t.key || "";
129
+ function Ut(t) {
130
+ const e = [];
131
+ return Ue.forEach(t, (n) => {
132
+ ze(n) && e.push(n);
133
+ }), e;
134
+ }
135
+ const bo = ({ children: t, custom: e, initial: n = !0, onExitComplete: s, presenceAffectsLayout: o = !0, mode: i = "sync", propagate: r = !1, anchorX: a = "left", anchorY: c = "top", root: f }) => {
136
+ const [h, u] = Ee(r), l = R(() => Ut(t), [t]), m = r && !h ? [] : l.map(tt), d = V(!0), y = V(l), g = B(() => /* @__PURE__ */ new Map()), p = V(/* @__PURE__ */ new Set()), [v, E] = Y(l), [w, S] = Y(l);
137
+ ft(() => {
138
+ d.current = !1, y.current = l;
139
+ for (let M = 0; M < w.length; M++) {
140
+ const P = tt(w[M]);
141
+ m.includes(P) ? (g.delete(P), p.current.delete(P)) : g.get(P) !== !0 && g.set(P, !1);
142
142
  }
143
- }, [E, h.length, h.join("-")]);
144
- const T = [];
145
- if (c !== y) {
146
- let L = [...c];
147
- for (let C = 0; C < E.length; C++) {
148
- const k = E[C], Q = H(k);
149
- h.includes(Q) || (L.splice(C, 0, k), T.push(k));
143
+ }, [w, m.length, m.join("-")]);
144
+ const x = [];
145
+ if (l !== v) {
146
+ let M = [...l];
147
+ for (let P = 0; P < w.length; P++) {
148
+ const L = w[P], D = tt(L);
149
+ m.includes(D) || (M.splice(P, 0, L), x.push(L));
150
150
  }
151
- return i === "wait" && T.length && (L = T), S(Mt(L)), P(c), null;
151
+ return i === "wait" && x.length && (M = x), S(Ut(M)), E(l), null;
152
152
  }
153
- process.env.NODE_ENV !== "production" && i === "wait" && E.length > 1 && console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
154
- const { forceRender: R } = w(O);
155
- return V(le, { children: E.map((L) => {
156
- const C = H(L), k = r && !m ? !1 : c === E || h.includes(C), Q = () => {
157
- if (v.current.has(C))
153
+ process.env.NODE_ENV !== "production" && i === "wait" && w.length > 1 && console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
154
+ const { forceRender: A } = C(X);
155
+ return I(He, { children: w.map((M) => {
156
+ const P = tt(M), L = r && !h ? !1 : l === w || m.includes(P), D = () => {
157
+ if (p.current.has(P))
158
158
  return;
159
- if (g.has(C))
160
- v.current.add(C), g.set(C, !0);
159
+ if (g.has(P))
160
+ p.current.add(P), g.set(P, !0);
161
161
  else
162
162
  return;
163
- let gt = !0;
164
- g.forEach((ue) => {
165
- ue || (gt = !1);
166
- }), gt && (R == null || R(), S(p.current), r && (u == null || u()), s && s());
163
+ let W = !0;
164
+ g.forEach((G) => {
165
+ G || (W = !1);
166
+ }), W && (A == null || A(), S(y.current), r && (u == null || u()), s && s());
167
167
  };
168
- return V(on, { isPresent: k, initial: !l.current || n ? void 0 : !1, custom: t, presenceAffectsLayout: o, mode: i, root: d, onExitComplete: k ? void 0 : Q, anchorX: a, anchorY: f, children: L }, C);
168
+ return I($n, { isPresent: L, initial: !d.current || n ? void 0 : !1, custom: e, presenceAffectsLayout: o, mode: i, root: f, onExitComplete: L ? void 0 : D, anchorX: a, anchorY: c, children: M }, P);
169
169
  }) });
170
- }, an = I(null);
171
- function cn() {
172
- const e = x(!1);
173
- return ht(() => (e.current = !0, () => {
174
- e.current = !1;
175
- }), []), e;
176
- }
177
- function un() {
178
- const e = cn(), [t, n] = $(0), s = z(() => {
179
- e.current && n(t + 1);
180
- }, [t]);
181
- return [z(() => M.postRender(s), [s]), t];
170
+ }, Yn = j(null);
171
+ function Kn() {
172
+ const t = V(!1);
173
+ return ft(() => (t.current = !0, () => {
174
+ t.current = !1;
175
+ }), []), t;
176
+ }
177
+ function Xn() {
178
+ const t = Kn(), [e, n] = Y(0), s = ot(() => {
179
+ t.current && n(e + 1);
180
+ }, [e]);
181
+ return [ot(() => b.postRender(s), [s]), e];
182
182
  }
183
- const qt = (e) => e === !0, ln = (e) => qt(e === !0) || e === "id", Es = ({ children: e, id: t, inherit: n = !0 }) => {
184
- const s = w(O), o = w(an), [i, r] = un(), a = x(null), f = s.id || o;
185
- a.current === null && (ln(n) && f && (t = t ? f + "-" + t : f), a.current = {
186
- id: t,
187
- group: qt(n) ? s.group || vt() : vt()
183
+ const Se = (t) => t === !0, qn = (t) => Se(t === !0) || t === "id", Lo = ({ children: t, id: e, inherit: n = !0 }) => {
184
+ const s = C(X), o = C(Yn), [i, r] = Xn(), a = V(null), c = s.id || o;
185
+ a.current === null && (qn(n) && c && (e = e ? c + "-" + e : c), a.current = {
186
+ id: e,
187
+ group: Se(n) ? s.group || Gt() : Gt()
188
188
  });
189
- const d = b(() => ({ ...a.current, forceRender: i }), [r]);
190
- return V(O.Provider, { value: d, children: e });
191
- }, Kt = I({ strict: !1 }), Lt = {
189
+ const f = R(() => ({ ...a.current, forceRender: i }), [r]);
190
+ return I(X.Provider, { value: f, children: t });
191
+ }, Ce = j({ strict: !1 }), zt = {
192
192
  animation: [
193
193
  "animate",
194
194
  "variants",
@@ -208,30 +208,30 @@ const qt = (e) => e === !0, ln = (e) => qt(e === !0) || e === "id", Es = ({ chil
208
208
  inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
209
209
  layout: ["layout", "layoutId"]
210
210
  };
211
- let Vt = !1;
212
- function fn() {
213
- if (Vt)
211
+ let $t = !1;
212
+ function Jn() {
213
+ if ($t)
214
214
  return;
215
- const e = {};
216
- for (const t in Lt)
217
- e[t] = {
218
- isEnabled: (n) => Lt[t].some((s) => !!n[s])
215
+ const t = {};
216
+ for (const e in zt)
217
+ t[e] = {
218
+ isEnabled: (n) => zt[e].some((s) => !!n[s])
219
219
  };
220
- Ht(e), Vt = !0;
220
+ ue(t), $t = !0;
221
221
  }
222
- function Jt() {
223
- return fn(), ye();
222
+ function xe() {
223
+ return Jn(), Ke();
224
224
  }
225
- function dn(e) {
226
- const t = Jt();
227
- for (const n in e)
228
- t[n] = {
229
- ...t[n],
230
- ...e[n]
225
+ function Zn(t) {
226
+ const e = xe();
227
+ for (const n in t)
228
+ e[n] = {
229
+ ...e[n],
230
+ ...t[n]
231
231
  };
232
- Ht(t);
232
+ ue(e);
233
233
  }
234
- const hn = /* @__PURE__ */ new Set([
234
+ const Qn = /* @__PURE__ */ new Set([
235
235
  "animate",
236
236
  "exit",
237
237
  "variants",
@@ -264,97 +264,97 @@ const hn = /* @__PURE__ */ new Set([
264
264
  "ignoreStrict",
265
265
  "viewport"
266
266
  ]);
267
- function X(e) {
268
- return e.startsWith("while") || e.startsWith("drag") && e !== "draggable" || e.startsWith("layout") || e.startsWith("onTap") || e.startsWith("onPan") || e.startsWith("onLayout") || hn.has(e);
267
+ function at(t) {
268
+ return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") || Qn.has(t);
269
269
  }
270
- let Zt = (e) => !X(e);
271
- function Qt(e) {
272
- typeof e == "function" && (Zt = (t) => t.startsWith("on") ? !X(t) : e(t));
270
+ let Me = (t) => !at(t);
271
+ function Ae(t) {
272
+ typeof t == "function" && (Me = (e) => e.startsWith("on") ? !at(e) : t(e));
273
273
  }
274
274
  try {
275
- Qt(require("@emotion/is-prop-valid").default);
275
+ Ae(require("@emotion/is-prop-valid").default);
276
276
  } catch {
277
277
  }
278
- function mn(e, t, n) {
278
+ function ts(t, e, n) {
279
279
  const s = {};
280
- for (const o in e)
281
- o === "values" && typeof e.values == "object" || dt(e[o]) || (Zt(o) || n === !0 && X(o) || !t && !X(o) || // If trying to use native HTML drag events, forward drag listeners
282
- e.draggable && o.startsWith("onDrag")) && (s[o] = e[o]);
280
+ for (const o in t)
281
+ o === "values" && typeof t.values == "object" || q(t[o]) || (Me(o) || n === !0 && at(o) || !e && !at(o) || // If trying to use native HTML drag events, forward drag listeners
282
+ t.draggable && o.startsWith("onDrag")) && (s[o] = t[o]);
283
283
  return s;
284
284
  }
285
- function Cs({ children: e, isValidProp: t, ...n }) {
286
- t && Qt(t);
287
- const s = w(G);
288
- n = { ...s, ...n }, n.transition = Pe(n.transition, s.transition), n.isStatic = K(() => n.isStatic);
289
- const o = b(() => n, [
285
+ function To({ children: t, isValidProp: e, ...n }) {
286
+ e && Ae(e);
287
+ const s = C(N);
288
+ n = { ...s, ...n }, n.transition = Xe(n.transition, s.transition), n.isStatic = B(() => n.isStatic);
289
+ const o = R(() => n, [
290
290
  JSON.stringify(n.transition),
291
291
  n.transformPagePoint,
292
292
  n.reducedMotion,
293
293
  n.skipAnimations
294
294
  ]);
295
- return V(G.Provider, { value: o, children: e });
295
+ return I(N.Provider, { value: o, children: t });
296
296
  }
297
- const Z = /* @__PURE__ */ I({});
298
- function pn(e, t) {
299
- if (Nt(e)) {
300
- const { initial: n, animate: s } = e;
297
+ const ht = /* @__PURE__ */ j({});
298
+ function es(t, e) {
299
+ if (ce(t)) {
300
+ const { initial: n, animate: s } = t;
301
301
  return {
302
- initial: n === !1 || yt(n) ? n : void 0,
303
- animate: yt(s) ? s : void 0
302
+ initial: n === !1 || jt(n) ? n : void 0,
303
+ animate: jt(s) ? s : void 0
304
304
  };
305
305
  }
306
- return e.inherit !== !1 ? t : {};
306
+ return t.inherit !== !1 ? e : {};
307
307
  }
308
- function gn(e) {
309
- const { initial: t, animate: n } = pn(e, w(Z));
310
- return b(() => ({ initial: t, animate: n }), [bt(t), bt(n)]);
308
+ function ns(t) {
309
+ const { initial: e, animate: n } = es(t, C(ht));
310
+ return R(() => ({ initial: e, animate: n }), [_t(e), _t(n)]);
311
311
  }
312
- function bt(e) {
313
- return Array.isArray(e) ? e.join(" ") : e;
312
+ function _t(t) {
313
+ return Array.isArray(t) ? t.join(" ") : t;
314
314
  }
315
- const mt = () => ({
315
+ const Dt = () => ({
316
316
  style: {},
317
317
  transform: {},
318
318
  transformOrigin: {},
319
319
  vars: {}
320
320
  });
321
- function te(e, t, n) {
322
- for (const s in t)
323
- !dt(t[s]) && !we(s, n) && (e[s] = t[s]);
324
- }
325
- function vn({ transformTemplate: e }, t) {
326
- return b(() => {
327
- const n = mt();
328
- return Ee(n, t, e), Object.assign({}, n.vars, n.style);
329
- }, [t]);
321
+ function Ve(t, e, n) {
322
+ for (const s in e)
323
+ !q(e[s]) && !qe(s, n) && (t[s] = e[s]);
324
+ }
325
+ function ss({ transformTemplate: t }, e) {
326
+ return R(() => {
327
+ const n = Dt();
328
+ return Je(n, e, t), Object.assign({}, n.vars, n.style);
329
+ }, [e]);
330
330
  }
331
- function yn(e, t) {
332
- const n = e.style || {}, s = {};
333
- return te(s, n, e), Object.assign(s, vn(e, t)), s;
331
+ function os(t, e) {
332
+ const n = t.style || {}, s = {};
333
+ return Ve(s, n, t), Object.assign(s, ss(t, e)), s;
334
334
  }
335
- function Pn(e, t) {
336
- const n = {}, s = yn(e, t);
337
- return e.drag && e.dragListener !== !1 && (n.draggable = !1, s.userSelect = s.WebkitUserSelect = s.WebkitTouchCallout = "none", s.touchAction = e.drag === !0 ? "none" : `pan-${e.drag === "x" ? "y" : "x"}`), e.tabIndex === void 0 && (e.onTap || e.onTapStart || e.whileTap) && (n.tabIndex = 0), n.style = s, n;
335
+ function is(t, e) {
336
+ const n = {}, s = os(t, e);
337
+ return t.drag && t.dragListener !== !1 && (n.draggable = !1, s.userSelect = s.WebkitUserSelect = s.WebkitTouchCallout = "none", s.touchAction = t.drag === !0 ? "none" : `pan-${t.drag === "x" ? "y" : "x"}`), t.tabIndex === void 0 && (t.onTap || t.onTapStart || t.whileTap) && (n.tabIndex = 0), n.style = s, n;
338
338
  }
339
- const ee = () => ({
340
- ...mt(),
339
+ const De = () => ({
340
+ ...Dt(),
341
341
  attrs: {}
342
342
  });
343
- function wn(e, t, n, s) {
344
- const o = b(() => {
345
- const i = ee();
346
- return Ce(i, t, xe(s), e.transformTemplate, e.style), {
343
+ function rs(t, e, n, s) {
344
+ const o = R(() => {
345
+ const i = De();
346
+ return Ze(i, e, Qe(s), t.transformTemplate, t.style), {
347
347
  ...i.attrs,
348
348
  style: { ...i.style }
349
349
  };
350
- }, [t]);
351
- if (e.style) {
350
+ }, [e]);
351
+ if (t.style) {
352
352
  const i = {};
353
- te(i, e.style, e), o.style = { ...i, ...o.style };
353
+ Ve(i, t.style, t), o.style = { ...i, ...o.style };
354
354
  }
355
355
  return o;
356
356
  }
357
- const En = [
357
+ const as = [
358
358
  "animate",
359
359
  "circle",
360
360
  "defs",
@@ -381,139 +381,139 @@ const En = [
381
381
  "use",
382
382
  "view"
383
383
  ];
384
- function pt(e) {
384
+ function bt(t) {
385
385
  return (
386
386
  /**
387
387
  * If it's not a string, it's a custom React component. Currently we only support
388
388
  * HTML custom React components.
389
389
  */
390
- typeof e != "string" || /**
390
+ typeof t != "string" || /**
391
391
  * If it contains a dash, the element is a custom HTML webcomponent.
392
392
  */
393
- e.includes("-") ? !1 : (
393
+ t.includes("-") ? !1 : (
394
394
  /**
395
395
  * If it's in our list of lowercase SVG tags, it's an SVG component
396
396
  */
397
- !!(En.indexOf(e) > -1 || /**
397
+ !!(as.indexOf(t) > -1 || /**
398
398
  * If it contains a capital letter, it's an SVG component
399
399
  */
400
- /[A-Z]/u.test(e))
400
+ /[A-Z]/u.test(t))
401
401
  )
402
402
  );
403
403
  }
404
- function Cn(e, t, n, { latestValues: s }, o, i = !1, r) {
405
- const f = (r ?? pt(e) ? wn : Pn)(t, s, o, e), d = mn(t, typeof e == "string", i), m = e !== Wt ? { ...d, ...f, ref: n } : {}, { children: u } = t, c = b(() => dt(u) ? u.get() : u, [u]);
406
- return pe(e, {
407
- ...m,
408
- children: c
404
+ function us(t, e, n, { latestValues: s }, o, i = !1, r) {
405
+ const c = (r ?? bt(t) ? rs : is)(e, s, o, t), f = ts(e, typeof t == "string", i), h = t !== ae ? { ...f, ...c, ref: n } : {}, { children: u } = e, l = R(() => q(u) ? u.get() : u, [u]);
406
+ return $e(t, {
407
+ ...h,
408
+ children: l
409
409
  });
410
410
  }
411
- function xn({ scrapeMotionValuesFromProps: e, createRenderState: t }, n, s, o) {
411
+ function cs({ scrapeMotionValuesFromProps: t, createRenderState: e }, n, s, o) {
412
412
  return {
413
- latestValues: Sn(n, s, o, e),
414
- renderState: t()
413
+ latestValues: ls(n, s, o, t),
414
+ renderState: e()
415
415
  };
416
416
  }
417
- function Sn(e, t, n, s) {
418
- const o = {}, i = s(e, {});
419
- for (const c in i)
420
- o[c] = Se(i[c]);
421
- let { initial: r, animate: a } = e;
422
- const f = Nt(e), d = Me(e);
423
- t && d && !f && e.inherit !== !1 && (r === void 0 && (r = t.initial), a === void 0 && (a = t.animate));
424
- let m = n ? n.initial === !1 : !1;
425
- m = m || r === !1;
426
- const u = m ? a : r;
427
- if (u && typeof u != "boolean" && !Bt(u)) {
428
- const c = Array.isArray(u) ? u : [u];
429
- for (let h = 0; h < c.length; h++) {
430
- const l = Le(e, c[h]);
431
- if (l) {
432
- const { transitionEnd: p, transition: g, ...v } = l;
433
- for (const y in v) {
434
- let P = v[y];
435
- if (Array.isArray(P)) {
436
- const E = m ? P.length - 1 : 0;
437
- P = P[E];
417
+ function ls(t, e, n, s) {
418
+ const o = {}, i = s(t, {});
419
+ for (const l in i)
420
+ o[l] = tn(i[l]);
421
+ let { initial: r, animate: a } = t;
422
+ const c = ce(t), f = en(t);
423
+ e && f && !c && t.inherit !== !1 && (r === void 0 && (r = e.initial), a === void 0 && (a = e.animate));
424
+ let h = n ? n.initial === !1 : !1;
425
+ h = h || r === !1;
426
+ const u = h ? a : r;
427
+ if (u && typeof u != "boolean" && !le(u)) {
428
+ const l = Array.isArray(u) ? u : [u];
429
+ for (let m = 0; m < l.length; m++) {
430
+ const d = nn(t, l[m]);
431
+ if (d) {
432
+ const { transitionEnd: y, transition: g, ...p } = d;
433
+ for (const v in p) {
434
+ let E = p[v];
435
+ if (Array.isArray(E)) {
436
+ const w = h ? E.length - 1 : 0;
437
+ E = E[w];
438
438
  }
439
- P !== null && (o[y] = P);
439
+ E !== null && (o[v] = E);
440
440
  }
441
- for (const y in p)
442
- o[y] = p[y];
441
+ for (const v in y)
442
+ o[v] = y[v];
443
443
  }
444
444
  }
445
445
  }
446
446
  return o;
447
447
  }
448
- const ne = (e) => (t, n) => {
449
- const s = w(Z), o = w(J), i = () => xn(e, t, s, o);
450
- return n ? i() : K(i);
451
- }, Mn = /* @__PURE__ */ ne({
452
- scrapeMotionValuesFromProps: Ve,
453
- createRenderState: mt
454
- }), Ln = /* @__PURE__ */ ne({
455
- scrapeMotionValuesFromProps: be,
456
- createRenderState: ee
457
- }), Vn = Symbol.for("motionComponentSymbol");
458
- function bn(e, t, n) {
459
- const s = x(n);
460
- ft(() => {
448
+ const be = (t) => (e, n) => {
449
+ const s = C(ht), o = C(dt), i = () => cs(t, e, s, o);
450
+ return n ? i() : B(i);
451
+ }, fs = /* @__PURE__ */ be({
452
+ scrapeMotionValuesFromProps: sn,
453
+ createRenderState: Dt
454
+ }), ds = /* @__PURE__ */ be({
455
+ scrapeMotionValuesFromProps: on,
456
+ createRenderState: De
457
+ }), hs = Symbol.for("motionComponentSymbol");
458
+ function ms(t, e, n) {
459
+ const s = V(n);
460
+ Vt(() => {
461
461
  s.current = n;
462
462
  });
463
- const o = x(null);
464
- return z((i) => {
463
+ const o = V(null);
464
+ return ot((i) => {
465
465
  var a;
466
- i && ((a = e.onMount) == null || a.call(e, i));
466
+ i && ((a = t.onMount) == null || a.call(t, i));
467
467
  const r = s.current;
468
468
  if (typeof r == "function")
469
469
  if (i) {
470
- const f = r(i);
471
- typeof f == "function" && (o.current = f);
470
+ const c = r(i);
471
+ typeof c == "function" && (o.current = c);
472
472
  } else o.current ? (o.current(), o.current = null) : r(i);
473
473
  else r && (r.current = i);
474
- t && (i ? t.mount(i) : t.unmount());
475
- }, [t]);
474
+ e && (i ? e.mount(i) : e.unmount());
475
+ }, [e]);
476
476
  }
477
- const se = I({});
478
- function F(e) {
479
- return e && typeof e == "object" && Object.prototype.hasOwnProperty.call(e, "current");
477
+ const Le = j({});
478
+ function H(t) {
479
+ return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current");
480
480
  }
481
- function Dn(e, t, n, s, o, i) {
482
- var P, E;
483
- const { visualElement: r } = w(Z), a = w(Kt), f = w(J), d = w(G), m = d.reducedMotion, u = d.skipAnimations, c = x(null), h = x(!1);
484
- s = s || a.renderer, !c.current && s && (c.current = s(e, {
485
- visualState: t,
481
+ function ps(t, e, n, s, o, i) {
482
+ var E, w;
483
+ const { visualElement: r } = C(ht), a = C(Ce), c = C(dt), f = C(N), h = f.reducedMotion, u = f.skipAnimations, l = V(null), m = V(!1);
484
+ s = s || a.renderer, !l.current && s && (l.current = s(t, {
485
+ visualState: e,
486
486
  parent: r,
487
487
  props: n,
488
- presenceContext: f,
489
- blockInitialAnimation: f ? f.initial === !1 : !1,
490
- reducedMotionConfig: m,
488
+ presenceContext: c,
489
+ blockInitialAnimation: c ? c.initial === !1 : !1,
490
+ reducedMotionConfig: h,
491
491
  skipAnimations: u,
492
492
  isSVG: i
493
- }), h.current && c.current && (c.current.manuallyAnimateOnMount = !0));
494
- const l = c.current, p = w(se);
495
- l && !l.projection && o && (l.type === "html" || l.type === "svg") && An(c.current, n, o, p);
496
- const g = x(!1);
497
- ft(() => {
498
- l && g.current && l.update(n, f);
493
+ }), m.current && l.current && (l.current.manuallyAnimateOnMount = !0));
494
+ const d = l.current, y = C(Le);
495
+ d && !d.projection && o && (d.type === "html" || d.type === "svg") && gs(l.current, n, o, y);
496
+ const g = V(!1);
497
+ Vt(() => {
498
+ d && g.current && d.update(n, c);
499
499
  });
500
- const v = n[De], y = x(!!v && typeof window < "u" && !((P = window.MotionHandoffIsComplete) != null && P.call(window, v)) && ((E = window.MotionHasOptimisedAnimation) == null ? void 0 : E.call(window, v)));
501
- return ht(() => {
502
- h.current = !0, l && (g.current = !0, window.MotionIsMounted = !0, l.updateFeatures(), l.scheduleRenderMicrotask(), y.current && l.animationState && l.animationState.animateChanges());
503
- }), ut(() => {
504
- l && (!y.current && l.animationState && l.animationState.animateChanges(), y.current && (queueMicrotask(() => {
500
+ const p = n[rn], v = V(!!p && typeof window < "u" && !((E = window.MotionHandoffIsComplete) != null && E.call(window, p)) && ((w = window.MotionHasOptimisedAnimation) == null ? void 0 : w.call(window, p)));
501
+ return ft(() => {
502
+ m.current = !0, d && (g.current = !0, window.MotionIsMounted = !0, d.updateFeatures(), d.scheduleRenderMicrotask(), v.current && d.animationState && d.animationState.animateChanges());
503
+ }), ct(() => {
504
+ d && (!v.current && d.animationState && d.animationState.animateChanges(), v.current && (queueMicrotask(() => {
505
505
  var S;
506
- (S = window.MotionHandoffMarkAsComplete) == null || S.call(window, v);
507
- }), y.current = !1), l.enteringChildren = void 0);
508
- }), l;
506
+ (S = window.MotionHandoffMarkAsComplete) == null || S.call(window, p);
507
+ }), v.current = !1), d.enteringChildren = void 0);
508
+ }), d;
509
509
  }
510
- function An(e, t, n, s) {
511
- const { layoutId: o, layout: i, drag: r, dragConstraints: a, layoutScroll: f, layoutRoot: d, layoutCrossfade: m } = t;
512
- e.projection = new n(e.latestValues, t["data-framer-portal-id"] ? void 0 : oe(e.parent)), e.projection.setOptions({
510
+ function gs(t, e, n, s) {
511
+ const { layoutId: o, layout: i, drag: r, dragConstraints: a, layoutScroll: c, layoutRoot: f, layoutCrossfade: h } = e;
512
+ t.projection = new n(t.latestValues, e["data-framer-portal-id"] ? void 0 : Te(t.parent)), t.projection.setOptions({
513
513
  layoutId: o,
514
514
  layout: i,
515
- alwaysMeasureLayout: !!r || a && F(a),
516
- visualElement: e,
515
+ alwaysMeasureLayout: !!r || a && H(a),
516
+ visualElement: t,
517
517
  /**
518
518
  * TODO: Update options in an effect. This could be tricky as it'll be too late
519
519
  * to update by the time layout animations run.
@@ -523,85 +523,85 @@ function An(e, t, n, s) {
523
523
  */
524
524
  animationType: typeof i == "string" ? i : "both",
525
525
  initialPromotionConfig: s,
526
- crossfade: m,
527
- layoutScroll: f,
528
- layoutRoot: d
526
+ crossfade: h,
527
+ layoutScroll: c,
528
+ layoutRoot: f
529
529
  });
530
530
  }
531
- function oe(e) {
532
- if (e)
533
- return e.options.allowProjection !== !1 ? e.projection : oe(e.parent);
531
+ function Te(t) {
532
+ if (t)
533
+ return t.options.allowProjection !== !1 ? t.projection : Te(t.parent);
534
534
  }
535
- function et(e, { forwardMotionProps: t = !1, type: n } = {}, s, o) {
536
- s && dn(s);
537
- const i = n ? n === "svg" : pt(e), r = i ? Ln : Mn;
538
- function a(d, m) {
535
+ function gt(t, { forwardMotionProps: e = !1, type: n } = {}, s, o) {
536
+ s && Zn(s);
537
+ const i = n ? n === "svg" : bt(t), r = i ? ds : fs;
538
+ function a(f, h) {
539
539
  let u;
540
- const c = {
541
- ...w(G),
542
- ...d,
543
- layoutId: Tn(d)
544
- }, { isStatic: h } = c, l = gn(d), p = r(d, h);
545
- if (!h && typeof window < "u") {
546
- In(c, s);
547
- const g = Rn(c);
548
- u = g.MeasureLayout, l.visualElement = Dn(e, p, c, o, g.ProjectionNode, i);
540
+ const l = {
541
+ ...C(N),
542
+ ...f,
543
+ layoutId: vs(f)
544
+ }, { isStatic: m } = l, d = ns(f), y = r(f, m);
545
+ if (!m && typeof window < "u") {
546
+ ys(l, s);
547
+ const g = Ps(l);
548
+ u = g.MeasureLayout, d.visualElement = ps(t, y, l, o, g.ProjectionNode, i);
549
549
  }
550
- return fe(Z.Provider, { value: l, children: [u && l.visualElement ? V(u, { visualElement: l.visualElement, ...c }) : null, Cn(e, d, bn(p, l.visualElement, m), p, h, t, i)] });
550
+ return Ne(ht.Provider, { value: d, children: [u && d.visualElement ? I(u, { visualElement: d.visualElement, ...l }) : null, us(t, f, ms(y, d.visualElement, h), y, m, e, i)] });
551
551
  }
552
- a.displayName = `motion.${typeof e == "string" ? e : `create(${e.displayName ?? e.name ?? ""})`}`;
553
- const f = ge(a);
554
- return f[Vn] = e, f;
552
+ a.displayName = `motion.${typeof t == "string" ? t : `create(${t.displayName ?? t.name ?? ""})`}`;
553
+ const c = _e(a);
554
+ return c[hs] = t, c;
555
555
  }
556
- function Tn({ layoutId: e }) {
557
- const t = w(O).id;
558
- return t && e !== void 0 ? t + "-" + e : e;
556
+ function vs({ layoutId: t }) {
557
+ const e = C(X).id;
558
+ return e && t !== void 0 ? e + "-" + t : t;
559
559
  }
560
- function In(e, t) {
561
- const n = w(Kt).strict;
562
- if (process.env.NODE_ENV !== "production" && t && n) {
560
+ function ys(t, e) {
561
+ const n = C(Ce).strict;
562
+ if (process.env.NODE_ENV !== "production" && e && n) {
563
563
  const s = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
564
- e.ignoreStrict ? Ae(!1, s, "lazy-strict-mode") : Ut(!1, s, "lazy-strict-mode");
564
+ t.ignoreStrict ? an(!1, s, "lazy-strict-mode") : lt(!1, s, "lazy-strict-mode");
565
565
  }
566
566
  }
567
- function Rn(e) {
568
- const t = Jt(), { drag: n, layout: s } = t;
567
+ function Ps(t) {
568
+ const e = xe(), { drag: n, layout: s } = e;
569
569
  if (!n && !s)
570
570
  return {};
571
571
  const o = { ...n, ...s };
572
572
  return {
573
- MeasureLayout: n != null && n.isEnabled(e) || s != null && s.isEnabled(e) ? o.MeasureLayout : void 0,
573
+ MeasureLayout: n != null && n.isEnabled(t) || s != null && s.isEnabled(t) ? o.MeasureLayout : void 0,
574
574
  ProjectionNode: o.ProjectionNode
575
575
  };
576
576
  }
577
- function kn(e, t) {
577
+ function ws(t, e) {
578
578
  if (typeof Proxy > "u")
579
- return et;
580
- const n = /* @__PURE__ */ new Map(), s = (i, r) => et(i, r, e, t), o = (i, r) => (process.env.NODE_ENV !== "production" && zt(!1, "motion() is deprecated. Use motion.create() instead."), s(i, r));
579
+ return gt;
580
+ const n = /* @__PURE__ */ new Map(), s = (i, r) => gt(i, r, t, e), o = (i, r) => (process.env.NODE_ENV !== "production" && fe(!1, "motion() is deprecated. Use motion.create() instead."), s(i, r));
581
581
  return new Proxy(o, {
582
582
  /**
583
583
  * Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.
584
584
  * The prop name is passed through as `key` and we can use that to generate a `motion`
585
585
  * DOM component with that name.
586
586
  */
587
- get: (i, r) => r === "create" ? s : (n.has(r) || n.set(r, et(r, void 0, e, t)), n.get(r))
587
+ get: (i, r) => r === "create" ? s : (n.has(r) || n.set(r, gt(r, void 0, t, e)), n.get(r))
588
588
  });
589
589
  }
590
- const Fn = (e, t) => t.isSVG ?? pt(e) ? new Te(t) : new Ie(t, {
591
- allowProjection: e !== Wt
590
+ const Es = (t, e) => e.isSVG ?? bt(t) ? new de(e) : new he(e, {
591
+ allowProjection: t !== ae
592
592
  });
593
- class jn extends A {
593
+ class Ss extends O {
594
594
  /**
595
595
  * We dynamically generate the AnimationState manager as it contains a reference
596
596
  * to the underlying animation library. We only want to load that if we load this,
597
597
  * so people can optionally code split it out using the `m` component.
598
598
  */
599
- constructor(t) {
600
- super(t), t.animationState || (t.animationState = Re(t));
599
+ constructor(e) {
600
+ super(e), e.animationState || (e.animationState = un(e));
601
601
  }
602
602
  updateAnimationControlsSubscription() {
603
- const { animate: t } = this.node.getProps();
604
- Bt(t) && (this.unmountControls = t.subscribe(this.node));
603
+ const { animate: e } = this.node.getProps();
604
+ le(e) && (this.unmountControls = e.subscribe(this.node));
605
605
  }
606
606
  /**
607
607
  * Subscribe any provided AnimationControls to the component's VisualElement
@@ -610,35 +610,35 @@ class jn extends A {
610
610
  this.updateAnimationControlsSubscription();
611
611
  }
612
612
  update() {
613
- const { animate: t } = this.node.getProps(), { animate: n } = this.node.prevProps || {};
614
- t !== n && this.updateAnimationControlsSubscription();
613
+ const { animate: e } = this.node.getProps(), { animate: n } = this.node.prevProps || {};
614
+ e !== n && this.updateAnimationControlsSubscription();
615
615
  }
616
616
  unmount() {
617
- var t;
618
- this.node.animationState.reset(), (t = this.unmountControls) == null || t.call(this);
617
+ var e;
618
+ this.node.animationState.reset(), (e = this.unmountControls) == null || e.call(this);
619
619
  }
620
620
  }
621
- let On = 0;
622
- class Gn extends A {
621
+ let Cs = 0;
622
+ class xs extends O {
623
623
  constructor() {
624
- super(...arguments), this.id = On++, this.isExitComplete = !1;
624
+ super(...arguments), this.id = Cs++, this.isExitComplete = !1;
625
625
  }
626
626
  update() {
627
627
  var i;
628
628
  if (!this.node.presenceContext)
629
629
  return;
630
- const { isPresent: t, onExitComplete: n } = this.node.presenceContext, { isPresent: s } = this.node.prevPresenceContext || {};
631
- if (!this.node.animationState || t === s)
630
+ const { isPresent: e, onExitComplete: n } = this.node.presenceContext, { isPresent: s } = this.node.prevPresenceContext || {};
631
+ if (!this.node.animationState || e === s)
632
632
  return;
633
- if (t && s === !1) {
633
+ if (e && s === !1) {
634
634
  if (this.isExitComplete) {
635
635
  const { initial: r, custom: a } = this.node.getProps();
636
636
  if (typeof r == "string") {
637
- const f = ke(this.node, r, a);
638
- if (f) {
639
- const { transition: d, transitionEnd: m, ...u } = f;
640
- for (const c in u)
641
- (i = this.node.getValue(c)) == null || i.jump(u[c]);
637
+ const c = cn(this.node, r, a);
638
+ if (c) {
639
+ const { transition: f, transitionEnd: h, ...u } = c;
640
+ for (const l in u)
641
+ (i = this.node.getValue(l)) == null || i.jump(u[l]);
642
642
  }
643
643
  }
644
644
  this.node.animationState.reset(), this.node.animationState.animateChanges();
@@ -647,86 +647,86 @@ class Gn extends A {
647
647
  this.isExitComplete = !1;
648
648
  return;
649
649
  }
650
- const o = this.node.animationState.setActive("exit", !t);
651
- n && !t && o.then(() => {
650
+ const o = this.node.animationState.setActive("exit", !e);
651
+ n && !e && o.then(() => {
652
652
  this.isExitComplete = !0, n(this.id);
653
653
  });
654
654
  }
655
655
  mount() {
656
- const { register: t, onExitComplete: n } = this.node.presenceContext || {};
657
- n && n(this.id), t && (this.unmount = t(this.id));
656
+ const { register: e, onExitComplete: n } = this.node.presenceContext || {};
657
+ n && n(this.id), e && (this.unmount = e(this.id));
658
658
  }
659
659
  unmount() {
660
660
  }
661
661
  }
662
- const Wn = {
662
+ const Ms = {
663
663
  animation: {
664
- Feature: jn
664
+ Feature: Ss
665
665
  },
666
666
  exit: {
667
- Feature: Gn
667
+ Feature: xs
668
668
  }
669
669
  };
670
- function W(e) {
670
+ function J(t) {
671
671
  return {
672
672
  point: {
673
- x: e.pageX,
674
- y: e.pageY
673
+ x: t.pageX,
674
+ y: t.pageY
675
675
  }
676
676
  };
677
677
  }
678
- const Hn = (e) => (t) => $t(t) && e(t, W(t));
679
- function j(e, t, n, s) {
680
- return _(e, t, Hn(n), s);
678
+ const As = (t) => (e) => me(e) && t(e, J(e));
679
+ function _(t, e, n, s) {
680
+ return it(t, e, As(n), s);
681
681
  }
682
- const ie = ({ current: e }) => e ? e.ownerDocument.defaultView : null, Dt = (e, t) => Math.abs(e - t);
683
- function Nn(e, t) {
684
- const n = Dt(e.x, t.x), s = Dt(e.y, t.y);
682
+ const Ie = ({ current: t }) => t ? t.ownerDocument.defaultView : null, Yt = (t, e) => Math.abs(t - e);
683
+ function Vs(t, e) {
684
+ const n = Yt(t.x, e.x), s = Yt(t.y, e.y);
685
685
  return Math.sqrt(n ** 2 + s ** 2);
686
686
  }
687
- const At = /* @__PURE__ */ new Set(["auto", "scroll"]);
688
- class re {
689
- constructor(t, n, { transformPagePoint: s, contextWindow: o = window, dragSnapToOrigin: i = !1, distanceThreshold: r = 3, element: a } = {}) {
690
- if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.lastRawMoveEventInfo = null, this.handlers = {}, this.contextWindow = window, this.scrollPositions = /* @__PURE__ */ new Map(), this.removeScrollListeners = null, this.onElementScroll = (h) => {
691
- this.handleScroll(h.target);
687
+ const Kt = /* @__PURE__ */ new Set(["auto", "scroll"]);
688
+ class Re {
689
+ constructor(e, n, { transformPagePoint: s, contextWindow: o = window, dragSnapToOrigin: i = !1, distanceThreshold: r = 3, element: a } = {}) {
690
+ if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.lastRawMoveEventInfo = null, this.handlers = {}, this.contextWindow = window, this.scrollPositions = /* @__PURE__ */ new Map(), this.removeScrollListeners = null, this.onElementScroll = (m) => {
691
+ this.handleScroll(m.target);
692
692
  }, this.onWindowScroll = () => {
693
693
  this.handleScroll(window);
694
694
  }, this.updatePoint = () => {
695
695
  if (!(this.lastMoveEvent && this.lastMoveEventInfo))
696
696
  return;
697
- this.lastRawMoveEventInfo && (this.lastMoveEventInfo = N(this.lastRawMoveEventInfo, this.transformPagePoint));
698
- const h = nt(this.lastMoveEventInfo, this.history), l = this.startEvent !== null, p = Nn(h.offset, { x: 0, y: 0 }) >= this.distanceThreshold;
699
- if (!l && !p)
697
+ this.lastRawMoveEventInfo && (this.lastMoveEventInfo = et(this.lastRawMoveEventInfo, this.transformPagePoint));
698
+ const m = vt(this.lastMoveEventInfo, this.history), d = this.startEvent !== null, y = Vs(m.offset, { x: 0, y: 0 }) >= this.distanceThreshold;
699
+ if (!d && !y)
700
700
  return;
701
- const { point: g } = h, { timestamp: v } = Pt;
702
- this.history.push({ ...g, timestamp: v });
703
- const { onStart: y, onMove: P } = this.handlers;
704
- l || (y && y(this.lastMoveEvent, h), this.startEvent = this.lastMoveEvent), P && P(this.lastMoveEvent, h);
705
- }, this.handlePointerMove = (h, l) => {
706
- this.lastMoveEvent = h, this.lastRawMoveEventInfo = l, this.lastMoveEventInfo = N(l, this.transformPagePoint), M.update(this.updatePoint, !0);
707
- }, this.handlePointerUp = (h, l) => {
701
+ const { point: g } = m, { timestamp: p } = Wt;
702
+ this.history.push({ ...g, timestamp: p });
703
+ const { onStart: v, onMove: E } = this.handlers;
704
+ d || (v && v(this.lastMoveEvent, m), this.startEvent = this.lastMoveEvent), E && E(this.lastMoveEvent, m);
705
+ }, this.handlePointerMove = (m, d) => {
706
+ this.lastMoveEvent = m, this.lastRawMoveEventInfo = d, this.lastMoveEventInfo = et(d, this.transformPagePoint), b.update(this.updatePoint, !0);
707
+ }, this.handlePointerUp = (m, d) => {
708
708
  this.end();
709
- const { onEnd: p, onSessionEnd: g, resumeAnimation: v } = this.handlers;
710
- if ((this.dragSnapToOrigin || !this.startEvent) && v && v(), !(this.lastMoveEvent && this.lastMoveEventInfo))
709
+ const { onEnd: y, onSessionEnd: g, resumeAnimation: p } = this.handlers;
710
+ if ((this.dragSnapToOrigin || !this.startEvent) && p && p(), !(this.lastMoveEvent && this.lastMoveEventInfo))
711
711
  return;
712
- const y = nt(h.type === "pointercancel" ? this.lastMoveEventInfo : N(l, this.transformPagePoint), this.history);
713
- this.startEvent && p && p(h, y), g && g(h, y);
714
- }, !$t(t))
712
+ const v = vt(m.type === "pointercancel" ? this.lastMoveEventInfo : et(d, this.transformPagePoint), this.history);
713
+ this.startEvent && y && y(m, v), g && g(m, v);
714
+ }, !me(e))
715
715
  return;
716
716
  this.dragSnapToOrigin = i, this.handlers = n, this.transformPagePoint = s, this.distanceThreshold = r, this.contextWindow = o || window;
717
- const f = W(t), d = N(f, this.transformPagePoint), { point: m } = d, { timestamp: u } = Pt;
718
- this.history = [{ ...m, timestamp: u }];
719
- const { onSessionStart: c } = n;
720
- c && c(t, nt(d, this.history)), this.removeListeners = _t(j(this.contextWindow, "pointermove", this.handlePointerMove), j(this.contextWindow, "pointerup", this.handlePointerUp), j(this.contextWindow, "pointercancel", this.handlePointerUp)), a && this.startScrollTracking(a);
717
+ const c = J(e), f = et(c, this.transformPagePoint), { point: h } = f, { timestamp: u } = Wt;
718
+ this.history = [{ ...h, timestamp: u }];
719
+ const { onSessionStart: l } = n;
720
+ l && l(e, vt(f, this.history)), this.removeListeners = pe(_(this.contextWindow, "pointermove", this.handlePointerMove), _(this.contextWindow, "pointerup", this.handlePointerUp), _(this.contextWindow, "pointercancel", this.handlePointerUp)), a && this.startScrollTracking(a);
721
721
  }
722
722
  /**
723
723
  * Start tracking scroll on ancestors and window.
724
724
  */
725
- startScrollTracking(t) {
726
- let n = t.parentElement;
725
+ startScrollTracking(e) {
726
+ let n = e.parentElement;
727
727
  for (; n; ) {
728
728
  const s = getComputedStyle(n);
729
- (At.has(s.overflowX) || At.has(s.overflowY)) && this.scrollPositions.set(n, {
729
+ (Kt.has(s.overflowX) || Kt.has(s.overflowY)) && this.scrollPositions.set(n, {
730
730
  x: n.scrollLeft,
731
731
  y: n.scrollTop
732
732
  }), n = n.parentElement;
@@ -748,54 +748,54 @@ class re {
748
748
  * For element scroll: adjusts history origin since pageX/pageY doesn't change.
749
749
  * For window scroll: adjusts lastMoveEventInfo since pageX/pageY would change.
750
750
  */
751
- handleScroll(t) {
752
- const n = this.scrollPositions.get(t);
751
+ handleScroll(e) {
752
+ const n = this.scrollPositions.get(e);
753
753
  if (!n)
754
754
  return;
755
- const s = t === window, o = s ? { x: window.scrollX, y: window.scrollY } : {
756
- x: t.scrollLeft,
757
- y: t.scrollTop
755
+ const s = e === window, o = s ? { x: window.scrollX, y: window.scrollY } : {
756
+ x: e.scrollLeft,
757
+ y: e.scrollTop
758
758
  }, i = { x: o.x - n.x, y: o.y - n.y };
759
- i.x === 0 && i.y === 0 || (s ? this.lastMoveEventInfo && (this.lastMoveEventInfo.point.x += i.x, this.lastMoveEventInfo.point.y += i.y) : this.history.length > 0 && (this.history[0].x -= i.x, this.history[0].y -= i.y), this.scrollPositions.set(t, o), M.update(this.updatePoint, !0));
759
+ i.x === 0 && i.y === 0 || (s ? this.lastMoveEventInfo && (this.lastMoveEventInfo.point.x += i.x, this.lastMoveEventInfo.point.y += i.y) : this.history.length > 0 && (this.history[0].x -= i.x, this.history[0].y -= i.y), this.scrollPositions.set(e, o), b.update(this.updatePoint, !0));
760
760
  }
761
- updateHandlers(t) {
762
- this.handlers = t;
761
+ updateHandlers(e) {
762
+ this.handlers = e;
763
763
  }
764
764
  end() {
765
- this.removeListeners && this.removeListeners(), this.removeScrollListeners && this.removeScrollListeners(), this.scrollPositions.clear(), Fe(this.updatePoint);
765
+ this.removeListeners && this.removeListeners(), this.removeScrollListeners && this.removeScrollListeners(), this.scrollPositions.clear(), ge(this.updatePoint);
766
766
  }
767
767
  }
768
- function N(e, t) {
769
- return t ? { point: t(e.point) } : e;
768
+ function et(t, e) {
769
+ return e ? { point: e(t.point) } : t;
770
770
  }
771
- function Tt(e, t) {
772
- return { x: e.x - t.x, y: e.y - t.y };
771
+ function Xt(t, e) {
772
+ return { x: t.x - e.x, y: t.y - e.y };
773
773
  }
774
- function nt({ point: e }, t) {
774
+ function vt({ point: t }, e) {
775
775
  return {
776
- point: e,
777
- delta: Tt(e, ae(t)),
778
- offset: Tt(e, Bn(t)),
779
- velocity: Un(t, 0.1)
776
+ point: t,
777
+ delta: Xt(t, ke(e)),
778
+ offset: Xt(t, Ds(e)),
779
+ velocity: bs(e, 0.1)
780
780
  };
781
781
  }
782
- function Bn(e) {
783
- return e[0];
782
+ function Ds(t) {
783
+ return t[0];
784
784
  }
785
- function ae(e) {
786
- return e[e.length - 1];
785
+ function ke(t) {
786
+ return t[t.length - 1];
787
787
  }
788
- function Un(e, t) {
789
- if (e.length < 2)
788
+ function bs(t, e) {
789
+ if (t.length < 2)
790
790
  return { x: 0, y: 0 };
791
- let n = e.length - 1, s = null;
792
- const o = ae(e);
793
- for (; n >= 0 && (s = e[n], !(o.timestamp - s.timestamp > wt(t))); )
791
+ let n = t.length - 1, s = null;
792
+ const o = ke(t);
793
+ for (; n >= 0 && (s = t[n], !(o.timestamp - s.timestamp > Et(e))); )
794
794
  n--;
795
795
  if (!s)
796
796
  return { x: 0, y: 0 };
797
- s === e[0] && e.length > 2 && o.timestamp - s.timestamp > wt(t) * 2 && (s = e[1]);
798
- const i = je(o.timestamp - s.timestamp);
797
+ s === t[0] && t.length > 2 && o.timestamp - s.timestamp > Et(e) * 2 && (s = t[1]);
798
+ const i = ln(o.timestamp - s.timestamp);
799
799
  if (i === 0)
800
800
  return { x: 0, y: 0 };
801
801
  const r = {
@@ -804,134 +804,134 @@ function Un(e, t) {
804
804
  };
805
805
  return r.x === 1 / 0 && (r.x = 0), r.y === 1 / 0 && (r.y = 0), r;
806
806
  }
807
- function zn(e, { min: t, max: n }, s) {
808
- return t !== void 0 && e < t ? e = s ? Y(t, e, s.min) : Math.max(e, t) : n !== void 0 && e > n && (e = s ? Y(n, e, s.max) : Math.min(e, n)), e;
807
+ function Ls(t, { min: e, max: n }, s) {
808
+ return e !== void 0 && t < e ? t = s ? K(e, t, s.min) : Math.max(t, e) : n !== void 0 && t > n && (t = s ? K(n, t, s.max) : Math.min(t, n)), t;
809
809
  }
810
- function It(e, t, n) {
810
+ function qt(t, e, n) {
811
811
  return {
812
- min: t !== void 0 ? e.min + t : void 0,
813
- max: n !== void 0 ? e.max + n - (e.max - e.min) : void 0
812
+ min: e !== void 0 ? t.min + e : void 0,
813
+ max: n !== void 0 ? t.max + n - (t.max - t.min) : void 0
814
814
  };
815
815
  }
816
- function $n(e, { top: t, left: n, bottom: s, right: o }) {
816
+ function Ts(t, { top: e, left: n, bottom: s, right: o }) {
817
817
  return {
818
- x: It(e.x, n, o),
819
- y: It(e.y, t, s)
818
+ x: qt(t.x, n, o),
819
+ y: qt(t.y, e, s)
820
820
  };
821
821
  }
822
- function Rt(e, t) {
823
- let n = t.min - e.min, s = t.max - e.max;
824
- return t.max - t.min < e.max - e.min && ([n, s] = [s, n]), { min: n, max: s };
822
+ function Jt(t, e) {
823
+ let n = e.min - t.min, s = e.max - t.max;
824
+ return e.max - e.min < t.max - t.min && ([n, s] = [s, n]), { min: n, max: s };
825
825
  }
826
- function _n(e, t) {
826
+ function Is(t, e) {
827
827
  return {
828
- x: Rt(e.x, t.x),
829
- y: Rt(e.y, t.y)
828
+ x: Jt(t.x, e.x),
829
+ y: Jt(t.y, e.y)
830
830
  };
831
831
  }
832
- function Yn(e, t) {
832
+ function Rs(t, e) {
833
833
  let n = 0.5;
834
- const s = rt(e), o = rt(t);
835
- return o > s ? n = Et(t.min, t.max - s, e.min) : s > o && (n = Et(e.min, e.max - o, t.min)), Oe(0, 1, n);
834
+ const s = St(t), o = St(e);
835
+ return o > s ? n = Ct(e.min, e.max - s, t.min) : s > o && (n = Ct(t.min, t.max - o, e.min)), fn(0, 1, n);
836
836
  }
837
- function Xn(e, t) {
837
+ function ks(t, e) {
838
838
  const n = {};
839
- return t.min !== void 0 && (n.min = t.min - e.min), t.max !== void 0 && (n.max = t.max - e.min), n;
839
+ return e.min !== void 0 && (n.min = e.min - t.min), e.max !== void 0 && (n.max = e.max - t.min), n;
840
840
  }
841
- const at = 0.35;
842
- function qn(e = at) {
843
- return e === !1 ? e = 0 : e === !0 && (e = at), {
844
- x: kt(e, "left", "right"),
845
- y: kt(e, "top", "bottom")
841
+ const xt = 0.35;
842
+ function Fs(t = xt) {
843
+ return t === !1 ? t = 0 : t === !0 && (t = xt), {
844
+ x: Zt(t, "left", "right"),
845
+ y: Zt(t, "top", "bottom")
846
846
  };
847
847
  }
848
- function kt(e, t, n) {
848
+ function Zt(t, e, n) {
849
849
  return {
850
- min: Ft(e, t),
851
- max: Ft(e, n)
850
+ min: Qt(t, e),
851
+ max: Qt(t, n)
852
852
  };
853
853
  }
854
- function Ft(e, t) {
855
- return typeof e == "number" ? e : e[t] || 0;
854
+ function Qt(t, e) {
855
+ return typeof t == "number" ? t : t[e] || 0;
856
856
  }
857
- const Kn = /* @__PURE__ */ new WeakMap();
858
- class Jn {
859
- constructor(t) {
860
- this.openDragLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = Ge(), this.latestPointerEvent = null, this.latestPanInfo = null, this.visualElement = t;
857
+ const Os = /* @__PURE__ */ new WeakMap();
858
+ class Gs {
859
+ constructor(e) {
860
+ this.openDragLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = dn(), this.latestPointerEvent = null, this.latestPanInfo = null, this.visualElement = e;
861
861
  }
862
- start(t, { snapToCursor: n = !1, distanceThreshold: s } = {}) {
862
+ start(e, { snapToCursor: n = !1, distanceThreshold: s } = {}) {
863
863
  const { presenceContext: o } = this.visualElement;
864
864
  if (o && o.isPresent === !1)
865
865
  return;
866
866
  const i = (u) => {
867
- n && this.snapToCursor(W(u).point), this.stopAnimation();
868
- }, r = (u, c) => {
869
- const { drag: h, dragPropagation: l, onDragStart: p } = this.getProps();
870
- if (h && !l && (this.openDragLock && this.openDragLock(), this.openDragLock = Ue(h), !this.openDragLock))
867
+ n && this.snapToCursor(J(u).point), this.stopAnimation();
868
+ }, r = (u, l) => {
869
+ const { drag: m, dragPropagation: d, onDragStart: y } = this.getProps();
870
+ if (m && !d && (this.openDragLock && this.openDragLock(), this.openDragLock = vn(m), !this.openDragLock))
871
871
  return;
872
- this.latestPointerEvent = u, this.latestPanInfo = c, this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), D((v) => {
873
- let y = this.getAxisMotionValue(v).get() || 0;
874
- if (ze.test(y)) {
875
- const { projection: P } = this.visualElement;
876
- if (P && P.layout) {
877
- const E = P.layout.layoutBox[v];
878
- E && (y = rt(E) * (parseFloat(y) / 100));
872
+ this.latestPointerEvent = u, this.latestPanInfo = l, this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), F((p) => {
873
+ let v = this.getAxisMotionValue(p).get() || 0;
874
+ if (yn.test(v)) {
875
+ const { projection: E } = this.visualElement;
876
+ if (E && E.layout) {
877
+ const w = E.layout.layoutBox[p];
878
+ w && (v = St(w) * (parseFloat(v) / 100));
879
879
  }
880
880
  }
881
- this.originPoint[v] = y;
882
- }), p && M.update(() => p(u, c), !1, !0), Ct(this.visualElement, "transform");
881
+ this.originPoint[p] = v;
882
+ }), y && b.update(() => y(u, l), !1, !0), Ht(this.visualElement, "transform");
883
883
  const { animationState: g } = this.visualElement;
884
884
  g && g.setActive("whileDrag", !0);
885
- }, a = (u, c) => {
886
- this.latestPointerEvent = u, this.latestPanInfo = c;
887
- const { dragPropagation: h, dragDirectionLock: l, onDirectionLock: p, onDrag: g } = this.getProps();
888
- if (!h && !this.openDragLock)
885
+ }, a = (u, l) => {
886
+ this.latestPointerEvent = u, this.latestPanInfo = l;
887
+ const { dragPropagation: m, dragDirectionLock: d, onDirectionLock: y, onDrag: g } = this.getProps();
888
+ if (!m && !this.openDragLock)
889
889
  return;
890
- const { offset: v } = c;
891
- if (l && this.currentDirection === null) {
892
- this.currentDirection = Qn(v), this.currentDirection !== null && p && p(this.currentDirection);
890
+ const { offset: p } = l;
891
+ if (d && this.currentDirection === null) {
892
+ this.currentDirection = Ws(p), this.currentDirection !== null && y && y(this.currentDirection);
893
893
  return;
894
894
  }
895
- this.updateAxis("x", c.point, v), this.updateAxis("y", c.point, v), this.visualElement.render(), g && M.update(() => g(u, c), !1, !0);
896
- }, f = (u, c) => {
897
- this.latestPointerEvent = u, this.latestPanInfo = c, this.stop(u, c), this.latestPointerEvent = null, this.latestPanInfo = null;
898
- }, d = () => {
895
+ this.updateAxis("x", l.point, p), this.updateAxis("y", l.point, p), this.visualElement.render(), g && b.update(() => g(u, l), !1, !0);
896
+ }, c = (u, l) => {
897
+ this.latestPointerEvent = u, this.latestPanInfo = l, this.stop(u, l), this.latestPointerEvent = null, this.latestPanInfo = null;
898
+ }, f = () => {
899
899
  const { dragSnapToOrigin: u } = this.getProps();
900
900
  (u || this.constraints) && this.startAnimation({ x: 0, y: 0 });
901
- }, { dragSnapToOrigin: m } = this.getProps();
902
- this.panSession = new re(t, {
901
+ }, { dragSnapToOrigin: h } = this.getProps();
902
+ this.panSession = new Re(e, {
903
903
  onSessionStart: i,
904
904
  onStart: r,
905
905
  onMove: a,
906
- onSessionEnd: f,
907
- resumeAnimation: d
906
+ onSessionEnd: c,
907
+ resumeAnimation: f
908
908
  }, {
909
909
  transformPagePoint: this.visualElement.getTransformPagePoint(),
910
- dragSnapToOrigin: m,
910
+ dragSnapToOrigin: h,
911
911
  distanceThreshold: s,
912
- contextWindow: ie(this.visualElement),
912
+ contextWindow: Ie(this.visualElement),
913
913
  element: this.visualElement.current
914
914
  });
915
915
  }
916
916
  /**
917
917
  * @internal
918
918
  */
919
- stop(t, n) {
920
- const s = t || this.latestPointerEvent, o = n || this.latestPanInfo, i = this.isDragging;
919
+ stop(e, n) {
920
+ const s = e || this.latestPointerEvent, o = n || this.latestPanInfo, i = this.isDragging;
921
921
  if (this.cancel(), !i || !o || !s)
922
922
  return;
923
923
  const { velocity: r } = o;
924
924
  this.startAnimation(r);
925
925
  const { onDragEnd: a } = this.getProps();
926
- a && M.postRender(() => a(s, o));
926
+ a && b.postRender(() => a(s, o));
927
927
  }
928
928
  /**
929
929
  * @internal
930
930
  */
931
931
  cancel() {
932
932
  this.isDragging = !1;
933
- const { projection: t, animationState: n } = this.visualElement;
934
- t && (t.isAnimationBlocked = !1), this.endPanSession();
933
+ const { projection: e, animationState: n } = this.visualElement;
934
+ e && (e.isAnimationBlocked = !1), this.endPanSession();
935
935
  const { dragPropagation: s } = this.getProps();
936
936
  !s && this.openDragLock && (this.openDragLock(), this.openDragLock = null), n && n.setActive("whileDrag", !1);
937
937
  }
@@ -944,65 +944,65 @@ class Jn {
944
944
  endPanSession() {
945
945
  this.panSession && this.panSession.end(), this.panSession = void 0;
946
946
  }
947
- updateAxis(t, n, s) {
947
+ updateAxis(e, n, s) {
948
948
  const { drag: o } = this.getProps();
949
- if (!s || !B(t, o, this.currentDirection))
949
+ if (!s || !nt(e, o, this.currentDirection))
950
950
  return;
951
- const i = this.getAxisMotionValue(t);
952
- let r = this.originPoint[t] + s[t];
953
- this.constraints && this.constraints[t] && (r = zn(r, this.constraints[t], this.elastic[t])), i.set(r);
951
+ const i = this.getAxisMotionValue(e);
952
+ let r = this.originPoint[e] + s[e];
953
+ this.constraints && this.constraints[e] && (r = Ls(r, this.constraints[e], this.elastic[e])), i.set(r);
954
954
  }
955
955
  resolveConstraints() {
956
956
  var i;
957
- const { dragConstraints: t, dragElastic: n } = this.getProps(), s = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(!1) : (i = this.visualElement.projection) == null ? void 0 : i.layout, o = this.constraints;
958
- t && F(t) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : t && s ? this.constraints = $n(s.layoutBox, t) : this.constraints = !1, this.elastic = qn(n), o !== this.constraints && !F(t) && s && this.constraints && !this.hasMutatedConstraints && D((r) => {
959
- this.constraints !== !1 && this.getAxisMotionValue(r) && (this.constraints[r] = Xn(s.layoutBox[r], this.constraints[r]));
957
+ const { dragConstraints: e, dragElastic: n } = this.getProps(), s = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(!1) : (i = this.visualElement.projection) == null ? void 0 : i.layout, o = this.constraints;
958
+ e && H(e) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : e && s ? this.constraints = Ts(s.layoutBox, e) : this.constraints = !1, this.elastic = Fs(n), o !== this.constraints && !H(e) && s && this.constraints && !this.hasMutatedConstraints && F((r) => {
959
+ this.constraints !== !1 && this.getAxisMotionValue(r) && (this.constraints[r] = ks(s.layoutBox[r], this.constraints[r]));
960
960
  });
961
961
  }
962
962
  resolveRefConstraints() {
963
- const { dragConstraints: t, onMeasureDragConstraints: n } = this.getProps();
964
- if (!t || !F(t))
963
+ const { dragConstraints: e, onMeasureDragConstraints: n } = this.getProps();
964
+ if (!e || !H(e))
965
965
  return !1;
966
- const s = t.current;
967
- Ut(s !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.", "drag-constraints-ref");
966
+ const s = e.current;
967
+ lt(s !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.", "drag-constraints-ref");
968
968
  const { projection: o } = this.visualElement;
969
969
  if (!o || !o.layout)
970
970
  return !1;
971
- const i = We(s, o.root, this.visualElement.getTransformPagePoint());
972
- let r = _n(o.layout.layoutBox, i);
971
+ const i = hn(s, o.root, this.visualElement.getTransformPagePoint());
972
+ let r = Is(o.layout.layoutBox, i);
973
973
  if (n) {
974
- const a = n(He(r));
975
- this.hasMutatedConstraints = !!a, a && (r = Ne(a));
974
+ const a = n(mn(r));
975
+ this.hasMutatedConstraints = !!a, a && (r = pn(a));
976
976
  }
977
977
  return r;
978
978
  }
979
- startAnimation(t) {
980
- const { drag: n, dragMomentum: s, dragElastic: o, dragTransition: i, dragSnapToOrigin: r, onDragTransitionEnd: a } = this.getProps(), f = this.constraints || {}, d = D((m) => {
981
- if (!B(m, n, this.currentDirection))
979
+ startAnimation(e) {
980
+ const { drag: n, dragMomentum: s, dragElastic: o, dragTransition: i, dragSnapToOrigin: r, onDragTransitionEnd: a } = this.getProps(), c = this.constraints || {}, f = F((h) => {
981
+ if (!nt(h, n, this.currentDirection))
982
982
  return;
983
- let u = f && f[m] || {};
984
- (r === !0 || r === m) && (u = { min: 0, max: 0 });
985
- const c = o ? 200 : 1e6, h = o ? 40 : 1e7, l = {
983
+ let u = c && c[h] || {};
984
+ (r === !0 || r === h) && (u = { min: 0, max: 0 });
985
+ const l = o ? 200 : 1e6, m = o ? 40 : 1e7, d = {
986
986
  type: "inertia",
987
- velocity: s ? t[m] : 0,
988
- bounceStiffness: c,
989
- bounceDamping: h,
987
+ velocity: s ? e[h] : 0,
988
+ bounceStiffness: l,
989
+ bounceDamping: m,
990
990
  timeConstant: 750,
991
991
  restDelta: 1,
992
992
  restSpeed: 10,
993
993
  ...i,
994
994
  ...u
995
995
  };
996
- return this.startAxisValueAnimation(m, l);
996
+ return this.startAxisValueAnimation(h, d);
997
997
  });
998
- return Promise.all(d).then(a);
998
+ return Promise.all(f).then(a);
999
999
  }
1000
- startAxisValueAnimation(t, n) {
1001
- const s = this.getAxisMotionValue(t);
1002
- return Ct(this.visualElement, t), s.start(Be(t, s, 0, n, this.visualElement, !1));
1000
+ startAxisValueAnimation(e, n) {
1001
+ const s = this.getAxisMotionValue(e);
1002
+ return Ht(this.visualElement, e), s.start(gn(e, s, 0, n, this.visualElement, !1));
1003
1003
  }
1004
1004
  stopAnimation() {
1005
- D((t) => this.getAxisMotionValue(t).stop());
1005
+ F((e) => this.getAxisMotionValue(e).stop());
1006
1006
  }
1007
1007
  /**
1008
1008
  * Drag works differently depending on which props are provided.
@@ -1010,19 +1010,19 @@ class Jn {
1010
1010
  * - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values.
1011
1011
  * - Otherwise, we apply the delta to the x/y motion values.
1012
1012
  */
1013
- getAxisMotionValue(t) {
1014
- const n = `_drag${t.toUpperCase()}`, s = this.visualElement.getProps(), o = s[n];
1015
- return o || this.visualElement.getValue(t, (s.initial ? s.initial[t] : void 0) || 0);
1013
+ getAxisMotionValue(e) {
1014
+ const n = `_drag${e.toUpperCase()}`, s = this.visualElement.getProps(), o = s[n];
1015
+ return o || this.visualElement.getValue(e, (s.initial ? s.initial[e] : void 0) || 0);
1016
1016
  }
1017
- snapToCursor(t) {
1018
- D((n) => {
1017
+ snapToCursor(e) {
1018
+ F((n) => {
1019
1019
  const { drag: s } = this.getProps();
1020
- if (!B(n, s, this.currentDirection))
1020
+ if (!nt(n, s, this.currentDirection))
1021
1021
  return;
1022
1022
  const { projection: o } = this.visualElement, i = this.getAxisMotionValue(n);
1023
1023
  if (o && o.layout) {
1024
- const { min: r, max: a } = o.layout.layoutBox[n], f = i.get() || 0;
1025
- i.set(t[n] - Y(r, a, 0.5) + f);
1024
+ const { min: r, max: a } = o.layout.layoutBox[n], c = i.get() || 0;
1025
+ i.set(e[n] - K(r, a, 0.5) + c);
1026
1026
  }
1027
1027
  });
1028
1028
  }
@@ -1034,54 +1034,54 @@ class Jn {
1034
1034
  scalePositionWithinConstraints() {
1035
1035
  if (!this.visualElement.current)
1036
1036
  return;
1037
- const { drag: t, dragConstraints: n } = this.getProps(), { projection: s } = this.visualElement;
1038
- if (!F(n) || !s || !this.constraints)
1037
+ const { drag: e, dragConstraints: n } = this.getProps(), { projection: s } = this.visualElement;
1038
+ if (!H(n) || !s || !this.constraints)
1039
1039
  return;
1040
1040
  this.stopAnimation();
1041
1041
  const o = { x: 0, y: 0 };
1042
- D((r) => {
1042
+ F((r) => {
1043
1043
  const a = this.getAxisMotionValue(r);
1044
1044
  if (a && this.constraints !== !1) {
1045
- const f = a.get();
1046
- o[r] = Yn({ min: f, max: f }, this.constraints[r]);
1045
+ const c = a.get();
1046
+ o[r] = Rs({ min: c, max: c }, this.constraints[r]);
1047
1047
  }
1048
1048
  });
1049
1049
  const { transformTemplate: i } = this.visualElement.getProps();
1050
- this.visualElement.current.style.transform = i ? i({}, "") : "none", s.root && s.root.updateScroll(), s.updateLayout(), this.constraints = !1, this.resolveConstraints(), D((r) => {
1051
- if (!B(r, t, null))
1050
+ this.visualElement.current.style.transform = i ? i({}, "") : "none", s.root && s.root.updateScroll(), s.updateLayout(), this.constraints = !1, this.resolveConstraints(), F((r) => {
1051
+ if (!nt(r, e, null))
1052
1052
  return;
1053
- const a = this.getAxisMotionValue(r), { min: f, max: d } = this.constraints[r];
1054
- a.set(Y(f, d, o[r]));
1053
+ const a = this.getAxisMotionValue(r), { min: c, max: f } = this.constraints[r];
1054
+ a.set(K(c, f, o[r]));
1055
1055
  }), this.visualElement.render();
1056
1056
  }
1057
1057
  addListeners() {
1058
1058
  if (!this.visualElement.current)
1059
1059
  return;
1060
- Kn.set(this.visualElement, this);
1061
- const t = this.visualElement.current, n = j(t, "pointerdown", (d) => {
1062
- const { drag: m, dragListener: u = !0 } = this.getProps(), c = d.target, h = c !== t && $e(c);
1063
- m && u && !h && this.start(d);
1060
+ Os.set(this.visualElement, this);
1061
+ const e = this.visualElement.current, n = _(e, "pointerdown", (f) => {
1062
+ const { drag: h, dragListener: u = !0 } = this.getProps(), l = f.target, m = l !== e && Pn(l);
1063
+ h && u && !m && this.start(f);
1064
1064
  });
1065
1065
  let s;
1066
1066
  const o = () => {
1067
- const { dragConstraints: d } = this.getProps();
1068
- F(d) && d.current && (this.constraints = this.resolveRefConstraints(), s || (s = Zn(t, d.current, () => this.scalePositionWithinConstraints())));
1067
+ const { dragConstraints: f } = this.getProps();
1068
+ H(f) && f.current && (this.constraints = this.resolveRefConstraints(), s || (s = js(e, f.current, () => this.scalePositionWithinConstraints())));
1069
1069
  }, { projection: i } = this.visualElement, r = i.addEventListener("measure", o);
1070
- i && !i.layout && (i.root && i.root.updateScroll(), i.updateLayout()), M.read(o);
1071
- const a = _(window, "resize", () => this.scalePositionWithinConstraints()), f = i.addEventListener("didUpdate", ({ delta: d, hasLayoutChanged: m }) => {
1072
- this.isDragging && m && (D((u) => {
1073
- const c = this.getAxisMotionValue(u);
1074
- c && (this.originPoint[u] += d[u].translate, c.set(c.get() + d[u].translate));
1070
+ i && !i.layout && (i.root && i.root.updateScroll(), i.updateLayout()), b.read(o);
1071
+ const a = it(window, "resize", () => this.scalePositionWithinConstraints()), c = i.addEventListener("didUpdate", ({ delta: f, hasLayoutChanged: h }) => {
1072
+ this.isDragging && h && (F((u) => {
1073
+ const l = this.getAxisMotionValue(u);
1074
+ l && (this.originPoint[u] += f[u].translate, l.set(l.get() + f[u].translate));
1075
1075
  }), this.visualElement.render());
1076
1076
  });
1077
1077
  return () => {
1078
- a(), n(), r(), f && f(), s && s();
1078
+ a(), n(), r(), c && c(), s && s();
1079
1079
  };
1080
1080
  }
1081
1081
  getProps() {
1082
- const t = this.visualElement.getProps(), { drag: n = !1, dragDirectionLock: s = !1, dragPropagation: o = !1, dragConstraints: i = !1, dragElastic: r = at, dragMomentum: a = !0 } = t;
1082
+ const e = this.visualElement.getProps(), { drag: n = !1, dragDirectionLock: s = !1, dragPropagation: o = !1, dragConstraints: i = !1, dragElastic: r = xt, dragMomentum: a = !0 } = e;
1083
1083
  return {
1084
- ...t,
1084
+ ...e,
1085
1085
  drag: n,
1086
1086
  dragDirectionLock: s,
1087
1087
  dragPropagation: o,
@@ -1091,71 +1091,71 @@ class Jn {
1091
1091
  };
1092
1092
  }
1093
1093
  }
1094
- function jt(e) {
1095
- let t = !0;
1094
+ function te(t) {
1095
+ let e = !0;
1096
1096
  return () => {
1097
- if (t) {
1098
- t = !1;
1097
+ if (e) {
1098
+ e = !1;
1099
1099
  return;
1100
1100
  }
1101
- e();
1101
+ t();
1102
1102
  };
1103
1103
  }
1104
- function Zn(e, t, n) {
1105
- const s = xt(e, jt(n)), o = xt(t, jt(n));
1104
+ function js(t, e, n) {
1105
+ const s = Nt(t, te(n)), o = Nt(e, te(n));
1106
1106
  return () => {
1107
1107
  s(), o();
1108
1108
  };
1109
1109
  }
1110
- function B(e, t, n) {
1111
- return (t === !0 || t === e) && (n === null || n === e);
1110
+ function nt(t, e, n) {
1111
+ return (e === !0 || e === t) && (n === null || n === t);
1112
1112
  }
1113
- function Qn(e, t = 10) {
1113
+ function Ws(t, e = 10) {
1114
1114
  let n = null;
1115
- return Math.abs(e.y) > t ? n = "y" : Math.abs(e.x) > t && (n = "x"), n;
1115
+ return Math.abs(t.y) > e ? n = "y" : Math.abs(t.x) > e && (n = "x"), n;
1116
1116
  }
1117
- class ts extends A {
1118
- constructor(t) {
1119
- super(t), this.removeGroupControls = U, this.removeListeners = U, this.controls = new Jn(t);
1117
+ class Hs extends O {
1118
+ constructor(e) {
1119
+ super(e), this.removeGroupControls = st, this.removeListeners = st, this.controls = new Gs(e);
1120
1120
  }
1121
1121
  mount() {
1122
- const { dragControls: t } = this.node.getProps();
1123
- t && (this.removeGroupControls = t.subscribe(this.controls)), this.removeListeners = this.controls.addListeners() || U;
1122
+ const { dragControls: e } = this.node.getProps();
1123
+ e && (this.removeGroupControls = e.subscribe(this.controls)), this.removeListeners = this.controls.addListeners() || st;
1124
1124
  }
1125
1125
  update() {
1126
- const { dragControls: t } = this.node.getProps(), { dragControls: n } = this.node.prevProps || {};
1127
- t !== n && (this.removeGroupControls(), t && (this.removeGroupControls = t.subscribe(this.controls)));
1126
+ const { dragControls: e } = this.node.getProps(), { dragControls: n } = this.node.prevProps || {};
1127
+ e !== n && (this.removeGroupControls(), e && (this.removeGroupControls = e.subscribe(this.controls)));
1128
1128
  }
1129
1129
  unmount() {
1130
1130
  this.removeGroupControls(), this.removeListeners(), this.controls.isDragging || this.controls.endPanSession();
1131
1131
  }
1132
1132
  }
1133
- const st = (e) => (t, n) => {
1134
- e && M.update(() => e(t, n), !1, !0);
1133
+ const yt = (t) => (e, n) => {
1134
+ t && b.update(() => t(e, n), !1, !0);
1135
1135
  };
1136
- class es extends A {
1136
+ class Ns extends O {
1137
1137
  constructor() {
1138
- super(...arguments), this.removePointerDownListener = U;
1138
+ super(...arguments), this.removePointerDownListener = st;
1139
1139
  }
1140
- onPointerDown(t) {
1141
- this.session = new re(t, this.createPanHandlers(), {
1140
+ onPointerDown(e) {
1141
+ this.session = new Re(e, this.createPanHandlers(), {
1142
1142
  transformPagePoint: this.node.getTransformPagePoint(),
1143
- contextWindow: ie(this.node)
1143
+ contextWindow: Ie(this.node)
1144
1144
  });
1145
1145
  }
1146
1146
  createPanHandlers() {
1147
- const { onPanSessionStart: t, onPanStart: n, onPan: s, onPanEnd: o } = this.node.getProps();
1147
+ const { onPanSessionStart: e, onPanStart: n, onPan: s, onPanEnd: o } = this.node.getProps();
1148
1148
  return {
1149
- onSessionStart: st(t),
1150
- onStart: st(n),
1151
- onMove: st(s),
1149
+ onSessionStart: yt(e),
1150
+ onStart: yt(n),
1151
+ onMove: yt(s),
1152
1152
  onEnd: (i, r) => {
1153
- delete this.session, o && M.postRender(() => o(i, r));
1153
+ delete this.session, o && b.postRender(() => o(i, r));
1154
1154
  }
1155
1155
  };
1156
1156
  }
1157
1157
  mount() {
1158
- this.removePointerDownListener = j(this.node.current, "pointerdown", (t) => this.onPointerDown(t));
1158
+ this.removePointerDownListener = _(this.node.current, "pointerdown", (e) => this.onPointerDown(e));
1159
1159
  }
1160
1160
  update() {
1161
1161
  this.session && this.session.updateHandlers(this.createPanHandlers());
@@ -1164,116 +1164,116 @@ class es extends A {
1164
1164
  this.removePointerDownListener(), this.session && this.session.end();
1165
1165
  }
1166
1166
  }
1167
- let ot = !1;
1168
- class ns extends ve {
1167
+ let Pt = !1;
1168
+ class Bs extends Ye {
1169
1169
  /**
1170
1170
  * This only mounts projection nodes for components that
1171
1171
  * need measuring, we might want to do it for all components
1172
1172
  * in order to incorporate transforms
1173
1173
  */
1174
1174
  componentDidMount() {
1175
- const { visualElement: t, layoutGroup: n, switchLayoutGroup: s, layoutId: o } = this.props, { projection: i } = t;
1176
- i && (n.group && n.group.add(i), s && s.register && o && s.register(i), ot && i.root.didUpdate(), i.addEventListener("animationComplete", () => {
1175
+ const { visualElement: e, layoutGroup: n, switchLayoutGroup: s, layoutId: o } = this.props, { projection: i } = e;
1176
+ i && (n.group && n.group.add(i), s && s.register && o && s.register(i), Pt && i.root.didUpdate(), i.addEventListener("animationComplete", () => {
1177
1177
  this.safeToRemove();
1178
1178
  }), i.setOptions({
1179
1179
  ...i.options,
1180
1180
  layoutDependency: this.props.layoutDependency,
1181
1181
  onExitComplete: () => this.safeToRemove()
1182
- })), Ye.hasEverUpdated = !0;
1182
+ })), En.hasEverUpdated = !0;
1183
1183
  }
1184
- getSnapshotBeforeUpdate(t) {
1184
+ getSnapshotBeforeUpdate(e) {
1185
1185
  const { layoutDependency: n, visualElement: s, drag: o, isPresent: i } = this.props, { projection: r } = s;
1186
- return r && (r.isPresent = i, t.layoutDependency !== n && r.setOptions({
1186
+ return r && (r.isPresent = i, e.layoutDependency !== n && r.setOptions({
1187
1187
  ...r.options,
1188
1188
  layoutDependency: n
1189
- }), ot = !0, o || t.layoutDependency !== n || n === void 0 || t.isPresent !== i ? r.willUpdate() : this.safeToRemove(), t.isPresent !== i && (i ? r.promote() : r.relegate() || M.postRender(() => {
1189
+ }), Pt = !0, o || e.layoutDependency !== n || n === void 0 || e.isPresent !== i ? r.willUpdate() : this.safeToRemove(), e.isPresent !== i && (i ? r.promote() : r.relegate() || b.postRender(() => {
1190
1190
  const a = r.getStack();
1191
1191
  (!a || !a.members.length) && this.safeToRemove();
1192
1192
  }))), null;
1193
1193
  }
1194
1194
  componentDidUpdate() {
1195
- const { projection: t } = this.props.visualElement;
1196
- t && (t.root.didUpdate(), _e.postRender(() => {
1197
- !t.currentAnimation && t.isLead() && this.safeToRemove();
1195
+ const { projection: e } = this.props.visualElement;
1196
+ e && (e.root.didUpdate(), wn.postRender(() => {
1197
+ !e.currentAnimation && e.isLead() && this.safeToRemove();
1198
1198
  }));
1199
1199
  }
1200
1200
  componentWillUnmount() {
1201
- const { visualElement: t, layoutGroup: n, switchLayoutGroup: s } = this.props, { projection: o } = t;
1202
- ot = !0, o && (o.scheduleCheckAfterUnmount(), n && n.group && n.group.remove(o), s && s.deregister && s.deregister(o));
1201
+ const { visualElement: e, layoutGroup: n, switchLayoutGroup: s } = this.props, { projection: o } = e;
1202
+ Pt = !0, o && (o.scheduleCheckAfterUnmount(), n && n.group && n.group.remove(o), s && s.deregister && s.deregister(o));
1203
1203
  }
1204
1204
  safeToRemove() {
1205
- const { safeToRemove: t } = this.props;
1206
- t && t();
1205
+ const { safeToRemove: e } = this.props;
1206
+ e && e();
1207
1207
  }
1208
1208
  render() {
1209
1209
  return null;
1210
1210
  }
1211
1211
  }
1212
- function ce(e) {
1213
- const [t, n] = Xt(), s = w(O);
1214
- return V(ns, { ...e, layoutGroup: s, switchLayoutGroup: w(se), isPresent: t, safeToRemove: n });
1212
+ function Fe(t) {
1213
+ const [e, n] = Ee(), s = C(X);
1214
+ return I(Bs, { ...t, layoutGroup: s, switchLayoutGroup: C(Le), isPresent: e, safeToRemove: n });
1215
1215
  }
1216
- const ss = {
1216
+ const Us = {
1217
1217
  pan: {
1218
- Feature: es
1218
+ Feature: Ns
1219
1219
  },
1220
1220
  drag: {
1221
- Feature: ts,
1222
- ProjectionNode: Yt,
1223
- MeasureLayout: ce
1221
+ Feature: Hs,
1222
+ ProjectionNode: ve,
1223
+ MeasureLayout: Fe
1224
1224
  }
1225
1225
  };
1226
- function Ot(e, t, n) {
1227
- const { props: s } = e;
1228
- e.animationState && s.whileHover && e.animationState.setActive("whileHover", n === "Start");
1226
+ function ee(t, e, n) {
1227
+ const { props: s } = t;
1228
+ t.animationState && s.whileHover && t.animationState.setActive("whileHover", n === "Start");
1229
1229
  const o = "onHover" + n, i = s[o];
1230
- i && M.postRender(() => i(t, W(t)));
1230
+ i && b.postRender(() => i(e, J(e)));
1231
1231
  }
1232
- class os extends A {
1232
+ class zs extends O {
1233
1233
  mount() {
1234
- const { current: t } = this.node;
1235
- t && (this.unmount = Xe(t, (n, s) => (Ot(this.node, s, "Start"), (o) => Ot(this.node, o, "End"))));
1234
+ const { current: e } = this.node;
1235
+ e && (this.unmount = Sn(e, (n, s) => (ee(this.node, s, "Start"), (o) => ee(this.node, o, "End"))));
1236
1236
  }
1237
1237
  unmount() {
1238
1238
  }
1239
1239
  }
1240
- class is extends A {
1240
+ class $s extends O {
1241
1241
  constructor() {
1242
1242
  super(...arguments), this.isActive = !1;
1243
1243
  }
1244
1244
  onFocus() {
1245
- let t = !1;
1245
+ let e = !1;
1246
1246
  try {
1247
- t = this.node.current.matches(":focus-visible");
1247
+ e = this.node.current.matches(":focus-visible");
1248
1248
  } catch {
1249
- t = !0;
1249
+ e = !0;
1250
1250
  }
1251
- !t || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !0), this.isActive = !0);
1251
+ !e || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !0), this.isActive = !0);
1252
1252
  }
1253
1253
  onBlur() {
1254
1254
  !this.isActive || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !1), this.isActive = !1);
1255
1255
  }
1256
1256
  mount() {
1257
- this.unmount = _t(_(this.node.current, "focus", () => this.onFocus()), _(this.node.current, "blur", () => this.onBlur()));
1257
+ this.unmount = pe(it(this.node.current, "focus", () => this.onFocus()), it(this.node.current, "blur", () => this.onBlur()));
1258
1258
  }
1259
1259
  unmount() {
1260
1260
  }
1261
1261
  }
1262
- function Gt(e, t, n) {
1263
- const { props: s } = e;
1264
- if (e.current instanceof HTMLButtonElement && e.current.disabled)
1262
+ function ne(t, e, n) {
1263
+ const { props: s } = t;
1264
+ if (t.current instanceof HTMLButtonElement && t.current.disabled)
1265
1265
  return;
1266
- e.animationState && s.whileTap && e.animationState.setActive("whileTap", n === "Start");
1266
+ t.animationState && s.whileTap && t.animationState.setActive("whileTap", n === "Start");
1267
1267
  const o = "onTap" + (n === "End" ? "" : n), i = s[o];
1268
- i && M.postRender(() => i(t, W(t)));
1268
+ i && b.postRender(() => i(e, J(e)));
1269
1269
  }
1270
- class rs extends A {
1270
+ class _s extends O {
1271
1271
  mount() {
1272
- const { current: t } = this.node;
1273
- if (!t)
1272
+ const { current: e } = this.node;
1273
+ if (!e)
1274
1274
  return;
1275
1275
  const { globalTapTarget: n, propagate: s } = this.node.props;
1276
- this.unmount = qe(t, (o, i) => (Gt(this.node, i, "Start"), (r, { success: a }) => Gt(this.node, r, a ? "End" : "Cancel")), {
1276
+ this.unmount = Cn(e, (o, i) => (ne(this.node, i, "Start"), (r, { success: a }) => ne(this.node, r, a ? "End" : "Cancel")), {
1277
1277
  useGlobalTarget: n,
1278
1278
  stopPropagation: (s == null ? void 0 : s.tap) === !1
1279
1279
  });
@@ -1281,47 +1281,47 @@ class rs extends A {
1281
1281
  unmount() {
1282
1282
  }
1283
1283
  }
1284
- const ct = /* @__PURE__ */ new WeakMap(), it = /* @__PURE__ */ new WeakMap(), as = (e) => {
1285
- const t = ct.get(e.target);
1286
- t && t(e);
1287
- }, cs = (e) => {
1288
- e.forEach(as);
1284
+ const Mt = /* @__PURE__ */ new WeakMap(), wt = /* @__PURE__ */ new WeakMap(), Ys = (t) => {
1285
+ const e = Mt.get(t.target);
1286
+ e && e(t);
1287
+ }, Ks = (t) => {
1288
+ t.forEach(Ys);
1289
1289
  };
1290
- function us({ root: e, ...t }) {
1291
- const n = e || document;
1292
- it.has(n) || it.set(n, {});
1293
- const s = it.get(n), o = JSON.stringify(t);
1294
- return s[o] || (s[o] = new IntersectionObserver(cs, { root: e, ...t })), s[o];
1295
- }
1296
- function ls(e, t, n) {
1297
- const s = us(t);
1298
- return ct.set(e, n), s.observe(e), () => {
1299
- ct.delete(e), s.unobserve(e);
1290
+ function Xs({ root: t, ...e }) {
1291
+ const n = t || document;
1292
+ wt.has(n) || wt.set(n, {});
1293
+ const s = wt.get(n), o = JSON.stringify(e);
1294
+ return s[o] || (s[o] = new IntersectionObserver(Ks, { root: t, ...e })), s[o];
1295
+ }
1296
+ function qs(t, e, n) {
1297
+ const s = Xs(e);
1298
+ return Mt.set(t, n), s.observe(t), () => {
1299
+ Mt.delete(t), s.unobserve(t);
1300
1300
  };
1301
1301
  }
1302
- const fs = {
1302
+ const Js = {
1303
1303
  some: 0,
1304
1304
  all: 1
1305
1305
  };
1306
- class ds extends A {
1306
+ class Zs extends O {
1307
1307
  constructor() {
1308
1308
  super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
1309
1309
  }
1310
1310
  startObserver() {
1311
1311
  this.unmount();
1312
- const { viewport: t = {} } = this.node.getProps(), { root: n, margin: s, amount: o = "some", once: i } = t, r = {
1312
+ const { viewport: e = {} } = this.node.getProps(), { root: n, margin: s, amount: o = "some", once: i } = e, r = {
1313
1313
  root: n ? n.current : void 0,
1314
1314
  rootMargin: s,
1315
- threshold: typeof o == "number" ? o : fs[o]
1316
- }, a = (f) => {
1317
- const { isIntersecting: d } = f;
1318
- if (this.isInView === d || (this.isInView = d, i && !d && this.hasEnteredView))
1315
+ threshold: typeof o == "number" ? o : Js[o]
1316
+ }, a = (c) => {
1317
+ const { isIntersecting: f } = c;
1318
+ if (this.isInView === f || (this.isInView = f, i && !f && this.hasEnteredView))
1319
1319
  return;
1320
- d && (this.hasEnteredView = !0), this.node.animationState && this.node.animationState.setActive("whileInView", d);
1321
- const { onViewportEnter: m, onViewportLeave: u } = this.node.getProps(), c = d ? m : u;
1322
- c && c(f);
1320
+ f && (this.hasEnteredView = !0), this.node.animationState && this.node.animationState.setActive("whileInView", f);
1321
+ const { onViewportEnter: h, onViewportLeave: u } = this.node.getProps(), l = f ? h : u;
1322
+ l && l(c);
1323
1323
  };
1324
- return ls(this.node.current, r, a);
1324
+ return qs(this.node.current, r, a);
1325
1325
  }
1326
1326
  mount() {
1327
1327
  this.startObserver();
@@ -1329,48 +1329,322 @@ class ds extends A {
1329
1329
  update() {
1330
1330
  if (typeof IntersectionObserver > "u")
1331
1331
  return;
1332
- const { props: t, prevProps: n } = this.node;
1333
- ["amount", "margin", "root"].some(hs(t, n)) && this.startObserver();
1332
+ const { props: e, prevProps: n } = this.node;
1333
+ ["amount", "margin", "root"].some(Qs(e, n)) && this.startObserver();
1334
1334
  }
1335
1335
  unmount() {
1336
1336
  }
1337
1337
  }
1338
- function hs({ viewport: e = {} }, { viewport: t = {} } = {}) {
1339
- return (n) => e[n] !== t[n];
1338
+ function Qs({ viewport: t = {} }, { viewport: e = {} } = {}) {
1339
+ return (n) => t[n] !== e[n];
1340
1340
  }
1341
- const ms = {
1341
+ const to = {
1342
1342
  inView: {
1343
- Feature: ds
1343
+ Feature: Zs
1344
1344
  },
1345
1345
  tap: {
1346
- Feature: rs
1346
+ Feature: _s
1347
1347
  },
1348
1348
  focus: {
1349
- Feature: is
1349
+ Feature: $s
1350
1350
  },
1351
1351
  hover: {
1352
- Feature: os
1352
+ Feature: zs
1353
1353
  }
1354
- }, ps = {
1354
+ }, eo = {
1355
1355
  layout: {
1356
- ProjectionNode: Yt,
1357
- MeasureLayout: ce
1358
- }
1359
- }, gs = {
1360
- ...Wn,
1361
- ...ms,
1362
- ...ss,
1363
- ...ps
1364
- }, xs = /* @__PURE__ */ kn(gs, Fn);
1365
- function Ss() {
1366
- !Ke.current && Je();
1367
- const [e] = $(Ze.current);
1368
- return process.env.NODE_ENV !== "production" && zt(e !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled"), e;
1356
+ ProjectionNode: ve,
1357
+ MeasureLayout: Fe
1358
+ }
1359
+ }, no = {
1360
+ ...Ms,
1361
+ ...to,
1362
+ ...Us,
1363
+ ...eo
1364
+ }, Io = /* @__PURE__ */ ws(no, Es);
1365
+ function so(t) {
1366
+ const e = B(() => ye(t)), { isStatic: n } = C(N);
1367
+ if (n) {
1368
+ const [, s] = Y(t);
1369
+ ct(() => e.on("change", s), []);
1370
+ }
1371
+ return e;
1372
+ }
1373
+ function Oe(t, e) {
1374
+ const n = so(e()), s = () => n.set(e());
1375
+ return s(), ft(() => {
1376
+ const o = () => b.preRender(s, !1, !0), i = t.map((r) => r.on("change", o));
1377
+ return () => {
1378
+ i.forEach((r) => r()), ge(s);
1379
+ };
1380
+ }), n;
1381
+ }
1382
+ function oo(t) {
1383
+ pt.current = [], t();
1384
+ const e = Oe(pt.current, t);
1385
+ return pt.current = void 0, e;
1386
+ }
1387
+ function Ro(t, e, n, s) {
1388
+ if (typeof t == "function")
1389
+ return oo(t);
1390
+ const i = typeof e == "function" ? e : xn(e, n, s), r = Array.isArray(t) ? se(t, i) : se([t], ([c]) => i(c)), a = Array.isArray(t) ? void 0 : t.accelerate;
1391
+ return a && !a.isTransformed && typeof e != "function" && Array.isArray(n) && (s == null ? void 0 : s.clamp) !== !1 && (r.accelerate = {
1392
+ ...a,
1393
+ times: e,
1394
+ keyframes: n,
1395
+ isTransformed: !0
1396
+ }), r;
1397
+ }
1398
+ function se(t, e) {
1399
+ const n = B(() => []);
1400
+ return Oe(t, () => {
1401
+ n.length = 0;
1402
+ const s = t.length;
1403
+ for (let o = 0; o < s; o++)
1404
+ n[o] = t[o].get();
1405
+ return e(n);
1406
+ });
1407
+ }
1408
+ function ko() {
1409
+ !Mn.current && An();
1410
+ const [t] = Y(Vn.current);
1411
+ return process.env.NODE_ENV !== "production" && fe(t !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled"), t;
1412
+ }
1413
+ function Lt(t) {
1414
+ return typeof t == "object" && !Array.isArray(t);
1415
+ }
1416
+ function Ge(t, e, n, s) {
1417
+ return t == null ? [] : typeof t == "string" && Lt(e) ? Dn(t, n, s) : t instanceof NodeList ? Array.from(t) : Array.isArray(t) ? t.filter((o) => o != null) : [t];
1418
+ }
1419
+ function io(t, e, n) {
1420
+ return t * (e + 1);
1421
+ }
1422
+ function oe(t, e, n, s) {
1423
+ return typeof e == "number" ? e : e.startsWith("-") || e.startsWith("+") ? Math.max(0, t + parseFloat(e)) : e === "<" ? n : e.startsWith("<") ? Math.max(0, n + parseFloat(e.slice(1))) : s.get(e) ?? t;
1424
+ }
1425
+ function ro(t, e, n) {
1426
+ for (let s = 0; s < t.length; s++) {
1427
+ const o = t[s];
1428
+ o.at > e && o.at < n && (we(t, o), s--);
1429
+ }
1430
+ }
1431
+ function ao(t, e, n, s, o, i) {
1432
+ ro(t, o, i);
1433
+ for (let r = 0; r < e.length; r++)
1434
+ t.push({
1435
+ value: e[r],
1436
+ at: K(o, i, s[r]),
1437
+ easing: Pe(n, r)
1438
+ });
1439
+ }
1440
+ function uo(t, e) {
1441
+ for (let n = 0; n < t.length; n++)
1442
+ t[n] = t[n] / (e + 1);
1443
+ }
1444
+ function co(t, e) {
1445
+ return t.at === e.at ? t.value === null ? 1 : e.value === null ? -1 : 0 : t.at - e.at;
1446
+ }
1447
+ const lo = "easeInOut", fo = 20;
1448
+ function ho(t, { defaultTransition: e = {}, ...n } = {}, s, o) {
1449
+ const i = e.duration || 0.3, r = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), c = {}, f = /* @__PURE__ */ new Map();
1450
+ let h = 0, u = 0, l = 0;
1451
+ for (let m = 0; m < t.length; m++) {
1452
+ const d = t[m];
1453
+ if (typeof d == "string") {
1454
+ f.set(d, u);
1455
+ continue;
1456
+ } else if (!Array.isArray(d)) {
1457
+ f.set(d.name, oe(u, d.at, h, f));
1458
+ continue;
1459
+ }
1460
+ let [y, g, p = {}] = d;
1461
+ p.at !== void 0 && (u = oe(u, p.at, h, f));
1462
+ let v = 0;
1463
+ const E = (w, S, x, A = 0, M = 0) => {
1464
+ const P = mo(w), { delay: L = 0, times: D = bn(P), type: W = e.type || "keyframes", repeat: G, repeatType: xo, repeatDelay: Mo = 0, ...We } = S;
1465
+ let { ease: k = e.ease || "easeOut", duration: T } = S;
1466
+ const Tt = typeof L == "function" ? L(A, M) : L, It = P.length, Rt = In(W) ? W : o == null ? void 0 : o[W || "keyframes"];
1467
+ if (It <= 2 && Rt) {
1468
+ let U = 100;
1469
+ if (It === 2 && vo(P)) {
1470
+ const z = P[1] - P[0];
1471
+ U = Math.abs(z);
1472
+ }
1473
+ const Z = {
1474
+ ...e,
1475
+ ...We
1476
+ };
1477
+ T !== void 0 && (Z.duration = Et(T));
1478
+ const Q = Ln(Z, U, Rt);
1479
+ k = Q.ease, T = Q.duration;
1480
+ }
1481
+ T ?? (T = i);
1482
+ const kt = u + Tt;
1483
+ D.length === 1 && D[0] === 0 && (D[1] = 1);
1484
+ const Ft = D.length - P.length;
1485
+ if (Ft > 0 && Tn(D, Ft), P.length === 1 && P.unshift(null), G) {
1486
+ lt(G < fo, "Repeat count too high, must be less than 20", "repeat-count-high"), T = io(T, G);
1487
+ const U = [...P], Z = [...D];
1488
+ k = Array.isArray(k) ? [...k] : [k];
1489
+ const Q = [...k];
1490
+ for (let z = 0; z < G; z++) {
1491
+ P.push(...U);
1492
+ for (let $ = 0; $ < U.length; $++)
1493
+ D.push(Z[$] + (z + 1)), k.push($ === 0 ? "linear" : Pe(Q, $ - 1));
1494
+ }
1495
+ uo(D, G);
1496
+ }
1497
+ const Ot = kt + T;
1498
+ ao(x, P, k, D, kt, Ot), v = Math.max(Tt + T, v), l = Math.max(Ot, l);
1499
+ };
1500
+ if (q(y)) {
1501
+ const w = ie(y, a);
1502
+ E(g, p, re("default", w));
1503
+ } else {
1504
+ const w = Ge(y, g, s, c), S = w.length;
1505
+ for (let x = 0; x < S; x++) {
1506
+ g = g, p = p;
1507
+ const A = w[x], M = ie(A, a);
1508
+ for (const P in g)
1509
+ E(g[P], po(p, P), re(P, M), x, S);
1510
+ }
1511
+ }
1512
+ h = u, u += v;
1513
+ }
1514
+ return a.forEach((m, d) => {
1515
+ for (const y in m) {
1516
+ const g = m[y];
1517
+ g.sort(co);
1518
+ const p = [], v = [], E = [];
1519
+ for (let A = 0; A < g.length; A++) {
1520
+ const { at: M, value: P, easing: L } = g[A];
1521
+ p.push(P), v.push(Ct(0, l, M)), E.push(L || "easeOut");
1522
+ }
1523
+ v[0] !== 0 && (v.unshift(0), p.unshift(p[0]), E.unshift(lo)), v[v.length - 1] !== 1 && (v.push(1), p.push(null)), r.has(d) || r.set(d, {
1524
+ keyframes: {},
1525
+ transition: {}
1526
+ });
1527
+ const w = r.get(d);
1528
+ w.keyframes[y] = p;
1529
+ const { type: S, ...x } = e;
1530
+ w.transition[y] = {
1531
+ ...x,
1532
+ duration: l,
1533
+ ease: E,
1534
+ times: v,
1535
+ ...n
1536
+ };
1537
+ }
1538
+ }), r;
1539
+ }
1540
+ function ie(t, e) {
1541
+ return !e.has(t) && e.set(t, {}), e.get(t);
1542
+ }
1543
+ function re(t, e) {
1544
+ return e[t] || (e[t] = []), e[t];
1545
+ }
1546
+ function mo(t) {
1547
+ return Array.isArray(t) ? t : [t];
1548
+ }
1549
+ function po(t, e) {
1550
+ return t && t[e] ? {
1551
+ ...t,
1552
+ ...t[e]
1553
+ } : { ...t };
1554
+ }
1555
+ const go = (t) => typeof t == "number", vo = (t) => t.every(go);
1556
+ function yo(t) {
1557
+ const e = {
1558
+ presenceContext: null,
1559
+ props: {},
1560
+ visualState: {
1561
+ renderState: {
1562
+ transform: {},
1563
+ transformOrigin: {},
1564
+ style: {},
1565
+ vars: {},
1566
+ attrs: {}
1567
+ },
1568
+ latestValues: {}
1569
+ }
1570
+ }, n = Rn(t) && !kn(t) ? new de(e) : new he(e);
1571
+ n.mount(t), rt.set(t, n);
1572
+ }
1573
+ function Po(t) {
1574
+ const e = {
1575
+ presenceContext: null,
1576
+ props: {},
1577
+ visualState: {
1578
+ renderState: {
1579
+ output: {}
1580
+ },
1581
+ latestValues: {}
1582
+ }
1583
+ }, n = new Fn(e);
1584
+ n.mount(t), rt.set(t, n);
1585
+ }
1586
+ function wo(t, e) {
1587
+ return q(t) || typeof t == "number" || typeof t == "string" && !Lt(e);
1588
+ }
1589
+ function je(t, e, n, s) {
1590
+ const o = [];
1591
+ if (wo(t, e))
1592
+ o.push(On(t, Lt(e) && e.default || e, n && (n.default || n)));
1593
+ else {
1594
+ if (t == null)
1595
+ return o;
1596
+ const i = Ge(t, e, s), r = i.length;
1597
+ lt(!!r, "No valid elements provided.", "no-valid-elements");
1598
+ for (let a = 0; a < r; a++) {
1599
+ const c = i[a], f = c instanceof Element ? yo : Po;
1600
+ rt.has(c) || f(c);
1601
+ const h = rt.get(c), u = { ...n };
1602
+ "delay" in u && typeof u.delay == "function" && (u.delay = u.delay(a, r)), o.push(...Gn(h, { ...e, transition: u }, {}));
1603
+ }
1604
+ }
1605
+ return o;
1606
+ }
1607
+ function Eo(t, e, n) {
1608
+ const s = [], o = t.map((r) => {
1609
+ if (Array.isArray(r) && typeof r[0] == "function") {
1610
+ const a = r[0], c = ye(0);
1611
+ return c.on("change", a), r.length === 1 ? [c, [0, 1]] : r.length === 2 ? [c, [0, 1], r[1]] : [c, r[1], r[2]];
1612
+ }
1613
+ return r;
1614
+ });
1615
+ return ho(o, e, n, { spring: jn }).forEach(({ keyframes: r, transition: a }, c) => {
1616
+ s.push(...je(c, r, a));
1617
+ }), s;
1618
+ }
1619
+ function So(t) {
1620
+ return Array.isArray(t) && t.some(Array.isArray);
1621
+ }
1622
+ function Co(t = {}) {
1623
+ const { scope: e, reduceMotion: n } = t;
1624
+ function s(o, i, r) {
1625
+ let a = [], c;
1626
+ if (So(o)) {
1627
+ const { onComplete: h, ...u } = i || {};
1628
+ typeof h == "function" && (c = h), a = Eo(o, n !== void 0 ? { reduceMotion: n, ...u } : u, e);
1629
+ } else {
1630
+ const { onComplete: h, ...u } = r || {};
1631
+ typeof h == "function" && (c = h), a = je(o, i, n !== void 0 ? { reduceMotion: n, ...u } : u, e);
1632
+ }
1633
+ const f = new Wn(a);
1634
+ return c && f.finished.then(c), e && (e.animations.push(f), f.finished.then(() => {
1635
+ we(e.animations, f);
1636
+ })), f;
1637
+ }
1638
+ return s;
1369
1639
  }
1640
+ const Fo = Co();
1370
1641
  export {
1371
- ws as A,
1372
- Es as L,
1373
- Cs as M,
1374
- xs as m,
1375
- Ss as u
1642
+ bo as A,
1643
+ Lo as L,
1644
+ To as M,
1645
+ so as a,
1646
+ Fo as b,
1647
+ Ro as c,
1648
+ Io as m,
1649
+ ko as u
1376
1650
  };